@mentra/engine 0.1.0-dev.0 → 3.1.0-beta.100
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 +73 -18
- package/build/bluetooth-sdk/debug.d.ts +2 -0
- package/build/bluetooth-sdk/debug.d.ts.map +1 -0
- package/build/bluetooth-sdk/debug.js +2 -0
- package/build/bluetooth-sdk/debug.js.map +1 -0
- package/build/bluetooth-sdk/index.d.ts +3 -0
- package/build/bluetooth-sdk/index.d.ts.map +1 -0
- package/build/bluetooth-sdk/index.js +3 -0
- package/build/bluetooth-sdk/index.js.map +1 -0
- package/build/bluetooth-sdk/ota-transport.d.ts +2 -0
- package/build/bluetooth-sdk/ota-transport.d.ts.map +1 -0
- package/build/bluetooth-sdk/ota-transport.js +2 -0
- package/build/bluetooth-sdk/ota-transport.js.map +1 -0
- package/build/bluetooth-sdk/photo-receiver.d.ts +3 -0
- package/build/bluetooth-sdk/photo-receiver.d.ts.map +1 -0
- package/build/bluetooth-sdk/photo-receiver.js +3 -0
- package/build/bluetooth-sdk/photo-receiver.js.map +1 -0
- package/build/bluetooth-sdk/react.d.ts +2 -0
- package/build/bluetooth-sdk/react.d.ts.map +1 -0
- package/build/bluetooth-sdk/react.js +2 -0
- package/build/bluetooth-sdk/react.js.map +1 -0
- package/build/bluetooth-sdk/types.d.ts +2 -0
- package/build/bluetooth-sdk/types.d.ts.map +1 -0
- package/build/bluetooth-sdk/types.js +2 -0
- package/build/bluetooth-sdk/types.js.map +1 -0
- package/build/engine.d.ts +29 -18
- package/build/engine.d.ts.map +1 -1
- package/build/engine.js +9 -4
- package/build/engine.js.map +1 -1
- package/build/facades/dev.d.ts +3 -2
- package/build/facades/dev.d.ts.map +1 -1
- package/build/facades/dev.js +18 -12
- package/build/facades/dev.js.map +1 -1
- package/build/facades/display.d.ts +1 -1
- package/build/facades/display.d.ts.map +1 -1
- package/build/facades/display.js +1 -1
- package/build/facades/display.js.map +1 -1
- package/build/facades/gallery.js +1 -1
- package/build/facades/gallery.js.map +1 -1
- package/build/facades/glasses.d.ts +4 -13
- package/build/facades/glasses.d.ts.map +1 -1
- package/build/facades/glasses.js +21 -6
- package/build/facades/glasses.js.map +1 -1
- package/build/facades/glassesSettings.d.ts.map +1 -1
- package/build/facades/glassesSettings.js +1 -0
- package/build/facades/glassesSettings.js.map +1 -1
- package/build/facades/miniapps.d.ts +4 -0
- package/build/facades/miniapps.d.ts.map +1 -1
- package/build/facades/miniapps.js +5 -0
- package/build/facades/miniapps.js.map +1 -1
- package/build/facades/ota.d.ts +24 -21
- package/build/facades/ota.d.ts.map +1 -1
- package/build/facades/ota.js +31 -12
- package/build/facades/ota.js.map +1 -1
- package/build/facades/pairing.d.ts +12 -5
- package/build/facades/pairing.d.ts.map +1 -1
- package/build/facades/pairing.js +93 -17
- package/build/facades/pairing.js.map +1 -1
- package/build/facades/permissions.d.ts +10 -0
- package/build/facades/permissions.d.ts.map +1 -1
- package/build/facades/permissions.js +10 -0
- package/build/facades/permissions.js.map +1 -1
- package/build/facades/phoneNotifications.d.ts +0 -4
- package/build/facades/phoneNotifications.d.ts.map +1 -1
- package/build/facades/phoneNotifications.js +4 -14
- package/build/facades/phoneNotifications.js.map +1 -1
- package/build/facades/speech.d.ts +7 -6
- package/build/facades/speech.d.ts.map +1 -1
- package/build/facades/speech.js +1 -1
- package/build/facades/speech.js.map +1 -1
- package/build/generated/releaseMetadata.d.ts +12 -0
- package/build/generated/releaseMetadata.d.ts.map +1 -0
- package/build/generated/releaseMetadata.js +10 -0
- package/build/generated/releaseMetadata.js.map +1 -0
- package/build/index.d.ts +12 -10
- package/build/index.d.ts.map +1 -1
- package/build/index.js +7 -6
- package/build/index.js.map +1 -1
- package/build/react/MentraLiveOtaFlow.d.ts +44 -0
- package/build/react/MentraLiveOtaFlow.d.ts.map +1 -0
- package/build/react/MentraLiveOtaFlow.js +430 -0
- package/build/react/MentraLiveOtaFlow.js.map +1 -0
- package/build/react/index.d.ts +3 -0
- package/build/react/index.d.ts.map +1 -0
- package/build/react/index.js +3 -0
- package/build/react/index.js.map +1 -0
- package/build/react/useEngineSnapshot.d.ts +2 -0
- package/build/react/useEngineSnapshot.d.ts.map +1 -0
- package/build/react/useEngineSnapshot.js +14 -0
- package/build/react/useEngineSnapshot.js.map +1 -0
- package/build/react/useMentraLiveOta.d.ts +84 -0
- package/build/react/useMentraLiveOta.d.ts.map +1 -0
- package/build/react/useMentraLiveOta.js +627 -0
- package/build/react/useMentraLiveOta.js.map +1 -0
- package/build/runtime/bootstrap.d.ts +24 -1
- package/build/runtime/bootstrap.d.ts.map +1 -1
- package/build/runtime/bootstrap.js +17 -0
- package/build/runtime/bootstrap.js.map +1 -1
- package/build/runtime/scanQrSeam.d.ts +7 -0
- package/build/runtime/scanQrSeam.d.ts.map +1 -0
- package/build/runtime/scanQrSeam.js +16 -0
- package/build/runtime/scanQrSeam.js.map +1 -0
- package/build/services/AppRegistry.d.ts +41 -57
- package/build/services/AppRegistry.d.ts.map +1 -1
- package/build/services/AppRegistry.js +208 -144
- package/build/services/AppRegistry.js.map +1 -1
- package/build/services/AudioCloudUplink.d.ts +12 -0
- package/build/services/AudioCloudUplink.d.ts.map +1 -1
- package/build/services/AudioCloudUplink.js +22 -1
- package/build/services/AudioCloudUplink.js.map +1 -1
- package/build/services/AudioPlaybackService.d.ts +41 -2
- package/build/services/AudioPlaybackService.d.ts.map +1 -1
- package/build/services/AudioPlaybackService.js +250 -33
- package/build/services/AudioPlaybackService.js.map +1 -1
- package/build/services/BlobStore.d.ts +4 -1
- package/build/services/BlobStore.d.ts.map +1 -1
- package/build/services/BlobStore.js +80 -19
- package/build/services/BlobStore.js.map +1 -1
- package/build/services/CloudAudioSubscriptionSync.d.ts.map +1 -1
- package/build/services/CloudAudioSubscriptionSync.js +13 -1
- package/build/services/CloudAudioSubscriptionSync.js.map +1 -1
- package/build/services/CloudClientService.d.ts +15 -0
- package/build/services/CloudClientService.d.ts.map +1 -1
- package/build/services/CloudClientService.js +93 -1
- package/build/services/CloudClientService.js.map +1 -1
- package/build/services/DeviceEventRouter.js +5 -5
- package/build/services/DeviceEventRouter.js.map +1 -1
- package/build/services/DisplayProcessor.d.ts +3 -3
- package/build/services/DisplayProcessor.js +3 -3
- package/build/services/DisplayProcessor.js.map +1 -1
- package/build/services/ForegroundLocationPermission.d.ts +13 -0
- package/build/services/ForegroundLocationPermission.d.ts.map +1 -0
- package/build/services/ForegroundLocationPermission.js +12 -0
- package/build/services/ForegroundLocationPermission.js.map +1 -0
- package/build/services/GlassesSettingsSync.d.ts.map +1 -1
- package/build/services/GlassesSettingsSync.js +9 -3
- package/build/services/GlassesSettingsSync.js.map +1 -1
- package/build/services/GlassesStatusProjection.d.ts +15 -1
- package/build/services/GlassesStatusProjection.d.ts.map +1 -1
- package/build/services/GlassesStatusProjection.js +18 -11
- package/build/services/GlassesStatusProjection.js.map +1 -1
- package/build/services/HotspotOtaTransport.d.ts +29 -0
- package/build/services/HotspotOtaTransport.d.ts.map +1 -0
- package/build/services/HotspotOtaTransport.js +147 -0
- package/build/services/HotspotOtaTransport.js.map +1 -0
- package/build/services/HotspotShutdown.d.ts +17 -0
- package/build/services/HotspotShutdown.d.ts.map +1 -0
- package/build/services/HotspotShutdown.js +29 -0
- package/build/services/HotspotShutdown.js.map +1 -0
- package/build/services/LocalDisplayManager.d.ts +17 -3
- package/build/services/LocalDisplayManager.d.ts.map +1 -1
- package/build/services/LocalDisplayManager.js +108 -23
- package/build/services/LocalDisplayManager.js.map +1 -1
- package/build/services/LocalMiniappRuntime.d.ts +74 -2
- package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
- package/build/services/LocalMiniappRuntime.js +785 -291
- package/build/services/LocalMiniappRuntime.js.map +1 -1
- package/build/services/LocalMiniappStorage.d.ts +32 -0
- package/build/services/LocalMiniappStorage.d.ts.map +1 -0
- package/build/services/LocalMiniappStorage.js +66 -0
- package/build/services/LocalMiniappStorage.js.map +1 -0
- package/build/services/LocalMiniappUserIdentity.d.ts +20 -0
- package/build/services/LocalMiniappUserIdentity.d.ts.map +1 -0
- package/build/services/LocalMiniappUserIdentity.js +43 -0
- package/build/services/LocalMiniappUserIdentity.js.map +1 -0
- package/build/services/LocalSttFallbackCoordinator.d.ts +9 -6
- package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -1
- package/build/services/LocalSttFallbackCoordinator.js +18 -12
- package/build/services/LocalSttFallbackCoordinator.js.map +1 -1
- package/build/services/MicStateCoordinator.d.ts +42 -1
- package/build/services/MicStateCoordinator.d.ts.map +1 -1
- package/build/services/MicStateCoordinator.js +141 -3
- package/build/services/MicStateCoordinator.js.map +1 -1
- package/build/services/MiniappLauncher.d.ts.map +1 -1
- package/build/services/MiniappLauncher.js +23 -3
- package/build/services/MiniappLauncher.js.map +1 -1
- package/build/services/MiniappLiveness.d.ts +12 -0
- package/build/services/MiniappLiveness.d.ts.map +1 -0
- package/build/services/MiniappLiveness.js +16 -0
- package/build/services/MiniappLiveness.js.map +1 -0
- package/build/services/NativeHttpResponse.d.ts +3 -0
- package/build/services/NativeHttpResponse.d.ts.map +1 -0
- package/build/services/NativeHttpResponse.js +6 -0
- package/build/services/NativeHttpResponse.js.map +1 -0
- package/build/services/OtaArtifactDownloader.d.ts +65 -0
- package/build/services/OtaArtifactDownloader.d.ts.map +1 -0
- package/build/services/OtaArtifactDownloader.js +226 -0
- package/build/services/OtaArtifactDownloader.js.map +1 -0
- package/build/services/OtaAutoChain.d.ts +41 -0
- package/build/services/OtaAutoChain.d.ts.map +1 -0
- package/build/services/OtaAutoChain.js +91 -0
- package/build/services/OtaAutoChain.js.map +1 -0
- package/build/services/OtaErrorMapping.d.ts +18 -0
- package/build/services/OtaErrorMapping.d.ts.map +1 -0
- package/build/services/OtaErrorMapping.js +63 -0
- package/build/services/OtaErrorMapping.js.map +1 -0
- package/build/services/OtaInstallCoordinator.d.ts +120 -17
- package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
- package/build/services/OtaInstallCoordinator.js +605 -136
- package/build/services/OtaInstallCoordinator.js.map +1 -1
- package/build/services/OtaService.d.ts.map +1 -1
- package/build/services/OtaService.js +9 -2
- package/build/services/OtaService.js.map +1 -1
- package/build/services/OtaUpdateCheckService.d.ts +42 -4
- package/build/services/OtaUpdateCheckService.d.ts.map +1 -1
- package/build/services/OtaUpdateCheckService.js +158 -26
- package/build/services/OtaUpdateCheckService.js.map +1 -1
- package/build/services/PhoneCalendarHelpers.d.ts +32 -0
- package/build/services/PhoneCalendarHelpers.d.ts.map +1 -0
- package/build/services/PhoneCalendarHelpers.js +157 -0
- package/build/services/PhoneCalendarHelpers.js.map +1 -0
- package/build/services/PhoneCalendarService.d.ts +5 -0
- package/build/services/PhoneCalendarService.d.ts.map +1 -0
- package/build/services/PhoneCalendarService.js +45 -0
- package/build/services/PhoneCalendarService.js.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts +30 -0
- package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -0
- package/build/services/PhoneCameraFovCoordinator.js +194 -0
- package/build/services/PhoneCameraFovCoordinator.js.map +1 -0
- package/build/services/PhoneNotificationsSync.d.ts.map +1 -1
- package/build/services/PhoneNotificationsSync.js +12 -10
- package/build/services/PhoneNotificationsSync.js.map +1 -1
- package/build/services/PhonePhotoCoordinator.d.ts +26 -2
- package/build/services/PhonePhotoCoordinator.d.ts.map +1 -1
- package/build/services/PhonePhotoCoordinator.js +80 -10
- package/build/services/PhonePhotoCoordinator.js.map +1 -1
- package/build/services/PhoneStreamCoordinator.d.ts +8 -1
- package/build/services/PhoneStreamCoordinator.d.ts.map +1 -1
- package/build/services/PhoneStreamCoordinator.js +125 -13
- package/build/services/PhoneStreamCoordinator.js.map +1 -1
- package/build/services/PhoneVideoCoordinator.d.ts +2 -0
- package/build/services/PhoneVideoCoordinator.d.ts.map +1 -1
- package/build/services/PhoneVideoCoordinator.js +10 -0
- package/build/services/PhoneVideoCoordinator.js.map +1 -1
- package/build/services/SceneRenderer.d.ts.map +1 -1
- package/build/services/SceneRenderer.js +15 -0
- package/build/services/SceneRenderer.js.map +1 -1
- package/build/services/SentenceTtsPipeline.d.ts +31 -0
- package/build/services/SentenceTtsPipeline.d.ts.map +1 -0
- package/build/services/SentenceTtsPipeline.js +67 -0
- package/build/services/SentenceTtsPipeline.js.map +1 -0
- package/build/services/StreamLifecycleController.d.ts +3 -3
- package/build/services/StreamLifecycleController.js +3 -3
- package/build/services/StreamLifecycleController.js.map +1 -1
- package/build/services/SupportProfileSync.d.ts +22 -0
- package/build/services/SupportProfileSync.d.ts.map +1 -0
- package/build/services/SupportProfileSync.js +213 -0
- package/build/services/SupportProfileSync.js.map +1 -0
- package/build/services/TranscriptionRouting.d.ts +12 -0
- package/build/services/TranscriptionRouting.d.ts.map +1 -0
- package/build/services/TranscriptionRouting.js +24 -0
- package/build/services/TranscriptionRouting.js.map +1 -0
- package/build/services/TtsTextSanitizer.d.ts +5 -0
- package/build/services/TtsTextSanitizer.d.ts.map +1 -0
- package/build/services/TtsTextSanitizer.js +61 -0
- package/build/services/TtsTextSanitizer.js.map +1 -0
- package/build/services/WifiAdbRequest.d.ts +17 -0
- package/build/services/WifiAdbRequest.d.ts.map +1 -0
- package/build/services/WifiAdbRequest.js +35 -0
- package/build/services/WifiAdbRequest.js.map +1 -0
- package/build/services/asg/asgCameraApi.d.ts +43 -0
- package/build/services/asg/asgCameraApi.d.ts.map +1 -1
- package/build/services/asg/asgCameraApi.js +509 -26
- package/build/services/asg/asgCameraApi.js.map +1 -1
- package/build/services/asg/cameraRollExportCoordinator.d.ts +60 -0
- package/build/services/asg/cameraRollExportCoordinator.d.ts.map +1 -0
- package/build/services/asg/cameraRollExportCoordinator.js +618 -0
- package/build/services/asg/cameraRollExportCoordinator.js.map +1 -0
- package/build/services/asg/cameraRollExportLedger.d.ts +44 -0
- package/build/services/asg/cameraRollExportLedger.d.ts.map +1 -0
- package/build/services/asg/cameraRollExportLedger.js +78 -0
- package/build/services/asg/cameraRollExportLedger.js.map +1 -0
- package/build/services/asg/galleryNotices.d.ts +1 -1
- package/build/services/asg/galleryNotices.d.ts.map +1 -1
- package/build/services/asg/galleryNotices.js.map +1 -1
- package/build/services/asg/galleryPathMigration.d.ts +3 -0
- package/build/services/asg/galleryPathMigration.d.ts.map +1 -0
- package/build/services/asg/galleryPathMigration.js +26 -0
- package/build/services/asg/galleryPathMigration.js.map +1 -0
- package/build/services/asg/gallerySettingsService.d.ts +1 -0
- package/build/services/asg/gallerySettingsService.d.ts.map +1 -1
- package/build/services/asg/gallerySettingsService.js +2 -0
- package/build/services/asg/gallerySettingsService.js.map +1 -1
- package/build/services/asg/gallerySyncService.d.ts.map +1 -1
- package/build/services/asg/gallerySyncService.js +162 -56
- package/build/services/asg/gallerySyncService.js.map +1 -1
- package/build/services/asg/galleryTransferLedger.d.ts +58 -0
- package/build/services/asg/galleryTransferLedger.d.ts.map +1 -0
- package/build/services/asg/galleryTransferLedger.js +225 -0
- package/build/services/asg/galleryTransferLedger.js.map +1 -0
- package/build/services/asg/localNetworkTransport.d.ts +15 -0
- package/build/services/asg/localNetworkTransport.d.ts.map +1 -0
- package/build/services/asg/localNetworkTransport.js +145 -0
- package/build/services/asg/localNetworkTransport.js.map +1 -0
- package/build/services/asg/localStorageService.d.ts +18 -0
- package/build/services/asg/localStorageService.d.ts.map +1 -1
- package/build/services/asg/localStorageService.js +168 -19
- package/build/services/asg/localStorageService.js.map +1 -1
- package/build/services/asg/mediaProcessingQueue.d.ts +10 -0
- package/build/services/asg/mediaProcessingQueue.d.ts.map +1 -1
- package/build/services/asg/mediaProcessingQueue.js +193 -62
- package/build/services/asg/mediaProcessingQueue.js.map +1 -1
- package/build/services/audioPlaybackAssets.d.ts +8 -0
- package/build/services/audioPlaybackAssets.d.ts.map +1 -0
- package/build/services/audioPlaybackAssets.js +7 -0
- package/build/services/audioPlaybackAssets.js.map +1 -0
- package/build/services/gallerySyncClock.js +1 -1
- package/build/services/gallerySyncClock.js.map +1 -1
- package/build/services/glassesClockSync.d.ts.map +1 -1
- package/build/services/glassesClockSync.js +7 -3
- package/build/services/glassesClockSync.js.map +1 -1
- package/build/services/manifestActions.d.ts +7 -0
- package/build/services/manifestActions.d.ts.map +1 -0
- package/build/services/manifestActions.js +25 -0
- package/build/services/manifestActions.js.map +1 -0
- package/build/services/otaDisplayState.d.ts +23 -12
- package/build/services/otaDisplayState.d.ts.map +1 -1
- package/build/services/otaDisplayState.js +36 -14
- package/build/services/otaDisplayState.js.map +1 -1
- package/build/services/otaInstallPolicy.d.ts +20 -4
- package/build/services/otaInstallPolicy.d.ts.map +1 -1
- package/build/services/otaInstallPolicy.js +28 -3
- package/build/services/otaInstallPolicy.js.map +1 -1
- package/build/services/otaLegacyMapping.d.ts +1 -1
- package/build/services/otaLegacyMapping.d.ts.map +1 -1
- package/build/services/otaLegacyMapping.js.map +1 -1
- package/build/services/otaManifestPolicy.d.ts +14 -0
- package/build/services/otaManifestPolicy.d.ts.map +1 -0
- package/build/services/otaManifestPolicy.js +19 -0
- package/build/services/otaManifestPolicy.js.map +1 -0
- package/build/services/otaManifestUrl.d.ts +3 -0
- package/build/services/otaManifestUrl.d.ts.map +1 -0
- package/build/services/otaManifestUrl.js +38 -0
- package/build/services/otaManifestUrl.js.map +1 -0
- package/build/services/otaReleaseVersion.d.ts +10 -0
- package/build/services/otaReleaseVersion.d.ts.map +1 -0
- package/build/services/otaReleaseVersion.js +14 -0
- package/build/services/otaReleaseVersion.js.map +1 -0
- package/build/services/slimStreamStatus.d.ts +11 -0
- package/build/services/slimStreamStatus.d.ts.map +1 -1
- package/build/services/slimStreamStatus.js +14 -4
- package/build/services/slimStreamStatus.js.map +1 -1
- package/build/stores/appVisibility.d.ts +3 -0
- package/build/stores/appVisibility.d.ts.map +1 -0
- package/build/stores/appVisibility.js +3 -0
- package/build/stores/appVisibility.js.map +1 -0
- package/build/stores/apps.d.ts.map +1 -1
- package/build/stores/apps.js +18 -1
- package/build/stores/apps.js.map +1 -1
- package/build/stores/bluetoothSettingKeys.d.ts.map +1 -1
- package/build/stores/bluetoothSettingKeys.js +2 -0
- package/build/stores/bluetoothSettingKeys.js.map +1 -1
- package/build/stores/core.d.ts +3 -3
- package/build/stores/core.d.ts.map +1 -1
- package/build/stores/core.js.map +1 -1
- package/build/stores/gallerySync.d.ts +2 -0
- package/build/stores/gallerySync.d.ts.map +1 -1
- package/build/stores/gallerySync.js +2 -0
- package/build/stores/gallerySync.js.map +1 -1
- package/build/stores/glasses.d.ts +10 -4
- package/build/stores/glasses.d.ts.map +1 -1
- package/build/stores/glasses.js +3 -0
- package/build/stores/glasses.js.map +1 -1
- package/build/stores/settings.d.ts +17 -0
- package/build/stores/settings.d.ts.map +1 -1
- package/build/stores/settings.js +157 -17
- package/build/stores/settings.js.map +1 -1
- package/build/types/applet.d.ts +3 -1
- package/build/types/applet.d.ts.map +1 -1
- package/build/types/applet.js +1 -1
- package/build/types/applet.js.map +1 -1
- package/build/types/asg.d.ts +7 -0
- package/build/types/asg.d.ts.map +1 -1
- package/build/types/asg.js.map +1 -1
- package/build/types/capabilities/even-realities-g1.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g1.js +2 -0
- package/build/types/capabilities/even-realities-g1.js.map +1 -1
- package/build/types/capabilities/even-realities-g2.d.ts.map +1 -1
- package/build/types/capabilities/even-realities-g2.js +2 -0
- package/build/types/capabilities/even-realities-g2.js.map +1 -1
- package/build/types/capabilities/mentra-display.d.ts.map +1 -1
- package/build/types/capabilities/mentra-display.js +2 -0
- package/build/types/capabilities/mentra-display.js.map +1 -1
- package/build/types/capabilities/mentra-live.d.ts.map +1 -1
- package/build/types/capabilities/mentra-live.js +2 -0
- package/build/types/capabilities/mentra-live.js.map +1 -1
- package/build/types/capabilities/nimo.d.ts +9 -0
- package/build/types/capabilities/nimo.d.ts.map +1 -0
- package/build/types/capabilities/nimo.js +57 -0
- package/build/types/capabilities/nimo.js.map +1 -0
- package/build/types/capabilities/none.d.ts.map +1 -1
- package/build/types/capabilities/none.js +2 -0
- package/build/types/capabilities/none.js.map +1 -1
- package/build/types/capabilities/simulated-glasses.d.ts.map +1 -1
- package/build/types/capabilities/simulated-glasses.js +2 -0
- package/build/types/capabilities/simulated-glasses.js.map +1 -1
- package/build/types/capabilities/vuzix-z100.d.ts.map +1 -1
- package/build/types/capabilities/vuzix-z100.js +2 -0
- package/build/types/capabilities/vuzix-z100.js.map +1 -1
- package/build/types/enums.d.ts +4 -26
- package/build/types/enums.d.ts.map +1 -1
- package/build/types/enums.js +3 -27
- package/build/types/enums.js.map +1 -1
- package/build/types/hardware.d.ts +6 -14
- package/build/types/hardware.d.ts.map +1 -1
- package/build/types/hardware.js +18 -4
- package/build/types/hardware.js.map +1 -1
- package/build/types/index.d.ts +3 -7
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.js +3 -7
- package/build/types/index.js.map +1 -1
- package/build/utils/configuredDevHost.d.ts +6 -0
- package/build/utils/configuredDevHost.d.ts.map +1 -0
- package/build/utils/configuredDevHost.js +19 -0
- package/build/utils/configuredDevHost.js.map +1 -0
- package/build/utils/devMiniappLaunch.d.ts +19 -8
- package/build/utils/devMiniappLaunch.d.ts.map +1 -1
- package/build/utils/devMiniappLaunch.js +144 -21
- package/build/utils/devMiniappLaunch.js.map +1 -1
- package/build/utils/diagnosticContext.d.ts.map +1 -1
- package/build/utils/diagnosticContext.js +15 -17
- package/build/utils/diagnosticContext.js.map +1 -1
- package/build/utils/display/composer/ColumnComposer.d.ts +1 -1
- package/build/utils/display/composer/ColumnComposer.js +1 -1
- package/build/utils/display/composer/ColumnComposer.js.map +1 -1
- package/build/utils/hardware/hardware.d.ts.map +1 -1
- package/build/utils/hardware/hardware.js +7 -3
- package/build/utils/hardware/hardware.js.map +1 -1
- package/build/utils/miniappDiagnostics.d.ts +64 -0
- package/build/utils/miniappDiagnostics.d.ts.map +1 -0
- package/build/utils/miniappDiagnostics.js +173 -0
- package/build/utils/miniappDiagnostics.js.map +1 -0
- package/build/utils/permissions/MediaLibraryPermissions.d.ts +11 -0
- package/build/utils/permissions/MediaLibraryPermissions.d.ts.map +1 -1
- package/build/utils/permissions/MediaLibraryPermissions.js +27 -4
- package/build/utils/permissions/MediaLibraryPermissions.js.map +1 -1
- package/build/utils/timers/timers.d.ts.map +1 -1
- package/build/utils/timers/timers.js +55 -18
- package/build/utils/timers/timers.js.map +1 -1
- package/package.json +66 -31
- package/src/assets/silence.wav +0 -0
- package/src/bluetooth-sdk/debug.ts +1 -0
- package/src/bluetooth-sdk/index.ts +2 -0
- package/src/bluetooth-sdk/ota-transport.ts +1 -0
- package/src/bluetooth-sdk/photo-receiver.ts +2 -0
- package/src/bluetooth-sdk/react.ts +1 -0
- package/src/bluetooth-sdk/types.ts +1 -0
- package/src/engine.ts +9 -4
- package/src/facades/dev.ts +17 -12
- package/src/facades/display.ts +1 -1
- package/src/facades/gallery.ts +1 -1
- package/src/facades/glasses.ts +20 -7
- package/src/facades/glassesSettings.ts +5 -0
- package/src/facades/miniapps.ts +7 -0
- package/src/facades/ota.ts +41 -13
- package/src/facades/pairing.ts +103 -23
- package/src/facades/permissions.ts +14 -0
- package/src/facades/phoneNotifications.ts +4 -13
- package/src/facades/speech.ts +21 -7
- package/src/generated/releaseMetadata.ts +20 -0
- package/src/index.ts +42 -13
- package/src/react/MentraLiveOtaFlow.tsx +754 -0
- package/src/react/index.ts +21 -0
- package/src/react/useEngineSnapshot.ts +16 -0
- package/src/react/useMentraLiveOta.ts +793 -0
- package/src/runtime/bootstrap.ts +33 -1
- package/src/runtime/scanQrSeam.ts +20 -0
- package/src/services/AppRegistry.ts +240 -149
- package/src/services/AudioCloudUplink.ts +23 -1
- package/src/services/AudioPlaybackService.ts +287 -38
- package/src/services/BlobStore.ts +79 -19
- package/src/services/CloudAudioSubscriptionSync.ts +13 -1
- package/src/services/CloudClientService.ts +96 -1
- package/src/services/DeviceEventRouter.ts +5 -5
- package/src/services/DisplayProcessor.ts +3 -3
- package/src/services/ForegroundLocationPermission.ts +24 -0
- package/src/services/GlassesSettingsSync.ts +9 -3
- package/src/services/GlassesStatusProjection.ts +20 -11
- package/src/services/HotspotOtaTransport.ts +185 -0
- package/src/services/HotspotShutdown.ts +41 -0
- package/src/services/LocalDisplayManager.ts +114 -24
- package/src/services/LocalMiniappRuntime.ts +967 -346
- package/src/services/LocalMiniappStorage.ts +82 -0
- package/src/services/LocalMiniappUserIdentity.ts +46 -0
- package/src/services/LocalSttFallbackCoordinator.ts +19 -12
- package/src/services/MicStateCoordinator.ts +169 -4
- package/src/services/MiniappLauncher.ts +30 -3
- package/src/services/MiniappLiveness.ts +24 -0
- package/src/services/NativeHttpResponse.ts +6 -0
- package/src/services/OtaArtifactDownloader.ts +312 -0
- package/src/services/OtaAutoChain.ts +130 -0
- package/src/services/OtaErrorMapping.ts +80 -0
- package/src/services/OtaInstallCoordinator.ts +680 -151
- package/src/services/OtaService.ts +12 -7
- package/src/services/OtaUpdateCheckService.ts +205 -27
- package/src/services/PhoneCalendarHelpers.ts +212 -0
- package/src/services/PhoneCalendarService.ts +65 -0
- package/src/services/PhoneCameraFovCoordinator.ts +210 -0
- package/src/services/PhoneNotificationsSync.ts +12 -10
- package/src/services/PhonePhotoCoordinator.ts +117 -19
- package/src/services/PhoneStreamCoordinator.ts +139 -25
- package/src/services/PhoneVideoCoordinator.ts +11 -0
- package/src/services/SceneRenderer.ts +16 -0
- package/src/services/SentenceTtsPipeline.ts +106 -0
- package/src/services/StreamLifecycleController.ts +3 -3
- package/src/services/SupportProfileSync.ts +218 -0
- package/src/services/TranscriptionRouting.ts +37 -0
- package/src/services/TtsTextSanitizer.ts +66 -0
- package/src/services/WifiAdbRequest.ts +53 -0
- package/src/services/asg/asgCameraApi.ts +615 -33
- package/src/services/asg/cameraRollExportCoordinator.ts +627 -0
- package/src/services/asg/cameraRollExportLedger.ts +122 -0
- package/src/services/asg/galleryNotices.ts +1 -0
- package/src/services/asg/galleryPathMigration.ts +22 -0
- package/src/services/asg/gallerySettingsService.ts +3 -0
- package/src/services/asg/gallerySyncService.ts +184 -73
- package/src/services/asg/galleryTransferLedger.ts +312 -0
- package/src/services/asg/localNetworkTransport.ts +170 -0
- package/src/services/asg/localStorageService.ts +179 -24
- package/src/services/asg/mediaProcessingQueue.ts +209 -62
- package/src/services/audioPlaybackAssets.ts +8 -0
- package/src/services/gallerySyncClock.ts +1 -1
- package/src/services/glassesClockSync.ts +7 -3
- package/src/services/manifestActions.ts +30 -0
- package/src/services/otaDisplayState.ts +58 -17
- package/src/services/otaInstallPolicy.ts +34 -4
- package/src/services/otaLegacyMapping.ts +1 -1
- package/src/services/otaManifestPolicy.ts +42 -0
- package/src/services/otaManifestUrl.ts +44 -0
- package/src/services/otaReleaseVersion.ts +22 -0
- package/src/services/slimStreamStatus.ts +16 -5
- package/src/stores/appVisibility.ts +3 -0
- package/src/stores/apps.ts +19 -1
- package/src/stores/bluetoothSettingKeys.ts +2 -0
- package/src/stores/core.ts +4 -4
- package/src/stores/gallerySync.ts +4 -0
- package/src/stores/glasses.ts +16 -6
- package/src/stores/settings.ts +179 -18
- package/src/types/applet.ts +3 -1
- package/src/types/asg.ts +7 -0
- package/src/types/capabilities/even-realities-g1.ts +3 -0
- package/src/types/capabilities/even-realities-g2.ts +3 -0
- package/src/types/capabilities/mentra-display.ts +3 -0
- package/src/types/capabilities/mentra-live.ts +3 -0
- package/src/types/capabilities/nimo.ts +59 -0
- package/src/types/capabilities/none.ts +3 -0
- package/src/types/capabilities/simulated-glasses.ts +3 -0
- package/src/types/capabilities/vuzix-z100.ts +3 -0
- package/src/types/enums.ts +4 -28
- package/src/types/hardware.ts +23 -14
- package/src/types/index.ts +3 -6
- package/src/utils/configuredDevHost.ts +17 -0
- package/src/utils/devMiniappLaunch.ts +151 -23
- package/src/utils/diagnosticContext.ts +17 -17
- package/src/utils/display/composer/ColumnComposer.ts +1 -1
- package/src/utils/hardware/hardware.ts +7 -9
- package/src/utils/miniappDiagnostics.ts +226 -0
- package/src/utils/permissions/MediaLibraryPermissions.ts +35 -4
- package/src/utils/timers/timers.ts +57 -21
- package/build/devtools.d.ts +0 -11
- package/build/devtools.d.ts.map +0 -1
- package/build/devtools.js +0 -13
- package/build/devtools.js.map +0 -1
- package/build/internal.d.ts +0 -66
- package/build/internal.d.ts.map +0 -1
- package/build/internal.js +0 -89
- package/build/internal.js.map +0 -1
- package/build/services/asgOtaVersionUrl.d.ts +0 -2
- package/build/services/asgOtaVersionUrl.d.ts.map +0 -1
- package/build/services/asgOtaVersionUrl.js +0 -36
- package/build/services/asgOtaVersionUrl.js.map +0 -1
- package/src/devtools.ts +0 -13
- package/src/internal.ts +0 -158
- package/src/services/asgOtaVersionUrl.ts +0 -41
|
@@ -0,0 +1,754 @@
|
|
|
1
|
+
/* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */
|
|
2
|
+
import React, {useMemo} from "react"
|
|
3
|
+
import {
|
|
4
|
+
ActivityIndicator,
|
|
5
|
+
Pressable,
|
|
6
|
+
ScrollView,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
Text,
|
|
9
|
+
View,
|
|
10
|
+
type StyleProp,
|
|
11
|
+
type ViewStyle,
|
|
12
|
+
} from "react-native"
|
|
13
|
+
import {useMarkdown, type MarkedStyles, type useMarkdownHookOptions} from "react-native-marked"
|
|
14
|
+
import {SafeAreaView} from "react-native-safe-area-context"
|
|
15
|
+
import Svg, {Path, Rect} from "react-native-svg"
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
MINIMUM_OTA_BATTERY_LEVEL,
|
|
19
|
+
useMentraLiveOta,
|
|
20
|
+
type MentraLiveOtaController,
|
|
21
|
+
type MentraLiveOtaFlowPage,
|
|
22
|
+
} from "./useMentraLiveOta"
|
|
23
|
+
|
|
24
|
+
export type {MentraLiveOtaFlowPage} from "./useMentraLiveOta"
|
|
25
|
+
|
|
26
|
+
export type MentraLiveOtaFlowTheme = {
|
|
27
|
+
background: string
|
|
28
|
+
border: string
|
|
29
|
+
error: string
|
|
30
|
+
foreground: string
|
|
31
|
+
primary: string
|
|
32
|
+
primaryText: string
|
|
33
|
+
textDim: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type MentraLiveOtaFlowTranslate = (key: string, options?: Record<string, string>) => string
|
|
37
|
+
|
|
38
|
+
export type MentraLiveOtaFlowProps = {
|
|
39
|
+
/** Display name used in update copy. */
|
|
40
|
+
deviceName?: string
|
|
41
|
+
/** Entry page. `progress` exists for recovery/deep-link compatibility. */
|
|
42
|
+
initialPage?: MentraLiveOtaFlowPage
|
|
43
|
+
/** Start the OTA-only projections. Full Engine hosts should pass false. */
|
|
44
|
+
initializeRuntime?: boolean
|
|
45
|
+
/** Called after the final check or when the user leaves an optional update. */
|
|
46
|
+
onFinished: () => void
|
|
47
|
+
/** Host-owned Wi-Fi setup for glasses that do not support hotspot OTA. */
|
|
48
|
+
onOpenWifiSetup: () => void
|
|
49
|
+
/** Lets a host coordinate its global connection overlay with OTA progress and firmware restarts. */
|
|
50
|
+
onFirmwareRestartingChange?: (restarting: boolean, progressActive: boolean) => void
|
|
51
|
+
/** Enables the existing developer-only escape hatches. */
|
|
52
|
+
allowDevSkip?: boolean
|
|
53
|
+
/** Enables the existing super-mode interrupted-session escape hatch. */
|
|
54
|
+
superMode?: boolean
|
|
55
|
+
/** Optional host localization. Defaults to the Mentra App English OTA copy. */
|
|
56
|
+
translate?: MentraLiveOtaFlowTranslate
|
|
57
|
+
/** Optional host theme. Both hosts use the same layout and state machine. */
|
|
58
|
+
theme?: Partial<MentraLiveOtaFlowTheme>
|
|
59
|
+
style?: StyleProp<ViewStyle>
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const DEFAULT_THEME: MentraLiveOtaFlowTheme = {
|
|
63
|
+
background: "#FFFFFF",
|
|
64
|
+
border: "#D7DFDA",
|
|
65
|
+
error: "#C43131",
|
|
66
|
+
foreground: "#0E2C1A",
|
|
67
|
+
primary: "#00B869",
|
|
68
|
+
primaryText: "#FFFFFF",
|
|
69
|
+
textDim: "#66736B",
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const ENGLISH_COPY: Record<string, string> = {
|
|
73
|
+
"common:continue": "Continue",
|
|
74
|
+
"common:done": "Done",
|
|
75
|
+
"ota:checkingForUpdates": "Checking for updates",
|
|
76
|
+
"ota:checkingForUpdatesMessage":
|
|
77
|
+
"Connected devices will perform automatic updates. Automatic updates can be disabled in Device Settings",
|
|
78
|
+
"ota:finishingUpdate": "Finishing your update",
|
|
79
|
+
"ota:checkingAdditionalUpdates": "Checking whether your glasses need any additional updates.",
|
|
80
|
+
"ota:updateAvailable": "{{deviceName}} Update Available",
|
|
81
|
+
"ota:batteryRequiredTitle": "Charge {{deviceName}} to Update",
|
|
82
|
+
"ota:batteryRequiredMessage":
|
|
83
|
+
"{{deviceName}} is currently at {{batteryLevel}}%. Charge it to at least {{minimumBatteryLevel}}% before updating.",
|
|
84
|
+
"ota:batteryRequiredLiveUpdate": "This screen will update automatically as the battery charges.",
|
|
85
|
+
"ota:updateConnectWifi": "Connect your {{deviceName}} to WiFi to install the update.",
|
|
86
|
+
"ota:wifiRequiredTitle": "WiFi Needed for Update",
|
|
87
|
+
"ota:updateDescription":
|
|
88
|
+
"A new update is available for your glasses. We recommend updating now for the best experience.",
|
|
89
|
+
"ota:updateSequenceMessage":
|
|
90
|
+
"Your glasses may install more than one update and restart several times. Keep them nearby until finished.",
|
|
91
|
+
"ota:releaseTransition": "{{fromVersion}} → {{toVersion}}",
|
|
92
|
+
"ota:releaseTransitionUnknown": "Current version unknown → {{toVersion}}",
|
|
93
|
+
"ota:updatedToVersion": "Updated to {{version}}",
|
|
94
|
+
"ota:downgradeAvailable": "{{deviceName}} Version Change Required",
|
|
95
|
+
"ota:downgradeDescription":
|
|
96
|
+
"This app requires an earlier glasses software version. Your photos and videos will be preserved, but glasses settings will be reset and restored automatically after the change.",
|
|
97
|
+
"ota:updateNow": "Update Now",
|
|
98
|
+
"ota:setupWifi": "Setup WiFi",
|
|
99
|
+
"ota:updateLater": "Later",
|
|
100
|
+
"ota:updateComplete": "Update complete",
|
|
101
|
+
"ota:whatsNew": "What's new",
|
|
102
|
+
"ota:upToDate": "Up To Date",
|
|
103
|
+
"ota:devBuild": "Development Build",
|
|
104
|
+
"ota:devBuildNoOta":
|
|
105
|
+
"This mobile app is a development build, so automatic glasses updates are disabled. Use the developer settings manifest override to update them manually.",
|
|
106
|
+
"ota:noUpdatesAvailable": "Your glasses are running the latest version.",
|
|
107
|
+
"ota:checkFailed": "Check Failed",
|
|
108
|
+
"ota:checkFailedMessage": "Couldn't check for updates. Please check your connection and try again.",
|
|
109
|
+
"ota:updateInfoUnavailable": "Update Info Unavailable",
|
|
110
|
+
"ota:updateInfoUnavailableMessage":
|
|
111
|
+
"Update information for this version of the app is unavailable. Please check the app store for a newer version of the Mentra App.",
|
|
112
|
+
"ota:downgradeDuration": "Your glasses will restart twice — this may take up to 2 minutes.",
|
|
113
|
+
"ota:versionChangeRestarting": "Installing a different version…",
|
|
114
|
+
"ota:versionChangeVerifying": "Verifying your glasses…",
|
|
115
|
+
"ota:versionChangeKeepNearby": "Keep your glasses nearby and connected. They will restart on their own.",
|
|
116
|
+
"ota:restartingGlasses": "Restarting {{deviceName}}…",
|
|
117
|
+
"ota:restartingGlassesMessage":
|
|
118
|
+
"The update is installed. Keep your glasses nearby and leave this screen open while they finish starting.",
|
|
119
|
+
"ota:restartingGlassesAutomatic": "We'll continue automatically when they're ready.",
|
|
120
|
+
"ota:versionChangeComplete": "Version Change Complete",
|
|
121
|
+
"ota:versionChangeCompleteMessage":
|
|
122
|
+
"Your glasses are now on the required version. Their settings were reset and are being restored automatically.",
|
|
123
|
+
"ota:versionChangeFirmwarePassComplete": "Firmware updated",
|
|
124
|
+
"ota:versionChangeFirmwarePassCompleteMessage":
|
|
125
|
+
"Your glasses restarted with new firmware. One more step: they'll now continue to the required version.",
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function defaultTranslate(key: string, options?: Record<string, string>): string {
|
|
129
|
+
let value = ENGLISH_COPY[key] ?? key
|
|
130
|
+
for (const [name, replacement] of Object.entries(options ?? {})) {
|
|
131
|
+
value = value.replaceAll(`{{${name}}}`, replacement)
|
|
132
|
+
}
|
|
133
|
+
return value
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function MentraLiveOtaFlow({
|
|
137
|
+
allowDevSkip = typeof __DEV__ !== "undefined" && __DEV__,
|
|
138
|
+
deviceName = "Mentra Live",
|
|
139
|
+
initialPage = "check",
|
|
140
|
+
initializeRuntime = true,
|
|
141
|
+
onFinished,
|
|
142
|
+
onFirmwareRestartingChange,
|
|
143
|
+
onOpenWifiSetup,
|
|
144
|
+
style,
|
|
145
|
+
superMode = false,
|
|
146
|
+
theme,
|
|
147
|
+
translate = defaultTranslate,
|
|
148
|
+
}: MentraLiveOtaFlowProps) {
|
|
149
|
+
const colors = useMemo(() => ({...DEFAULT_THEME, ...theme}), [theme])
|
|
150
|
+
const controller = useMentraLiveOta({
|
|
151
|
+
initialPage,
|
|
152
|
+
initializeRuntime,
|
|
153
|
+
onFinished,
|
|
154
|
+
onFirmwareRestartingChange,
|
|
155
|
+
onOpenWifiSetup,
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<SafeAreaView style={[styles.safeArea, {backgroundColor: colors.background}, style]}>
|
|
160
|
+
<View style={styles.header}>
|
|
161
|
+
<View />
|
|
162
|
+
<MentraMark color={colors.primary} />
|
|
163
|
+
</View>
|
|
164
|
+
<OtaFlowContent
|
|
165
|
+
allowDevSkip={allowDevSkip}
|
|
166
|
+
colors={colors}
|
|
167
|
+
controller={controller}
|
|
168
|
+
deviceName={deviceName}
|
|
169
|
+
superMode={superMode}
|
|
170
|
+
translate={translate}
|
|
171
|
+
/>
|
|
172
|
+
</SafeAreaView>
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function OtaFlowContent({
|
|
177
|
+
allowDevSkip,
|
|
178
|
+
colors,
|
|
179
|
+
controller,
|
|
180
|
+
deviceName,
|
|
181
|
+
superMode,
|
|
182
|
+
translate,
|
|
183
|
+
}: {
|
|
184
|
+
allowDevSkip: boolean
|
|
185
|
+
colors: MentraLiveOtaFlowTheme
|
|
186
|
+
controller: MentraLiveOtaController
|
|
187
|
+
deviceName: string
|
|
188
|
+
superMode: boolean
|
|
189
|
+
translate: MentraLiveOtaFlowTranslate
|
|
190
|
+
}) {
|
|
191
|
+
const {state} = controller
|
|
192
|
+
|
|
193
|
+
if (state.screen === "initializing") {
|
|
194
|
+
return (
|
|
195
|
+
<FlowPage colors={colors} icon="download" title={translate("ota:checkingForUpdates")}>
|
|
196
|
+
<ActivityIndicator size="large" color={colors.foreground} />
|
|
197
|
+
</FlowPage>
|
|
198
|
+
)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
if (state.screen === "checking") {
|
|
202
|
+
return (
|
|
203
|
+
<FlowPage colors={colors} icon="download" title={translate("ota:checkingForUpdates")}>
|
|
204
|
+
<BodyText colors={colors}>{translate("ota:checkingForUpdatesMessage")}</BodyText>
|
|
205
|
+
<ActivityIndicator size="large" color={colors.foreground} />
|
|
206
|
+
</FlowPage>
|
|
207
|
+
)
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (state.screen === "battery_required") {
|
|
211
|
+
return (
|
|
212
|
+
<FlowPage
|
|
213
|
+
actions={
|
|
214
|
+
<>
|
|
215
|
+
<FlowButton colors={colors} disabled label={translate("ota:updateNow")} onPress={controller.install} />
|
|
216
|
+
{state.canDismiss ? (
|
|
217
|
+
<FlowButton colors={colors} label={translate("ota:updateLater")} onPress={controller.finish} secondary />
|
|
218
|
+
) : null}
|
|
219
|
+
</>
|
|
220
|
+
}
|
|
221
|
+
colors={colors}
|
|
222
|
+
icon="alert"
|
|
223
|
+
title={translate("ota:batteryRequiredTitle", {deviceName})}>
|
|
224
|
+
<BodyText colors={colors}>
|
|
225
|
+
{translate("ota:batteryRequiredMessage", {
|
|
226
|
+
batteryLevel: String(state.batteryLevel),
|
|
227
|
+
deviceName,
|
|
228
|
+
minimumBatteryLevel: String(MINIMUM_OTA_BATTERY_LEVEL),
|
|
229
|
+
})}
|
|
230
|
+
</BodyText>
|
|
231
|
+
<BodyText colors={colors}>{translate("ota:batteryRequiredLiveUpdate")}</BodyText>
|
|
232
|
+
</FlowPage>
|
|
233
|
+
)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (state.screen === "finishing") {
|
|
237
|
+
return (
|
|
238
|
+
<FlowPage colors={colors} icon="download" title={translate("ota:finishingUpdate")}>
|
|
239
|
+
<BodyText colors={colors}>{translate("ota:checkingAdditionalUpdates")}</BodyText>
|
|
240
|
+
<ActivityIndicator size="large" color={colors.foreground} />
|
|
241
|
+
</FlowPage>
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (state.screen === "update_available" || state.screen === "wifi_required") {
|
|
246
|
+
const titleKey =
|
|
247
|
+
state.screen === "wifi_required"
|
|
248
|
+
? "ota:wifiRequiredTitle"
|
|
249
|
+
: state.versionChange
|
|
250
|
+
? "ota:downgradeAvailable"
|
|
251
|
+
: "ota:updateAvailable"
|
|
252
|
+
return (
|
|
253
|
+
<FlowPage
|
|
254
|
+
colors={colors}
|
|
255
|
+
icon="download"
|
|
256
|
+
title={translate(titleKey, {deviceName})}
|
|
257
|
+
actions={
|
|
258
|
+
<>
|
|
259
|
+
<FlowButton
|
|
260
|
+
colors={colors}
|
|
261
|
+
disabled={!state.wifiStatusKnown}
|
|
262
|
+
label={translate(state.screen === "wifi_required" ? "ota:setupWifi" : "ota:updateNow")}
|
|
263
|
+
onPress={state.screen === "wifi_required" ? controller.openWifiSetup : controller.install}
|
|
264
|
+
/>
|
|
265
|
+
{state.canDismiss ? (
|
|
266
|
+
<FlowButton colors={colors} label={translate("ota:updateLater")} onPress={controller.finish} secondary />
|
|
267
|
+
) : null}
|
|
268
|
+
{allowDevSkip && state.updateRequired ? (
|
|
269
|
+
<FlowButton colors={colors} label="Skip (dev only)" onPress={controller.finish} secondary />
|
|
270
|
+
) : null}
|
|
271
|
+
</>
|
|
272
|
+
}>
|
|
273
|
+
{state.releaseTransition ? (
|
|
274
|
+
<BodyText colors={colors}>
|
|
275
|
+
{state.releaseTransition.fromVersion
|
|
276
|
+
? translate("ota:releaseTransition", {
|
|
277
|
+
fromVersion: state.releaseTransition.fromVersion,
|
|
278
|
+
toVersion: state.releaseTransition.toVersion,
|
|
279
|
+
})
|
|
280
|
+
: translate("ota:releaseTransitionUnknown", {toVersion: state.releaseTransition.toVersion})}
|
|
281
|
+
</BodyText>
|
|
282
|
+
) : null}
|
|
283
|
+
<BodyText colors={colors}>
|
|
284
|
+
{state.screen === "wifi_required"
|
|
285
|
+
? translate("ota:updateConnectWifi", {deviceName})
|
|
286
|
+
: translate(state.versionChange ? "ota:downgradeDescription" : "ota:updateDescription")}
|
|
287
|
+
</BodyText>
|
|
288
|
+
<BodyText colors={colors}>{translate("ota:updateSequenceMessage")}</BodyText>
|
|
289
|
+
</FlowPage>
|
|
290
|
+
)
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
if (state.screen === "dev_build") {
|
|
294
|
+
return (
|
|
295
|
+
<FlowPage
|
|
296
|
+
actions={<FlowButton colors={colors} label={translate("common:continue")} onPress={controller.finish} />}
|
|
297
|
+
colors={colors}
|
|
298
|
+
icon="settings"
|
|
299
|
+
title={translate("ota:devBuild")}>
|
|
300
|
+
<BodyText colors={colors}>{translate("ota:devBuildNoOta")}</BodyText>
|
|
301
|
+
</FlowPage>
|
|
302
|
+
)
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (state.screen === "up_to_date") {
|
|
306
|
+
return (
|
|
307
|
+
<FlowPage
|
|
308
|
+
actions={
|
|
309
|
+
<FlowButton
|
|
310
|
+
colors={colors}
|
|
311
|
+
label={translate(state.completedUpdate ? "common:done" : "common:continue")}
|
|
312
|
+
onPress={controller.finish}
|
|
313
|
+
/>
|
|
314
|
+
}
|
|
315
|
+
colors={colors}
|
|
316
|
+
contentAlignment={state.changelogs.length > 0 ? "top" : "center"}
|
|
317
|
+
icon="check"
|
|
318
|
+
title={translate(state.completedUpdate ? "ota:updateComplete" : "ota:upToDate")}>
|
|
319
|
+
<BodyText colors={colors}>{translate("ota:noUpdatesAvailable")}</BodyText>
|
|
320
|
+
{state.releaseTransition ? (
|
|
321
|
+
<BodyText colors={colors}>
|
|
322
|
+
{translate("ota:updatedToVersion", {version: state.releaseTransition.toVersion})}
|
|
323
|
+
</BodyText>
|
|
324
|
+
) : null}
|
|
325
|
+
<ChangelogList changelogs={state.changelogs} colors={colors} title={translate("ota:whatsNew")} />
|
|
326
|
+
</FlowPage>
|
|
327
|
+
)
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (state.screen === "update_info_unavailable") {
|
|
331
|
+
return (
|
|
332
|
+
<FlowPage
|
|
333
|
+
actions={<FlowButton colors={colors} label={translate("common:continue")} onPress={controller.finish} />}
|
|
334
|
+
colors={colors}
|
|
335
|
+
icon="alert"
|
|
336
|
+
title={translate("ota:updateInfoUnavailable")}>
|
|
337
|
+
<BodyText colors={colors}>{translate("ota:updateInfoUnavailableMessage")}</BodyText>
|
|
338
|
+
</FlowPage>
|
|
339
|
+
)
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if (state.screen === "check_failed") {
|
|
343
|
+
return (
|
|
344
|
+
<FlowPage
|
|
345
|
+
actions={
|
|
346
|
+
<>
|
|
347
|
+
<FlowButton colors={colors} label="Retry" onPress={controller.retryCheck} />
|
|
348
|
+
{allowDevSkip ? (
|
|
349
|
+
<FlowButton colors={colors} label="Skip (dev only)" onPress={controller.finish} secondary />
|
|
350
|
+
) : null}
|
|
351
|
+
</>
|
|
352
|
+
}
|
|
353
|
+
colors={colors}
|
|
354
|
+
icon="alert"
|
|
355
|
+
title={translate("ota:checkFailed")}>
|
|
356
|
+
<BodyText colors={colors}>{translate("ota:checkFailedMessage")}</BodyText>
|
|
357
|
+
</FlowPage>
|
|
358
|
+
)
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (state.versionChangePhase === "restarting" || state.versionChangePhase === "verifying") {
|
|
362
|
+
return (
|
|
363
|
+
<FlowPage
|
|
364
|
+
colors={colors}
|
|
365
|
+
icon="download"
|
|
366
|
+
title={translate(
|
|
367
|
+
state.versionChangePhase === "verifying" ? "ota:versionChangeVerifying" : "ota:versionChangeRestarting",
|
|
368
|
+
)}>
|
|
369
|
+
<ActivityIndicator size="large" color={colors.foreground} />
|
|
370
|
+
<BodyText colors={colors}>{translate("ota:versionChangeKeepNearby")}</BodyText>
|
|
371
|
+
<BodyText colors={colors}>{translate("ota:downgradeDuration")}</BodyText>
|
|
372
|
+
</FlowPage>
|
|
373
|
+
)
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if (state.screen === "starting" || state.screen === "preparing_hotspot") {
|
|
377
|
+
const title =
|
|
378
|
+
state.hotspotPhase === "downloading"
|
|
379
|
+
? "Downloading update to phone..."
|
|
380
|
+
: state.hotspotPhase === "starting_hotspot"
|
|
381
|
+
? "Starting glasses hotspot..."
|
|
382
|
+
: state.hotspotPhase === "joining_hotspot"
|
|
383
|
+
? "Connecting phone to glasses..."
|
|
384
|
+
: "Starting update..."
|
|
385
|
+
return (
|
|
386
|
+
<FlowPage colors={colors} icon="download" title={title}>
|
|
387
|
+
{state.hotspotPhase === "downloading" && state.hotspotArtifactPercent !== null ? (
|
|
388
|
+
<PercentText colors={colors} percent={state.hotspotArtifactPercent} />
|
|
389
|
+
) : null}
|
|
390
|
+
<ActivityIndicator size="large" color={colors.foreground} />
|
|
391
|
+
<BodyText colors={colors}>Do not disconnect your glasses</BodyText>
|
|
392
|
+
</FlowPage>
|
|
393
|
+
)
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
if (state.screen === "updating") {
|
|
397
|
+
return (
|
|
398
|
+
<FlowPage colors={colors} icon="download" title={state.phase === "download" ? "Downloading..." : "Installing..."}>
|
|
399
|
+
{state.installingApkOnly ? (
|
|
400
|
+
<ActivityIndicator size="large" color={colors.foreground} />
|
|
401
|
+
) : (
|
|
402
|
+
<>
|
|
403
|
+
<PercentText colors={colors} percent={state.progress ?? 0} />
|
|
404
|
+
<View style={[styles.progressTrack, {backgroundColor: colors.border}]}>
|
|
405
|
+
<View
|
|
406
|
+
style={[styles.progressFill, {backgroundColor: colors.primary, width: `${state.progress ?? 0}%`}]}
|
|
407
|
+
/>
|
|
408
|
+
</View>
|
|
409
|
+
</>
|
|
410
|
+
)}
|
|
411
|
+
<BodyText colors={colors}>Do not disconnect your glasses</BodyText>
|
|
412
|
+
{state.versionChange && state.phase === "install" ? (
|
|
413
|
+
<BodyText colors={colors}>{translate("ota:downgradeDuration")}</BodyText>
|
|
414
|
+
) : null}
|
|
415
|
+
</FlowPage>
|
|
416
|
+
)
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
if (state.screen === "restarting") {
|
|
420
|
+
return (
|
|
421
|
+
<FlowPage colors={colors} icon="download" title={translate("ota:restartingGlasses", {deviceName})}>
|
|
422
|
+
<ActivityIndicator size="large" color={colors.foreground} />
|
|
423
|
+
<BodyText colors={colors}>{translate("ota:restartingGlassesMessage")}</BodyText>
|
|
424
|
+
<BodyText colors={colors}>{translate("ota:restartingGlassesAutomatic")}</BodyText>
|
|
425
|
+
</FlowPage>
|
|
426
|
+
)
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if (state.screen === "complete") {
|
|
430
|
+
const title = state.versionChangeConverged
|
|
431
|
+
? translate("ota:versionChangeComplete")
|
|
432
|
+
: state.versionChange
|
|
433
|
+
? translate("ota:versionChangeFirmwarePassComplete")
|
|
434
|
+
: "Update complete!"
|
|
435
|
+
const message = state.versionChangeConverged
|
|
436
|
+
? translate("ota:versionChangeCompleteMessage")
|
|
437
|
+
: state.versionChange
|
|
438
|
+
? translate("ota:versionChangeFirmwarePassCompleteMessage")
|
|
439
|
+
: "Your glasses are up to date."
|
|
440
|
+
return (
|
|
441
|
+
<FlowPage
|
|
442
|
+
actions={
|
|
443
|
+
<FlowButton
|
|
444
|
+
colors={colors}
|
|
445
|
+
label={state.versionChange && !state.versionChangeConverged ? "Continue" : "Done"}
|
|
446
|
+
onPress={controller.finish}
|
|
447
|
+
/>
|
|
448
|
+
}
|
|
449
|
+
colors={colors}
|
|
450
|
+
contentAlignment={state.changelogs.length > 0 ? "top" : "center"}
|
|
451
|
+
icon="check"
|
|
452
|
+
title={title}>
|
|
453
|
+
<BodyText colors={colors}>{message}</BodyText>
|
|
454
|
+
{state.releaseTransition ? (
|
|
455
|
+
<BodyText colors={colors}>
|
|
456
|
+
{translate("ota:updatedToVersion", {version: state.releaseTransition.toVersion})}
|
|
457
|
+
</BodyText>
|
|
458
|
+
) : null}
|
|
459
|
+
<ChangelogList changelogs={state.changelogs} colors={colors} title={translate("ota:whatsNew")} />
|
|
460
|
+
</FlowPage>
|
|
461
|
+
)
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
if (state.screen === "failed") {
|
|
465
|
+
return (
|
|
466
|
+
<FlowPage
|
|
467
|
+
actions={
|
|
468
|
+
<>
|
|
469
|
+
<FlowButton
|
|
470
|
+
colors={colors}
|
|
471
|
+
label={state.canRetry ? "Retry" : "Done"}
|
|
472
|
+
onPress={state.canRetry ? controller.retryInstall : controller.finish}
|
|
473
|
+
/>
|
|
474
|
+
{state.canOpenWifiSetup ? (
|
|
475
|
+
<FlowButton colors={colors} label="Change WiFi" onPress={controller.openWifiSetup} secondary />
|
|
476
|
+
) : null}
|
|
477
|
+
</>
|
|
478
|
+
}
|
|
479
|
+
colors={colors}
|
|
480
|
+
icon="alert"
|
|
481
|
+
title="Update Failed">
|
|
482
|
+
<BodyText colors={colors}>{state.error?.message}</BodyText>
|
|
483
|
+
</FlowPage>
|
|
484
|
+
)
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
return (
|
|
488
|
+
<FlowPage
|
|
489
|
+
actions={
|
|
490
|
+
superMode ? (
|
|
491
|
+
<FlowButton colors={colors} label="Skip (super)" onPress={controller.discard} secondary />
|
|
492
|
+
) : undefined
|
|
493
|
+
}
|
|
494
|
+
colors={colors}
|
|
495
|
+
icon="bluetooth"
|
|
496
|
+
title="Glasses disconnected">
|
|
497
|
+
<BodyText colors={colors}>Reconnecting...</BodyText>
|
|
498
|
+
<ActivityIndicator size="large" color={colors.foreground} />
|
|
499
|
+
</FlowPage>
|
|
500
|
+
)
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
type FlowPageProps = {
|
|
504
|
+
actions?: React.ReactNode
|
|
505
|
+
children?: React.ReactNode
|
|
506
|
+
colors: MentraLiveOtaFlowTheme
|
|
507
|
+
contentAlignment?: "center" | "top"
|
|
508
|
+
icon: "alert" | "bluetooth" | "check" | "download" | "settings"
|
|
509
|
+
title: string
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
function FlowPage({actions, children, colors, contentAlignment = "center", icon, title}: FlowPageProps) {
|
|
513
|
+
return (
|
|
514
|
+
<View style={styles.page} testID="mentra-live-ota-flow">
|
|
515
|
+
<View style={[styles.centerContent, contentAlignment === "top" && styles.topContent]}>
|
|
516
|
+
<FlowIcon colors={colors} name={icon} />
|
|
517
|
+
<Text style={[styles.title, {color: colors.foreground}]}>{title}</Text>
|
|
518
|
+
{children}
|
|
519
|
+
</View>
|
|
520
|
+
{actions ? <View style={styles.actions}>{actions}</View> : <View style={styles.actionSpacer} />}
|
|
521
|
+
</View>
|
|
522
|
+
)
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
function BodyText({children, colors}: {children: React.ReactNode; colors: MentraLiveOtaFlowTheme}) {
|
|
526
|
+
return <Text style={[styles.body, {color: colors.textDim}]}>{children}</Text>
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
function PercentText({colors, percent}: {colors: MentraLiveOtaFlowTheme; percent: number}) {
|
|
530
|
+
return <Text style={[styles.percent, {color: colors.primary}]}>{Math.round(percent)}%</Text>
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
function ChangelogMarkdown({colors, markdown}: {colors: MentraLiveOtaFlowTheme; markdown: string}) {
|
|
534
|
+
const markdownStyles = useMemo<MarkedStyles>(
|
|
535
|
+
() => ({
|
|
536
|
+
blockquote: {
|
|
537
|
+
borderLeftColor: colors.primary,
|
|
538
|
+
borderLeftWidth: 3,
|
|
539
|
+
marginVertical: 2,
|
|
540
|
+
opacity: 1,
|
|
541
|
+
paddingLeft: 12,
|
|
542
|
+
},
|
|
543
|
+
code: {
|
|
544
|
+
backgroundColor: colors.background,
|
|
545
|
+
borderColor: colors.border,
|
|
546
|
+
borderRadius: 8,
|
|
547
|
+
borderWidth: 1,
|
|
548
|
+
padding: 12,
|
|
549
|
+
},
|
|
550
|
+
codespan: {
|
|
551
|
+
backgroundColor: colors.border,
|
|
552
|
+
color: colors.foreground,
|
|
553
|
+
fontFamily: "monospace",
|
|
554
|
+
fontSize: 13,
|
|
555
|
+
fontStyle: "normal",
|
|
556
|
+
fontWeight: "400",
|
|
557
|
+
},
|
|
558
|
+
em: {color: colors.textDim, fontSize: 14, lineHeight: 20},
|
|
559
|
+
h1: {
|
|
560
|
+
borderBottomWidth: 0,
|
|
561
|
+
color: colors.foreground,
|
|
562
|
+
fontSize: 18,
|
|
563
|
+
fontWeight: "700",
|
|
564
|
+
lineHeight: 24,
|
|
565
|
+
marginVertical: 0,
|
|
566
|
+
paddingBottom: 0,
|
|
567
|
+
},
|
|
568
|
+
h2: {
|
|
569
|
+
borderBottomWidth: 0,
|
|
570
|
+
color: colors.foreground,
|
|
571
|
+
fontSize: 17,
|
|
572
|
+
fontWeight: "700",
|
|
573
|
+
lineHeight: 23,
|
|
574
|
+
marginVertical: 0,
|
|
575
|
+
paddingBottom: 0,
|
|
576
|
+
},
|
|
577
|
+
h3: {color: colors.foreground, fontSize: 16, fontWeight: "700", lineHeight: 22, marginVertical: 0},
|
|
578
|
+
h4: {color: colors.foreground, fontSize: 15, fontWeight: "700", lineHeight: 21, marginVertical: 0},
|
|
579
|
+
h5: {color: colors.foreground, fontSize: 14, fontWeight: "700", lineHeight: 20, marginVertical: 0},
|
|
580
|
+
h6: {color: colors.textDim, fontSize: 14, fontWeight: "600", lineHeight: 20, marginVertical: 0},
|
|
581
|
+
hr: {borderBottomColor: colors.border, marginVertical: 2},
|
|
582
|
+
image: {borderRadius: 8},
|
|
583
|
+
li: {color: colors.textDim, fontSize: 14, lineHeight: 20},
|
|
584
|
+
link: {
|
|
585
|
+
color: colors.primary,
|
|
586
|
+
fontSize: 14,
|
|
587
|
+
fontStyle: "normal",
|
|
588
|
+
lineHeight: 20,
|
|
589
|
+
textDecorationLine: "underline",
|
|
590
|
+
},
|
|
591
|
+
paragraph: {paddingVertical: 0},
|
|
592
|
+
strikethrough: {color: colors.textDim, fontSize: 14, lineHeight: 20},
|
|
593
|
+
strong: {color: colors.foreground, fontSize: 14, fontWeight: "700", lineHeight: 20},
|
|
594
|
+
table: {borderColor: colors.border, borderRadius: 8},
|
|
595
|
+
tableCell: {padding: 8},
|
|
596
|
+
text: {color: colors.textDim, fontSize: 14, lineHeight: 20},
|
|
597
|
+
}),
|
|
598
|
+
[colors],
|
|
599
|
+
)
|
|
600
|
+
const markdownTheme = useMemo<NonNullable<useMarkdownHookOptions["theme"]>>(
|
|
601
|
+
() => ({
|
|
602
|
+
colors: {
|
|
603
|
+
background: colors.background,
|
|
604
|
+
border: colors.border,
|
|
605
|
+
code: colors.border,
|
|
606
|
+
link: colors.primary,
|
|
607
|
+
text: colors.textDim,
|
|
608
|
+
},
|
|
609
|
+
}),
|
|
610
|
+
[colors],
|
|
611
|
+
)
|
|
612
|
+
const elements = useMarkdown(markdown, {colorScheme: "light", styles: markdownStyles, theme: markdownTheme})
|
|
613
|
+
|
|
614
|
+
return (
|
|
615
|
+
<View style={styles.changelogMarkdownContent} testID="ota-changelog-markdown">
|
|
616
|
+
{elements}
|
|
617
|
+
</View>
|
|
618
|
+
)
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export function ChangelogList({
|
|
622
|
+
changelogs,
|
|
623
|
+
colors,
|
|
624
|
+
title,
|
|
625
|
+
}: {
|
|
626
|
+
changelogs: MentraLiveOtaController["state"]["changelogs"]
|
|
627
|
+
colors: MentraLiveOtaFlowTheme
|
|
628
|
+
title: string
|
|
629
|
+
}) {
|
|
630
|
+
if (changelogs.length === 0) return null
|
|
631
|
+
return (
|
|
632
|
+
<View style={[styles.changelogCard, {borderColor: colors.border}]} testID="ota-changelog-card">
|
|
633
|
+
<Text style={[styles.changelogTitle, {color: colors.foreground}]}>{title}</Text>
|
|
634
|
+
<ScrollView
|
|
635
|
+
contentContainerStyle={styles.changelogContent}
|
|
636
|
+
nestedScrollEnabled
|
|
637
|
+
showsVerticalScrollIndicator
|
|
638
|
+
style={styles.changelogList}
|
|
639
|
+
testID="ota-changelog-scroll">
|
|
640
|
+
{changelogs.map((entry, index) => (
|
|
641
|
+
<View
|
|
642
|
+
key={entry.version}
|
|
643
|
+
style={[
|
|
644
|
+
styles.changelogEntry,
|
|
645
|
+
index > 0 && styles.changelogEntryDivider,
|
|
646
|
+
index > 0 && {borderTopColor: colors.border},
|
|
647
|
+
]}>
|
|
648
|
+
<Text selectable style={[styles.changelogVersion, {color: colors.foreground}]}>
|
|
649
|
+
{entry.version}
|
|
650
|
+
</Text>
|
|
651
|
+
<ChangelogMarkdown colors={colors} markdown={entry.markdown} />
|
|
652
|
+
</View>
|
|
653
|
+
))}
|
|
654
|
+
</ScrollView>
|
|
655
|
+
</View>
|
|
656
|
+
)
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
function FlowButton({
|
|
660
|
+
colors,
|
|
661
|
+
disabled = false,
|
|
662
|
+
label,
|
|
663
|
+
onPress,
|
|
664
|
+
secondary = false,
|
|
665
|
+
}: {
|
|
666
|
+
colors: MentraLiveOtaFlowTheme
|
|
667
|
+
disabled?: boolean
|
|
668
|
+
label: string
|
|
669
|
+
onPress: () => void
|
|
670
|
+
secondary?: boolean
|
|
671
|
+
}) {
|
|
672
|
+
return (
|
|
673
|
+
<Pressable
|
|
674
|
+
accessibilityRole="button"
|
|
675
|
+
disabled={disabled}
|
|
676
|
+
onPress={onPress}
|
|
677
|
+
style={({pressed}) => [
|
|
678
|
+
styles.button,
|
|
679
|
+
{
|
|
680
|
+
backgroundColor: secondary ? colors.background : colors.foreground,
|
|
681
|
+
borderColor: secondary ? colors.border : colors.foreground,
|
|
682
|
+
opacity: disabled ? 0.45 : pressed ? 0.75 : 1,
|
|
683
|
+
},
|
|
684
|
+
]}
|
|
685
|
+
testID={`button-${label}`}>
|
|
686
|
+
<Text style={[styles.buttonText, {color: secondary ? colors.foreground : colors.background}]}>{label}</Text>
|
|
687
|
+
</Pressable>
|
|
688
|
+
)
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
function MentraMark({color}: {color: string}) {
|
|
692
|
+
return (
|
|
693
|
+
<Svg width={33} height={18} viewBox="0 0 50 27" fill="none">
|
|
694
|
+
<Rect y={14.8072} width={11.8457} height={11.8457} fill={color} />
|
|
695
|
+
<Path d="M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z" fill={color} />
|
|
696
|
+
<Path d="M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z" fill={color} />
|
|
697
|
+
</Svg>
|
|
698
|
+
)
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
function FlowIcon({colors, name}: {colors: MentraLiveOtaFlowTheme; name: FlowPageProps["icon"]}) {
|
|
702
|
+
const color = name === "alert" || name === "bluetooth" ? colors.error : colors.primary
|
|
703
|
+
const glyph =
|
|
704
|
+
name === "check" ? "✓" : name === "alert" ? "!" : name === "settings" ? "⚙" : name === "bluetooth" ? "⌁" : "↓"
|
|
705
|
+
return <Text style={[styles.icon, {color}]}>{glyph}</Text>
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
const styles = StyleSheet.create({
|
|
709
|
+
safeArea: {flex: 1},
|
|
710
|
+
header: {
|
|
711
|
+
alignItems: "center",
|
|
712
|
+
flexDirection: "row",
|
|
713
|
+
height: 48,
|
|
714
|
+
justifyContent: "space-between",
|
|
715
|
+
paddingHorizontal: 20,
|
|
716
|
+
},
|
|
717
|
+
page: {flex: 1, paddingBottom: 24, paddingHorizontal: 24},
|
|
718
|
+
centerContent: {alignItems: "center", flex: 1, gap: 16, justifyContent: "center"},
|
|
719
|
+
topContent: {justifyContent: "flex-start", paddingTop: 12},
|
|
720
|
+
actionSpacer: {height: 48},
|
|
721
|
+
actions: {gap: 12},
|
|
722
|
+
icon: {fontSize: 64, fontWeight: "500", lineHeight: 72, textAlign: "center"},
|
|
723
|
+
title: {fontSize: 20, fontWeight: "600", textAlign: "center"},
|
|
724
|
+
body: {fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: "center"},
|
|
725
|
+
percent: {fontSize: 30, fontVariant: ["tabular-nums"], fontWeight: "700"},
|
|
726
|
+
progressTrack: {borderRadius: 4, height: 8, maxWidth: 420, overflow: "hidden", width: "100%"},
|
|
727
|
+
progressFill: {borderRadius: 4, height: 8},
|
|
728
|
+
changelogCard: {
|
|
729
|
+
borderRadius: 16,
|
|
730
|
+
borderWidth: 1,
|
|
731
|
+
flexShrink: 1,
|
|
732
|
+
gap: 12,
|
|
733
|
+
maxHeight: 300,
|
|
734
|
+
maxWidth: 420,
|
|
735
|
+
padding: 16,
|
|
736
|
+
width: "100%",
|
|
737
|
+
},
|
|
738
|
+
changelogTitle: {fontSize: 16, fontWeight: "700"},
|
|
739
|
+
changelogList: {flexShrink: 1, maxHeight: 232, width: "100%"},
|
|
740
|
+
changelogContent: {gap: 20, paddingBottom: 2},
|
|
741
|
+
changelogEntry: {gap: 8},
|
|
742
|
+
changelogEntryDivider: {borderTopWidth: StyleSheet.hairlineWidth, paddingTop: 20},
|
|
743
|
+
changelogVersion: {fontSize: 14, fontWeight: "600"},
|
|
744
|
+
changelogMarkdownContent: {gap: 10},
|
|
745
|
+
button: {
|
|
746
|
+
alignItems: "center",
|
|
747
|
+
borderRadius: 50,
|
|
748
|
+
borderWidth: 1,
|
|
749
|
+
justifyContent: "center",
|
|
750
|
+
minHeight: 44,
|
|
751
|
+
paddingHorizontal: 20,
|
|
752
|
+
},
|
|
753
|
+
buttonText: {fontSize: 14, fontWeight: "500"},
|
|
754
|
+
})
|