@sency/react-native-smkit-ui 0.1.0

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 (47) hide show
  1. package/LICENSE +127 -0
  2. package/README.md +31 -0
  3. package/android/build.gradle +104 -0
  4. package/android/gradle.properties +5 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/AndroidManifestNew.xml +2 -0
  7. package/android/src/main/java/com/smkituilibrary/SmkitUiLibraryModule.kt +119 -0
  8. package/android/src/main/java/com/smkituilibrary/SmkitUiLibraryPackage.kt +16 -0
  9. package/android/src/main/java/com/smkituilibrary/mapper/SMMapper.kt +43 -0
  10. package/android/src/main/java/com/smkituilibrary/model/SMKitExercise.kt +17 -0
  11. package/android/src/main/java/com/smkituilibrary/model/SMKitWorkout.kt +13 -0
  12. package/android/src/main/java/com/smkituilibrary/model/SMKitWorkoutConfig.kt +12 -0
  13. package/ios/SMKitUIManager.mm +9 -0
  14. package/ios/SMKitUIManager.swift +136 -0
  15. package/ios/SMKitUIViewContoller.swift +20 -0
  16. package/ios/SmkitUiLibrary-Bridging-Header.h +5 -0
  17. package/lib/commonjs/SMKitUIView.js +5 -0
  18. package/lib/commonjs/SMKitUIView.js.map +1 -0
  19. package/lib/commonjs/SMWorkout.js +74 -0
  20. package/lib/commonjs/SMWorkout.js.map +1 -0
  21. package/lib/commonjs/index.js +38 -0
  22. package/lib/commonjs/index.js.map +1 -0
  23. package/lib/module/SMKitUIView.js +3 -0
  24. package/lib/module/SMKitUIView.js.map +1 -0
  25. package/lib/module/SMWorkout.js +65 -0
  26. package/lib/module/SMWorkout.js.map +1 -0
  27. package/lib/module/index.js +28 -0
  28. package/lib/module/index.js.map +1 -0
  29. package/lib/typescript/example/src/App.d.ts +3 -0
  30. package/lib/typescript/example/src/App.d.ts.map +1 -0
  31. package/lib/typescript/package/src/SMKitUIView.d.ts +2 -0
  32. package/lib/typescript/package/src/SMKitUIView.d.ts.map +1 -0
  33. package/lib/typescript/package/src/SMWorkout.d.ts +57 -0
  34. package/lib/typescript/package/src/SMWorkout.d.ts.map +1 -0
  35. package/lib/typescript/package/src/index.d.ts +19 -0
  36. package/lib/typescript/package/src/index.d.ts.map +1 -0
  37. package/lib/typescript/src/SMKitUIView.d.ts +2 -0
  38. package/lib/typescript/src/SMKitUIView.d.ts.map +1 -0
  39. package/lib/typescript/src/SMWorkout.d.ts +57 -0
  40. package/lib/typescript/src/SMWorkout.d.ts.map +1 -0
  41. package/lib/typescript/src/index.d.ts +19 -0
  42. package/lib/typescript/src/index.d.ts.map +1 -0
  43. package/package.json +155 -0
  44. package/react-native-smkit-ui.podspec +42 -0
  45. package/src/SMKitUIView.tsx +3 -0
  46. package/src/SMWorkout.tsx +94 -0
  47. package/src/index.tsx +40 -0
@@ -0,0 +1,136 @@
1
+ import Foundation
2
+ import SMKitUI
3
+
4
+ @objc(SMKitUIManager)
5
+ class SMKitUIManager: RCTViewManager {
6
+
7
+ let smkitUIViewController = SMKitUIViewController()
8
+ var onWorkoutDidFinish:RCTPromiseResolveBlock?
9
+ var onWorkoutFailed:RCTPromiseRejectBlock?
10
+
11
+ override func view() -> UIView! {
12
+ return smkitUIViewController.view as? SMKitUIView
13
+ }
14
+
15
+ @objc(configure:onSuccess:onFailure:)
16
+ func configure(key:NSString, onSuccess: @escaping RCTPromiseResolveBlock,onFailure:@escaping RCTPromiseRejectBlock) -> Void {
17
+ SMKitUIModel.configure(authKey: "\(key)") {
18
+ onSuccess("")
19
+ } onFailure: { err in
20
+ onFailure("Configure Failed", err?.localizedDescription ?? "", err)
21
+ }
22
+ }
23
+
24
+ @objc(startAssessment:onWorkoutDidFinish:onWorkoutFailed:)
25
+ func startAssessment(type:NSString, onWorkoutDidFinish: @escaping RCTPromiseResolveBlock, onWorkoutFailed:@escaping RCTPromiseRejectBlock){
26
+
27
+ self.onWorkoutDidFinish = onWorkoutDidFinish
28
+ self.onWorkoutFailed = onWorkoutFailed
29
+ DispatchQueue.main.async {
30
+ do{
31
+ if let type = AssessmentTypes(rawValue: "\(type)"){
32
+ try SMKitUIModel.startAssessmet(viewController: self.smkitUIViewController, type: type, delegate: self){error in
33
+ onWorkoutFailed("StartAssessment Failed", error.localizedDescription, error)
34
+ }
35
+ }else{
36
+ onWorkoutFailed("StartAssessment Failed", "Invalid type", nil)
37
+ }
38
+ }catch{
39
+ onWorkoutFailed("StartAssessment Failed", error.localizedDescription, error)
40
+ }
41
+ }
42
+ }
43
+
44
+ @objc(startCustomWorkout:onWorkoutDidFinish:onWorkoutFailed:)
45
+ func startCustomWorkout(json:[String:Any], onWorkoutDidFinish: @escaping RCTPromiseResolveBlock, onWorkoutFailed:@escaping RCTPromiseRejectBlock){
46
+ self.onWorkoutDidFinish = onWorkoutDidFinish
47
+ self.onWorkoutFailed = onWorkoutFailed
48
+ DispatchQueue.main.async {
49
+ do{
50
+ let workout = try SMWorkout(FromJson: json)
51
+ try SMKitUIModel.startWorkout(viewController: self.smkitUIViewController, workout: workout, delegate: self)
52
+ }catch{
53
+ onWorkoutFailed("StartCustomWorkout Failed", error.localizedDescription, error)
54
+ }
55
+ }
56
+ }
57
+
58
+ @objc(startWorkoutProgram:onWorkoutDidFinish:onWorkoutFailed:)
59
+ func startWorkoutProgram(json:[String:Any], onWorkoutDidFinish: @escaping RCTPromiseResolveBlock, onWorkoutFailed:@escaping RCTPromiseRejectBlock){
60
+ self.onWorkoutDidFinish = onWorkoutDidFinish
61
+ self.onWorkoutFailed = onWorkoutFailed
62
+
63
+ guard let week = json["week"] as? Int,
64
+ let zone = json["bodyZone"] as? String,
65
+ let difficultyLevelRaw = json["difficultyLevel"] as? String,
66
+ let workoutDurationRaw = json["workoutDuration"] as? String,
67
+ let programID = json["programID"] as? String,
68
+ let bodyZone = BodyZone(rawValue: zone),
69
+ let difficultyLevel = WorkoutDifficulty(rawValue: difficultyLevelRaw),
70
+ let workoutDuration = WorkoutDuration(rawValue: workoutDurationRaw)
71
+ else {
72
+ onWorkoutFailed("StartWorkoutProgram Failed", "Invalid Workout Config", nil)
73
+ return
74
+ }
75
+
76
+ let config = WorkoutConfig(
77
+ week: week,
78
+ bodyZone: bodyZone,
79
+ difficultyLevel: difficultyLevel,
80
+ workoutDuration: workoutDuration,
81
+ programID: programID
82
+ )
83
+
84
+ SMKitUIModel.startWorkoutFromProgram(viewController: self.smkitUIViewController, workoutConfig: config, delegate: self) { error in
85
+ onWorkoutFailed("StartWorkoutProgram Failed", error.localizedDescription, error)
86
+ }
87
+ }
88
+
89
+ override class func requiresMainQueueSetup() -> Bool {
90
+ true
91
+ }
92
+ }
93
+
94
+ extension SMKitUIManager:SMKitUIWorkoutDelegate{
95
+ func handleWorkoutErrors(error: any Error) {
96
+ onWorkoutFailed?("Workout Exercise Error", error.localizedDescription, error)
97
+ }
98
+
99
+ func workoutDidFinish(data: WorkoutSummaryData) {
100
+ sendResult(data: data, didFinish: true)
101
+ SMKitUIModel.exitSDK()
102
+ }
103
+
104
+ func didExitWorkout(data: WorkoutSummaryData) {
105
+ sendResult(data: data, didFinish: false)
106
+ SMKitUIModel.exitSDK()
107
+ }
108
+
109
+ func sendResult(data: WorkoutSummaryData, didFinish:Bool){
110
+ guard let onWorkoutDidFinish = self.onWorkoutDidFinish else {
111
+ onWorkoutFailed?("Unable to create summary", "Missing callback" , nil)
112
+ return
113
+ }
114
+ do{
115
+ let result:[String:Any] = [
116
+ "summary": try data.json(),
117
+ "didFinish": didFinish
118
+ ]
119
+ onWorkoutDidFinish(result)
120
+ }catch{
121
+ onWorkoutFailed?("Unable to create summary", error.localizedDescription, error as NSError)
122
+ }
123
+ }
124
+
125
+ func exerciseDidFinish(data: ExerciseData) {
126
+
127
+ }
128
+ }
129
+
130
+ extension WorkoutSummaryData{
131
+ func json() throws -> String{
132
+ let jsonEncoder = JSONEncoder()
133
+ let jsonData = try jsonEncoder.encode(self)
134
+ return String(data: jsonData, encoding: String.Encoding.utf8) ?? ""
135
+ }
136
+ }
@@ -0,0 +1,20 @@
1
+ //
2
+ // SMKitUIViewContoller.swift
3
+ // smkit-ui-library
4
+ //
5
+ // Created by netanel-yerushalmi on 31/03/2024.
6
+ //
7
+
8
+ import UIKit
9
+
10
+ class SMKitUIViewController: UIViewController {
11
+ let sdkView = SMKitUIView()
12
+
13
+ override func loadView() {
14
+ view = sdkView
15
+ }
16
+ }
17
+
18
+ class SMKitUIView:UIView{
19
+
20
+ }
@@ -0,0 +1,5 @@
1
+ #import <React/RCTBridgeModule.h>
2
+ #import <React/RCTViewManager.h>
3
+
4
+ #import "React/RCTEventEmitter.h"
5
+ #import "React/RCTUIManager.h"
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ var _reactNative = require("react-native");
4
+ module.exports = (0, _reactNative.requireNativeComponent)('SMKitUI');
5
+ //# sourceMappingURL=SMKitUIView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","module","exports","requireNativeComponent"],"sourceRoot":"../../src","sources":["SMKitUIView.tsx"],"mappings":";;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEAC,MAAM,CAACC,OAAO,GAAG,IAAAC,mCAAsB,EAAC,SAAS,CAAC","ignoreList":[]}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.WorkoutDuration = exports.WorkoutDifficulty = exports.WorkoutConfig = exports.UIElement = exports.SMWorkout = exports.SMExercise = exports.BodyZone = exports.AssessmentTypes = void 0;
7
+ let AssessmentTypes = exports.AssessmentTypes = /*#__PURE__*/function (AssessmentTypes) {
8
+ AssessmentTypes["Fitness"] = "fitness";
9
+ return AssessmentTypes;
10
+ }({});
11
+ let UIElement = exports.UIElement = /*#__PURE__*/function (UIElement) {
12
+ UIElement["RepsCounter"] = "repsCounter";
13
+ UIElement["Timer"] = "timer";
14
+ UIElement["GaugeOfMotion"] = "gaugeOfMotion";
15
+ return UIElement;
16
+ }({});
17
+ let BodyZone = exports.BodyZone = /*#__PURE__*/function (BodyZone) {
18
+ BodyZone["UpperBody"] = "UpperBody";
19
+ BodyZone["LowerBody"] = "LowerBody";
20
+ BodyZone["FullBody"] = "FullBody";
21
+ return BodyZone;
22
+ }({});
23
+ let WorkoutDifficulty = exports.WorkoutDifficulty = /*#__PURE__*/function (WorkoutDifficulty) {
24
+ WorkoutDifficulty["LowDifficulty"] = "LowDifficulty";
25
+ WorkoutDifficulty["MidDifficulty"] = "MidDifficulty";
26
+ WorkoutDifficulty["HighDifficulty"] = "HighDifficulty";
27
+ return WorkoutDifficulty;
28
+ }({});
29
+ let WorkoutDuration = exports.WorkoutDuration = /*#__PURE__*/function (WorkoutDuration) {
30
+ WorkoutDuration["Short"] = "Short";
31
+ WorkoutDuration["Long"] = "Long";
32
+ return WorkoutDuration;
33
+ }({});
34
+ class SMWorkout {
35
+ constructor(id, name, workoutIntro, soundtrack, exercises, getInFrame, bodycalFinished, workoutClosure) {
36
+ this.id = id || null;
37
+ this.name = name || null;
38
+ this.workoutIntro = workoutIntro || null;
39
+ this.soundtrack = soundtrack || null;
40
+ this.exercises = exercises;
41
+ this.getInFrame = getInFrame || null;
42
+ this.bodycalFinished = bodycalFinished || null;
43
+ this.workoutClosure = workoutClosure || null;
44
+ }
45
+ }
46
+ exports.SMWorkout = SMWorkout;
47
+ class SMExercise {
48
+ constructor(name, totalSeconds, introSeconds, videoInstruction, exerciseIntro, uiElements, detector, repBased, exerciseClosure, targetReps, targetTime, scoreFactor) {
49
+ this.name = name || null;
50
+ this.totalSeconds = totalSeconds || null;
51
+ this.introSeconds = introSeconds || null;
52
+ this.videoInstruction = videoInstruction || null;
53
+ this.exerciseIntro = exerciseIntro || null;
54
+ this.uiElements = uiElements || null;
55
+ this.detector = detector;
56
+ this.repBased = repBased || null;
57
+ this.targetReps = targetReps || null;
58
+ this.targetTime = targetTime || null;
59
+ this.scoreFactor = scoreFactor || null;
60
+ this.exerciseClosure = exerciseClosure || null;
61
+ }
62
+ }
63
+ exports.SMExercise = SMExercise;
64
+ class WorkoutConfig {
65
+ constructor(week, bodyZone, difficultyLevel, workoutDuration, programID) {
66
+ this.week = week;
67
+ this.bodyZone = bodyZone;
68
+ this.difficultyLevel = difficultyLevel;
69
+ this.workoutDuration = workoutDuration;
70
+ this.programID = programID;
71
+ }
72
+ }
73
+ exports.WorkoutConfig = WorkoutConfig;
74
+ //# sourceMappingURL=SMWorkout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["AssessmentTypes","exports","UIElement","BodyZone","WorkoutDifficulty","WorkoutDuration","SMWorkout","constructor","id","name","workoutIntro","soundtrack","exercises","getInFrame","bodycalFinished","workoutClosure","SMExercise","totalSeconds","introSeconds","videoInstruction","exerciseIntro","uiElements","detector","repBased","exerciseClosure","targetReps","targetTime","scoreFactor","WorkoutConfig","week","bodyZone","difficultyLevel","workoutDuration","programID"],"sourceRoot":"../../src","sources":["SMWorkout.tsx"],"mappings":";;;;;;IAAYA,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAAA,IAIfE,SAAS,GAAAD,OAAA,CAAAC,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAAA,IAMTC,QAAQ,GAAAF,OAAA,CAAAE,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAAA,IAMRC,iBAAiB,GAAAH,OAAA,CAAAG,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAAA,IAMjBC,eAAe,GAAAJ,OAAA,CAAAI,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA;AAKpB,MAAMC,SAAS;EAUrBC,WAAWA,CAACC,EAAiB,EAAEC,IAAmB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,IAAI;IACpC,IAAI,CAACC,WAAW,GAAGA,WAAW,IAAI,IAAI;IACtC,IAAI,CAACH,eAAe,GAAGA,eAAe,IAAI,IAAI;EAChD;AACF;AAACvB,OAAA,CAAAe,UAAA,GAAAA,UAAA;AAEM,MAAMY,aAAa;EAOxBrB,WAAWA,CAACsB,IAAY,EAAEC,QAAkB,EAAEC,eAAkC,EAAEC,eAAgC,EAAEC,SAAiB,EAAC;IACpI,IAAI,CAACJ,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC5B;AACF;AAAChC,OAAA,CAAA2B,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AssessmentTypes = void 0;
7
+ exports.configure = configure;
8
+ exports.startAssessment = startAssessment;
9
+ exports.startCustomWorkout = startCustomWorkout;
10
+ exports.startWorkoutProgram = startWorkoutProgram;
11
+ var _reactNative = require("react-native");
12
+ const LINKING_ERROR = `The package 'react-native-smkit-ui' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
13
+ ios: "- You have run 'pod install'\n",
14
+ default: ''
15
+ }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
16
+ const SMKitUIManager = _reactNative.NativeModules.SMKitUIManager ? _reactNative.NativeModules.SMKitUIManager : new Proxy({}, {
17
+ get() {
18
+ throw new Error(LINKING_ERROR);
19
+ }
20
+ });
21
+ function configure(key) {
22
+ return SMKitUIManager.configure(key);
23
+ }
24
+ function startAssessment(type) {
25
+ return SMKitUIManager.startAssessment(type);
26
+ }
27
+ function startCustomWorkout(workout) {
28
+ return SMKitUIManager.startCustomWorkout(workout);
29
+ }
30
+ function startWorkoutProgram(workoutConfig) {
31
+ return SMKitUIManager.startWorkoutProgram(workoutConfig);
32
+ }
33
+ let AssessmentTypes = exports.AssessmentTypes = /*#__PURE__*/function (AssessmentTypes) {
34
+ AssessmentTypes["Fitness"] = "fitness";
35
+ AssessmentTypes["Custom"] = "custom";
36
+ return AssessmentTypes;
37
+ }({});
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","SMKitUIManager","NativeModules","Proxy","get","Error","configure","key","startAssessment","type","startCustomWorkout","workout","startWorkoutProgram","workoutConfig","AssessmentTypes","exports"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,MAAMC,aAAa,GAChB,gFAA+E,GAChFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,cAAc,GAAGC,0BAAa,CAACD,cAAc,GAC/CC,0BAAa,CAACD,cAAc,GAC5B,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEE,SAASU,SAASA,CAACC,GAAW,EAAmB;EACtD,OAAON,cAAc,CAACK,SAAS,CAACC,GAAG,CAAC;AACtC;AAEO,SAASC,eAAeA,CAACC,IAAqC,EAAgD;EACnH,OAAOR,cAAc,CAACO,eAAe,CAACC,IAAI,CAAC;AAC7C;AAEO,SAASC,kBAAkBA,CAACC,OAAkC,EAAgD;EACnH,OAAOV,cAAc,CAACS,kBAAkB,CAACC,OAAO,CAAC;AACnD;AAEO,SAASC,mBAAmBA,CAACC,aAA4C,EAAgD;EAC9H,OAAOZ,cAAc,CAACW,mBAAmB,CAACC,aAAa,CAAC;AAC1D;AAAC,IAEWC,eAAe,GAAAC,OAAA,CAAAD,eAAA,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import { requireNativeComponent } from 'react-native';
2
+ module.exports = requireNativeComponent('SMKitUI');
3
+ //# sourceMappingURL=SMKitUIView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["requireNativeComponent","module","exports"],"sourceRoot":"../../src","sources":["SMKitUIView.tsx"],"mappings":"AAAA,SAASA,sBAAsB,QAAO,cAAc;AAEpDC,MAAM,CAACC,OAAO,GAAGF,sBAAsB,CAAC,SAAS,CAAC","ignoreList":[]}
@@ -0,0 +1,65 @@
1
+ export let AssessmentTypes = /*#__PURE__*/function (AssessmentTypes) {
2
+ AssessmentTypes["Fitness"] = "fitness";
3
+ return AssessmentTypes;
4
+ }({});
5
+ export let UIElement = /*#__PURE__*/function (UIElement) {
6
+ UIElement["RepsCounter"] = "repsCounter";
7
+ UIElement["Timer"] = "timer";
8
+ UIElement["GaugeOfMotion"] = "gaugeOfMotion";
9
+ return UIElement;
10
+ }({});
11
+ export let BodyZone = /*#__PURE__*/function (BodyZone) {
12
+ BodyZone["UpperBody"] = "UpperBody";
13
+ BodyZone["LowerBody"] = "LowerBody";
14
+ BodyZone["FullBody"] = "FullBody";
15
+ return BodyZone;
16
+ }({});
17
+ export let WorkoutDifficulty = /*#__PURE__*/function (WorkoutDifficulty) {
18
+ WorkoutDifficulty["LowDifficulty"] = "LowDifficulty";
19
+ WorkoutDifficulty["MidDifficulty"] = "MidDifficulty";
20
+ WorkoutDifficulty["HighDifficulty"] = "HighDifficulty";
21
+ return WorkoutDifficulty;
22
+ }({});
23
+ export let WorkoutDuration = /*#__PURE__*/function (WorkoutDuration) {
24
+ WorkoutDuration["Short"] = "Short";
25
+ WorkoutDuration["Long"] = "Long";
26
+ return WorkoutDuration;
27
+ }({});
28
+ export class SMWorkout {
29
+ constructor(id, name, workoutIntro, soundtrack, exercises, getInFrame, bodycalFinished, workoutClosure) {
30
+ this.id = id || null;
31
+ this.name = name || null;
32
+ this.workoutIntro = workoutIntro || null;
33
+ this.soundtrack = soundtrack || null;
34
+ this.exercises = exercises;
35
+ this.getInFrame = getInFrame || null;
36
+ this.bodycalFinished = bodycalFinished || null;
37
+ this.workoutClosure = workoutClosure || null;
38
+ }
39
+ }
40
+ export class SMExercise {
41
+ constructor(name, totalSeconds, introSeconds, videoInstruction, exerciseIntro, uiElements, detector, repBased, exerciseClosure, targetReps, targetTime, scoreFactor) {
42
+ this.name = name || null;
43
+ this.totalSeconds = totalSeconds || null;
44
+ this.introSeconds = introSeconds || null;
45
+ this.videoInstruction = videoInstruction || null;
46
+ this.exerciseIntro = exerciseIntro || null;
47
+ this.uiElements = uiElements || null;
48
+ this.detector = detector;
49
+ this.repBased = repBased || null;
50
+ this.targetReps = targetReps || null;
51
+ this.targetTime = targetTime || null;
52
+ this.scoreFactor = scoreFactor || null;
53
+ this.exerciseClosure = exerciseClosure || null;
54
+ }
55
+ }
56
+ export class WorkoutConfig {
57
+ constructor(week, bodyZone, difficultyLevel, workoutDuration, programID) {
58
+ this.week = week;
59
+ this.bodyZone = bodyZone;
60
+ this.difficultyLevel = difficultyLevel;
61
+ this.workoutDuration = workoutDuration;
62
+ this.programID = programID;
63
+ }
64
+ }
65
+ //# sourceMappingURL=SMWorkout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["AssessmentTypes","UIElement","BodyZone","WorkoutDifficulty","WorkoutDuration","SMWorkout","constructor","id","name","workoutIntro","soundtrack","exercises","getInFrame","bodycalFinished","workoutClosure","SMExercise","totalSeconds","introSeconds","videoInstruction","exerciseIntro","uiElements","detector","repBased","exerciseClosure","targetReps","targetTime","scoreFactor","WorkoutConfig","week","bodyZone","difficultyLevel","workoutDuration","programID"],"sourceRoot":"../../src","sources":["SMWorkout.tsx"],"mappings":"AAAA,WAAYA,eAAe,0BAAfA,eAAe;EAAfA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B,IAAI,GAAGA,IAAI,IAAI,IAAI;IACxB,IAAI,CAACQ,YAAY,GAAGA,YAAY,IAAI,IAAI;IACxC,IAAI,CAACC,YAAY,GAAGA,YAAY,IAAI,IAAI;IACxC,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB,IAAI,IAAI;IAChD,IAAI,CAACC,aAAa,GAAGA,aAAa,IAAI,IAAI;IAC1C,IAAI,CAACC,UAAU,GAAGA,UAAU,IAAI,IAAI;IACpC,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,QAAQ,GAAGA,QAAQ,IAAI,IAAI;IAChC,IAAI,CAACE,UAAU,GAAGA,UAAU,IAAI,IAAI;IACpC,IAAI,CAACC,UAAU,GAAGA,UAAU,IAAI,IAAI;IACpC,IAAI,CAACC,WAAW,GAAGA,WAAW,IAAI,IAAI;IACtC,IAAI,CAACH,eAAe,GAAGA,eAAe,IAAI,IAAI;EAChD;AACF;AAEA,OAAO,MAAMI,aAAa;EAOxBrB,WAAWA,CAACsB,IAAY,EAAEC,QAAkB,EAAEC,eAAkC,EAAEC,eAAgC,EAAEC,SAAiB,EAAC;IACpI,IAAI,CAACJ,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,eAAe,GAAGA,eAAe;IACtC,IAAI,CAACC,SAAS,GAAGA,SAAS;EAC5B;AACF","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ import { NativeModules, Platform } from 'react-native';
2
+ const LINKING_ERROR = `The package 'react-native-smkit-ui' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
3
+ ios: "- You have run 'pod install'\n",
4
+ default: ''
5
+ }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
6
+ const SMKitUIManager = NativeModules.SMKitUIManager ? NativeModules.SMKitUIManager : new Proxy({}, {
7
+ get() {
8
+ throw new Error(LINKING_ERROR);
9
+ }
10
+ });
11
+ export function configure(key) {
12
+ return SMKitUIManager.configure(key);
13
+ }
14
+ export function startAssessment(type) {
15
+ return SMKitUIManager.startAssessment(type);
16
+ }
17
+ export function startCustomWorkout(workout) {
18
+ return SMKitUIManager.startCustomWorkout(workout);
19
+ }
20
+ export function startWorkoutProgram(workoutConfig) {
21
+ return SMKitUIManager.startWorkoutProgram(workoutConfig);
22
+ }
23
+ export let AssessmentTypes = /*#__PURE__*/function (AssessmentTypes) {
24
+ AssessmentTypes["Fitness"] = "fitness";
25
+ AssessmentTypes["Custom"] = "custom";
26
+ return AssessmentTypes;
27
+ }({});
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","SMKitUIManager","Proxy","get","Error","configure","key","startAssessment","type","startCustomWorkout","workout","startWorkoutProgram","workoutConfig","AssessmentTypes"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAGtD,MAAMC,aAAa,GAChB,gFAA+E,GAChFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,cAAc,GAAGN,aAAa,CAACM,cAAc,GAC/CN,aAAa,CAACM,cAAc,GAC5B,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AAEL,OAAO,SAASQ,SAASA,CAACC,GAAW,EAAmB;EACtD,OAAOL,cAAc,CAACI,SAAS,CAACC,GAAG,CAAC;AACtC;AAEA,OAAO,SAASC,eAAeA,CAACC,IAAqC,EAAgD;EACnH,OAAOP,cAAc,CAACM,eAAe,CAACC,IAAI,CAAC;AAC7C;AAEA,OAAO,SAASC,kBAAkBA,CAACC,OAAkC,EAAgD;EACnH,OAAOT,cAAc,CAACQ,kBAAkB,CAACC,OAAO,CAAC;AACnD;AAEA,OAAO,SAASC,mBAAmBA,CAACC,aAA4C,EAAgD;EAC9H,OAAOX,cAAc,CAACU,mBAAmB,CAACC,aAAa,CAAC;AAC1D;AAEA,WAAYC,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ export default function App(): React.JSX.Element;
3
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../../example/src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,CAAC,OAAO,UAAU,GAAG,sBAM1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SMKitUIView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SMKitUIView.d.ts","sourceRoot":"","sources":["../../../../package/src/SMKitUIView.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,57 @@
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
@@ -0,0 +1 @@
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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AEf,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;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"}
@@ -0,0 +1,19 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SMKitUIView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SMKitUIView.d.ts","sourceRoot":"","sources":["../../../src/SMKitUIView.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,57 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SMWorkout.d.ts","sourceRoot":"","sources":["../../../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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E,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEf,IAAI,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI,EAAE,eAAe,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;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"}
@@ -0,0 +1,19 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../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"}