gps-plus-slam-app-framework 1.9.1 → 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.
- package/README.md +14 -14
- package/dist/{absolute-orientation-BAxc15J6.d.ts → absolute-orientation-Dj1One3y.d.ts} +1 -1
- package/dist/{accuracy-circles-DkWBkF5g.d.ts → accuracy-circles-BHz7yVIL.d.ts} +1 -1
- package/dist/{alignment-lerper-gD70k7Fq.d.ts → alignment-lerper-DAHicRON.d.ts} +0 -6
- package/dist/{app-selectors-BbAiCRUT.d.ts → app-selectors-DG0ZqaeI.d.ts} +23 -13
- package/dist/ar/ar-crash-isolation.d.ts +2 -0
- package/dist/ar/ar-crash-isolation.js +40 -0
- package/dist/ar/bresenham3d.d.ts +1 -1
- package/dist/ar/camera-blit-capture.d.ts +1 -1
- package/dist/ar/capability-checker.d.ts +1 -1
- package/dist/ar/capture-failure-tracker.d.ts +1 -1
- package/dist/ar/capture-motion-gate.d.ts +2 -0
- package/dist/{capture-motion-gate-_NdTSwKi.js → ar/capture-motion-gate.js} +25 -2
- package/dist/ar/chromium-camera-access-workaround.d.ts +1 -1
- package/dist/ar/chromium-camera-access-workaround.js +1 -1
- package/dist/ar/depth-grid-lookup.d.ts +1 -1
- package/dist/ar/depth-occluder.d.ts +1 -1
- package/dist/ar/depth-occluder.js +1 -1
- package/dist/ar/depth-sampler.d.ts +2 -2
- package/dist/ar/depth-sampler.js +16 -5
- package/dist/ar/depth-unprojection.d.ts +1 -1
- package/dist/ar/enable-gps-ar.d.ts +1 -1
- package/dist/ar/enable-gps-ar.js +2 -2
- package/dist/ar/image-capture.d.ts +1 -1
- package/dist/ar/image-capture.js +1 -1
- package/dist/ar/image-quality.d.ts +2 -2
- package/dist/ar/image-quality.js +159 -8
- package/dist/ar/index.d.ts +32 -30
- package/dist/ar/index.js +15 -14
- package/dist/ar/occlusion-mesh-worker.d.ts +2 -2
- package/dist/ar/occlusion-mesh-worker.js +1 -1
- package/dist/ar/occupancy-grid.d.ts +1 -1
- package/dist/ar/occupancy-grid.js +2 -2
- package/dist/ar/occupancy-mesher.d.ts +1 -1
- package/dist/ar/occupancy-mesher.js +4 -5
- package/dist/ar/qr/index.d.ts +11 -0
- package/dist/ar/qr/index.js +11 -0
- package/dist/ar/{planar-pnp.d.ts → qr/planar-pnp.d.ts} +1 -1
- package/dist/ar/{planar-pnp.js → qr/planar-pnp.js} +1 -1
- package/dist/ar/qr/qr-debug-view.d.ts +2 -0
- package/dist/ar/{qr-debug-view.js → qr/qr-debug-view.js} +2 -2
- package/dist/ar/{qr-derived-pose.d.ts → qr/qr-derived-pose.d.ts} +1 -1
- package/dist/ar/{qr-derived-pose.js → qr/qr-derived-pose.js} +2 -2
- package/dist/ar/{qr-detection-controller.d.ts → qr/qr-detection-controller.d.ts} +1 -1
- package/dist/ar/qr/qr-detection-controller.js +2 -0
- package/dist/ar/{qr-frontend.d.ts → qr/qr-frontend.d.ts} +1 -1
- package/dist/ar/{qr-frontend.js → qr/qr-frontend.js} +1 -1
- package/dist/ar/{qr-pose.d.ts → qr/qr-pose.d.ts} +1 -1
- package/dist/ar/{qr-pose.js → qr/qr-pose.js} +1 -1
- package/dist/ar/qr/qr-size-depth-context.d.ts +3 -0
- package/dist/ar/{qr-size-depth-context.js → qr/qr-size-depth-context.js} +4 -4
- package/dist/ar/{qr-size-measurer.d.ts → qr/qr-size-measurer.d.ts} +1 -1
- package/dist/ar/qr/qr-size-measurer.js +2 -0
- package/dist/ar/replay-scene.d.ts +1 -1
- package/dist/ar/replay-scene.js +15 -13
- package/dist/ar/scene-node-names.d.ts +1 -1
- package/dist/ar/webxr-nue-basis.d.ts +1 -1
- package/dist/ar/webxr-session.d.ts +4 -4
- package/dist/ar/webxr-session.js +2 -2
- package/dist/ar/xr-error-handler.d.ts +1 -1
- package/dist/ar/xr-frame-loop.d.ts +1 -1
- package/dist/ar/xr-frame-loop.js +1 -1
- package/dist/ar-crash-isolation-DlXCGzMf.d.ts +52 -0
- package/dist/{ar-types-Cc5yvBwn.d.ts → ar-types-D6PYS4bc.d.ts} +16 -1
- package/dist/{ar-world-group-alignment-Cfg0trC3.d.ts → ar-world-group-alignment-BdS_h8Nf.d.ts} +2 -2
- package/dist/{capability-checker-BTTpygvZ.d.ts → capability-checker-BZ3_x1YL.d.ts} +1 -1
- package/dist/capture-motion-gate-CPwLekNf.d.ts +120 -0
- package/dist/{chromium-camera-access-workaround-C6yJLXz9.d.ts → chromium-camera-access-workaround-BHR4clTE.d.ts} +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/{create-slam-app-store-D1QSMuKu.d.ts → create-slam-app-store-DFm5K9Ob.d.ts} +15 -6
- package/dist/{create-slam-app-store-DXiAnJwR.js → create-slam-app-store-oK9bnqyI.js} +10 -8
- package/dist/{depth-grid-lookup-D5atpNZ3.d.ts → depth-grid-lookup-CCuzlqUo.d.ts} +1 -1
- package/dist/{depth-sampler-CwObAwEA.d.ts → depth-sampler-CS2jAFw4.d.ts} +15 -5
- package/dist/{depth-unprojection-DRdBU90S.d.ts → depth-unprojection-ET3Gwedf.d.ts} +1 -1
- package/dist/device-orientation-cache-j-kLP8he.js +20 -0
- package/dist/{enable-gps-ar-BBtRO2FJ.d.ts → enable-gps-ar-D_xEHzh5.d.ts} +9 -4
- package/dist/{file-system-utils-DueXHxo9.d.ts → file-system-utils-BHI0rXr9.d.ts} +1 -1
- package/dist/{frame-conversions-DDcNHkTb.d.ts → frame-conversions-CH7E2Iv_.d.ts} +1 -1
- package/dist/{fused-path-C5pp0PJU.d.ts → fused-path-DOKzVMiO.d.ts} +1 -1
- package/dist/geo/h3-proximity.d.ts +1 -1
- package/dist/geo/h3-proximity.js +1 -1
- package/dist/geo/index.d.ts +1 -1
- package/dist/{geodesic-angle-BTldfFgs.js → geodesic-angle-CZ_Ow90I.js} +2 -2
- package/dist/{gps-CDKDQokE.d.ts → gps-CnhYrJCa.d.ts} +8 -1
- package/dist/{gps-anchor-CEjGqEVD.d.ts → gps-anchor-BaqyRsPC.d.ts} +14 -4
- package/dist/{gps-ar-pose-sampler-DEGNk2CI.d.ts → gps-ar-pose-sampler-BuuUuK-D.d.ts} +1 -1
- package/dist/{gps-event-coordinator-BWpgBrHq.d.ts → gps-event-coordinator-Cruoe5I-.d.ts} +16 -29
- package/dist/{gps-event-markers-Di2nBzx-.d.ts → gps-event-markers-y2b2aVl6.d.ts} +35 -1
- package/dist/{h3-proximity-D0GTHQmr.d.ts → h3-proximity-BaAulrnM.d.ts} +1 -1
- package/dist/{image-capture-Bp6Pd4Md.d.ts → image-capture-BevgKpoO.d.ts} +6 -6
- package/dist/{image-capture-DVcuqMtX.js → image-capture-C4DwxC10.js} +12 -10
- package/dist/{image-quality-BMx2ko9-.d.ts → image-quality--HLuyJ2r.d.ts} +44 -2
- package/dist/{index-cCQWuYqy.d.ts → index-BWVwd9Zw.d.ts} +10 -74
- package/dist/{index-B6iBnO_K.d.ts → index-ClmnNJ6-.d.ts} +1 -1
- package/dist/index-Dxb6ATNK.d.ts +64 -0
- package/dist/index.d.ts +79 -79
- package/dist/index.js +26 -24
- package/dist/{leaflet-map-overlay-CBWPvaX9.js → leaflet-map-overlay-CTcTVmL1.js} +1 -1
- package/dist/{leaflet-map-overlay-C8GS4cUy.d.ts → leaflet-map-overlay-CksetpTt.d.ts} +1 -1
- package/dist/{map-data-CUnTzRIC.d.ts → map-data-D8cCqpOM.d.ts} +3 -3
- package/dist/{map-data-1tF5gcYV.js → map-data-DkhsYDGM.js} +1 -1
- package/dist/{map-overlay-draw-6WJeq0Kg.d.ts → map-overlay-draw-Cy-klqoA.d.ts} +1 -1
- package/dist/median-DDBrZGP0.js +44 -0
- package/dist/{null-storage-backend-B1-jlpin.d.ts → null-storage-backend-DXXuwG8T.d.ts} +2 -2
- package/dist/{occlusion-mesh-kXCQ2FM1.d.ts → occlusion-mesh-BWe2PrVi.d.ts} +23 -12
- package/dist/{occupancy-grid-BV7RhB7I.d.ts → occupancy-grid-CYBdmMOo.d.ts} +3 -3
- package/dist/{occupancy-mesher-C2ecWhNp.d.ts → occupancy-mesher-B4Bv4BTk.d.ts} +4 -9
- package/dist/{opfs-storage-backend-D6Z03fML.d.ts → opfs-storage-backend-D1ZpeNEL.d.ts} +2 -2
- package/dist/{persistence-middleware-CG-t08X4.d.ts → persistence-middleware-Cun4aF5M.d.ts} +13 -3
- package/dist/{planar-pnp-D7bc_rLX.d.ts → planar-pnp-ByxwDEyM.d.ts} +2 -2
- package/dist/{ar-BqCudtqE.js → qr-CTp5xI83.js} +24 -34
- package/dist/{qr-debug-view-BJooqbiP.d.ts → qr-debug-view-CGlITU09.d.ts} +2 -2
- package/dist/{qr-derived-pose-BwNWn8oV.d.ts → qr-derived-pose-DZPxZd9C.d.ts} +3 -3
- package/dist/{qr-detected-slice-TzVb8bij.d.ts → qr-detected-slice-mfyxD2-M.d.ts} +9 -8
- package/dist/{qr-detection-controller-Bo4XfQTP.d.ts → qr-detection-controller-C5NII-vs.d.ts} +4 -4
- package/dist/{qr-detection-controller-B-tLVd-S.js → qr-detection-controller-DXc1yHRf.js} +3 -3
- package/dist/{qr-frontend-BPURlh3S.d.ts → qr-frontend-QzKZSqB-.d.ts} +2 -2
- package/dist/{qr-pose-y3vaEd6x.d.ts → qr-pose-21fRDcFO.d.ts} +1 -1
- package/dist/{qr-pose-aggregation-DBiaLW0O.js → qr-pose-aggregation-Cp0Mtg_j.js} +7 -12
- package/dist/{qr-pose-aggregation-CypnmjA-.d.ts → qr-pose-aggregation-mABSN0AW.d.ts} +2 -2
- package/dist/{qr-size-depth-context-apAOmbrZ.d.ts → qr-size-depth-context-CMDv6T29.d.ts} +3 -3
- package/dist/{qr-size-measurer-DxiMqRUw.d.ts → qr-size-measurer-rVFf4AdM.d.ts} +5 -5
- package/dist/{qr-size-measurer-DLb33geH.js → qr-size-measurer-zZB9S1va.js} +9 -15
- package/dist/{recording-replayer-BJ8Lf0QY.d.ts → recording-replayer-qT2EM1Qs.d.ts} +2 -2
- package/dist/{recording-slice-BW8SiLo1.d.ts → recording-slice-DXw5-UvO.d.ts} +10 -5
- package/dist/{replay-engine-DmCAc7WM.d.ts → replay-engine-B1H_kLhK.d.ts} +1 -1
- package/dist/{replay-scene-zJ8SFDjE.d.ts → replay-scene-BJeO36YT.d.ts} +12 -5
- package/dist/sensors/absolute-orientation.d.ts +1 -1
- package/dist/sensors/absolute-orientation.js +1 -1
- package/dist/sensors/gps-error-handler.d.ts +1 -1
- package/dist/sensors/gps.d.ts +1 -1
- package/dist/sensors/gps.js +10 -8
- package/dist/sensors/index.d.ts +3 -3
- package/dist/sensors/index.js +1 -1
- package/dist/sensors/permission-checker.js +71 -40
- package/dist/{session-disposers-BPrMplIC.js → session-disposers-B7hUN90w.js} +1 -1
- package/dist/state/app-selectors.d.ts +1 -1
- package/dist/state/combined-root-state.d.ts +1 -1
- package/dist/state/create-slam-app-store.d.ts +1 -1
- package/dist/state/create-slam-app-store.js +1 -1
- package/dist/state/gps-ar-pose-sampler.d.ts +2 -3
- package/dist/state/gps-ar-pose-sampler.js +1 -1
- package/dist/state/gps-event-coordinator.d.ts +2 -1
- package/dist/state/gps-event-coordinator.js +4 -46
- package/dist/state/index.d.ts +19 -20
- package/dist/state/index.js +6 -5
- package/dist/state/persistence-middleware.d.ts +2 -2
- package/dist/state/persistence-middleware.js +24 -15
- package/dist/state/qr-detected-slice.d.ts +3 -3
- package/dist/state/qr-detected-slice.js +11 -15
- package/dist/state/recording-replayer.d.ts +2 -2
- package/dist/state/recording-replayer.js +1 -1
- package/dist/state/recording-slice.d.ts +1 -1
- package/dist/state/replay-engine.d.ts +1 -1
- package/dist/state/store-subscribers.d.ts +2 -2
- package/dist/state/store-subscribers.js +23 -6
- package/dist/state/subscribe-to-selector.d.ts +1 -1
- package/dist/state/tracking-quality.d.ts +1 -1
- package/dist/state/tracking-quality.js +14 -11
- package/dist/state/tracking-slice.d.ts +1 -1
- package/dist/{state-BeKvn4B-.js → state-CDF5LvsO.js} +2 -4
- package/dist/storage/file-system-utils.d.ts +1 -1
- package/dist/storage/file-system-utils.js +1 -1
- package/dist/storage/index.d.ts +8 -8
- package/dist/storage/null-storage-backend.d.ts +1 -1
- package/dist/storage/opfs-storage-backend.d.ts +1 -1
- package/dist/storage/opfs-storage.d.ts +1 -1
- package/dist/storage/storage-backend.d.ts +1 -1
- package/dist/storage/zip-coverage-embed.d.ts +1 -1
- package/dist/storage/zip-coverage-embed.js +1 -1
- package/dist/storage/zip-export.d.ts +1 -1
- package/dist/storage/zip-export.js +10 -4
- package/dist/storage/zip-reader.d.ts +1 -1
- package/dist/{storage-backend-sEtmM4yW.d.ts → storage-backend-BX7egQKi.d.ts} +1 -1
- package/dist/{store-subscribers-DJUErW-o.d.ts → store-subscribers-CWHToX6N.d.ts} +2 -2
- package/dist/{subscribe-to-selector-dQV8SpsO.d.ts → subscribe-to-selector-j-eOYybQ.d.ts} +1 -1
- package/dist/test-utils/browser-mocks.d.ts +1 -1
- package/dist/test-utils/zip-round-trip-helpers.d.ts +1 -1
- package/dist/{tracking-slice-DMkHlbny.d.ts → tracking-slice-BAbcZK-Y.d.ts} +3 -2
- package/dist/types/ar-types.d.ts +2 -2
- package/dist/types/ar-types.js +31 -1
- package/dist/types/geo-types.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js +2 -1
- package/dist/utils/concurrency.d.ts +1 -1
- package/dist/utils/failure-tracker.d.ts +1 -1
- package/dist/utils/format-file-size.d.ts +1 -1
- package/dist/utils/fused-path.d.ts +1 -1
- package/dist/utils/fused-path.js +1 -1
- package/dist/utils/index.d.ts +7 -7
- package/dist/utils/index.js +1 -1
- package/dist/utils/list-formatter.d.ts +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.js +30 -20
- package/dist/visualization/accuracy-circles.d.ts +1 -1
- package/dist/visualization/accuracy-circles.js +1 -1
- package/dist/visualization/alignment-lerper.d.ts +1 -1
- package/dist/visualization/alignment-lerper.js +20 -5
- package/dist/visualization/ar-world-group-alignment.d.ts +1 -1
- package/dist/visualization/ar-world-group-alignment.js +2 -2
- package/dist/visualization/camera-follower.d.ts +1 -1
- package/dist/visualization/css3d-renderer-manager.d.ts +1 -1
- package/dist/visualization/frame-conversions.d.ts +1 -1
- package/dist/visualization/frustum-visibility.d.ts +1 -1
- package/dist/visualization/gps-anchor.d.ts +1 -1
- package/dist/visualization/gps-anchor.js +44 -19
- package/dist/visualization/gps-compass-cubes.d.ts +1 -1
- package/dist/visualization/gps-event-markers.d.ts +2 -2
- package/dist/visualization/gps-event-markers.js +27 -6
- package/dist/visualization/hit-test-reticle.d.ts +1 -1
- package/dist/visualization/index.d.ts +19 -20
- package/dist/visualization/index.js +4 -5
- package/dist/visualization/leaflet-map-overlay.d.ts +1 -1
- package/dist/visualization/leaflet-map-overlay.js +1 -1
- package/dist/visualization/lerp-utils.d.ts +1 -1
- package/dist/visualization/map-data.d.ts +1 -1
- package/dist/visualization/map-data.js +1 -1
- package/dist/visualization/map-overlay-draw.d.ts +1 -1
- package/dist/visualization/occluder-mesh-driver.d.ts +2 -2
- package/dist/visualization/occluder-mesh-driver.js +1 -1
- package/dist/visualization/occlusion-mesh.d.ts +2 -2
- package/dist/visualization/occlusion-mesh.js +29 -14
- package/dist/visualization/three-dispose.d.ts +1 -1
- package/dist/visualization/vis-colors.d.ts +1 -1
- package/dist/{webxr-session-BWCpGd-2.d.ts → webxr-session-DefwObIu.d.ts} +143 -193
- package/dist/{webxr-session-BCP2XK7k.js → webxr-session-OyR3YbTq.js} +154 -284
- package/dist/{xr-frame-loop-DX3JPpAU.d.ts → xr-frame-loop-BiZvgqP7.d.ts} +1 -1
- package/dist/{zip-coverage-embed-ncVbaZAz.d.ts → zip-coverage-embed-CyoX7XL7.d.ts} +1 -1
- package/package.json +5 -3
- package/dist/ar/qr-debug-view.d.ts +0 -2
- package/dist/ar/qr-detection-controller.js +0 -2
- package/dist/ar/qr-size-depth-context.d.ts +0 -3
- package/dist/ar/qr-size-measurer.js +0 -2
- package/dist/capture-motion-gate-BGoAMkmf.d.ts +0 -24
- package/dist/map-overlay-BCQgvIgU.d.ts +0 -153
- package/dist/recording-options-DYKWVI93.d.ts +0 -693
- package/dist/state/recording-options.d.ts +0 -2
- package/dist/state/recording-options.js +0 -591
- package/dist/visualization/map-overlay.d.ts +0 -2
- package/dist/visualization/map-overlay.js +0 -241
- /package/dist/{bresenham3d-DGc4nIb-.d.ts → bresenham3d-D-t9i_b5.d.ts} +0 -0
- /package/dist/{camera-blit-capture-BimSdyih.d.ts → camera-blit-capture-BlC-arRb.d.ts} +0 -0
- /package/dist/{camera-follower-DfBm2J5i.d.ts → camera-follower-CO_ibF2o.d.ts} +0 -0
- /package/dist/{capture-failure-tracker-_BVfhpxv.d.ts → capture-failure-tracker-BAUKjtXU.d.ts} +0 -0
- /package/dist/{cell-key-DIB4rOTV.js → cell-key-Bj-eYTLA.js} +0 -0
- /package/dist/{concurrency-DPeGBH0X.d.ts → concurrency-DW0jQo3G.d.ts} +0 -0
- /package/dist/{css3d-renderer-manager-CPpVtvgs.d.ts → css3d-renderer-manager-CJjHtCMT.d.ts} +0 -0
- /package/dist/{failure-tracker-CeKf5HIc.d.ts → failure-tracker-B7fzPfZo.d.ts} +0 -0
- /package/dist/{format-file-size-DxN-EBLc.d.ts → format-file-size-Da8rZgfs.d.ts} +0 -0
- /package/dist/{frustum-visibility-CokkgS_i.d.ts → frustum-visibility-COPfzruF.d.ts} +0 -0
- /package/dist/{geo-types-DrGVu8nS.d.ts → geo-types-BfDK8kJu.d.ts} +0 -0
- /package/dist/{gps-compass-cubes-1mooS3BS.d.ts → gps-compass-cubes-CT3TWctJ.d.ts} +0 -0
- /package/dist/{gps-error-handler-C34GQuTu.d.ts → gps-error-handler-DjVuLXve.d.ts} +0 -0
- /package/dist/{hit-test-reticle-CaQbrhbk.d.ts → hit-test-reticle-DhnCMOsc.d.ts} +0 -0
- /package/dist/{index-DXPVzOpP.d.ts → index-CjxbDm8W.d.ts} +0 -0
- /package/dist/{index-D74JTX4I.d.ts → index-Nr3qg4IH.d.ts} +0 -0
- /package/dist/{lerp-utils-Qs8OhumS.d.ts → lerp-utils-bwMwVCpU.d.ts} +0 -0
- /package/dist/{list-formatter-DLFDnS70.d.ts → list-formatter-1ttG18MQ.d.ts} +0 -0
- /package/dist/{logger-CqTd5Kpk.d.ts → logger-B4StJUDb.d.ts} +0 -0
- /package/dist/{opfs-storage-CTkxvxN4.d.ts → opfs-storage-S_odkCk1.d.ts} +0 -0
- /package/dist/{scene-node-names-CGb-ylBd.d.ts → scene-node-names-DWzhE7Ro.d.ts} +0 -0
- /package/dist/{three-dispose-BMOAmPhb.d.ts → three-dispose-C3mnKQR5.d.ts} +0 -0
- /package/dist/{vis-colors-C7HI0u9_.d.ts → vis-colors-CoSpbZEO.d.ts} +0 -0
- /package/dist/{webxr-nue-basis-CaCnYxuq.d.ts → webxr-nue-basis-C3vTqkE2.d.ts} +0 -0
- /package/dist/{xr-error-handler-uVGDu9IX.d.ts → xr-error-handler-D9y5r8ok.d.ts} +0 -0
- /package/dist/{zip-export-CtiUnAlJ.d.ts → zip-export-CuBimX1J.d.ts} +0 -0
- /package/dist/{zip-reader-BzENzMH6.d.ts → zip-reader-BHc_b_iA.d.ts} +0 -0
package/dist/sensors/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as startOrientationWatch, i as startGpsWatch, n as RawDeviceOrientation, o as stopGpsWatch, r as requestOrientationPermission, s as stopOrientationWatch, t as GpsPosition } from "../gps-
|
|
1
|
+
import { a as startOrientationWatch, i as startGpsWatch, n as RawDeviceOrientation, o as stopGpsWatch, r as requestOrientationPermission, s as stopOrientationWatch, t as GpsPosition } from "../gps-CnhYrJCa.js";
|
|
2
2
|
import { a as checkCameraPermission, c as checkOrientationPermission, d as requestCameraPermission, f as requestGeolocationPermission, g as setFileSystemState, h as resetFileSystemState, i as checkAllPermissions, l as checkWebXRSupport, m as requestWebXRWithDepthPermission, n as PermissionStatus, o as checkFileSystemPermission, p as requestOrientationPermission$1, s as checkGeolocationPermission, t as PermissionCheckResult, u as requestAllPermissions } from "../permission-checker-B-VtjnBA.js";
|
|
3
|
-
import { a as startAbsoluteOrientationWatch, i as isAbsoluteOrientationAvailable, n as AbsoluteOrientationStatus, o as stopAbsoluteOrientationWatch, r as getLatestAbsoluteOrientation, t as AbsoluteOrientationReading } from "../absolute-orientation-
|
|
4
|
-
import { a as getGpsErrorMessage, i as createGpsErrorHandler, n as GPS_ERROR_MESSAGES, r as GPS_ERROR_MESSAGE_UNKNOWN, t as GPS_ERROR_CODES } from "../gps-error-handler-
|
|
3
|
+
import { a as startAbsoluteOrientationWatch, i as isAbsoluteOrientationAvailable, n as AbsoluteOrientationStatus, o as stopAbsoluteOrientationWatch, r as getLatestAbsoluteOrientation, t as AbsoluteOrientationReading } from "../absolute-orientation-Dj1One3y.js";
|
|
4
|
+
import { a as getGpsErrorMessage, i as createGpsErrorHandler, n as GPS_ERROR_MESSAGES, r as GPS_ERROR_MESSAGE_UNKNOWN, t as GPS_ERROR_CODES } from "../gps-error-handler-DjVuLXve.js";
|
|
5
5
|
export { type AbsoluteOrientationReading, type AbsoluteOrientationStatus, GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, type GpsPosition, type PermissionCheckResult, type PermissionStatus, type RawDeviceOrientation, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, createGpsErrorHandler, getGpsErrorMessage, getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, requestAllPermissions, requestCameraPermission, requestOrientationPermission as requestDeviceOrientationPermission, requestGeolocationPermission, requestOrientationPermission$1 as requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, startAbsoluteOrientationWatch, startGpsWatch, startOrientationWatch, stopAbsoluteOrientationWatch, stopGpsWatch, stopOrientationWatch };
|
package/dist/sensors/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, startAbsoluteOrientationWatch, stopAbsoluteOrientationWatch } from "./absolute-orientation.js";
|
|
2
1
|
import { checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, requestAllPermissions, requestCameraPermission, requestGeolocationPermission, requestOrientationPermission as requestOrientationPermission$1, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState } from "./permission-checker.js";
|
|
3
2
|
import { requestOrientationPermission, startGpsWatch, startOrientationWatch, stopGpsWatch, stopOrientationWatch } from "./gps.js";
|
|
3
|
+
import { getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, startAbsoluteOrientationWatch, stopAbsoluteOrientationWatch } from "./absolute-orientation.js";
|
|
4
4
|
import { GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, createGpsErrorHandler, getGpsErrorMessage } from "./gps-error-handler.js";
|
|
5
5
|
export { GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, createGpsErrorHandler, getGpsErrorMessage, getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, requestAllPermissions, requestCameraPermission, requestOrientationPermission as requestDeviceOrientationPermission, requestGeolocationPermission, requestOrientationPermission$1 as requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, startAbsoluteOrientationWatch, startGpsWatch, startOrientationWatch, stopAbsoluteOrientationWatch, stopGpsWatch, stopOrientationWatch };
|
|
@@ -100,17 +100,19 @@ async function checkWebXRSupport() {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
103
|
+
* Shared Permissions-API status checker (quality-review C-2): probe-free
|
|
104
|
+
* query with the standard supported/granted/denied/prompt mapping. The two
|
|
105
|
+
* former copies (geolocation/camera) differed only in the API guard and the
|
|
106
|
+
* user-facing strings.
|
|
105
107
|
*/
|
|
106
|
-
async function
|
|
107
|
-
if (!
|
|
108
|
+
async function checkPermissionViaQuery(options) {
|
|
109
|
+
if (!options.apiAvailable) return {
|
|
108
110
|
supported: false,
|
|
109
111
|
granted: null,
|
|
110
|
-
error:
|
|
112
|
+
error: options.unsupportedError
|
|
111
113
|
};
|
|
112
114
|
if (navigator.permissions) try {
|
|
113
|
-
const result = await navigator.permissions.query({ name:
|
|
115
|
+
const result = await navigator.permissions.query({ name: options.name });
|
|
114
116
|
if (result.state === "granted") return {
|
|
115
117
|
supported: true,
|
|
116
118
|
granted: true
|
|
@@ -118,7 +120,7 @@ async function checkGeolocationPermission() {
|
|
|
118
120
|
else if (result.state === "denied") return {
|
|
119
121
|
supported: true,
|
|
120
122
|
granted: false,
|
|
121
|
-
error:
|
|
123
|
+
error: options.deniedError
|
|
122
124
|
};
|
|
123
125
|
return {
|
|
124
126
|
supported: true,
|
|
@@ -131,6 +133,18 @@ async function checkGeolocationPermission() {
|
|
|
131
133
|
};
|
|
132
134
|
}
|
|
133
135
|
/**
|
|
136
|
+
* Check geolocation permission status without triggering a prompt.
|
|
137
|
+
* Uses the Permissions API if available, otherwise returns unknown state.
|
|
138
|
+
*/
|
|
139
|
+
async function checkGeolocationPermission() {
|
|
140
|
+
return checkPermissionViaQuery({
|
|
141
|
+
name: "geolocation",
|
|
142
|
+
apiAvailable: !!navigator.geolocation,
|
|
143
|
+
unsupportedError: "Geolocation API not available in this browser.",
|
|
144
|
+
deniedError: "Location access denied. Please enable in browser settings."
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
134
148
|
* Request geolocation permission by triggering a position request.
|
|
135
149
|
* This will show the browser's permission prompt if not already granted.
|
|
136
150
|
*
|
|
@@ -179,31 +193,12 @@ async function requestGeolocationPermission(timeoutMs = 1e4) {
|
|
|
179
193
|
* Uses the Permissions API if available.
|
|
180
194
|
*/
|
|
181
195
|
async function checkCameraPermission() {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const result = await navigator.permissions.query({ name: "camera" });
|
|
189
|
-
if (result.state === "granted") return {
|
|
190
|
-
supported: true,
|
|
191
|
-
granted: true
|
|
192
|
-
};
|
|
193
|
-
else if (result.state === "denied") return {
|
|
194
|
-
supported: true,
|
|
195
|
-
granted: false,
|
|
196
|
-
error: "Camera access denied. Please enable in browser settings."
|
|
197
|
-
};
|
|
198
|
-
return {
|
|
199
|
-
supported: true,
|
|
200
|
-
granted: null
|
|
201
|
-
};
|
|
202
|
-
} catch {}
|
|
203
|
-
return {
|
|
204
|
-
supported: true,
|
|
205
|
-
granted: null
|
|
206
|
-
};
|
|
196
|
+
return checkPermissionViaQuery({
|
|
197
|
+
name: "camera",
|
|
198
|
+
apiAvailable: !!navigator.mediaDevices?.getUserMedia,
|
|
199
|
+
unsupportedError: "Camera API not available. Use HTTPS and a modern browser.",
|
|
200
|
+
deniedError: "Camera access denied. Please enable in browser settings."
|
|
201
|
+
});
|
|
207
202
|
}
|
|
208
203
|
/**
|
|
209
204
|
* Request camera permission by triggering getUserMedia.
|
|
@@ -246,16 +241,33 @@ async function requestCameraPermission() {
|
|
|
246
241
|
}
|
|
247
242
|
}
|
|
248
243
|
/**
|
|
244
|
+
* DeviceOrientationEvent availability + iOS 13+ permission-API probe
|
|
245
|
+
* (quality-review C-2 — this preamble used to be duplicated between the
|
|
246
|
+
* check and request paths). `available: false` ⇒ no orientation support at
|
|
247
|
+
* all; `requestPermission: null` ⇒ orientation works without a permission.
|
|
248
|
+
* The returned function is bound to `DeviceOrientationEvent` (it is a static
|
|
249
|
+
* method — an unbound call would lose `this`).
|
|
250
|
+
*/
|
|
251
|
+
function getIosOrientationPermissionApi() {
|
|
252
|
+
if (typeof DeviceOrientationEvent === "undefined") return { available: false };
|
|
253
|
+
const withPermission = DeviceOrientationEvent;
|
|
254
|
+
return {
|
|
255
|
+
available: true,
|
|
256
|
+
requestPermission: typeof withPermission.requestPermission === "function" ? withPermission.requestPermission.bind(DeviceOrientationEvent) : null
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
249
260
|
* Check device orientation permission status.
|
|
250
261
|
* On iOS 13+, this requires explicit permission request.
|
|
251
262
|
*/
|
|
252
263
|
function checkOrientationPermission() {
|
|
253
|
-
|
|
264
|
+
const api = getIosOrientationPermissionApi();
|
|
265
|
+
if (!api.available) return Promise.resolve({
|
|
254
266
|
supported: false,
|
|
255
267
|
granted: null,
|
|
256
268
|
error: "Device orientation not supported."
|
|
257
269
|
});
|
|
258
|
-
if (
|
|
270
|
+
if (api.requestPermission) return Promise.resolve({
|
|
259
271
|
supported: true,
|
|
260
272
|
granted: null
|
|
261
273
|
});
|
|
@@ -269,14 +281,14 @@ function checkOrientationPermission() {
|
|
|
269
281
|
* On other platforms, this is a no-op that returns granted.
|
|
270
282
|
*/
|
|
271
283
|
async function requestOrientationPermission() {
|
|
272
|
-
|
|
284
|
+
const api = getIosOrientationPermissionApi();
|
|
285
|
+
if (!api.available) return {
|
|
273
286
|
supported: false,
|
|
274
287
|
granted: null,
|
|
275
288
|
error: "Device orientation not supported."
|
|
276
289
|
};
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
if (await DeviceOrientationEventWithPermission.requestPermission() === "granted") {
|
|
290
|
+
if (api.requestPermission) try {
|
|
291
|
+
if (await api.requestPermission() === "granted") {
|
|
280
292
|
log.info("Orientation permission granted");
|
|
281
293
|
return {
|
|
282
294
|
supported: true,
|
|
@@ -317,10 +329,29 @@ async function checkAllPermissions() {
|
|
|
317
329
|
camera,
|
|
318
330
|
orientation,
|
|
319
331
|
fileSystem,
|
|
320
|
-
allMandatoryReady:
|
|
332
|
+
allMandatoryReady: computeAllMandatoryReady({
|
|
333
|
+
webxr,
|
|
334
|
+
geolocation,
|
|
335
|
+
camera,
|
|
336
|
+
fileSystem
|
|
337
|
+
})
|
|
321
338
|
};
|
|
322
339
|
}
|
|
323
340
|
/**
|
|
341
|
+
* The mandatory-set gate, written once (quality-review C-2 — the 8-clause
|
|
342
|
+
* boolean used to be spelled out twice and could drift): WebXR, Geolocation,
|
|
343
|
+
* Camera and FileSystem must all be supported AND granted. Orientation is
|
|
344
|
+
* deliberately not part of the mandatory set.
|
|
345
|
+
*/
|
|
346
|
+
function computeAllMandatoryReady(result) {
|
|
347
|
+
return [
|
|
348
|
+
result.webxr,
|
|
349
|
+
result.geolocation,
|
|
350
|
+
result.camera,
|
|
351
|
+
result.fileSystem
|
|
352
|
+
].every((p) => p.supported && p.granted === true);
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
324
355
|
* Subscribe to out-of-band permission changes.
|
|
325
356
|
*
|
|
326
357
|
* Today the recorder app only re-runs `checkAllPermissions()` at startup
|
|
@@ -414,7 +445,7 @@ async function requestAllPermissions() {
|
|
|
414
445
|
if (result.orientation.supported && result.orientation.granted !== true) result.orientation = await requestOrientationPermission();
|
|
415
446
|
if (result.geolocation.supported && result.geolocation.granted !== true) result.geolocation = await requestGeolocationPermission();
|
|
416
447
|
result.fileSystem = checkFileSystemPermission();
|
|
417
|
-
result.allMandatoryReady = result
|
|
448
|
+
result.allMandatoryReady = computeAllMandatoryReady(result);
|
|
418
449
|
return result;
|
|
419
450
|
}
|
|
420
451
|
/**
|
|
@@ -19,7 +19,7 @@ import { createLogger } from "./utils/logger.js";
|
|
|
19
19
|
* `arWorldGroup`). Because `initAR()` throws if a prior session is still live,
|
|
20
20
|
* every restart must pass through `resetWebXRState()`, making it the single
|
|
21
21
|
* chokepoint where flushing these disposers is guaranteed. See
|
|
22
|
-
* gps-plus-slam/GpsPlusSlamJs_Docs/docs/2026-06-08-arworldgroup-alignment-session-scoped-disposal.md.
|
|
22
|
+
* gps-plus-slam/GpsPlusSlamJs_Docs/docs/2026-06-08-2149-arworldgroup-alignment-session-scoped-disposal.md.
|
|
23
23
|
*/
|
|
24
24
|
const log = createLogger("SessionDisposers");
|
|
25
25
|
const disposers = /* @__PURE__ */ new Set();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as selectOdometryRotations, i as selectOdometryPositions, n as selectFrameTilesInWebXR, o as selectZeroReference, r as selectGpsPositions, t as selectAlignmentMatrix } from "../app-selectors-
|
|
1
|
+
import { a as selectOdometryRotations, i as selectOdometryPositions, n as selectFrameTilesInWebXR, o as selectZeroReference, r as selectGpsPositions, t as selectAlignmentMatrix } from "../app-selectors-DG0ZqaeI.js";
|
|
2
2
|
export { selectAlignmentMatrix, selectFrameTilesInWebXR, selectGpsPositions, selectOdometryPositions, selectOdometryRotations, selectZeroReference };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { N as CombinedRootState } from "../create-slam-app-store-
|
|
1
|
+
import { N as CombinedRootState } from "../create-slam-app-store-DFm5K9Ob.js";
|
|
2
2
|
export { CombinedRootState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SlamAppStoreOptions, i as SlamAppStore, n as SlamAppMiddleware, o as createSlamAppStore, r as SlamAppRootState, t as SlamAppCombinedState } from "../create-slam-app-store-
|
|
1
|
+
import { a as SlamAppStoreOptions, i as SlamAppStore, n as SlamAppMiddleware, o as createSlamAppStore, r as SlamAppRootState, t as SlamAppCombinedState } from "../create-slam-app-store-DFm5K9Ob.js";
|
|
2
2
|
export { SlamAppCombinedState, SlamAppMiddleware, SlamAppRootState, SlamAppStore, SlamAppStoreOptions, createSlamAppStore };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createSlamAppStore } from "../create-slam-app-store-
|
|
1
|
+
import { t as createSlamAppStore } from "../create-slam-app-store-oK9bnqyI.js";
|
|
2
2
|
export { createSlamAppStore };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as ARPose } from "../ar-types-
|
|
2
|
-
import {
|
|
3
|
-
import { i as captureGpsAnchorSample, n as GpsAnchorSample, r as GpsAnchorSampleGpsPoint, t as CaptureGpsAnchorSampleOptions } from "../gps-ar-pose-sampler-DEGNk2CI.js";
|
|
1
|
+
import { c as extractOdomPosition, l as extractOdomRotation, t as ARPose } from "../ar-types-D6PYS4bc.js";
|
|
2
|
+
import { i as captureGpsAnchorSample, n as GpsAnchorSample, r as GpsAnchorSampleGpsPoint, t as CaptureGpsAnchorSampleOptions } from "../gps-ar-pose-sampler-BuuUuK-D.js";
|
|
4
3
|
export { ARPose, CaptureGpsAnchorSampleOptions, GpsAnchorSample, GpsAnchorSampleGpsPoint, captureGpsAnchorSample, extractOdomPosition, extractOdomRotation };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extractOdomPosition, extractOdomRotation } from "
|
|
1
|
+
import { extractOdomPosition, extractOdomRotation } from "../types/ar-types.js";
|
|
2
2
|
//#region ../src/state/gps-ar-pose-sampler.ts
|
|
3
3
|
/**
|
|
4
4
|
* Capture a GPS-AR pose snapshot. Extracts `odomPosition`/`odomRotation`
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as extractOdomPosition, l as extractOdomRotation } from "../ar-types-D6PYS4bc.js";
|
|
2
|
+
import { a as eulerToQuaternion, c as getLastDeviceOrientation, i as createGpsPositionHandler, l as updateDeviceOrientation, n as buildRawGpsPoint, o as resetCoordinatorState, r as buildRecordGpsEventPayload, s as toRawAbsoluteOrientation, t as RecordingCoordinatorConfig } from "../gps-event-coordinator-Cruoe5I-.js";
|
|
2
3
|
export { RecordingCoordinatorConfig, buildRawGpsPoint, buildRecordGpsEventPayload, createGpsPositionHandler, eulerToQuaternion, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, resetCoordinatorState, toRawAbsoluteOrientation, updateDeviceOrientation };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger.js";
|
|
2
|
+
import { extractOdomPosition, extractOdomRotation } from "../types/ar-types.js";
|
|
3
|
+
import { n as resetDeviceOrientationCache, r as updateDeviceOrientation, t as getLastDeviceOrientation } from "../device-orientation-cache-j-kLP8he.js";
|
|
2
4
|
import { getLatestAbsoluteOrientation } from "../sensors/absolute-orientation.js";
|
|
3
5
|
import { eulerToQuaternion, getOdometryPositions, getZeroReference, recordGpsEvent, setZeroPos } from "gps-plus-slam-js";
|
|
4
6
|
//#region ../src/state/gps-event-coordinator.ts
|
|
@@ -6,57 +8,13 @@ const log = createLogger("RecordingCoordinator");
|
|
|
6
8
|
/** Counter for generating unique GPS point IDs */
|
|
7
9
|
let gpsEventCounter = 0;
|
|
8
10
|
/**
|
|
9
|
-
* State for device orientation (captured separately from GPS)
|
|
10
|
-
*/
|
|
11
|
-
let lastDeviceOrientation = null;
|
|
12
|
-
/**
|
|
13
|
-
* Update the cached device orientation.
|
|
14
|
-
* Called by orientation watch, used when GPS event arrives.
|
|
15
|
-
*/
|
|
16
|
-
function updateDeviceOrientation(orientation) {
|
|
17
|
-
lastDeviceOrientation = orientation;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get the current cached device orientation.
|
|
21
|
-
*/
|
|
22
|
-
function getLastDeviceOrientation() {
|
|
23
|
-
return lastDeviceOrientation;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
11
|
* Clear cached state (for testing or session reset)
|
|
27
12
|
*/
|
|
28
13
|
function resetCoordinatorState() {
|
|
29
|
-
|
|
14
|
+
resetDeviceOrientationCache();
|
|
30
15
|
gpsEventCounter = 0;
|
|
31
16
|
}
|
|
32
17
|
/**
|
|
33
|
-
* Extract raw odometry position tuple from ARPose.
|
|
34
|
-
*
|
|
35
|
-
* Returns the raw WebXR position without coordinate conversion.
|
|
36
|
-
* The reducer applies the WebXR→NUE transform when storing into state
|
|
37
|
-
* (raw-storage pattern, see docs/2026-04-09-raw-storage-convert-on-read.md).
|
|
38
|
-
*
|
|
39
|
-
* WebXR local-floor frame: X=East, Y=Up, Z=South (toward viewer / backward).
|
|
40
|
-
*/
|
|
41
|
-
function extractOdomPosition(arPose) {
|
|
42
|
-
return [
|
|
43
|
-
arPose.position.x,
|
|
44
|
-
arPose.position.y,
|
|
45
|
-
arPose.position.z
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Extract odometry rotation tuple from ARPose.
|
|
50
|
-
*/
|
|
51
|
-
function extractOdomRotation(arPose) {
|
|
52
|
-
return [
|
|
53
|
-
arPose.orientation.x,
|
|
54
|
-
arPose.orientation.y,
|
|
55
|
-
arPose.orientation.z,
|
|
56
|
-
arPose.orientation.w
|
|
57
|
-
];
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
18
|
* Build a RawGpsPoint from GPS position data.
|
|
61
19
|
* Returns only raw sensor fields — no derived fields (coordinates, weight,
|
|
62
20
|
* zeroRef). Derived fields are computed by the library reducer when the
|
|
@@ -149,7 +107,7 @@ function createGpsPositionHandler(config) {
|
|
|
149
107
|
log.error("Failed to get zero reference");
|
|
150
108
|
return;
|
|
151
109
|
}
|
|
152
|
-
const payload = buildRecordGpsEventPayload(position, arPose,
|
|
110
|
+
const payload = buildRecordGpsEventPayload(position, arPose, getLastDeviceOrientation(), getLatestAbsoluteOrientation());
|
|
153
111
|
store.dispatch(recordGpsEvent(payload));
|
|
154
112
|
const eventCount = getOdometryPositions(store.getState()).length;
|
|
155
113
|
log.info(`Recorded GPS event #${eventCount}`);
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { i as DepthSample, r as DepthPoint } from "../ar-types-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { n as
|
|
14
|
-
import { n as
|
|
15
|
-
import {
|
|
16
|
-
import { n as
|
|
17
|
-
import { n as
|
|
18
|
-
import { a as
|
|
19
|
-
|
|
20
|
-
export { Add2dImagePayload, AlignmentSnapshot, CaptureGpsAnchorSampleOptions, CompleteCallback, DEFAULT_MAX_DELAY_MS, DEFAULT_QR_MAX_HISTORY, DEFAULT_RECORDING_OPTIONS, DEFAULT_TRACKING_QUALITY_OPTIONS, DEPTH_CONSTRAINTS, DepthCaptureOptions, DepthPoint, DepthSample, DeviceOrientation, ErrorCallback, GpsAnchorSample, GpsAnchorSampleGpsPoint, GpsPoint, IMAGE_CONSTRAINTS, ImageCaptureOptions, LatLong, OnboardingGuidance, OnboardingPhase, SessionMetadata as OpfsSessionMetadata, PersistenceMiddlewareOptions, PoseReceivedPayload, ProgressCallback, QrDetectedState, QrDetectionEntry, QrMarkerState, QrPoseStability, QrPoseStabilityOptions, QrPoseStabilityStatus, QrSizeEstimate, QrSizeStatus, RawDeviceOrientation, RawGpsPoint, RecordGpsEventPayload, RecordingCoordinatorConfig, RecordingOptionsInput, RecordingState, ReplayAction, ReplayEngine, ReplayRecordingOptions, ReplayState, ResetTransformData, RootWithQrDetected, STORAGE_KEY, SessionMetadata$1 as SessionMetadata, SlamAppCombinedState, SlamAppMiddleware, SlamAppRootState, SlamAppStore, SlamAppStoreOptions, StorageBackend, StoreSubscriberDeps, SubscribableStore, TrackingPhase, TrackingQualityOptions, TrackingQualityReport, TrackingQualitySliceState, TrackingQualityState, TrackingSliceState, add2dImage, buildRawGpsPoint, buildRecordGpsEventPayload, calcRelativeCoordsInMeters, captureGpsAnchorSample, clearAllQrMarkers, clearLastRestartedPayload, clearQrMarker, cloneRecordingOptions, computeConvergence, computeCoverage, computeGpsAccuracy, computeGpsVsFusedDivergence, computeInterActionDelay, computeOnboardingGuidance, computeResidualConsensus, computeTrackingQualityReport, createGpsPositionHandler, createPersistenceMiddleware, createSlamAppStore, createTrackingQualityListenerMiddleware, degradedCountUpdated, endSession, eulerToQuaternion, extractActionTimestamp, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, loadRecordingOptions, matrixDelta, medianQrPosition, originReset, poseLost, poseReceived, pruneQrDetections, qrDetectedReducer, recordDepthSample, recordGpsEvent, recordQrDetection, recordQrSizeEstimate, recordWriteFailure, recordingReducer, replayRecording, reportUpdated, resetCoordinatorState, resetRecordingOptions, resetTracking, resetTrackingQuality, saveRecordingOptions, selectAlignmentMatrix, selectDerivedQrPlacement, selectFrameTilesInWebXR, selectGpsPositions, selectLastRestartedPayload, selectLastSensorOrientation, selectLastValidPose, selectLatestQrDetection, selectLostFrameCount, selectOdometryPositions, selectOdometryRotations, selectOnboardingGuidance, selectQrMarker, selectQrMarkers, selectQrPoseStability, selectQrRawObservations, selectQrSize, selectRecentAlignments, selectResolvedQrSizeM, selectSolvedQrPose, selectStableQrPose, selectTrackingPhase, selectTrackingQuality, selectZeroReference, setQrMaxHistory, setZeroPos, slicePrefixOf, snapshotPushed, snapshotsTrimmed, startSession, subscribeToSelector, trackingQualityReducer, trackingReducer, updateDeviceOrientation, validateDepthOptions, validateImageOptions, validateRecordingOptions, wireStoreSubscribers };
|
|
1
|
+
import { c as extractOdomPosition, i as DepthSample, l as extractOdomRotation, r as DepthPoint } from "../ar-types-D6PYS4bc.js";
|
|
2
|
+
import { a as TrackingSliceState, c as poseLost, d as selectLastRestartedPayload, f as selectLastSensorOrientation, g as trackingReducer, h as selectTrackingPhase, i as TrackingPhase, l as poseReceived, m as selectLostFrameCount, n as PoseReceivedPayload, o as clearLastRestartedPayload, p as selectLastValidPose, r as ResetTransformData, s as originReset, t as DeviceOrientation, u as resetTracking } from "../tracking-slice-BAbcZK-Y.js";
|
|
3
|
+
import { d as QrSizeStatus, l as QrSizeEstimate } from "../qr-size-measurer-rVFf4AdM.js";
|
|
4
|
+
import { a as QrPoseStability, o as QrPoseStabilityOptions, s as QrPoseStabilityStatus } from "../qr-pose-aggregation-mABSN0AW.js";
|
|
5
|
+
import { a as recordWriteFailure, i as recordDepthSample, n as SessionMetadata$1, o as recordingReducer, r as endSession, s as startSession, t as RecordingState } from "../recording-slice-DXw5-UvO.js";
|
|
6
|
+
import { C as setQrMaxHistory, S as selectStableQrPose, _ as selectQrPoseStability, a as RootWithQrDetected, b as selectResolvedQrSizeM, c as medianQrPosition, d as recordQrDetection, f as recordQrSizeEstimate, g as selectQrMarkers, h as selectQrMarker, i as QrMarkerState, l as pruneQrDetections, m as selectLatestQrDetection, n as QrDetectedState, o as clearAllQrMarkers, p as selectDerivedQrPlacement, r as QrDetectionEntry, s as clearQrMarker, t as DEFAULT_QR_MAX_HISTORY, u as qrDetectedReducer, v as selectQrRawObservations, x as selectSolvedQrPose, y as selectQrSize } from "../qr-detected-slice-mfyxD2-M.js";
|
|
7
|
+
import { n as SessionMetadata } from "../opfs-storage-S_odkCk1.js";
|
|
8
|
+
import { n as StorageBackend } from "../storage-backend-BX7egQKi.js";
|
|
9
|
+
import { A as snapshotPushed, C as createTrackingQualityListenerMiddleware, D as resetTrackingQuality, E as reportUpdated, M as trackingQualityReducer, O as selectRecentAlignments, S as computeTrackingQualityReport, T as matrixDelta, _ as computeConvergence, a as SlamAppStoreOptions, b as computeGpsVsFusedDivergence, g as TrackingQualityState, h as TrackingQualitySliceState, i as SlamAppStore, j as snapshotsTrimmed, k as selectTrackingQuality, m as TrackingQualityReport, n as SlamAppMiddleware, o as createSlamAppStore, p as TrackingQualityOptions, r as SlamAppRootState, s as AlignmentSnapshot, t as SlamAppCombinedState, u as DEFAULT_TRACKING_QUALITY_OPTIONS, v as computeCoverage, w as degradedCountUpdated, x as computeResidualConsensus, y as computeGpsAccuracy } from "../create-slam-app-store-DFm5K9Ob.js";
|
|
10
|
+
import { a as eulerToQuaternion, c as getLastDeviceOrientation, i as createGpsPositionHandler, l as updateDeviceOrientation, n as buildRawGpsPoint, o as resetCoordinatorState, r as buildRecordGpsEventPayload, t as RecordingCoordinatorConfig } from "../gps-event-coordinator-Cruoe5I-.js";
|
|
11
|
+
import { i as captureGpsAnchorSample, n as GpsAnchorSample, r as GpsAnchorSampleGpsPoint, t as CaptureGpsAnchorSampleOptions } from "../gps-ar-pose-sampler-BuuUuK-D.js";
|
|
12
|
+
import { n as replayRecording, t as ReplayRecordingOptions } from "../recording-replayer-qT2EM1Qs.js";
|
|
13
|
+
import { i as slicePrefixOf, n as PersistenceMiddlewareOptions, r as createPersistenceMiddleware } from "../persistence-middleware-Cun4aF5M.js";
|
|
14
|
+
import { a as ReplayAction, c as computeInterActionDelay, i as ProgressCallback, l as extractActionTimestamp, n as DEFAULT_MAX_DELAY_MS, o as ReplayEngine, r as ErrorCallback, s as ReplayState, t as CompleteCallback } from "../replay-engine-B1H_kLhK.js";
|
|
15
|
+
import { n as subscribeToSelector, t as SubscribableStore } from "../subscribe-to-selector-j-eOYybQ.js";
|
|
16
|
+
import { n as wireStoreSubscribers, t as StoreSubscriberDeps } from "../store-subscribers-CWHToX6N.js";
|
|
17
|
+
import { a as selectOdometryRotations, i as selectOdometryPositions, n as selectFrameTilesInWebXR, o as selectZeroReference, r as selectGpsPositions, t as selectAlignmentMatrix } from "../app-selectors-DG0ZqaeI.js";
|
|
18
|
+
import { a as RawGpsPoint, c as calcRelativeCoordsInMeters, d as OnboardingGuidance, f as OnboardingPhase, i as RawDeviceOrientation, l as recordGpsEvent, m as selectOnboardingGuidance, n as GpsPoint, o as RecordGpsEventPayload, p as computeOnboardingGuidance, r as LatLong, s as add2dImage, t as Add2dImagePayload, u as setZeroPos } from "../index-ClmnNJ6-.js";
|
|
19
|
+
export { Add2dImagePayload, AlignmentSnapshot, CaptureGpsAnchorSampleOptions, CompleteCallback, DEFAULT_MAX_DELAY_MS, DEFAULT_QR_MAX_HISTORY, DEFAULT_TRACKING_QUALITY_OPTIONS, DepthPoint, DepthSample, DeviceOrientation, ErrorCallback, GpsAnchorSample, GpsAnchorSampleGpsPoint, GpsPoint, LatLong, OnboardingGuidance, OnboardingPhase, SessionMetadata as OpfsSessionMetadata, PersistenceMiddlewareOptions, PoseReceivedPayload, ProgressCallback, QrDetectedState, QrDetectionEntry, QrMarkerState, QrPoseStability, QrPoseStabilityOptions, QrPoseStabilityStatus, QrSizeEstimate, QrSizeStatus, RawDeviceOrientation, RawGpsPoint, RecordGpsEventPayload, RecordingCoordinatorConfig, RecordingState, ReplayAction, ReplayEngine, ReplayRecordingOptions, ReplayState, ResetTransformData, RootWithQrDetected, SessionMetadata$1 as SessionMetadata, SlamAppCombinedState, SlamAppMiddleware, SlamAppRootState, SlamAppStore, SlamAppStoreOptions, StorageBackend, StoreSubscriberDeps, SubscribableStore, TrackingPhase, TrackingQualityOptions, TrackingQualityReport, TrackingQualitySliceState, TrackingQualityState, TrackingSliceState, add2dImage, buildRawGpsPoint, buildRecordGpsEventPayload, calcRelativeCoordsInMeters, captureGpsAnchorSample, clearAllQrMarkers, clearLastRestartedPayload, clearQrMarker, computeConvergence, computeCoverage, computeGpsAccuracy, computeGpsVsFusedDivergence, computeInterActionDelay, computeOnboardingGuidance, computeResidualConsensus, computeTrackingQualityReport, createGpsPositionHandler, createPersistenceMiddleware, createSlamAppStore, createTrackingQualityListenerMiddleware, degradedCountUpdated, endSession, eulerToQuaternion, extractActionTimestamp, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, matrixDelta, medianQrPosition, originReset, poseLost, poseReceived, pruneQrDetections, qrDetectedReducer, recordDepthSample, recordGpsEvent, recordQrDetection, recordQrSizeEstimate, recordWriteFailure, recordingReducer, replayRecording, reportUpdated, resetCoordinatorState, resetTracking, resetTrackingQuality, selectAlignmentMatrix, selectDerivedQrPlacement, selectFrameTilesInWebXR, selectGpsPositions, selectLastRestartedPayload, selectLastSensorOrientation, selectLastValidPose, selectLatestQrDetection, selectLostFrameCount, selectOdometryPositions, selectOdometryRotations, selectOnboardingGuidance, selectQrMarker, selectQrMarkers, selectQrPoseStability, selectQrRawObservations, selectQrSize, selectRecentAlignments, selectResolvedQrSizeM, selectSolvedQrPose, selectStableQrPose, selectTrackingPhase, selectTrackingQuality, selectZeroReference, setQrMaxHistory, setZeroPos, slicePrefixOf, snapshotPushed, snapshotsTrimmed, startSession, subscribeToSelector, trackingQualityReducer, trackingReducer, updateDeviceOrientation, wireStoreSubscribers };
|
package/dist/state/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { extractOdomPosition, extractOdomRotation } from "../types/ar-types.js";
|
|
2
2
|
import { clearLastRestartedPayload, originReset, poseLost, poseReceived, resetTracking, selectLastRestartedPayload, selectLastSensorOrientation, selectLastValidPose, selectLostFrameCount, selectTrackingPhase, trackingReducer } from "./tracking-slice.js";
|
|
3
|
-
import {
|
|
3
|
+
import { r as updateDeviceOrientation, t as getLastDeviceOrientation } from "../device-orientation-cache-j-kLP8he.js";
|
|
4
4
|
import { endSession, recordDepthSample, recordWriteFailure, recordingReducer, startSession } from "./recording-slice.js";
|
|
5
5
|
import { DEFAULT_QR_MAX_HISTORY, clearAllQrMarkers, clearQrMarker, medianQrPosition, pruneQrDetections, qrDetectedReducer, recordQrDetection, recordQrSizeEstimate, selectDerivedQrPlacement, selectLatestQrDetection, selectQrMarker, selectQrMarkers, selectQrPoseStability, selectQrRawObservations, selectQrSize, selectResolvedQrSizeM, selectSolvedQrPose, selectStableQrPose, setQrMaxHistory } from "./qr-detected-slice.js";
|
|
6
|
+
import { buildRawGpsPoint, buildRecordGpsEventPayload, createGpsPositionHandler, eulerToQuaternion, resetCoordinatorState } from "./gps-event-coordinator.js";
|
|
6
7
|
import { captureGpsAnchorSample } from "./gps-ar-pose-sampler.js";
|
|
7
8
|
import { selectAlignmentMatrix, selectFrameTilesInWebXR, selectGpsPositions, selectOdometryPositions, selectOdometryRotations, selectZeroReference } from "./app-selectors.js";
|
|
8
9
|
import { DEFAULT_TRACKING_QUALITY_OPTIONS, computeConvergence, computeCoverage, computeGpsAccuracy, computeGpsVsFusedDivergence, computeResidualConsensus, computeTrackingQualityReport, createTrackingQualityListenerMiddleware, degradedCountUpdated, matrixDelta, reportUpdated, resetTrackingQuality, selectRecentAlignments, selectTrackingQuality, snapshotPushed, snapshotsTrimmed, trackingQualityReducer } from "./tracking-quality.js";
|
|
9
10
|
import { createPersistenceMiddleware, slicePrefixOf } from "./persistence-middleware.js";
|
|
10
|
-
import { t as createSlamAppStore } from "../create-slam-app-store-
|
|
11
|
+
import { t as createSlamAppStore } from "../create-slam-app-store-oK9bnqyI.js";
|
|
11
12
|
import { replayRecording } from "./recording-replayer.js";
|
|
12
13
|
import { DEFAULT_MAX_DELAY_MS, ReplayEngine, computeInterActionDelay, extractActionTimestamp } from "./replay-engine.js";
|
|
13
14
|
import { subscribeToSelector } from "./subscribe-to-selector.js";
|
|
14
15
|
import { wireStoreSubscribers } from "./store-subscribers.js";
|
|
15
|
-
import { a as computeOnboardingGuidance, i as setZeroPos, n as calcRelativeCoordsInMeters, o as selectOnboardingGuidance, r as recordGpsEvent, t as add2dImage } from "../state-
|
|
16
|
-
export { DEFAULT_MAX_DELAY_MS, DEFAULT_QR_MAX_HISTORY,
|
|
16
|
+
import { a as computeOnboardingGuidance, i as setZeroPos, n as calcRelativeCoordsInMeters, o as selectOnboardingGuidance, r as recordGpsEvent, t as add2dImage } from "../state-CDF5LvsO.js";
|
|
17
|
+
export { DEFAULT_MAX_DELAY_MS, DEFAULT_QR_MAX_HISTORY, DEFAULT_TRACKING_QUALITY_OPTIONS, ReplayEngine, add2dImage, buildRawGpsPoint, buildRecordGpsEventPayload, calcRelativeCoordsInMeters, captureGpsAnchorSample, clearAllQrMarkers, clearLastRestartedPayload, clearQrMarker, computeConvergence, computeCoverage, computeGpsAccuracy, computeGpsVsFusedDivergence, computeInterActionDelay, computeOnboardingGuidance, computeResidualConsensus, computeTrackingQualityReport, createGpsPositionHandler, createPersistenceMiddleware, createSlamAppStore, createTrackingQualityListenerMiddleware, degradedCountUpdated, endSession, eulerToQuaternion, extractActionTimestamp, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, matrixDelta, medianQrPosition, originReset, poseLost, poseReceived, pruneQrDetections, qrDetectedReducer, recordDepthSample, recordGpsEvent, recordQrDetection, recordQrSizeEstimate, recordWriteFailure, recordingReducer, replayRecording, reportUpdated, resetCoordinatorState, resetTracking, resetTrackingQuality, selectAlignmentMatrix, selectDerivedQrPlacement, selectFrameTilesInWebXR, selectGpsPositions, selectLastRestartedPayload, selectLastSensorOrientation, selectLastValidPose, selectLatestQrDetection, selectLostFrameCount, selectOdometryPositions, selectOdometryRotations, selectOnboardingGuidance, selectQrMarker, selectQrMarkers, selectQrPoseStability, selectQrRawObservations, selectQrSize, selectRecentAlignments, selectResolvedQrSizeM, selectSolvedQrPose, selectStableQrPose, selectTrackingPhase, selectTrackingQuality, selectZeroReference, setQrMaxHistory, setZeroPos, slicePrefixOf, snapshotPushed, snapshotsTrimmed, startSession, subscribeToSelector, trackingQualityReducer, trackingReducer, updateDeviceOrientation, wireStoreSubscribers };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
export { PersistenceMiddlewareOptions, createPersistenceMiddleware, slicePrefixOf };
|
|
1
|
+
import { i as slicePrefixOf, n as PersistenceMiddlewareOptions, r as createPersistenceMiddleware, t as PersistenceMiddleware } from "../persistence-middleware-Cun4aF5M.js";
|
|
2
|
+
export { PersistenceMiddleware, PersistenceMiddlewareOptions, createPersistenceMiddleware, slicePrefixOf };
|
|
@@ -11,10 +11,27 @@ const MAX_CONCURRENT_WRITES = 3;
|
|
|
11
11
|
var WriteQueue = class {
|
|
12
12
|
pendingCount = 0;
|
|
13
13
|
queue = [];
|
|
14
|
+
flushWaiters = [];
|
|
14
15
|
enqueue(writeFn) {
|
|
15
16
|
this.queue.push(writeFn);
|
|
16
17
|
this.drain();
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Resolves once the queue is fully idle — every enqueued write (including
|
|
21
|
+
* ones still waiting behind the concurrency cap) has settled. Rejected
|
|
22
|
+
* writes count as settled (the enqueue wrappers handle their errors), so
|
|
23
|
+
* flush never hangs on a failing backend. Writes enqueued AFTER the queue
|
|
24
|
+
* went idle again are not waited for.
|
|
25
|
+
*/
|
|
26
|
+
flush() {
|
|
27
|
+
if (this.isIdle()) return Promise.resolve();
|
|
28
|
+
return new Promise((resolve) => {
|
|
29
|
+
this.flushWaiters.push(resolve);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
isIdle() {
|
|
33
|
+
return this.pendingCount === 0 && this.queue.length === 0;
|
|
34
|
+
}
|
|
18
35
|
drain() {
|
|
19
36
|
while (this.pendingCount < MAX_CONCURRENT_WRITES && this.queue.length > 0) {
|
|
20
37
|
const fn = this.queue.shift();
|
|
@@ -24,6 +41,11 @@ var WriteQueue = class {
|
|
|
24
41
|
this.drain();
|
|
25
42
|
});
|
|
26
43
|
}
|
|
44
|
+
if (this.isIdle() && this.flushWaiters.length > 0) {
|
|
45
|
+
const waiters = this.flushWaiters;
|
|
46
|
+
this.flushWaiters = [];
|
|
47
|
+
for (const resolve of waiters) resolve();
|
|
48
|
+
}
|
|
27
49
|
}
|
|
28
50
|
};
|
|
29
51
|
/**
|
|
@@ -58,19 +80,6 @@ function isInPersistableSession(wasRecording, isRecording, actionType) {
|
|
|
58
80
|
const isEndSession = actionType === endSession.type;
|
|
59
81
|
return isRecording || wasRecording && isEndSession;
|
|
60
82
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Create a Redux middleware that persists qualifying actions to storage
|
|
63
|
-
* during active recording sessions.
|
|
64
|
-
*
|
|
65
|
-
* Persistence rules:
|
|
66
|
-
* - Only persists when `state.recording.isRecording` is true (checked AFTER
|
|
67
|
-
* the action is reduced, so `startSession` itself is included).
|
|
68
|
-
* - Persists actions whose slice prefix is listed in `persistedPrefixes`.
|
|
69
|
-
* - Excludes `recording/recordWriteFailure` to prevent recursive persistence.
|
|
70
|
-
* - Excludes `routing/*` and any other non-whitelisted actions.
|
|
71
|
-
* - Uses 1-based indexing for action files (000001.json, 000002.json, …).
|
|
72
|
-
* - Each middleware instance maintains its own action index (Bug 10 fix).
|
|
73
|
-
*/
|
|
74
83
|
function createPersistenceMiddleware(options) {
|
|
75
84
|
const { storageBackend, onWriteFailure, persistedPrefixes } = options;
|
|
76
85
|
const normalizedPrefixes = persistedPrefixes.map((prefix) => prefix.endsWith("/") ? prefix : `${prefix}/`);
|
|
@@ -93,7 +102,7 @@ function createPersistenceMiddleware(options) {
|
|
|
93
102
|
const index = ++actionIndex;
|
|
94
103
|
if (dispatchDepth > 1 && !hasWarnedReentrant) {
|
|
95
104
|
hasWarnedReentrant = true;
|
|
96
|
-
log.warn(`Persisted action "${actionType}" was dispatched re-entrantly (inside another dispatch's next()). Its recorded order can invert on replay — react to actions via a prepended listener middleware, not a synchronous store.subscribe dispatch. See 2026-06-28-subscriber-dispatch-persistence-ordering-review.md.`);
|
|
105
|
+
log.warn(`Persisted action "${actionType}" was dispatched re-entrantly (inside another dispatch's next()). Its recorded order can invert on replay — react to actions via a prepended listener middleware, not a synchronous store.subscribe dispatch. See 2026-06-28-0751-subscriber-dispatch-persistence-ordering-review.md.`);
|
|
97
106
|
}
|
|
98
107
|
writeQueue.enqueue(async () => {
|
|
99
108
|
try {
|
|
@@ -110,7 +119,7 @@ function createPersistenceMiddleware(options) {
|
|
|
110
119
|
dispatchDepth -= 1;
|
|
111
120
|
}
|
|
112
121
|
};
|
|
113
|
-
return middleware;
|
|
122
|
+
return Object.assign(middleware, { flushPendingWrites: () => writeQueue.flush() });
|
|
114
123
|
}
|
|
115
124
|
//#endregion
|
|
116
125
|
export { createPersistenceMiddleware, slicePrefixOf };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as QrSizeStatus, l as QrSizeEstimate } from "../qr-size-measurer-
|
|
2
|
-
import { a as QrPoseStability, o as QrPoseStabilityOptions, s as QrPoseStabilityStatus } from "../qr-pose-aggregation-
|
|
3
|
-
import { C as setQrMaxHistory, S as selectStableQrPose, _ as selectQrPoseStability, a as RootWithQrDetected, b as selectResolvedQrSizeM, c as medianQrPosition, d as recordQrDetection, f as recordQrSizeEstimate, g as selectQrMarkers, h as selectQrMarker, i as QrMarkerState, l as pruneQrDetections, m as selectLatestQrDetection, n as QrDetectedState, o as clearAllQrMarkers, p as selectDerivedQrPlacement, r as QrDetectionEntry, s as clearQrMarker, t as DEFAULT_QR_MAX_HISTORY, u as qrDetectedReducer, v as selectQrRawObservations, x as selectSolvedQrPose, y as selectQrSize } from "../qr-detected-slice-
|
|
1
|
+
import { d as QrSizeStatus, l as QrSizeEstimate } from "../qr-size-measurer-rVFf4AdM.js";
|
|
2
|
+
import { a as QrPoseStability, o as QrPoseStabilityOptions, s as QrPoseStabilityStatus } from "../qr-pose-aggregation-mABSN0AW.js";
|
|
3
|
+
import { C as setQrMaxHistory, S as selectStableQrPose, _ as selectQrPoseStability, a as RootWithQrDetected, b as selectResolvedQrSizeM, c as medianQrPosition, d as recordQrDetection, f as recordQrSizeEstimate, g as selectQrMarkers, h as selectQrMarker, i as QrMarkerState, l as pruneQrDetections, m as selectLatestQrDetection, n as QrDetectedState, o as clearAllQrMarkers, p as selectDerivedQrPlacement, r as QrDetectionEntry, s as clearQrMarker, t as DEFAULT_QR_MAX_HISTORY, u as qrDetectedReducer, v as selectQrRawObservations, x as selectSolvedQrPose, y as selectQrSize } from "../qr-detected-slice-mfyxD2-M.js";
|
|
4
4
|
export { DEFAULT_QR_MAX_HISTORY, QrDetectedState, QrDetectionEntry, QrMarkerState, QrPoseStability, QrPoseStabilityOptions, QrPoseStabilityStatus, QrSizeEstimate, QrSizeStatus, RootWithQrDetected, clearAllQrMarkers, clearQrMarker, medianQrPosition, pruneQrDetections, qrDetectedReducer, recordQrDetection, recordQrSizeEstimate, selectDerivedQrPlacement, selectLatestQrDetection, selectQrMarker, selectQrMarkers, selectQrPoseStability, selectQrRawObservations, selectQrSize, selectResolvedQrSizeM, selectSolvedQrPose, selectStableQrPose, setQrMaxHistory };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as lowerMedian } from "../median-DDBrZGP0.js";
|
|
2
|
+
import { deriveQrPlacement, deriveSolvedQrPose } from "../ar/qr/qr-derived-pose.js";
|
|
3
|
+
import { i as evaluateQrPoseStability } from "../qr-pose-aggregation-Cp0Mtg_j.js";
|
|
3
4
|
import { createSlice } from "@reduxjs/toolkit";
|
|
4
5
|
//#region ../src/state/qr-detected-slice.ts
|
|
5
6
|
/**
|
|
6
7
|
* `qrDetected` Redux slice — Note 3 of the QR-tracking follow-up plan
|
|
7
|
-
* (docs `2026-06-15-
|
|
8
|
+
* (docs `2026-06-15-1219-qr-tracking-generalization-overlay-and-north-followup.md`).
|
|
8
9
|
*
|
|
9
10
|
* A detection-agnostic, framework-level store of "what was detected, where, in
|
|
10
11
|
* 3D" that overlay / trigger / anchor consumers subscribe to INDEPENDENTLY of
|
|
@@ -30,8 +31,8 @@ import { createSlice } from "@reduxjs/toolkit";
|
|
|
30
31
|
* { qrDetected: qrDetectedReducer } })`. It is not a built-in of the store
|
|
31
32
|
* factory, so framework consumers that never detect anything pay nothing.
|
|
32
33
|
*
|
|
33
|
-
* @see ../ar/qr-tracking-controller.ts — the producer (dispatches `recordQrDetection`).
|
|
34
|
-
* @see ../ar/qr-pose.ts — `Pose` / `QrPoseSolution` (the per-detection geometry).
|
|
34
|
+
* @see ../ar/qr/qr-tracking-controller.ts — the producer (dispatches `recordQrDetection`).
|
|
35
|
+
* @see ../ar/qr/qr-pose.ts — `Pose` / `QrPoseSolution` (the per-detection geometry).
|
|
35
36
|
*/
|
|
36
37
|
/**
|
|
37
38
|
* Default ring-buffer cap per marker. Bounded so an overlay that never prunes
|
|
@@ -201,11 +202,6 @@ function selectResolvedQrSizeM(state, text) {
|
|
|
201
202
|
const size = state.qrDetected.markers[text]?.size;
|
|
202
203
|
return size?.status === "estimated" ? size.estimateM : null;
|
|
203
204
|
}
|
|
204
|
-
/** Per-axis median of a numeric list (returns the lower-middle for even n). */
|
|
205
|
-
function medianOf(values) {
|
|
206
|
-
const sorted = [...values].sort((a, b) => a - b);
|
|
207
|
-
return sorted[Math.floor((sorted.length - 1) / 2)];
|
|
208
|
-
}
|
|
209
205
|
/**
|
|
210
206
|
* Robust per-axis median of the world positions across a marker's detection
|
|
211
207
|
* window — the "running estimate" the bounded buffer enables (Note 3). Outliers
|
|
@@ -220,9 +216,9 @@ function medianQrPosition(entries) {
|
|
|
220
216
|
const ys = poses.map((p) => p.position[1]);
|
|
221
217
|
const zs = poses.map((p) => p.position[2]);
|
|
222
218
|
return [
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
219
|
+
lowerMedian(xs),
|
|
220
|
+
lowerMedian(ys),
|
|
221
|
+
lowerMedian(zs)
|
|
226
222
|
];
|
|
227
223
|
}
|
|
228
224
|
/**
|
|
@@ -230,7 +226,7 @@ function medianQrPosition(entries) {
|
|
|
230
226
|
* buffer (NOT stored separately — the detections are the source of truth, unlike
|
|
231
227
|
* the depth-measured size which is accumulated outside the buffer). Mirrors the
|
|
232
228
|
* size lifecycle's `unknown → measuring → stable` shape so the HUD can show
|
|
233
|
-
* "converging…" vs "stable". See `ar/qr-pose-aggregation.ts`.
|
|
229
|
+
* "converging…" vs "stable". See `ar/qr/qr-pose-aggregation.ts`.
|
|
234
230
|
*/
|
|
235
231
|
function selectQrPoseStability(state, text, options) {
|
|
236
232
|
const marker = state.qrDetected.markers[text];
|
|
@@ -278,7 +274,7 @@ function toRawObservation(entry) {
|
|
|
278
274
|
* `null` when the marker is unknown, has no raw observations, cannot be sized
|
|
279
275
|
* yet, or PnP rejects the latest quad — the re-test-friendly replacement for the
|
|
280
276
|
* once-stored solved pose. Runs identically live and on replay (only
|
|
281
|
-
* `deps.resolveDepthAt` differs). See `ar/qr-derived-pose.ts`.
|
|
277
|
+
* `deps.resolveDepthAt` differs). See `ar/qr/qr-derived-pose.ts`.
|
|
282
278
|
*/
|
|
283
279
|
function selectSolvedQrPose(state, text, deps) {
|
|
284
280
|
return deriveSolvedQrPose(text, selectQrRawObservations(state, text), deps);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { N as CombinedRootState } from "../create-slam-app-store-
|
|
2
|
-
import { n as replayRecording, t as ReplayRecordingOptions } from "../recording-replayer-
|
|
1
|
+
import { N as CombinedRootState } from "../create-slam-app-store-DFm5K9Ob.js";
|
|
2
|
+
import { n as replayRecording, t as ReplayRecordingOptions } from "../recording-replayer-qT2EM1Qs.js";
|
|
3
3
|
export { CombinedRootState, ReplayRecordingOptions, replayRecording };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { loadActionsFromZip } from "../storage/zip-reader.js";
|
|
2
2
|
import { NullStorageBackend } from "../storage/null-storage-backend.js";
|
|
3
|
-
import { t as createSlamAppStore } from "../create-slam-app-store-
|
|
3
|
+
import { t as createSlamAppStore } from "../create-slam-app-store-oK9bnqyI.js";
|
|
4
4
|
//#region ../src/state/recording-replayer.ts
|
|
5
5
|
/**
|
|
6
6
|
* Recording Replayer
|