@gramlot/gramlot 0.3.7 → 0.3.8

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/src/view/html.js CHANGED
@@ -36,8 +36,9 @@ function domPropertyName(name) {
36
36
  * names and style arrive adapted by the renderers (GramlotHtmlRenderer, GramlotSvgRenderer).
37
37
  */
38
38
  export class HtmlElement {
39
- constructor({metadataAttributes = [], invokeScript = null} = {}) {
39
+ constructor({metadataAttributes = [], invokeScript = null, callLogic = null} = {}) {
40
40
  this.invokeScript = invokeScript;
41
+ this.callLogic = callLogic;
41
42
  this.metadataAttributes = new Set([...META_ATTRS, '_text', ...metadataAttributes]);
42
43
  }
43
44
 
@@ -95,6 +96,7 @@ export class HtmlElement {
95
96
  element.setSourceContext({
96
97
  publish: (topic, payload) => node.publish(topic, payload),
97
98
  writeParameter: (name, value) => this.writeParameter(node, name, value),
99
+ callLogic: (name, keywords) => this.callLogic(node, name, keywords),
98
100
  });
99
101
  }
100
102
  const text = document.createTextNode(this.text(node));
@@ -159,6 +161,9 @@ export class HtmlElement {
159
161
  });
160
162
  }
161
163
  if (this.definition(node).meta.gramlot_component) {
164
+ if (this.definition(node).meta.gramlot_component.bagStore) {
165
+ element.setStoreBag(node.getRelativeData(node.getAttr('storepath')));
166
+ }
162
167
  attrs = element.projectAttributes(attrs, adapt);
163
168
  }
164
169
  attrs = Object.fromEntries(sourceAttributeItems({...attrs, ...renderAttributes}));
@@ -674,13 +674,13 @@ var InspectorConnection = class {
674
674
  };
675
675
 
676
676
  // ../tools/gramlot-tools-inspector/src/gramlot-tools-inspector.css
677
- var gramlot_tools_inspector_default = ":host { all: initial; color-scheme: light; font: 12px/1.4 system-ui, sans-serif; color: #38414b; }\n* { box-sizing: border-box; }\nbutton, input, select { font: inherit; color: inherit; }\nbutton { cursor: pointer; }\nbutton:focus-visible, input:focus-visible, select:focus-visible { outline: 1px solid #3574cb; outline-offset: -1px; }\n.tree { padding: 7px 3px; }\n.properties { background: white; }\n.properties-heading { font-size: 11px; display: flex; align-items: center; justify-content: space-between; height: 29px; padding: 0 8px; background: #f1f3f5; color: #6d7989; border-bottom: 1px solid #d1d7df; }\n.properties-heading button { background: white; border: 1px solid #c5cdda; border-radius: 2px; width: 23px; height: 23px; padding: 0; font-size: 18px; line-height: 20px; }\nfieldset { border: 0; margin: 0; padding: 0; min-width: 0; }\n.property-row { display: grid; grid-template-columns: minmax(95px, 30%) minmax(0, 1fr); min-height: 20px; border-bottom: 1px solid #d1d7df; font-size: 11px; }\n.property-name { display: flex; align-items: center; justify-content: flex-end; background: #888; color: white; font-weight: 700; padding: 1px 6px; border-right: 1px solid #d1d7df; overflow-wrap: anywhere; text-align: right; }\n.property-value { display: flex; align-items: center; min-width: 0; }\n.property-row input { border: 0; border-radius: 0; min-width: 0; width: 100%; height: 19px; padding: 1px 5px; background: transparent; }\n.property-name input { color: white; text-align: right; padding: 0; }\n.property-value input { flex: 1; }\n.property-value input[type=checkbox] { flex: none; width: 14px; height: 14px; margin: 2px 6px; }\n.property-value select { max-width: 82px; height: 20px; padding: 0; border: 0; border-left: 1px solid #d1d7df; background: #f1f3f5; font-size: 10px; }\n.remove { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; flex: none; width: 22px; height: 20px; padding: 3px; border: 0; background: transparent; color: #7c8797; opacity: 0; }\n.remove svg { width: 13px; height: 13px; }\n.property-row:hover .remove, .property-row:focus-within .remove { opacity: 1; }\n.remove:hover { color: #b82323; background: #fbe9e9; }\n:disabled { cursor: default; opacity: .65; }\n.path { flex: none; padding: 5px 9px; border-top: 1px solid #c9cfd6; background: #f5f7f9; color: #697687; font-size: 11px; min-height: 27px; overflow-wrap: anywhere; }\n.error, .edit-status, .breakpoint-status, .breakpoint-line { font-size: 11px; margin: 0; padding: 3px 8px; overflow-wrap: anywhere; }\n.error, .edit-status, .breakpoint-status { color: #a12121; }\n.breakpoint-line { background: #fff2ed; color: #854127; border-bottom: 1px solid #d1d7df; }\n.error:empty, .edit-status:empty, .breakpoint-status:empty, .breakpoint-line:empty { display: none; }\n.breakpoint-dialog { width: min(340px, 90vw); color: #38414b; border: 1px solid #bbc3cf; border-radius: 4px; padding: 12px; box-shadow: 0 8px 28px #0003; font: 12px/1.4 system-ui, sans-serif; }\n.breakpoint-dialog::backdrop { background: #0002; }\n.breakpoint-dialog h2 { font-size: 13px; margin: 0 0 10px; overflow-wrap: anywhere; }\n.breakpoint-dialog select, .breakpoint-dialog input { width: 100%; border: 1px solid #bbc3cf; padding: 4px; margin: 0 0 7px; background: white; }\n.dialog-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 7px; }\n.dialog-actions button { padding: 3px 10px; border: 1px solid #bbc3cf; border-radius: 3px; background: #f1f3f5; }\n.heading-label { flex: 1; }\n.properties-heading .breakpoint-count { width: auto; padding: 0 5px; margin-right: 5px; font-size: 11px; color: #b04a35; }\n.breakpoint-entry { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid #d1d7df; }\n.breakpoint-entry span { flex: 1; overflow-wrap: anywhere; }\n.breakpoint-entry button { background: transparent; border: 0; font-size: 17px; }\n[hidden] { display: none !important; }\n.targetbar { flex: none; height: 28px; padding: 2px 6px; background: #edf2fa; border-bottom: 1px solid #dadce0; }\n.targetbar select { width: 100%; height: 23px; border: 0; background: transparent; font-size: 11px; }\n.styles-panel { flex: 1; min-height: 0; overflow: auto; background: #fff; font-size: 11px; }\n.styles-toolbar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; background: #f1f3f5; border-bottom: 1px solid #d1d7df; }\n.styles-toolbar span { flex: 1; font-weight: 600; }\n.styles-toolbar button, .styles-toolbar a { padding: 3px 7px; border: 1px solid #c5cdda; border-radius: 3px; background: white; }\n.styles-toolbar a { color: inherit; text-decoration: none; }\n.styles-toolbar a[aria-disabled=true] { cursor: default; opacity: .65; }\n.styles-toolbar a:focus-visible { outline: 1px solid #3574cb; outline-offset: -1px; }\n.styles-help, .styles-empty, .styles-status { margin: 0; padding: 7px 9px; color: #697687; }\n.styles-status { color: #a12121; }\n.styles-status:empty { display: none; }\n.styles-group h3 { margin: 0; padding: 6px 9px; font-size: 11px; background: #edf2fa; border-block: 1px solid #d1d7df; }\n.style-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 25px 23px; align-items: center; gap: 8px; min-width: 0; padding: 3px 9px; border-bottom: 1px solid #e8ebef; }\n.style-row label { min-width: 0; font: 11px/1.4 ui-monospace, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.style-row input { min-width: 0; width: 100%; height: 23px; padding: 2px 5px; border: 1px solid #c5cdda; border-radius: 3px; background: white; }\n.style-row input[type=color] { width: 25px; padding: 1px; cursor: pointer; }\n.style-row button { grid-column: 4; width: 23px; height: 23px; padding: 0; border: 1px solid #c5cdda; border-radius: 3px; background: #f5f7f9; font-size: 15px; }\n\n:host([embedded]) { display: block; height: 100%; min-height: 0; }\n:host([embedded]) > div { height: 100%; }\n.embedded-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }\n\n.property-value select.enum-value { flex: 1; min-width: 0; max-width: none; width: 100%; border: 0; background: white; font: inherit; padding: 1px 5px; }\n\n/* Presentation changes preserve the inspector runtime and selection. */\n:host([hidden]) { display: none; }\n:host([docked]) { display: block; height: 100%; min-height: 0; }\n:host([docked][hidden]) { display: none; }\n:host([docked]) > div { height: 100%; }\n:host([docked]) .targetbar select { min-height: 40px; font-size: 16px; }\n:host([docked]) .property-row { min-height: 36px; font-size: 13px; }\n:host([docked]) .property-row input { min-height: 35px; font-size: 16px; }\n:host([docked]) .remove { opacity: 1; min-height: 35px; width: 32px; }\n\n:host([docked]) { --tree-action-size: 28px; --tree-font-size: 14px; --tree-row-height: 40px; --separator-size: 14px; }\n:host([docked]) .targetbar { height: 44px; }\n:host([docked]) gramlot-poc-tabs > button { height: 44px; font-size: 14px; }\n:host([docked]) .properties-heading { height: 40px; font-size: 13px; }\n:host([docked]) .properties-heading button { width: 36px; height: 36px; }\n:host([docked]) .property-value select { height: 35px; font-size: 14px; }\n\n.history-toolbar { flex:none; display:flex; align-items:center; gap:6px; padding:4px 8px; border-bottom:1px solid #d1d7df; background:#f6f8fb; font:11px/1.4 system-ui,sans-serif; }\n.history-toolbar button { flex:none; padding:3px 6px; border:1px solid #c5cdda; border-radius:3px; background:white; cursor:pointer; }\n.history-toolbar button:disabled { opacity:.45; cursor:default; }\n.history-toolbar span { min-width:0; color:#a12121; overflow-wrap:anywhere; }\n";
677
+ var gramlot_tools_inspector_default = ":host { all: initial; background: var(--gramlot-surface, white); color-scheme: inherit; font: 12px/1.4 system-ui, sans-serif; color: var(--gramlot-ink, #38414b); }\n* { box-sizing: border-box; }\nbutton, input, select { font: inherit; color: inherit; }\nbutton { cursor: pointer; }\nbutton:focus-visible, input:focus-visible, select:focus-visible { outline: 1px solid var(--gramlot-focus-ring, #3574cb); outline-offset: -1px; }\n.tree { padding: 7px 3px; }\n.properties { background: var(--gramlot-surface, white); }\n.properties-heading { font-size: 11px; display: flex; align-items: center; justify-content: space-between; height: 29px; padding: 0 8px; background: var(--gramlot-surface-subtle, #f1f3f5); color: var(--gramlot-text-secondary, #6d7989); border-bottom: 1px solid var(--gramlot-border, #d1d7df); }\n.properties-heading button { background: var(--gramlot-surface, white); border: 1px solid var(--gramlot-border-control, #c5cdda); border-radius: 2px; width: 23px; height: 23px; padding: 0; font-size: 18px; line-height: 20px; }\nfieldset { border: 0; margin: 0; padding: 0; min-width: 0; }\n.property-row { display: grid; grid-template-columns: minmax(95px, 30%) minmax(0, 1fr); min-height: 20px; border-bottom: 1px solid var(--gramlot-border, #d1d7df); font-size: 11px; }\n.property-name { display: flex; align-items: center; justify-content: flex-end; background: var(--gramlot-surface-subtle, #f1f3f5); color: var(--gramlot-ink, #38414b); font-weight: 700; padding: 1px 6px; border-right: 1px solid var(--gramlot-border, #d1d7df); overflow-wrap: anywhere; text-align: right; }\n.property-value { display: flex; align-items: center; min-width: 0; }\n.property-row input { border: 0; border-radius: 0; min-width: 0; width: 100%; height: 19px; padding: 1px 5px; background: transparent; }\n.property-name input { color: var(--gramlot-ink, #38414b); text-align: right; padding: 0; }\n.property-value input { flex: 1; }\n.property-value input[type=checkbox] { flex: none; width: 14px; height: 14px; margin: 2px 6px; }\n.property-value select { max-width: 82px; height: 20px; padding: 0; border: 0; border-left: 1px solid var(--gramlot-border, #d1d7df); background: var(--gramlot-surface-subtle, #f1f3f5); font-size: 10px; }\n.remove { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; flex: none; width: 22px; height: 20px; padding: 3px; border: 0; background: transparent; color: var(--gramlot-text-secondary, #7c8797); opacity: 0; }\n.remove svg { width: 13px; height: 13px; }\n.property-row:hover .remove, .property-row:focus-within .remove { opacity: 1; }\n.remove:hover { color: var(--gramlot-error, #b82323); background: var(--gramlot-error-background, #fbe9e9); }\n:disabled { cursor: default; opacity: .65; }\n.path { flex: none; padding: 5px 9px; border-top: 1px solid var(--gramlot-border, #c9cfd6); background: var(--gramlot-surface-subtle, #f5f7f9); color: var(--gramlot-text-secondary, #697687); font-size: 11px; min-height: 27px; overflow-wrap: anywhere; }\n.error, .edit-status, .breakpoint-status, .breakpoint-line { font-size: 11px; margin: 0; padding: 3px 8px; overflow-wrap: anywhere; }\n.error, .edit-status, .breakpoint-status { color: var(--gramlot-error, #a12121); }\n.breakpoint-line { background: var(--gramlot-warning-background, #fff2ed); color: var(--gramlot-warning, #854127); border-bottom: 1px solid var(--gramlot-border, #d1d7df); }\n.error:empty, .edit-status:empty, .breakpoint-status:empty, .breakpoint-line:empty { display: none; }\n.breakpoint-dialog { background: var(--gramlot-surface, white); width: min(340px, 90vw); color: var(--gramlot-ink, #38414b); border: 1px solid var(--gramlot-border-control, #bbc3cf); border-radius: 4px; padding: 12px; box-shadow: 0 8px 28px #0003; font: 12px/1.4 system-ui, sans-serif; }\n.breakpoint-dialog::backdrop { background: #0002; }\n.breakpoint-dialog h2 { font-size: 13px; margin: 0 0 10px; overflow-wrap: anywhere; }\n.breakpoint-dialog select, .breakpoint-dialog input { width: 100%; border: 1px solid var(--gramlot-border-control, #bbc3cf); padding: 4px; margin: 0 0 7px; background: var(--gramlot-surface, white); }\n.dialog-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 7px; }\n.dialog-actions button { padding: 3px 10px; border: 1px solid var(--gramlot-border-control, #bbc3cf); border-radius: 3px; background: var(--gramlot-surface-subtle, #f1f3f5); }\n.heading-label { flex: 1; }\n.properties-heading .breakpoint-count { width: auto; padding: 0 5px; margin-right: 5px; font-size: 11px; color: var(--gramlot-error, #b04a35); }\n.breakpoint-entry { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--gramlot-border, #d1d7df); }\n.breakpoint-entry span { flex: 1; overflow-wrap: anywhere; }\n.breakpoint-entry button { background: transparent; border: 0; font-size: 17px; }\n[hidden] { display: none !important; }\n.targetbar { flex: none; height: 28px; padding: 2px 6px; background: var(--gramlot-surface-subtle, #edf2fa); border-bottom: 1px solid var(--gramlot-border, #dadce0); }\n.targetbar select { width: 100%; height: 23px; border: 0; background: transparent; font-size: 11px; }\n.styles-panel { flex: 1; min-height: 0; overflow: auto; background: var(--gramlot-surface, #fff); font-size: 11px; }\n.styles-toolbar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; background: var(--gramlot-surface-subtle, #f1f3f5); border-bottom: 1px solid var(--gramlot-border, #d1d7df); }\n.styles-toolbar span { flex: 1; font-weight: 600; }\n.styles-toolbar button, .styles-toolbar a { padding: 3px 7px; border: 1px solid var(--gramlot-border-control, #c5cdda); border-radius: 3px; background: var(--gramlot-surface, white); }\n.styles-toolbar a { color: inherit; text-decoration: none; }\n.styles-toolbar a[aria-disabled=true] { cursor: default; opacity: .65; }\n.styles-toolbar a:focus-visible { outline: 1px solid var(--gramlot-focus-ring, #3574cb); outline-offset: -1px; }\n.styles-help, .styles-empty, .styles-status { margin: 0; padding: 7px 9px; color: var(--gramlot-text-secondary, #697687); }\n.styles-status { color: var(--gramlot-error, #a12121); }\n.styles-status:empty { display: none; }\n.styles-group h3 { margin: 0; padding: 6px 9px; font-size: 11px; background: var(--gramlot-surface-subtle, #edf2fa); border-block: 1px solid var(--gramlot-border, #d1d7df); }\n.style-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 25px 23px; align-items: center; gap: 8px; min-width: 0; padding: 3px 9px; border-bottom: 1px solid var(--gramlot-border, #e8ebef); }\n.style-row label { min-width: 0; font: 11px/1.4 ui-monospace, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.style-row input { min-width: 0; width: 100%; height: 23px; padding: 2px 5px; border: 1px solid var(--gramlot-border-control, #c5cdda); border-radius: 3px; background: var(--gramlot-surface, white); }\n.style-row input[type=color] { width: 25px; padding: 1px; cursor: pointer; }\n.style-row button { grid-column: 4; width: 23px; height: 23px; padding: 0; border: 1px solid var(--gramlot-border-control, #c5cdda); border-radius: 3px; background: var(--gramlot-surface-subtle, #f5f7f9); font-size: 15px; }\n\n:host([embedded]) { display: block; height: 100%; min-height: 0; }\n:host([embedded]) > div { height: 100%; }\n.embedded-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; }\n\n.property-value select.enum-value { flex: 1; min-width: 0; max-width: none; width: 100%; border: 0; background: var(--gramlot-surface, white); font: inherit; padding: 1px 5px; }\n\n/* Presentation changes preserve the inspector runtime and selection. */\n:host([hidden]) { display: none; }\n:host([docked]) { display: block; height: 100%; min-height: 0; }\n:host([docked][hidden]) { display: none; }\n:host([docked]) > div { height: 100%; }\n:host([docked]) .targetbar select { min-height: 40px; font-size: 16px; }\n:host([docked]) .property-row { min-height: 36px; font-size: 13px; }\n:host([docked]) .property-row input { min-height: 35px; font-size: 16px; }\n:host([docked]) .remove { opacity: 1; min-height: 35px; width: 32px; }\n\n:host([docked]) { --tree-action-size: 28px; --tree-font-size: 14px; --tree-row-height: 40px; --separator-size: 14px; }\n:host([docked]) .targetbar { height: 44px; }\n:host([docked]) gramlot-poc-tabs > button { height: 44px; font-size: 14px; }\n:host([docked]) .properties-heading { height: 40px; font-size: 13px; }\n:host([docked]) .properties-heading button { width: 36px; height: 36px; }\n:host([docked]) .property-value select { height: 35px; font-size: 14px; }\n\n.history-toolbar { flex:none; display:flex; align-items:center; gap:6px; padding:4px 8px; border-bottom:1px solid var(--gramlot-border, #d1d7df); background:var(--gramlot-surface-subtle, #f6f8fb); font:11px/1.4 system-ui,sans-serif; }\n.history-toolbar button { flex:none; padding:3px 6px; border:1px solid var(--gramlot-border-control, #c5cdda); border-radius:3px; background:var(--gramlot-surface, white); cursor:pointer; }\n.history-toolbar button:disabled { opacity:.45; cursor:default; }\n.history-toolbar span { min-width:0; color:var(--gramlot-error, #a12121); overflow-wrap:anywhere; }\n";
678
678
 
679
679
  // ../tools/poc/gramlot-poc-tree.js
680
680
  import { Bag as Bag2 } from "@gramlot/gramlot";
681
681
 
682
682
  // ../tools/poc/gramlot-poc-tree.css
683
- var gramlot_poc_tree_default = "/* Copyright 2025-2026 Softwell S.r.l. - SPDX-License-Identifier: Apache-2.0\n * Inspector subset of the DevTools storeTree stylesheet and inspector.css variables. */\n:host { display:block; font:var(--tree-font-size,11px)/var(--tree-row-height,18px) -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color:#38414b; }\n:host([hidden]) { display:none; }\nul { list-style:none; margin:0; padding-left:17px; }\n.tree-root { padding-left:calc(var(--tree-action-size,14px) + 2px); }\n.tree-root > ul { padding-left:2px; }\nsummary, .leaf { position:relative; }\nli { line-height:var(--tree-row-height,18px); }\nsummary { display:flex; align-items:center; gap:7px; padding:0 5px; cursor:pointer; user-select:none; list-style:none; }\nsummary::-webkit-details-marker { display:none; }\nsummary::before { content:''; width:5px; height:5px; border-right:1.5px solid #78818a; border-bottom:1.5px solid #78818a; transform:rotate(-45deg); flex:none; margin:0 3px; }\ndetails[open] > summary::before { transform:rotate(45deg); }\n.leaf { display:flex; align-items:center; gap:7px; padding:0 5px 0 23px; cursor:pointer; }\nsummary:hover,.leaf:hover { background:#f0f3f6; }\n.selected,.selected:hover { background:transparent; color:#315dbd; font-weight:700; border-radius:2px; }\n.caption { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n/* Reserve a left gutter; showing an action must not shift the node label. */\n.actions { position:absolute; left:calc(-1 * var(--tree-action-size,14px)); top:0; display:inline-flex; opacity:0; pointer-events:none; }\nsummary:hover > .actions,.leaf:hover > .actions,summary:focus-visible > .actions,.leaf:focus-visible > .actions,\n.actions:has(button:focus-visible),.actions:has(button.active) { opacity:1; pointer-events:auto; }\n.actions button { border:0; background:transparent; color:#80868b; font:inherit; font-size:11px; line-height:var(--tree-row-height,18px); width:var(--tree-action-size,14px); height:var(--tree-row-height,18px); padding:0; cursor:pointer; border-radius:3px; }\n.actions button:hover { background:#e1e5ed; }\n.actions button[data-action=breakpoint] { font-size:0; }\n.actions button[data-action=breakpoint]::before { content:''; display:inline-block; box-sizing:border-box; width:8px; height:8px; border:1.5px solid currentColor; border-radius:50%; vertical-align:middle; }\n.actions button.active { color:#b3261e; }\n.actions button.active.conditional { color:#f9ab00; }\n.actions button.active[data-action=breakpoint]::before { background:currentColor; }\n.actions button:focus-visible,summary:focus-visible,.leaf:focus-visible { outline:2px solid #356f9f; outline-offset:-2px; }\n\n@media (hover: none) { .actions { opacity:1; pointer-events:auto; } }\n\n.actions-end { position:static; margin-left:auto; flex:none; }\n[data-drop=inside] { outline:2px solid #356f9f; outline-offset:-2px; background:#e7f0fc; }\n[data-drop=before] { box-shadow:inset 0 2px #356f9f; }\n[data-drop=after] { box-shadow:inset 0 -2px #356f9f; }\n";
683
+ var gramlot_poc_tree_default = "/* Copyright 2025-2026 Softwell S.r.l. - SPDX-License-Identifier: Apache-2.0\n * Inspector subset of the DevTools storeTree stylesheet and inspector.css variables. */\n:host { display:block; font:var(--tree-font-size,11px)/var(--tree-row-height,18px) -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color:var(--gramlot-ink, #38414b); }\n:host([hidden]) { display:none; }\nul { list-style:none; margin:0; padding-left:17px; }\n.tree-root { padding-left:calc(var(--tree-action-size,14px) + 2px); }\n.tree-root > ul { padding-left:2px; }\nsummary, .leaf { position:relative; }\nli { line-height:var(--tree-row-height,18px); }\nsummary { display:flex; align-items:center; gap:7px; padding:0 5px; cursor:pointer; user-select:none; list-style:none; }\nsummary::-webkit-details-marker { display:none; }\nsummary::before { content:''; width:5px; height:5px; border-right:1.5px solid var(--gramlot-text-secondary, #78818a); border-bottom:1.5px solid var(--gramlot-text-secondary, #78818a); transform:rotate(-45deg); flex:none; margin:0 3px; }\ndetails[open] > summary::before { transform:rotate(45deg); }\n.leaf { display:flex; align-items:center; gap:7px; padding:0 5px 0 23px; cursor:pointer; }\nsummary:hover,.leaf:hover { background:var(--gramlot-surface-subtle, #f0f3f6); }\n.selected,.selected:hover { background:transparent; color:var(--gramlot-action, #315dbd); font-weight:700; border-radius:2px; }\n.caption { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n/* Reserve a left gutter; showing an action must not shift the node label. */\n.actions { position:absolute; left:calc(-1 * var(--tree-action-size,14px)); top:0; display:inline-flex; opacity:0; pointer-events:none; }\nsummary:hover > .actions,.leaf:hover > .actions,summary:focus-visible > .actions,.leaf:focus-visible > .actions,\n.actions:has(button:focus-visible),.actions:has(button.active) { opacity:1; pointer-events:auto; }\n.actions button { border:0; background:transparent; color:var(--gramlot-text-secondary, #80868b); font:inherit; font-size:11px; line-height:var(--tree-row-height,18px); width:var(--tree-action-size,14px); height:var(--tree-row-height,18px); padding:0; cursor:pointer; border-radius:3px; }\n.actions button:hover { background:var(--gramlot-selected, #e1e5ed); }\n.actions button[data-action=breakpoint] { font-size:0; }\n.actions button[data-action=breakpoint]::before { content:''; display:inline-block; box-sizing:border-box; width:8px; height:8px; border:1.5px solid currentColor; border-radius:50%; vertical-align:middle; }\n.actions button.active { color:var(--gramlot-error, #b3261e); }\n.actions button.active.conditional { color:var(--gramlot-warning, #f9ab00); }\n.actions button.active[data-action=breakpoint]::before { background:currentColor; }\n.actions button:focus-visible,summary:focus-visible,.leaf:focus-visible { outline:2px solid var(--gramlot-focus-ring, #356f9f); outline-offset:-2px; }\n\n@media (hover: none) { .actions { opacity:1; pointer-events:auto; } }\n\n.actions-end { position:static; margin-left:auto; flex:none; }\n[data-drop=inside] { outline:2px solid var(--gramlot-focus-ring, #356f9f); outline-offset:-2px; background:var(--gramlot-selected, #e7f0fc); }\n[data-drop=before] { box-shadow:inset 0 2px var(--gramlot-focus-ring, #356f9f); }\n[data-drop=after] { box-shadow:inset 0 -2px var(--gramlot-focus-ring, #356f9f); }\n";
684
684
 
685
685
  // ../tools/poc/gramlot-poc-tree.js
686
686
  var sequence = 0;
@@ -933,8 +933,8 @@ var GramlotPocPalette = class extends HTMLElement {
933
933
  constructor() {
934
934
  super();
935
935
  this.attachShadow({ mode: "open" }).innerHTML = `<style>
936
- :host{box-sizing:border-box;position:fixed;z-index:2147483647;left:16px;top:16px;width:480px;height:620px;min-width:min(280px,100vw);min-height:200px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);display:block;font:11px/1.45 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:white;color:#38414b;border:1px solid #b9bec5;border-radius:4px;box-shadow:0 6px 22px #20283026;overflow:hidden}
937
- *{box-sizing:border-box}.frame{height:100%;display:flex;flex-direction:column}.bar{display:flex;align-items:center;height:25px;min-height:25px;padding:0 4px;border-bottom:1px solid #d8d8dc;background:#eceef1;cursor:move;touch-action:none;user-select:none}.title{flex:1;min-width:0;text-align:left;padding-left:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:600}.body{flex:1;min-height:0;display:flex;flex-direction:column}.resize{position:absolute;right:2px;bottom:2px;width:14px;height:14px;cursor:nwse-resize;touch-action:none;background:repeating-linear-gradient(135deg,transparent 0 3px,#aab0b8 3px 4px,transparent 4px 6px);clip-path:polygon(100% 0,100% 100%,0 100%)}button{font:inherit;color:#69727c;background:transparent;border:0;cursor:pointer}.close,.collapse{width:22px;flex:none;height:22px;font-size:18px;line-height:18px;padding:0}.close:hover,.collapse:hover{background:#dce1e7}.bar:focus-visible,button:focus-visible{outline:2px solid #356f9f;outline-offset:-2px}.resize:focus-visible{clip-path:none}::slotted(*){min-height:0}
936
+ :host{box-sizing:border-box;position:fixed;z-index:2147483647;left:16px;top:16px;width:480px;height:620px;min-width:min(280px,100vw);min-height:200px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);display:block;font:11px/1.45 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--gramlot-surface, white);color:var(--gramlot-ink, #38414b);border:1px solid var(--gramlot-border, #b9bec5);border-radius:4px;box-shadow:0 6px 22px #20283026;overflow:hidden}
937
+ *{box-sizing:border-box}.frame{height:100%;display:flex;flex-direction:column}.bar{display:flex;align-items:center;height:25px;min-height:25px;padding:0 4px;border-bottom:1px solid var(--gramlot-border, #d8d8dc);background:var(--gramlot-surface-subtle, #eceef1);cursor:move;touch-action:none;user-select:none}.title{flex:1;min-width:0;text-align:left;padding-left:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:600}.body{flex:1;min-height:0;display:flex;flex-direction:column}.resize{position:absolute;right:2px;bottom:2px;width:14px;height:14px;cursor:nwse-resize;touch-action:none;background:repeating-linear-gradient(135deg,transparent 0 3px,var(--gramlot-border-control, #aab0b8) 3px 4px,transparent 4px 6px);clip-path:polygon(100% 0,100% 100%,0 100%)}button{font:inherit;color:var(--gramlot-text-secondary, #69727c);background:transparent;border:0;cursor:pointer}.close,.collapse{width:22px;flex:none;height:22px;font-size:18px;line-height:18px;padding:0}.close:hover,.collapse:hover{background:var(--gramlot-selected, #dce1e7)}.bar:focus-visible,button:focus-visible{outline:2px solid var(--gramlot-focus-ring, #356f9f);outline-offset:-2px}.resize:focus-visible{clip-path:none}::slotted(*){min-height:0}
938
938
  :host([docked]){position:relative!important;inset:0!important;width:100%!important;height:100%!important;min-width:0;min-height:0;max-width:none;max-height:none;border:0;border-radius:0;box-shadow:none}
939
939
  :host([docked]) .bar,:host([docked]) .resize{display:none}
940
940
  :host([docked][collapsed]) .body{display:flex}
@@ -1020,9 +1020,9 @@ var GramlotPocTabs = class extends HTMLElement {
1020
1020
  constructor() {
1021
1021
  super();
1022
1022
  this.attachShadow({ mode: "open" }).innerHTML = `<style>
1023
- :host{display:flex;flex:none;background:#edf2fa;border-bottom:1px solid #d3e3fd}
1024
- ::slotted(button){height:25px;padding:0 10px;border:0;border-radius:0;border-bottom:2px solid transparent;background:transparent;color:#474747;font:500 11px/23px system-ui,sans-serif;cursor:pointer}
1025
- ::slotted(button:hover){background:#e1e5ed}::slotted(button[aria-selected=true]){color:#0b57d0;border-bottom-color:#0b57d0}::slotted(button:focus-visible){outline:2px solid #0b57d0;outline-offset:-2px}
1023
+ :host{display:flex;flex:none;background:var(--gramlot-surface-subtle, #edf2fa);border-bottom:1px solid var(--gramlot-border, #d3e3fd)}
1024
+ ::slotted(button){height:25px;padding:0 10px;border:0;border-radius:0;border-bottom:2px solid transparent;background:transparent;color:var(--gramlot-ink, #474747);font:500 11px/23px system-ui,sans-serif;cursor:pointer}
1025
+ ::slotted(button:hover){background:var(--gramlot-selected, #e1e5ed)}::slotted(button[aria-selected=true]){color:var(--gramlot-action, #0b57d0);border-bottom-color:var(--gramlot-action, #0b57d0)}::slotted(button:focus-visible){outline:2px solid var(--gramlot-action, #0b57d0);outline-offset:-2px}
1026
1026
  </style><slot></slot>`;
1027
1027
  this.addEventListener("keydown", (event) => {
1028
1028
  if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
@@ -1044,7 +1044,7 @@ var GramlotPocSplitter = class extends HTMLElement {
1044
1044
  super();
1045
1045
  this.attachShadow({ mode: "open" }).innerHTML = `<style>
1046
1046
  :host{display:grid;grid-template-rows:minmax(60px,var(--top-size,45%)) var(--separator-size,6px) minmax(60px,1fr);min-height:126px;flex:1;overflow:hidden}
1047
- .region{overflow:auto;min-height:0;min-width:0}.handle{position:relative;background:#e4e7eb;cursor:row-resize;touch-action:none;user-select:none}.handle:after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:1px;width:28px;background:#c2c9d3}.handle:hover{background:#c4d9ef}.handle:focus-visible{outline:2px solid #356f9f;outline-offset:-2px}::slotted(*){min-height:0}
1047
+ .region{overflow:auto;min-height:0;min-width:0}.handle{position:relative;background:var(--gramlot-surface-subtle, #e4e7eb);cursor:row-resize;touch-action:none;user-select:none}.handle:after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);height:1px;width:28px;background:var(--gramlot-border, #c2c9d3)}.handle:hover{background:var(--gramlot-selected, #c4d9ef)}.handle:focus-visible{outline:2px solid var(--gramlot-focus-ring, #356f9f);outline-offset:-2px}::slotted(*){min-height:0}
1048
1048
  </style><div class="region"><slot name="top"></slot></div><div class="handle" role="separator" aria-label="Resize tree and properties" aria-orientation="horizontal" tabindex="0" aria-valuemin="10" aria-valuemax="90" aria-valuenow="45"></div><div class="region"><slot name="bottom"></slot></div>`;
1049
1049
  const handle = this.shadowRoot.querySelector(".handle");
1050
1050
  handle.addEventListener("pointerdown", (event) => {
@@ -1230,6 +1230,12 @@ var GramlotToolsInspector = class extends HTMLElement {
1230
1230
  this.editChanged(node);
1231
1231
  inspector.#applyEdit();
1232
1232
  }
1233
+ booleanChanged(node) {
1234
+ const row = ui.data.getItem(`editor.rows.${node.getAttr("data-row")}`);
1235
+ if (row.getItem("type") !== "boolean") return;
1236
+ this.editChanged(node);
1237
+ inspector.#applyEdit();
1238
+ }
1233
1239
  typeChanged(node) {
1234
1240
  const row = ui.data.getItem(`editor.rows.${node.getAttr("data-row")}`);
1235
1241
  row.setItem("inputType", inspector.#inputType(row.getItem("type")));
@@ -1926,8 +1932,9 @@ ${declarations}
1926
1932
  disabled: locked,
1927
1933
  "aria-label": primary ? "Value" : `${name || "New attribute"} value`,
1928
1934
  "data-row": row.label,
1929
- title: data.getItem("isNull") ? "Null value. Backspace on an empty cell sets null." : "Enter to save; Escape to revert; Backspace on an empty cell sets null.",
1935
+ title: data.getItem("isNull") ? "Null value. Backspace on an empty cell sets null." : "Checkboxes save immediately; Enter saves other values; Escape reloads; Backspace on an empty cell sets null.",
1930
1936
  connect_oninput: "inspector.editChanged",
1937
+ connect_onchange: "inspector.booleanChanged",
1931
1938
  connect_onkeydown: "inspector.editKey"
1932
1939
  });
1933
1940
  if (fresh) {