@glassly/engine 0.3.1-dev.496 → 0.3.1-dev.525

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 (125) hide show
  1. package/build/engine.d.ts +9 -2
  2. package/build/engine.d.ts.map +1 -1
  3. package/build/engine.js +5 -0
  4. package/build/engine.js.map +1 -1
  5. package/build/facades/dev.js +1 -1
  6. package/build/facades/dev.js.map +1 -1
  7. package/build/facades/miniapps.d.ts +5 -5
  8. package/build/facades/miniapps.d.ts.map +1 -1
  9. package/build/facades/miniapps.js +5 -6
  10. package/build/facades/miniapps.js.map +1 -1
  11. package/build/facades/speech.d.ts +10 -0
  12. package/build/facades/speech.d.ts.map +1 -1
  13. package/build/facades/speech.js +10 -0
  14. package/build/facades/speech.js.map +1 -1
  15. package/build/generated/releaseMetadata.js +3 -3
  16. package/build/generated/releaseMetadata.js.map +1 -1
  17. package/build/index.d.ts +1 -1
  18. package/build/index.d.ts.map +1 -1
  19. package/build/index.js +1 -1
  20. package/build/index.js.map +1 -1
  21. package/build/services/AppRegistry.d.ts +1 -7
  22. package/build/services/AppRegistry.d.ts.map +1 -1
  23. package/build/services/AppRegistry.js +15 -26
  24. package/build/services/AppRegistry.js.map +1 -1
  25. package/build/services/DevServerBridge.d.ts +1 -1
  26. package/build/services/DevServerBridge.js +2 -2
  27. package/build/services/DevServerBridge.js.map +1 -1
  28. package/build/services/DeviceEventRouter.d.ts.map +1 -1
  29. package/build/services/DeviceEventRouter.js +2 -0
  30. package/build/services/DeviceEventRouter.js.map +1 -1
  31. package/build/services/JSRouter.js +1 -1
  32. package/build/services/JSRouter.js.map +1 -1
  33. package/build/services/LocalMiniappRuntime.d.ts +21 -6
  34. package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
  35. package/build/services/LocalMiniappRuntime.js +130 -48
  36. package/build/services/LocalMiniappRuntime.js.map +1 -1
  37. package/build/services/LocalTranslationService.d.ts +51 -0
  38. package/build/services/LocalTranslationService.d.ts.map +1 -0
  39. package/build/services/LocalTranslationService.js +141 -0
  40. package/build/services/LocalTranslationService.js.map +1 -0
  41. package/build/services/MiniappLauncher.d.ts +17 -23
  42. package/build/services/MiniappLauncher.d.ts.map +1 -1
  43. package/build/services/MiniappLauncher.js +30 -34
  44. package/build/services/MiniappLauncher.js.map +1 -1
  45. package/build/services/MiniappPauseCoordinator.d.ts +15 -0
  46. package/build/services/MiniappPauseCoordinator.d.ts.map +1 -0
  47. package/build/services/MiniappPauseCoordinator.js +93 -0
  48. package/build/services/MiniappPauseCoordinator.js.map +1 -0
  49. package/build/services/OfflineTranslationManager.d.ts +19 -0
  50. package/build/services/OfflineTranslationManager.d.ts.map +1 -0
  51. package/build/services/OfflineTranslationManager.js +35 -0
  52. package/build/services/OfflineTranslationManager.js.map +1 -0
  53. package/build/services/pages/OverlayPages.d.ts +5 -5
  54. package/build/services/pages/OverlayPages.d.ts.map +1 -1
  55. package/build/services/pages/OverlayPages.js +5 -5
  56. package/build/services/pages/OverlayPages.js.map +1 -1
  57. package/build/services/pages/overlayApps.d.ts +14 -11
  58. package/build/services/pages/overlayApps.d.ts.map +1 -1
  59. package/build/services/pages/overlayApps.js +21 -19
  60. package/build/services/pages/overlayApps.js.map +1 -1
  61. package/build/services/settingsBridge.d.ts +8 -8
  62. package/build/services/settingsBridge.d.ts.map +1 -1
  63. package/build/services/settingsBridge.js +12 -13
  64. package/build/services/settingsBridge.js.map +1 -1
  65. package/build/stores/apps.d.ts +0 -5
  66. package/build/stores/apps.d.ts.map +1 -1
  67. package/build/stores/apps.js +32 -52
  68. package/build/stores/apps.js.map +1 -1
  69. package/build/stores/settings.d.ts.map +1 -1
  70. package/build/stores/settings.js +0 -10
  71. package/build/stores/settings.js.map +1 -1
  72. package/build/types/applet.d.ts +3 -1
  73. package/build/types/applet.d.ts.map +1 -1
  74. package/build/types/applet.js.map +1 -1
  75. package/build/types/capabilities/even-realities-g1.d.ts.map +1 -1
  76. package/build/types/capabilities/even-realities-g1.js +1 -0
  77. package/build/types/capabilities/even-realities-g1.js.map +1 -1
  78. package/build/types/capabilities/even-realities-g2.d.ts.map +1 -1
  79. package/build/types/capabilities/even-realities-g2.js +1 -0
  80. package/build/types/capabilities/even-realities-g2.js.map +1 -1
  81. package/build/types/capabilities/mentra-display.d.ts.map +1 -1
  82. package/build/types/capabilities/mentra-display.js +1 -0
  83. package/build/types/capabilities/mentra-display.js.map +1 -1
  84. package/build/types/capabilities/nimo.d.ts.map +1 -1
  85. package/build/types/capabilities/nimo.js +1 -0
  86. package/build/types/capabilities/nimo.js.map +1 -1
  87. package/build/types/hardware.d.ts +9 -0
  88. package/build/types/hardware.d.ts.map +1 -1
  89. package/build/types/hardware.js +2 -0
  90. package/build/types/hardware.js.map +1 -1
  91. package/build/utils/miniappGlobals.js +1 -1
  92. package/build/utils/miniappGlobals.js.map +1 -1
  93. package/package.json +7 -7
  94. package/src/engine.ts +5 -0
  95. package/src/facades/dev.ts +1 -1
  96. package/src/facades/miniapps.ts +7 -7
  97. package/src/facades/speech.ts +12 -0
  98. package/src/generated/releaseMetadata.ts +3 -3
  99. package/src/index.ts +0 -2
  100. package/src/services/AppRegistry.ts +15 -27
  101. package/src/services/DevServerBridge.ts +2 -2
  102. package/src/services/DeviceEventRouter.ts +2 -0
  103. package/src/services/JSRouter.ts +1 -1
  104. package/src/services/LocalMiniappRuntime.ts +165 -66
  105. package/src/services/LocalTranslationService.ts +184 -0
  106. package/src/services/MiniappLauncher.ts +31 -34
  107. package/src/services/MiniappPauseCoordinator.ts +100 -0
  108. package/src/services/OfflineTranslationManager.ts +40 -0
  109. package/src/services/pages/OverlayPages.ts +5 -5
  110. package/src/services/pages/overlayApps.ts +19 -19
  111. package/src/services/settingsBridge.ts +12 -13
  112. package/src/stores/apps.ts +30 -58
  113. package/src/stores/settings.ts +0 -10
  114. package/src/types/applet.ts +3 -1
  115. package/src/types/capabilities/even-realities-g1.ts +1 -0
  116. package/src/types/capabilities/even-realities-g2.ts +1 -0
  117. package/src/types/capabilities/mentra-display.ts +1 -0
  118. package/src/types/capabilities/nimo.ts +1 -0
  119. package/src/types/hardware.ts +9 -0
  120. package/src/utils/miniappGlobals.ts +1 -1
  121. package/build/services/pages/activeDashboard.d.ts +0 -7
  122. package/build/services/pages/activeDashboard.d.ts.map +0 -1
  123. package/build/services/pages/activeDashboard.js +0 -21
  124. package/build/services/pages/activeDashboard.js.map +0 -1
  125. package/src/services/pages/activeDashboard.ts +0 -24
@@ -30,6 +30,11 @@ export interface CameraCapabilities {
30
30
  }
31
31
  }
32
32
 
33
+ export interface LevelRange {
34
+ min: number
35
+ max: number
36
+ }
37
+
33
38
  /**
34
39
  * Display capabilities
35
40
  */
@@ -42,6 +47,8 @@ export interface DisplayCapabilities {
42
47
  fieldOfView?: {horizontal?: number; vertical?: number}
43
48
  maxTextLines?: number
44
49
  adjustBrightness?: boolean
50
+ /** The `dashboard_height` / `dashboard_depth` steps the glasses accept, inclusive; absent ⇒ no position control. */
51
+ positionRange?: {height: LevelRange; depth: LevelRange}
45
52
 
46
53
  // --- Scene display API (display.render()) — typed capabilities ---
47
54
  // Pure DATA the host scene pipeline acts on generically; a device without
@@ -231,6 +238,8 @@ export const HARDWARE_CAPABILITIES: Record<string, Capabilities> = {
231
238
  display: {
232
239
  ...evenRealitiesG1.display,
233
240
  canDisplayBitmap: false,
241
+ // The AR99 firmware takes no position command.
242
+ positionRange: undefined,
234
243
  },
235
244
  hasMicrophone: true,
236
245
  hasOta: true,
@@ -127,7 +127,7 @@ export function buildMiniappGlobalsScript(opts: BuildMiniappGlobalsOptions): str
127
127
  // Console-tap shim: wrap console.log/warn/error/info/debug so each call
128
128
  // also forwards a `dev_log` envelope back to the phone via
129
129
  // ReactNativeWebView.postMessage. Dev mode forwards to the laptop's
130
- // `glassly-miniapp dev` terminal; non-dev mode falls back to the React
130
+ // `glassly dev` terminal; non-dev mode falls back to the React
131
131
  // Native log stream (Metro / Xcode console / adb logcat) so installed-
132
132
  // miniapp errors are still inspectable when there's no laptop sidecar.
133
133
  //
@@ -1,7 +0,0 @@
1
- export declare function resolveActiveDashboard(installed: readonly string[], chosen: unknown, fallback: string): string | null;
2
- /** The active dashboard among `apps`; only miniapps whose manifest type is "dashboard" can hold the role. */
3
- export declare function activeDashboardAmong(apps: ReadonlyArray<{
4
- packageName: string;
5
- type?: string;
6
- }>): string | null;
7
- //# sourceMappingURL=activeDashboard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"activeDashboard.d.ts","sourceRoot":"","sources":["../../../src/services/pages/activeDashboard.ts"],"names":[],"mappings":"AASA,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAIrH;AAED,6GAA6G;AAC7G,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,GAAG,MAAM,GAAG,IAAI,CAO7G"}
@@ -1,21 +0,0 @@
1
- /**
2
- * Who holds the dashboard role (ADR-0009): the wearer's choice when that
3
- * miniapp is installed, else the default (the bundled dashboard), else the
4
- * first installed dashboard by package name, else nobody. Read at decision
5
- * time, never cached, so an uninstall hands the role back without anyone
6
- * rewriting the setting.
7
- */
8
- import { SETTINGS, useSettingsStore } from "../../stores/settings";
9
- export function resolveActiveDashboard(installed, chosen, fallback) {
10
- if (typeof chosen === "string" && installed.includes(chosen))
11
- return chosen;
12
- if (installed.includes(fallback))
13
- return fallback;
14
- return [...installed].sort()[0] ?? null;
15
- }
16
- /** The active dashboard among `apps`; only miniapps whose manifest type is "dashboard" can hold the role. */
17
- export function activeDashboardAmong(apps) {
18
- const installed = apps.filter((app) => app.type === "dashboard").map((app) => app.packageName);
19
- return resolveActiveDashboard(installed, useSettingsStore.getState().getSetting(SETTINGS.active_dashboard.key), SETTINGS.active_dashboard.defaultValue());
20
- }
21
- //# sourceMappingURL=activeDashboard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"activeDashboard.js","sourceRoot":"","sources":["../../../src/services/pages/activeDashboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAC,QAAQ,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AAEhE,MAAM,UAAU,sBAAsB,CAAC,SAA4B,EAAE,MAAe,EAAE,QAAgB;IACpG,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAA;IAC3E,IAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAA;IACjD,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAA;AACzC,CAAC;AAED,6GAA6G;AAC7G,MAAM,UAAU,oBAAoB,CAAC,IAAyD;IAC5F,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;IAC9F,OAAO,sBAAsB,CAC3B,SAAS,EACT,gBAAgB,CAAC,QAAQ,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,gBAAgB,CAAC,GAAG,CAAC,EACrE,QAAQ,CAAC,gBAAgB,CAAC,YAAY,EAAE,CACzC,CAAA;AACH,CAAC","sourcesContent":["/**\n * Who holds the dashboard role (ADR-0009): the wearer's choice when that\n * miniapp is installed, else the default (the bundled dashboard), else the\n * first installed dashboard by package name, else nobody. Read at decision\n * time, never cached, so an uninstall hands the role back without anyone\n * rewriting the setting.\n */\nimport {SETTINGS, useSettingsStore} from \"../../stores/settings\"\n\nexport function resolveActiveDashboard(installed: readonly string[], chosen: unknown, fallback: string): string | null {\n if (typeof chosen === \"string\" && installed.includes(chosen)) return chosen\n if (installed.includes(fallback)) return fallback\n return [...installed].sort()[0] ?? null\n}\n\n/** The active dashboard among `apps`; only miniapps whose manifest type is \"dashboard\" can hold the role. */\nexport function activeDashboardAmong(apps: ReadonlyArray<{packageName: string; type?: string}>): string | null {\n const installed = apps.filter((app) => app.type === \"dashboard\").map((app) => app.packageName)\n return resolveActiveDashboard(\n installed,\n useSettingsStore.getState().getSetting(SETTINGS.active_dashboard.key),\n SETTINGS.active_dashboard.defaultValue(),\n )\n}\n"]}
@@ -1,24 +0,0 @@
1
- /**
2
- * Who holds the dashboard role (ADR-0009): the wearer's choice when that
3
- * miniapp is installed, else the default (the bundled dashboard), else the
4
- * first installed dashboard by package name, else nobody. Read at decision
5
- * time, never cached, so an uninstall hands the role back without anyone
6
- * rewriting the setting.
7
- */
8
- import {SETTINGS, useSettingsStore} from "../../stores/settings"
9
-
10
- export function resolveActiveDashboard(installed: readonly string[], chosen: unknown, fallback: string): string | null {
11
- if (typeof chosen === "string" && installed.includes(chosen)) return chosen
12
- if (installed.includes(fallback)) return fallback
13
- return [...installed].sort()[0] ?? null
14
- }
15
-
16
- /** The active dashboard among `apps`; only miniapps whose manifest type is "dashboard" can hold the role. */
17
- export function activeDashboardAmong(apps: ReadonlyArray<{packageName: string; type?: string}>): string | null {
18
- const installed = apps.filter((app) => app.type === "dashboard").map((app) => app.packageName)
19
- return resolveActiveDashboard(
20
- installed,
21
- useSettingsStore.getState().getSetting(SETTINGS.active_dashboard.key),
22
- SETTINGS.active_dashboard.defaultValue(),
23
- )
24
- }