gps-plus-slam-app-framework 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/LICENSE +4 -4
  2. package/README.md +249 -108
  3. package/dist/accuracy-circles-CsxE_7x1.d.ts +43 -0
  4. package/dist/{app-selectors-CHt7DLuq.d.ts → app-selectors-BeU0_ab8.d.ts} +8 -10
  5. package/dist/ar/camera-blit-capture.d.ts +1 -1
  6. package/dist/ar/capture-failure-tracker.d.ts +1 -1
  7. package/dist/ar/chromium-camera-access-workaround.d.ts +1 -1
  8. package/dist/ar/depth-sampler.d.ts +2 -2
  9. package/dist/ar/frame-loop.d.ts +2 -0
  10. package/dist/ar/frame-loop.js +40 -0
  11. package/dist/ar/image-capture.d.ts +1 -1
  12. package/dist/ar/image-capture.js +1 -1
  13. package/dist/ar/index.d.ts +12 -12
  14. package/dist/ar/index.js +3 -3
  15. package/dist/ar/replay-scene.d.ts +1 -1
  16. package/dist/ar/scene-node-names.d.ts +1 -1
  17. package/dist/ar/webxr-session.d.ts +4 -4
  18. package/dist/ar/webxr-session.js +150 -55
  19. package/dist/ar/xr-camera-texture.d.ts +1 -1
  20. package/dist/ar/xr-error-handler.d.ts +1 -1
  21. package/dist/core/index.d.ts +2 -2
  22. package/dist/core/index.js +2 -2
  23. package/dist/create-slam-app-store-CNsZ3rcX.d.ts +371 -0
  24. package/dist/{depth-sampler-BNCtnEoP.d.ts → depth-sampler-xg8vna6c.d.ts} +1 -1
  25. package/dist/{file-system-DD5TczSO.d.ts → file-system-DTApEv_Q.d.ts} +32 -2
  26. package/dist/frame-loop-QJIxLin0.d.ts +42 -0
  27. package/dist/frustum-visibility-BHnFrSKQ.d.ts +58 -0
  28. package/dist/{fused-path-DtqCSqJh.d.ts → fused-path-CB4DwWOG.d.ts} +1 -1
  29. package/dist/geo/h3-proximity.d.ts +1 -1
  30. package/dist/geo/index.d.ts +1 -1
  31. package/dist/{geo-types-Xx-LVcnw.d.ts → geo-types-CTuF23gG.d.ts} +16 -1
  32. package/dist/{gps-GKc6_Cly.d.ts → gps-DXoQb9Kf.d.ts} +1 -1
  33. package/dist/gps-anchor-CnWY61XK.d.ts +48 -0
  34. package/dist/gps-anchor-DjC_3MoT.js +257 -0
  35. package/dist/{gps-ar-pose-sampler-D_Zso40V.d.ts → gps-ar-pose-sampler-DsM1Kb2N.d.ts} +1 -1
  36. package/dist/{gps-event-coordinator-fwvmVfku.d.ts → gps-event-coordinator-DBx9I1YX.d.ts} +3 -3
  37. package/dist/gps-event-markers-BGr-iLvi.d.ts +103 -0
  38. package/dist/{image-capture-2pKjYUS6.d.ts → image-capture-DZLxHDN9.d.ts} +1 -1
  39. package/dist/index-gzWJMVpo.d.ts +2 -0
  40. package/dist/index-pOjUCKEP.d.ts +24 -0
  41. package/dist/index.d.ts +58 -52
  42. package/dist/index.js +11 -5
  43. package/dist/{leaflet-map-overlay-CQZcnxbc.d.ts → leaflet-map-overlay-Cew7XAoO.d.ts} +22 -11
  44. package/dist/{logger-B81iwxx0.d.ts → logger-C9vugiQb.d.ts} +7 -1
  45. package/dist/map-data-sih4g64v.d.ts +49 -0
  46. package/dist/map-overlay-draw-B3R1c9Xp.d.ts +42 -0
  47. package/dist/{null-storage-backend-C0TiwwzQ.d.ts → null-storage-backend-BKOS7JpL.d.ts} +2 -2
  48. package/dist/{opfs-storage-backend-Gt3rd76D.d.ts → opfs-storage-backend-Cj_7PWoq.d.ts} +2 -2
  49. package/dist/{permission-checker-Cu3nbH1S.d.ts → permission-checker-DPJl_RU6.d.ts} +41 -1
  50. package/dist/persistence-middleware-BkHIqvaA.d.ts +55 -0
  51. package/dist/{recording-replayer-BFhFs7Mc.d.ts → recording-replayer-CmCIIZ02.d.ts} +2 -2
  52. package/dist/{recording-slice-BiktUIWF.d.ts → recording-slice-d6OtCrza.d.ts} +2 -2
  53. package/dist/{replay-engine-B88Va62x.d.ts → replay-engine-BGBRQyXs.d.ts} +1 -1
  54. package/dist/{replay-scene-DtUm6bsr.d.ts → replay-scene-DpAGcAKY.d.ts} +3 -3
  55. package/dist/sensors/gps-error-handler.d.ts +1 -1
  56. package/dist/sensors/gps.d.ts +1 -1
  57. package/dist/sensors/gps.js +2 -2
  58. package/dist/sensors/index.d.ts +3 -3
  59. package/dist/sensors/permission-checker.d.ts +2 -2
  60. package/dist/sensors/permission-checker.js +79 -1
  61. package/dist/state/app-selectors.d.ts +2 -2
  62. package/dist/state/app-selectors.js +33 -3
  63. package/dist/state/combined-root-state.d.ts +2 -0
  64. package/dist/state/combined-root-state.js +1 -0
  65. package/dist/state/create-slam-app-store.d.ts +1 -1
  66. package/dist/state/create-slam-app-store.js +27 -13
  67. package/dist/state/gps-ar-pose-sampler.d.ts +3 -3
  68. package/dist/state/gps-event-coordinator.d.ts +1 -1
  69. package/dist/state/index.d.ts +17 -16
  70. package/dist/state/index.js +6 -4
  71. package/dist/state/persistence-middleware.d.ts +2 -2
  72. package/dist/state/persistence-middleware.js +35 -7
  73. package/dist/state/recording-options.d.ts +1 -1
  74. package/dist/state/recording-replayer.d.ts +2 -2
  75. package/dist/state/recording-slice.d.ts +1 -1
  76. package/dist/state/replay-engine.d.ts +1 -1
  77. package/dist/state/store-subscribers.d.ts +2 -2
  78. package/dist/state/store-subscribers.js +38 -12
  79. package/dist/state/subscribe-to-selector.d.ts +1 -1
  80. package/dist/state/tracking-quality.d.ts +2 -0
  81. package/dist/state/tracking-quality.js +723 -0
  82. package/dist/state/tracking-slice.d.ts +2 -0
  83. package/dist/state/tracking-slice.js +147 -0
  84. package/dist/storage/file-system-utils.d.ts +1 -1
  85. package/dist/storage/file-system.d.ts +2 -2
  86. package/dist/storage/file-system.js +52 -1
  87. package/dist/storage/index.d.ts +8 -8
  88. package/dist/storage/null-storage-backend.d.ts +1 -1
  89. package/dist/storage/opfs-storage-backend.d.ts +1 -1
  90. package/dist/storage/opfs-storage.d.ts +1 -1
  91. package/dist/storage/storage-backend.d.ts +1 -1
  92. package/dist/storage/zip-export.d.ts +1 -1
  93. package/dist/storage/zip-reader.d.ts +1 -1
  94. package/dist/storage/zip-reader.js +8 -4
  95. package/dist/{storage-backend-yVnuWGTr.d.ts → storage-backend-CT0Il_AB.d.ts} +1 -1
  96. package/dist/{store-subscribers-DKKHld49.d.ts → store-subscribers-Dce_CoJF.d.ts} +31 -6
  97. package/dist/{subscribe-to-selector-ghDKYtap.d.ts → subscribe-to-selector-DIHm3BRZ.d.ts} +1 -1
  98. package/dist/test-utils/browser-mocks.d.ts +1 -1
  99. package/dist/test-utils/zip-round-trip-helpers.d.ts +7 -1
  100. package/dist/test-utils/zip-round-trip-helpers.js +2 -1
  101. package/dist/tracking-slice-utCNND8t.d.ts +86 -0
  102. package/dist/types/ar-types.d.ts +1 -1
  103. package/dist/types/geo-types.d.ts +2 -2
  104. package/dist/types/index.d.ts +3 -3
  105. package/dist/utils/concurrency.d.ts +1 -1
  106. package/dist/utils/failure-tracker.d.ts +1 -1
  107. package/dist/utils/format-file-size.d.ts +1 -1
  108. package/dist/utils/fused-path.d.ts +1 -1
  109. package/dist/utils/index.d.ts +6 -6
  110. package/dist/utils/list-formatter.d.ts +1 -1
  111. package/dist/utils/logger.d.ts +1 -1
  112. package/dist/utils/logger.js +68 -8
  113. package/dist/visualization/accuracy-circles.d.ts +2 -0
  114. package/dist/visualization/accuracy-circles.js +57 -0
  115. package/dist/visualization/alignment-lerper.d.ts +1 -1
  116. package/dist/visualization/camera-follower.d.ts +1 -1
  117. package/dist/visualization/css3d-renderer-manager.d.ts +1 -1
  118. package/dist/visualization/frustum-visibility.d.ts +2 -0
  119. package/dist/visualization/frustum-visibility.js +139 -0
  120. package/dist/visualization/gps-anchor.d.ts +2 -0
  121. package/dist/visualization/gps-anchor.js +2 -0
  122. package/dist/visualization/gps-compass-cubes.d.ts +1 -1
  123. package/dist/visualization/gps-event-markers.d.ts +2 -2
  124. package/dist/visualization/gps-event-markers.js +69 -2
  125. package/dist/visualization/index.d.ts +17 -12
  126. package/dist/visualization/index.js +6 -2
  127. package/dist/visualization/leaflet-map-overlay.d.ts +1 -1
  128. package/dist/visualization/leaflet-map-overlay.js +33 -79
  129. package/dist/visualization/lerp-utils.d.ts +1 -1
  130. package/dist/visualization/map-data.d.ts +2 -0
  131. package/dist/visualization/map-data.js +33 -0
  132. package/dist/visualization/map-overlay-draw.d.ts +2 -0
  133. package/dist/visualization/map-overlay-draw.js +107 -0
  134. package/dist/visualization/map-overlay.d.ts +1 -1
  135. package/dist/visualization/three-dispose.d.ts +1 -1
  136. package/dist/visualization/vis-colors.d.ts +1 -1
  137. package/dist/{webxr-session-COlSrXdL.d.ts → webxr-session-DB5cIZnN.d.ts} +53 -12
  138. package/dist/{zip-reader-KgJEXbca.d.ts → zip-reader-D1105idz.d.ts} +5 -0
  139. package/package.json +16 -16
  140. package/dist/ar/tracking-state.d.ts +0 -2
  141. package/dist/ar/tracking-state.js +0 -164
  142. package/dist/combined-root-state-B3SvPNjU.d.ts +0 -6
  143. package/dist/create-slam-app-store-DBm7g2Zd.d.ts +0 -85
  144. package/dist/gps-anchored-mesh-manager-CovAFK4g.d.ts +0 -56
  145. package/dist/gps-event-markers-sVyO9utS.d.ts +0 -67
  146. package/dist/persistence-middleware-z-75iisb.d.ts +0 -31
  147. package/dist/tracking-state-B9QfuZCg.d.ts +0 -101
  148. package/dist/visualization/gps-anchored-mesh-manager.d.ts +0 -2
  149. package/dist/visualization/gps-anchored-mesh-manager.js +0 -128
  150. /package/dist/{alignment-lerper-D9BeDwZX.d.ts → alignment-lerper-L1RbWHQ4.d.ts} +0 -0
  151. /package/dist/{ar-types-B-ORgk6Z.d.ts → ar-types-Ck8LEq8k.d.ts} +0 -0
  152. /package/dist/{camera-blit-capture-DHuyrrxr.d.ts → camera-blit-capture-C1V9I1Z6.d.ts} +0 -0
  153. /package/dist/{camera-follower-BMqPddxx.d.ts → camera-follower-1k8mnw5J.d.ts} +0 -0
  154. /package/dist/{capture-failure-tracker-2Q6oI2uQ.d.ts → capture-failure-tracker-JKb1ST8E.d.ts} +0 -0
  155. /package/dist/{chromium-camera-access-workaround-CU5zSKNr.d.ts → chromium-camera-access-workaround-NvChXsi8.d.ts} +0 -0
  156. /package/dist/{concurrency-p6gB30fT.d.ts → concurrency-CMw8pSaG.d.ts} +0 -0
  157. /package/dist/{css3d-renderer-manager-rgLMVAvd.d.ts → css3d-renderer-manager-CkjCb2HW.d.ts} +0 -0
  158. /package/dist/{failure-tracker-1sQ_Cgyw.d.ts → failure-tracker-DnHXOIRa.d.ts} +0 -0
  159. /package/dist/{file-system-utils-BH8FdyIu.d.ts → file-system-utils-CtKiiw27.d.ts} +0 -0
  160. /package/dist/{format-file-size-onGq0k1Q.d.ts → format-file-size-BTS5H62-.d.ts} +0 -0
  161. /package/dist/{gps-compass-cubes-jRIJMOuh.d.ts → gps-compass-cubes-CsLtFv4B.d.ts} +0 -0
  162. /package/dist/{gps-error-handler-CH1S528z.d.ts → gps-error-handler-Dg3ziRVY.d.ts} +0 -0
  163. /package/dist/{h3-proximity-GwesPTFT.d.ts → h3-proximity-BhfgNbdW.d.ts} +0 -0
  164. /package/dist/{lerp-utils-CZgQlrmu.d.ts → lerp-utils-B8MM8zCR.d.ts} +0 -0
  165. /package/dist/{list-formatter-DKQQVLcl.d.ts → list-formatter-CNqi-E2j.d.ts} +0 -0
  166. /package/dist/{map-overlay-C9ifl_4-.d.ts → map-overlay-DAmreyA3.d.ts} +0 -0
  167. /package/dist/{opfs-storage-Dlq1I_Gb.d.ts → opfs-storage-DOPkzgeT.d.ts} +0 -0
  168. /package/dist/{recording-options-BYUFX8iU.d.ts → recording-options-Dq6IsKAv.d.ts} +0 -0
  169. /package/dist/{scene-node-names-DPsaE2z3.d.ts → scene-node-names-6LBjPmwz.d.ts} +0 -0
  170. /package/dist/{three-dispose-qt_r5wR1.d.ts → three-dispose-C2drkp6f.d.ts} +0 -0
  171. /package/dist/{vis-colors-BKkdTIKb.d.ts → vis-colors-CHQhjal3.d.ts} +0 -0
  172. /package/dist/{xr-camera-texture-BbukNE79.d.ts → xr-camera-texture-BU5YvKAM.d.ts} +0 -0
  173. /package/dist/{xr-error-handler-DTHfmvrl.d.ts → xr-error-handler-CDY5QxGb.d.ts} +0 -0
  174. /package/dist/{zip-export-BjrQPv0X.d.ts → zip-export-QO4iLIi7.d.ts} +0 -0
package/dist/index.js CHANGED
@@ -6,13 +6,14 @@ import { createFailureTracker } from "./utils/failure-tracker.js";
6
6
  import { CAPTURE_FAILURE_WARNING, DEFAULT_CAPTURE_TRACKER_CONFIG, createCaptureFailureTracker } from "./ar/capture-failure-tracker.js";
7
7
  import { buildRawGpsPoint, buildRecordGpsEventPayload, createGpsPositionHandler, eulerToQuaternion, extractOdomPosition, extractOdomRotation, getLastDeviceOrientation, resetCoordinatorState, updateDeviceOrientation } from "./state/gps-event-coordinator.js";
8
8
  import { DepthSampler } from "./ar/depth-sampler.js";
9
+ import { registerFrameUpdate } from "./ar/frame-loop.js";
9
10
  import { DEFAULT_CAPTURE_CONFIG, ImageCaptureManager, MIN_VALID_IMAGE_BYTES } from "./ar/image-capture.js";
10
- import { TrackingState, TrackingStateManager } from "./ar/tracking-state.js";
11
+ import { clearLastRestartedPayload, originReset, poseLost, poseReceived, resetTracking, selectLastRestartedPayload, selectLastSensorOrientation, selectLastValidPose, selectLostFrameCount, selectTrackingPhase, trackingReducer } from "./state/tracking-slice.js";
11
12
  import { acquireCameraTexture } from "./ar/xr-camera-texture.js";
12
13
  import { DEFAULT_RECORDING_OPTIONS, DEPTH_CONSTRAINTS, IMAGE_CONSTRAINTS, STORAGE_KEY, cloneRecordingOptions, loadRecordingOptions, resetRecordingOptions, saveRecordingOptions, validateDepthOptions, validateImageOptions, validateRecordingOptions } from "./state/recording-options.js";
13
14
  import { SCENE_NODE } from "./ar/scene-node-names.js";
14
15
  import { createCss3dRendererManager } from "./visualization/css3d-renderer-manager.js";
15
- import { endARSession, getDepthSampleCount, getImageCaptureFrameCount, getLiveCss3dManager, initAR, setDepthCaptureCallback, setFrameCallback, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, startDepthCapture, startImageCapture, stopDepthCapture, stopImageCapture } from "./ar/webxr-session.js";
16
+ import { endARSession, getDepthSampleCount, getImageCaptureFrameCount, getLiveCss3dManager, initAR, setDepthCaptureCallback, setFrameCallback, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, setTrackingStore, startDepthCapture, startImageCapture, stopDepthCapture, stopImageCapture } from "./ar/webxr-session.js";
16
17
  import { DEFAULT_LERP_RATE, clampedAlpha } from "./visualization/lerp-utils.js";
17
18
  import { createCameraFollower } from "./visualization/camera-follower.js";
18
19
  import { createAlignmentLerper } from "./visualization/alignment-lerper.js";
@@ -37,20 +38,25 @@ import { endSession, recordDepthSample, recordWriteFailure, recordingReducer, st
37
38
  import { MAX_ACTION_FILE_SIZE, loadActionsFromZip, loadGpsPathFromBlob, loadSessionMetadataFromBlob, readZipEntries } from "./storage/zip-reader.js";
38
39
  import { formatActionFilename, formatFrameFilename, formatTimestamp } from "./storage/file-system-utils.js";
39
40
  import { NullStorageBackend } from "./storage/null-storage-backend.js";
41
+ import { DEFAULT_TRACKING_QUALITY_OPTIONS, computeCompassAgreement, computeConvergence, computeCoverage, computeGpsAccuracy, computeGpsVsFusedDivergence, computeResidualConsensus, computeTrackingQualityReport, createTrackingQualityListenerMiddleware, firstAgreementReached, matrixDelta, reportUpdated, resetTrackingQuality, selectFirstAgreementObservationIndex, selectRecentAlignments, selectTrackingQuality, snapshotPushed, snapshotsTrimmed, trackingQualityReducer } from "./state/tracking-quality.js";
40
42
  import { createSlamAppStore } from "./state/create-slam-app-store.js";
41
43
  import { replayRecording } from "./state/recording-replayer.js";
42
44
  import { DEFAULT_MAX_DELAY_MS, ReplayEngine, computeInterActionDelay, extractActionTimestamp } from "./state/replay-engine.js";
45
+ import { buildMapData } from "./visualization/map-data.js";
43
46
  import { wireStoreSubscribers } from "./state/store-subscribers.js";
44
- import { add2dImage, calcRelativeCoordsInMeters, markReferencePoint, recordGpsEvent, setZeroPos } from "./state/index.js";
47
+ import { add2dImage, calcRelativeCoordsInMeters, recordGpsEvent, setZeroPos } from "./state/index.js";
45
48
  import { checkStorageQuota, createSession, getAppRootHandle, getSessionHandle, getSessionsRootHandle, initOpfsStorage, listSessions, resetOpfsStorage, resetSessionHandles } from "./storage/opfs-storage.js";
46
49
  import { initStorage, resetForNewSession, resetStorageState, startSession as startSession$1, verifyWriteAccess, writeAction, writeFrame } from "./storage/file-system.js";
47
50
  import { OpfsStorageBackend } from "./storage/opfs-storage-backend.js";
48
51
  import { downloadZip, exportAndDownloadSession, exportSessionAsZip, syncToExternalZip } from "./storage/zip-export.js";
49
52
  import "./storage/index.js";
53
+ import { buildCameraFrustum, isObjectInCameraFrustum, isPointInCameraFrustum, isSphereInCameraFrustum } from "./visualization/frustum-visibility.js";
54
+ import { n as nueToArLocal, t as createGpsAnchor } from "./gps-anchor-DjC_3MoT.js";
50
55
  import { GpsEventVisualizer, gpsEventVisualizer } from "./visualization/gps-event-markers.js";
56
+ import { ACCURACY_CIRCLE_FILL_OPACITY, ACCURACY_CIRCLE_STROKE_OPACITY, ACCURACY_CIRCLE_WEIGHT, addAccuracyCircles } from "./visualization/accuracy-circles.js";
57
+ import { ALIGNMENT_SNAPSHOT_COLOR, FUSED_PATH_COLOR, MAP_PATH_POLYLINE_OPACITY, MAP_PATH_POLYLINE_WEIGHT, RAW_GPS_COLOR, USER_POSITION_COLOR, drawMapData } from "./visualization/map-overlay-draw.js";
51
58
  import { DEFAULT_LEAFLET_MAP_SIZE_PX, DEFAULT_WORLD_SIZE, DEFAULT_Z_OFFSET, LeafletMapOverlay } from "./visualization/leaflet-map-overlay.js";
52
59
  import { DEFAULT_HEIGHT_OFFSET, DEFAULT_MAP_SIZE, DEFAULT_ZOOM, MapOverlay, latLonToTileXY, tileXYToLatLon } from "./visualization/map-overlay.js";
53
- import { GpsAnchoredMeshManager } from "./visualization/gps-anchored-mesh-manager.js";
54
60
  import "./visualization/index.js";
55
61
  import { COMMUNITY_LICENSE_KEY } from "./licensing/index.js";
56
- export { CAPTURE_FAILURE_WARNING, COMMUNITY_LICENSE_KEY, COMPASS_CUBE_DISTANCE, COMPASS_CUBE_SIZE, CameraBlitCapture, DEFAULT_BLIT_CONFIG, DEFAULT_CAPTURE_CONFIG, DEFAULT_CAPTURE_TRACKER_CONFIG, DEFAULT_HEIGHT_OFFSET, DEFAULT_LEAFLET_MAP_SIZE_PX, DEFAULT_LERP_RATE, DEFAULT_MAP_SIZE, DEFAULT_MAX_DELAY_MS, DEFAULT_RECORDING_OPTIONS, DEFAULT_WORLD_SIZE, DEFAULT_ZOOM, DEFAULT_Z_OFFSET, DEPTH_CONSTRAINTS, DepthSampler, GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, GpsAnchoredMeshManager, GpsEventVisualizer, H3_RESOLUTION, IMAGE_CONSTRAINTS, ImageCaptureManager, LeafletMapOverlay, LogLevel, MAX_ACTION_FILE_SIZE, MIN_VALID_IMAGE_BYTES, MapOverlay, NullStorageBackend, OpfsStorageBackend, ReplayEngine, SCENE_NODE, STORAGE_KEY, TrackingState, TrackingStateManager, VIS_COLORS, XR_ERROR_MESSAGES, XR_ERROR_MESSAGE_UNKNOWN, acquireCameraTexture, add2dImage, applyChromiumProjectionLayerWorkaround, approxDistanceMetres, buildRawGpsPoint, buildRecordGpsEventPayload, calcRelativeCoordsInMeters, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkStorageQuota, checkWebXRSupport, clampedAlpha, clearLogBuffer, cloneRecordingOptions, computeCaptureSize, computeFusedPath, computeInterActionDelay, createAlignmentLerper, createCameraFollower, createCaptureFailureTracker, createCss3dRendererManager, createFailureTracker, createGpsCompassCubes, createGpsErrorHandler, createGpsPositionHandler, createLogger, createSession, createSlamAppStore, disposeMeshArray, disposeObject3D, disposeReplayScene, downloadZip, endARSession, endSession, eulerToQuaternion, exportAndDownloadSession, exportSessionAsZip, extractActionTimestamp, extractOdomPosition, extractOdomRotation, findNearbyGeoAnchor, formatActionFilename, formatFileSize, formatFrameFilename, formatTimestamp, fusedGpsFromOdom, getAlignmentLerper, getAppRootHandle, getCameraFollower, getCameraMode, getDepthSampleCount, getGlobalLogLevel, getGpsErrorMessage, getImageCaptureFrameCount, getLastDeviceOrientation, getLiveCss3dManager, getLogBuffer, getReplayState, getSessionHandle, getSessionsRootHandle, getXrErrorMessage, gpsEventVisualizer, gpsToH3, h3CellsMatch, initAR, initOpfsStorage, initReplayScene, initStorage, isH3Index, latLonToTileXY, listFormatter, listSessions, loadActionsFromZip, loadGpsPathFromBlob, loadRecordingOptions, loadSessionMetadataFromBlob, mapWithConcurrencyLimit, markReferencePoint, readZipEntries, recordDepthSample, recordGpsEvent, recordWriteFailure, recordingReducer, replayRecording, requestAllPermissions, requestCameraPermission, requestOrientationPermission as requestDeviceOrientationPermission, requestGeolocationPermission, requestOrientationPermission$1 as requestOrientationPermission, requestWebXRWithDepthPermission, resetCoordinatorState, resetFileSystemState, resetForNewSession, resetOpfsStorage, resetRecordingOptions, resetSessionHandles, resetStorageState, saveRecordingOptions, setDepthCaptureCallback, setFileSystemState, setFrameCallback, setGlobalLogLevel, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, setZeroPos, startDepthCapture, startGpsWatch, startImageCapture, startOrientationWatch, startSession, startSession$1 as startStorageSession, stopDepthCapture, stopGpsWatch, stopImageCapture, stopOrientationWatch, subscribeToLogs, syncToExternalZip, tileXYToLatLon, toggleCameraMode, updateDeviceOrientation, updateOrbitTarget, validateDepthOptions, validateImageOptions, validateRecordingOptions, verifyWriteAccess, wireStoreSubscribers, writeAction, writeFrame };
62
+ export { ACCURACY_CIRCLE_FILL_OPACITY, ACCURACY_CIRCLE_STROKE_OPACITY, ACCURACY_CIRCLE_WEIGHT, ALIGNMENT_SNAPSHOT_COLOR, CAPTURE_FAILURE_WARNING, COMMUNITY_LICENSE_KEY, COMPASS_CUBE_DISTANCE, COMPASS_CUBE_SIZE, CameraBlitCapture, DEFAULT_BLIT_CONFIG, DEFAULT_CAPTURE_CONFIG, DEFAULT_CAPTURE_TRACKER_CONFIG, DEFAULT_HEIGHT_OFFSET, DEFAULT_LEAFLET_MAP_SIZE_PX, DEFAULT_LERP_RATE, DEFAULT_MAP_SIZE, DEFAULT_MAX_DELAY_MS, DEFAULT_RECORDING_OPTIONS, DEFAULT_TRACKING_QUALITY_OPTIONS, DEFAULT_WORLD_SIZE, DEFAULT_ZOOM, DEFAULT_Z_OFFSET, DEPTH_CONSTRAINTS, DepthSampler, FUSED_PATH_COLOR, GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, GpsEventVisualizer, H3_RESOLUTION, IMAGE_CONSTRAINTS, ImageCaptureManager, LeafletMapOverlay, LogLevel, MAP_PATH_POLYLINE_OPACITY, MAP_PATH_POLYLINE_WEIGHT, MAX_ACTION_FILE_SIZE, MIN_VALID_IMAGE_BYTES, MapOverlay, NullStorageBackend, OpfsStorageBackend, RAW_GPS_COLOR, ReplayEngine, SCENE_NODE, STORAGE_KEY, USER_POSITION_COLOR, VIS_COLORS, XR_ERROR_MESSAGES, XR_ERROR_MESSAGE_UNKNOWN, acquireCameraTexture, add2dImage, addAccuracyCircles, applyChromiumProjectionLayerWorkaround, approxDistanceMetres, buildCameraFrustum, buildMapData, buildRawGpsPoint, buildRecordGpsEventPayload, calcRelativeCoordsInMeters, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkStorageQuota, checkWebXRSupport, clampedAlpha, clearLastRestartedPayload, clearLogBuffer, cloneRecordingOptions, computeCaptureSize, computeCompassAgreement, computeConvergence, computeCoverage, computeFusedPath, computeGpsAccuracy, computeGpsVsFusedDivergence, computeInterActionDelay, computeResidualConsensus, computeTrackingQualityReport, createAlignmentLerper, createCameraFollower, createCaptureFailureTracker, createCss3dRendererManager, createFailureTracker, createGpsAnchor, createGpsCompassCubes, createGpsErrorHandler, createGpsPositionHandler, createLogger, createSession, createSlamAppStore, createTrackingQualityListenerMiddleware, disposeMeshArray, disposeObject3D, disposeReplayScene, downloadZip, drawMapData, endARSession, endSession, eulerToQuaternion, exportAndDownloadSession, exportSessionAsZip, extractActionTimestamp, extractOdomPosition, extractOdomRotation, findNearbyGeoAnchor, firstAgreementReached, formatActionFilename, formatFileSize, formatFrameFilename, formatTimestamp, fusedGpsFromOdom, getAlignmentLerper, getAppRootHandle, getCameraFollower, getCameraMode, getDepthSampleCount, getGlobalLogLevel, getGpsErrorMessage, getImageCaptureFrameCount, getLastDeviceOrientation, getLiveCss3dManager, getLogBuffer, getReplayState, getSessionHandle, getSessionsRootHandle, getXrErrorMessage, gpsEventVisualizer, gpsToH3, h3CellsMatch, initAR, initOpfsStorage, initReplayScene, initStorage, isH3Index, isObjectInCameraFrustum, isPointInCameraFrustum, isSphereInCameraFrustum, latLonToTileXY, listFormatter, listSessions, loadActionsFromZip, loadGpsPathFromBlob, loadRecordingOptions, loadSessionMetadataFromBlob, mapWithConcurrencyLimit, matrixDelta, nueToArLocal, originReset, poseLost, poseReceived, readZipEntries, recordDepthSample, recordGpsEvent, recordWriteFailure, recordingReducer, registerFrameUpdate, replayRecording, reportUpdated, requestAllPermissions, requestCameraPermission, requestOrientationPermission as requestDeviceOrientationPermission, requestGeolocationPermission, requestOrientationPermission$1 as requestOrientationPermission, requestWebXRWithDepthPermission, resetCoordinatorState, resetFileSystemState, resetForNewSession, resetOpfsStorage, resetRecordingOptions, resetSessionHandles, resetStorageState, resetTracking, resetTrackingQuality, saveRecordingOptions, selectFirstAgreementObservationIndex, selectLastRestartedPayload, selectLastSensorOrientation, selectLastValidPose, selectLostFrameCount, selectRecentAlignments, selectTrackingPhase, selectTrackingQuality, setDepthCaptureCallback, setFileSystemState, setFrameCallback, setGlobalLogLevel, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, setTrackingStore, setZeroPos, snapshotPushed, snapshotsTrimmed, startDepthCapture, startGpsWatch, startImageCapture, startOrientationWatch, startSession, startSession$1 as startStorageSession, stopDepthCapture, stopGpsWatch, stopImageCapture, stopOrientationWatch, subscribeToLogs, syncToExternalZip, tileXYToLatLon, toggleCameraMode, trackingQualityReducer, trackingReducer, updateDeviceOrientation, updateOrbitTarget, validateDepthOptions, validateImageOptions, validateRecordingOptions, verifyWriteAccess, wireStoreSubscribers, writeAction, writeFrame };
@@ -1,3 +1,4 @@
1
+ import { t as MapData } from "./map-data-sih4g64v.js";
1
2
  import * as THREE from "three";
2
3
  import { LatLong } from "gps-plus-slam-js";
3
4
  import L from "leaflet";
@@ -58,14 +59,9 @@ declare class LeafletMapOverlay {
58
59
  private leafletMap;
59
60
  private tileLayer;
60
61
  private cssObject;
61
- private rawGpsPoints;
62
- private fusedPoints;
63
- private snapshotPoints;
62
+ private latestMapData;
63
+ private trajectoryLayers;
64
64
  private namedMarkers;
65
- private userMarker;
66
- private rawGpsPolyline;
67
- private fusedPolyline;
68
- private snapshotPolyline;
69
65
  constructor(scene: THREE.Scene, camera: THREE.Camera, options?: LeafletMapOverlayOptions);
70
66
  setGpsPosition(lat: number, lon: number): void;
71
67
  getGpsPosition(): LatLong | null;
@@ -73,9 +69,20 @@ declare class LeafletMapOverlay {
73
69
  hide(): void;
74
70
  toggle(): void;
75
71
  isVisible(): boolean;
76
- addRawGpsPoint(lat: number, lon: number): void;
77
- addFusedPoint(lat: number, lon: number): void;
78
- addAlignmentSnapshot(lat: number, lon: number): void;
72
+ /**
73
+ * Render a full trajectory snapshot.
74
+ *
75
+ * Replaces the previous incremental `addRawGpsPoint` / `addFusedPoint` /
76
+ * `addAlignmentSnapshot` API with a single full-snapshot path: the caller
77
+ * builds a {@link MapData} (via the shared `buildMapData`) from the latest
78
+ * store slices and hands it here. The trajectory layers are redrawn
79
+ * wholesale through the shared {@link drawMapData} routine, so the live map
80
+ * stays pixel-identical to the 2D session-summary map and the fused path
81
+ * recomputes (D2) as the alignment matrix improves.
82
+ *
83
+ * Buffered when the map is not yet shown; applied on `show()`.
84
+ */
85
+ render(data: MapData): void;
79
86
  /** Add a "current" named marker (red). Buffered if map is not yet shown. */
80
87
  addCurrentMarker(lat: number, lon: number, name: string): void;
81
88
  /** Add a "prior" named marker (green, decorated). Buffered if not shown. */
@@ -111,7 +118,11 @@ declare class LeafletMapOverlay {
111
118
  private createCssObject;
112
119
  private removeCssObject;
113
120
  private applyBufferedOverlays;
114
- private updateUserMarker;
121
+ /**
122
+ * Redraw the trajectory layers from {@link latestMapData} via the shared
123
+ * {@link drawMapData} routine, removing any layers from the previous draw.
124
+ */
125
+ private drawTrajectory;
115
126
  private createNamedMarker;
116
127
  }
117
128
  //#endregion
@@ -11,7 +11,13 @@
11
11
  *
12
12
  * Sentry Integration:
13
13
  * - All log levels add Sentry breadcrumbs for debugging context
14
- * - log.error() with Error objects automatically reports to Sentry
14
+ * - log.warn() reports a standalone Sentry Issue (captureMessage)
15
+ * - log.error() reports a standalone Sentry Issue: captureException for Error
16
+ * arguments, or a captureMessage fallback for string-only errors
17
+ * - warn/error Issues are grouped by a normalized message template
18
+ * (['log', level, tag, template]) so dynamic values (frame indices, sizes,
19
+ * filenames) collapse into one Issue per message kind without merging
20
+ * genuinely different messages that share a tag
15
21
  */
16
22
  /**
17
23
  * Log levels in order of verbosity (lower = more verbose)
@@ -0,0 +1,49 @@
1
+ import { n as RawGpsSample, t as GpsCoord } from "./geo-types-CTuF23gG.js";
2
+ import { LatLong, Matrix4, Vector3 } from "gps-plus-slam-js";
3
+
4
+ //#region ../src/visualization/map-data.d.ts
5
+ /** Fully-resolved trajectory data ready to be drawn onto a Leaflet map. */
6
+ interface MapData {
7
+ /** Latest user GPS position (blue dot), or null when unknown. */
8
+ userPosition: GpsCoord | null;
9
+ /** Raw GPS samples (yellow polyline + per-event accuracy circles). */
10
+ rawGpsPath: RawGpsSample[];
11
+ /** Fused SLAM+GPS positions (cyan polyline), recomputed from latest matrix. */
12
+ fusedPath: GpsCoord[];
13
+ /** Alignment-snapshot GPS positions (red). */
14
+ alignmentSnapshots: GpsCoord[];
15
+ }
16
+ /**
17
+ * Inputs to {@link buildMapData}, all optional so callers can supply only the
18
+ * slices they have. Array inputs are read-only and defensively copied.
19
+ */
20
+ interface MapDataInput {
21
+ /** Raw GPS samples in chronological order. */
22
+ rawGpsPath?: readonly RawGpsSample[];
23
+ /** Odometry positions (AR-local) used to derive the fused path. */
24
+ odometryPositions?: ReadonlyArray<Vector3>;
25
+ /** Latest alignment matrix from the solver (null until first solve). */
26
+ alignmentMatrix?: Matrix4 | null;
27
+ /** GPS origin for ENU→GPS conversion (null when no GPS yet). */
28
+ zeroRef?: LatLong | null;
29
+ /** Alignment-snapshot GPS positions. */
30
+ alignmentSnapshots?: readonly GpsCoord[];
31
+ /**
32
+ * Explicit user position. When omitted, defaults to the last entry of
33
+ * `rawGpsPath` (or null when there is none).
34
+ */
35
+ userPosition?: GpsCoord | null;
36
+ }
37
+ /**
38
+ * Build a {@link MapData} snapshot from store-derived inputs.
39
+ *
40
+ * Pure and free of Leaflet/Three dependencies. The fused path is always
41
+ * derived via {@link computeFusedPath} (D2); when the matrix or zero reference
42
+ * is missing it is an empty array.
43
+ *
44
+ * @param input - Optional trajectory slices (see {@link MapDataInput}).
45
+ * @returns A fully-resolved {@link MapData} with all arrays defensively copied.
46
+ */
47
+ declare function buildMapData(input: MapDataInput): MapData;
48
+ //#endregion
49
+ export { MapDataInput as n, buildMapData as r, MapData as t };
@@ -0,0 +1,42 @@
1
+ import { t as MapData } from "./map-data-sih4g64v.js";
2
+ import L from "leaflet";
3
+
4
+ //#region ../src/visualization/map-overlay-draw.d.ts
5
+ /** Raw GPS polyline + accuracy-circle color (yellow). */
6
+ declare const RAW_GPS_COLOR: "#ffff00";
7
+ /** Fused SLAM+GPS polyline color (cyan). */
8
+ declare const FUSED_PATH_COLOR: "#00ffff";
9
+ /** Alignment-snapshot polyline color (red). */
10
+ declare const ALIGNMENT_SNAPSHOT_COLOR: "#ff0000";
11
+ /** User-position marker color (blue). */
12
+ declare const USER_POSITION_COLOR: "#3b82f6";
13
+ /** Polyline weight (px) — matches the recorder's `PATH_POLYLINE_WEIGHT`. */
14
+ declare const MAP_PATH_POLYLINE_WEIGHT = 3;
15
+ /** Polyline opacity — matches the recorder's `PATH_POLYLINE_OPACITY`. */
16
+ declare const MAP_PATH_POLYLINE_OPACITY = 0.8;
17
+ /** Options controlling optional layers drawn by {@link drawMapData}. */
18
+ interface DrawMapDataOptions {
19
+ /**
20
+ * Draw a user-position marker when `MapData.userPosition` is set. Off by
21
+ * default — the summary map shows the path only; the live overlay opts in.
22
+ */
23
+ showUserPosition?: boolean;
24
+ }
25
+ /** Result of {@link drawMapData}: the created layers and accumulated bounds. */
26
+ interface DrawnMapData {
27
+ /** Every Leaflet layer created, in draw order, for later cleanup. */
28
+ layers: L.Layer[];
29
+ /** Bounds spanning every drawn coordinate; use `.isValid()` before fitting. */
30
+ bounds: L.LatLngBounds;
31
+ }
32
+ /**
33
+ * Draw a {@link MapData} snapshot onto an existing Leaflet map.
34
+ *
35
+ * @param map - Target map (already created with a tile layer by the caller).
36
+ * @param data - Resolved trajectory data from `buildMapData`.
37
+ * @param options - Optional layer toggles (see {@link DrawMapDataOptions}).
38
+ * @returns The created layers and the bounds spanning every drawn coordinate.
39
+ */
40
+ declare function drawMapData(map: L.Map, data: MapData, options?: DrawMapDataOptions): DrawnMapData;
41
+ //#endregion
42
+ export { MAP_PATH_POLYLINE_OPACITY as a, USER_POSITION_COLOR as c, FUSED_PATH_COLOR as i, drawMapData as l, DrawMapDataOptions as n, MAP_PATH_POLYLINE_WEIGHT as o, DrawnMapData as r, RAW_GPS_COLOR as s, ALIGNMENT_SNAPSHOT_COLOR as t };
@@ -1,5 +1,5 @@
1
- import { n as SessionMetadata } from "./opfs-storage-Dlq1I_Gb.js";
2
- import { n as StorageBackend, t as CreateSessionResult } from "./storage-backend-yVnuWGTr.js";
1
+ import { n as SessionMetadata } from "./opfs-storage-DOPkzgeT.js";
2
+ import { n as StorageBackend, t as CreateSessionResult } from "./storage-backend-CT0Il_AB.js";
3
3
 
4
4
  //#region ../src/storage/null-storage-backend.d.ts
5
5
  declare class NullStorageBackend implements StorageBackend {
@@ -1,5 +1,5 @@
1
- import { n as SessionMetadata } from "./opfs-storage-Dlq1I_Gb.js";
2
- import { n as StorageBackend, t as CreateSessionResult } from "./storage-backend-yVnuWGTr.js";
1
+ import { n as SessionMetadata } from "./opfs-storage-DOPkzgeT.js";
2
+ import { n as StorageBackend, t as CreateSessionResult } from "./storage-backend-CT0Il_AB.js";
3
3
 
4
4
  //#region ../src/storage/opfs-storage-backend.d.ts
5
5
  declare class OpfsStorageBackend implements StorageBackend {
@@ -117,6 +117,46 @@ declare function requestOrientationPermission(): Promise<PermissionStatus>;
117
117
  * Returns current known state of each permission.
118
118
  */
119
119
  declare function checkAllPermissions(): Promise<PermissionCheckResult>;
120
+ /**
121
+ * Subscription handle returned by {@link subscribePermissionChanges}.
122
+ * Calling `unsubscribe()` detaches every listener wired by the subscription.
123
+ */
124
+ interface PermissionSubscription {
125
+ unsubscribe(): void;
126
+ }
127
+ /**
128
+ * Subscribe to out-of-band permission changes.
129
+ *
130
+ * Today the recorder app only re-runs `checkAllPermissions()` at startup
131
+ * and after the user clicks "Grant Permissions" — so a permission flipped
132
+ * via browser settings (e.g. user denies location, then enables it under
133
+ * "site settings") is only detected after a full page reload.
134
+ *
135
+ * This subscription wires three signals:
136
+ * 1. `navigator.permissions.query(...)` returns a live `PermissionStatus`
137
+ * for `'geolocation'` and `'camera'`; we keep those references and
138
+ * attach a `'change'` listener via `addEventListener` so we react
139
+ * immediately when the browser updates the underlying state.
140
+ * 2. `document.visibilitychange` (only when `visibilityState === 'visible'`)
141
+ * covers the "user tabbed out to settings, toggled, tabbed back" case
142
+ * on browsers where the `'change'` event does not fire reliably.
143
+ * 3. `window.focus` covers the same scenario for browsers/standalone
144
+ * windows where `visibilitychange` is not dispatched on focus return.
145
+ *
146
+ * Each signal triggers a fresh {@link checkAllPermissions} call; the
147
+ * resulting {@link PermissionCheckResult} is passed to `callback`.
148
+ *
149
+ * No periodic polling is performed — the trio above is the complete
150
+ * fallback chain. If a browser supports none of these signals for a given
151
+ * permission, the user can still re-check by clicking the (now permanently
152
+ * visible) "Grant Permissions" button.
153
+ *
154
+ * @param callback - Invoked with the latest {@link PermissionCheckResult}
155
+ * each time one of the signals fires. The initial state is **not**
156
+ * delivered; callers are expected to have already rendered it.
157
+ * @returns A handle whose `unsubscribe()` removes every wired listener.
158
+ */
159
+ declare function subscribePermissionChanges(callback: (result: PermissionCheckResult) => void): PermissionSubscription;
120
160
  /**
121
161
  * Request all mandatory permissions that haven't been granted yet.
122
162
  * Shows browser prompts for each permission that needs requesting.
@@ -143,4 +183,4 @@ declare function requestAllPermissions(): Promise<PermissionCheckResult>;
143
183
  */
144
184
  declare function requestWebXRWithDepthPermission(): Promise<PermissionStatus>;
145
185
  //#endregion
146
- export { checkFileSystemPermission as a, checkWebXRSupport as c, requestGeolocationPermission as d, requestOrientationPermission as f, setFileSystemState as h, checkCameraPermission as i, requestAllPermissions as l, resetFileSystemState as m, PermissionStatus as n, checkGeolocationPermission as o, requestWebXRWithDepthPermission as p, checkAllPermissions as r, checkOrientationPermission as s, PermissionCheckResult as t, requestCameraPermission as u };
186
+ export { subscribePermissionChanges as _, checkCameraPermission as a, checkOrientationPermission as c, requestCameraPermission as d, requestGeolocationPermission as f, setFileSystemState as g, resetFileSystemState as h, checkAllPermissions as i, checkWebXRSupport as l, requestWebXRWithDepthPermission as m, PermissionStatus as n, checkFileSystemPermission as o, requestOrientationPermission as p, PermissionSubscription as r, checkGeolocationPermission as s, PermissionCheckResult as t, requestAllPermissions as u };
@@ -0,0 +1,55 @@
1
+ import { n as StorageBackend } from "./storage-backend-CT0Il_AB.js";
2
+ import { Middleware } from "@reduxjs/toolkit";
3
+
4
+ //#region ../src/state/persistence-middleware.d.ts
5
+ interface PersistenceMiddlewareOptions {
6
+ /**
7
+ * StorageBackend to use for action persistence.
8
+ */
9
+ storageBackend: StorageBackend;
10
+ /**
11
+ * Slice names whose actions are persisted to the recording stream
12
+ * (e.g. `['gpsData', 'recording', 'refPoints']`).
13
+ *
14
+ * Callers MUST derive these from the actual slices — pass
15
+ * `slicePrefixOf(someActionCreator.type)` or a `slice.name`, never a
16
+ * hand-typed literal. A slice rename then propagates here automatically
17
+ * instead of silently dropping the renamed slice's actions from every
18
+ * recording (the 2026-05-28 `refPointsV2/` → `refPoints/` regression).
19
+ *
20
+ * `recording/recordWriteFailure` is always excluded regardless of this
21
+ * list, to prevent recursive persistence.
22
+ */
23
+ persistedPrefixes: readonly string[];
24
+ /**
25
+ * Callback invoked when a write operation fails during persistence.
26
+ * User Feedback Issue #1 Part B: Used to show toast notifications.
27
+ */
28
+ onWriteFailure?: (error: Error) => void;
29
+ }
30
+ /**
31
+ * Extract the slice prefix from a namespaced Redux action type.
32
+ *
33
+ * `'gpsData/setZeroPos'` → `'gpsData'`. Returns the whole string when there
34
+ * is no slash (e.g. `'@@INIT'`). This is the single point that turns a
35
+ * slice-owned action type into the value the persistence whitelist matches
36
+ * on, so call sites can derive prefixes from real action creators instead of
37
+ * re-typing literals.
38
+ */
39
+ declare function slicePrefixOf(actionType: string): string;
40
+ /**
41
+ * Create a Redux middleware that persists qualifying actions to storage
42
+ * during active recording sessions.
43
+ *
44
+ * Persistence rules:
45
+ * - Only persists when `state.recording.isRecording` is true (checked AFTER
46
+ * the action is reduced, so `startSession` itself is included).
47
+ * - Persists actions whose slice prefix is listed in `persistedPrefixes`.
48
+ * - Excludes `recording/recordWriteFailure` to prevent recursive persistence.
49
+ * - Excludes `routing/*` and any other non-whitelisted actions.
50
+ * - Uses 1-based indexing for action files (000001.json, 000002.json, …).
51
+ * - Each middleware instance maintains its own action index (Bug 10 fix).
52
+ */
53
+ declare function createPersistenceMiddleware(options: PersistenceMiddlewareOptions): Middleware;
54
+ //#endregion
55
+ export { createPersistenceMiddleware as n, slicePrefixOf as r, PersistenceMiddlewareOptions as t };
@@ -1,5 +1,5 @@
1
- import { i as RecordedAction } from "./zip-reader-KgJEXbca.js";
2
- import { t as CombinedRootState } from "./combined-root-state-B3SvPNjU.js";
1
+ import { L as CombinedRootState } from "./create-slam-app-store-CNsZ3rcX.js";
2
+ import { i as RecordedAction } from "./zip-reader-D1105idz.js";
3
3
 
4
4
  //#region ../src/state/recording-replayer.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { i as DepthSample } from "./ar-types-B-ORgk6Z.js";
2
- import { s as RecordingOptions } from "./recording-options-BYUFX8iU.js";
1
+ import { i as DepthSample } from "./ar-types-Ck8LEq8k.js";
2
+ import { s as RecordingOptions } from "./recording-options-Dq6IsKAv.js";
3
3
  import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
4
4
 
5
5
  //#region ../src/state/recording-slice.d.ts
@@ -1,4 +1,4 @@
1
- import { i as SlamAppStore } from "./create-slam-app-store-DBm7g2Zd.js";
1
+ import { i as SlamAppStore } from "./create-slam-app-store-CNsZ3rcX.js";
2
2
  import { ReducersMapObject } from "@reduxjs/toolkit";
3
3
 
4
4
  //#region ../src/state/replay-engine.d.ts
@@ -1,6 +1,6 @@
1
- import { t as CameraFollower } from "./camera-follower-BMqPddxx.js";
2
- import { t as AlignmentLerper } from "./alignment-lerper-D9BeDwZX.js";
3
- import { t as Css3dRendererManager } from "./css3d-renderer-manager-rgLMVAvd.js";
1
+ import { t as CameraFollower } from "./camera-follower-1k8mnw5J.js";
2
+ import { t as AlignmentLerper } from "./alignment-lerper-L1RbWHQ4.js";
3
+ import { t as Css3dRendererManager } from "./css3d-renderer-manager-CkjCb2HW.js";
4
4
  import * as THREE from "three";
5
5
  import { OrbitControls } from "three/addons/controls/OrbitControls.js";
6
6
 
@@ -1,2 +1,2 @@
1
- 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-CH1S528z.js";
1
+ 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-Dg3ziRVY.js";
2
2
  export { GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, createGpsErrorHandler, getGpsErrorMessage };
@@ -1,2 +1,2 @@
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-GKc6_Cly.js";
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-DXoQb9Kf.js";
2
2
  export { GpsPosition, RawDeviceOrientation, requestOrientationPermission, startGpsWatch, startOrientationWatch, stopGpsWatch, stopOrientationWatch };
@@ -36,8 +36,8 @@ function startGpsWatch(onPosition, onError) {
36
36
  onError?.(err);
37
37
  }, {
38
38
  enableHighAccuracy: true,
39
- maximumAge: 0,
40
- timeout: 1e4
39
+ maximumAge: 5e3,
40
+ timeout: 15e3
41
41
  });
42
42
  log.info("Watch started");
43
43
  }
@@ -1,4 +1,4 @@
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-GKc6_Cly.js";
2
- 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-CH1S528z.js";
3
- import { a as checkFileSystemPermission, c as checkWebXRSupport, d as requestGeolocationPermission, f as requestOrientationPermission$1, h as setFileSystemState, i as checkCameraPermission, l as requestAllPermissions, m as resetFileSystemState, n as PermissionStatus, o as checkGeolocationPermission, p as requestWebXRWithDepthPermission, r as checkAllPermissions, s as checkOrientationPermission, t as PermissionCheckResult, u as requestCameraPermission } from "../permission-checker-Cu3nbH1S.js";
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-DXoQb9Kf.js";
2
+ 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-Dg3ziRVY.js";
3
+ 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-DPJl_RU6.js";
4
4
  export { 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, requestAllPermissions, requestCameraPermission, requestOrientationPermission as requestDeviceOrientationPermission, requestGeolocationPermission, requestOrientationPermission$1 as requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, startGpsWatch, startOrientationWatch, stopGpsWatch, stopOrientationWatch };
@@ -1,2 +1,2 @@
1
- import { a as checkFileSystemPermission, c as checkWebXRSupport, d as requestGeolocationPermission, f as requestOrientationPermission, h as setFileSystemState, i as checkCameraPermission, l as requestAllPermissions, m as resetFileSystemState, n as PermissionStatus, o as checkGeolocationPermission, p as requestWebXRWithDepthPermission, r as checkAllPermissions, s as checkOrientationPermission, t as PermissionCheckResult, u as requestCameraPermission } from "../permission-checker-Cu3nbH1S.js";
2
- export { PermissionCheckResult, PermissionStatus, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, requestAllPermissions, requestCameraPermission, requestGeolocationPermission, requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState };
1
+ import { _ as subscribePermissionChanges, 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, r as PermissionSubscription, s as checkGeolocationPermission, t as PermissionCheckResult, u as requestAllPermissions } from "../permission-checker-DPJl_RU6.js";
2
+ export { PermissionCheckResult, PermissionStatus, PermissionSubscription, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, requestAllPermissions, requestCameraPermission, requestGeolocationPermission, requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, subscribePermissionChanges };
@@ -321,6 +321,84 @@ async function checkAllPermissions() {
321
321
  };
322
322
  }
323
323
  /**
324
+ * Subscribe to out-of-band permission changes.
325
+ *
326
+ * Today the recorder app only re-runs `checkAllPermissions()` at startup
327
+ * and after the user clicks "Grant Permissions" — so a permission flipped
328
+ * via browser settings (e.g. user denies location, then enables it under
329
+ * "site settings") is only detected after a full page reload.
330
+ *
331
+ * This subscription wires three signals:
332
+ * 1. `navigator.permissions.query(...)` returns a live `PermissionStatus`
333
+ * for `'geolocation'` and `'camera'`; we keep those references and
334
+ * attach a `'change'` listener via `addEventListener` so we react
335
+ * immediately when the browser updates the underlying state.
336
+ * 2. `document.visibilitychange` (only when `visibilityState === 'visible'`)
337
+ * covers the "user tabbed out to settings, toggled, tabbed back" case
338
+ * on browsers where the `'change'` event does not fire reliably.
339
+ * 3. `window.focus` covers the same scenario for browsers/standalone
340
+ * windows where `visibilitychange` is not dispatched on focus return.
341
+ *
342
+ * Each signal triggers a fresh {@link checkAllPermissions} call; the
343
+ * resulting {@link PermissionCheckResult} is passed to `callback`.
344
+ *
345
+ * No periodic polling is performed — the trio above is the complete
346
+ * fallback chain. If a browser supports none of these signals for a given
347
+ * permission, the user can still re-check by clicking the (now permanently
348
+ * visible) "Grant Permissions" button.
349
+ *
350
+ * @param callback - Invoked with the latest {@link PermissionCheckResult}
351
+ * each time one of the signals fires. The initial state is **not**
352
+ * delivered; callers are expected to have already rendered it.
353
+ * @returns A handle whose `unsubscribe()` removes every wired listener.
354
+ */
355
+ function subscribePermissionChanges(callback) {
356
+ let disposed = false;
357
+ const cleanups = [];
358
+ const notify = () => {
359
+ if (disposed) return;
360
+ checkAllPermissions().then((result) => {
361
+ if (!disposed) callback(result);
362
+ }).catch((err) => {
363
+ log.warn("subscribePermissionChanges: re-check failed", err);
364
+ });
365
+ };
366
+ if (typeof navigator !== "undefined" && navigator.permissions && typeof navigator.permissions.query === "function") {
367
+ const wireStatus = (name) => {
368
+ try {
369
+ navigator.permissions.query({ name }).then((status) => {
370
+ if (disposed) return;
371
+ const handler = () => notify();
372
+ status.addEventListener("change", handler);
373
+ cleanups.push(() => status.removeEventListener("change", handler));
374
+ }, () => {});
375
+ } catch {}
376
+ };
377
+ wireStatus("geolocation");
378
+ wireStatus("camera");
379
+ }
380
+ if (typeof document !== "undefined") {
381
+ const onVisibility = () => {
382
+ if (document.visibilityState === "visible") notify();
383
+ };
384
+ document.addEventListener("visibilitychange", onVisibility);
385
+ cleanups.push(() => document.removeEventListener("visibilitychange", onVisibility));
386
+ }
387
+ if (typeof window !== "undefined") {
388
+ const onFocus = () => notify();
389
+ window.addEventListener("focus", onFocus);
390
+ cleanups.push(() => window.removeEventListener("focus", onFocus));
391
+ }
392
+ return { unsubscribe() {
393
+ disposed = true;
394
+ for (const c of cleanups.splice(0)) try {
395
+ c();
396
+ } catch (err) {
397
+ log.warn("subscribePermissionChanges: cleanup failed", err);
398
+ }
399
+ } };
400
+ }
401
+ /**
324
402
  * Request all mandatory permissions that haven't been granted yet.
325
403
  * Shows browser prompts for each permission that needs requesting.
326
404
  *
@@ -394,4 +472,4 @@ async function requestWebXRWithDepthPermission() {
394
472
  }
395
473
  }
396
474
  //#endregion
397
- export { checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, requestAllPermissions, requestCameraPermission, requestGeolocationPermission, requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState };
475
+ export { checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, requestAllPermissions, requestCameraPermission, requestGeolocationPermission, requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, subscribePermissionChanges };
@@ -1,2 +1,2 @@
1
- import { a as selectReferencePoints, i as selectOdometryRotations, n as selectGpsPositions, o as selectZeroReference, r as selectOdometryPositions, t as selectAlignmentMatrix } from "../app-selectors-CHt7DLuq.js";
2
- export { selectAlignmentMatrix, selectGpsPositions, selectOdometryPositions, selectOdometryRotations, selectReferencePoints, selectZeroReference };
1
+ import { a as selectOdometryRotations, i as selectOdometryPositions, n as selectFrameTilesInWebXR, o as selectZeroReference, r as selectGpsPositions, t as selectAlignmentMatrix } from "../app-selectors-BeU0_ab8.js";
2
+ export { selectAlignmentMatrix, selectFrameTilesInWebXR, selectGpsPositions, selectOdometryPositions, selectOdometryRotations, selectZeroReference };
@@ -1,3 +1,4 @@
1
+ import { nueQuaternionToWebXR, nueToWebXR } from "gps-plus-slam-js";
1
2
  import { createSelector } from "@reduxjs/toolkit";
2
3
  //#region ../src/state/app-selectors.ts
3
4
  /**
@@ -17,7 +18,7 @@ import { createSelector } from "@reduxjs/toolkit";
17
18
  const EMPTY_GPS_POSITIONS = [];
18
19
  const EMPTY_ODOM_POSITIONS = [];
19
20
  const EMPTY_ODOM_ROTATIONS = [];
20
- const EMPTY_REF_POINTS = [];
21
+ const EMPTY_FRAME_TILES = [];
21
22
  const selectGpsData = (state) => state.gpsData;
22
23
  /** Alignment matrix (4×4), or null if not yet computed. */
23
24
  const selectAlignmentMatrix = createSelector([selectGpsData], (gpsData) => gpsData?.gpsEvents?.alignmentMatrix ?? null);
@@ -30,6 +31,35 @@ const selectOdometryRotations = createSelector([selectGpsData], (gpsData) => gps
30
31
  /** GPS zero reference (origin for coordinate conversion), or null. */
31
32
  const selectZeroReference = createSelector([selectGpsData], (gpsData) => gpsData?.zero ?? null);
32
33
  /** User-defined reference points for ground truth validation. */
33
- const selectReferencePoints = createSelector([selectGpsData], (gpsData) => gpsData?.referencePoints ?? EMPTY_REF_POINTS);
34
+ /**
35
+ * Captured AR image frames in WebXR coordinate space.
36
+ *
37
+ * Reads `state.gpsData.odometryPath.points` (which the library reducer
38
+ * stores in NUE convention — see `gpsDataSlice.ts` `add2dImage`) and
39
+ * converts each entry back to WebXR so the live AR scene visualizer can
40
+ * apply the pose directly. This is the source of truth for the
41
+ * frame-tile visualizer; the legacy `framesInScene` slice is a dead
42
+ * mirror scheduled for removal (Step 5 of the 2026-05-27
43
+ * slice-collapse plan).
44
+ *
45
+ * Memoized via createSelector keyed on `odometryPath.points` (NOT the whole
46
+ * `gpsData`). The library reducer uses Immer, so unrelated updates (GPS
47
+ * observations, VIO offsets) produce a new `gpsData` reference while
48
+ * `odometryPath.points` keeps its reference via structural sharing. Keying on
49
+ * the points array therefore preserves referential stability of the output
50
+ * across those dispatches — subscribers like `wireFrameTileSubscribers` only
51
+ * re-run when frames actually change.
52
+ */
53
+ const selectOdometryPathPoints = (state) => state.gpsData?.odometryPath?.points;
54
+ const selectFrameTilesInWebXR = createSelector([selectOdometryPathPoints], (points) => {
55
+ if (!points || points.length === 0) return EMPTY_FRAME_TILES;
56
+ return points.map((p) => ({
57
+ imageFile: p.imageFile,
58
+ position: nueToWebXR(p.position),
59
+ rotation: nueQuaternionToWebXR(p.rotation),
60
+ screenRotation: p.screenRotation,
61
+ capturedAt: p.capturedAt
62
+ }));
63
+ });
34
64
  //#endregion
35
- export { selectAlignmentMatrix, selectGpsPositions, selectOdometryPositions, selectOdometryRotations, selectReferencePoints, selectZeroReference };
65
+ export { selectAlignmentMatrix, selectFrameTilesInWebXR, selectGpsPositions, selectOdometryPositions, selectOdometryRotations, selectZeroReference };
@@ -0,0 +1,2 @@
1
+ import { L as CombinedRootState } from "../create-slam-app-store-CNsZ3rcX.js";
2
+ export { CombinedRootState };
@@ -0,0 +1 @@
1
+ export {};
@@ -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-DBm7g2Zd.js";
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-CNsZ3rcX.js";
2
2
  export { SlamAppCombinedState, SlamAppMiddleware, SlamAppRootState, SlamAppStore, SlamAppStoreOptions, createSlamAppStore };