@ateam-ai-mobile/expo 0.1.11 → 0.1.13
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/dist/bootstrap.js +44 -27
- package/dist/bootstrap.js.map +1 -1
- package/dist/bootstrap.mjs +3 -3
- package/dist/{chunk-C7M5WAHA.mjs → chunk-42FP5DTO.mjs} +17 -5
- package/dist/chunk-42FP5DTO.mjs.map +1 -0
- package/dist/{chunk-PCAEUX2N.mjs → chunk-6JX222YX.mjs} +21 -10
- package/dist/chunk-6JX222YX.mjs.map +1 -0
- package/dist/{chunk-GF2MPTAB.mjs → chunk-DLDG77DX.mjs} +2 -2
- package/dist/device/createDeviceProvider.js +28 -23
- package/dist/device/createDeviceProvider.js.map +1 -1
- package/dist/device/createDeviceProvider.mjs +2 -2
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/vision/index.d.mts +10 -3
- package/dist/vision/index.d.ts +10 -3
- package/dist/vision/index.js +20 -9
- package/dist/vision/index.js.map +1 -1
- package/dist/vision/index.mjs +1 -1
- package/ios/AdaVisionModule.swift +55 -13
- package/package.json +4 -4
- package/src/device-state/domains/visual.ts +7 -2
- package/src/device-state/visualEngine.ts +15 -2
- package/src/vision/index.ts +34 -10
- package/dist/chunk-C7M5WAHA.mjs.map +0 -1
- package/dist/chunk-PCAEUX2N.mjs.map +0 -1
- /package/dist/{chunk-GF2MPTAB.mjs.map → chunk-DLDG77DX.mjs.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearAllPluginData,
|
|
3
3
|
createDeviceProvider
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-DLDG77DX.mjs";
|
|
5
|
+
import "../chunk-6JX222YX.mjs";
|
|
6
6
|
import "../chunk-6LXF3JVX.mjs";
|
|
7
7
|
import "../chunk-FF6ZZZXH.mjs";
|
|
8
8
|
import "../chunk-Z5AI2SXX.mjs";
|
package/dist/index.d.mts
CHANGED
|
@@ -190,6 +190,8 @@ interface VisualSessionState {
|
|
|
190
190
|
id: string;
|
|
191
191
|
intent: VisualIntentName;
|
|
192
192
|
startedAt: number;
|
|
193
|
+
/** The camera the session reads. The host opens THIS one. */
|
|
194
|
+
facing: 'front' | 'back';
|
|
193
195
|
/** Set while the app is backgrounded. The session SURVIVES; the camera does not. */
|
|
194
196
|
suspended: boolean;
|
|
195
197
|
}
|
|
@@ -204,7 +206,7 @@ declare class VisualEngine {
|
|
|
204
206
|
private context;
|
|
205
207
|
/** Host DI. Without it frames carry no orientation, and say so with nulls. */
|
|
206
208
|
setContextProvider(p: VisualContextProvider | null): void;
|
|
207
|
-
startSession(intent: VisualIntentName): VisualSessionState;
|
|
209
|
+
startSession(intent: VisualIntentName, facing?: 'front' | 'back'): VisualSessionState;
|
|
208
210
|
stopSession(): void;
|
|
209
211
|
/**
|
|
210
212
|
* Background: suspend, do not end.
|
package/dist/index.d.ts
CHANGED
|
@@ -190,6 +190,8 @@ interface VisualSessionState {
|
|
|
190
190
|
id: string;
|
|
191
191
|
intent: VisualIntentName;
|
|
192
192
|
startedAt: number;
|
|
193
|
+
/** The camera the session reads. The host opens THIS one. */
|
|
194
|
+
facing: 'front' | 'back';
|
|
193
195
|
/** Set while the app is backgrounded. The session SURVIVES; the camera does not. */
|
|
194
196
|
suspended: boolean;
|
|
195
197
|
}
|
|
@@ -204,7 +206,7 @@ declare class VisualEngine {
|
|
|
204
206
|
private context;
|
|
205
207
|
/** Host DI. Without it frames carry no orientation, and say so with nulls. */
|
|
206
208
|
setContextProvider(p: VisualContextProvider | null): void;
|
|
207
|
-
startSession(intent: VisualIntentName): VisualSessionState;
|
|
209
|
+
startSession(intent: VisualIntentName, facing?: 'front' | 'back'): VisualSessionState;
|
|
208
210
|
stopSession(): void;
|
|
209
211
|
/**
|
|
210
212
|
* Background: suspend, do not end.
|
package/dist/index.js
CHANGED
|
@@ -994,12 +994,20 @@ var VisualEngine = class {
|
|
|
994
994
|
this.context = p;
|
|
995
995
|
}
|
|
996
996
|
// ── session ──
|
|
997
|
-
startSession(intent) {
|
|
998
|
-
if (this.session)
|
|
997
|
+
startSession(intent, facing = "back") {
|
|
998
|
+
if (this.session) {
|
|
999
|
+
if (this.session.facing === facing) return this.session;
|
|
1000
|
+
this.session = { ...this.session, facing };
|
|
1001
|
+
this.frames = [];
|
|
1002
|
+
this.cameraReady = false;
|
|
1003
|
+
this.notify();
|
|
1004
|
+
return this.session;
|
|
1005
|
+
}
|
|
999
1006
|
this.session = {
|
|
1000
1007
|
id: `visual_${Date.now()}`,
|
|
1001
1008
|
intent: PROFILES[intent] ? intent : "navigation",
|
|
1002
1009
|
startedAt: Date.now(),
|
|
1010
|
+
facing,
|
|
1003
1011
|
suspended: false
|
|
1004
1012
|
};
|
|
1005
1013
|
this.notify();
|
|
@@ -1187,7 +1195,7 @@ function cameraState() {
|
|
|
1187
1195
|
// would let a guide speak about a scene nothing is watching.
|
|
1188
1196
|
available: !!session,
|
|
1189
1197
|
active: visualEngine.isCameraReady(),
|
|
1190
|
-
facing: session ?
|
|
1198
|
+
facing: session ? session.facing : "unknown"
|
|
1191
1199
|
};
|
|
1192
1200
|
}
|
|
1193
1201
|
function createVisualDomain() {
|
|
@@ -1205,7 +1213,11 @@ function createVisualDomain() {
|
|
|
1205
1213
|
};
|
|
1206
1214
|
},
|
|
1207
1215
|
async start(options) {
|
|
1208
|
-
const
|
|
1216
|
+
const facing = options?.facing ?? "back";
|
|
1217
|
+
if (facing !== "front" && facing !== "back") {
|
|
1218
|
+
throw unsupported(`visual.start facing "${String(facing)}" \u2014 use "front" or "back"`);
|
|
1219
|
+
}
|
|
1220
|
+
const s = visualEngine.startSession(options?.intent || "navigation", facing);
|
|
1209
1221
|
visualEngine.setContextProvider({ heading: currentHeading });
|
|
1210
1222
|
void startHeading("visual");
|
|
1211
1223
|
return { id: s.id, intent: s.intent, startedAt: s.startedAt };
|