@achref-thamri/exercises 0.0.0-stage → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Achref Thamri
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,80 @@
1
- # Temporary Holding Version
1
+ # Exercises
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![CI](https://github.com/achref-thamri/gymdeck-exercises/actions/workflows/ci.yml/badge.svg)](https://github.com/achref-thamri/gymdeck-exercises/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/@achref-thamri/exercises)](https://www.npmjs.com/package/@achref-thamri/exercises)
5
+
6
+ An open library of ~500 strength exercises: names, step-by-step instructions, target muscles, equipment and form tips. Every entry is validated in CI and shipped as typed data with no runtime dependencies. It powers the [Gymdeck](https://github.com/achref-thamri) workout app.
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ npm install @achref-thamri/exercises
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```ts
17
+ import { exercises, MUSCLES, type ExerciseSummary } from "@achref-thamri/exercises";
18
+
19
+ const chest = exercises.filter((exercise) => exercise.muscles.primary === "chest");
20
+ ```
21
+
22
+ Steps are most of the data, so they ship in a separate entry. Load it only where you show instructions:
23
+
24
+ ```ts
25
+ import { getSteps } from "@achref-thamri/exercises/steps";
26
+
27
+ getSteps("db-bench-press"); // ["Lie on a flat bench…", …]
28
+ ```
29
+
30
+ The full data set is also available as plain JSON at `@achref-thamri/exercises/exercises.json`, and the file schema at `@achref-thamri/exercises/schema.json`.
31
+
32
+ ## Data format
33
+
34
+ Each exercise is one file in [`exercises/`](exercises), named after its id:
35
+
36
+ ```json
37
+ {
38
+ "$schema": "../schema.json",
39
+ "id": "db-bench-press",
40
+ "name": "Dumbbell bench press",
41
+ "muscles": { "primary": "chest", "secondary": ["triceps", "shoulders"] },
42
+ "equipment": ["dumbbell", "bench"],
43
+ "mechanic": "compound",
44
+ "level": "beginner",
45
+ "steps": ["Lie on a flat bench…", "Lower the dumbbells…"],
46
+ "tips": ["Lower until elbows sit just below the bench."]
47
+ }
48
+ ```
49
+
50
+ | Field | Rules |
51
+ | ----------- | -------------------------------------------------------------------------------------------- |
52
+ | `id` | Permanent and matches the file name. New ids use kebab-case. |
53
+ | `name` | Unique, ignoring case. |
54
+ | `muscles` | One primary and any secondary muscles from [`MUSCLES`](src/vocabulary.ts), no repeats. |
55
+ | `equipment` | Everything needed at once, from [`EQUIPMENT`](src/vocabulary.ts). `bodyweight` stands alone. |
56
+ | `mechanic` | `compound` or `isolation`. |
57
+ | `level` | `beginner`, `intermediate` or `expert`. |
58
+ | `steps` | At least two. |
59
+ | `tips` | Optional short form cues. |
60
+ | `source` | Optional credit for where the text came from. |
61
+
62
+ Editors that understand `$schema` autocomplete fields and flag mistakes as you type.
63
+
64
+ ## Contributing
65
+
66
+ 1. Add or edit a file in `exercises/`.
67
+ 2. Run `npm test`. It validates every file and reports all problems at once.
68
+ 3. Open a pull request.
69
+
70
+ Ids are never renamed or removed, because apps store them in workout history. [`exercise-ids.json`](exercise-ids.json) records every id ever published, and the build fails if one goes missing.
71
+
72
+ ## Versioning
73
+
74
+ [Semantic versioning](https://semver.org): new exercises, new optional fields and new vocabulary values are minor releases. Renaming or removing a field or value is a major release.
75
+
76
+ To release, bump the version in a pull request (`npm version minor --no-git-tag-version`). After it merges, tag the merge commit (`git tag v1.1.0 && git push origin v1.1.0`). CI stages the release on npm with [provenance](https://docs.npmjs.com/generating-provenance-statements), and a maintainer approves it with 2FA (`npm stage approve <id>` or on npmjs.com) to make it public.
77
+
78
+ ## License
79
+
80
+ [MIT](LICENSE)