@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
|
@@ -1,102 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface WrapOptions {
|
|
5
|
-
/** Maximum width in pixels (defaults to profile's displayWidthPx) */
|
|
6
|
-
maxWidthPx?: number
|
|
7
|
-
|
|
8
|
-
/** Maximum number of lines (defaults to profile's maxLines) */
|
|
9
|
-
maxLines?: number
|
|
10
|
-
|
|
11
|
-
/** Maximum total bytes (defaults to profile's maxPayloadBytes) */
|
|
12
|
-
maxBytes?: number
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Break mode:
|
|
16
|
-
* - 'character': Break mid-word with hyphen for 100% utilization
|
|
17
|
-
* - 'word': Break at word boundaries, hyphenate only if word > line
|
|
18
|
-
* - 'strict-word': Break at word boundaries only, truncate long words
|
|
19
|
-
*/
|
|
20
|
-
breakMode?: BreakMode
|
|
21
|
-
|
|
22
|
-
/** Character to use for hyphenation (default: '-') */
|
|
23
|
-
hyphenChar?: string
|
|
24
|
-
|
|
25
|
-
/** Minimum characters before allowing hyphen break (default: 3) */
|
|
26
|
-
minCharsBeforeHyphen?: number
|
|
27
|
-
|
|
28
|
-
/** Whether to trim whitespace from line ends (default: true) */
|
|
29
|
-
trimLines?: boolean
|
|
30
|
-
|
|
31
|
-
/** Whether to preserve explicit newlines in input (default: true) */
|
|
32
|
-
preserveNewlines?: boolean
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Break mode for text wrapping.
|
|
37
|
-
* - 'character': Break mid-word with hyphen for 100% utilization
|
|
38
|
-
* - 'character-no-hyphen': Break mid-word without hyphen (clean break)
|
|
39
|
-
* - 'word': Break at word boundaries, hyphenate only if word > line
|
|
40
|
-
* - 'strict-word': Break at word boundaries only, truncate long words
|
|
41
|
-
*/
|
|
42
|
-
export type BreakMode = "character" | "character-no-hyphen" | "word" | "strict-word"
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Result of wrapping operation.
|
|
46
|
-
*/
|
|
47
|
-
export interface WrapResult {
|
|
48
|
-
/** Wrapped lines */
|
|
49
|
-
lines: string[]
|
|
50
|
-
|
|
51
|
-
/** Whether content was truncated to fit constraints */
|
|
52
|
-
truncated: boolean
|
|
53
|
-
|
|
54
|
-
/** Total pixel width of widest line */
|
|
55
|
-
maxLineWidthPx: number
|
|
56
|
-
|
|
57
|
-
/** Total byte size of all lines */
|
|
58
|
-
totalBytes: number
|
|
59
|
-
|
|
60
|
-
/** Per-line metadata */
|
|
61
|
-
lineMetrics: LineMetrics[]
|
|
62
|
-
|
|
63
|
-
/** Original input text */
|
|
64
|
-
originalText: string
|
|
65
|
-
|
|
66
|
-
/** Break mode used */
|
|
67
|
-
breakMode: BreakMode
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Per-line metrics from wrapping.
|
|
72
|
-
*/
|
|
73
|
-
export interface LineMetrics {
|
|
74
|
-
/** The line text */
|
|
75
|
-
text: string
|
|
76
|
-
|
|
77
|
-
/** Width in pixels */
|
|
78
|
-
widthPx: number
|
|
79
|
-
|
|
80
|
-
/** Byte size of this line */
|
|
81
|
-
bytes: number
|
|
82
|
-
|
|
83
|
-
/** Utilization percentage (widthPx / maxWidthPx * 100) */
|
|
84
|
-
utilizationPercent: number
|
|
85
|
-
|
|
86
|
-
/** Whether this line ends with a hyphen from breaking */
|
|
87
|
-
endsWithHyphen: boolean
|
|
88
|
-
|
|
89
|
-
/** Whether this line was created from an explicit newline */
|
|
90
|
-
fromExplicitNewline: boolean
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Default wrap options.
|
|
95
|
-
*/
|
|
96
|
-
export const DEFAULT_WRAP_OPTIONS: Required<Omit<WrapOptions, "maxWidthPx" | "maxLines" | "maxBytes">> = {
|
|
97
|
-
breakMode: "character-no-hyphen",
|
|
98
|
-
hyphenChar: "-",
|
|
99
|
-
minCharsBeforeHyphen: 3,
|
|
100
|
-
trimLines: true,
|
|
101
|
-
preserveNewlines: true,
|
|
102
|
-
}
|
|
1
|
+
// Moved into the SDK (@glassly/miniapp/display) so miniapps lay text out the way the host measures it; this path re-exports it for the engine.
|
|
2
|
+
export {DEFAULT_WRAP_OPTIONS} from "@glassly/miniapp/display"
|
|
3
|
+
export type {WrapOptions, WrapResult, LineMetrics, BreakMode} from "@glassly/miniapp/display"
|
|
@@ -86,7 +86,7 @@ export class HardwareCompatibility {
|
|
|
86
86
|
return capabilities.hasDisplay
|
|
87
87
|
|
|
88
88
|
case HardwareType.MICROPHONE:
|
|
89
|
-
//
|
|
89
|
+
// Glassly always provides an audio-input path. When the connected
|
|
90
90
|
// glasses do not have an onboard microphone, the engine falls back to
|
|
91
91
|
// the phone microphone. Keep `capabilities.hasMicrophone` reserved for
|
|
92
92
|
// physical-device/source selection; app compatibility is about whether
|
|
@@ -21,8 +21,36 @@
|
|
|
21
21
|
// https://github.com/tconns/react-native-nitro-bg-timer/issues/2. iOS
|
|
22
22
|
// suspends the whole process in background anyway, so background timing
|
|
23
23
|
// there is handled by native per-device queues, not JS timers.
|
|
24
|
+
//
|
|
25
|
+
// react-native is loaded lazily, not imported. Every engine service runs its
|
|
26
|
+
// timers through this module, and the engine's bun test suites load those
|
|
27
|
+
// services in a plain JS runtime that cannot parse react-native's Flow
|
|
28
|
+
// source. A static import would force every such suite to mock this module;
|
|
29
|
+
// with the lazy load, a runtime without react-native simply gets the JS
|
|
30
|
+
// timers, which is the correct answer there anyway.
|
|
31
|
+
|
|
32
|
+
type ReactNativeSubset = {
|
|
33
|
+
Platform: {OS: string}
|
|
34
|
+
Alert?: {alert: (title: string, message?: string) => void}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let reactNative: ReactNativeSubset | null | undefined
|
|
38
|
+
|
|
39
|
+
function getReactNative(): ReactNativeSubset | null {
|
|
40
|
+
if (reactNative !== undefined) {
|
|
41
|
+
return reactNative
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
reactNative = require("react-native") as ReactNativeSubset
|
|
45
|
+
} catch {
|
|
46
|
+
reactNative = null
|
|
47
|
+
}
|
|
48
|
+
return reactNative
|
|
49
|
+
}
|
|
24
50
|
|
|
25
|
-
|
|
51
|
+
function isDev(): boolean {
|
|
52
|
+
return typeof __DEV__ !== "undefined" && __DEV__
|
|
53
|
+
}
|
|
26
54
|
|
|
27
55
|
type NitroTimerApi = {
|
|
28
56
|
setInterval: (callback: () => void, delay: number) => number
|
|
@@ -53,12 +81,12 @@ function failUnavailable(reason: string) {
|
|
|
53
81
|
"Backgrounded behavior IS BROKEN until you rebuild the Android app: run `bun android`. " +
|
|
54
82
|
"Engine timers and local miniapps (captions, wake words) freeze whenever the app is not foregrounded."
|
|
55
83
|
console.error(message)
|
|
56
|
-
if (
|
|
84
|
+
if (isDev()) {
|
|
57
85
|
// A stale dev client may ALSO show the library's own require-time red box
|
|
58
86
|
// (bridgeless LogBox surfaces it even though we catch below) — this alert
|
|
59
87
|
// is the actionable one: it names the fix.
|
|
60
88
|
try {
|
|
61
|
-
Alert
|
|
89
|
+
getReactNative()?.Alert?.alert("Background timers unavailable", message)
|
|
62
90
|
} catch {
|
|
63
91
|
/* Alert not available (tests / headless) — the console.error stands. */
|
|
64
92
|
}
|
|
@@ -66,7 +94,7 @@ function failUnavailable(reason: string) {
|
|
|
66
94
|
}
|
|
67
95
|
|
|
68
96
|
function getNitroTimer(): NitroTimerApi | null {
|
|
69
|
-
if (nitroDisabled || Platform.OS !== "android") {
|
|
97
|
+
if (nitroDisabled || getReactNative()?.Platform.OS !== "android") {
|
|
70
98
|
return null
|
|
71
99
|
}
|
|
72
100
|
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { ClientApp } from "../types/applet";
|
|
2
|
-
/** Canonical widget order; also the default layout order. */
|
|
3
|
-
export declare const DASHBOARD_WIDGET_IDS: readonly ["clock", "calendar", "apps", "notifications"];
|
|
4
|
-
export type DashboardWidgetId = (typeof DASHBOARD_WIDGET_IDS)[number];
|
|
5
|
-
export type DashboardWidgetSetting = {
|
|
6
|
-
id: DashboardWidgetId;
|
|
7
|
-
enabled: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type DashboardAction = {
|
|
10
|
-
kind: "apps-menu";
|
|
11
|
-
} | {
|
|
12
|
-
kind: "notifications";
|
|
13
|
-
};
|
|
14
|
-
export type AppMenuAction = {
|
|
15
|
-
kind: "app";
|
|
16
|
-
packageName: string;
|
|
17
|
-
};
|
|
18
|
-
export type MenuAppSetting = {
|
|
19
|
-
packageName: string;
|
|
20
|
-
name: string;
|
|
21
|
-
running?: boolean;
|
|
22
|
-
};
|
|
23
|
-
export type CustomDashboardClockStyle = "compact" | "large";
|
|
24
|
-
/** G2.swift appends this marker after the firmware advertises EVENCFW capabilities. */
|
|
25
|
-
export declare function isGlasslyCfwFirmwareVersion(firmwareVersion: string | null | undefined): boolean;
|
|
26
|
-
/** Stock G2 and NIMO are intentionally excluded. */
|
|
27
|
-
export declare function isCustomDashboardEligible(info: {
|
|
28
|
-
model?: string | null;
|
|
29
|
-
firmwareVersion?: string | null;
|
|
30
|
-
}): boolean;
|
|
31
|
-
export declare function formatDashboardClock(date: Date, options: {
|
|
32
|
-
twelveHour: boolean;
|
|
33
|
-
showDate: boolean;
|
|
34
|
-
}): {
|
|
35
|
-
time: string;
|
|
36
|
-
date?: string;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Saved widget order, sanitized: unknown/duplicate entries dropped, widgets
|
|
40
|
-
* missing from the saved value appended enabled in canonical order.
|
|
41
|
-
*/
|
|
42
|
-
export declare function normalizeDashboardWidgets(raw: unknown): DashboardWidgetSetting[];
|
|
43
|
-
export declare function orderedDashboardApps(menu: MenuAppSetting[] | null | undefined, apps: ClientApp[]): ClientApp[];
|
|
44
|
-
/** Focusable main-view actions, following the user's widget order. */
|
|
45
|
-
export declare function dashboardActions(widgets: DashboardWidgetSetting[]): DashboardAction[];
|
|
46
|
-
/** App-menu view rows: the Glasses Menu apps in order (double tap leaves the view). */
|
|
47
|
-
export declare function appMenuActions(apps: ClientApp[]): AppMenuAction[];
|
|
48
|
-
//# sourceMappingURL=CustomDashboardModel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDashboardModel.d.ts","sourceRoot":"","sources":["../../src/services/CustomDashboardModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAA;AAG9C,6DAA6D;AAC7D,eAAO,MAAM,oBAAoB,yDAA0D,CAAA;AAC3F,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;AACrE,MAAM,MAAM,sBAAsB,GAAG;IAAC,EAAE,EAAE,iBAAiB,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAC,CAAA;AAE9E,MAAM,MAAM,eAAe,GAAG;IAAC,IAAI,EAAE,WAAW,CAAA;CAAC,GAAG;IAAC,IAAI,EAAE,eAAe,CAAA;CAAC,CAAA;AAC3E,MAAM,MAAM,aAAa,GAAG;IAAC,IAAI,EAAE,KAAK,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAC,CAAA;AAE9D,MAAM,MAAM,cAAc,GAAG;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAC,CAAA;AACnF,MAAM,MAAM,yBAAyB,GAAG,SAAS,GAAG,OAAO,CAAA;AAE3D,uFAAuF;AACvF,wBAAgB,2BAA2B,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE/F;AAED,oDAAoD;AACpD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAC,GAAG,OAAO,CAEjH;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAC,GAChD;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,CAW/B;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,sBAAsB,EAAE,CAehF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAK9G;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,eAAe,EAAE,CAQrF;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,aAAa,EAAE,CAEjE"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { DeviceTypes } from "../types/enums";
|
|
2
|
-
/** Canonical widget order; also the default layout order. */
|
|
3
|
-
export const DASHBOARD_WIDGET_IDS = ["clock", "calendar", "apps", "notifications"];
|
|
4
|
-
/** G2.swift appends this marker after the firmware advertises EVENCFW capabilities. */
|
|
5
|
-
export function isGlasslyCfwFirmwareVersion(firmwareVersion) {
|
|
6
|
-
return firmwareVersion?.toLowerCase().includes("glassly cfw") === true;
|
|
7
|
-
}
|
|
8
|
-
/** Stock G2 and NIMO are intentionally excluded. */
|
|
9
|
-
export function isCustomDashboardEligible(info) {
|
|
10
|
-
return info.model === DeviceTypes.G2 && isGlasslyCfwFirmwareVersion(info.firmwareVersion);
|
|
11
|
-
}
|
|
12
|
-
export function formatDashboardClock(date, options) {
|
|
13
|
-
const time = new Intl.DateTimeFormat(undefined, {
|
|
14
|
-
hour: "numeric",
|
|
15
|
-
minute: "2-digit",
|
|
16
|
-
hour12: options.twelveHour,
|
|
17
|
-
}).format(date);
|
|
18
|
-
if (!options.showDate)
|
|
19
|
-
return { time };
|
|
20
|
-
return {
|
|
21
|
-
time,
|
|
22
|
-
date: new Intl.DateTimeFormat(undefined, { weekday: "short", month: "short", day: "numeric" }).format(date),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Saved widget order, sanitized: unknown/duplicate entries dropped, widgets
|
|
27
|
-
* missing from the saved value appended enabled in canonical order.
|
|
28
|
-
*/
|
|
29
|
-
export function normalizeDashboardWidgets(raw) {
|
|
30
|
-
const widgets = [];
|
|
31
|
-
if (Array.isArray(raw)) {
|
|
32
|
-
for (const entry of raw) {
|
|
33
|
-
if (!entry || typeof entry !== "object")
|
|
34
|
-
continue;
|
|
35
|
-
const id = entry.id;
|
|
36
|
-
if (!DASHBOARD_WIDGET_IDS.includes(id))
|
|
37
|
-
continue;
|
|
38
|
-
if (widgets.some((widget) => widget.id === id))
|
|
39
|
-
continue;
|
|
40
|
-
widgets.push({ id, enabled: entry.enabled !== false });
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
for (const id of DASHBOARD_WIDGET_IDS) {
|
|
44
|
-
if (!widgets.some((widget) => widget.id === id))
|
|
45
|
-
widgets.push({ id, enabled: true });
|
|
46
|
-
}
|
|
47
|
-
return widgets;
|
|
48
|
-
}
|
|
49
|
-
export function orderedDashboardApps(menu, apps) {
|
|
50
|
-
if (!Array.isArray(menu))
|
|
51
|
-
return [];
|
|
52
|
-
return menu
|
|
53
|
-
.map((item) => apps.find((app) => app.packageName === item.packageName))
|
|
54
|
-
.filter((app) => Boolean(app && !app.hidden && app.compatibility?.isCompatible !== false));
|
|
55
|
-
}
|
|
56
|
-
/** Focusable main-view actions, following the user's widget order. */
|
|
57
|
-
export function dashboardActions(widgets) {
|
|
58
|
-
const actions = [];
|
|
59
|
-
for (const widget of widgets) {
|
|
60
|
-
if (!widget.enabled)
|
|
61
|
-
continue;
|
|
62
|
-
if (widget.id === "apps")
|
|
63
|
-
actions.push({ kind: "apps-menu" });
|
|
64
|
-
else if (widget.id === "notifications")
|
|
65
|
-
actions.push({ kind: "notifications" });
|
|
66
|
-
}
|
|
67
|
-
return actions;
|
|
68
|
-
}
|
|
69
|
-
/** App-menu view rows: the Glasses Menu apps in order (double tap leaves the view). */
|
|
70
|
-
export function appMenuActions(apps) {
|
|
71
|
-
return apps.map((app) => ({ kind: "app", packageName: app.packageName }));
|
|
72
|
-
}
|
|
73
|
-
//# sourceMappingURL=CustomDashboardModel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDashboardModel.js","sourceRoot":"","sources":["../../src/services/CustomDashboardModel.ts"],"names":[],"mappings":"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","sourcesContent":["import type {ClientApp} from \"../types/applet\"\nimport {DeviceTypes} from \"../types/enums\"\n\n/** Canonical widget order; also the default layout order. */\nexport const DASHBOARD_WIDGET_IDS = [\"clock\", \"calendar\", \"apps\", \"notifications\"] as const\nexport type DashboardWidgetId = (typeof DASHBOARD_WIDGET_IDS)[number]\nexport type DashboardWidgetSetting = {id: DashboardWidgetId; enabled: boolean}\n\nexport type DashboardAction = {kind: \"apps-menu\"} | {kind: \"notifications\"}\nexport type AppMenuAction = {kind: \"app\"; packageName: string}\n\nexport type MenuAppSetting = {packageName: string; name: string; running?: boolean}\nexport type CustomDashboardClockStyle = \"compact\" | \"large\"\n\n/** G2.swift appends this marker after the firmware advertises EVENCFW capabilities. */\nexport function isGlasslyCfwFirmwareVersion(firmwareVersion: string | null | undefined): boolean {\n return firmwareVersion?.toLowerCase().includes(\"glassly cfw\") === true\n}\n\n/** Stock G2 and NIMO are intentionally excluded. */\nexport function isCustomDashboardEligible(info: {model?: string | null; firmwareVersion?: string | null}): boolean {\n return info.model === DeviceTypes.G2 && isGlasslyCfwFirmwareVersion(info.firmwareVersion)\n}\n\nexport function formatDashboardClock(\n date: Date,\n options: {twelveHour: boolean; showDate: boolean},\n): {time: string; date?: string} {\n const time = new Intl.DateTimeFormat(undefined, {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: options.twelveHour,\n }).format(date)\n if (!options.showDate) return {time}\n return {\n time,\n date: new Intl.DateTimeFormat(undefined, {weekday: \"short\", month: \"short\", day: \"numeric\"}).format(date),\n }\n}\n\n/**\n * Saved widget order, sanitized: unknown/duplicate entries dropped, widgets\n * missing from the saved value appended enabled in canonical order.\n */\nexport function normalizeDashboardWidgets(raw: unknown): DashboardWidgetSetting[] {\n const widgets: DashboardWidgetSetting[] = []\n if (Array.isArray(raw)) {\n for (const entry of raw) {\n if (!entry || typeof entry !== \"object\") continue\n const id = (entry as {id?: unknown}).id as DashboardWidgetId\n if (!DASHBOARD_WIDGET_IDS.includes(id)) continue\n if (widgets.some((widget) => widget.id === id)) continue\n widgets.push({id, enabled: (entry as {enabled?: unknown}).enabled !== false})\n }\n }\n for (const id of DASHBOARD_WIDGET_IDS) {\n if (!widgets.some((widget) => widget.id === id)) widgets.push({id, enabled: true})\n }\n return widgets\n}\n\nexport function orderedDashboardApps(menu: MenuAppSetting[] | null | undefined, apps: ClientApp[]): ClientApp[] {\n if (!Array.isArray(menu)) return []\n return menu\n .map((item) => apps.find((app) => app.packageName === item.packageName))\n .filter((app): app is ClientApp => Boolean(app && !app.hidden && app.compatibility?.isCompatible !== false))\n}\n\n/** Focusable main-view actions, following the user's widget order. */\nexport function dashboardActions(widgets: DashboardWidgetSetting[]): DashboardAction[] {\n const actions: DashboardAction[] = []\n for (const widget of widgets) {\n if (!widget.enabled) continue\n if (widget.id === \"apps\") actions.push({kind: \"apps-menu\"})\n else if (widget.id === \"notifications\") actions.push({kind: \"notifications\"})\n }\n return actions\n}\n\n/** App-menu view rows: the Glasses Menu apps in order (double tap leaves the view). */\nexport function appMenuActions(apps: ClientApp[]): AppMenuAction[] {\n return apps.map((app): AppMenuAction => ({kind: \"app\", packageName: app.packageName}))\n}\n"]}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
declare class CustomDashboardService {
|
|
2
|
-
private started;
|
|
3
|
-
private open;
|
|
4
|
-
/** Set by DashboardCoordinator; asks it to close (and restore main content). */
|
|
5
|
-
onRequestClose: (() => void) | null;
|
|
6
|
-
private view;
|
|
7
|
-
private mainIndex;
|
|
8
|
-
private appsIndex;
|
|
9
|
-
/** "loading" until the first fetch resolves; "no-access" only for a real permission denial. */
|
|
10
|
-
private calendarStatus;
|
|
11
|
-
/** packageName → base64 icon bytes, or null when the icon can't be loaded (monogram fallback). */
|
|
12
|
-
private iconCache;
|
|
13
|
-
private iconLoads;
|
|
14
|
-
private calendarEvents;
|
|
15
|
-
private unsubs;
|
|
16
|
-
private clockTimer;
|
|
17
|
-
private calendarTimer;
|
|
18
|
-
/** Last observed eligibility, for transition detection. */
|
|
19
|
-
private eligible;
|
|
20
|
-
start(): void;
|
|
21
|
-
/**
|
|
22
|
-
* Track eligible⇄ineligible transitions from any trigger (setting toggle,
|
|
23
|
-
* connect/disconnect, firmware change). Leaving closes the dashboard via the
|
|
24
|
-
* coordinator (which restores main content) and drops the retained scene so
|
|
25
|
-
* a stale frame can't be replayed after the feature was turned off.
|
|
26
|
-
*/
|
|
27
|
-
private syncEligibility;
|
|
28
|
-
stop(): void;
|
|
29
|
-
isEligible(): boolean;
|
|
30
|
-
get isOpen(): boolean;
|
|
31
|
-
/** Coordinator opened the dashboard: render fresh from the top. */
|
|
32
|
-
show(): void;
|
|
33
|
-
/** Coordinator closed the dashboard. */
|
|
34
|
-
hide(): void;
|
|
35
|
-
/** Returns true when an open custom dashboard consumed the gesture. */
|
|
36
|
-
handleGesture(gestureName: string): boolean;
|
|
37
|
-
private resetNavigation;
|
|
38
|
-
private handleMainGesture;
|
|
39
|
-
private handleAppMenuGesture;
|
|
40
|
-
private menuApps;
|
|
41
|
-
private widgets;
|
|
42
|
-
private openNotificationsPanel;
|
|
43
|
-
private toggleApp;
|
|
44
|
-
private calendarWidgetEnabled;
|
|
45
|
-
private refreshCalendarAndRender;
|
|
46
|
-
/** Underline hugging a builtin-font label. x/rowY are the label box's origin. */
|
|
47
|
-
private labelUnderline;
|
|
48
|
-
private canvas;
|
|
49
|
-
private render;
|
|
50
|
-
private mainElements;
|
|
51
|
-
/**
|
|
52
|
-
* Resolve a miniapp icon to base64 for the glasses. Local/bundled miniapps
|
|
53
|
-
* carry a file:// icon.png; store apps an https URL; the offline system
|
|
54
|
-
* tiles a bundler asset id (unsupported here — monogram fallback). Loads
|
|
55
|
-
* are async and cached; a finished load repaints the open app menu.
|
|
56
|
-
*/
|
|
57
|
-
private loadIcon;
|
|
58
|
-
private appMenuElements;
|
|
59
|
-
}
|
|
60
|
-
declare const customDashboardService: CustomDashboardService;
|
|
61
|
-
export default customDashboardService;
|
|
62
|
-
export { CustomDashboardService };
|
|
63
|
-
//# sourceMappingURL=CustomDashboardService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDashboardService.d.ts","sourceRoot":"","sources":["../../src/services/CustomDashboardService.ts"],"names":[],"mappings":"AAqFA,cAAM,sBAAsB;IAC1B,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,IAAI,CAAQ;IACpB,gFAAgF;IACzE,cAAc,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAO;IACjD,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,SAAS,CAAI;IACrB,OAAO,CAAC,SAAS,CAAI;IACrB,+FAA+F;IAC/F,OAAO,CAAC,cAAc,CAA4D;IAClF,kGAAkG;IAClG,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,cAAc,CAAsB;IAC5C,OAAO,CAAC,MAAM,CAAwB;IACtC,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,aAAa,CAAsB;IAC3C,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAQ;IAExB,KAAK,IAAI,IAAI;IA2Cb;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAavB,IAAI,IAAI,IAAI;IAeZ,UAAU,IAAI,OAAO;IAYrB,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,mEAAmE;IACnE,IAAI,IAAI,IAAI;IAMZ,wCAAwC;IACxC,IAAI,IAAI,IAAI;IAKZ,uEAAuE;IACvE,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAiB3C,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,OAAO;YAID,sBAAsB;YAOtB,SAAS;IAcvB,OAAO,CAAC,qBAAqB;YAIf,wBAAwB;IAkCtC,iFAAiF;IACjF,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,YAAY;IAgGpB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;IAiChB,OAAO,CAAC,eAAe;CAmFxB;AAED,QAAA,MAAM,sBAAsB,wBAA+B,CAAA;AAC3D,eAAe,sBAAsB,CAAA;AACrC,OAAO,EAAC,sBAAsB,EAAC,CAAA"}
|