gps-plus-slam-app-framework 1.10.0 → 1.11.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 (203) hide show
  1. package/README.md +14 -14
  2. package/dist/{absolute-orientation-C_IxDR_j.d.ts → absolute-orientation-Dj1One3y.d.ts} +1 -1
  3. package/dist/{accuracy-circles-BE7tbvYV.d.ts → accuracy-circles-BHz7yVIL.d.ts} +1 -1
  4. package/dist/{app-selectors-CV7ggGoo.d.ts → app-selectors-DG0ZqaeI.d.ts} +1 -1
  5. package/dist/ar/ar-crash-isolation.d.ts +2 -0
  6. package/dist/ar/ar-crash-isolation.js +40 -0
  7. package/dist/ar/capability-checker.d.ts +1 -1
  8. package/dist/ar/capture-motion-gate.d.ts +2 -0
  9. package/dist/{capture-motion-gate-D1eyGC_o.js → ar/capture-motion-gate.js} +25 -2
  10. package/dist/ar/chromium-camera-access-workaround.d.ts +1 -1
  11. package/dist/ar/chromium-camera-access-workaround.js +1 -1
  12. package/dist/ar/depth-grid-lookup.d.ts +1 -1
  13. package/dist/ar/depth-occluder.d.ts +1 -1
  14. package/dist/ar/depth-occluder.js +1 -1
  15. package/dist/ar/depth-sampler.d.ts +2 -2
  16. package/dist/ar/depth-unprojection.d.ts +1 -1
  17. package/dist/ar/enable-gps-ar.d.ts +1 -1
  18. package/dist/ar/enable-gps-ar.js +2 -2
  19. package/dist/ar/frame-loop.d.ts +1 -1
  20. package/dist/ar/image-capture.d.ts +1 -1
  21. package/dist/ar/image-capture.js +1 -1
  22. package/dist/ar/image-quality.d.ts +2 -2
  23. package/dist/ar/image-quality.js +136 -4
  24. package/dist/ar/index.d.ts +28 -26
  25. package/dist/ar/index.js +15 -14
  26. package/dist/ar/occlusion-mesh-worker.d.ts +1 -1
  27. package/dist/ar/occupancy-grid.d.ts +1 -1
  28. package/dist/ar/occupancy-grid.js +1 -1
  29. package/dist/ar/occupancy-mesher.d.ts +1 -1
  30. package/dist/ar/occupancy-mesher.js +1 -1
  31. package/dist/ar/qr/index.d.ts +11 -0
  32. package/dist/ar/qr/index.js +11 -0
  33. package/dist/ar/{planar-pnp.d.ts → qr/planar-pnp.d.ts} +1 -1
  34. package/dist/ar/{planar-pnp.js → qr/planar-pnp.js} +1 -1
  35. package/dist/ar/qr/qr-debug-view.d.ts +2 -0
  36. package/dist/ar/{qr-debug-view.js → qr/qr-debug-view.js} +2 -2
  37. package/dist/ar/{qr-derived-pose.d.ts → qr/qr-derived-pose.d.ts} +1 -1
  38. package/dist/ar/{qr-derived-pose.js → qr/qr-derived-pose.js} +2 -2
  39. package/dist/ar/{qr-detection-controller.d.ts → qr/qr-detection-controller.d.ts} +1 -1
  40. package/dist/ar/qr/qr-detection-controller.js +2 -0
  41. package/dist/ar/{qr-frontend.d.ts → qr/qr-frontend.d.ts} +1 -1
  42. package/dist/ar/{qr-frontend.js → qr/qr-frontend.js} +1 -1
  43. package/dist/ar/{qr-pose.d.ts → qr/qr-pose.d.ts} +1 -1
  44. package/dist/ar/{qr-pose.js → qr/qr-pose.js} +1 -1
  45. package/dist/ar/qr/qr-size-depth-context.d.ts +3 -0
  46. package/dist/ar/{qr-size-depth-context.js → qr/qr-size-depth-context.js} +4 -4
  47. package/dist/ar/{qr-size-measurer.d.ts → qr/qr-size-measurer.d.ts} +1 -1
  48. package/dist/ar/qr/qr-size-measurer.js +2 -0
  49. package/dist/ar/replay-scene.d.ts +1 -1
  50. package/dist/ar/replay-scene.js +15 -13
  51. package/dist/ar/webxr-session.d.ts +4 -4
  52. package/dist/ar/webxr-session.js +2 -2
  53. package/dist/ar/xr-camera-texture.d.ts +1 -1
  54. package/dist/ar/xr-frame-loop.d.ts +1 -1
  55. package/dist/ar/xr-frame-loop.js +1 -1
  56. package/dist/ar-crash-isolation-DlXCGzMf.d.ts +52 -0
  57. package/dist/{ar-world-group-alignment-B6XiA1cT.d.ts → ar-world-group-alignment-BdS_h8Nf.d.ts} +2 -2
  58. package/dist/{capability-checker-DEo-ktWI.d.ts → capability-checker-BZ3_x1YL.d.ts} +1 -1
  59. package/dist/capture-motion-gate-CPwLekNf.d.ts +120 -0
  60. package/dist/{chromium-camera-access-workaround-DCd8SP2N.d.ts → chromium-camera-access-workaround-BHR4clTE.d.ts} +1 -1
  61. package/dist/{create-slam-app-store-CH31erpP.d.ts → create-slam-app-store-DFm5K9Ob.d.ts} +13 -4
  62. package/dist/{create-slam-app-store-DLv5ZwqU.js → create-slam-app-store-oK9bnqyI.js} +8 -6
  63. package/dist/{depth-grid-lookup-DY6zYTLx.d.ts → depth-grid-lookup-CCuzlqUo.d.ts} +1 -1
  64. package/dist/{depth-sampler-txG8evgQ.d.ts → depth-sampler-CS2jAFw4.d.ts} +2 -2
  65. package/dist/{depth-unprojection-JKkeqJrV.d.ts → depth-unprojection-ET3Gwedf.d.ts} +1 -1
  66. package/dist/{enable-gps-ar-BbNWyqp5.d.ts → enable-gps-ar-D_xEHzh5.d.ts} +10 -5
  67. package/dist/{file-system-utils-CfLTj5Ra.d.ts → file-system-utils-BHI0rXr9.d.ts} +1 -1
  68. package/dist/geo/h3-proximity.d.ts +1 -1
  69. package/dist/geo/h3-proximity.js +1 -1
  70. package/dist/geo/index.d.ts +1 -1
  71. package/dist/{geodesic-angle-HXBWiXiI.js → geodesic-angle-CZ_Ow90I.js} +2 -2
  72. package/dist/{gps-ar-pose-sampler-BOOV0jJk.d.ts → gps-ar-pose-sampler-BuuUuK-D.d.ts} +1 -1
  73. package/dist/{gps-event-coordinator-03rVh_us.d.ts → gps-event-coordinator-Cruoe5I-.d.ts} +4 -4
  74. package/dist/{gps-event-markers-BsC2Ynlh.d.ts → gps-event-markers-y2b2aVl6.d.ts} +35 -1
  75. package/dist/{h3-proximity-pFluGfwL.d.ts → h3-proximity-BaAulrnM.d.ts} +1 -1
  76. package/dist/{image-capture-Cr_rljeV.d.ts → image-capture-BevgKpoO.d.ts} +6 -6
  77. package/dist/{image-capture-BUqqsOi3.js → image-capture-C4DwxC10.js} +3 -3
  78. package/dist/{image-quality-BjBLoTec.d.ts → image-quality--HLuyJ2r.d.ts} +44 -2
  79. package/dist/{index-C2Bo0buN.d.ts → index-BWVwd9Zw.d.ts} +9 -71
  80. package/dist/{index-CuHaGY0F.d.ts → index-ClmnNJ6-.d.ts} +1 -1
  81. package/dist/index-Dxb6ATNK.d.ts +64 -0
  82. package/dist/index.d.ts +55 -55
  83. package/dist/index.js +23 -23
  84. package/dist/{leaflet-map-overlay-BRkUhZMD.js → leaflet-map-overlay-CTcTVmL1.js} +1 -1
  85. package/dist/{leaflet-map-overlay-QhF199BW.d.ts → leaflet-map-overlay-CksetpTt.d.ts} +1 -1
  86. package/dist/{map-data-D8sSxpOr.d.ts → map-data-D8cCqpOM.d.ts} +2 -2
  87. package/dist/{map-data-D3oE8AQP.js → map-data-DkhsYDGM.js} +1 -1
  88. package/dist/{map-overlay-draw-1E61FLKs.d.ts → map-overlay-draw-Cy-klqoA.d.ts} +1 -1
  89. package/dist/{median-Bla_W50f.js → median-DDBrZGP0.js} +2 -2
  90. package/dist/{occlusion-mesh-CZ4i_SW2.d.ts → occlusion-mesh-BWe2PrVi.d.ts} +22 -3
  91. package/dist/{occupancy-grid-f0I07UxI.d.ts → occupancy-grid-CYBdmMOo.d.ts} +2 -2
  92. package/dist/{persistence-middleware-CI4Cetnl.d.ts → persistence-middleware-Cun4aF5M.d.ts} +12 -2
  93. package/dist/{planar-pnp-CPLhg5MX.d.ts → planar-pnp-ByxwDEyM.d.ts} +2 -2
  94. package/dist/{ar-D-03Kso-.js → qr-CTp5xI83.js} +11 -25
  95. package/dist/{qr-debug-view-BmbWo06j.d.ts → qr-debug-view-CGlITU09.d.ts} +2 -2
  96. package/dist/{qr-derived-pose-DEYT85ul.d.ts → qr-derived-pose-DZPxZd9C.d.ts} +3 -3
  97. package/dist/{qr-detected-slice-CPEkGbxh.d.ts → qr-detected-slice-mfyxD2-M.d.ts} +9 -8
  98. package/dist/{qr-detection-controller-IcMRpTjV.d.ts → qr-detection-controller-C5NII-vs.d.ts} +4 -4
  99. package/dist/{qr-detection-controller-bRTJXC6G.js → qr-detection-controller-DXc1yHRf.js} +3 -3
  100. package/dist/{qr-frontend-61SKPSyU.d.ts → qr-frontend-QzKZSqB-.d.ts} +2 -2
  101. package/dist/{qr-pose-CCTF1PP0.d.ts → qr-pose-21fRDcFO.d.ts} +1 -1
  102. package/dist/{qr-pose-aggregation-H-O_Jjz9.js → qr-pose-aggregation-Cp0Mtg_j.js} +4 -4
  103. package/dist/{qr-pose-aggregation-BL6gfl0s.d.ts → qr-pose-aggregation-mABSN0AW.d.ts} +2 -2
  104. package/dist/{qr-size-depth-context-DJsYqbqY.d.ts → qr-size-depth-context-CMDv6T29.d.ts} +3 -3
  105. package/dist/{qr-size-measurer-Bl_i-umk.d.ts → qr-size-measurer-rVFf4AdM.d.ts} +5 -5
  106. package/dist/{qr-size-measurer-BVOIg-He.js → qr-size-measurer-zZB9S1va.js} +4 -4
  107. package/dist/{recording-replayer-DyIN13nG.d.ts → recording-replayer-qT2EM1Qs.d.ts} +1 -1
  108. package/dist/{recording-slice-DziOl7P5.d.ts → recording-slice-DXw5-UvO.d.ts} +10 -5
  109. package/dist/{replay-engine-DAymjsd1.d.ts → replay-engine-B1H_kLhK.d.ts} +1 -1
  110. package/dist/{replay-scene-CZdWgcpc.d.ts → replay-scene-BJeO36YT.d.ts} +12 -5
  111. package/dist/sensors/absolute-orientation.d.ts +1 -1
  112. package/dist/sensors/absolute-orientation.js +1 -1
  113. package/dist/sensors/gps.d.ts +1 -1
  114. package/dist/sensors/index.d.ts +3 -3
  115. package/dist/sensors/permission-checker.d.ts +1 -1
  116. package/dist/{session-disposers-BZS-hi8u.js → session-disposers-B7hUN90w.js} +1 -1
  117. package/dist/state/app-selectors.d.ts +1 -1
  118. package/dist/state/combined-root-state.d.ts +1 -1
  119. package/dist/state/create-slam-app-store.d.ts +1 -1
  120. package/dist/state/create-slam-app-store.js +1 -1
  121. package/dist/state/gps-ar-pose-sampler.d.ts +2 -2
  122. package/dist/state/gps-event-coordinator.d.ts +2 -2
  123. package/dist/state/gps-event-coordinator.js +1 -1
  124. package/dist/state/index.d.ts +17 -18
  125. package/dist/state/index.js +4 -5
  126. package/dist/state/persistence-middleware.d.ts +2 -2
  127. package/dist/state/persistence-middleware.js +24 -15
  128. package/dist/state/qr-detected-slice.d.ts +3 -3
  129. package/dist/state/qr-detected-slice.js +8 -8
  130. package/dist/state/recording-replayer.d.ts +2 -2
  131. package/dist/state/recording-replayer.js +1 -1
  132. package/dist/state/recording-slice.d.ts +1 -1
  133. package/dist/state/replay-engine.d.ts +1 -1
  134. package/dist/state/store-subscribers.d.ts +2 -2
  135. package/dist/state/store-subscribers.js +1 -1
  136. package/dist/state/subscribe-to-selector.d.ts +1 -1
  137. package/dist/state/tracking-quality.d.ts +1 -1
  138. package/dist/state/tracking-quality.js +2 -2
  139. package/dist/state/tracking-slice.d.ts +1 -1
  140. package/dist/{state-U45ioVyB.js → state-CDF5LvsO.js} +1 -2
  141. package/dist/storage/file-system-utils.d.ts +1 -1
  142. package/dist/storage/file-system-utils.js +1 -1
  143. package/dist/storage/index.d.ts +2 -2
  144. package/dist/storage/zip-coverage-embed.d.ts +1 -1
  145. package/dist/storage/zip-coverage-embed.js +1 -1
  146. package/dist/{store-subscribers-DtwakLrQ.d.ts → store-subscribers-CWHToX6N.d.ts} +2 -2
  147. package/dist/{subscribe-to-selector-Cgo9JTfS.d.ts → subscribe-to-selector-j-eOYybQ.d.ts} +1 -1
  148. package/dist/test-utils/browser-mocks.d.ts +1 -1
  149. package/dist/{tracking-slice-Bt2OEQhA.d.ts → tracking-slice-BAbcZK-Y.d.ts} +3 -2
  150. package/dist/types/ar-types.d.ts +1 -1
  151. package/dist/types/index.d.ts +1 -1
  152. package/dist/utils/index.js +1 -1
  153. package/dist/visualization/accuracy-circles.d.ts +1 -1
  154. package/dist/visualization/accuracy-circles.js +1 -1
  155. package/dist/visualization/alignment-lerper.d.ts +1 -1
  156. package/dist/visualization/ar-world-group-alignment.d.ts +1 -1
  157. package/dist/visualization/ar-world-group-alignment.js +2 -2
  158. package/dist/visualization/camera-follower.d.ts +1 -1
  159. package/dist/visualization/css3d-renderer-manager.d.ts +1 -1
  160. package/dist/visualization/gps-anchor.js +2 -2
  161. package/dist/visualization/gps-event-markers.d.ts +2 -2
  162. package/dist/visualization/gps-event-markers.js +27 -6
  163. package/dist/visualization/index.d.ts +13 -14
  164. package/dist/visualization/index.js +4 -5
  165. package/dist/visualization/leaflet-map-overlay.d.ts +1 -1
  166. package/dist/visualization/leaflet-map-overlay.js +1 -1
  167. package/dist/visualization/map-data.d.ts +1 -1
  168. package/dist/visualization/map-data.js +1 -1
  169. package/dist/visualization/map-overlay-draw.d.ts +1 -1
  170. package/dist/visualization/occluder-mesh-driver.d.ts +1 -1
  171. package/dist/visualization/occluder-mesh-driver.js +1 -1
  172. package/dist/visualization/occlusion-mesh.d.ts +2 -2
  173. package/dist/visualization/occlusion-mesh.js +28 -3
  174. package/dist/visualization/three-dispose.d.ts +1 -1
  175. package/dist/visualization/vis-colors.d.ts +1 -1
  176. package/dist/{webxr-session-CGFZ429B.d.ts → webxr-session-DefwObIu.d.ts} +144 -194
  177. package/dist/{webxr-session-DWKUsCN9.js → webxr-session-OyR3YbTq.js} +151 -281
  178. package/dist/{xr-frame-loop-25gM4B0K.d.ts → xr-frame-loop-BiZvgqP7.d.ts} +1 -1
  179. package/dist/{zip-coverage-embed-BrodRLq0.d.ts → zip-coverage-embed-CyoX7XL7.d.ts} +1 -1
  180. package/package.json +4 -2
  181. package/dist/ar/qr-debug-view.d.ts +0 -2
  182. package/dist/ar/qr-detection-controller.js +0 -2
  183. package/dist/ar/qr-size-depth-context.d.ts +0 -3
  184. package/dist/ar/qr-size-measurer.js +0 -2
  185. package/dist/capture-motion-gate-BmjiWUJv.d.ts +0 -24
  186. package/dist/map-overlay-0yJOcEVO.d.ts +0 -153
  187. package/dist/recording-options-Cai9D14V.d.ts +0 -700
  188. package/dist/state/recording-options.d.ts +0 -2
  189. package/dist/state/recording-options.js +0 -620
  190. package/dist/visualization/map-overlay.d.ts +0 -2
  191. package/dist/visualization/map-overlay.js +0 -241
  192. /package/dist/{alignment-lerper-B4COh_0p.d.ts → alignment-lerper-DAHicRON.d.ts} +0 -0
  193. /package/dist/{ar-types-CBafnxhE.d.ts → ar-types-D6PYS4bc.d.ts} +0 -0
  194. /package/dist/{camera-follower-B6zA3dy9.d.ts → camera-follower-CO_ibF2o.d.ts} +0 -0
  195. /package/dist/{css3d-renderer-manager-DbrSY7Mh.d.ts → css3d-renderer-manager-CJjHtCMT.d.ts} +0 -0
  196. /package/dist/{device-orientation-cache-BjEaEAmh.js → device-orientation-cache-j-kLP8he.js} +0 -0
  197. /package/dist/{frame-loop-7HigCj7m.d.ts → frame-loop-7GBMBu68.d.ts} +0 -0
  198. /package/dist/{gps-CX5b9g3s.d.ts → gps-CnhYrJCa.d.ts} +0 -0
  199. /package/dist/{occupancy-mesher-BqnRd10x.d.ts → occupancy-mesher-B4Bv4BTk.d.ts} +0 -0
  200. /package/dist/{permission-checker-D1C5zvo-.d.ts → permission-checker-B-VtjnBA.d.ts} +0 -0
  201. /package/dist/{three-dispose-C9mdpSRX.d.ts → three-dispose-C3mnKQR5.d.ts} +0 -0
  202. /package/dist/{vis-colors-DjStl_tD.d.ts → vis-colors-CoSpbZEO.d.ts} +0 -0
  203. /package/dist/{xr-camera-texture-C6Z4d7RR.d.ts → xr-camera-texture-q0eIDSRg.d.ts} +0 -0
@@ -1,10 +1,11 @@
1
- import { a as TrackingSliceState } from "./tracking-slice-Bt2OEQhA.js";
2
- import { t as RecordingState } from "./recording-slice-DziOl7P5.js";
1
+ import { a as TrackingSliceState } from "./tracking-slice-BAbcZK-Y.js";
2
+ import { t as RecordingState } from "./recording-slice-DXw5-UvO.js";
3
3
  import { n as SessionMetadata } from "./opfs-storage-S_odkCk1.js";
4
4
  import { n as StorageBackend } from "./storage-backend-BX7egQKi.js";
5
5
  import { GpsPoint, LatLong, Matrix4, RootState, Vector3 } from "gps-plus-slam-js";
6
6
  import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
7
7
  import { Middleware, Reducer, ReducersMapObject, configureStore } from "@reduxjs/toolkit";
8
+ import * as _$redux from "redux";
8
9
 
9
10
  //#region ../src/state/combined-root-state.d.ts
10
11
  type CombinedRootState = SlamAppCombinedState;
@@ -205,7 +206,7 @@ declare function computeGpsVsFusedDivergence(alignmentMatrix: Matrix4 | null, gp
205
206
  declare const snapshotPushed: _$_reduxjs_toolkit0.ActionCreatorWithPayload<AlignmentSnapshot, "trackingQuality/snapshotPushed">, snapshotsTrimmed: _$_reduxjs_toolkit0.ActionCreatorWithPayload<{
206
207
  size: number;
207
208
  }, "trackingQuality/snapshotsTrimmed">, reportUpdated: _$_reduxjs_toolkit0.ActionCreatorWithPayload<TrackingQualityReport | null, "trackingQuality/reportUpdated">, degradedCountUpdated: _$_reduxjs_toolkit0.ActionCreatorWithPayload<number, "trackingQuality/degradedCountUpdated">, resetTrackingQuality: _$_reduxjs_toolkit0.ActionCreatorWithoutPayload<"trackingQuality/resetTrackingQuality">;
208
- declare const trackingQualityReducer: _$_reduxjs_toolkit0.Reducer<TrackingQualitySliceState>;
209
+ declare const trackingQualityReducer: _$redux.Reducer<TrackingQualitySliceState>;
209
210
  interface RootWithTrackingQuality {
210
211
  trackingQuality?: TrackingQualitySliceState;
211
212
  }
@@ -329,7 +330,7 @@ interface SlamAppStoreOptions<ExtraReducers extends ReducersMapObject = Record<s
329
330
  * override on. **For Stage-A/§6a field-calibration recordings, turn this OFF**
330
331
  * (recorder settings) so the captured compass behaviour is unmodified.
331
332
  *
332
- * @see GpsPlusSlamJs_Docs/docs/2026-06-26-stage0-field-collection-and-enablement.md
333
+ * @see GpsPlusSlamJs_Docs/docs/2026-06-26-0701-stage0-field-collection-and-enablement.md
333
334
  */
334
335
  enableCompassColdStartOverride?: boolean;
335
336
  /**
@@ -369,6 +370,14 @@ interface SlamAppStore<ExtraReducers extends ReducersMapObject = Record<string,
369
370
  writeFrame: (blob: Blob, index: number) => Promise<void>;
370
371
  /** Persist session metadata (`session.json`) via the configured backend. */
371
372
  writeSessionMetadata: (metadata: SessionMetadata) => Promise<void>;
373
+ /**
374
+ * Resolves once every action write queued by the persistence middleware
375
+ * has settled. The stop flow MUST await this before anything reads the
376
+ * session's `actions/` (final sync, ZIP export) — the write queue is
377
+ * async, so an action dispatched moments before Stop could otherwise
378
+ * land after the export enumerated the directory and miss the zip.
379
+ */
380
+ flushPendingActionWrites: () => Promise<void>;
372
381
  }
373
382
  /**
374
383
  * Build a Redux store wired with library + recording slices, persistence
@@ -129,16 +129,17 @@ function createSlamAppStore(options) {
129
129
  });
130
130
  const prependedListeners = [trackingQualityMiddleware];
131
131
  if (compassOptIns.length > 0) prependedListeners.push(createSlamAppStoreListenerMiddleware(compassOptIns));
132
+ const persistenceMiddleware = createPersistenceMiddleware({
133
+ storageBackend,
134
+ onWriteFailure,
135
+ persistedPrefixes: [...BUILTIN_PERSISTED_PREFIXES, ...persistedExtraPrefixes ?? []]
136
+ });
132
137
  const store = configureStore({
133
138
  reducer,
134
139
  middleware: (getDefaultMiddleware) => getDefaultMiddleware({
135
140
  serializableCheck: enableDevChecks ? { ignoredActions: ["tracking/poseReceived"] } : false,
136
141
  immutableCheck: enableDevChecks ? { ignoredPaths: ["tracking"] } : false
137
- }).prepend(...prependedListeners).concat(createPersistenceMiddleware({
138
- storageBackend,
139
- onWriteFailure,
140
- persistedPrefixes: [...BUILTIN_PERSISTED_PREFIXES, ...persistedExtraPrefixes ?? []]
141
- }), ...extraMiddleware ?? []),
142
+ }).prepend(...prependedListeners).concat(persistenceMiddleware, ...extraMiddleware ?? []),
142
143
  devTools: {
143
144
  actionSanitizer: sanitizeForDevTools,
144
145
  stateSanitizer: sanitizeForDevTools
@@ -149,7 +150,8 @@ function createSlamAppStore(options) {
149
150
  dispatch: store.dispatch,
150
151
  subscribe: (listener) => store.subscribe(listener),
151
152
  writeFrame: (blob, index) => storageBackend.writeFrame(blob, index),
152
- writeSessionMetadata: (metadata) => storageBackend.writeSessionMetadata(metadata)
153
+ writeSessionMetadata: (metadata) => storageBackend.writeSessionMetadata(metadata),
154
+ flushPendingActionWrites: () => persistenceMiddleware.flushPendingWrites()
153
155
  };
154
156
  }
155
157
  //#endregion
@@ -1,4 +1,4 @@
1
- import { r as DepthPoint } from "./ar-types-CBafnxhE.js";
1
+ import { r as DepthPoint } from "./ar-types-D6PYS4bc.js";
2
2
 
3
3
  //#region ../src/ar/depth-grid-lookup.d.ts
4
4
  interface DepthGridLookup {
@@ -1,4 +1,4 @@
1
- import { a as RgbTuple, i as DepthSample, t as ARPose } from "./ar-types-CBafnxhE.js";
1
+ import { a as RgbTuple, i as DepthSample, t as ARPose } from "./ar-types-D6PYS4bc.js";
2
2
  import { Matrix4 } from "gps-plus-slam-js";
3
3
 
4
4
  //#region ../src/ar/depth-rgb-lookup.d.ts
@@ -72,7 +72,7 @@ interface DepthInfo {
72
72
  * the matrices: the per-frame buffer is too large to clone and the live
73
73
  * depth occluder uploads it synchronously). Absent when the source carries
74
74
  * no `data` (e.g. the sparse-only path). Plumbed for the live depth occluder
75
- * (2026-06-14-webxr-depth-occlusion-plan.md §2); the sparse sampler ignores it.
75
+ * (2026-06-14-0009-webxr-depth-occlusion-plan.md §2); the sparse sampler ignores it.
76
76
  */
77
77
  data?: ArrayBuffer;
78
78
  /**
@@ -1,4 +1,4 @@
1
- import { r as DepthPoint } from "./ar-types-CBafnxhE.js";
1
+ import { r as DepthPoint } from "./ar-types-D6PYS4bc.js";
2
2
  import { Matrix4, Quaternion, Vector3 } from "gps-plus-slam-js";
3
3
 
4
4
  //#region ../src/ar/depth-unprojection.d.ts
@@ -1,7 +1,7 @@
1
- import { t as ArCrashIsolationOptions } from "./recording-options-Cai9D14V.js";
2
- import { n as RawDeviceOrientation, t as GpsPosition } from "./gps-CX5b9g3s.js";
3
- import { n as PermissionStatus } from "./permission-checker-D1C5zvo-.js";
4
- import { s as SessionFeatureOptions } from "./webxr-session-CGFZ429B.js";
1
+ import { t as ArCrashIsolationOptions } from "./ar-crash-isolation-DlXCGzMf.js";
2
+ import { n as RawDeviceOrientation, t as GpsPosition } from "./gps-CnhYrJCa.js";
3
+ import { n as PermissionStatus } from "./permission-checker-B-VtjnBA.js";
4
+ import { a as SessionFeatureOptions, t as ArSessionCallbacks } from "./webxr-session-DefwObIu.js";
5
5
 
6
6
  //#region ../src/ar/enable-gps-ar.d.ts
7
7
  /**
@@ -37,6 +37,11 @@ interface EnableGpsArConfig {
37
37
  requestHitTest?: boolean;
38
38
  /** Crash-isolation diagnostic flags forwarded verbatim to `initAR`. */
39
39
  isolationOptions?: Partial<ArCrashIsolationOptions>;
40
+ /**
41
+ * Per-session AR callbacks (tracking store, depth, image capture, …)
42
+ * forwarded verbatim to `initAR` — see {@link ArSessionCallbacks}.
43
+ */
44
+ callbacks?: ArSessionCallbacks;
40
45
  /** Receives every GPS fix from the started watch. */
41
46
  onGpsPosition?: (position: GpsPosition) => void;
42
47
  /** Receives every device-orientation sample from the started watch. */
@@ -56,7 +61,7 @@ interface EnableGpsArDeps {
56
61
  requestWebXRWithDepthPermission: () => Promise<PermissionStatus>;
57
62
  startGpsWatch: (onPosition: (position: GpsPosition) => void, onError?: (error: GeolocationPositionError) => void) => void;
58
63
  startOrientationWatch: (onOrientation: (orientation: RawDeviceOrientation) => void) => void;
59
- initAR: (container: HTMLElement, isolationOptions?: Partial<ArCrashIsolationOptions>, sessionFeatures?: SessionFeatureOptions) => Promise<void>;
64
+ initAR: (container: HTMLElement, isolationOptions?: Partial<ArCrashIsolationOptions>, sessionFeatures?: SessionFeatureOptions, callbacks?: ArSessionCallbacks) => Promise<void>;
60
65
  stopGpsWatch: () => void;
61
66
  stopOrientationWatch: () => void;
62
67
  endARSession: () => Promise<void>;
@@ -26,7 +26,7 @@ declare function formatFrameFilename(index: number): string;
26
26
  * is a textbook COLMAP tree (`images/frame-NNNNNN.jpg` next to `sparse/0/`).
27
27
  * Both the OPFS write path and the recorder's persisted `imageFile` value must
28
28
  * use THIS constant so a recording stays self-consistent (COLMAP export plan
29
- * Q5, gps-plus-slam/GpsPlusSlamJs_Docs/docs/2026-06-13-colmap-export-plan.md).
29
+ * Q5, gps-plus-slam/GpsPlusSlamJs_Docs/docs/2026-06-13-1205-colmap-export-plan.md).
30
30
  */
31
31
  declare const SESSION_IMAGES_DIR = "images";
32
32
  /**
@@ -1,2 +1,2 @@
1
- import { a as findNearbyGeoAnchor, c as h3CellsMatch, i as clusterCellsByZoom, l as isH3Index, n as KnownGeoAnchor, o as gpsPathToCoverageCells, r as approxDistanceMetres, s as gpsToH3, t as H3_RESOLUTION } from "../h3-proximity-pFluGfwL.js";
1
+ import { a as findNearbyGeoAnchor, c as h3CellsMatch, i as clusterCellsByZoom, l as isH3Index, n as KnownGeoAnchor, o as gpsPathToCoverageCells, r as approxDistanceMetres, s as gpsToH3, t as H3_RESOLUTION } from "../h3-proximity-BaAulrnM.js";
2
2
  export { H3_RESOLUTION, KnownGeoAnchor, approxDistanceMetres, clusterCellsByZoom, findNearbyGeoAnchor, gpsPathToCoverageCells, gpsToH3, h3CellsMatch, isH3Index };
@@ -51,7 +51,7 @@ function gpsPathToCoverageCells(path) {
51
51
  * truncate the hex-string id: resolution is encoded in the high bits with
52
52
  * trailing `f` padding, so slicing yields INVALID cells, not parents (verified;
53
53
  * see the D1 gotcha in
54
- * docs/2026-06-14-map-centric-recording-browser-and-h3-index-user-feedback.md).
54
+ * docs/2026-06-14-1048-map-centric-recording-browser-and-h3-index-user-feedback.md).
55
55
  *
56
56
  * `targetRes` is clamped to `[0, H3_RESOLUTION]` because `cellToParent` throws
57
57
  * when asked for a FINER resolution than the cell, and res 11 is the finest
@@ -1,2 +1,2 @@
1
- import { a as findNearbyGeoAnchor, c as h3CellsMatch, i as clusterCellsByZoom, l as isH3Index, n as KnownGeoAnchor, o as gpsPathToCoverageCells, r as approxDistanceMetres, s as gpsToH3, t as H3_RESOLUTION } from "../h3-proximity-pFluGfwL.js";
1
+ import { a as findNearbyGeoAnchor, c as h3CellsMatch, i as clusterCellsByZoom, l as isH3Index, n as KnownGeoAnchor, o as gpsPathToCoverageCells, r as approxDistanceMetres, s as gpsToH3, t as H3_RESOLUTION } from "../h3-proximity-BaAulrnM.js";
2
2
  export { H3_RESOLUTION, type KnownGeoAnchor, approxDistanceMetres, clusterCellsByZoom, findNearbyGeoAnchor, gpsPathToCoverageCells, gpsToH3, h3CellsMatch, isH3Index };
@@ -5,14 +5,14 @@ import { quat } from "gl-matrix";
5
5
  * rotation angle between two unit quaternions.
6
6
  *
7
7
  * This used to be hand-rolled in (at least) two places:
8
- * - `geodesicAngleRad` (private) in `ar/qr-pose-aggregation.ts`, and
8
+ * - `geodesicAngleRad` (private) in `ar/qr/qr-pose-aggregation.ts`, and
9
9
  * - `quat.getAngle(...)` + a NaN guard inside `state/tracking-quality.ts`'s
10
10
  * `matrixDelta`.
11
11
  *
12
12
  * Both compute the same number — `acos(2·dot² − 1)` — so they are consolidated
13
13
  * here so a third consumer (the capture motion gate's angular-velocity helper,
14
14
  * `ar/pose-motion.ts`) reuses one definition instead of adding a fourth copy.
15
- * See `GpsPlusSlamJs_Docs/docs/2026-06-23-followup-consolidate-geodesic-angle-kernel.md`.
15
+ * See `GpsPlusSlamJs_Docs/docs/2026-06-23-2120-consolidate-geodesic-angle-kernel-followup.md`.
16
16
  */
17
17
  /**
18
18
  * Geodesic (shortest-arc) rotation angle in radians between two **unit**
@@ -1,4 +1,4 @@
1
- import { t as ARPose } from "./ar-types-CBafnxhE.js";
1
+ import { t as ARPose } from "./ar-types-D6PYS4bc.js";
2
2
  import { Quaternion, Vector3 } from "gps-plus-slam-js";
3
3
 
4
4
  //#region ../src/state/gps-ar-pose-sampler.d.ts
@@ -1,7 +1,7 @@
1
- import { t as ARPose } from "./ar-types-CBafnxhE.js";
2
- import { n as RawDeviceOrientation, t as GpsPosition } from "./gps-CX5b9g3s.js";
3
- import { t as AbsoluteOrientationReading } from "./absolute-orientation-C_IxDR_j.js";
4
- import { i as SlamAppStore } from "./create-slam-app-store-CH31erpP.js";
1
+ import { t as ARPose } from "./ar-types-D6PYS4bc.js";
2
+ import { n as RawDeviceOrientation, t as GpsPosition } from "./gps-CnhYrJCa.js";
3
+ import { t as AbsoluteOrientationReading } from "./absolute-orientation-Dj1One3y.js";
4
+ import { i as SlamAppStore } from "./create-slam-app-store-DFm5K9Ob.js";
5
5
  import { RawAbsoluteOrientation, RawGpsPoint, RecordGpsEventPayload, eulerToQuaternion } from "gps-plus-slam-js";
6
6
  import { ReducersMapObject } from "@reduxjs/toolkit";
7
7
 
@@ -1,6 +1,26 @@
1
+ import * as THREE from "three";
1
2
  import { LatLong, Vector3 } from "gps-plus-slam-js";
2
3
 
3
4
  //#region ../src/visualization/gps-event-markers.d.ts
5
+ /**
6
+ * Where the visualizer resolves its scene graph from.
7
+ *
8
+ * By default markers are parented into the LIVE AR session's scene
9
+ * (`webxr-session.ts` getters). Non-live consumers (desktop replay, offline
10
+ * e2e fixtures) point the visualizer at their own scene via
11
+ * {@link GpsEventVisualizer.setSceneSource} instead of injecting their scene
12
+ * into the webxr-session singleton (the deleted replay-mode "Risk R1" setters
13
+ * — see the 2026-07-11 webxr-session surface-reduction plan, step 2).
14
+ *
15
+ * Both functions may return `null` (e.g. before `initAR()`); the visualizer
16
+ * then warns and skips the affected marker, exactly as before.
17
+ */
18
+ interface GpsMarkerSceneSource {
19
+ /** Scene root — parents raw-GPS (yellow) and snapshot (red) markers. */
20
+ getScene: () => THREE.Scene | null;
21
+ /** AR world group — parents fused (cyan) markers so they ride the alignment. */
22
+ getArWorldGroup: () => THREE.Group | null;
23
+ }
4
24
  /**
5
25
  * Optional GPS-accuracy hints used by {@link GpsEventVisualizer.addGpsEvent}
6
26
  * to render the raw-GPS marker as a non-uniform-scaled ellipsoid.
@@ -32,6 +52,20 @@ declare class GpsEventVisualizer {
32
52
  * Default `true` — the markers render exactly as before until opted out.
33
53
  */
34
54
  private markersVisible;
55
+ /**
56
+ * Scene graph the markers are parented into. Defaults to the live AR
57
+ * session ({@link LIVE_SCENE_SOURCE}); replay / offline consumers override
58
+ * it via {@link setSceneSource}. Not reset by {@link clearAll} — the owner
59
+ * of the non-live scene (e.g. replay-mode's dispose) restores the default.
60
+ */
61
+ private sceneSource;
62
+ /**
63
+ * Point the visualizer at a non-live scene graph (desktop replay, offline
64
+ * e2e fixture). Pass `null` to restore the live-session default. The caller
65
+ * that overrides the source is responsible for restoring it when its scene
66
+ * is disposed, so a later live AR session parents markers correctly again.
67
+ */
68
+ setSceneSource(source: GpsMarkerSceneSource | null): void;
35
69
  /**
36
70
  * Set the GPS zero reference (origin for coordinate conversion).
37
71
  * Must be called before adding GPS events.
@@ -118,4 +152,4 @@ declare class GpsEventVisualizer {
118
152
  */
119
153
  declare const gpsEventVisualizer: GpsEventVisualizer;
120
154
  //#endregion
121
- export { GpsEventVisualizer as n, gpsEventVisualizer as r, GpsEventAccuracy as t };
155
+ export { gpsEventVisualizer as i, GpsEventVisualizer as n, GpsMarkerSceneSource as r, GpsEventAccuracy as t };
@@ -52,7 +52,7 @@ declare function gpsPathToCoverageCells(path: readonly LatLngLike[]): string[];
52
52
  * truncate the hex-string id: resolution is encoded in the high bits with
53
53
  * trailing `f` padding, so slicing yields INVALID cells, not parents (verified;
54
54
  * see the D1 gotcha in
55
- * docs/2026-06-14-map-centric-recording-browser-and-h3-index-user-feedback.md).
55
+ * docs/2026-06-14-1048-map-centric-recording-browser-and-h3-index-user-feedback.md).
56
56
  *
57
57
  * `targetRes` is clamped to `[0, H3_RESOLUTION]` because `cellToParent` throws
58
58
  * when asked for a FINER resolution than the cell, and res 11 is the finest
@@ -1,6 +1,6 @@
1
- import { o as WebXRQuaternion, s as WebXRVec3, t as ARPose } from "./ar-types-CBafnxhE.js";
2
- import { t as MotionFilterConfig } from "./capture-motion-gate-BmjiWUJv.js";
3
- import { a as QualityFilterConfig } from "./image-quality-BjBLoTec.js";
1
+ import { i as MotionFilterConfig } from "./capture-motion-gate-CPwLekNf.js";
2
+ import { o as WebXRQuaternion, s as WebXRVec3, t as ARPose } from "./ar-types-D6PYS4bc.js";
3
+ import { s as QualityFilterConfig } from "./image-quality--HLuyJ2r.js";
4
4
 
5
5
  //#region ../src/ar/image-capture.d.ts
6
6
  /**
@@ -51,7 +51,7 @@ declare const DEFAULT_CAPTURE_CONFIG: ImageCaptureConfig;
51
51
  * action by the RecorderApp's `handleImageCaptured`, which rebuilds the
52
52
  * payload field-by-field. A new field added here is therefore NOT persisted
53
53
  * until it is threaded through that handler — see
54
- * `2026-06-12-payload-rebuild-field-drop-audit.md` (F1/F2) and the forwarding
54
+ * `2026-06-12-1130-payload-rebuild-field-drop-audit.md` (F1/F2) and the forwarding
55
55
  * test in `main.occupancy-cubes-wiring.test.ts`.
56
56
  */
57
57
  interface CapturedImage {
@@ -83,7 +83,7 @@ interface CapturedImage {
83
83
  * A captured frame blob together with the pixel dimensions it was encoded at.
84
84
  * Returned by the optional `captureFrame` (blit) callback so the pose-invariant
85
85
  * image size can be persisted as first-class metadata (frame-tile aspect-ratio
86
- * fix, D1 of 2026-06-13-frame-tile-rendering-bugs-user-feedback.md). The
86
+ * fix, D1 of 2026-06-13-1311-frame-tile-rendering-bugs-user-feedback.md). The
87
87
  * dimensions are the blit render-target size — identical to the JPEG's own
88
88
  * width/height — so no decode is needed to learn the aspect ratio.
89
89
  */
@@ -148,7 +148,7 @@ interface ImageCaptureCallbacks {
148
148
  * callback MUST settle its promise; if it rejects, or does not settle within
149
149
  * `captureTimeoutMs`, the manager fails open (saves the frame) so a hung
150
150
  * analyzer cannot deadlock the pipeline. See `image-quality.ts` and
151
- * `GpsPlusSlamJs_Docs/docs/2026-06-24-image-quality-gate-plan.md`.
151
+ * `GpsPlusSlamJs_Docs/docs/2026-06-24-1057-image-quality-gate-plan.md`.
152
152
  */
153
153
  analyzeFrame?: (frame: CapturedFrame) => Promise<FrameQualityVerdict>;
154
154
  }
@@ -1,6 +1,6 @@
1
1
  import { createLogger } from "./utils/logger.js";
2
- import { t as geodesicAngleRad } from "./geodesic-angle-HXBWiXiI.js";
3
- import { n as MotionWindow, r as decideCapture, t as DEFAULT_MOTION_FILTER } from "./capture-motion-gate-D1eyGC_o.js";
2
+ import { t as geodesicAngleRad } from "./geodesic-angle-CZ_Ow90I.js";
3
+ import { DEFAULT_MOTION_FILTER, MotionWindow, decideCapture } from "./ar/capture-motion-gate.js";
4
4
  import { DEFAULT_QUALITY_FILTER } from "./ar/image-quality.js";
5
5
  import { quat } from "gl-matrix";
6
6
  //#region ../src/ar/pose-motion.ts
@@ -8,7 +8,7 @@ import { quat } from "gl-matrix";
8
8
  * Pose-motion helpers — stateless angular/linear velocity from two AR poses.
9
9
  *
10
10
  * The capture motion gate (blurry-frame skipping, see
11
- * `GpsPlusSlamJs_Docs/docs/2026-06-23-blurry-frame-motion-gating-plan.md` §4.1)
11
+ * `GpsPlusSlamJs_Docs/docs/2026-06-23-2105-blurry-frame-motion-gating-plan.md` §4.1)
12
12
  * rejects frames whose device motion is too fast to yield a sharp image. Motion
13
13
  * is derived from consecutive WebXR poses — cheaper than any image-content
14
14
  * metric because it needs no GPU readback.
@@ -21,10 +21,23 @@
21
21
  * black/empty frame; an absolute cutoff is safe because "black is black"
22
22
  * regardless of scene texture (§5).
23
23
  *
24
- * @see GpsPlusSlamJs_Docs/docs/2026-06-24-image-quality-gate-plan.md
24
+ * @see GpsPlusSlamJs_Docs/docs/2026-06-24-1057-image-quality-gate-plan.md
25
25
  * @see ./capture-motion-gate.ts — the motion gate this builds on (same shape:
26
26
  * a shared config type + a small stateful window + a pure decision).
27
27
  */
28
+ /**
29
+ * Selectable sharpness metrics for the gate's blur check. Both are pure
30
+ * grayscale scorers with identical defensive contracts; the gate's RELATIVE
31
+ * rule (`score < k · median(recent)`) is metric-agnostic, so the same
32
+ * `blurRelativeThreshold` slider drives either. Benchmarked against the
33
+ * hand-labeled recording 2026-07-11 (variance-of-Laplacian best at "clearly
34
+ * blurry vs rest", the energy ratio best at "sharp vs degraded") — see
35
+ * GpsPlusSlamJs_Docs/docs/2026-07-12-0823-blur-metric-toggle-plan.md.
36
+ */
37
+ type BlurMetricId = 'variance-of-laplacian' | 'high-frequency-energy-ratio';
38
+ /** All valid {@link BlurMetricId} values, the default (VoL) first — for
39
+ * consumer-side validation of persisted configs. */
40
+ declare const BLUR_METRIC_IDS: readonly BlurMetricId[];
28
41
  /**
29
42
  * User-/consumer-facing configuration for the image-quality gate. Shared by both
30
43
  * config shapes that carry it — `ImageCaptureConfig` (what `ImageCaptureManager`
@@ -57,6 +70,14 @@ interface QualityFilterConfig {
57
70
  * motion gate's `maxWaitMs`). A sensible value is ~2× the capture interval.
58
71
  */
59
72
  maxWaitMs: number;
73
+ /**
74
+ * Which sharpness metric the blur check scores frames with. **Optional**
75
+ * for backward compatibility with configs persisted before the toggle
76
+ * existed: `undefined` means `'variance-of-laplacian'` (the original
77
+ * behavior) — resolve via {@link blurMetricScorer}, never by reading this
78
+ * field directly.
79
+ */
80
+ blurMetric?: BlurMetricId;
60
81
  }
61
82
  /**
62
83
  * Default image-quality configuration. **Disabled by default** (plan §10): the
@@ -108,6 +129,27 @@ declare function rgbaToGrayscale(rgba: Uint8Array | Uint8ClampedArray): Uint8Cla
108
129
  * an empty buffer.
109
130
  */
110
131
  declare function meanLuminance(rgba: Uint8Array | Uint8ClampedArray): number;
132
+ /**
133
+ * Frequency-domain focus measure: the fraction of non-DC spectral energy at
134
+ * normalized radial frequency ≥ `cutoff` (default 0.3), computed by FFT over
135
+ * the centered largest power-of-two crop (needs ≥ 8×8, else returns 0).
136
+ * In [0, 1]; higher ⇒ sharper. Unlike {@link sharpnessScore} it is invariant
137
+ * to brightness shift AND contrast scale (it is a ratio). Ported from the
138
+ * investigation benchmark (2026-07-12 toggle plan) where it won the
139
+ * "sharp vs degraded" boundary (AUC 0.838 vs 0.750).
140
+ *
141
+ * Defensive contract identical to {@link sharpnessScore}: non-integer or
142
+ * < 3×3 dims, or a buffer shorter than `width·height`, return 0.
143
+ */
144
+ declare function highFrequencyEnergyRatio(gray: Uint8Array | Uint8ClampedArray | readonly number[], width: number, height: number, cutoff?: number): number;
145
+ /**
146
+ * Resolve a {@link BlurMetricId} to its scoring function. `undefined` or an
147
+ * unknown id (e.g. from a persisted config written by a newer/older app
148
+ * version) resolves to {@link sharpnessScore} — the pre-toggle behavior.
149
+ * The (untestable) recorder worker calls this so the mapping stays here,
150
+ * where tests can pin it.
151
+ */
152
+ declare function blurMetricScorer(metric: BlurMetricId | undefined): (gray: Uint8Array | Uint8ClampedArray | readonly number[], width: number, height: number) => number;
111
153
  /** Reason a frame was rejected by the quality gate, or `null` when accepted. */
112
154
  type QualityRejectReason = 'black' | 'blurry';
113
155
  /** Outcome of evaluating one frame against the quality gate. */
@@ -155,4 +197,4 @@ declare class ImageQualityGate {
155
197
  reset(): void;
156
198
  }
157
199
  //#endregion
158
- export { QualityFilterConfig as a, meanLuminance as c, ImageQualityGate as i, rgbaToGrayscale as l, DEFAULT_SHARPNESS_HISTORY_SIZE as n, QualityRejectReason as o, DEFAULT_SHARPNESS_MIN_SAMPLES as r, QualityVerdict as s, DEFAULT_QUALITY_FILTER as t, sharpnessScore as u };
200
+ export { DEFAULT_SHARPNESS_MIN_SAMPLES as a, QualityRejectReason as c, highFrequencyEnergyRatio as d, meanLuminance as f, DEFAULT_SHARPNESS_HISTORY_SIZE as i, QualityVerdict as l, sharpnessScore as m, BlurMetricId as n, ImageQualityGate as o, rgbaToGrayscale as p, DEFAULT_QUALITY_FILTER as r, QualityFilterConfig as s, BLUR_METRIC_IDS as t, blurMetricScorer as u };
@@ -1,9 +1,9 @@
1
1
  import { t as GridCell } from "./bresenham3d-D-t9i_b5.js";
2
- import { a as QrPoseSolution, i as Pose, r as Point2, t as CameraIntrinsics } from "./qr-pose-CCTF1PP0.js";
3
- import { a as QrFrontEnd, o as RgbaImage } from "./qr-frontend-61SKPSyU.js";
2
+ import { a as QrPoseSolution, i as Pose, r as Point2, t as CameraIntrinsics } from "./qr-pose-21fRDcFO.js";
3
+ import { a as QrFrontEnd, o as RgbaImage } from "./qr-frontend-QzKZSqB-.js";
4
4
  import { Quaternion, RecordGpsEventPayload, Vector3 } from "gps-plus-slam-js";
5
5
 
6
- //#region ../src/ar/qr-gps-vote.d.ts
6
+ //#region ../src/ar/qr/qr-gps-vote.d.ts
7
7
  /** Absolute geo pose of the printed QR, from the level file. */
8
8
  interface QrGeoPose {
9
9
  lat: number;
@@ -97,7 +97,7 @@ declare function offsetGeo(center: QrGeoPose, enu: Enu): {
97
97
  */
98
98
  declare function buildQrGpsVotes(input: QrGpsVoteInput): RecordGpsEventPayload[];
99
99
  //#endregion
100
- //#region ../src/ar/qr-level.d.ts
100
+ //#region ../src/ar/qr/qr-level.d.ts
101
101
  /**
102
102
  * A validated QR level file.
103
103
  *
@@ -150,7 +150,7 @@ interface FetchQrLevelOptions {
150
150
  */
151
151
  declare function fetchQrLevel(url: string, options?: FetchQrLevelOptions): Promise<QrLevel>;
152
152
  //#endregion
153
- //#region ../src/ar/qr-tracking-controller.d.ts
153
+ //#region ../src/ar/qr/qr-tracking-controller.d.ts
154
154
  type QrTrackingStatus = 'idle' | 'scanning' | 'loading-level' | 'tracking' | 'error';
155
155
  /** Inputs to the injected pose solve (so the controller doesn't import OpenCV). */
156
156
  interface QrSolvePoseInput {
@@ -163,7 +163,7 @@ interface QrSolvePoseInput {
163
163
  * Emitted on every lock, INDEPENDENTLY of the GPS vote (Note 3). The app maps
164
164
  * this onto `recordQrDetection` of the `qrDetected` slice. Kept structural (no
165
165
  * import of the state slice) so the `ar` layer never depends on `state` — that
166
- * would close a cycle (`state/qr-detected-slice` already imports `ar/qr-pose`).
166
+ * would close a cycle (`state/qr-detected-slice` already imports `ar/qr/qr-pose`).
167
167
  */
168
168
  interface QrDetectionEvent {
169
169
  /** Decoded payload (text/URL) — the marker key. */
@@ -247,69 +247,7 @@ interface QrTrackingController {
247
247
  }
248
248
  declare function createQrTrackingController(config: QrTrackingControllerConfig): QrTrackingController;
249
249
  //#endregion
250
- //#region ../src/ar/camera-frame-source.d.ts
251
- /** Tuning for the camera frame source. */
252
- interface CameraFrameSourceConfig {
253
- /**
254
- * Minimum interval between captures in milliseconds. Default 125 ms (≈ 8 Hz),
255
- * the plan §9 5–10 Hz detection target. The capture (and therefore the blit)
256
- * fires at most once per `intervalMs`.
257
- */
258
- intervalMs: number;
259
- }
260
- /** Injected I/O for the camera frame source. */
261
- interface CameraFrameSourceCallbacks {
262
- /**
263
- * Capture the current XR frame as top-left-origin RGBA, or `null` when no
264
- * frame is available (no camera texture yet, GL failure). This is the GPU
265
- * blit + readback; the source only invokes it at the throttled cadence so
266
- * the cost is bounded. A `null` return does NOT consume the interval slot —
267
- * the next frame retries immediately (a missing texture is transient).
268
- */
269
- capture: () => RgbaImage | null;
270
- /** Receive a throttled, successfully-captured frame. */
271
- onCapture: (image: RgbaImage) => void;
272
- }
273
- /**
274
- * Throttled RGBA capturer. Construct with the injected `capture`/`onCapture`
275
- * pair, `start()`, then call `onFrame(timestamp)` once per XR frame.
276
- */
277
- declare class CameraFrameSource {
278
- private readonly callbacks;
279
- private readonly config;
280
- private running;
281
- private captureCount;
282
- private lastCaptureTime;
283
- constructor(callbacks: CameraFrameSourceCallbacks, config?: Partial<CameraFrameSourceConfig>);
284
- /** Begin throttling. Resets the cadence so the first tick captures. */
285
- start(): void;
286
- /** Stop capturing. `onFrame` becomes a no-op until `start()` is called again. */
287
- stop(): void;
288
- isRunning(): boolean;
289
- /** Number of frames successfully captured + delivered since `start()`. */
290
- getFrameCount(): number;
291
- getConfig(): CameraFrameSourceConfig;
292
- /**
293
- * Apply partial config (e.g. the app's detection cadence). Invalid values
294
- * are ignored defensively — `intervalMs` requires a finite positive number.
295
- */
296
- updateConfig(config: Partial<CameraFrameSourceConfig>): void;
297
- /**
298
- * Per-XR-frame tick. Captures + delivers a frame at most once per
299
- * `intervalMs`; otherwise a cheap no-op so it is safe to call every frame.
300
- *
301
- * @param timestamp - monotonic frame time in ms (the XR `time` argument).
302
- */
303
- onFrame(timestamp: number): void;
304
- /**
305
- * Run the injected capture, guarded so a blit failure (e.g. GL context loss)
306
- * can never throw out of the XR frame loop — it degrades to "no frame this
307
- * tick", exactly like a missing texture.
308
- */
309
- private captureSafely;
310
- }
311
- //#endregion
312
- //#region ../src/ar/detection-scheduler.d.ts
250
+ //#region ../src/ar/qr/detection-scheduler.d.ts
313
251
  interface DetectionSchedulerConfig<TResult, TImage = RgbaImage> {
314
252
  /** The full detect→solve step; resolves to a result or `null` (no hit / rejected). */
315
253
  detect: (image: TImage) => Promise<TResult | null>;
@@ -344,7 +282,7 @@ type QrDetectionScheduler = DetectionScheduler<RgbaImage>;
344
282
  /** The QR path: a detection scheduler whose result is a {@link QrPoseSolution}. */
345
283
  declare function createQrDetectionScheduler(config: QrDetectionSchedulerConfig): QrDetectionScheduler;
346
284
  //#endregion
347
- //#region ../src/ar/qr-occupancy-check.d.ts
285
+ //#region ../src/ar/qr/qr-occupancy-check.d.ts
348
286
  /**
349
287
  * The slice of `OccupancyGrid` this check needs. Declared structurally so the
350
288
  * real grid satisfies it and tests can pass a tiny synthetic stand-in.
@@ -394,4 +332,4 @@ interface QrPlausibilityOptions {
394
332
  */
395
333
  declare function checkQrPlausibility(qrCenterWorld: Vector3, cameraPosWorld: Vector3, grid: OccupancySurface, options?: QrPlausibilityOptions): QrPlausibility;
396
334
  //#endregion
397
- export { buildQrGpsVotes as A, QrLevel as C, Enu as D, parseQrLevel as E, offsetGeo as M, QrGeoPose as O, FetchQrLevelOptions as S, fetchQrLevel as T, QrTrackingController as _, checkQrPlausibility as a, createQrTrackingController as b, QrDetectionScheduler as c, createQrDetectionScheduler as d, CameraFrameSource as f, QrSolvePoseInput as g, QrDetectionEvent as h, QrPlausibilityVerdict as i, localPlaneToEnu as j, QrGpsVoteInput as k, QrDetectionSchedulerConfig as l, CameraFrameSourceConfig as m, QrPlausibility as n, DetectionScheduler as o, CameraFrameSourceCallbacks as p, QrPlausibilityOptions as r, DetectionSchedulerConfig as s, OccupancySurface as t, createDetectionScheduler as u, QrTrackingControllerConfig as v, QrLevelValidationError as w, FetchLike as x, QrTrackingStatus as y };
335
+ export { parseQrLevel as C, buildQrGpsVotes as D, QrGpsVoteInput as E, localPlaneToEnu as O, fetchQrLevel as S, QrGeoPose as T, createQrTrackingController as _, checkQrPlausibility as a, QrLevel as b, QrDetectionScheduler as c, createQrDetectionScheduler as d, QrDetectionEvent as f, QrTrackingStatus as g, QrTrackingControllerConfig as h, QrPlausibilityVerdict as i, offsetGeo as k, QrDetectionSchedulerConfig as l, QrTrackingController as m, QrPlausibility as n, DetectionScheduler as o, QrSolvePoseInput as p, QrPlausibilityOptions as r, DetectionSchedulerConfig as s, OccupancySurface as t, createDetectionScheduler as u, FetchLike as v, Enu as w, QrLevelValidationError as x, FetchQrLevelOptions as y };
@@ -1,4 +1,4 @@
1
- import { N as CombinedRootState, m as TrackingQualityReport } from "./create-slam-app-store-CH31erpP.js";
1
+ import { N as CombinedRootState, m as TrackingQualityReport } from "./create-slam-app-store-DFm5K9Ob.js";
2
2
  import { Add2dImagePayload, GpsPoint as GpsPoint$1, LatLong as LatLong$1, RawDeviceOrientation, RawGpsPoint as RawGpsPoint$1, RecordGpsEventPayload as RecordGpsEventPayload$1, add2dImage, calcRelativeCoordsInMeters, recordGpsEvent as recordGpsEvent$1, setZeroPos as setZeroPos$1 } from "gps-plus-slam-js";
3
3
 
4
4
  //#region ../src/state/onboarding-guidance.d.ts
@@ -0,0 +1,64 @@
1
+ import { o as RgbaImage } from "./qr-frontend-QzKZSqB-.js";
2
+ //#region ../src/ar/camera-frame-source.d.ts
3
+ /** Tuning for the camera frame source. */
4
+ interface CameraFrameSourceConfig {
5
+ /**
6
+ * Minimum interval between captures in milliseconds. Default 125 ms (≈ 8 Hz),
7
+ * the plan §9 5–10 Hz detection target. The capture (and therefore the blit)
8
+ * fires at most once per `intervalMs`.
9
+ */
10
+ intervalMs: number;
11
+ }
12
+ /** Injected I/O for the camera frame source. */
13
+ interface CameraFrameSourceCallbacks {
14
+ /**
15
+ * Capture the current XR frame as top-left-origin RGBA, or `null` when no
16
+ * frame is available (no camera texture yet, GL failure). This is the GPU
17
+ * blit + readback; the source only invokes it at the throttled cadence so
18
+ * the cost is bounded. A `null` return does NOT consume the interval slot —
19
+ * the next frame retries immediately (a missing texture is transient).
20
+ */
21
+ capture: () => RgbaImage | null;
22
+ /** Receive a throttled, successfully-captured frame. */
23
+ onCapture: (image: RgbaImage) => void;
24
+ }
25
+ /**
26
+ * Throttled RGBA capturer. Construct with the injected `capture`/`onCapture`
27
+ * pair, `start()`, then call `onFrame(timestamp)` once per XR frame.
28
+ */
29
+ declare class CameraFrameSource {
30
+ private readonly callbacks;
31
+ private readonly config;
32
+ private running;
33
+ private captureCount;
34
+ private lastCaptureTime;
35
+ constructor(callbacks: CameraFrameSourceCallbacks, config?: Partial<CameraFrameSourceConfig>);
36
+ /** Begin throttling. Resets the cadence so the first tick captures. */
37
+ start(): void;
38
+ /** Stop capturing. `onFrame` becomes a no-op until `start()` is called again. */
39
+ stop(): void;
40
+ isRunning(): boolean;
41
+ /** Number of frames successfully captured + delivered since `start()`. */
42
+ getFrameCount(): number;
43
+ getConfig(): CameraFrameSourceConfig;
44
+ /**
45
+ * Apply partial config (e.g. the app's detection cadence). Invalid values
46
+ * are ignored defensively — `intervalMs` requires a finite positive number.
47
+ */
48
+ updateConfig(config: Partial<CameraFrameSourceConfig>): void;
49
+ /**
50
+ * Per-XR-frame tick. Captures + delivers a frame at most once per
51
+ * `intervalMs`; otherwise a cheap no-op so it is safe to call every frame.
52
+ *
53
+ * @param timestamp - monotonic frame time in ms (the XR `time` argument).
54
+ */
55
+ onFrame(timestamp: number): void;
56
+ /**
57
+ * Run the injected capture, guarded so a blit failure (e.g. GL context loss)
58
+ * can never throw out of the XR frame loop — it degrades to "no frame this
59
+ * tick", exactly like a missing texture.
60
+ */
61
+ private captureSafely;
62
+ }
63
+ //#endregion
64
+ export { CameraFrameSourceCallbacks as n, CameraFrameSourceConfig as r, CameraFrameSource as t };