@gramlot/gramlot 0.3.10 → 0.3.16

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 (94) hide show
  1. package/dist/components/editors/__init__.py +13 -0
  2. package/dist/components/{editors.js → editors/assets/collection.js} +131 -246
  3. package/dist/components/editors/assets/index.js +2 -0
  4. package/dist/components/editors/commands.json +7 -0
  5. package/dist/components/editors/grammar.json +7045 -0
  6. package/dist/components/inputs/__init__.py +13 -0
  7. package/dist/components/{inputs.js → inputs/assets/collection.js} +287 -198
  8. package/dist/components/inputs/assets/index.js +2 -0
  9. package/dist/components/inputs/commands.json +7 -0
  10. package/dist/components/inputs/grammar.json +42881 -0
  11. package/dist/components/layout/__init__.py +13 -0
  12. package/dist/components/layout/assets/collection.js +25737 -0
  13. package/dist/components/layout/assets/index.js +2 -0
  14. package/dist/components/layout/commands.json +7 -0
  15. package/dist/components/layout/grammar.json +1798 -0
  16. package/dist/components/tree/__init__.py +13 -0
  17. package/dist/components/{tree.js → tree/assets/collection.js} +62 -175
  18. package/dist/components/tree/assets/index.js +2 -0
  19. package/dist/components/tree/commands.json +7 -0
  20. package/dist/components/tree/grammar.json +339 -0
  21. package/dist/components/typst/__init__.py +13 -0
  22. package/dist/components/typst/assets/collection.js +4 -0
  23. package/dist/components/typst/assets/index.js +2 -0
  24. package/dist/components/typst/commands.json +7 -0
  25. package/dist/components/typst/grammar.json +81 -0
  26. package/dist/gramlot.js +2496 -905
  27. package/dist/gramlot.min.js +109 -28
  28. package/dist/runtime-notices.json +0 -196
  29. package/package.json +1 -1
  30. package/src/binding/ask-dialog.js +1 -1
  31. package/src/binding/installation.js +5 -6
  32. package/src/binding/runtime.js +4 -2
  33. package/src/bootstrap.d.ts +1 -1
  34. package/src/bootstrap.js +52 -30
  35. package/src/builder/binding.json +25 -0
  36. package/src/builder/gramlot-builder.js +16 -3
  37. package/src/builder/source.js +33 -1
  38. package/src/collection-artifact.d.ts +11 -0
  39. package/src/collection-artifact.js +57 -0
  40. package/src/commands.d.ts +9 -0
  41. package/src/commands.js +36 -0
  42. package/src/components/bases.js +1 -1
  43. package/src/components/border-container.js +26 -1
  44. package/src/components/buttons.js +84 -161
  45. package/src/components/choice-editor.js +31 -10
  46. package/src/components/database-choices.js +110 -0
  47. package/src/components/inputs.js +15 -2
  48. package/src/components/layout.js +5 -3
  49. package/src/components/menus.js +346 -0
  50. package/src/components/popup.js +15 -2
  51. package/src/components/registry.js +18 -3
  52. package/src/components/toolbar-overflow.js +181 -0
  53. package/src/components/tree.js +14 -4
  54. package/src/components/windows.js +284 -0
  55. package/src/filesystem.js +1 -0
  56. package/src/gramlot.d.ts +2 -0
  57. package/src/gramlot.js +4 -2
  58. package/src/handlers/rpc-handler.d.ts +6 -1
  59. package/src/handlers/rpc-handler.js +7 -2
  60. package/src/handlers/source-handler.d.ts +2 -1
  61. package/src/handlers/source-handler.js +10 -1
  62. package/src/ide-documents.js +1 -1
  63. package/src/ide-runtime.js +3 -2
  64. package/src/index-page-styles.js +1 -1
  65. package/src/index-theme.js +1 -1
  66. package/src/index.d.ts +5 -0
  67. package/src/index.js +5 -0
  68. package/src/renderer/gramlot-html-renderer.js +1 -0
  69. package/src/renderer/gramlot-renderer.js +13 -3
  70. package/src/server/gramlot-file-server.d.ts +2 -0
  71. package/src/server/gramlot-file-server.js +45 -1
  72. package/src/server/gramlot-server.d.ts +20 -2
  73. package/src/server/gramlot-server.js +86 -6
  74. package/src/server/page-base.js +1 -0
  75. package/src/server/page.d.ts +3 -0
  76. package/src/view/button.js +47 -3
  77. package/src/view/controls.js +8 -0
  78. package/src/view/html.js +1 -0
  79. package/src/view/menu-command.js +45 -0
  80. package/src/view/menu.js +87 -0
  81. package/themes/gramlot-compact/README.md +19 -0
  82. package/themes/gramlot-compact/theme.css +138 -45
  83. package/themes/joanna/README.md +19 -0
  84. package/themes/joanna/theme.css +134 -78
  85. package/themes/mela/theme.css +184 -0
  86. package/themes/mimi/README.md +19 -0
  87. package/themes/mimi/theme.css +133 -77
  88. package/themes/palettes/README.md +3 -0
  89. package/themes/palettes/compact.css +86 -0
  90. package/themes/palettes/joanna.css +86 -0
  91. package/themes/palettes/mimi.css +86 -0
  92. package/tools/gramlot-tools-inspector.js +3 -3
  93. package/dist/components/layout.js +0 -3385
  94. package/dist/components/typst.js +0 -4
@@ -0,0 +1,339 @@
1
+ {
2
+ "abstracts": {},
3
+ "document_format": {
4
+ "name": "builder_grammar",
5
+ "version": "1.1"
6
+ },
7
+ "elements": {
8
+ "tree": {
9
+ "_meta": {
10
+ "gramlot_component": {
11
+ "bagStore": true,
12
+ "command": false,
13
+ "dataScope": false,
14
+ "dragSource": true,
15
+ "parameters": {
16
+ "autoCollapse": {
17
+ "binding": "read",
18
+ "default": false,
19
+ "dtype": "B"
20
+ },
21
+ "draggable": {
22
+ "binding": "read",
23
+ "default": false,
24
+ "dtype": "B"
25
+ },
26
+ "getIconClass": {
27
+ "default": null,
28
+ "dtype": "T",
29
+ "nullable": true
30
+ },
31
+ "getLabel": {
32
+ "default": null,
33
+ "dtype": "T",
34
+ "nullable": true
35
+ },
36
+ "getLabelClass": {
37
+ "default": null,
38
+ "dtype": "T",
39
+ "nullable": true
40
+ },
41
+ "hideValues": {
42
+ "binding": "read",
43
+ "default": false,
44
+ "dtype": "B"
45
+ },
46
+ "labelAttribute": {
47
+ "binding": "read",
48
+ "default": null,
49
+ "dtype": "T",
50
+ "nullable": true
51
+ },
52
+ "labelCb": {
53
+ "default": null,
54
+ "dtype": "T",
55
+ "nullable": true
56
+ },
57
+ "selectedLabelClass": {
58
+ "binding": "read",
59
+ "default": "",
60
+ "dtype": "T"
61
+ },
62
+ "selectedPath": {
63
+ "binding": "twoWay",
64
+ "default": null,
65
+ "dtype": "T",
66
+ "nullable": true
67
+ },
68
+ "storepath": {
69
+ "dtype": "T"
70
+ }
71
+ },
72
+ "presentationDefaults": [],
73
+ "sourceContext": true
74
+ },
75
+ "render_tag": "gramlot-tree"
76
+ },
77
+ "attributes": {
78
+ "accepts_var_keyword": true,
79
+ "accepts_var_positional": false,
80
+ "parameters": [
81
+ {
82
+ "annotation": {
83
+ "dtype": "T",
84
+ "kind": "dtype"
85
+ },
86
+ "default": null,
87
+ "has_default": true,
88
+ "kind": "keyword_only",
89
+ "name": "storepath",
90
+ "role": "attribute"
91
+ },
92
+ {
93
+ "annotation": {
94
+ "items": [
95
+ {
96
+ "dtype": "B",
97
+ "kind": "dtype"
98
+ },
99
+ {
100
+ "base": {
101
+ "dtype": "T",
102
+ "kind": "dtype"
103
+ },
104
+ "kind": "annotated",
105
+ "metadata": [
106
+ {
107
+ "flags": 0,
108
+ "kind": "regex",
109
+ "pattern": "^[\\^=].+"
110
+ }
111
+ ]
112
+ }
113
+ ],
114
+ "kind": "union"
115
+ },
116
+ "default": false,
117
+ "has_default": true,
118
+ "kind": "keyword_only",
119
+ "name": "draggable",
120
+ "role": "attribute"
121
+ },
122
+ {
123
+ "annotation": {
124
+ "items": [
125
+ {
126
+ "dtype": "T",
127
+ "kind": "dtype"
128
+ },
129
+ {
130
+ "dtype": "NN",
131
+ "kind": "dtype"
132
+ }
133
+ ],
134
+ "kind": "union"
135
+ },
136
+ "default": null,
137
+ "has_default": true,
138
+ "kind": "keyword_only",
139
+ "name": "labelAttribute",
140
+ "role": "attribute"
141
+ },
142
+ {
143
+ "annotation": {
144
+ "items": [
145
+ {
146
+ "dtype": "B",
147
+ "kind": "dtype"
148
+ },
149
+ {
150
+ "base": {
151
+ "dtype": "T",
152
+ "kind": "dtype"
153
+ },
154
+ "kind": "annotated",
155
+ "metadata": [
156
+ {
157
+ "flags": 0,
158
+ "kind": "regex",
159
+ "pattern": "^[\\^=].+"
160
+ }
161
+ ]
162
+ }
163
+ ],
164
+ "kind": "union"
165
+ },
166
+ "default": false,
167
+ "has_default": true,
168
+ "kind": "keyword_only",
169
+ "name": "hideValues",
170
+ "role": "attribute"
171
+ },
172
+ {
173
+ "annotation": {
174
+ "items": [
175
+ {
176
+ "dtype": "T",
177
+ "kind": "dtype"
178
+ },
179
+ {
180
+ "dtype": "NN",
181
+ "kind": "dtype"
182
+ }
183
+ ],
184
+ "kind": "union"
185
+ },
186
+ "default": null,
187
+ "has_default": true,
188
+ "kind": "keyword_only",
189
+ "name": "labelCb",
190
+ "role": "attribute"
191
+ },
192
+ {
193
+ "annotation": {
194
+ "items": [
195
+ {
196
+ "dtype": "T",
197
+ "kind": "dtype"
198
+ },
199
+ {
200
+ "dtype": "NN",
201
+ "kind": "dtype"
202
+ }
203
+ ],
204
+ "kind": "union"
205
+ },
206
+ "default": null,
207
+ "has_default": true,
208
+ "kind": "keyword_only",
209
+ "name": "getLabel",
210
+ "role": "attribute"
211
+ },
212
+ {
213
+ "annotation": {
214
+ "items": [
215
+ {
216
+ "dtype": "T",
217
+ "kind": "dtype"
218
+ },
219
+ {
220
+ "dtype": "NN",
221
+ "kind": "dtype"
222
+ }
223
+ ],
224
+ "kind": "union"
225
+ },
226
+ "default": null,
227
+ "has_default": true,
228
+ "kind": "keyword_only",
229
+ "name": "getLabelClass",
230
+ "role": "attribute"
231
+ },
232
+ {
233
+ "annotation": {
234
+ "items": [
235
+ {
236
+ "dtype": "T",
237
+ "kind": "dtype"
238
+ },
239
+ {
240
+ "dtype": "NN",
241
+ "kind": "dtype"
242
+ }
243
+ ],
244
+ "kind": "union"
245
+ },
246
+ "default": null,
247
+ "has_default": true,
248
+ "kind": "keyword_only",
249
+ "name": "getIconClass",
250
+ "role": "attribute"
251
+ },
252
+ {
253
+ "annotation": {
254
+ "dtype": "T",
255
+ "kind": "dtype"
256
+ },
257
+ "default": "",
258
+ "has_default": true,
259
+ "kind": "keyword_only",
260
+ "name": "selectedLabelClass",
261
+ "role": "attribute"
262
+ },
263
+ {
264
+ "annotation": {
265
+ "items": [
266
+ {
267
+ "dtype": "B",
268
+ "kind": "dtype"
269
+ },
270
+ {
271
+ "base": {
272
+ "dtype": "T",
273
+ "kind": "dtype"
274
+ },
275
+ "kind": "annotated",
276
+ "metadata": [
277
+ {
278
+ "flags": 0,
279
+ "kind": "regex",
280
+ "pattern": "^[\\^=].+"
281
+ }
282
+ ]
283
+ }
284
+ ],
285
+ "kind": "union"
286
+ },
287
+ "default": false,
288
+ "has_default": true,
289
+ "kind": "keyword_only",
290
+ "name": "autoCollapse",
291
+ "role": "attribute"
292
+ },
293
+ {
294
+ "annotation": {
295
+ "items": [
296
+ {
297
+ "dtype": "T",
298
+ "kind": "dtype"
299
+ },
300
+ {
301
+ "dtype": "NN",
302
+ "kind": "dtype"
303
+ }
304
+ ],
305
+ "kind": "union"
306
+ },
307
+ "default": null,
308
+ "has_default": true,
309
+ "kind": "keyword_only",
310
+ "name": "selectedPath",
311
+ "role": "attribute"
312
+ },
313
+ {
314
+ "annotation": {
315
+ "kind": "any"
316
+ },
317
+ "has_default": false,
318
+ "kind": "var_keyword",
319
+ "name": "attr",
320
+ "role": "attribute"
321
+ }
322
+ ]
323
+ },
324
+ "collection_key": null,
325
+ "doc": null,
326
+ "inherits_from": null,
327
+ "node_label": null,
328
+ "ns": null,
329
+ "parent_tags": null,
330
+ "sub_tags": ""
331
+ }
332
+ },
333
+ "grammar": {
334
+ "description": null,
335
+ "name": "tree",
336
+ "title": "tree",
337
+ "version": null
338
+ }
339
+ }
@@ -0,0 +1,13 @@
1
+ from gramlot import GramlotCollection
2
+
3
+ mygramlot = GramlotCollection(
4
+ name="typst",
5
+ package=__package__,
6
+ grammar="grammar.json",
7
+ commands="commands.json",
8
+ module="assets/index.js",
9
+ css=(),
10
+ dependencies=(),
11
+ build_id="sha256:31abaded2572159073f5fac4ed2219a6e63bb740a62e8b3fe9b4497a9be15d66",
12
+ files=("assets/collection.js", "assets/index.js", "commands.json", "grammar.json",),
13
+ )
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: package/dist/components/typst/assets/collection.js
3
+ size: 42749653 bytes
4
+ sha256: 95920b080b0ff239734c14d8aa72948d84de71926ea6f645c107d07546506016
@@ -0,0 +1,2 @@
1
+ export {default} from "./collection.js";
2
+ export const buildId = "sha256:31abaded2572159073f5fac4ed2219a6e63bb740a62e8b3fe9b4497a9be15d66";
@@ -0,0 +1,7 @@
1
+ {
2
+ "document_format": {
3
+ "name": "gramlot_commands",
4
+ "version": "1.0"
5
+ },
6
+ "groups": {}
7
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "abstracts": {},
3
+ "document_format": {
4
+ "name": "builder_grammar",
5
+ "version": "1.1"
6
+ },
7
+ "elements": {
8
+ "typstPreview": {
9
+ "_meta": {
10
+ "gramlot_component": {
11
+ "command": false,
12
+ "dataScope": false,
13
+ "parameters": {
14
+ "filename": {
15
+ "binding": "read",
16
+ "default": "document.pdf",
17
+ "dtype": "T"
18
+ },
19
+ "value": {
20
+ "binding": "read",
21
+ "default": "",
22
+ "dtype": "T"
23
+ }
24
+ },
25
+ "presentationDefaults": []
26
+ },
27
+ "render_tag": "gramlot-typst-preview"
28
+ },
29
+ "attributes": {
30
+ "accepts_var_keyword": true,
31
+ "accepts_var_positional": false,
32
+ "parameters": [
33
+ {
34
+ "annotation": {
35
+ "dtype": "T",
36
+ "kind": "dtype"
37
+ },
38
+ "default": "",
39
+ "has_default": true,
40
+ "kind": "keyword_only",
41
+ "name": "value",
42
+ "role": "attribute"
43
+ },
44
+ {
45
+ "annotation": {
46
+ "dtype": "T",
47
+ "kind": "dtype"
48
+ },
49
+ "default": "document.pdf",
50
+ "has_default": true,
51
+ "kind": "keyword_only",
52
+ "name": "filename",
53
+ "role": "attribute"
54
+ },
55
+ {
56
+ "annotation": {
57
+ "kind": "any"
58
+ },
59
+ "has_default": false,
60
+ "kind": "var_keyword",
61
+ "name": "attr",
62
+ "role": "attribute"
63
+ }
64
+ ]
65
+ },
66
+ "collection_key": null,
67
+ "doc": null,
68
+ "inherits_from": null,
69
+ "node_label": null,
70
+ "ns": null,
71
+ "parent_tags": null,
72
+ "sub_tags": ""
73
+ }
74
+ },
75
+ "grammar": {
76
+ "description": null,
77
+ "name": "typst",
78
+ "title": "typst",
79
+ "version": null
80
+ }
81
+ }