@gramlot/gramlot 0.3.9 → 0.3.15

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 (95) hide show
  1. package/dist/components/editors/__init__.py +13 -0
  2. package/dist/components/{editors.js → editors/assets/collection.js} +354 -418
  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} +291 -200
  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 +2525 -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/remote.js +9 -2
  33. package/src/binding/runtime.js +12 -5
  34. package/src/bootstrap.d.ts +1 -1
  35. package/src/bootstrap.js +52 -30
  36. package/src/builder/binding.json +25 -0
  37. package/src/builder/gramlot-builder.js +16 -3
  38. package/src/builder/source.js +41 -4
  39. package/src/collection-artifact.d.ts +11 -0
  40. package/src/collection-artifact.js +57 -0
  41. package/src/commands.d.ts +9 -0
  42. package/src/commands.js +36 -0
  43. package/src/components/bases.js +1 -1
  44. package/src/components/border-container.js +33 -2
  45. package/src/components/buttons.js +84 -161
  46. package/src/components/choice-editor.js +31 -10
  47. package/src/components/database-choices.js +110 -0
  48. package/src/components/inputs.js +15 -2
  49. package/src/components/layout.js +5 -3
  50. package/src/components/menus.js +346 -0
  51. package/src/components/popup.js +15 -2
  52. package/src/components/registry.js +18 -3
  53. package/src/components/toolbar-overflow.js +181 -0
  54. package/src/components/tree.js +14 -4
  55. package/src/components/validation.js +1 -1
  56. package/src/components/windows.js +284 -0
  57. package/src/gramlot.d.ts +2 -0
  58. package/src/gramlot.js +4 -2
  59. package/src/handlers/rpc-handler.d.ts +6 -1
  60. package/src/handlers/rpc-handler.js +7 -2
  61. package/src/handlers/source-handler.d.ts +2 -1
  62. package/src/handlers/source-handler.js +10 -1
  63. package/src/index-page-styles.js +1 -1
  64. package/src/index-theme.js +1 -1
  65. package/src/index.d.ts +5 -0
  66. package/src/index.js +5 -0
  67. package/src/renderer/attributes.js +11 -2
  68. package/src/renderer/gramlot-html-renderer.js +1 -0
  69. package/src/renderer/gramlot-renderer.js +13 -3
  70. package/src/server/assets.js +2 -2
  71. package/src/server/gramlot-file-server.d.ts +2 -0
  72. package/src/server/gramlot-file-server.js +45 -1
  73. package/src/server/gramlot-server.d.ts +20 -2
  74. package/src/server/gramlot-server.js +86 -6
  75. package/src/server/page-base.js +1 -0
  76. package/src/server/page.d.ts +3 -0
  77. package/src/view/button.js +47 -3
  78. package/src/view/controls.js +8 -0
  79. package/src/view/html.js +8 -0
  80. package/src/view/menu-command.js +45 -0
  81. package/src/view/menu.js +87 -0
  82. package/themes/gramlot-compact/README.md +19 -0
  83. package/themes/gramlot-compact/theme.css +138 -45
  84. package/themes/joanna/README.md +19 -0
  85. package/themes/joanna/theme.css +134 -78
  86. package/themes/mela/theme.css +184 -0
  87. package/themes/mimi/README.md +19 -0
  88. package/themes/mimi/theme.css +133 -77
  89. package/themes/palettes/README.md +3 -0
  90. package/themes/palettes/compact.css +86 -0
  91. package/themes/palettes/joanna.css +86 -0
  92. package/themes/palettes/mimi.css +86 -0
  93. package/tools/gramlot-tools-inspector.js +3 -3
  94. package/dist/components/layout.js +0 -1402
  95. package/dist/components/typst.js +0 -4
@@ -0,0 +1,86 @@
1
+ /* Color-only override: load after the chosen appearance profile. */
2
+ @layer gramlot.tokens {
3
+ :root {
4
+ color-scheme: light;
5
+ --gramlot-background: #edf1ef;
6
+ --gramlot-surface: #fbfcfb;
7
+ --gramlot-surface-subtle: #e2e9e5;
8
+ --gramlot-ink: #24332e;
9
+ --gramlot-text-secondary: #52655d;
10
+ --gramlot-border: #c4d0c9;
11
+ --gramlot-border-control: #768a7e;
12
+ --gramlot-action: #176b61;
13
+ --gramlot-action-hover: #105247;
14
+ --gramlot-selected: #dceee8;
15
+ --gramlot-field-background: #fbfcfb;
16
+ --gramlot-field-readonly-background: #e2e9e5;
17
+ --gramlot-label-color: #52655d;
18
+ --gramlot-focus-ring: #176b61;
19
+ --gramlot-brand-blue: #176b61;
20
+ --gramlot-brand-yellow: #176b61;
21
+ --gramlot-navigation: #24332e;
22
+ --gramlot-navigation-text: #f6f8fb;
23
+ --gramlot-error: #aa2637;
24
+ --gramlot-error-background: #fff0f1;
25
+ --gramlot-success: #236747;
26
+ --gramlot-success-background: #e9f4ec;
27
+ --gramlot-warning: #735313;
28
+ --gramlot-warning-background: #fff5da;
29
+ }
30
+ @media (prefers-color-scheme: dark) {
31
+ :root:not([data-theme="light"]) {
32
+ color-scheme: dark;
33
+ --gramlot-background: #17201d;
34
+ --gramlot-surface: #202c27;
35
+ --gramlot-surface-subtle: #2a3932;
36
+ --gramlot-ink: #ebf3ee;
37
+ --gramlot-text-secondary: #b6c9be;
38
+ --gramlot-border: #40594a;
39
+ --gramlot-border-control: #7c9987;
40
+ --gramlot-action: #8ad8c4;
41
+ --gramlot-action-hover: #b0eadc;
42
+ --gramlot-selected: #2d4c40;
43
+ --gramlot-field-background: #202c27;
44
+ --gramlot-field-readonly-background: #2a3932;
45
+ --gramlot-label-color: #b6c9be;
46
+ --gramlot-focus-ring: #8ad8c4;
47
+ --gramlot-brand-blue: #8ad8c4;
48
+ --gramlot-brand-yellow: #8ad8c4;
49
+ --gramlot-navigation: #17201d;
50
+ --gramlot-navigation-text: #f6f8fb;
51
+ --gramlot-error: #ffb4b4;
52
+ --gramlot-error-background: #48292f;
53
+ --gramlot-success: #98dfbd;
54
+ --gramlot-success-background: #243f32;
55
+ --gramlot-warning: #f3d58c;
56
+ --gramlot-warning-background: #413820;
57
+ }
58
+ }
59
+ :root[data-theme="dark"] {
60
+ color-scheme: dark;
61
+ --gramlot-background: #17201d;
62
+ --gramlot-surface: #202c27;
63
+ --gramlot-surface-subtle: #2a3932;
64
+ --gramlot-ink: #ebf3ee;
65
+ --gramlot-text-secondary: #b6c9be;
66
+ --gramlot-border: #40594a;
67
+ --gramlot-border-control: #7c9987;
68
+ --gramlot-action: #8ad8c4;
69
+ --gramlot-action-hover: #b0eadc;
70
+ --gramlot-selected: #2d4c40;
71
+ --gramlot-field-background: #202c27;
72
+ --gramlot-field-readonly-background: #2a3932;
73
+ --gramlot-label-color: #b6c9be;
74
+ --gramlot-focus-ring: #8ad8c4;
75
+ --gramlot-brand-blue: #8ad8c4;
76
+ --gramlot-brand-yellow: #8ad8c4;
77
+ --gramlot-navigation: #17201d;
78
+ --gramlot-navigation-text: #f6f8fb;
79
+ --gramlot-error: #ffb4b4;
80
+ --gramlot-error-background: #48292f;
81
+ --gramlot-success: #98dfbd;
82
+ --gramlot-success-background: #243f32;
83
+ --gramlot-warning: #f3d58c;
84
+ --gramlot-warning-background: #413820;
85
+ }
86
+ }
@@ -1546,7 +1546,7 @@ var GramlotToolsInspector = class extends HTMLElement {
1546
1546
  const footer = palette.footer({ class: "path", hidden: "^stylesActive" });
1547
1547
  footer.span("Path: ");
1548
1548
  footer.em("^path");
1549
- const breakpoint = palette.dialog({ node_label: "breakpoint", "aria-label": "Breakpoint", class: "breakpoint-dialog", connect_oncancel: "inspector.closeBreakpoint" });
1549
+ const breakpoint = palette.html_dialog({ node_label: "breakpoint", "aria-label": "Breakpoint", class: "breakpoint-dialog", connect_oncancel: "inspector.closeBreakpoint" });
1550
1550
  breakpoint.h2("^breakpointWhere");
1551
1551
  const mode = breakpoint.select({ value: "^editor.mode", connect_onchange: "inspector.breakpointChanged", "aria-label": "Breakpoint mode" });
1552
1552
  for (const [value, label] of [["", "Off"], ["debugger", "Debugger"], ["console", "Console"]]) mode.option(label, { value });
@@ -1555,11 +1555,11 @@ var GramlotToolsInspector = class extends HTMLElement {
1555
1555
  const actions = breakpoint.div({ class: "dialog-actions" });
1556
1556
  actions.html_button("Cancel", { type: "button", connect_onclick: "inspector.closeBreakpoint" });
1557
1557
  actions.html_button("Save", { type: "button", connect_onclick: "inspector.setBreakpoint" });
1558
- const list = palette.dialog({ node_label: "breakpoints", "aria-label": "Active breakpoints", class: "breakpoint-dialog" });
1558
+ const list = palette.html_dialog({ node_label: "breakpoints", "aria-label": "Active breakpoints", class: "breakpoint-dialog" });
1559
1559
  list.h2("Active breakpoints");
1560
1560
  list.div({ node_label: "entries" });
1561
1561
  list.div({ class: "dialog-actions" }).html_button("Close", { type: "button", connect_onclick: "inspector.closeBreakpoints" });
1562
- const insert = palette.dialog({ node_label: "insert", "aria-label": "Add Source element", class: "breakpoint-dialog", connect_oncancel: "inspector.closeInsert" });
1562
+ const insert = palette.html_dialog({ node_label: "insert", "aria-label": "Add Source element", class: "breakpoint-dialog", connect_oncancel: "inspector.closeInsert" });
1563
1563
  insert.h2("Add a child element");
1564
1564
  const kind = insert.select({ value: "^insert.kind", "aria-label": "Element kind", connect_onchange: "inspector.insertKind" });
1565
1565
  kind.option("HTML tag", { value: "html" });