@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 +0,0 @@
1
- {"version":3,"file":"CustomDashboardService.js","sourceRoot":"","sources":["../../src/services/CustomDashboardService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAC,IAAI,EAAC,MAAM,kBAAkB,CAAA;AAErC,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAC,gBAAgB,EAAqB,MAAM,kBAAkB,CAAA;AAErE,OAAO,EAAC,iBAAiB,EAAC,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,QAAQ,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAE7D,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAA;AAEtD,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAA;AACvC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,GAIrB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAA;AACrD,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAC,uBAAuB,EAAE,kBAAkB,EAAC,MAAM,wBAAwB,CAAA;AAClF,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAE3C,MAAM,gBAAgB,GAAG,yBAAyB,CAAA;AAClD,MAAM,gBAAgB,GAAG,MAAM,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,EAAE,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAC;gBAChE,IAAI,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE;gBACrE,KAAK,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAC;aACzE,CAAC,CAAA;QACJ,CAAC;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF;AAED,MAAM,sBAAsB,GAAG,IAAI,sBAAsB,EAAE,CAAA;AAC3D,eAAe,sBAAsB,CAAA;AACrC,OAAO,EAAC,sBAAsB,EAAC,CAAA","sourcesContent":["/**\n * Scene API dashboard for G2 custom firmware.\n *\n * G2.swift marks the published firmware version after it detects the CFW\n * capability advertisement. DashboardCoordinator owns open/close and display\n * switching; this service renders the widgets and handles gestures while open.\n *\n * The dashboard is composed of user-orderable widgets (clock, calendar, apps\n * button, notifications button) stacked vertically on the CFW scene canvas.\n * The apps button switches to a second, dashboard-rendered app menu view.\n */\nimport {File} from \"expo-file-system\"\n\nimport {BluetoothSdk} from \"@glassly/bluetooth-sdk\"\nimport {MiniappErrorCode, type CalendarEvent} from \"@glassly/miniapp\"\n\nimport {useAppStatusStore} from \"../stores/apps\"\nimport {useGlassesStore} from \"../stores/glasses\"\nimport {SETTINGS, useSettingsStore} from \"../stores/settings\"\nimport type {ClientApp} from \"../types/applet\"\nimport {TextMeasurer} from \"../utils/display/measurer\"\nimport type {SceneElementInput} from \"../utils/display/scene\"\nimport {BgTimer} from \"../utils/timers\"\nimport {\n appMenuActions,\n dashboardActions,\n formatDashboardClock,\n isCustomDashboardEligible,\n normalizeDashboardWidgets,\n orderedDashboardApps,\n type CustomDashboardClockStyle,\n type DashboardWidgetSetting,\n type MenuAppSetting,\n} from \"./CustomDashboardModel\"\nimport displayProcessor from \"./DisplayProcessor\"\nimport {isGlassesConnected} from \"./GlassesReadiness\"\nimport localDisplayManager from \"./LocalDisplayManager\"\nimport {listPhoneCalendarEvents, PhoneCalendarError} from \"./PhoneCalendarService\"\nimport sceneRenderer from \"./SceneRenderer\"\n\nconst DASHBOARD_APP_ID = \"system.custom-dashboard\"\nconst CLOCK_REFRESH_MS = 30_000\nconst CALENDAR_REFRESH_MS = 5 * 60_000\n/** Matches the boot message's window; stops have no unmount-driven end signal. */\nconst STOP_NOTICE_MS = 1500\n\n// CFW blits the stock compositor's 576×288 canvas; used when the firmware has\n// not reported scene capabilities yet.\nconst FALLBACK_CANVAS = {width: 576, height: 288}\nconst MARGIN_X = 16\nconst MARGIN_TOP = 10\nconst WIDGET_GAP = 10\n/** Row height for the glasses' builtin 20px font engine. */\nconst LINE_H = 24\nconst BUTTON_H = 34\n/**\n * Selection marker: a text-hugging bar under the focused label instead of a\n * boxed border. Drawn as a rect (h 3, border 2 — the strokes overlap into a\n * solid bar) because mode 15 renders only glyphs; the bar must be in the\n * raster or the firmware never shows it.\n */\nconst UNDERLINE_H = 3\n/** Row-top → underline-top: just under the builtin font's 27px line. */\nconst UNDERLINE_OFFSET_Y = BUTTON_H - 4\n/**\n * App-menu icon grid: 2 rows × 4 columns per page. CFW rasterizes scenes\n * phone-side, so the stock firmware's 4-image container pool does not bound\n * the page (getEffectiveCapabilities lifts the element caps while the CFW\n * canvas is active).\n */\nconst APP_GRID_COLS = 4\nconst APP_GRID_ROWS = 2\nconst APPS_PER_PAGE = APP_GRID_COLS * APP_GRID_ROWS\nconst APP_CELL = 36\nconst APP_CELL_GAP = 12\nconst APP_ICON_INSET = 2\nconst APP_ICON = APP_CELL - APP_ICON_INSET * 2\n\nfunction eventLine(event: CalendarEvent): string {\n const when = event.allDay\n ? \"All day\"\n : new Intl.DateTimeFormat(undefined, {hour: \"numeric\", minute: \"2-digit\"}).format(new Date(event.startsAt))\n return `${when} ${event.title}`\n}\n\nclass CustomDashboardService {\n private started = false\n private open = false\n /** Set by DashboardCoordinator; asks it to close (and restore main content). */\n public onRequestClose: (() => void) | null = null\n private view: \"main\" | \"apps\" = \"main\"\n private mainIndex = 0\n private appsIndex = 0\n /** \"loading\" until the first fetch resolves; \"no-access\" only for a real permission denial. */\n private calendarStatus: \"loading\" | \"ok\" | \"no-access\" | \"unavailable\" = \"loading\"\n /** packageName → base64 icon bytes, or null when the icon can't be loaded (monogram fallback). */\n private iconCache = new Map<string, string | null>()\n private iconLoads = new Set<string>()\n private calendarEvents: CalendarEvent[] = []\n private unsubs: Array<() => void> = []\n private clockTimer: number | null = null\n private calendarTimer: number | null = null\n /** Last observed eligibility, for transition detection. */\n private eligible = false\n\n start(): void {\n if (this.started) return\n this.started = true\n this.unsubs.push(\n useGlassesStore.subscribe(\n (state) => `${state.connection.state}:${state.deviceModel}:${state.firmwareVersion}`,\n () => {\n if (!this.syncEligibility()) return\n void this.refreshCalendarAndRender()\n },\n ),\n // Selector: only dashboard-relevant settings retrigger a refresh. The\n // whole-store form fired a calendar query on every settings write.\n useSettingsStore.subscribe(\n (state) =>\n JSON.stringify([\n state.getSetting(SETTINGS.custom_dashboard_enabled.key),\n state.getSetting(SETTINGS.custom_dashboard_widgets.key),\n state.getSetting(SETTINGS.custom_dashboard_clock_style.key),\n state.getSetting(SETTINGS.custom_dashboard_clock_show_date.key),\n state.getSetting(SETTINGS.twelve_hour_time.key),\n state.getSetting(SETTINGS.custom_dashboard_calendar_event_count.key),\n state.getSetting(SETTINGS.custom_dashboard_calendar_days_ahead.key),\n state.getSetting(SETTINGS.menu_apps.key),\n ]),\n () => {\n if (!this.syncEligibility()) return\n void this.refreshCalendarAndRender()\n },\n ),\n useAppStatusStore.subscribe(() => {\n if (this.isEligible()) this.render()\n }),\n )\n this.clockTimer = BgTimer.setInterval(() => {\n if (this.isEligible()) this.render()\n }, CLOCK_REFRESH_MS)\n this.calendarTimer = BgTimer.setInterval(() => {\n if (this.isEligible()) void this.refreshCalendarAndRender()\n }, CALENDAR_REFRESH_MS)\n this.eligible = this.isEligible()\n }\n\n /**\n * Track eligible⇄ineligible transitions from any trigger (setting toggle,\n * connect/disconnect, firmware change). Leaving closes the dashboard via the\n * coordinator (which restores main content) and drops the retained scene so\n * a stale frame can't be replayed after the feature was turned off.\n */\n private syncEligibility(): boolean {\n const eligible = this.isEligible()\n if (eligible === this.eligible) return eligible\n this.eligible = eligible\n if (!eligible) {\n if (this.open) this.onRequestClose?.()\n this.open = false\n this.resetNavigation()\n sceneRenderer.clearApp(DASHBOARD_APP_ID)\n }\n return eligible\n }\n\n stop(): void {\n for (const unsub of this.unsubs) unsub()\n this.unsubs = []\n if (this.clockTimer !== null) BgTimer.clearInterval(this.clockTimer)\n if (this.calendarTimer !== null) BgTimer.clearInterval(this.calendarTimer)\n this.clockTimer = null\n this.calendarTimer = null\n if (this.open) this.onRequestClose?.()\n this.open = false\n this.eligible = false\n this.resetNavigation()\n this.started = false\n sceneRenderer.clearApp(DASHBOARD_APP_ID)\n }\n\n isEligible(): boolean {\n if (useSettingsStore.getState().getSetting(SETTINGS.custom_dashboard_enabled.key) === false) return false\n const state = useGlassesStore.getState()\n return (\n isGlassesConnected(state.connection) &&\n isCustomDashboardEligible({\n model: state.deviceModel,\n firmwareVersion: state.firmwareVersion,\n })\n )\n }\n\n get isOpen(): boolean {\n return this.open\n }\n\n /** Coordinator opened the dashboard: render fresh from the top. */\n show(): void {\n this.open = true\n this.resetNavigation()\n void this.refreshCalendarAndRender()\n }\n\n /** Coordinator closed the dashboard. */\n hide(): void {\n this.open = false\n this.resetNavigation()\n }\n\n /** Returns true when an open custom dashboard consumed the gesture. */\n handleGesture(gestureName: string): boolean {\n if (!this.open || !this.isEligible()) return false\n if (gestureName === \"double_tap\") {\n // In the app menu a double tap backs out to the top of the dashboard\n // (there is no Back row); on the main view it closes the dashboard.\n if (this.view === \"apps\") {\n this.resetNavigation()\n this.render()\n return true\n }\n this.onRequestClose?.()\n return true\n }\n if (this.view === \"apps\") return this.handleAppMenuGesture(gestureName)\n return this.handleMainGesture(gestureName)\n }\n\n private resetNavigation(): void {\n this.view = \"main\"\n this.mainIndex = 0\n this.appsIndex = 0\n }\n\n private handleMainGesture(gestureName: string): boolean {\n const actions = dashboardActions(this.widgets())\n if (this.mainIndex >= actions.length) this.mainIndex = Math.max(0, actions.length - 1)\n if (gestureName === \"swipe_down\" || gestureName === \"swipe_up\") {\n if (actions.length === 0) return true\n const delta = gestureName === \"swipe_down\" ? 1 : -1\n this.mainIndex = (this.mainIndex + delta + actions.length) % actions.length\n this.render()\n return true\n }\n if (gestureName === \"single_tap\") {\n const action = actions[this.mainIndex]\n if (action?.kind === \"apps-menu\") {\n this.view = \"apps\"\n this.appsIndex = 0\n this.render()\n } else if (action?.kind === \"notifications\") {\n void this.openNotificationsPanel()\n }\n return true\n }\n return false\n }\n\n private handleAppMenuGesture(gestureName: string): boolean {\n const rows = appMenuActions(this.menuApps())\n if (this.appsIndex >= rows.length) this.appsIndex = Math.max(0, rows.length - 1)\n if (gestureName === \"swipe_down\" || gestureName === \"swipe_up\") {\n const delta = gestureName === \"swipe_down\" ? 1 : -1\n this.appsIndex = (this.appsIndex + delta + rows.length) % rows.length\n this.render()\n return true\n }\n if (gestureName === \"single_tap\") {\n const row = rows[this.appsIndex]\n if (row?.kind === \"app\") {\n void this.toggleApp(row.packageName)\n }\n return true\n }\n return false\n }\n\n private menuApps(): ClientApp[] {\n const menu = useSettingsStore.getState().getSetting(SETTINGS.menu_apps.key) as MenuAppSetting[] | null\n return orderedDashboardApps(menu, useAppStatusStore.getState().apps)\n }\n\n private widgets(): DashboardWidgetSetting[] {\n return normalizeDashboardWidgets(useSettingsStore.getState().getSetting(SETTINGS.custom_dashboard_widgets.key))\n }\n\n private async openNotificationsPanel(): Promise<void> {\n this.onRequestClose?.()\n await BluetoothSdk.showNativeNotificationPanel().catch((error) => {\n console.error(\"CustomDashboard: notification panel failed\", error)\n })\n }\n\n private async toggleApp(packageName: string): Promise<void> {\n this.onRequestClose?.()\n const app = useAppStatusStore.getState().apps.find((candidate) => candidate.packageName === packageName)\n if (!app) return\n if (app.running) {\n // Mirror the \"Starting X…\" boot message: without this the dashboard just\n // closes and the stop is invisible on the glasses.\n localDisplayManager.showSystemNotice(`Stopping ${app.name}…`, STOP_NOTICE_MS)\n await useAppStatusStore.getState().stop(app.packageName)\n } else {\n await useAppStatusStore.getState().start(app, {skipNavigation: true})\n }\n }\n\n private calendarWidgetEnabled(): boolean {\n return this.widgets().some((widget) => widget.id === \"calendar\" && widget.enabled)\n }\n\n private async refreshCalendarAndRender(): Promise<void> {\n if (!this.open) return\n if (!this.calendarWidgetEnabled()) {\n this.calendarStatus = \"loading\"\n this.calendarEvents = []\n this.render()\n return\n }\n const settings = useSettingsStore.getState()\n const count = Number(settings.getSetting(SETTINGS.custom_dashboard_calendar_event_count.key) ?? 2)\n const days = Number(settings.getSetting(SETTINGS.custom_dashboard_calendar_days_ahead.key) ?? 3)\n const startsAt = new Date()\n const endsAt = new Date(startsAt.getTime() + Math.max(1, days) * 24 * 60 * 60 * 1000)\n try {\n const result = await listPhoneCalendarEvents({\n startsAt: startsAt.toISOString(),\n endsAt: endsAt.toISOString(),\n limit: Math.max(1, Math.min(3, count)),\n })\n this.calendarStatus = \"ok\"\n this.calendarEvents = result.events\n } catch (error) {\n // Permission is requested from the Custom Dashboard settings screen;\n // only a real denial should read as one — any other failure is\n // \"Unavailable\" (and logged) so it can't masquerade as a permission\n // problem.\n const denied = error instanceof PhoneCalendarError && error.code === MiniappErrorCode.PERMISSION_DENIED\n this.calendarStatus = denied ? \"no-access\" : \"unavailable\"\n this.calendarEvents = []\n if (!denied) console.warn(\"CustomDashboard: calendar fetch failed\", error)\n }\n this.render()\n }\n\n /** Underline hugging a builtin-font label. x/rowY are the label box's origin. */\n private labelUnderline(id: string, x: number, rowY: number, label: string): SceneElementInput {\n // Same metrics processScene uses to ellipsize builtin text; the raster\n // insets text by 2px, so the bar starts under the first glyph.\n const textW = new TextMeasurer(displayProcessor.getProfile()).measureText(label)\n return {\n type: \"rect\",\n id,\n box: {x: x + 2, y: rowY + UNDERLINE_OFFSET_Y, w: textW + 4, h: UNDERLINE_H},\n style: {border: 2},\n }\n }\n\n private canvas(): {width: number; height: number} {\n const {sceneCanvasWidth, sceneCanvasHeight} = useGlassesStore.getState()\n if (sceneCanvasWidth && sceneCanvasWidth > 0 && sceneCanvasHeight && sceneCanvasHeight > 0) {\n return {width: sceneCanvasWidth, height: sceneCanvasHeight}\n }\n return FALLBACK_CANVAS\n }\n\n private render(): void {\n // Only while open: emitting into the single native view while closed\n // would clobber the main content.\n if (!this.open || !this.isEligible()) return\n const elements = this.view === \"apps\" ? this.appMenuElements() : this.mainElements()\n sceneRenderer.emitScene(DASHBOARD_APP_ID, \"dashboard\", elements)\n }\n\n private mainElements(): SceneElementInput[] {\n const canvas = this.canvas()\n const settings = useSettingsStore.getState()\n const widgets = this.widgets().filter((widget) => widget.enabled)\n const actions = dashboardActions(widgets)\n if (this.mainIndex >= actions.length) this.mainIndex = Math.max(0, actions.length - 1)\n const selected = actions[this.mainIndex]\n\n const clockStyle =\n (settings.getSetting(SETTINGS.custom_dashboard_clock_style.key) as CustomDashboardClockStyle) === \"large\"\n ? \"large\"\n : \"compact\"\n const calendarEnabled = widgets.some((widget) => widget.id === \"calendar\")\n // Calendar lives in the right half; everything else stacks in the left\n // half (full width when the calendar widget is off).\n const halfW = Math.floor(canvas.width / 2) - MARGIN_X - Math.floor(WIDGET_GAP / 2)\n const width = calendarEnabled ? halfW : canvas.width - MARGIN_X * 2\n const rightX = Math.floor(canvas.width / 2) + Math.floor(WIDGET_GAP / 2)\n\n const elements: SceneElementInput[] = []\n let y = MARGIN_TOP\n for (const widget of widgets) {\n if (widget.id === \"clock\") {\n const fontSize = clockStyle === \"large\" ? 48 : 32\n const clock = formatDashboardClock(new Date(), {\n twelveHour: settings.getSetting(SETTINGS.twelve_hour_time.key) === true,\n showDate: settings.getSetting(SETTINGS.custom_dashboard_clock_show_date.key) !== false,\n })\n elements.push({\n type: \"text\",\n id: \"clock\",\n box: {x: MARGIN_X, y, w: width, h: fontSize + 6},\n text: clock.time,\n style: {font: \"mono\", fontSize, breakMode: \"strict-word\"},\n })\n y += fontSize + 6\n if (clock.date) {\n elements.push({\n type: \"text\",\n id: \"clock-date\",\n box: {x: MARGIN_X, y, w: width, h: LINE_H},\n text: clock.date,\n style: {font: \"builtin\", breakMode: \"strict-word\"},\n })\n y += LINE_H\n }\n y += WIDGET_GAP\n } else if (widget.id === \"calendar\") {\n // Right half, top-aligned, independent of the left stack. A missing\n // calendar shows a hint instead of silently vanishing — \"No access\"\n // strictly for permission denial, \"Unavailable\" for any other failure.\n const lines =\n this.calendarStatus === \"ok\"\n ? [\n \"Calendar\",\n ...(this.calendarEvents.length\n ? this.calendarEvents.slice(0, 3).map(eventLine)\n : [\"No upcoming events\"]),\n ]\n : this.calendarStatus === \"loading\"\n ? [\"Calendar\"]\n : [\"Calendar\", this.calendarStatus === \"no-access\" ? \"No access\" : \"Unavailable\"]\n elements.push({\n type: \"text\",\n id: \"calendar\",\n box: {x: rightX, y: MARGIN_TOP, w: halfW, h: lines.length * LINE_H},\n text: lines.join(\"\\n\"),\n style: {font: \"builtin\", breakMode: \"strict-word\", overflow: \"ellipsis\"},\n })\n } else if (widget.id === \"apps\") {\n elements.push({\n type: \"text\",\n id: \"apps-button\",\n box: {x: MARGIN_X, y, w: width, h: BUTTON_H},\n text: \"Apps\",\n style: {font: \"builtin\"},\n })\n if (selected?.kind === \"apps-menu\") elements.push(this.labelUnderline(\"apps-underline\", MARGIN_X, y, \"Apps\"))\n y += BUTTON_H + WIDGET_GAP\n } else if (widget.id === \"notifications\") {\n elements.push({\n type: \"text\",\n id: \"notifications\",\n box: {x: MARGIN_X, y, w: width, h: BUTTON_H},\n text: \"Notifications\",\n style: {font: \"builtin\"},\n })\n if (selected?.kind === \"notifications\") {\n elements.push(this.labelUnderline(\"notifications-underline\", MARGIN_X, y, \"Notifications\"))\n }\n y += BUTTON_H + WIDGET_GAP\n }\n }\n return elements\n }\n\n /**\n * Resolve a miniapp icon to base64 for the glasses. Local/bundled miniapps\n * carry a file:// icon.png; store apps an https URL; the offline system\n * tiles a bundler asset id (unsupported here — monogram fallback). Loads\n * are async and cached; a finished load repaints the open app menu.\n */\n private loadIcon(app: ClientApp): void {\n if (this.iconCache.has(app.packageName) || this.iconLoads.has(app.packageName)) return\n const url = typeof app.logoUrl === \"string\" ? app.logoUrl : \"\"\n if (!/^(file|https?):/.test(url)) {\n this.iconCache.set(app.packageName, null)\n return\n }\n this.iconLoads.add(app.packageName)\n void (async () => {\n try {\n let base64: string\n if (url.startsWith(\"file:\")) {\n base64 = await new File(url).base64()\n } else {\n const response = await fetch(url)\n const blob = await response.blob()\n base64 = await new Promise<string>((resolve, reject) => {\n const reader = new FileReader()\n reader.onload = () => resolve(String(reader.result).split(\",\")[1] ?? \"\")\n reader.onerror = () => reject(reader.error)\n reader.readAsDataURL(blob)\n })\n }\n this.iconCache.set(app.packageName, base64 || null)\n } catch {\n this.iconCache.set(app.packageName, null)\n } finally {\n this.iconLoads.delete(app.packageName)\n if (this.open && this.view === \"apps\") this.render()\n }\n })()\n }\n\n private appMenuElements(): SceneElementInput[] {\n const canvas = this.canvas()\n const width = canvas.width - MARGIN_X * 2\n const apps = this.menuApps()\n const rows = appMenuActions(apps)\n if (this.appsIndex >= rows.length) this.appsIndex = Math.max(0, rows.length - 1)\n\n const elements: SceneElementInput[] = [\n {\n type: \"text\",\n id: \"apps-title\",\n box: {x: MARGIN_X, y: MARGIN_TOP, w: width, h: LINE_H},\n text: \"Apps\",\n style: {font: \"builtin\"},\n },\n ]\n const listTop = MARGIN_TOP + LINE_H + 16\n if (apps.length === 0) {\n elements.push({\n type: \"text\",\n id: \"apps-empty\",\n box: {x: MARGIN_X, y: listTop, w: width, h: LINE_H},\n text: \"No apps in Glasses Menu\",\n style: {font: \"builtin\"},\n })\n return elements\n }\n\n // Icon grid, paged, row-major. Selection is the underlined cell.\n const perPage = APPS_PER_PAGE\n const pageStart = Math.floor(this.appsIndex / perPage) * perPage\n const page = apps.slice(pageStart, pageStart + perPage)\n const cols = Math.min(page.length, APP_GRID_COLS)\n const totalW = cols * APP_CELL + (cols - 1) * APP_CELL_GAP\n const startX = Math.max(MARGIN_X, Math.round((canvas.width - totalW) / 2))\n page.forEach((app, cell) => {\n const x = startX + (cell % APP_GRID_COLS) * (APP_CELL + APP_CELL_GAP)\n const y = listTop + Math.floor(cell / APP_GRID_COLS) * (APP_CELL + APP_CELL_GAP)\n const selected = pageStart + cell === this.appsIndex\n const icon = this.iconCache.get(app.packageName)\n if (icon === undefined) this.loadIcon(app)\n if (icon) {\n elements.push({\n type: \"image\",\n id: `app-icon:${app.packageName}`,\n box: {x: x + APP_ICON_INSET, y: y + APP_ICON_INSET, w: APP_ICON, h: APP_ICON},\n data: icon,\n })\n } else {\n // Monogram fallback for icons that can't load (bundler-asset tiles).\n elements.push({\n type: \"text\",\n id: `app-icon:${app.packageName}`,\n box: {x: x + APP_ICON_INSET, y: y + APP_ICON_INSET, w: APP_ICON, h: APP_ICON},\n text: (app.name.trim()[0] ?? \"?\").toUpperCase(),\n style: {font: \"mono\", fontSize: 20},\n })\n }\n if (selected) {\n elements.push({\n type: \"rect\",\n id: \"apps-selection\",\n box: {x, y: y + APP_CELL + 2, w: APP_CELL, h: UNDERLINE_H},\n style: {border: 2},\n })\n }\n })\n\n // Grayscale mini icons are ambiguous on their own: caption the selection.\n const gridRows = Math.ceil(page.length / APP_GRID_COLS)\n const gridH = gridRows * APP_CELL + (gridRows - 1) * APP_CELL_GAP\n const selectedApp = apps[this.appsIndex]\n if (selectedApp) {\n elements.push({\n type: \"text\",\n id: \"apps-selected-name\",\n box: {x: MARGIN_X, y: listTop + gridH + 12, w: width, h: LINE_H},\n text: `${selectedApp.name}${selectedApp.running ? \" (running)\" : \"\"}`,\n style: {font: \"builtin\", breakMode: \"strict-word\", overflow: \"ellipsis\"},\n })\n }\n return elements\n }\n}\n\nconst customDashboardService = new CustomDashboardService()\nexport default customDashboardService\nexport {CustomDashboardService}\n"]}
@@ -1,26 +0,0 @@
1
- declare class DashboardCoordinator {
2
- private opened;
3
- private renderer;
4
- private legacyTimer;
5
- start(): void;
6
- stop(): void;
7
- get isOpen(): boolean;
8
- /** Head position (real or simulated). Opening respects contextual_dashboard. */
9
- setHeadUp(up: boolean): void;
10
- /** Double-tap on a CFW-eligible device. False when not eligible. */
11
- toggleCustom(): boolean;
12
- /** Double-tap fallback for devices without a firmware dashboard. */
13
- toggleLegacy(): void;
14
- /** True when an open dashboard consumed the gesture. */
15
- handleGesture(gestureName: string): boolean;
16
- /** Show the dashboard over the main content (ignores contextual_dashboard). */
17
- open(): void;
18
- /** Close and restore the retained main content. */
19
- close(): void;
20
- /** Parity with the retired native head-up wall: time, date, battery. */
21
- private renderLegacy;
22
- }
23
- declare const dashboardCoordinator: DashboardCoordinator;
24
- export default dashboardCoordinator;
25
- export { DashboardCoordinator };
26
- //# sourceMappingURL=DashboardCoordinator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DashboardCoordinator.d.ts","sourceRoot":"","sources":["../../src/services/DashboardCoordinator.ts"],"names":[],"mappings":"AAgBA,cAAM,oBAAoB;IACxB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,QAAQ,CAAmC;IACnD,OAAO,CAAC,WAAW,CAAsB;IAEzC,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAKZ,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,gFAAgF;IAChF,SAAS,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI;IAU5B,oEAAoE;IACpE,YAAY,IAAI,OAAO;IAOvB,oEAAoE;IACpE,YAAY,IAAI,IAAI;IAKpB,wDAAwD;IACxD,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAU3C,+EAA+E;IAC/E,IAAI,IAAI,IAAI;IAeZ,mDAAmD;IACnD,KAAK,IAAI,IAAI;IAYb,wEAAwE;IACxE,OAAO,CAAC,YAAY;CAgBrB;AAED,QAAA,MAAM,oBAAoB,sBAA6B,CAAA;AACvD,eAAe,oBAAoB,CAAA;AACnC,OAAO,EAAC,oBAAoB,EAAC,CAAA"}
@@ -1,125 +0,0 @@
1
- /**
2
- * Phone-side dashboard switching. Native retains a single display state; this
3
- * service decides when the dashboard covers the main content (head-up,
4
- * double-tap) and which renderer draws it: the CFW custom dashboard, or the
5
- * legacy time/battery wall for stock devices.
6
- */
7
- import { useGlassesStore } from "../stores/glasses";
8
- import { SETTINGS, useSettingsStore } from "../stores/settings";
9
- import { BgTimer } from "../utils/timers";
10
- import customDashboardService from "./CustomDashboardService";
11
- import { isGlassesConnected } from "./GlassesReadiness";
12
- import localDisplayManager from "./LocalDisplayManager";
13
- const LEGACY_CLOCK_REFRESH_MS = 30_000;
14
- const LEGACY_DASHBOARD_PKG = "system.dashboard";
15
- class DashboardCoordinator {
16
- opened = false;
17
- renderer = null;
18
- legacyTimer = null;
19
- start() {
20
- customDashboardService.onRequestClose = () => this.close();
21
- }
22
- stop() {
23
- this.close();
24
- customDashboardService.onRequestClose = null;
25
- }
26
- get isOpen() {
27
- return this.opened;
28
- }
29
- /** Head position (real or simulated). Opening respects contextual_dashboard. */
30
- setHeadUp(up) {
31
- if (up === this.opened)
32
- return;
33
- if (up) {
34
- if (useSettingsStore.getState().getSetting(SETTINGS.contextual_dashboard.key) === false)
35
- return;
36
- this.open();
37
- }
38
- else {
39
- this.close();
40
- }
41
- }
42
- /** Double-tap on a CFW-eligible device. False when not eligible. */
43
- toggleCustom() {
44
- if (!customDashboardService.isEligible())
45
- return false;
46
- if (this.opened)
47
- this.close();
48
- else
49
- this.open();
50
- return true;
51
- }
52
- /** Double-tap fallback for devices without a firmware dashboard. */
53
- toggleLegacy() {
54
- if (this.opened)
55
- this.close();
56
- else
57
- this.open();
58
- }
59
- /** True when an open dashboard consumed the gesture. */
60
- handleGesture(gestureName) {
61
- if (!this.opened)
62
- return false;
63
- if (this.renderer === "custom")
64
- return customDashboardService.handleGesture(gestureName);
65
- if (gestureName === "double_tap") {
66
- this.close();
67
- return true;
68
- }
69
- return false;
70
- }
71
- /** Show the dashboard over the main content (ignores contextual_dashboard). */
72
- open() {
73
- if (this.opened)
74
- return;
75
- if (!isGlassesConnected(useGlassesStore.getState().connection))
76
- return;
77
- this.opened = true;
78
- localDisplayManager.setDashboardActive(true);
79
- if (customDashboardService.isEligible()) {
80
- this.renderer = "custom";
81
- customDashboardService.show();
82
- }
83
- else {
84
- this.renderer = "legacy";
85
- this.renderLegacy();
86
- this.legacyTimer = BgTimer.setInterval(() => this.renderLegacy(), LEGACY_CLOCK_REFRESH_MS);
87
- }
88
- }
89
- /** Close and restore the retained main content. */
90
- close() {
91
- if (!this.opened)
92
- return;
93
- this.opened = false;
94
- if (this.legacyTimer !== null) {
95
- BgTimer.clearInterval(this.legacyTimer);
96
- this.legacyTimer = null;
97
- }
98
- if (this.renderer === "custom")
99
- customDashboardService.hide();
100
- this.renderer = null;
101
- localDisplayManager.setDashboardActive(false);
102
- }
103
- /** Parity with the retired native head-up wall: time, date, battery. */
104
- renderLegacy() {
105
- if (!this.opened)
106
- return;
107
- const now = new Date();
108
- const time = new Intl.DateTimeFormat(undefined, {
109
- hour: "2-digit",
110
- minute: "2-digit",
111
- hour12: useSettingsStore.getState().getSetting(SETTINGS.twelve_hour_time.key) === true,
112
- }).format(now);
113
- const date = `${String(now.getMonth() + 1).padStart(2, "0")}/${String(now.getDate()).padStart(2, "0")}`;
114
- const level = useGlassesStore.getState().batteryLevel;
115
- const batt = typeof level === "number" && level >= 0 ? ` ${level}%` : "";
116
- localDisplayManager.renderDashboard(LEGACY_DASHBOARD_PKG, {
117
- view: "dashboard",
118
- layout: { layoutType: "text_wall", text: `${time} ${date}${batt} Connected` },
119
- });
120
- }
121
- }
122
- const dashboardCoordinator = new DashboardCoordinator();
123
- export default dashboardCoordinator;
124
- export { DashboardCoordinator };
125
- //# sourceMappingURL=DashboardCoordinator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DashboardCoordinator.js","sourceRoot":"","sources":["../../src/services/DashboardCoordinator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAC,QAAQ,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAC7D,OAAO,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAA;AACvC,OAAO,sBAAsB,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAC,kBAAkB,EAAC,MAAM,oBAAoB,CAAA;AACrD,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AAEvD,MAAM,uBAAuB,GAAG,MAAM,CAAA;AACtC,MAAM,oBAAoB,GAAG,kBAAkB,CAAA;AAE/C,MAAM,oBAAoB;IAChB,MAAM,GAAG,KAAK,CAAA;IACd,QAAQ,GAA+B,IAAI,CAAA;IAC3C,WAAW,GAAkB,IAAI,CAAA;IAEzC,KAAK;QACH,sBAAsB,CAAC,cAAc,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;IAC5D,CAAC;IAED,IAAI;QACF,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,sBAAsB,CAAC,cAAc,GAAG,IAAI,CAAA;IAC9C,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,gFAAgF;IAChF,SAAS,CAAC,EAAW;QACnB,IAAI,EAAE,KAAK,IAAI,CAAC,MAAM;YAAE,OAAM;QAC9B,IAAI,EAAE,EAAE,CAAC;YACP,IAAI,gBAAgB,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAAG,CAAC,KAAK,KAAK;gBAAE,OAAM;YAC/F,IAAI,CAAC,IAAI,EAAE,CAAA;QACb,CAAC;aAAM,C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AAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAA;QACvG,MAAM,KAAK,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC,YAAY,CAAA;QACrD,MAAM,IAAI,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;QACxE,mBAAmB,CAAC,eAAe,CAAC,oBAAoB,EAAE;YACxD,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,EAAC,UAAU,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,IAAI,GAAG,IAAI,YAAY,EAAC;SAC5E,CAAC,CAAA;IACJ,CAAC;CACF;AAED,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,EAAE,CAAA;AACvD,eAAe,oBAAoB,CAAA;AACnC,OAAO,EAAC,oBAAoB,EAAC,CAAA","sourcesContent":["/**\n * Phone-side dashboard switching. Native retains a single display state; this\n * service decides when the dashboard covers the main content (head-up,\n * double-tap) and which renderer draws it: the CFW custom dashboard, or the\n * legacy time/battery wall for stock devices.\n */\nimport {useGlassesStore} from \"../stores/glasses\"\nimport {SETTINGS, useSettingsStore} from \"../stores/settings\"\nimport {BgTimer} from \"../utils/timers\"\nimport customDashboardService from \"./CustomDashboardService\"\nimport {isGlassesConnected} from \"./GlassesReadiness\"\nimport localDisplayManager from \"./LocalDisplayManager\"\n\nconst LEGACY_CLOCK_REFRESH_MS = 30_000\nconst LEGACY_DASHBOARD_PKG = \"system.dashboard\"\n\nclass DashboardCoordinator {\n private opened = false\n private renderer: \"custom\" | \"legacy\" | null = null\n private legacyTimer: number | null = null\n\n start(): void {\n customDashboardService.onRequestClose = () => this.close()\n }\n\n stop(): void {\n this.close()\n customDashboardService.onRequestClose = null\n }\n\n get isOpen(): boolean {\n return this.opened\n }\n\n /** Head position (real or simulated). Opening respects contextual_dashboard. */\n setHeadUp(up: boolean): void {\n if (up === this.opened) return\n if (up) {\n if (useSettingsStore.getState().getSetting(SETTINGS.contextual_dashboard.key) === false) return\n this.open()\n } else {\n this.close()\n }\n }\n\n /** Double-tap on a CFW-eligible device. False when not eligible. */\n toggleCustom(): boolean {\n if (!customDashboardService.isEligible()) return false\n if (this.opened) this.close()\n else this.open()\n return true\n }\n\n /** Double-tap fallback for devices without a firmware dashboard. */\n toggleLegacy(): void {\n if (this.opened) this.close()\n else this.open()\n }\n\n /** True when an open dashboard consumed the gesture. */\n handleGesture(gestureName: string): boolean {\n if (!this.opened) return false\n if (this.renderer === \"custom\") return customDashboardService.handleGesture(gestureName)\n if (gestureName === \"double_tap\") {\n this.close()\n return true\n }\n return false\n }\n\n /** Show the dashboard over the main content (ignores contextual_dashboard). */\n open(): void {\n if (this.opened) return\n if (!isGlassesConnected(useGlassesStore.getState().connection)) return\n this.opened = true\n localDisplayManager.setDashboardActive(true)\n if (customDashboardService.isEligible()) {\n this.renderer = \"custom\"\n customDashboardService.show()\n } else {\n this.renderer = \"legacy\"\n this.renderLegacy()\n this.legacyTimer = BgTimer.setInterval(() => this.renderLegacy(), LEGACY_CLOCK_REFRESH_MS)\n }\n }\n\n /** Close and restore the retained main content. */\n close(): void {\n if (!this.opened) return\n this.opened = false\n if (this.legacyTimer !== null) {\n BgTimer.clearInterval(this.legacyTimer)\n this.legacyTimer = null\n }\n if (this.renderer === \"custom\") customDashboardService.hide()\n this.renderer = null\n localDisplayManager.setDashboardActive(false)\n }\n\n /** Parity with the retired native head-up wall: time, date, battery. */\n private renderLegacy(): void {\n if (!this.opened) return\n const now = new Date()\n const time = new Intl.DateTimeFormat(undefined, {\n hour: \"2-digit\",\n minute: \"2-digit\",\n hour12: useSettingsStore.getState().getSetting(SETTINGS.twelve_hour_time.key) === true,\n }).format(now)\n const date = `${String(now.getMonth() + 1).padStart(2, \"0\")}/${String(now.getDate()).padStart(2, \"0\")}`\n const level = useGlassesStore.getState().batteryLevel\n const batt = typeof level === \"number\" && level >= 0 ? ` ${level}%` : \"\"\n localDisplayManager.renderDashboard(LEGACY_DASHBOARD_PKG, {\n view: \"dashboard\",\n layout: {layoutType: \"text_wall\", text: `${time} ${date}${batt} Connected`},\n })\n }\n}\n\nconst dashboardCoordinator = new DashboardCoordinator()\nexport default dashboardCoordinator\nexport {DashboardCoordinator}\n"]}
@@ -1,13 +0,0 @@
1
- /**
2
- * Seeded catalog of common iOS apps that post notifications, keyed by bundle
3
- * id. iOS has no installed-apps enumeration — the filter UI shows this catalog
4
- * plus apps the glasses have actually observed via ANCS — and the on-glass
5
- * allowlist push needs known ids so a blocked app doesn't take every
6
- * not-yet-seen app down with it (the firmware filter is allow-based).
7
- */
8
- export interface IosNotificationApp {
9
- appId: string;
10
- displayName: string;
11
- }
12
- export declare const IOS_NOTIFICATION_APP_CATALOG: IosNotificationApp[];
13
- //# sourceMappingURL=iosNotificationAppCatalog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iosNotificationAppCatalog.d.ts","sourceRoot":"","sources":["../../src/services/iosNotificationAppCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,eAAO,MAAM,4BAA4B,EAAE,kBAAkB,EA0B5D,CAAA"}
@@ -1,28 +0,0 @@
1
- export const IOS_NOTIFICATION_APP_CATALOG = [
2
- { appId: "com.apple.MobileSMS", displayName: "Messages" },
3
- { appId: "com.apple.mobilephone", displayName: "Phone" },
4
- { appId: "com.apple.mobilemail", displayName: "Mail" },
5
- { appId: "com.apple.mobilecal", displayName: "Calendar" },
6
- { appId: "com.apple.reminders", displayName: "Reminders" },
7
- { appId: "com.apple.facetime", displayName: "FaceTime" },
8
- { appId: "net.whatsapp.WhatsApp", displayName: "WhatsApp" },
9
- { appId: "ph.telegra.Telegraph", displayName: "Telegram" },
10
- { appId: "org.whispersystems.signal", displayName: "Signal" },
11
- { appId: "com.google.Gmail", displayName: "Gmail" },
12
- { appId: "com.microsoft.Office.Outlook", displayName: "Outlook" },
13
- { appId: "com.tinyspeck.chatlyio", displayName: "Slack" },
14
- { appId: "com.hammerandchisel.discord", displayName: "Discord" },
15
- { appId: "com.microsoft.skype.teams", displayName: "Teams" },
16
- { appId: "com.facebook.Messenger", displayName: "Messenger" },
17
- { appId: "com.facebook.Facebook", displayName: "Facebook" },
18
- { appId: "com.burbn.instagram", displayName: "Instagram" },
19
- { appId: "com.atebits.Tweetie2", displayName: "X" },
20
- { appId: "com.zhiliaoapp.musically", displayName: "TikTok" },
21
- { appId: "com.toyopagroup.picaboo", displayName: "Snapchat" },
22
- { appId: "com.linkedin.LinkedIn", displayName: "LinkedIn" },
23
- { appId: "com.google.ios.youtube", displayName: "YouTube" },
24
- { appId: "com.spotify.client", displayName: "Spotify" },
25
- { appId: "com.ubercab.UberClient", displayName: "Uber" },
26
- { appId: "com.venmo.TouchFree", displayName: "Venmo" },
27
- ];
28
- //# sourceMappingURL=iosNotificationAppCatalog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iosNotificationAppCatalog.js","sourceRoot":"","sources":["../../src/services/iosNotificationAppCatalog.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,4BAA4B,GAAyB;IAChE,EAAC,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,UAAU,EAAC;IACvD,EAAC,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,OAAO,EAAC;IACtD,EAAC,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,EAAC;IACpD,EAAC,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,UAAU,EAAC;IACvD,EAAC,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,WAAW,EAAC;IACxD,EAAC,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,UAAU,EAAC;IACtD,EAAC,KAAK,EAAE,uBAAuB,EAAE,WAAW,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ps enumeration — the filter UI shows this catalog\n * plus apps the glasses have actually observed via ANCS — and the on-glass\n * allowlist push needs known ids so a blocked app doesn't take every\n * not-yet-seen app down with it (the firmware filter is allow-based).\n */\nexport interface IosNotificationApp {\n appId: string\n displayName: string\n}\n\nexport const IOS_NOTIFICATION_APP_CATALOG: IosNotificationApp[] = [\n {appId: \"com.apple.MobileSMS\", displayName: \"Messages\"},\n {appId: \"com.apple.mobilephone\", displayName: \"Phone\"},\n {appId: \"com.apple.mobilemail\", displayName: \"Mail\"},\n {appId: \"com.apple.mobilecal\", displayName: \"Calendar\"},\n {appId: \"com.apple.reminders\", displayName: \"Reminders\"},\n {appId: \"com.apple.facetime\", displayName: \"FaceTime\"},\n {appId: \"net.whatsapp.WhatsApp\", displayName: \"WhatsApp\"},\n {appId: \"ph.telegra.Telegraph\", displayName: \"Telegram\"},\n {appId: \"org.whispersystems.signal\", displayName: \"Signal\"},\n {appId: \"com.google.Gmail\", displayName: \"Gmail\"},\n {appId: \"com.microsoft.Office.Outlook\", displayName: \"Outlook\"},\n {appId: \"com.tinyspeck.chatlyio\", displayName: \"Slack\"},\n {appId: \"com.hammerandchisel.discord\", displayName: \"Discord\"},\n {appId: \"com.microsoft.skype.teams\", displayName: \"Teams\"},\n {appId: \"com.facebook.Messenger\", displayName: \"Messenger\"},\n {appId: \"com.facebook.Facebook\", displayName: \"Facebook\"},\n {appId: \"com.burbn.instagram\", displayName: \"Instagram\"},\n {appId: \"com.atebits.Tweetie2\", displayName: \"X\"},\n {appId: \"com.zhiliaoapp.musically\", displayName: \"TikTok\"},\n {appId: \"com.toyopagroup.picaboo\", displayName: \"Snapchat\"},\n {appId: \"com.linkedin.LinkedIn\", displayName: \"LinkedIn\"},\n {appId: \"com.google.ios.youtube\", displayName: \"YouTube\"},\n {appId: \"com.spotify.client\", displayName: \"Spotify\"},\n {appId: \"com.ubercab.UberClient\", displayName: \"Uber\"},\n {appId: \"com.venmo.TouchFree\", displayName: \"Venmo\"},\n]\n"]}
@@ -1,83 +0,0 @@
1
- import type {ClientApp} from "../types/applet"
2
- import {DeviceTypes} from "../types/enums"
3
-
4
- /** Canonical widget order; also the default layout order. */
5
- export const DASHBOARD_WIDGET_IDS = ["clock", "calendar", "apps", "notifications"] as const
6
- export type DashboardWidgetId = (typeof DASHBOARD_WIDGET_IDS)[number]
7
- export type DashboardWidgetSetting = {id: DashboardWidgetId; enabled: boolean}
8
-
9
- export type DashboardAction = {kind: "apps-menu"} | {kind: "notifications"}
10
- export type AppMenuAction = {kind: "app"; packageName: string}
11
-
12
- export type MenuAppSetting = {packageName: string; name: string; running?: boolean}
13
- export type CustomDashboardClockStyle = "compact" | "large"
14
-
15
- /** G2.swift appends this marker after the firmware advertises EVENCFW capabilities. */
16
- export function isGlasslyCfwFirmwareVersion(firmwareVersion: string | null | undefined): boolean {
17
- return firmwareVersion?.toLowerCase().includes("glassly cfw") === true
18
- }
19
-
20
- /** Stock G2 and NIMO are intentionally excluded. */
21
- export function isCustomDashboardEligible(info: {model?: string | null; firmwareVersion?: string | null}): boolean {
22
- return info.model === DeviceTypes.G2 && isGlasslyCfwFirmwareVersion(info.firmwareVersion)
23
- }
24
-
25
- export function formatDashboardClock(
26
- date: Date,
27
- options: {twelveHour: boolean; showDate: boolean},
28
- ): {time: string; date?: string} {
29
- const time = new Intl.DateTimeFormat(undefined, {
30
- hour: "numeric",
31
- minute: "2-digit",
32
- hour12: options.twelveHour,
33
- }).format(date)
34
- if (!options.showDate) return {time}
35
- return {
36
- time,
37
- date: new Intl.DateTimeFormat(undefined, {weekday: "short", month: "short", day: "numeric"}).format(date),
38
- }
39
- }
40
-
41
- /**
42
- * Saved widget order, sanitized: unknown/duplicate entries dropped, widgets
43
- * missing from the saved value appended enabled in canonical order.
44
- */
45
- export function normalizeDashboardWidgets(raw: unknown): DashboardWidgetSetting[] {
46
- const widgets: DashboardWidgetSetting[] = []
47
- if (Array.isArray(raw)) {
48
- for (const entry of raw) {
49
- if (!entry || typeof entry !== "object") continue
50
- const id = (entry as {id?: unknown}).id as DashboardWidgetId
51
- if (!DASHBOARD_WIDGET_IDS.includes(id)) continue
52
- if (widgets.some((widget) => widget.id === id)) continue
53
- widgets.push({id, enabled: (entry as {enabled?: unknown}).enabled !== false})
54
- }
55
- }
56
- for (const id of DASHBOARD_WIDGET_IDS) {
57
- if (!widgets.some((widget) => widget.id === id)) widgets.push({id, enabled: true})
58
- }
59
- return widgets
60
- }
61
-
62
- export function orderedDashboardApps(menu: MenuAppSetting[] | null | undefined, apps: ClientApp[]): ClientApp[] {
63
- if (!Array.isArray(menu)) return []
64
- return menu
65
- .map((item) => apps.find((app) => app.packageName === item.packageName))
66
- .filter((app): app is ClientApp => Boolean(app && !app.hidden && app.compatibility?.isCompatible !== false))
67
- }
68
-
69
- /** Focusable main-view actions, following the user's widget order. */
70
- export function dashboardActions(widgets: DashboardWidgetSetting[]): DashboardAction[] {
71
- const actions: DashboardAction[] = []
72
- for (const widget of widgets) {
73
- if (!widget.enabled) continue
74
- if (widget.id === "apps") actions.push({kind: "apps-menu"})
75
- else if (widget.id === "notifications") actions.push({kind: "notifications"})
76
- }
77
- return actions
78
- }
79
-
80
- /** App-menu view rows: the Glasses Menu apps in order (double tap leaves the view). */
81
- export function appMenuActions(apps: ClientApp[]): AppMenuAction[] {
82
- return apps.map((app): AppMenuAction => ({kind: "app", packageName: app.packageName}))
83
- }