@threadlabs/looma 0.2.19 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/{chunk-A5MSXQ7Y.js → chunk-3NVMCHGR.js} +2225 -1255
  2. package/dist/chunk-XDNZIKNI.js +2721 -0
  3. package/dist/declarative-generated.cjs +93 -79
  4. package/dist/declarative-generated.d.cts +7 -1
  5. package/dist/declarative-generated.d.ts +7 -1
  6. package/dist/declarative-generated.js +91 -78
  7. package/dist/declarative.cjs +1499 -1702
  8. package/dist/declarative.d.cts +77 -3
  9. package/dist/declarative.d.ts +77 -3
  10. package/dist/declarative.js +5 -3
  11. package/dist/index.cjs +3732 -3025
  12. package/dist/index.d.cts +211 -35
  13. package/dist/index.d.ts +211 -35
  14. package/dist/index.js +6 -61
  15. package/dist/loader.cjs +3725 -2962
  16. package/dist/loader.js +2 -2
  17. package/editor/{chunk-WI7ZA44X.js → chunk-U36XNFJN.js} +111 -77
  18. package/editor/extensions/index.d.ts +272 -27
  19. package/editor/index.d.ts +1 -1
  20. package/editor/index.js +1 -1
  21. package/editor/{table-overlay-DoiLie4h.d.ts → table-overlay-DZFGHQDt.d.ts} +48 -6
  22. package/editor/ui.d.ts +15 -11
  23. package/editor/ui.js +1 -1
  24. package/layout/index.cjs +197 -340
  25. package/layout/index.d.cts +11 -0
  26. package/layout/index.d.ts +11 -0
  27. package/layout/index.js +197 -340
  28. package/layout.css +31 -134
  29. package/package.json +24 -11
  30. package/react/index.d.ts +1276 -0
  31. package/react/index.js +1526 -0
  32. package/styles.css +5 -10
  33. package/svelte/index.d.ts +204 -0
  34. package/svelte/index.js +1881 -0
  35. package/theme-dark.css +81 -2
  36. package/theme-high-contrast.css +14 -0
  37. package/theme-light.css +30 -1
  38. package/tokens.css +45 -1
  39. package/vue/chunk-UZMTYDP6.js +4355 -0
  40. package/vue/editor/index.d.ts +78 -8
  41. package/vue/editor/index.js +59 -49
  42. package/vue/index.d.ts +67 -78
  43. package/vue/index.js +3 -9
  44. package/dist/chunk-ECJQ4YGC.js +0 -2925
  45. package/dist/valibot.cjs +0 -31
  46. package/dist/valibot.d.cts +0 -10
  47. package/dist/valibot.d.ts +0 -10
  48. package/dist/valibot.js +0 -9
  49. package/dist/validation-bxcou-l-.d.cts +0 -58
  50. package/dist/validation-bxcou-l-.d.ts +0 -58
  51. package/vue/chunk-P7BZ2KJZ.js +0 -3559
package/react/index.js ADDED
@@ -0,0 +1,1526 @@
1
+ // src/index.ts
2
+ import "@threadlabs/looma/core";
3
+ import "@threadlabs/looma/layout";
4
+ import "@threadlabs/looma/editor/ui";
5
+
6
+ // src/generated/UiAffordanceScope.tsx
7
+ import { useLayoutEffect, useRef } from "react";
8
+ import { attachLoomaComponent, updateComponentProps } from "@threadlabs/looma/core/declarative";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var definition = { ...{ "contract": { "tag": "ui-affordance-scope", "props": { "nearRadius": { "type": "number", "required": false, "target": { "attribute": "nearradius" }, "default": 16 } } }, "template": { "kind": "element", "name": "span", "attributes": [], "children": [{ "kind": "slot" }] }, "declarations": [], "root": { "kind": "native", "element": "span", "choices": ["span"] } }, source: { file: import.meta.url }, css: "" };
11
+ function UiAffordanceScope(props) {
12
+ const { "nearRadius": prop0 = 16, slots, children, ref, ...nativeProps } = props;
13
+ const root = useRef(null);
14
+ const setRoot = (node) => {
15
+ root.current = node;
16
+ if (typeof ref === "function") ref(node);
17
+ else if (ref != null) ref.current = node;
18
+ };
19
+ const componentProps = { "nearRadius": props["nearRadius"] };
20
+ useLayoutEffect(() => root.current == null ? void 0 : attachLoomaComponent(root.current, definition, "ui-affordance-scope", componentProps), []);
21
+ useLayoutEffect(() => {
22
+ if (root.current != null) updateComponentProps(root.current, componentProps);
23
+ });
24
+ return /* @__PURE__ */ jsx("span", { ...nativeProps, "data-component": "ui-affordance-scope", "data-component-root": "ui-affordance-scope", ref: setRoot, children: children ?? null });
25
+ }
26
+
27
+ // src/generated/UiAvatarGroup.tsx
28
+ import { useLayoutEffect as useLayoutEffect2, useRef as useRef2 } from "react";
29
+ import { attachLoomaComponent as attachLoomaComponent2, updateComponentProps as updateComponentProps2 } from "@threadlabs/looma/core/declarative";
30
+ import { jsx as jsx2 } from "react/jsx-runtime";
31
+ var definition2 = { ...{ "contract": { "tag": "ui-avatar-group", "props": { "label": { "type": "string", "required": false, "target": { "attribute": "aria-label" }, "default": "People" }, "max": { "type": "number", "required": false, "target": { "attribute": "max" }, "default": 5 } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "group" }, { "kind": "attribute", "name": "aria-label", "expression": "label", "expressionPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } }], "children": [{ "kind": "slot" }] }, "declarations": [{ "kind": "state", "name": "overflowCount", "expression": { "source": "0", "ast": { "kind": "literal", "value": 0 }, "dependencies": [] } }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
32
+ function UiAvatarGroup(props) {
33
+ const { "label": prop0 = "People", "max": prop1 = 5, slots, children, ref, ...nativeProps } = props;
34
+ const root = useRef2(null);
35
+ const setRoot = (node) => {
36
+ root.current = node;
37
+ if (typeof ref === "function") ref(node);
38
+ else if (ref != null) ref.current = node;
39
+ };
40
+ const componentProps = { "label": props["label"], "max": props["max"] };
41
+ useLayoutEffect2(() => root.current == null ? void 0 : attachLoomaComponent2(root.current, definition2, "ui-avatar-group", componentProps), []);
42
+ useLayoutEffect2(() => {
43
+ if (root.current != null) updateComponentProps2(root.current, componentProps);
44
+ });
45
+ return /* @__PURE__ */ jsx2("div", { ...nativeProps, "data-component": "ui-avatar-group", "data-component-root": "ui-avatar-group", role: "group", "aria-label": prop0 ?? void 0, ref: setRoot, children: children ?? null });
46
+ }
47
+
48
+ // src/generated/UiAvatar.tsx
49
+ import { useLayoutEffect as useLayoutEffect3, useRef as useRef3 } from "react";
50
+ import { attachLoomaComponent as attachLoomaComponent3, updateComponentProps as updateComponentProps3 } from "@threadlabs/looma/core/declarative";
51
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
52
+ var definition3 = { ...{ "contract": { "tag": "ui-avatar", "props": { "alt": { "type": "string", "required": false, "target": { "attribute": "alt" }, "default": "" }, "fallback": { "type": "string", "required": false, "target": { "attribute": "fallback" }, "default": "" }, "name": { "type": "string", "required": false, "target": { "attribute": "name" }, "default": "" }, "src": { "type": "string", "required": false, "target": { "attribute": "src" }, "default": "" } } }, "template": { "kind": "element", "name": "span", "attributes": [{ "kind": "attribute", "name": "data-has-image", "expression": "hasImage", "expressionPlan": { "source": "hasImage", "ast": { "kind": "id", "name": "hasImage" }, "dependencies": ["hasImage"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "avatar" }], "children": [{ "kind": "slot" }, { "kind": "element", "name": "img", "attributes": [{ "kind": "literal", "name": "class", "value": "avatar__managed-image" }, { "kind": "attribute", "name": "src", "expression": "src", "expressionPlan": { "source": "src", "ast": { "kind": "id", "name": "src" }, "dependencies": ["src"] } }, { "kind": "literal", "name": "alt", "value": "" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "fallback" }], "children": [] }] }] }, "declarations": [{ "kind": "state", "name": "hasImage", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasAuthoredImage", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }], "root": { "kind": "native", "element": "span", "choices": ["span"] } }, source: { file: import.meta.url }, css: "" };
53
+ function UiAvatar(props) {
54
+ const { "alt": prop0 = "", "fallback": prop1 = "", "name": prop2 = "", "src": prop3 = "", slots, children, ref, ...nativeProps } = props;
55
+ const root = useRef3(null);
56
+ const setRoot = (node) => {
57
+ root.current = node;
58
+ if (typeof ref === "function") ref(node);
59
+ else if (ref != null) ref.current = node;
60
+ };
61
+ const componentProps = { "alt": props["alt"], "fallback": props["fallback"], "name": props["name"], "src": props["src"] };
62
+ useLayoutEffect3(() => root.current == null ? void 0 : attachLoomaComponent3(root.current, definition3, "ui-avatar", componentProps), []);
63
+ useLayoutEffect3(() => {
64
+ if (root.current != null) updateComponentProps3(root.current, componentProps);
65
+ });
66
+ return /* @__PURE__ */ jsx3("span", { ...nativeProps, "data-component": "ui-avatar", "data-component-root": "ui-avatar", "data-has-image": void 0, ref: setRoot, children: /* @__PURE__ */ jsxs("div", { className: "avatar", "data-component": "ui-avatar", children: [
67
+ children ?? null,
68
+ /* @__PURE__ */ jsx3("img", { className: "avatar__managed-image", src: prop3 ?? void 0, alt: "", "aria-hidden": "true", "data-component": "ui-avatar" }),
69
+ /* @__PURE__ */ jsx3("span", { className: "fallback", "data-component": "ui-avatar" })
70
+ ] }) });
71
+ }
72
+
73
+ // src/generated/UiBadge.tsx
74
+ import { useLayoutEffect as useLayoutEffect4, useRef as useRef4 } from "react";
75
+ import { manageGeneratedProps, updateGeneratedProps } from "@threadlabs/looma/core/declarative-generated";
76
+ import { jsx as jsx4 } from "react/jsx-runtime";
77
+ function UiBadge(props) {
78
+ const { "tone": prop0 = "neutral", "variant": prop1 = "subtle", slots, children, ref, ...nativeProps } = props;
79
+ const root = useRef4(null);
80
+ const setRoot = (node) => {
81
+ root.current = node;
82
+ if (typeof ref === "function") ref(node);
83
+ else if (ref != null) ref.current = node;
84
+ };
85
+ const componentProps = { "tone": props["tone"], "variant": props["variant"] };
86
+ useLayoutEffect4(() => root.current == null ? void 0 : manageGeneratedProps(root.current, [
87
+ { name: "tone", attribute: "data-tone", value: props["tone"], default: "neutral", bound: true, type: ["neutral", "accent", "info", "success", "warning", "danger"], required: false },
88
+ { name: "variant", attribute: "data-variant", value: props["variant"], default: "subtle", bound: true, type: ["solid", "subtle"], required: false }
89
+ ]), []);
90
+ useLayoutEffect4(() => {
91
+ if (root.current != null) updateGeneratedProps(root.current, componentProps);
92
+ });
93
+ return /* @__PURE__ */ jsx4("span", { ...nativeProps, "data-component": "ui-badge", "data-component-root": "ui-badge", "data-variant": prop1 ?? void 0, "data-tone": prop0 ?? void 0, ref: setRoot, children: /* @__PURE__ */ jsx4("span", { className: "badge__surface", "data-component": "ui-badge", children: children ?? null }) });
94
+ }
95
+
96
+ // src/generated/UiButton.tsx
97
+ import { useLayoutEffect as useLayoutEffect5, useRef as useRef5 } from "react";
98
+ import { attachLoomaComponent as attachLoomaComponent4, updateComponentProps as updateComponentProps4 } from "@threadlabs/looma/core/declarative";
99
+ import { jsx as jsx5 } from "react/jsx-runtime";
100
+ var definition4 = { ...{ "contract": { "tag": "ui-button", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "size": { "type": { "enum": ["sm", "md", "lg"] }, "required": false, "target": { "attribute": "data-size" }, "default": "md" }, "variant": { "type": { "enum": ["outline", "solid", "danger", "ghost", "link"] }, "required": false, "target": { "attribute": "data-variant" }, "default": "outline" } } }, "template": { "kind": "element", "name": "button", "attributes": [{ "kind": "attribute", "name": "data-size", "expression": "size", "expressionPlan": { "source": "size", "ast": { "kind": "id", "name": "size" }, "dependencies": ["size"] } }, { "kind": "attribute", "name": "data-variant", "expression": "variant", "expressionPlan": { "source": "variant", "ast": { "kind": "id", "name": "variant" }, "dependencies": ["variant"] } }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "slot" }] }, "declarations": [], "root": { "kind": "native", "element": "button", "choices": ["button"] } }, source: { file: import.meta.url }, css: "" };
101
+ function UiButton(props) {
102
+ const { "disabled": prop0 = false, "size": prop1 = "md", "variant": prop2 = "outline", slots, children, ref, ...nativeProps } = props;
103
+ const root = useRef5(null);
104
+ const setRoot = (node) => {
105
+ root.current = node;
106
+ if (typeof ref === "function") ref(node);
107
+ else if (ref != null) ref.current = node;
108
+ };
109
+ const componentProps = { "disabled": props["disabled"], "size": props["size"], "variant": props["variant"] };
110
+ useLayoutEffect5(() => root.current == null ? void 0 : attachLoomaComponent4(root.current, definition4, "ui-button", componentProps), []);
111
+ useLayoutEffect5(() => {
112
+ if (root.current != null) updateComponentProps4(root.current, componentProps);
113
+ });
114
+ return /* @__PURE__ */ jsx5("button", { ...nativeProps, "data-component": "ui-button", "data-component-root": "ui-button", "data-size": prop1 ?? void 0, "data-variant": prop2 ?? void 0, disabled: prop0 ?? void 0, ref: setRoot, children: children ?? null });
115
+ }
116
+
117
+ // src/generated/UiCallout.tsx
118
+ import { useLayoutEffect as useLayoutEffect6, useRef as useRef6 } from "react";
119
+ import { attachLoomaComponent as attachLoomaComponent5, updateComponentProps as updateComponentProps5 } from "@threadlabs/looma/core/declarative";
120
+ import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
121
+ var definition5 = { ...{ "contract": { "tag": "ui-callout", "props": { "tone": { "type": { "enum": ["info", "note", "warning", "success", "danger"] }, "required": false, "target": { "attribute": "data-tone" }, "default": "info" } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "note" }, { "kind": "attribute", "name": "data-tone", "expression": "tone", "expressionPlan": { "source": "tone", "ast": { "kind": "id", "name": "tone" }, "dependencies": ["tone"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "callout__surface" }], "children": [{ "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "icon" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "content" }], "children": [{ "kind": "slot" }] }] }] }, "declarations": [], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
122
+ function UiCallout(props) {
123
+ const { "tone": prop0 = "info", slots, children, ref, ...nativeProps } = props;
124
+ const root = useRef6(null);
125
+ const setRoot = (node) => {
126
+ root.current = node;
127
+ if (typeof ref === "function") ref(node);
128
+ else if (ref != null) ref.current = node;
129
+ };
130
+ const componentProps = { "tone": props["tone"] };
131
+ useLayoutEffect6(() => root.current == null ? void 0 : attachLoomaComponent5(root.current, definition5, "ui-callout", componentProps), []);
132
+ useLayoutEffect6(() => {
133
+ if (root.current != null) updateComponentProps5(root.current, componentProps);
134
+ });
135
+ return /* @__PURE__ */ jsx6("div", { ...nativeProps, "data-component": "ui-callout", "data-component-root": "ui-callout", role: "note", "data-tone": prop0 ?? void 0, ref: setRoot, children: /* @__PURE__ */ jsxs2("div", { className: "callout__surface", "data-component": "ui-callout", children: [
136
+ /* @__PURE__ */ jsx6("span", { className: "icon", "aria-hidden": "true", "data-component": "ui-callout" }),
137
+ /* @__PURE__ */ jsx6("div", { className: "content", "data-component": "ui-callout", children: children ?? null })
138
+ ] }) });
139
+ }
140
+
141
+ // src/generated/UiCheckbox.tsx
142
+ import { useLayoutEffect as useLayoutEffect7, useRef as useRef7 } from "react";
143
+ import { attachLoomaComponent as attachLoomaComponent6, updateComponentProps as updateComponentProps6 } from "@threadlabs/looma/core/declarative";
144
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
145
+ var definition6 = { ...{ "contract": { "tag": "ui-checkbox", "props": { "checked": { "type": "boolean", "required": false, "target": { "attribute": "checked" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "data-disabled" }, "default": false }, "indeterminate": { "type": "boolean", "required": false, "target": { "attribute": "indeterminate" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" }, "default": "on" } } }, "template": { "kind": "element", "name": "span", "attributes": [{ "kind": "attribute", "name": "data-disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "label", "attributes": [{ "kind": "literal", "name": "class", "value": "control" }], "children": [{ "kind": "element", "name": "input", "attributes": [{ "kind": "literal", "name": "type", "value": "checkbox" }, { "kind": "attribute", "name": "checked", "expression": "internalChecked", "expressionPlan": { "source": "internalChecked", "ast": { "kind": "id", "name": "internalChecked" }, "dependencies": ["internalChecked"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "attribute", "name": "value", "expression": "value", "expressionPlan": { "source": "value", "ast": { "kind": "id", "name": "value" }, "dependencies": ["value"] } }], "children": [] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "label" }], "children": [{ "kind": "slot" }] }] }] }, "declarations": [{ "kind": "state", "name": "internalChecked", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "change", "type": "object({ checked: boolean, value: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "span", "choices": ["span"] } }, source: { file: import.meta.url }, css: "" };
146
+ function UiCheckbox(props) {
147
+ const { "checked": prop0 = false, "disabled": prop1 = false, "indeterminate": prop2 = false, "required": prop3 = false, "value": prop4 = "on", onChange, slots, children, ref, ...nativeProps } = props;
148
+ const root = useRef7(null);
149
+ const setRoot = (node) => {
150
+ root.current = node;
151
+ if (typeof ref === "function") ref(node);
152
+ else if (ref != null) ref.current = node;
153
+ };
154
+ const componentProps = { "checked": props["checked"], "disabled": props["disabled"], "indeterminate": props["indeterminate"], "required": props["required"], "value": props["value"] };
155
+ useLayoutEffect7(() => root.current == null ? void 0 : attachLoomaComponent6(root.current, definition6, "ui-checkbox", componentProps), []);
156
+ useLayoutEffect7(() => {
157
+ if (root.current != null) updateComponentProps6(root.current, componentProps);
158
+ });
159
+ useLayoutEffect7(() => {
160
+ const node = root.current;
161
+ if (node == null || onChange == null) return;
162
+ const listener0 = (event) => onChange(event.detail, event);
163
+ node.addEventListener("change", listener0);
164
+ return () => node.removeEventListener("change", listener0);
165
+ }, [onChange]);
166
+ return /* @__PURE__ */ jsx7("span", { ...nativeProps, "data-component": "ui-checkbox", "data-component-root": "ui-checkbox", "data-disabled": prop1 ? "" : void 0, ref: setRoot, children: /* @__PURE__ */ jsxs3("label", { className: "control", "data-component": "ui-checkbox", children: [
167
+ /* @__PURE__ */ jsx7("input", { type: "checkbox", checked: void 0, required: prop3 ?? void 0, value: prop4 ?? void 0, "data-component": "ui-checkbox" }),
168
+ /* @__PURE__ */ jsx7("span", { className: "label", "data-component": "ui-checkbox", children: children ?? null })
169
+ ] }) });
170
+ }
171
+
172
+ // src/generated/UiCombobox.tsx
173
+ import { useLayoutEffect as useLayoutEffect9, useRef as useRef9 } from "react";
174
+
175
+ // src/generated/UiTooltip.tsx
176
+ import { useLayoutEffect as useLayoutEffect8, useRef as useRef8 } from "react";
177
+ import { attachLoomaComponent as attachLoomaComponent7, updateComponentProps as updateComponentProps7 } from "@threadlabs/looma/core/declarative";
178
+ import { jsx as jsx8 } from "react/jsx-runtime";
179
+ var definition7 = { ...{ "contract": { "tag": "ui-tooltip", "props": { "for": { "type": "string", "required": false, "target": { "attribute": "for" }, "default": "" }, "hideDelay": { "type": "number", "required": false, "target": { "attribute": "hidedelay" }, "default": 100 }, "inverse": { "type": "boolean", "required": false, "target": { "attribute": "data-inverse" }, "default": false }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false }, "placement": { "type": "string", "required": false, "target": { "attribute": "placement" }, "default": "top-start" }, "showDelay": { "type": "number", "required": false, "target": { "attribute": "showdelay" }, "default": 500 } } }, "template": { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "role", "value": "tooltip" }, { "kind": "attribute", "name": "hidden", "expression": "not internalOpen", "expressionPlan": { "source": "not internalOpen", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "internalOpen" } }, "dependencies": ["internalOpen"] } }, { "kind": "attribute", "name": "data-state-open", "expression": "internalOpen", "expressionPlan": { "source": "internalOpen", "ast": { "kind": "id", "name": "internalOpen" }, "dependencies": ["internalOpen"] } }, { "kind": "attribute", "name": "data-inverse", "expression": "inverse", "expressionPlan": { "source": "inverse", "ast": { "kind": "id", "name": "inverse" }, "dependencies": ["inverse"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "tooltip__surface" }], "children": [{ "kind": "slot" }] }] }, "declarations": [{ "kind": "state", "name": "internalOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "open", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "close", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "span", "choices": ["span"] } }, source: { file: import.meta.url }, css: "" };
180
+ function UiTooltip(props) {
181
+ const { "for": prop0 = "", "hideDelay": prop1 = 100, "inverse": prop2 = false, "open": prop3 = false, "placement": prop4 = "top-start", "showDelay": prop5 = 500, onOpen, onClose, slots, children, ref, ...nativeProps } = props;
182
+ const root = useRef8(null);
183
+ const setRoot = (node) => {
184
+ root.current = node;
185
+ if (typeof ref === "function") ref(node);
186
+ else if (ref != null) ref.current = node;
187
+ };
188
+ const componentProps = { "for": props["for"], "hideDelay": props["hideDelay"], "inverse": props["inverse"], "open": props["open"], "placement": props["placement"], "showDelay": props["showDelay"] };
189
+ useLayoutEffect8(() => root.current == null ? void 0 : attachLoomaComponent7(root.current, definition7, "ui-tooltip", componentProps), []);
190
+ useLayoutEffect8(() => {
191
+ if (root.current != null) updateComponentProps7(root.current, componentProps);
192
+ });
193
+ useLayoutEffect8(() => {
194
+ const node = root.current;
195
+ if (node == null || onOpen == null) return;
196
+ const listener0 = (event) => onOpen(event.detail, event);
197
+ node.addEventListener("open", listener0);
198
+ return () => node.removeEventListener("open", listener0);
199
+ }, [onOpen]);
200
+ useLayoutEffect8(() => {
201
+ const node = root.current;
202
+ if (node == null || onClose == null) return;
203
+ const listener1 = (event) => onClose(event.detail, event);
204
+ node.addEventListener("close", listener1);
205
+ return () => node.removeEventListener("close", listener1);
206
+ }, [onClose]);
207
+ return /* @__PURE__ */ jsx8("span", { ...nativeProps, "data-component": "ui-tooltip", "data-component-root": "ui-tooltip", role: "tooltip", hidden: void 0, "data-state-open": void 0, "data-inverse": prop2 ? "" : void 0, ref: setRoot, children: /* @__PURE__ */ jsx8("div", { className: "tooltip__surface", "data-component": "ui-tooltip", children: children ?? null }) });
208
+ }
209
+
210
+ // src/generated/UiCombobox.tsx
211
+ import { attachLoomaComponent as attachLoomaComponent8, updateComponentProps as updateComponentProps8 } from "@threadlabs/looma/core/declarative";
212
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
213
+ var definition8 = { ...{ "contract": { "tag": "ui-combobox", "props": { "allowCreate": { "type": "boolean", "required": false, "target": { "attribute": "allowcreate" }, "default": false }, "allowFreeText": { "type": "boolean", "required": false, "target": { "attribute": "allowfreetext" }, "default": false }, "clearable": { "type": "boolean", "required": false, "target": { "attribute": "clearable" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "disclosure": { "type": "boolean", "required": false, "target": { "attribute": "disclosure" }, "default": false }, "help": { "type": "string", "required": false, "target": { "attribute": "help" }, "default": "" }, "items": { "type": { "kind": "list", "item": { "kind": "object", "fields": [{ "name": "id", "type": { "kind": "terminal", "name": "string" }, "optional": false }, { "name": "value", "type": { "kind": "terminal", "name": "string" }, "optional": false }, { "name": "label", "type": { "kind": "terminal", "name": "string" }, "optional": false }, { "name": "group", "type": { "kind": "terminal", "name": "string" }, "optional": true }, { "name": "disabled", "type": { "kind": "terminal", "name": "boolean" }, "optional": true }], "open": false } }, "required": false, "target": { "attribute": "items" } }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "" }, "labelVisibility": { "type": { "enum": ["visible", "sr-only"] }, "required": false, "target": { "attribute": "labelvisibility" }, "default": "visible" }, "multiple": { "type": "boolean", "required": false, "target": { "attribute": "multiple" }, "default": false }, "name": { "type": "string", "required": false, "target": { "attribute": "name" }, "default": "" }, "placeholder": { "type": "string", "required": false, "target": { "attribute": "placeholder" }, "default": "" }, "query": { "type": "string", "required": false, "target": { "attribute": "query" } }, "readonly": { "type": "boolean", "required": false, "target": { "attribute": "readonly" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "size": { "type": { "enum": ["sm", "md"] }, "required": false, "target": { "attribute": "data-size" }, "default": "md" }, "tokenSeparators": { "type": { "kind": "list", "item": { "kind": "terminal", "name": "string" } }, "required": false, "target": { "attribute": "tokenseparators" } }, "value": { "type": { "kind": "union", "members": [{ "kind": "terminal", "name": "string" }, { "kind": "terminal", "name": "null" }] }, "required": false, "target": { "attribute": "value" } } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "attribute", "name": "data-size", "expression": "size", "expressionPlan": { "source": "size", "ast": { "kind": "id", "name": "size" }, "dependencies": ["size"] } }], "children": [{ "kind": "element", "name": "label", "attributes": [{ "kind": "literal", "name": "for", "value": "input" }, { "kind": "literal", "name": "part", "value": "label" }], "children": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "label", "expressionPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } }], "children": [] }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "field" }, { "kind": "literal", "name": "part", "value": "field" }], "children": [{ "kind": "slot", "fallback": [], "name": "start" }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "items" }, { "kind": "literal", "name": "role", "value": "group" }], "children": [], "flow": { "kind": "if", "test": "multiple", "testPlan": { "source": "multiple", "ast": { "kind": "id", "name": "multiple" }, "dependencies": ["multiple"] } } }, { "kind": "element", "name": "input", "attributes": [{ "kind": "literal", "name": "id", "value": "input" }, { "kind": "literal", "name": "role", "value": "combobox" }, { "kind": "literal", "name": "aria-autocomplete", "value": "list" }, { "kind": "literal", "name": "aria-controls", "value": "listbox" }, { "kind": "attribute", "name": "value", "expression": "display", "expressionPlan": { "source": "display", "ast": { "kind": "id", "name": "display" }, "dependencies": ["display"] } }, { "kind": "attribute", "name": "placeholder", "expression": "placeholder", "expressionPlan": { "source": "placeholder", "ast": { "kind": "id", "name": "placeholder" }, "dependencies": ["placeholder"] } }, { "kind": "attribute", "name": "name", "expression": "name", "expressionPlan": { "source": "name", "ast": { "kind": "id", "name": "name" }, "dependencies": ["name"] } }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "readonly", "expression": "readonly", "expressionPlan": { "source": "readonly", "ast": { "kind": "id", "name": "readonly" }, "dependencies": ["readonly"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "literal", "name": "autocomplete", "value": "off" }, { "kind": "literal", "name": "part", "value": "input" }], "children": [] }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "type", "value": "button" }, { "kind": "literal", "name": "part", "value": "affordance" }], "children": [{ "kind": "element", "name": "svg", "attributes": [{ "kind": "literal", "name": "class", "value": "affordance-icon" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }, { "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" }], "children": [{ "kind": "element", "name": "path", "attributes": [{ "kind": "literal", "name": "d", "value": "M7 7l10 10M17 7 7 17" }], "children": [] }] }], "flow": { "kind": "if", "test": "clearable", "testPlan": { "source": "clearable", "ast": { "kind": "id", "name": "clearable" }, "dependencies": ["clearable"] } } }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "id", "value": "help" }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "literal", "name": "part", "value": "affordance" }, { "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": "aria-hidden", "value": "true" }], "children": [{ "kind": "text", "value": "?" }] }], "flow": { "kind": "if", "test": "help", "testPlan": { "source": "help", "ast": { "kind": "id", "name": "help" }, "dependencies": ["help"] } } }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "type", "value": "button" }, { "kind": "literal", "name": "part", "value": "affordance" }, { "kind": "literal", "name": "aria-controls", "value": "listbox" }], "children": [{ "kind": "element", "name": "svg", "attributes": [{ "kind": "literal", "name": "class", "value": "affordance-icon" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }, { "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.25" }, { "kind": "literal", "name": "stroke-linecap", "value": "round" }, { "kind": "literal", "name": "stroke-linejoin", "value": "round" }], "children": [{ "kind": "element", "name": "path", "attributes": [{ "kind": "literal", "name": "d", "value": "m6 9 6 6 6-6" }], "children": [] }] }], "flow": { "kind": "if", "test": "disclosure", "testPlan": { "source": "disclosure", "ast": { "kind": "id", "name": "disclosure" }, "dependencies": ["disclosure"] } } }] }, { "kind": "element", "name": "ui-tooltip", "attributes": [{ "kind": "literal", "name": "id", "value": "help-text" }, { "kind": "literal", "name": "for", "value": "help" }], "children": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "help", "expressionPlan": { "source": "help", "ast": { "kind": "id", "name": "help" }, "dependencies": ["help"] } }], "children": [] }], "flow": { "kind": "if", "test": "help", "testPlan": { "source": "help", "ast": { "kind": "id", "name": "help" }, "dependencies": ["help"] } } }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "popup" }, { "kind": "literal", "name": "part", "value": "popup" }, { "kind": "attribute", "name": "hidden", "expression": "not expanded", "expressionPlan": { "source": "not expanded", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "expanded" } }, "dependencies": ["expanded"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "id", "value": "listbox" }, { "kind": "literal", "name": "role", "value": "listbox" }], "children": [] }, { "kind": "slot", "fallback": [], "name": "footer" }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "id", "value": "validation" }, { "kind": "literal", "name": "class", "value": "message" }, { "kind": "literal", "name": "part", "value": "validation" }, { "kind": "attribute", "name": "hidden", "expression": "not validation.issues.length", "expressionPlan": { "source": "not validation.issues.length", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "member", "object": { "kind": "member", "object": { "kind": "id", "name": "validation" }, "key": "issues" }, "key": "length" } }, "dependencies": ["validation.issues.length"] } }], "children": [] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "sr-only" }, { "kind": "literal", "name": "role", "value": "status" }, { "kind": "literal", "name": "aria-live", "value": "polite" }, { "kind": "literal", "name": "aria-atomic", "value": "true" }], "children": [] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "authored-options" }, { "kind": "literal", "name": "hidden", "value": "" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [{ "kind": "slot" }] }] }, "declarations": [{ "kind": "state", "name": "raw", "expression": { "source": "''", "ast": { "kind": "literal", "value": "" }, "dependencies": [] } }, { "kind": "state", "name": "display", "expression": { "source": "''", "ast": { "kind": "literal", "value": "" }, "dependencies": [] } }, { "kind": "state", "name": "selected", "expression": { "source": "null", "ast": { "kind": "literal", "value": null }, "dependencies": [] } }, { "kind": "state", "name": "expanded", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "rows", "expression": { "source": "[]", "ast": { "kind": "array", "items": [] }, "dependencies": [] } }, { "kind": "state", "name": "active", "expression": { "source": "-1", "ast": { "kind": "unary", "op": "-", "operand": { "kind": "literal", "value": 1 } }, "dependencies": [] } }, { "kind": "state", "name": "loading", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "helpOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "lookupError", "expression": { "source": "''", "ast": { "kind": "literal", "value": "" }, "dependencies": [] } }, { "kind": "state", "name": "validation", "expression": { "source": "{ status: 'pristine', touched: false, dirty: false, issues: [] }", "ast": { "kind": "object", "pairs": [{ "key": "status", "value": { "kind": "literal", "value": "pristine" } }, { "key": "touched", "value": { "kind": "literal", "value": false } }, { "key": "dirty", "value": { "kind": "literal", "value": false } }, { "key": "issues", "value": { "kind": "array", "items": [] } }] }, "dependencies": [] } }, { "kind": "event", "name": "query-change", "type": "object({ query: string, display: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "value-change", "type": "object({ value: string | null, query: string, option: object({ id: string, value: string, label: string, group?: string, disabled?: boolean }) | null, kind: selection | clear | free-entry | create, trigger: keyboard | pointer | programmatic }) | list(object({ id: string, value: string, label: string, group?: string, disabled?: boolean }))", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "free-entry", "type": "object({ value: string | null, query: string, option: object({ id: string, value: string, label: string, group?: string, disabled?: boolean }) | null, kind: selection | clear | free-entry | create, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "create-entry", "type": "object({ value: string | null, query: string, option: object({ id: string, value: string, label: string, group?: string, disabled?: boolean }) | null, kind: selection | clear | free-entry | create, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "validation-change", "type": "object({ status: pristine | pending | valid | warning | error, touched: boolean, dirty: boolean, issues: list(object({ message: string, path?: list(unknown), severity?: error | warning })), output?: unknown })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "options-change", "type": "list(object({ id: string, value: string, label: string, group?: string, disabled?: boolean }))", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "add-item", "type": "object({ item: object({ id: string, value: string, label: string, group?: string, disabled?: boolean }), index: integer, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "remove-item", "type": "object({ item: object({ id: string, value: string, label: string, group?: string, disabled?: boolean }), index: integer, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "create-item", "type": "object({ query: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "method", "name": "validate", "exportName": "validate", "returns": "promise(unknown)" }, { "kind": "method", "name": "focusInput", "exportName": "focusInput", "returns": "promise(undefined)" }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
214
+ function UiCombobox(props) {
215
+ const { "allowCreate": prop0 = false, "allowFreeText": prop1 = false, "clearable": prop2 = false, "disabled": prop3 = false, "disclosure": prop4 = false, "help": prop5 = "", "items": prop6, "label": prop7 = "", "labelVisibility": prop8 = "visible", "multiple": prop9 = false, "name": prop10 = "", "placeholder": prop11 = "", "query": prop12, "readOnly": prop13 = false, "required": prop14 = false, "size": prop15 = "md", "tokenSeparators": prop16, "value": prop17, onQueryChange, onValueChange, onFreeEntry, onCreateEntry, onValidationChange, onOptionsChange, onAddItem, onRemoveItem, onCreateItem, slots, children, ref, ...nativeProps } = props;
216
+ const root = useRef9(null);
217
+ const setRoot = (node) => {
218
+ root.current = node;
219
+ if (typeof ref === "function") ref(node);
220
+ else if (ref != null) ref.current = node;
221
+ };
222
+ const componentProps = { "allowCreate": props["allowCreate"], "allowFreeText": props["allowFreeText"], "clearable": props["clearable"], "disabled": props["disabled"], "disclosure": props["disclosure"], "help": props["help"], "items": props["items"], "label": props["label"], "labelVisibility": props["labelVisibility"], "multiple": props["multiple"], "name": props["name"], "placeholder": props["placeholder"], "query": props["query"], "readonly": props["readOnly"], "required": props["required"], "size": props["size"], "tokenSeparators": props["tokenSeparators"], "value": props["value"] };
223
+ useLayoutEffect9(() => root.current == null ? void 0 : attachLoomaComponent8(root.current, definition8, "ui-combobox", componentProps), []);
224
+ useLayoutEffect9(() => {
225
+ if (root.current != null) updateComponentProps8(root.current, componentProps);
226
+ });
227
+ useLayoutEffect9(() => {
228
+ const node = root.current;
229
+ if (node == null || onQueryChange == null) return;
230
+ const listener0 = (event) => onQueryChange(event.detail, event);
231
+ node.addEventListener("query-change", listener0);
232
+ return () => node.removeEventListener("query-change", listener0);
233
+ }, [onQueryChange]);
234
+ useLayoutEffect9(() => {
235
+ const node = root.current;
236
+ if (node == null || onValueChange == null) return;
237
+ const listener1 = (event) => onValueChange(event.detail, event);
238
+ node.addEventListener("value-change", listener1);
239
+ return () => node.removeEventListener("value-change", listener1);
240
+ }, [onValueChange]);
241
+ useLayoutEffect9(() => {
242
+ const node = root.current;
243
+ if (node == null || onFreeEntry == null) return;
244
+ const listener2 = (event) => onFreeEntry(event.detail, event);
245
+ node.addEventListener("free-entry", listener2);
246
+ return () => node.removeEventListener("free-entry", listener2);
247
+ }, [onFreeEntry]);
248
+ useLayoutEffect9(() => {
249
+ const node = root.current;
250
+ if (node == null || onCreateEntry == null) return;
251
+ const listener3 = (event) => onCreateEntry(event.detail, event);
252
+ node.addEventListener("create-entry", listener3);
253
+ return () => node.removeEventListener("create-entry", listener3);
254
+ }, [onCreateEntry]);
255
+ useLayoutEffect9(() => {
256
+ const node = root.current;
257
+ if (node == null || onValidationChange == null) return;
258
+ const listener4 = (event) => onValidationChange(event.detail, event);
259
+ node.addEventListener("validation-change", listener4);
260
+ return () => node.removeEventListener("validation-change", listener4);
261
+ }, [onValidationChange]);
262
+ useLayoutEffect9(() => {
263
+ const node = root.current;
264
+ if (node == null || onOptionsChange == null) return;
265
+ const listener5 = (event) => onOptionsChange(event.detail, event);
266
+ node.addEventListener("options-change", listener5);
267
+ return () => node.removeEventListener("options-change", listener5);
268
+ }, [onOptionsChange]);
269
+ useLayoutEffect9(() => {
270
+ const node = root.current;
271
+ if (node == null || onAddItem == null) return;
272
+ const listener6 = (event) => onAddItem(event.detail, event);
273
+ node.addEventListener("add-item", listener6);
274
+ return () => node.removeEventListener("add-item", listener6);
275
+ }, [onAddItem]);
276
+ useLayoutEffect9(() => {
277
+ const node = root.current;
278
+ if (node == null || onRemoveItem == null) return;
279
+ const listener7 = (event) => onRemoveItem(event.detail, event);
280
+ node.addEventListener("remove-item", listener7);
281
+ return () => node.removeEventListener("remove-item", listener7);
282
+ }, [onRemoveItem]);
283
+ useLayoutEffect9(() => {
284
+ const node = root.current;
285
+ if (node == null || onCreateItem == null) return;
286
+ const listener8 = (event) => onCreateItem(event.detail, event);
287
+ node.addEventListener("create-item", listener8);
288
+ return () => node.removeEventListener("create-item", listener8);
289
+ }, [onCreateItem]);
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 }) }),
292
+ /* @__PURE__ */ jsxs4("div", { className: "field", part: "field", "data-component": "ui-combobox", children: [
293
+ slots?.["start"] ?? null,
294
+ /* @__PURE__ */ jsx9("div", { className: "items", role: "group", "data-component": "ui-combobox" }),
295
+ /* @__PURE__ */ jsx9("input", { id: "input", role: "combobox", "aria-autocomplete": "list", "aria-controls": "listbox", value: void 0, placeholder: prop11 ?? void 0, name: prop10 ?? void 0, disabled: prop3 ?? void 0, readOnly: prop13 ?? void 0, required: prop14 ?? void 0, autoComplete: "off", part: "input", "data-component": "ui-combobox" }),
296
+ /* @__PURE__ */ jsx9("button", { type: "button", part: "affordance", "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", "stroke-linecap": "round", "data-component": "ui-combobox", children: /* @__PURE__ */ jsx9("path", { d: "M7 7l10 10M17 7 7 17", "data-component": "ui-combobox" }) }) }),
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
+ /* @__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
+ ] }),
300
+ /* @__PURE__ */ jsx9(UiTooltip, { id: "help-text", for: "help", "data-component": "ui-combobox", children: /* @__PURE__ */ jsx9("template", { "data-component": "ui-combobox", children: prop5 }) }),
301
+ /* @__PURE__ */ jsxs4("div", { className: "popup", part: "popup", hidden: void 0, "data-component": "ui-combobox", children: [
302
+ /* @__PURE__ */ jsx9("div", { id: "listbox", role: "listbox", "data-component": "ui-combobox" }),
303
+ slots?.["footer"] ?? null
304
+ ] }),
305
+ /* @__PURE__ */ jsx9("div", { id: "validation", className: "message", part: "validation", hidden: void 0, "data-component": "ui-combobox" }),
306
+ /* @__PURE__ */ jsx9("div", { className: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-component": "ui-combobox" }),
307
+ /* @__PURE__ */ jsx9("div", { className: "authored-options", hidden: true, "aria-hidden": "true", "data-component": "ui-combobox", children: children ?? null })
308
+ ] });
309
+ }
310
+
311
+ // src/generated/UiContextMenu.tsx
312
+ import { useLayoutEffect as useLayoutEffect11, useRef as useRef11 } from "react";
313
+
314
+ // src/generated/UiMenu.tsx
315
+ import { useLayoutEffect as useLayoutEffect10, useRef as useRef10 } from "react";
316
+ import { attachLoomaComponent as attachLoomaComponent9, updateComponentProps as updateComponentProps9 } from "@threadlabs/looma/core/declarative";
317
+ import { jsx as jsx10 } from "react/jsx-runtime";
318
+ var definition9 = { ...{ "contract": { "tag": "ui-menu", "props": { "for": { "type": "string", "required": false, "target": { "attribute": "for" }, "default": "" }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false }, "placement": { "type": "string", "required": false, "target": { "attribute": "placement" }, "default": "bottom-start" } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "menu" }, { "kind": "literal", "name": "aria-orientation", "value": "vertical" }, { "kind": "attribute", "name": "data-state-open", "expression": "internalOpen", "expressionPlan": { "source": "internalOpen", "ast": { "kind": "id", "name": "internalOpen" }, "dependencies": ["internalOpen"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "menu__surface" }], "children": [{ "kind": "slot" }] }] }, "declarations": [{ "kind": "state", "name": "internalOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "select", "type": "object({ value: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "open", "type": "object({ open: boolean, reason: action | programmatic, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "close", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
319
+ function UiMenu(props) {
320
+ const { "for": prop0 = "", "open": prop1 = false, "placement": prop2 = "bottom-start", onSelect, onOpen, onClose, slots, children, ref, ...nativeProps } = props;
321
+ const root = useRef10(null);
322
+ const setRoot = (node) => {
323
+ root.current = node;
324
+ if (typeof ref === "function") ref(node);
325
+ else if (ref != null) ref.current = node;
326
+ };
327
+ const componentProps = { "for": props["for"], "open": props["open"], "placement": props["placement"] };
328
+ useLayoutEffect10(() => root.current == null ? void 0 : attachLoomaComponent9(root.current, definition9, "ui-menu", componentProps), []);
329
+ useLayoutEffect10(() => {
330
+ if (root.current != null) updateComponentProps9(root.current, componentProps);
331
+ });
332
+ useLayoutEffect10(() => {
333
+ const node = root.current;
334
+ if (node == null || onSelect == null) return;
335
+ const listener0 = (event) => onSelect(event.detail, event);
336
+ node.addEventListener("select", listener0);
337
+ return () => node.removeEventListener("select", listener0);
338
+ }, [onSelect]);
339
+ useLayoutEffect10(() => {
340
+ const node = root.current;
341
+ if (node == null || onOpen == null) return;
342
+ const listener1 = (event) => onOpen(event.detail, event);
343
+ node.addEventListener("open", listener1);
344
+ return () => node.removeEventListener("open", listener1);
345
+ }, [onOpen]);
346
+ useLayoutEffect10(() => {
347
+ const node = root.current;
348
+ if (node == null || onClose == null) return;
349
+ const listener2 = (event) => onClose(event.detail, event);
350
+ node.addEventListener("close", listener2);
351
+ return () => node.removeEventListener("close", listener2);
352
+ }, [onClose]);
353
+ return /* @__PURE__ */ jsx10("div", { ...nativeProps, "data-component": "ui-menu", "data-component-root": "ui-menu", role: "menu", "aria-orientation": "vertical", "data-state-open": void 0, ref: setRoot, children: /* @__PURE__ */ jsx10("div", { className: "menu__surface", "data-component": "ui-menu", children: children ?? null }) });
354
+ }
355
+
356
+ // src/generated/UiContextMenu.tsx
357
+ import { attachLoomaComponent as attachLoomaComponent10, updateComponentProps as updateComponentProps10 } from "@threadlabs/looma/core/declarative";
358
+ import { jsx as jsx11 } from "react/jsx-runtime";
359
+ var definition10 = { ...{ "contract": { "tag": "ui-context-menu", "props": { "for": { "type": "string", "required": false, "target": { "attribute": "for" }, "default": "" }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false } } }, "template": { "kind": "element", "name": "span", "attributes": [{ "kind": "attribute", "name": "data-state-open", "expression": "internalOpen", "expressionPlan": { "source": "internalOpen", "ast": { "kind": "id", "name": "internalOpen" }, "dependencies": ["internalOpen"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "menu" }, { "kind": "attribute", "name": "data-state-open", "expression": "internalOpen", "expressionPlan": { "source": "internalOpen", "ast": { "kind": "id", "name": "internalOpen" }, "dependencies": ["internalOpen"] } }], "children": [{ "kind": "element", "name": "ui-menu", "attributes": [], "children": [{ "kind": "slot" }] }] }] }, "declarations": [{ "kind": "state", "name": "internalOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "focusTrigger", "expression": { "source": "'programmatic'", "ast": { "kind": "literal", "value": "programmatic" }, "dependencies": [] } }, { "kind": "event", "name": "open", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "close", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "select", "type": "object({ value: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "span", "choices": ["span"] } }, source: { file: import.meta.url }, css: "" };
360
+ function UiContextMenu(props) {
361
+ const { "for": prop0 = "", "open": prop1 = false, onOpen, onClose, onSelect, slots, children, ref, ...nativeProps } = props;
362
+ const root = useRef11(null);
363
+ const setRoot = (node) => {
364
+ root.current = node;
365
+ if (typeof ref === "function") ref(node);
366
+ else if (ref != null) ref.current = node;
367
+ };
368
+ const componentProps = { "for": props["for"], "open": props["open"] };
369
+ useLayoutEffect11(() => root.current == null ? void 0 : attachLoomaComponent10(root.current, definition10, "ui-context-menu", componentProps), []);
370
+ useLayoutEffect11(() => {
371
+ if (root.current != null) updateComponentProps10(root.current, componentProps);
372
+ });
373
+ useLayoutEffect11(() => {
374
+ const node = root.current;
375
+ if (node == null || onOpen == null) return;
376
+ const listener0 = (event) => onOpen(event.detail, event);
377
+ node.addEventListener("open", listener0);
378
+ return () => node.removeEventListener("open", listener0);
379
+ }, [onOpen]);
380
+ useLayoutEffect11(() => {
381
+ const node = root.current;
382
+ if (node == null || onClose == null) return;
383
+ const listener1 = (event) => onClose(event.detail, event);
384
+ node.addEventListener("close", listener1);
385
+ return () => node.removeEventListener("close", listener1);
386
+ }, [onClose]);
387
+ useLayoutEffect11(() => {
388
+ const node = root.current;
389
+ if (node == null || onSelect == null) return;
390
+ const listener2 = (event) => onSelect(event.detail, event);
391
+ node.addEventListener("select", listener2);
392
+ return () => node.removeEventListener("select", listener2);
393
+ }, [onSelect]);
394
+ return /* @__PURE__ */ jsx11("span", { ...nativeProps, "data-component": "ui-context-menu", "data-component-root": "ui-context-menu", "data-state-open": void 0, ref: setRoot, children: /* @__PURE__ */ jsx11("div", { className: "menu", "data-state-open": void 0, "data-component": "ui-context-menu", children: /* @__PURE__ */ jsx11(UiMenu, { "data-component": "ui-context-menu", children: children ?? null }) }) });
395
+ }
396
+
397
+ // src/generated/UiDialog.tsx
398
+ import { useLayoutEffect as useLayoutEffect12, useRef as useRef12 } from "react";
399
+ import { attachLoomaComponent as attachLoomaComponent11, updateComponentProps as updateComponentProps11 } from "@threadlabs/looma/core/declarative";
400
+ import { jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
401
+ var definition11 = { ...{ "contract": { "tag": "ui-dialog", "props": { "dismissible": { "type": "boolean", "required": false, "target": { "attribute": "dismissible" }, "default": false }, "for": { "type": "string", "required": false, "target": { "attribute": "for" }, "default": "" }, "label": { "type": "string", "required": false, "target": { "attribute": "label" } }, "modal": { "type": "boolean", "required": false, "target": { "attribute": "modal" }, "default": false }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false } } }, "template": { "kind": "element", "name": "dialog", "attributes": [{ "kind": "attribute", "name": "aria-label", "expression": "accessibleLabel", "expressionPlan": { "source": "accessibleLabel", "ast": { "kind": "id", "name": "accessibleLabel" }, "dependencies": ["accessibleLabel"] } }], "children": [{ "kind": "element", "name": "header", "attributes": [{ "kind": "literal", "name": "class", "value": "dialog__header" }], "children": [{ "kind": "element", "name": "h2", "attributes": [{ "kind": "literal", "name": "class", "value": "dialog__title" }], "children": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "label", "expressionPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } }], "children": [] }], "flow": { "kind": "if", "test": "label", "testPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } } }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "dialog__close" }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "literal", "name": "aria-label", "value": "Close" }], "children": [] }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "dialog__body" }], "children": [{ "kind": "slot" }] }, { "kind": "element", "name": "footer", "attributes": [{ "kind": "literal", "name": "class", "value": "dialog__footer" }], "children": [{ "kind": "slot", "fallback": [], "name": "actions" }] }] }, "declarations": [{ "kind": "state", "name": "internalOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "accessibleLabel", "expression": { "source": "'Dialog'", "ast": { "kind": "literal", "value": "Dialog" }, "dependencies": [] } }, { "kind": "event", "name": "close", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "dialog", "choices": ["dialog"] } }, source: { file: import.meta.url }, css: "" };
402
+ function UiDialog(props) {
403
+ const { "dismissible": prop0 = false, "for": prop1 = "", "label": prop2, "modal": prop3 = false, "open": prop4 = false, onClose, slots, children, ref, ...nativeProps } = props;
404
+ const root = useRef12(null);
405
+ const setRoot = (node) => {
406
+ root.current = node;
407
+ if (typeof ref === "function") ref(node);
408
+ else if (ref != null) ref.current = node;
409
+ };
410
+ const componentProps = { "dismissible": props["dismissible"], "for": props["for"], "label": props["label"], "modal": props["modal"], "open": props["open"] };
411
+ useLayoutEffect12(() => root.current == null ? void 0 : attachLoomaComponent11(root.current, definition11, "ui-dialog", componentProps), []);
412
+ useLayoutEffect12(() => {
413
+ if (root.current != null) updateComponentProps11(root.current, componentProps);
414
+ });
415
+ useLayoutEffect12(() => {
416
+ const node = root.current;
417
+ if (node == null || onClose == null) return;
418
+ const listener0 = (event) => onClose(event.detail, event);
419
+ node.addEventListener("close", listener0);
420
+ return () => node.removeEventListener("close", listener0);
421
+ }, [onClose]);
422
+ return /* @__PURE__ */ jsxs5("dialog", { ...nativeProps, "data-component": "ui-dialog", "data-component-root": "ui-dialog", "aria-label": void 0, ref: setRoot, children: [
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 }) }),
425
+ /* @__PURE__ */ jsx12("button", { className: "dialog__close", type: "button", "aria-label": "Close", "data-component": "ui-dialog" })
426
+ ] }),
427
+ /* @__PURE__ */ jsx12("div", { className: "dialog__body", "data-component": "ui-dialog", children: children ?? null }),
428
+ /* @__PURE__ */ jsx12("footer", { className: "dialog__footer", "data-component": "ui-dialog", children: slots?.["actions"] ?? null })
429
+ ] });
430
+ }
431
+
432
+ // src/generated/UiDisclosure.tsx
433
+ import { useLayoutEffect as useLayoutEffect13, useRef as useRef13 } from "react";
434
+ import { attachLoomaComponent as attachLoomaComponent12, updateComponentProps as updateComponentProps12 } from "@threadlabs/looma/core/declarative";
435
+ import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
436
+ var definition12 = { ...{ "contract": { "tag": "ui-disclosure", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false }, "summary": { "type": "string", "required": false, "target": { "attribute": "summary" }, "default": "Details" } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [{ "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure__trigger" }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "attribute", "name": "aria-controls", "expression": "contentId", "expressionPlan": { "source": "contentId", "ast": { "kind": "id", "name": "contentId" }, "dependencies": ["contentId"] } }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "span", "attributes": [], "children": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "summary", "expressionPlan": { "source": "summary", "ast": { "kind": "id", "name": "summary" }, "dependencies": ["summary"] } }], "children": [] }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure__chevron" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [] }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure__panel" }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "disclosure__panel-inner" }], "children": [{ "kind": "slot" }] }] }] }, "declarations": [{ "kind": "state", "name": "internalOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "contentId", "expression": { "source": "''", "ast": { "kind": "literal", "value": "" }, "dependencies": [] } }, { "kind": "event", "name": "open", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "close", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
437
+ function UiDisclosure(props) {
438
+ const { "disabled": prop0 = false, "open": prop1 = false, "summary": prop2 = "Details", onOpen, onClose, slots, children, ref, ...nativeProps } = props;
439
+ const root = useRef13(null);
440
+ const setRoot = (node) => {
441
+ root.current = node;
442
+ if (typeof ref === "function") ref(node);
443
+ else if (ref != null) ref.current = node;
444
+ };
445
+ const componentProps = { "disabled": props["disabled"], "open": props["open"], "summary": props["summary"] };
446
+ useLayoutEffect13(() => root.current == null ? void 0 : attachLoomaComponent12(root.current, definition12, "ui-disclosure", componentProps), []);
447
+ useLayoutEffect13(() => {
448
+ if (root.current != null) updateComponentProps12(root.current, componentProps);
449
+ });
450
+ useLayoutEffect13(() => {
451
+ const node = root.current;
452
+ if (node == null || onOpen == null) return;
453
+ const listener0 = (event) => onOpen(event.detail, event);
454
+ node.addEventListener("open", listener0);
455
+ return () => node.removeEventListener("open", listener0);
456
+ }, [onOpen]);
457
+ useLayoutEffect13(() => {
458
+ const node = root.current;
459
+ if (node == null || onClose == null) return;
460
+ const listener1 = (event) => onClose(event.detail, event);
461
+ node.addEventListener("close", listener1);
462
+ return () => node.removeEventListener("close", listener1);
463
+ }, [onClose]);
464
+ return /* @__PURE__ */ jsxs6("div", { ...nativeProps, "data-component": "ui-disclosure", "data-component-root": "ui-disclosure", ref: setRoot, children: [
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 }) }),
467
+ /* @__PURE__ */ jsx13("span", { className: "disclosure__chevron", "aria-hidden": "true", "data-component": "ui-disclosure" })
468
+ ] }),
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 }) })
470
+ ] });
471
+ }
472
+
473
+ // src/generated/UiEditable.tsx
474
+ import { useLayoutEffect as useLayoutEffect14, useRef as useRef14 } from "react";
475
+ import { attachLoomaComponent as attachLoomaComponent13, updateComponentProps as updateComponentProps13 } from "@threadlabs/looma/core/declarative";
476
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
477
+ var definition13 = { ...{ "contract": { "tag": "ui-editable", "props": { "actions": { "type": "boolean", "required": false, "target": { "attribute": "actions" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "data-disabled" }, "default": false }, "edit": { "type": "boolean", "required": false, "target": { "attribute": "edit" }, "default": false }, "hint": { "type": "string", "required": false, "target": { "attribute": "hint" }, "default": "" }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "Edit value" }, "value": { "type": "string", "required": false, "target": { "attribute": "value" }, "default": "" } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "attribute", "name": "data-state-edit", "expression": "internalEdit", "expressionPlan": { "source": "internalEdit", "ast": { "kind": "id", "name": "internalEdit" }, "dependencies": ["internalEdit"] } }, { "kind": "attribute", "name": "data-disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "editable__field" }], "children": [{ "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "editable__preview" }, { "kind": "literal", "name": "type", "value": "button" }], "children": [{ "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "editable__text" }], "children": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "internalValue", "expressionPlan": { "source": "internalValue", "ast": { "kind": "id", "name": "internalValue" }, "dependencies": ["internalValue"] } }], "children": [] }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "editable__hint" }, { "kind": "literal", "name": "aria-hidden", "value": "true" }], "children": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "hint", "expressionPlan": { "source": "hint", "ast": { "kind": "id", "name": "hint" }, "dependencies": ["hint"] } }], "children": [] }], "flow": { "kind": "if", "test": "hint", "testPlan": { "source": "hint", "ast": { "kind": "id", "name": "hint" }, "dependencies": ["hint"] } } }] }, { "kind": "element", "name": "input", "attributes": [{ "kind": "literal", "name": "class", "value": "editable__input" }, { "kind": "literal", "name": "type", "value": "text" }, { "kind": "attribute", "name": "value", "expression": "draft", "expressionPlan": { "source": "draft", "ast": { "kind": "id", "name": "draft" }, "dependencies": ["draft"] } }], "children": [] }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "editable__actions" }], "children": [{ "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "type", "value": "button" }, { "kind": "literal", "name": "data-action", "value": "save" }], "children": [{ "kind": "text", "value": "Save" }] }, { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "type", "value": "button" }, { "kind": "literal", "name": "data-action", "value": "cancel" }], "children": [{ "kind": "text", "value": "Cancel" }] }], "flow": { "kind": "if", "test": "actions", "testPlan": { "source": "actions", "ast": { "kind": "id", "name": "actions" }, "dependencies": ["actions"] } } }] }, "declarations": [{ "kind": "state", "name": "internalEdit", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "internalValue", "expression": { "source": "''", "ast": { "kind": "literal", "value": "" }, "dependencies": [] } }, { "kind": "state", "name": "draft", "expression": { "source": "''", "ast": { "kind": "literal", "value": "" }, "dependencies": [] } }, { "kind": "event", "name": "input", "type": "object({ value: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "change", "type": "object({ value: string, previousValue: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "edit-change", "type": "object({ edit: boolean, reason: activate | commit | cancel | light-dismiss | escape | programmatic, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
478
+ function UiEditable(props) {
479
+ const { "actions": prop0 = false, "disabled": prop1 = false, "edit": prop2 = false, "hint": prop3 = "", "label": prop4 = "Edit value", "value": prop5 = "", onInput, onChange, onEditChange, slots, children, ref, ...nativeProps } = props;
480
+ const root = useRef14(null);
481
+ const setRoot = (node) => {
482
+ root.current = node;
483
+ if (typeof ref === "function") ref(node);
484
+ else if (ref != null) ref.current = node;
485
+ };
486
+ const componentProps = { "actions": props["actions"], "disabled": props["disabled"], "edit": props["edit"], "hint": props["hint"], "label": props["label"], "value": props["value"] };
487
+ useLayoutEffect14(() => root.current == null ? void 0 : attachLoomaComponent13(root.current, definition13, "ui-editable", componentProps), []);
488
+ useLayoutEffect14(() => {
489
+ if (root.current != null) updateComponentProps13(root.current, componentProps);
490
+ });
491
+ useLayoutEffect14(() => {
492
+ const node = root.current;
493
+ if (node == null || onInput == null) return;
494
+ const listener0 = (event) => onInput(event.detail, event);
495
+ node.addEventListener("input", listener0);
496
+ return () => node.removeEventListener("input", listener0);
497
+ }, [onInput]);
498
+ useLayoutEffect14(() => {
499
+ const node = root.current;
500
+ if (node == null || onChange == null) return;
501
+ const listener1 = (event) => onChange(event.detail, event);
502
+ node.addEventListener("change", listener1);
503
+ return () => node.removeEventListener("change", listener1);
504
+ }, [onChange]);
505
+ useLayoutEffect14(() => {
506
+ const node = root.current;
507
+ if (node == null || onEditChange == null) return;
508
+ const listener2 = (event) => onEditChange(event.detail, event);
509
+ node.addEventListener("edit-change", listener2);
510
+ return () => node.removeEventListener("edit-change", listener2);
511
+ }, [onEditChange]);
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
+ /* @__PURE__ */ jsxs7("div", { className: "editable__field", "data-component": "ui-editable", children: [
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 }) })
517
+ ] }),
518
+ /* @__PURE__ */ jsx14("input", { className: "editable__input", type: "text", value: void 0, "data-component": "ui-editable" })
519
+ ] }),
520
+ /* @__PURE__ */ jsxs7("div", { className: "editable__actions", "data-component": "ui-editable", children: [
521
+ /* @__PURE__ */ jsx14("button", { type: "button", "data-action": "save", "data-component": "ui-editable", children: "Save" }),
522
+ /* @__PURE__ */ jsx14("button", { type: "button", "data-action": "cancel", "data-component": "ui-editable", children: "Cancel" })
523
+ ] })
524
+ ] });
525
+ }
526
+
527
+ // src/generated/UiFormField.tsx
528
+ import { useLayoutEffect as useLayoutEffect15, useRef as useRef15 } from "react";
529
+ import { attachLoomaComponent as attachLoomaComponent14, updateComponentProps as updateComponentProps14 } from "@threadlabs/looma/core/declarative";
530
+ import { jsxs as jsxs8 } from "react/jsx-runtime";
531
+ var definition14 = { ...{ "contract": { "tag": "ui-form-field", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "data-disabled" }, "default": false }, "invalid": { "type": "boolean", "required": false, "target": { "attribute": "data-invalid" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "data-required" }, "default": false } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "attribute", "name": "data-invalid", "expression": "invalid", "expressionPlan": { "source": "invalid", "ast": { "kind": "id", "name": "invalid" }, "dependencies": ["invalid"] } }, { "kind": "attribute", "name": "data-disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "data-required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }], "children": [{ "kind": "slot", "fallback": [], "name": "label" }, { "kind": "slot" }, { "kind": "slot", "fallback": [], "name": "help" }, { "kind": "slot", "fallback": [], "name": "error" }] }, "declarations": [], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
532
+ function UiFormField(props) {
533
+ const { "disabled": prop0 = false, "invalid": prop1 = false, "required": prop2 = false, slots, children, ref, ...nativeProps } = props;
534
+ const root = useRef15(null);
535
+ const setRoot = (node) => {
536
+ root.current = node;
537
+ if (typeof ref === "function") ref(node);
538
+ else if (ref != null) ref.current = node;
539
+ };
540
+ const componentProps = { "disabled": props["disabled"], "invalid": props["invalid"], "required": props["required"] };
541
+ useLayoutEffect15(() => root.current == null ? void 0 : attachLoomaComponent14(root.current, definition14, "ui-form-field", componentProps), []);
542
+ useLayoutEffect15(() => {
543
+ if (root.current != null) updateComponentProps14(root.current, componentProps);
544
+ });
545
+ return /* @__PURE__ */ jsxs8("div", { ...nativeProps, "data-component": "ui-form-field", "data-component-root": "ui-form-field", "data-invalid": prop1 ? "" : void 0, "data-disabled": prop0 ? "" : void 0, "data-required": prop2 ? "" : void 0, ref: setRoot, children: [
546
+ slots?.["label"] ?? null,
547
+ children ?? null,
548
+ slots?.["help"] ?? null,
549
+ slots?.["error"] ?? null
550
+ ] });
551
+ }
552
+
553
+ // src/generated/UiIconButton.tsx
554
+ import { useLayoutEffect as useLayoutEffect16, useRef as useRef16 } from "react";
555
+ import { attachLoomaComponent as attachLoomaComponent15, updateComponentProps as updateComponentProps15 } from "@threadlabs/looma/core/declarative";
556
+ import { jsx as jsx15 } from "react/jsx-runtime";
557
+ var definition15 = { ...{ "contract": { "tag": "ui-icon-button", "props": { "anticipatory": { "type": "boolean", "required": false, "target": { "attribute": "anticipatory" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "label": { "type": "string", "required": false, "target": { "attribute": "aria-label" }, "default": "" }, "round": { "type": "boolean", "required": false, "target": { "attribute": "data-round" }, "default": false }, "size": { "type": { "enum": ["sm", "md", "lg"] }, "required": false, "target": { "attribute": "size" }, "default": "md" }, "variant": { "type": { "enum": ["ghost", "outline", "solid"] }, "required": false, "target": { "attribute": "variant" }, "default": "ghost" } } }, "template": { "kind": "element", "name": "button", "attributes": [{ "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "data-round", "expression": "round", "expressionPlan": { "source": "round", "ast": { "kind": "id", "name": "round" }, "dependencies": ["round"] } }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "attribute", "name": "aria-label", "expression": "label", "expressionPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } }], "children": [{ "kind": "slot" }] }, "declarations": [], "root": { "kind": "native", "element": "button", "choices": ["button"] } }, source: { file: import.meta.url }, css: "" };
558
+ function UiIconButton(props) {
559
+ const { "anticipatory": prop0 = false, "disabled": prop1 = false, "label": prop2 = "", "round": prop3 = false, "size": prop4 = "md", "variant": prop5 = "ghost", slots, children, ref, ...nativeProps } = props;
560
+ const root = useRef16(null);
561
+ const setRoot = (node) => {
562
+ root.current = node;
563
+ if (typeof ref === "function") ref(node);
564
+ else if (ref != null) ref.current = node;
565
+ };
566
+ const componentProps = { "anticipatory": props["anticipatory"], "disabled": props["disabled"], "label": props["label"], "round": props["round"], "size": props["size"], "variant": props["variant"] };
567
+ useLayoutEffect16(() => root.current == null ? void 0 : attachLoomaComponent15(root.current, definition15, "ui-icon-button", componentProps), []);
568
+ useLayoutEffect16(() => {
569
+ if (root.current != null) updateComponentProps15(root.current, componentProps);
570
+ });
571
+ return /* @__PURE__ */ jsx15("button", { ...nativeProps, "data-component": "ui-icon-button", "data-component-root": "ui-icon-button", disabled: prop1 ?? void 0, "data-round": prop3 ? "" : void 0, type: "button", "aria-label": prop2 ?? void 0, ref: setRoot, children: children ?? null });
572
+ }
573
+
574
+ // src/generated/UiInput.tsx
575
+ import { useLayoutEffect as useLayoutEffect17, useRef as useRef17 } from "react";
576
+ import { attachLoomaComponent as attachLoomaComponent16, updateComponentProps as updateComponentProps16 } from "@threadlabs/looma/core/declarative";
577
+ import { jsx as jsx16 } from "react/jsx-runtime";
578
+ var definition16 = { ...{ "contract": { "tag": "ui-input", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "invalid": { "type": "boolean", "required": false, "target": { "attribute": "invalid" }, "default": false }, "readonly": { "type": "boolean", "required": false, "target": { "attribute": "readonly" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" } } } }, "template": { "kind": "element", "name": "input", "attributes": [{ "kind": "attribute", "name": "value", "expression": "value", "expressionPlan": { "source": "value", "ast": { "kind": "id", "name": "value" }, "dependencies": ["value"] } }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "readonly", "expression": "readonly", "expressionPlan": { "source": "readonly", "ast": { "kind": "id", "name": "readonly" }, "dependencies": ["readonly"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }], "children": [] }, "declarations": [], "root": { "kind": "native", "element": "input", "choices": ["input"] } }, source: { file: import.meta.url }, css: "" };
579
+ function UiInput(props) {
580
+ const { "disabled": prop0 = false, "invalid": prop1 = false, "readOnly": prop2 = false, "required": prop3 = false, "value": prop4, slots, children, ref, ...nativeProps } = props;
581
+ const root = useRef17(null);
582
+ const setRoot = (node) => {
583
+ root.current = node;
584
+ if (typeof ref === "function") ref(node);
585
+ else if (ref != null) ref.current = node;
586
+ };
587
+ const componentProps = { "disabled": props["disabled"], "invalid": props["invalid"], "readonly": props["readOnly"], "required": props["required"], "value": props["value"] };
588
+ useLayoutEffect17(() => root.current == null ? void 0 : attachLoomaComponent16(root.current, definition16, "ui-input", componentProps), []);
589
+ useLayoutEffect17(() => {
590
+ if (root.current != null) updateComponentProps16(root.current, componentProps);
591
+ });
592
+ return /* @__PURE__ */ jsx16("input", { ...nativeProps, "data-component": "ui-input", "data-component-root": "ui-input", value: prop4 ?? void 0, disabled: prop0 ?? void 0, readOnly: prop2 ?? void 0, required: prop3 ?? void 0, ref: setRoot });
593
+ }
594
+
595
+ // src/generated/UiMenuItem.tsx
596
+ import { useLayoutEffect as useLayoutEffect18, useRef as useRef18 } from "react";
597
+ import { manageGeneratedProps as manageGeneratedProps2, updateGeneratedProps as updateGeneratedProps2 } from "@threadlabs/looma/core/declarative-generated";
598
+ import { jsx as jsx17 } from "react/jsx-runtime";
599
+ function UiMenuItem(props) {
600
+ const { "disabled": prop0 = false, "value": prop1 = "", slots, children, ref, ...nativeProps } = props;
601
+ const root = useRef18(null);
602
+ const setRoot = (node) => {
603
+ root.current = node;
604
+ if (typeof ref === "function") ref(node);
605
+ else if (ref != null) ref.current = node;
606
+ };
607
+ const componentProps = { "disabled": props["disabled"], "value": props["value"] };
608
+ useLayoutEffect18(() => root.current == null ? void 0 : manageGeneratedProps2(root.current, [
609
+ { name: "disabled", attribute: "data-disabled", value: props["disabled"], default: false, type: "boolean", required: false },
610
+ { name: "value", attribute: "data-value", value: props["value"], default: "", bound: true, type: "string", required: false }
611
+ ]), []);
612
+ useLayoutEffect18(() => {
613
+ if (root.current != null) updateGeneratedProps2(root.current, componentProps);
614
+ });
615
+ return /* @__PURE__ */ jsx17("div", { ...nativeProps, "data-component": "ui-menu-item", "data-component-root": "ui-menu-item", role: "menuitem", "data-value": prop1 ?? void 0, ref: setRoot, children: /* @__PURE__ */ jsx17("span", { className: "menu-item__surface", "data-component": "ui-menu-item", children: children ?? null }) });
616
+ }
617
+
618
+ // src/generated/UiPopover.tsx
619
+ import { useLayoutEffect as useLayoutEffect19, useRef as useRef19 } from "react";
620
+ import { attachLoomaComponent as attachLoomaComponent17, updateComponentProps as updateComponentProps17 } from "@threadlabs/looma/core/declarative";
621
+ import { jsx as jsx18 } from "react/jsx-runtime";
622
+ var definition17 = { ...{ "contract": { "tag": "ui-popover", "props": { "for": { "type": "string", "required": false, "target": { "attribute": "for" }, "default": "" }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false }, "placement": { "type": "string", "required": false, "target": { "attribute": "placement" }, "default": "bottom-start" } } }, "template": { "kind": "element", "name": "span", "attributes": [{ "kind": "attribute", "name": "data-state-open", "expression": "internalOpen", "expressionPlan": { "source": "internalOpen", "ast": { "kind": "id", "name": "internalOpen" }, "dependencies": ["internalOpen"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "popover__surface" }], "children": [{ "kind": "slot" }] }] }, "declarations": [{ "kind": "state", "name": "internalOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "open", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "close", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "span", "choices": ["span"] } }, source: { file: import.meta.url }, css: "" };
623
+ function UiPopover(props) {
624
+ const { "for": prop0 = "", "open": prop1 = false, "placement": prop2 = "bottom-start", onOpen, onClose, slots, children, ref, ...nativeProps } = props;
625
+ const root = useRef19(null);
626
+ const setRoot = (node) => {
627
+ root.current = node;
628
+ if (typeof ref === "function") ref(node);
629
+ else if (ref != null) ref.current = node;
630
+ };
631
+ const componentProps = { "for": props["for"], "open": props["open"], "placement": props["placement"] };
632
+ useLayoutEffect19(() => root.current == null ? void 0 : attachLoomaComponent17(root.current, definition17, "ui-popover", componentProps), []);
633
+ useLayoutEffect19(() => {
634
+ if (root.current != null) updateComponentProps17(root.current, componentProps);
635
+ });
636
+ useLayoutEffect19(() => {
637
+ const node = root.current;
638
+ if (node == null || onOpen == null) return;
639
+ const listener0 = (event) => onOpen(event.detail, event);
640
+ node.addEventListener("open", listener0);
641
+ return () => node.removeEventListener("open", listener0);
642
+ }, [onOpen]);
643
+ useLayoutEffect19(() => {
644
+ const node = root.current;
645
+ if (node == null || onClose == null) return;
646
+ const listener1 = (event) => onClose(event.detail, event);
647
+ node.addEventListener("close", listener1);
648
+ return () => node.removeEventListener("close", listener1);
649
+ }, [onClose]);
650
+ return /* @__PURE__ */ jsx18("span", { ...nativeProps, "data-component": "ui-popover", "data-component-root": "ui-popover", "data-state-open": void 0, ref: setRoot, children: /* @__PURE__ */ jsx18("div", { className: "popover__surface", "data-component": "ui-popover", children: children ?? null }) });
651
+ }
652
+
653
+ // src/generated/UiRadioGroup.tsx
654
+ import { useLayoutEffect as useLayoutEffect20, useRef as useRef20 } from "react";
655
+ import { attachLoomaComponent as attachLoomaComponent18, updateComponentProps as updateComponentProps18 } from "@threadlabs/looma/core/declarative";
656
+ import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
657
+ var definition18 = { ...{ "contract": { "tag": "ui-radio-group", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "data-disabled" }, "default": false }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "Options" }, "name": { "type": "string", "required": false, "target": { "attribute": "name" }, "default": "" }, "orientation": { "type": { "enum": ["horizontal", "vertical"] }, "required": false, "target": { "attribute": "data-orientation" }, "default": "horizontal" }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" }, "default": "" } } }, "template": { "kind": "element", "name": "fieldset", "attributes": [{ "kind": "literal", "name": "role", "value": "radiogroup" }, { "kind": "attribute", "name": "data-orientation", "expression": "orientation", "expressionPlan": { "source": "orientation", "ast": { "kind": "id", "name": "orientation" }, "dependencies": ["orientation"] } }, { "kind": "attribute", "name": "data-disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "legend", "attributes": [], "children": [{ "kind": "element", "name": "template", "attributes": [{ "kind": "directive", "name": "value", "expression": "label", "expressionPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } }], "children": [] }] }, { "kind": "slot" }] }, "declarations": [{ "kind": "state", "name": "internalValue", "expression": { "source": "''", "ast": { "kind": "literal", "value": "" }, "dependencies": [] } }, { "kind": "event", "name": "select", "type": "object({ value: string, previousValue: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "change", "type": "object({ checked: boolean, value: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "fieldset", "choices": ["fieldset"] } }, source: { file: import.meta.url }, css: "" };
658
+ function UiRadioGroup(props) {
659
+ const { "disabled": prop0 = false, "label": prop1 = "Options", "name": prop2 = "", "orientation": prop3 = "horizontal", "required": prop4 = false, "value": prop5 = "", onSelect, onChange, slots, children, ref, ...nativeProps } = props;
660
+ const root = useRef20(null);
661
+ const setRoot = (node) => {
662
+ root.current = node;
663
+ if (typeof ref === "function") ref(node);
664
+ else if (ref != null) ref.current = node;
665
+ };
666
+ const componentProps = { "disabled": props["disabled"], "label": props["label"], "name": props["name"], "orientation": props["orientation"], "required": props["required"], "value": props["value"] };
667
+ useLayoutEffect20(() => root.current == null ? void 0 : attachLoomaComponent18(root.current, definition18, "ui-radio-group", componentProps), []);
668
+ useLayoutEffect20(() => {
669
+ if (root.current != null) updateComponentProps18(root.current, componentProps);
670
+ });
671
+ useLayoutEffect20(() => {
672
+ const node = root.current;
673
+ if (node == null || onSelect == null) return;
674
+ const listener0 = (event) => onSelect(event.detail, event);
675
+ node.addEventListener("select", listener0);
676
+ return () => node.removeEventListener("select", listener0);
677
+ }, [onSelect]);
678
+ useLayoutEffect20(() => {
679
+ const node = root.current;
680
+ if (node == null || onChange == null) return;
681
+ const listener1 = (event) => onChange(event.detail, event);
682
+ node.addEventListener("change", listener1);
683
+ return () => node.removeEventListener("change", listener1);
684
+ }, [onChange]);
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 }) }),
687
+ children ?? null
688
+ ] });
689
+ }
690
+
691
+ // src/generated/UiRadio.tsx
692
+ import { useLayoutEffect as useLayoutEffect21, useRef as useRef21 } from "react";
693
+ import { attachLoomaComponent as attachLoomaComponent19, updateComponentProps as updateComponentProps19 } from "@threadlabs/looma/core/declarative";
694
+ import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
695
+ var definition19 = { ...{ "contract": { "tag": "ui-radio", "props": { "checked": { "type": "boolean", "required": false, "target": { "attribute": "checked" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "data-disabled" }, "default": false }, "name": { "type": "string", "required": false, "target": { "attribute": "name" }, "default": "" }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" }, "default": "on" } } }, "template": { "kind": "element", "name": "span", "attributes": [{ "kind": "attribute", "name": "data-disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "label", "attributes": [{ "kind": "literal", "name": "class", "value": "control" }], "children": [{ "kind": "element", "name": "input", "attributes": [{ "kind": "literal", "name": "type", "value": "radio" }, { "kind": "attribute", "name": "checked", "expression": "internalChecked", "expressionPlan": { "source": "internalChecked", "ast": { "kind": "id", "name": "internalChecked" }, "dependencies": ["internalChecked"] } }, { "kind": "attribute", "name": "name", "expression": "name", "expressionPlan": { "source": "name", "ast": { "kind": "id", "name": "name" }, "dependencies": ["name"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "attribute", "name": "value", "expression": "value", "expressionPlan": { "source": "value", "ast": { "kind": "id", "name": "value" }, "dependencies": ["value"] } }], "children": [] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "label" }], "children": [{ "kind": "slot" }] }] }] }, "declarations": [{ "kind": "state", "name": "internalChecked", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "change", "type": "object({ checked: boolean, value: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "span", "choices": ["span"] } }, source: { file: import.meta.url }, css: "" };
696
+ function UiRadio(props) {
697
+ const { "checked": prop0 = false, "disabled": prop1 = false, "name": prop2 = "", "required": prop3 = false, "value": prop4 = "on", onChange, slots, children, ref, ...nativeProps } = props;
698
+ const root = useRef21(null);
699
+ const setRoot = (node) => {
700
+ root.current = node;
701
+ if (typeof ref === "function") ref(node);
702
+ else if (ref != null) ref.current = node;
703
+ };
704
+ const componentProps = { "checked": props["checked"], "disabled": props["disabled"], "name": props["name"], "required": props["required"], "value": props["value"] };
705
+ useLayoutEffect21(() => root.current == null ? void 0 : attachLoomaComponent19(root.current, definition19, "ui-radio", componentProps), []);
706
+ useLayoutEffect21(() => {
707
+ if (root.current != null) updateComponentProps19(root.current, componentProps);
708
+ });
709
+ useLayoutEffect21(() => {
710
+ const node = root.current;
711
+ if (node == null || onChange == null) return;
712
+ const listener0 = (event) => onChange(event.detail, event);
713
+ node.addEventListener("change", listener0);
714
+ return () => node.removeEventListener("change", listener0);
715
+ }, [onChange]);
716
+ return /* @__PURE__ */ jsx20("span", { ...nativeProps, "data-component": "ui-radio", "data-component-root": "ui-radio", "data-disabled": prop1 ? "" : void 0, ref: setRoot, children: /* @__PURE__ */ jsxs10("label", { className: "control", "data-component": "ui-radio", children: [
717
+ /* @__PURE__ */ jsx20("input", { type: "radio", checked: void 0, name: prop2 ?? void 0, required: prop3 ?? void 0, value: prop4 ?? void 0, "data-component": "ui-radio" }),
718
+ /* @__PURE__ */ jsx20("span", { className: "label", "data-component": "ui-radio", children: children ?? null })
719
+ ] }) });
720
+ }
721
+
722
+ // src/generated/UiSearchResultRow.tsx
723
+ import { useLayoutEffect as useLayoutEffect22, useRef as useRef22 } from "react";
724
+ import { attachLoomaComponent as attachLoomaComponent20, updateComponentProps as updateComponentProps20 } from "@threadlabs/looma/core/declarative";
725
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
726
+ var definition20 = { ...{ "contract": { "tag": "ui-search-result-row", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "selected": { "type": "boolean", "required": false, "target": { "attribute": "data-selected" }, "default": false } } }, "template": { "kind": "element", "name": "button", "attributes": [{ "kind": "literal", "name": "class", "value": "search-result-row" }, { "kind": "literal", "name": "type", "value": "button" }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "data-selected", "expression": "selected", "expressionPlan": { "source": "selected", "ast": { "kind": "id", "name": "selected" }, "dependencies": ["selected"] } }, { "kind": "literal", "name": "part", "value": "button" }], "children": [{ "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "search-result-row__leading" }, { "kind": "literal", "name": "part", "value": "leading" }, { "kind": "attribute", "name": "hidden", "expression": "not hasLeading", "expressionPlan": { "source": "not hasLeading", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "hasLeading" } }, "dependencies": ["hasLeading"] } }], "children": [{ "kind": "slot", "fallback": [], "name": "leading" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "search-result-row__content" }, { "kind": "literal", "name": "part", "value": "content" }], "children": [{ "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "search-result-row__title" }, { "kind": "literal", "name": "part", "value": "title" }], "children": [{ "kind": "slot", "fallback": [], "name": "title" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "search-result-row__meta" }, { "kind": "literal", "name": "part", "value": "meta" }, { "kind": "attribute", "name": "hidden", "expression": "not hasMeta", "expressionPlan": { "source": "not hasMeta", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "hasMeta" } }, "dependencies": ["hasMeta"] } }], "children": [{ "kind": "slot", "fallback": [], "name": "meta" }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "search-result-row__excerpt" }, { "kind": "literal", "name": "part", "value": "excerpt" }, { "kind": "attribute", "name": "hidden", "expression": "not hasExcerpt", "expressionPlan": { "source": "not hasExcerpt", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "hasExcerpt" } }, "dependencies": ["hasExcerpt"] } }], "children": [{ "kind": "slot", "fallback": [], "name": "excerpt" }] }] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "search-result-row__trailing" }, { "kind": "literal", "name": "part", "value": "trailing" }, { "kind": "attribute", "name": "hidden", "expression": "not hasTrailing", "expressionPlan": { "source": "not hasTrailing", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "hasTrailing" } }, "dependencies": ["hasTrailing"] } }], "children": [{ "kind": "slot", "fallback": [], "name": "trailing" }] }] }, "declarations": [{ "kind": "state", "name": "hasLeading", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasMeta", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasExcerpt", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasTrailing", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }], "root": { "kind": "native", "element": "button", "choices": ["button"] } }, source: { file: import.meta.url }, css: "" };
727
+ function UiSearchResultRow(props) {
728
+ const { "disabled": prop0 = false, "selected": prop1 = false, slots, children, ref, ...nativeProps } = props;
729
+ const root = useRef22(null);
730
+ const setRoot = (node) => {
731
+ root.current = node;
732
+ if (typeof ref === "function") ref(node);
733
+ else if (ref != null) ref.current = node;
734
+ };
735
+ const componentProps = { "disabled": props["disabled"], "selected": props["selected"] };
736
+ useLayoutEffect22(() => root.current == null ? void 0 : attachLoomaComponent20(root.current, definition20, "ui-search-result-row", componentProps), []);
737
+ useLayoutEffect22(() => {
738
+ if (root.current != null) updateComponentProps20(root.current, componentProps);
739
+ });
740
+ return /* @__PURE__ */ jsxs11("button", { ...nativeProps, "data-component": "ui-search-result-row", "data-component-root": "ui-search-result-row", className: "search-result-row", type: "button", disabled: prop0 ?? void 0, "data-selected": prop1 ? "" : void 0, part: "button", ref: setRoot, children: [
741
+ /* @__PURE__ */ jsx21("span", { className: "search-result-row__leading", part: "leading", hidden: void 0, "data-component": "ui-search-result-row", children: slots?.["leading"] ?? null }),
742
+ /* @__PURE__ */ jsxs11("span", { className: "search-result-row__content", part: "content", "data-component": "ui-search-result-row", children: [
743
+ /* @__PURE__ */ jsx21("span", { className: "search-result-row__title", part: "title", "data-component": "ui-search-result-row", children: slots?.["title"] ?? null }),
744
+ /* @__PURE__ */ jsx21("span", { className: "search-result-row__meta", part: "meta", hidden: void 0, "data-component": "ui-search-result-row", children: slots?.["meta"] ?? null }),
745
+ /* @__PURE__ */ jsx21("span", { className: "search-result-row__excerpt", part: "excerpt", hidden: void 0, "data-component": "ui-search-result-row", children: slots?.["excerpt"] ?? null })
746
+ ] }),
747
+ /* @__PURE__ */ jsx21("span", { className: "search-result-row__trailing", part: "trailing", hidden: void 0, "data-component": "ui-search-result-row", children: slots?.["trailing"] ?? null })
748
+ ] });
749
+ }
750
+
751
+ // src/generated/UiSearchShell.tsx
752
+ import { useLayoutEffect as useLayoutEffect23, useRef as useRef23 } from "react";
753
+ import { attachLoomaComponent as attachLoomaComponent21, updateComponentProps as updateComponentProps21 } from "@threadlabs/looma/core/declarative";
754
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
755
+ var definition21 = { ...{ "contract": { "tag": "ui-search-shell", "props": { "dismissible": { "type": "boolean", "required": false, "target": { "attribute": "dismissible" }, "default": false }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "Search" }, "modal": { "type": "boolean", "required": false, "target": { "attribute": "modal" }, "default": false }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [{ "kind": "element", "name": "dialog", "attributes": [{ "kind": "literal", "name": "class", "value": "search-shell" }, { "kind": "literal", "name": "part", "value": "base" }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "search-shell__panel" }, { "kind": "literal", "name": "part", "value": "panel" }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "search-shell__search" }, { "kind": "literal", "name": "part", "value": "search" }], "children": [{ "kind": "slot", "fallback": [], "name": "search" }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "search-shell__status" }, { "kind": "literal", "name": "part", "value": "status" }], "children": [{ "kind": "slot", "fallback": [], "name": "status" }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "search-shell__body" }, { "kind": "literal", "name": "part", "value": "body" }], "children": [{ "kind": "slot", "fallback": [], "name": "body" }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "search-shell__footer" }, { "kind": "literal", "name": "part", "value": "footer" }], "children": [{ "kind": "slot", "fallback": [], "name": "footer" }] }] }] }] }, "declarations": [{ "kind": "state", "name": "internalOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "close", "type": "object({ open: boolean, reason: action | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
756
+ function UiSearchShell(props) {
757
+ const { "dismissible": prop0 = false, "label": prop1 = "Search", "modal": prop2 = false, "open": prop3 = false, onClose, slots, children, ref, ...nativeProps } = props;
758
+ const root = useRef23(null);
759
+ const setRoot = (node) => {
760
+ root.current = node;
761
+ if (typeof ref === "function") ref(node);
762
+ else if (ref != null) ref.current = node;
763
+ };
764
+ const componentProps = { "dismissible": props["dismissible"], "label": props["label"], "modal": props["modal"], "open": props["open"] };
765
+ useLayoutEffect23(() => root.current == null ? void 0 : attachLoomaComponent21(root.current, definition21, "ui-search-shell", componentProps), []);
766
+ useLayoutEffect23(() => {
767
+ if (root.current != null) updateComponentProps21(root.current, componentProps);
768
+ });
769
+ useLayoutEffect23(() => {
770
+ const node = root.current;
771
+ if (node == null || onClose == null) return;
772
+ const listener0 = (event) => onClose(event.detail, event);
773
+ node.addEventListener("close", listener0);
774
+ return () => node.removeEventListener("close", listener0);
775
+ }, [onClose]);
776
+ return /* @__PURE__ */ jsx22("div", { ...nativeProps, "data-component": "ui-search-shell", "data-component-root": "ui-search-shell", ref: setRoot, children: /* @__PURE__ */ jsx22("dialog", { className: "search-shell", part: "base", "data-component": "ui-search-shell", children: /* @__PURE__ */ jsxs12("div", { className: "search-shell__panel", part: "panel", "data-component": "ui-search-shell", children: [
777
+ /* @__PURE__ */ jsx22("div", { className: "search-shell__search", part: "search", "data-component": "ui-search-shell", children: slots?.["search"] ?? null }),
778
+ /* @__PURE__ */ jsx22("div", { className: "search-shell__status", part: "status", "data-component": "ui-search-shell", children: slots?.["status"] ?? null }),
779
+ /* @__PURE__ */ jsx22("div", { className: "search-shell__body", part: "body", "data-component": "ui-search-shell", children: slots?.["body"] ?? null }),
780
+ /* @__PURE__ */ jsx22("div", { className: "search-shell__footer", part: "footer", "data-component": "ui-search-shell", children: slots?.["footer"] ?? null })
781
+ ] }) }) });
782
+ }
783
+
784
+ // src/generated/UiSelect.tsx
785
+ import { useLayoutEffect as useLayoutEffect24, useRef as useRef24 } from "react";
786
+ import { attachLoomaComponent as attachLoomaComponent22, updateComponentProps as updateComponentProps22 } from "@threadlabs/looma/core/declarative";
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: "" };
789
+ function UiSelect(props) {
790
+ const { "disabled": prop0 = false, "invalid": prop1 = false, "multiple": prop2 = false, "required": prop3 = false, "value": prop4, slots, children, ref, ...nativeProps } = props;
791
+ const root = useRef24(null);
792
+ const setRoot = (node) => {
793
+ root.current = node;
794
+ if (typeof ref === "function") ref(node);
795
+ else if (ref != null) ref.current = node;
796
+ };
797
+ const componentProps = { "disabled": props["disabled"], "invalid": props["invalid"], "multiple": props["multiple"], "required": props["required"], "value": props["value"] };
798
+ useLayoutEffect24(() => root.current == null ? void 0 : attachLoomaComponent22(root.current, definition22, "ui-select", componentProps), []);
799
+ useLayoutEffect24(() => {
800
+ if (root.current != null) updateComponentProps22(root.current, componentProps);
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 });
803
+ }
804
+
805
+ // src/generated/UiSwitch.tsx
806
+ import { useLayoutEffect as useLayoutEffect25, useRef as useRef25 } from "react";
807
+ import { attachLoomaComponent as attachLoomaComponent23, updateComponentProps as updateComponentProps23 } from "@threadlabs/looma/core/declarative";
808
+ import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
809
+ var definition23 = { ...{ "contract": { "tag": "ui-switch", "props": { "checked": { "type": "boolean", "required": false, "target": { "attribute": "checked" }, "default": false }, "disabled": { "type": "boolean", "required": false, "target": { "attribute": "data-disabled" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" }, "default": "on" } } }, "template": { "kind": "element", "name": "span", "attributes": [{ "kind": "attribute", "name": "data-disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }], "children": [{ "kind": "element", "name": "label", "attributes": [{ "kind": "literal", "name": "class", "value": "control" }], "children": [{ "kind": "element", "name": "input", "attributes": [{ "kind": "literal", "name": "type", "value": "checkbox" }, { "kind": "literal", "name": "role", "value": "switch" }, { "kind": "attribute", "name": "checked", "expression": "internalChecked", "expressionPlan": { "source": "internalChecked", "ast": { "kind": "id", "name": "internalChecked" }, "dependencies": ["internalChecked"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "attribute", "name": "value", "expression": "value", "expressionPlan": { "source": "value", "ast": { "kind": "id", "name": "value" }, "dependencies": ["value"] } }], "children": [] }, { "kind": "element", "name": "span", "attributes": [{ "kind": "literal", "name": "class", "value": "label" }], "children": [{ "kind": "slot" }] }] }] }, "declarations": [{ "kind": "state", "name": "internalChecked", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "change", "type": "object({ checked: boolean, value: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "span", "choices": ["span"] } }, source: { file: import.meta.url }, css: "" };
810
+ function UiSwitch(props) {
811
+ const { "checked": prop0 = false, "disabled": prop1 = false, "required": prop2 = false, "value": prop3 = "on", onChange, slots, children, ref, ...nativeProps } = props;
812
+ const root = useRef25(null);
813
+ const setRoot = (node) => {
814
+ root.current = node;
815
+ if (typeof ref === "function") ref(node);
816
+ else if (ref != null) ref.current = node;
817
+ };
818
+ const componentProps = { "checked": props["checked"], "disabled": props["disabled"], "required": props["required"], "value": props["value"] };
819
+ useLayoutEffect25(() => root.current == null ? void 0 : attachLoomaComponent23(root.current, definition23, "ui-switch", componentProps), []);
820
+ useLayoutEffect25(() => {
821
+ if (root.current != null) updateComponentProps23(root.current, componentProps);
822
+ });
823
+ useLayoutEffect25(() => {
824
+ const node = root.current;
825
+ if (node == null || onChange == null) return;
826
+ const listener0 = (event) => onChange(event.detail, event);
827
+ node.addEventListener("change", listener0);
828
+ return () => node.removeEventListener("change", listener0);
829
+ }, [onChange]);
830
+ return /* @__PURE__ */ jsx24("span", { ...nativeProps, "data-component": "ui-switch", "data-component-root": "ui-switch", "data-disabled": prop1 ? "" : void 0, ref: setRoot, children: /* @__PURE__ */ jsxs13("label", { className: "control", "data-component": "ui-switch", children: [
831
+ /* @__PURE__ */ jsx24("input", { type: "checkbox", role: "switch", checked: void 0, required: prop2 ?? void 0, value: prop3 ?? void 0, "data-component": "ui-switch" }),
832
+ /* @__PURE__ */ jsx24("span", { className: "label", "data-component": "ui-switch", children: children ?? null })
833
+ ] }) });
834
+ }
835
+
836
+ // src/generated/UiTabs.tsx
837
+ import { useLayoutEffect as useLayoutEffect26, useRef as useRef26 } from "react";
838
+ import { attachLoomaComponent as attachLoomaComponent24, updateComponentProps as updateComponentProps24 } from "@threadlabs/looma/core/declarative";
839
+ import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
840
+ var definition24 = { ...{ "contract": { "tag": "ui-tabs", "props": { "label": { "type": "string", "required": false, "target": { "attribute": "aria-label" }, "default": "Tabs" }, "orientation": { "type": { "enum": ["horizontal", "vertical"] }, "required": false, "target": { "attribute": "data-orientation" }, "default": "horizontal" }, "stretch": { "type": "boolean", "required": false, "target": { "attribute": "data-stretch" }, "default": false }, "value": { "type": "string", "required": false, "target": { "attribute": "value" }, "default": "" } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "attribute", "name": "data-orientation", "expression": "orientation", "expressionPlan": { "source": "orientation", "ast": { "kind": "id", "name": "orientation" }, "dependencies": ["orientation"] } }, { "kind": "attribute", "name": "data-stretch", "expression": "stretch", "expressionPlan": { "source": "stretch", "ast": { "kind": "id", "name": "stretch" }, "dependencies": ["stretch"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "tabs__list" }, { "kind": "literal", "name": "role", "value": "tablist" }, { "kind": "attribute", "name": "aria-label", "expression": "label", "expressionPlan": { "source": "label", "ast": { "kind": "id", "name": "label" }, "dependencies": ["label"] } }], "children": [] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "tabs__panels" }], "children": [{ "kind": "slot" }] }] }, "declarations": [{ "kind": "state", "name": "internalValue", "expression": { "source": "''", "ast": { "kind": "literal", "value": "" }, "dependencies": [] } }, { "kind": "event", "name": "select", "type": "object({ value: string, previousValue: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
841
+ function UiTabs(props) {
842
+ const { "label": prop0 = "Tabs", "orientation": prop1 = "horizontal", "stretch": prop2 = false, "value": prop3 = "", onSelect, slots, children, ref, ...nativeProps } = props;
843
+ const root = useRef26(null);
844
+ const setRoot = (node) => {
845
+ root.current = node;
846
+ if (typeof ref === "function") ref(node);
847
+ else if (ref != null) ref.current = node;
848
+ };
849
+ const componentProps = { "label": props["label"], "orientation": props["orientation"], "stretch": props["stretch"], "value": props["value"] };
850
+ useLayoutEffect26(() => root.current == null ? void 0 : attachLoomaComponent24(root.current, definition24, "ui-tabs", componentProps), []);
851
+ useLayoutEffect26(() => {
852
+ if (root.current != null) updateComponentProps24(root.current, componentProps);
853
+ });
854
+ useLayoutEffect26(() => {
855
+ const node = root.current;
856
+ if (node == null || onSelect == null) return;
857
+ const listener0 = (event) => onSelect(event.detail, event);
858
+ node.addEventListener("select", listener0);
859
+ return () => node.removeEventListener("select", listener0);
860
+ }, [onSelect]);
861
+ return /* @__PURE__ */ jsxs14("div", { ...nativeProps, "data-component": "ui-tabs", "data-component-root": "ui-tabs", "data-orientation": prop1 ?? void 0, "data-stretch": prop2 ? "" : void 0, ref: setRoot, children: [
862
+ /* @__PURE__ */ jsx25("div", { className: "tabs__list", role: "tablist", "aria-label": prop0 ?? void 0, "data-component": "ui-tabs" }),
863
+ /* @__PURE__ */ jsx25("div", { className: "tabs__panels", "data-component": "ui-tabs", children: children ?? null })
864
+ ] });
865
+ }
866
+
867
+ // src/generated/UiTextarea.tsx
868
+ import { useLayoutEffect as useLayoutEffect27, useRef as useRef27 } from "react";
869
+ import { attachLoomaComponent as attachLoomaComponent25, updateComponentProps as updateComponentProps25 } from "@threadlabs/looma/core/declarative";
870
+ import { jsx as jsx26 } from "react/jsx-runtime";
871
+ var definition25 = { ...{ "contract": { "tag": "ui-textarea", "props": { "disabled": { "type": "boolean", "required": false, "target": { "attribute": "disabled" }, "default": false }, "invalid": { "type": "boolean", "required": false, "target": { "attribute": "invalid" }, "default": false }, "readonly": { "type": "boolean", "required": false, "target": { "attribute": "readonly" }, "default": false }, "required": { "type": "boolean", "required": false, "target": { "attribute": "required" }, "default": false }, "rows": { "type": { "kind": "terminal", "name": "integer" }, "required": false, "target": { "attribute": "rows" }, "default": 4 }, "value": { "type": "string", "required": false, "target": { "attribute": "value" } } } }, "template": { "kind": "element", "name": "textarea", "attributes": [{ "kind": "attribute", "name": "value", "expression": "value", "expressionPlan": { "source": "value", "ast": { "kind": "id", "name": "value" }, "dependencies": ["value"] } }, { "kind": "attribute", "name": "disabled", "expression": "disabled", "expressionPlan": { "source": "disabled", "ast": { "kind": "id", "name": "disabled" }, "dependencies": ["disabled"] } }, { "kind": "attribute", "name": "readonly", "expression": "readonly", "expressionPlan": { "source": "readonly", "ast": { "kind": "id", "name": "readonly" }, "dependencies": ["readonly"] } }, { "kind": "attribute", "name": "required", "expression": "required", "expressionPlan": { "source": "required", "ast": { "kind": "id", "name": "required" }, "dependencies": ["required"] } }, { "kind": "attribute", "name": "rows", "expression": "rows", "expressionPlan": { "source": "rows", "ast": { "kind": "id", "name": "rows" }, "dependencies": ["rows"] } }], "children": [] }, "declarations": [], "root": { "kind": "native", "element": "textarea", "choices": ["textarea"] } }, source: { file: import.meta.url }, css: "" };
872
+ function UiTextarea(props) {
873
+ const { "disabled": prop0 = false, "invalid": prop1 = false, "readOnly": prop2 = false, "required": prop3 = false, "rows": prop4 = 4, "value": prop5, slots, children, ref, ...nativeProps } = props;
874
+ const root = useRef27(null);
875
+ const setRoot = (node) => {
876
+ root.current = node;
877
+ if (typeof ref === "function") ref(node);
878
+ else if (ref != null) ref.current = node;
879
+ };
880
+ const componentProps = { "disabled": props["disabled"], "invalid": props["invalid"], "readonly": props["readOnly"], "required": props["required"], "rows": props["rows"], "value": props["value"] };
881
+ useLayoutEffect27(() => root.current == null ? void 0 : attachLoomaComponent25(root.current, definition25, "ui-textarea", componentProps), []);
882
+ useLayoutEffect27(() => {
883
+ if (root.current != null) updateComponentProps25(root.current, componentProps);
884
+ });
885
+ return /* @__PURE__ */ jsx26("textarea", { ...nativeProps, "data-component": "ui-textarea", "data-component-root": "ui-textarea", value: prop5 ?? void 0, disabled: prop0 ?? void 0, readOnly: prop2 ?? void 0, required: prop3 ?? void 0, rows: prop4 ?? void 0, ref: setRoot });
886
+ }
887
+
888
+ // src/generated/UiToastRegion.tsx
889
+ import { useLayoutEffect as useLayoutEffect28, useRef as useRef28 } from "react";
890
+ import { attachLoomaComponent as attachLoomaComponent26, updateComponentProps as updateComponentProps26 } from "@threadlabs/looma/core/declarative";
891
+ import { jsx as jsx27 } from "react/jsx-runtime";
892
+ var definition26 = { ...{ "contract": { "tag": "ui-toast-region", "props": { "auto": { "type": "boolean", "required": false, "target": { "attribute": "auto" }, "default": false }, "duration": { "type": "number", "required": false, "target": { "attribute": "duration" }, "default": 5e3 }, "message": { "type": "string", "required": false, "target": { "attribute": "message" }, "default": "Notification" }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "region" }, { "kind": "literal", "name": "aria-label", "value": "Notifications" }, { "kind": "literal", "name": "aria-live", "value": "polite" }, { "kind": "attribute", "name": "data-state-open", "expression": "internalOpen", "expressionPlan": { "source": "internalOpen", "ast": { "kind": "id", "name": "internalOpen" }, "dependencies": ["internalOpen"] } }], "children": [{ "kind": "slot" }] }, "declarations": [{ "kind": "state", "name": "internalOpen", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "close", "type": "object({ open: boolean, reason: action | timeout | programmatic | light-dismiss | escape, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "dismiss", "type": "object({ id: string, reason: action | timeout, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "method", "name": "show", "exportName": "show", "returns": "promise(string)" }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
893
+ function UiToastRegion(props) {
894
+ const { "auto": prop0 = false, "duration": prop1 = 5e3, "message": prop2 = "Notification", "open": prop3 = false, onClose, onDismiss, slots, children, ref, ...nativeProps } = props;
895
+ const root = useRef28(null);
896
+ const setRoot = (node) => {
897
+ root.current = node;
898
+ if (typeof ref === "function") ref(node);
899
+ else if (ref != null) ref.current = node;
900
+ };
901
+ const componentProps = { "auto": props["auto"], "duration": props["duration"], "message": props["message"], "open": props["open"] };
902
+ useLayoutEffect28(() => root.current == null ? void 0 : attachLoomaComponent26(root.current, definition26, "ui-toast-region", componentProps), []);
903
+ useLayoutEffect28(() => {
904
+ if (root.current != null) updateComponentProps26(root.current, componentProps);
905
+ });
906
+ useLayoutEffect28(() => {
907
+ const node = root.current;
908
+ if (node == null || onClose == null) return;
909
+ const listener0 = (event) => onClose(event.detail, event);
910
+ node.addEventListener("close", listener0);
911
+ return () => node.removeEventListener("close", listener0);
912
+ }, [onClose]);
913
+ useLayoutEffect28(() => {
914
+ const node = root.current;
915
+ if (node == null || onDismiss == null) return;
916
+ const listener1 = (event) => onDismiss(event.detail, event);
917
+ node.addEventListener("dismiss", listener1);
918
+ return () => node.removeEventListener("dismiss", listener1);
919
+ }, [onDismiss]);
920
+ return /* @__PURE__ */ jsx27("div", { ...nativeProps, "data-component": "ui-toast-region", "data-component-root": "ui-toast-region", role: "region", "aria-label": "Notifications", "aria-live": "polite", "data-state-open": void 0, ref: setRoot, children: children ?? null });
921
+ }
922
+
923
+ // src/generated/UiTopBar.tsx
924
+ import { useLayoutEffect as useLayoutEffect29, useRef as useRef29 } from "react";
925
+ import { attachLoomaComponent as attachLoomaComponent27, updateComponentProps as updateComponentProps27 } from "@threadlabs/looma/core/declarative";
926
+ import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
927
+ var definition27 = { ...{ "contract": { "tag": "ui-top-bar", "props": {} }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [{ "kind": "element", "name": "header", "attributes": [{ "kind": "literal", "name": "class", "value": "top-bar" }, { "kind": "literal", "name": "part", "value": "base" }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "top-bar__leading" }, { "kind": "attribute", "name": "hidden", "expression": "not hasLeading", "expressionPlan": { "source": "not hasLeading", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "hasLeading" } }, "dependencies": ["hasLeading"] } }], "children": [{ "kind": "slot", "fallback": [], "name": "leading" }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "top-bar__title" }], "children": [{ "kind": "slot" }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "top-bar__search" }, { "kind": "attribute", "name": "hidden", "expression": "not hasSearch", "expressionPlan": { "source": "not hasSearch", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "hasSearch" } }, "dependencies": ["hasSearch"] } }], "children": [{ "kind": "slot", "fallback": [], "name": "search" }] }, { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "top-bar__actions" }, { "kind": "attribute", "name": "hidden", "expression": "not hasActions", "expressionPlan": { "source": "not hasActions", "ast": { "kind": "unary", "op": "not", "operand": { "kind": "id", "name": "hasActions" } }, "dependencies": ["hasActions"] } }], "children": [{ "kind": "slot", "fallback": [], "name": "actions" }] }] }] }, "declarations": [{ "kind": "state", "name": "hasLeading", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasSearch", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "hasActions", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
928
+ function UiTopBar(props) {
929
+ const { slots, children, ref, ...nativeProps } = props;
930
+ const root = useRef29(null);
931
+ const setRoot = (node) => {
932
+ root.current = node;
933
+ if (typeof ref === "function") ref(node);
934
+ else if (ref != null) ref.current = node;
935
+ };
936
+ const componentProps = {};
937
+ useLayoutEffect29(() => root.current == null ? void 0 : attachLoomaComponent27(root.current, definition27, "ui-top-bar", componentProps), []);
938
+ useLayoutEffect29(() => {
939
+ if (root.current != null) updateComponentProps27(root.current, componentProps);
940
+ });
941
+ return /* @__PURE__ */ jsx28("div", { ...nativeProps, "data-component": "ui-top-bar", "data-component-root": "ui-top-bar", ref: setRoot, children: /* @__PURE__ */ jsxs15("header", { className: "top-bar", part: "base", "data-component": "ui-top-bar", children: [
942
+ /* @__PURE__ */ jsx28("div", { className: "top-bar__leading", hidden: void 0, "data-component": "ui-top-bar", children: slots?.["leading"] ?? null }),
943
+ /* @__PURE__ */ jsx28("div", { className: "top-bar__title", "data-component": "ui-top-bar", children: children ?? null }),
944
+ /* @__PURE__ */ jsx28("div", { className: "top-bar__search", hidden: void 0, "data-component": "ui-top-bar", children: slots?.["search"] ?? null }),
945
+ /* @__PURE__ */ jsx28("div", { className: "top-bar__actions", hidden: void 0, "data-component": "ui-top-bar", children: slots?.["actions"] ?? null })
946
+ ] }) });
947
+ }
948
+
949
+ // src/generated/UiTreeItem.tsx
950
+ import { useLayoutEffect as useLayoutEffect30, useRef as useRef30 } from "react";
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: "" };
954
+ function UiTreeItem(props) {
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
+ const root = useRef30(null);
957
+ const setRoot = (node) => {
958
+ root.current = node;
959
+ if (typeof ref === "function") ref(node);
960
+ else if (ref != null) ref.current = node;
961
+ };
962
+ const componentProps = { "accepts": props["accepts"], "container": props["container"], "disabled": props["disabled"], "dragType": props["dragType"], "dropDepth": props["dropDepth"], "dropScope": props["dropScope"], "expanded": props["expanded"], "itemId": props["itemId"], "label": props["label"], "selected": props["selected"], "sortable": props["sortable"], "subtreeDepth": props["subtreeDepth"] };
963
+ useLayoutEffect30(() => root.current == null ? void 0 : attachLoomaComponent28(root.current, definition28, "ui-tree-item", componentProps), []);
964
+ useLayoutEffect30(() => {
965
+ if (root.current != null) updateComponentProps28(root.current, componentProps);
966
+ });
967
+ useLayoutEffect30(() => {
968
+ const node = root.current;
969
+ if (node == null || onExpand == null) return;
970
+ const listener0 = (event) => onExpand(event.detail, event);
971
+ node.addEventListener("expand", listener0);
972
+ return () => node.removeEventListener("expand", listener0);
973
+ }, [onExpand]);
974
+ return /* @__PURE__ */ jsxs16("div", { ...nativeProps, "data-component": "ui-tree-item", "data-component-root": "ui-tree-item", role: "treeitem", "data-drop-scope": prop5 ?? void 0, "data-accepts": prop0 ?? void 0, ref: setRoot, children: [
975
+ /* @__PURE__ */ jsxs16("div", { className: "row", part: "row", "data-component": "ui-tree-item", children: [
976
+ /* @__PURE__ */ jsx29("button", { className: "drag-handle", part: "drag-handle", type: "button", "data-component": "ui-tree-item", children: /* @__PURE__ */ jsxs16("svg", { "aria-hidden": "true", focusable: "false", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "data-component": "ui-tree-item", children: [
977
+ /* @__PURE__ */ jsx29("circle", { cx: "9", cy: "12", r: "1", "data-component": "ui-tree-item" }),
978
+ /* @__PURE__ */ jsx29("circle", { cx: "9", cy: "5", r: "1", "data-component": "ui-tree-item" }),
979
+ /* @__PURE__ */ jsx29("circle", { cx: "9", cy: "19", r: "1", "data-component": "ui-tree-item" }),
980
+ /* @__PURE__ */ jsx29("circle", { cx: "15", cy: "12", r: "1", "data-component": "ui-tree-item" }),
981
+ /* @__PURE__ */ jsx29("circle", { cx: "15", cy: "5", r: "1", "data-component": "ui-tree-item" }),
982
+ /* @__PURE__ */ jsx29("circle", { cx: "15", cy: "19", r: "1", "data-component": "ui-tree-item" })
983
+ ] }) }),
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
+ /* @__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" }),
987
+ /* @__PURE__ */ jsx29("span", { className: "actions", part: "actions", "data-component": "ui-tree-item", children: slots?.["actions"] ?? null }),
988
+ /* @__PURE__ */ jsx29("span", { className: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true", "data-component": "ui-tree-item" })
989
+ ] }),
990
+ /* @__PURE__ */ jsx29("div", { className: "children", part: "children", role: "group", "data-component": "ui-tree-item", children: children ?? null }),
991
+ /* @__PURE__ */ jsx29("span", { className: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true", "data-component": "ui-tree-item" })
992
+ ] });
993
+ }
994
+
995
+ // src/generated/UiTree.tsx
996
+ import { useLayoutEffect as useLayoutEffect31, useRef as useRef31 } from "react";
997
+ import { attachLoomaComponent as attachLoomaComponent29, updateComponentProps as updateComponentProps29 } from "@threadlabs/looma/core/declarative";
998
+ import { jsx as jsx30 } from "react/jsx-runtime";
999
+ var definition29 = { ...{ "contract": { "tag": "ui-tree", "props": { "hoverExpandDelay": { "type": "number", "required": false, "target": { "attribute": "hoverexpanddelay" }, "default": 700 }, "label": { "type": "string", "required": false, "target": { "attribute": "label" }, "default": "Tree" }, "maxDepth": { "type": "number", "required": false, "target": { "attribute": "maxdepth" }, "default": 0 } } }, "template": { "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "role", "value": "tree" }], "children": [{ "kind": "slot" }] }, "declarations": [{ "kind": "event", "name": "reorder", "type": "object({ sourceId: string, targetId: string, position: before | inside | after, sourceType: string, targetType: string, sourceScope: string, targetScope: string, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "reorder-rejected", "type": "object({ sourceId: string, targetId: string, position: before | inside | after, reason: max-depth, maxDepth: integer, resultingDepth: integer, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1000
+ function UiTree(props) {
1001
+ const { "hoverExpandDelay": prop0 = 700, "label": prop1 = "Tree", "maxDepth": prop2 = 0, onReorder, onReorderRejected, slots, children, ref, ...nativeProps } = props;
1002
+ const root = useRef31(null);
1003
+ const setRoot = (node) => {
1004
+ root.current = node;
1005
+ if (typeof ref === "function") ref(node);
1006
+ else if (ref != null) ref.current = node;
1007
+ };
1008
+ const componentProps = { "hoverExpandDelay": props["hoverExpandDelay"], "label": props["label"], "maxDepth": props["maxDepth"] };
1009
+ useLayoutEffect31(() => root.current == null ? void 0 : attachLoomaComponent29(root.current, definition29, "ui-tree", componentProps), []);
1010
+ useLayoutEffect31(() => {
1011
+ if (root.current != null) updateComponentProps29(root.current, componentProps);
1012
+ });
1013
+ useLayoutEffect31(() => {
1014
+ const node = root.current;
1015
+ if (node == null || onReorder == null) return;
1016
+ const listener0 = (event) => onReorder(event.detail, event);
1017
+ node.addEventListener("reorder", listener0);
1018
+ return () => node.removeEventListener("reorder", listener0);
1019
+ }, [onReorder]);
1020
+ useLayoutEffect31(() => {
1021
+ const node = root.current;
1022
+ if (node == null || onReorderRejected == null) return;
1023
+ const listener1 = (event) => onReorderRejected(event.detail, event);
1024
+ node.addEventListener("reorder-rejected", listener1);
1025
+ return () => node.removeEventListener("reorder-rejected", listener1);
1026
+ }, [onReorderRejected]);
1027
+ return /* @__PURE__ */ jsx30("div", { ...nativeProps, "data-component": "ui-tree", "data-component-root": "ui-tree", role: "tree", ref: setRoot, children: children ?? null });
1028
+ }
1029
+
1030
+ // src/generated/UiCluster.tsx
1031
+ import { useLayoutEffect as useLayoutEffect32, useRef as useRef32 } from "react";
1032
+ import { manageGeneratedProps as manageGeneratedProps3, updateGeneratedProps as updateGeneratedProps3 } from "@threadlabs/looma/core/declarative-generated";
1033
+ import { jsx as jsx31 } from "react/jsx-runtime";
1034
+ function UiCluster(props) {
1035
+ const { "align": prop0, "gap": prop1, slots, children, ref, ...nativeProps } = props;
1036
+ const root = useRef32(null);
1037
+ const setRoot = (node) => {
1038
+ root.current = node;
1039
+ if (typeof ref === "function") ref(node);
1040
+ else if (ref != null) ref.current = node;
1041
+ };
1042
+ const componentProps = { "align": props["align"], "gap": props["gap"] };
1043
+ useLayoutEffect32(() => root.current == null ? void 0 : manageGeneratedProps3(root.current, [
1044
+ { name: "align", attribute: "data-align", value: props["align"], type: ["start", "center", "end", "stretch"], required: false },
1045
+ { name: "gap", attribute: "data-gap", value: props["gap"], type: ["xs", "s", "m", "l", "xl"], required: false }
1046
+ ]), []);
1047
+ useLayoutEffect32(() => {
1048
+ if (root.current != null) updateGeneratedProps3(root.current, componentProps);
1049
+ });
1050
+ return /* @__PURE__ */ jsx31("div", { ...nativeProps, "data-component": "ui-cluster", "data-component-root": "ui-cluster", ref: setRoot, children: children ?? null });
1051
+ }
1052
+
1053
+ // src/generated/UiContainer.tsx
1054
+ import { useLayoutEffect as useLayoutEffect33, useRef as useRef33 } from "react";
1055
+ import { manageGeneratedProps as manageGeneratedProps4, updateGeneratedProps as updateGeneratedProps4 } from "@threadlabs/looma/core/declarative-generated";
1056
+ import { jsx as jsx32 } from "react/jsx-runtime";
1057
+ function UiContainer(props) {
1058
+ const { "gutters": prop0, "measure": prop1, slots, children, ref, ...nativeProps } = props;
1059
+ const root = useRef33(null);
1060
+ const setRoot = (node) => {
1061
+ root.current = node;
1062
+ if (typeof ref === "function") ref(node);
1063
+ else if (ref != null) ref.current = node;
1064
+ };
1065
+ const componentProps = { "gutters": props["gutters"], "measure": props["measure"] };
1066
+ useLayoutEffect33(() => root.current == null ? void 0 : manageGeneratedProps4(root.current, [
1067
+ { name: "gutters", attribute: "data-gutters", value: props["gutters"], type: ["s", "m", "l"], required: false },
1068
+ { name: "measure", attribute: "data-measure", value: props["measure"], type: ["narrow", "wide"], required: false }
1069
+ ]), []);
1070
+ useLayoutEffect33(() => {
1071
+ if (root.current != null) updateGeneratedProps4(root.current, componentProps);
1072
+ });
1073
+ return /* @__PURE__ */ jsx32("div", { ...nativeProps, "data-component": "ui-container", "data-component-root": "ui-container", ref: setRoot, children: children ?? null });
1074
+ }
1075
+
1076
+ // src/generated/UiGrid.tsx
1077
+ import { useLayoutEffect as useLayoutEffect34, useRef as useRef34 } from "react";
1078
+ import { manageGeneratedProps as manageGeneratedProps5, updateGeneratedProps as updateGeneratedProps5 } from "@threadlabs/looma/core/declarative-generated";
1079
+ import { jsx as jsx33 } from "react/jsx-runtime";
1080
+ function UiGrid(props) {
1081
+ const { "gap": prop0, "min": prop1, slots, children, ref, ...nativeProps } = props;
1082
+ const root = useRef34(null);
1083
+ const setRoot = (node) => {
1084
+ root.current = node;
1085
+ if (typeof ref === "function") ref(node);
1086
+ else if (ref != null) ref.current = node;
1087
+ };
1088
+ const componentProps = { "gap": props["gap"], "min": props["min"] };
1089
+ useLayoutEffect34(() => root.current == null ? void 0 : manageGeneratedProps5(root.current, [
1090
+ { name: "gap", attribute: "data-gap", value: props["gap"], type: ["xs", "s", "m", "l", "xl"], required: false },
1091
+ { name: "min", attribute: "data-min", value: props["min"], type: ["sm", "md", "lg"], required: false }
1092
+ ]), []);
1093
+ useLayoutEffect34(() => {
1094
+ if (root.current != null) updateGeneratedProps5(root.current, componentProps);
1095
+ });
1096
+ return /* @__PURE__ */ jsx33("div", { ...nativeProps, "data-component": "ui-grid", "data-component-root": "ui-grid", ref: setRoot, children: children ?? null });
1097
+ }
1098
+
1099
+ // src/generated/UiReel.tsx
1100
+ import { useLayoutEffect as useLayoutEffect35, useRef as useRef35 } from "react";
1101
+ import { attachLoomaComponent as attachLoomaComponent30, updateComponentProps as updateComponentProps30 } from "@threadlabs/looma/core/declarative";
1102
+ import { jsx as jsx34 } from "react/jsx-runtime";
1103
+ var definition30 = { ...{ "contract": { "tag": "ui-reel", "props": { "gap": { "type": { "enum": ["xs", "s", "m", "l", "xl"] }, "required": false, "target": { "attribute": "gap" } }, "itemWidth": { "type": { "enum": ["sm", "md", "lg"] }, "required": false, "target": { "attribute": "itemwidth" } }, "snap": { "type": { "enum": ["start", "center"] }, "required": false, "target": { "attribute": "snap" } } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [{ "kind": "slot" }] }, "declarations": [], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1104
+ function UiReel(props) {
1105
+ const { "gap": prop0, "itemWidth": prop1, "snap": prop2, slots, children, ref, ...nativeProps } = props;
1106
+ const root = useRef35(null);
1107
+ const setRoot = (node) => {
1108
+ root.current = node;
1109
+ if (typeof ref === "function") ref(node);
1110
+ else if (ref != null) ref.current = node;
1111
+ };
1112
+ const componentProps = { "gap": props["gap"], "itemWidth": props["itemWidth"], "snap": props["snap"] };
1113
+ useLayoutEffect35(() => root.current == null ? void 0 : attachLoomaComponent30(root.current, definition30, "ui-reel", componentProps), []);
1114
+ useLayoutEffect35(() => {
1115
+ if (root.current != null) updateComponentProps30(root.current, componentProps);
1116
+ });
1117
+ return /* @__PURE__ */ jsx34("div", { ...nativeProps, "data-component": "ui-reel", "data-component-root": "ui-reel", ref: setRoot, children: children ?? null });
1118
+ }
1119
+
1120
+ // src/generated/UiSeparator.tsx
1121
+ import { useLayoutEffect as useLayoutEffect36, useRef as useRef36 } from "react";
1122
+ import { attachLoomaComponent as attachLoomaComponent31, updateComponentProps as updateComponentProps31 } from "@threadlabs/looma/core/declarative";
1123
+ import { jsx as jsx35 } from "react/jsx-runtime";
1124
+ var definition31 = { ...{ "contract": { "tag": "ui-separator", "props": { "orientation": { "type": { "enum": ["horizontal", "vertical"] }, "required": false, "target": { "attribute": "orientation" }, "default": "horizontal" } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [{ "kind": "slot" }] }, "declarations": [], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1125
+ function UiSeparator(props) {
1126
+ const { "orientation": prop0 = "horizontal", slots, children, ref, ...nativeProps } = props;
1127
+ const root = useRef36(null);
1128
+ const setRoot = (node) => {
1129
+ root.current = node;
1130
+ if (typeof ref === "function") ref(node);
1131
+ else if (ref != null) ref.current = node;
1132
+ };
1133
+ const componentProps = { "orientation": props["orientation"] };
1134
+ useLayoutEffect36(() => root.current == null ? void 0 : attachLoomaComponent31(root.current, definition31, "ui-separator", componentProps), []);
1135
+ useLayoutEffect36(() => {
1136
+ if (root.current != null) updateComponentProps31(root.current, componentProps);
1137
+ });
1138
+ return /* @__PURE__ */ jsx35("div", { ...nativeProps, "data-component": "ui-separator", "data-component-root": "ui-separator", ref: setRoot, children: children ?? null });
1139
+ }
1140
+
1141
+ // src/generated/UiSidebar.tsx
1142
+ import { useLayoutEffect as useLayoutEffect37, useRef as useRef37 } from "react";
1143
+ import { attachLoomaComponent as attachLoomaComponent32, updateComponentProps as updateComponentProps32 } from "@threadlabs/looma/core/declarative";
1144
+ import { jsx as jsx36 } from "react/jsx-runtime";
1145
+ var definition32 = { ...{ "contract": { "tag": "ui-sidebar", "props": { "breakpoint": { "type": { "enum": ["sm", "md", "lg"] }, "required": false, "target": { "attribute": "breakpoint" }, "default": "md" }, "collapsed": { "type": "boolean", "required": false, "target": { "attribute": "collapsed" }, "default": false }, "maxWidth": { "type": "number", "required": false, "target": { "attribute": "maxwidth" }, "default": 480 }, "minWidth": { "type": "number", "required": false, "target": { "attribute": "minwidth" }, "default": 200 }, "resizable": { "type": "boolean", "required": false, "target": { "attribute": "resizable" }, "default": false }, "resizeLabel": { "type": "string", "required": false, "target": { "attribute": "resizelabel" }, "default": "Resize sidebar" }, "resizeStep": { "type": "number", "required": false, "target": { "attribute": "resizestep" }, "default": 16 }, "side": { "type": { "enum": ["start", "end"] }, "required": false, "target": { "attribute": "side" }, "default": "start" }, "width": { "type": "number", "required": false, "target": { "attribute": "width" }, "default": 0 } } }, "template": { "kind": "element", "name": "aside", "attributes": [{ "kind": "attribute", "name": "data-state-collapsed", "expression": "internalCollapsed", "expressionPlan": { "source": "internalCollapsed", "ast": { "kind": "id", "name": "internalCollapsed" }, "dependencies": ["internalCollapsed"] } }, { "kind": "attribute", "name": "data-state-drawer", "expression": "drawer", "expressionPlan": { "source": "drawer", "ast": { "kind": "id", "name": "drawer" }, "dependencies": ["drawer"] } }], "children": [{ "kind": "element", "name": "div", "attributes": [{ "kind": "literal", "name": "class", "value": "sidebar__content" }], "children": [{ "kind": "slot" }] }] }, "declarations": [{ "kind": "state", "name": "internalCollapsed", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "state", "name": "drawer", "expression": { "source": "false", "ast": { "kind": "literal", "value": false }, "dependencies": [] } }, { "kind": "event", "name": "resize", "type": "object({ width: number, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "toggle", "type": "object({ open: boolean, mode: docked | drawer, trigger: keyboard | pointer | programmatic })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "aside", "choices": ["aside"] } }, source: { file: import.meta.url }, css: "" };
1146
+ function UiSidebar(props) {
1147
+ const { "breakpoint": prop0 = "md", "collapsed": prop1 = false, "maxWidth": prop2 = 480, "minWidth": prop3 = 200, "resizable": prop4 = false, "resizeLabel": prop5 = "Resize sidebar", "resizeStep": prop6 = 16, "side": prop7 = "start", "width": prop8 = 0, onResize, onToggle, slots, children, ref, ...nativeProps } = props;
1148
+ const root = useRef37(null);
1149
+ const setRoot = (node) => {
1150
+ root.current = node;
1151
+ if (typeof ref === "function") ref(node);
1152
+ else if (ref != null) ref.current = node;
1153
+ };
1154
+ const componentProps = { "breakpoint": props["breakpoint"], "collapsed": props["collapsed"], "maxWidth": props["maxWidth"], "minWidth": props["minWidth"], "resizable": props["resizable"], "resizeLabel": props["resizeLabel"], "resizeStep": props["resizeStep"], "side": props["side"], "width": props["width"] };
1155
+ useLayoutEffect37(() => root.current == null ? void 0 : attachLoomaComponent32(root.current, definition32, "ui-sidebar", componentProps), []);
1156
+ useLayoutEffect37(() => {
1157
+ if (root.current != null) updateComponentProps32(root.current, componentProps);
1158
+ });
1159
+ useLayoutEffect37(() => {
1160
+ const node = root.current;
1161
+ if (node == null || onResize == null) return;
1162
+ const listener0 = (event) => onResize(event.detail, event);
1163
+ node.addEventListener("resize", listener0);
1164
+ return () => node.removeEventListener("resize", listener0);
1165
+ }, [onResize]);
1166
+ useLayoutEffect37(() => {
1167
+ const node = root.current;
1168
+ if (node == null || onToggle == null) return;
1169
+ const listener1 = (event) => onToggle(event.detail, event);
1170
+ node.addEventListener("toggle", listener1);
1171
+ return () => node.removeEventListener("toggle", listener1);
1172
+ }, [onToggle]);
1173
+ return /* @__PURE__ */ jsx36("aside", { ...nativeProps, "data-component": "ui-sidebar", "data-component-root": "ui-sidebar", "data-state-collapsed": void 0, "data-state-drawer": void 0, ref: setRoot, children: /* @__PURE__ */ jsx36("div", { className: "sidebar__content", "data-component": "ui-sidebar", children: children ?? null }) });
1174
+ }
1175
+
1176
+ // src/generated/UiStack.tsx
1177
+ import { useLayoutEffect as useLayoutEffect38, useRef as useRef38 } from "react";
1178
+ import { manageGeneratedProps as manageGeneratedProps6, updateGeneratedProps as updateGeneratedProps6 } from "@threadlabs/looma/core/declarative-generated";
1179
+ import { jsx as jsx37 } from "react/jsx-runtime";
1180
+ function UiStack(props) {
1181
+ const { "align": prop0, "gap": prop1, "justify": prop2, slots, children, ref, ...nativeProps } = props;
1182
+ const root = useRef38(null);
1183
+ const setRoot = (node) => {
1184
+ root.current = node;
1185
+ if (typeof ref === "function") ref(node);
1186
+ else if (ref != null) ref.current = node;
1187
+ };
1188
+ const componentProps = { "align": props["align"], "gap": props["gap"], "justify": props["justify"] };
1189
+ useLayoutEffect38(() => root.current == null ? void 0 : manageGeneratedProps6(root.current, [
1190
+ { name: "align", attribute: "data-align", value: props["align"], type: ["start", "center", "end", "stretch"], required: false },
1191
+ { name: "gap", attribute: "data-gap", value: props["gap"], type: ["xs", "s", "m", "l", "xl"], required: false },
1192
+ { name: "justify", attribute: "data-justify", value: props["justify"], type: ["start", "center", "end", "between"], required: false }
1193
+ ]), []);
1194
+ useLayoutEffect38(() => {
1195
+ if (root.current != null) updateGeneratedProps6(root.current, componentProps);
1196
+ });
1197
+ return /* @__PURE__ */ jsx37("div", { ...nativeProps, "data-component": "ui-stack", "data-component-root": "ui-stack", ref: setRoot, children: children ?? null });
1198
+ }
1199
+
1200
+ // src/generated/UiSwitcher.tsx
1201
+ import { useLayoutEffect as useLayoutEffect39, useRef as useRef39 } from "react";
1202
+ import { manageGeneratedProps as manageGeneratedProps7, updateGeneratedProps as updateGeneratedProps7 } from "@threadlabs/looma/core/declarative-generated";
1203
+ import { jsx as jsx38 } from "react/jsx-runtime";
1204
+ function UiSwitcher(props) {
1205
+ const { "align": prop0, "gap": prop1, "threshold": prop2, slots, children, ref, ...nativeProps } = props;
1206
+ const root = useRef39(null);
1207
+ const setRoot = (node) => {
1208
+ root.current = node;
1209
+ if (typeof ref === "function") ref(node);
1210
+ else if (ref != null) ref.current = node;
1211
+ };
1212
+ const componentProps = { "align": props["align"], "gap": props["gap"], "threshold": props["threshold"] };
1213
+ useLayoutEffect39(() => root.current == null ? void 0 : manageGeneratedProps7(root.current, [
1214
+ { name: "align", attribute: "data-align", value: props["align"], type: ["start", "center", "end", "stretch"], required: false },
1215
+ { name: "gap", attribute: "data-gap", value: props["gap"], type: ["xs", "s", "m", "l", "xl"], required: false },
1216
+ { name: "threshold", attribute: "data-threshold", value: props["threshold"], type: ["xs", "sm", "md", "lg"], required: false }
1217
+ ]), []);
1218
+ useLayoutEffect39(() => {
1219
+ if (root.current != null) updateGeneratedProps7(root.current, componentProps);
1220
+ });
1221
+ return /* @__PURE__ */ jsx38("div", { ...nativeProps, "data-component": "ui-switcher", "data-component-root": "ui-switcher", ref: setRoot, children: children ?? null });
1222
+ }
1223
+
1224
+ // src/generated/UiEditorInsertTableGrid.tsx
1225
+ import { useLayoutEffect as useLayoutEffect40, useRef as useRef40 } from "react";
1226
+ import { attachLoomaComponent as attachLoomaComponent33, updateComponentProps as updateComponentProps33 } from "@threadlabs/looma/core/declarative";
1227
+ import { jsx as jsx39 } from "react/jsx-runtime";
1228
+ var definition33 = { ...{ "contract": { "tag": "ui-editor-insert-table-grid", "props": { "headerRow": { "type": "boolean", "required": false, "target": { "attribute": "headerrow" }, "default": false }, "maxCols": { "type": { "kind": "terminal", "name": "integer" }, "required": false, "target": { "attribute": "maxcols" }, "default": 8 }, "maxRows": { "type": { "kind": "terminal", "name": "integer" }, "required": false, "target": { "attribute": "maxrows" }, "default": 8 }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [] }, "declarations": [{ "kind": "event", "name": "insert", "type": "object({ rows: integer, cols: integer, withHeaderRow: boolean })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1229
+ function UiEditorInsertTableGrid(props) {
1230
+ const { "headerRow": prop0 = false, "maxCols": prop1 = 8, "maxRows": prop2 = 8, "open": prop3 = false, onInsert, slots, children, ref, ...nativeProps } = props;
1231
+ const root = useRef40(null);
1232
+ const setRoot = (node) => {
1233
+ root.current = node;
1234
+ if (typeof ref === "function") ref(node);
1235
+ else if (ref != null) ref.current = node;
1236
+ };
1237
+ const componentProps = { "headerRow": props["headerRow"], "maxCols": props["maxCols"], "maxRows": props["maxRows"], "open": props["open"] };
1238
+ useLayoutEffect40(() => root.current == null ? void 0 : attachLoomaComponent33(root.current, definition33, "ui-editor-insert-table-grid", componentProps), []);
1239
+ useLayoutEffect40(() => {
1240
+ if (root.current != null) updateComponentProps33(root.current, componentProps);
1241
+ });
1242
+ useLayoutEffect40(() => {
1243
+ const node = root.current;
1244
+ if (node == null || onInsert == null) return;
1245
+ const listener0 = (event) => onInsert(event.detail, event);
1246
+ node.addEventListener("insert", listener0);
1247
+ return () => node.removeEventListener("insert", listener0);
1248
+ }, [onInsert]);
1249
+ return /* @__PURE__ */ jsx39("div", { ...nativeProps, "data-component": "ui-editor-insert-table-grid", "data-component-root": "ui-editor-insert-table-grid", ref: setRoot });
1250
+ }
1251
+
1252
+ // src/generated/UiEditorMentionMenu.tsx
1253
+ import { useLayoutEffect as useLayoutEffect41, useRef as useRef41 } from "react";
1254
+ import { attachLoomaComponent as attachLoomaComponent34, updateComponentProps as updateComponentProps34 } from "@threadlabs/looma/core/declarative";
1255
+ import { jsx as jsx40 } from "react/jsx-runtime";
1256
+ var definition34 = { ...{ "contract": { "tag": "ui-editor-mention-menu", "props": { "anchorRect": { "type": { "kind": "union", "members": [{ "kind": "object", "fields": [{ "name": "left", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "top", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "right", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "bottom", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "x", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "y", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "width", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "height", "type": { "kind": "terminal", "name": "number" }, "optional": true }], "open": false }, { "kind": "terminal", "name": "null" }] }, "required": false, "target": { "attribute": "anchorrect" } }, "items": { "type": { "kind": "list", "item": { "kind": "object", "fields": [{ "name": "id", "type": { "kind": "terminal", "name": "string" }, "optional": false }, { "name": "label", "type": { "kind": "terminal", "name": "string" }, "optional": false }, { "name": "detail", "type": { "kind": "terminal", "name": "string" }, "optional": true }, { "name": "initials", "type": { "kind": "terminal", "name": "string" }, "optional": true }], "open": false } }, "required": false, "target": { "attribute": "items" } }, "loading": { "type": "boolean", "required": false, "target": { "attribute": "loading" }, "default": false }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false }, "query": { "type": "string", "required": false, "target": { "attribute": "query" }, "default": "" }, "selectedIndex": { "type": { "kind": "terminal", "name": "integer" }, "required": false, "target": { "attribute": "selectedindex" }, "default": 0 } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [] }, "declarations": [{ "kind": "event", "name": "highlight", "type": "object({ index: integer })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "select", "type": "object({ index: integer })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1257
+ function UiEditorMentionMenu(props) {
1258
+ const { "anchorRect": prop0, "items": prop1, "loading": prop2 = false, "open": prop3 = false, "query": prop4 = "", "selectedIndex": prop5 = 0, onHighlight, onSelect, slots, children, ref, ...nativeProps } = props;
1259
+ const root = useRef41(null);
1260
+ const setRoot = (node) => {
1261
+ root.current = node;
1262
+ if (typeof ref === "function") ref(node);
1263
+ else if (ref != null) ref.current = node;
1264
+ };
1265
+ const componentProps = { "anchorRect": props["anchorRect"], "items": props["items"], "loading": props["loading"], "open": props["open"], "query": props["query"], "selectedIndex": props["selectedIndex"] };
1266
+ useLayoutEffect41(() => root.current == null ? void 0 : attachLoomaComponent34(root.current, definition34, "ui-editor-mention-menu", componentProps), []);
1267
+ useLayoutEffect41(() => {
1268
+ if (root.current != null) updateComponentProps34(root.current, componentProps);
1269
+ });
1270
+ useLayoutEffect41(() => {
1271
+ const node = root.current;
1272
+ if (node == null || onHighlight == null) return;
1273
+ const listener0 = (event) => onHighlight(event.detail, event);
1274
+ node.addEventListener("highlight", listener0);
1275
+ return () => node.removeEventListener("highlight", listener0);
1276
+ }, [onHighlight]);
1277
+ useLayoutEffect41(() => {
1278
+ const node = root.current;
1279
+ if (node == null || onSelect == null) return;
1280
+ const listener1 = (event) => onSelect(event.detail, event);
1281
+ node.addEventListener("select", listener1);
1282
+ return () => node.removeEventListener("select", listener1);
1283
+ }, [onSelect]);
1284
+ return /* @__PURE__ */ jsx40("div", { ...nativeProps, "data-component": "ui-editor-mention-menu", "data-component-root": "ui-editor-mention-menu", ref: setRoot });
1285
+ }
1286
+
1287
+ // src/generated/UiEditorSlashMenu.tsx
1288
+ import { useLayoutEffect as useLayoutEffect42, useRef as useRef42 } from "react";
1289
+ import { attachLoomaComponent as attachLoomaComponent35, updateComponentProps as updateComponentProps35 } from "@threadlabs/looma/core/declarative";
1290
+ import { jsx as jsx41 } from "react/jsx-runtime";
1291
+ var definition35 = { ...{ "contract": { "tag": "ui-editor-slash-menu", "props": { "anchorRect": { "type": { "kind": "union", "members": [{ "kind": "object", "fields": [{ "name": "left", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "top", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "right", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "bottom", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "x", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "y", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "width", "type": { "kind": "terminal", "name": "number" }, "optional": true }, { "name": "height", "type": { "kind": "terminal", "name": "number" }, "optional": true }], "open": false }, { "kind": "terminal", "name": "null" }] }, "required": false, "target": { "attribute": "anchorrect" } }, "items": { "type": { "kind": "list", "item": { "kind": "object", "fields": [{ "name": "title", "type": { "kind": "terminal", "name": "string" }, "optional": false }, { "name": "description", "type": { "kind": "terminal", "name": "string" }, "optional": false }, { "name": "icon", "type": { "kind": "terminal", "name": "string" }, "optional": false }], "open": false } }, "required": false, "target": { "attribute": "items" } }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false }, "query": { "type": "string", "required": false, "target": { "attribute": "query" }, "default": "" }, "selectedIndex": { "type": { "kind": "terminal", "name": "integer" }, "required": false, "target": { "attribute": "selectedindex" }, "default": 0 } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [] }, "declarations": [{ "kind": "event", "name": "highlight", "type": "object({ index: integer })", "bubbles": true, "composed": true, "cancelable": false }, { "kind": "event", "name": "select", "type": "object({ index: integer })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1292
+ function UiEditorSlashMenu(props) {
1293
+ const { "anchorRect": prop0, "items": prop1, "open": prop2 = false, "query": prop3 = "", "selectedIndex": prop4 = 0, onHighlight, onSelect, slots, children, ref, ...nativeProps } = props;
1294
+ const root = useRef42(null);
1295
+ const setRoot = (node) => {
1296
+ root.current = node;
1297
+ if (typeof ref === "function") ref(node);
1298
+ else if (ref != null) ref.current = node;
1299
+ };
1300
+ const componentProps = { "anchorRect": props["anchorRect"], "items": props["items"], "open": props["open"], "query": props["query"], "selectedIndex": props["selectedIndex"] };
1301
+ useLayoutEffect42(() => root.current == null ? void 0 : attachLoomaComponent35(root.current, definition35, "ui-editor-slash-menu", componentProps), []);
1302
+ useLayoutEffect42(() => {
1303
+ if (root.current != null) updateComponentProps35(root.current, componentProps);
1304
+ });
1305
+ useLayoutEffect42(() => {
1306
+ const node = root.current;
1307
+ if (node == null || onHighlight == null) return;
1308
+ const listener0 = (event) => onHighlight(event.detail, event);
1309
+ node.addEventListener("highlight", listener0);
1310
+ return () => node.removeEventListener("highlight", listener0);
1311
+ }, [onHighlight]);
1312
+ useLayoutEffect42(() => {
1313
+ const node = root.current;
1314
+ if (node == null || onSelect == null) return;
1315
+ const listener1 = (event) => onSelect(event.detail, event);
1316
+ node.addEventListener("select", listener1);
1317
+ return () => node.removeEventListener("select", listener1);
1318
+ }, [onSelect]);
1319
+ return /* @__PURE__ */ jsx41("div", { ...nativeProps, "data-component": "ui-editor-slash-menu", "data-component-root": "ui-editor-slash-menu", ref: setRoot });
1320
+ }
1321
+
1322
+ // src/generated/UiEditorTableContextMenu.tsx
1323
+ import { useLayoutEffect as useLayoutEffect43, useRef as useRef43 } from "react";
1324
+ import { attachLoomaComponent as attachLoomaComponent36, updateComponentProps as updateComponentProps36 } from "@threadlabs/looma/core/declarative";
1325
+ import { jsx as jsx42 } from "react/jsx-runtime";
1326
+ var definition36 = { ...{ "contract": { "tag": "ui-editor-table-context-menu", "props": { "actions": { "type": { "kind": "list", "item": { "kind": "union", "members": [{ "kind": "keyword", "value": "align-left" }, { "kind": "keyword", "value": "align-center" }, { "kind": "keyword", "value": "align-right" }, { "kind": "keyword", "value": "background-none" }, { "kind": "keyword", "value": "background-gray" }, { "kind": "keyword", "value": "background-yellow" }, { "kind": "keyword", "value": "background-blue" }, { "kind": "keyword", "value": "background-green" }, { "kind": "keyword", "value": "background-red" }, { "kind": "keyword", "value": "add-row-before" }, { "kind": "keyword", "value": "add-row-after" }, { "kind": "keyword", "value": "add-column-before" }, { "kind": "keyword", "value": "add-column-after" }, { "kind": "keyword", "value": "clear-cells" }, { "kind": "keyword", "value": "merge-cells" }, { "kind": "keyword", "value": "split-cell" }, { "kind": "keyword", "value": "delete-row" }, { "kind": "keyword", "value": "delete-column" }, { "kind": "keyword", "value": "delete-table" }] } }, "required": false, "target": { "attribute": "actions" } }, "cellBackground": { "type": "string", "required": false, "target": { "attribute": "cellbackground" }, "default": "" }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [] }, "declarations": [{ "kind": "event", "name": "action", "type": "object({ action: string })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1327
+ function UiEditorTableContextMenu(props) {
1328
+ const { "actions": prop0, "cellBackground": prop1 = "", "open": prop2 = false, onAction, slots, children, ref, ...nativeProps } = props;
1329
+ const root = useRef43(null);
1330
+ const setRoot = (node) => {
1331
+ root.current = node;
1332
+ if (typeof ref === "function") ref(node);
1333
+ else if (ref != null) ref.current = node;
1334
+ };
1335
+ const componentProps = { "actions": props["actions"], "cellBackground": props["cellBackground"], "open": props["open"] };
1336
+ useLayoutEffect43(() => root.current == null ? void 0 : attachLoomaComponent36(root.current, definition36, "ui-editor-table-context-menu", componentProps), []);
1337
+ useLayoutEffect43(() => {
1338
+ if (root.current != null) updateComponentProps36(root.current, componentProps);
1339
+ });
1340
+ useLayoutEffect43(() => {
1341
+ const node = root.current;
1342
+ if (node == null || onAction == null) return;
1343
+ const listener0 = (event) => onAction(event.detail, event);
1344
+ node.addEventListener("action", listener0);
1345
+ return () => node.removeEventListener("action", listener0);
1346
+ }, [onAction]);
1347
+ return /* @__PURE__ */ jsx42("div", { ...nativeProps, "data-component": "ui-editor-table-context-menu", "data-component-root": "ui-editor-table-context-menu", ref: setRoot });
1348
+ }
1349
+
1350
+ // src/generated/UiEditorTableOverlay.tsx
1351
+ import { useLayoutEffect as useLayoutEffect44, useRef as useRef44 } from "react";
1352
+ import { attachLoomaComponent as attachLoomaComponent37, updateComponentProps as updateComponentProps37 } from "@threadlabs/looma/core/declarative";
1353
+ import { jsx as jsx43 } from "react/jsx-runtime";
1354
+ var definition37 = { ...{ "contract": { "tag": "ui-editor-table-overlay", "props": { "geometry": { "type": { "kind": "union", "members": [{ "kind": "object", "fields": [{ "name": "rowBoundaries", "type": { "kind": "list", "item": { "kind": "terminal", "name": "number" } }, "optional": false }, { "name": "columnBoundaries", "type": { "kind": "list", "item": { "kind": "terminal", "name": "number" } }, "optional": false }, { "name": "activeCell", "type": { "kind": "union", "members": [{ "kind": "object", "fields": [{ "name": "left", "type": { "kind": "terminal", "name": "number" }, "optional": false }, { "name": "top", "type": { "kind": "terminal", "name": "number" }, "optional": false }, { "name": "width", "type": { "kind": "terminal", "name": "number" }, "optional": false }, { "name": "height", "type": { "kind": "terminal", "name": "number" }, "optional": false }, { "name": "rowIndex", "type": { "kind": "terminal", "name": "integer" }, "optional": false }, { "name": "columnIndex", "type": { "kind": "terminal", "name": "integer" }, "optional": false }], "open": false }, { "kind": "terminal", "name": "null" }] }, "optional": false }, { "name": "hoveredCell", "type": { "kind": "union", "members": [{ "kind": "object", "fields": [{ "name": "left", "type": { "kind": "terminal", "name": "number" }, "optional": false }, { "name": "top", "type": { "kind": "terminal", "name": "number" }, "optional": false }, { "name": "width", "type": { "kind": "terminal", "name": "number" }, "optional": false }, { "name": "height", "type": { "kind": "terminal", "name": "number" }, "optional": false }, { "name": "rowIndex", "type": { "kind": "terminal", "name": "integer" }, "optional": false }, { "name": "columnIndex", "type": { "kind": "terminal", "name": "integer" }, "optional": false }], "open": false }, { "kind": "terminal", "name": "null" }] }, "optional": true }], "open": false }, { "kind": "terminal", "name": "null" }] }, "required": false, "target": { "attribute": "geometry" } }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [] }, "declarations": [{ "kind": "event", "name": "action", "type": "object({ action: string, boundaryIndex?: integer, rowIndex?: integer, columnIndex?: integer, anchor?: object({ left: number, top: number, right: number, bottom: number }) })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1355
+ function UiEditorTableOverlay(props) {
1356
+ const { "geometry": prop0, "open": prop1 = false, onAction, slots, children, ref, ...nativeProps } = props;
1357
+ const root = useRef44(null);
1358
+ const setRoot = (node) => {
1359
+ root.current = node;
1360
+ if (typeof ref === "function") ref(node);
1361
+ else if (ref != null) ref.current = node;
1362
+ };
1363
+ const componentProps = { "geometry": props["geometry"], "open": props["open"] };
1364
+ useLayoutEffect44(() => root.current == null ? void 0 : attachLoomaComponent37(root.current, definition37, "ui-editor-table-overlay", componentProps), []);
1365
+ useLayoutEffect44(() => {
1366
+ if (root.current != null) updateComponentProps37(root.current, componentProps);
1367
+ });
1368
+ useLayoutEffect44(() => {
1369
+ const node = root.current;
1370
+ if (node == null || onAction == null) return;
1371
+ const listener0 = (event) => onAction(event.detail, event);
1372
+ node.addEventListener("action", listener0);
1373
+ return () => node.removeEventListener("action", listener0);
1374
+ }, [onAction]);
1375
+ return /* @__PURE__ */ jsx43("div", { ...nativeProps, "data-component": "ui-editor-table-overlay", "data-component-root": "ui-editor-table-overlay", ref: setRoot });
1376
+ }
1377
+
1378
+ // src/generated/UiEditorTableToolbar.tsx
1379
+ import { useLayoutEffect as useLayoutEffect45, useRef as useRef45 } from "react";
1380
+ import { attachLoomaComponent as attachLoomaComponent38, updateComponentProps as updateComponentProps38 } from "@threadlabs/looma/core/declarative";
1381
+ import { jsx as jsx44 } from "react/jsx-runtime";
1382
+ var definition38 = { ...{ "contract": { "tag": "ui-editor-table-toolbar", "props": { "actions": { "type": { "kind": "list", "item": { "kind": "union", "members": [{ "kind": "keyword", "value": "align-left" }, { "kind": "keyword", "value": "align-center" }, { "kind": "keyword", "value": "align-right" }, { "kind": "keyword", "value": "background-none" }, { "kind": "keyword", "value": "background-gray" }, { "kind": "keyword", "value": "background-yellow" }, { "kind": "keyword", "value": "background-blue" }, { "kind": "keyword", "value": "background-green" }, { "kind": "keyword", "value": "background-red" }, { "kind": "keyword", "value": "add-row-before" }, { "kind": "keyword", "value": "add-row-after" }, { "kind": "keyword", "value": "add-column-before" }, { "kind": "keyword", "value": "add-column-after" }, { "kind": "keyword", "value": "clear-cells" }, { "kind": "keyword", "value": "merge-cells" }, { "kind": "keyword", "value": "split-cell" }, { "kind": "keyword", "value": "delete-row" }, { "kind": "keyword", "value": "delete-column" }, { "kind": "keyword", "value": "delete-table" }] } }, "required": false, "target": { "attribute": "actions" } }, "cellAlignment": { "type": { "enum": ["left", "center", "right"] }, "required": false, "target": { "attribute": "cellalignment" }, "default": "left" }, "cellBackground": { "type": "string", "required": false, "target": { "attribute": "cellbackground" }, "default": "" }, "open": { "type": "boolean", "required": false, "target": { "attribute": "open" }, "default": false } } }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [] }, "declarations": [{ "kind": "event", "name": "action", "type": "object({ action: string })", "bubbles": true, "composed": true, "cancelable": false }], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1383
+ function UiEditorTableToolbar(props) {
1384
+ const { "actions": prop0, "cellAlignment": prop1 = "left", "cellBackground": prop2 = "", "open": prop3 = false, onAction, slots, children, ref, ...nativeProps } = props;
1385
+ const root = useRef45(null);
1386
+ const setRoot = (node) => {
1387
+ root.current = node;
1388
+ if (typeof ref === "function") ref(node);
1389
+ else if (ref != null) ref.current = node;
1390
+ };
1391
+ const componentProps = { "actions": props["actions"], "cellAlignment": props["cellAlignment"], "cellBackground": props["cellBackground"], "open": props["open"] };
1392
+ useLayoutEffect45(() => root.current == null ? void 0 : attachLoomaComponent38(root.current, definition38, "ui-editor-table-toolbar", componentProps), []);
1393
+ useLayoutEffect45(() => {
1394
+ if (root.current != null) updateComponentProps38(root.current, componentProps);
1395
+ });
1396
+ useLayoutEffect45(() => {
1397
+ const node = root.current;
1398
+ if (node == null || onAction == null) return;
1399
+ const listener0 = (event) => onAction(event.detail, event);
1400
+ node.addEventListener("action", listener0);
1401
+ return () => node.removeEventListener("action", listener0);
1402
+ }, [onAction]);
1403
+ return /* @__PURE__ */ jsx44("div", { ...nativeProps, "data-component": "ui-editor-table-toolbar", "data-component-root": "ui-editor-table-toolbar", ref: setRoot });
1404
+ }
1405
+
1406
+ // src/generated/UiEditorToolbar.tsx
1407
+ import { useLayoutEffect as useLayoutEffect46, useRef as useRef46 } from "react";
1408
+ import { attachLoomaComponent as attachLoomaComponent39, updateComponentProps as updateComponentProps39 } from "@threadlabs/looma/core/declarative";
1409
+ import { jsx as jsx45 } from "react/jsx-runtime";
1410
+ var definition39 = { ...{ "contract": { "tag": "ui-editor-toolbar", "props": {} }, "template": { "kind": "element", "name": "div", "attributes": [], "children": [{ "kind": "slot" }] }, "declarations": [], "root": { "kind": "native", "element": "div", "choices": ["div"] } }, source: { file: import.meta.url }, css: "" };
1411
+ function UiEditorToolbar(props) {
1412
+ const { slots, children, ref, ...nativeProps } = props;
1413
+ const root = useRef46(null);
1414
+ const setRoot = (node) => {
1415
+ root.current = node;
1416
+ if (typeof ref === "function") ref(node);
1417
+ else if (ref != null) ref.current = node;
1418
+ };
1419
+ const componentProps = {};
1420
+ useLayoutEffect46(() => root.current == null ? void 0 : attachLoomaComponent39(root.current, definition39, "ui-editor-toolbar", componentProps), []);
1421
+ useLayoutEffect46(() => {
1422
+ if (root.current != null) updateComponentProps39(root.current, componentProps);
1423
+ });
1424
+ return /* @__PURE__ */ jsx45("div", { ...nativeProps, "data-component": "ui-editor-toolbar", "data-component-root": "ui-editor-toolbar", ref: setRoot, children: children ?? null });
1425
+ }
1426
+
1427
+ // src/index.ts
1428
+ var ADAPTER_COMPONENT_TAG_MAP = {
1429
+ Stack: "ui-stack",
1430
+ Cluster: "ui-cluster",
1431
+ Grid: "ui-grid",
1432
+ Container: "ui-container",
1433
+ Switcher: "ui-switcher",
1434
+ Sidebar: "ui-sidebar",
1435
+ Reel: "ui-reel",
1436
+ Separator: "ui-separator",
1437
+ Disclosure: "ui-disclosure",
1438
+ Editable: "ui-editable",
1439
+ Tabs: "ui-tabs",
1440
+ Dialog: "ui-dialog",
1441
+ Popover: "ui-popover",
1442
+ Menu: "ui-menu",
1443
+ MenuItem: "ui-menu-item",
1444
+ ContextMenu: "ui-context-menu",
1445
+ AffordanceScope: "ui-affordance-scope",
1446
+ Button: "ui-button",
1447
+ IconButton: "ui-icon-button",
1448
+ Input: "ui-input",
1449
+ Select: "ui-select",
1450
+ Textarea: "ui-textarea",
1451
+ FormField: "ui-form-field",
1452
+ Tooltip: "ui-tooltip",
1453
+ ToastRegion: "ui-toast-region",
1454
+ Checkbox: "ui-checkbox",
1455
+ Switch: "ui-switch",
1456
+ RadioGroup: "ui-radio-group",
1457
+ Radio: "ui-radio",
1458
+ Badge: "ui-badge",
1459
+ Callout: "ui-callout",
1460
+ Avatar: "ui-avatar",
1461
+ AvatarGroup: "ui-avatar-group",
1462
+ SearchShell: "ui-search-shell",
1463
+ SearchResultRow: "ui-search-result-row",
1464
+ TopBar: "ui-top-bar",
1465
+ Tree: "ui-tree",
1466
+ TreeItem: "ui-tree-item",
1467
+ Combobox: "ui-combobox",
1468
+ EditorToolbar: "ui-editor-toolbar",
1469
+ EditorSlashMenu: "ui-editor-slash-menu",
1470
+ EditorMentionMenu: "ui-editor-mention-menu",
1471
+ EditorTableContextMenu: "ui-editor-table-context-menu",
1472
+ EditorTableToolbar: "ui-editor-table-toolbar",
1473
+ EditorInsertTableGrid: "ui-editor-insert-table-grid",
1474
+ EditorTableOverlay: "ui-editor-table-overlay"
1475
+ };
1476
+ var REACT_ADAPTER_NOTE = "Generated declarative adapter: renders a native root and attaches the framework-neutral Looma contract.";
1477
+ export {
1478
+ ADAPTER_COMPONENT_TAG_MAP,
1479
+ UiAffordanceScope as AffordanceScope,
1480
+ UiAvatar as Avatar,
1481
+ UiAvatarGroup as AvatarGroup,
1482
+ UiBadge as Badge,
1483
+ UiButton as Button,
1484
+ UiCallout as Callout,
1485
+ UiCheckbox as Checkbox,
1486
+ UiCluster as Cluster,
1487
+ UiCombobox as Combobox,
1488
+ UiContainer as Container,
1489
+ UiContextMenu as ContextMenu,
1490
+ UiDialog as Dialog,
1491
+ UiDisclosure as Disclosure,
1492
+ UiEditable as Editable,
1493
+ UiEditorInsertTableGrid as EditorInsertTableGrid,
1494
+ UiEditorMentionMenu as EditorMentionMenu,
1495
+ UiEditorSlashMenu as EditorSlashMenu,
1496
+ UiEditorTableContextMenu as EditorTableContextMenu,
1497
+ UiEditorTableOverlay as EditorTableOverlay,
1498
+ UiEditorTableToolbar as EditorTableToolbar,
1499
+ UiEditorToolbar as EditorToolbar,
1500
+ UiFormField as FormField,
1501
+ UiGrid as Grid,
1502
+ UiIconButton as IconButton,
1503
+ UiInput as Input,
1504
+ UiMenu as Menu,
1505
+ UiMenuItem as MenuItem,
1506
+ UiPopover as Popover,
1507
+ REACT_ADAPTER_NOTE,
1508
+ UiRadio as Radio,
1509
+ UiRadioGroup as RadioGroup,
1510
+ UiReel as Reel,
1511
+ UiSearchResultRow as SearchResultRow,
1512
+ UiSearchShell as SearchShell,
1513
+ UiSelect as Select,
1514
+ UiSeparator as Separator,
1515
+ UiSidebar as Sidebar,
1516
+ UiStack as Stack,
1517
+ UiSwitch as Switch,
1518
+ UiSwitcher as Switcher,
1519
+ UiTabs as Tabs,
1520
+ UiTextarea as Textarea,
1521
+ UiToastRegion as ToastRegion,
1522
+ UiTooltip as Tooltip,
1523
+ UiTopBar as TopBar,
1524
+ UiTree as Tree,
1525
+ UiTreeItem as TreeItem
1526
+ };