@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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clearAllPluginData,
3
3
  createDeviceProvider
4
- } from "../chunk-GF2MPTAB.mjs";
5
- import "../chunk-PCAEUX2N.mjs";
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) return 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 ? "back" : "unknown"
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 s = visualEngine.startSession(options?.intent || "navigation");
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 };