@gramlot/gramlot 0.3.41 → 0.5.0
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.
- package/assets/icons/align-center.svg +4 -0
- package/assets/icons/align-justify.svg +4 -0
- package/assets/icons/align-left.svg +4 -0
- package/assets/icons/align-right.svg +4 -0
- package/assets/icons/applications.svg +4 -0
- package/assets/icons/archive.svg +4 -0
- package/assets/icons/attachment.svg +4 -0
- package/assets/icons/bold.svg +4 -0
- package/assets/icons/book.svg +4 -0
- package/assets/icons/bookmark.svg +4 -0
- package/assets/icons/calendar.svg +4 -0
- package/assets/icons/cancel.svg +4 -0
- package/assets/icons/chart.svg +4 -1
- package/assets/icons/chat.svg +4 -0
- package/assets/icons/clock.svg +4 -0
- package/assets/icons/code.svg +4 -0
- package/assets/icons/collapse.svg +4 -0
- package/assets/icons/columns.svg +4 -0
- package/assets/icons/confirm.svg +4 -0
- package/assets/icons/copy.svg +4 -0
- package/assets/icons/cut.svg +4 -0
- package/assets/icons/database.svg +4 -0
- package/assets/icons/delete.svg +4 -0
- package/assets/icons/detach.svg +4 -0
- package/assets/icons/document.svg +4 -0
- package/assets/icons/download.svg +4 -0
- package/assets/icons/duplicate.svg +4 -0
- package/assets/icons/edit.svg +4 -0
- package/assets/icons/eraser.svg +4 -0
- package/assets/icons/expand.svg +4 -0
- package/assets/icons/export.svg +4 -0
- package/assets/icons/eye.svg +4 -0
- package/assets/icons/filter.svg +4 -0
- package/assets/icons/first.svg +4 -0
- package/assets/icons/folder.svg +4 -0
- package/assets/icons/group.svg +4 -0
- package/assets/icons/help.svg +4 -0
- package/assets/icons/home.svg +4 -0
- package/assets/icons/horizontal-rule.svg +4 -0
- package/assets/icons/image.svg +4 -0
- package/assets/icons/import.svg +4 -0
- package/assets/icons/indent.svg +4 -0
- package/assets/icons/info.svg +4 -0
- package/assets/icons/inspector.svg +4 -0
- package/assets/icons/italic.svg +4 -0
- package/assets/icons/last.svg +4 -0
- package/assets/icons/layers.svg +4 -0
- package/assets/icons/link.svg +4 -0
- package/assets/icons/list-bulleted.svg +4 -0
- package/assets/icons/list-numbered.svg +4 -0
- package/assets/icons/list.svg +4 -0
- package/assets/icons/lock.svg +4 -0
- package/assets/icons/logout.svg +4 -0
- package/assets/icons/navigation.svg +4 -0
- package/assets/icons/new.svg +4 -0
- package/assets/icons/next.svg +4 -0
- package/assets/icons/open.svg +4 -0
- package/assets/icons/outdent.svg +4 -0
- package/assets/icons/palette.svg +4 -0
- package/assets/icons/panel-bottom.svg +4 -0
- package/assets/icons/panel-left.svg +4 -0
- package/assets/icons/panel-right.svg +4 -0
- package/assets/icons/panel-top.svg +4 -0
- package/assets/icons/paragraph.svg +4 -0
- package/assets/icons/paste.svg +4 -0
- package/assets/icons/pause.svg +4 -0
- package/assets/icons/pin.svg +4 -0
- package/assets/icons/play.svg +4 -0
- package/assets/icons/previous.svg +4 -0
- package/assets/icons/print.svg +4 -0
- package/assets/icons/redo.svg +4 -0
- package/assets/icons/refresh.svg +4 -0
- package/assets/icons/save.svg +4 -0
- package/assets/icons/search.svg +4 -0
- package/assets/icons/select-all.svg +4 -0
- package/assets/icons/send.svg +4 -0
- package/assets/icons/settings.svg +4 -0
- package/assets/icons/sort-ascending.svg +4 -0
- package/assets/icons/sort-descending.svg +4 -0
- package/assets/icons/stop.svg +4 -0
- package/assets/icons/strikethrough.svg +4 -0
- package/assets/icons/table.svg +4 -0
- package/assets/icons/tree.svg +4 -0
- package/assets/icons/underline.svg +4 -0
- package/assets/icons/undo.svg +4 -0
- package/assets/icons/unlock.svg +4 -0
- package/assets/icons/upload.svg +4 -0
- package/assets/icons/user.svg +4 -0
- package/assets/icons/warning.svg +4 -0
- package/assets/icons/zoom-in.svg +4 -0
- package/assets/icons/zoom-out.svg +4 -0
- package/dist/components/charts/__init__.py +1 -1
- package/dist/components/charts/assets/index.js +1 -1
- package/dist/components/charts/assets/libraries/vega.js +11 -11
- package/dist/components/charts/grammar.json +2032 -72
- package/dist/components/editors/__init__.py +1 -1
- package/dist/components/editors/assets/collection.js +1 -1
- package/dist/components/editors/assets/index.js +1 -1
- package/dist/components/editors/assets/libraries/codemirror.js +30 -31
- package/dist/components/editors/assets/libraries/jodit.js +453 -447
- package/dist/components/editors/commands.json +113 -1
- package/dist/components/editors/grammar.json +12 -5
- package/dist/components/grid/__init__.py +1 -1
- package/dist/components/grid/assets/index.js +1 -1
- package/dist/components/grid/commands.json +4 -6
- package/dist/components/grid/grammar.json +112 -0
- package/dist/components/inputs/__init__.py +1 -1
- package/dist/components/inputs/assets/index.js +1 -1
- package/dist/components/inputs/grammar.json +5165 -359
- package/dist/components/layout/__init__.py +1 -1
- package/dist/components/layout/assets/collection.js +1 -0
- package/dist/components/layout/assets/index.js +1 -1
- package/dist/components/layout/grammar.json +433 -4
- package/dist/components/tree/__init__.py +1 -1
- package/dist/components/tree/assets/index.js +1 -1
- package/dist/components/tree/grammar.json +51 -0
- package/dist/components/typst/__init__.py +1 -1
- package/dist/components/typst/assets/collection.js +6 -6
- package/dist/components/typst/assets/index.js +1 -1
- package/dist/components/uploads/__init__.py +1 -1
- package/dist/components/uploads/assets/index.js +1 -1
- package/dist/components/uploads/grammar.json +66 -0
- package/dist/declared-collections.js +1 -1
- package/dist/gramlot.js +5486 -2029
- package/dist/gramlot.min.js +361 -138
- package/dist/libraries.json +6 -4
- package/dist/standard-collections.js +1 -1
- package/dist/standard-grammar.js +1 -1
- package/package.json +6 -2
- package/src/binding/ask-dialog.js +17 -3
- package/src/binding/providers.js +3 -2
- package/src/binding/remote.js +41 -6
- package/src/binding/runtime.js +30 -3
- package/src/builder/gramlot-builder.d.ts +3 -1
- package/src/builder/gramlot-builder.js +77 -26
- package/src/builder/source.js +78 -15
- package/src/builder/xml-recipe.js +144 -0
- package/src/chat-file-types.js +13 -0
- package/src/chat.d.ts +1 -0
- package/src/chat.js +35 -25
- package/src/commands.d.ts +1 -1
- package/src/commands.js +1 -1
- package/src/components/border-container.js +64 -6
- package/src/components/buttons.js +26 -31
- package/src/components/chart-bar3d-options.js +0 -1
- package/src/components/chart-boxplot-options.js +1 -1
- package/src/components/chart-candlestick-options.js +1 -1
- package/src/components/chart-engines/echarts-options.js +6 -5
- package/src/components/chart-engines/echarts.js +27 -10
- package/src/components/chart-engines/plotly-map.js +1 -1
- package/src/components/chart-engines/plotly.js +21 -14
- package/src/components/chart-engines/uplot.js +17 -11
- package/src/components/chart-engines/vega.js +17 -11
- package/src/components/chart-funnel-options.js +1 -1
- package/src/components/chart-geographic-options.js +2 -2
- package/src/components/chart-heatmap-options.js +1 -1
- package/src/components/chart-map-bar3d-options.js +2 -2
- package/src/components/chart-map-options.js +2 -2
- package/src/components/chart-pane.js +5 -5
- package/src/components/chart-parallel-options.js +1 -1
- package/src/components/chart-radar-options.js +1 -1
- package/src/components/chart-renderer.js +6 -1
- package/src/components/chart-sankey-options.js +1 -1
- package/src/components/chart-spatial-options.js +6 -2
- package/src/components/chart-sunburst-options.js +13 -1
- package/src/components/chart-theme.js +14 -0
- package/src/components/chart-treemap-options.js +1 -1
- package/src/components/chart-type-data.js +24 -4
- package/src/components/charts.js +7 -6
- package/src/components/check-box-text-editor.js +1 -0
- package/src/components/check-box-text.js +2 -0
- package/src/components/check-box-tree.js +1 -1
- package/src/components/choice-editor.js +5 -4
- package/src/components/choice-field-styles.js +9 -1
- package/src/components/code-mirror-engine.js +19 -5
- package/src/components/code-mirror-gramlot.js +85 -0
- package/src/components/code-mirror.js +3 -2
- package/src/components/drawing.js +43 -14
- package/src/components/editor-commands.js +69 -0
- package/src/components/editor-options.js +1 -1
- package/src/components/editors.js +5 -3
- package/src/components/form-tray-pane.js +18 -0
- package/src/components/graphical-ranges.js +190 -0
- package/src/components/grid-check-sets.js +39 -3
- package/src/components/grid-footer.js +6 -1
- package/src/components/grid-header-interaction.js +3 -3
- package/src/components/grid-styles.js +30 -5
- package/src/components/grid-tools.js +15 -7
- package/src/components/grid.js +109 -15
- package/src/components/html-editor-commands.js +61 -0
- package/src/components/html-editor.js +18 -3
- package/src/components/inputs.js +94 -23
- package/src/components/jodit-engine.js +110 -7
- package/src/components/layout.js +3 -2
- package/src/components/menus.js +89 -26
- package/src/components/numeric-range.js +39 -0
- package/src/components/selected-container.js +123 -64
- package/src/components/tab-bar.js +389 -0
- package/src/components/toolbar-icon-style.js +22 -0
- package/src/components/toolbar-overflow.js +74 -12
- package/src/components/tray-base.js +528 -0
- package/src/components/tray-pane.js +41 -518
- package/src/components/tree.js +56 -4
- package/src/components/typed-editor.js +5 -2
- package/src/components/typst-preview.js +3 -3
- package/src/components/upload-blocks.js +88 -0
- package/src/components/upload-engine.js +21 -31
- package/src/components/uploader.js +168 -47
- package/src/editing-session.js +2 -1
- package/src/gramlot.js +6 -3
- package/src/handlers/dom-handler.d.ts +2 -0
- package/src/handlers/dom-handler.js +9 -0
- package/src/handlers/rpc-handler.d.ts +1 -1
- package/src/handlers/rpc-handler.js +2 -0
- package/src/handlers/source-handler.d.ts +5 -3
- package/src/handlers/source-handler.js +31 -13
- package/src/icons.js +84 -0
- package/src/ide-runtime.js +3 -1
- package/src/index-page-runtime.js +20 -5
- package/src/index-page-styles.js +1 -1
- package/src/index-theme.js +210 -3
- package/src/index.d.ts +7 -2
- package/src/index.js +7 -2
- package/src/libraries.js +4 -4
- package/src/object-extract.d.ts +7 -0
- package/src/object-extract.js +31 -0
- package/src/renderer/attributes.js +1 -1
- package/src/renderer/gramlot-renderer.d.ts +2 -2
- package/src/renderer/gramlot-renderer.js +4 -1
- package/src/server/chat-attachments.js +139 -0
- package/src/server/chat.d.ts +33 -0
- package/src/server/chat.js +168 -0
- package/src/server/database-selectors.d.ts +6 -0
- package/src/server/database-selectors.js +13 -0
- package/src/server/gramlot-file-server.js +6 -1
- package/src/server/gramlot-server.d.ts +19 -3
- package/src/server/gramlot-server.js +149 -19
- package/src/server/index-page.d.ts +10 -0
- package/src/server/index-page.js +92 -8
- package/src/server/index.d.ts +1 -1
- package/src/server/index.js +1 -1
- package/src/server/page-base.js +4 -0
- package/src/server/page-store.d.ts +21 -0
- package/src/server/page-store.js +219 -0
- package/src/server/page.d.ts +6 -1
- package/src/server/page.js +5 -1
- package/src/server/store-recipe.js +102 -0
- package/src/server/toolbar-icon-name.d.ts +93 -0
- package/src/server/upload.d.ts +2 -0
- package/src/server/upload.js +36 -18
- package/src/server/visual-editor.js +4 -2
- package/src/tree-store.d.ts +5 -1
- package/src/tree-store.js +11 -2
- package/src/view/choice-focus.js +17 -0
- package/src/view/html.js +21 -1
- package/src/view/labelbox.js +6 -1
- package/src/view/menu.js +9 -3
- package/src/visual-editor.d.ts +1 -0
- package/src/visual-editor.js +10 -5
- package/themes/gramlot-base/theme.css +60 -28
- package/themes/gramlot-compact/theme.css +2 -0
- package/themes/gramlot-index/icons/align-center.svg +4 -0
- package/themes/gramlot-index/icons/align-justify.svg +4 -0
- package/themes/gramlot-index/icons/align-left.svg +4 -0
- package/themes/gramlot-index/icons/align-right.svg +4 -0
- package/themes/gramlot-index/icons/applications.svg +4 -0
- package/themes/gramlot-index/icons/archive.svg +4 -0
- package/themes/gramlot-index/icons/attachment.svg +4 -0
- package/themes/gramlot-index/icons/bold.svg +4 -0
- package/themes/gramlot-index/icons/book.svg +4 -0
- package/themes/gramlot-index/icons/bookmark.svg +4 -0
- package/themes/gramlot-index/icons/calendar.svg +4 -0
- package/themes/gramlot-index/icons/cancel.svg +4 -0
- package/themes/gramlot-index/icons/chart.svg +4 -0
- package/themes/gramlot-index/icons/chat.svg +4 -0
- package/themes/gramlot-index/icons/clock.svg +4 -0
- package/themes/gramlot-index/icons/code.svg +4 -0
- package/themes/gramlot-index/icons/collapse.svg +4 -0
- package/themes/gramlot-index/icons/columns.svg +4 -0
- package/themes/gramlot-index/icons/confirm.svg +4 -0
- package/themes/gramlot-index/icons/copy.svg +4 -0
- package/themes/gramlot-index/icons/cut.svg +4 -0
- package/themes/gramlot-index/icons/database.svg +4 -0
- package/themes/gramlot-index/icons/delete.svg +4 -0
- package/themes/gramlot-index/icons/detach.svg +4 -0
- package/themes/gramlot-index/icons/document.svg +4 -0
- package/themes/gramlot-index/icons/download.svg +4 -0
- package/themes/gramlot-index/icons/duplicate.svg +4 -0
- package/themes/gramlot-index/icons/edit.svg +4 -0
- package/themes/gramlot-index/icons/eraser.svg +4 -0
- package/themes/gramlot-index/icons/expand.svg +4 -0
- package/themes/gramlot-index/icons/export.svg +4 -0
- package/themes/gramlot-index/icons/eye.svg +4 -0
- package/themes/gramlot-index/icons/filter.svg +4 -0
- package/themes/gramlot-index/icons/first.svg +4 -0
- package/themes/gramlot-index/icons/folder.svg +4 -0
- package/themes/gramlot-index/icons/group.svg +4 -0
- package/themes/gramlot-index/icons/help.svg +4 -0
- package/themes/gramlot-index/icons/home.svg +4 -0
- package/themes/gramlot-index/icons/horizontal-rule.svg +4 -0
- package/themes/gramlot-index/icons/image.svg +4 -0
- package/themes/gramlot-index/icons/import.svg +4 -0
- package/themes/gramlot-index/icons/indent.svg +4 -0
- package/themes/gramlot-index/icons/info.svg +4 -0
- package/themes/gramlot-index/icons/inspector.svg +4 -0
- package/themes/gramlot-index/icons/italic.svg +4 -0
- package/themes/gramlot-index/icons/last.svg +4 -0
- package/themes/gramlot-index/icons/layers.svg +4 -0
- package/themes/gramlot-index/icons/link.svg +4 -0
- package/themes/gramlot-index/icons/list-bulleted.svg +4 -0
- package/themes/gramlot-index/icons/list-numbered.svg +4 -0
- package/themes/gramlot-index/icons/list.svg +4 -0
- package/themes/gramlot-index/icons/lock.svg +4 -0
- package/themes/gramlot-index/icons/logout.svg +4 -0
- package/themes/gramlot-index/icons/navigation.svg +4 -0
- package/themes/gramlot-index/icons/new.svg +4 -0
- package/themes/gramlot-index/icons/next.svg +4 -0
- package/themes/gramlot-index/icons/open.svg +4 -0
- package/themes/gramlot-index/icons/outdent.svg +4 -0
- package/themes/gramlot-index/icons/palette.svg +4 -0
- package/themes/gramlot-index/icons/panel-bottom.svg +4 -0
- package/themes/gramlot-index/icons/panel-left.svg +4 -0
- package/themes/gramlot-index/icons/panel-right.svg +4 -0
- package/themes/gramlot-index/icons/panel-top.svg +4 -0
- package/themes/gramlot-index/icons/paragraph.svg +4 -0
- package/themes/gramlot-index/icons/paste.svg +4 -0
- package/themes/gramlot-index/icons/pause.svg +4 -0
- package/themes/gramlot-index/icons/pin.svg +4 -0
- package/themes/gramlot-index/icons/play.svg +4 -0
- package/themes/gramlot-index/icons/previous.svg +4 -0
- package/themes/gramlot-index/icons/print.svg +4 -0
- package/themes/gramlot-index/icons/redo.svg +4 -0
- package/themes/gramlot-index/icons/refresh.svg +4 -0
- package/themes/gramlot-index/icons/save.svg +4 -0
- package/themes/gramlot-index/icons/search.svg +4 -0
- package/themes/gramlot-index/icons/select-all.svg +4 -0
- package/themes/gramlot-index/icons/send.svg +4 -0
- package/themes/gramlot-index/icons/settings.svg +4 -0
- package/themes/gramlot-index/icons/sort-ascending.svg +4 -0
- package/themes/gramlot-index/icons/sort-descending.svg +4 -0
- package/themes/gramlot-index/icons/stop.svg +4 -0
- package/themes/gramlot-index/icons/strikethrough.svg +4 -0
- package/themes/gramlot-index/icons/table.svg +4 -0
- package/themes/gramlot-index/icons/tree.svg +4 -0
- package/themes/gramlot-index/icons/underline.svg +4 -0
- package/themes/gramlot-index/icons/undo.svg +4 -0
- package/themes/gramlot-index/icons/unlock.svg +4 -0
- package/themes/gramlot-index/icons/upload.svg +4 -0
- package/themes/gramlot-index/icons/user.svg +4 -0
- package/themes/gramlot-index/icons/warning.svg +4 -0
- package/themes/gramlot-index/icons/zoom-in.svg +4 -0
- package/themes/gramlot-index/icons/zoom-out.svg +4 -0
- package/themes/gramlot-index/icons.json +93 -0
- package/themes/gramlot-index/theme.css +24 -0
- package/themes/joanna/theme.css +2 -0
- package/themes/mela/theme.css +2 -0
- package/themes/mimi/theme.css +2 -0
- package/tools/gramlot-tools-inspector.js +11 -3
|
@@ -8,6 +8,6 @@ mygramlot = GramlotCollection(
|
|
|
8
8
|
module="assets/index.js",
|
|
9
9
|
css=(),
|
|
10
10
|
dependencies=(),
|
|
11
|
-
build_id="sha256:
|
|
11
|
+
build_id="sha256:08386203d049908a90724a8877ecf4a5e4b7897a949b9ad71580f4f5a93d4b1f",
|
|
12
12
|
files=("assets/collection.js", "assets/index.js", "commands.json", "grammar.json",),
|
|
13
13
|
)
|
|
@@ -4,6 +4,7 @@ export const BorderContainer = /* @__PURE__ */ read("BorderContainer");
|
|
|
4
4
|
export const ContentPane = /* @__PURE__ */ read("ContentPane");
|
|
5
5
|
export const Dialog = /* @__PURE__ */ read("Dialog");
|
|
6
6
|
export const FloatingPane = /* @__PURE__ */ read("FloatingPane");
|
|
7
|
+
export const FormTrayPane = /* @__PURE__ */ read("FormTrayPane");
|
|
7
8
|
export const Formlet = /* @__PURE__ */ read("Formlet");
|
|
8
9
|
export const FramePane = /* @__PURE__ */ read("FramePane");
|
|
9
10
|
export const GroupBox = /* @__PURE__ */ read("GroupBox");
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export {default} from "./collection.js";
|
|
2
2
|
export * from "./collection.js";
|
|
3
|
-
export const buildId = "sha256:
|
|
3
|
+
export const buildId = "sha256:08386203d049908a90724a8877ecf4a5e4b7897a949b9ad71580f4f5a93d4b1f";
|
|
@@ -1271,6 +1271,320 @@
|
|
|
1271
1271
|
"parent_tags": null,
|
|
1272
1272
|
"sub_tags": "framePane"
|
|
1273
1273
|
},
|
|
1274
|
+
"formTrayPane": {
|
|
1275
|
+
"_meta": {
|
|
1276
|
+
"gramlot_component": {
|
|
1277
|
+
"childParameters": {
|
|
1278
|
+
"aspectRatio": {
|
|
1279
|
+
"default": null,
|
|
1280
|
+
"dtype": "N",
|
|
1281
|
+
"nullable": true
|
|
1282
|
+
},
|
|
1283
|
+
"closable": {
|
|
1284
|
+
"default": false,
|
|
1285
|
+
"dtype": "B"
|
|
1286
|
+
},
|
|
1287
|
+
"minHeight": {
|
|
1288
|
+
"default": 64,
|
|
1289
|
+
"dtype": "N"
|
|
1290
|
+
},
|
|
1291
|
+
"minWidth": {
|
|
1292
|
+
"default": 100,
|
|
1293
|
+
"dtype": "N"
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
"command": false,
|
|
1297
|
+
"dataScope": false,
|
|
1298
|
+
"dragSource": true,
|
|
1299
|
+
"parameters": {
|
|
1300
|
+
"autoArrange": {
|
|
1301
|
+
"binding": "twoWay",
|
|
1302
|
+
"default": false,
|
|
1303
|
+
"dtype": "B"
|
|
1304
|
+
},
|
|
1305
|
+
"autoSize": {
|
|
1306
|
+
"binding": "read",
|
|
1307
|
+
"default": false,
|
|
1308
|
+
"dtype": "B"
|
|
1309
|
+
},
|
|
1310
|
+
"autoSnap": {
|
|
1311
|
+
"binding": "read",
|
|
1312
|
+
"default": false,
|
|
1313
|
+
"dtype": "B"
|
|
1314
|
+
},
|
|
1315
|
+
"gridStep": {
|
|
1316
|
+
"binding": "read",
|
|
1317
|
+
"default": 10,
|
|
1318
|
+
"dtype": "L"
|
|
1319
|
+
},
|
|
1320
|
+
"gridVisible": {
|
|
1321
|
+
"binding": "read",
|
|
1322
|
+
"default": false,
|
|
1323
|
+
"dtype": "B"
|
|
1324
|
+
},
|
|
1325
|
+
"locked": {
|
|
1326
|
+
"binding": "read",
|
|
1327
|
+
"default": false,
|
|
1328
|
+
"dtype": "B"
|
|
1329
|
+
},
|
|
1330
|
+
"rotationStep": {
|
|
1331
|
+
"binding": "read",
|
|
1332
|
+
"default": 15,
|
|
1333
|
+
"dtype": "N"
|
|
1334
|
+
},
|
|
1335
|
+
"storepath": {
|
|
1336
|
+
"dtype": "T"
|
|
1337
|
+
}
|
|
1338
|
+
},
|
|
1339
|
+
"presentationDefaults": [],
|
|
1340
|
+
"sourceContext": true
|
|
1341
|
+
},
|
|
1342
|
+
"render_tag": "gramlot-form-tray-pane"
|
|
1343
|
+
},
|
|
1344
|
+
"attributes": {
|
|
1345
|
+
"accepts_var_keyword": true,
|
|
1346
|
+
"accepts_var_positional": false,
|
|
1347
|
+
"parameters": [
|
|
1348
|
+
{
|
|
1349
|
+
"annotation": {
|
|
1350
|
+
"dtype": "T",
|
|
1351
|
+
"kind": "dtype"
|
|
1352
|
+
},
|
|
1353
|
+
"default": null,
|
|
1354
|
+
"has_default": true,
|
|
1355
|
+
"kind": "keyword_only",
|
|
1356
|
+
"name": "storepath",
|
|
1357
|
+
"role": "attribute"
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
"annotation": {
|
|
1361
|
+
"items": [
|
|
1362
|
+
{
|
|
1363
|
+
"dtype": "B",
|
|
1364
|
+
"kind": "dtype"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"base": {
|
|
1368
|
+
"dtype": "T",
|
|
1369
|
+
"kind": "dtype"
|
|
1370
|
+
},
|
|
1371
|
+
"kind": "annotated",
|
|
1372
|
+
"metadata": [
|
|
1373
|
+
{
|
|
1374
|
+
"flags": 0,
|
|
1375
|
+
"kind": "regex",
|
|
1376
|
+
"pattern": "^[\\^=].+"
|
|
1377
|
+
}
|
|
1378
|
+
]
|
|
1379
|
+
}
|
|
1380
|
+
],
|
|
1381
|
+
"kind": "union"
|
|
1382
|
+
},
|
|
1383
|
+
"default": false,
|
|
1384
|
+
"has_default": true,
|
|
1385
|
+
"kind": "keyword_only",
|
|
1386
|
+
"name": "locked",
|
|
1387
|
+
"role": "attribute"
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
"annotation": {
|
|
1391
|
+
"items": [
|
|
1392
|
+
{
|
|
1393
|
+
"dtype": "L",
|
|
1394
|
+
"kind": "dtype"
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
"base": {
|
|
1398
|
+
"dtype": "T",
|
|
1399
|
+
"kind": "dtype"
|
|
1400
|
+
},
|
|
1401
|
+
"kind": "annotated",
|
|
1402
|
+
"metadata": [
|
|
1403
|
+
{
|
|
1404
|
+
"flags": 0,
|
|
1405
|
+
"kind": "regex",
|
|
1406
|
+
"pattern": "^[\\^=].+"
|
|
1407
|
+
}
|
|
1408
|
+
]
|
|
1409
|
+
}
|
|
1410
|
+
],
|
|
1411
|
+
"kind": "union"
|
|
1412
|
+
},
|
|
1413
|
+
"default": 10,
|
|
1414
|
+
"has_default": true,
|
|
1415
|
+
"kind": "keyword_only",
|
|
1416
|
+
"name": "gridStep",
|
|
1417
|
+
"role": "attribute"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
"annotation": {
|
|
1421
|
+
"items": [
|
|
1422
|
+
{
|
|
1423
|
+
"dtype": "B",
|
|
1424
|
+
"kind": "dtype"
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
"base": {
|
|
1428
|
+
"dtype": "T",
|
|
1429
|
+
"kind": "dtype"
|
|
1430
|
+
},
|
|
1431
|
+
"kind": "annotated",
|
|
1432
|
+
"metadata": [
|
|
1433
|
+
{
|
|
1434
|
+
"flags": 0,
|
|
1435
|
+
"kind": "regex",
|
|
1436
|
+
"pattern": "^[\\^=].+"
|
|
1437
|
+
}
|
|
1438
|
+
]
|
|
1439
|
+
}
|
|
1440
|
+
],
|
|
1441
|
+
"kind": "union"
|
|
1442
|
+
},
|
|
1443
|
+
"default": false,
|
|
1444
|
+
"has_default": true,
|
|
1445
|
+
"kind": "keyword_only",
|
|
1446
|
+
"name": "gridVisible",
|
|
1447
|
+
"role": "attribute"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
"annotation": {
|
|
1451
|
+
"items": [
|
|
1452
|
+
{
|
|
1453
|
+
"dtype": "B",
|
|
1454
|
+
"kind": "dtype"
|
|
1455
|
+
},
|
|
1456
|
+
{
|
|
1457
|
+
"base": {
|
|
1458
|
+
"dtype": "T",
|
|
1459
|
+
"kind": "dtype"
|
|
1460
|
+
},
|
|
1461
|
+
"kind": "annotated",
|
|
1462
|
+
"metadata": [
|
|
1463
|
+
{
|
|
1464
|
+
"flags": 0,
|
|
1465
|
+
"kind": "regex",
|
|
1466
|
+
"pattern": "^[\\^=].+"
|
|
1467
|
+
}
|
|
1468
|
+
]
|
|
1469
|
+
}
|
|
1470
|
+
],
|
|
1471
|
+
"kind": "union"
|
|
1472
|
+
},
|
|
1473
|
+
"default": false,
|
|
1474
|
+
"has_default": true,
|
|
1475
|
+
"kind": "keyword_only",
|
|
1476
|
+
"name": "autoSnap",
|
|
1477
|
+
"role": "attribute"
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"annotation": {
|
|
1481
|
+
"items": [
|
|
1482
|
+
{
|
|
1483
|
+
"dtype": "N",
|
|
1484
|
+
"kind": "dtype"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"base": {
|
|
1488
|
+
"dtype": "T",
|
|
1489
|
+
"kind": "dtype"
|
|
1490
|
+
},
|
|
1491
|
+
"kind": "annotated",
|
|
1492
|
+
"metadata": [
|
|
1493
|
+
{
|
|
1494
|
+
"flags": 0,
|
|
1495
|
+
"kind": "regex",
|
|
1496
|
+
"pattern": "^[\\^=].+"
|
|
1497
|
+
}
|
|
1498
|
+
]
|
|
1499
|
+
}
|
|
1500
|
+
],
|
|
1501
|
+
"kind": "union"
|
|
1502
|
+
},
|
|
1503
|
+
"default": 15,
|
|
1504
|
+
"has_default": true,
|
|
1505
|
+
"kind": "keyword_only",
|
|
1506
|
+
"name": "rotationStep",
|
|
1507
|
+
"role": "attribute"
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
"annotation": {
|
|
1511
|
+
"items": [
|
|
1512
|
+
{
|
|
1513
|
+
"dtype": "B",
|
|
1514
|
+
"kind": "dtype"
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
"base": {
|
|
1518
|
+
"dtype": "T",
|
|
1519
|
+
"kind": "dtype"
|
|
1520
|
+
},
|
|
1521
|
+
"kind": "annotated",
|
|
1522
|
+
"metadata": [
|
|
1523
|
+
{
|
|
1524
|
+
"flags": 0,
|
|
1525
|
+
"kind": "regex",
|
|
1526
|
+
"pattern": "^[\\^=].+"
|
|
1527
|
+
}
|
|
1528
|
+
]
|
|
1529
|
+
}
|
|
1530
|
+
],
|
|
1531
|
+
"kind": "union"
|
|
1532
|
+
},
|
|
1533
|
+
"default": false,
|
|
1534
|
+
"has_default": true,
|
|
1535
|
+
"kind": "keyword_only",
|
|
1536
|
+
"name": "autoArrange",
|
|
1537
|
+
"role": "attribute"
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
"annotation": {
|
|
1541
|
+
"items": [
|
|
1542
|
+
{
|
|
1543
|
+
"dtype": "B",
|
|
1544
|
+
"kind": "dtype"
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
"base": {
|
|
1548
|
+
"dtype": "T",
|
|
1549
|
+
"kind": "dtype"
|
|
1550
|
+
},
|
|
1551
|
+
"kind": "annotated",
|
|
1552
|
+
"metadata": [
|
|
1553
|
+
{
|
|
1554
|
+
"flags": 0,
|
|
1555
|
+
"kind": "regex",
|
|
1556
|
+
"pattern": "^[\\^=].+"
|
|
1557
|
+
}
|
|
1558
|
+
]
|
|
1559
|
+
}
|
|
1560
|
+
],
|
|
1561
|
+
"kind": "union"
|
|
1562
|
+
},
|
|
1563
|
+
"default": false,
|
|
1564
|
+
"has_default": true,
|
|
1565
|
+
"kind": "keyword_only",
|
|
1566
|
+
"name": "autoSize",
|
|
1567
|
+
"role": "attribute"
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
"annotation": {
|
|
1571
|
+
"kind": "any"
|
|
1572
|
+
},
|
|
1573
|
+
"has_default": false,
|
|
1574
|
+
"kind": "var_keyword",
|
|
1575
|
+
"name": "attr",
|
|
1576
|
+
"role": "attribute"
|
|
1577
|
+
}
|
|
1578
|
+
]
|
|
1579
|
+
},
|
|
1580
|
+
"collection_key": null,
|
|
1581
|
+
"doc": null,
|
|
1582
|
+
"inherits_from": null,
|
|
1583
|
+
"node_label": null,
|
|
1584
|
+
"ns": null,
|
|
1585
|
+
"parent_tags": null,
|
|
1586
|
+
"sub_tags": "*"
|
|
1587
|
+
},
|
|
1274
1588
|
"formlet": {
|
|
1275
1589
|
"_meta": {
|
|
1276
1590
|
"gramlot_component": {
|
|
@@ -1391,6 +1705,7 @@
|
|
|
1391
1705
|
},
|
|
1392
1706
|
"height": {},
|
|
1393
1707
|
"region": {
|
|
1708
|
+
"binding": "read",
|
|
1394
1709
|
"enum": [
|
|
1395
1710
|
"top",
|
|
1396
1711
|
"bottom",
|
|
@@ -1398,8 +1713,7 @@
|
|
|
1398
1713
|
"right",
|
|
1399
1714
|
"center"
|
|
1400
1715
|
],
|
|
1401
|
-
"required": true
|
|
1402
|
-
"unique": true
|
|
1716
|
+
"required": true
|
|
1403
1717
|
},
|
|
1404
1718
|
"title": {
|
|
1405
1719
|
"default": "",
|
|
@@ -1419,6 +1733,16 @@
|
|
|
1419
1733
|
"sidebar"
|
|
1420
1734
|
]
|
|
1421
1735
|
},
|
|
1736
|
+
"icon_color": {
|
|
1737
|
+
"binding": "read",
|
|
1738
|
+
"dtype": "T",
|
|
1739
|
+
"nullable": true
|
|
1740
|
+
},
|
|
1741
|
+
"icon_opacity": {
|
|
1742
|
+
"binding": "read",
|
|
1743
|
+
"dtype": "R",
|
|
1744
|
+
"nullable": true
|
|
1745
|
+
},
|
|
1422
1746
|
"persist": {
|
|
1423
1747
|
"binding": "read",
|
|
1424
1748
|
"default": false,
|
|
@@ -1474,6 +1798,60 @@
|
|
|
1474
1798
|
"name": "persist",
|
|
1475
1799
|
"role": "attribute"
|
|
1476
1800
|
},
|
|
1801
|
+
{
|
|
1802
|
+
"annotation": {
|
|
1803
|
+
"items": [
|
|
1804
|
+
{
|
|
1805
|
+
"dtype": "T",
|
|
1806
|
+
"kind": "dtype"
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
"dtype": "NN",
|
|
1810
|
+
"kind": "dtype"
|
|
1811
|
+
}
|
|
1812
|
+
],
|
|
1813
|
+
"kind": "union"
|
|
1814
|
+
},
|
|
1815
|
+
"default": null,
|
|
1816
|
+
"has_default": true,
|
|
1817
|
+
"kind": "keyword_only",
|
|
1818
|
+
"name": "icon_color",
|
|
1819
|
+
"role": "attribute"
|
|
1820
|
+
},
|
|
1821
|
+
{
|
|
1822
|
+
"annotation": {
|
|
1823
|
+
"items": [
|
|
1824
|
+
{
|
|
1825
|
+
"dtype": "R",
|
|
1826
|
+
"kind": "dtype"
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
"dtype": "NN",
|
|
1830
|
+
"kind": "dtype"
|
|
1831
|
+
},
|
|
1832
|
+
{
|
|
1833
|
+
"base": {
|
|
1834
|
+
"dtype": "T",
|
|
1835
|
+
"kind": "dtype"
|
|
1836
|
+
},
|
|
1837
|
+
"kind": "annotated",
|
|
1838
|
+
"metadata": [
|
|
1839
|
+
{
|
|
1840
|
+
"flags": 0,
|
|
1841
|
+
"kind": "regex",
|
|
1842
|
+
"pattern": "^[\\^=].+"
|
|
1843
|
+
}
|
|
1844
|
+
]
|
|
1845
|
+
}
|
|
1846
|
+
],
|
|
1847
|
+
"kind": "union"
|
|
1848
|
+
},
|
|
1849
|
+
"default": null,
|
|
1850
|
+
"has_default": true,
|
|
1851
|
+
"kind": "keyword_only",
|
|
1852
|
+
"name": "icon_opacity",
|
|
1853
|
+
"role": "attribute"
|
|
1854
|
+
},
|
|
1477
1855
|
{
|
|
1478
1856
|
"annotation": {
|
|
1479
1857
|
"kind": "any"
|
|
@@ -1491,7 +1869,7 @@
|
|
|
1491
1869
|
"node_label": null,
|
|
1492
1870
|
"ns": null,
|
|
1493
1871
|
"parent_tags": null,
|
|
1494
|
-
"sub_tags": "contentPane"
|
|
1872
|
+
"sub_tags": "contentPane,menu"
|
|
1495
1873
|
},
|
|
1496
1874
|
"groupBox": {
|
|
1497
1875
|
"_meta": {
|
|
@@ -1805,6 +2183,11 @@
|
|
|
1805
2183
|
"_meta": {
|
|
1806
2184
|
"gramlot_component": {
|
|
1807
2185
|
"childParameters": {
|
|
2186
|
+
"caption_color": {
|
|
2187
|
+
"binding": "read",
|
|
2188
|
+
"dtype": "T",
|
|
2189
|
+
"nullable": true
|
|
2190
|
+
},
|
|
1808
2191
|
"detachable": {
|
|
1809
2192
|
"dtype": "B"
|
|
1810
2193
|
},
|
|
@@ -1816,6 +2199,15 @@
|
|
|
1816
2199
|
"nullable": true,
|
|
1817
2200
|
"unique": true
|
|
1818
2201
|
},
|
|
2202
|
+
"tab_align": {
|
|
2203
|
+
"binding": "read",
|
|
2204
|
+
"default": "start",
|
|
2205
|
+
"dtype": "T",
|
|
2206
|
+
"enum": [
|
|
2207
|
+
"start",
|
|
2208
|
+
"end"
|
|
2209
|
+
]
|
|
2210
|
+
},
|
|
1819
2211
|
"title": {
|
|
1820
2212
|
"default": "",
|
|
1821
2213
|
"dtype": "T",
|
|
@@ -1853,7 +2245,8 @@
|
|
|
1853
2245
|
"dtype": "T",
|
|
1854
2246
|
"enum": [
|
|
1855
2247
|
"tabs",
|
|
1856
|
-
"underline"
|
|
2248
|
+
"underline",
|
|
2249
|
+
"tabBar"
|
|
1857
2250
|
]
|
|
1858
2251
|
},
|
|
1859
2252
|
"tabPosition": {
|
|
@@ -2311,6 +2704,7 @@
|
|
|
2311
2704
|
},
|
|
2312
2705
|
"command": false,
|
|
2313
2706
|
"dataScope": false,
|
|
2707
|
+
"dragSource": true,
|
|
2314
2708
|
"parameters": {
|
|
2315
2709
|
"autoArrange": {
|
|
2316
2710
|
"binding": "twoWay",
|
|
@@ -2322,6 +2716,11 @@
|
|
|
2322
2716
|
"default": false,
|
|
2323
2717
|
"dtype": "B"
|
|
2324
2718
|
},
|
|
2719
|
+
"autoSnap": {
|
|
2720
|
+
"binding": "read",
|
|
2721
|
+
"default": false,
|
|
2722
|
+
"dtype": "B"
|
|
2723
|
+
},
|
|
2325
2724
|
"gridStep": {
|
|
2326
2725
|
"binding": "read",
|
|
2327
2726
|
"default": 10,
|
|
@@ -2456,6 +2855,36 @@
|
|
|
2456
2855
|
"name": "gridVisible",
|
|
2457
2856
|
"role": "attribute"
|
|
2458
2857
|
},
|
|
2858
|
+
{
|
|
2859
|
+
"annotation": {
|
|
2860
|
+
"items": [
|
|
2861
|
+
{
|
|
2862
|
+
"dtype": "B",
|
|
2863
|
+
"kind": "dtype"
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
"base": {
|
|
2867
|
+
"dtype": "T",
|
|
2868
|
+
"kind": "dtype"
|
|
2869
|
+
},
|
|
2870
|
+
"kind": "annotated",
|
|
2871
|
+
"metadata": [
|
|
2872
|
+
{
|
|
2873
|
+
"flags": 0,
|
|
2874
|
+
"kind": "regex",
|
|
2875
|
+
"pattern": "^[\\^=].+"
|
|
2876
|
+
}
|
|
2877
|
+
]
|
|
2878
|
+
}
|
|
2879
|
+
],
|
|
2880
|
+
"kind": "union"
|
|
2881
|
+
},
|
|
2882
|
+
"default": false,
|
|
2883
|
+
"has_default": true,
|
|
2884
|
+
"kind": "keyword_only",
|
|
2885
|
+
"name": "autoSnap",
|
|
2886
|
+
"role": "attribute"
|
|
2887
|
+
},
|
|
2459
2888
|
{
|
|
2460
2889
|
"annotation": {
|
|
2461
2890
|
"items": [
|
|
@@ -8,6 +8,6 @@ mygramlot = GramlotCollection(
|
|
|
8
8
|
module="assets/index.js",
|
|
9
9
|
css=(),
|
|
10
10
|
dependencies=(),
|
|
11
|
-
build_id="sha256:
|
|
11
|
+
build_id="sha256:5e1b207caf1f3f592ee7892316ddbb453cec7597bdc66cc4a29519bb697e7218",
|
|
12
12
|
files=("assets/collection.js", "assets/index.js", "commands.json", "grammar.json",),
|
|
13
13
|
)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export {default} from "./collection.js";
|
|
2
2
|
export * from "./collection.js";
|
|
3
|
-
export const buildId = "sha256:
|
|
3
|
+
export const buildId = "sha256:5e1b207caf1f3f592ee7892316ddbb453cec7597bdc66cc4a29519bb697e7218";
|
|
@@ -152,6 +152,11 @@
|
|
|
152
152
|
"default": false,
|
|
153
153
|
"dtype": "B"
|
|
154
154
|
},
|
|
155
|
+
"eagerCheck": {
|
|
156
|
+
"binding": "read",
|
|
157
|
+
"default": false,
|
|
158
|
+
"dtype": "B"
|
|
159
|
+
},
|
|
155
160
|
"excludeRoot": {
|
|
156
161
|
"binding": "read",
|
|
157
162
|
"default": null,
|
|
@@ -189,6 +194,11 @@
|
|
|
189
194
|
"default": false,
|
|
190
195
|
"dtype": "B"
|
|
191
196
|
},
|
|
197
|
+
"icon": {
|
|
198
|
+
"binding": "read",
|
|
199
|
+
"default": "",
|
|
200
|
+
"dtype": "T"
|
|
201
|
+
},
|
|
192
202
|
"internalNames": {
|
|
193
203
|
"binding": "read",
|
|
194
204
|
"default": false,
|
|
@@ -498,6 +508,17 @@
|
|
|
498
508
|
"name": "getLabelClass",
|
|
499
509
|
"role": "attribute"
|
|
500
510
|
},
|
|
511
|
+
{
|
|
512
|
+
"annotation": {
|
|
513
|
+
"dtype": "T",
|
|
514
|
+
"kind": "dtype"
|
|
515
|
+
},
|
|
516
|
+
"default": "",
|
|
517
|
+
"has_default": true,
|
|
518
|
+
"kind": "keyword_only",
|
|
519
|
+
"name": "icon",
|
|
520
|
+
"role": "attribute"
|
|
521
|
+
},
|
|
501
522
|
{
|
|
502
523
|
"annotation": {
|
|
503
524
|
"items": [
|
|
@@ -761,6 +782,36 @@
|
|
|
761
782
|
"name": "checkedPaths_joiner",
|
|
762
783
|
"role": "attribute"
|
|
763
784
|
},
|
|
785
|
+
{
|
|
786
|
+
"annotation": {
|
|
787
|
+
"items": [
|
|
788
|
+
{
|
|
789
|
+
"dtype": "B",
|
|
790
|
+
"kind": "dtype"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"base": {
|
|
794
|
+
"dtype": "T",
|
|
795
|
+
"kind": "dtype"
|
|
796
|
+
},
|
|
797
|
+
"kind": "annotated",
|
|
798
|
+
"metadata": [
|
|
799
|
+
{
|
|
800
|
+
"flags": 0,
|
|
801
|
+
"kind": "regex",
|
|
802
|
+
"pattern": "^[\\^=].+"
|
|
803
|
+
}
|
|
804
|
+
]
|
|
805
|
+
}
|
|
806
|
+
],
|
|
807
|
+
"kind": "union"
|
|
808
|
+
},
|
|
809
|
+
"default": false,
|
|
810
|
+
"has_default": true,
|
|
811
|
+
"kind": "keyword_only",
|
|
812
|
+
"name": "eagerCheck",
|
|
813
|
+
"role": "attribute"
|
|
814
|
+
},
|
|
764
815
|
{
|
|
765
816
|
"annotation": {
|
|
766
817
|
"items": [
|
|
@@ -8,6 +8,6 @@ mygramlot = GramlotCollection(
|
|
|
8
8
|
module="assets/index.js",
|
|
9
9
|
css=(),
|
|
10
10
|
dependencies=(),
|
|
11
|
-
build_id="sha256:
|
|
11
|
+
build_id="sha256:9c05d1b4385a181deb6112617bb62fa8d667dfaa95b4317d5a3184f27852617b",
|
|
12
12
|
files=("assets/collection.js", "assets/index.js", "assets/libraries/typst.js", "commands.json", "grammar.json",),
|
|
13
13
|
)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var m=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
var m=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var x=(s,e)=>{for(var t in e)m(s,t,{get:e[t],enumerable:!0})},p=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!w.call(s,a)&&a!==t&&m(s,a,{get:()=>e[a],enumerable:!(i=g(e,a))||i.enumerable});return s},l=(s,e,t)=>(p(s,e,"default"),t&&p(t,e,"default"));var r={};x(r,{defineCollection:()=>d});l(r,U);import*as U from"@gramlot/gramlot/components";import{defineCollection as b}from"@gramlot/gramlot/components";function d(s){if(s.name!=="typst")throw new Error("Unexpected bundled collection");let e=[],t={};s.css?.forEach((i,a)=>{i.href=e[a].href});for(let[i,a]of Object.entries(s.assets??{}))a.href=t[i].href;return b({...s,css:e,assets:t})}import{sharedModules as y}from"@gramlot/gramlot";var C=s=>y["./libraries.js"][s];var u=C("loadLibrary");import{sharedModules as k}from"@gramlot/gramlot";var P=s=>k["./components/parameters.js"][s];var f=P("projectParameters");function T(s){return class extends s{#e=0;#s;#t;#n;#i=!1;#a=[];constructor(){super();let e=this.attachShadow({mode:"open"}),t=this.ownerDocument,i=t.createElement("style");i.textContent=`:host{display:block;height:100%;min-height:0;color:var(--gramlot-ink,CanvasText)}
|
|
2
2
|
.preview{display:flex;flex-direction:column;height:100%;background:var(--gramlot-surface-subtle,Canvas)}
|
|
3
|
-
.tools{display:flex;gap:16px;align-items:center;padding:8px 12px;font:inherit}
|
|
4
|
-
a{color:var(--gramlot-
|
|
5
|
-
a:hover{background:var(--gramlot-selected
|
|
3
|
+
.tools{display:flex;gap:16px;align-items:center;padding:8px 12px;font:inherit;background:var(--gramlot-surface,Canvas)}
|
|
4
|
+
a{color:var(--gramlot-action,LinkText);border-radius:var(--gramlot-radius-sm,4px);padding:4px 8px;text-decoration:underline;white-space:nowrap}
|
|
5
|
+
a[href]:hover{color:var(--gramlot-action-hover,LinkText);background:var(--gramlot-selected,Canvas)}
|
|
6
6
|
a:focus-visible{outline:2px solid var(--gramlot-focus-ring,Highlight)}
|
|
7
7
|
a[aria-disabled=true]{opacity:.45;pointer-events:none}
|
|
8
8
|
.status{white-space:pre-wrap;font-size:.9em;overflow:auto;max-height:8em}
|
|
9
9
|
.pages{flex:1;min-height:0;overflow:auto;padding:16px}
|
|
10
10
|
img{display:block;width:100%;height:auto;background:white;box-shadow:0 2px 10px #0002}
|
|
11
|
-
img[hidden]{display:none}`;let a=t.createElement("div");a.className="preview";let o=t.createElement("div");o.className="tools",this.download=t.createElement("a"),this.download.textContent="Download PDF",this.status=t.createElement("span"),this.status.className="status",this.status.setAttribute("role","status");let n=t.createElement("div");n.className="pages",this.image=t.createElement("img"),this.image.alt="Typst document preview",this.image.hidden=!0,n.append(this.image),o.append(this.download,this.status),a.append(o,n),e.append(i,a),this.#r()}#r(){this.download.removeAttribute("href"),this.download.setAttribute("aria-disabled","true"),this.download.tabIndex=-1,this.image.hidden=!0,this.image.removeAttribute("src");for(let e of this.#a)this.ownerDocument.defaultView.URL.revokeObjectURL(e);this.#a=[]}connectedCallback(){this.#o()}disconnectedCallback(){++this.#e,clearTimeout(this.#s),this.#t?.release(),this.#t=null,this.#r()}projectAttributes(e){let t=this.parameters?.value,i=f(this,e);return this.download.download=this.parameters.filename,t!==this.parameters.value&&(++this.#e,this.#r(),this.#o()),i}#o(){clearTimeout(this.#s),!(!this.isConnected||!this.parameters)&&(this.status.textContent="Preparing preview\u2026",this.#s=setTimeout(()=>{this.ready=this.#l()},350))}async#l(){if(this.#i)return;let e=this.#e;this.#i=!0;try{this.#n??=u("typst",this.ownerDocument,()=>import("@gramlot/libraries/typst"));let t=await this.#n;if(!this.isConnected||e!==this.#e)return;this.#t??=t.acquireCompiler(),this.status.textContent="Compiling\u2026";let i=await this.#t.compile(this.parameters.value);if(!this.isConnected||e!==this.#e)return;let{URL:a,Blob:o}=this.ownerDocument.defaultView,n=a.createObjectURL(new o([i.svg],{type:"image/svg+xml"})),
|
|
12
|
-
`):"Preview and PDF are up to date"}catch(t){this.isConnected&&e===this.#e&&(this.status.textContent=t.message)}finally{this.#i=!1,this.isConnected&&e!==this.#e&&this.#o()}}}}var
|
|
11
|
+
img[hidden]{display:none}`;let a=t.createElement("div");a.className="preview";let o=t.createElement("div");o.className="tools",this.download=t.createElement("a"),this.download.textContent="Download PDF",this.status=t.createElement("span"),this.status.className="status",this.status.setAttribute("role","status");let n=t.createElement("div");n.className="pages",this.image=t.createElement("img"),this.image.alt="Typst document preview",this.image.hidden=!0,n.append(this.image),o.append(this.download,this.status),a.append(o,n),e.append(i,a),this.#r()}#r(){this.download.removeAttribute("href"),this.download.setAttribute("aria-disabled","true"),this.download.tabIndex=-1,this.image.hidden=!0,this.image.removeAttribute("src");for(let e of this.#a)this.ownerDocument.defaultView.URL.revokeObjectURL(e);this.#a=[]}connectedCallback(){this.#o()}disconnectedCallback(){++this.#e,clearTimeout(this.#s),this.#t?.release(),this.#t=null,this.#r()}projectAttributes(e){let t=this.parameters?.value,i=f(this,e);return this.download.download=this.parameters.filename,t!==this.parameters.value&&(++this.#e,this.#r(),this.#o()),i}#o(){clearTimeout(this.#s),!(!this.isConnected||!this.parameters)&&(this.status.textContent="Preparing preview\u2026",this.#s=setTimeout(()=>{this.ready=this.#l()},350))}async#l(){if(this.#i)return;let e=this.#e;this.#i=!0;try{this.#n??=u("typst",this.ownerDocument,()=>import("@gramlot/libraries/typst"));let t=await this.#n;if(!this.isConnected||e!==this.#e)return;this.#t??=t.acquireCompiler(),this.status.textContent="Compiling\u2026";let i=await this.#t.compile(this.parameters.value);if(!this.isConnected||e!==this.#e)return;let{URL:a,Blob:o}=this.ownerDocument.defaultView,n=a.createObjectURL(new o([i.svg],{type:"image/svg+xml"})),h=a.createObjectURL(new o([i.pdf],{type:"application/pdf"}));this.#a=[n,h],this.image.src=n,this.image.hidden=!1,this.download.href=h,this.download.setAttribute("aria-disabled","false"),this.download.tabIndex=0,this.status.textContent=i.diagnostics.length?i.diagnostics.join(`
|
|
12
|
+
`):"Preview and PDF are up to date"}catch(t){this.isConnected&&e===this.#e&&(this.status.textContent=t.message)}finally{this.#i=!1,this.isConnected&&e!==this.#e&&this.#o()}}}}var c=(0,r.defineComponent)({name:"typstPreview",tag:"gramlot-typst-preview",base:T,parameters:{value:{dtype:"T",default:"",binding:"read"},filename:{dtype:"T",default:"document.pdf",binding:"read"}},implementation:s=>class extends s{}});var G=d({name:"typst",components:[c]});export{c as TypstPreview,G as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export {default} from "./collection.js";
|
|
2
2
|
export * from "./collection.js";
|
|
3
|
-
export const buildId = "sha256:
|
|
3
|
+
export const buildId = "sha256:9c05d1b4385a181deb6112617bb62fa8d667dfaa95b4317d5a3184f27852617b";
|