@gramlot/gramlot 0.3.17 → 0.3.19

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 (41) hide show
  1. package/dist/components/editors/__init__.py +1 -1
  2. package/dist/components/editors/assets/collection.js +1 -1
  3. package/dist/components/editors/assets/index.js +1 -1
  4. package/dist/components/inputs/__init__.py +1 -1
  5. package/dist/components/inputs/assets/collection.js +1 -1
  6. package/dist/components/inputs/assets/index.js +1 -1
  7. package/dist/components/layout/__init__.py +1 -1
  8. package/dist/components/layout/assets/collection.js +2 -2
  9. package/dist/components/layout/assets/index.js +1 -1
  10. package/dist/components/tree/__init__.py +1 -1
  11. package/dist/components/tree/assets/collection.js +1 -1
  12. package/dist/components/tree/assets/index.js +1 -1
  13. package/dist/gramlot.js +1099 -620
  14. package/dist/gramlot.min.js +41 -39
  15. package/package.json +2 -2
  16. package/src/binding/data-binder.js +71 -0
  17. package/src/binding/providers.js +7 -4
  18. package/src/binding/router.js +3 -1
  19. package/src/binding/runtime.js +9 -1
  20. package/src/builder/binding.json +49 -0
  21. package/src/components/window-surface.js +1 -1
  22. package/src/frame-messages.js +142 -73
  23. package/src/gramlot.d.ts +6 -3
  24. package/src/gramlot.js +10 -3
  25. package/src/handlers/rpc-handler.js +1 -1
  26. package/src/handlers/subscriptions-handler.js +20 -14
  27. package/src/index-page-styles.js +1 -1
  28. package/src/page-store-connection.js +220 -0
  29. package/src/server-adapter.d.ts +4 -3
  30. package/src/server-adapter.js +6 -5
  31. package/src/view/labelbox.js +4 -2
  32. package/src/websocket-transport.d.ts +10 -0
  33. package/src/websocket-transport.js +13 -0
  34. package/themes/gramlot-base/theme.css +6 -0
  35. package/themes/gramlot-compact/theme.css +6 -0
  36. package/themes/joanna/theme.css +6 -0
  37. package/themes/mela/theme.css +6 -0
  38. package/themes/mimi/theme.css +6 -0
  39. package/themes/palettes/compact.css +6 -0
  40. package/themes/palettes/joanna.css +6 -0
  41. package/themes/palettes/mimi.css +6 -0
@@ -0,0 +1,10 @@
1
+ import type {RpcTransport} from './handlers/rpc-handler.js';
2
+
3
+ /** Asynchronous RPC on an existing page channel; never opens another socket. */
4
+ export class WebSocketTransport {
5
+ constructor(channel: Pick<RpcTransport, 'call'>, closeTransport: Pick<RpcTransport, 'close' | 'dispose'>);
6
+ readonly supportsCallSync: false;
7
+ call(text: string, signal?: AbortSignal): Promise<string>;
8
+ close(pageId: string, options?: {beacon?: boolean}): void;
9
+ dispose(): void;
10
+ }
@@ -0,0 +1,13 @@
1
+ /* @ts-self-types="./websocket-transport.d.ts" */
2
+ /** RPC over the page's existing logical channel; Gramlot owns its socket lifecycle. */
3
+ export class WebSocketTransport {
4
+ constructor(channel, closeTransport) {
5
+ this.channel = channel;
6
+ this.closeTransport = closeTransport;
7
+ }
8
+ get supportsCallSync() { return false; }
9
+ call(text, signal) { return this.channel.call(text, signal); }
10
+ // Also release a bootstrapped page whose channel never attached.
11
+ close(pageId, options) { this.closeTransport.close(pageId, options); }
12
+ dispose() { this.closeTransport.dispose(); }
13
+ }
@@ -18,6 +18,8 @@
18
18
  --gramlot-ink: #243449;
19
19
  --gramlot-background: #f7f8f5;
20
20
  --gramlot-surface: #ffffff;
21
+ --gramlot-header-background: #303946;
22
+ --gramlot-header-color: #ffffff;
21
23
  --gramlot-surface-subtle: #edf1f7;
22
24
  --gramlot-text-secondary: #566579;
23
25
  --gramlot-border: #d5dce5;
@@ -67,6 +69,8 @@
67
69
  --gramlot-ink: #edf2fa;
68
70
  --gramlot-background: #111b29;
69
71
  --gramlot-surface: #1b293b;
72
+ --gramlot-header-background: #2c3d52;
73
+ --gramlot-header-color: #edf2fa;
70
74
  --gramlot-surface-subtle: #24354b;
71
75
  --gramlot-text-secondary: #bdc9d9;
72
76
  --gramlot-border: #44566d;
@@ -92,6 +96,8 @@
92
96
  --gramlot-ink: #edf2fa;
93
97
  --gramlot-background: #111b29;
94
98
  --gramlot-surface: #1b293b;
99
+ --gramlot-header-background: #2c3d52;
100
+ --gramlot-header-color: #edf2fa;
95
101
  --gramlot-surface-subtle: #24354b;
96
102
  --gramlot-text-secondary: #bdc9d9;
97
103
  --gramlot-border: #44566d;
@@ -4,6 +4,8 @@
4
4
  color-scheme: light;
5
5
  --gramlot-background: #f3f5f7;
6
6
  --gramlot-surface: #ffffff;
7
+ --gramlot-header-background: #303946;
8
+ --gramlot-header-color: #ffffff;
7
9
  --gramlot-surface-subtle: #e9edf2;
8
10
  --gramlot-ink: #202936;
9
11
  --gramlot-text-secondary: #526174;
@@ -65,6 +67,8 @@
65
67
  color-scheme: dark;
66
68
  --gramlot-background: #171c24;
67
69
  --gramlot-surface: #222a35;
70
+ --gramlot-header-background: #354152;
71
+ --gramlot-header-color: #edf1f7;
68
72
  --gramlot-surface-subtle: #2b3543;
69
73
  --gramlot-ink: #edf1f7;
70
74
  --gramlot-text-secondary: #b8c4d4;
@@ -93,6 +97,8 @@
93
97
  color-scheme: dark;
94
98
  --gramlot-background: #171c24;
95
99
  --gramlot-surface: #222a35;
100
+ --gramlot-header-background: #354152;
101
+ --gramlot-header-color: #edf1f7;
96
102
  --gramlot-surface-subtle: #2b3543;
97
103
  --gramlot-ink: #edf1f7;
98
104
  --gramlot-text-secondary: #b8c4d4;
@@ -4,6 +4,8 @@
4
4
  color-scheme: light;
5
5
  --gramlot-background: #f5f4f2;
6
6
  --gramlot-surface: #ffffff;
7
+ --gramlot-header-background: #3f4249;
8
+ --gramlot-header-color: #ffffff;
7
9
  --gramlot-surface-subtle: #eeece8;
8
10
  --gramlot-ink: #292c31;
9
11
  --gramlot-text-secondary: #5d636c;
@@ -65,6 +67,8 @@
65
67
  color-scheme: dark;
66
68
  --gramlot-background: #1b1c20;
67
69
  --gramlot-surface: #25272c;
70
+ --gramlot-header-background: #41444c;
71
+ --gramlot-header-color: #f3f2ef;
68
72
  --gramlot-surface-subtle: #303239;
69
73
  --gramlot-ink: #f3f2ef;
70
74
  --gramlot-text-secondary: #c4c3c0;
@@ -93,6 +97,8 @@
93
97
  color-scheme: dark;
94
98
  --gramlot-background: #1b1c20;
95
99
  --gramlot-surface: #25272c;
100
+ --gramlot-header-background: #41444c;
101
+ --gramlot-header-color: #f3f2ef;
96
102
  --gramlot-surface-subtle: #303239;
97
103
  --gramlot-ink: #f3f2ef;
98
104
  --gramlot-text-secondary: #c4c3c0;
@@ -10,6 +10,8 @@
10
10
  --gramlot-window-backdrop: rgb(0 0 0 / 24%);
11
11
  --gramlot-background: #f2f2f7;
12
12
  --gramlot-surface: #ffffff;
13
+ --gramlot-header-background: #38383d;
14
+ --gramlot-header-color: #ffffff;
13
15
  --gramlot-surface-subtle: #eaeaed;
14
16
  --gramlot-ink: #1d1d1f;
15
17
  --gramlot-text-secondary: #636366;
@@ -73,6 +75,8 @@
73
75
  color-scheme: dark;
74
76
  --gramlot-background: #000000;
75
77
  --gramlot-surface: #1c1c1e;
78
+ --gramlot-header-background: #323236;
79
+ --gramlot-header-color: #f5f5f7;
76
80
  --gramlot-surface-subtle: #38383a;
77
81
  --gramlot-ink: #f5f5f7;
78
82
  --gramlot-text-secondary: #bdbdc4;
@@ -101,6 +105,8 @@
101
105
  color-scheme: dark;
102
106
  --gramlot-background: #000000;
103
107
  --gramlot-surface: #1c1c1e;
108
+ --gramlot-header-background: #323236;
109
+ --gramlot-header-color: #f5f5f7;
104
110
  --gramlot-surface-subtle: #38383a;
105
111
  --gramlot-ink: #f5f5f7;
106
112
  --gramlot-text-secondary: #bdbdc4;
@@ -4,6 +4,8 @@
4
4
  color-scheme: light;
5
5
  --gramlot-background: #edf1ef;
6
6
  --gramlot-surface: #fbfcfb;
7
+ --gramlot-header-background: #30473c;
8
+ --gramlot-header-color: #fbfcfb;
7
9
  --gramlot-surface-subtle: #e2e9e5;
8
10
  --gramlot-ink: #24332e;
9
11
  --gramlot-text-secondary: #52655d;
@@ -65,6 +67,8 @@
65
67
  color-scheme: dark;
66
68
  --gramlot-background: #17201d;
67
69
  --gramlot-surface: #202c27;
70
+ --gramlot-header-background: #334d40;
71
+ --gramlot-header-color: #ebf3ee;
68
72
  --gramlot-surface-subtle: #2a3932;
69
73
  --gramlot-ink: #ebf3ee;
70
74
  --gramlot-text-secondary: #b6c9be;
@@ -93,6 +97,8 @@
93
97
  color-scheme: dark;
94
98
  --gramlot-background: #17201d;
95
99
  --gramlot-surface: #202c27;
100
+ --gramlot-header-background: #334d40;
101
+ --gramlot-header-color: #ebf3ee;
96
102
  --gramlot-surface-subtle: #2a3932;
97
103
  --gramlot-ink: #ebf3ee;
98
104
  --gramlot-text-secondary: #b6c9be;
@@ -4,6 +4,8 @@
4
4
  color-scheme: light;
5
5
  --gramlot-background: #f3f5f7;
6
6
  --gramlot-surface: #ffffff;
7
+ --gramlot-header-background: #303946;
8
+ --gramlot-header-color: #ffffff;
7
9
  --gramlot-surface-subtle: #e9edf2;
8
10
  --gramlot-ink: #202936;
9
11
  --gramlot-text-secondary: #526174;
@@ -32,6 +34,8 @@
32
34
  color-scheme: dark;
33
35
  --gramlot-background: #171c24;
34
36
  --gramlot-surface: #222a35;
37
+ --gramlot-header-background: #354152;
38
+ --gramlot-header-color: #edf1f7;
35
39
  --gramlot-surface-subtle: #2b3543;
36
40
  --gramlot-ink: #edf1f7;
37
41
  --gramlot-text-secondary: #b8c4d4;
@@ -60,6 +64,8 @@
60
64
  color-scheme: dark;
61
65
  --gramlot-background: #171c24;
62
66
  --gramlot-surface: #222a35;
67
+ --gramlot-header-background: #354152;
68
+ --gramlot-header-color: #edf1f7;
63
69
  --gramlot-surface-subtle: #2b3543;
64
70
  --gramlot-ink: #edf1f7;
65
71
  --gramlot-text-secondary: #b8c4d4;
@@ -4,6 +4,8 @@
4
4
  color-scheme: light;
5
5
  --gramlot-background: #f5f4f2;
6
6
  --gramlot-surface: #ffffff;
7
+ --gramlot-header-background: #3f4249;
8
+ --gramlot-header-color: #ffffff;
7
9
  --gramlot-surface-subtle: #eeece8;
8
10
  --gramlot-ink: #292c31;
9
11
  --gramlot-text-secondary: #5d636c;
@@ -32,6 +34,8 @@
32
34
  color-scheme: dark;
33
35
  --gramlot-background: #1b1c20;
34
36
  --gramlot-surface: #25272c;
37
+ --gramlot-header-background: #41444c;
38
+ --gramlot-header-color: #f3f2ef;
35
39
  --gramlot-surface-subtle: #303239;
36
40
  --gramlot-ink: #f3f2ef;
37
41
  --gramlot-text-secondary: #c4c3c0;
@@ -60,6 +64,8 @@
60
64
  color-scheme: dark;
61
65
  --gramlot-background: #1b1c20;
62
66
  --gramlot-surface: #25272c;
67
+ --gramlot-header-background: #41444c;
68
+ --gramlot-header-color: #f3f2ef;
63
69
  --gramlot-surface-subtle: #303239;
64
70
  --gramlot-ink: #f3f2ef;
65
71
  --gramlot-text-secondary: #c4c3c0;
@@ -4,6 +4,8 @@
4
4
  color-scheme: light;
5
5
  --gramlot-background: #edf1ef;
6
6
  --gramlot-surface: #fbfcfb;
7
+ --gramlot-header-background: #30473c;
8
+ --gramlot-header-color: #fbfcfb;
7
9
  --gramlot-surface-subtle: #e2e9e5;
8
10
  --gramlot-ink: #24332e;
9
11
  --gramlot-text-secondary: #52655d;
@@ -32,6 +34,8 @@
32
34
  color-scheme: dark;
33
35
  --gramlot-background: #17201d;
34
36
  --gramlot-surface: #202c27;
37
+ --gramlot-header-background: #334d40;
38
+ --gramlot-header-color: #ebf3ee;
35
39
  --gramlot-surface-subtle: #2a3932;
36
40
  --gramlot-ink: #ebf3ee;
37
41
  --gramlot-text-secondary: #b6c9be;
@@ -60,6 +64,8 @@
60
64
  color-scheme: dark;
61
65
  --gramlot-background: #17201d;
62
66
  --gramlot-surface: #202c27;
67
+ --gramlot-header-background: #334d40;
68
+ --gramlot-header-color: #ebf3ee;
63
69
  --gramlot-surface-subtle: #2a3932;
64
70
  --gramlot-ink: #ebf3ee;
65
71
  --gramlot-text-secondary: #b6c9be;