gps-plus-slam-app-framework 1.4.0 → 1.7.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/dist/absolute-orientation-CAEh840t.d.ts +54 -0
- package/dist/{app-selectors-CrOucL00.d.ts → app-selectors-ikTUQZpe.d.ts} +1 -1
- 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/chromium-camera-access-workaround.d.ts +1 -1
- package/dist/ar/depth-grid-lookup.d.ts +1 -1
- package/dist/ar/depth-sampler.d.ts +2 -2
- 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 +1 -1
- package/dist/ar/frame-loop.d.ts +1 -1
- package/dist/ar/image-capture.d.ts +2 -2
- package/dist/ar/image-capture.js +1 -154
- package/dist/ar/image-quality.d.ts +2 -0
- package/dist/ar/image-quality.js +168 -0
- package/dist/ar/index.d.ts +31 -30
- package/dist/ar/index.js +6 -5
- package/dist/ar/occupancy-grid.d.ts +1 -1
- package/dist/ar/planar-pnp.d.ts +1 -1
- package/dist/ar/qr-debug-view.d.ts +1 -1
- package/dist/ar/qr-derived-pose.d.ts +1 -1
- package/dist/ar/qr-detection-controller.d.ts +1 -1
- package/dist/ar/qr-frontend.d.ts +1 -1
- package/dist/ar/qr-pose.d.ts +1 -1
- package/dist/ar/qr-size-depth-context.d.ts +2 -2
- package/dist/ar/qr-size-measurer.d.ts +1 -1
- package/dist/ar/replay-scene.d.ts +1 -1
- package/dist/ar/replay-scene.js +1 -1
- 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-camera-texture.d.ts +1 -1
- package/dist/ar/xr-error-handler.d.ts +1 -1
- package/dist/ar/xr-frame-loop.d.ts +1 -1
- package/dist/{ar-Dc72Ksiu.js → ar-MFpFlV7j.js} +3 -3
- package/dist/{ar-world-group-alignment-DDLkgNf_.d.ts → ar-world-group-alignment-69fgnB39.d.ts} +1 -1
- package/dist/capture-motion-gate-0Yl2NpQG.d.ts +24 -0
- package/dist/capture-motion-gate-4EscNZCw.js +94 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/create-slam-app-store-DkCHOpvb.js +149 -0
- package/dist/{create-slam-app-store-Ce2FMKCp.d.ts → create-slam-app-store-n_VF63D5.d.ts} +50 -40
- package/dist/{depth-grid-lookup-vMDrGTk_.d.ts → depth-grid-lookup-DQ-IYhO3.d.ts} +1 -1
- package/dist/{depth-sampler-DwfPYzS7.d.ts → depth-sampler-asc8exHt.d.ts} +1 -1
- package/dist/{depth-unprojection-CK3b9htH.d.ts → depth-unprojection-DjsbJW9L.d.ts} +1 -1
- package/dist/{enable-gps-ar-CjZ1nEdu.d.ts → enable-gps-ar-DkNhFv4Y.d.ts} +4 -4
- package/dist/{frame-conversions-D_Af8Dt3.d.ts → frame-conversions-DObhj8Wf.d.ts} +1 -1
- package/dist/{fused-path-C0FHe67t.d.ts → fused-path-v6eOmLl3.d.ts} +1 -1
- package/dist/geo/h3-proximity.d.ts +1 -1
- package/dist/geo/index.d.ts +1 -1
- package/dist/geodesic-angle-BTldfFgs.js +39 -0
- package/dist/{gps-anchor-C6I9NDHA.d.ts → gps-anchor-BeFO2RYa.d.ts} +1 -1
- package/dist/{gps-ar-pose-sampler-DaHg2aPZ.d.ts → gps-ar-pose-sampler-DHMZmYAc.d.ts} +1 -1
- package/dist/{gps-event-coordinator-C7hwHyLA.d.ts → gps-event-coordinator-CjWW636x.d.ts} +21 -11
- package/dist/image-capture-B2-b6tKK.js +374 -0
- package/dist/{image-capture-C2Feywet.d.ts → image-capture-CNZDrQXG.d.ts} +103 -3
- package/dist/image-quality-smCBoFj1.d.ts +158 -0
- package/dist/index-BAPokxMb.d.ts +22 -0
- package/dist/{index-m_LneUSi.d.ts → index-BODDUTvD.d.ts} +1 -1
- package/dist/{index-BvLo2poy.d.ts → index-BneSj4_5.d.ts} +3 -3
- package/dist/index-_Rhgoqkh.d.ts +2 -0
- package/dist/index.d.ts +80 -77
- package/dist/index.js +11 -8
- package/dist/{leaflet-map-overlay-bnb2U1NQ.d.ts → leaflet-map-overlay-CmIyiE8n.d.ts} +1 -1
- package/dist/{map-data-DdjPiSav.d.ts → map-data-B4oEehUh.d.ts} +1 -1
- package/dist/{map-overlay-draw-CPVdAsFq.d.ts → map-overlay-draw-ymz1s7fG.d.ts} +1 -1
- package/dist/{null-storage-backend-CuSdYFsM.d.ts → null-storage-backend-B9rtyDfG.d.ts} +2 -2
- package/dist/{occupancy-grid-Bvi2Gw1U.d.ts → occupancy-grid-DnOc-6PU.d.ts} +2 -2
- package/dist/{opfs-storage-backend-CeQAb0SD.d.ts → opfs-storage-backend-JJiUJo-3.d.ts} +2 -2
- package/dist/{persistence-middleware-5eearhSV.d.ts → persistence-middleware-DAPTTwB2.d.ts} +1 -1
- package/dist/{planar-pnp-cjthe7Be.d.ts → planar-pnp-my9bqULS.d.ts} +1 -1
- package/dist/{qr-debug-view-B8gTzjMm.d.ts → qr-debug-view-Brl73HGO.d.ts} +1 -1
- package/dist/{qr-derived-pose-DinKE600.d.ts → qr-derived-pose-CmxTP2m4.d.ts} +2 -2
- package/dist/{qr-detected-slice-Cpv-dg82.d.ts → qr-detected-slice-VQssZmQJ.d.ts} +4 -4
- package/dist/{qr-detection-controller-Cd2Ih4cC.d.ts → qr-detection-controller-CDurHv8E.d.ts} +3 -3
- package/dist/{qr-frontend-DufZp2xS.d.ts → qr-frontend--fFX25mV.d.ts} +1 -1
- package/dist/{qr-pose-aggregation-CFlmLm6w.d.ts → qr-pose-aggregation-B7tWJq7j.d.ts} +1 -1
- package/dist/{qr-pose-aggregation-DXR9STHs.js → qr-pose-aggregation-DBiaLW0O.js} +1 -10
- package/dist/{qr-size-depth-context-onu36E9s.d.ts → qr-size-depth-context-CeAG53fy.d.ts} +2 -2
- package/dist/{qr-size-measurer-D7739ZpB.d.ts → qr-size-measurer-DQdAsid1.d.ts} +3 -3
- package/dist/{recording-options-D93kksJU.d.ts → recording-options-BPCpMHLK.d.ts} +154 -9
- package/dist/{recording-replayer-CUEK82tM.d.ts → recording-replayer-DQKpAGyQ.d.ts} +2 -2
- package/dist/{recording-slice-B-uCgGoh.d.ts → recording-slice-DaxHZvNu.d.ts} +2 -2
- package/dist/{replay-engine-BSVd7Zzb.d.ts → replay-engine-CmKh_4wf.d.ts} +1 -1
- package/dist/{replay-scene-CPt56pps.d.ts → replay-scene-DBlDrV_x.d.ts} +3 -3
- package/dist/sensors/absolute-orientation.d.ts +2 -0
- package/dist/sensors/absolute-orientation.js +145 -0
- package/dist/sensors/gps-error-handler.d.ts +1 -1
- package/dist/sensors/gps.d.ts +1 -1
- package/dist/sensors/index.d.ts +5 -4
- package/dist/sensors/index.js +2 -1
- package/dist/sensors/permission-checker.d.ts +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 -74
- package/dist/state/gps-ar-pose-sampler.d.ts +3 -3
- package/dist/state/gps-event-coordinator.d.ts +2 -2
- package/dist/state/gps-event-coordinator.js +27 -17
- package/dist/state/index.d.ts +20 -20
- package/dist/state/index.js +4 -4
- package/dist/state/persistence-middleware.d.ts +1 -1
- package/dist/state/persistence-middleware.js +30 -19
- package/dist/state/qr-detected-slice.d.ts +3 -3
- package/dist/state/qr-detected-slice.js +1 -1
- package/dist/state/recording-options.d.ts +2 -2
- package/dist/state/recording-options.js +155 -13
- 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/subscribe-to-selector.d.ts +1 -1
- package/dist/state/tracking-quality.d.ts +2 -2
- package/dist/state/tracking-quality.js +40 -128
- package/dist/state/tracking-slice.d.ts +1 -1
- package/dist/{state-IEw0ZsBu.js → state-E51QT_-j.js} +1 -1
- package/dist/storage/file-system-utils.d.ts +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-export.d.ts +1 -1
- package/dist/storage/zip-reader.d.ts +1 -1
- package/dist/{storage-backend-CTJHNdMp.d.ts → storage-backend-BdVLD0dU.d.ts} +1 -1
- package/dist/{store-subscribers-BZP81hjh.d.ts → store-subscribers-CA6AJH_8.d.ts} +2 -2
- package/dist/{subscribe-to-selector-Bp3sLx8L.d.ts → subscribe-to-selector-B6EUmQ3I.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-DJZ9qeGg.d.ts → tracking-slice-BuAZxXZ5.d.ts} +1 -1
- package/dist/types/ar-types.d.ts +1 -1
- package/dist/types/geo-types.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- 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/index.d.ts +8 -7
- package/dist/utils/index.js +2 -1
- package/dist/utils/list-formatter.d.ts +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/visualization/accuracy-circles.d.ts +1 -1
- package/dist/visualization/alignment-lerper.d.ts +1 -1
- package/dist/visualization/ar-world-group-alignment.d.ts +1 -1
- package/dist/visualization/ar-world-group-alignment.js +1 -1
- 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-compass-cubes.d.ts +1 -1
- package/dist/visualization/gps-event-markers.d.ts +1 -1
- package/dist/visualization/gps-event-markers.js +1 -1
- package/dist/visualization/hit-test-reticle.d.ts +1 -1
- package/dist/visualization/index.d.ts +18 -18
- package/dist/visualization/leaflet-map-overlay.d.ts +1 -1
- package/dist/visualization/lerp-utils.d.ts +1 -1
- package/dist/visualization/map-data.d.ts +1 -1
- package/dist/visualization/map-overlay-draw.d.ts +1 -1
- package/dist/visualization/map-overlay.d.ts +1 -1
- package/dist/visualization/three-dispose.d.ts +1 -1
- package/dist/visualization/vis-colors.d.ts +1 -1
- package/dist/{webxr-session-CJF9Nijp.js → webxr-session-DG-eNfny.js} +25 -4
- package/dist/{webxr-session-COsOjJwn.d.ts → webxr-session-Do5L6G3B.d.ts} +19 -9
- package/package.json +2 -2
- package/dist/index-eaI1Z1KR.d.ts +0 -2
- /package/dist/{accuracy-circles-Pi2YeCrM.d.ts → accuracy-circles-BtqOP_v1.d.ts} +0 -0
- /package/dist/{alignment-lerper-BUTsQ2yu.d.ts → alignment-lerper-Bil6vbVw.d.ts} +0 -0
- /package/dist/{ar-types-BckI1E-O.d.ts → ar-types-BFX2r1wk.d.ts} +0 -0
- /package/dist/{bresenham3d-ByjcmEgM.d.ts → bresenham3d-CU1Gv2W4.d.ts} +0 -0
- /package/dist/{camera-blit-capture-CqWe1G7s.d.ts → camera-blit-capture-NKT9H5-e.d.ts} +0 -0
- /package/dist/{camera-follower-BTb2Yp12.d.ts → camera-follower-CqJJ7zRj.d.ts} +0 -0
- /package/dist/{capability-checker-CXqoJYtb.d.ts → capability-checker-DUQLg6gq.d.ts} +0 -0
- /package/dist/{capture-failure-tracker-BL5SoG2a.d.ts → capture-failure-tracker-gsm8q7yi.d.ts} +0 -0
- /package/dist/{chromium-camera-access-workaround-BNK189P0.d.ts → chromium-camera-access-workaround-D4K2uwwQ.d.ts} +0 -0
- /package/dist/{concurrency-DqAlKX4j.d.ts → concurrency-By0oOTZt.d.ts} +0 -0
- /package/dist/{css3d-renderer-manager-m-ab19vp.d.ts → css3d-renderer-manager-B3kGNtcn.d.ts} +0 -0
- /package/dist/{failure-tracker-Cnc_xWUw.d.ts → failure-tracker-BO7M7jF_.d.ts} +0 -0
- /package/dist/{file-system-utils-Bs7lpeVP.d.ts → file-system-utils-DOajnMm-.d.ts} +0 -0
- /package/dist/{format-file-size-BFUWvir1.d.ts → format-file-size-Dc98ulzB.d.ts} +0 -0
- /package/dist/{frame-loop-BEO9_q3k.d.ts → frame-loop-CpVjQ1dH.d.ts} +0 -0
- /package/dist/{frustum-visibility-D_RGmH98.d.ts → frustum-visibility-CeoCZchO.d.ts} +0 -0
- /package/dist/{geo-types-DqiBzPO9.d.ts → geo-types-3Ip1NzVR.d.ts} +0 -0
- /package/dist/{gps-C5inWeNV.d.ts → gps-BBO3hKfT.d.ts} +0 -0
- /package/dist/{gps-compass-cubes-BExxrWJ-.d.ts → gps-compass-cubes-DSN87L8p.d.ts} +0 -0
- /package/dist/{gps-error-handler-C2bS69oJ.d.ts → gps-error-handler-BbPsfw-_.d.ts} +0 -0
- /package/dist/{gps-event-markers-Dd0G2bD0.d.ts → gps-event-markers-Cz9RMA2k.d.ts} +0 -0
- /package/dist/{h3-proximity-B57C6rYL.d.ts → h3-proximity-C-j0pw1j.d.ts} +0 -0
- /package/dist/{hit-test-reticle-Dqak9hiR.d.ts → hit-test-reticle-DV-2TpB9.d.ts} +0 -0
- /package/dist/{lerp-utils-kLxMJ2Xj.d.ts → lerp-utils-BLmHhkVe.d.ts} +0 -0
- /package/dist/{list-formatter-ct8txwvR.d.ts → list-formatter-KNMS0ay2.d.ts} +0 -0
- /package/dist/{logger-CzQrCe6C.d.ts → logger-CLnPrHiD.d.ts} +0 -0
- /package/dist/{map-overlay-Dci4yvm3.d.ts → map-overlay-Dh2B97MP.d.ts} +0 -0
- /package/dist/{opfs-storage-DMtlt57S.d.ts → opfs-storage-3VZh-qH6.d.ts} +0 -0
- /package/dist/{permission-checker-CtPtPQRq.d.ts → permission-checker-CDuI8BwC.d.ts} +0 -0
- /package/dist/{qr-pose-Bt2reSw7.d.ts → qr-pose-D2rfu5DA.d.ts} +0 -0
- /package/dist/{scene-node-names-CdNeQjOE.d.ts → scene-node-names-BiShOQDB.d.ts} +0 -0
- /package/dist/{session-disposers-D8wnO-uW.js → session-disposers-zv9OGXPB.js} +0 -0
- /package/dist/{three-dispose-BCZkSJp2.d.ts → three-dispose-Bt1k7WKh.d.ts} +0 -0
- /package/dist/{vis-colors-BZsSLI4i.d.ts → vis-colors-Obw2pLqT.d.ts} +0 -0
- /package/dist/{webxr-nue-basis-CW1wsbm6.d.ts → webxr-nue-basis-3nfjDJJp.d.ts} +0 -0
- /package/dist/{xr-camera-texture-BmrP7iNZ.d.ts → xr-camera-texture-Cva1q3Qj.d.ts} +0 -0
- /package/dist/{xr-error-handler-BEjRgZjt.d.ts → xr-error-handler-CtvHpjfm.d.ts} +0 -0
- /package/dist/{xr-frame-loop-K8ebdjLw.d.ts → xr-frame-loop-DIYtRcUa.d.ts} +0 -0
- /package/dist/{zip-coverage-embed-tFohI2J4.d.ts → zip-coverage-embed-DCAREVmw.d.ts} +0 -0
- /package/dist/{zip-export-DDWXInTR.d.ts → zip-export-ol0S_Ofd.d.ts} +0 -0
- /package/dist/{zip-reader-Q2ue6zlC.d.ts → zip-reader-D9iPQwdQ.d.ts} +0 -0
|
@@ -1,75 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { recordWriteFailure, recordingReducer } from "./recording-slice.js";
|
|
3
|
-
import { createTrackingQualityListenerMiddleware, trackingQualityReducer } from "./tracking-quality.js";
|
|
4
|
-
import { createPersistenceMiddleware, slicePrefixOf } from "./persistence-middleware.js";
|
|
5
|
-
import { arElementsReducer, gpsDataReducer, gpsElementsReducer, sanitizeForDevTools, setZeroPos, validateLicenseKey } from "gps-plus-slam-js";
|
|
6
|
-
import { configureStore } from "@reduxjs/toolkit";
|
|
7
|
-
import { COMMUNITY_LICENSE_KEY } from "gps-plus-slam-js/community-license-key";
|
|
8
|
-
//#region ../src/state/create-slam-app-store.ts
|
|
9
|
-
/**
|
|
10
|
-
* `createSlamAppStore` — composable Redux store factory for AR+GPS apps.
|
|
11
|
-
*
|
|
12
|
-
* Introduced in Iter 1 of the AppFramework/RecorderApp boundary migration.
|
|
13
|
-
* Wires the three library reducers (`gpsData`, `gpsElements`, `arElements`),
|
|
14
|
-
* the framework's recording lifecycle slice, and the persistence middleware.
|
|
15
|
-
*
|
|
16
|
-
* Recorder-only state (routing screen, ref-points, scenario) is plugged in
|
|
17
|
-
* by the consumer via `extraReducers` / `extraMiddleware`. The factory itself
|
|
18
|
-
* never references those concepts so apps that don't need them (POI viewers,
|
|
19
|
-
* navigation arrows, …) compose freely.
|
|
20
|
-
*
|
|
21
|
-
* The legacy `createRecorderStore` from `store.ts` is built on top of this
|
|
22
|
-
* factory and will move out of the framework in Iter 1D.
|
|
23
|
-
*
|
|
24
|
-
* @see docs/2026-05-03-appframework-vs-recorderapp-boundary-analysis.md — Iter 1
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Slice prefixes the framework always persists, derived from the actual
|
|
28
|
-
* library / framework action creators (never hand-typed). A rename of the
|
|
29
|
-
* `gpsData` or `recording` slice therefore propagates here automatically
|
|
30
|
-
* instead of silently dropping that slice's actions from recordings.
|
|
31
|
-
*/
|
|
32
|
-
const BUILTIN_PERSISTED_PREFIXES = [slicePrefixOf(setZeroPos.type), slicePrefixOf(recordWriteFailure.type)];
|
|
33
|
-
/**
|
|
34
|
-
* Build a Redux store wired with library + recording slices, persistence
|
|
35
|
-
* middleware, and any caller-supplied extras. See module docstring for the
|
|
36
|
-
* design rationale.
|
|
37
|
-
*/
|
|
38
|
-
function createSlamAppStore(options) {
|
|
39
|
-
const { storageBackend, extraReducers, extraMiddleware, persistedExtraPrefixes, onWriteFailure, enableDevChecks = true, licenseKey = COMMUNITY_LICENSE_KEY, trackingQualityOptions } = options;
|
|
40
|
-
validateLicenseKey(licenseKey);
|
|
41
|
-
const reducer = {
|
|
42
|
-
gpsData: gpsDataReducer,
|
|
43
|
-
gpsElements: gpsElementsReducer,
|
|
44
|
-
arElements: arElementsReducer,
|
|
45
|
-
recording: recordingReducer,
|
|
46
|
-
tracking: trackingReducer,
|
|
47
|
-
trackingQuality: trackingQualityReducer,
|
|
48
|
-
...extraReducers ?? {}
|
|
49
|
-
};
|
|
50
|
-
const trackingQualityMiddleware = createTrackingQualityListenerMiddleware(trackingQualityOptions);
|
|
51
|
-
const store = configureStore({
|
|
52
|
-
reducer,
|
|
53
|
-
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
54
|
-
serializableCheck: enableDevChecks,
|
|
55
|
-
immutableCheck: enableDevChecks
|
|
56
|
-
}).prepend(trackingQualityMiddleware).concat(createPersistenceMiddleware({
|
|
57
|
-
storageBackend,
|
|
58
|
-
onWriteFailure,
|
|
59
|
-
persistedPrefixes: [...BUILTIN_PERSISTED_PREFIXES, ...persistedExtraPrefixes ?? []]
|
|
60
|
-
}), ...extraMiddleware ?? []),
|
|
61
|
-
devTools: {
|
|
62
|
-
actionSanitizer: sanitizeForDevTools,
|
|
63
|
-
stateSanitizer: sanitizeForDevTools
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
return {
|
|
67
|
-
getState: () => store.getState(),
|
|
68
|
-
dispatch: store.dispatch,
|
|
69
|
-
subscribe: (listener) => store.subscribe(listener),
|
|
70
|
-
writeFrame: (blob, index) => storageBackend.writeFrame(blob, index),
|
|
71
|
-
writeSessionMetadata: (metadata) => storageBackend.writeSessionMetadata(metadata)
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
//#endregion
|
|
1
|
+
import { t as createSlamAppStore } from "../create-slam-app-store-DkCHOpvb.js";
|
|
75
2
|
export { createSlamAppStore };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ARPose } from "../ar-types-
|
|
2
|
-
import { o as extractOdomPosition, s as extractOdomRotation } from "../gps-event-coordinator-
|
|
3
|
-
import { i as captureGpsAnchorSample, n as GpsAnchorSample, r as GpsAnchorSampleGpsPoint, t as CaptureGpsAnchorSampleOptions } from "../gps-ar-pose-sampler-
|
|
1
|
+
import { t as ARPose } from "../ar-types-BFX2r1wk.js";
|
|
2
|
+
import { o as extractOdomPosition, s as extractOdomRotation } from "../gps-event-coordinator-CjWW636x.js";
|
|
3
|
+
import { i as captureGpsAnchorSample, n as GpsAnchorSample, r as GpsAnchorSampleGpsPoint, t as CaptureGpsAnchorSampleOptions } from "../gps-ar-pose-sampler-DHMZmYAc.js";
|
|
4
4
|
export { ARPose, CaptureGpsAnchorSampleOptions, GpsAnchorSample, GpsAnchorSampleGpsPoint, captureGpsAnchorSample, extractOdomPosition, extractOdomRotation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as eulerToQuaternion, c as getLastDeviceOrientation, i as createGpsPositionHandler, l as resetCoordinatorState, n as buildRawGpsPoint, o as extractOdomPosition, r as buildRecordGpsEventPayload, s as extractOdomRotation, t as RecordingCoordinatorConfig, u as
|
|
2
|
-
export { RecordingCoordinatorConfig, buildRawGpsPoint, buildRecordGpsEventPayload, createGpsPositionHandler, eulerToQuaternion, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, resetCoordinatorState, updateDeviceOrientation };
|
|
1
|
+
import { a as eulerToQuaternion, c as getLastDeviceOrientation, d as updateDeviceOrientation, i as createGpsPositionHandler, l as resetCoordinatorState, n as buildRawGpsPoint, o as extractOdomPosition, r as buildRecordGpsEventPayload, s as extractOdomRotation, t as RecordingCoordinatorConfig, u as toRawAbsoluteOrientation } from "../gps-event-coordinator-CjWW636x.js";
|
|
2
|
+
export { RecordingCoordinatorConfig, buildRawGpsPoint, buildRecordGpsEventPayload, createGpsPositionHandler, eulerToQuaternion, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, resetCoordinatorState, toRawAbsoluteOrientation, updateDeviceOrientation };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger.js";
|
|
2
|
+
import { getLatestAbsoluteOrientation } from "../sensors/absolute-orientation.js";
|
|
2
3
|
import { eulerToQuaternion, getOdometryPositions, getZeroReference, recordGpsEvent, setZeroPos } from "gps-plus-slam-js";
|
|
3
4
|
//#region ../src/state/gps-event-coordinator.ts
|
|
4
5
|
const log = createLogger("RecordingCoordinator");
|
|
@@ -58,15 +59,15 @@ function extractOdomRotation(arPose) {
|
|
|
58
59
|
/**
|
|
59
60
|
* Build a RawGpsPoint from GPS position data.
|
|
60
61
|
* Returns only raw sensor fields — no derived fields (coordinates, weight,
|
|
61
|
-
* zeroRef
|
|
62
|
-
*
|
|
62
|
+
* zeroRef). Derived fields are computed by the library reducer when the
|
|
63
|
+
* action is dispatched (raw-storage pattern).
|
|
63
64
|
*
|
|
64
65
|
* @param gpsPosition - GPS position from Geolocation API
|
|
65
|
-
* @param deviceOrientation -
|
|
66
|
+
* @param deviceOrientation - Accepted for signature stability; no longer
|
|
67
|
+
* read (the legacy `compassAbsolute` field it fed is no longer recorded)
|
|
66
68
|
* @returns RawGpsPoint ready for the action payload
|
|
67
69
|
*/
|
|
68
70
|
function buildRawGpsPoint(gpsPosition, deviceOrientation) {
|
|
69
|
-
const compassAbsolute = deviceOrientation ? deviceOrientation.absolute : void 0;
|
|
70
71
|
return {
|
|
71
72
|
id: `gps-${++gpsEventCounter}`,
|
|
72
73
|
latitude: gpsPosition.lat,
|
|
@@ -76,35 +77,44 @@ function buildRawGpsPoint(gpsPosition, deviceOrientation) {
|
|
|
76
77
|
altitudeAccuracy: gpsPosition.altitudeAccuracy ?? void 0,
|
|
77
78
|
heading: gpsPosition.heading ?? void 0,
|
|
78
79
|
speed: gpsPosition.speed ?? void 0,
|
|
79
|
-
compassAbsolute,
|
|
80
80
|
timestamp: gpsPosition.timestamp
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
+
* Map a capture-module {@link AbsoluteOrientationReading} to the library's
|
|
85
|
+
* {@link RawAbsoluteOrientation} payload shape (the only difference is the
|
|
86
|
+
* timestamp field name: capture `timestamp` → payload `sampleTimestamp`).
|
|
87
|
+
* Returns `undefined` when the sensor produced no reading (most non-Chrome).
|
|
88
|
+
*/
|
|
89
|
+
function toRawAbsoluteOrientation(reading) {
|
|
90
|
+
if (!reading) return void 0;
|
|
91
|
+
return {
|
|
92
|
+
quaternion: reading.quaternion,
|
|
93
|
+
referenceFrame: reading.referenceFrame,
|
|
94
|
+
screenAngleDeg: reading.screenAngleDeg,
|
|
95
|
+
sampleTimestamp: reading.timestamp
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
84
99
|
* Build a RecordGpsEventPayload from GPS position and AR pose.
|
|
85
100
|
* This is a pure function for testability.
|
|
86
101
|
*
|
|
87
102
|
* Stores only raw sensor data in the payload. The library reducer
|
|
88
|
-
* computes derived fields (coordinates, weight
|
|
89
|
-
*
|
|
103
|
+
* computes derived fields (coordinates, weight) when the action is
|
|
104
|
+
* processed (raw-storage pattern).
|
|
90
105
|
*
|
|
91
106
|
* @param gpsPosition - GPS position from Geolocation API
|
|
92
107
|
* @param arPose - AR pose from WebXR
|
|
93
108
|
* @param deviceOrientation - Optional device orientation from sensors
|
|
109
|
+
* @param absoluteOrientation - Optional AbsoluteOrientationSensor reading
|
|
94
110
|
* @returns RecordGpsEventPayload ready for dispatch
|
|
95
111
|
*/
|
|
96
|
-
function buildRecordGpsEventPayload(gpsPosition, arPose, deviceOrientation) {
|
|
97
|
-
const rawDeviceOrientation = deviceOrientation?.alpha != null && deviceOrientation?.beta != null && deviceOrientation?.gamma != null ? {
|
|
98
|
-
alpha: deviceOrientation.alpha,
|
|
99
|
-
beta: deviceOrientation.beta,
|
|
100
|
-
gamma: deviceOrientation.gamma,
|
|
101
|
-
absolute: deviceOrientation.absolute
|
|
102
|
-
} : void 0;
|
|
112
|
+
function buildRecordGpsEventPayload(gpsPosition, arPose, deviceOrientation, absoluteOrientation = null) {
|
|
103
113
|
return {
|
|
104
114
|
odomPosition: extractOdomPosition(arPose),
|
|
105
115
|
odomRotation: extractOdomRotation(arPose),
|
|
106
116
|
rawGpsPoint: buildRawGpsPoint(gpsPosition, deviceOrientation),
|
|
107
|
-
|
|
117
|
+
rawAbsoluteOrientation: toRawAbsoluteOrientation(absoluteOrientation)
|
|
108
118
|
};
|
|
109
119
|
}
|
|
110
120
|
/**
|
|
@@ -139,11 +149,11 @@ function createGpsPositionHandler(config) {
|
|
|
139
149
|
log.error("Failed to get zero reference");
|
|
140
150
|
return;
|
|
141
151
|
}
|
|
142
|
-
const payload = buildRecordGpsEventPayload(position, arPose, lastDeviceOrientation);
|
|
152
|
+
const payload = buildRecordGpsEventPayload(position, arPose, lastDeviceOrientation, getLatestAbsoluteOrientation());
|
|
143
153
|
store.dispatch(recordGpsEvent(payload));
|
|
144
154
|
const eventCount = getOdometryPositions(store.getState()).length;
|
|
145
155
|
log.info(`Recorded GPS event #${eventCount}`);
|
|
146
156
|
};
|
|
147
157
|
}
|
|
148
158
|
//#endregion
|
|
149
|
-
export { buildRawGpsPoint, buildRecordGpsEventPayload, createGpsPositionHandler, eulerToQuaternion, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, resetCoordinatorState, updateDeviceOrientation };
|
|
159
|
+
export { buildRawGpsPoint, buildRecordGpsEventPayload, createGpsPositionHandler, eulerToQuaternion, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, resetCoordinatorState, toRawAbsoluteOrientation, updateDeviceOrientation };
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { i as DepthSample, r as DepthPoint } from "../ar-types-
|
|
2
|
-
import {
|
|
3
|
-
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-
|
|
4
|
-
import { d as QrSizeStatus, l as QrSizeEstimate } from "../qr-size-measurer-
|
|
5
|
-
import { a as QrPoseStability, o as QrPoseStabilityOptions, s as QrPoseStabilityStatus } from "../qr-pose-aggregation-
|
|
6
|
-
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-
|
|
7
|
-
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-
|
|
8
|
-
import { n as SessionMetadata } from "../opfs-storage-
|
|
9
|
-
import { n as StorageBackend } from "../storage-backend-
|
|
10
|
-
import { A as
|
|
11
|
-
import { a as eulerToQuaternion, c as getLastDeviceOrientation, i as createGpsPositionHandler, l as resetCoordinatorState, n as buildRawGpsPoint, o as extractOdomPosition, r as buildRecordGpsEventPayload, s as extractOdomRotation, t as RecordingCoordinatorConfig
|
|
12
|
-
import { i as captureGpsAnchorSample, n as GpsAnchorSample, r as GpsAnchorSampleGpsPoint, t as CaptureGpsAnchorSampleOptions } from "../gps-ar-pose-sampler-
|
|
13
|
-
import { n as replayRecording, t as ReplayRecordingOptions } from "../recording-replayer-
|
|
14
|
-
import { n as createPersistenceMiddleware, r as slicePrefixOf, t as PersistenceMiddlewareOptions } from "../persistence-middleware-
|
|
15
|
-
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-
|
|
16
|
-
import { n as subscribeToSelector, t as SubscribableStore } from "../subscribe-to-selector-
|
|
17
|
-
import { n as wireStoreSubscribers, t as StoreSubscriberDeps } from "../store-subscribers-
|
|
18
|
-
import { a as selectOdometryRotations, i as selectOdometryPositions, n as selectFrameTilesInWebXR, o as selectZeroReference, r as selectGpsPositions, t as selectAlignmentMatrix } from "../app-selectors-
|
|
19
|
-
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-
|
|
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,
|
|
1
|
+
import { i as DepthSample, r as DepthPoint } from "../ar-types-BFX2r1wk.js";
|
|
2
|
+
import { C as saveRecordingOptions, E as validateDepthOptions, N as validateRecordingOptions, O as validateImageOptions, S as resetRecordingOptions, _ as RecordingOptionsInput, a as DepthCaptureOptions, b as cloneRecordingOptions, c as IMAGE_CONSTRAINTS, i as DEPTH_CONSTRAINTS, l as ImageCaptureOptions, r as DEFAULT_RECORDING_OPTIONS, v as STORAGE_KEY, x as loadRecordingOptions } from "../recording-options-BPCpMHLK.js";
|
|
3
|
+
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-BuAZxXZ5.js";
|
|
4
|
+
import { d as QrSizeStatus, l as QrSizeEstimate } from "../qr-size-measurer-DQdAsid1.js";
|
|
5
|
+
import { a as QrPoseStability, o as QrPoseStabilityOptions, s as QrPoseStabilityStatus } from "../qr-pose-aggregation-B7tWJq7j.js";
|
|
6
|
+
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-DaxHZvNu.js";
|
|
7
|
+
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-VQssZmQJ.js";
|
|
8
|
+
import { n as SessionMetadata } from "../opfs-storage-3VZh-qH6.js";
|
|
9
|
+
import { n as StorageBackend } from "../storage-backend-BdVLD0dU.js";
|
|
10
|
+
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-n_VF63D5.js";
|
|
11
|
+
import { a as eulerToQuaternion, c as getLastDeviceOrientation, d as updateDeviceOrientation, i as createGpsPositionHandler, l as resetCoordinatorState, n as buildRawGpsPoint, o as extractOdomPosition, r as buildRecordGpsEventPayload, s as extractOdomRotation, t as RecordingCoordinatorConfig } from "../gps-event-coordinator-CjWW636x.js";
|
|
12
|
+
import { i as captureGpsAnchorSample, n as GpsAnchorSample, r as GpsAnchorSampleGpsPoint, t as CaptureGpsAnchorSampleOptions } from "../gps-ar-pose-sampler-DHMZmYAc.js";
|
|
13
|
+
import { n as replayRecording, t as ReplayRecordingOptions } from "../recording-replayer-DQKpAGyQ.js";
|
|
14
|
+
import { n as createPersistenceMiddleware, r as slicePrefixOf, t as PersistenceMiddlewareOptions } from "../persistence-middleware-DAPTTwB2.js";
|
|
15
|
+
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-CmKh_4wf.js";
|
|
16
|
+
import { n as subscribeToSelector, t as SubscribableStore } from "../subscribe-to-selector-B6EUmQ3I.js";
|
|
17
|
+
import { n as wireStoreSubscribers, t as StoreSubscriberDeps } from "../store-subscribers-CA6AJH_8.js";
|
|
18
|
+
import { a as selectOdometryRotations, i as selectOdometryPositions, n as selectFrameTilesInWebXR, o as selectZeroReference, r as selectGpsPositions, t as selectAlignmentMatrix } from "../app-selectors-ikTUQZpe.js";
|
|
19
|
+
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-BODDUTvD.js";
|
|
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 };
|
package/dist/state/index.js
CHANGED
|
@@ -5,12 +5,12 @@ import { endSession, recordDepthSample, recordWriteFailure, recordingReducer, st
|
|
|
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
6
|
import { captureGpsAnchorSample } from "./gps-ar-pose-sampler.js";
|
|
7
7
|
import { selectAlignmentMatrix, selectFrameTilesInWebXR, selectGpsPositions, selectOdometryPositions, selectOdometryRotations, selectZeroReference } from "./app-selectors.js";
|
|
8
|
-
import { DEFAULT_TRACKING_QUALITY_OPTIONS,
|
|
8
|
+
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
9
|
import { createPersistenceMiddleware, slicePrefixOf } from "./persistence-middleware.js";
|
|
10
|
-
import { createSlamAppStore } from "
|
|
10
|
+
import { t as createSlamAppStore } from "../create-slam-app-store-DkCHOpvb.js";
|
|
11
11
|
import { replayRecording } from "./recording-replayer.js";
|
|
12
12
|
import { DEFAULT_MAX_DELAY_MS, ReplayEngine, computeInterActionDelay, extractActionTimestamp } from "./replay-engine.js";
|
|
13
13
|
import { subscribeToSelector } from "./subscribe-to-selector.js";
|
|
14
14
|
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, DEFAULT_RECORDING_OPTIONS, DEFAULT_TRACKING_QUALITY_OPTIONS, DEPTH_CONSTRAINTS, IMAGE_CONSTRAINTS, ReplayEngine, STORAGE_KEY, add2dImage, buildRawGpsPoint, buildRecordGpsEventPayload, calcRelativeCoordsInMeters, captureGpsAnchorSample, clearAllQrMarkers, clearLastRestartedPayload, clearQrMarker, cloneRecordingOptions,
|
|
15
|
+
import { a as computeOnboardingGuidance, i as setZeroPos, n as calcRelativeCoordsInMeters, o as selectOnboardingGuidance, r as recordGpsEvent, t as add2dImage } from "../state-E51QT_-j.js";
|
|
16
|
+
export { DEFAULT_MAX_DELAY_MS, DEFAULT_QR_MAX_HISTORY, DEFAULT_RECORDING_OPTIONS, DEFAULT_TRACKING_QUALITY_OPTIONS, DEPTH_CONSTRAINTS, IMAGE_CONSTRAINTS, ReplayEngine, STORAGE_KEY, 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,2 +1,2 @@
|
|
|
1
|
-
import { n as createPersistenceMiddleware, r as slicePrefixOf, t as PersistenceMiddlewareOptions } from "../persistence-middleware-
|
|
1
|
+
import { n as createPersistenceMiddleware, r as slicePrefixOf, t as PersistenceMiddlewareOptions } from "../persistence-middleware-DAPTTwB2.js";
|
|
2
2
|
export { PersistenceMiddlewareOptions, createPersistenceMiddleware, slicePrefixOf };
|
|
@@ -77,27 +77,38 @@ function createPersistenceMiddleware(options) {
|
|
|
77
77
|
const excludedActionType = recordWriteFailure.type;
|
|
78
78
|
let actionIndex = 0;
|
|
79
79
|
const writeQueue = new WriteQueue();
|
|
80
|
+
let dispatchDepth = 0;
|
|
81
|
+
let hasWarnedReentrant = false;
|
|
80
82
|
const middleware = (store) => (next) => (action) => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
log.error("Failed to persist action:", normalized);
|
|
96
|
-
store.dispatch(recordWriteFailure(normalized.message));
|
|
97
|
-
if (onWriteFailure) onWriteFailure(normalized);
|
|
83
|
+
dispatchDepth += 1;
|
|
84
|
+
try {
|
|
85
|
+
const typedAction = action;
|
|
86
|
+
const actionType = typeof typedAction.type === "string" ? typedAction.type : null;
|
|
87
|
+
const wasRecording = readIsRecording(store.getState());
|
|
88
|
+
const result = next(action);
|
|
89
|
+
if (!actionType) return result;
|
|
90
|
+
if (actionType === startSession.type) actionIndex = 0;
|
|
91
|
+
if (!isInPersistableSession(wasRecording, readIsRecording(store.getState()), actionType)) return result;
|
|
92
|
+
if (!(actionType !== excludedActionType && normalizedPrefixes.some((prefix) => actionType.startsWith(prefix)))) return result;
|
|
93
|
+
const index = ++actionIndex;
|
|
94
|
+
if (dispatchDepth > 1 && !hasWarnedReentrant) {
|
|
95
|
+
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.`);
|
|
98
97
|
}
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
writeQueue.enqueue(async () => {
|
|
99
|
+
try {
|
|
100
|
+
await storageBackend.writeAction(typedAction, index);
|
|
101
|
+
} catch (err) {
|
|
102
|
+
const normalized = err instanceof Error ? err : new Error(String(err));
|
|
103
|
+
log.error("Failed to persist action:", normalized);
|
|
104
|
+
store.dispatch(recordWriteFailure(normalized.message));
|
|
105
|
+
if (onWriteFailure) onWriteFailure(normalized);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return result;
|
|
109
|
+
} finally {
|
|
110
|
+
dispatchDepth -= 1;
|
|
111
|
+
}
|
|
101
112
|
};
|
|
102
113
|
return middleware;
|
|
103
114
|
}
|
|
@@ -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-DQdAsid1.js";
|
|
2
|
+
import { a as QrPoseStability, o as QrPoseStabilityOptions, s as QrPoseStabilityStatus } from "../qr-pose-aggregation-B7tWJq7j.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-VQssZmQJ.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,5 +1,5 @@
|
|
|
1
1
|
import { deriveQrPlacement, deriveSolvedQrPose } from "../ar/qr-derived-pose.js";
|
|
2
|
-
import { i as evaluateQrPoseStability } from "../qr-pose-aggregation-
|
|
2
|
+
import { i as evaluateQrPoseStability } from "../qr-pose-aggregation-DBiaLW0O.js";
|
|
3
3
|
import { createSlice } from "@reduxjs/toolkit";
|
|
4
4
|
//#region ../src/state/qr-detected-slice.ts
|
|
5
5
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
export { ArCrashIsolationOptions, DEFAULT_RECORDING_OPTIONS, DEPTH_CONSTRAINTS, DepthCaptureOptions, FRAME_TILE_DISPLAY_CONSTRAINTS, FrameTileDisplayOptions, IMAGE_CONSTRAINTS, ImageCaptureOptions, OCCUPANCY_CONSTRAINTS, OccupancyOptions, QR_CONSTRAINTS, QrCaptureOptions, RecordingOptions, RecordingOptionsInput, STORAGE_KEY, VisualizationOptions, cloneRecordingOptions, loadRecordingOptions, resetRecordingOptions, saveRecordingOptions, validateArCrashIsolationOptions, validateDepthOptions, validateFrameTileDisplayOptions, validateImageOptions, validateOccupancyOptions, validateQrOptions, validateRecordingOptions, validateVisualizationOptions };
|
|
1
|
+
import { A as validateOccupancyOptions, C as saveRecordingOptions, D as validateFrameTileDisplayOptions, E as validateDepthOptions, M as validateQualityFilterOptions, N as validateRecordingOptions, O as validateImageOptions, P as validateVisualizationOptions, S as resetRecordingOptions, T as validateCompassDebugOptions, _ as RecordingOptionsInput, a as DepthCaptureOptions, b as cloneRecordingOptions, c as IMAGE_CONSTRAINTS, d as OCCUPANCY_CONSTRAINTS, f as OccupancyOptions, g as RecordingOptions, h as QrCaptureOptions, i as DEPTH_CONSTRAINTS, j as validateQrOptions, k as validateMotionFilterOptions, l as ImageCaptureOptions, m as QUALITY_FILTER_CONSTRAINTS, n as CompassDebugOptions, o as FRAME_TILE_DISPLAY_CONSTRAINTS, p as QR_CONSTRAINTS, r as DEFAULT_RECORDING_OPTIONS, s as FrameTileDisplayOptions, t as ArCrashIsolationOptions, u as MOTION_FILTER_CONSTRAINTS, v as STORAGE_KEY, w as validateArCrashIsolationOptions, x as loadRecordingOptions, y as VisualizationOptions } from "../recording-options-BPCpMHLK.js";
|
|
2
|
+
export { ArCrashIsolationOptions, CompassDebugOptions, DEFAULT_RECORDING_OPTIONS, DEPTH_CONSTRAINTS, DepthCaptureOptions, FRAME_TILE_DISPLAY_CONSTRAINTS, FrameTileDisplayOptions, IMAGE_CONSTRAINTS, ImageCaptureOptions, MOTION_FILTER_CONSTRAINTS, OCCUPANCY_CONSTRAINTS, OccupancyOptions, QR_CONSTRAINTS, QUALITY_FILTER_CONSTRAINTS, QrCaptureOptions, RecordingOptions, RecordingOptionsInput, STORAGE_KEY, VisualizationOptions, cloneRecordingOptions, loadRecordingOptions, resetRecordingOptions, saveRecordingOptions, validateArCrashIsolationOptions, validateCompassDebugOptions, validateDepthOptions, validateFrameTileDisplayOptions, validateImageOptions, validateMotionFilterOptions, validateOccupancyOptions, validateQrOptions, validateQualityFilterOptions, validateRecordingOptions, validateVisualizationOptions };
|