@glassly/engine 0.1.0-dev.99 → 0.2.8-dev.445

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/README.md +28 -0
  2. package/build/engine.d.ts +32 -10
  3. package/build/engine.d.ts.map +1 -1
  4. package/build/engine.js +24 -16
  5. package/build/engine.js.map +1 -1
  6. package/build/facades/dev.d.ts +9 -0
  7. package/build/facades/dev.d.ts.map +1 -1
  8. package/build/facades/dev.js +9 -0
  9. package/build/facades/dev.js.map +1 -1
  10. package/build/facades/display.d.ts +10 -3
  11. package/build/facades/display.d.ts.map +1 -1
  12. package/build/facades/display.js +22 -8
  13. package/build/facades/display.js.map +1 -1
  14. package/build/facades/displayMirror.d.ts +11 -0
  15. package/build/facades/displayMirror.d.ts.map +1 -1
  16. package/build/facades/displayMirror.js +22 -0
  17. package/build/facades/displayMirror.js.map +1 -1
  18. package/build/facades/glasses.d.ts +31 -1
  19. package/build/facades/glasses.d.ts.map +1 -1
  20. package/build/facades/glasses.js +51 -0
  21. package/build/facades/glasses.js.map +1 -1
  22. package/build/facades/memory.d.ts +0 -6
  23. package/build/facades/memory.d.ts.map +1 -1
  24. package/build/facades/memory.js +1 -9
  25. package/build/facades/memory.js.map +1 -1
  26. package/build/facades/miniapps.d.ts +3 -1
  27. package/build/facades/miniapps.d.ts.map +1 -1
  28. package/build/facades/miniapps.js +3 -1
  29. package/build/facades/miniapps.js.map +1 -1
  30. package/build/facades/pairing.d.ts.map +1 -1
  31. package/build/facades/pairing.js +5 -4
  32. package/build/facades/pairing.js.map +1 -1
  33. package/build/facades/permissions.d.ts +2 -0
  34. package/build/facades/permissions.d.ts.map +1 -1
  35. package/build/facades/permissions.js +48 -0
  36. package/build/facades/permissions.js.map +1 -1
  37. package/build/facades/phoneNotifications.d.ts +20 -9
  38. package/build/facades/phoneNotifications.d.ts.map +1 -1
  39. package/build/facades/phoneNotifications.js +33 -26
  40. package/build/facades/phoneNotifications.js.map +1 -1
  41. package/build/facades/settings.d.ts.map +1 -1
  42. package/build/facades/settings.js +1 -2
  43. package/build/facades/settings.js.map +1 -1
  44. package/build/generated/releaseMetadata.js +4 -4
  45. package/build/generated/releaseMetadata.js.map +1 -1
  46. package/build/index.d.ts +6 -4
  47. package/build/index.d.ts.map +1 -1
  48. package/build/index.js +5 -4
  49. package/build/index.js.map +1 -1
  50. package/build/react/MentraLiveOtaFlow.js +2 -2
  51. package/build/react/MentraLiveOtaFlow.js.map +1 -1
  52. package/build/react/useMentraLiveOta.d.ts.map +1 -1
  53. package/build/react/useMentraLiveOta.js +8 -7
  54. package/build/react/useMentraLiveOta.js.map +1 -1
  55. package/build/runtime/config.d.ts +1 -1
  56. package/build/runtime/config.d.ts.map +1 -1
  57. package/build/runtime/config.js.map +1 -1
  58. package/build/services/AppRegistry.d.ts +4 -1
  59. package/build/services/AppRegistry.d.ts.map +1 -1
  60. package/build/services/AppRegistry.js +21 -1
  61. package/build/services/AppRegistry.js.map +1 -1
  62. package/build/services/BlobStore.d.ts +2 -2
  63. package/build/services/BlobStore.js +3 -3
  64. package/build/services/BlobStore.js.map +1 -1
  65. package/build/services/CloudClientService.d.ts +7 -3
  66. package/build/services/CloudClientService.d.ts.map +1 -1
  67. package/build/services/CloudClientService.js +34 -9
  68. package/build/services/CloudClientService.js.map +1 -1
  69. package/build/services/DevServerBridge.d.ts +1 -18
  70. package/build/services/DevServerBridge.d.ts.map +1 -1
  71. package/build/services/DevServerBridge.js +9 -8
  72. package/build/services/DevServerBridge.js.map +1 -1
  73. package/build/services/DeviceEventRouter.d.ts.map +1 -1
  74. package/build/services/DeviceEventRouter.js +58 -71
  75. package/build/services/DeviceEventRouter.js.map +1 -1
  76. package/build/services/DisplayDiagnostics.d.ts +5 -0
  77. package/build/services/DisplayDiagnostics.d.ts.map +1 -0
  78. package/build/services/DisplayDiagnostics.js +105 -0
  79. package/build/services/DisplayDiagnostics.js.map +1 -0
  80. package/build/services/DisplayProcessor.d.ts +6 -7
  81. package/build/services/DisplayProcessor.d.ts.map +1 -1
  82. package/build/services/DisplayProcessor.js +17 -45
  83. package/build/services/DisplayProcessor.js.map +1 -1
  84. package/build/services/GestureDotsService.d.ts +10 -4
  85. package/build/services/GestureDotsService.d.ts.map +1 -1
  86. package/build/services/GestureDotsService.js +70 -16
  87. package/build/services/GestureDotsService.js.map +1 -1
  88. package/build/services/GlassesKeyboardInput.d.ts +77 -0
  89. package/build/services/GlassesKeyboardInput.d.ts.map +1 -0
  90. package/build/services/GlassesKeyboardInput.js +261 -0
  91. package/build/services/GlassesKeyboardInput.js.map +1 -0
  92. package/build/services/GlassesSensorService.d.ts +47 -0
  93. package/build/services/GlassesSensorService.d.ts.map +1 -0
  94. package/build/services/GlassesSensorService.js +242 -0
  95. package/build/services/GlassesSensorService.js.map +1 -0
  96. package/build/services/GlassesTouchInput.d.ts +14 -0
  97. package/build/services/GlassesTouchInput.d.ts.map +1 -0
  98. package/build/services/GlassesTouchInput.js +107 -0
  99. package/build/services/GlassesTouchInput.js.map +1 -0
  100. package/build/services/HeadingService.d.ts +0 -6
  101. package/build/services/HeadingService.d.ts.map +1 -1
  102. package/build/services/HeadingService.js +0 -27
  103. package/build/services/HeadingService.js.map +1 -1
  104. package/build/services/HotspotShutdown.d.ts.map +1 -1
  105. package/build/services/HotspotShutdown.js +2 -1
  106. package/build/services/HotspotShutdown.js.map +1 -1
  107. package/build/services/JSCrashloopReportService.js +2 -2
  108. package/build/services/JSCrashloopReportService.js.map +1 -1
  109. package/build/services/JSRouter.d.ts +6 -4
  110. package/build/services/JSRouter.d.ts.map +1 -1
  111. package/build/services/JSRouter.js +15 -13
  112. package/build/services/JSRouter.js.map +1 -1
  113. package/build/services/LocalDisplayManager.d.ts +35 -7
  114. package/build/services/LocalDisplayManager.d.ts.map +1 -1
  115. package/build/services/LocalDisplayManager.js +105 -27
  116. package/build/services/LocalDisplayManager.js.map +1 -1
  117. package/build/services/LocalMiniappDataMigration.d.ts +1 -1
  118. package/build/services/LocalMiniappDataMigration.js +1 -1
  119. package/build/services/LocalMiniappDataMigration.js.map +1 -1
  120. package/build/services/LocalMiniappRuntime.d.ts +64 -11
  121. package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
  122. package/build/services/LocalMiniappRuntime.js +441 -35
  123. package/build/services/LocalMiniappRuntime.js.map +1 -1
  124. package/build/services/LocalSttFallbackCoordinator.d.ts +3 -0
  125. package/build/services/LocalSttFallbackCoordinator.d.ts.map +1 -1
  126. package/build/services/LocalSttFallbackCoordinator.js +27 -8
  127. package/build/services/LocalSttFallbackCoordinator.js.map +1 -1
  128. package/build/services/MemoryStore.d.ts +8 -33
  129. package/build/services/MemoryStore.d.ts.map +1 -1
  130. package/build/services/MemoryStore.js +30 -56
  131. package/build/services/MemoryStore.js.map +1 -1
  132. package/build/services/MiniappEngine.d.ts +3 -3
  133. package/build/services/MiniappEngine.js +7 -7
  134. package/build/services/MiniappEngine.js.map +1 -1
  135. package/build/services/MiniappLauncher.d.ts +8 -0
  136. package/build/services/MiniappLauncher.d.ts.map +1 -1
  137. package/build/services/MiniappLauncher.js +19 -1
  138. package/build/services/MiniappLauncher.js.map +1 -1
  139. package/build/services/MirrorService.d.ts +24 -0
  140. package/build/services/MirrorService.d.ts.map +1 -0
  141. package/build/services/MirrorService.js +132 -0
  142. package/build/services/MirrorService.js.map +1 -0
  143. package/build/services/NativeNavigationService.d.ts +2 -3
  144. package/build/services/NativeNavigationService.d.ts.map +1 -1
  145. package/build/services/NativeNavigationService.js +24 -21
  146. package/build/services/NativeNavigationService.js.map +1 -1
  147. package/build/services/NavigationHandlers.d.ts.map +1 -1
  148. package/build/services/NavigationHandlers.js +10 -5
  149. package/build/services/NavigationHandlers.js.map +1 -1
  150. package/build/services/OtaInstallCoordinator.d.ts.map +1 -1
  151. package/build/services/OtaInstallCoordinator.js +24 -23
  152. package/build/services/OtaInstallCoordinator.js.map +1 -1
  153. package/build/services/PairedGlassesLatch.d.ts +7 -0
  154. package/build/services/PairedGlassesLatch.d.ts.map +1 -0
  155. package/build/services/PairedGlassesLatch.js +38 -0
  156. package/build/services/PairedGlassesLatch.js.map +1 -0
  157. package/build/services/PhoneActivity.d.ts +23 -0
  158. package/build/services/PhoneActivity.d.ts.map +1 -0
  159. package/build/services/PhoneActivity.js +111 -0
  160. package/build/services/PhoneActivity.js.map +1 -0
  161. package/build/services/PhoneCameraFovCoordinator.d.ts.map +1 -1
  162. package/build/services/PhoneCameraFovCoordinator.js +4 -3
  163. package/build/services/PhoneCameraFovCoordinator.js.map +1 -1
  164. package/build/services/PhoneNotificationsSync.d.ts +40 -6
  165. package/build/services/PhoneNotificationsSync.d.ts.map +1 -1
  166. package/build/services/PhoneNotificationsSync.js +160 -84
  167. package/build/services/PhoneNotificationsSync.js.map +1 -1
  168. package/build/services/PhonePhotoCoordinator.d.ts.map +1 -1
  169. package/build/services/PhonePhotoCoordinator.js +6 -5
  170. package/build/services/PhonePhotoCoordinator.js.map +1 -1
  171. package/build/services/PhoneStreamCoordinator.d.ts.map +1 -1
  172. package/build/services/PhoneStreamCoordinator.js +8 -7
  173. package/build/services/PhoneStreamCoordinator.js.map +1 -1
  174. package/build/services/STTModelManager.d.ts +3 -0
  175. package/build/services/STTModelManager.d.ts.map +1 -1
  176. package/build/services/STTModelManager.js +15 -1
  177. package/build/services/STTModelManager.js.map +1 -1
  178. package/build/services/SceneRenderer.d.ts +43 -2
  179. package/build/services/SceneRenderer.d.ts.map +1 -1
  180. package/build/services/SceneRenderer.js +123 -8
  181. package/build/services/SceneRenderer.js.map +1 -1
  182. package/build/services/StreamLifecycleController.d.ts.map +1 -1
  183. package/build/services/StreamLifecycleController.js +6 -14
  184. package/build/services/StreamLifecycleController.js.map +1 -1
  185. package/build/services/TTSModelManager.js +1 -1
  186. package/build/services/TTSModelManager.js.map +1 -1
  187. package/build/services/UIRouter.d.ts +2 -2
  188. package/build/services/UIRouter.js +5 -5
  189. package/build/services/UIRouter.js.map +1 -1
  190. package/build/services/asg/galleryPathMigration.js +1 -1
  191. package/build/services/asg/galleryPathMigration.js.map +1 -1
  192. package/build/services/asg/gallerySyncService.js +2 -2
  193. package/build/services/asg/gallerySyncService.js.map +1 -1
  194. package/build/services/asg/localStorageService.d.ts.map +1 -1
  195. package/build/services/asg/localStorageService.js +3 -3
  196. package/build/services/asg/localStorageService.js.map +1 -1
  197. package/build/services/debug/DashboardOpenTrace.d.ts +32 -0
  198. package/build/services/debug/DashboardOpenTrace.d.ts.map +1 -0
  199. package/build/services/debug/DashboardOpenTrace.js +128 -0
  200. package/build/services/debug/DashboardOpenTrace.js.map +1 -0
  201. package/build/services/debug/dashboardOpenTimeline.d.ts +77 -0
  202. package/build/services/debug/dashboardOpenTimeline.d.ts.map +1 -0
  203. package/build/services/debug/dashboardOpenTimeline.js +195 -0
  204. package/build/services/debug/dashboardOpenTimeline.js.map +1 -0
  205. package/build/services/effectiveCapabilities.d.ts.map +1 -1
  206. package/build/services/effectiveCapabilities.js +25 -13
  207. package/build/services/effectiveCapabilities.js.map +1 -1
  208. package/build/services/gestureClaims.d.ts +34 -15
  209. package/build/services/gestureClaims.d.ts.map +1 -1
  210. package/build/services/gestureClaims.js +42 -21
  211. package/build/services/gestureClaims.js.map +1 -1
  212. package/build/services/manifestFields.d.ts +9 -0
  213. package/build/services/manifestFields.d.ts.map +1 -0
  214. package/build/services/manifestFields.js +26 -0
  215. package/build/services/manifestFields.js.map +1 -0
  216. package/build/services/memoryStoreInstance.d.ts +0 -10
  217. package/build/services/memoryStoreInstance.d.ts.map +1 -1
  218. package/build/services/memoryStoreInstance.js +2 -31
  219. package/build/services/memoryStoreInstance.js.map +1 -1
  220. package/build/services/mirrorSnapshot.d.ts +16 -0
  221. package/build/services/mirrorSnapshot.d.ts.map +1 -0
  222. package/build/services/mirrorSnapshot.js +102 -0
  223. package/build/services/mirrorSnapshot.js.map +1 -0
  224. package/build/services/nativeNavigationGate.d.ts +8 -0
  225. package/build/services/nativeNavigationGate.d.ts.map +1 -0
  226. package/build/services/nativeNavigationGate.js +12 -0
  227. package/build/services/nativeNavigationGate.js.map +1 -0
  228. package/build/services/notificationAppCatalog.d.ts +7 -0
  229. package/build/services/notificationAppCatalog.d.ts.map +1 -0
  230. package/build/services/notificationAppCatalog.js +16 -0
  231. package/build/services/notificationAppCatalog.js.map +1 -0
  232. package/build/services/notifications/notificationPolicy.d.ts +55 -0
  233. package/build/services/notifications/notificationPolicy.d.ts.map +1 -0
  234. package/build/services/notifications/notificationPolicy.js +41 -0
  235. package/build/services/notifications/notificationPolicy.js.map +1 -0
  236. package/build/services/pages/OverlayPages.d.ts +26 -0
  237. package/build/services/pages/OverlayPages.d.ts.map +1 -0
  238. package/build/services/pages/OverlayPages.js +80 -0
  239. package/build/services/pages/OverlayPages.js.map +1 -0
  240. package/build/services/pages/PageHost.d.ts +32 -0
  241. package/build/services/pages/PageHost.d.ts.map +1 -0
  242. package/build/services/pages/PageHost.js +99 -0
  243. package/build/services/pages/PageHost.js.map +1 -0
  244. package/build/services/pages/overlayApps.d.ts +25 -0
  245. package/build/services/pages/overlayApps.d.ts.map +1 -0
  246. package/build/services/pages/overlayApps.js +66 -0
  247. package/build/services/pages/overlayApps.js.map +1 -0
  248. package/build/services/pages/pageEligibility.d.ts +9 -0
  249. package/build/services/pages/pageEligibility.d.ts.map +1 -0
  250. package/build/services/pages/pageEligibility.js +27 -0
  251. package/build/services/pages/pageEligibility.js.map +1 -0
  252. package/build/services/settingsBridge.d.ts +58 -0
  253. package/build/services/settingsBridge.d.ts.map +1 -0
  254. package/build/services/settingsBridge.js +90 -0
  255. package/build/services/settingsBridge.js.map +1 -0
  256. package/build/services/speakerProfileStoreInstance.js +1 -1
  257. package/build/services/speakerProfileStoreInstance.js.map +1 -1
  258. package/build/services/uiShim.d.ts +1 -1
  259. package/build/services/uiShim.js +4 -4
  260. package/build/services/uiShim.js.map +1 -1
  261. package/build/stores/appVisibility.d.ts +28 -0
  262. package/build/stores/appVisibility.d.ts.map +1 -1
  263. package/build/stores/appVisibility.js +34 -0
  264. package/build/stores/appVisibility.js.map +1 -1
  265. package/build/stores/apps.d.ts +13 -0
  266. package/build/stores/apps.d.ts.map +1 -1
  267. package/build/stores/apps.js +66 -12
  268. package/build/stores/apps.js.map +1 -1
  269. package/build/stores/bluetoothSettingKeys.js +1 -1
  270. package/build/stores/bluetoothSettingKeys.js.map +1 -1
  271. package/build/stores/display.d.ts +3 -3
  272. package/build/stores/display.d.ts.map +1 -1
  273. package/build/stores/display.js +16 -4
  274. package/build/stores/display.js.map +1 -1
  275. package/build/stores/glasses.d.ts.map +1 -1
  276. package/build/stores/glasses.js +14 -1
  277. package/build/stores/glasses.js.map +1 -1
  278. package/build/stores/settings.d.ts +1 -0
  279. package/build/stores/settings.d.ts.map +1 -1
  280. package/build/stores/settings.js +170 -44
  281. package/build/stores/settings.js.map +1 -1
  282. package/build/types/applet.d.ts +14 -1
  283. package/build/types/applet.d.ts.map +1 -1
  284. package/build/types/applet.js.map +1 -1
  285. package/build/types/capabilities/even-realities-g2.d.ts.map +1 -1
  286. package/build/types/capabilities/even-realities-g2.js +5 -0
  287. package/build/types/capabilities/even-realities-g2.js.map +1 -1
  288. package/build/types/capabilities/simulated-glasses.d.ts +1 -1
  289. package/build/types/capabilities/simulated-glasses.d.ts.map +1 -1
  290. package/build/types/capabilities/simulated-glasses.js +7 -4
  291. package/build/types/capabilities/simulated-glasses.js.map +1 -1
  292. package/build/types/hardware.d.ts +20 -1
  293. package/build/types/hardware.d.ts.map +1 -1
  294. package/build/types/hardware.js +2 -0
  295. package/build/types/hardware.js.map +1 -1
  296. package/build/types/index.d.ts +1 -0
  297. package/build/types/index.d.ts.map +1 -1
  298. package/build/types/index.js +1 -0
  299. package/build/types/index.js.map +1 -1
  300. package/build/utils/debouncedPatch.d.ts +3 -1
  301. package/build/utils/debouncedPatch.d.ts.map +1 -1
  302. package/build/utils/debouncedPatch.js +6 -3
  303. package/build/utils/debouncedPatch.js.map +1 -1
  304. package/build/utils/devMiniappLaunch.d.ts.map +1 -1
  305. package/build/utils/devMiniappLaunch.js +4 -3
  306. package/build/utils/devMiniappLaunch.js.map +1 -1
  307. package/build/utils/display/measurer/TextMeasurer.d.ts +2 -159
  308. package/build/utils/display/measurer/TextMeasurer.d.ts.map +1 -1
  309. package/build/utils/display/measurer/TextMeasurer.js +2 -272
  310. package/build/utils/display/measurer/TextMeasurer.js.map +1 -1
  311. package/build/utils/display/measurer/script-detection.d.ts +1 -52
  312. package/build/utils/display/measurer/script-detection.d.ts.map +1 -1
  313. package/build/utils/display/measurer/script-detection.js +2 -183
  314. package/build/utils/display/measurer/script-detection.js.map +1 -1
  315. package/build/utils/display/pixelArt.d.ts +3 -0
  316. package/build/utils/display/pixelArt.d.ts.map +1 -0
  317. package/build/utils/display/pixelArt.js +3 -0
  318. package/build/utils/display/pixelArt.js.map +1 -0
  319. package/build/utils/display/profiles/g1.d.ts +1 -32
  320. package/build/utils/display/profiles/g1.d.ts.map +1 -1
  321. package/build/utils/display/profiles/g1.js +2 -212
  322. package/build/utils/display/profiles/g1.js.map +1 -1
  323. package/build/utils/display/profiles/g2.d.ts +1 -12
  324. package/build/utils/display/profiles/g2.d.ts.map +1 -1
  325. package/build/utils/display/profiles/g2.js +2 -33
  326. package/build/utils/display/profiles/g2.js.map +1 -1
  327. package/build/utils/display/profiles/nex.d.ts +1 -9
  328. package/build/utils/display/profiles/nex.d.ts.map +1 -1
  329. package/build/utils/display/profiles/nex.js +2 -149
  330. package/build/utils/display/profiles/nex.js.map +1 -1
  331. package/build/utils/display/profiles/types.d.ts +1 -102
  332. package/build/utils/display/profiles/types.d.ts.map +1 -1
  333. package/build/utils/display/profiles/types.js.map +1 -1
  334. package/build/utils/display/profiles/z100.d.ts +1 -32
  335. package/build/utils/display/profiles/z100.d.ts.map +1 -1
  336. package/build/utils/display/profiles/z100.js +2 -181
  337. package/build/utils/display/profiles/z100.js.map +1 -1
  338. package/build/utils/display/scene/degrade.d.ts.map +1 -1
  339. package/build/utils/display/scene/degrade.js +4 -1
  340. package/build/utils/display/scene/degrade.js.map +1 -1
  341. package/build/utils/display/scene/differ.d.ts +13 -1
  342. package/build/utils/display/scene/differ.d.ts.map +1 -1
  343. package/build/utils/display/scene/differ.js +22 -0
  344. package/build/utils/display/scene/differ.js.map +1 -1
  345. package/build/utils/display/scene/index.d.ts +1 -1
  346. package/build/utils/display/scene/index.d.ts.map +1 -1
  347. package/build/utils/display/scene/index.js.map +1 -1
  348. package/build/utils/display/scene/process.d.ts.map +1 -1
  349. package/build/utils/display/scene/process.js +183 -11
  350. package/build/utils/display/scene/process.js.map +1 -1
  351. package/build/utils/display/scene/store.d.ts +1 -1
  352. package/build/utils/display/scene/store.d.ts.map +1 -1
  353. package/build/utils/display/scene/store.js +0 -0
  354. package/build/utils/display/scene/store.js.map +1 -1
  355. package/build/utils/display/scene/svgPath.d.ts +9 -0
  356. package/build/utils/display/scene/svgPath.d.ts.map +1 -0
  357. package/build/utils/display/scene/svgPath.js +167 -0
  358. package/build/utils/display/scene/svgPath.js.map +1 -0
  359. package/build/utils/display/scene/types.d.ts +2 -142
  360. package/build/utils/display/scene/types.d.ts.map +1 -1
  361. package/build/utils/display/scene/types.js +0 -0
  362. package/build/utils/display/scene/types.js.map +1 -1
  363. package/build/utils/display/wrapper/TextWrapper.d.ts +1 -101
  364. package/build/utils/display/wrapper/TextWrapper.d.ts.map +1 -1
  365. package/build/utils/display/wrapper/TextWrapper.js +2 -470
  366. package/build/utils/display/wrapper/TextWrapper.js.map +1 -1
  367. package/build/utils/display/wrapper/types.d.ts +2 -74
  368. package/build/utils/display/wrapper/types.d.ts.map +1 -1
  369. package/build/utils/display/wrapper/types.js +2 -10
  370. package/build/utils/display/wrapper/types.js.map +1 -1
  371. package/build/utils/hardware/hardware.js +1 -1
  372. package/build/utils/hardware/hardware.js.map +1 -1
  373. package/build/utils/timers/timers.d.ts.map +1 -1
  374. package/build/utils/timers/timers.js +26 -4
  375. package/build/utils/timers/timers.js.map +1 -1
  376. package/package.json +8 -8
  377. package/src/engine.ts +24 -15
  378. package/src/facades/dev.ts +10 -0
  379. package/src/facades/display.ts +21 -8
  380. package/src/facades/displayMirror.ts +29 -0
  381. package/src/facades/glasses.ts +61 -1
  382. package/src/facades/memory.ts +1 -12
  383. package/src/facades/miniapps.ts +4 -1
  384. package/src/facades/pairing.ts +8 -6
  385. package/src/facades/permissions.ts +46 -0
  386. package/src/facades/phoneNotifications.ts +45 -26
  387. package/src/facades/settings.ts +1 -2
  388. package/src/generated/releaseMetadata.ts +4 -4
  389. package/src/index.ts +6 -9
  390. package/src/react/MentraLiveOtaFlow.tsx +2 -2
  391. package/src/react/useMentraLiveOta.ts +14 -8
  392. package/src/runtime/config.ts +1 -1
  393. package/src/services/AppRegistry.ts +43 -7
  394. package/src/services/BlobStore.ts +3 -3
  395. package/src/services/CloudClientService.ts +37 -10
  396. package/src/services/DevServerBridge.ts +12 -10
  397. package/src/services/DeviceEventRouter.ts +73 -74
  398. package/src/services/DisplayDiagnostics.ts +107 -0
  399. package/src/services/DisplayProcessor.ts +20 -55
  400. package/src/services/GestureDotsService.ts +77 -16
  401. package/src/services/GlassesKeyboardInput.ts +306 -0
  402. package/src/services/GlassesSensorService.ts +233 -0
  403. package/src/services/GlassesTouchInput.ts +128 -0
  404. package/src/services/HeadingService.ts +0 -24
  405. package/src/services/HotspotShutdown.ts +3 -1
  406. package/src/services/JSCrashloopReportService.ts +2 -2
  407. package/src/services/JSRouter.ts +29 -14
  408. package/src/services/LocalDisplayManager.ts +112 -26
  409. package/src/services/LocalMiniappDataMigration.ts +1 -1
  410. package/src/services/LocalMiniappRuntime.ts +500 -43
  411. package/src/services/LocalSttFallbackCoordinator.ts +28 -7
  412. package/src/services/MemoryStore.ts +32 -80
  413. package/src/services/MiniappEngine.ts +7 -7
  414. package/src/services/MiniappLauncher.ts +25 -1
  415. package/src/services/MirrorService.ts +139 -0
  416. package/src/services/NativeNavigationService.ts +29 -25
  417. package/src/services/NavigationHandlers.ts +10 -5
  418. package/src/services/OtaInstallCoordinator.ts +36 -34
  419. package/src/services/PairedGlassesLatch.ts +39 -0
  420. package/src/services/PhoneActivity.ts +116 -0
  421. package/src/services/PhoneCameraFovCoordinator.ts +6 -4
  422. package/src/services/PhoneNotificationsSync.ts +185 -103
  423. package/src/services/PhonePhotoCoordinator.ts +9 -10
  424. package/src/services/PhoneStreamCoordinator.ts +13 -11
  425. package/src/services/STTModelManager.ts +15 -1
  426. package/src/services/SceneRenderer.ts +148 -10
  427. package/src/services/StreamLifecycleController.ts +9 -7
  428. package/src/services/TTSModelManager.ts +1 -1
  429. package/src/services/UIRouter.ts +5 -5
  430. package/src/services/asg/galleryPathMigration.ts +1 -1
  431. package/src/services/asg/gallerySyncService.ts +2 -2
  432. package/src/services/asg/localStorageService.ts +3 -3
  433. package/src/services/debug/DashboardOpenTrace.ts +153 -0
  434. package/src/services/debug/dashboardOpenTimeline.ts +237 -0
  435. package/src/services/effectiveCapabilities.ts +32 -13
  436. package/src/services/gestureClaims.ts +72 -23
  437. package/src/services/manifestFields.ts +23 -0
  438. package/src/services/memoryStoreInstance.ts +2 -34
  439. package/src/services/mirrorSnapshot.ts +116 -0
  440. package/src/services/nativeNavigationGate.ts +14 -0
  441. package/src/services/notificationAppCatalog.ts +21 -0
  442. package/src/services/notifications/notificationPolicy.ts +87 -0
  443. package/src/services/pages/OverlayPages.ts +86 -0
  444. package/src/services/pages/PageHost.ts +116 -0
  445. package/src/services/pages/overlayApps.ts +72 -0
  446. package/src/services/pages/pageEligibility.ts +30 -0
  447. package/src/services/settingsBridge.ts +111 -0
  448. package/src/services/speakerProfileStoreInstance.ts +1 -1
  449. package/src/services/uiShim.ts +4 -4
  450. package/src/stores/appVisibility.ts +45 -0
  451. package/src/stores/apps.ts +110 -32
  452. package/src/stores/bluetoothSettingKeys.ts +1 -1
  453. package/src/stores/display.ts +18 -7
  454. package/src/stores/glasses.ts +15 -1
  455. package/src/stores/settings.ts +175 -51
  456. package/src/types/applet.ts +14 -1
  457. package/src/types/capabilities/even-realities-g2.ts +6 -0
  458. package/src/types/capabilities/simulated-glasses.ts +8 -4
  459. package/src/types/hardware.ts +34 -1
  460. package/src/types/index.ts +1 -0
  461. package/src/utils/debouncedPatch.ts +8 -4
  462. package/src/utils/devMiniappLaunch.ts +5 -3
  463. package/src/utils/display/measurer/TextMeasurer.ts +3 -346
  464. package/src/utils/display/measurer/script-detection.ts +10 -218
  465. package/src/utils/display/pixelArt.ts +3 -0
  466. package/src/utils/display/profiles/g1.ts +2 -236
  467. package/src/utils/display/profiles/g2.ts +2 -39
  468. package/src/utils/display/profiles/nex.ts +2 -166
  469. package/src/utils/display/profiles/types.ts +9 -132
  470. package/src/utils/display/profiles/z100.ts +2 -198
  471. package/src/utils/display/scene/degrade.ts +4 -1
  472. package/src/utils/display/scene/differ.ts +25 -1
  473. package/src/utils/display/scene/index.ts +5 -0
  474. package/src/utils/display/scene/process.ts +196 -13
  475. package/src/utils/display/scene/store.ts +0 -0
  476. package/src/utils/display/scene/svgPath.ts +163 -0
  477. package/src/utils/display/scene/types.ts +0 -0
  478. package/src/utils/display/wrapper/TextWrapper.ts +2 -546
  479. package/src/utils/display/wrapper/types.ts +3 -102
  480. package/src/utils/hardware/hardware.ts +1 -1
  481. package/src/utils/timers/timers.ts +32 -4
  482. package/build/services/CustomDashboardModel.d.ts +0 -48
  483. package/build/services/CustomDashboardModel.d.ts.map +0 -1
  484. package/build/services/CustomDashboardModel.js +0 -73
  485. package/build/services/CustomDashboardModel.js.map +0 -1
  486. package/build/services/CustomDashboardService.d.ts +0 -63
  487. package/build/services/CustomDashboardService.d.ts.map +0 -1
  488. package/build/services/CustomDashboardService.js +0 -576
  489. package/build/services/CustomDashboardService.js.map +0 -1
  490. package/build/services/DashboardCoordinator.d.ts +0 -26
  491. package/build/services/DashboardCoordinator.d.ts.map +0 -1
  492. package/build/services/DashboardCoordinator.js +0 -125
  493. package/build/services/DashboardCoordinator.js.map +0 -1
  494. package/build/services/iosNotificationAppCatalog.d.ts +0 -13
  495. package/build/services/iosNotificationAppCatalog.d.ts.map +0 -1
  496. package/build/services/iosNotificationAppCatalog.js +0 -28
  497. package/build/services/iosNotificationAppCatalog.js.map +0 -1
  498. package/src/services/CustomDashboardModel.ts +0 -83
  499. package/src/services/CustomDashboardService.ts +0 -598
  500. package/src/services/DashboardCoordinator.ts +0 -121
  501. package/src/services/iosNotificationAppCatalog.ts +0 -39
@@ -1,102 +1,3 @@
1
- /**
2
- * Options for text wrapping.
3
- */
4
- export interface WrapOptions {
5
- /** Maximum width in pixels (defaults to profile's displayWidthPx) */
6
- maxWidthPx?: number
7
-
8
- /** Maximum number of lines (defaults to profile's maxLines) */
9
- maxLines?: number
10
-
11
- /** Maximum total bytes (defaults to profile's maxPayloadBytes) */
12
- maxBytes?: number
13
-
14
- /**
15
- * Break mode:
16
- * - 'character': Break mid-word with hyphen for 100% utilization
17
- * - 'word': Break at word boundaries, hyphenate only if word > line
18
- * - 'strict-word': Break at word boundaries only, truncate long words
19
- */
20
- breakMode?: BreakMode
21
-
22
- /** Character to use for hyphenation (default: '-') */
23
- hyphenChar?: string
24
-
25
- /** Minimum characters before allowing hyphen break (default: 3) */
26
- minCharsBeforeHyphen?: number
27
-
28
- /** Whether to trim whitespace from line ends (default: true) */
29
- trimLines?: boolean
30
-
31
- /** Whether to preserve explicit newlines in input (default: true) */
32
- preserveNewlines?: boolean
33
- }
34
-
35
- /**
36
- * Break mode for text wrapping.
37
- * - 'character': Break mid-word with hyphen for 100% utilization
38
- * - 'character-no-hyphen': Break mid-word without hyphen (clean break)
39
- * - 'word': Break at word boundaries, hyphenate only if word > line
40
- * - 'strict-word': Break at word boundaries only, truncate long words
41
- */
42
- export type BreakMode = "character" | "character-no-hyphen" | "word" | "strict-word"
43
-
44
- /**
45
- * Result of wrapping operation.
46
- */
47
- export interface WrapResult {
48
- /** Wrapped lines */
49
- lines: string[]
50
-
51
- /** Whether content was truncated to fit constraints */
52
- truncated: boolean
53
-
54
- /** Total pixel width of widest line */
55
- maxLineWidthPx: number
56
-
57
- /** Total byte size of all lines */
58
- totalBytes: number
59
-
60
- /** Per-line metadata */
61
- lineMetrics: LineMetrics[]
62
-
63
- /** Original input text */
64
- originalText: string
65
-
66
- /** Break mode used */
67
- breakMode: BreakMode
68
- }
69
-
70
- /**
71
- * Per-line metrics from wrapping.
72
- */
73
- export interface LineMetrics {
74
- /** The line text */
75
- text: string
76
-
77
- /** Width in pixels */
78
- widthPx: number
79
-
80
- /** Byte size of this line */
81
- bytes: number
82
-
83
- /** Utilization percentage (widthPx / maxWidthPx * 100) */
84
- utilizationPercent: number
85
-
86
- /** Whether this line ends with a hyphen from breaking */
87
- endsWithHyphen: boolean
88
-
89
- /** Whether this line was created from an explicit newline */
90
- fromExplicitNewline: boolean
91
- }
92
-
93
- /**
94
- * Default wrap options.
95
- */
96
- export const DEFAULT_WRAP_OPTIONS: Required<Omit<WrapOptions, "maxWidthPx" | "maxLines" | "maxBytes">> = {
97
- breakMode: "character-no-hyphen",
98
- hyphenChar: "-",
99
- minCharsBeforeHyphen: 3,
100
- trimLines: true,
101
- preserveNewlines: true,
102
- }
1
+ // Moved into the SDK (@glassly/miniapp/display) so miniapps lay text out the way the host measures it; this path re-exports it for the engine.
2
+ export {DEFAULT_WRAP_OPTIONS} from "@glassly/miniapp/display"
3
+ export type {WrapOptions, WrapResult, LineMetrics, BreakMode} from "@glassly/miniapp/display"
@@ -86,7 +86,7 @@ export class HardwareCompatibility {
86
86
  return capabilities.hasDisplay
87
87
 
88
88
  case HardwareType.MICROPHONE:
89
- // GlasslyOS always provides an audio-input path. When the connected
89
+ // Glassly always provides an audio-input path. When the connected
90
90
  // glasses do not have an onboard microphone, the engine falls back to
91
91
  // the phone microphone. Keep `capabilities.hasMicrophone` reserved for
92
92
  // physical-device/source selection; app compatibility is about whether
@@ -21,8 +21,36 @@
21
21
  // https://github.com/tconns/react-native-nitro-bg-timer/issues/2. iOS
22
22
  // suspends the whole process in background anyway, so background timing
23
23
  // there is handled by native per-device queues, not JS timers.
24
+ //
25
+ // react-native is loaded lazily, not imported. Every engine service runs its
26
+ // timers through this module, and the engine's bun test suites load those
27
+ // services in a plain JS runtime that cannot parse react-native's Flow
28
+ // source. A static import would force every such suite to mock this module;
29
+ // with the lazy load, a runtime without react-native simply gets the JS
30
+ // timers, which is the correct answer there anyway.
31
+
32
+ type ReactNativeSubset = {
33
+ Platform: {OS: string}
34
+ Alert?: {alert: (title: string, message?: string) => void}
35
+ }
36
+
37
+ let reactNative: ReactNativeSubset | null | undefined
38
+
39
+ function getReactNative(): ReactNativeSubset | null {
40
+ if (reactNative !== undefined) {
41
+ return reactNative
42
+ }
43
+ try {
44
+ reactNative = require("react-native") as ReactNativeSubset
45
+ } catch {
46
+ reactNative = null
47
+ }
48
+ return reactNative
49
+ }
24
50
 
25
- import {Alert, Platform} from "react-native"
51
+ function isDev(): boolean {
52
+ return typeof __DEV__ !== "undefined" && __DEV__
53
+ }
26
54
 
27
55
  type NitroTimerApi = {
28
56
  setInterval: (callback: () => void, delay: number) => number
@@ -53,12 +81,12 @@ function failUnavailable(reason: string) {
53
81
  "Backgrounded behavior IS BROKEN until you rebuild the Android app: run `bun android`. " +
54
82
  "Engine timers and local miniapps (captions, wake words) freeze whenever the app is not foregrounded."
55
83
  console.error(message)
56
- if (__DEV__) {
84
+ if (isDev()) {
57
85
  // A stale dev client may ALSO show the library's own require-time red box
58
86
  // (bridgeless LogBox surfaces it even though we catch below) — this alert
59
87
  // is the actionable one: it names the fix.
60
88
  try {
61
- Alert.alert("Background timers unavailable", message)
89
+ getReactNative()?.Alert?.alert("Background timers unavailable", message)
62
90
  } catch {
63
91
  /* Alert not available (tests / headless) — the console.error stands. */
64
92
  }
@@ -66,7 +94,7 @@ function failUnavailable(reason: string) {
66
94
  }
67
95
 
68
96
  function getNitroTimer(): NitroTimerApi | null {
69
- if (nitroDisabled || Platform.OS !== "android") {
97
+ if (nitroDisabled || getReactNative()?.Platform.OS !== "android") {
70
98
  return null
71
99
  }
72
100
 
@@ -1,48 +0,0 @@
1
- import type { ClientApp } from "../types/applet";
2
- /** Canonical widget order; also the default layout order. */
3
- export declare const DASHBOARD_WIDGET_IDS: readonly ["clock", "calendar", "apps", "notifications"];
4
- export type DashboardWidgetId = (typeof DASHBOARD_WIDGET_IDS)[number];
5
- export type DashboardWidgetSetting = {
6
- id: DashboardWidgetId;
7
- enabled: boolean;
8
- };
9
- export type DashboardAction = {
10
- kind: "apps-menu";
11
- } | {
12
- kind: "notifications";
13
- };
14
- export type AppMenuAction = {
15
- kind: "app";
16
- packageName: string;
17
- };
18
- export type MenuAppSetting = {
19
- packageName: string;
20
- name: string;
21
- running?: boolean;
22
- };
23
- export type CustomDashboardClockStyle = "compact" | "large";
24
- /** G2.swift appends this marker after the firmware advertises EVENCFW capabilities. */
25
- export declare function isGlasslyCfwFirmwareVersion(firmwareVersion: string | null | undefined): boolean;
26
- /** Stock G2 and NIMO are intentionally excluded. */
27
- export declare function isCustomDashboardEligible(info: {
28
- model?: string | null;
29
- firmwareVersion?: string | null;
30
- }): boolean;
31
- export declare function formatDashboardClock(date: Date, options: {
32
- twelveHour: boolean;
33
- showDate: boolean;
34
- }): {
35
- time: string;
36
- date?: string;
37
- };
38
- /**
39
- * Saved widget order, sanitized: unknown/duplicate entries dropped, widgets
40
- * missing from the saved value appended enabled in canonical order.
41
- */
42
- export declare function normalizeDashboardWidgets(raw: unknown): DashboardWidgetSetting[];
43
- export declare function orderedDashboardApps(menu: MenuAppSetting[] | null | undefined, apps: ClientApp[]): ClientApp[];
44
- /** Focusable main-view actions, following the user's widget order. */
45
- export declare function dashboardActions(widgets: DashboardWidgetSetting[]): DashboardAction[];
46
- /** App-menu view rows: the Glasses Menu apps in order (double tap leaves the view). */
47
- export declare function appMenuActions(apps: ClientApp[]): AppMenuAction[];
48
- //# sourceMappingURL=CustomDashboardModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomDashboardModel.d.ts","sourceRoot":"","sources":["../../src/services/CustomDashboardModel.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/B;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,sBAAsB,EAAE,CAehF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAK9G;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,eAAe,EAAE,CAQrF;AAED,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,aAAa,EAAE,CAEjE"}
@@ -1,73 +0,0 @@
1
- import { DeviceTypes } from "../types/enums";
2
- /** Canonical widget order; also the default layout order. */
3
- export const DASHBOARD_WIDGET_IDS = ["clock", "calendar", "apps", "notifications"];
4
- /** G2.swift appends this marker after the firmware advertises EVENCFW capabilities. */
5
- export function isGlasslyCfwFirmwareVersion(firmwareVersion) {
6
- return firmwareVersion?.toLowerCase().includes("glassly cfw") === true;
7
- }
8
- /** Stock G2 and NIMO are intentionally excluded. */
9
- export function isCustomDashboardEligible(info) {
10
- return info.model === DeviceTypes.G2 && isGlasslyCfwFirmwareVersion(info.firmwareVersion);
11
- }
12
- export function formatDashboardClock(date, options) {
13
- const time = new Intl.DateTimeFormat(undefined, {
14
- hour: "numeric",
15
- minute: "2-digit",
16
- hour12: options.twelveHour,
17
- }).format(date);
18
- if (!options.showDate)
19
- return { time };
20
- return {
21
- time,
22
- date: new Intl.DateTimeFormat(undefined, { weekday: "short", month: "short", day: "numeric" }).format(date),
23
- };
24
- }
25
- /**
26
- * Saved widget order, sanitized: unknown/duplicate entries dropped, widgets
27
- * missing from the saved value appended enabled in canonical order.
28
- */
29
- export function normalizeDashboardWidgets(raw) {
30
- const widgets = [];
31
- if (Array.isArray(raw)) {
32
- for (const entry of raw) {
33
- if (!entry || typeof entry !== "object")
34
- continue;
35
- const id = entry.id;
36
- if (!DASHBOARD_WIDGET_IDS.includes(id))
37
- continue;
38
- if (widgets.some((widget) => widget.id === id))
39
- continue;
40
- widgets.push({ id, enabled: entry.enabled !== false });
41
- }
42
- }
43
- for (const id of DASHBOARD_WIDGET_IDS) {
44
- if (!widgets.some((widget) => widget.id === id))
45
- widgets.push({ id, enabled: true });
46
- }
47
- return widgets;
48
- }
49
- export function orderedDashboardApps(menu, apps) {
50
- if (!Array.isArray(menu))
51
- return [];
52
- return menu
53
- .map((item) => apps.find((app) => app.packageName === item.packageName))
54
- .filter((app) => Boolean(app && !app.hidden && app.compatibility?.isCompatible !== false));
55
- }
56
- /** Focusable main-view actions, following the user's widget order. */
57
- export function dashboardActions(widgets) {
58
- const actions = [];
59
- for (const widget of widgets) {
60
- if (!widget.enabled)
61
- continue;
62
- if (widget.id === "apps")
63
- actions.push({ kind: "apps-menu" });
64
- else if (widget.id === "notifications")
65
- actions.push({ kind: "notifications" });
66
- }
67
- return actions;
68
- }
69
- /** App-menu view rows: the Glasses Menu apps in order (double tap leaves the view). */
70
- export function appMenuActions(apps) {
71
- return apps.map((app) => ({ kind: "app", packageName: app.packageName }));
72
- }
73
- //# sourceMappingURL=CustomDashboardModel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomDashboardModel.js","sourceRoot":"","sources":["../../src/services/CustomDashboardModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAA;AAE1C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,CAAU,CAAA;AAU3F,uFAAuF;AACvF,MAAM,UAAU,2BAA2B,CAAC,eAA0C;IACpF,OAAO,eAAe,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,IAAI,CAAA;AACxE,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,yBAAyB,CAAC,IAA8D;IACtG,OAAO,IAAI,CAAC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AA;IAC/E,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,cAAc,CAAC,IAAiB;IAC9C,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAiB,EAAE,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,CAAC,WAAW,EAAC,CAAC,CAAC,CAAA;AACxF,CAAC","sourcesContent":["import type {ClientApp} from \"../types/applet\"\nimport {DeviceTypes} from \"../types/enums\"\n\n/** Canonical widget order; also the default layout order. */\nexport const DASHBOARD_WIDGET_IDS = [\"clock\", \"calendar\", \"apps\", \"notifications\"] as const\nexport type DashboardWidgetId = (typeof DASHBOARD_WIDGET_IDS)[number]\nexport type DashboardWidgetSetting = {id: DashboardWidgetId; enabled: boolean}\n\nexport type DashboardAction = {kind: \"apps-menu\"} | {kind: \"notifications\"}\nexport type AppMenuAction = {kind: \"app\"; packageName: string}\n\nexport type MenuAppSetting = {packageName: string; name: string; running?: boolean}\nexport type CustomDashboardClockStyle = \"compact\" | \"large\"\n\n/** G2.swift appends this marker after the firmware advertises EVENCFW capabilities. */\nexport function isGlasslyCfwFirmwareVersion(firmwareVersion: string | null | undefined): boolean {\n return firmwareVersion?.toLowerCase().includes(\"glassly cfw\") === true\n}\n\n/** Stock G2 and NIMO are intentionally excluded. */\nexport function isCustomDashboardEligible(info: {model?: string | null; firmwareVersion?: string | null}): boolean {\n return info.model === DeviceTypes.G2 && isGlasslyCfwFirmwareVersion(info.firmwareVersion)\n}\n\nexport function formatDashboardClock(\n date: Date,\n options: {twelveHour: boolean; showDate: boolean},\n): {time: string; date?: string} {\n const time = new Intl.DateTimeFormat(undefined, {\n hour: \"numeric\",\n minute: \"2-digit\",\n hour12: options.twelveHour,\n }).format(date)\n if (!options.showDate) return {time}\n return {\n time,\n date: new Intl.DateTimeFormat(undefined, {weekday: \"short\", month: \"short\", day: \"numeric\"}).format(date),\n }\n}\n\n/**\n * Saved widget order, sanitized: unknown/duplicate entries dropped, widgets\n * missing from the saved value appended enabled in canonical order.\n */\nexport function normalizeDashboardWidgets(raw: unknown): DashboardWidgetSetting[] {\n const widgets: DashboardWidgetSetting[] = []\n if (Array.isArray(raw)) {\n for (const entry of raw) {\n if (!entry || typeof entry !== \"object\") continue\n const id = (entry as {id?: unknown}).id as DashboardWidgetId\n if (!DASHBOARD_WIDGET_IDS.includes(id)) continue\n if (widgets.some((widget) => widget.id === id)) continue\n widgets.push({id, enabled: (entry as {enabled?: unknown}).enabled !== false})\n }\n }\n for (const id of DASHBOARD_WIDGET_IDS) {\n if (!widgets.some((widget) => widget.id === id)) widgets.push({id, enabled: true})\n }\n return widgets\n}\n\nexport function orderedDashboardApps(menu: MenuAppSetting[] | null | undefined, apps: ClientApp[]): ClientApp[] {\n if (!Array.isArray(menu)) return []\n return menu\n .map((item) => apps.find((app) => app.packageName === item.packageName))\n .filter((app): app is ClientApp => Boolean(app && !app.hidden && app.compatibility?.isCompatible !== false))\n}\n\n/** Focusable main-view actions, following the user's widget order. */\nexport function dashboardActions(widgets: DashboardWidgetSetting[]): DashboardAction[] {\n const actions: DashboardAction[] = []\n for (const widget of widgets) {\n if (!widget.enabled) continue\n if (widget.id === \"apps\") actions.push({kind: \"apps-menu\"})\n else if (widget.id === \"notifications\") actions.push({kind: \"notifications\"})\n }\n return actions\n}\n\n/** App-menu view rows: the Glasses Menu apps in order (double tap leaves the view). */\nexport function appMenuActions(apps: ClientApp[]): AppMenuAction[] {\n return apps.map((app): AppMenuAction => ({kind: \"app\", packageName: app.packageName}))\n}\n"]}
@@ -1,63 +0,0 @@
1
- declare class CustomDashboardService {
2
- private started;
3
- private open;
4
- /** Set by DashboardCoordinator; asks it to close (and restore main content). */
5
- onRequestClose: (() => void) | null;
6
- private view;
7
- private mainIndex;
8
- private appsIndex;
9
- /** "loading" until the first fetch resolves; "no-access" only for a real permission denial. */
10
- private calendarStatus;
11
- /** packageName → base64 icon bytes, or null when the icon can't be loaded (monogram fallback). */
12
- private iconCache;
13
- private iconLoads;
14
- private calendarEvents;
15
- private unsubs;
16
- private clockTimer;
17
- private calendarTimer;
18
- /** Last observed eligibility, for transition detection. */
19
- private eligible;
20
- start(): void;
21
- /**
22
- * Track eligible⇄ineligible transitions from any trigger (setting toggle,
23
- * connect/disconnect, firmware change). Leaving closes the dashboard via the
24
- * coordinator (which restores main content) and drops the retained scene so
25
- * a stale frame can't be replayed after the feature was turned off.
26
- */
27
- private syncEligibility;
28
- stop(): void;
29
- isEligible(): boolean;
30
- get isOpen(): boolean;
31
- /** Coordinator opened the dashboard: render fresh from the top. */
32
- show(): void;
33
- /** Coordinator closed the dashboard. */
34
- hide(): void;
35
- /** Returns true when an open custom dashboard consumed the gesture. */
36
- handleGesture(gestureName: string): boolean;
37
- private resetNavigation;
38
- private handleMainGesture;
39
- private handleAppMenuGesture;
40
- private menuApps;
41
- private widgets;
42
- private openNotificationsPanel;
43
- private toggleApp;
44
- private calendarWidgetEnabled;
45
- private refreshCalendarAndRender;
46
- /** Underline hugging a builtin-font label. x/rowY are the label box's origin. */
47
- private labelUnderline;
48
- private canvas;
49
- private render;
50
- private mainElements;
51
- /**
52
- * Resolve a miniapp icon to base64 for the glasses. Local/bundled miniapps
53
- * carry a file:// icon.png; store apps an https URL; the offline system
54
- * tiles a bundler asset id (unsupported here — monogram fallback). Loads
55
- * are async and cached; a finished load repaints the open app menu.
56
- */
57
- private loadIcon;
58
- private appMenuElements;
59
- }
60
- declare const customDashboardService: CustomDashboardService;
61
- export default customDashboardService;
62
- export { CustomDashboardService };
63
- //# sourceMappingURL=CustomDashboardService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomDashboardService.d.ts","sourceRoot":"","sources":["../../src/services/CustomDashboardService.ts"],"names":[],"mappings":"AAqFA,cAAM,sBAAsB;IAC1B,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,IAAI,CAAQ;IACpB,gFAAgF;IACzE,cAAc,EAAE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