@mentra/engine 3.2.0-dev.217 → 3.2.0-dev.221
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/build/generated/releaseMetadata.js +5 -5
- package/build/generated/releaseMetadata.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/react/MentraLiveOtaFlow.d.ts.map +1 -1
- package/build/react/MentraLiveOtaFlow.js +19 -3
- package/build/react/MentraLiveOtaFlow.js.map +1 -1
- package/build/react/useMentraLiveOta.d.ts +12 -0
- package/build/react/useMentraLiveOta.d.ts.map +1 -1
- package/build/react/useMentraLiveOta.js +31 -5
- package/build/react/useMentraLiveOta.js.map +1 -1
- package/build/services/OtaErrorMapping.d.ts +25 -2
- package/build/services/OtaErrorMapping.d.ts.map +1 -1
- package/build/services/OtaErrorMapping.js +68 -23
- package/build/services/OtaErrorMapping.js.map +1 -1
- package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
- package/build/services/OtaInstallCoordinator.js +6 -1
- package/build/services/OtaInstallCoordinator.js.map +1 -1
- package/package.json +7 -7
- package/src/generated/releaseMetadata.ts +5 -5
- package/src/index.ts +6 -0
- package/src/react/MentraLiveOtaFlow.tsx +22 -3
- package/src/react/useMentraLiveOta.ts +44 -6
- package/src/services/OtaErrorMapping.ts +77 -25
- package/src/services/OtaInstallCoordinator.ts +6 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const ENGINE_RELEASE_METADATA = Object.freeze({
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"familyBaseVersion": "3.2.0",
|
|
4
|
-
"releaseIdentity": "3.2.0-dev.
|
|
5
|
-
"releaseSetId": "mentra-3.2.0-dev.
|
|
6
|
-
"sourceCommit": "
|
|
7
|
-
"otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.
|
|
8
|
-
"otaManifestSha256": "
|
|
4
|
+
"releaseIdentity": "3.2.0-dev.221",
|
|
5
|
+
"releaseSetId": "mentra-3.2.0-dev.221",
|
|
6
|
+
"sourceCommit": "3837a3055e7a69e18553ce51c3a97579d2ad3b83",
|
|
7
|
+
"otaManifestUrl": "https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.221.json",
|
|
8
|
+
"otaManifestSha256": "657e9616ad0c464ee57d827c05b53393e45559992c13b15adbb06e0c903eb870"
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=releaseMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,uBAAuB,GAAoC,MAAM,CAAC,MAAM,CAAC;IACpF,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,wHAAwH;IAC1I,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface EngineReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const ENGINE_RELEASE_METADATA: Readonly<EngineReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.2.0\",\n \"releaseIdentity\": \"3.2.0-dev.
|
|
1
|
+
{"version":3,"file":"releaseMetadata.js","sourceRoot":"","sources":["../../src/generated/releaseMetadata.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,uBAAuB,GAAoC,MAAM,CAAC,MAAM,CAAC;IACpF,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,OAAO;IAC5B,iBAAiB,EAAE,eAAe;IAClC,cAAc,EAAE,sBAAsB;IACtC,cAAc,EAAE,0CAA0C;IAC1D,gBAAgB,EAAE,wHAAwH;IAC1I,mBAAmB,EAAE,kEAAkE;CACxF,CAAC,CAAA","sourcesContent":["/** Generated by release CI. Do not edit in a release checkout. */\nexport interface EngineReleaseMetadata {\n schemaVersion: 1\n familyBaseVersion: string | null\n releaseIdentity: string | null\n releaseSetId: string | null\n sourceCommit: string | null\n otaManifestUrl: string | null\n otaManifestSha256: string | null\n}\n\nexport const ENGINE_RELEASE_METADATA: Readonly<EngineReleaseMetadata> = Object.freeze({\n \"schemaVersion\": 1,\n \"familyBaseVersion\": \"3.2.0\",\n \"releaseIdentity\": \"3.2.0-dev.221\",\n \"releaseSetId\": \"mentra-3.2.0-dev.221\",\n \"sourceCommit\": \"3837a3055e7a69e18553ce51c3a97579d2ad3b83\",\n \"otaManifestUrl\": \"https://github.com/Mentra-Community/MentraOS/releases/download/mentra-builds-v3.2.0/mentra-live-ota-3.2.0-dev.221.json\",\n \"otaManifestSha256\": \"657e9616ad0c464ee57d827c05b53393e45559992c13b15adbb06e0c903eb870\"\n})\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type { DisplayState } from "./services/otaDisplayState";
|
|
|
29
29
|
export type { OtaProgress, OtaProgressStatus, OtaStatus, OtaUpdateInfo, ReleaseChangelog, OtaSnapshot, OtaInstallSnapshot, } from "./facades/ota";
|
|
30
30
|
export { beginOtaAutoChain, clearOtaAutoChainReconnectWait, isOtaAutoChainActive, otaAutoChainFingerprint, otaAutoChainReconnectWaitRemaining, stopOtaAutoChain, tryAdvanceOtaAutoChain, MAX_OTA_AUTO_CHAIN_PASSES, OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS, } from "./services/OtaAutoChain";
|
|
31
31
|
export type { OtaAutoChainAdvanceResult } from "./services/OtaAutoChain";
|
|
32
|
-
export { BES_INSTALL_RESTART_MESSAGE, getOtaErrorMessage, shouldRequireGlassesRebootForBesFailure, shouldShowChangeWifiForOtaDownloadFailure, } from "./services/OtaErrorMapping";
|
|
32
|
+
export { BES_INSTALL_RESTART_MESSAGE, OTA_ERROR_BES_RESTART_REQUIRED_COPY_KEY, OTA_ERROR_ENGLISH_COPY, OTA_ERROR_GENERIC_COPY_KEY, OTA_ERROR_UNKNOWN_GLASSES_COPY_KEY, OTA_GLASSES_ERROR_COPY_KEYS, getOtaErrorMessage, otaErrorCopyKey, shouldRequireGlassesRebootForBesFailure, shouldShowChangeWifiForOtaDownloadFailure, } from "./services/OtaErrorMapping";
|
|
33
33
|
export type { GalleryNotice, GalleryNoticeCode } from "./services/asg/galleryNotices";
|
|
34
34
|
export { MediaLibraryPermissions } from "./utils/permissions/MediaLibraryPermissions";
|
|
35
35
|
export { deriveGalleryDisplayName } from "./utils/permissions/galleryDisplayName";
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAC,kBAAkB,EAAE,sBAAsB,EAAC,MAAM,yBAAyB,CAAA;AACvF,YAAY,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AAC3D,YAAY,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAA;AAChE,YAAY,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAA;AAC/D,YAAY,EACV,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,aAAa,EACb,YAAY,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,KAAK,mBAAmB,EAAC,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAG1D,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,SAAS,GACV,MAAM,SAAS,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -29,7 +29,7 @@ export { decideReconnect, decideConnectButtonAction, } from "./services/Connecti
|
|
|
29
29
|
export { MINIMUM_OTA_STATUS_BUILD, MAX_RETRIES, RETRY_INTERVAL_MS, PROGRESS_TIMEOUT_MS, DOWNLOAD_STUCK_TIMEOUT_MS, MTK_INSTALL_TIMEOUT_MS, GLOBAL_OTA_TIMEOUT_MS, PING_INTERVAL_MS, QUERY_REPLY_TIMEOUT_MS, BES_RESTART_TIMEOUT_MS, OtaProgressMessages, } from "./services/otaInstallPolicy";
|
|
30
30
|
export { deriveDisplayState } from "./services/otaDisplayState";
|
|
31
31
|
export { beginOtaAutoChain, clearOtaAutoChainReconnectWait, isOtaAutoChainActive, otaAutoChainFingerprint, otaAutoChainReconnectWaitRemaining, stopOtaAutoChain, tryAdvanceOtaAutoChain, MAX_OTA_AUTO_CHAIN_PASSES, OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS, } from "./services/OtaAutoChain";
|
|
32
|
-
export { BES_INSTALL_RESTART_MESSAGE, getOtaErrorMessage, shouldRequireGlassesRebootForBesFailure, shouldShowChangeWifiForOtaDownloadFailure, } from "./services/OtaErrorMapping";
|
|
32
|
+
export { BES_INSTALL_RESTART_MESSAGE, OTA_ERROR_BES_RESTART_REQUIRED_COPY_KEY, OTA_ERROR_ENGLISH_COPY, OTA_ERROR_GENERIC_COPY_KEY, OTA_ERROR_UNKNOWN_GLASSES_COPY_KEY, OTA_GLASSES_ERROR_COPY_KEYS, getOtaErrorMessage, otaErrorCopyKey, shouldRequireGlassesRebootForBesFailure, shouldShowChangeWifiForOtaDownloadFailure, } from "./services/OtaErrorMapping";
|
|
33
33
|
export { MediaLibraryPermissions } from "./utils/permissions/MediaLibraryPermissions";
|
|
34
34
|
export { deriveGalleryDisplayName } from "./utils/permissions/galleryDisplayName";
|
|
35
35
|
// Cloud connection status enum (read model; the connection store is internal).
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E;AAC3E,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AA2B/B,2EAA2E;AAC3E,6EAA6E;AAC7E,yEAAyE;AACzE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAC,wBAAwB,EAAE,gCAAgC,EAAC,MAAM,+BAA+B,CAAA;AAExG,8CAA8C;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAA;AAGrD,2DAA2D;AAC3D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,mBAAmB,GAGpB,MAAM,6BAA6B,CAAA;AACpC,yEAAyE;AACzE,OAAO,EACL,eAAe,EACf,yBAAyB,GAI1B,MAAM,kCAAkC,CAAA;AAazC,uEAAuE;AACvE,2DAA2D;AAC3D,OAAO,EACL,wBAAwB,EACxB,WAAW,EAC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QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAE1D,0CAA0C;AAC1C,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@mentra/engine` — the OEM-facing main entry.\n *\n * The `engine` namespace (configure/start/stop + typed domain facades), the\n * public contract/read-model types, and the pure helpers host UI legitimately\n * renders with (decision functions, sort/order helpers, policy constants,\n * capability tables, timers). Judgment rule: read models, commands, pure\n * functions and types belong here; anything that mutates runtime state or\n * exposes a raw store/service remains private to the MentraOS host.\n * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.\n */\n\n// The namespaced OEM-facing engine API (the \"(A) host API\"). See ./engine.\nexport {engine} from \"./engine\"\nexport type {\n ReportAttachmentInput,\n ReportContext,\n ReportDetails,\n ReportStatus,\n ReportTrigger,\n ReportSubmitResult,\n EngineSubmitReportInput,\n} from \"./facades/reports\"\nexport type {IslandNotification, IslandNotificationKind} from \"./facades/notifications\"\nexport type {WifiSearchResult} from \"./facades/glassesWifi\"\nexport type {IdentitySnapshot} from \"./services/PairingIdentity\"\nexport type {DisplayMirrorEvent} from \"./facades/displayMirror\"\nexport type {\n IslandConfigureOptions,\n IslandAuth,\n IslandConfigValues,\n IslandAnalytics,\n IslandUiSeams,\n ScanQrOptions,\n ScanQrResult,\n SubjectTokenType,\n LocalMiniappPolicy,\n ManagedMiniappPolicyEntry,\n} from \"./runtime/bootstrap\"\n\n// Settings contract: the typed key registry (schema descriptors — the same\n// surface engine.settings.descriptor()/keys() reads), the per-key React hook\n// (the hook layer, same precedent as the apps hooks below), and the pure\n// device-model key helpers. The raw useSettingsStore stays internal;\n// imperative access goes through engine.settings.\nexport {SETTINGS, useSetting} from \"./stores/settings\"\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./stores/bluetoothSettingKeys\"\n\n// Runtime-shared constants and contract DTOs.\nexport {ISLAND_SETTINGS_KEYS} from \"./runtime/config\"\nexport type {CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, TtsSynthesisResult} from \"./runtime/config\"\n\n// Pure readiness predicates over glasses connection state.\nexport {\n isGlassesConnected,\n isGlassesReady,\n isGlassesLinkLayerBusy,\n waitForGlassesReady,\n type GlassesConnectionStatus,\n type WaitForGlassesReadyOptions,\n} from \"./services/GlassesReadiness\"\n// Pure connect/reconnect decision helpers (host UI renders the outcome).\nexport {\n decideReconnect,\n decideConnectButtonAction,\n type ReconnectDecision,\n type ReconnectDecisionInput,\n type ConnectButtonAction,\n} from \"./services/ConnectionCoordinator\"\n\n// OTA read-model types for host OTA UI (progress screen, error mapping,\n// progress section) — the check/install machinery itself is internal.\nexport type {\n VersionInfo,\n MtkPatch,\n BesFirmware,\n VersionJson,\n OtaCheckResult,\n OtaCheckCurrentGlassesResult,\n OtaCheckCurrentGlassesOptions,\n} from \"./services/OtaUpdateCheckService\"\n// OTA install policy (watchdog timings + failure copy) + display-state\n// derivation, consumed by the OTA screens and their tests.\nexport {\n MINIMUM_OTA_STATUS_BUILD,\n MAX_RETRIES,\n RETRY_INTERVAL_MS,\n PROGRESS_TIMEOUT_MS,\n DOWNLOAD_STUCK_TIMEOUT_MS,\n MTK_INSTALL_TIMEOUT_MS,\n GLOBAL_OTA_TIMEOUT_MS,\n PING_INTERVAL_MS,\n QUERY_REPLY_TIMEOUT_MS,\n BES_RESTART_TIMEOUT_MS,\n OtaProgressMessages,\n} from \"./services/otaInstallPolicy\"\nexport {deriveDisplayState} from \"./services/otaDisplayState\"\nexport type {DisplayState} from \"./services/otaDisplayState\"\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n OtaSnapshot,\n OtaInstallSnapshot,\n} from \"./facades/ota\"\nexport {\n beginOtaAutoChain,\n clearOtaAutoChainReconnectWait,\n isOtaAutoChainActive,\n otaAutoChainFingerprint,\n otaAutoChainReconnectWaitRemaining,\n stopOtaAutoChain,\n tryAdvanceOtaAutoChain,\n MAX_OTA_AUTO_CHAIN_PASSES,\n OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS,\n} from \"./services/OtaAutoChain\"\nexport type {OtaAutoChainAdvanceResult} from \"./services/OtaAutoChain\"\nexport {\n BES_INSTALL_RESTART_MESSAGE,\n getOtaErrorMessage,\n shouldRequireGlassesRebootForBesFailure,\n shouldShowChangeWifiForOtaDownloadFailure,\n} from \"./services/OtaErrorMapping\"\n\n// Gallery read models: engine.gallery.onNotice payload types, the media\n// permission helper + display-name derivation host gallery UI uses, and the\n// glasses-camera DTO types (re-exported through the host @/types/asg shim).\nexport type {GalleryNotice, GalleryNoticeCode} from \"./services/asg/galleryNotices\"\nexport {MediaLibraryPermissions} from \"./utils/permissions/MediaLibraryPermissions\"\nexport {deriveGalleryDisplayName} from \"./utils/permissions/galleryDisplayName\"\nexport type {\n PhotoInfo,\n CaptureFile,\n CaptureGroup,\n GalleryResponse,\n ServerStatus,\n HealthResponse,\n GalleryEvent,\n} from \"./types/asg\"\n\n// Bluetooth SDK event types host UI subscribes to via engine facades (the\n// BluetoothSdk singleton passthrough itself is internal).\nexport type {PairFailureEvent, GlassesNotReadyEvent} from \"@mentra/bluetooth-sdk\"\n\n// Cloud connection status enum (read model; the connection store is internal).\nexport {WebSocketStatus} from \"./stores/connection\"\n\n// App-list hook layer + pure list helpers (the raw useAppStatusStore and\n// installAppStoreHooks wiring are internal).\nexport {\n DUMMY_APPLET,\n saveAppsOrder,\n getAppsOrder,\n sortAppsByPackageNamePriority,\n saveLastOpenTime,\n getLastOpenTime,\n sortAppsByLastOpenTime,\n useApps,\n useStart,\n useStop,\n useSetForeground,\n useClearForeground,\n useRefresh,\n useStopAll,\n useInstall,\n useUninstall,\n useActiveApps,\n useActiveBackgroundApps,\n useBackgroundApps,\n useActiveForegroundApp,\n useForegroundApp,\n useActiveBackgroundAppsCount,\n useLocalMiniApps,\n type StartOptions,\n type OrderMap,\n} from \"./stores/apps\"\n\n// Pure dev-miniapp launch-route decision (registration itself is internal).\nexport {\n decideDevLaunchRoute,\n type DecideDevLaunchOptions,\n type DevLaunchResult,\n type DevManifest,\n} from \"./utils/devMiniappLaunch\"\nexport {\n decideDevOpenRoute,\n type DevOpenDecision,\n} from \"./utils/devMiniappSnapshot\"\nexport {HardwareCompatibility, type CompatibilityResult} from \"./utils/hardware\"\nexport {BgTimer, throttle, debounce} from \"./utils/timers\"\n\n// Hardware types and capability profiles.\nexport {\n HardwareType,\n HardwareRequirementLevel,\n DeviceTypes,\n ControllerTypes,\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n nimo,\n vuzixZ100,\n mentraDisplay,\n} from \"./types\"\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n AppletType,\n AppPermissionType,\n AppletPermission,\n AppletInterface,\n ClientApp,\n} from \"./types\"\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2EAA2E;AAC3E,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AA2B/B,2EAA2E;AAC3E,6EAA6E;AAC7E,yEAAyE;AACzE,qEAAqE;AACrE,kDAAkD;AAClD,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAC,wBAAwB,EAAE,gCAAgC,EAAC,MAAM,+BAA+B,CAAA;AAExG,8CAA8C;AAC9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,kBAAkB,CAAA;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ACZ,aAAa,EACb,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,gBAAgB,GAGjB,MAAM,eAAe,CAAA;AAEtB,4EAA4E;AAC5E,OAAO,EACL,oBAAoB,GAIrB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,kBAAkB,GAEnB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAC,qBAAqB,EAA2B,MAAM,kBAAkB,CAAA;AAChF,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,MAAM,gBAAgB,CAAA;AAE1D,0CAA0C;AAC1C,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,IAAI,EACJ,SAAS,EACT,aAAa,GACd,MAAM,SAAS,CAAA","sourcesContent":["/**\n * `@mentra/engine` — the OEM-facing main entry.\n *\n * The `engine` namespace (configure/start/stop + typed domain facades), the\n * public contract/read-model types, and the pure helpers host UI legitimately\n * renders with (decision functions, sort/order helpers, policy constants,\n * capability tables, timers). Judgment rule: read models, commands, pure\n * functions and types belong here; anything that mutates runtime state or\n * exposes a raw store/service remains private to the MentraOS host.\n * See cloud-v2/docs/issues/020-glasses-status-boundary/integration-review.md §D.\n */\n\n// The namespaced OEM-facing engine API (the \"(A) host API\"). See ./engine.\nexport {engine} from \"./engine\"\nexport type {\n ReportAttachmentInput,\n ReportContext,\n ReportDetails,\n ReportStatus,\n ReportTrigger,\n ReportSubmitResult,\n EngineSubmitReportInput,\n} from \"./facades/reports\"\nexport type {IslandNotification, IslandNotificationKind} from \"./facades/notifications\"\nexport type {WifiSearchResult} from \"./facades/glassesWifi\"\nexport type {IdentitySnapshot} from \"./services/PairingIdentity\"\nexport type {DisplayMirrorEvent} from \"./facades/displayMirror\"\nexport type {\n IslandConfigureOptions,\n IslandAuth,\n IslandConfigValues,\n IslandAnalytics,\n IslandUiSeams,\n ScanQrOptions,\n ScanQrResult,\n SubjectTokenType,\n LocalMiniappPolicy,\n ManagedMiniappPolicyEntry,\n} from \"./runtime/bootstrap\"\n\n// Settings contract: the typed key registry (schema descriptors — the same\n// surface engine.settings.descriptor()/keys() reads), the per-key React hook\n// (the hook layer, same precedent as the apps hooks below), and the pure\n// device-model key helpers. The raw useSettingsStore stays internal;\n// imperative access goes through engine.settings.\nexport {SETTINGS, useSetting} from \"./stores/settings\"\nexport {MENTRA_LIVE_SETTING_KEYS, getBluetoothSettingKeysForDevice} from \"./stores/bluetoothSettingKeys\"\n\n// Runtime-shared constants and contract DTOs.\nexport {ISLAND_SETTINGS_KEYS} from \"./runtime/config\"\nexport type {CloudClientStatusSnapshot, MiniappAuthToken, InteropAuditEvent, TtsSynthesisResult} from \"./runtime/config\"\n\n// Pure readiness predicates over glasses connection state.\nexport {\n isGlassesConnected,\n isGlassesReady,\n isGlassesLinkLayerBusy,\n waitForGlassesReady,\n type GlassesConnectionStatus,\n type WaitForGlassesReadyOptions,\n} from \"./services/GlassesReadiness\"\n// Pure connect/reconnect decision helpers (host UI renders the outcome).\nexport {\n decideReconnect,\n decideConnectButtonAction,\n type ReconnectDecision,\n type ReconnectDecisionInput,\n type ConnectButtonAction,\n} from \"./services/ConnectionCoordinator\"\n\n// OTA read-model types for host OTA UI (progress screen, error mapping,\n// progress section) — the check/install machinery itself is internal.\nexport type {\n VersionInfo,\n MtkPatch,\n BesFirmware,\n VersionJson,\n OtaCheckResult,\n OtaCheckCurrentGlassesResult,\n OtaCheckCurrentGlassesOptions,\n} from \"./services/OtaUpdateCheckService\"\n// OTA install policy (watchdog timings + failure copy) + display-state\n// derivation, consumed by the OTA screens and their tests.\nexport {\n MINIMUM_OTA_STATUS_BUILD,\n MAX_RETRIES,\n RETRY_INTERVAL_MS,\n PROGRESS_TIMEOUT_MS,\n DOWNLOAD_STUCK_TIMEOUT_MS,\n MTK_INSTALL_TIMEOUT_MS,\n GLOBAL_OTA_TIMEOUT_MS,\n PING_INTERVAL_MS,\n QUERY_REPLY_TIMEOUT_MS,\n BES_RESTART_TIMEOUT_MS,\n OtaProgressMessages,\n} from \"./services/otaInstallPolicy\"\nexport {deriveDisplayState} from \"./services/otaDisplayState\"\nexport type {DisplayState} from \"./services/otaDisplayState\"\nexport type {\n OtaProgress,\n OtaProgressStatus,\n OtaStatus,\n OtaUpdateInfo,\n ReleaseChangelog,\n OtaSnapshot,\n OtaInstallSnapshot,\n} from \"./facades/ota\"\nexport {\n beginOtaAutoChain,\n clearOtaAutoChainReconnectWait,\n isOtaAutoChainActive,\n otaAutoChainFingerprint,\n otaAutoChainReconnectWaitRemaining,\n stopOtaAutoChain,\n tryAdvanceOtaAutoChain,\n MAX_OTA_AUTO_CHAIN_PASSES,\n OTA_AUTO_CHAIN_RECONNECT_TIMEOUT_MS,\n} from \"./services/OtaAutoChain\"\nexport type {OtaAutoChainAdvanceResult} from \"./services/OtaAutoChain\"\nexport {\n BES_INSTALL_RESTART_MESSAGE,\n OTA_ERROR_BES_RESTART_REQUIRED_COPY_KEY,\n OTA_ERROR_ENGLISH_COPY,\n OTA_ERROR_GENERIC_COPY_KEY,\n OTA_ERROR_UNKNOWN_GLASSES_COPY_KEY,\n OTA_GLASSES_ERROR_COPY_KEYS,\n getOtaErrorMessage,\n otaErrorCopyKey,\n shouldRequireGlassesRebootForBesFailure,\n shouldShowChangeWifiForOtaDownloadFailure,\n} from \"./services/OtaErrorMapping\"\n\n// Gallery read models: engine.gallery.onNotice payload types, the media\n// permission helper + display-name derivation host gallery UI uses, and the\n// glasses-camera DTO types (re-exported through the host @/types/asg shim).\nexport type {GalleryNotice, GalleryNoticeCode} from \"./services/asg/galleryNotices\"\nexport {MediaLibraryPermissions} from \"./utils/permissions/MediaLibraryPermissions\"\nexport {deriveGalleryDisplayName} from \"./utils/permissions/galleryDisplayName\"\nexport type {\n PhotoInfo,\n CaptureFile,\n CaptureGroup,\n GalleryResponse,\n ServerStatus,\n HealthResponse,\n GalleryEvent,\n} from \"./types/asg\"\n\n// Bluetooth SDK event types host UI subscribes to via engine facades (the\n// BluetoothSdk singleton passthrough itself is internal).\nexport type {PairFailureEvent, GlassesNotReadyEvent} from \"@mentra/bluetooth-sdk\"\n\n// Cloud connection status enum (read model; the connection store is internal).\nexport {WebSocketStatus} from \"./stores/connection\"\n\n// App-list hook layer + pure list helpers (the raw useAppStatusStore and\n// installAppStoreHooks wiring are internal).\nexport {\n DUMMY_APPLET,\n saveAppsOrder,\n getAppsOrder,\n sortAppsByPackageNamePriority,\n saveLastOpenTime,\n getLastOpenTime,\n sortAppsByLastOpenTime,\n useApps,\n useStart,\n useStop,\n useSetForeground,\n useClearForeground,\n useRefresh,\n useStopAll,\n useInstall,\n useUninstall,\n useActiveApps,\n useActiveBackgroundApps,\n useBackgroundApps,\n useActiveForegroundApp,\n useForegroundApp,\n useActiveBackgroundAppsCount,\n useLocalMiniApps,\n type StartOptions,\n type OrderMap,\n} from \"./stores/apps\"\n\n// Pure dev-miniapp launch-route decision (registration itself is internal).\nexport {\n decideDevLaunchRoute,\n type DecideDevLaunchOptions,\n type DevLaunchResult,\n type DevManifest,\n} from \"./utils/devMiniappLaunch\"\nexport {\n decideDevOpenRoute,\n type DevOpenDecision,\n} from \"./utils/devMiniappSnapshot\"\nexport {HardwareCompatibility, type CompatibilityResult} from \"./utils/hardware\"\nexport {BgTimer, throttle, debounce} from \"./utils/timers\"\n\n// Hardware types and capability profiles.\nexport {\n HardwareType,\n HardwareRequirementLevel,\n DeviceTypes,\n ControllerTypes,\n HARDWARE_CAPABILITIES,\n getModelCapabilities,\n simulatedGlasses,\n evenRealitiesG1,\n evenRealitiesG2,\n mentraLive,\n nimo,\n vuzixZ100,\n mentraDisplay,\n} from \"./types\"\nexport type {\n HardwareRequirement,\n CameraCapabilities,\n DisplayCapabilities,\n MicrophoneCapabilities,\n SpeakerCapabilities,\n IMUCapabilities,\n ButtonCapabilities,\n LightCapabilities,\n PowerCapabilities,\n Capabilities,\n AppletType,\n AppPermissionType,\n AppletPermission,\n AppletInterface,\n ClientApp,\n} from \"./types\"\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentraLiveOtaFlow.d.ts","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgB,MAAM,OAAO,CAAA;AACpC,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"MentraLiveOtaFlow.d.ts","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAgB,MAAM,OAAO,CAAA;AACpC,OAAO,EAOL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAA;AAMrB,OAAO,EAGL,KAAK,uBAAuB,EAE5B,KAAK,qBAAqB,EAC3B,MAAM,oBAAoB,CAAA;AAE3B,YAAY,EAAC,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AAE7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAA;AAElG,MAAM,MAAM,sBAAsB,GAAG;IACnC,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,qBAAqB,CAAA;IACnC,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,+EAA+E;IAC/E,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,0EAA0E;IAC1E,eAAe,EAAE,MAAM,IAAI,CAAA;IAC3B,oGAAoG;IACpG,0BAA0B,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,KAAK,IAAI,CAAA;IACnF,0DAA0D;IAC1D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,0BAA0B,CAAA;IACtC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAA;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAgHD,wBAAgB,iBAAiB,CAAC,EAChC,YAAwD,EACxD,UAA0B,EAC1B,WAAqB,EACrB,iBAAwB,EACxB,UAAU,EACV,0BAA0B,EAC1B,eAAe,EACf,KAAK,EACL,SAAiB,EACjB,KAAK,EACL,SAA4B,GAC7B,EAAE,sBAAsB,qBA0BxB;AAggBD,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,MAAM,EACN,KAAK,GACN,EAAE;IACD,UAAU,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAA;IAC1D,MAAM,EAAE,sBAAsB,CAAA;IAC9B,KAAK,EAAE,MAAM,CAAA;CACd,4BA8BA"}
|
|
@@ -4,6 +4,7 @@ import { ActivityIndicator, Pressable, ScrollView, StyleSheet, Text, View, } fro
|
|
|
4
4
|
import { useMarkdown } from "react-native-marked";
|
|
5
5
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
6
6
|
import Svg, { Path, Rect } from "react-native-svg";
|
|
7
|
+
import { OTA_ERROR_ENGLISH_COPY } from "../services/OtaErrorMapping";
|
|
7
8
|
import { MINIMUM_OTA_BATTERY_LEVEL, useMentraLiveOta, } from "./useMentraLiveOta";
|
|
8
9
|
const DEFAULT_THEME = {
|
|
9
10
|
background: "#FFFFFF",
|
|
@@ -74,14 +75,25 @@ const ENGLISH_COPY = {
|
|
|
74
75
|
"ota:versionChangeCompleteMessage": "Your glasses are now on the required version. Their settings were reset and are being restored automatically.",
|
|
75
76
|
"ota:versionChangeFirmwarePassComplete": "Firmware updated",
|
|
76
77
|
"ota:versionChangeFirmwarePassCompleteMessage": "Your glasses restarted with new firmware. One more step: they'll now continue to the required version.",
|
|
78
|
+
"ota:updateFailed": "Update Failed",
|
|
79
|
+
...OTA_ERROR_ENGLISH_COPY,
|
|
77
80
|
};
|
|
78
81
|
const componentCopyKey = {
|
|
79
82
|
apk: "ota:componentApk",
|
|
80
83
|
mtk: "ota:componentMtk",
|
|
81
84
|
bes: "ota:componentBes",
|
|
82
85
|
};
|
|
86
|
+
/**
|
|
87
|
+
* Copy for the failed screen: the translated copy key when the failure maps to one,
|
|
88
|
+
* otherwise the engine's English message (phone-side watchdog and preflight text).
|
|
89
|
+
*/
|
|
90
|
+
function failureMessage(error, translate) {
|
|
91
|
+
if (!error)
|
|
92
|
+
return translate("ota:errorGeneric");
|
|
93
|
+
return error.copyKey ? translate(error.copyKey) : error.message;
|
|
94
|
+
}
|
|
83
95
|
function defaultTranslate(key, options) {
|
|
84
|
-
let value = ENGLISH_COPY[key]
|
|
96
|
+
let value = Object.prototype.hasOwnProperty.call(ENGLISH_COPY, key) ? ENGLISH_COPY[key] : key;
|
|
85
97
|
for (const [name, replacement] of Object.entries(options ?? {})) {
|
|
86
98
|
value = value.replaceAll(`{{${name}}}`, replacement);
|
|
87
99
|
}
|
|
@@ -294,8 +306,11 @@ function OtaFlowContent({ allowDevSkip, colors, controller, deviceName, superMod
|
|
|
294
306
|
return (<FlowPage actions={<>
|
|
295
307
|
<FlowButton colors={colors} label={state.canRetry ? "Retry" : "Done"} onPress={state.canRetry ? controller.retryInstall : controller.finish}/>
|
|
296
308
|
{state.canOpenWifiSetup ? (<FlowButton colors={colors} label="Change WiFi" onPress={controller.openWifiSetup} secondary/>) : null}
|
|
297
|
-
</>} colors={colors} icon="alert" title="
|
|
298
|
-
<BodyText colors={colors}>{state.error
|
|
309
|
+
</>} colors={colors} icon="alert" title={translate("ota:updateFailed")}>
|
|
310
|
+
<BodyText colors={colors}>{failureMessage(state.error, translate)}</BodyText>
|
|
311
|
+
{state.error?.glassesCode ? (<Text style={[styles.errorCode, { color: colors.textDim }]} testID="ota-error-code">
|
|
312
|
+
{translate("ota:errorCode", { code: state.error.glassesCode })}
|
|
313
|
+
</Text>) : null}
|
|
299
314
|
</FlowPage>);
|
|
300
315
|
}
|
|
301
316
|
return (<FlowPage actions={superMode ? (<FlowButton colors={colors} label="Skip (super)" onPress={controller.discard} secondary/>) : undefined} colors={colors} icon="bluetooth" title="Glasses disconnected">
|
|
@@ -458,6 +473,7 @@ const styles = StyleSheet.create({
|
|
|
458
473
|
icon: { fontSize: 64, fontWeight: "500", lineHeight: 72, textAlign: "center" },
|
|
459
474
|
title: { fontSize: 20, fontWeight: "600", textAlign: "center" },
|
|
460
475
|
body: { fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: "center" },
|
|
476
|
+
errorCode: { fontSize: 12, fontVariant: ["tabular-nums"], lineHeight: 16, opacity: 0.7, textAlign: "center" },
|
|
461
477
|
percent: { fontSize: 30, fontVariant: ["tabular-nums"], fontWeight: "700" },
|
|
462
478
|
progressTrack: { borderRadius: 4, height: 8, maxWidth: 420, overflow: "hidden", width: "100%" },
|
|
463
479
|
progressFill: { borderRadius: 4, height: 8 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentraLiveOtaFlow.js","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,EACL,iBAAiB,EACjB,SAAS,E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,KAAK,EAAC;IACnD,wBAAwB,EAAE,EAAC,GAAG,EAAE,EAAE,EAAC;IACnC,MAAM,EAAE;QACN,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,CAAC;QACd,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;KACtB;IACD,UAAU,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAC;CAC9C,CAAC,CAAA","sourcesContent":["/* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */\nimport React, {useMemo} from \"react\"\nimport {\n ActivityIndicator,\n Pressable,\n ScrollView,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\"\nimport {useMarkdown, type MarkedStyles, type useMarkdownHookOptions} from \"react-native-marked\"\nimport {SafeAreaView} from \"react-native-safe-area-context\"\nimport Svg, {Path, Rect} from \"react-native-svg\"\n\nimport {\n MINIMUM_OTA_BATTERY_LEVEL,\n useMentraLiveOta,\n type MentraLiveOtaController,\n type MentraLiveOtaFlowPage,\n} from \"./useMentraLiveOta\"\n\nexport type {MentraLiveOtaFlowPage} from \"./useMentraLiveOta\"\n\nexport type MentraLiveOtaFlowTheme = {\n background: string\n border: string\n error: string\n foreground: string\n primary: string\n primaryText: string\n textDim: string\n}\n\nexport type MentraLiveOtaFlowTranslate = (key: string, options?: Record<string, string>) => string\n\nexport type MentraLiveOtaFlowProps = {\n /** Display name used in update copy. */\n deviceName?: string\n /** Entry page. `progress` exists for recovery/deep-link compatibility. */\n initialPage?: MentraLiveOtaFlowPage\n /** Start the OTA-only projections. Full Engine hosts should pass false. */\n initializeRuntime?: boolean\n /** Called after the final check or when the user leaves an optional update. */\n onFinished: () => void\n /** Host-owned Wi-Fi setup for glasses that do not support hotspot OTA. */\n onOpenWifiSetup: () => void\n /** Lets a host coordinate its global connection overlay with OTA progress and firmware restarts. */\n onFirmwareRestartingChange?: (restarting: boolean, progressActive: boolean) => void\n /** Enables the existing developer-only escape hatches. */\n allowDevSkip?: boolean\n /** Enables the existing super-mode interrupted-session escape hatch. */\n superMode?: boolean\n /** Optional host localization. Defaults to the Mentra App English OTA copy. */\n translate?: MentraLiveOtaFlowTranslate\n /** Optional host theme. Both hosts use the same layout and state machine. */\n theme?: Partial<MentraLiveOtaFlowTheme>\n style?: StyleProp<ViewStyle>\n}\n\nconst DEFAULT_THEME: MentraLiveOtaFlowTheme = {\n background: \"#FFFFFF\",\n border: \"#D7DFDA\",\n error: \"#C43131\",\n foreground: \"#0E2C1A\",\n primary: \"#00B869\",\n primaryText: \"#FFFFFF\",\n textDim: \"#66736B\",\n}\n\nconst ENGLISH_COPY: Record<string, string> = {\n \"ota:downloadingToPhone\": \"Downloading update to phone...\",\n \"ota:startingGlassesHotspot\": \"Starting glasses hotspot...\",\n \"ota:connectingPhoneToGlasses\": \"Connecting phone to glasses...\",\n \"ota:startingHotspotUpdate\": \"Starting update...\",\n \"ota:transferringToGlasses\": \"Transferring update to glasses...\",\n \"ota:installingOnGlasses\": \"Installing update on glasses...\",\n \"ota:componentApk\": \"Glasses software\",\n \"ota:componentMtk\": \"System firmware\",\n \"ota:componentBes\": \"Bluetooth firmware\",\n \"ota:updateFile\": \"File {{current}} of {{total}} · {{component}}\",\n \"ota:updatePart\": \"Update {{current}} of {{total}} · {{component}}\",\n \"ota:phoneFileProgress\": \"Each file downloads separately. Progress is for the current file.\",\n \"ota:transferFileProgress\": \"Progress is for this file’s transfer from your phone.\",\n\n \"common:continue\": \"Continue\",\n \"common:done\": \"Done\",\n \"ota:checkingForUpdates\": \"Checking for updates\",\n \"ota:checkingForUpdatesMessage\":\n \"Connected devices will perform automatic updates. Automatic updates can be disabled in Device Settings\",\n \"ota:finishingUpdate\": \"Finishing your update\",\n \"ota:checkingAdditionalUpdates\": \"Checking whether your glasses need any additional updates.\",\n \"ota:updateAvailable\": \"{{deviceName}} Update Available\",\n \"ota:batteryRequiredTitle\": \"Charge {{deviceName}} to Update\",\n \"ota:batteryRequiredMessage\":\n \"{{deviceName}} is currently at {{batteryLevel}}%. Charge it to at least {{minimumBatteryLevel}}% before updating.\",\n \"ota:batteryRequiredLiveUpdate\": \"This screen will update automatically as the battery charges.\",\n \"ota:updateConnectWifi\": \"Connect your {{deviceName}} to WiFi to install the update.\",\n \"ota:wifiRequiredTitle\": \"WiFi Needed for Update\",\n \"ota:updateDescription\":\n \"A new update is available for your glasses. We recommend updating now for the best experience.\",\n \"ota:updateSequenceMessage\":\n \"Your glasses may install more than one update and restart several times. Keep them nearby until finished.\",\n \"ota:releaseTransition\": \"{{fromVersion}} → {{toVersion}}\",\n \"ota:releaseTransitionUnknown\": \"Current version unknown → {{toVersion}}\",\n \"ota:updatedToVersion\": \"Updated to {{version}}\",\n \"ota:downgradeAvailable\": \"{{deviceName}} Version Change Required\",\n \"ota:downgradeDescription\":\n \"This app requires an earlier glasses software version. Your photos and videos will be preserved, but glasses settings will be reset and restored automatically after the change.\",\n \"ota:updateNow\": \"Update Now\",\n \"ota:setupWifi\": \"Setup WiFi\",\n \"ota:updateLater\": \"Later\",\n \"ota:updateComplete\": \"Update complete\",\n \"ota:whatsNew\": \"What's new\",\n \"ota:upToDate\": \"Up To Date\",\n \"ota:devBuild\": \"Development Build\",\n \"ota:devBuildNoOta\":\n \"This mobile app is a development build, so automatic glasses updates are disabled. Use the developer settings manifest override to update them manually.\",\n \"ota:unofficialClient\": \"Updates Blocked\",\n \"ota:unofficialClientNoOta\":\n \"Your glasses are running a sideloaded client, so updates are blocked. Restore the stock client to update them.\",\n \"ota:unofficialClientNoOtaNamed\":\n \"Your glasses are running a sideloaded client ({{packageName}}), so updates are blocked. Restore the stock client to update them.\",\n \"ota:noUpdatesAvailable\": \"Your glasses are running the latest version.\",\n \"ota:checkFailed\": \"Check Failed\",\n \"ota:checkFailedMessage\": \"Couldn't check for updates. Please check your connection and try again.\",\n \"ota:updateInfoUnavailable\": \"Update Info Unavailable\",\n \"ota:updateInfoUnavailableMessage\":\n \"Update information for this version of the app is unavailable. Please check the app store for a newer version of the Mentra App.\",\n \"ota:downgradeDuration\": \"Your glasses will restart twice — this may take up to 2 minutes.\",\n \"ota:versionChangeRestarting\": \"Installing a different version…\",\n \"ota:versionChangeVerifying\": \"Verifying your glasses…\",\n \"ota:versionChangeKeepNearby\": \"Keep your glasses nearby and connected. They will restart on their own.\",\n \"ota:restartingGlasses\": \"Restarting {{deviceName}}…\",\n \"ota:restartingGlassesMessage\":\n \"The update is installed. Keep your glasses nearby and leave this screen open while they finish starting.\",\n \"ota:restartingGlassesAutomatic\": \"We'll continue automatically when they're ready.\",\n \"ota:versionChangeComplete\": \"Version Change Complete\",\n \"ota:versionChangeCompleteMessage\":\n \"Your glasses are now on the required version. Their settings were reset and are being restored automatically.\",\n \"ota:versionChangeFirmwarePassComplete\": \"Firmware updated\",\n \"ota:versionChangeFirmwarePassCompleteMessage\":\n \"Your glasses restarted with new firmware. One more step: they'll now continue to the required version.\",\n}\n\nconst componentCopyKey = {\n apk: \"ota:componentApk\",\n mtk: \"ota:componentMtk\",\n bes: \"ota:componentBes\",\n} as const\n\nfunction defaultTranslate(key: string, options?: Record<string, string>): string {\n let value = ENGLISH_COPY[key] ?? key\n for (const [name, replacement] of Object.entries(options ?? {})) {\n value = value.replaceAll(`{{${name}}}`, replacement)\n }\n return value\n}\n\nexport function MentraLiveOtaFlow({\n allowDevSkip = typeof __DEV__ !== \"undefined\" && __DEV__,\n deviceName = \"Mentra Live\",\n initialPage = \"check\",\n initializeRuntime = true,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n style,\n superMode = false,\n theme,\n translate = defaultTranslate,\n}: MentraLiveOtaFlowProps) {\n const colors = useMemo(() => ({...DEFAULT_THEME, ...theme}), [theme])\n const controller = useMentraLiveOta({\n initialPage,\n initializeRuntime,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n })\n\n return (\n <SafeAreaView style={[styles.safeArea, {backgroundColor: colors.background}, style]}>\n <View style={styles.header}>\n <View />\n <MentraMark color={colors.primary} />\n </View>\n <OtaFlowContent\n allowDevSkip={allowDevSkip}\n colors={colors}\n controller={controller}\n deviceName={deviceName}\n superMode={superMode}\n translate={translate}\n />\n </SafeAreaView>\n )\n}\n\nfunction OtaFlowContent({\n allowDevSkip,\n colors,\n controller,\n deviceName,\n superMode,\n translate,\n}: {\n allowDevSkip: boolean\n colors: MentraLiveOtaFlowTheme\n controller: MentraLiveOtaController\n deviceName: string\n superMode: boolean\n translate: MentraLiveOtaFlowTranslate\n}) {\n const {state} = controller\n\n if (state.screen === \"initializing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"checking\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingForUpdatesMessage\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"battery_required\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} disabled label={translate(\"ota:updateNow\")} onPress={controller.install} />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:batteryRequiredTitle\", {deviceName})}>\n <BodyText colors={colors}>\n {translate(\"ota:batteryRequiredMessage\", {\n batteryLevel: String(state.batteryLevel),\n deviceName,\n minimumBatteryLevel: String(MINIMUM_OTA_BATTERY_LEVEL),\n })}\n </BodyText>\n <BodyText colors={colors}>{translate(\"ota:batteryRequiredLiveUpdate\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"finishing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:finishingUpdate\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingAdditionalUpdates\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_available\" || state.screen === \"wifi_required\") {\n const titleKey =\n state.screen === \"wifi_required\"\n ? \"ota:wifiRequiredTitle\"\n : state.versionChange\n ? \"ota:downgradeAvailable\"\n : \"ota:updateAvailable\"\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(titleKey, {deviceName})}\n actions={\n <>\n <FlowButton\n colors={colors}\n disabled={!state.wifiStatusKnown}\n label={translate(state.screen === \"wifi_required\" ? \"ota:setupWifi\" : \"ota:updateNow\")}\n onPress={state.screen === \"wifi_required\" ? controller.openWifiSetup : controller.install}\n />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n {allowDevSkip && state.updateRequired ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {state.releaseTransition.fromVersion\n ? translate(\"ota:releaseTransition\", {\n fromVersion: state.releaseTransition.fromVersion,\n toVersion: state.releaseTransition.toVersion,\n })\n : translate(\"ota:releaseTransitionUnknown\", {toVersion: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <BodyText colors={colors}>\n {state.screen === \"wifi_required\"\n ? translate(\"ota:updateConnectWifi\", {deviceName})\n : translate(state.versionChange ? \"ota:downgradeDescription\" : \"ota:updateDescription\")}\n </BodyText>\n <BodyText colors={colors}>{translate(\"ota:updateSequenceMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"dev_build\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"settings\"\n title={translate(\"ota:devBuild\")}>\n <BodyText colors={colors}>{translate(\"ota:devBuildNoOta\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"unofficial_client\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"settings\"\n title={translate(\"ota:unofficialClient\")}>\n <BodyText colors={colors}>\n {state.glassesPackageName\n ? translate(\"ota:unofficialClientNoOtaNamed\", {packageName: state.glassesPackageName})\n : translate(\"ota:unofficialClientNoOta\")}\n </BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"up_to_date\") {\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={translate(state.completedUpdate ? \"common:done\" : \"common:continue\")}\n onPress={controller.finish}\n />\n }\n colors={colors}\n contentAlignment={state.changelogs.length > 0 ? \"top\" : \"center\"}\n icon=\"check\"\n title={translate(state.completedUpdate ? \"ota:updateComplete\" : \"ota:upToDate\")}>\n <BodyText colors={colors}>{translate(\"ota:noUpdatesAvailable\")}</BodyText>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {translate(\"ota:updatedToVersion\", {version: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <ChangelogList changelogs={state.changelogs} colors={colors} title={translate(\"ota:whatsNew\")} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_info_unavailable\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:updateInfoUnavailable\")}>\n <BodyText colors={colors}>{translate(\"ota:updateInfoUnavailableMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"check_failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} label=\"Retry\" onPress={controller.retryCheck} />\n {allowDevSkip ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:checkFailed\")}>\n <BodyText colors={colors}>{translate(\"ota:checkFailedMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.versionChangePhase === \"restarting\" || state.versionChangePhase === \"verifying\") {\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(\n state.versionChangePhase === \"verifying\" ? \"ota:versionChangeVerifying\" : \"ota:versionChangeRestarting\",\n )}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:versionChangeKeepNearby\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"starting\" || state.screen === \"preparing_hotspot\") {\n const title = translate(\n state.hotspotPhase === \"downloading\"\n ? \"ota:downloadingToPhone\"\n : state.hotspotPhase === \"starting_hotspot\"\n ? \"ota:startingGlassesHotspot\"\n : state.hotspotPhase === \"joining_hotspot\"\n ? \"ota:connectingPhoneToGlasses\"\n : \"ota:startingHotspotUpdate\",\n )\n const artifact = state.hotspotPhase === \"downloading\" ? state.hotspotArtifact : null\n return (\n <FlowPage colors={colors} icon=\"download\" title={title}>\n {artifact ? (\n <BodyText colors={colors}>\n {translate(\"ota:updateFile\", {\n current: String(artifact.index + 1),\n total: String(artifact.totalCount),\n component: translate(componentCopyKey[artifact.kind]),\n })}\n </BodyText>\n ) : null}\n {state.hotspotPhase === \"downloading\" && state.hotspotArtifactPercent !== null ? (\n <PercentText colors={colors} percent={state.hotspotArtifactPercent} />\n ) : null}\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n {state.hotspotPhase === \"downloading\" ? (\n <BodyText colors={colors}>{translate(\"ota:phoneFileProgress\")}</BodyText>\n ) : null}\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"updating\") {\n const hotspot = state.transport === \"hotspot\"\n const title = hotspot\n ? translate(state.phase === \"download\" ? \"ota:transferringToGlasses\" : \"ota:installingOnGlasses\")\n : state.phase === \"download\"\n ? \"Downloading...\"\n : \"Installing...\"\n const component = state.step ? translate(componentCopyKey[state.step]) : null\n const hasStepCount =\n state.currentStep !== null &&\n state.totalSteps !== null &&\n state.currentStep > 0 &&\n state.currentStep <= state.totalSteps\n return (\n <FlowPage colors={colors} icon=\"download\" title={title}>\n {hotspot && component ? (\n <BodyText colors={colors}>\n {hasStepCount\n ? translate(\"ota:updatePart\", {\n current: String(state.currentStep),\n total: String(state.totalSteps),\n component,\n })\n : component}\n </BodyText>\n ) : null}\n {state.installingApkOnly ? (\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n ) : (\n <>\n <PercentText colors={colors} percent={state.progress ?? 0} />\n <View style={[styles.progressTrack, {backgroundColor: colors.border}]}>\n <View\n style={[styles.progressFill, {backgroundColor: colors.primary, width: `${state.progress ?? 0}%`}]}\n />\n </View>\n </>\n )}\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n {hotspot && state.phase === \"download\" ? (\n <BodyText colors={colors}>{translate(\"ota:transferFileProgress\")}</BodyText>\n ) : null}\n {state.versionChange && state.phase === \"install\" ? (\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n ) : null}\n </FlowPage>\n )\n }\n\n if (state.screen === \"restarting\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:restartingGlasses\", {deviceName})}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:restartingGlassesMessage\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:restartingGlassesAutomatic\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"complete\") {\n const title = state.versionChangeConverged\n ? translate(\"ota:versionChangeComplete\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassComplete\")\n : \"Update complete!\"\n const message = state.versionChangeConverged\n ? translate(\"ota:versionChangeCompleteMessage\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassCompleteMessage\")\n : \"Your glasses are up to date.\"\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={state.versionChange && !state.versionChangeConverged ? \"Continue\" : \"Done\"}\n onPress={controller.finish}\n />\n }\n colors={colors}\n contentAlignment={state.changelogs.length > 0 ? \"top\" : \"center\"}\n icon=\"check\"\n title={title}>\n <BodyText colors={colors}>{message}</BodyText>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {translate(\"ota:updatedToVersion\", {version: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <ChangelogList changelogs={state.changelogs} colors={colors} title={translate(\"ota:whatsNew\")} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton\n colors={colors}\n label={state.canRetry ? \"Retry\" : \"Done\"}\n onPress={state.canRetry ? controller.retryInstall : controller.finish}\n />\n {state.canOpenWifiSetup ? (\n <FlowButton colors={colors} label=\"Change WiFi\" onPress={controller.openWifiSetup} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title=\"Update Failed\">\n <BodyText colors={colors}>{state.error?.message}</BodyText>\n </FlowPage>\n )\n }\n\n return (\n <FlowPage\n actions={\n superMode ? (\n <FlowButton colors={colors} label=\"Skip (super)\" onPress={controller.discard} secondary />\n ) : undefined\n }\n colors={colors}\n icon=\"bluetooth\"\n title=\"Glasses disconnected\">\n <BodyText colors={colors}>Reconnecting...</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n}\n\ntype FlowPageProps = {\n actions?: React.ReactNode\n children?: React.ReactNode\n colors: MentraLiveOtaFlowTheme\n contentAlignment?: \"center\" | \"top\"\n icon: \"alert\" | \"bluetooth\" | \"check\" | \"download\" | \"settings\"\n title: string\n}\n\nfunction FlowPage({actions, children, colors, contentAlignment = \"center\", icon, title}: FlowPageProps) {\n return (\n <View style={styles.page} testID=\"mentra-live-ota-flow\">\n <ScrollView\n contentContainerStyle={[styles.centerContent, contentAlignment === \"top\" && styles.topContent]}\n nestedScrollEnabled\n style={styles.contentScroll}\n testID=\"ota-page-scroll\">\n <FlowIcon colors={colors} name={icon} />\n <Text style={[styles.title, {color: colors.foreground}]}>{title}</Text>\n {children}\n </ScrollView>\n {actions ? <View style={styles.actions}>{actions}</View> : <View style={styles.actionSpacer} />}\n </View>\n )\n}\n\nfunction BodyText({children, colors}: {children: React.ReactNode; colors: MentraLiveOtaFlowTheme}) {\n return <Text style={[styles.body, {color: colors.textDim}]}>{children}</Text>\n}\n\nfunction PercentText({colors, percent}: {colors: MentraLiveOtaFlowTheme; percent: number}) {\n return <Text style={[styles.percent, {color: colors.primary}]}>{Math.round(percent)}%</Text>\n}\n\nfunction ChangelogMarkdown({colors, markdown}: {colors: MentraLiveOtaFlowTheme; markdown: string}) {\n const markdownStyles = useMemo<MarkedStyles>(\n () => ({\n blockquote: {\n borderLeftColor: colors.primary,\n borderLeftWidth: 3,\n marginVertical: 2,\n opacity: 1,\n paddingLeft: 12,\n },\n code: {\n backgroundColor: colors.background,\n borderColor: colors.border,\n borderRadius: 8,\n borderWidth: 1,\n padding: 12,\n },\n codespan: {\n backgroundColor: colors.border,\n color: colors.foreground,\n fontFamily: \"monospace\",\n fontSize: 13,\n fontStyle: \"normal\",\n fontWeight: \"400\",\n },\n em: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n h1: {\n borderBottomWidth: 0,\n color: colors.foreground,\n fontSize: 18,\n fontWeight: \"700\",\n lineHeight: 24,\n marginVertical: 0,\n paddingBottom: 0,\n },\n h2: {\n borderBottomWidth: 0,\n color: colors.foreground,\n fontSize: 17,\n fontWeight: \"700\",\n lineHeight: 23,\n marginVertical: 0,\n paddingBottom: 0,\n },\n h3: {color: colors.foreground, fontSize: 16, fontWeight: \"700\", lineHeight: 22, marginVertical: 0},\n h4: {color: colors.foreground, fontSize: 15, fontWeight: \"700\", lineHeight: 21, marginVertical: 0},\n h5: {color: colors.foreground, fontSize: 14, fontWeight: \"700\", lineHeight: 20, marginVertical: 0},\n h6: {color: colors.textDim, fontSize: 14, fontWeight: \"600\", lineHeight: 20, marginVertical: 0},\n hr: {borderBottomColor: colors.border, marginVertical: 2},\n image: {borderRadius: 8},\n li: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n link: {\n color: colors.primary,\n fontSize: 14,\n fontStyle: \"normal\",\n lineHeight: 20,\n textDecorationLine: \"underline\",\n },\n paragraph: {paddingVertical: 0},\n strikethrough: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n strong: {color: colors.foreground, fontSize: 14, fontWeight: \"700\", lineHeight: 20},\n table: {borderColor: colors.border, borderRadius: 8},\n tableCell: {padding: 8},\n text: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n }),\n [colors],\n )\n const markdownTheme = useMemo<NonNullable<useMarkdownHookOptions[\"theme\"]>>(\n () => ({\n colors: {\n background: colors.background,\n border: colors.border,\n code: colors.border,\n link: colors.primary,\n text: colors.textDim,\n },\n }),\n [colors],\n )\n const elements = useMarkdown(markdown, {colorScheme: \"light\", styles: markdownStyles, theme: markdownTheme})\n\n return (\n <View style={styles.changelogMarkdownContent} testID=\"ota-changelog-markdown\">\n {elements}\n </View>\n )\n}\n\nexport function ChangelogList({\n changelogs,\n colors,\n title,\n}: {\n changelogs: MentraLiveOtaController[\"state\"][\"changelogs\"]\n colors: MentraLiveOtaFlowTheme\n title: string\n}) {\n if (changelogs.length === 0) return null\n\n return (\n <View style={[styles.changelogCard, {borderColor: colors.border}]} testID=\"ota-changelog-card\">\n <Text style={[styles.changelogTitle, {color: colors.foreground}]}>{title}</Text>\n <ScrollView\n contentContainerStyle={styles.changelogContent}\n nestedScrollEnabled\n persistentScrollbar\n showsVerticalScrollIndicator\n style={styles.changelogList}\n testID=\"ota-changelog-scroll\">\n {changelogs.map((entry, index) => (\n <View\n key={entry.version}\n style={[\n styles.changelogEntry,\n index > 0 && styles.changelogEntryDivider,\n index > 0 && {borderTopColor: colors.border},\n ]}>\n <Text selectable style={[styles.changelogVersion, {color: colors.foreground}]}>\n {entry.version}\n </Text>\n <ChangelogMarkdown colors={colors} markdown={entry.markdown} />\n </View>\n ))}\n </ScrollView>\n </View>\n )\n}\n\nfunction FlowButton({\n colors,\n disabled = false,\n label,\n onPress,\n secondary = false,\n}: {\n colors: MentraLiveOtaFlowTheme\n disabled?: boolean\n label: string\n onPress: () => void\n secondary?: boolean\n}) {\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={disabled}\n onPress={onPress}\n style={({pressed}) => [\n styles.button,\n {\n backgroundColor: secondary ? colors.background : colors.foreground,\n borderColor: secondary ? colors.border : colors.foreground,\n opacity: disabled ? 0.45 : pressed ? 0.75 : 1,\n },\n ]}\n testID={`button-${label}`}>\n <Text style={[styles.buttonText, {color: secondary ? colors.foreground : colors.background}]}>{label}</Text>\n </Pressable>\n )\n}\n\nfunction MentraMark({color}: {color: string}) {\n return (\n <Svg width={33} height={18} viewBox=\"0 0 50 27\" fill=\"none\">\n <Rect y={14.8072} width={11.8457} height={11.8457} fill={color} />\n <Path d=\"M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z\" fill={color} />\n <Path d=\"M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z\" fill={color} />\n </Svg>\n )\n}\n\nfunction FlowIcon({colors, name}: {colors: MentraLiveOtaFlowTheme; name: FlowPageProps[\"icon\"]}) {\n const color = name === \"alert\" || name === \"bluetooth\" ? colors.error : colors.primary\n const glyph =\n name === \"check\" ? \"✓\" : name === \"alert\" ? \"!\" : name === \"settings\" ? \"⚙\" : name === \"bluetooth\" ? \"⌁\" : \"↓\"\n return <Text style={[styles.icon, {color}]}>{glyph}</Text>\n}\n\nconst styles = StyleSheet.create({\n safeArea: {flex: 1},\n header: {\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 48,\n justifyContent: \"space-between\",\n paddingHorizontal: 20,\n },\n page: {flex: 1, paddingBottom: 24, paddingHorizontal: 24},\n contentScroll: {flex: 1},\n centerContent: {alignItems: \"center\", flexGrow: 1, gap: 16, justifyContent: \"center\"},\n topContent: {justifyContent: \"flex-start\", paddingBottom: 16, paddingTop: 12},\n actionSpacer: {height: 48},\n actions: {gap: 12},\n icon: {fontSize: 64, fontWeight: \"500\", lineHeight: 72, textAlign: \"center\"},\n title: {fontSize: 20, fontWeight: \"600\", textAlign: \"center\"},\n body: {fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: \"center\"},\n percent: {fontSize: 30, fontVariant: [\"tabular-nums\"], fontWeight: \"700\"},\n progressTrack: {borderRadius: 4, height: 8, maxWidth: 420, overflow: \"hidden\", width: \"100%\"},\n progressFill: {borderRadius: 4, height: 8},\n changelogCard: {\n borderRadius: 16,\n borderWidth: 1,\n flexGrow: 1,\n gap: 12,\n maxWidth: 420,\n minHeight: 200,\n padding: 16,\n width: \"100%\",\n },\n changelogTitle: {fontSize: 16, fontWeight: \"700\"},\n // Bound the notes themselves so the card can grow for its title, but not for all of the Markdown.\n changelogList: {flexGrow: 1, height: 120, width: \"100%\"},\n changelogContent: {gap: 20, paddingBottom: 4},\n changelogEntry: {gap: 8},\n changelogEntryDivider: {borderTopWidth: StyleSheet.hairlineWidth, paddingTop: 20},\n changelogVersion: {fontSize: 14, fontWeight: \"600\"},\n changelogMarkdownContent: {gap: 10},\n button: {\n alignItems: \"center\",\n borderRadius: 50,\n borderWidth: 1,\n justifyContent: \"center\",\n minHeight: 44,\n paddingHorizontal: 20,\n },\n buttonText: {fontSize: 14, fontWeight: \"500\"},\n})\n"]}
|
|
1
|
+
{"version":3,"file":"MentraLiveOtaFlow.js","sourceRoot":"","sources":["../../src/react/MentraLiveOtaFlow.tsx"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAA;AACpC,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,GAGL,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,WAAW,EAAiD,MAAM,qBA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AE,UAAU,EAAE,KAAK,EAAC;CAC9C,CAAC,CAAA","sourcesContent":["/* eslint-disable react-native/no-raw-text -- BodyText and PercentText are local Text wrappers. */\nimport React, {useMemo} from \"react\"\nimport {\n ActivityIndicator,\n Pressable,\n ScrollView,\n StyleSheet,\n Text,\n View,\n type StyleProp,\n type ViewStyle,\n} from \"react-native\"\nimport {useMarkdown, type MarkedStyles, type useMarkdownHookOptions} from \"react-native-marked\"\nimport {SafeAreaView} from \"react-native-safe-area-context\"\nimport Svg, {Path, Rect} from \"react-native-svg\"\n\nimport {OTA_ERROR_ENGLISH_COPY} from \"../services/OtaErrorMapping\"\nimport {\n MINIMUM_OTA_BATTERY_LEVEL,\n useMentraLiveOta,\n type MentraLiveOtaController,\n type MentraLiveOtaError,\n type MentraLiveOtaFlowPage,\n} from \"./useMentraLiveOta\"\n\nexport type {MentraLiveOtaFlowPage} from \"./useMentraLiveOta\"\n\nexport type MentraLiveOtaFlowTheme = {\n background: string\n border: string\n error: string\n foreground: string\n primary: string\n primaryText: string\n textDim: string\n}\n\nexport type MentraLiveOtaFlowTranslate = (key: string, options?: Record<string, string>) => string\n\nexport type MentraLiveOtaFlowProps = {\n /** Display name used in update copy. */\n deviceName?: string\n /** Entry page. `progress` exists for recovery/deep-link compatibility. */\n initialPage?: MentraLiveOtaFlowPage\n /** Start the OTA-only projections. Full Engine hosts should pass false. */\n initializeRuntime?: boolean\n /** Called after the final check or when the user leaves an optional update. */\n onFinished: () => void\n /** Host-owned Wi-Fi setup for glasses that do not support hotspot OTA. */\n onOpenWifiSetup: () => void\n /** Lets a host coordinate its global connection overlay with OTA progress and firmware restarts. */\n onFirmwareRestartingChange?: (restarting: boolean, progressActive: boolean) => void\n /** Enables the existing developer-only escape hatches. */\n allowDevSkip?: boolean\n /** Enables the existing super-mode interrupted-session escape hatch. */\n superMode?: boolean\n /** Optional host localization. Defaults to the Mentra App English OTA copy. */\n translate?: MentraLiveOtaFlowTranslate\n /** Optional host theme. Both hosts use the same layout and state machine. */\n theme?: Partial<MentraLiveOtaFlowTheme>\n style?: StyleProp<ViewStyle>\n}\n\nconst DEFAULT_THEME: MentraLiveOtaFlowTheme = {\n background: \"#FFFFFF\",\n border: \"#D7DFDA\",\n error: \"#C43131\",\n foreground: \"#0E2C1A\",\n primary: \"#00B869\",\n primaryText: \"#FFFFFF\",\n textDim: \"#66736B\",\n}\n\nconst ENGLISH_COPY: Record<string, string> = {\n \"ota:downloadingToPhone\": \"Downloading update to phone...\",\n \"ota:startingGlassesHotspot\": \"Starting glasses hotspot...\",\n \"ota:connectingPhoneToGlasses\": \"Connecting phone to glasses...\",\n \"ota:startingHotspotUpdate\": \"Starting update...\",\n \"ota:transferringToGlasses\": \"Transferring update to glasses...\",\n \"ota:installingOnGlasses\": \"Installing update on glasses...\",\n \"ota:componentApk\": \"Glasses software\",\n \"ota:componentMtk\": \"System firmware\",\n \"ota:componentBes\": \"Bluetooth firmware\",\n \"ota:updateFile\": \"File {{current}} of {{total}} · {{component}}\",\n \"ota:updatePart\": \"Update {{current}} of {{total}} · {{component}}\",\n \"ota:phoneFileProgress\": \"Each file downloads separately. Progress is for the current file.\",\n \"ota:transferFileProgress\": \"Progress is for this file’s transfer from your phone.\",\n\n \"common:continue\": \"Continue\",\n \"common:done\": \"Done\",\n \"ota:checkingForUpdates\": \"Checking for updates\",\n \"ota:checkingForUpdatesMessage\":\n \"Connected devices will perform automatic updates. Automatic updates can be disabled in Device Settings\",\n \"ota:finishingUpdate\": \"Finishing your update\",\n \"ota:checkingAdditionalUpdates\": \"Checking whether your glasses need any additional updates.\",\n \"ota:updateAvailable\": \"{{deviceName}} Update Available\",\n \"ota:batteryRequiredTitle\": \"Charge {{deviceName}} to Update\",\n \"ota:batteryRequiredMessage\":\n \"{{deviceName}} is currently at {{batteryLevel}}%. Charge it to at least {{minimumBatteryLevel}}% before updating.\",\n \"ota:batteryRequiredLiveUpdate\": \"This screen will update automatically as the battery charges.\",\n \"ota:updateConnectWifi\": \"Connect your {{deviceName}} to WiFi to install the update.\",\n \"ota:wifiRequiredTitle\": \"WiFi Needed for Update\",\n \"ota:updateDescription\":\n \"A new update is available for your glasses. We recommend updating now for the best experience.\",\n \"ota:updateSequenceMessage\":\n \"Your glasses may install more than one update and restart several times. Keep them nearby until finished.\",\n \"ota:releaseTransition\": \"{{fromVersion}} → {{toVersion}}\",\n \"ota:releaseTransitionUnknown\": \"Current version unknown → {{toVersion}}\",\n \"ota:updatedToVersion\": \"Updated to {{version}}\",\n \"ota:downgradeAvailable\": \"{{deviceName}} Version Change Required\",\n \"ota:downgradeDescription\":\n \"This app requires an earlier glasses software version. Your photos and videos will be preserved, but glasses settings will be reset and restored automatically after the change.\",\n \"ota:updateNow\": \"Update Now\",\n \"ota:setupWifi\": \"Setup WiFi\",\n \"ota:updateLater\": \"Later\",\n \"ota:updateComplete\": \"Update complete\",\n \"ota:whatsNew\": \"What's new\",\n \"ota:upToDate\": \"Up To Date\",\n \"ota:devBuild\": \"Development Build\",\n \"ota:devBuildNoOta\":\n \"This mobile app is a development build, so automatic glasses updates are disabled. Use the developer settings manifest override to update them manually.\",\n \"ota:unofficialClient\": \"Updates Blocked\",\n \"ota:unofficialClientNoOta\":\n \"Your glasses are running a sideloaded client, so updates are blocked. Restore the stock client to update them.\",\n \"ota:unofficialClientNoOtaNamed\":\n \"Your glasses are running a sideloaded client ({{packageName}}), so updates are blocked. Restore the stock client to update them.\",\n \"ota:noUpdatesAvailable\": \"Your glasses are running the latest version.\",\n \"ota:checkFailed\": \"Check Failed\",\n \"ota:checkFailedMessage\": \"Couldn't check for updates. Please check your connection and try again.\",\n \"ota:updateInfoUnavailable\": \"Update Info Unavailable\",\n \"ota:updateInfoUnavailableMessage\":\n \"Update information for this version of the app is unavailable. Please check the app store for a newer version of the Mentra App.\",\n \"ota:downgradeDuration\": \"Your glasses will restart twice — this may take up to 2 minutes.\",\n \"ota:versionChangeRestarting\": \"Installing a different version…\",\n \"ota:versionChangeVerifying\": \"Verifying your glasses…\",\n \"ota:versionChangeKeepNearby\": \"Keep your glasses nearby and connected. They will restart on their own.\",\n \"ota:restartingGlasses\": \"Restarting {{deviceName}}…\",\n \"ota:restartingGlassesMessage\":\n \"The update is installed. Keep your glasses nearby and leave this screen open while they finish starting.\",\n \"ota:restartingGlassesAutomatic\": \"We'll continue automatically when they're ready.\",\n \"ota:versionChangeComplete\": \"Version Change Complete\",\n \"ota:versionChangeCompleteMessage\":\n \"Your glasses are now on the required version. Their settings were reset and are being restored automatically.\",\n \"ota:versionChangeFirmwarePassComplete\": \"Firmware updated\",\n \"ota:versionChangeFirmwarePassCompleteMessage\":\n \"Your glasses restarted with new firmware. One more step: they'll now continue to the required version.\",\n \"ota:updateFailed\": \"Update Failed\",\n ...OTA_ERROR_ENGLISH_COPY,\n}\n\nconst componentCopyKey = {\n apk: \"ota:componentApk\",\n mtk: \"ota:componentMtk\",\n bes: \"ota:componentBes\",\n} as const\n\n/**\n * Copy for the failed screen: the translated copy key when the failure maps to one,\n * otherwise the engine's English message (phone-side watchdog and preflight text).\n */\nfunction failureMessage(error: MentraLiveOtaError | null, translate: MentraLiveOtaFlowTranslate): string {\n if (!error) return translate(\"ota:errorGeneric\")\n return error.copyKey ? translate(error.copyKey) : error.message\n}\n\nfunction defaultTranslate(key: string, options?: Record<string, string>): string {\n let value = Object.prototype.hasOwnProperty.call(ENGLISH_COPY, key) ? ENGLISH_COPY[key] : key\n for (const [name, replacement] of Object.entries(options ?? {})) {\n value = value.replaceAll(`{{${name}}}`, replacement)\n }\n return value\n}\n\nexport function MentraLiveOtaFlow({\n allowDevSkip = typeof __DEV__ !== \"undefined\" && __DEV__,\n deviceName = \"Mentra Live\",\n initialPage = \"check\",\n initializeRuntime = true,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n style,\n superMode = false,\n theme,\n translate = defaultTranslate,\n}: MentraLiveOtaFlowProps) {\n const colors = useMemo(() => ({...DEFAULT_THEME, ...theme}), [theme])\n const controller = useMentraLiveOta({\n initialPage,\n initializeRuntime,\n onFinished,\n onFirmwareRestartingChange,\n onOpenWifiSetup,\n })\n\n return (\n <SafeAreaView style={[styles.safeArea, {backgroundColor: colors.background}, style]}>\n <View style={styles.header}>\n <View />\n <MentraMark color={colors.primary} />\n </View>\n <OtaFlowContent\n allowDevSkip={allowDevSkip}\n colors={colors}\n controller={controller}\n deviceName={deviceName}\n superMode={superMode}\n translate={translate}\n />\n </SafeAreaView>\n )\n}\n\nfunction OtaFlowContent({\n allowDevSkip,\n colors,\n controller,\n deviceName,\n superMode,\n translate,\n}: {\n allowDevSkip: boolean\n colors: MentraLiveOtaFlowTheme\n controller: MentraLiveOtaController\n deviceName: string\n superMode: boolean\n translate: MentraLiveOtaFlowTranslate\n}) {\n const {state} = controller\n\n if (state.screen === \"initializing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"checking\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:checkingForUpdates\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingForUpdatesMessage\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"battery_required\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} disabled label={translate(\"ota:updateNow\")} onPress={controller.install} />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:batteryRequiredTitle\", {deviceName})}>\n <BodyText colors={colors}>\n {translate(\"ota:batteryRequiredMessage\", {\n batteryLevel: String(state.batteryLevel),\n deviceName,\n minimumBatteryLevel: String(MINIMUM_OTA_BATTERY_LEVEL),\n })}\n </BodyText>\n <BodyText colors={colors}>{translate(\"ota:batteryRequiredLiveUpdate\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"finishing\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:finishingUpdate\")}>\n <BodyText colors={colors}>{translate(\"ota:checkingAdditionalUpdates\")}</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_available\" || state.screen === \"wifi_required\") {\n const titleKey =\n state.screen === \"wifi_required\"\n ? \"ota:wifiRequiredTitle\"\n : state.versionChange\n ? \"ota:downgradeAvailable\"\n : \"ota:updateAvailable\"\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(titleKey, {deviceName})}\n actions={\n <>\n <FlowButton\n colors={colors}\n disabled={!state.wifiStatusKnown}\n label={translate(state.screen === \"wifi_required\" ? \"ota:setupWifi\" : \"ota:updateNow\")}\n onPress={state.screen === \"wifi_required\" ? controller.openWifiSetup : controller.install}\n />\n {state.canDismiss ? (\n <FlowButton colors={colors} label={translate(\"ota:updateLater\")} onPress={controller.finish} secondary />\n ) : null}\n {allowDevSkip && state.updateRequired ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {state.releaseTransition.fromVersion\n ? translate(\"ota:releaseTransition\", {\n fromVersion: state.releaseTransition.fromVersion,\n toVersion: state.releaseTransition.toVersion,\n })\n : translate(\"ota:releaseTransitionUnknown\", {toVersion: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <BodyText colors={colors}>\n {state.screen === \"wifi_required\"\n ? translate(\"ota:updateConnectWifi\", {deviceName})\n : translate(state.versionChange ? \"ota:downgradeDescription\" : \"ota:updateDescription\")}\n </BodyText>\n <BodyText colors={colors}>{translate(\"ota:updateSequenceMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"dev_build\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"settings\"\n title={translate(\"ota:devBuild\")}>\n <BodyText colors={colors}>{translate(\"ota:devBuildNoOta\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"unofficial_client\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"settings\"\n title={translate(\"ota:unofficialClient\")}>\n <BodyText colors={colors}>\n {state.glassesPackageName\n ? translate(\"ota:unofficialClientNoOtaNamed\", {packageName: state.glassesPackageName})\n : translate(\"ota:unofficialClientNoOta\")}\n </BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"up_to_date\") {\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={translate(state.completedUpdate ? \"common:done\" : \"common:continue\")}\n onPress={controller.finish}\n />\n }\n colors={colors}\n contentAlignment={state.changelogs.length > 0 ? \"top\" : \"center\"}\n icon=\"check\"\n title={translate(state.completedUpdate ? \"ota:updateComplete\" : \"ota:upToDate\")}>\n <BodyText colors={colors}>{translate(\"ota:noUpdatesAvailable\")}</BodyText>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {translate(\"ota:updatedToVersion\", {version: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <ChangelogList changelogs={state.changelogs} colors={colors} title={translate(\"ota:whatsNew\")} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"update_info_unavailable\") {\n return (\n <FlowPage\n actions={<FlowButton colors={colors} label={translate(\"common:continue\")} onPress={controller.finish} />}\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:updateInfoUnavailable\")}>\n <BodyText colors={colors}>{translate(\"ota:updateInfoUnavailableMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"check_failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton colors={colors} label=\"Retry\" onPress={controller.retryCheck} />\n {allowDevSkip ? (\n <FlowButton colors={colors} label=\"Skip (dev only)\" onPress={controller.finish} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:checkFailed\")}>\n <BodyText colors={colors}>{translate(\"ota:checkFailedMessage\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.versionChangePhase === \"restarting\" || state.versionChangePhase === \"verifying\") {\n return (\n <FlowPage\n colors={colors}\n icon=\"download\"\n title={translate(\n state.versionChangePhase === \"verifying\" ? \"ota:versionChangeVerifying\" : \"ota:versionChangeRestarting\",\n )}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:versionChangeKeepNearby\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"starting\" || state.screen === \"preparing_hotspot\") {\n const title = translate(\n state.hotspotPhase === \"downloading\"\n ? \"ota:downloadingToPhone\"\n : state.hotspotPhase === \"starting_hotspot\"\n ? \"ota:startingGlassesHotspot\"\n : state.hotspotPhase === \"joining_hotspot\"\n ? \"ota:connectingPhoneToGlasses\"\n : \"ota:startingHotspotUpdate\",\n )\n const artifact = state.hotspotPhase === \"downloading\" ? state.hotspotArtifact : null\n return (\n <FlowPage colors={colors} icon=\"download\" title={title}>\n {artifact ? (\n <BodyText colors={colors}>\n {translate(\"ota:updateFile\", {\n current: String(artifact.index + 1),\n total: String(artifact.totalCount),\n component: translate(componentCopyKey[artifact.kind]),\n })}\n </BodyText>\n ) : null}\n {state.hotspotPhase === \"downloading\" && state.hotspotArtifactPercent !== null ? (\n <PercentText colors={colors} percent={state.hotspotArtifactPercent} />\n ) : null}\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n {state.hotspotPhase === \"downloading\" ? (\n <BodyText colors={colors}>{translate(\"ota:phoneFileProgress\")}</BodyText>\n ) : null}\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"updating\") {\n const hotspot = state.transport === \"hotspot\"\n const title = hotspot\n ? translate(state.phase === \"download\" ? \"ota:transferringToGlasses\" : \"ota:installingOnGlasses\")\n : state.phase === \"download\"\n ? \"Downloading...\"\n : \"Installing...\"\n const component = state.step ? translate(componentCopyKey[state.step]) : null\n const hasStepCount =\n state.currentStep !== null &&\n state.totalSteps !== null &&\n state.currentStep > 0 &&\n state.currentStep <= state.totalSteps\n return (\n <FlowPage colors={colors} icon=\"download\" title={title}>\n {hotspot && component ? (\n <BodyText colors={colors}>\n {hasStepCount\n ? translate(\"ota:updatePart\", {\n current: String(state.currentStep),\n total: String(state.totalSteps),\n component,\n })\n : component}\n </BodyText>\n ) : null}\n {state.installingApkOnly ? (\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n ) : (\n <>\n <PercentText colors={colors} percent={state.progress ?? 0} />\n <View style={[styles.progressTrack, {backgroundColor: colors.border}]}>\n <View\n style={[styles.progressFill, {backgroundColor: colors.primary, width: `${state.progress ?? 0}%`}]}\n />\n </View>\n </>\n )}\n <BodyText colors={colors}>Do not disconnect your glasses</BodyText>\n {hotspot && state.phase === \"download\" ? (\n <BodyText colors={colors}>{translate(\"ota:transferFileProgress\")}</BodyText>\n ) : null}\n {state.versionChange && state.phase === \"install\" ? (\n <BodyText colors={colors}>{translate(\"ota:downgradeDuration\")}</BodyText>\n ) : null}\n </FlowPage>\n )\n }\n\n if (state.screen === \"restarting\") {\n return (\n <FlowPage colors={colors} icon=\"download\" title={translate(\"ota:restartingGlasses\", {deviceName})}>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n <BodyText colors={colors}>{translate(\"ota:restartingGlassesMessage\")}</BodyText>\n <BodyText colors={colors}>{translate(\"ota:restartingGlassesAutomatic\")}</BodyText>\n </FlowPage>\n )\n }\n\n if (state.screen === \"complete\") {\n const title = state.versionChangeConverged\n ? translate(\"ota:versionChangeComplete\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassComplete\")\n : \"Update complete!\"\n const message = state.versionChangeConverged\n ? translate(\"ota:versionChangeCompleteMessage\")\n : state.versionChange\n ? translate(\"ota:versionChangeFirmwarePassCompleteMessage\")\n : \"Your glasses are up to date.\"\n return (\n <FlowPage\n actions={\n <FlowButton\n colors={colors}\n label={state.versionChange && !state.versionChangeConverged ? \"Continue\" : \"Done\"}\n onPress={controller.finish}\n />\n }\n colors={colors}\n contentAlignment={state.changelogs.length > 0 ? \"top\" : \"center\"}\n icon=\"check\"\n title={title}>\n <BodyText colors={colors}>{message}</BodyText>\n {state.releaseTransition ? (\n <BodyText colors={colors}>\n {translate(\"ota:updatedToVersion\", {version: state.releaseTransition.toVersion})}\n </BodyText>\n ) : null}\n <ChangelogList changelogs={state.changelogs} colors={colors} title={translate(\"ota:whatsNew\")} />\n </FlowPage>\n )\n }\n\n if (state.screen === \"failed\") {\n return (\n <FlowPage\n actions={\n <>\n <FlowButton\n colors={colors}\n label={state.canRetry ? \"Retry\" : \"Done\"}\n onPress={state.canRetry ? controller.retryInstall : controller.finish}\n />\n {state.canOpenWifiSetup ? (\n <FlowButton colors={colors} label=\"Change WiFi\" onPress={controller.openWifiSetup} secondary />\n ) : null}\n </>\n }\n colors={colors}\n icon=\"alert\"\n title={translate(\"ota:updateFailed\")}>\n <BodyText colors={colors}>{failureMessage(state.error, translate)}</BodyText>\n {state.error?.glassesCode ? (\n <Text style={[styles.errorCode, {color: colors.textDim}]} testID=\"ota-error-code\">\n {translate(\"ota:errorCode\", {code: state.error.glassesCode})}\n </Text>\n ) : null}\n </FlowPage>\n )\n }\n\n return (\n <FlowPage\n actions={\n superMode ? (\n <FlowButton colors={colors} label=\"Skip (super)\" onPress={controller.discard} secondary />\n ) : undefined\n }\n colors={colors}\n icon=\"bluetooth\"\n title=\"Glasses disconnected\">\n <BodyText colors={colors}>Reconnecting...</BodyText>\n <ActivityIndicator size=\"large\" color={colors.foreground} />\n </FlowPage>\n )\n}\n\ntype FlowPageProps = {\n actions?: React.ReactNode\n children?: React.ReactNode\n colors: MentraLiveOtaFlowTheme\n contentAlignment?: \"center\" | \"top\"\n icon: \"alert\" | \"bluetooth\" | \"check\" | \"download\" | \"settings\"\n title: string\n}\n\nfunction FlowPage({actions, children, colors, contentAlignment = \"center\", icon, title}: FlowPageProps) {\n return (\n <View style={styles.page} testID=\"mentra-live-ota-flow\">\n <ScrollView\n contentContainerStyle={[styles.centerContent, contentAlignment === \"top\" && styles.topContent]}\n nestedScrollEnabled\n style={styles.contentScroll}\n testID=\"ota-page-scroll\">\n <FlowIcon colors={colors} name={icon} />\n <Text style={[styles.title, {color: colors.foreground}]}>{title}</Text>\n {children}\n </ScrollView>\n {actions ? <View style={styles.actions}>{actions}</View> : <View style={styles.actionSpacer} />}\n </View>\n )\n}\n\nfunction BodyText({children, colors}: {children: React.ReactNode; colors: MentraLiveOtaFlowTheme}) {\n return <Text style={[styles.body, {color: colors.textDim}]}>{children}</Text>\n}\n\nfunction PercentText({colors, percent}: {colors: MentraLiveOtaFlowTheme; percent: number}) {\n return <Text style={[styles.percent, {color: colors.primary}]}>{Math.round(percent)}%</Text>\n}\n\nfunction ChangelogMarkdown({colors, markdown}: {colors: MentraLiveOtaFlowTheme; markdown: string}) {\n const markdownStyles = useMemo<MarkedStyles>(\n () => ({\n blockquote: {\n borderLeftColor: colors.primary,\n borderLeftWidth: 3,\n marginVertical: 2,\n opacity: 1,\n paddingLeft: 12,\n },\n code: {\n backgroundColor: colors.background,\n borderColor: colors.border,\n borderRadius: 8,\n borderWidth: 1,\n padding: 12,\n },\n codespan: {\n backgroundColor: colors.border,\n color: colors.foreground,\n fontFamily: \"monospace\",\n fontSize: 13,\n fontStyle: \"normal\",\n fontWeight: \"400\",\n },\n em: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n h1: {\n borderBottomWidth: 0,\n color: colors.foreground,\n fontSize: 18,\n fontWeight: \"700\",\n lineHeight: 24,\n marginVertical: 0,\n paddingBottom: 0,\n },\n h2: {\n borderBottomWidth: 0,\n color: colors.foreground,\n fontSize: 17,\n fontWeight: \"700\",\n lineHeight: 23,\n marginVertical: 0,\n paddingBottom: 0,\n },\n h3: {color: colors.foreground, fontSize: 16, fontWeight: \"700\", lineHeight: 22, marginVertical: 0},\n h4: {color: colors.foreground, fontSize: 15, fontWeight: \"700\", lineHeight: 21, marginVertical: 0},\n h5: {color: colors.foreground, fontSize: 14, fontWeight: \"700\", lineHeight: 20, marginVertical: 0},\n h6: {color: colors.textDim, fontSize: 14, fontWeight: \"600\", lineHeight: 20, marginVertical: 0},\n hr: {borderBottomColor: colors.border, marginVertical: 2},\n image: {borderRadius: 8},\n li: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n link: {\n color: colors.primary,\n fontSize: 14,\n fontStyle: \"normal\",\n lineHeight: 20,\n textDecorationLine: \"underline\",\n },\n paragraph: {paddingVertical: 0},\n strikethrough: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n strong: {color: colors.foreground, fontSize: 14, fontWeight: \"700\", lineHeight: 20},\n table: {borderColor: colors.border, borderRadius: 8},\n tableCell: {padding: 8},\n text: {color: colors.textDim, fontSize: 14, lineHeight: 20},\n }),\n [colors],\n )\n const markdownTheme = useMemo<NonNullable<useMarkdownHookOptions[\"theme\"]>>(\n () => ({\n colors: {\n background: colors.background,\n border: colors.border,\n code: colors.border,\n link: colors.primary,\n text: colors.textDim,\n },\n }),\n [colors],\n )\n const elements = useMarkdown(markdown, {colorScheme: \"light\", styles: markdownStyles, theme: markdownTheme})\n\n return (\n <View style={styles.changelogMarkdownContent} testID=\"ota-changelog-markdown\">\n {elements}\n </View>\n )\n}\n\nexport function ChangelogList({\n changelogs,\n colors,\n title,\n}: {\n changelogs: MentraLiveOtaController[\"state\"][\"changelogs\"]\n colors: MentraLiveOtaFlowTheme\n title: string\n}) {\n if (changelogs.length === 0) return null\n\n return (\n <View style={[styles.changelogCard, {borderColor: colors.border}]} testID=\"ota-changelog-card\">\n <Text style={[styles.changelogTitle, {color: colors.foreground}]}>{title}</Text>\n <ScrollView\n contentContainerStyle={styles.changelogContent}\n nestedScrollEnabled\n persistentScrollbar\n showsVerticalScrollIndicator\n style={styles.changelogList}\n testID=\"ota-changelog-scroll\">\n {changelogs.map((entry, index) => (\n <View\n key={entry.version}\n style={[\n styles.changelogEntry,\n index > 0 && styles.changelogEntryDivider,\n index > 0 && {borderTopColor: colors.border},\n ]}>\n <Text selectable style={[styles.changelogVersion, {color: colors.foreground}]}>\n {entry.version}\n </Text>\n <ChangelogMarkdown colors={colors} markdown={entry.markdown} />\n </View>\n ))}\n </ScrollView>\n </View>\n )\n}\n\nfunction FlowButton({\n colors,\n disabled = false,\n label,\n onPress,\n secondary = false,\n}: {\n colors: MentraLiveOtaFlowTheme\n disabled?: boolean\n label: string\n onPress: () => void\n secondary?: boolean\n}) {\n return (\n <Pressable\n accessibilityRole=\"button\"\n disabled={disabled}\n onPress={onPress}\n style={({pressed}) => [\n styles.button,\n {\n backgroundColor: secondary ? colors.background : colors.foreground,\n borderColor: secondary ? colors.border : colors.foreground,\n opacity: disabled ? 0.45 : pressed ? 0.75 : 1,\n },\n ]}\n testID={`button-${label}`}>\n <Text style={[styles.buttonText, {color: secondary ? colors.foreground : colors.background}]}>{label}</Text>\n </Pressable>\n )\n}\n\nfunction MentraMark({color}: {color: string}) {\n return (\n <Svg width={33} height={18} viewBox=\"0 0 50 27\" fill=\"none\">\n <Rect y={14.8072} width={11.8457} height={11.8457} fill={color} />\n <Path d=\"M9.36639 0L30.7163 14.8072V26.6529L9.36639 11.8457V0Z\" fill={color} />\n <Path d=\"M28.6501 0L50 14.8072V26.6529L28.6501 11.8457V0Z\" fill={color} />\n </Svg>\n )\n}\n\nfunction FlowIcon({colors, name}: {colors: MentraLiveOtaFlowTheme; name: FlowPageProps[\"icon\"]}) {\n const color = name === \"alert\" || name === \"bluetooth\" ? colors.error : colors.primary\n const glyph =\n name === \"check\" ? \"✓\" : name === \"alert\" ? \"!\" : name === \"settings\" ? \"⚙\" : name === \"bluetooth\" ? \"⌁\" : \"↓\"\n return <Text style={[styles.icon, {color}]}>{glyph}</Text>\n}\n\nconst styles = StyleSheet.create({\n safeArea: {flex: 1},\n header: {\n alignItems: \"center\",\n flexDirection: \"row\",\n height: 48,\n justifyContent: \"space-between\",\n paddingHorizontal: 20,\n },\n page: {flex: 1, paddingBottom: 24, paddingHorizontal: 24},\n contentScroll: {flex: 1},\n centerContent: {alignItems: \"center\", flexGrow: 1, gap: 16, justifyContent: \"center\"},\n topContent: {justifyContent: \"flex-start\", paddingBottom: 16, paddingTop: 12},\n actionSpacer: {height: 48},\n actions: {gap: 12},\n icon: {fontSize: 64, fontWeight: \"500\", lineHeight: 72, textAlign: \"center\"},\n title: {fontSize: 20, fontWeight: \"600\", textAlign: \"center\"},\n body: {fontSize: 14, lineHeight: 20, maxWidth: 420, textAlign: \"center\"},\n errorCode: {fontSize: 12, fontVariant: [\"tabular-nums\"], lineHeight: 16, opacity: 0.7, textAlign: \"center\"},\n percent: {fontSize: 30, fontVariant: [\"tabular-nums\"], fontWeight: \"700\"},\n progressTrack: {borderRadius: 4, height: 8, maxWidth: 420, overflow: \"hidden\", width: \"100%\"},\n progressFill: {borderRadius: 4, height: 8},\n changelogCard: {\n borderRadius: 16,\n borderWidth: 1,\n flexGrow: 1,\n gap: 12,\n maxWidth: 420,\n minHeight: 200,\n padding: 16,\n width: \"100%\",\n },\n changelogTitle: {fontSize: 16, fontWeight: \"700\"},\n // Bound the notes themselves so the card can grow for its title, but not for all of the Markdown.\n changelogList: {flexGrow: 1, height: 120, width: \"100%\"},\n changelogContent: {gap: 20, paddingBottom: 4},\n changelogEntry: {gap: 8},\n changelogEntryDivider: {borderTopWidth: StyleSheet.hairlineWidth, paddingTop: 20},\n changelogVersion: {fontSize: 14, fontWeight: \"600\"},\n changelogMarkdownContent: {gap: 10},\n button: {\n alignItems: \"center\",\n borderRadius: 50,\n borderWidth: 1,\n justifyContent: \"center\",\n minHeight: 44,\n paddingHorizontal: 20,\n },\n buttonText: {fontSize: 14, fontWeight: \"500\"},\n})\n"]}
|
|
@@ -4,7 +4,19 @@ export type MentraLiveOtaScreen = "initializing" | "checking" | "finishing" | "u
|
|
|
4
4
|
export type MentraLiveOtaErrorCode = "check_failed" | "update_info_unavailable" | "install_failed" | "bes_restart_required";
|
|
5
5
|
export type MentraLiveOtaError = {
|
|
6
6
|
code: MentraLiveOtaErrorCode;
|
|
7
|
+
/** English copy for hosts without localization. */
|
|
7
8
|
message: string;
|
|
9
|
+
/**
|
|
10
|
+
* Copy key for `message` when the failure maps to known copy, so localized hosts can
|
|
11
|
+
* translate it. Null for phone-side watchdog and preflight messages, which are English-only.
|
|
12
|
+
* Optional so host code that builds this type by hand keeps compiling; the hook always sets it.
|
|
13
|
+
*/
|
|
14
|
+
copyKey?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Raw failure code reported by the glasses (`ota_status.error`), for support. Null when the
|
|
17
|
+
* failure originated on the phone. Optional for the same source-compatibility reason.
|
|
18
|
+
*/
|
|
19
|
+
glassesCode?: string | null;
|
|
8
20
|
};
|
|
9
21
|
export type MentraLiveOtaTransport = "wifi" | "hotspot";
|
|
10
22
|
export type MentraLiveOtaHotspotPhase = "idle" | "downloading" | "starting_hotspot" | "joining_hotspot" | "serving";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMentraLiveOta.d.ts","sourceRoot":"","sources":["../../src/react/useMentraLiveOta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useMentraLiveOta.d.ts","sourceRoot":"","sources":["../../src/react/useMentraLiveOta.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAGpD,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,UAAU,CAAA;AAExD,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACd,UAAU,GACV,WAAW,GACX,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,WAAW,GACX,mBAAmB,GACnB,cAAc,GACd,yBAAyB,GACzB,UAAU,GACV,m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