@glassly/engine 0.1.0-dev.99 → 0.2.8-dev.445
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/build/engine.d.ts +32 -10
- package/build/engine.d.ts.map +1 -1
- package/build/engine.js +24 -16
- package/build/engine.js.map +1 -1
- package/build/facades/dev.d.ts +9 -0
- package/build/facades/dev.d.ts.map +1 -1
- package/build/facades/dev.js +9 -0
- package/build/facades/dev.js.map +1 -1
- package/build/facades/display.d.ts +10 -3
- package/build/facades/display.d.ts.map +1 -1
- package/build/facades/display.js +22 -8
- package/build/facades/display.js.map +1 -1
- package/build/facades/displayMirror.d.ts +11 -0
- package/build/facades/displayMirror.d.ts.map +1 -1
- package/build/facades/displayMirror.js +22 -0
- package/build/facades/displayMirror.js.map +1 -1
- package/build/facades/glasses.d.ts +31 -1
- package/build/facades/glasses.d.ts.map +1 -1
- package/build/facades/glasses.js +51 -0
- package/build/facades/glasses.js.map +1 -1
- package/build/facades/memory.d.ts +0 -6
- package/build/facades/memory.d.ts.map +1 -1
- package/build/facades/memory.js +1 -9
- package/build/facades/memory.js.map +1 -1
- package/build/facades/miniapps.d.ts +3 -1
- package/build/facades/miniapps.d.ts.map +1 -1
- package/build/facades/miniapps.js +3 -1
- package/build/facades/miniapps.js.map +1 -1
- package/build/facades/pairing.d.ts.map +1 -1
- package/build/facades/pairing.js +5 -4
- package/build/facades/pairing.js.map +1 -1
- package/build/facades/permissions.d.ts +2 -0
- package/build/facades/permissions.d.ts.map +1 -1
- package/build/facades/permissions.js +48 -0
- package/build/facades/permissions.js.map +1 -1
- package/build/facades/phoneNotifications.d.ts +20 -9
- package/build/facades/phoneNotifications.d.ts.map +1 -1
- package/build/facades/phoneNotifications.js +33 -26
- package/build/facades/phoneNotifications.js.map +1 -1
- package/build/facades/settings.d.ts.map +1 -1
- package/build/facades/settings.js +1 -2
- package/build/facades/settings.js.map +1 -1
- package/build/generated/releaseMetadata.js +4 -4
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/index.d.ts +6 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -4
- package/build/index.js.map +1 -1
- package/build/react/MentraLiveOtaFlow.js +2 -2
- package/build/react/MentraLiveOtaFlow.js.map +1 -1
- package/build/react/useMentraLiveOta.d.ts.map +1 -1
- package/build/react/useMentraLiveOta.js +8 -7
- package/build/react/useMentraLiveOta.js.map +1 -1
- package/build/runtime/config.d.ts +1 -1
- package/build/runtime/config.d.ts.map +1 -1
- package/build/runtime/config.js.map +1 -1
- package/build/services/AppRegistry.d.ts +4 -1
- package/build/services/AppRegistry.d.ts.map +1 -1
- package/build/services/AppRegistry.js +21 -1
- package/build/services/AppRegistry.js.map +1 -1
- package/build/services/BlobStore.d.ts +2 -2
- package/build/services/BlobStore.js +3 -3
- package/build/services/BlobStore.js.map +1 -1
- package/build/services/CloudClientService.d.ts +7 -3
- package/build/services/CloudClientService.d.ts.map +1 -1
- package/build/services/CloudClientService.js +34 -9
- package/build/services/CloudClientService.js.map +1 -1
- package/build/services/DevServerBridge.d.ts +1 -18
- package/build/services/DevServerBridge.d.ts.map +1 -1
- package/build/services/DevServerBridge.js +9 -8
- package/build/services/DevServerBridge.js.map +1 -1
- package/build/services/DeviceEventRouter.d.ts.map +1 -1
- package/build/services/DeviceEventRouter.js +58 -71
- package/build/services/DeviceEventRouter.js.map +1 -1
- package/build/services/DisplayDiagnostics.d.ts +5 -0
- package/build/services/DisplayDiagnostics.d.ts.map +1 -0
- package/build/services/DisplayDiagnostics.js +105 -0
- package/build/services/DisplayDiagnostics.js.map +1 -0
- package/build/services/DisplayProcessor.d.ts +6 -7
- package/build/services/DisplayProcessor.d.ts.map +1 -1
- package/build/services/DisplayProcessor.js +17 -45
- package/build/services/DisplayProcessor.js.map +1 -1
- package/build/services/GestureDotsService.d.ts +10 -4
- package/build/services/GestureDotsService.d.ts.map +1 -1
- package/build/services/GestureDotsService.js +70 -16
- package/build/services/GestureDotsService.js.map +1 -1
- package/build/services/GlassesKeyboardInput.d.ts +77 -0
- package/build/services/GlassesKeyboardInput.d.ts.map +1 -0
- package/build/services/GlassesKeyboardInput.js +261 -0
- package/build/services/GlassesKeyboardInput.js.map +1 -0
- package/build/services/GlassesSensorService.d.ts +47 -0
- package/build/services/GlassesSensorService.d.ts.map +1 -0
- package/build/services/GlassesSensorService.js +242 -0
- package/build/services/GlassesSensorService.js.map +1 -0
- package/build/services/GlassesTouchInput.d.ts +14 -0
- package/build/services/GlassesTouchInput.d.ts.map +1 -0
- package/build/services/GlassesTouchInput.js +107 -0
- package/build/services/GlassesTouchInput.js.map +1 -0
- package/build/services/HeadingService.d.ts +0 -6
- package/build/services/HeadingService.d.ts.map +1 -1
- package/build/services/HeadingService.js +0 -27
- package/build/services/HeadingService.js.map +1 -1
- package/build/services/HotspotShutdown.d.ts.map +1 -1
- package/build/services/HotspotShutdown.js +2 -1
- package/build/services/HotspotShutdown.js.map +1 -1
- package/build/services/JSCrashloopReportService.js +2 -2
- package/build/services/JSCrashloopReportService.js.map +1 -1
- package/build/services/JSRouter.d.ts +6 -4
- package/build/services/JSRouter.d.ts.map +1 -1
- package/build/services/JSRouter.js +15 -13
- package/build/services/JSRouter.js.map +1 -1
- package/build/services/LocalDisplayManager.d.ts +35 -7
- package/build/services/LocalDisplayManager.d.ts.map +1 -1
- package/build/services/LocalDisplayManager.js +105 -27
- package/build/services/LocalDisplayManager.js.map +1 -1
- package/build/services/LocalMiniappDataMigration.d.ts +1 -1
- package/build/services/LocalMiniappDataMigration.js +1 -1
- package/build/services/LocalMiniappDataMigration.js.map +1 -1
- package/build/services/LocalMiniappRuntime.d.ts +64 -11
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
- package/build/services/LocalMiniappRuntime.js +441 -35
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/LocalSttFallbackCoordinator.d.ts +3 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -1
- package/build/services/LocalSttFallbackCoordinator.js +27 -8
- package/build/services/LocalSttFallbackCoordinator.js.map +1 -1
- package/build/services/MemoryStore.d.ts +8 -33
- package/build/services/MemoryStore.d.ts.map +1 -1
- package/build/services/MemoryStore.js +30 -56
- package/build/services/MemoryStore.js.map +1 -1
- package/build/services/MiniappEngine.d.ts +3 -3
- package/build/services/MiniappEngine.js +7 -7
- package/build/services/MiniappEngine.js.map +1 -1
- package/build/services/MiniappLauncher.d.ts +8 -0
- package/build/services/MiniappLauncher.d.ts.map +1 -1
- package/build/services/MiniappLauncher.js +19 -1
- package/build/services/MiniappLauncher.js.map +1 -1
- package/build/services/MirrorService.d.ts +24 -0
- package/build/services/MirrorService.d.ts.map +1 -0
- package/build/services/MirrorService.js +132 -0
- package/build/services/MirrorService.js.map +1 -0
- package/build/services/NativeNavigationService.d.ts +2 -3
- package/build/services/NativeNavigationService.d.ts.map +1 -1
- package/build/services/NativeNavigationService.js +24 -21
- package/build/services/NativeNavigationService.js.map +1 -1
- package/build/services/NavigationHandlers.d.ts.map +1 -1
- package/build/services/NavigationHandlers.js +10 -5
- package/build/services/NavigationHandlers.js.map +1 -1
- package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
- package/build/services/OtaInstallCoordinator.js +24 -23
- package/build/services/OtaInstallCoordinator.js.map +1 -1
- package/build/services/PairedGlassesLatch.d.ts +7 -0
- package/build/services/PairedGlassesLatch.d.ts.map +1 -0
- package/build/services/PairedGlassesLatch.js +38 -0
- package/build/services/PairedGlassesLatch.js.map +1 -0
- package/build/services/PhoneActivity.d.ts +23 -0
- package/build/services/PhoneActivity.d.ts.map +1 -0
- package/build/services/PhoneActivity.js +111 -0
- package/build/services/PhoneActivity.js.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -1
- package/build/services/PhoneCameraFovCoordinator.js +4 -3
- package/build/services/PhoneCameraFovCoordinator.js.map +1 -1
- package/build/services/PhoneNotificationsSync.d.ts +40 -6
- package/build/services/PhoneNotificationsSync.d.ts.map +1 -1
- package/build/services/PhoneNotificationsSync.js +160 -84
- package/build/services/PhoneNotificationsSync.js.map +1 -1
- package/build/services/PhonePhotoCoordinator.d.ts.map +1 -1
- package/build/services/PhonePhotoCoordinator.js +6 -5
- package/build/services/PhonePhotoCoordinator.js.map +1 -1
- package/build/services/PhoneStreamCoordinator.d.ts.map +1 -1
- package/build/services/PhoneStreamCoordinator.js +8 -7
- package/build/services/PhoneStreamCoordinator.js.map +1 -1
- package/build/services/STTModelManager.d.ts +3 -0
- package/build/services/STTModelManager.d.ts.map +1 -1
- package/build/services/STTModelManager.js +15 -1
- package/build/services/STTModelManager.js.map +1 -1
- package/build/services/SceneRenderer.d.ts +43 -2
- package/build/services/SceneRenderer.d.ts.map +1 -1
- package/build/services/SceneRenderer.js +123 -8
- package/build/services/SceneRenderer.js.map +1 -1
- package/build/services/StreamLifecycleController.d.ts.map +1 -1
- package/build/services/StreamLifecycleController.js +6 -14
- package/build/services/StreamLifecycleController.js.map +1 -1
- package/build/services/TTSModelManager.js +1 -1
- package/build/services/TTSModelManager.js.map +1 -1
- package/build/services/UIRouter.d.ts +2 -2
- package/build/services/UIRouter.js +5 -5
- package/build/services/UIRouter.js.map +1 -1
- package/build/services/asg/galleryPathMigration.js +1 -1
- package/build/services/asg/galleryPathMigration.js.map +1 -1
- package/build/services/asg/gallerySyncService.js +2 -2
- package/build/services/asg/gallerySyncService.js.map +1 -1
- package/build/services/asg/localStorageService.d.ts.map +1 -1
- package/build/services/asg/localStorageService.js +3 -3
- package/build/services/asg/localStorageService.js.map +1 -1
- package/build/services/debug/DashboardOpenTrace.d.ts +32 -0
- package/build/services/debug/DashboardOpenTrace.d.ts.map +1 -0
- package/build/services/debug/DashboardOpenTrace.js +128 -0
- package/build/services/debug/DashboardOpenTrace.js.map +1 -0
- package/build/services/debug/dashboardOpenTimeline.d.ts +77 -0
- package/build/services/debug/dashboardOpenTimeline.d.ts.map +1 -0
- package/build/services/debug/dashboardOpenTimeline.js +195 -0
- package/build/services/debug/dashboardOpenTimeline.js.map +1 -0
- package/build/services/effectiveCapabilities.d.ts.map +1 -1
- package/build/services/effectiveCapabilities.js +25 -13
- package/build/services/effectiveCapabilities.js.map +1 -1
- package/build/services/gestureClaims.d.ts +34 -15
- package/build/services/gestureClaims.d.ts.map +1 -1
- package/build/services/gestureClaims.js +42 -21
- package/build/services/gestureClaims.js.map +1 -1
- package/build/services/manifestFields.d.ts +9 -0
- package/build/services/manifestFields.d.ts.map +1 -0
- package/build/services/manifestFields.js +26 -0
- package/build/services/manifestFields.js.map +1 -0
- package/build/services/memoryStoreInstance.d.ts +0 -10
- package/build/services/memoryStoreInstance.d.ts.map +1 -1
- package/build/services/memoryStoreInstance.js +2 -31
- package/build/services/memoryStoreInstance.js.map +1 -1
- package/build/services/mirrorSnapshot.d.ts +16 -0
- package/build/services/mirrorSnapshot.d.ts.map +1 -0
- package/build/services/mirrorSnapshot.js +102 -0
- package/build/services/mirrorSnapshot.js.map +1 -0
- package/build/services/nativeNavigationGate.d.ts +8 -0
- package/build/services/nativeNavigationGate.d.ts.map +1 -0
- package/build/services/nativeNavigationGate.js +12 -0
- package/build/services/nativeNavigationGate.js.map +1 -0
- package/build/services/notificationAppCatalog.d.ts +7 -0
- package/build/services/notificationAppCatalog.d.ts.map +1 -0
- package/build/services/notificationAppCatalog.js +16 -0
- package/build/services/notificationAppCatalog.js.map +1 -0
- package/build/services/notifications/notificationPolicy.d.ts +55 -0
- package/build/services/notifications/notificationPolicy.d.ts.map +1 -0
- package/build/services/notifications/notificationPolicy.js +41 -0
- package/build/services/notifications/notificationPolicy.js.map +1 -0
- package/build/services/pages/OverlayPages.d.ts +26 -0
- package/build/services/pages/OverlayPages.d.ts.map +1 -0
- package/build/services/pages/OverlayPages.js +80 -0
- package/build/services/pages/OverlayPages.js.map +1 -0
- package/build/services/pages/PageHost.d.ts +32 -0
- package/build/services/pages/PageHost.d.ts.map +1 -0
- package/build/services/pages/PageHost.js +99 -0
- package/build/services/pages/PageHost.js.map +1 -0
- package/build/services/pages/overlayApps.d.ts +25 -0
- package/build/services/pages/overlayApps.d.ts.map +1 -0
- package/build/services/pages/overlayApps.js +66 -0
- package/build/services/pages/overlayApps.js.map +1 -0
- package/build/services/pages/pageEligibility.d.ts +9 -0
- package/build/services/pages/pageEligibility.d.ts.map +1 -0
- package/build/services/pages/pageEligibility.js +27 -0
- package/build/services/pages/pageEligibility.js.map +1 -0
- package/build/services/settingsBridge.d.ts +58 -0
- package/build/services/settingsBridge.d.ts.map +1 -0
- package/build/services/settingsBridge.js +90 -0
- package/build/services/settingsBridge.js.map +1 -0
- package/build/services/speakerProfileStoreInstance.js +1 -1
- package/build/services/speakerProfileStoreInstance.js.map +1 -1
- package/build/services/uiShim.d.ts +1 -1
- package/build/services/uiShim.js +4 -4
- package/build/services/uiShim.js.map +1 -1
- package/build/stores/appVisibility.d.ts +28 -0
- package/build/stores/appVisibility.d.ts.map +1 -1
- package/build/stores/appVisibility.js +34 -0
- package/build/stores/appVisibility.js.map +1 -1
- package/build/stores/apps.d.ts +13 -0
- package/build/stores/apps.d.ts.map +1 -1
- package/build/stores/apps.js +66 -12
- package/build/stores/apps.js.map +1 -1
- package/build/stores/bluetoothSettingKeys.js +1 -1
- package/build/stores/bluetoothSettingKeys.js.map +1 -1
- package/build/stores/display.d.ts +3 -3
- package/build/stores/display.d.ts.map +1 -1
- package/build/stores/display.js +16 -4
- package/build/stores/display.js.map +1 -1
- package/build/stores/glasses.d.ts.map +1 -1
- package/build/stores/glasses.js +14 -1
- package/build/stores/glasses.js.map +1 -1
- package/build/stores/settings.d.ts +1 -0
- package/build/stores/settings.d.ts.map +1 -1
- package/build/stores/settings.js +170 -44
- package/build/stores/settings.js.map +1 -1
- package/build/types/applet.d.ts +14 -1
- package/build/types/applet.d.ts.map +1 -1
- package/build/types/applet.js.map +1 -1
- package/build/types/capabilities/even-realities-g2.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g2.js +5 -0
- package/build/types/capabilities/even-realities-g2.js.map +1 -1
- package/build/types/capabilities/simulated-glasses.d.ts +1 -1
- package/build/types/capabilities/simulated-glasses.d.ts.map +1 -1
- package/build/types/capabilities/simulated-glasses.js +7 -4
- package/build/types/capabilities/simulated-glasses.js.map +1 -1
- package/build/types/hardware.d.ts +20 -1
- package/build/types/hardware.d.ts.map +1 -1
- package/build/types/hardware.js +2 -0
- package/build/types/hardware.js.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.js +1 -0
- package/build/types/index.js.map +1 -1
- package/build/utils/debouncedPatch.d.ts +3 -1
- package/build/utils/debouncedPatch.d.ts.map +1 -1
- package/build/utils/debouncedPatch.js +6 -3
- package/build/utils/debouncedPatch.js.map +1 -1
- package/build/utils/devMiniappLaunch.d.ts.map +1 -1
- package/build/utils/devMiniappLaunch.js +4 -3
- package/build/utils/devMiniappLaunch.js.map +1 -1
- package/build/utils/display/measurer/TextMeasurer.d.ts +2 -159
- package/build/utils/display/measurer/TextMeasurer.d.ts.map +1 -1
- package/build/utils/display/measurer/TextMeasurer.js +2 -272
- package/build/utils/display/measurer/TextMeasurer.js.map +1 -1
- package/build/utils/display/measurer/script-detection.d.ts +1 -52
- package/build/utils/display/measurer/script-detection.d.ts.map +1 -1
- package/build/utils/display/measurer/script-detection.js +2 -183
- package/build/utils/display/measurer/script-detection.js.map +1 -1
- package/build/utils/display/pixelArt.d.ts +3 -0
- package/build/utils/display/pixelArt.d.ts.map +1 -0
- package/build/utils/display/pixelArt.js +3 -0
- package/build/utils/display/pixelArt.js.map +1 -0
- package/build/utils/display/profiles/g1.d.ts +1 -32
- package/build/utils/display/profiles/g1.d.ts.map +1 -1
- package/build/utils/display/profiles/g1.js +2 -212
- package/build/utils/display/profiles/g1.js.map +1 -1
- package/build/utils/display/profiles/g2.d.ts +1 -12
- package/build/utils/display/profiles/g2.d.ts.map +1 -1
- package/build/utils/display/profiles/g2.js +2 -33
- package/build/utils/display/profiles/g2.js.map +1 -1
- package/build/utils/display/profiles/nex.d.ts +1 -9
- package/build/utils/display/profiles/nex.d.ts.map +1 -1
- package/build/utils/display/profiles/nex.js +2 -149
- package/build/utils/display/profiles/nex.js.map +1 -1
- package/build/utils/display/profiles/types.d.ts +1 -102
- package/build/utils/display/profiles/types.d.ts.map +1 -1
- package/build/utils/display/profiles/types.js.map +1 -1
- package/build/utils/display/profiles/z100.d.ts +1 -32
- package/build/utils/display/profiles/z100.d.ts.map +1 -1
- package/build/utils/display/profiles/z100.js +2 -181
- package/build/utils/display/profiles/z100.js.map +1 -1
- package/build/utils/display/scene/degrade.d.ts.map +1 -1
- package/build/utils/display/scene/degrade.js +4 -1
- package/build/utils/display/scene/degrade.js.map +1 -1
- package/build/utils/display/scene/differ.d.ts +13 -1
- package/build/utils/display/scene/differ.d.ts.map +1 -1
- package/build/utils/display/scene/differ.js +22 -0
- package/build/utils/display/scene/differ.js.map +1 -1
- package/build/utils/display/scene/index.d.ts +1 -1
- package/build/utils/display/scene/index.d.ts.map +1 -1
- package/build/utils/display/scene/index.js.map +1 -1
- package/build/utils/display/scene/process.d.ts.map +1 -1
- package/build/utils/display/scene/process.js +183 -11
- package/build/utils/display/scene/process.js.map +1 -1
- package/build/utils/display/scene/store.d.ts +1 -1
- package/build/utils/display/scene/store.d.ts.map +1 -1
- package/build/utils/display/scene/store.js +0 -0
- package/build/utils/display/scene/store.js.map +1 -1
- package/build/utils/display/scene/svgPath.d.ts +9 -0
- package/build/utils/display/scene/svgPath.d.ts.map +1 -0
- package/build/utils/display/scene/svgPath.js +167 -0
- package/build/utils/display/scene/svgPath.js.map +1 -0
- package/build/utils/display/scene/types.d.ts +2 -142
- package/build/utils/display/scene/types.d.ts.map +1 -1
- package/build/utils/display/scene/types.js +0 -0
- package/build/utils/display/scene/types.js.map +1 -1
- package/build/utils/display/wrapper/TextWrapper.d.ts +1 -101
- package/build/utils/display/wrapper/TextWrapper.d.ts.map +1 -1
- package/build/utils/display/wrapper/TextWrapper.js +2 -470
- package/build/utils/display/wrapper/TextWrapper.js.map +1 -1
- package/build/utils/display/wrapper/types.d.ts +2 -74
- package/build/utils/display/wrapper/types.d.ts.map +1 -1
- package/build/utils/display/wrapper/types.js +2 -10
- package/build/utils/display/wrapper/types.js.map +1 -1
- package/build/utils/hardware/hardware.js +1 -1
- package/build/utils/hardware/hardware.js.map +1 -1
- package/build/utils/timers/timers.d.ts.map +1 -1
- package/build/utils/timers/timers.js +26 -4
- package/build/utils/timers/timers.js.map +1 -1
- package/package.json +8 -8
- package/src/engine.ts +24 -15
- package/src/facades/dev.ts +10 -0
- package/src/facades/display.ts +21 -8
- package/src/facades/displayMirror.ts +29 -0
- package/src/facades/glasses.ts +61 -1
- package/src/facades/memory.ts +1 -12
- package/src/facades/miniapps.ts +4 -1
- package/src/facades/pairing.ts +8 -6
- package/src/facades/permissions.ts +46 -0
- package/src/facades/phoneNotifications.ts +45 -26
- package/src/facades/settings.ts +1 -2
- package/src/generated/releaseMetadata.ts +4 -4
- package/src/index.ts +6 -9
- package/src/react/MentraLiveOtaFlow.tsx +2 -2
- package/src/react/useMentraLiveOta.ts +14 -8
- package/src/runtime/config.ts +1 -1
- package/src/services/AppRegistry.ts +43 -7
- package/src/services/BlobStore.ts +3 -3
- package/src/services/CloudClientService.ts +37 -10
- package/src/services/DevServerBridge.ts +12 -10
- package/src/services/DeviceEventRouter.ts +73 -74
- package/src/services/DisplayDiagnostics.ts +107 -0
- package/src/services/DisplayProcessor.ts +20 -55
- package/src/services/GestureDotsService.ts +77 -16
- package/src/services/GlassesKeyboardInput.ts +306 -0
- package/src/services/GlassesSensorService.ts +233 -0
- package/src/services/GlassesTouchInput.ts +128 -0
- package/src/services/HeadingService.ts +0 -24
- package/src/services/HotspotShutdown.ts +3 -1
- package/src/services/JSCrashloopReportService.ts +2 -2
- package/src/services/JSRouter.ts +29 -14
- package/src/services/LocalDisplayManager.ts +112 -26
- package/src/services/LocalMiniappDataMigration.ts +1 -1
- package/src/services/LocalMiniappRuntime.ts +500 -43
- package/src/services/LocalSttFallbackCoordinator.ts +28 -7
- package/src/services/MemoryStore.ts +32 -80
- package/src/services/MiniappEngine.ts +7 -7
- package/src/services/MiniappLauncher.ts +25 -1
- package/src/services/MirrorService.ts +139 -0
- package/src/services/NativeNavigationService.ts +29 -25
- package/src/services/NavigationHandlers.ts +10 -5
- package/src/services/OtaInstallCoordinator.ts +36 -34
- package/src/services/PairedGlassesLatch.ts +39 -0
- package/src/services/PhoneActivity.ts +116 -0
- package/src/services/PhoneCameraFovCoordinator.ts +6 -4
- package/src/services/PhoneNotificationsSync.ts +185 -103
- package/src/services/PhonePhotoCoordinator.ts +9 -10
- package/src/services/PhoneStreamCoordinator.ts +13 -11
- package/src/services/STTModelManager.ts +15 -1
- package/src/services/SceneRenderer.ts +148 -10
- package/src/services/StreamLifecycleController.ts +9 -7
- package/src/services/TTSModelManager.ts +1 -1
- package/src/services/UIRouter.ts +5 -5
- package/src/services/asg/galleryPathMigration.ts +1 -1
- package/src/services/asg/gallerySyncService.ts +2 -2
- package/src/services/asg/localStorageService.ts +3 -3
- package/src/services/debug/DashboardOpenTrace.ts +153 -0
- package/src/services/debug/dashboardOpenTimeline.ts +237 -0
- package/src/services/effectiveCapabilities.ts +32 -13
- package/src/services/gestureClaims.ts +72 -23
- package/src/services/manifestFields.ts +23 -0
- package/src/services/memoryStoreInstance.ts +2 -34
- package/src/services/mirrorSnapshot.ts +116 -0
- package/src/services/nativeNavigationGate.ts +14 -0
- package/src/services/notificationAppCatalog.ts +21 -0
- package/src/services/notifications/notificationPolicy.ts +87 -0
- package/src/services/pages/OverlayPages.ts +86 -0
- package/src/services/pages/PageHost.ts +116 -0
- package/src/services/pages/overlayApps.ts +72 -0
- package/src/services/pages/pageEligibility.ts +30 -0
- package/src/services/settingsBridge.ts +111 -0
- package/src/services/speakerProfileStoreInstance.ts +1 -1
- package/src/services/uiShim.ts +4 -4
- package/src/stores/appVisibility.ts +45 -0
- package/src/stores/apps.ts +110 -32
- package/src/stores/bluetoothSettingKeys.ts +1 -1
- package/src/stores/display.ts +18 -7
- package/src/stores/glasses.ts +15 -1
- package/src/stores/settings.ts +175 -51
- package/src/types/applet.ts +14 -1
- package/src/types/capabilities/even-realities-g2.ts +6 -0
- package/src/types/capabilities/simulated-glasses.ts +8 -4
- package/src/types/hardware.ts +34 -1
- package/src/types/index.ts +1 -0
- package/src/utils/debouncedPatch.ts +8 -4
- package/src/utils/devMiniappLaunch.ts +5 -3
- package/src/utils/display/measurer/TextMeasurer.ts +3 -346
- package/src/utils/display/measurer/script-detection.ts +10 -218
- package/src/utils/display/pixelArt.ts +3 -0
- package/src/utils/display/profiles/g1.ts +2 -236
- package/src/utils/display/profiles/g2.ts +2 -39
- package/src/utils/display/profiles/nex.ts +2 -166
- package/src/utils/display/profiles/types.ts +9 -132
- package/src/utils/display/profiles/z100.ts +2 -198
- package/src/utils/display/scene/degrade.ts +4 -1
- package/src/utils/display/scene/differ.ts +25 -1
- package/src/utils/display/scene/index.ts +5 -0
- package/src/utils/display/scene/process.ts +196 -13
- package/src/utils/display/scene/store.ts +0 -0
- package/src/utils/display/scene/svgPath.ts +163 -0
- package/src/utils/display/scene/types.ts +0 -0
- package/src/utils/display/wrapper/TextWrapper.ts +2 -546
- package/src/utils/display/wrapper/types.ts +3 -102
- package/src/utils/hardware/hardware.ts +1 -1
- package/src/utils/timers/timers.ts +32 -4
- package/build/services/CustomDashboardModel.d.ts +0 -48
- package/build/services/CustomDashboardModel.d.ts.map +0 -1
- package/build/services/CustomDashboardModel.js +0 -73
- package/build/services/CustomDashboardModel.js.map +0 -1
- package/build/services/CustomDashboardService.d.ts +0 -63
- package/build/services/CustomDashboardService.d.ts.map +0 -1
- package/build/services/CustomDashboardService.js +0 -576
- package/build/services/CustomDashboardService.js.map +0 -1
- package/build/services/DashboardCoordinator.d.ts +0 -26
- package/build/services/DashboardCoordinator.d.ts.map +0 -1
- package/build/services/DashboardCoordinator.js +0 -125
- package/build/services/DashboardCoordinator.js.map +0 -1
- package/build/services/iosNotificationAppCatalog.d.ts +0 -13
- package/build/services/iosNotificationAppCatalog.d.ts.map +0 -1
- package/build/services/iosNotificationAppCatalog.js +0 -28
- package/build/services/iosNotificationAppCatalog.js.map +0 -1
- package/src/services/CustomDashboardModel.ts +0 -83
- package/src/services/CustomDashboardService.ts +0 -598
- package/src/services/DashboardCoordinator.ts +0 -121
- package/src/services/iosNotificationAppCatalog.ts +0 -39
package/build/index.js
CHANGED
|
@@ -6,18 +6,19 @@
|
|
|
6
6
|
* renders with (decision functions, sort/order helpers, policy constants,
|
|
7
7
|
* capability tables, timers). Judgment rule: read models, commands, pure
|
|
8
8
|
* functions and types belong here; anything that mutates runtime state or
|
|
9
|
-
* exposes a raw store/service remains private to the
|
|
9
|
+
* exposes a raw store/service remains private to the Glassly host.
|
|
10
10
|
* See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.
|
|
11
11
|
*/
|
|
12
12
|
// The namespaced OEM-facing engine API (the "(A) host API"). See ./engine.
|
|
13
13
|
export { engine } from "./engine";
|
|
14
|
+
export { DEFAULT_HIDDEN_PACKAGES } from "./stores/appVisibility";
|
|
14
15
|
// Settings contract: the typed key registry (schema descriptors — the same
|
|
15
16
|
// surface engine.settings.descriptor()/keys() reads), the per-key React hook
|
|
16
17
|
// (the hook layer, same precedent as the apps hooks below), and the pure
|
|
17
18
|
// device-model key helpers. The raw useSettingsStore stays internal;
|
|
18
19
|
// imperative access goes through engine.settings.
|
|
19
|
-
export { SETTINGS, useSetting } from "./stores/settings";
|
|
20
|
-
export {
|
|
20
|
+
export { SETTINGS, useSetting, AI_DATA_CONSENT_VERSION } from "./stores/settings";
|
|
21
|
+
export { isCfwFirmwareVersion, isCustomDashboardEligible } from "./services/pages/pageEligibility";
|
|
21
22
|
// AI tier registry: the curated per-tier model dropdown options and helpers
|
|
22
23
|
// the Settings > AI Models screen renders. Resolution itself runs inside
|
|
23
24
|
// LocalMiniappRuntime; the screen only reads/writes the ai_model_* settings.
|
|
@@ -41,7 +42,7 @@ export { deriveGalleryDisplayName } from "./utils/permissions/galleryDisplayName
|
|
|
41
42
|
export { WebSocketStatus } from "./stores/connection";
|
|
42
43
|
// App-list hook layer + pure list helpers (the raw useAppStatusStore and
|
|
43
44
|
// installAppStoreHooks wiring are internal).
|
|
44
|
-
export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriority, saveLastOpenTime, getLastOpenTime, sortAppsByLastOpenTime, useApps, useStart, useStop, useSetForeground, useClearForeground, useRefresh, useStopAll, useInstall, useUninstall, useActiveApps, useActiveBackgroundApps, useBackgroundApps, useActiveForegroundApp, useForegroundApp, useActiveBackgroundAppsCount, useLocalMiniApps, } from "./stores/apps";
|
|
45
|
+
export { DUMMY_APPLET, saveAppsOrder, getAppsOrder, sortAppsByPackageNamePriority, saveLastOpenTime, getLastOpenTime, sortAppsByLastOpenTime, useApps, useStart, useStop, useSetForeground, useClearForeground, useRefresh, useStopAll, useInstall, useUninstall, useActiveApps, useRunningPersistentApps, useActiveBackgroundApps, useBackgroundApps, useActiveForegroundApp, useForegroundApp, useActiveBackgroundAppsCount, useLocalMiniApps, } from "./stores/apps";
|
|
45
46
|
// Pure dev-miniapp launch-route decision (registration itself is internal).
|
|
46
47
|
export { decideDevLaunchRoute, } from "./utils/devMiniappLaunch";
|
|
47
48
|
export { HardwareCompatibility } from "./utils/hardware";
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E;AAC3E,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAyB/B,2EAA2E;AAC3E,6EAA6E;AAC7E,yEAAyE;AACzE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACtD,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB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A6C;AAC7C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,6BAA6B,EAC7B,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,OAAO,EACP,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,gBAAgB,GAGjB,MAAM,eAAe,CAAA;AAEtB,4EAA4E;AAC5E,OAAO,EACL,oBAAoB,GAIrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,qBAAqB,EAA2B,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAE1D,0CAA0C;AAC1C,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@glassly/engine` — the OEM-facing main entry.\n *\n * The `engine` namespace (configure/start/stop + typed domain facades), the\n * public contract/read-model types, and the pure helpers host UI legitimately\n * renders with (decision functions, sort/order helpers, policy constants,\n * capability tables, timers). Judgment rule: read models, commands, pure\n * functions and types belong here; anything that mutates runtime state or\n * exposes a raw store/service remains private to the GlasslyOS host.\n * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.\n */\n\n// The namespaced OEM-facing engine API (the \"(A) host API\"). See ./engine.\nexport {engine} from \"./engine\"\nexport type {\n ReportAttachmentInput,\n ReportContext,\n ReportDetails,\n ReportStatus,\n ReportTrigger,\n ReportSubmitResult,\n EngineSubmitReportInput,\n} from \"./facades/reports\"\nexport type {IslandNotification, IslandNotificationKind} from \"./facades/notifications\"\nexport type {WifiSearchResult} from \"./facades/glassesWifi\"\nexport type {IdentitySnapshot} from \"./services/PairingIdentity\"\nexport type {DisplayMirrorEvent} from \"./facades/displayMirror\"\nexport type {\n IslandConfigureOptions,\n IslandAuth,\n IslandConfigValues,\n IslandAnalytics,\n IslandUiSeams,\n ScanQrOptions,\n ScanQrResult,\n SubjectTokenType,\n} from \"./runtime/bootstrap\"\n\n// Settings contract: the typed key registry (schema descriptors — the same\n// surface engine.settings.descriptor()/keys() reads), the per-key React hook\n// (the hook layer, same precedent as the apps hooks below), and the pure\n// device-model key helpers. The raw useSettingsStore stays internal;\n// imperative access goes through engine.settings.\nexport {SETTINGS, useSetting} from \"./stores/settings\"\nexport {\n isCustomDashboardEligible,\n normalizeDashboardWidgets,\n DASHBOARD_WIDGET_IDS,\n type DashboardWidgetId,\n type DashboardWidgetSetting,\n} from \"./services/CustomDashboardModel\"\n\n// AI tier registry: the curated per-tier model dropdown options and helpers\n// the Settings > AI Models screen renders. Resolution itself runs inside\n// LocalMiniappRuntime; the screen only reads/writes the ai_model_* settings.\nexport {AI_TIERS, TIER_MODEL_OPTIONS, parseTierSetting} from \"./services/AiTierResolution\"\nexport type {AiTier, AiTierProvider, TierModelOption} from \"./services/AiTierResolution\"\n\n// Shared user memory timeline (engine.memory / Settings > Memory). Entry and\n// session shapes are canonical in @glassly/miniapp (the session.memory\n// surface); the stats read model is engine-side.\nexport type {MemoryStats} from \"./services/MemoryStore\"\nexport type {SpeakerProfile} from \"./services/SpeakerProfileStore\"\nexport type {EnrollOutcome} from \"./facades/speakers\"\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./stores/bluetoothSettingKeys\"\n\n// Runtime-shared constants and contract DTOs.\nexport {ISLAND_SETTINGS_KEYS} from \"./runtime/config\"\nexport type {CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, TtsSynthesisResult} from \"./runtime/config\"\n\n// Pure readiness predicates over glasses connection state.\nexport {\n isGlassesConnected,\n isGlassesReady,\n isGlassesLinkLayerBusy,\n waitForGlassesReady,\n type GlassesConnectionStatus,\n type WaitForGlassesReadyOptions,\n} from \"./services/GlassesReadiness\"\n// Pure connect/reconnect decision helpers (host UI renders the outcome).\nexport {\n decideReconnect,\n decideConnectButtonAction,\n type ReconnectDecision,\n type ReconnectDecisionInput,\n type ConnectButtonAction,\n} from \"./services/ConnectionCoordinator\"\n\n// OTA read-model types for host OTA UI (progress screen, error mapping,\n// progress section) — the check/install machinery itself is internal.\nexport type {\n VersionInfo,\n MtkPatch,\n BesFirmware,\n VersionJson,\n OtaCheckResult,\n OtaCheckCurrentGlassesResult,\n OtaCheckCurrentGlassesOptions,\n} from \"./services/OtaUpdateCheckService\"\n// OTA install policy (watchdog timings + failure copy) + display-state\n// derivation, consumed by the OTA screens and their tests.\nexport {\n MINIMUM_OTA_STATUS_BUILD,\n MAX_RETRIES,\n RETRY_INTERVAL_MS,\n PROGRESS_TIMEOUT_MS,\n DOWNLOAD_STUCK_TIMEOUT_MS,\n MTK_INSTALL_TIMEOUT_MS,\n GLOBAL_OTA_TIMEOUT_MS,\n PING_INTERVAL_MS,\n QUERY_REPLY_TIMEOUT_MS,\n BES_RESTART_TIMEOUT_MS,\n OtaProgressMessages,\n} from \"./services/otaInstallPolicy\"\nexport {deriveDisplayState} from \"./services/otaDisplayState\"\nexport type {DisplayState} from \"./services/otaDisplayState\"\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n OtaSnapshot,\n OtaInstallSnapshot,\n} from \"./facades/ota\"\nexport {\n beginOtaAutoChain,\n clearOtaAutoChainReconnectWait,\n isOtaAutoChainActive,\n otaAutoChainFingerprint,\n otaAutoChainReconnectWaitRemaining,\n stopOtaAutoChain,\n tryAdvanceOtaAutoChain,\n MAX_OTA_AUTO_CHAIN_PASSES,\n OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS,\n} from \"./services/OtaAutoChain\"\nexport type {OtaAutoChainAdvanceResult} from \"./services/OtaAutoChain\"\nexport {\n BES_INSTALL_RESTART_MESSAGE,\n getOtaErrorMessage,\n shouldRequireGlassesRebootForBesFailure,\n shouldShowChangeWifiForOtaDownloadFailure,\n} from \"./services/OtaErrorMapping\"\n\n// Gallery read models: engine.gallery.onNotice payload types, the media\n// permission helper + display-name derivation host gallery UI uses, and the\n// glasses-camera DTO types (re-exported through the host @/types/asg shim).\nexport type {GalleryNotice, GalleryNoticeCode} from \"./services/asg/galleryNotices\"\nexport {MediaLibraryPermissions} from \"./utils/permissions/MediaLibraryPermissions\"\nexport {deriveGalleryDisplayName} from \"./utils/permissions/galleryDisplayName\"\nexport type {\n PhotoInfo,\n CaptureFile,\n CaptureGroup,\n GalleryResponse,\n ServerStatus,\n HealthResponse,\n GalleryEvent,\n} from \"./types/asg\"\n\n// Bluetooth SDK event types host UI subscribes to via engine facades (the\n// BluetoothSdk singleton passthrough itself is internal).\nexport type {PairFailureEvent, GlassesNotReadyEvent} from \"@glassly/bluetooth-sdk\"\n\n// Cloud connection status enum (read model; the connection store is internal).\nexport {WebSocketStatus} from \"./stores/connection\"\n\n// App-list hook layer + pure list helpers (the raw useAppStatusStore and\n// installAppStoreHooks wiring are internal).\nexport {\n DUMMY_APPLET,\n saveAppsOrder,\n getAppsOrder,\n sortAppsByPackageNamePriority,\n saveLastOpenTime,\n getLastOpenTime,\n sortAppsByLastOpenTime,\n useApps,\n useStart,\n useStop,\n useSetForeground,\n useClearForeground,\n useRefresh,\n useStopAll,\n useInstall,\n useUninstall,\n useActiveApps,\n useActiveBackgroundApps,\n useBackgroundApps,\n useActiveForegroundApp,\n useForegroundApp,\n useActiveBackgroundAppsCount,\n useLocalMiniApps,\n type StartOptions,\n type OrderMap,\n} from \"./stores/apps\"\n\n// Pure dev-miniapp launch-route decision (registration itself is internal).\nexport {\n decideDevLaunchRoute,\n type DecideDevLaunchOptions,\n type DevLaunchResult,\n type DevManifest,\n} from \"./utils/devMiniappLaunch\"\nexport {HardwareCompatibility, type CompatibilityResult} from \"./utils/hardware\"\nexport {BgTimer, throttle, debounce} from \"./utils/timers\"\n\n// Hardware types and capability profiles.\nexport {\n HardwareType,\n HardwareRequirementLevel,\n DeviceTypes,\n ControllerTypes,\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n nimo,\n vuzixZ100,\n mentraDisplay,\n} from \"./types\"\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n AppletType,\n AppPermissionType,\n AppletPermission,\n AppletInterface,\n ClientApp,\n} from \"./types\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E;AAC3E,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAY/B,OAAO,EAAC,uBAAuB,EAAC,MAAM,wBAAwB,CAAA;AAe9D,2EAA2E;AAC3E,6EAA6E;AAC7E,yEAAyE;AACzE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,uBAAuB,EAAC,MAAM,mBAAmB,CAAA;AAC/E,OAAO,EAAC,oBAAoB,EAAE,yBAAyB,EAAC,MAAM,kCAAkC,CAAA;AAEhG,4EAA4E;AAC5E,yEAAyE;AACzE,6EAA6E;AAC7E,OAAO,EAAC,QAAQ,EAAE,kBAAkB,EAAE,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAS1F,OAAO,EAAC,wBAAwB,EAAE,gCAAgC,EAAC,MAAM,+BAA+B,CAAA;AAExG,8CAA8C;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAA;AAGrD,2DAA2D;AAC3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AAgB,GAGjB,MAAM,eAAe,CAAA;AAEtB,4EAA4E;AAC5E,OAAO,EACL,oBAAoB,GAIrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAC,qBAAqB,EAA2B,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAE1D,0CAA0C;AAC1C,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@glassly/engine` — the OEM-facing main entry.\n *\n * The `engine` namespace (configure/start/stop + typed domain facades), the\n * public contract/read-model types, and the pure helpers host UI legitimately\n * renders with (decision functions, sort/order helpers, policy constants,\n * capability tables, timers). Judgment rule: read models, commands, pure\n * functions and types belong here; anything that mutates runtime state or\n * exposes a raw store/service remains private to the Glassly host.\n * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.\n */\n\n// The namespaced OEM-facing engine API (the \"(A) host API\"). See ./engine.\nexport {engine} from \"./engine\"\nexport type {\n ReportAttachmentInput,\n ReportContext,\n ReportDetails,\n ReportStatus,\n ReportTrigger,\n ReportSubmitResult,\n EngineSubmitReportInput,\n} from \"./facades/reports\"\nexport type {IslandNotification, IslandNotificationKind} from \"./facades/notifications\"\nexport type {PresentationOwner} from \"./services/notifications/notificationPolicy\"\nexport {DEFAULT_HIDDEN_PACKAGES} from \"./stores/appVisibility\"\nexport type {WifiSearchResult} from \"./facades/glassesWifi\"\nexport type {IdentitySnapshot} from \"./services/PairingIdentity\"\nexport type {DisplayMirrorEvent} from \"./facades/displayMirror\"\nexport type {\n IslandConfigureOptions,\n IslandAuth,\n IslandConfigValues,\n IslandAnalytics,\n IslandUiSeams,\n ScanQrOptions,\n ScanQrResult,\n SubjectTokenType,\n} from \"./runtime/bootstrap\"\n\n// Settings contract: the typed key registry (schema descriptors — the same\n// surface engine.settings.descriptor()/keys() reads), the per-key React hook\n// (the hook layer, same precedent as the apps hooks below), and the pure\n// device-model key helpers. The raw useSettingsStore stays internal;\n// imperative access goes through engine.settings.\nexport {SETTINGS, useSetting, AI_DATA_CONSENT_VERSION} from \"./stores/settings\"\nexport {isCfwFirmwareVersion, isCustomDashboardEligible} from \"./services/pages/pageEligibility\"\n\n// AI tier registry: the curated per-tier model dropdown options and helpers\n// the Settings > AI Models screen renders. Resolution itself runs inside\n// LocalMiniappRuntime; the screen only reads/writes the ai_model_* settings.\nexport {AI_TIERS, TIER_MODEL_OPTIONS, parseTierSetting} from \"./services/AiTierResolution\"\nexport type {AiTier, AiTierProvider, TierModelOption} from \"./services/AiTierResolution\"\n\n// Shared user memory timeline (engine.memory / Settings > Memory). Entry and\n// session shapes are canonical in @glassly/miniapp (the session.memory\n// surface); the stats read model is engine-side.\nexport type {MemoryStats} from \"./services/MemoryStore\"\nexport type {SpeakerProfile} from \"./services/SpeakerProfileStore\"\nexport type {EnrollOutcome} from \"./facades/speakers\"\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./stores/bluetoothSettingKeys\"\n\n// Runtime-shared constants and contract DTOs.\nexport {ISLAND_SETTINGS_KEYS} from \"./runtime/config\"\nexport type {CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, TtsSynthesisResult} from \"./runtime/config\"\n\n// Pure readiness predicates over glasses connection state.\nexport {\n isGlassesConnected,\n isGlassesReady,\n isGlassesLinkLayerBusy,\n waitForGlassesReady,\n type GlassesConnectionStatus,\n type WaitForGlassesReadyOptions,\n} from \"./services/GlassesReadiness\"\n// Pure connect/reconnect decision helpers (host UI renders the outcome).\nexport {\n decideReconnect,\n decideConnectButtonAction,\n type ReconnectDecision,\n type ReconnectDecisionInput,\n type ConnectButtonAction,\n} from \"./services/ConnectionCoordinator\"\n\n// OTA read-model types for host OTA UI (progress screen, error mapping,\n// progress section) — the check/install machinery itself is internal.\nexport type {\n VersionInfo,\n MtkPatch,\n BesFirmware,\n VersionJson,\n OtaCheckResult,\n OtaCheckCurrentGlassesResult,\n OtaCheckCurrentGlassesOptions,\n} from \"./services/OtaUpdateCheckService\"\n// OTA install policy (watchdog timings + failure copy) + display-state\n// derivation, consumed by the OTA screens and their tests.\nexport {\n MINIMUM_OTA_STATUS_BUILD,\n MAX_RETRIES,\n RETRY_INTERVAL_MS,\n PROGRESS_TIMEOUT_MS,\n DOWNLOAD_STUCK_TIMEOUT_MS,\n MTK_INSTALL_TIMEOUT_MS,\n GLOBAL_OTA_TIMEOUT_MS,\n PING_INTERVAL_MS,\n QUERY_REPLY_TIMEOUT_MS,\n BES_RESTART_TIMEOUT_MS,\n OtaProgressMessages,\n} from \"./services/otaInstallPolicy\"\nexport {deriveDisplayState} from \"./services/otaDisplayState\"\nexport type {DisplayState} from \"./services/otaDisplayState\"\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n OtaSnapshot,\n OtaInstallSnapshot,\n} from \"./facades/ota\"\nexport {\n beginOtaAutoChain,\n clearOtaAutoChainReconnectWait,\n isOtaAutoChainActive,\n otaAutoChainFingerprint,\n otaAutoChainReconnectWaitRemaining,\n stopOtaAutoChain,\n tryAdvanceOtaAutoChain,\n MAX_OTA_AUTO_CHAIN_PASSES,\n OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS,\n} from \"./services/OtaAutoChain\"\nexport type {OtaAutoChainAdvanceResult} from \"./services/OtaAutoChain\"\nexport {\n BES_INSTALL_RESTART_MESSAGE,\n getOtaErrorMessage,\n shouldRequireGlassesRebootForBesFailure,\n shouldShowChangeWifiForOtaDownloadFailure,\n} from \"./services/OtaErrorMapping\"\n\n// Gallery read models: engine.gallery.onNotice payload types, the media\n// permission helper + display-name derivation host gallery UI uses, and the\n// glasses-camera DTO types (re-exported through the host @/types/asg shim).\nexport type {GalleryNotice, GalleryNoticeCode} from \"./services/asg/galleryNotices\"\nexport {MediaLibraryPermissions} from \"./utils/permissions/MediaLibraryPermissions\"\nexport {deriveGalleryDisplayName} from \"./utils/permissions/galleryDisplayName\"\nexport type {\n PhotoInfo,\n CaptureFile,\n CaptureGroup,\n GalleryResponse,\n ServerStatus,\n HealthResponse,\n GalleryEvent,\n} from \"./types/asg\"\n\n// Bluetooth SDK event types host UI subscribes to via engine facades (the\n// BluetoothSdk singleton passthrough itself is internal).\nexport type {PairFailureEvent, GlassesNotReadyEvent} from \"@glassly/bluetooth-sdk\"\n\n// Cloud connection status enum (read model; the connection store is internal).\nexport {WebSocketStatus} from \"./stores/connection\"\n\n// App-list hook layer + pure list helpers (the raw useAppStatusStore and\n// installAppStoreHooks wiring are internal).\nexport {\n DUMMY_APPLET,\n saveAppsOrder,\n getAppsOrder,\n sortAppsByPackageNamePriority,\n saveLastOpenTime,\n getLastOpenTime,\n sortAppsByLastOpenTime,\n useApps,\n useStart,\n useStop,\n useSetForeground,\n useClearForeground,\n useRefresh,\n useStopAll,\n useInstall,\n useUninstall,\n useActiveApps,\n useRunningPersistentApps,\n useActiveBackgroundApps,\n useBackgroundApps,\n useActiveForegroundApp,\n useForegroundApp,\n useActiveBackgroundAppsCount,\n useLocalMiniApps,\n type StartOptions,\n type OrderMap,\n} from \"./stores/apps\"\n\n// Pure dev-miniapp launch-route decision (registration itself is internal).\nexport {\n decideDevLaunchRoute,\n type DecideDevLaunchOptions,\n type DevLaunchResult,\n type DevManifest,\n} from \"./utils/devMiniappLaunch\"\nexport {HardwareCompatibility, type CompatibilityResult} from \"./utils/hardware\"\nexport {BgTimer, throttle, debounce} from \"./utils/timers\"\n\n// Hardware types and capability profiles.\nexport {\n HardwareType,\n HardwareRequirementLevel,\n DeviceTypes,\n ControllerTypes,\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n nimo,\n vuzixZ100,\n mentraDisplay,\n} from \"./types\"\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n AppletType,\n AppPermissionType,\n AppletPermission,\n AppletInterface,\n ClientApp,\n} from \"./types\"\n"]}
|
|
@@ -76,7 +76,7 @@ export function MentraLiveOtaFlow({ allowDevSkip = typeof __DEV__ !== "undefined
|
|
|
76
76
|
onFirmwareRestartingChange,
|
|
77
77
|
onOpenWifiSetup,
|
|
78
78
|
});
|
|
79
|
-
return (_jsxs(SafeAreaView, { style: [styles.safeArea, { backgroundColor: colors.background }, style], children: [_jsxs(View, { style: styles.header, children: [_jsx(View, {}), _jsx(
|
|
79
|
+
return (_jsxs(SafeAreaView, { style: [styles.safeArea, { backgroundColor: colors.background }, style], children: [_jsxs(View, { style: styles.header, children: [_jsx(View, {}), _jsx(BrandMark, { color: colors.primary })] }), _jsx(OtaFlowContent, { allowDevSkip: allowDevSkip, colors: colors, controller: controller, deviceName: deviceName, superMode: superMode, translate: translate })] }));
|
|
80
80
|
}
|
|
81
81
|
function OtaFlowContent({ allowDevSkip, colors, controller, deviceName, superMode, translate, }) {
|
|
82
82
|
const { state } = controller;
|
|
@@ -264,7 +264,7 @@ function FlowButton({ colors, disabled = false, label, onPress, secondary = fals
|
|
|
264
264
|
},
|
|
265
265
|
], testID: `button-${label}`, children: _jsx(Text, { style: [styles.buttonText, { color: secondary ? colors.foreground : colors.background }], children: label }) }));
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function BrandMark({ color }) {
|
|
268
268
|
return (_jsxs(Svg, { width: 33, height: 18, viewBox: "0 0 50 27", fill: "none", children: [_jsx(Rect, { y: 14.8072, width: 11.8457, height: 11.8457, fill: color }), _jsx(Path, { d: "M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z", fill: color }), _jsx(Path, { d: "M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z", fill: color })] }));
|
|
269
269
|
}
|
|
270
270
|
function FlowIcon({ colors, name }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentraLiveOtaFlow.js","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":";AAAA,kGAAkG;AAClG,OAAc,EAAC,OAAO,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,GAGL,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,WAAW,EAAiD,MAAM,qBAAqB,CAAA;AAC/F,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAA;AAC3D,OAAO,GAAG,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAEhD,OAAO,EACL,yBAAyB,EACzB,gBAAgB,GAGjB,MAAM,oBAAoB,CAAA;AAwC3B,MAAM,aAAa,GAA2B;IAC5C,UAAU,EAAE,SAAS;IACrB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,MAAM,YAAY,GAA2B;IAC3C,iBAAiB,EAAE,UAAU;IAC7B,aAAa,EAAE,MAAM;IACrB,wBAAwB,EAAE,sBAAsB;IAChD,+BAA+B,EAC7B,wGAAwG;IAC1G,qBAAqB,EAAE,uBAAuB;IAC9C,+BAA+B,EAAE,4DAA4D;IAC7F,qBAAqB,EAAE,iCAAiC;IACxD,0BAA0B,EAAE,iCAAiC;IAC7D,4BAA4B,EAC1B,mHAAmH;IACrH,+BAA+B,EAAE,+DAA+D;IAChG,uBAAuB,EAAE,4DAA4D;IACrF,uBAAuB,EAAE,wB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,EAAE,GAAG;QACd,QAAQ,EAAE,GAAG;QACb,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,MAAM;KACd;IACD,cAAc,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAC;IACjD,aAAa,EAAE,EAAC,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAC;IAC7D,gBAAgB,EAAE,EAAC,GAAG,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,EAAC;IAC7C,cAAc,EAAE,EAAC,GAAG,EAAE,CAAC,EAAC;IACxB,qBAAqB,EAAE,EAAC,cAAc,EAAE,UAAU,CAAC,aAAa,EAAE,UAAU,EAAE,EAAE,EAAC;IACjF,gBAAgB,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAC;IACnD,wBAAwB,EAAE,EAAC,GAAG,EAAE,EAAE,EAAC;IACnC,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;KACtB;IACD,UAAU,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAC;CAC9C,CAAC,CAAA","sourcesContent":["/* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */\nimport React, {useMemo} from \"react\"\nimport {\n ActivityIndicator,\n Pressable,\n ScrollView,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\"\nimport {useMarkdown, type MarkedStyles, type useMarkdownHookOptions} from \"react-native-marked\"\nimport {SafeAreaView} from \"react-native-safe-area-context\"\nimport Svg, {Path, Rect} from \"react-native-svg\"\n\nimport {\n MINIMUM_OTA_BATTERY_LEVEL,\n useMentraLiveOta,\n type MentraLiveOtaController,\n type MentraLiveOtaFlowPage,\n} from \"./useMentraLiveOta\"\n\nexport type {MentraLiveOtaFlowPage} from \"./useMentraLiveOta\"\n\nexport type MentraLiveOtaFlowTheme = {\n background: string\n border: string\n error: string\n foreground: string\n primary: string\n primaryText: string\n textDim: string\n}\n\nexport type MentraLiveOtaFlowTranslate = (key: string, options?: Record<string, string>) => string\n\nexport type MentraLiveOtaFlowProps = {\n /** Display name used in update copy. */\n deviceName?: string\n /** Entry page. `progress` exists for recovery/deep-link compatibility. */\n initialPage?: MentraLiveOtaFlowPage\n /** Start the OTA-only projections. Full Engine hosts should pass false. */\n initializeRuntime?: boolean\n /** Called after the final check or when the user leaves an optional update. */\n onFinished: () => void\n /** Host-owned Wi-Fi setup for glasses that do not support hotspot OTA. */\n onOpenWifiSetup: () => void\n /** Lets a host coordinate its global connection overlay with OTA progress and firmware restarts. */\n onFirmwareRestartingChange?: (restarting: boolean, progressActive: boolean) => void\n /** Enables the existing developer-only escape hatches. */\n allowDevSkip?: boolean\n /** Enables the existing super-mode interrupted-session escape hatch. */\n superMode?: boolean\n /** Optional host localization. Defaults to the Glassly App English OTA copy. */\n translate?: MentraLiveOtaFlowTranslate\n /** Optional host theme. Both hosts use the same layout and state machine. */\n theme?: Partial<MentraLiveOtaFlowTheme>\n style?: StyleProp<ViewStyle>\n}\n\nconst DEFAULT_THEME: MentraLiveOtaFlowTheme = {\n background: \"#FFFFFF\",\n border: \"#D7DFDA\",\n error: \"#C43131\",\n foreground: \"#0E2C1A\",\n primary: \"#00B869\",\n primaryText: \"#FFFFFF\",\n textDim: \"#66736B\",\n}\n\nconst ENGLISH_COPY: Record<string, string> = {\n \"common:continue\": \"Continue\",\n \"common:done\": \"Done\",\n \"ota:checkingForUpdates\": \"Checking for updates\",\n \"ota:checkingForUpdatesMessage\":\n \"Connected devices will perform automatic updates. Automatic updates can be disabled in Device Settings\",\n \"ota:finishingUpdate\": \"Finishing your update\",\n \"ota:checkingAdditionalUpdates\": \"Checking whether your glasses need any additional updates.\",\n \"ota:updateAvailable\": \"{{deviceName}} Update Available\",\n \"ota:batteryRequiredTitle\": \"Charge {{deviceName}} to Update\",\n \"ota:batteryRequiredMessage\":\n \"{{deviceName}} is currently at {{batteryLevel}}%. Charge it to at least {{minimumBatteryLevel}}% before updating.\",\n \"ota:batteryRequiredLiveUpdate\": \"This screen will update automatically as the battery charges.\",\n \"ota:updateConnectWifi\": \"Connect your {{deviceName}} to WiFi to install the update.\",\n \"ota:wifiRequiredTitle\": \"WiFi Needed for Update\",\n \"ota:updateDescription\":\n \"A new update is available for your glasses. We recommend updating now for the best experience.\",\n \"ota:updateSequenceMessage\":\n \"Your glasses may install more than one update and restart several times. Keep them nearby until finished.\",\n \"ota:releaseTransition\": \"{{fromVersion}} → {{toVersion}}\",\n \"ota:releaseTransitionUnknown\": \"Current version unknown → {{toVersion}}\",\n \"ota:updatedToVersion\": \"Updated to {{version}}\",\n \"ota:downgradeAvailable\": \"{{deviceName}} Version Change Required\",\n \"ota:downgradeDescription\":\n \"This app requires an earlier glasses software version. Your photos and videos will be preserved, but glasses settings will be reset and restored automatically after the change.\",\n \"ota:updateNow\": \"Update Now\",\n \"ota:setupWifi\": \"Setup WiFi\",\n \"ota:updateLater\": \"Later\",\n \"ota:updateComplete\": \"Update complete\",\n \"ota:whatsNew\": \"What's new\",\n \"ota:upToDate\": \"Up To Date\",\n \"ota:devBuild\": \"Development Build\",\n \"ota:devBuildNoOta\":\n \"This mobile app is a development build, so automatic glasses updates are disabled. Use the developer settings manifest override to update them manually.\",\n \"ota:noUpdatesAvailable\": \"Your glasses are running the latest version.\",\n \"ota:checkFailed\": \"Check Failed\",\n \"ota:checkFailedMessage\": \"Couldn't check for updates. Please check your connection and try again.\",\n \"ota:updateInfoUnavailable\": \"Update Info Unavailable\",\n \"ota:updateInfoUnavailableMessage\":\n \"Update information for this version of the app is unavailable. Please check the app store for a newer version of the Glassly App.\",\n \"ota:downgradeDuration\": \"Your glasses will restart twice — this may take up to 2 minutes.\",\n \"ota:versionChangeRestarting\": \"Installing a different version…\",\n \"ota:versionChangeVerifying\": \"Verifying your glasses…\",\n \"ota:versionChangeKeepNearby\": \"Keep your glasses nearby and connected. They will restart on their own.\",\n \"ota:restartingGlasses\": \"Restarting {{deviceName}}…\",\n \"ota:restartingGlassesMessage\":\n \"The update is installed. Keep your glasses nearby and leave this screen open while they finish starting.\",\n \"ota:restartingGlassesAutomatic\": \"We'll continue automatically when they're ready.\",\n \"ota:versionChangeComplete\": \"Version Change Complete\",\n \"ota:versionChangeCompleteMessage\":\n \"Your glasses are now on the required version. Their settings were reset and are being restored automatically.\",\n \"ota:versionChangeFirmwarePassComplete\": \"Firmware updated\",\n \"ota:versionChangeFirmwarePassCompleteMessage\":\n \"Your glasses restarted with new firmware. One more step: they'll now continue to the required version.\",\n}\n\nfunction defaultTranslate(key: string, options?: Record<string, string>): string {\n let value = ENGLISH_COPY[key] ?? key\n for (const [name, replacement] of Object.entries(options ?? {})) {\n value = value.replaceAll(`{{${name}}}`, replacement)\n }\n return value\n}\n\nexport function MentraLiveOtaFlow({\n allowDevSkip = typeof __DEV__ !== \"undefined\" && __DEV__,\n deviceName = \"Mentra Live\",\n initialPage = \"check\",\n initializeRuntime = true,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n style,\n superMode = false,\n theme,\n translate = defaultTranslate,\n}: MentraLiveOtaFlowProps) {\n const colors = useMemo(() => ({...DEFAULT_THEME, ...theme}), [theme])\n const controller = useMentraLiveOta({\n initialPage,\n initializeRuntime,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n })\n\n return (\n <SafeAreaView style={[styles.safeArea, {backgroundColor: colors.background}, style]}>\n <View style={styles.header}>\n <View />\n <GlasslyMark color={colors.primary} />\n </View>\n <OtaFlowContent\n allowDevSkip={allowDevSkip}\n colors={colors}\n controller={controller}\n deviceName={deviceName}\n superMode={superMode}\n translate={translate}\n />\n </SafeAreaView>\n )\n}\n\nfunction OtaFlowContent({\n allowDevSkip,\n colors,\n controller,\n deviceName,\n superMode,\n translate,\n}: {\n allowDevSkip: boolean\n colors: MentraLiveOtaFlowTheme\n controller: MentraLiveOtaController\n deviceName: string\n superMode: boolean\n translate: MentraLiveOtaFlowTranslate\n}) {\n const {state} = controller\n\n if (state.screen === \"initializing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"checking\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingForUpdatesMessage\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"battery_required\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} disabled label={translate(\"ota:updateNow\")} onPress={controller.install} />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:batteryRequiredTitle\", {deviceName})}>\n <BodyText colors={colors}>\n {translate(\"ota:batteryRequiredMessage\", {\n batteryLevel: String(state.batteryLevel),\n deviceName,\n minimumBatteryLevel: String(MINIMUM_OTA_BATTERY_LEVEL),\n })}\n </BodyText>\n <BodyText colors={colors}>{translate(\"ota:batteryRequiredLiveUpdate\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"finishing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:finishingUpdate\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingAdditionalUpdates\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_available\" || state.screen === \"wifi_required\") {\n const titleKey =\n state.screen === \"wifi_required\"\n ? \"ota:wifiRequiredTitle\"\n : state.versionChange\n ? \"ota:downgradeAvailable\"\n : \"ota:updateAvailable\"\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(titleKey, {deviceName})}\n actions={\n <>\n <FlowButton\n colors={colors}\n disabled={!state.wifiStatusKnown}\n label={translate(state.screen === \"wifi_required\" ? \"ota:setupWifi\" : \"ota:updateNow\")}\n onPress={state.screen === \"wifi_required\" ? controller.openWifiSetup : controller.install}\n />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n {allowDevSkip && state.updateRequired ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {state.releaseTransition.fromVersion\n ? translate(\"ota:releaseTransition\", {\n fromVersion: state.releaseTransition.fromVersion,\n toVersion: state.releaseTransition.toVersion,\n })\n : translate(\"ota:releaseTransitionUnknown\", {toVersion: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <BodyText colors={colors}>\n {state.screen === \"wifi_required\"\n ? translate(\"ota:updateConnectWifi\", {deviceName})\n : translate(state.versionChange ? \"ota:downgradeDescription\" : \"ota:updateDescription\")}\n </BodyText>\n <BodyText colors={colors}>{translate(\"ota:updateSequenceMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"dev_build\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"settings\"\n title={translate(\"ota:devBuild\")}>\n <BodyText colors={colors}>{translate(\"ota:devBuildNoOta\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"up_to_date\") {\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={translate(state.completedUpdate ? \"common:done\" : \"common:continue\")}\n onPress={controller.finish}\n />\n }\n colors={colors}\n contentAlignment={state.changelogs.length > 0 ? \"top\" : \"center\"}\n icon=\"check\"\n title={translate(state.completedUpdate ? \"ota:updateComplete\" : \"ota:upToDate\")}>\n <BodyText colors={colors}>{translate(\"ota:noUpdatesAvailable\")}</BodyText>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {translate(\"ota:updatedToVersion\", {version: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <ChangelogList changelogs={state.changelogs} colors={colors} title={translate(\"ota:whatsNew\")} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_info_unavailable\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:updateInfoUnavailable\")}>\n <BodyText colors={colors}>{translate(\"ota:updateInfoUnavailableMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"check_failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} label=\"Retry\" onPress={controller.retryCheck} />\n {allowDevSkip ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:checkFailed\")}>\n <BodyText colors={colors}>{translate(\"ota:checkFailedMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.versionChangePhase === \"restarting\" || state.versionChangePhase === \"verifying\") {\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(\n state.versionChangePhase === \"verifying\" ? \"ota:versionChangeVerifying\" : \"ota:versionChangeRestarting\",\n )}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:versionChangeKeepNearby\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"starting\" || state.screen === \"preparing_hotspot\") {\n const title =\n state.hotspotPhase === \"downloading\"\n ? \"Downloading update to phone...\"\n : state.hotspotPhase === \"starting_hotspot\"\n ? \"Starting glasses hotspot...\"\n : state.hotspotPhase === \"joining_hotspot\"\n ? \"Connecting phone to glasses...\"\n : \"Starting update...\"\n return (\n <FlowPage colors={colors} icon=\"download\" title={title}>\n {state.hotspotPhase === \"downloading\" && state.hotspotArtifactPercent !== null ? (\n <PercentText colors={colors} percent={state.hotspotArtifactPercent} />\n ) : null}\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"updating\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={state.phase === \"download\" ? \"Downloading...\" : \"Installing...\"}>\n {state.installingApkOnly ? (\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n ) : (\n <>\n <PercentText colors={colors} percent={state.progress ?? 0} />\n <View style={[styles.progressTrack, {backgroundColor: colors.border}]}>\n <View\n style={[styles.progressFill, {backgroundColor: colors.primary, width: `${state.progress ?? 0}%`}]}\n />\n </View>\n </>\n )}\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n {state.versionChange && state.phase === \"install\" ? (\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n ) : null}\n </FlowPage>\n )\n }\n\n if (state.screen === \"restarting\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:restartingGlasses\", {deviceName})}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:restartingGlassesMessage\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:restartingGlassesAutomatic\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"complete\") {\n const title = state.versionChangeConverged\n ? translate(\"ota:versionChangeComplete\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassComplete\")\n : \"Update complete!\"\n const message = state.versionChangeConverged\n ? translate(\"ota:versionChangeCompleteMessage\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassCompleteMessage\")\n : \"Your glasses are up to date.\"\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={state.versionChange && !state.versionChangeConverged ? \"Continue\" : \"Done\"}\n onPress={controller.finish}\n />\n }\n colors={colors}\n contentAlignment={state.changelogs.length > 0 ? \"top\" : \"center\"}\n icon=\"check\"\n title={title}>\n <BodyText colors={colors}>{message}</BodyText>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {translate(\"ota:updatedToVersion\", {version: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <ChangelogList changelogs={state.changelogs} colors={colors} title={translate(\"ota:whatsNew\")} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton\n colors={colors}\n label={state.canRetry ? \"Retry\" : \"Done\"}\n onPress={state.canRetry ? controller.retryInstall : controller.finish}\n />\n {state.canOpenWifiSetup ? (\n <FlowButton colors={colors} label=\"Change WiFi\" onPress={controller.openWifiSetup} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title=\"Update Failed\">\n <BodyText colors={colors}>{state.error?.message}</BodyText>\n </FlowPage>\n )\n }\n\n return (\n <FlowPage\n actions={\n superMode ? (\n <FlowButton colors={colors} label=\"Skip (super)\" onPress={controller.discard} secondary />\n ) : undefined\n }\n colors={colors}\n icon=\"bluetooth\"\n title=\"Glasses disconnected\">\n <BodyText colors={colors}>Reconnecting...</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n}\n\ntype FlowPageProps = {\n actions?: React.ReactNode\n children?: React.ReactNode\n colors: MentraLiveOtaFlowTheme\n contentAlignment?: \"center\" | \"top\"\n icon: \"alert\" | \"bluetooth\" | \"check\" | \"download\" | \"settings\"\n title: string\n}\n\nfunction FlowPage({actions, children, colors, contentAlignment = \"center\", icon, title}: FlowPageProps) {\n return (\n <View style={styles.page} testID=\"mentra-live-ota-flow\">\n <View style={[styles.centerContent, contentAlignment === \"top\" && styles.topContent]}>\n <FlowIcon colors={colors} name={icon} />\n <Text style={[styles.title, {color: colors.foreground}]}>{title}</Text>\n {children}\n </View>\n {actions ? <View style={styles.actions}>{actions}</View> : <View style={styles.actionSpacer} />}\n </View>\n )\n}\n\nfunction BodyText({children, colors}: {children: React.ReactNode; colors: MentraLiveOtaFlowTheme}) {\n return <Text style={[styles.body, {color: colors.textDim}]}>{children}</Text>\n}\n\nfunction PercentText({colors, percent}: {colors: MentraLiveOtaFlowTheme; percent: number}) {\n return <Text style={[styles.percent, {color: colors.primary}]}>{Math.round(percent)}%</Text>\n}\n\nfunction ChangelogMarkdown({colors, markdown}: {colors: MentraLiveOtaFlowTheme; markdown: string}) {\n const markdownStyles = useMemo<MarkedStyles>(\n () => ({\n blockquote: {\n borderLeftColor: colors.primary,\n borderLeftWidth: 3,\n marginVertical: 2,\n opacity: 1,\n paddingLeft: 12,\n },\n code: {\n backgroundColor: colors.background,\n borderColor: colors.border,\n borderRadius: 8,\n borderWidth: 1,\n padding: 12,\n },\n codespan: {\n backgroundColor: colors.border,\n color: colors.foreground,\n fontFamily: \"monospace\",\n fontSize: 13,\n fontStyle: \"normal\",\n fontWeight: \"400\",\n },\n em: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n h1: {\n borderBottomWidth: 0,\n color: colors.foreground,\n fontSize: 18,\n fontWeight: \"700\",\n lineHeight: 24,\n marginVertical: 0,\n paddingBottom: 0,\n },\n h2: {\n borderBottomWidth: 0,\n color: colors.foreground,\n fontSize: 17,\n fontWeight: \"700\",\n lineHeight: 23,\n marginVertical: 0,\n paddingBottom: 0,\n },\n h3: {color: colors.foreground, fontSize: 16, fontWeight: \"700\", lineHeight: 22, marginVertical: 0},\n h4: {color: colors.foreground, fontSize: 15, fontWeight: \"700\", lineHeight: 21, marginVertical: 0},\n h5: {color: colors.foreground, fontSize: 14, fontWeight: \"700\", lineHeight: 20, marginVertical: 0},\n h6: {color: colors.textDim, fontSize: 14, fontWeight: \"600\", lineHeight: 20, marginVertical: 0},\n hr: {borderBottomColor: colors.border, marginVertical: 2},\n image: {borderRadius: 8},\n li: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n link: {\n color: colors.primary,\n fontSize: 14,\n fontStyle: \"normal\",\n lineHeight: 20,\n textDecorationLine: \"underline\",\n },\n paragraph: {paddingVertical: 0},\n strikethrough: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n strong: {color: colors.foreground, fontSize: 14, fontWeight: \"700\", lineHeight: 20},\n table: {borderColor: colors.border, borderRadius: 8},\n tableCell: {padding: 8},\n text: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n }),\n [colors],\n )\n const markdownTheme = useMemo<NonNullable<useMarkdownHookOptions[\"theme\"]>>(\n () => ({\n colors: {\n background: colors.background,\n border: colors.border,\n code: colors.border,\n link: colors.primary,\n text: colors.textDim,\n },\n }),\n [colors],\n )\n const elements = useMarkdown(markdown, {colorScheme: \"light\", styles: markdownStyles, theme: markdownTheme})\n\n return (\n <View style={styles.changelogMarkdownContent} testID=\"ota-changelog-markdown\">\n {elements}\n </View>\n )\n}\n\nexport function ChangelogList({\n changelogs,\n colors,\n title,\n}: {\n changelogs: MentraLiveOtaController[\"state\"][\"changelogs\"]\n colors: MentraLiveOtaFlowTheme\n title: string\n}) {\n if (changelogs.length === 0) return null\n return (\n <View style={[styles.changelogCard, {borderColor: colors.border}]} testID=\"ota-changelog-card\">\n <Text style={[styles.changelogTitle, {color: colors.foreground}]}>{title}</Text>\n <ScrollView\n contentContainerStyle={styles.changelogContent}\n nestedScrollEnabled\n showsVerticalScrollIndicator\n style={styles.changelogList}\n testID=\"ota-changelog-scroll\">\n {changelogs.map((entry, index) => (\n <View\n key={entry.version}\n style={[\n styles.changelogEntry,\n index > 0 && styles.changelogEntryDivider,\n index > 0 && {borderTopColor: colors.border},\n ]}>\n <Text selectable style={[styles.changelogVersion, {color: colors.foreground}]}>\n {entry.version}\n </Text>\n <ChangelogMarkdown colors={colors} markdown={entry.markdown} />\n </View>\n ))}\n </ScrollView>\n </View>\n )\n}\n\nfunction FlowButton({\n colors,\n disabled = false,\n label,\n onPress,\n secondary = false,\n}: {\n colors: MentraLiveOtaFlowTheme\n disabled?: boolean\n label: string\n onPress: () => void\n secondary?: boolean\n}) {\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={disabled}\n onPress={onPress}\n style={({pressed}) => [\n styles.button,\n {\n backgroundColor: secondary ? colors.background : colors.foreground,\n borderColor: secondary ? colors.border : colors.foreground,\n opacity: disabled ? 0.45 : pressed ? 0.75 : 1,\n },\n ]}\n testID={`button-${label}`}>\n <Text style={[styles.buttonText, {color: secondary ? colors.foreground : colors.background}]}>{label}</Text>\n </Pressable>\n )\n}\n\nfunction GlasslyMark({color}: {color: string}) {\n return (\n <Svg width={33} height={18} viewBox=\"0 0 50 27\" fill=\"none\">\n <Rect y={14.8072} width={11.8457} height={11.8457} fill={color} />\n <Path d=\"M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z\" fill={color} />\n <Path d=\"M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z\" fill={color} />\n </Svg>\n )\n}\n\nfunction FlowIcon({colors, name}: {colors: MentraLiveOtaFlowTheme; name: FlowPageProps[\"icon\"]}) {\n const color = name === \"alert\" || name === \"bluetooth\" ? colors.error : colors.primary\n const glyph =\n name === \"check\" ? \"✓\" : name === \"alert\" ? \"!\" : name === \"settings\" ? \"⚙\" : name === \"bluetooth\" ? \"⌁\" : \"↓\"\n return <Text style={[styles.icon, {color}]}>{glyph}</Text>\n}\n\nconst styles = StyleSheet.create({\n safeArea: {flex: 1},\n header: {\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 48,\n justifyContent: \"space-between\",\n paddingHorizontal: 20,\n },\n page: {flex: 1, paddingBottom: 24, paddingHorizontal: 24},\n centerContent: {alignItems: \"center\", flex: 1, gap: 16, justifyContent: \"center\"},\n topContent: {justifyContent: \"flex-start\", paddingTop: 12},\n actionSpacer: {height: 48},\n actions: {gap: 12},\n icon: {fontSize: 64, fontWeight: \"500\", lineHeight: 72, textAlign: \"center\"},\n title: {fontSize: 20, fontWeight: \"600\", textAlign: \"center\"},\n body: {fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: \"center\"},\n percent: {fontSize: 30, fontVariant: [\"tabular-nums\"], fontWeight: \"700\"},\n progressTrack: {borderRadius: 4, height: 8, maxWidth: 420, overflow: \"hidden\", width: \"100%\"},\n progressFill: {borderRadius: 4, height: 8},\n changelogCard: {\n borderRadius: 16,\n borderWidth: 1,\n flexShrink: 1,\n gap: 12,\n maxHeight: 300,\n maxWidth: 420,\n padding: 16,\n width: \"100%\",\n },\n changelogTitle: {fontSize: 16, fontWeight: \"700\"},\n changelogList: {flexShrink: 1, maxHeight: 232, width: \"100%\"},\n changelogContent: {gap: 20, paddingBottom: 2},\n changelogEntry: {gap: 8},\n changelogEntryDivider: {borderTopWidth: StyleSheet.hairlineWidth, paddingTop: 20},\n changelogVersion: {fontSize: 14, fontWeight: \"600\"},\n changelogMarkdownContent: {gap: 10},\n button: {\n alignItems: \"center\",\n borderRadius: 50,\n borderWidth: 1,\n justifyContent: \"center\",\n minHeight: 44,\n paddingHorizontal: 20,\n },\n buttonText: {fontSize: 14, fontWeight: \"500\"},\n})\n"]}
|
|
1
|
+
{"version":3,"file":"MentraLiveOtaFlow.js","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":";AAAA,kGAAkG;AAClG,OAAc,EAAC,OAAO,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,GAGL,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,WAAW,EAAiD,MAAM,qBAAqB,CAAA;AAC/F,OAAO,EAAC,YAAY,EAAC,MAAM,gCAAgC,CAAA;AAC3D,OAAO,GAAG,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAEhD,OAAO,EACL,yBAAyB,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ACN,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;KACtB;IACD,UAAU,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAC;CAC9C,CAAC,CAAA","sourcesContent":["/* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */\nimport React, {useMemo} from \"react\"\nimport {\n ActivityIndicator,\n Pressable,\n ScrollView,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\"\nimport {useMarkdown, type MarkedStyles, type useMarkdownHookOptions} from \"react-native-marked\"\nimport {SafeAreaView} from \"react-native-safe-area-context\"\nimport Svg, {Path, Rect} from \"react-native-svg\"\n\nimport {\n MINIMUM_OTA_BATTERY_LEVEL,\n useMentraLiveOta,\n type MentraLiveOtaController,\n type MentraLiveOtaFlowPage,\n} from \"./useMentraLiveOta\"\n\nexport type {MentraLiveOtaFlowPage} from \"./useMentraLiveOta\"\n\nexport type MentraLiveOtaFlowTheme = {\n background: string\n border: string\n error: string\n foreground: string\n primary: string\n primaryText: string\n textDim: string\n}\n\nexport type MentraLiveOtaFlowTranslate = (key: string, options?: Record<string, string>) => string\n\nexport type MentraLiveOtaFlowProps = {\n /** Display name used in update copy. */\n deviceName?: string\n /** Entry page. `progress` exists for recovery/deep-link compatibility. */\n initialPage?: MentraLiveOtaFlowPage\n /** Start the OTA-only projections. Full Engine hosts should pass false. */\n initializeRuntime?: boolean\n /** Called after the final check or when the user leaves an optional update. */\n onFinished: () => void\n /** Host-owned Wi-Fi setup for glasses that do not support hotspot OTA. */\n onOpenWifiSetup: () => void\n /** Lets a host coordinate its global connection overlay with OTA progress and firmware restarts. */\n onFirmwareRestartingChange?: (restarting: boolean, progressActive: boolean) => void\n /** Enables the existing developer-only escape hatches. */\n allowDevSkip?: boolean\n /** Enables the existing super-mode interrupted-session escape hatch. */\n superMode?: boolean\n /** Optional host localization. Defaults to the Glassly App English OTA copy. */\n translate?: MentraLiveOtaFlowTranslate\n /** Optional host theme. Both hosts use the same layout and state machine. */\n theme?: Partial<MentraLiveOtaFlowTheme>\n style?: StyleProp<ViewStyle>\n}\n\nconst DEFAULT_THEME: MentraLiveOtaFlowTheme = {\n background: \"#FFFFFF\",\n border: \"#D7DFDA\",\n error: \"#C43131\",\n foreground: \"#0E2C1A\",\n primary: \"#00B869\",\n primaryText: \"#FFFFFF\",\n textDim: \"#66736B\",\n}\n\nconst ENGLISH_COPY: Record<string, string> = {\n \"common:continue\": \"Continue\",\n \"common:done\": \"Done\",\n \"ota:checkingForUpdates\": \"Checking for updates\",\n \"ota:checkingForUpdatesMessage\":\n \"Connected devices will perform automatic updates. Automatic updates can be disabled in Device Settings\",\n \"ota:finishingUpdate\": \"Finishing your update\",\n \"ota:checkingAdditionalUpdates\": \"Checking whether your glasses need any additional updates.\",\n \"ota:updateAvailable\": \"{{deviceName}} Update Available\",\n \"ota:batteryRequiredTitle\": \"Charge {{deviceName}} to Update\",\n \"ota:batteryRequiredMessage\":\n \"{{deviceName}} is currently at {{batteryLevel}}%. Charge it to at least {{minimumBatteryLevel}}% before updating.\",\n \"ota:batteryRequiredLiveUpdate\": \"This screen will update automatically as the battery charges.\",\n \"ota:updateConnectWifi\": \"Connect your {{deviceName}} to WiFi to install the update.\",\n \"ota:wifiRequiredTitle\": \"WiFi Needed for Update\",\n \"ota:updateDescription\":\n \"A new update is available for your glasses. We recommend updating now for the best experience.\",\n \"ota:updateSequenceMessage\":\n \"Your glasses may install more than one update and restart several times. Keep them nearby until finished.\",\n \"ota:releaseTransition\": \"{{fromVersion}} → {{toVersion}}\",\n \"ota:releaseTransitionUnknown\": \"Current version unknown → {{toVersion}}\",\n \"ota:updatedToVersion\": \"Updated to {{version}}\",\n \"ota:downgradeAvailable\": \"{{deviceName}} Version Change Required\",\n \"ota:downgradeDescription\":\n \"This app requires an earlier glasses software version. Your photos and videos will be preserved, but glasses settings will be reset and restored automatically after the change.\",\n \"ota:updateNow\": \"Update Now\",\n \"ota:setupWifi\": \"Setup WiFi\",\n \"ota:updateLater\": \"Later\",\n \"ota:updateComplete\": \"Update complete\",\n \"ota:whatsNew\": \"What's new\",\n \"ota:upToDate\": \"Up To Date\",\n \"ota:devBuild\": \"Development Build\",\n \"ota:devBuildNoOta\":\n \"This mobile app is a development build, so automatic glasses updates are disabled. Use the developer settings manifest override to update them manually.\",\n \"ota:noUpdatesAvailable\": \"Your glasses are running the latest version.\",\n \"ota:checkFailed\": \"Check Failed\",\n \"ota:checkFailedMessage\": \"Couldn't check for updates. Please check your connection and try again.\",\n \"ota:updateInfoUnavailable\": \"Update Info Unavailable\",\n \"ota:updateInfoUnavailableMessage\":\n \"Update information for this version of the app is unavailable. Please check the app store for a newer version of the Glassly App.\",\n \"ota:downgradeDuration\": \"Your glasses will restart twice — this may take up to 2 minutes.\",\n \"ota:versionChangeRestarting\": \"Installing a different version…\",\n \"ota:versionChangeVerifying\": \"Verifying your glasses…\",\n \"ota:versionChangeKeepNearby\": \"Keep your glasses nearby and connected. They will restart on their own.\",\n \"ota:restartingGlasses\": \"Restarting {{deviceName}}…\",\n \"ota:restartingGlassesMessage\":\n \"The update is installed. Keep your glasses nearby and leave this screen open while they finish starting.\",\n \"ota:restartingGlassesAutomatic\": \"We'll continue automatically when they're ready.\",\n \"ota:versionChangeComplete\": \"Version Change Complete\",\n \"ota:versionChangeCompleteMessage\":\n \"Your glasses are now on the required version. Their settings were reset and are being restored automatically.\",\n \"ota:versionChangeFirmwarePassComplete\": \"Firmware updated\",\n \"ota:versionChangeFirmwarePassCompleteMessage\":\n \"Your glasses restarted with new firmware. One more step: they'll now continue to the required version.\",\n}\n\nfunction defaultTranslate(key: string, options?: Record<string, string>): string {\n let value = ENGLISH_COPY[key] ?? key\n for (const [name, replacement] of Object.entries(options ?? {})) {\n value = value.replaceAll(`{{${name}}}`, replacement)\n }\n return value\n}\n\nexport function MentraLiveOtaFlow({\n allowDevSkip = typeof __DEV__ !== \"undefined\" && __DEV__,\n deviceName = \"Mentra Live\",\n initialPage = \"check\",\n initializeRuntime = true,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n style,\n superMode = false,\n theme,\n translate = defaultTranslate,\n}: MentraLiveOtaFlowProps) {\n const colors = useMemo(() => ({...DEFAULT_THEME, ...theme}), [theme])\n const controller = useMentraLiveOta({\n initialPage,\n initializeRuntime,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n })\n\n return (\n <SafeAreaView style={[styles.safeArea, {backgroundColor: colors.background}, style]}>\n <View style={styles.header}>\n <View />\n <BrandMark color={colors.primary} />\n </View>\n <OtaFlowContent\n allowDevSkip={allowDevSkip}\n colors={colors}\n controller={controller}\n deviceName={deviceName}\n superMode={superMode}\n translate={translate}\n />\n </SafeAreaView>\n )\n}\n\nfunction OtaFlowContent({\n allowDevSkip,\n colors,\n controller,\n deviceName,\n superMode,\n translate,\n}: {\n allowDevSkip: boolean\n colors: MentraLiveOtaFlowTheme\n controller: MentraLiveOtaController\n deviceName: string\n superMode: boolean\n translate: MentraLiveOtaFlowTranslate\n}) {\n const {state} = controller\n\n if (state.screen === \"initializing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"checking\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingForUpdatesMessage\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"battery_required\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} disabled label={translate(\"ota:updateNow\")} onPress={controller.install} />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:batteryRequiredTitle\", {deviceName})}>\n <BodyText colors={colors}>\n {translate(\"ota:batteryRequiredMessage\", {\n batteryLevel: String(state.batteryLevel),\n deviceName,\n minimumBatteryLevel: String(MINIMUM_OTA_BATTERY_LEVEL),\n })}\n </BodyText>\n <BodyText colors={colors}>{translate(\"ota:batteryRequiredLiveUpdate\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"finishing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:finishingUpdate\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingAdditionalUpdates\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_available\" || state.screen === \"wifi_required\") {\n const titleKey =\n state.screen === \"wifi_required\"\n ? \"ota:wifiRequiredTitle\"\n : state.versionChange\n ? \"ota:downgradeAvailable\"\n : \"ota:updateAvailable\"\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(titleKey, {deviceName})}\n actions={\n <>\n <FlowButton\n colors={colors}\n disabled={!state.wifiStatusKnown}\n label={translate(state.screen === \"wifi_required\" ? \"ota:setupWifi\" : \"ota:updateNow\")}\n onPress={state.screen === \"wifi_required\" ? controller.openWifiSetup : controller.install}\n />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n {allowDevSkip && state.updateRequired ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {state.releaseTransition.fromVersion\n ? translate(\"ota:releaseTransition\", {\n fromVersion: state.releaseTransition.fromVersion,\n toVersion: state.releaseTransition.toVersion,\n })\n : translate(\"ota:releaseTransitionUnknown\", {toVersion: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <BodyText colors={colors}>\n {state.screen === \"wifi_required\"\n ? translate(\"ota:updateConnectWifi\", {deviceName})\n : translate(state.versionChange ? \"ota:downgradeDescription\" : \"ota:updateDescription\")}\n </BodyText>\n <BodyText colors={colors}>{translate(\"ota:updateSequenceMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"dev_build\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"settings\"\n title={translate(\"ota:devBuild\")}>\n <BodyText colors={colors}>{translate(\"ota:devBuildNoOta\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"up_to_date\") {\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={translate(state.completedUpdate ? \"common:done\" : \"common:continue\")}\n onPress={controller.finish}\n />\n }\n colors={colors}\n contentAlignment={state.changelogs.length > 0 ? \"top\" : \"center\"}\n icon=\"check\"\n title={translate(state.completedUpdate ? \"ota:updateComplete\" : \"ota:upToDate\")}>\n <BodyText colors={colors}>{translate(\"ota:noUpdatesAvailable\")}</BodyText>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {translate(\"ota:updatedToVersion\", {version: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <ChangelogList changelogs={state.changelogs} colors={colors} title={translate(\"ota:whatsNew\")} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_info_unavailable\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:updateInfoUnavailable\")}>\n <BodyText colors={colors}>{translate(\"ota:updateInfoUnavailableMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"check_failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} label=\"Retry\" onPress={controller.retryCheck} />\n {allowDevSkip ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:checkFailed\")}>\n <BodyText colors={colors}>{translate(\"ota:checkFailedMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.versionChangePhase === \"restarting\" || state.versionChangePhase === \"verifying\") {\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(\n state.versionChangePhase === \"verifying\" ? \"ota:versionChangeVerifying\" : \"ota:versionChangeRestarting\",\n )}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:versionChangeKeepNearby\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"starting\" || state.screen === \"preparing_hotspot\") {\n const title =\n state.hotspotPhase === \"downloading\"\n ? \"Downloading update to phone...\"\n : state.hotspotPhase === \"starting_hotspot\"\n ? \"Starting glasses hotspot...\"\n : state.hotspotPhase === \"joining_hotspot\"\n ? \"Connecting phone to glasses...\"\n : \"Starting update...\"\n return (\n <FlowPage colors={colors} icon=\"download\" title={title}>\n {state.hotspotPhase === \"downloading\" && state.hotspotArtifactPercent !== null ? (\n <PercentText colors={colors} percent={state.hotspotArtifactPercent} />\n ) : null}\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"updating\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={state.phase === \"download\" ? \"Downloading...\" : \"Installing...\"}>\n {state.installingApkOnly ? (\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n ) : (\n <>\n <PercentText colors={colors} percent={state.progress ?? 0} />\n <View style={[styles.progressTrack, {backgroundColor: colors.border}]}>\n <View\n style={[styles.progressFill, {backgroundColor: colors.primary, width: `${state.progress ?? 0}%`}]}\n />\n </View>\n </>\n )}\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n {state.versionChange && state.phase === \"install\" ? (\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n ) : null}\n </FlowPage>\n )\n }\n\n if (state.screen === \"restarting\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:restartingGlasses\", {deviceName})}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:restartingGlassesMessage\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:restartingGlassesAutomatic\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"complete\") {\n const title = state.versionChangeConverged\n ? translate(\"ota:versionChangeComplete\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassComplete\")\n : \"Update complete!\"\n const message = state.versionChangeConverged\n ? translate(\"ota:versionChangeCompleteMessage\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassCompleteMessage\")\n : \"Your glasses are up to date.\"\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={state.versionChange && !state.versionChangeConverged ? \"Continue\" : \"Done\"}\n onPress={controller.finish}\n />\n }\n colors={colors}\n contentAlignment={state.changelogs.length > 0 ? \"top\" : \"center\"}\n icon=\"check\"\n title={title}>\n <BodyText colors={colors}>{message}</BodyText>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {translate(\"ota:updatedToVersion\", {version: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <ChangelogList changelogs={state.changelogs} colors={colors} title={translate(\"ota:whatsNew\")} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton\n colors={colors}\n label={state.canRetry ? \"Retry\" : \"Done\"}\n onPress={state.canRetry ? controller.retryInstall : controller.finish}\n />\n {state.canOpenWifiSetup ? (\n <FlowButton colors={colors} label=\"Change WiFi\" onPress={controller.openWifiSetup} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title=\"Update Failed\">\n <BodyText colors={colors}>{state.error?.message}</BodyText>\n </FlowPage>\n )\n }\n\n return (\n <FlowPage\n actions={\n superMode ? (\n <FlowButton colors={colors} label=\"Skip (super)\" onPress={controller.discard} secondary />\n ) : undefined\n }\n colors={colors}\n icon=\"bluetooth\"\n title=\"Glasses disconnected\">\n <BodyText colors={colors}>Reconnecting...</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n}\n\ntype FlowPageProps = {\n actions?: React.ReactNode\n children?: React.ReactNode\n colors: MentraLiveOtaFlowTheme\n contentAlignment?: \"center\" | \"top\"\n icon: \"alert\" | \"bluetooth\" | \"check\" | \"download\" | \"settings\"\n title: string\n}\n\nfunction FlowPage({actions, children, colors, contentAlignment = \"center\", icon, title}: FlowPageProps) {\n return (\n <View style={styles.page} testID=\"mentra-live-ota-flow\">\n <View style={[styles.centerContent, contentAlignment === \"top\" && styles.topContent]}>\n <FlowIcon colors={colors} name={icon} />\n <Text style={[styles.title, {color: colors.foreground}]}>{title}</Text>\n {children}\n </View>\n {actions ? <View style={styles.actions}>{actions}</View> : <View style={styles.actionSpacer} />}\n </View>\n )\n}\n\nfunction BodyText({children, colors}: {children: React.ReactNode; colors: MentraLiveOtaFlowTheme}) {\n return <Text style={[styles.body, {color: colors.textDim}]}>{children}</Text>\n}\n\nfunction PercentText({colors, percent}: {colors: MentraLiveOtaFlowTheme; percent: number}) {\n return <Text style={[styles.percent, {color: colors.primary}]}>{Math.round(percent)}%</Text>\n}\n\nfunction ChangelogMarkdown({colors, markdown}: {colors: MentraLiveOtaFlowTheme; markdown: string}) {\n const markdownStyles = useMemo<MarkedStyles>(\n () => ({\n blockquote: {\n borderLeftColor: colors.primary,\n borderLeftWidth: 3,\n marginVertical: 2,\n opacity: 1,\n paddingLeft: 12,\n },\n code: {\n backgroundColor: colors.background,\n borderColor: colors.border,\n borderRadius: 8,\n borderWidth: 1,\n padding: 12,\n },\n codespan: {\n backgroundColor: colors.border,\n color: colors.foreground,\n fontFamily: \"monospace\",\n fontSize: 13,\n fontStyle: \"normal\",\n fontWeight: \"400\",\n },\n em: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n h1: {\n borderBottomWidth: 0,\n color: colors.foreground,\n fontSize: 18,\n fontWeight: \"700\",\n lineHeight: 24,\n marginVertical: 0,\n paddingBottom: 0,\n },\n h2: {\n borderBottomWidth: 0,\n color: colors.foreground,\n fontSize: 17,\n fontWeight: \"700\",\n lineHeight: 23,\n marginVertical: 0,\n paddingBottom: 0,\n },\n h3: {color: colors.foreground, fontSize: 16, fontWeight: \"700\", lineHeight: 22, marginVertical: 0},\n h4: {color: colors.foreground, fontSize: 15, fontWeight: \"700\", lineHeight: 21, marginVertical: 0},\n h5: {color: colors.foreground, fontSize: 14, fontWeight: \"700\", lineHeight: 20, marginVertical: 0},\n h6: {color: colors.textDim, fontSize: 14, fontWeight: \"600\", lineHeight: 20, marginVertical: 0},\n hr: {borderBottomColor: colors.border, marginVertical: 2},\n image: {borderRadius: 8},\n li: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n link: {\n color: colors.primary,\n fontSize: 14,\n fontStyle: \"normal\",\n lineHeight: 20,\n textDecorationLine: \"underline\",\n },\n paragraph: {paddingVertical: 0},\n strikethrough: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n strong: {color: colors.foreground, fontSize: 14, fontWeight: \"700\", lineHeight: 20},\n table: {borderColor: colors.border, borderRadius: 8},\n tableCell: {padding: 8},\n text: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n }),\n [colors],\n )\n const markdownTheme = useMemo<NonNullable<useMarkdownHookOptions[\"theme\"]>>(\n () => ({\n colors: {\n background: colors.background,\n border: colors.border,\n code: colors.border,\n link: colors.primary,\n text: colors.textDim,\n },\n }),\n [colors],\n )\n const elements = useMarkdown(markdown, {colorScheme: \"light\", styles: markdownStyles, theme: markdownTheme})\n\n return (\n <View style={styles.changelogMarkdownContent} testID=\"ota-changelog-markdown\">\n {elements}\n </View>\n )\n}\n\nexport function ChangelogList({\n changelogs,\n colors,\n title,\n}: {\n changelogs: MentraLiveOtaController[\"state\"][\"changelogs\"]\n colors: MentraLiveOtaFlowTheme\n title: string\n}) {\n if (changelogs.length === 0) return null\n return (\n <View style={[styles.changelogCard, {borderColor: colors.border}]} testID=\"ota-changelog-card\">\n <Text style={[styles.changelogTitle, {color: colors.foreground}]}>{title}</Text>\n <ScrollView\n contentContainerStyle={styles.changelogContent}\n nestedScrollEnabled\n showsVerticalScrollIndicator\n style={styles.changelogList}\n testID=\"ota-changelog-scroll\">\n {changelogs.map((entry, index) => (\n <View\n key={entry.version}\n style={[\n styles.changelogEntry,\n index > 0 && styles.changelogEntryDivider,\n index > 0 && {borderTopColor: colors.border},\n ]}>\n <Text selectable style={[styles.changelogVersion, {color: colors.foreground}]}>\n {entry.version}\n </Text>\n <ChangelogMarkdown colors={colors} markdown={entry.markdown} />\n </View>\n ))}\n </ScrollView>\n </View>\n )\n}\n\nfunction FlowButton({\n colors,\n disabled = false,\n label,\n onPress,\n secondary = false,\n}: {\n colors: MentraLiveOtaFlowTheme\n disabled?: boolean\n label: string\n onPress: () => void\n secondary?: boolean\n}) {\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={disabled}\n onPress={onPress}\n style={({pressed}) => [\n styles.button,\n {\n backgroundColor: secondary ? colors.background : colors.foreground,\n borderColor: secondary ? colors.border : colors.foreground,\n opacity: disabled ? 0.45 : pressed ? 0.75 : 1,\n },\n ]}\n testID={`button-${label}`}>\n <Text style={[styles.buttonText, {color: secondary ? colors.foreground : colors.background}]}>{label}</Text>\n </Pressable>\n )\n}\n\nfunction BrandMark({color}: {color: string}) {\n return (\n <Svg width={33} height={18} viewBox=\"0 0 50 27\" fill=\"none\">\n <Rect y={14.8072} width={11.8457} height={11.8457} fill={color} />\n <Path d=\"M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z\" fill={color} />\n <Path d=\"M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z\" fill={color} />\n </Svg>\n )\n}\n\nfunction FlowIcon({colors, name}: {colors: MentraLiveOtaFlowTheme; name: FlowPageProps[\"icon\"]}) {\n const color = name === \"alert\" || name === \"bluetooth\" ? colors.error : colors.primary\n const glyph =\n name === \"check\" ? \"✓\" : name === \"alert\" ? \"!\" : name === \"settings\" ? \"⚙\" : name === \"bluetooth\" ? \"⌁\" : \"↓\"\n return <Text style={[styles.icon, {color}]}>{glyph}</Text>\n}\n\nconst styles = StyleSheet.create({\n safeArea: {flex: 1},\n header: {\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 48,\n justifyContent: \"space-between\",\n paddingHorizontal: 20,\n },\n page: {flex: 1, paddingBottom: 24, paddingHorizontal: 24},\n centerContent: {alignItems: \"center\", flex: 1, gap: 16, justifyContent: \"center\"},\n topContent: {justifyContent: \"flex-start\", paddingTop: 12},\n actionSpacer: {height: 48},\n actions: {gap: 12},\n icon: {fontSize: 64, fontWeight: \"500\", lineHeight: 72, textAlign: \"center\"},\n title: {fontSize: 20, fontWeight: \"600\", textAlign: \"center\"},\n body: {fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: \"center\"},\n percent: {fontSize: 30, fontVariant: [\"tabular-nums\"], fontWeight: \"700\"},\n progressTrack: {borderRadius: 4, height: 8, maxWidth: 420, overflow: \"hidden\", width: \"100%\"},\n progressFill: {borderRadius: 4, height: 8},\n changelogCard: {\n borderRadius: 16,\n borderWidth: 1,\n flexShrink: 1,\n gap: 12,\n maxHeight: 300,\n maxWidth: 420,\n padding: 16,\n width: \"100%\",\n },\n changelogTitle: {fontSize: 16, fontWeight: \"700\"},\n changelogList: {flexShrink: 1, maxHeight: 232, width: \"100%\"},\n changelogContent: {gap: 20, paddingBottom: 2},\n changelogEntry: {gap: 8},\n changelogEntryDivider: {borderTopWidth: StyleSheet.hairlineWidth, paddingTop: 20},\n changelogVersion: {fontSize: 14, fontWeight: \"600\"},\n changelogMarkdownContent: {gap: 10},\n button: {\n alignItems: \"center\",\n borderRadius: 50,\n borderWidth: 1,\n justifyContent: \"center\",\n minHeight: 44,\n paddingHorizontal: 20,\n },\n buttonText: {fontSize: 14, fontWeight: \"500\"},\n})\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMentraLiveOta.d.ts","sourceRoot":"","sources":["../../src/react/useMentraLiveOta.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"useMentraLiveOta.d.ts","sourceRoot":"","sources":["../../src/react/useMentraLiveOta.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAKpD,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,UAAU,CAAA;AAExD,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACd,UAAU,GACV,WAAW,GACX,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,WAAW,GACX,cAAc,GACd,yBAAyB,GACzB,UAAU,GACV,mBAAmB,GACnB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,UAAU,GACV,QAAQ,GACR,cAAc,CAAA;AAElB,MAAM,MAAM,sBAAsB,GAC9B,cAAc,GACd,yBAAyB,GACzB,gBAAgB,GAChB,sBAAsB,CAAA;AAE1B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,sBAAsB,CAAA;IAC5B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,SAAS,CAAA;AACvD,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG,aAAa,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,SAAS,CAAA;AACnH,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,SAAS,CAAA;AAC9D,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,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AAA;IACzB,kFAAkF;IAClF,eAAe,EAAE,OAAO,CAAA;IACxB,2EAA2E;IAC3E,iBAAiB,EAAE,8BAA8B,GAAG,IAAI,CAAA;IACxD,mFAAmF;IACnF,UAAU,EAAE,gBAAgB,EAAE,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,sEAAsE;IACtE,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,gFAAgF;IAChF,0BAA0B,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,KAAK,IAAI,CAAA;CACpF,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,kBAAkB,CAAA;IACzB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,EAAE,MAAM,IAAI,CAAA;CAC1B,CAAA;AAMD,eAAO,MAAM,yBAAyB,KAAK,CAAA;AA8D3C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,uBAA4B,GAAG,uBAAuB,CAklB/F"}
|
|
@@ -3,6 +3,7 @@ import { ota } from "../facades/ota";
|
|
|
3
3
|
import { beginOtaAutoChain, clearOtaAutoChainReconnectWait, isOtaAutoChainActive, otaAutoChainFingerprint, otaAutoChainReleaseRange, otaAutoChainReconnectWaitRemaining, stopOtaAutoChain, tryAdvanceOtaAutoChain, } from "../services/OtaAutoChain";
|
|
4
4
|
import { BES_INSTALL_RESTART_MESSAGE, getOtaErrorMessage, shouldRequireGlassesRebootForBesFailure, shouldShowChangeWifiForOtaDownloadFailure, } from "../services/OtaErrorMapping";
|
|
5
5
|
import { useEngineSnapshot } from "./useEngineSnapshot";
|
|
6
|
+
import { BgTimer } from "../utils/timers";
|
|
6
7
|
const AUTO_CHAIN_NETWORK_RETRY_DELAY_MS = 5000;
|
|
7
8
|
const AUTO_CHAIN_COMPLETE_DELAY_MS = 750;
|
|
8
9
|
export const MINIMUM_OTA_BATTERY_LEVEL = 25;
|
|
@@ -167,7 +168,7 @@ export function useMentraLiveOta(options = {}) {
|
|
|
167
168
|
const remainingMs = otaAutoChainReconnectWaitRemaining();
|
|
168
169
|
if (remainingMs === null)
|
|
169
170
|
return;
|
|
170
|
-
reconnectTimeout = setTimeout(() => {
|
|
171
|
+
reconnectTimeout = BgTimer.setTimeout(() => {
|
|
171
172
|
if (cancelled || myGeneration !== performCheckGenerationRef.current || ota.snapshot().ready)
|
|
172
173
|
return;
|
|
173
174
|
stopOtaAutoChain();
|
|
@@ -202,7 +203,7 @@ export function useMentraLiveOta(options = {}) {
|
|
|
202
203
|
if (cancelled || myGeneration !== performCheckGenerationRef.current)
|
|
203
204
|
return;
|
|
204
205
|
if (!result.hasCheckCompleted && result.checkFailureReason === "network" && isOtaAutoChainActive()) {
|
|
205
|
-
await new Promise((resolve) => setTimeout(resolve, AUTO_CHAIN_NETWORK_RETRY_DELAY_MS));
|
|
206
|
+
await new Promise((resolve) => BgTimer.setTimeout(resolve, AUTO_CHAIN_NETWORK_RETRY_DELAY_MS));
|
|
206
207
|
if (cancelled || myGeneration !== performCheckGenerationRef.current)
|
|
207
208
|
return;
|
|
208
209
|
result = await ota.checkForUpdates(checkOptions);
|
|
@@ -210,7 +211,7 @@ export function useMentraLiveOta(options = {}) {
|
|
|
210
211
|
if (cancelled || myGeneration !== performCheckGenerationRef.current)
|
|
211
212
|
return;
|
|
212
213
|
selectedCheckResultRef.current = result;
|
|
213
|
-
await new Promise((resolve) => setTimeout(resolve, Math.max(0, MIN_DISPLAY_TIME_MS - (Date.now() - startTime))));
|
|
214
|
+
await new Promise((resolve) => BgTimer.setTimeout(resolve, Math.max(0, MIN_DISPLAY_TIME_MS - (Date.now() - startTime))));
|
|
214
215
|
if (cancelled || myGeneration !== performCheckGenerationRef.current)
|
|
215
216
|
return;
|
|
216
217
|
if (result.skippedReason === "disconnected") {
|
|
@@ -276,7 +277,7 @@ export function useMentraLiveOta(options = {}) {
|
|
|
276
277
|
}
|
|
277
278
|
catch (error) {
|
|
278
279
|
console.error("OTA check failed:", error);
|
|
279
|
-
await new Promise((resolve) => setTimeout(resolve, Math.max(0, MIN_DISPLAY_TIME_MS - (Date.now() - startTime))));
|
|
280
|
+
await new Promise((resolve) => BgTimer.setTimeout(resolve, Math.max(0, MIN_DISPLAY_TIME_MS - (Date.now() - startTime))));
|
|
280
281
|
if (cancelled || myGeneration !== performCheckGenerationRef.current)
|
|
281
282
|
return;
|
|
282
283
|
stopOtaAutoChain();
|
|
@@ -289,7 +290,7 @@ export function useMentraLiveOta(options = {}) {
|
|
|
289
290
|
return () => {
|
|
290
291
|
cancelled = true;
|
|
291
292
|
if (reconnectTimeout)
|
|
292
|
-
clearTimeout(reconnectTimeout);
|
|
293
|
+
BgTimer.clearTimeout(reconnectTimeout);
|
|
293
294
|
};
|
|
294
295
|
}, [
|
|
295
296
|
checkGeneration,
|
|
@@ -354,14 +355,14 @@ export function useMentraLiveOta(options = {}) {
|
|
|
354
355
|
autoChainAdvancedRef.current) {
|
|
355
356
|
return;
|
|
356
357
|
}
|
|
357
|
-
const timeout = setTimeout(async () => {
|
|
358
|
+
const timeout = BgTimer.setTimeout(async () => {
|
|
358
359
|
if (!isOtaAutoChainActive())
|
|
359
360
|
return;
|
|
360
361
|
autoChainAdvancedRef.current = true;
|
|
361
362
|
await ota.installSession.finish();
|
|
362
363
|
returnToCheck();
|
|
363
364
|
}, AUTO_CHAIN_COMPLETE_DELAY_MS);
|
|
364
|
-
return () => clearTimeout(timeout);
|
|
365
|
+
return () => BgTimer.clearTimeout(timeout);
|
|
365
366
|
}, [installSnapshot.connected, installSnapshot.displayState, page, returnToCheck]);
|
|
366
367
|
const check = useCallback(() => {
|
|
367
368
|
setBatteryBlocked(false);
|