@pose-tracker/react-native-pose-estimation-light 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.
- package/LICENSE +45 -0
- package/PoseTrackerVision.podspec +28 -0
- package/README.md +161 -0
- package/THIRD_PARTY_NOTICES.md +19 -0
- package/ios/PoseTrackerVision/PoseTrackerBodyPosePlugin.m +18 -0
- package/ios/PoseTrackerVision/PoseTrackerBodyPosePlugin.swift +108 -0
- package/lib/PoseTrackerProvider.d.ts +102 -0
- package/lib/PoseTrackerProvider.js +204 -0
- package/lib/api/configure.d.ts +29 -0
- package/lib/api/configure.js +64 -0
- package/lib/api/skeleton.d.ts +17 -0
- package/lib/api/skeleton.js +53 -0
- package/lib/api/track.d.ts +61 -0
- package/lib/api/track.js +146 -0
- package/lib/backends/PoseBackend.d.ts +50 -0
- package/lib/backends/PoseBackend.js +11 -0
- package/lib/backends/vision/VisionPoseBackend.d.ts +72 -0
- package/lib/backends/vision/VisionPoseBackend.js +177 -0
- package/lib/backends/vision/mapVisionJoints.d.ts +35 -0
- package/lib/backends/vision/mapVisionJoints.js +162 -0
- package/lib/backends/vision/optionalVision.d.ts +32 -0
- package/lib/backends/vision/optionalVision.js +76 -0
- package/lib/backends/webview/WebViewPoseBackend.d.ts +223 -0
- package/lib/backends/webview/WebViewPoseBackend.js +382 -0
- package/lib/backends/webview/brandAssets.d.ts +5 -0
- package/lib/backends/webview/brandAssets.js +8 -0
- package/lib/backends/webview/onlineRuntime.d.ts +45 -0
- package/lib/backends/webview/onlineRuntime.js +57 -0
- package/lib/backends/webview/poseHtml.d.ts +71 -0
- package/lib/backends/webview/poseHtml.js +188 -0
- package/lib/backends/webview/poseRuntimeSource.d.ts +3 -0
- package/lib/backends/webview/poseRuntimeSource.js +4 -0
- package/lib/cache/obfuscate.d.ts +18 -0
- package/lib/cache/obfuscate.js +90 -0
- package/lib/camera/PoseCameraView.d.ts +51 -0
- package/lib/camera/PoseCameraView.js +99 -0
- package/lib/camera/WebViewPoseView.d.ts +81 -0
- package/lib/camera/WebViewPoseView.js +312 -0
- package/lib/client.d.ts +361 -0
- package/lib/client.js +1046 -0
- package/lib/diagnostics/logReport.d.ts +23 -0
- package/lib/diagnostics/logReport.js +102 -0
- package/lib/engine/EngineLoader.d.ts +95 -0
- package/lib/engine/EngineLoader.js +347 -0
- package/lib/engine/types.d.ts +83 -0
- package/lib/engine/types.js +11 -0
- package/lib/events/classicMessage.d.ts +31 -0
- package/lib/events/classicMessage.js +259 -0
- package/lib/exercises/aliases.d.ts +18 -0
- package/lib/exercises/aliases.js +48 -0
- package/lib/index.d.ts +72 -0
- package/lib/index.js +170 -0
- package/lib/models/poseModels.d.ts +39 -0
- package/lib/models/poseModels.js +63 -0
- package/lib/quality/AdaptiveQualityController.d.ts +120 -0
- package/lib/quality/AdaptiveQualityController.js +423 -0
- package/lib/quality/RuntimeGuard.d.ts +34 -0
- package/lib/quality/RuntimeGuard.js +105 -0
- package/lib/quality/captureMode.d.ts +82 -0
- package/lib/quality/captureMode.js +75 -0
- package/lib/quality/deviceCapability.d.ts +37 -0
- package/lib/quality/deviceCapability.js +177 -0
- package/lib/quality/profiles.d.ts +125 -0
- package/lib/quality/profiles.js +202 -0
- package/lib/runtime/RuntimeCache.d.ts +75 -0
- package/lib/runtime/RuntimeCache.js +230 -0
- package/lib/sdkVersion.d.ts +2 -0
- package/lib/sdkVersion.js +5 -0
- package/lib/support/optionalModules.d.ts +46 -0
- package/lib/support/optionalModules.js +82 -0
- package/lib/types/acceleration.d.ts +86 -0
- package/lib/types/acceleration.js +15 -0
- package/lib/types/events.d.ts +345 -0
- package/lib/types/events.js +10 -0
- package/lib/types/features.d.ts +90 -0
- package/lib/types/features.js +122 -0
- package/lib/types/manifest.d.ts +197 -0
- package/lib/types/manifest.js +10 -0
- package/lib/types/pose.d.ts +36 -0
- package/lib/types/pose.js +41 -0
- package/lib/types/preload.d.ts +17 -0
- package/lib/types/preload.js +10 -0
- package/lib/types/skeleton.d.ts +29 -0
- package/lib/types/skeleton.js +52 -0
- package/package.json +92 -0
- package/react-native.config.js +12 -0
- package/src/PoseTrackerProvider.tsx +332 -0
- package/src/api/configure.ts +82 -0
- package/src/api/skeleton.ts +60 -0
- package/src/api/track.ts +182 -0
- package/src/backends/PoseBackend.ts +59 -0
- package/src/backends/vision/VisionPoseBackend.ts +238 -0
- package/src/backends/vision/mapVisionJoints.ts +185 -0
- package/src/backends/vision/optionalVision.ts +94 -0
- package/src/backends/webview/WebViewPoseBackend.ts +582 -0
- package/src/backends/webview/brandAssets.ts +5 -0
- package/src/backends/webview/onlineRuntime.ts +94 -0
- package/src/backends/webview/poseHtml.ts +259 -0
- package/src/backends/webview/poseRuntimeSource.d.ts +3 -0
- package/src/cache/obfuscate.ts +94 -0
- package/src/camera/PoseCameraView.tsx +223 -0
- package/src/camera/WebViewPoseView.tsx +466 -0
- package/src/client.ts +1295 -0
- package/src/diagnostics/logReport.ts +131 -0
- package/src/engine/EngineLoader.ts +428 -0
- package/src/engine/types.ts +93 -0
- package/src/events/classicMessage.ts +271 -0
- package/src/exercises/aliases.ts +50 -0
- package/src/index.ts +243 -0
- package/src/models/poseModels.ts +93 -0
- package/src/quality/AdaptiveQualityController.ts +579 -0
- package/src/quality/RuntimeGuard.ts +119 -0
- package/src/quality/captureMode.ts +97 -0
- package/src/quality/deviceCapability.ts +187 -0
- package/src/quality/profiles.ts +253 -0
- package/src/runtime/RuntimeCache.ts +300 -0
- package/src/sdkVersion.ts +2 -0
- package/src/support/optionalModules.ts +114 -0
- package/src/types/acceleration.ts +94 -0
- package/src/types/events.ts +437 -0
- package/src/types/features.ts +176 -0
- package/src/types/manifest.ts +230 -0
- package/src/types/pose.ts +85 -0
- package/src/types/preload.ts +19 -0
- package/src/types/skeleton.ts +77 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Classic PoseTracker WebView → native message parity.
|
|
3
|
+
*
|
|
4
|
+
* Host apps that already parse `sendDataToNative` JSON
|
|
5
|
+
* (`PoseTrackerFront/lib/v3/sendDataToNativeContract.js`) can subscribe via
|
|
6
|
+
* `addMessageListener` / `usePoseTracker({ onMessage })` and keep the same
|
|
7
|
+
* `type` + payload field names (`data`, `current_count`, `message`, …).
|
|
8
|
+
*
|
|
9
|
+
* Typed {@link PoseTrackerEvent} remains the preferred API for new apps.
|
|
10
|
+
*/
|
|
11
|
+
import type { AngleValue, PoseTrackerEvent } from '../types/events';
|
|
12
|
+
/** Loose JSON envelope matching the frozen WebView → native contract. */
|
|
13
|
+
export type ClassicNativeMessage = {
|
|
14
|
+
type: string;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
export type ClassicMessageListener = (message: ClassicNativeMessage) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Rebuild the WebView `angles.data` tree (`left_side` / `right_side`) from
|
|
20
|
+
* the typed flat `AngleValue[]` list.
|
|
21
|
+
*/
|
|
22
|
+
export declare function anglesToClassicTree(angles: AngleValue[]): {
|
|
23
|
+
left_side: Record<string, Record<string, number>>;
|
|
24
|
+
right_side: Record<string, Record<string, number>>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Map a typed SDK event to a classic PoseTracker `sendDataToNative` payload.
|
|
28
|
+
* Returns null for SDK-only events that have no classic equivalent and should
|
|
29
|
+
* not be mirrored (none today — quality/performance map to error/warning).
|
|
30
|
+
*/
|
|
31
|
+
export declare function toClassicNativeMessage(event: PoseTrackerEvent): ClassicNativeMessage;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Classic PoseTracker WebView → native message parity.
|
|
4
|
+
*
|
|
5
|
+
* Host apps that already parse `sendDataToNative` JSON
|
|
6
|
+
* (`PoseTrackerFront/lib/v3/sendDataToNativeContract.js`) can subscribe via
|
|
7
|
+
* `addMessageListener` / `usePoseTracker({ onMessage })` and keep the same
|
|
8
|
+
* `type` + payload field names (`data`, `current_count`, `message`, …).
|
|
9
|
+
*
|
|
10
|
+
* Typed {@link PoseTrackerEvent} remains the preferred API for new apps.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.anglesToClassicTree = anglesToClassicTree;
|
|
14
|
+
exports.toClassicNativeMessage = toClassicNativeMessage;
|
|
15
|
+
/** Relation keys matching engine `PUBLIC_ANGLES` / Front `computeAngles`. */
|
|
16
|
+
const ANGLE_RELATIONS = {
|
|
17
|
+
left_knee: 'from_hip_to_ankle',
|
|
18
|
+
right_knee: 'from_hip_to_ankle',
|
|
19
|
+
left_hip: 'from_knee_to_shoulder',
|
|
20
|
+
right_hip: 'from_knee_to_shoulder',
|
|
21
|
+
left_shoulder: 'from_hip_to_elbow',
|
|
22
|
+
right_shoulder: 'from_hip_to_elbow',
|
|
23
|
+
left_elbow: 'from_shoulder_to_wrist',
|
|
24
|
+
right_elbow: 'from_shoulder_to_wrist',
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Rebuild the WebView `angles.data` tree (`left_side` / `right_side`) from
|
|
28
|
+
* the typed flat `AngleValue[]` list.
|
|
29
|
+
*/
|
|
30
|
+
function anglesToClassicTree(angles) {
|
|
31
|
+
const data = {
|
|
32
|
+
left_side: {},
|
|
33
|
+
right_side: {},
|
|
34
|
+
};
|
|
35
|
+
for (const a of angles) {
|
|
36
|
+
if (a.side !== 'left' && a.side !== 'right')
|
|
37
|
+
continue;
|
|
38
|
+
const side = a.side === 'left' ? data.left_side : data.right_side;
|
|
39
|
+
const joint = a.id.replace(/^(left_|right_)/, '');
|
|
40
|
+
const angleType = `${joint}_angle`;
|
|
41
|
+
const relation = ANGLE_RELATIONS[a.id] ?? 'value';
|
|
42
|
+
if (!side[angleType])
|
|
43
|
+
side[angleType] = {};
|
|
44
|
+
side[angleType][relation] = a.degrees;
|
|
45
|
+
side[angleType][`score_${relation}`] = a.score;
|
|
46
|
+
}
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Map a typed SDK event to a classic PoseTracker `sendDataToNative` payload.
|
|
51
|
+
* Returns null for SDK-only events that have no classic equivalent and should
|
|
52
|
+
* not be mirrored (none today — quality/performance map to error/warning).
|
|
53
|
+
*/
|
|
54
|
+
function toClassicNativeMessage(event) {
|
|
55
|
+
switch (event.type) {
|
|
56
|
+
case 'initialization':
|
|
57
|
+
return {
|
|
58
|
+
type: 'initialization',
|
|
59
|
+
// WebView-literal parity: TrackingAppV3 emits exactly
|
|
60
|
+
// "checking you plan and access" (sic) while the plan loads — hosts
|
|
61
|
+
// migrating from the WebView may string-match it.
|
|
62
|
+
message: event.step === 'configuring'
|
|
63
|
+
? 'checking you plan and access'
|
|
64
|
+
: event.message ?? humanInitStep(event.step),
|
|
65
|
+
ready: event.ready,
|
|
66
|
+
step: event.step,
|
|
67
|
+
...(event.mode != null ? { mode: event.mode } : {}),
|
|
68
|
+
...(event.acceleration != null ? { acceleration: event.acceleration } : {}),
|
|
69
|
+
};
|
|
70
|
+
case 'error':
|
|
71
|
+
return {
|
|
72
|
+
type: 'error',
|
|
73
|
+
error: event.code,
|
|
74
|
+
message: event.message,
|
|
75
|
+
};
|
|
76
|
+
case 'warning':
|
|
77
|
+
return {
|
|
78
|
+
type: 'warning',
|
|
79
|
+
error: event.code,
|
|
80
|
+
message: event.message,
|
|
81
|
+
};
|
|
82
|
+
case 'keypoints':
|
|
83
|
+
return {
|
|
84
|
+
type: 'keypoints',
|
|
85
|
+
data: event.keypoints.map((k) => ({
|
|
86
|
+
name: k.name,
|
|
87
|
+
x: k.x,
|
|
88
|
+
y: k.y,
|
|
89
|
+
...(k.z != null ? { z: k.z } : {}),
|
|
90
|
+
score: k.score,
|
|
91
|
+
})),
|
|
92
|
+
score: event.score,
|
|
93
|
+
timestampMs: event.timestampMs,
|
|
94
|
+
};
|
|
95
|
+
case 'angles':
|
|
96
|
+
return {
|
|
97
|
+
type: 'angles',
|
|
98
|
+
// WebView V3 shape: nested left_side / right_side tree (not the typed flat array).
|
|
99
|
+
data: anglesToClassicTree(event.angles),
|
|
100
|
+
timestampMs: event.timestampMs,
|
|
101
|
+
};
|
|
102
|
+
case 'counter':
|
|
103
|
+
return {
|
|
104
|
+
type: 'counter',
|
|
105
|
+
current_count: event.count,
|
|
106
|
+
// GitBook: authoritative grade for a counted rep lives on counter.form_score.
|
|
107
|
+
...(event.formScore != null
|
|
108
|
+
? {
|
|
109
|
+
form_score: {
|
|
110
|
+
score: event.formScore.score,
|
|
111
|
+
avg_score: event.formScore.average,
|
|
112
|
+
grade: event.formScore.grade,
|
|
113
|
+
},
|
|
114
|
+
}
|
|
115
|
+
: {}),
|
|
116
|
+
...(event.referenceScore != null
|
|
117
|
+
? { reference_score: { overallScore: event.referenceScore } }
|
|
118
|
+
: {}),
|
|
119
|
+
timestampMs: event.timestampMs,
|
|
120
|
+
};
|
|
121
|
+
case 'posture':
|
|
122
|
+
return {
|
|
123
|
+
type: 'posture',
|
|
124
|
+
message: event.hint,
|
|
125
|
+
ready: event.ready,
|
|
126
|
+
direction: event.direction ?? '',
|
|
127
|
+
requirements: { missingKeypoints: event.missingKeypoints },
|
|
128
|
+
timestampMs: event.timestampMs,
|
|
129
|
+
};
|
|
130
|
+
case 'progression':
|
|
131
|
+
return {
|
|
132
|
+
type: 'progression',
|
|
133
|
+
value: event.value,
|
|
134
|
+
timestampMs: event.timestampMs,
|
|
135
|
+
};
|
|
136
|
+
case 'recommendations':
|
|
137
|
+
return {
|
|
138
|
+
type: 'recommendations',
|
|
139
|
+
data: event.recommendations,
|
|
140
|
+
timestampMs: event.timestampMs,
|
|
141
|
+
};
|
|
142
|
+
case 'form_score':
|
|
143
|
+
// Optional live / convenience stream — do not treat as authoritative
|
|
144
|
+
// for the counted rep (prefer counter.form_score). Kept for hosts that
|
|
145
|
+
// already subscribe to a standalone form_score type.
|
|
146
|
+
return {
|
|
147
|
+
type: 'form_score',
|
|
148
|
+
score: event.score,
|
|
149
|
+
avg_score: event.average,
|
|
150
|
+
grade: event.grade,
|
|
151
|
+
timestampMs: event.timestampMs,
|
|
152
|
+
};
|
|
153
|
+
case 'exercise_summary':
|
|
154
|
+
return {
|
|
155
|
+
type: 'exercise_summary',
|
|
156
|
+
exercise: event.exercise,
|
|
157
|
+
counter: event.counter,
|
|
158
|
+
avg_rep_score: event.averageFormScore,
|
|
159
|
+
avg_similarity: event.averageSimilarity,
|
|
160
|
+
grade: event.grade,
|
|
161
|
+
history: event.history,
|
|
162
|
+
durationMs: event.durationMs,
|
|
163
|
+
timestampMs: event.timestampMs,
|
|
164
|
+
};
|
|
165
|
+
// Custom jump exercises: the classic contract already uses these exact
|
|
166
|
+
// type strings and camelCase field names — pass through minus timestampMs
|
|
167
|
+
// restructuring (front payloads have no timestampMs, but extra fields are
|
|
168
|
+
// harmless for string-matching hosts).
|
|
169
|
+
case 'jump_calibration':
|
|
170
|
+
return {
|
|
171
|
+
type: 'jump_calibration',
|
|
172
|
+
calibrated: event.calibrated,
|
|
173
|
+
cmPerPixel: event.cmPerPixel,
|
|
174
|
+
baselineY: event.baselineY,
|
|
175
|
+
visibleHips: event.visibleHips,
|
|
176
|
+
message: event.message,
|
|
177
|
+
timestampMs: event.timestampMs,
|
|
178
|
+
};
|
|
179
|
+
case 'jump_started':
|
|
180
|
+
return {
|
|
181
|
+
type: 'jump_started',
|
|
182
|
+
message: event.message,
|
|
183
|
+
timestampMs: event.timestampMs,
|
|
184
|
+
};
|
|
185
|
+
case 'jump_height': {
|
|
186
|
+
const { type, timestampMs, ...rest } = event;
|
|
187
|
+
return { type, ...rest, timestampMs };
|
|
188
|
+
}
|
|
189
|
+
case 'jump_discarded':
|
|
190
|
+
return {
|
|
191
|
+
type: 'jump_discarded',
|
|
192
|
+
reason: event.reason,
|
|
193
|
+
userMessage: event.userMessage,
|
|
194
|
+
timestampMs: event.timestampMs,
|
|
195
|
+
};
|
|
196
|
+
case 'jump_result': {
|
|
197
|
+
const { type, timestampMs, ...rest } = event;
|
|
198
|
+
return { type, ...rest, timestampMs };
|
|
199
|
+
}
|
|
200
|
+
case 'jump_summary': {
|
|
201
|
+
const { type, timestampMs, ...rest } = event;
|
|
202
|
+
return { type, ...rest, timestampMs };
|
|
203
|
+
}
|
|
204
|
+
case 'performance_warning':
|
|
205
|
+
// Classic V3 uses type "error" with degradation codes for device capability.
|
|
206
|
+
return {
|
|
207
|
+
type: 'error',
|
|
208
|
+
error: event.code,
|
|
209
|
+
message: event.message,
|
|
210
|
+
meanFps: event.meanFps,
|
|
211
|
+
thresholdFps: event.thresholdFps,
|
|
212
|
+
activeProfile: event.activeProfile,
|
|
213
|
+
medianInferenceMs: event.medianInferenceMs,
|
|
214
|
+
videoSize: event.videoSize,
|
|
215
|
+
timestampMs: event.timestampMs,
|
|
216
|
+
};
|
|
217
|
+
case 'quality_changed':
|
|
218
|
+
return {
|
|
219
|
+
type: 'warning',
|
|
220
|
+
error: 'quality_downgraded',
|
|
221
|
+
message: event.detail,
|
|
222
|
+
previousProfile: event.previousProfile,
|
|
223
|
+
activeProfile: event.activeProfile,
|
|
224
|
+
reason: event.reason,
|
|
225
|
+
timestampMs: event.timestampMs,
|
|
226
|
+
};
|
|
227
|
+
case 'runtime_download_progress':
|
|
228
|
+
// Classic contract has no download event — mirror as initialization.
|
|
229
|
+
return {
|
|
230
|
+
type: 'initialization',
|
|
231
|
+
message: `downloading pose runtime ${event.completedParts + 1}/${event.totalParts}`,
|
|
232
|
+
ready: false,
|
|
233
|
+
step: 'downloading',
|
|
234
|
+
part: event.part,
|
|
235
|
+
completedParts: event.completedParts,
|
|
236
|
+
totalParts: event.totalParts,
|
|
237
|
+
timestampMs: event.timestampMs,
|
|
238
|
+
};
|
|
239
|
+
default: {
|
|
240
|
+
const _exhaustive = event;
|
|
241
|
+
return { type: 'unknown', event: _exhaustive };
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function humanInitStep(step) {
|
|
246
|
+
switch (step) {
|
|
247
|
+
case 'configuring':
|
|
248
|
+
// Front literal (sic) — TrackingAppV3.js.
|
|
249
|
+
return 'checking you plan and access';
|
|
250
|
+
case 'downloading':
|
|
251
|
+
return 'downloading engine';
|
|
252
|
+
case 'warming':
|
|
253
|
+
return 'loading pose model';
|
|
254
|
+
case 'ready':
|
|
255
|
+
return 'running';
|
|
256
|
+
default:
|
|
257
|
+
return step;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* V2 Strapi movement names → canonical V3 exercise keys.
|
|
3
|
+
* Mirrors PoseTrackerFront/lib/v3/exercises/index.js `EXERCISE_ALIASES`.
|
|
4
|
+
*
|
|
5
|
+
* The RN SDK manifest still often ships legacy `face_*` ids from Strapi while
|
|
6
|
+
* host apps / demos call V3 keys (`squat`, `push_up`, …).
|
|
7
|
+
*/
|
|
8
|
+
export declare const EXERCISE_ALIASES: Readonly<Record<string, string>>;
|
|
9
|
+
/** Resolve a legacy or V3 id to the canonical V3 key. */
|
|
10
|
+
export declare function resolveExerciseName(name: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Pick the best matching exercise config for a requested id.
|
|
13
|
+
* Tries exact id, then any legacy alias that maps to the same V3 key,
|
|
14
|
+
* then any config whose id resolves to the same V3 key.
|
|
15
|
+
*/
|
|
16
|
+
export declare function findExerciseByIdOrAlias<T extends {
|
|
17
|
+
id: string;
|
|
18
|
+
}>(exerciseId: string, exercises: readonly T[]): T | undefined;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* V2 Strapi movement names → canonical V3 exercise keys.
|
|
4
|
+
* Mirrors PoseTrackerFront/lib/v3/exercises/index.js `EXERCISE_ALIASES`.
|
|
5
|
+
*
|
|
6
|
+
* The RN SDK manifest still often ships legacy `face_*` ids from Strapi while
|
|
7
|
+
* host apps / demos call V3 keys (`squat`, `push_up`, …).
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.EXERCISE_ALIASES = void 0;
|
|
11
|
+
exports.resolveExerciseName = resolveExerciseName;
|
|
12
|
+
exports.findExerciseByIdOrAlias = findExerciseByIdOrAlias;
|
|
13
|
+
exports.EXERCISE_ALIASES = {
|
|
14
|
+
face_squat: 'squat',
|
|
15
|
+
face_pushup: 'push_up',
|
|
16
|
+
face_plank: 'plank',
|
|
17
|
+
face_lunge: 'lunge',
|
|
18
|
+
face_jumping_jack: 'jumping_jack',
|
|
19
|
+
face_low_impact_jack: 'low_impact_jack',
|
|
20
|
+
face_balance_leg: 'balance_leg',
|
|
21
|
+
face_balance_leg_left: 'balance_leg_left',
|
|
22
|
+
face_balance_leg_right: 'balance_leg_right',
|
|
23
|
+
jump: 'air_time_jump',
|
|
24
|
+
};
|
|
25
|
+
/** Resolve a legacy or V3 id to the canonical V3 key. */
|
|
26
|
+
function resolveExerciseName(name) {
|
|
27
|
+
return exports.EXERCISE_ALIASES[name] ?? name;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Pick the best matching exercise config for a requested id.
|
|
31
|
+
* Tries exact id, then any legacy alias that maps to the same V3 key,
|
|
32
|
+
* then any config whose id resolves to the same V3 key.
|
|
33
|
+
*/
|
|
34
|
+
function findExerciseByIdOrAlias(exerciseId, exercises) {
|
|
35
|
+
const exact = exercises.find((e) => e.id === exerciseId);
|
|
36
|
+
if (exact)
|
|
37
|
+
return exact;
|
|
38
|
+
const canonical = resolveExerciseName(exerciseId);
|
|
39
|
+
const legacyIds = Object.entries(exports.EXERCISE_ALIASES)
|
|
40
|
+
.filter(([, v3]) => v3 === canonical)
|
|
41
|
+
.map(([legacy]) => legacy);
|
|
42
|
+
for (const legacy of legacyIds) {
|
|
43
|
+
const hit = exercises.find((e) => e.id === legacy);
|
|
44
|
+
if (hit)
|
|
45
|
+
return hit;
|
|
46
|
+
}
|
|
47
|
+
return exercises.find((e) => resolveExerciseName(e.id) === canonical);
|
|
48
|
+
}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @pose-tracker/react-native-pose-estimation-light — public API surface.
|
|
3
|
+
*
|
|
4
|
+
* Light / fully online variant: TF.js loads from CDN and MoveNet (default)
|
|
5
|
+
* from a remote URL each WebView boot. The movement engine is still
|
|
6
|
+
* downloaded from the PoseTracker API after an authenticated handshake.
|
|
7
|
+
*
|
|
8
|
+
* Runtime model:
|
|
9
|
+
* - Default (both platforms, incl. Expo Go): MoveNet SinglePose Lightning
|
|
10
|
+
* (17 keypoints, 192×192) inside a Chromium/WKWebView — TF.js WebGL.
|
|
11
|
+
* Mount {@link WebViewPoseView}. Requires network for TF.js + model.
|
|
12
|
+
* - Opt-in (`preferredBackend: 'vision'`, iOS native builds): Apple Vision
|
|
13
|
+
* `VNDetectHumanBodyPoseRequest` via {@link PoseCameraView}.
|
|
14
|
+
*/
|
|
15
|
+
export { configure, ConfigureError, DEFAULT_BASE_URL, SDK_NAME, SDK_VERSION } from './api/configure';
|
|
16
|
+
export type { ConfigureOptions } from './api/configure';
|
|
17
|
+
export { EXERCISE_ALIASES, findExerciseByIdOrAlias, resolveExerciseName, } from './exercises/aliases';
|
|
18
|
+
export { UsageTracker, TrackError } from './api/track';
|
|
19
|
+
export type { TrackRequest, TrackResponse, UsageTrackerOptions } from './api/track';
|
|
20
|
+
export { RuntimeCache } from './runtime/RuntimeCache';
|
|
21
|
+
export type { PoseRuntimeParts, RuntimeCacheOptions, RuntimeCacheProgress, } from './runtime/RuntimeCache';
|
|
22
|
+
export { getOnlineRuntimeParts, getOnlineRuntimeVersion, defaultOnlineRuntimeUrls, ONLINE_TFJS_VERSION, } from './backends/webview/onlineRuntime';
|
|
23
|
+
export type { GetOnlineRuntimeOptions, OnlineRuntimeParts, OnlineRuntimeUrls, } from './backends/webview/onlineRuntime';
|
|
24
|
+
export { DEFAULT_MOVENET_LIGHTNING_URL, originFromModelUrl, resolvePoseModel, } from './models/poseModels';
|
|
25
|
+
export type { PoseModelAlias, ResolvePoseModelOptions, ResolvedPoseModel, } from './models/poseModels';
|
|
26
|
+
export { PoseTrackerClient } from './client';
|
|
27
|
+
export type { PoseTrackerClientOptions, PreferredBackend, StartExerciseOptions } from './client';
|
|
28
|
+
export type { ColdStartMode, PreloadOptions } from './types/preload';
|
|
29
|
+
export type { SkeletonAnglesStyle, SkeletonCirclesStyle, SkeletonDefinition, SkeletonLinesStyle, } from './types/skeleton';
|
|
30
|
+
export { DEFAULT_SKELETON_DEFINITION } from './types/skeleton';
|
|
31
|
+
export { fetchSkeletonDefinition, SkeletonFetchError } from './api/skeleton';
|
|
32
|
+
export type { FetchSkeletonOptions } from './api/skeleton';
|
|
33
|
+
export { PoseTrackerProvider, usePoseTracker } from './PoseTrackerProvider';
|
|
34
|
+
export type { PoseTrackerContextValue, PoseTrackerProviderProps } from './PoseTrackerProvider';
|
|
35
|
+
export type { PoseBackend, PoseBackendInitOptions, PoseInputFrame } from './backends/PoseBackend';
|
|
36
|
+
export { WebViewPoseBackend, isWebViewPoseBackend } from './backends/webview/WebViewPoseBackend';
|
|
37
|
+
export type { WebViewPoseBackendOptions, WebViewPoseMessage } from './backends/webview/WebViewPoseBackend';
|
|
38
|
+
export { WebViewPoseView } from './camera/WebViewPoseView';
|
|
39
|
+
export type { WebViewPoseViewProps } from './camera/WebViewPoseView';
|
|
40
|
+
export { buildPoseHtml, DEFAULT_LOADING_TEXT, POSE_HTML_BUILD, } from './backends/webview/poseHtml';
|
|
41
|
+
export type { PoseHtmlOptions } from './backends/webview/poseHtml';
|
|
42
|
+
export { POSETRACKER_LOGO_DATA_URL } from './backends/webview/brandAssets';
|
|
43
|
+
export { VisionPoseBackend, VisionUnavailableError } from './backends/vision/VisionPoseBackend';
|
|
44
|
+
export type { VisionPoseBackendOptions } from './backends/vision/VisionPoseBackend';
|
|
45
|
+
export { isVisionBackendAvailable, isVisionPoseCameraAvailable, VISION_BODY_POSE_PLUGIN_NAME, } from './backends/vision/optionalVision';
|
|
46
|
+
export { poseFromVisionPluginResult, VISION_JOINT_TO_SDK, } from './backends/vision/mapVisionJoints';
|
|
47
|
+
export type { VisionPluginJoint, VisionPluginResult } from './backends/vision/mapVisionJoints';
|
|
48
|
+
export { PoseCameraView } from './camera/PoseCameraView';
|
|
49
|
+
export type { PoseCameraStats, PoseCameraUnavailableReason, PoseCameraViewProps, } from './camera/PoseCameraView';
|
|
50
|
+
export { isExpoGo } from './support/optionalModules';
|
|
51
|
+
export type { AccelerationDiagnostics, AccelerationState, DiagnosticListener, GlCapabilities, InferenceRuntime, NativeDelegateLabel, TfjsFlagSnapshot, VisionDelegateLabel, } from './types/acceleration';
|
|
52
|
+
export { EngineLoader, createExpoFileStore, createRnfsFileStore, createBlobUtilFileStore, createMemoryFileStore, createNativeFileStore, } from './engine/EngineLoader';
|
|
53
|
+
export type { EngineLoadResult, EngineLoaderOptions, FileStore, KeyValueStore } from './engine/EngineLoader';
|
|
54
|
+
export type { CustomExerciseDescriptor, CustomSessionOptions, EngineModuleExports, EngineSession, EngineSessionFeatures, EngineSessionOptions, EventSink, PoseTrackerEngine, } from './engine/types';
|
|
55
|
+
export { defaultDiagnosticLogger, logAccelerationReport, logFrameStats, logPlatformBanner, } from './diagnostics/logReport';
|
|
56
|
+
export { toClassicNativeMessage, } from './events/classicMessage';
|
|
57
|
+
export type { ClassicMessageListener, ClassicNativeMessage, } from './events/classicMessage';
|
|
58
|
+
export { AdaptiveQualityController, } from './quality/AdaptiveQualityController';
|
|
59
|
+
export type { AdaptiveQualityControllerOptions, QualityState, QualityStatsSample, } from './quality/AdaptiveQualityController';
|
|
60
|
+
export { CRITICAL_FPS_THRESHOLD, IDEAL_FPS_RANGE_ANDROID, IDEAL_FPS_RANGE_IOS, LOW_FPS_STREAK_BEFORE_DOWNGRADE, QUALITY_SETTLE_MS, MIN_TARGET_FPS_ANDROID, MIN_TARGET_FPS_DEFAULT, MIN_TARGET_FPS_IOS, QUALITY_LADDER, QUALITY_PROFILES, TARGET_FPS, TARGET_MEDIAN_MS, currentQualityPlatform, estimatedFpsFromMedianMs, getCriticalFpsThreshold, getIdealFpsRange, getMinTargetFps, getQualityProfile, isQualityProfileId, lowerQualityProfile, minMedianMsForMinTarget, nextLowerQualityProfile, profileFromWarmupMedianMs, } from './quality/profiles';
|
|
61
|
+
export { ANDROID_INFER_FRAME_SKIP, ANDROID_MIN_TARGET_FPS, ANDROID_PERF_DEBUG, ANDROID_PREPROCESS_PATH, ANDROID_SOFT_CAP_PROFILE, CAPTURE_CONSTRAINT_MODE, ENABLE_MALI_HARD_CAP, } from './quality/captureMode';
|
|
62
|
+
export type { AndroidPreprocessPath, AndroidSoftCapProfile, CaptureConstraintMode, } from './quality/captureMode';
|
|
63
|
+
export type { FpsRange, CapturePriority, QualityChoice, QualityPlatform, QualityProfile, QualityProfileId, } from './quality/profiles';
|
|
64
|
+
export { isMaliRenderer, profileFromScore, scoreDeviceCapability, } from './quality/deviceCapability';
|
|
65
|
+
export type { DeviceCapabilitySnapshot } from './quality/deviceCapability';
|
|
66
|
+
export { RuntimeGuard } from './quality/RuntimeGuard';
|
|
67
|
+
export type { GuardState } from './quality/RuntimeGuard';
|
|
68
|
+
export { DEFAULT_FEATURES, FREE_PLAN_FEATURES_MESSAGE, INVALID_TOKEN_MESSAGE, COMBINED_REFERENCE_EXERCISE_MESSAGE, featureNotSupportedMessage, freeBlockedFeatures, isPaidPlan, shouldShowWatermark, resolveFeatures, } from './types/features';
|
|
69
|
+
export type { PoseTrackerFeatures, ResolvedFeatures } from './types/features';
|
|
70
|
+
export * from './types/events';
|
|
71
|
+
export * from './types/manifest';
|
|
72
|
+
export * from './types/pose';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @pose-tracker/react-native-pose-estimation-light — public API surface.
|
|
4
|
+
*
|
|
5
|
+
* Light / fully online variant: TF.js loads from CDN and MoveNet (default)
|
|
6
|
+
* from a remote URL each WebView boot. The movement engine is still
|
|
7
|
+
* downloaded from the PoseTracker API after an authenticated handshake.
|
|
8
|
+
*
|
|
9
|
+
* Runtime model:
|
|
10
|
+
* - Default (both platforms, incl. Expo Go): MoveNet SinglePose Lightning
|
|
11
|
+
* (17 keypoints, 192×192) inside a Chromium/WKWebView — TF.js WebGL.
|
|
12
|
+
* Mount {@link WebViewPoseView}. Requires network for TF.js + model.
|
|
13
|
+
* - Opt-in (`preferredBackend: 'vision'`, iOS native builds): Apple Vision
|
|
14
|
+
* `VNDetectHumanBodyPoseRequest` via {@link PoseCameraView}.
|
|
15
|
+
*/
|
|
16
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
19
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(o, k2, desc);
|
|
23
|
+
}) : (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
o[k2] = m[k];
|
|
26
|
+
}));
|
|
27
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.logPlatformBanner = exports.logFrameStats = exports.logAccelerationReport = exports.defaultDiagnosticLogger = exports.createNativeFileStore = exports.createMemoryFileStore = exports.createBlobUtilFileStore = exports.createRnfsFileStore = exports.createExpoFileStore = exports.EngineLoader = exports.isExpoGo = exports.PoseCameraView = exports.VISION_JOINT_TO_SDK = exports.poseFromVisionPluginResult = exports.VISION_BODY_POSE_PLUGIN_NAME = exports.isVisionPoseCameraAvailable = exports.isVisionBackendAvailable = exports.VisionUnavailableError = exports.VisionPoseBackend = exports.POSETRACKER_LOGO_DATA_URL = exports.POSE_HTML_BUILD = exports.DEFAULT_LOADING_TEXT = exports.buildPoseHtml = exports.WebViewPoseView = exports.isWebViewPoseBackend = exports.WebViewPoseBackend = exports.usePoseTracker = exports.PoseTrackerProvider = exports.SkeletonFetchError = exports.fetchSkeletonDefinition = exports.DEFAULT_SKELETON_DEFINITION = exports.PoseTrackerClient = exports.resolvePoseModel = exports.originFromModelUrl = exports.DEFAULT_MOVENET_LIGHTNING_URL = exports.ONLINE_TFJS_VERSION = exports.defaultOnlineRuntimeUrls = exports.getOnlineRuntimeVersion = exports.getOnlineRuntimeParts = exports.RuntimeCache = exports.TrackError = exports.UsageTracker = exports.resolveExerciseName = exports.findExerciseByIdOrAlias = exports.EXERCISE_ALIASES = exports.SDK_VERSION = exports.SDK_NAME = exports.DEFAULT_BASE_URL = exports.ConfigureError = exports.configure = void 0;
|
|
32
|
+
exports.resolveFeatures = exports.shouldShowWatermark = exports.isPaidPlan = exports.freeBlockedFeatures = exports.featureNotSupportedMessage = exports.COMBINED_REFERENCE_EXERCISE_MESSAGE = exports.INVALID_TOKEN_MESSAGE = exports.FREE_PLAN_FEATURES_MESSAGE = exports.DEFAULT_FEATURES = exports.RuntimeGuard = exports.scoreDeviceCapability = exports.profileFromScore = exports.isMaliRenderer = exports.ENABLE_MALI_HARD_CAP = exports.CAPTURE_CONSTRAINT_MODE = exports.ANDROID_SOFT_CAP_PROFILE = exports.ANDROID_PREPROCESS_PATH = exports.ANDROID_PERF_DEBUG = exports.ANDROID_MIN_TARGET_FPS = exports.ANDROID_INFER_FRAME_SKIP = exports.profileFromWarmupMedianMs = exports.nextLowerQualityProfile = exports.minMedianMsForMinTarget = exports.lowerQualityProfile = exports.isQualityProfileId = exports.getQualityProfile = exports.getMinTargetFps = exports.getIdealFpsRange = exports.getCriticalFpsThreshold = exports.estimatedFpsFromMedianMs = exports.currentQualityPlatform = exports.TARGET_MEDIAN_MS = exports.TARGET_FPS = exports.QUALITY_PROFILES = exports.QUALITY_LADDER = exports.MIN_TARGET_FPS_IOS = exports.MIN_TARGET_FPS_DEFAULT = exports.MIN_TARGET_FPS_ANDROID = exports.QUALITY_SETTLE_MS = exports.LOW_FPS_STREAK_BEFORE_DOWNGRADE = exports.IDEAL_FPS_RANGE_IOS = exports.IDEAL_FPS_RANGE_ANDROID = exports.CRITICAL_FPS_THRESHOLD = exports.AdaptiveQualityController = exports.toClassicNativeMessage = void 0;
|
|
33
|
+
// Handshake + usage tracking
|
|
34
|
+
var configure_1 = require("./api/configure");
|
|
35
|
+
Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return configure_1.configure; } });
|
|
36
|
+
Object.defineProperty(exports, "ConfigureError", { enumerable: true, get: function () { return configure_1.ConfigureError; } });
|
|
37
|
+
Object.defineProperty(exports, "DEFAULT_BASE_URL", { enumerable: true, get: function () { return configure_1.DEFAULT_BASE_URL; } });
|
|
38
|
+
Object.defineProperty(exports, "SDK_NAME", { enumerable: true, get: function () { return configure_1.SDK_NAME; } });
|
|
39
|
+
Object.defineProperty(exports, "SDK_VERSION", { enumerable: true, get: function () { return configure_1.SDK_VERSION; } });
|
|
40
|
+
var aliases_1 = require("./exercises/aliases");
|
|
41
|
+
Object.defineProperty(exports, "EXERCISE_ALIASES", { enumerable: true, get: function () { return aliases_1.EXERCISE_ALIASES; } });
|
|
42
|
+
Object.defineProperty(exports, "findExerciseByIdOrAlias", { enumerable: true, get: function () { return aliases_1.findExerciseByIdOrAlias; } });
|
|
43
|
+
Object.defineProperty(exports, "resolveExerciseName", { enumerable: true, get: function () { return aliases_1.resolveExerciseName; } });
|
|
44
|
+
var track_1 = require("./api/track");
|
|
45
|
+
Object.defineProperty(exports, "UsageTracker", { enumerable: true, get: function () { return track_1.UsageTracker; } });
|
|
46
|
+
Object.defineProperty(exports, "TrackError", { enumerable: true, get: function () { return track_1.TrackError; } });
|
|
47
|
+
// Online pose-runtime
|
|
48
|
+
var RuntimeCache_1 = require("./runtime/RuntimeCache");
|
|
49
|
+
Object.defineProperty(exports, "RuntimeCache", { enumerable: true, get: function () { return RuntimeCache_1.RuntimeCache; } });
|
|
50
|
+
var onlineRuntime_1 = require("./backends/webview/onlineRuntime");
|
|
51
|
+
Object.defineProperty(exports, "getOnlineRuntimeParts", { enumerable: true, get: function () { return onlineRuntime_1.getOnlineRuntimeParts; } });
|
|
52
|
+
Object.defineProperty(exports, "getOnlineRuntimeVersion", { enumerable: true, get: function () { return onlineRuntime_1.getOnlineRuntimeVersion; } });
|
|
53
|
+
Object.defineProperty(exports, "defaultOnlineRuntimeUrls", { enumerable: true, get: function () { return onlineRuntime_1.defaultOnlineRuntimeUrls; } });
|
|
54
|
+
Object.defineProperty(exports, "ONLINE_TFJS_VERSION", { enumerable: true, get: function () { return onlineRuntime_1.ONLINE_TFJS_VERSION; } });
|
|
55
|
+
var poseModels_1 = require("./models/poseModels");
|
|
56
|
+
Object.defineProperty(exports, "DEFAULT_MOVENET_LIGHTNING_URL", { enumerable: true, get: function () { return poseModels_1.DEFAULT_MOVENET_LIGHTNING_URL; } });
|
|
57
|
+
Object.defineProperty(exports, "originFromModelUrl", { enumerable: true, get: function () { return poseModels_1.originFromModelUrl; } });
|
|
58
|
+
Object.defineProperty(exports, "resolvePoseModel", { enumerable: true, get: function () { return poseModels_1.resolvePoseModel; } });
|
|
59
|
+
// Orchestrator + React layer
|
|
60
|
+
var client_1 = require("./client");
|
|
61
|
+
Object.defineProperty(exports, "PoseTrackerClient", { enumerable: true, get: function () { return client_1.PoseTrackerClient; } });
|
|
62
|
+
var skeleton_1 = require("./types/skeleton");
|
|
63
|
+
Object.defineProperty(exports, "DEFAULT_SKELETON_DEFINITION", { enumerable: true, get: function () { return skeleton_1.DEFAULT_SKELETON_DEFINITION; } });
|
|
64
|
+
var skeleton_2 = require("./api/skeleton");
|
|
65
|
+
Object.defineProperty(exports, "fetchSkeletonDefinition", { enumerable: true, get: function () { return skeleton_2.fetchSkeletonDefinition; } });
|
|
66
|
+
Object.defineProperty(exports, "SkeletonFetchError", { enumerable: true, get: function () { return skeleton_2.SkeletonFetchError; } });
|
|
67
|
+
var PoseTrackerProvider_1 = require("./PoseTrackerProvider");
|
|
68
|
+
Object.defineProperty(exports, "PoseTrackerProvider", { enumerable: true, get: function () { return PoseTrackerProvider_1.PoseTrackerProvider; } });
|
|
69
|
+
Object.defineProperty(exports, "usePoseTracker", { enumerable: true, get: function () { return PoseTrackerProvider_1.usePoseTracker; } });
|
|
70
|
+
// WebView MoveNet — light online runtime (both platforms)
|
|
71
|
+
var WebViewPoseBackend_1 = require("./backends/webview/WebViewPoseBackend");
|
|
72
|
+
Object.defineProperty(exports, "WebViewPoseBackend", { enumerable: true, get: function () { return WebViewPoseBackend_1.WebViewPoseBackend; } });
|
|
73
|
+
Object.defineProperty(exports, "isWebViewPoseBackend", { enumerable: true, get: function () { return WebViewPoseBackend_1.isWebViewPoseBackend; } });
|
|
74
|
+
var WebViewPoseView_1 = require("./camera/WebViewPoseView");
|
|
75
|
+
Object.defineProperty(exports, "WebViewPoseView", { enumerable: true, get: function () { return WebViewPoseView_1.WebViewPoseView; } });
|
|
76
|
+
var poseHtml_1 = require("./backends/webview/poseHtml");
|
|
77
|
+
Object.defineProperty(exports, "buildPoseHtml", { enumerable: true, get: function () { return poseHtml_1.buildPoseHtml; } });
|
|
78
|
+
Object.defineProperty(exports, "DEFAULT_LOADING_TEXT", { enumerable: true, get: function () { return poseHtml_1.DEFAULT_LOADING_TEXT; } });
|
|
79
|
+
Object.defineProperty(exports, "POSE_HTML_BUILD", { enumerable: true, get: function () { return poseHtml_1.POSE_HTML_BUILD; } });
|
|
80
|
+
var brandAssets_1 = require("./backends/webview/brandAssets");
|
|
81
|
+
Object.defineProperty(exports, "POSETRACKER_LOGO_DATA_URL", { enumerable: true, get: function () { return brandAssets_1.POSETRACKER_LOGO_DATA_URL; } });
|
|
82
|
+
// Apple Vision (iOS native builds, opt-in via preferredBackend: 'vision')
|
|
83
|
+
var VisionPoseBackend_1 = require("./backends/vision/VisionPoseBackend");
|
|
84
|
+
Object.defineProperty(exports, "VisionPoseBackend", { enumerable: true, get: function () { return VisionPoseBackend_1.VisionPoseBackend; } });
|
|
85
|
+
Object.defineProperty(exports, "VisionUnavailableError", { enumerable: true, get: function () { return VisionPoseBackend_1.VisionUnavailableError; } });
|
|
86
|
+
var optionalVision_1 = require("./backends/vision/optionalVision");
|
|
87
|
+
Object.defineProperty(exports, "isVisionBackendAvailable", { enumerable: true, get: function () { return optionalVision_1.isVisionBackendAvailable; } });
|
|
88
|
+
Object.defineProperty(exports, "isVisionPoseCameraAvailable", { enumerable: true, get: function () { return optionalVision_1.isVisionPoseCameraAvailable; } });
|
|
89
|
+
Object.defineProperty(exports, "VISION_BODY_POSE_PLUGIN_NAME", { enumerable: true, get: function () { return optionalVision_1.VISION_BODY_POSE_PLUGIN_NAME; } });
|
|
90
|
+
var mapVisionJoints_1 = require("./backends/vision/mapVisionJoints");
|
|
91
|
+
Object.defineProperty(exports, "poseFromVisionPluginResult", { enumerable: true, get: function () { return mapVisionJoints_1.poseFromVisionPluginResult; } });
|
|
92
|
+
Object.defineProperty(exports, "VISION_JOINT_TO_SDK", { enumerable: true, get: function () { return mapVisionJoints_1.VISION_JOINT_TO_SDK; } });
|
|
93
|
+
var PoseCameraView_1 = require("./camera/PoseCameraView");
|
|
94
|
+
Object.defineProperty(exports, "PoseCameraView", { enumerable: true, get: function () { return PoseCameraView_1.PoseCameraView; } });
|
|
95
|
+
// Environment probes
|
|
96
|
+
var optionalModules_1 = require("./support/optionalModules");
|
|
97
|
+
Object.defineProperty(exports, "isExpoGo", { enumerable: true, get: function () { return optionalModules_1.isExpoGo; } });
|
|
98
|
+
// Engine
|
|
99
|
+
var EngineLoader_1 = require("./engine/EngineLoader");
|
|
100
|
+
Object.defineProperty(exports, "EngineLoader", { enumerable: true, get: function () { return EngineLoader_1.EngineLoader; } });
|
|
101
|
+
Object.defineProperty(exports, "createExpoFileStore", { enumerable: true, get: function () { return EngineLoader_1.createExpoFileStore; } });
|
|
102
|
+
Object.defineProperty(exports, "createRnfsFileStore", { enumerable: true, get: function () { return EngineLoader_1.createRnfsFileStore; } });
|
|
103
|
+
Object.defineProperty(exports, "createBlobUtilFileStore", { enumerable: true, get: function () { return EngineLoader_1.createBlobUtilFileStore; } });
|
|
104
|
+
Object.defineProperty(exports, "createMemoryFileStore", { enumerable: true, get: function () { return EngineLoader_1.createMemoryFileStore; } });
|
|
105
|
+
Object.defineProperty(exports, "createNativeFileStore", { enumerable: true, get: function () { return EngineLoader_1.createNativeFileStore; } });
|
|
106
|
+
// Metro / logcat diagnostic helpers
|
|
107
|
+
var logReport_1 = require("./diagnostics/logReport");
|
|
108
|
+
Object.defineProperty(exports, "defaultDiagnosticLogger", { enumerable: true, get: function () { return logReport_1.defaultDiagnosticLogger; } });
|
|
109
|
+
Object.defineProperty(exports, "logAccelerationReport", { enumerable: true, get: function () { return logReport_1.logAccelerationReport; } });
|
|
110
|
+
Object.defineProperty(exports, "logFrameStats", { enumerable: true, get: function () { return logReport_1.logFrameStats; } });
|
|
111
|
+
Object.defineProperty(exports, "logPlatformBanner", { enumerable: true, get: function () { return logReport_1.logPlatformBanner; } });
|
|
112
|
+
// Classic PoseTracker WebView message parity (sendDataToNative JSON)
|
|
113
|
+
var classicMessage_1 = require("./events/classicMessage");
|
|
114
|
+
Object.defineProperty(exports, "toClassicNativeMessage", { enumerable: true, get: function () { return classicMessage_1.toClassicNativeMessage; } });
|
|
115
|
+
// Adaptive camera quality (AdaptiveChoice + crash-loop guard + FPS downgrade)
|
|
116
|
+
var AdaptiveQualityController_1 = require("./quality/AdaptiveQualityController");
|
|
117
|
+
Object.defineProperty(exports, "AdaptiveQualityController", { enumerable: true, get: function () { return AdaptiveQualityController_1.AdaptiveQualityController; } });
|
|
118
|
+
var profiles_1 = require("./quality/profiles");
|
|
119
|
+
Object.defineProperty(exports, "CRITICAL_FPS_THRESHOLD", { enumerable: true, get: function () { return profiles_1.CRITICAL_FPS_THRESHOLD; } });
|
|
120
|
+
Object.defineProperty(exports, "IDEAL_FPS_RANGE_ANDROID", { enumerable: true, get: function () { return profiles_1.IDEAL_FPS_RANGE_ANDROID; } });
|
|
121
|
+
Object.defineProperty(exports, "IDEAL_FPS_RANGE_IOS", { enumerable: true, get: function () { return profiles_1.IDEAL_FPS_RANGE_IOS; } });
|
|
122
|
+
Object.defineProperty(exports, "LOW_FPS_STREAK_BEFORE_DOWNGRADE", { enumerable: true, get: function () { return profiles_1.LOW_FPS_STREAK_BEFORE_DOWNGRADE; } });
|
|
123
|
+
Object.defineProperty(exports, "QUALITY_SETTLE_MS", { enumerable: true, get: function () { return profiles_1.QUALITY_SETTLE_MS; } });
|
|
124
|
+
Object.defineProperty(exports, "MIN_TARGET_FPS_ANDROID", { enumerable: true, get: function () { return profiles_1.MIN_TARGET_FPS_ANDROID; } });
|
|
125
|
+
Object.defineProperty(exports, "MIN_TARGET_FPS_DEFAULT", { enumerable: true, get: function () { return profiles_1.MIN_TARGET_FPS_DEFAULT; } });
|
|
126
|
+
Object.defineProperty(exports, "MIN_TARGET_FPS_IOS", { enumerable: true, get: function () { return profiles_1.MIN_TARGET_FPS_IOS; } });
|
|
127
|
+
Object.defineProperty(exports, "QUALITY_LADDER", { enumerable: true, get: function () { return profiles_1.QUALITY_LADDER; } });
|
|
128
|
+
Object.defineProperty(exports, "QUALITY_PROFILES", { enumerable: true, get: function () { return profiles_1.QUALITY_PROFILES; } });
|
|
129
|
+
Object.defineProperty(exports, "TARGET_FPS", { enumerable: true, get: function () { return profiles_1.TARGET_FPS; } });
|
|
130
|
+
Object.defineProperty(exports, "TARGET_MEDIAN_MS", { enumerable: true, get: function () { return profiles_1.TARGET_MEDIAN_MS; } });
|
|
131
|
+
Object.defineProperty(exports, "currentQualityPlatform", { enumerable: true, get: function () { return profiles_1.currentQualityPlatform; } });
|
|
132
|
+
Object.defineProperty(exports, "estimatedFpsFromMedianMs", { enumerable: true, get: function () { return profiles_1.estimatedFpsFromMedianMs; } });
|
|
133
|
+
Object.defineProperty(exports, "getCriticalFpsThreshold", { enumerable: true, get: function () { return profiles_1.getCriticalFpsThreshold; } });
|
|
134
|
+
Object.defineProperty(exports, "getIdealFpsRange", { enumerable: true, get: function () { return profiles_1.getIdealFpsRange; } });
|
|
135
|
+
Object.defineProperty(exports, "getMinTargetFps", { enumerable: true, get: function () { return profiles_1.getMinTargetFps; } });
|
|
136
|
+
Object.defineProperty(exports, "getQualityProfile", { enumerable: true, get: function () { return profiles_1.getQualityProfile; } });
|
|
137
|
+
Object.defineProperty(exports, "isQualityProfileId", { enumerable: true, get: function () { return profiles_1.isQualityProfileId; } });
|
|
138
|
+
Object.defineProperty(exports, "lowerQualityProfile", { enumerable: true, get: function () { return profiles_1.lowerQualityProfile; } });
|
|
139
|
+
Object.defineProperty(exports, "minMedianMsForMinTarget", { enumerable: true, get: function () { return profiles_1.minMedianMsForMinTarget; } });
|
|
140
|
+
Object.defineProperty(exports, "nextLowerQualityProfile", { enumerable: true, get: function () { return profiles_1.nextLowerQualityProfile; } });
|
|
141
|
+
Object.defineProperty(exports, "profileFromWarmupMedianMs", { enumerable: true, get: function () { return profiles_1.profileFromWarmupMedianMs; } });
|
|
142
|
+
var captureMode_1 = require("./quality/captureMode");
|
|
143
|
+
Object.defineProperty(exports, "ANDROID_INFER_FRAME_SKIP", { enumerable: true, get: function () { return captureMode_1.ANDROID_INFER_FRAME_SKIP; } });
|
|
144
|
+
Object.defineProperty(exports, "ANDROID_MIN_TARGET_FPS", { enumerable: true, get: function () { return captureMode_1.ANDROID_MIN_TARGET_FPS; } });
|
|
145
|
+
Object.defineProperty(exports, "ANDROID_PERF_DEBUG", { enumerable: true, get: function () { return captureMode_1.ANDROID_PERF_DEBUG; } });
|
|
146
|
+
Object.defineProperty(exports, "ANDROID_PREPROCESS_PATH", { enumerable: true, get: function () { return captureMode_1.ANDROID_PREPROCESS_PATH; } });
|
|
147
|
+
Object.defineProperty(exports, "ANDROID_SOFT_CAP_PROFILE", { enumerable: true, get: function () { return captureMode_1.ANDROID_SOFT_CAP_PROFILE; } });
|
|
148
|
+
Object.defineProperty(exports, "CAPTURE_CONSTRAINT_MODE", { enumerable: true, get: function () { return captureMode_1.CAPTURE_CONSTRAINT_MODE; } });
|
|
149
|
+
Object.defineProperty(exports, "ENABLE_MALI_HARD_CAP", { enumerable: true, get: function () { return captureMode_1.ENABLE_MALI_HARD_CAP; } });
|
|
150
|
+
var deviceCapability_1 = require("./quality/deviceCapability");
|
|
151
|
+
Object.defineProperty(exports, "isMaliRenderer", { enumerable: true, get: function () { return deviceCapability_1.isMaliRenderer; } });
|
|
152
|
+
Object.defineProperty(exports, "profileFromScore", { enumerable: true, get: function () { return deviceCapability_1.profileFromScore; } });
|
|
153
|
+
Object.defineProperty(exports, "scoreDeviceCapability", { enumerable: true, get: function () { return deviceCapability_1.scoreDeviceCapability; } });
|
|
154
|
+
var RuntimeGuard_1 = require("./quality/RuntimeGuard");
|
|
155
|
+
Object.defineProperty(exports, "RuntimeGuard", { enumerable: true, get: function () { return RuntimeGuard_1.RuntimeGuard; } });
|
|
156
|
+
// Tracking features (WebView query-param parity + plan gating)
|
|
157
|
+
var features_1 = require("./types/features");
|
|
158
|
+
Object.defineProperty(exports, "DEFAULT_FEATURES", { enumerable: true, get: function () { return features_1.DEFAULT_FEATURES; } });
|
|
159
|
+
Object.defineProperty(exports, "FREE_PLAN_FEATURES_MESSAGE", { enumerable: true, get: function () { return features_1.FREE_PLAN_FEATURES_MESSAGE; } });
|
|
160
|
+
Object.defineProperty(exports, "INVALID_TOKEN_MESSAGE", { enumerable: true, get: function () { return features_1.INVALID_TOKEN_MESSAGE; } });
|
|
161
|
+
Object.defineProperty(exports, "COMBINED_REFERENCE_EXERCISE_MESSAGE", { enumerable: true, get: function () { return features_1.COMBINED_REFERENCE_EXERCISE_MESSAGE; } });
|
|
162
|
+
Object.defineProperty(exports, "featureNotSupportedMessage", { enumerable: true, get: function () { return features_1.featureNotSupportedMessage; } });
|
|
163
|
+
Object.defineProperty(exports, "freeBlockedFeatures", { enumerable: true, get: function () { return features_1.freeBlockedFeatures; } });
|
|
164
|
+
Object.defineProperty(exports, "isPaidPlan", { enumerable: true, get: function () { return features_1.isPaidPlan; } });
|
|
165
|
+
Object.defineProperty(exports, "shouldShowWatermark", { enumerable: true, get: function () { return features_1.shouldShowWatermark; } });
|
|
166
|
+
Object.defineProperty(exports, "resolveFeatures", { enumerable: true, get: function () { return features_1.resolveFeatures; } });
|
|
167
|
+
// Types
|
|
168
|
+
__exportStar(require("./types/events"), exports);
|
|
169
|
+
__exportStar(require("./types/manifest"), exports);
|
|
170
|
+
__exportStar(require("./types/pose"), exports);
|