@sency/react-native-smkit-ui 0.3.1 → 2.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.
Files changed (34) hide show
  1. package/README.md +512 -0
  2. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  3. package/android/build.gradle +14 -10
  4. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  5. package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  6. package/android/gradle.properties +5 -5
  7. package/android/gradlew +249 -0
  8. package/android/gradlew.bat +92 -0
  9. package/lib/commonjs/SMWorkout.js +3 -2
  10. package/lib/commonjs/SMWorkout.js.map +1 -1
  11. package/lib/commonjs/index.js +5 -3
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/module/SMWorkout.js +3 -2
  14. package/lib/module/SMWorkout.js.map +1 -1
  15. package/lib/module/index.js +5 -3
  16. package/lib/module/index.js.map +1 -1
  17. package/package.json +51 -114
  18. package/src/index.tsx +3 -2
  19. package/lib/typescript/example/src/App.d.ts +0 -4
  20. package/lib/typescript/example/src/App.d.ts.map +0 -1
  21. package/lib/typescript/example/src/components/EditText.d.ts +0 -9
  22. package/lib/typescript/example/src/components/EditText.d.ts.map +0 -1
  23. package/lib/typescript/example/src/components/ThreeCheckboxes.d.ts +0 -7
  24. package/lib/typescript/example/src/components/ThreeCheckboxes.d.ts.map +0 -1
  25. package/lib/typescript/package/src/SMKitUIView.d.ts +0 -2
  26. package/lib/typescript/package/src/SMKitUIView.d.ts.map +0 -1
  27. package/lib/typescript/package/src/SMWorkout.d.ts +0 -57
  28. package/lib/typescript/package/src/SMWorkout.d.ts.map +0 -1
  29. package/lib/typescript/package/src/index.d.ts +0 -19
  30. package/lib/typescript/package/src/index.d.ts.map +0 -1
  31. package/lib/typescript/src/SMWorkout.d.ts +0 -212
  32. package/lib/typescript/src/SMWorkout.d.ts.map +0 -1
  33. package/lib/typescript/src/index.d.ts +0 -69
  34. package/lib/typescript/src/index.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,158 +1,95 @@
1
1
  {
2
2
  "name": "@sency/react-native-smkit-ui",
3
- "version": "0.3.1",
4
- "description": "react-native-smkit-ui",
5
- "main": "lib/commonjs/index.js",
6
- "module": "lib/module/index.js",
3
+ "version": "2.0.1",
4
+ "description": "React Native library for SMKit UI - Advanced fitness assessments and workout programs with AI-powered motion detection and real-time performance tracking",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
7
  "types": "lib/typescript/src/index.d.ts",
8
- "react-native": "src/index.tsx",
9
- "source": "src/index.tsx",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
10
  "files": [
11
11
  "src",
12
12
  "lib",
13
+ "android",
14
+ "ios",
15
+ "react-native-smkit-ui.podspec",
13
16
  "!**/__tests__",
14
17
  "!**/__fixtures__",
15
18
  "!**/__mocks__",
16
- "android",
17
- "ios",
18
- "cpp",
19
- "*.podspec",
20
- "!ios/build",
21
- "!android/build",
22
- "!android/gradle",
23
- "!android/gradlew",
24
- "!android/gradlew.bat",
25
- "!android/local.properties",
26
19
  "!**/.*"
27
20
  ],
28
21
  "scripts": {
29
- "example": "yarn workspace react-native-smkit-ui-example",
30
- "test": "jest",
31
- "typecheck": "tsc --noEmit",
32
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
22
+ "build": "bob build",
23
+ "clean": "rm -rf lib/",
34
24
  "prepare": "bob build",
35
- "release": "release-it"
25
+ "publish-package": "./scripts/publish.sh",
26
+ "test-package": "npm pack && echo 'Test package created. Install in example app to test.'",
27
+ "version-check": "echo \"Package: $(cat package.json | grep '\"version\"' | cut -d'\"' -f4)\" && echo \"Podspec: reads from package.json\" && echo \"Android: $(grep 'smkitui:' android/build.gradle | head -1)\""
36
28
  },
37
29
  "keywords": [
38
30
  "react-native",
31
+ "fitness",
32
+ "assessment",
33
+ "workout",
34
+ "motion-detection",
35
+ "ai",
36
+ "computer-vision",
37
+ "health",
38
+ "exercise-tracking",
39
+ "body-tracking",
40
+ "pose-estimation",
41
+ "smkit",
42
+ "sency",
43
+ "exercise",
44
+ "sports-tech",
45
+ "fitness-app",
39
46
  "ios",
40
47
  "android"
41
48
  ],
42
49
  "repository": {
43
50
  "type": "git",
44
- "url": "git+https://sency-motion-sdk.document360.io.git"
51
+ "url": "https://github.com/sency-ai/smkit-ui-react-native-demo.git"
52
+ },
53
+ "author": {
54
+ "name": "Sency AI",
55
+ "email": "support@sency.ai",
56
+ "url": "https://sency.ai"
45
57
  },
46
- "author": "Sency <Ofer.g@sency.ai> (https://github.com/sency-ai/smkit-ui-react-native-demo)",
47
- "license": "SEE LICENSE IN LICENCE",
58
+ "license": "MIT",
48
59
  "bugs": {
49
- "url": "contact@sency.ai"
60
+ "url": "https://github.com/sency-ai/smkit-ui-react-native-demo/issues"
50
61
  },
51
62
  "homepage": "https://github.com/sency-ai/smkit-ui-react-native-demo#readme",
52
63
  "publishConfig": {
53
64
  "registry": "https://registry.npmjs.org/"
54
65
  },
55
66
  "devDependencies": {
56
- "@commitlint/config-conventional": "^17.0.2",
57
- "@evilmartians/lefthook": "^1.5.0",
58
- "@react-native/eslint-config": "^0.73.1",
59
- "@release-it/conventional-changelog": "^5.0.0",
60
- "@types/jest": "^29.5.5",
61
- "@types/react": "^18.2.44",
62
- "commitlint": "^17.0.2",
63
- "del-cli": "^5.1.0",
64
- "eslint": "^8.51.0",
65
- "eslint-config-prettier": "^9.0.0",
66
- "eslint-plugin-prettier": "^5.0.1",
67
- "jest": "^29.7.0",
68
- "prettier": "^3.0.3",
69
- "react": "18.2.0",
70
- "react-native": "0.73.6",
71
- "react-native-builder-bob": "^0.23.2",
72
- "release-it": "^15.0.0",
73
- "turbo": "^1.10.7",
74
- "typescript": "^5.2.2"
75
- },
76
- "resolutions": {
77
- "@types/react": "^18.2.44"
67
+ "@types/react": "^18.3.0",
68
+ "react": "^18.3.1",
69
+ "react-native": "^0.76.3",
70
+ "react-native-builder-bob": "^0.20.0",
71
+ "typescript": "^5.6.3"
78
72
  },
79
73
  "peerDependencies": {
80
74
  "react": "*",
81
75
  "react-native": "*"
82
76
  },
83
- "workspaces": [
84
- "example"
85
- ],
86
- "packageManager": "yarn@3.6.1",
87
- "jest": {
88
- "preset": "react-native",
89
- "modulePathIgnorePatterns": [
90
- "<rootDir>/example/node_modules",
91
- "<rootDir>/lib/"
92
- ]
93
- },
94
- "commitlint": {
95
- "extends": [
96
- "@commitlint/config-conventional"
97
- ]
98
- },
99
- "release-it": {
100
- "git": {
101
- "commitMessage": "chore: release ${version}",
102
- "tagName": "v${version}"
103
- },
104
- "npm": {
105
- "publish": true
106
- },
107
- "github": {
108
- "release": true
109
- },
110
- "plugins": {
111
- "@release-it/conventional-changelog": {
112
- "preset": "angular"
113
- }
114
- }
115
- },
116
- "eslintConfig": {
117
- "root": true,
118
- "extends": [
119
- "@react-native",
120
- "prettier"
121
- ],
122
- "rules": {
123
- "prettier/prettier": [
124
- "error",
125
- {
126
- "quoteProps": "consistent",
127
- "singleQuote": true,
128
- "tabWidth": 2,
129
- "trailingComma": "es5",
130
- "useTabs": false
131
- }
132
- ]
133
- }
134
- },
135
- "eslintIgnore": [
136
- "node_modules/",
137
- "lib/"
138
- ],
139
- "prettier": {
140
- "quoteProps": "consistent",
141
- "singleQuote": true,
142
- "tabWidth": 2,
143
- "trailingComma": "es5",
144
- "useTabs": false
77
+ "engines": {
78
+ "node": ">= 18.0.0"
145
79
  },
80
+ "packageManager": "yarn@3.6.1",
146
81
  "react-native-builder-bob": {
147
82
  "source": "src",
148
83
  "output": "lib",
149
84
  "targets": [
150
85
  "commonjs",
151
86
  "module",
152
- "typescript"
87
+ [
88
+ "typescript",
89
+ {
90
+ "project": "tsconfig.build.json"
91
+ }
92
+ ]
153
93
  ]
154
- },
155
- "dependencies": {
156
- "@react-native-clipboard/clipboard": "^1.15.0"
157
94
  }
158
95
  }
package/src/index.tsx CHANGED
@@ -7,8 +7,9 @@ const LINKING_ERROR =
7
7
  '- You rebuilt the app after installing the package\n' +
8
8
  '- You are not using Expo Go\n';
9
9
 
10
- const SMKitUIManager = NativeModules.SMKitUIManager
11
- ? NativeModules.SMKitUIManager
10
+ // Fix: Use bracket notation to access NativeModules property
11
+ const SMKitUIManager = NativeModules['SMKitUIManager']
12
+ ? NativeModules['SMKitUIManager']
12
13
  : new Proxy(
13
14
  {},
14
15
  {
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- declare const App: () => React.JSX.Element;
3
- export default App;
4
- //# sourceMappingURL=App.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../example/src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAuBnD,QAAA,MAAM,GAAG,yBA8cR,CAAC;AAgLF,eAAe,GAAG,CAAC"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- declare const EditText: ({ placeholder, value, onChangeText, editable }: {
3
- placeholder?: string | undefined;
4
- value?: string | undefined;
5
- onChangeText?: ((_text: string) => void) | undefined;
6
- editable?: boolean | undefined;
7
- }) => React.JSX.Element;
8
- export default EditText;
9
- //# sourceMappingURL=EditText.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditText.d.ts","sourceRoot":"","sources":["../../../../../example/src/components/EditText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,QAAA,MAAM,QAAQ;;;4BAA2D,MAAM;;uBAa9E,CAAC;AAkBF,eAAe,QAAQ,CAAC"}
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- declare const ThreeCheckboxes: ({ list, onPress }: {
3
- list?: string[] | undefined;
4
- onPress?: ((_index: number) => void) | undefined;
5
- }) => React.JSX.Element;
6
- export default ThreeCheckboxes;
7
- //# sourceMappingURL=ThreeCheckboxes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ThreeCheckboxes.d.ts","sourceRoot":"","sources":["../../../../../example/src/components/ThreeCheckboxes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,QAAA,MAAM,eAAe;;wBAAsC,MAAM;uBAsBhE,CAAA;AA8BD,eAAe,eAAe,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=SMKitUIView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SMKitUIView.d.ts","sourceRoot":"","sources":["../../../../package/src/SMKitUIView.tsx"],"names":[],"mappings":""}
@@ -1,57 +0,0 @@
1
- export declare enum AssessmentTypes {
2
- Fitness = "fitness"
3
- }
4
- export declare enum UIElement {
5
- RepsCounter = "repsCounter",
6
- Timer = "timer",
7
- GaugeOfMotion = "gaugeOfMotion"
8
- }
9
- export declare enum BodyZone {
10
- UpperBody = "UpperBody",
11
- LowerBody = "LowerBody",
12
- FullBody = "FullBody"
13
- }
14
- export declare enum WorkoutDifficulty {
15
- LowDifficulty = "LowDifficulty",
16
- MidDifficulty = "MidDifficulty",
17
- HighDifficulty = "HighDifficulty"
18
- }
19
- export declare enum WorkoutDuration {
20
- Short = "Short",
21
- Long = "Long"
22
- }
23
- export declare class SMWorkout {
24
- id: string | null;
25
- name: string | null;
26
- workoutIntro: string | null;
27
- soundtrack: string | null;
28
- exercises: SMExercise[];
29
- getInFrame: string | null;
30
- bodycalFinished: string | null;
31
- workoutClosure: string | null;
32
- constructor(id: string | null, name: string | null, workoutIntro: string | null, soundtrack: string | null, exercises: SMExercise[], getInFrame: string | null, bodycalFinished: string | null, workoutClosure: string | null);
33
- }
34
- export declare class SMExercise {
35
- name: string | null;
36
- totalSeconds: number | null;
37
- introSeconds: number | null;
38
- videoInstruction: string | null;
39
- exerciseIntro: string | null;
40
- uiElements: UIElement[] | null;
41
- detector: string;
42
- repBased: boolean | null;
43
- exerciseClosure: string | null;
44
- targetReps: number | null;
45
- targetTime: number | null;
46
- scoreFactor: number | null;
47
- constructor(name: string | null, totalSeconds: number | null, introSeconds: number | null, videoInstruction: string | null, exerciseIntro: string | null, uiElements: UIElement[] | null, detector: string, repBased: boolean | null, exerciseClosure: string | null, targetReps: number | null, targetTime: number | null, scoreFactor: number | null);
48
- }
49
- export declare class WorkoutConfig {
50
- week: number;
51
- bodyZone: BodyZone;
52
- difficultyLevel: WorkoutDifficulty;
53
- workoutDuration: WorkoutDuration;
54
- programID: string;
55
- constructor(week: number, bodyZone: BodyZone, difficultyLevel: WorkoutDifficulty, workoutDuration: WorkoutDuration, programID: string);
56
- }
57
- //# sourceMappingURL=SMWorkout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SMWorkout.d.ts","sourceRoot":"","sources":["../../../../package/src/SMWorkout.tsx"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,oBAAY,SAAS;IACnB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;IACf,aAAa,kBAAkB;CAChC;AAED,oBAAY,QAAQ;IAClB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,QAAQ,aAAa;CACtB;AAED,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;CAClC;AAED,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,qBAAa,SAAS;IACrB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;gBAElB,EAAE,EAAE,MA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;CAcvV;AAED,qBAAa,aAAa;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,eAAe,EAAE,iBAAiB,CAAC;IACnC,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;gBAEN,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM;CAOtI"}
@@ -1,19 +0,0 @@
1
- import * as SMWorkoutLibrary from '../src/SMWorkout';
2
- export declare function configure(key: string): Promise<string>;
3
- export declare function startAssessment(type: SMWorkoutLibrary.AssessmentTypes): Promise<{
4
- summary: string;
5
- didFinish: boolean;
6
- }>;
7
- export declare function startCustomWorkout(workout: SMWorkoutLibrary.SMWorkout): Promise<{
8
- summary: string;
9
- didFinish: boolean;
10
- }>;
11
- export declare function startWorkoutProgram(workoutConfig: SMWorkoutLibrary.WorkoutConfig): Promise<{
12
- summary: string;
13
- didFinish: boolean;
14
- }>;
15
- export declare enum AssessmentTypes {
16
- Fitness = "fitness",
17
- Custom = "custom"
18
- }
19
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../package/src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,gBAAgB,MAAM,kBAAkB,CAAC;AAmBrD,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAC,gBAAgB,CAAC,eAAe,GAAG,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAC,OAAO,CAAA;CAAC,CAAC,CAEpH;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAC,gBAAgB,CAAC,SAAS,GAAG,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAC,OAAO,CAAA;CAAC,CAAC,CAEpH;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAC,gBAAgB,CAAC,aAAa,GAAG,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAC,OAAO,CAAA;CAAC,CAAC,CAE/H;AAED,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB"}
@@ -1,212 +0,0 @@
1
- /**
2
- * Enum representing assessment types.
3
- * @enum {string}
4
- */
5
- export declare enum AssessmentTypes {
6
- Fitness = "fitness",
7
- Custom = "custom",
8
- Body360 = "body360"
9
- }
10
- /**
11
- * Enum representing UI elements that can be displayed during workouts.
12
- * @enum {string}
13
- */
14
- export declare enum UIElement {
15
- RepsCounter = "repsCounter",
16
- Timer = "timer",
17
- GaugeOfMotion = "gaugeOfMotion"
18
- }
19
- /**
20
- * Enum representing body zones targeted in workouts.
21
- * @enum {string}
22
- */
23
- export declare enum BodyZone {
24
- UpperBody = "UpperBody",
25
- LowerBody = "LowerBody",
26
- FullBody = "FullBody"
27
- }
28
- /**
29
- * Enum representing workout difficulty levels.
30
- * @enum {string}
31
- */
32
- export declare enum WorkoutDifficulty {
33
- LowDifficulty = "LowDifficulty",
34
- MidDifficulty = "MidDifficulty",
35
- HighDifficulty = "HighDifficulty"
36
- }
37
- /**
38
- * Enum representing workout durations.
39
- * @enum {string}
40
- */
41
- export declare enum WorkoutDuration {
42
- Short = "Short",
43
- Long = "Long"
44
- }
45
- /**
46
- * Enum representing different types of scoring methods.
47
- * @enum {string}
48
- */
49
- export declare enum ScoringType {
50
- Rom = "rom",
51
- Time = "time",
52
- Reps = "reps"
53
- }
54
- /**
55
- * Enum representing gender options for user data.
56
- * @enum {string}
57
- */
58
- export declare enum Gender {
59
- Female = "Female",
60
- Male = "Male",
61
- Other = "Rather not say"
62
- }
63
- export declare enum Language {
64
- English = "en",
65
- Hebrew = "he"
66
- }
67
- /**
68
- * Enum representing the exercise rep counter prefrence.
69
- * @enum {string}
70
- */
71
- export declare enum CounterPreferences {
72
- Default = "Default",
73
- PerfectOnly = "PerfectOnly"
74
- }
75
- /**
76
- * Enum representing the workout couser type.
77
- * @enum {string}
78
- */
79
- export declare enum EndExercisePreferences {
80
- Default = "Default",//on timer end
81
- TargetBased = "TargetBased"
82
- }
83
- /**
84
- * Class representing a workout.
85
- */
86
- export declare class SMWorkout {
87
- /**
88
- * @param {string | null} id - Unique identifier for the workout.
89
- * @param {string | null} name - Name of the workout.
90
- * @param {string | null} workoutIntro - URL for workout intro sound.
91
- * @param {string | null} soundtrack - URL for soundtrack.
92
- * @param {SMExercise[]} exercises - List of exercises included in the workout.
93
- * @param {string | null} getInFrame - URL for body cal get in frame sound.
94
- * @param {string | null} bodycalFinished - URL for body cal finished sound.
95
- * @param {string | null} workoutClosure - URL for workout closure sound.
96
- */
97
- id: string | null;
98
- name: string | null;
99
- workoutIntro: string | null;
100
- soundtrack: string | null;
101
- exercises: SMExercise[];
102
- getInFrame: string | null;
103
- bodycalFinished: string | null;
104
- workoutClosure: string | null;
105
- constructor(id: string | null, name: string | null, workoutIntro: string | null, soundtrack: string | null, exercises: SMExercise[], getInFrame: string | null, bodycalFinished: string | null, workoutClosure: string | null);
106
- toJson(): string;
107
- }
108
- /**
109
- * Class representing an exercise in a workout.
110
- */
111
- export declare class SMExercise {
112
- /**
113
- * @param {string | null} prettyName - Name of the exercise.
114
- * @param {number | null} totalSeconds - Duration of the exercise in seconds.
115
- * @param {string | null} videoInstruction - Video instruction URL.
116
- * @param {string | null} exerciseIntro - URL for exercise intro sound.
117
- * @param {UIElement[] | null} uiElements - List of UI elements for this exercise.
118
- * @param {string} detector - Name of the detector for tracking exercise movement.
119
- * @param {string | null} exerciseClosure - URL for exercise closer sound.
120
- * @param {SMScoringParams | null} scoringParams - Parameters for exercise scoring.
121
- */
122
- detector: string;
123
- uiElements: UIElement[] | null;
124
- videoInstruction: string | null;
125
- totalSeconds: number | null;
126
- prettyName: string | null;
127
- exerciseIntro: string | null;
128
- exerciseClosure: string | null;
129
- scoringParams: SMScoringParams | null;
130
- constructor(prettyName: string | null, totalSeconds: number | null, videoInstruction: string | null, exerciseIntro: string | null, uiElements: UIElement[] | null, detector: string, exerciseClosure: string | null, scoringParams: SMScoringParams | null);
131
- }
132
- /**
133
- * Class representing an exercise in an assessment.
134
- */
135
- export declare class SMAssessmentExercise extends SMExercise {
136
- /**
137
- * @param {string | null} prettyName - Name of the exercise.
138
- * @param {number | null} totalSeconds - Duration of the exercise in seconds.
139
- * @param {string | null} videoInstruction - Video instruction URL.
140
- * @param {string | null} exerciseIntro - URL for exercise intro sound.
141
- * @param {UIElement[] | null} uiElements - List of UI elements for this exercise.
142
- * @param {string} detector - Name of the detector for tracking exercise movement.
143
- * @param {string | null} exerciseClosure - URL for exercise closer sound.
144
- * @param {SMScoringParams | null} scoringParams - Parameters for exercise scoring.
145
- * @param {string | null} closureFailedSound - Applicable only for ClouserTarget.TargetBased, URL for exercise closure sound If you did not reach clouser target.
146
- * @param {string | null} summaryTitle - Title for the exercise summary.
147
- * @param {string | null} summarySubTitle - Subtitle for the exercise summary.
148
- * @param {string | null} summaryMainMetricTitle - Main metric title in the summary.
149
- * @param {string | null} summaryMainMetricSubTitle - Main metric subtitle in the summary.
150
- */
151
- closureFailedSound: string | null;
152
- summaryTitle: string | null;
153
- summarySubTitle: string | null;
154
- summaryMainMetricTitle: string | null;
155
- summaryMainMetricSubTitle: string | null;
156
- constructor(prettyName: string | null, totalSeconds: number | null, videoInstruction: string | null, exerciseIntro: string | null, uiElements: UIElement[] | null, detector: string, exerciseClosure: string | null, scoringParams: SMScoringParams | null, closureFailedSound: string | null, summaryTitle: string | null, summarySubTitle: string | null, summaryMainMetricTitle: string | null, summaryMainMetricSubTitle: string | null);
157
- }
158
- /**
159
- * Class representing scoring parameters for an exercise.
160
- */
161
- export declare class SMScoringParams {
162
- /**
163
- * @param {ScoringType | null} type - Type of scoring (e.g., ROM, time, reps).
164
- * @param {number | null} scoreFactor - Factor to adjust the score.
165
- * @param {number | null} targetTime - Target time for time-based scoring.
166
- * @param {number | null} targetReps - Target reps for rep-based scoring.
167
- * @param {string | null} targetRom - Range of motion target for ROM-based scoring.
168
- * @param {string[] | null} passCriteria - List of criteria required to pass.
169
- */
170
- type: ScoringType | null;
171
- scoreFactor: number | null;
172
- targetTime: number | null;
173
- targetReps: number | null;
174
- targetRom: string | null;
175
- passCriteria: string[] | null;
176
- constructor(type: ScoringType | null, scoreFactor: number | null, targetTime: number | null, targetReps: number | null, targetRom: string | null, passCriteria: string[] | null);
177
- }
178
- /**
179
- * Class representing the configuration for a workout program.
180
- */
181
- export declare class WorkoutConfig {
182
- /**
183
- * @param {number} week - Week number in the program.
184
- * @param {BodyZone} bodyZone - Targeted body zone for the workout.
185
- * @param {WorkoutDifficulty} difficultyLevel - Difficulty level of the workout.
186
- * @param {WorkoutDuration} workoutDuration - Duration of the workout.
187
- * @param {Language} language - The session language
188
- * @param {string} programID - Unique identifier for the workout program.
189
- */
190
- week: number;
191
- bodyZone: BodyZone;
192
- difficultyLevel: WorkoutDifficulty;
193
- workoutDuration: WorkoutDuration;
194
- language: Language;
195
- programID: string;
196
- constructor(week: number, bodyZone: BodyZone, difficultyLevel: WorkoutDifficulty, workoutDuration: WorkoutDuration, language: Language, programID: string);
197
- toJson(): string;
198
- }
199
- /**
200
- * Class representing user data.
201
- */
202
- export declare class UserData {
203
- /**
204
- * @param {Gender} gender - User's gender.
205
- * @param {number} age - User's age.
206
- */
207
- gender: Gender;
208
- age: number;
209
- constructor(gender: Gender, age: number);
210
- toJson(): string;
211
- }
212
- //# sourceMappingURL=SMWorkout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SMWorkout.d.ts","sourceRoot":"","sources":["../../../src/SMWorkout.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;C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EAAE,QAAQ,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;gBAGhB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,iBAAiB,EAClC,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,MAAM;IAUnB,MAAM,IAAI,MAAM;CAUjB;AAED;;GAEG;AACH,qBAAa,QAAQ;IACnB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;gBAEA,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAKvC,MAAM,IAAI,MAAM;CAMjB"}
@@ -1,69 +0,0 @@
1
- import * as SMWorkoutLibrary from '../src/SMWorkout';
2
- /**
3
- * This function will configure the sdk
4
- * @param {string} key - your auth key
5
- */
6
- export declare function configure(key: string): Promise<string>;
7
- /**
8
- * start an assessment session.
9
- *
10
- * @param {SMWorkoutLibrary.AssessmentTypes} type - The type of assessment to start.
11
- * @param {boolean} [showSummary=true] - Determines if the summary should be shown after assessment completion.
12
- * @param {SMWorkoutLibrary.UserData | null} userData - User data for the assessment session, or `null` if no user data is provided.
13
- * @param {boolean} [forceShowUserDataScreen=false] - Forces the display of the user data screen even if user data is provided.
14
- * @param {string} customAssessmentID - A unique identifier for a custom assessment session.
15
- * @returns {Promise<{ summary: string; didFinish: boolean }>} - A promise that resolves with an object containing the summary and a flag indicating whether the assessment finished.
16
- */
17
- export declare function startAssessment(type: SMWorkoutLibrary.AssessmentTypes, showSummary: boolean | undefined, userData: SMWorkoutLibrary.UserData | null, forceShowUserDataScreen: boolean | undefined, customAssessmentID: string): Promise<{
18
- summary: string;
19
- didFinish: boolean;
20
- }>;
21
- /**
22
- * Starts a custom workout session.
23
- *
24
- * @param {SMWorkoutLibrary.SMWorkout} workout - The custom workout configuration.
25
- * @returns {Promise<{ summary: string; didFinish: boolean }>} - A promise that resolves with an object containing the summary and a flag indicating if the workout session finished.
26
- */
27
- export declare function startCustomWorkout(workout: SMWorkoutLibrary.SMWorkout): Promise<{
28
- summary: string;
29
- didFinish: boolean;
30
- }>;
31
- /**
32
- * Initiates a custom assessment session.
33
- *
34
- * @param {SMWorkoutLibrary.SMWorkout} assessment - The assessment configuration for the session.
35
- * @param {SMWorkoutLibrary.UserData | null} userData - User data for the assessment, or `null` if no user data is provided.
36
- * @param {boolean} [forceShowUserDataScreen=false] - Forces the display of the user data screen even if user data is provided.
37
- * @param {boolean} [showSummary=true] - Determines if the summary should be shown after assessment completion.
38
- * @returns {Promise<{ summary: string; didFinish: boolean }>} - A promise that resolves with an object containing the summary and a flag indicating if the assessment finished.
39
- */
40
- export declare function startCustomAssessment(assessment: SMWorkoutLibrary.SMWorkout, userData: SMWorkoutLibrary.UserData | null, forceShowUserDataScreen?: boolean, showSummary?: boolean): Promise<{
41
- summary: string;
42
- didFinish: boolean;
43
- }>;
44
- /**
45
- * Starts a workout program using the provided workout configuration.
46
- *
47
- * @param {SMWorkoutLibrary.WorkoutConfig} workoutConfig - The configuration for the workout program.
48
- * @returns {Promise<{ summary: string; didFinish: boolean }>} - A promise that resolves with an object containing the summary and a flag indicating if the workout program finished.
49
- */
50
- export declare function startWorkoutProgram(workoutConfig: SMWorkoutLibrary.WorkoutConfig): Promise<{
51
- summary: string;
52
- didFinish: boolean;
53
- }>;
54
- /**
55
- * Sets a text language for the current workout session
56
- * @param {SMWorkoutLibrary} language - The language that you would like to set.
57
- */
58
- export declare function setSessionLanguage(language: SMWorkoutLibrary.Language): void;
59
- /**
60
- * Sets the closure target for the workout session.
61
- * @param {SMWorkoutLibrary.EndExercisePreferences} endExercisePreferences - The closure target to set.
62
- */
63
- export declare function setEndExercisePreferences(endExercisePreferences: SMWorkoutLibrary.EndExercisePreferences): void;
64
- /**
65
- * Sets the counter preferences for the workout session.
66
- * @param {SMWorkoutLibrary.CounterPreferences} counterPreferences - The counter preferences to set.
67
- */
68
- export declare function setCounterPreferences(counterPreferences: SMWorkoutLibrary.CounterPreferences): void;
69
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,gBAAgB,MAAM,kBAAkB,CAAC;AAmBrD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,gBAAgB,CAAC,eAAe,EACtC,WAAW,qBAAgB,EAC3B,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,EAC1C,uBAAuB,qBAAiB,EACxC,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAQlD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,gBAAgB,CAAC,SAAS,GAClC,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAElD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,gBAAgB,CAAC,SAAS,EACtC,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,GAAG,IAAI,EAC1C,uBAAuB,GAAE,OAAe,EACxC,WAAW,GAAE,OAAc,GAC1B,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAOlD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,aAAa,EAAE,gBAAgB,CAAC,aAAa,GAC5C,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAElD;AAED;;;GAGG;AACH,wBAAgB,kB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