@threadlabs/looma 0.1.14 → 0.1.16

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 (67) hide show
  1. package/dist/{chunk-DQZJTDIB.js → chunk-SVINNT3E.js} +29 -27
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/looma.cjs.js +1 -1
  4. package/dist/cjs/ui-tree-item.cjs.entry.js +694 -0
  5. package/dist/cjs/ui-tree.cjs.entry.js +257 -0
  6. package/dist/collection/collection-manifest.json +3 -1
  7. package/dist/collection/components/ui-tree/ui-tree.css +11 -0
  8. package/dist/collection/components/ui-tree/ui-tree.js +252 -0
  9. package/dist/collection/components/ui-tree-item/ui-tree-item.css +213 -0
  10. package/dist/collection/components/ui-tree-item/ui-tree-item.js +347 -0
  11. package/dist/collection/utils/drag-drop.js +51 -0
  12. package/dist/components/index.d.ts +4 -0
  13. package/dist/components/index.js +1 -1
  14. package/dist/components/ui-tree-item.d.ts +11 -0
  15. package/dist/components/ui-tree-item.js +13 -0
  16. package/dist/components/ui-tree.d.ts +11 -0
  17. package/dist/components/ui-tree.js +1 -0
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/esm/looma.js +1 -1
  20. package/dist/esm/ui-tree-item.entry.js +692 -0
  21. package/dist/esm/ui-tree.entry.js +255 -0
  22. package/dist/index.cjs +687 -15
  23. package/dist/index.d.cts +17 -1
  24. package/dist/index.d.ts +17 -1
  25. package/dist/index.js +44 -3
  26. package/dist/looma/looma.esm.js +1 -1
  27. package/dist/looma/p-95368dee.entry.js +1 -0
  28. package/dist/looma/p-ef9ca2ed.entry.js +13 -0
  29. package/dist/types/components/ui-tree/ui-tree.d.ts +28 -0
  30. package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +36 -0
  31. package/dist/types/components.d.ts +176 -0
  32. package/dist/types/utils/drag-drop.d.ts +15 -0
  33. package/dist/{ui-affordance-scope.entry-SWTDTGGU.js → ui-affordance-scope.entry-PFP2TDKO.js} +1 -1
  34. package/dist/{ui-avatar-group.entry-VUYE2XOM.js → ui-avatar-group.entry-DQDP325O.js} +1 -1
  35. package/dist/{ui-avatar.entry-2CKHEJTS.js → ui-avatar.entry-WYIDMOFE.js} +1 -1
  36. package/dist/{ui-badge.entry-4SWSD3R5.js → ui-badge.entry-VGHXPEDT.js} +1 -1
  37. package/dist/{ui-button.entry-SS3AS32R.js → ui-button.entry-LKPLOJ22.js} +1 -1
  38. package/dist/{ui-checkbox.entry-V7OYTOLW.js → ui-checkbox.entry-J74HEA22.js} +1 -1
  39. package/dist/{ui-context-menu.entry-UCLTQESP.js → ui-context-menu.entry-MQM2FCLI.js} +1 -1
  40. package/dist/{ui-dialog.entry-PXIVZF7D.js → ui-dialog.entry-DQMMDO4Z.js} +1 -1
  41. package/dist/{ui-disclosure.entry-ZADBPM2D.js → ui-disclosure.entry-ONF7UZDC.js} +1 -1
  42. package/dist/{ui-floating-action-button.entry-WNBWY36T.js → ui-floating-action-button.entry-FKTGVC5T.js} +1 -1
  43. package/dist/{ui-form-field.entry-RZPSWN6Y.js → ui-form-field.entry-M3ISWQNU.js} +1 -1
  44. package/dist/{ui-icon-button.entry-ILU7RD7M.js → ui-icon-button.entry-AWFIQUHM.js} +1 -1
  45. package/dist/{ui-input.entry-FEIUK4EE.js → ui-input.entry-JZ6RETMT.js} +1 -1
  46. package/dist/{ui-menu-item.entry-UJVECPSK.js → ui-menu-item.entry-5MFR5LFL.js} +1 -1
  47. package/dist/{ui-menu.entry-MTCE3F5U.js → ui-menu.entry-IOEIDATQ.js} +1 -1
  48. package/dist/{ui-popover.entry-OAME35VB.js → ui-popover.entry-ELCMKO6Y.js} +1 -1
  49. package/dist/{ui-radio-group.entry-CPFX4LVA.js → ui-radio-group.entry-RJHUPPEM.js} +1 -1
  50. package/dist/{ui-radio.entry-44OTRYPB.js → ui-radio.entry-3VRDPOY4.js} +1 -1
  51. package/dist/{ui-search-result-row.entry-ZU5SL5OP.js → ui-search-result-row.entry-J34YPAV7.js} +1 -1
  52. package/dist/{ui-search-shell.entry-G7HG4RKU.js → ui-search-shell.entry-IJ4UUP27.js} +1 -1
  53. package/dist/{ui-select.entry-NAONXMFG.js → ui-select.entry-C6YD3HQ5.js} +1 -1
  54. package/dist/{ui-switch.entry-SE4ZTCS2.js → ui-switch.entry-UZDF5QTI.js} +1 -1
  55. package/dist/{ui-tabs.entry-2YG2JE3K.js → ui-tabs.entry-YRAKWOMR.js} +1 -1
  56. package/dist/{ui-textarea.entry-PV3APDLY.js → ui-textarea.entry-JLDKFT3K.js} +1 -1
  57. package/dist/{ui-toast-region.entry-WH2OL3FR.js → ui-toast-region.entry-GC7C7KXF.js} +1 -1
  58. package/dist/{ui-tooltip.entry-FY563DP4.js → ui-tooltip.entry-F26XDTYX.js} +1 -1
  59. package/dist/{ui-top-bar.entry-LJSZXFAH.js → ui-top-bar.entry-5W5UA5KV.js} +1 -1
  60. package/dist/ui-tree-item.entry-3LM7IXIK.js +385 -0
  61. package/dist/ui-tree.entry-X4FU42A6.js +244 -0
  62. package/package.json +1 -1
  63. package/styles.css +18 -6
  64. package/vue/{chunk-YN4IUYVY.js → chunk-5KWCMTXB.js} +10 -1
  65. package/vue/editor/index.js +1 -1
  66. package/vue/index.d.ts +24 -1
  67. package/vue/index.js +5 -1
@@ -0,0 +1,692 @@
1
+ import { r as registerInstance, g as getElement, h, H as Host } from './index-CEeiinfk.js';
2
+ import { d as dispatchDetail, e as eventToTrigger } from './events-JwSoedEO.js';
3
+
4
+ /**
5
+ * @license lucide v0.554.0 - ISC
6
+ *
7
+ * This source code is licensed under the ISC license.
8
+ * See the LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ const Bold = [
12
+ ["path", { d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }]
13
+ ];
14
+
15
+ /**
16
+ * @license lucide v0.554.0 - ISC
17
+ *
18
+ * This source code is licensed under the ISC license.
19
+ * See the LICENSE file in the root directory of this source tree.
20
+ */
21
+
22
+ const Braces = [
23
+ ["path", { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1" }],
24
+ ["path", { d: "M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1" }]
25
+ ];
26
+
27
+ /**
28
+ * @license lucide v0.554.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */
33
+
34
+ const ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
35
+
36
+ /**
37
+ * @license lucide v0.554.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */
42
+
43
+ const ChevronLeft = [["path", { d: "m15 18-6-6 6-6" }]];
44
+
45
+ /**
46
+ * @license lucide v0.554.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */
51
+
52
+ const CodeXml = [
53
+ ["path", { d: "m18 16 4-4-4-4" }],
54
+ ["path", { d: "m6 8-4 4 4 4" }],
55
+ ["path", { d: "m14.5 4-5 16" }]
56
+ ];
57
+
58
+ /**
59
+ * @license lucide v0.554.0 - ISC
60
+ *
61
+ * This source code is licensed under the ISC license.
62
+ * See the LICENSE file in the root directory of this source tree.
63
+ */
64
+
65
+ const Columns3 = [
66
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
67
+ ["path", { d: "M9 3v18" }],
68
+ ["path", { d: "M15 3v18" }]
69
+ ];
70
+
71
+ /**
72
+ * @license lucide v0.554.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */
77
+
78
+ const Ellipsis = [
79
+ ["circle", { cx: "12", cy: "12", r: "1" }],
80
+ ["circle", { cx: "19", cy: "12", r: "1" }],
81
+ ["circle", { cx: "5", cy: "12", r: "1" }]
82
+ ];
83
+
84
+ /**
85
+ * @license lucide v0.554.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */
90
+
91
+ const Eraser = [
92
+ [
93
+ "path",
94
+ {
95
+ d: "M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21"
96
+ }
97
+ ],
98
+ ["path", { d: "m5.082 11.09 8.828 8.828" }]
99
+ ];
100
+
101
+ /**
102
+ * @license lucide v0.554.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */
107
+
108
+ const GripHorizontal = [
109
+ ["circle", { cx: "12", cy: "9", r: "1" }],
110
+ ["circle", { cx: "19", cy: "9", r: "1" }],
111
+ ["circle", { cx: "5", cy: "9", r: "1" }],
112
+ ["circle", { cx: "12", cy: "15", r: "1" }],
113
+ ["circle", { cx: "19", cy: "15", r: "1" }],
114
+ ["circle", { cx: "5", cy: "15", r: "1" }]
115
+ ];
116
+
117
+ /**
118
+ * @license lucide v0.554.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */
123
+
124
+ const GripVertical = [
125
+ ["circle", { cx: "9", cy: "12", r: "1" }],
126
+ ["circle", { cx: "9", cy: "5", r: "1" }],
127
+ ["circle", { cx: "9", cy: "19", r: "1" }],
128
+ ["circle", { cx: "15", cy: "12", r: "1" }],
129
+ ["circle", { cx: "15", cy: "5", r: "1" }],
130
+ ["circle", { cx: "15", cy: "19", r: "1" }]
131
+ ];
132
+
133
+ /**
134
+ * @license lucide v0.554.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */
139
+
140
+ const Heading1 = [
141
+ ["path", { d: "M4 12h8" }],
142
+ ["path", { d: "M4 18V6" }],
143
+ ["path", { d: "M12 18V6" }],
144
+ ["path", { d: "m17 12 3-2v8" }]
145
+ ];
146
+
147
+ /**
148
+ * @license lucide v0.554.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */
153
+
154
+ const Heading2 = [
155
+ ["path", { d: "M4 12h8" }],
156
+ ["path", { d: "M4 18V6" }],
157
+ ["path", { d: "M12 18V6" }],
158
+ ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }]
159
+ ];
160
+
161
+ /**
162
+ * @license lucide v0.554.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */
167
+
168
+ const Heading3 = [
169
+ ["path", { d: "M4 12h8" }],
170
+ ["path", { d: "M4 18V6" }],
171
+ ["path", { d: "M12 18V6" }],
172
+ ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }],
173
+ ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]
174
+ ];
175
+
176
+ /**
177
+ * @license lucide v0.554.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */
182
+
183
+ const Highlighter = [
184
+ ["path", { d: "m9 11-6 6v3h9l3-3" }],
185
+ ["path", { d: "m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4" }]
186
+ ];
187
+
188
+ /**
189
+ * @license lucide v0.554.0 - ISC
190
+ *
191
+ * This source code is licensed under the ISC license.
192
+ * See the LICENSE file in the root directory of this source tree.
193
+ */
194
+
195
+ const Image = [
196
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
197
+ ["circle", { cx: "9", cy: "9", r: "2" }],
198
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
199
+ ];
200
+
201
+ /**
202
+ * @license lucide v0.554.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */
207
+
208
+ const Italic = [
209
+ ["line", { x1: "19", x2: "10", y1: "4", y2: "4" }],
210
+ ["line", { x1: "14", x2: "5", y1: "20", y2: "20" }],
211
+ ["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
212
+ ];
213
+
214
+ /**
215
+ * @license lucide v0.554.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */
220
+
221
+ const ListOrdered = [
222
+ ["path", { d: "M11 5h10" }],
223
+ ["path", { d: "M11 12h10" }],
224
+ ["path", { d: "M11 19h10" }],
225
+ ["path", { d: "M4 4h1v5" }],
226
+ ["path", { d: "M4 9h2" }],
227
+ ["path", { d: "M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }]
228
+ ];
229
+
230
+ /**
231
+ * @license lucide v0.554.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */
236
+
237
+ const ListTodo = [
238
+ ["path", { d: "M13 5h8" }],
239
+ ["path", { d: "M13 12h8" }],
240
+ ["path", { d: "M13 19h8" }],
241
+ ["path", { d: "m3 17 2 2 4-4" }],
242
+ ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }]
243
+ ];
244
+
245
+ /**
246
+ * @license lucide v0.554.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */
251
+
252
+ const List = [
253
+ ["path", { d: "M3 5h.01" }],
254
+ ["path", { d: "M3 12h.01" }],
255
+ ["path", { d: "M3 19h.01" }],
256
+ ["path", { d: "M8 5h13" }],
257
+ ["path", { d: "M8 12h13" }],
258
+ ["path", { d: "M8 19h13" }]
259
+ ];
260
+
261
+ /**
262
+ * @license lucide v0.554.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */
267
+
268
+ const Merge = [
269
+ ["path", { d: "m8 6 4-4 4 4" }],
270
+ ["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }],
271
+ ["path", { d: "m20 22-5-5" }]
272
+ ];
273
+
274
+ /**
275
+ * @license lucide v0.554.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */
280
+
281
+ const Minus = [["path", { d: "M5 12h14" }]];
282
+
283
+ /**
284
+ * @license lucide v0.554.0 - ISC
285
+ *
286
+ * This source code is licensed under the ISC license.
287
+ * See the LICENSE file in the root directory of this source tree.
288
+ */
289
+
290
+ const PaintBucket = [
291
+ ["path", { d: "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z" }],
292
+ ["path", { d: "m5 2 5 5" }],
293
+ ["path", { d: "M2 13h15" }],
294
+ ["path", { d: "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z" }]
295
+ ];
296
+
297
+ /**
298
+ * @license lucide v0.554.0 - ISC
299
+ *
300
+ * This source code is licensed under the ISC license.
301
+ * See the LICENSE file in the root directory of this source tree.
302
+ */
303
+
304
+ const PanelBottom = [
305
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
306
+ ["path", { d: "M3 15h18" }]
307
+ ];
308
+
309
+ /**
310
+ * @license lucide v0.554.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */
315
+
316
+ const PanelLeft = [
317
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
318
+ ["path", { d: "M9 3v18" }]
319
+ ];
320
+
321
+ /**
322
+ * @license lucide v0.554.0 - ISC
323
+ *
324
+ * This source code is licensed under the ISC license.
325
+ * See the LICENSE file in the root directory of this source tree.
326
+ */
327
+
328
+ const PanelRight = [
329
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
330
+ ["path", { d: "M15 3v18" }]
331
+ ];
332
+
333
+ /**
334
+ * @license lucide v0.554.0 - ISC
335
+ *
336
+ * This source code is licensed under the ISC license.
337
+ * See the LICENSE file in the root directory of this source tree.
338
+ */
339
+
340
+ const PanelTop = [
341
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
342
+ ["path", { d: "M3 9h18" }]
343
+ ];
344
+
345
+ /**
346
+ * @license lucide v0.554.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */
351
+
352
+ const Pilcrow = [
353
+ ["path", { d: "M13 4v16" }],
354
+ ["path", { d: "M17 4v16" }],
355
+ ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }]
356
+ ];
357
+
358
+ /**
359
+ * @license lucide v0.554.0 - ISC
360
+ *
361
+ * This source code is licensed under the ISC license.
362
+ * See the LICENSE file in the root directory of this source tree.
363
+ */
364
+
365
+ const Plus = [
366
+ ["path", { d: "M5 12h14" }],
367
+ ["path", { d: "M12 5v14" }]
368
+ ];
369
+
370
+ /**
371
+ * @license lucide v0.554.0 - ISC
372
+ *
373
+ * This source code is licensed under the ISC license.
374
+ * See the LICENSE file in the root directory of this source tree.
375
+ */
376
+
377
+ const Quote = [
378
+ [
379
+ "path",
380
+ {
381
+ d: "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
382
+ }
383
+ ],
384
+ [
385
+ "path",
386
+ {
387
+ d: "M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z"
388
+ }
389
+ ]
390
+ ];
391
+
392
+ /**
393
+ * @license lucide v0.554.0 - ISC
394
+ *
395
+ * This source code is licensed under the ISC license.
396
+ * See the LICENSE file in the root directory of this source tree.
397
+ */
398
+
399
+ const Redo2 = [
400
+ ["path", { d: "m15 14 5-5-5-5" }],
401
+ ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]
402
+ ];
403
+
404
+ /**
405
+ * @license lucide v0.554.0 - ISC
406
+ *
407
+ * This source code is licensed under the ISC license.
408
+ * See the LICENSE file in the root directory of this source tree.
409
+ */
410
+
411
+ const Rows3 = [
412
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
413
+ ["path", { d: "M21 9H3" }],
414
+ ["path", { d: "M21 15H3" }]
415
+ ];
416
+
417
+ /**
418
+ * @license lucide v0.554.0 - ISC
419
+ *
420
+ * This source code is licensed under the ISC license.
421
+ * See the LICENSE file in the root directory of this source tree.
422
+ */
423
+
424
+ const Split = [
425
+ ["path", { d: "M16 3h5v5" }],
426
+ ["path", { d: "M8 3H3v5" }],
427
+ ["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }],
428
+ ["path", { d: "m15 9 6-6" }]
429
+ ];
430
+
431
+ /**
432
+ * @license lucide v0.554.0 - ISC
433
+ *
434
+ * This source code is licensed under the ISC license.
435
+ * See the LICENSE file in the root directory of this source tree.
436
+ */
437
+
438
+ const Strikethrough = [
439
+ ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
440
+ ["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
441
+ ["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
442
+ ];
443
+
444
+ /**
445
+ * @license lucide v0.554.0 - ISC
446
+ *
447
+ * This source code is licensed under the ISC license.
448
+ * See the LICENSE file in the root directory of this source tree.
449
+ */
450
+
451
+ const Table2 = [
452
+ [
453
+ "path",
454
+ {
455
+ d: "M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"
456
+ }
457
+ ]
458
+ ];
459
+
460
+ /**
461
+ * @license lucide v0.554.0 - ISC
462
+ *
463
+ * This source code is licensed under the ISC license.
464
+ * See the LICENSE file in the root directory of this source tree.
465
+ */
466
+
467
+ const TextAlignCenter = [
468
+ ["path", { d: "M21 5H3" }],
469
+ ["path", { d: "M17 12H7" }],
470
+ ["path", { d: "M19 19H5" }]
471
+ ];
472
+
473
+ /**
474
+ * @license lucide v0.554.0 - ISC
475
+ *
476
+ * This source code is licensed under the ISC license.
477
+ * See the LICENSE file in the root directory of this source tree.
478
+ */
479
+
480
+ const TextAlignEnd = [
481
+ ["path", { d: "M21 5H3" }],
482
+ ["path", { d: "M21 12H9" }],
483
+ ["path", { d: "M21 19H7" }]
484
+ ];
485
+
486
+ /**
487
+ * @license lucide v0.554.0 - ISC
488
+ *
489
+ * This source code is licensed under the ISC license.
490
+ * See the LICENSE file in the root directory of this source tree.
491
+ */
492
+
493
+ const TextAlignStart = [
494
+ ["path", { d: "M21 5H3" }],
495
+ ["path", { d: "M15 12H3" }],
496
+ ["path", { d: "M17 19H3" }]
497
+ ];
498
+
499
+ /**
500
+ * @license lucide v0.554.0 - ISC
501
+ *
502
+ * This source code is licensed under the ISC license.
503
+ * See the LICENSE file in the root directory of this source tree.
504
+ */
505
+
506
+ const Trash2 = [
507
+ ["path", { d: "M10 11v6" }],
508
+ ["path", { d: "M14 11v6" }],
509
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
510
+ ["path", { d: "M3 6h18" }],
511
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]
512
+ ];
513
+
514
+ /**
515
+ * @license lucide v0.554.0 - ISC
516
+ *
517
+ * This source code is licensed under the ISC license.
518
+ * See the LICENSE file in the root directory of this source tree.
519
+ */
520
+
521
+ const Underline = [
522
+ ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }],
523
+ ["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]
524
+ ];
525
+
526
+ /**
527
+ * @license lucide v0.554.0 - ISC
528
+ *
529
+ * This source code is licensed under the ISC license.
530
+ * See the LICENSE file in the root directory of this source tree.
531
+ */
532
+
533
+ const Undo2 = [
534
+ ["path", { d: "M9 14 4 9l5-5" }],
535
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" }]
536
+ ];
537
+
538
+ /** The opinionated Lucide set used by Looma's shipped interaction surfaces. */
539
+ const LOOMA_ICONS = {
540
+ 'align-center': TextAlignCenter,
541
+ 'align-left': TextAlignStart,
542
+ 'align-right': TextAlignEnd,
543
+ bold: Bold,
544
+ braces: Braces,
545
+ 'chevron-down': ChevronDown,
546
+ 'chevron-left': ChevronLeft,
547
+ 'code-xml': CodeXml,
548
+ columns: Columns3,
549
+ ellipsis: Ellipsis,
550
+ eraser: Eraser,
551
+ 'grip-horizontal': GripHorizontal,
552
+ 'grip-vertical': GripVertical,
553
+ 'heading-1': Heading1,
554
+ 'heading-2': Heading2,
555
+ 'heading-3': Heading3,
556
+ highlighter: Highlighter,
557
+ image: Image,
558
+ italic: Italic,
559
+ list: List,
560
+ 'list-ordered': ListOrdered,
561
+ 'list-todo': ListTodo,
562
+ merge: Merge,
563
+ minus: Minus,
564
+ 'paint-bucket': PaintBucket,
565
+ 'panel-bottom': PanelBottom,
566
+ 'panel-left': PanelLeft,
567
+ 'panel-right': PanelRight,
568
+ 'panel-top': PanelTop,
569
+ pilcrow: Pilcrow,
570
+ plus: Plus,
571
+ quote: Quote,
572
+ redo: Redo2,
573
+ rows: Rows3,
574
+ split: Split,
575
+ strikethrough: Strikethrough,
576
+ table: Table2,
577
+ trash: Trash2,
578
+ underline: Underline,
579
+ undo: Undo2,
580
+ };
581
+ function serializeAttributes(attributes) {
582
+ return Object.entries(attributes)
583
+ .map(([name, value]) => ` ${name}="${escapeAttribute(value)}"`)
584
+ .join('');
585
+ }
586
+ function escapeAttribute(value) {
587
+ return String(value).replaceAll('&', '&').replaceAll('"', '"');
588
+ }
589
+ function serializeIconNode(node) {
590
+ const [tag, attributes] = node;
591
+ return `<${tag}${serializeAttributes(attributes)}></${tag}>`;
592
+ }
593
+ /** Creates consistent, currentColor-driven SVG markup for framework-neutral components. */
594
+ function loomaIconMarkup(name, className = 'looma-icon') {
595
+ return [
596
+ `<svg class="${escapeAttribute(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
597
+ ' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',
598
+ ' stroke-linecap="round" stroke-linejoin="round">',
599
+ LOOMA_ICONS[name].map(serializeIconNode).join(''),
600
+ '</svg>',
601
+ ].join('');
602
+ }
603
+
604
+ const uiTreeItemCss = () => `:host{--ui-tree-indent:16px;--ui-tree-row-min-height:44px;--ui-tree-drop-color:var(--ui-accent-solid);position:relative;display:block;min-inline-size:0;margin-inline-start:calc(var(--ui-tree-item-depth, 0) * var(--ui-tree-indent))}.row{position:relative;display:grid;grid-template-columns:20px auto minmax(0, 1fr) auto;align-items:center;min-block-size:var(--ui-tree-row-min-height);min-inline-size:0;border-radius:var(--ui-radius-md);color:var(--ui-text-secondary);transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), opacity var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease)}.row:hover,:host([data-selected]) .row,.row:focus-within{color:var(--ui-text-primary);background:var(--ui-surface-muted)}:host([data-disabled]) .row{opacity:0.55}:host([data-dragging]) .row{opacity:0.42}:host(:focus){outline:none}:host(:focus-visible) .row{box-shadow:0 0 0 2px var(--ui-focus-ring)}:host([data-drop-position='inside']) .row{background:var(--ui-accent-subtle);box-shadow:inset 0 0 0 1px var(--ui-tree-drop-color)}.disclosure,.disclosure-spacer{grid-column:1;grid-row:1;inline-size:20px;block-size:28px}.disclosure{display:grid;place-items:center;padding:0;color:var(--ui-text-muted);background:transparent;border:0;border-radius:var(--ui-radius-sm);cursor:pointer}.disclosure:hover{color:var(--ui-text-primary);background:var(--ui-surface-elevated)}.disclosure-icon{display:block;inline-size:14px;block-size:14px;transform:rotate(-90deg);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}.disclosure-icon--expanded{transform:rotate(0deg)}.disclosure-icon :is(svg),.drag-handle :is(svg){display:block;inline-size:100%;block-size:100%}.leading{display:none}.leading:has(*){display:inline-grid;place-items:center;grid-column:2;grid-row:1;inline-size:16px;block-size:16px;margin-inline-start:var(--ui-space-1)}.label{grid-column:3;grid-row:1;min-inline-size:0;padding:var(--ui-space-1) var(--ui-space-2)}.actions{grid-column:4;grid-row:1;display:inline-flex;align-items:center;min-inline-size:0}.drag-handle{position:absolute;z-index:2;inset-block-start:50%;inset-inline-start:-22px;inline-size:20px;block-size:32px;display:grid;place-items:center;padding:7px 3px;color:var(--ui-text-muted);background:var(--ui-surface-elevated);border:1px solid transparent;border-radius:var(--ui-radius-sm);cursor:grab;opacity:0;pointer-events:none;transform:translateY(-50%);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease)}.row:hover .drag-handle,.drag-handle:focus-visible,:host([data-dragging]) .drag-handle{opacity:1;pointer-events:auto}.drag-handle:active{cursor:grabbing}.drop-indicator{position:absolute;z-index:3;inset-inline:1px;display:none;block-size:2px;border-radius:999px;background:var(--ui-tree-drop-color);pointer-events:none}.drop-indicator::before,.drop-indicator::after{content:'';position:absolute;inset-block-start:50%;inline-size:7px;block-size:7px;border:2px solid var(--ui-tree-drop-color);border-radius:999px;background:var(--ui-surface-elevated);transform:translateY(-50%)}.drop-indicator::before{inset-inline-start:-1px}.drop-indicator::after{inset-inline-end:-1px}:host([data-drop-position='before']) .drop-indicator{display:block;inset-block-start:-1px}:host([data-drop-position='after']) .drop-indicator{display:block;inset-block-end:-1px}.children[hidden]{display:none}@media (hover: none), (pointer: coarse){.drag-handle{display:none}}@media (prefers-reduced-motion: reduce){.row,.disclosure-icon,.drag-handle{transition:none}}`;
605
+
606
+ const UITreeItem = class {
607
+ constructor(hostRef) {
608
+ registerInstance(this, hostRef);
609
+ }
610
+ get host() { return getElement(this); }
611
+ /** Stable application identifier emitted by tree interaction events. */
612
+ itemId = '';
613
+ /** Accessible name used by the disclosure and drag handle. */
614
+ label = '';
615
+ /** One-based visual and semantic nesting level. */
616
+ depth = 1;
617
+ /** Whether this item accepts children and exposes disclosure behavior. */
618
+ container = false;
619
+ /** Whether this item participates in pointer drag and drop. */
620
+ sortable = false;
621
+ /** Application-defined kind used to reject incompatible sibling drops. */
622
+ dragType = 'item';
623
+ /** Application-defined parent/list identity included with reorder events. */
624
+ dropScope = '';
625
+ /** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
626
+ accepts = '';
627
+ /** Initial controlled expansion value. */
628
+ expanded = false;
629
+ /** Initial uncontrolled expansion value. */
630
+ defaultExpanded = false;
631
+ selected = false;
632
+ disabled = false;
633
+ internalExpanded = false;
634
+ syncExpandedFromProp() {
635
+ this.internalExpanded = this.expanded;
636
+ }
637
+ componentWillLoad() {
638
+ this.internalExpanded = this.expanded || this.defaultExpanded;
639
+ }
640
+ componentDidLoad() {
641
+ this.host.addEventListener('ui-tree-auto-expand', this.onAutoExpand);
642
+ }
643
+ disconnectedCallback() {
644
+ this.host.removeEventListener('ui-tree-auto-expand', this.onAutoExpand);
645
+ }
646
+ setExpanded(expanded, trigger) {
647
+ if (!this.container || this.disabled || this.internalExpanded === expanded)
648
+ return;
649
+ this.internalExpanded = expanded;
650
+ dispatchDetail(this.host, 'expand', { id: this.itemId, expanded, trigger });
651
+ }
652
+ onAutoExpand = () => {
653
+ this.setExpanded(true, 'pointer');
654
+ };
655
+ onDisclosureClick = (event) => {
656
+ event.stopPropagation();
657
+ this.setExpanded(!this.internalExpanded, eventToTrigger(event));
658
+ };
659
+ onDisclosureKeydown = (event) => {
660
+ if (event.key !== 'ArrowRight' && event.key !== 'ArrowLeft')
661
+ return;
662
+ event.preventDefault();
663
+ event.stopPropagation();
664
+ this.setExpanded(event.key === 'ArrowRight', 'keyboard');
665
+ };
666
+ onRowClick = (event) => {
667
+ if (!this.container || this.disabled)
668
+ return;
669
+ const path = event.composedPath();
670
+ const interactive = path.some((node) => node instanceof HTMLElement && (node.matches('a, button, input, select, textarea, [role="button"], [role="link"]')
671
+ || node.getAttribute('slot') === 'actions'));
672
+ if (!interactive)
673
+ this.setExpanded(!this.internalExpanded, eventToTrigger(event));
674
+ };
675
+ render() {
676
+ const level = Math.max(1, Math.floor(this.depth));
677
+ const disclosureLabel = `${this.internalExpanded ? 'Collapse' : 'Expand'} ${this.label || 'item'}`;
678
+ const dragLabel = `Drag ${this.label || 'item'} to reorder`;
679
+ return (h(Host, { key: 'ea8ed538aa3883c87257a25614a066965364693f', role: "treeitem", "aria-level": String(level), "aria-expanded": this.container ? String(this.internalExpanded) : undefined, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "data-container": this.container ? '' : undefined, "data-selected": this.selected ? '' : undefined, "data-disabled": this.disabled ? '' : undefined, "data-drag-type": this.dragType || 'item', "data-drop-scope": this.dropScope || undefined, "data-accepts": this.accepts || undefined, tabIndex: this.disabled ? -1 : 0, style: {
680
+ '--ui-tree-item-depth': String(level - 1),
681
+ 'margin-inline-start': level > 1 ? 'var(--ui-tree-indent, 16px)' : '0px',
682
+ } }, h("div", { key: '740b93aa47e65d8a1cb899d4b9c966d9ad1d456f', class: "row", part: "row", onClick: this.onRowClick }, this.sortable && !this.disabled ? (h("button", { class: "drag-handle", part: "drag-handle", type: "button", draggable: true, "aria-label": dragLabel, title: dragLabel }, h("span", { innerHTML: loomaIconMarkup('grip-vertical') }))) : null, this.container ? (h("button", { class: "disclosure", part: "disclosure", type: "button", "aria-label": disclosureLabel, "aria-expanded": String(this.internalExpanded), disabled: this.disabled, onClick: this.onDisclosureClick, onKeyDown: this.onDisclosureKeydown }, h("span", { class: { 'disclosure-icon': true, 'disclosure-icon--expanded': this.internalExpanded }, innerHTML: loomaIconMarkup('chevron-down') }))) : h("span", { class: "disclosure-spacer", "aria-hidden": "true" }), h("span", { key: '37e1b7f1cdddf623734becef465ffde83d8b86f2', class: "leading", part: "leading" }, h("slot", { key: '0ab3a60c98628f009918d0d720772154912d2709', name: "leading" })), h("span", { key: 'defdd343f25a0f4354110e981f3889e1d09c27ee', class: "label", part: "label" }, h("slot", { key: 'bde46ccacc1a620348062fc300503c4f1736316b' })), h("span", { key: 'caff9ada38c41be90aeb6e331f4c54a51f31d26c', class: "actions", part: "actions" }, h("slot", { key: 'e11704d6871445c91eaa29c99302d8b751be69d3', name: "actions" })), h("span", { key: '7e40559d6c5ba56710bc705083ad2ede3046e0b1', class: "drop-indicator", part: "drop-indicator", "aria-hidden": "true" })), this.container ? (h("div", { class: "children", part: "children", role: "group", hidden: !this.internalExpanded }, h("slot", { name: "children" }))) : null));
683
+ }
684
+ static get watchers() { return {
685
+ "expanded": [{
686
+ "syncExpandedFromProp": 0
687
+ }]
688
+ }; }
689
+ };
690
+ UITreeItem.style = uiTreeItemCss();
691
+
692
+ export { UITreeItem as ui_tree_item };