@glassly/engine 0.4.0-dev.1067 → 0.4.0-dev.1069

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 (33) hide show
  1. package/build/engine.d.ts +1 -0
  2. package/build/engine.d.ts.map +1 -1
  3. package/build/facades/permissions.d.ts.map +1 -1
  4. package/build/facades/permissions.js +0 -2
  5. package/build/facades/permissions.js.map +1 -1
  6. package/build/facades/phoneNotifications.d.ts +7 -0
  7. package/build/facades/phoneNotifications.d.ts.map +1 -1
  8. package/build/facades/phoneNotifications.js +6 -0
  9. package/build/facades/phoneNotifications.js.map +1 -1
  10. package/build/generated/releaseMetadata.js +3 -3
  11. package/build/generated/releaseMetadata.js.map +1 -1
  12. package/build/index.d.ts +1 -0
  13. package/build/index.d.ts.map +1 -1
  14. package/build/index.js.map +1 -1
  15. package/build/services/LocalMiniappRuntime.d.ts +3 -0
  16. package/build/services/LocalMiniappRuntime.d.ts.map +1 -1
  17. package/build/services/LocalMiniappRuntime.js +67 -1
  18. package/build/services/LocalMiniappRuntime.js.map +1 -1
  19. package/build/services/notifications/miniappNotifications.d.ts +31 -0
  20. package/build/services/notifications/miniappNotifications.d.ts.map +1 -0
  21. package/build/services/notifications/miniappNotifications.js +24 -0
  22. package/build/services/notifications/miniappNotifications.js.map +1 -0
  23. package/build/stores/settings.d.ts.map +1 -1
  24. package/build/stores/settings.js +0 -8
  25. package/build/stores/settings.js.map +1 -1
  26. package/package.json +7 -7
  27. package/src/facades/permissions.ts +0 -2
  28. package/src/facades/phoneNotifications.ts +10 -0
  29. package/src/generated/releaseMetadata.ts +3 -3
  30. package/src/index.ts +1 -0
  31. package/src/services/LocalMiniappRuntime.ts +79 -1
  32. package/src/services/notifications/miniappNotifications.ts +53 -0
  33. package/src/stores/settings.ts +0 -8
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Notifications miniapps post (`session.phone.notifications.post`) on their
3
+ * way into the host's phone-notification path. The runtime validates and
4
+ * emits here; the host subscribes through `engine.phoneNotifications` and
5
+ * feeds them to the same fan-out as the phone's own, with `system: false`
6
+ * and `source` set, so the dashboard, other readers and presentation treat
7
+ * them alike.
8
+ */
9
+ export interface MiniappNotificationPosted {
10
+ type: "posted";
11
+ notificationId: string;
12
+ source: string;
13
+ app: string;
14
+ title: string;
15
+ content: string;
16
+ timestamp: number;
17
+ }
18
+ export interface MiniappNotificationDismissed {
19
+ type: "dismissed";
20
+ notificationId: string;
21
+ source: string;
22
+ timestamp: number;
23
+ }
24
+ export type MiniappNotificationEvent = MiniappNotificationPosted | MiniappNotificationDismissed;
25
+ export declare const MINIAPP_NOTIFICATION_TITLE_MAX = 200;
26
+ export declare const MINIAPP_NOTIFICATION_CONTENT_MAX = 2000;
27
+ export declare const MINIAPP_NOTIFICATION_ID_MAX = 128;
28
+ export declare function miniappNotificationId(source: string, id: string): string;
29
+ export declare function emitMiniappNotification(event: MiniappNotificationEvent): void;
30
+ export declare function onMiniappNotification(listener: (event: MiniappNotificationEvent) => void): () => void;
31
+ //# sourceMappingURL=miniappNotifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"miniappNotifications.d.ts","sourceRoot":"","sources":["../../../src/services/notifications/miniappNotifications.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,QAAQ,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,WAAW,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,GAAG,4BAA4B,CAAA;AAE/F,eAAO,MAAM,8BAA8B,MAAM,CAAA;AACjD,eAAO,MAAM,gCAAgC,OAAQ,CAAA;AACrD,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAI9C,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,wBAAwB,GAAG,IAAI,CAQ7E;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,GAAG,MAAM,IAAI,CAKrG"}
@@ -0,0 +1,24 @@
1
+ export const MINIAPP_NOTIFICATION_TITLE_MAX = 200;
2
+ export const MINIAPP_NOTIFICATION_CONTENT_MAX = 2_000;
3
+ export const MINIAPP_NOTIFICATION_ID_MAX = 128;
4
+ const listeners = new Set();
5
+ export function miniappNotificationId(source, id) {
6
+ return `${source}:${id}`;
7
+ }
8
+ export function emitMiniappNotification(event) {
9
+ for (const listener of listeners) {
10
+ try {
11
+ listener(event);
12
+ }
13
+ catch (err) {
14
+ console.warn(`miniappNotifications: listener threw: ${err?.message ?? err}`);
15
+ }
16
+ }
17
+ }
18
+ export function onMiniappNotification(listener) {
19
+ listeners.add(listener);
20
+ return () => {
21
+ listeners.delete(listener);
22
+ };
23
+ }
24
+ //# sourceMappingURL=miniappNotifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"miniappNotifications.js","sourceRoot":"","sources":["../../../src/services/notifications/miniappNotifications.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAA;AACjD,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,CAAA;AACrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAA;AAE9C,MAAM,SAAS,GAAG,IAAI,GAAG,EAA6C,CAAA;AAEtE,MAAM,UAAU,qBAAqB,CAAC,MAAc,EAAE,EAAU;IAC9D,OAAO,GAAG,MAAM,IAAI,EAAE,EAAE,CAAA;AAC1B,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,KAA+B;IACrE,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,QAAQ,CAAC,KAAK,CAAC,CAAA;QACjB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,IAAI,CAAC,yCAA0C,GAAa,EAAE,OAAO,IAAI,GAAG,EAAE,CAAC,CAAA;QACzF,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,QAAmD;IACvF,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IACvB,OAAO,GAAG,EAAE;QACV,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC5B,CAAC,CAAA;AACH,CAAC","sourcesContent":["/**\n * Notifications miniapps post (`session.phone.notifications.post`) on their\n * way into the host's phone-notification path. The runtime validates and\n * emits here; the host subscribes through `engine.phoneNotifications` and\n * feeds them to the same fan-out as the phone's own, with `system: false`\n * and `source` set, so the dashboard, other readers and presentation treat\n * them alike.\n */\nexport interface MiniappNotificationPosted {\n type: \"posted\"\n notificationId: string\n source: string\n app: string\n title: string\n content: string\n timestamp: number\n}\n\nexport interface MiniappNotificationDismissed {\n type: \"dismissed\"\n notificationId: string\n source: string\n timestamp: number\n}\n\nexport type MiniappNotificationEvent = MiniappNotificationPosted | MiniappNotificationDismissed\n\nexport const MINIAPP_NOTIFICATION_TITLE_MAX = 200\nexport const MINIAPP_NOTIFICATION_CONTENT_MAX = 2_000\nexport const MINIAPP_NOTIFICATION_ID_MAX = 128\n\nconst listeners = new Set<(event: MiniappNotificationEvent) => void>()\n\nexport function miniappNotificationId(source: string, id: string): string {\n return `${source}:${id}`\n}\n\nexport function emitMiniappNotification(event: MiniappNotificationEvent): void {\n for (const listener of listeners) {\n try {\n listener(event)\n } catch (err) {\n console.warn(`miniappNotifications: listener threw: ${(err as Error)?.message ?? err}`)\n }\n }\n}\n\nexport function onMiniappNotification(listener: (event: MiniappNotificationEvent) => void): () => void {\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/stores/settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAwB,MAAM,aAAa,CAAA;AAS9D,OAAO,EAAC,wBAAwB,EAAE,gCAAgC,EAAC,MAAM,wBAAwB,CAAA;AAEjG,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,MAAM,GAAG,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,OAAO,CAAA;IAGrB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;IAEjC,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAA;IAEpB,OAAO,EAAE,OAAO,CAAA;IAQhB,mBAAmB,CAAC,EAAE,IAAI,CAAA;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,qBAAqB,CAAC,EAAE,IAAI,CAAA;CAC7B;AAKD,eAAO,MAAM,uBAAuB,IAAI,CAAA;AAExC,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAkqCnC,CAAA;AAEV,eAAO,MAAM,eAAe,EAAE,MAAM,EAAuD,CAAA;AAI3F,eAAO,MAAM,sBAAsB,EAAE,MAAM,EA6D1C,CAAA;AAeD,eAAO,MAAM,qBAAqB,EAAE,MAAM,EAEV,CAAA;AAIhC,MAAM,WAAW,aAAa;IAE5B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAE7B,aAAa,EAAE,OAAO,CAAA;IAEtB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,YA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: {
93
- key: "memomind_accessory_picker",
94
- defaultValue: () => true,
95
- writable: true,
96
- saveOnServer: false,
97
- persist: true,
98
- },
99
92
  debug_console: {
100
93
  key: "debug_console",
101
94
  defaultValue: () => false,
@@ -1227,7 +1220,6 @@ export const BLUETOOTH_SETTING_KEYS = [
1227
1220
  SETTINGS.cfw_scene_renderer.key,
1228
1221
  SETTINGS.cfw_fast_ble.key,
1229
1222
  SETTINGS.perf_logs.key,
1230
- SETTINGS.memomind_accessory_picker.key,
1231
1223
  SETTINGS.ring_via_glasses.key,
1232
1224
  SETTINGS.display_max_fps.key,
1233
1225
  SETTINGS.twelve_hour_time.key,