@glassly/engine 0.1.0-dev.99 → 0.2.9-beta.448
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/src/stores/apps.ts
CHANGED
|
@@ -19,15 +19,17 @@ import {DeviceTypes} from "../types/enums"
|
|
|
19
19
|
import {getModelCapabilities} from "../types/hardware"
|
|
20
20
|
import {HardwareCompatibility, type CompatibilityResult} from "../utils/hardware/hardware"
|
|
21
21
|
import {storage} from "../utils/storage/storage"
|
|
22
|
-
import appRegistry from "../services/AppRegistry"
|
|
22
|
+
import appRegistry, {savePersistentOverride} from "../services/AppRegistry"
|
|
23
23
|
import localDisplayManager from "../services/LocalDisplayManager"
|
|
24
24
|
import {islandNotifications} from "../services/NotificationsEmitter"
|
|
25
25
|
import sttModelManager from "../services/STTModelManager"
|
|
26
26
|
import {miniappLauncher} from "../services/MiniappLauncher"
|
|
27
27
|
import {miniappRunningRegistry} from "../services/MiniappRunningRegistry"
|
|
28
|
-
import {resolveHiddenStatus} from "./appVisibility"
|
|
28
|
+
import {defaultHiddenStatus, isGatedByDevTools, isGatedUntilPaired, resolveHiddenStatus} from "./appVisibility"
|
|
29
29
|
import {SETTINGS, useSettingsStore} from "./settings"
|
|
30
|
+
import {PermissionFeatures, permissions} from "../facades/permissions"
|
|
30
31
|
import BluetoothSdk from "@glassly/bluetooth-sdk"
|
|
32
|
+
import type {MiniappLaunchSource} from "@glassly/miniapp"
|
|
31
33
|
|
|
32
34
|
// ---------------------------------------------------------------------------
|
|
33
35
|
// Configuration / hooks
|
|
@@ -35,6 +37,8 @@ import BluetoothSdk from "@glassly/bluetooth-sdk"
|
|
|
35
37
|
|
|
36
38
|
export interface StartOptions {
|
|
37
39
|
skipNavigation?: boolean
|
|
40
|
+
/** Reported to the miniapp on connect. Defaults to "phone". */
|
|
41
|
+
launchSource?: MiniappLaunchSource
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
export interface AppStoreHooks {
|
|
@@ -91,6 +95,13 @@ interface AppStatusState {
|
|
|
91
95
|
saveScreenshot: (packageName: string, screenshot: string) => Promise<void>
|
|
92
96
|
setHiddenStatus: (packageName: string, status: boolean) => void
|
|
93
97
|
getHiddenStatus: (packageName: string) => boolean
|
|
98
|
+
/**
|
|
99
|
+
* Mark a miniapp persistent: it starts at launch and only stops from the
|
|
100
|
+
* app switcher's persistent pill (its card cannot be swiped away and the
|
|
101
|
+
* capsule close minimizes it). Turning it on starts the app; turning it
|
|
102
|
+
* off leaves it running. Persists the wearer's choice beside the hidden flag.
|
|
103
|
+
*/
|
|
104
|
+
setPersistent: (packageName: string, status: boolean) => Promise<void>
|
|
94
105
|
/** Replace the whole apps array. Hosts use this when their extra source changes. */
|
|
95
106
|
setApps: (apps: ClientApp[]) => void
|
|
96
107
|
}
|
|
@@ -198,6 +209,8 @@ function projectApps(previousState: AppStatusState, localApps: ClientApp[]): Cli
|
|
|
198
209
|
(useSettingsStore.getState().getSetting(SETTINGS.default_wearable.key) as DeviceTypes | undefined) ||
|
|
199
210
|
DeviceTypes.NONE
|
|
200
211
|
const capabilities = getModelCapabilities(defaultWearable)
|
|
212
|
+
const devToolsEnabled = useSettingsStore.getState().getSetting(SETTINGS.dev_tools.key) === true
|
|
213
|
+
const hasPairedGlasses = useSettingsStore.getState().getSetting(SETTINGS.has_paired_glasses.key) === true
|
|
201
214
|
|
|
202
215
|
// Single pass: dedupe → screenshot carry-over → compat → hidden, all into
|
|
203
216
|
// fresh objects. The previous in-place mutation re-used object references
|
|
@@ -217,29 +230,34 @@ function projectApps(previousState: AppStatusState, localApps: ClientApp[]): Cli
|
|
|
217
230
|
// nothing meaningful changed. Same pattern as the miniappRunningRegistry
|
|
218
231
|
// projection below. A stable foreground-app reference lets the Compositor's
|
|
219
232
|
// slide run uninterrupted on the UI thread.
|
|
220
|
-
return Array.from(byPackage.values())
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
233
|
+
return Array.from(byPackage.values())
|
|
234
|
+
.filter(
|
|
235
|
+
(app) =>
|
|
236
|
+
!isGatedByDevTools(app.packageName, devToolsEnabled) &&
|
|
237
|
+
!isGatedUntilPaired(app.packageName, devToolsEnabled, hasPairedGlasses),
|
|
238
|
+
)
|
|
239
|
+
.map((app) => {
|
|
240
|
+
const next: ClientApp = {
|
|
241
|
+
...app,
|
|
242
|
+
screenshot: previousByPackage.get(app.packageName)?.screenshot ?? app.screenshot,
|
|
243
|
+
compatibility: HardwareCompatibility.checkCompatibility(app.hardwareRequirements, capabilities),
|
|
244
|
+
// A registry source can force an app off the primary home screen.
|
|
245
|
+
// Compose that gate with the user's persisted home-screen layout instead
|
|
246
|
+
// of replacing it, otherwise a default-false persisted value makes a
|
|
247
|
+
// source-hidden app visible again during projection.
|
|
248
|
+
hidden: resolveHiddenStatus(app.hidden, previousState.getHiddenStatus(app.packageName)),
|
|
249
|
+
// Derive the foreground flag from the store's single source of truth
|
|
250
|
+
// (`foregroundedPackage`), NOT from the previous snapshot. Carrying it over
|
|
251
|
+
// per-app meant a refresh that momentarily omitted an app (e.g. the
|
|
252
|
+
// two-pass local-only → merged emit) would reset its flag to false — which
|
|
253
|
+
// raced OfflineAppHost's interceptor guard and made the hosted miniapp fall
|
|
254
|
+
// through to the root router (restart). Deriving here keeps the flag stable
|
|
255
|
+
// across both passes.
|
|
256
|
+
foregrounded: app.packageName === previousState.foregroundedPackage,
|
|
257
|
+
}
|
|
258
|
+
const prev = previousByPackage.get(app.packageName)
|
|
259
|
+
return prev && shallowEqualApp(prev, next) ? prev : next
|
|
260
|
+
})
|
|
243
261
|
}
|
|
244
262
|
|
|
245
263
|
// Cheap equality check used by projectApps to preserve object identity across
|
|
@@ -360,6 +378,11 @@ export const useAppStatusStore = create<AppStatusState>((set, get) => ({
|
|
|
360
378
|
return true
|
|
361
379
|
}
|
|
362
380
|
|
|
381
|
+
// The phone mic is asked for here, at first use, not during pairing: the
|
|
382
|
+
// OS prompt lands over the app that needs it. The facade returns at once
|
|
383
|
+
// when the answer is already known, so this only ever prompts once.
|
|
384
|
+
if (declaresMicrophone(app)) await permissions.request(PermissionFeatures.MICROPHONE)
|
|
385
|
+
|
|
363
386
|
// Foreground-only-one rule: stop other running standard apps.
|
|
364
387
|
if (app.type === "standard") {
|
|
365
388
|
const runningForeground = state.apps.filter(
|
|
@@ -385,7 +408,7 @@ export const useAppStatusStore = create<AppStatusState>((set, get) => ({
|
|
|
385
408
|
// (no JS bundle).
|
|
386
409
|
if (app.local) {
|
|
387
410
|
try {
|
|
388
|
-
await miniappLauncher.ensureRunning(packageName)
|
|
411
|
+
await miniappLauncher.ensureRunning(packageName, {launchSource: opts?.launchSource ?? "phone"})
|
|
389
412
|
} catch (e) {
|
|
390
413
|
// Spawn / bundle-resolve failed — revert the optimistic running flag so
|
|
391
414
|
// the home list and miniapps.list() don't show a "running" app with no
|
|
@@ -477,7 +500,8 @@ export const useAppStatusStore = create<AppStatusState>((set, get) => ({
|
|
|
477
500
|
|
|
478
501
|
stopAll: () => {
|
|
479
502
|
return Res.try_async(async () => {
|
|
480
|
-
|
|
503
|
+
// Persistent apps stay up; they stop one at a time from the switcher.
|
|
504
|
+
const running = get().apps.filter((a) => a.running && !a.persistent)
|
|
481
505
|
for (const a of running) {
|
|
482
506
|
await get().stop(a.packageName)
|
|
483
507
|
}
|
|
@@ -520,11 +544,21 @@ export const useAppStatusStore = create<AppStatusState>((set, get) => ({
|
|
|
520
544
|
const cached = hiddenStatusCache.get(packageName)
|
|
521
545
|
if (cached !== undefined) return cached
|
|
522
546
|
const res = storage.load<boolean>(`${packageName}_hidden`)
|
|
523
|
-
const value = res.is_ok() ? res.value :
|
|
547
|
+
const value = res.is_ok() ? res.value : defaultHiddenStatus(packageName)
|
|
524
548
|
hiddenStatusCache.set(packageName, value)
|
|
525
549
|
return value
|
|
526
550
|
},
|
|
527
551
|
|
|
552
|
+
setPersistent: async (packageName: string, status: boolean) => {
|
|
553
|
+
const app = get().apps.find((a) => a.packageName === packageName)
|
|
554
|
+
if (!app) return
|
|
555
|
+
savePersistentOverride(packageName, status)
|
|
556
|
+
set((s) => ({
|
|
557
|
+
apps: s.apps.map((a) => (a.packageName === packageName ? {...a, persistent: status} : a)),
|
|
558
|
+
}))
|
|
559
|
+
if (status && !app.running) await get().start(app, {skipNavigation: true})
|
|
560
|
+
},
|
|
561
|
+
|
|
528
562
|
setApps: (apps) => set({apps}),
|
|
529
563
|
}))
|
|
530
564
|
|
|
@@ -571,6 +605,40 @@ useSettingsStore.subscribe(
|
|
|
571
605
|
},
|
|
572
606
|
)
|
|
573
607
|
|
|
608
|
+
// Developer tools toggled: dev-only apps enter or leave the projection. When
|
|
609
|
+
// they leave, stop any that are running first so the running registry doesn't
|
|
610
|
+
// keep a miniapp alive that no launcher surface can reach.
|
|
611
|
+
useSettingsStore.subscribe(
|
|
612
|
+
(state) => state.getSetting(SETTINGS.dev_tools.key) === true,
|
|
613
|
+
(enabled) => {
|
|
614
|
+
void (async () => {
|
|
615
|
+
if (!enabled) {
|
|
616
|
+
const state = useAppStatusStore.getState()
|
|
617
|
+
const hasPairedGlasses = useSettingsStore.getState().getSetting(SETTINGS.has_paired_glasses.key) === true
|
|
618
|
+
for (const app of state.apps) {
|
|
619
|
+
const gated =
|
|
620
|
+
isGatedByDevTools(app.packageName, false) || isGatedUntilPaired(app.packageName, false, hasPairedGlasses)
|
|
621
|
+
if (app.running && gated) await state.stop(app.packageName)
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
await useAppStatusStore.getState().refresh()
|
|
625
|
+
})()
|
|
626
|
+
},
|
|
627
|
+
)
|
|
628
|
+
|
|
629
|
+
// First real pairing latched: the Store enters the projection. One-way, so
|
|
630
|
+
// nothing ever leaves here.
|
|
631
|
+
useSettingsStore.subscribe(
|
|
632
|
+
(state) => state.getSetting(SETTINGS.has_paired_glasses.key) === true,
|
|
633
|
+
() => {
|
|
634
|
+
void useAppStatusStore.getState().refresh()
|
|
635
|
+
},
|
|
636
|
+
)
|
|
637
|
+
|
|
638
|
+
/** Declares the microphone (or everything) in its manifest. */
|
|
639
|
+
const declaresMicrophone = (app: ClientApp): boolean =>
|
|
640
|
+
app.permissions.some((p) => p.type === "MICROPHONE" || p.type === "ALL")
|
|
641
|
+
|
|
574
642
|
// ---------------------------------------------------------------------------
|
|
575
643
|
// Public hooks
|
|
576
644
|
// ---------------------------------------------------------------------------
|
|
@@ -585,22 +653,32 @@ export const useStopAll = () => useAppStatusStore((state) => state.stopAll)
|
|
|
585
653
|
export const useInstall = () => useAppStatusStore((state) => state.install)
|
|
586
654
|
export const useUninstall = () => useAppStatusStore((state) => state.uninstall)
|
|
587
655
|
|
|
656
|
+
/** Every running app; each one has a card in the app switcher tray. */
|
|
588
657
|
export const useActiveApps = () => {
|
|
589
658
|
const apps = useApps()
|
|
590
659
|
return useMemo(() => apps.filter((app) => app.running), [apps])
|
|
591
660
|
}
|
|
592
661
|
|
|
662
|
+
/** Persistent apps whose background task is running, card or no card. */
|
|
663
|
+
export const useRunningPersistentApps = () => {
|
|
664
|
+
const apps = useApps()
|
|
665
|
+
return useMemo(() => apps.filter((app) => app.persistent && app.running), [apps])
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/** Apps that run without a foreground surface: background ones and the system dashboard. */
|
|
669
|
+
const isBackgroundApp = (app: ClientApp): boolean => app.type === "background" || app.type === "system_dashboard"
|
|
670
|
+
|
|
593
671
|
export const useActiveBackgroundApps = () => {
|
|
594
672
|
const apps = useApps()
|
|
595
|
-
return useMemo(() => apps.filter((app) => app
|
|
673
|
+
return useMemo(() => apps.filter((app) => isBackgroundApp(app) && app.running), [apps])
|
|
596
674
|
}
|
|
597
675
|
|
|
598
676
|
export const useBackgroundApps = () => {
|
|
599
677
|
const apps = useApps()
|
|
600
678
|
return useMemo(
|
|
601
679
|
() => ({
|
|
602
|
-
active: apps.filter((app) => app
|
|
603
|
-
inactive: apps.filter((app) => app
|
|
680
|
+
active: apps.filter((app) => isBackgroundApp(app) && app.running),
|
|
681
|
+
inactive: apps.filter((app) => isBackgroundApp(app) && !app.running),
|
|
604
682
|
}),
|
|
605
683
|
[apps],
|
|
606
684
|
)
|
|
@@ -623,7 +701,7 @@ export const useForegroundApp = () => {
|
|
|
623
701
|
|
|
624
702
|
export const useActiveBackgroundAppsCount = () => {
|
|
625
703
|
const apps = useApps()
|
|
626
|
-
return useMemo(() => apps.filter((app) => app
|
|
704
|
+
return useMemo(() => apps.filter((app) => isBackgroundApp(app) && app.running).length, [apps])
|
|
627
705
|
}
|
|
628
706
|
|
|
629
707
|
export const useLocalMiniApps = () => {
|
|
@@ -27,7 +27,7 @@ export const MENTRA_LIVE_SETTING_KEYS: string[] = [
|
|
|
27
27
|
]
|
|
28
28
|
|
|
29
29
|
function isMentraLiveDevice(model: string | undefined): boolean {
|
|
30
|
-
return model === DeviceTypes.LIVE
|
|
30
|
+
return model === DeviceTypes.LIVE
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export function getBluetoothSettingKeysForDevice(deviceModel: string | undefined, fullKeys: string[]): string[] {
|
package/src/stores/display.ts
CHANGED
|
@@ -44,10 +44,10 @@ function applyDisplayEvent(set: (partial: Partial<DisplayStore>) => void, event:
|
|
|
44
44
|
export interface DisplayStore {
|
|
45
45
|
/** The frame currently on the glasses — the mirror renders this. */
|
|
46
46
|
currentEvent: any
|
|
47
|
-
/**
|
|
48
|
-
|
|
47
|
+
/** The page (scene app id) holding the overlay slot over the main content, or null (see PageHost). */
|
|
48
|
+
overlayOwner: string | null
|
|
49
49
|
setDisplayEvent: (event: DisplayEvent | string) => void
|
|
50
|
-
|
|
50
|
+
setOverlayOwner: (owner: string | null) => void
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
let pendingDisplayEvent: DisplayEvent | null = null
|
|
@@ -56,9 +56,20 @@ let displayCoalesceTimer: ReturnType<typeof BgTimer.setTimeout> | null = null
|
|
|
56
56
|
export const useDisplayStore = create<DisplayStore>()(
|
|
57
57
|
subscribeWithSelector((set) => ({
|
|
58
58
|
currentEvent: {} as any,
|
|
59
|
-
|
|
59
|
+
overlayOwner: null,
|
|
60
60
|
setDisplayEvent: (event: DisplayEvent | string) => {
|
|
61
61
|
const parsed: DisplayEvent = typeof event === "string" ? JSON.parse(event) : event
|
|
62
|
+
const layoutType = (parsed.layout as {layoutType?: string} | undefined)?.layoutType
|
|
63
|
+
// Scenes are already paced by their producer. Caption coalescing drops
|
|
64
|
+
// video frames and can discard the starting pose of a short transition.
|
|
65
|
+
// A clear must also cancel any caption waiting to overwrite the display.
|
|
66
|
+
if (layoutType === "scene" || layoutType === "clear_view" || layoutType === "unavailable") {
|
|
67
|
+
if (displayCoalesceTimer) BgTimer.clearTimeout(displayCoalesceTimer)
|
|
68
|
+
displayCoalesceTimer = null
|
|
69
|
+
pendingDisplayEvent = null
|
|
70
|
+
applyDisplayEvent(set, parsed)
|
|
71
|
+
return
|
|
72
|
+
}
|
|
62
73
|
pendingDisplayEvent = parsed
|
|
63
74
|
if (displayCoalesceTimer) return
|
|
64
75
|
displayCoalesceTimer = BgTimer.setTimeout(() => {
|
|
@@ -68,9 +79,9 @@ export const useDisplayStore = create<DisplayStore>()(
|
|
|
68
79
|
if (next) applyDisplayEvent(set, next)
|
|
69
80
|
}, DISPLAY_COALESCE_MS)
|
|
70
81
|
},
|
|
71
|
-
|
|
72
|
-
logE2EMetric("display_view_changed", {view:
|
|
73
|
-
set({
|
|
82
|
+
setOverlayOwner: (owner: string | null) => {
|
|
83
|
+
logE2EMetric("display_view_changed", {view: owner === null ? "main" : "dashboard"})
|
|
84
|
+
set({overlayOwner: owner})
|
|
74
85
|
},
|
|
75
86
|
})),
|
|
76
87
|
)
|
package/src/stores/glasses.ts
CHANGED
|
@@ -11,6 +11,8 @@ import {isGlassesConnected, isGlassesLinkLayerBusy, isGlassesReady} from "../ser
|
|
|
11
11
|
import {create} from "zustand"
|
|
12
12
|
import {subscribeWithSelector} from "zustand/middleware"
|
|
13
13
|
|
|
14
|
+
import {BgTimer} from "../utils/timers"
|
|
15
|
+
|
|
14
16
|
// Re-export the connection predicates (single source of truth lives in
|
|
15
17
|
// GlassesReadiness) so importers of this store keep getting them.
|
|
16
18
|
export {isGlassesConnected, isGlassesLinkLayerBusy, isGlassesReady}
|
|
@@ -141,12 +143,17 @@ const initialState: GlassesStore = {
|
|
|
141
143
|
hotspotOtaVersion: 0,
|
|
142
144
|
sceneCanvasWidth: 0,
|
|
143
145
|
sceneCanvasHeight: 0,
|
|
146
|
+
sceneVector: false,
|
|
147
|
+
sceneSettle: false,
|
|
144
148
|
// wifi info
|
|
145
149
|
wifi: {state: "disconnected"},
|
|
146
150
|
wifiStatusKnown: false,
|
|
147
151
|
// battery info
|
|
148
152
|
batteryLevel: -1,
|
|
149
153
|
charging: false,
|
|
154
|
+
ringConnected: false,
|
|
155
|
+
ringBatteryLevel: -1,
|
|
156
|
+
ringCharging: false,
|
|
150
157
|
caseBatteryLevel: -1,
|
|
151
158
|
caseCharging: false,
|
|
152
159
|
caseOpen: false,
|
|
@@ -167,6 +174,13 @@ const initialState: GlassesStore = {
|
|
|
167
174
|
controllerSignalStrength: -1,
|
|
168
175
|
// iOS ANCS consent (G2 consumes notifications on-firmware):
|
|
169
176
|
ancsAuthorized: false,
|
|
177
|
+
// G2 Glassly CFW keyboard bridge (revision 39+):
|
|
178
|
+
keyboardBridge: false,
|
|
179
|
+
keyboardConnected: false,
|
|
180
|
+
keyboardName: "",
|
|
181
|
+
keyboardSaved: false,
|
|
182
|
+
keyboardState: "idle",
|
|
183
|
+
keyboardError: "",
|
|
170
184
|
}
|
|
171
185
|
|
|
172
186
|
export const useGlassesStore = create<GlassesState>()(
|
|
@@ -315,7 +329,7 @@ export const waitForGlassesState = <K extends keyof GlassesState>(
|
|
|
315
329
|
},
|
|
316
330
|
)
|
|
317
331
|
|
|
318
|
-
setTimeout(() => {
|
|
332
|
+
BgTimer.setTimeout(() => {
|
|
319
333
|
unsubscribe()
|
|
320
334
|
resolve(predicate(useGlassesStore.getState()[key]))
|
|
321
335
|
}, timeoutMs)
|