@threadlabs/looma 0.3.0 → 0.3.1

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.
@@ -2821,7 +2821,6 @@ function controller28(host) {
2821
2821
  const disclosure = element.querySelector('[part="disclosure"]');
2822
2822
  const children = element.querySelector('[part="children"]');
2823
2823
  const dragHandle = element.querySelector('[part="drag-handle"]');
2824
- const label = element.querySelector('[part="label"]');
2825
2824
  const childItems = () => Array.from(children?.children ?? []).filter((child) => child.matches?.('[data-component-root~="ui-tree-item"]'));
2826
2825
  let lastExternalExpanded = Boolean(host.state.expanded);
2827
2826
  host.state.internalExpanded = lastExternalExpanded;
@@ -2860,7 +2859,6 @@ function controller28(host) {
2860
2859
  else element.removeAttribute("aria-expanded");
2861
2860
  element.tabIndex = disabled3 || !host.state.tabStop ? -1 : 0;
2862
2861
  element.style.setProperty("--ui-tree-item-depth", String(level - 1));
2863
- if (label && label.textContent !== name) label.textContent = name;
2864
2862
  if (children) children.hidden = !expanded;
2865
2863
  if (disclosure) {
2866
2864
  disclosure.hidden = !container;
@@ -5445,7 +5443,7 @@ input[type='radio']:focus-visible {
5445
5443
  { tag: "ui-tree-item", source: `<template component="ui-tree-item" controller="./controllers/ui-tree-item.js" status="early" summary="Migrated Looma ui-tree-item component.">
5446
5444
  <defs>
5447
5445
  <prop name="itemId" type="string" default="">itemId token.</prop>
5448
- <prop name="label" type="string" default="">label token.</prop>
5446
+ <prop name="label" type="string" default="">The item's accessible name, also shown as the row text unless the label slot supplies content.</prop>
5449
5447
  <prop name="dropDepth" type="number">dropDepth token.</prop>
5450
5448
  <prop name="subtreeDepth" type="number">subtreeDepth token.</prop>
5451
5449
  <prop name="container" type="boolean" default="false">container token.</prop>
@@ -5462,7 +5460,7 @@ input[type='radio']:focus-visible {
5462
5460
  <state name="hasChildren" :value="false"></state>
5463
5461
  <event name="expand" bubbles="false" type="object({ id: string, expanded: boolean, trigger: keyboard | pointer | programmatic })"></event>
5464
5462
  </defs>
5465
- <div role="treeitem" :data-drop-scope="dropScope" :data-accepts="accepts"><div class="row" part="row"><button $if="sortable and not disabled" class="drag-handle" part="drag-handle" type="button"><svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle></svg></button><button class="disclosure" part="disclosure" type="button" :disabled="disabled"><span class="disclosure-icon" aria-hidden="true"></span></button><span class="leading" part="leading"><slot name="leading"></slot></span><span class="label" part="label"></span><span class="actions" part="actions"><slot name="actions"></slot></span><span class="drop-indicator row-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div><div class="children" part="children" role="group"><slot></slot></div><span class="drop-indicator subtree-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div>
5463
+ <div role="treeitem" :data-drop-scope="dropScope" :data-accepts="accepts"><div class="row" part="row"><button $if="sortable and not disabled" class="drag-handle" part="drag-handle" type="button"><svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle></svg></button><button class="disclosure" part="disclosure" type="button" :disabled="disabled"><span class="disclosure-icon" aria-hidden="true"></span></button><span class="leading" part="leading"><slot name="leading"></slot></span><span class="label" part="label"><slot name="label"><template $value="label"></template></slot></span><span class="actions" part="actions"><slot name="actions"></slot></span><span class="drop-indicator row-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div><div class="children" part="children" role="group"><slot></slot></div><span class="drop-indicator subtree-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div>
5466
5464
  <style>:scope {
5467
5465
  --_tree-indent: 16px;
5468
5466
  --_tree-row-min-height: 32px;
package/dist/index.cjs CHANGED
@@ -2864,7 +2864,6 @@ function controller28(host) {
2864
2864
  const disclosure = element.querySelector('[part="disclosure"]');
2865
2865
  const children = element.querySelector('[part="children"]');
2866
2866
  const dragHandle = element.querySelector('[part="drag-handle"]');
2867
- const label = element.querySelector('[part="label"]');
2868
2867
  const childItems = () => Array.from(children?.children ?? []).filter((child) => child.matches?.('[data-component-root~="ui-tree-item"]'));
2869
2868
  let lastExternalExpanded = Boolean(host.state.expanded);
2870
2869
  host.state.internalExpanded = lastExternalExpanded;
@@ -2903,7 +2902,6 @@ function controller28(host) {
2903
2902
  else element.removeAttribute("aria-expanded");
2904
2903
  element.tabIndex = disabled3 || !host.state.tabStop ? -1 : 0;
2905
2904
  element.style.setProperty("--ui-tree-item-depth", String(level - 1));
2906
- if (label && label.textContent !== name) label.textContent = name;
2907
2905
  if (children) children.hidden = !expanded;
2908
2906
  if (disclosure) {
2909
2907
  disclosure.hidden = !container;
@@ -5488,7 +5486,7 @@ input[type='radio']:focus-visible {
5488
5486
  { tag: "ui-tree-item", source: `<template component="ui-tree-item" controller="./controllers/ui-tree-item.js" status="early" summary="Migrated Looma ui-tree-item component.">
5489
5487
  <defs>
5490
5488
  <prop name="itemId" type="string" default="">itemId token.</prop>
5491
- <prop name="label" type="string" default="">label token.</prop>
5489
+ <prop name="label" type="string" default="">The item's accessible name, also shown as the row text unless the label slot supplies content.</prop>
5492
5490
  <prop name="dropDepth" type="number">dropDepth token.</prop>
5493
5491
  <prop name="subtreeDepth" type="number">subtreeDepth token.</prop>
5494
5492
  <prop name="container" type="boolean" default="false">container token.</prop>
@@ -5505,7 +5503,7 @@ input[type='radio']:focus-visible {
5505
5503
  <state name="hasChildren" :value="false"></state>
5506
5504
  <event name="expand" bubbles="false" type="object({ id: string, expanded: boolean, trigger: keyboard | pointer | programmatic })"></event>
5507
5505
  </defs>
5508
- <div role="treeitem" :data-drop-scope="dropScope" :data-accepts="accepts"><div class="row" part="row"><button $if="sortable and not disabled" class="drag-handle" part="drag-handle" type="button"><svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle></svg></button><button class="disclosure" part="disclosure" type="button" :disabled="disabled"><span class="disclosure-icon" aria-hidden="true"></span></button><span class="leading" part="leading"><slot name="leading"></slot></span><span class="label" part="label"></span><span class="actions" part="actions"><slot name="actions"></slot></span><span class="drop-indicator row-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div><div class="children" part="children" role="group"><slot></slot></div><span class="drop-indicator subtree-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div>
5506
+ <div role="treeitem" :data-drop-scope="dropScope" :data-accepts="accepts"><div class="row" part="row"><button $if="sortable and not disabled" class="drag-handle" part="drag-handle" type="button"><svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle></svg></button><button class="disclosure" part="disclosure" type="button" :disabled="disabled"><span class="disclosure-icon" aria-hidden="true"></span></button><span class="leading" part="leading"><slot name="leading"></slot></span><span class="label" part="label"><slot name="label"><template $value="label"></template></slot></span><span class="actions" part="actions"><slot name="actions"></slot></span><span class="drop-indicator row-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div><div class="children" part="children" role="group"><slot></slot></div><span class="drop-indicator subtree-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div>
5509
5507
  <style>:scope {
5510
5508
  --_tree-indent: 16px;
5511
5509
  --_tree-row-min-height: 32px;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  records,
3
3
  styles
4
- } from "./chunk-3NVMCHGR.js";
4
+ } from "./chunk-RWLYVQY6.js";
5
5
  import {
6
6
  attachLoomaComponent,
7
7
  controllerFor,
package/dist/loader.cjs CHANGED
@@ -2842,7 +2842,6 @@ function controller28(host) {
2842
2842
  const disclosure = element.querySelector('[part="disclosure"]');
2843
2843
  const children = element.querySelector('[part="children"]');
2844
2844
  const dragHandle = element.querySelector('[part="drag-handle"]');
2845
- const label = element.querySelector('[part="label"]');
2846
2845
  const childItems = () => Array.from(children?.children ?? []).filter((child) => child.matches?.('[data-component-root~="ui-tree-item"]'));
2847
2846
  let lastExternalExpanded = Boolean(host.state.expanded);
2848
2847
  host.state.internalExpanded = lastExternalExpanded;
@@ -2881,7 +2880,6 @@ function controller28(host) {
2881
2880
  else element.removeAttribute("aria-expanded");
2882
2881
  element.tabIndex = disabled3 || !host.state.tabStop ? -1 : 0;
2883
2882
  element.style.setProperty("--ui-tree-item-depth", String(level - 1));
2884
- if (label && label.textContent !== name) label.textContent = name;
2885
2883
  if (children) children.hidden = !expanded;
2886
2884
  if (disclosure) {
2887
2885
  disclosure.hidden = !container;
@@ -5466,7 +5464,7 @@ input[type='radio']:focus-visible {
5466
5464
  { tag: "ui-tree-item", source: `<template component="ui-tree-item" controller="./controllers/ui-tree-item.js" status="early" summary="Migrated Looma ui-tree-item component.">
5467
5465
  <defs>
5468
5466
  <prop name="itemId" type="string" default="">itemId token.</prop>
5469
- <prop name="label" type="string" default="">label token.</prop>
5467
+ <prop name="label" type="string" default="">The item's accessible name, also shown as the row text unless the label slot supplies content.</prop>
5470
5468
  <prop name="dropDepth" type="number">dropDepth token.</prop>
5471
5469
  <prop name="subtreeDepth" type="number">subtreeDepth token.</prop>
5472
5470
  <prop name="container" type="boolean" default="false">container token.</prop>
@@ -5483,7 +5481,7 @@ input[type='radio']:focus-visible {
5483
5481
  <state name="hasChildren" :value="false"></state>
5484
5482
  <event name="expand" bubbles="false" type="object({ id: string, expanded: boolean, trigger: keyboard | pointer | programmatic })"></event>
5485
5483
  </defs>
5486
- <div role="treeitem" :data-drop-scope="dropScope" :data-accepts="accepts"><div class="row" part="row"><button $if="sortable and not disabled" class="drag-handle" part="drag-handle" type="button"><svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle></svg></button><button class="disclosure" part="disclosure" type="button" :disabled="disabled"><span class="disclosure-icon" aria-hidden="true"></span></button><span class="leading" part="leading"><slot name="leading"></slot></span><span class="label" part="label"></span><span class="actions" part="actions"><slot name="actions"></slot></span><span class="drop-indicator row-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div><div class="children" part="children" role="group"><slot></slot></div><span class="drop-indicator subtree-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div>
5484
+ <div role="treeitem" :data-drop-scope="dropScope" :data-accepts="accepts"><div class="row" part="row"><button $if="sortable and not disabled" class="drag-handle" part="drag-handle" type="button"><svg aria-hidden="true" focusable="false" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="12" r="1"></circle><circle cx="9" cy="5" r="1"></circle><circle cx="9" cy="19" r="1"></circle><circle cx="15" cy="12" r="1"></circle><circle cx="15" cy="5" r="1"></circle><circle cx="15" cy="19" r="1"></circle></svg></button><button class="disclosure" part="disclosure" type="button" :disabled="disabled"><span class="disclosure-icon" aria-hidden="true"></span></button><span class="leading" part="leading"><slot name="leading"></slot></span><span class="label" part="label"><slot name="label"><template $value="label"></template></slot></span><span class="actions" part="actions"><slot name="actions"></slot></span><span class="drop-indicator row-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div><div class="children" part="children" role="group"><slot></slot></div><span class="drop-indicator subtree-drop-indicator" part="drop-indicator" aria-hidden="true"></span></div>
5487
5485
  <style>:scope {
5488
5486
  --_tree-indent: 16px;
5489
5487
  --_tree-row-min-height: 32px;
package/dist/loader.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  records,
3
3
  styles
4
- } from "./chunk-3NVMCHGR.js";
4
+ } from "./chunk-RWLYVQY6.js";
5
5
  import {
6
6
  registerLoomaPackage
7
7
  } from "./chunk-XDNZIKNI.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "type": "module",
5
5
  "description": "Looma declarative components, responsive layout primitives, a complete editor, and supported Vue adapters.",
6
6
  "license": "MIT",
package/react/index.js CHANGED
@@ -288,7 +288,7 @@ function UiCombobox(props) {
288
288
  return () => node.removeEventListener("create-item", listener8);
289
289
  }, [onCreateItem]);
290
290
  return /* @__PURE__ */ jsxs4("div", { ...nativeProps, "data-component": "ui-combobox", "data-component-root": "ui-combobox", "data-size": prop15 ?? void 0, ref: setRoot, children: [
291
- /* @__PURE__ */ jsx9("label", { htmlFor: "input", part: "label", "data-component": "ui-combobox", children: /* @__PURE__ */ jsx9("template", { "data-component": "ui-combobox", children: prop7 }) }),
291
+ /* @__PURE__ */ jsx9("label", { htmlFor: "input", part: "label", "data-component": "ui-combobox", children: prop7 }),
292
292
  /* @__PURE__ */ jsxs4("div", { className: "field", part: "field", "data-component": "ui-combobox", children: [
293
293
  slots?.["start"] ?? null,
294
294
  /* @__PURE__ */ jsx9("div", { className: "items", role: "group", "data-component": "ui-combobox" }),
@@ -297,7 +297,7 @@ function UiCombobox(props) {
297
297
  /* @__PURE__ */ jsx9("button", { id: "help", type: "button", part: "affordance", disabled: prop3 ?? void 0, "data-component": "ui-combobox", children: /* @__PURE__ */ jsx9("span", { "aria-hidden": "true", "data-component": "ui-combobox", children: "?" }) }),
298
298
  /* @__PURE__ */ jsx9("button", { type: "button", part: "affordance", "aria-controls": "listbox", "data-component": "ui-combobox", children: /* @__PURE__ */ jsx9("svg", { className: "affordance-icon", "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.25", "stroke-linecap": "round", "stroke-linejoin": "round", "data-component": "ui-combobox", children: /* @__PURE__ */ jsx9("path", { d: "m6 9 6 6 6-6", "data-component": "ui-combobox" }) }) })
299
299
  ] }),
300
- /* @__PURE__ */ jsx9(UiTooltip, { id: "help-text", for: "help", "data-component": "ui-combobox", children: /* @__PURE__ */ jsx9("template", { "data-component": "ui-combobox", children: prop5 }) }),
300
+ /* @__PURE__ */ jsx9(UiTooltip, { id: "help-text", for: "help", "data-component": "ui-combobox", children: prop5 }),
301
301
  /* @__PURE__ */ jsxs4("div", { className: "popup", part: "popup", hidden: void 0, "data-component": "ui-combobox", children: [
302
302
  /* @__PURE__ */ jsx9("div", { id: "listbox", role: "listbox", "data-component": "ui-combobox" }),
303
303
  slots?.["footer"] ?? null
@@ -421,7 +421,7 @@ function UiDialog(props) {
421
421
  }, [onClose]);
422
422
  return /* @__PURE__ */ jsxs5("dialog", { ...nativeProps, "data-component": "ui-dialog", "data-component-root": "ui-dialog", "aria-label": void 0, ref: setRoot, children: [
423
423
  /* @__PURE__ */ jsxs5("header", { className: "dialog__header", "data-component": "ui-dialog", children: [
424
- /* @__PURE__ */ jsx12("h2", { className: "dialog__title", "data-component": "ui-dialog", children: /* @__PURE__ */ jsx12("template", { "data-component": "ui-dialog", children: prop2 }) }),
424
+ /* @__PURE__ */ jsx12("h2", { className: "dialog__title", "data-component": "ui-dialog", children: prop2 }),
425
425
  /* @__PURE__ */ jsx12("button", { className: "dialog__close", type: "button", "aria-label": "Close", "data-component": "ui-dialog" })
426
426
  ] }),
427
427
  /* @__PURE__ */ jsx12("div", { className: "dialog__body", "data-component": "ui-dialog", children: children ?? null }),
@@ -463,7 +463,7 @@ function UiDisclosure(props) {
463
463
  }, [onClose]);
464
464
  return /* @__PURE__ */ jsxs6("div", { ...nativeProps, "data-component": "ui-disclosure", "data-component-root": "ui-disclosure", ref: setRoot, children: [
465
465
  /* @__PURE__ */ jsxs6("button", { className: "disclosure__trigger", type: "button", "aria-controls": void 0, disabled: prop0 ?? void 0, "data-component": "ui-disclosure", children: [
466
- /* @__PURE__ */ jsx13("span", { "data-component": "ui-disclosure", children: /* @__PURE__ */ jsx13("template", { "data-component": "ui-disclosure", children: prop2 }) }),
466
+ /* @__PURE__ */ jsx13("span", { "data-component": "ui-disclosure", children: prop2 }),
467
467
  /* @__PURE__ */ jsx13("span", { className: "disclosure__chevron", "aria-hidden": "true", "data-component": "ui-disclosure" })
468
468
  ] }),
469
469
  /* @__PURE__ */ jsx13("div", { className: "disclosure__panel", "data-component": "ui-disclosure", children: /* @__PURE__ */ jsx13("div", { className: "disclosure__panel-inner", "data-component": "ui-disclosure", children: children ?? null }) })
@@ -512,8 +512,8 @@ function UiEditable(props) {
512
512
  return /* @__PURE__ */ jsxs7("div", { ...nativeProps, "data-component": "ui-editable", "data-component-root": "ui-editable", "data-state-edit": void 0, "data-disabled": prop1 ? "" : void 0, ref: setRoot, children: [
513
513
  /* @__PURE__ */ jsxs7("div", { className: "editable__field", "data-component": "ui-editable", children: [
514
514
  /* @__PURE__ */ jsxs7("button", { className: "editable__preview", type: "button", "data-component": "ui-editable", children: [
515
- /* @__PURE__ */ jsx14("span", { className: "editable__text", "data-component": "ui-editable", children: /* @__PURE__ */ jsx14("template", { "data-component": "ui-editable", children: void 0 }) }),
516
- /* @__PURE__ */ jsx14("span", { className: "editable__hint", "aria-hidden": "true", "data-component": "ui-editable", children: /* @__PURE__ */ jsx14("template", { "data-component": "ui-editable", children: prop3 }) })
515
+ /* @__PURE__ */ jsx14("span", { className: "editable__text", "data-component": "ui-editable", children: void 0 }),
516
+ /* @__PURE__ */ jsx14("span", { className: "editable__hint", "aria-hidden": "true", "data-component": "ui-editable", children: prop3 })
517
517
  ] }),
518
518
  /* @__PURE__ */ jsx14("input", { className: "editable__input", type: "text", value: void 0, "data-component": "ui-editable" })
519
519
  ] }),
@@ -683,7 +683,7 @@ function UiRadioGroup(props) {
683
683
  return () => node.removeEventListener("change", listener1);
684
684
  }, [onChange]);
685
685
  return /* @__PURE__ */ jsxs9("fieldset", { ...nativeProps, "data-component": "ui-radio-group", "data-component-root": "ui-radio-group", role: "radiogroup", "data-orientation": prop3 ?? void 0, "data-disabled": prop0 ? "" : void 0, ref: setRoot, children: [
686
- /* @__PURE__ */ jsx19("legend", { "data-component": "ui-radio-group", children: /* @__PURE__ */ jsx19("template", { "data-component": "ui-radio-group", children: prop1 }) }),
686
+ /* @__PURE__ */ jsx19("legend", { "data-component": "ui-radio-group", children: prop1 }),
687
687
  children ?? null
688
688
  ] });
689
689
  }
@@ -785,7 +785,7 @@ function UiSearchShell(props) {
785
785
  import { useLayoutEffect as useLayoutEffect24, useRef as useRef24 } from "react";
786
786
  import { attachLoomaComponent as attachLoomaComponent22, updateComponentProps as updateComponentProps22 } from "@threadlabs/looma/core/declarative";
787
787
  import { jsx as jsx23 } from "react/jsx-runtime";
788
- var definition22 = { ...{ "contract": { "tag": "ui-select", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "invalid": { "type": "boolean", "required": false, "target": { "attribute": "invalid" }, "default": false }, "multiple": { "type": "boolean", "required": false, "target": { "attribute": "multiple" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" } } } }, "template": { "kind": "element", "name": "select", "attributes": [{ "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "attribute", "name": "multiple", "expression": "multiple", "expressionPlan": { "source": "multiple", "ast": { "kind": "id", "name": "multiple" }, "dependencies": ["multiple"] } }], "children": [] }, "declarations": [], "root": { "kind": "native", "element": "select", "choices": ["select"] } }, source: { file: import.meta.url }, css: "" };
788
+ var definition22 = { ...{ "contract": { "tag": "ui-select", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "invalid": { "type": "boolean", "required": false, "target": { "attribute": "invalid" }, "default": false }, "multiple": { "type": "boolean", "required": false, "target": { "attribute": "multiple" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" } } } }, "template": { "kind": "element", "name": "select", "attributes": [{ "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "attribute", "name": "multiple", "expression": "multiple", "expressionPlan": { "source": "multiple", "ast": { "kind": "id", "name": "multiple" }, "dependencies": ["multiple"] } }], "children": [{ "kind": "slot" }] }, "declarations": [], "root": { "kind": "native", "element": "select", "choices": ["select"] } }, source: { file: import.meta.url }, css: "" };
789
789
  function UiSelect(props) {
790
790
  const { "disabled": prop0 = false, "invalid": prop1 = false, "multiple": prop2 = false, "required": prop3 = false, "value": prop4, slots, children, ref, ...nativeProps } = props;
791
791
  const root = useRef24(null);
@@ -799,7 +799,7 @@ function UiSelect(props) {
799
799
  useLayoutEffect24(() => {
800
800
  if (root.current != null) updateComponentProps22(root.current, componentProps);
801
801
  });
802
- return /* @__PURE__ */ jsx23("select", { ...nativeProps, "data-component": "ui-select", "data-component-root": "ui-select", disabled: prop0 ?? void 0, required: prop3 ?? void 0, multiple: prop2 ?? void 0, ref: setRoot });
802
+ return /* @__PURE__ */ jsx23("select", { ...nativeProps, "data-component": "ui-select", "data-component-root": "ui-select", disabled: prop0 ?? void 0, required: prop3 ?? void 0, multiple: prop2 ?? void 0, ref: setRoot, children: children ?? null });
803
803
  }
804
804
 
805
805
  // src/generated/UiSwitch.tsx
@@ -949,8 +949,8 @@ function UiTopBar(props) {
949
949
  // src/generated/UiTreeItem.tsx
950
950
  import { useLayoutEffect as useLayoutEffect30, useRef as useRef30 } from "react";
951
951
  import { attachLoomaComponent as attachLoomaComponent28, updateComponentProps as updateComponentProps28 } from "@threadlabs/looma/core/declarative";
952
- import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
953
- var definition28 = { ...{ "contract": { "tag": "ui-tree-item", "props": { "accepts": { "type": "string", "required": false, "target": { "attribute": "data-accepts" }, "default": "" }, "container": { "type": "boolean", "required": false, "target": { "attribute": "container" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "dragType": { "type": "string", "required": false, "target": { "attribute": "dragtype" }, "default": "item" }, "dropDepth": { "type": "number", "required": false, "target": { "attribute": "dropdepth" } }, "dropScope": { "type": "string", "required": false, "target": { "attribute": "data-drop-scope" }, "default": "" }, "expanded": { "type": "boolean", "required": false, "target": { "attribute": "expanded" }, "default": false }, "itemId": { "type": "string", "required": false, "target": { "attribute": "itemid" }, "default": "" }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "" }, "selected": { "type": "boolean", "required": false, "target": { "attribute": "selected" }, "default": false }, "sortable": { "type": "boolean", "required": false, "target": { "attribute": "sortable" }, "default": false }, "subtreeDepth": { "type": "number", "required": false, "target": { "attribute": "subtreedepth" } } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "treeitem" }, { "kind": "attribute", "name": "data-drop-scope", "expression": "dropScope", "expressionPlan": { "source": "dropScope", "ast": { "kind": "id", "name": "dropScope" }, "dependencies": ["dropScope"] } }, { "kind": "attribute", "name": "data-accepts", "expression": "accepts", "expressionPlan": { "source": "accepts", "ast": { "kind": "id", "name": "accepts" }, "dependencies": ["accepts"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "row" }, { "kind": "literal", "name": "part", "value": "row" }], "children": [{ "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "drag-handle" }, { "kind": "literal", "name": "part", "value": "drag-handle" }, { "kind": "literal", "name": "type", "value": "button" }], "children": [{ "kind": "element", "name": "svg", "attributes": [{ "kind": "literal", "name": "aria-hidden", "value": "true" }, { "kind": "literal", "name": "focusable", "value": "false" }, { "kind": "literal", "name": "viewBox", "value": "0 0 24 24" }, { "kind": "literal", "name": "fill", "value": "none" }, { "kind": "literal", "name": "stroke", "value": "currentColor" }, { "kind": "literal", "name": "stroke-width", "value": "2" }, { "kind": "literal", "name": "stroke-linecap", "value": "round" }, { "kind": "literal", "name": "stroke-linejoin", "value": "round" }], "children": [{ "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "12" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "5" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "19" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "12" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "5" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "19" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }] }], "flow": { "kind": "if", "test": "sortable and not disabled", "testPlan": { "source": "sortable and not disabled", "ast": { "kind": "binary", "op": "and", "left": { "kind": "id", "name": "sortable" }, "right": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "disabled" } } }, "dependencies": ["disabled", "sortable"] } } }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure" }, { "kind": "literal", "name": "part", "value": "disclosure" }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure-icon" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "leading" }, { "kind": "literal", "name": "part", "value": "leading" }], "children": [{ "kind": "slot", "fallback": [], "name": "leading" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "label" }, { "kind": "literal", "name": "part", "value": "label" }], "children": [] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "actions" }, { "kind": "literal", "name": "part", "value": "actions" }], "children": [{ "kind": "slot", "fallback": [], "name": "actions" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "drop-indicator row-drop-indicator" }, { "kind": "literal", "name": "part", "value": "drop-indicator" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "children" }, { "kind": "literal", "name": "part", "value": "children" }, { "kind": "literal", "name": "role", "value": "group" }], "children": [{ "kind": "slot" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "drop-indicator subtree-drop-indicator" }, { "kind": "literal", "name": "part", "value": "drop-indicator" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, "declarations": [{ "kind": "state", "name": "internalExpanded", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "structuralLevel", "expression": { "source": "1", "ast": { "kind": "literal", "value": 1 }, "dependencies": [] } }, { "kind": "state", "name": "tabStop", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasChildren", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "expand", "type": "object({ id: string, expanded: boolean, trigger: keyboard | pointer | programmatic })", "bubbles": false, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
952
+ import { Fragment, jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
953
+ var definition28 = { ...{ "contract": { "tag": "ui-tree-item", "props": { "accepts": { "type": "string", "required": false, "target": { "attribute": "data-accepts" }, "default": "" }, "container": { "type": "boolean", "required": false, "target": { "attribute": "container" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "dragType": { "type": "string", "required": false, "target": { "attribute": "dragtype" }, "default": "item" }, "dropDepth": { "type": "number", "required": false, "target": { "attribute": "dropdepth" } }, "dropScope": { "type": "string", "required": false, "target": { "attribute": "data-drop-scope" }, "default": "" }, "expanded": { "type": "boolean", "required": false, "target": { "attribute": "expanded" }, "default": false }, "itemId": { "type": "string", "required": false, "target": { "attribute": "itemid" }, "default": "" }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "" }, "selected": { "type": "boolean", "required": false, "target": { "attribute": "selected" }, "default": false }, "sortable": { "type": "boolean", "required": false, "target": { "attribute": "sortable" }, "default": false }, "subtreeDepth": { "type": "number", "required": false, "target": { "attribute": "subtreedepth" } } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "treeitem" }, { "kind": "attribute", "name": "data-drop-scope", "expression": "dropScope", "expressionPlan": { "source": "dropScope", "ast": { "kind": "id", "name": "dropScope" }, "dependencies": ["dropScope"] } }, { "kind": "attribute", "name": "data-accepts", "expression": "accepts", "expressionPlan": { "source": "accepts", "ast": { "kind": "id", "name": "accepts" }, "dependencies": ["accepts"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "row" }, { "kind": "literal", "name": "part", "value": "row" }], "children": [{ "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "drag-handle" }, { "kind": "literal", "name": "part", "value": "drag-handle" }, { "kind": "literal", "name": "type", "value": "button" }], "children": [{ "kind": "element", "name": "svg", "attributes": [{ "kind": "literal", "name": "aria-hidden", "value": "true" }, { "kind": "literal", "name": "focusable", "value": "false" }, { "kind": "literal", "name": "viewBox", "value": "0 0 24 24" }, { "kind": "literal", "name": "fill", "value": "none" }, { "kind": "literal", "name": "stroke", "value": "currentColor" }, { "kind": "literal", "name": "stroke-width", "value": "2" }, { "kind": "literal", "name": "stroke-linecap", "value": "round" }, { "kind": "literal", "name": "stroke-linejoin", "value": "round" }], "children": [{ "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "12" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "5" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "19" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "12" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "5" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "19" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }] }], "flow": { "kind": "if", "test": "sortable and not disabled", "testPlan": { "source": "sortable and not disabled", "ast": { "kind": "binary", "op": "and", "left": { "kind": "id", "name": "sortable" }, "right": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "disabled" } } }, "dependencies": ["disabled", "sortable"] } } }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure" }, { "kind": "literal", "name": "part", "value": "disclosure" }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure-icon" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "leading" }, { "kind": "literal", "name": "part", "value": "leading" }], "children": [{ "kind": "slot", "fallback": [], "name": "leading" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "label" }, { "kind": "literal", "name": "part", "value": "label" }], "children": [{ "kind": "slot", "fallback": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "label", "expressionPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } }], "children": [] }], "name": "label" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "actions" }, { "kind": "literal", "name": "part", "value": "actions" }], "children": [{ "kind": "slot", "fallback": [], "name": "actions" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "drop-indicator row-drop-indicator" }, { "kind": "literal", "name": "part", "value": "drop-indicator" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "children" }, { "kind": "literal", "name": "part", "value": "children" }, { "kind": "literal", "name": "role", "value": "group" }], "children": [{ "kind": "slot" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "drop-indicator subtree-drop-indicator" }, { "kind": "literal", "name": "part", "value": "drop-indicator" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, "declarations": [{ "kind": "state", "name": "internalExpanded", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "structuralLevel", "expression": { "source": "1", "ast": { "kind": "literal", "value": 1 }, "dependencies": [] } }, { "kind": "state", "name": "tabStop", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasChildren", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "expand", "type": "object({ id: string, expanded: boolean, trigger: keyboard | pointer | programmatic })", "bubbles": false, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
954
954
  function UiTreeItem(props) {
955
955
  const { "accepts": prop0 = "", "container": prop1 = false, "disabled": prop2 = false, "dragType": prop3 = "item", "dropDepth": prop4, "dropScope": prop5 = "", "expanded": prop6 = false, "itemId": prop7 = "", "label": prop8 = "", "selected": prop9 = false, "sortable": prop10 = false, "subtreeDepth": prop11, onExpand, slots, children, ref, ...nativeProps } = props;
956
956
  const root = useRef30(null);
@@ -983,7 +983,7 @@ function UiTreeItem(props) {
983
983
  ] }) }),
984
984
  /* @__PURE__ */ jsx29("button", { className: "disclosure", part: "disclosure", type: "button", disabled: prop2 ?? void 0, "data-component": "ui-tree-item", children: /* @__PURE__ */ jsx29("span", { className: "disclosure-icon", "aria-hidden": "true", "data-component": "ui-tree-item" }) }),
985
985
  /* @__PURE__ */ jsx29("span", { className: "leading", part: "leading", "data-component": "ui-tree-item", children: slots?.["leading"] ?? null }),
986
- /* @__PURE__ */ jsx29("span", { className: "label", part: "label", "data-component": "ui-tree-item" }),
986
+ /* @__PURE__ */ jsx29("span", { className: "label", part: "label", "data-component": "ui-tree-item", children: slots?.["label"] ?? /* @__PURE__ */ jsx29(Fragment, { children: prop8 }) }),
987
987
  /* @__PURE__ */ jsx29("span", { className: "actions", part: "actions", "data-component": "ui-tree-item", children: slots?.["actions"] ?? null }),
988
988
  /* @__PURE__ */ jsx29("span", { className: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true", "data-component": "ui-tree-item" })
989
989
  ] }),
package/svelte/index.js CHANGED
@@ -973,7 +973,7 @@ function createUiSearchShell(options = {}) {
973
973
 
974
974
  // src/generated/vanilla/UiSelect.js
975
975
  import { attachLoomaComponent as attachLoomaComponent21 } from "@threadlabs/looma/core/declarative";
976
- var definition21 = { ...{ "contract": { "tag": "ui-select", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "invalid": { "type": "boolean", "required": false, "target": { "attribute": "invalid" }, "default": false }, "multiple": { "type": "boolean", "required": false, "target": { "attribute": "multiple" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" } } } }, "template": { "kind": "element", "name": "select", "attributes": [{ "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "attribute", "name": "multiple", "expression": "multiple", "expressionPlan": { "source": "multiple", "ast": { "kind": "id", "name": "multiple" }, "dependencies": ["multiple"] } }], "children": [] }, "declarations": [], "root": { "kind": "native", "element": "select", "choices": ["select"] } }, source: { file: import.meta.url }, css: "" };
976
+ var definition21 = { ...{ "contract": { "tag": "ui-select", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "invalid": { "type": "boolean", "required": false, "target": { "attribute": "invalid" }, "default": false }, "multiple": { "type": "boolean", "required": false, "target": { "attribute": "multiple" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" } } } }, "template": { "kind": "element", "name": "select", "attributes": [{ "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "attribute", "name": "multiple", "expression": "multiple", "expressionPlan": { "source": "multiple", "ast": { "kind": "id", "name": "multiple" }, "dependencies": ["multiple"] } }], "children": [{ "kind": "slot" }] }, "declarations": [], "root": { "kind": "native", "element": "select", "choices": ["select"] } }, source: { file: import.meta.url }, css: "" };
977
977
  function createUiSelect(options = {}) {
978
978
  const { attributes = {}, children = [], slots = {}, as, ...componentProps } = options;
979
979
  const element = document.createElement("select");
@@ -992,6 +992,10 @@ function createUiSelect(options = {}) {
992
992
  else element.removeAttribute("multiple");
993
993
  element.setAttribute("data-component", "ui-select");
994
994
  element.setAttribute("data-component-root", "ui-select");
995
+ if (children.length > 0) {
996
+ for (const child of children) element.append(child);
997
+ } else {
998
+ }
995
999
  attachLoomaComponent21(element, definition21, "ui-select", componentProps);
996
1000
  return element;
997
1001
  }
@@ -1213,7 +1217,7 @@ function createUiTopBar(options = {}) {
1213
1217
 
1214
1218
  // src/generated/vanilla/UiTreeItem.js
1215
1219
  import { attachLoomaComponent as attachLoomaComponent28 } from "@threadlabs/looma/core/declarative";
1216
- var definition28 = { ...{ "contract": { "tag": "ui-tree-item", "props": { "accepts": { "type": "string", "required": false, "target": { "attribute": "data-accepts" }, "default": "" }, "container": { "type": "boolean", "required": false, "target": { "attribute": "container" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "dragType": { "type": "string", "required": false, "target": { "attribute": "dragtype" }, "default": "item" }, "dropDepth": { "type": "number", "required": false, "target": { "attribute": "dropdepth" } }, "dropScope": { "type": "string", "required": false, "target": { "attribute": "data-drop-scope" }, "default": "" }, "expanded": { "type": "boolean", "required": false, "target": { "attribute": "expanded" }, "default": false }, "itemId": { "type": "string", "required": false, "target": { "attribute": "itemid" }, "default": "" }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "" }, "selected": { "type": "boolean", "required": false, "target": { "attribute": "selected" }, "default": false }, "sortable": { "type": "boolean", "required": false, "target": { "attribute": "sortable" }, "default": false }, "subtreeDepth": { "type": "number", "required": false, "target": { "attribute": "subtreedepth" } } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "treeitem" }, { "kind": "attribute", "name": "data-drop-scope", "expression": "dropScope", "expressionPlan": { "source": "dropScope", "ast": { "kind": "id", "name": "dropScope" }, "dependencies": ["dropScope"] } }, { "kind": "attribute", "name": "data-accepts", "expression": "accepts", "expressionPlan": { "source": "accepts", "ast": { "kind": "id", "name": "accepts" }, "dependencies": ["accepts"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "row" }, { "kind": "literal", "name": "part", "value": "row" }], "children": [{ "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "drag-handle" }, { "kind": "literal", "name": "part", "value": "drag-handle" }, { "kind": "literal", "name": "type", "value": "button" }], "children": [{ "kind": "element", "name": "svg", "attributes": [{ "kind": "literal", "name": "aria-hidden", "value": "true" }, { "kind": "literal", "name": "focusable", "value": "false" }, { "kind": "literal", "name": "viewBox", "value": "0 0 24 24" }, { "kind": "literal", "name": "fill", "value": "none" }, { "kind": "literal", "name": "stroke", "value": "currentColor" }, { "kind": "literal", "name": "stroke-width", "value": "2" }, { "kind": "literal", "name": "stroke-linecap", "value": "round" }, { "kind": "literal", "name": "stroke-linejoin", "value": "round" }], "children": [{ "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "12" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "5" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "19" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "12" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "5" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "19" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }] }], "flow": { "kind": "if", "test": "sortable and not disabled", "testPlan": { "source": "sortable and not disabled", "ast": { "kind": "binary", "op": "and", "left": { "kind": "id", "name": "sortable" }, "right": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "disabled" } } }, "dependencies": ["disabled", "sortable"] } } }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure" }, { "kind": "literal", "name": "part", "value": "disclosure" }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure-icon" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "leading" }, { "kind": "literal", "name": "part", "value": "leading" }], "children": [{ "kind": "slot", "fallback": [], "name": "leading" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "label" }, { "kind": "literal", "name": "part", "value": "label" }], "children": [] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "actions" }, { "kind": "literal", "name": "part", "value": "actions" }], "children": [{ "kind": "slot", "fallback": [], "name": "actions" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "drop-indicator row-drop-indicator" }, { "kind": "literal", "name": "part", "value": "drop-indicator" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "children" }, { "kind": "literal", "name": "part", "value": "children" }, { "kind": "literal", "name": "role", "value": "group" }], "children": [{ "kind": "slot" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "drop-indicator subtree-drop-indicator" }, { "kind": "literal", "name": "part", "value": "drop-indicator" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, "declarations": [{ "kind": "state", "name": "internalExpanded", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "structuralLevel", "expression": { "source": "1", "ast": { "kind": "literal", "value": 1 }, "dependencies": [] } }, { "kind": "state", "name": "tabStop", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasChildren", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "expand", "type": "object({ id: string, expanded: boolean, trigger: keyboard | pointer | programmatic })", "bubbles": false, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1220
+ var definition28 = { ...{ "contract": { "tag": "ui-tree-item", "props": { "accepts": { "type": "string", "required": false, "target": { "attribute": "data-accepts" }, "default": "" }, "container": { "type": "boolean", "required": false, "target": { "attribute": "container" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "dragType": { "type": "string", "required": false, "target": { "attribute": "dragtype" }, "default": "item" }, "dropDepth": { "type": "number", "required": false, "target": { "attribute": "dropdepth" } }, "dropScope": { "type": "string", "required": false, "target": { "attribute": "data-drop-scope" }, "default": "" }, "expanded": { "type": "boolean", "required": false, "target": { "attribute": "expanded" }, "default": false }, "itemId": { "type": "string", "required": false, "target": { "attribute": "itemid" }, "default": "" }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "" }, "selected": { "type": "boolean", "required": false, "target": { "attribute": "selected" }, "default": false }, "sortable": { "type": "boolean", "required": false, "target": { "attribute": "sortable" }, "default": false }, "subtreeDepth": { "type": "number", "required": false, "target": { "attribute": "subtreedepth" } } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "treeitem" }, { "kind": "attribute", "name": "data-drop-scope", "expression": "dropScope", "expressionPlan": { "source": "dropScope", "ast": { "kind": "id", "name": "dropScope" }, "dependencies": ["dropScope"] } }, { "kind": "attribute", "name": "data-accepts", "expression": "accepts", "expressionPlan": { "source": "accepts", "ast": { "kind": "id", "name": "accepts" }, "dependencies": ["accepts"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "row" }, { "kind": "literal", "name": "part", "value": "row" }], "children": [{ "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "drag-handle" }, { "kind": "literal", "name": "part", "value": "drag-handle" }, { "kind": "literal", "name": "type", "value": "button" }], "children": [{ "kind": "element", "name": "svg", "attributes": [{ "kind": "literal", "name": "aria-hidden", "value": "true" }, { "kind": "literal", "name": "focusable", "value": "false" }, { "kind": "literal", "name": "viewBox", "value": "0 0 24 24" }, { "kind": "literal", "name": "fill", "value": "none" }, { "kind": "literal", "name": "stroke", "value": "currentColor" }, { "kind": "literal", "name": "stroke-width", "value": "2" }, { "kind": "literal", "name": "stroke-linecap", "value": "round" }, { "kind": "literal", "name": "stroke-linejoin", "value": "round" }], "children": [{ "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "12" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "5" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "9" }, { "kind": "literal", "name": "cy", "value": "19" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "12" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "5" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }, { "kind": "element", "name": "circle", "attributes": [{ "kind": "literal", "name": "cx", "value": "15" }, { "kind": "literal", "name": "cy", "value": "19" }, { "kind": "literal", "name": "r", "value": "1" }], "children": [] }] }], "flow": { "kind": "if", "test": "sortable and not disabled", "testPlan": { "source": "sortable and not disabled", "ast": { "kind": "binary", "op": "and", "left": { "kind": "id", "name": "sortable" }, "right": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "disabled" } } }, "dependencies": ["disabled", "sortable"] } } }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure" }, { "kind": "literal", "name": "part", "value": "disclosure" }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure-icon" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "leading" }, { "kind": "literal", "name": "part", "value": "leading" }], "children": [{ "kind": "slot", "fallback": [], "name": "leading" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "label" }, { "kind": "literal", "name": "part", "value": "label" }], "children": [{ "kind": "slot", "fallback": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "label", "expressionPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } }], "children": [] }], "name": "label" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "actions" }, { "kind": "literal", "name": "part", "value": "actions" }], "children": [{ "kind": "slot", "fallback": [], "name": "actions" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "drop-indicator row-drop-indicator" }, { "kind": "literal", "name": "part", "value": "drop-indicator" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "children" }, { "kind": "literal", "name": "part", "value": "children" }, { "kind": "literal", "name": "role", "value": "group" }], "children": [{ "kind": "slot" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "drop-indicator subtree-drop-indicator" }, { "kind": "literal", "name": "part", "value": "drop-indicator" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, "declarations": [{ "kind": "state", "name": "internalExpanded", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "structuralLevel", "expression": { "source": "1", "ast": { "kind": "literal", "value": 1 }, "dependencies": [] } }, { "kind": "state", "name": "tabStop", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasChildren", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "expand", "type": "object({ id: string, expanded: boolean, trigger: keyboard | pointer | programmatic })", "bubbles": false, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1217
1221
  function createUiTreeItem(options = {}) {
1218
1222
  const { attributes = {}, children = [], slots = {}, as, ...componentProps } = options;
1219
1223
  const element = document.createElement("div");
@@ -1314,39 +1318,46 @@ function createUiTreeItem(options = {}) {
1314
1318
  element12.setAttribute("class", "label");
1315
1319
  element12.setAttribute("part", "label");
1316
1320
  element12.setAttribute("data-component", "ui-tree-item");
1317
- element0.append(element12);
1318
- const element13 = document.createElement("span");
1319
- element13.setAttribute("class", "actions");
1320
- element13.setAttribute("part", "actions");
1321
- element13.setAttribute("data-component", "ui-tree-item");
1322
- if (slots["actions"] ?? [].length > 0) {
1323
- for (const child of slots["actions"] ?? []) element13.append(child);
1321
+ if (slots["label"] ?? [].length > 0) {
1322
+ for (const child of slots["label"] ?? []) element12.append(child);
1324
1323
  } else {
1324
+ const element13 = document.createElement("template");
1325
+ element13.setAttribute("data-component", "ui-tree-item");
1326
+ element12.append(element13);
1325
1327
  }
1326
- element0.append(element13);
1328
+ element0.append(element12);
1327
1329
  const element14 = document.createElement("span");
1328
- element14.setAttribute("class", "drop-indicator row-drop-indicator");
1329
- element14.setAttribute("part", "drop-indicator");
1330
- element14.setAttribute("aria-hidden", "true");
1330
+ element14.setAttribute("class", "actions");
1331
+ element14.setAttribute("part", "actions");
1331
1332
  element14.setAttribute("data-component", "ui-tree-item");
1333
+ if (slots["actions"] ?? [].length > 0) {
1334
+ for (const child of slots["actions"] ?? []) element14.append(child);
1335
+ } else {
1336
+ }
1332
1337
  element0.append(element14);
1333
- element.append(element0);
1334
- const element15 = document.createElement("div");
1335
- element15.setAttribute("class", "children");
1336
- element15.setAttribute("part", "children");
1337
- element15.setAttribute("role", "group");
1338
+ const element15 = document.createElement("span");
1339
+ element15.setAttribute("class", "drop-indicator row-drop-indicator");
1340
+ element15.setAttribute("part", "drop-indicator");
1341
+ element15.setAttribute("aria-hidden", "true");
1338
1342
  element15.setAttribute("data-component", "ui-tree-item");
1343
+ element0.append(element15);
1344
+ element.append(element0);
1345
+ const element16 = document.createElement("div");
1346
+ element16.setAttribute("class", "children");
1347
+ element16.setAttribute("part", "children");
1348
+ element16.setAttribute("role", "group");
1349
+ element16.setAttribute("data-component", "ui-tree-item");
1339
1350
  if (children.length > 0) {
1340
- for (const child of children) element15.append(child);
1351
+ for (const child of children) element16.append(child);
1341
1352
  } else {
1342
1353
  }
1343
- element.append(element15);
1344
- const element16 = document.createElement("span");
1345
- element16.setAttribute("class", "drop-indicator subtree-drop-indicator");
1346
- element16.setAttribute("part", "drop-indicator");
1347
- element16.setAttribute("aria-hidden", "true");
1348
- element16.setAttribute("data-component", "ui-tree-item");
1349
1354
  element.append(element16);
1355
+ const element17 = document.createElement("span");
1356
+ element17.setAttribute("class", "drop-indicator subtree-drop-indicator");
1357
+ element17.setAttribute("part", "drop-indicator");
1358
+ element17.setAttribute("aria-hidden", "true");
1359
+ element17.setAttribute("data-component", "ui-tree-item");
1360
+ element.append(element17);
1350
1361
  attachLoomaComponent28(element, definition28, "ui-tree-item", componentProps);
1351
1362
  return element;
1352
1363
  }