@gramlot/gramlot 0.3.24 → 0.3.26

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 (131) hide show
  1. package/dist/components/editors/__init__.py +2 -2
  2. package/dist/components/editors/assets/collection.js +20 -19
  3. package/dist/components/editors/assets/index.js +1 -1
  4. package/dist/components/editors/assets/modules/chunk-74O4WKIV.js +1 -0
  5. package/dist/components/editors/assets/modules/{code-mirror-engine-QX4A5FVO.js → code-mirror-engine-RWQTR5G5.js} +29 -29
  6. package/dist/components/editors/assets/modules/{jodit-engine-MMSPIWM7.js → jodit-engine-MTSA4GZ3.js} +292 -292
  7. package/dist/components/editors/assets/modules/markdown-document-VFC23FAY.js +1 -0
  8. package/dist/components/editors/assets/modules/{prose-mirror-engine-IXTRTG6B.js → prose-mirror-engine-GMZPJPNN.js} +13 -13
  9. package/dist/components/grid/__init__.py +3 -2
  10. package/dist/components/grid/assets/collection.js +68 -17
  11. package/dist/components/grid/assets/index.js +1 -1
  12. package/dist/components/grid/grammar.json +57 -1
  13. package/dist/components/grouplets/__init__.py +2 -2
  14. package/dist/components/grouplets/assets/collection.js +3 -20
  15. package/dist/components/grouplets/assets/index.js +1 -1
  16. package/dist/components/grouplets/assets/modules/chunk-BLMUM44K.js +1 -0
  17. package/dist/components/grouplets/assets/modules/markdown-document-YWNZTOKK.js +1 -0
  18. package/dist/components/inputs/__init__.py +1 -1
  19. package/dist/components/inputs/assets/collection.js +59 -34
  20. package/dist/components/inputs/assets/index.js +1 -1
  21. package/dist/components/inputs/grammar.json +64 -0
  22. package/dist/components/layout/__init__.py +1 -1
  23. package/dist/components/layout/assets/collection.js +67 -57
  24. package/dist/components/layout/assets/index.js +1 -1
  25. package/dist/components/layout/grammar.json +35 -0
  26. package/dist/components/selection_trial/__init__.py +1 -1
  27. package/dist/components/selection_trial/assets/collection.js +3 -3
  28. package/dist/components/selection_trial/assets/index.js +1 -1
  29. package/dist/components/selection_trial/grammar.json +35 -0
  30. package/dist/components/tree/__init__.py +1 -1
  31. package/dist/components/tree/assets/collection.js +26 -23
  32. package/dist/components/tree/assets/index.js +1 -1
  33. package/dist/components/tree/grammar.json +341 -1
  34. package/dist/components/uploads/__init__.py +13 -0
  35. package/dist/components/uploads/assets/collection.js +67 -0
  36. package/dist/components/uploads/assets/index.js +3 -0
  37. package/dist/components/uploads/commands.json +7 -0
  38. package/dist/components/uploads/grammar.json +789 -0
  39. package/dist/{components/editors/assets/modules/chunk-OCFLP2K4.js → gramlot-markdown.js} +12 -12
  40. package/dist/gramlot.js +4910 -566
  41. package/dist/gramlot.min.js +1587 -43
  42. package/dist/runtime-notices.json +28 -0
  43. package/package.json +4 -2
  44. package/src/binding/grid-struct.js +1 -1
  45. package/src/binding/providers.js +4 -1
  46. package/src/binding/remote-resolver.js +1 -8
  47. package/src/binding/runtime.js +40 -1
  48. package/src/binding/validation-context.js +40 -0
  49. package/src/browser-camera-provider.d.ts +8 -0
  50. package/src/browser-camera-provider.js +104 -0
  51. package/src/builder/source.js +13 -2
  52. package/src/components/attachment-manager.js +160 -0
  53. package/src/components/bases.js +17 -6
  54. package/src/components/border-container.js +86 -8
  55. package/src/components/buttons.js +11 -1
  56. package/src/components/choice-editor.js +20 -7
  57. package/src/components/database-choices.js +4 -2
  58. package/src/components/editing-status-styles.js +26 -0
  59. package/src/components/editing-status.js +115 -0
  60. package/src/components/field-state.js +37 -58
  61. package/src/components/grid-cell-editor.js +181 -0
  62. package/src/components/grid-grammar.json +21 -0
  63. package/src/components/grid-structure.js +2 -1
  64. package/src/components/grid-styles.js +51 -1
  65. package/src/components/grid.js +87 -10
  66. package/src/components/grouplet-card.js +11 -3
  67. package/src/components/html-preview.js +17 -4
  68. package/src/components/image-crop-dialog.js +272 -0
  69. package/src/components/image-crop.js +79 -0
  70. package/src/components/image-uploader.js +252 -0
  71. package/src/components/inputs.js +2 -1
  72. package/src/components/jodit-engine.js +1 -1
  73. package/src/components/markdown-document.js +2 -2
  74. package/src/components/screen-capture.js +43 -0
  75. package/src/components/selected-container.js +6 -2
  76. package/src/components/tree.js +416 -17
  77. package/src/components/typed-editor.js +19 -9
  78. package/src/components/upload-engine.js +156 -0
  79. package/src/components/uploader.js +208 -0
  80. package/src/components/uploads.js +7 -0
  81. package/src/editing-session.d.ts +25 -0
  82. package/src/editing-session.js +396 -0
  83. package/src/experiments/selection-trial.js +18 -2
  84. package/src/format.js +22 -7
  85. package/src/gramlot.d.ts +2 -0
  86. package/src/gramlot.js +2 -1
  87. package/src/handlers/device-handler.d.ts +2 -1
  88. package/src/handlers/rpc-handler.d.ts +3 -3
  89. package/src/index-page-styles.js +1 -0
  90. package/src/index.d.ts +13 -0
  91. package/src/index.js +13 -0
  92. package/src/inout.d.ts +2 -0
  93. package/src/inout.js +6 -0
  94. package/src/markdown-loader.d.ts +1 -0
  95. package/src/markdown-loader.js +4 -0
  96. package/src/markdown.d.ts +1 -0
  97. package/src/markdown.js +2 -0
  98. package/src/media-frame.js +9 -0
  99. package/src/renderer/attributes.js +7 -1
  100. package/src/renderer/gramlot-renderer.d.ts +2 -0
  101. package/src/renderer/gramlot-renderer.js +31 -2
  102. package/src/server/assets.d.ts +1 -1
  103. package/src/server/assets.js +1 -1
  104. package/src/server/gramlot-server.d.ts +8 -1
  105. package/src/server/gramlot-server.js +83 -7
  106. package/src/server/index.d.ts +2 -0
  107. package/src/server/index.js +2 -0
  108. package/src/server/page-base.js +17 -4
  109. package/src/server/page.d.ts +13 -1
  110. package/src/server/page.js +6 -0
  111. package/src/server/source-import.d.ts +2 -0
  112. package/src/server/source-import.js +31 -0
  113. package/src/server/upload.d.ts +20 -0
  114. package/src/server/upload.js +142 -0
  115. package/src/server/visual-editor.d.ts +11 -0
  116. package/src/server/visual-editor.js +149 -0
  117. package/src/source-picker.d.ts +9 -0
  118. package/src/source-picker.js +57 -0
  119. package/src/tree-store.d.ts +24 -0
  120. package/src/tree-store.js +193 -0
  121. package/src/validation-run.js +50 -0
  122. package/src/view/button.js +8 -5
  123. package/src/view/controls.js +9 -42
  124. package/src/view/html.js +10 -2
  125. package/src/visual-editor-icons.js +10 -0
  126. package/src/visual-editor.d.ts +56 -0
  127. package/src/visual-editor.js +844 -0
  128. package/themes/gramlot-base/theme.css +99 -0
  129. package/dist/components/editors/assets/modules/chunk-MMJXUHRQ.js +0 -3
  130. package/src/form-state.d.ts +0 -20
  131. package/src/form-state.js +0 -198
@@ -1,3 +1,3 @@
1
1
  export {default} from "./collection.js";
2
2
  export * from "./collection.js";
3
- export const buildId = "sha256:41859c8895b4c980662c79455c1115c009666a73241e39c78149c0cc2d6e410c";
3
+ export const buildId = "sha256:f0d3eb9f6c744ceb6ddc005396cd3d3861f95d033bb3f01e98e9cb9d53df9b65";
@@ -5,6 +5,121 @@
5
5
  "version": "1.1"
6
6
  },
7
7
  "elements": {
8
+ "rowActions": {
9
+ "_meta": {
10
+ "gramlot_component": {
11
+ "command": false,
12
+ "dataScope": false,
13
+ "parameters": {
14
+ "actionState": {
15
+ "default": null,
16
+ "dtype": "T",
17
+ "nullable": true
18
+ },
19
+ "position": {
20
+ "default": "end",
21
+ "dtype": "T"
22
+ },
23
+ "state": {
24
+ "binding": "read",
25
+ "default": null,
26
+ "dtype": "X",
27
+ "nullable": true
28
+ }
29
+ },
30
+ "presentationDefaults": [],
31
+ "sourceContext": true
32
+ },
33
+ "render_tag": "gramlot-row-actions"
34
+ },
35
+ "attributes": {
36
+ "accepts_var_keyword": true,
37
+ "accepts_var_positional": false,
38
+ "parameters": [
39
+ {
40
+ "annotation": {
41
+ "dtype": "T",
42
+ "kind": "dtype"
43
+ },
44
+ "default": "end",
45
+ "has_default": true,
46
+ "kind": "keyword_only",
47
+ "name": "position",
48
+ "role": "attribute"
49
+ },
50
+ {
51
+ "annotation": {
52
+ "items": [
53
+ {
54
+ "dtype": "T",
55
+ "kind": "dtype"
56
+ },
57
+ {
58
+ "dtype": "NN",
59
+ "kind": "dtype"
60
+ }
61
+ ],
62
+ "kind": "union"
63
+ },
64
+ "default": null,
65
+ "has_default": true,
66
+ "kind": "keyword_only",
67
+ "name": "actionState",
68
+ "role": "attribute"
69
+ },
70
+ {
71
+ "annotation": {
72
+ "items": [
73
+ {
74
+ "dtype": "X",
75
+ "kind": "dtype"
76
+ },
77
+ {
78
+ "dtype": "NN",
79
+ "kind": "dtype"
80
+ },
81
+ {
82
+ "base": {
83
+ "dtype": "T",
84
+ "kind": "dtype"
85
+ },
86
+ "kind": "annotated",
87
+ "metadata": [
88
+ {
89
+ "flags": 0,
90
+ "kind": "regex",
91
+ "pattern": "^[\\^=].+"
92
+ }
93
+ ]
94
+ }
95
+ ],
96
+ "kind": "union"
97
+ },
98
+ "default": null,
99
+ "has_default": true,
100
+ "kind": "keyword_only",
101
+ "name": "state",
102
+ "role": "attribute"
103
+ },
104
+ {
105
+ "annotation": {
106
+ "kind": "any"
107
+ },
108
+ "has_default": false,
109
+ "kind": "var_keyword",
110
+ "name": "attr",
111
+ "role": "attribute"
112
+ }
113
+ ]
114
+ },
115
+ "collection_key": null,
116
+ "doc": null,
117
+ "inherits_from": null,
118
+ "node_label": null,
119
+ "ns": null,
120
+ "parent_tags": null,
121
+ "sub_tags": "button,dropDownButton"
122
+ },
8
123
  "tree": {
9
124
  "_meta": {
10
125
  "gramlot_component": {
@@ -18,11 +133,43 @@
18
133
  "default": false,
19
134
  "dtype": "B"
20
135
  },
136
+ "checkChildren": {
137
+ "binding": "read",
138
+ "default": true,
139
+ "dtype": "B"
140
+ },
141
+ "checkedPaths": {
142
+ "binding": "twoWay",
143
+ "default": null,
144
+ "dtype": "T",
145
+ "nullable": true
146
+ },
147
+ "checkedPaths_joiner": {
148
+ "default": ",",
149
+ "dtype": "T"
150
+ },
21
151
  "draggable": {
22
152
  "binding": "read",
23
153
  "default": false,
24
154
  "dtype": "B"
25
155
  },
156
+ "excludeRoot": {
157
+ "binding": "read",
158
+ "default": null,
159
+ "dtype": "T",
160
+ "nullable": true
161
+ },
162
+ "favorites": {
163
+ "binding": "read",
164
+ "default": null,
165
+ "dtype": "X",
166
+ "nullable": true
167
+ },
168
+ "favoritesLabel": {
169
+ "binding": "read",
170
+ "default": "Favorites",
171
+ "dtype": "T"
172
+ },
26
173
  "getIconClass": {
27
174
  "default": null,
28
175
  "dtype": "T",
@@ -43,6 +190,11 @@
43
190
  "default": false,
44
191
  "dtype": "B"
45
192
  },
193
+ "internalNames": {
194
+ "binding": "read",
195
+ "default": false,
196
+ "dtype": "B"
197
+ },
46
198
  "labelAttribute": {
47
199
  "binding": "read",
48
200
  "default": null,
@@ -54,6 +206,14 @@
54
206
  "dtype": "T",
55
207
  "nullable": true
56
208
  },
209
+ "onChecked": {
210
+ "default": null,
211
+ "dtype": [
212
+ "B",
213
+ "T"
214
+ ],
215
+ "nullable": true
216
+ },
57
217
  "searchText": {
58
218
  "binding": "read",
59
219
  "default": "",
@@ -144,6 +304,36 @@
144
304
  "name": "labelAttribute",
145
305
  "role": "attribute"
146
306
  },
307
+ {
308
+ "annotation": {
309
+ "items": [
310
+ {
311
+ "dtype": "B",
312
+ "kind": "dtype"
313
+ },
314
+ {
315
+ "base": {
316
+ "dtype": "T",
317
+ "kind": "dtype"
318
+ },
319
+ "kind": "annotated",
320
+ "metadata": [
321
+ {
322
+ "flags": 0,
323
+ "kind": "regex",
324
+ "pattern": "^[\\^=].+"
325
+ }
326
+ ]
327
+ }
328
+ ],
329
+ "kind": "union"
330
+ },
331
+ "default": false,
332
+ "has_default": true,
333
+ "kind": "keyword_only",
334
+ "name": "internalNames",
335
+ "role": "attribute"
336
+ },
147
337
  {
148
338
  "annotation": {
149
339
  "items": [
@@ -174,6 +364,26 @@
174
364
  "name": "hideValues",
175
365
  "role": "attribute"
176
366
  },
367
+ {
368
+ "annotation": {
369
+ "items": [
370
+ {
371
+ "dtype": "T",
372
+ "kind": "dtype"
373
+ },
374
+ {
375
+ "dtype": "NN",
376
+ "kind": "dtype"
377
+ }
378
+ ],
379
+ "kind": "union"
380
+ },
381
+ "default": null,
382
+ "has_default": true,
383
+ "kind": "keyword_only",
384
+ "name": "excludeRoot",
385
+ "role": "attribute"
386
+ },
177
387
  {
178
388
  "annotation": {
179
389
  "items": [
@@ -276,6 +486,51 @@
276
486
  "name": "searchText",
277
487
  "role": "attribute"
278
488
  },
489
+ {
490
+ "annotation": {
491
+ "items": [
492
+ {
493
+ "dtype": "X",
494
+ "kind": "dtype"
495
+ },
496
+ {
497
+ "dtype": "NN",
498
+ "kind": "dtype"
499
+ },
500
+ {
501
+ "base": {
502
+ "dtype": "T",
503
+ "kind": "dtype"
504
+ },
505
+ "kind": "annotated",
506
+ "metadata": [
507
+ {
508
+ "flags": 0,
509
+ "kind": "regex",
510
+ "pattern": "^[\\^=].+"
511
+ }
512
+ ]
513
+ }
514
+ ],
515
+ "kind": "union"
516
+ },
517
+ "default": null,
518
+ "has_default": true,
519
+ "kind": "keyword_only",
520
+ "name": "favorites",
521
+ "role": "attribute"
522
+ },
523
+ {
524
+ "annotation": {
525
+ "dtype": "T",
526
+ "kind": "dtype"
527
+ },
528
+ "default": "Favorites",
529
+ "has_default": true,
530
+ "kind": "keyword_only",
531
+ "name": "favoritesLabel",
532
+ "role": "attribute"
533
+ },
279
534
  {
280
535
  "annotation": {
281
536
  "items": [
@@ -326,6 +581,91 @@
326
581
  "name": "selectedPath",
327
582
  "role": "attribute"
328
583
  },
584
+ {
585
+ "annotation": {
586
+ "items": [
587
+ {
588
+ "dtype": "B",
589
+ "kind": "dtype"
590
+ },
591
+ {
592
+ "dtype": "T",
593
+ "kind": "dtype"
594
+ },
595
+ {
596
+ "dtype": "NN",
597
+ "kind": "dtype"
598
+ }
599
+ ],
600
+ "kind": "union"
601
+ },
602
+ "default": null,
603
+ "has_default": true,
604
+ "kind": "keyword_only",
605
+ "name": "onChecked",
606
+ "role": "attribute"
607
+ },
608
+ {
609
+ "annotation": {
610
+ "items": [
611
+ {
612
+ "dtype": "T",
613
+ "kind": "dtype"
614
+ },
615
+ {
616
+ "dtype": "NN",
617
+ "kind": "dtype"
618
+ }
619
+ ],
620
+ "kind": "union"
621
+ },
622
+ "default": null,
623
+ "has_default": true,
624
+ "kind": "keyword_only",
625
+ "name": "checkedPaths",
626
+ "role": "attribute"
627
+ },
628
+ {
629
+ "annotation": {
630
+ "dtype": "T",
631
+ "kind": "dtype"
632
+ },
633
+ "default": ",",
634
+ "has_default": true,
635
+ "kind": "keyword_only",
636
+ "name": "checkedPaths_joiner",
637
+ "role": "attribute"
638
+ },
639
+ {
640
+ "annotation": {
641
+ "items": [
642
+ {
643
+ "dtype": "B",
644
+ "kind": "dtype"
645
+ },
646
+ {
647
+ "base": {
648
+ "dtype": "T",
649
+ "kind": "dtype"
650
+ },
651
+ "kind": "annotated",
652
+ "metadata": [
653
+ {
654
+ "flags": 0,
655
+ "kind": "regex",
656
+ "pattern": "^[\\^=].+"
657
+ }
658
+ ]
659
+ }
660
+ ],
661
+ "kind": "union"
662
+ },
663
+ "default": true,
664
+ "has_default": true,
665
+ "kind": "keyword_only",
666
+ "name": "checkChildren",
667
+ "role": "attribute"
668
+ },
329
669
  {
330
670
  "annotation": {
331
671
  "kind": "any"
@@ -343,7 +683,7 @@
343
683
  "node_label": null,
344
684
  "ns": null,
345
685
  "parent_tags": null,
346
- "sub_tags": ""
686
+ "sub_tags": "rowActions[:1]"
347
687
  }
348
688
  },
349
689
  "grammar": {
@@ -0,0 +1,13 @@
1
+ from gramlot import GramlotCollection
2
+
3
+ mygramlot = GramlotCollection(
4
+ name="uploads",
5
+ package=__package__,
6
+ grammar="grammar.json",
7
+ commands="commands.json",
8
+ module="assets/index.js",
9
+ css=(),
10
+ dependencies=(),
11
+ build_id="sha256:72cabfa17ed3ef64a29380770fabde1fd23b6736f1bdd9be5d5f1781779e9641",
12
+ files=("assets/collection.js", "assets/index.js", "commands.json", "grammar.json",),
13
+ )