react-native-nitro-pose-exercises 1.1.8 → 1.1.10

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/README.md CHANGED
@@ -64,10 +64,10 @@ cd ios && pod install
64
64
  </tr>
65
65
  <tr>
66
66
  <td align="center">
67
- <img alt="normal-mode" src="./docs/img/normal.png" height="650" width="300"/>
67
+ <img alt="normal-mode" src="https://github.com/user-attachments/assets/762c9b40-ab2e-4e37-ad4c-ac208d555e4f" height="650" width="300"/>
68
68
  </td>
69
69
  <td align="center">
70
- <img alt="skeleton-mode" src="./docs/img/skeleton.png" height="650" width="300"/>
70
+ <img alt="skeleton-mode" src="https://github.com/user-attachments/assets/762c9b40-ab2e-4e37-ad4c-ac208d555e4f" height="650" width="300"/>
71
71
  </td>
72
72
  </tr>
73
73
  </table>
@@ -43,7 +43,7 @@ android {
43
43
  compileSdkVersion getExtOrDefault("compileSdkVersion")
44
44
 
45
45
  defaultConfig {
46
- minSdkVersion getExtOrDefault("minSdkVersion")
46
+ minSdkVersion 26
47
47
  targetSdkVersion getExtOrDefault("targetSdkVersion")
48
48
 
49
49
  externalNativeBuild {
@@ -1,5 +1,5 @@
1
1
  NitroPoseExercises_kotlinVersion=2.0.21
2
- NitroPoseExercises_minSdkVersion=24
2
+ NitroPoseExercises_minSdkVersion=26
3
3
  NitroPoseExercises_targetSdkVersion=34
4
4
  NitroPoseExercises_compileSdkVersion=35
5
5
  NitroPoseExercises_ndkVersion=27.1.12297006
@@ -366,31 +366,31 @@ private func isPostureValid(family: PostureFamily, threshold: Double) -> Bool {
366
366
  let kneeY = kneesVisible ? (lk.y + rk.y) / 2 : hipY
367
367
  let ankleY = anklesVisible ? (la.y + ra.y) / 2 : kneeY
368
368
 
369
- switch family {
370
- case .horizontalProne, .supine:
371
- let ys = [shoulderY, hipY, ankleY]
372
- return ((ys.max() ?? 0) - (ys.min() ?? 0)) < 0.25
373
-
374
- case .standingUpright:
375
- guard kneesVisible else { return false }
376
- return shoulderY < hipY - 0.08 && hipY < kneeY + 0.05 && (anklesVisible ? kneeY < ankleY : true)
377
-
378
- case .seated:
379
- guard kneesVisible else { return false }
380
- return shoulderY < hipY - 0.05 && abs(hipY - kneeY) < 0.20
381
-
382
- case .sidePlank:
383
- let ySpread = abs(shoulderY - hipY)
384
- let shoulderHipDx = abs(shoulderX - hipX)
385
- return ySpread < 0.20 && shoulderHipDx < 0.15
386
-
387
- case .inverted:
388
- guard anklesVisible else { return false }
389
- return hipY < shoulderY && hipY < ankleY
390
-
391
- case .none:
392
- return true
393
- }
369
+ switch family {
370
+ case .horizontalprone, .supine:
371
+ let ys = [shoulderY, hipY, ankleY]
372
+ return ((ys.max() ?? 0) - (ys.min() ?? 0)) < 0.25
373
+
374
+ case .standingupright:
375
+ guard kneesVisible else { return false }
376
+ return shoulderY < hipY - 0.08 && hipY < kneeY + 0.05 && (anklesVisible ? kneeY < ankleY : true)
377
+
378
+ case .seated:
379
+ guard kneesVisible else { return false }
380
+ return shoulderY < hipY - 0.05 && Swift.abs(hipY - kneeY) < 0.20
381
+
382
+ case .sideplank:
383
+ let ySpread = Swift.abs(shoulderY - hipY)
384
+ let shoulderHipDx = Swift.abs(shoulderX - hipX)
385
+ return ySpread < 0.20 && shoulderHipDx < 0.15
386
+
387
+ case .inverted:
388
+ guard anklesVisible else { return false }
389
+ return hipY < shoulderY && hipY < ankleY
390
+
391
+ case .none:
392
+ return true
393
+ }
394
394
  }
395
395
 
396
396
  // ═══════════════════════════════════════════════════════════
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nitro-pose-exercises",
3
- "version": "1.1.8",
3
+ "version": "1.1.10",
4
4
  "description": "Real-time on-device exercise tracking for React Native. Rep counting, form validation, and skeleton overlay powered by Apple Vision (iOS) and Google ML Kit (Android) with VisionCamera v5 via Nitro Modules.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",