Replace the YAML exercise catalogs with the motion-rig exercise library

The exercise picker now lists the bundled exercise library — the
motion-rig exercises exported from Exercise Library/ — instead of the
two *.exercises.yaml starter catalogs. ExerciseListLoader and the Yams
dependency are removed; ExerciseMotionLibrary gains exerciseNames, the
bundle enumeration the picker reads.
This commit is contained in:
2026-07-06 12:27:44 -04:00
parent 936a585ece
commit 888852cc2e
9 changed files with 58 additions and 350 deletions
@@ -83,6 +83,19 @@ enum ExerciseMotionLibrary {
let body: ExerciseBodyProfile
}
/// Every exercise with a bundled motion script, sorted alphabetically. XcodeGen
/// flattens resource groups, so `<Exercise Name>.motion.json` files land in the
/// bundle root alongside `body.json` enumerate all json and filter on the
/// compound suffix (which `body.json` doesn't match).
static let exerciseNames: [String] = {
let urls = Bundle.main.urls(forResourcesWithExtension: "json", subdirectory: nil) ?? []
return urls
.map(\.lastPathComponent)
.filter { $0.hasSuffix(".motion.json") }
.map { String($0.dropLast(".motion.json".count)) }
.sorted()
}()
/// The motion script plus the neutral body profile for `exerciseName`, or `nil`
/// when no bundled motion matches (most exercises have none the caller keeps
/// its space empty).