@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
package/dist/index.cjs CHANGED
@@ -2490,6 +2490,626 @@ var init_ui_top_bar_entry = __esm({
2490
2490
  }
2491
2491
  });
2492
2492
 
2493
+ // dist/esm/ui-tree-item.entry.js
2494
+ var ui_tree_item_entry_exports = {};
2495
+ __export(ui_tree_item_entry_exports, {
2496
+ ui_tree_item: () => UITreeItem
2497
+ });
2498
+ function serializeAttributes(attributes) {
2499
+ return Object.entries(attributes).map(([name, value]) => ` ${name}="${escapeAttribute(value)}"`).join("");
2500
+ }
2501
+ function escapeAttribute(value) {
2502
+ return String(value).replaceAll("&", "&").replaceAll('"', """);
2503
+ }
2504
+ function serializeIconNode(node) {
2505
+ const [tag, attributes] = node;
2506
+ return `<${tag}${serializeAttributes(attributes)}></${tag}>`;
2507
+ }
2508
+ function loomaIconMarkup(name, className = "looma-icon") {
2509
+ return [
2510
+ `<svg class="${escapeAttribute(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
2511
+ ' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',
2512
+ ' stroke-linecap="round" stroke-linejoin="round">',
2513
+ LOOMA_ICONS[name].map(serializeIconNode).join(""),
2514
+ "</svg>"
2515
+ ].join("");
2516
+ }
2517
+ var Bold, Braces, ChevronDown, ChevronLeft, CodeXml, Columns3, Ellipsis, Eraser, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Italic, ListOrdered, ListTodo, List, Merge, Minus, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Pilcrow, Plus, Quote, Redo2, Rows3, Split, Strikethrough, Table2, TextAlignCenter, TextAlignEnd, TextAlignStart, Trash2, Underline, Undo2, LOOMA_ICONS, uiTreeItemCss, UITreeItem;
2518
+ var init_ui_tree_item_entry = __esm({
2519
+ "dist/esm/ui-tree-item.entry.js"() {
2520
+ init_index_CEeiinfk();
2521
+ init_events_JwSoedEO();
2522
+ Bold = [
2523
+ ["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" }]
2524
+ ];
2525
+ Braces = [
2526
+ ["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" }],
2527
+ ["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" }]
2528
+ ];
2529
+ ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
2530
+ ChevronLeft = [["path", { d: "m15 18-6-6 6-6" }]];
2531
+ CodeXml = [
2532
+ ["path", { d: "m18 16 4-4-4-4" }],
2533
+ ["path", { d: "m6 8-4 4 4 4" }],
2534
+ ["path", { d: "m14.5 4-5 16" }]
2535
+ ];
2536
+ Columns3 = [
2537
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
2538
+ ["path", { d: "M9 3v18" }],
2539
+ ["path", { d: "M15 3v18" }]
2540
+ ];
2541
+ Ellipsis = [
2542
+ ["circle", { cx: "12", cy: "12", r: "1" }],
2543
+ ["circle", { cx: "19", cy: "12", r: "1" }],
2544
+ ["circle", { cx: "5", cy: "12", r: "1" }]
2545
+ ];
2546
+ Eraser = [
2547
+ [
2548
+ "path",
2549
+ {
2550
+ 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"
2551
+ }
2552
+ ],
2553
+ ["path", { d: "m5.082 11.09 8.828 8.828" }]
2554
+ ];
2555
+ GripHorizontal = [
2556
+ ["circle", { cx: "12", cy: "9", r: "1" }],
2557
+ ["circle", { cx: "19", cy: "9", r: "1" }],
2558
+ ["circle", { cx: "5", cy: "9", r: "1" }],
2559
+ ["circle", { cx: "12", cy: "15", r: "1" }],
2560
+ ["circle", { cx: "19", cy: "15", r: "1" }],
2561
+ ["circle", { cx: "5", cy: "15", r: "1" }]
2562
+ ];
2563
+ GripVertical = [
2564
+ ["circle", { cx: "9", cy: "12", r: "1" }],
2565
+ ["circle", { cx: "9", cy: "5", r: "1" }],
2566
+ ["circle", { cx: "9", cy: "19", r: "1" }],
2567
+ ["circle", { cx: "15", cy: "12", r: "1" }],
2568
+ ["circle", { cx: "15", cy: "5", r: "1" }],
2569
+ ["circle", { cx: "15", cy: "19", r: "1" }]
2570
+ ];
2571
+ Heading1 = [
2572
+ ["path", { d: "M4 12h8" }],
2573
+ ["path", { d: "M4 18V6" }],
2574
+ ["path", { d: "M12 18V6" }],
2575
+ ["path", { d: "m17 12 3-2v8" }]
2576
+ ];
2577
+ Heading2 = [
2578
+ ["path", { d: "M4 12h8" }],
2579
+ ["path", { d: "M4 18V6" }],
2580
+ ["path", { d: "M12 18V6" }],
2581
+ ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }]
2582
+ ];
2583
+ Heading3 = [
2584
+ ["path", { d: "M4 12h8" }],
2585
+ ["path", { d: "M4 18V6" }],
2586
+ ["path", { d: "M12 18V6" }],
2587
+ ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }],
2588
+ ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]
2589
+ ];
2590
+ Highlighter = [
2591
+ ["path", { d: "m9 11-6 6v3h9l3-3" }],
2592
+ ["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" }]
2593
+ ];
2594
+ Image = [
2595
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
2596
+ ["circle", { cx: "9", cy: "9", r: "2" }],
2597
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
2598
+ ];
2599
+ Italic = [
2600
+ ["line", { x1: "19", x2: "10", y1: "4", y2: "4" }],
2601
+ ["line", { x1: "14", x2: "5", y1: "20", y2: "20" }],
2602
+ ["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
2603
+ ];
2604
+ ListOrdered = [
2605
+ ["path", { d: "M11 5h10" }],
2606
+ ["path", { d: "M11 12h10" }],
2607
+ ["path", { d: "M11 19h10" }],
2608
+ ["path", { d: "M4 4h1v5" }],
2609
+ ["path", { d: "M4 9h2" }],
2610
+ ["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" }]
2611
+ ];
2612
+ ListTodo = [
2613
+ ["path", { d: "M13 5h8" }],
2614
+ ["path", { d: "M13 12h8" }],
2615
+ ["path", { d: "M13 19h8" }],
2616
+ ["path", { d: "m3 17 2 2 4-4" }],
2617
+ ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }]
2618
+ ];
2619
+ List = [
2620
+ ["path", { d: "M3 5h.01" }],
2621
+ ["path", { d: "M3 12h.01" }],
2622
+ ["path", { d: "M3 19h.01" }],
2623
+ ["path", { d: "M8 5h13" }],
2624
+ ["path", { d: "M8 12h13" }],
2625
+ ["path", { d: "M8 19h13" }]
2626
+ ];
2627
+ Merge = [
2628
+ ["path", { d: "m8 6 4-4 4 4" }],
2629
+ ["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }],
2630
+ ["path", { d: "m20 22-5-5" }]
2631
+ ];
2632
+ Minus = [["path", { d: "M5 12h14" }]];
2633
+ PaintBucket = [
2634
+ ["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" }],
2635
+ ["path", { d: "m5 2 5 5" }],
2636
+ ["path", { d: "M2 13h15" }],
2637
+ ["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" }]
2638
+ ];
2639
+ PanelBottom = [
2640
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
2641
+ ["path", { d: "M3 15h18" }]
2642
+ ];
2643
+ PanelLeft = [
2644
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
2645
+ ["path", { d: "M9 3v18" }]
2646
+ ];
2647
+ PanelRight = [
2648
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
2649
+ ["path", { d: "M15 3v18" }]
2650
+ ];
2651
+ PanelTop = [
2652
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
2653
+ ["path", { d: "M3 9h18" }]
2654
+ ];
2655
+ Pilcrow = [
2656
+ ["path", { d: "M13 4v16" }],
2657
+ ["path", { d: "M17 4v16" }],
2658
+ ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }]
2659
+ ];
2660
+ Plus = [
2661
+ ["path", { d: "M5 12h14" }],
2662
+ ["path", { d: "M12 5v14" }]
2663
+ ];
2664
+ Quote = [
2665
+ [
2666
+ "path",
2667
+ {
2668
+ 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"
2669
+ }
2670
+ ],
2671
+ [
2672
+ "path",
2673
+ {
2674
+ 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"
2675
+ }
2676
+ ]
2677
+ ];
2678
+ Redo2 = [
2679
+ ["path", { d: "m15 14 5-5-5-5" }],
2680
+ ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]
2681
+ ];
2682
+ Rows3 = [
2683
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
2684
+ ["path", { d: "M21 9H3" }],
2685
+ ["path", { d: "M21 15H3" }]
2686
+ ];
2687
+ Split = [
2688
+ ["path", { d: "M16 3h5v5" }],
2689
+ ["path", { d: "M8 3H3v5" }],
2690
+ ["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }],
2691
+ ["path", { d: "m15 9 6-6" }]
2692
+ ];
2693
+ Strikethrough = [
2694
+ ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
2695
+ ["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
2696
+ ["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
2697
+ ];
2698
+ Table2 = [
2699
+ [
2700
+ "path",
2701
+ {
2702
+ 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"
2703
+ }
2704
+ ]
2705
+ ];
2706
+ TextAlignCenter = [
2707
+ ["path", { d: "M21 5H3" }],
2708
+ ["path", { d: "M17 12H7" }],
2709
+ ["path", { d: "M19 19H5" }]
2710
+ ];
2711
+ TextAlignEnd = [
2712
+ ["path", { d: "M21 5H3" }],
2713
+ ["path", { d: "M21 12H9" }],
2714
+ ["path", { d: "M21 19H7" }]
2715
+ ];
2716
+ TextAlignStart = [
2717
+ ["path", { d: "M21 5H3" }],
2718
+ ["path", { d: "M15 12H3" }],
2719
+ ["path", { d: "M17 19H3" }]
2720
+ ];
2721
+ Trash2 = [
2722
+ ["path", { d: "M10 11v6" }],
2723
+ ["path", { d: "M14 11v6" }],
2724
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
2725
+ ["path", { d: "M3 6h18" }],
2726
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]
2727
+ ];
2728
+ Underline = [
2729
+ ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }],
2730
+ ["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]
2731
+ ];
2732
+ Undo2 = [
2733
+ ["path", { d: "M9 14 4 9l5-5" }],
2734
+ ["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" }]
2735
+ ];
2736
+ LOOMA_ICONS = {
2737
+ "align-center": TextAlignCenter,
2738
+ "align-left": TextAlignStart,
2739
+ "align-right": TextAlignEnd,
2740
+ bold: Bold,
2741
+ braces: Braces,
2742
+ "chevron-down": ChevronDown,
2743
+ "chevron-left": ChevronLeft,
2744
+ "code-xml": CodeXml,
2745
+ columns: Columns3,
2746
+ ellipsis: Ellipsis,
2747
+ eraser: Eraser,
2748
+ "grip-horizontal": GripHorizontal,
2749
+ "grip-vertical": GripVertical,
2750
+ "heading-1": Heading1,
2751
+ "heading-2": Heading2,
2752
+ "heading-3": Heading3,
2753
+ highlighter: Highlighter,
2754
+ image: Image,
2755
+ italic: Italic,
2756
+ list: List,
2757
+ "list-ordered": ListOrdered,
2758
+ "list-todo": ListTodo,
2759
+ merge: Merge,
2760
+ minus: Minus,
2761
+ "paint-bucket": PaintBucket,
2762
+ "panel-bottom": PanelBottom,
2763
+ "panel-left": PanelLeft,
2764
+ "panel-right": PanelRight,
2765
+ "panel-top": PanelTop,
2766
+ pilcrow: Pilcrow,
2767
+ plus: Plus,
2768
+ quote: Quote,
2769
+ redo: Redo2,
2770
+ rows: Rows3,
2771
+ split: Split,
2772
+ strikethrough: Strikethrough,
2773
+ table: Table2,
2774
+ trash: Trash2,
2775
+ underline: Underline,
2776
+ undo: Undo2
2777
+ };
2778
+ 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}}`;
2779
+ UITreeItem = class {
2780
+ constructor(hostRef) {
2781
+ registerInstance(this, hostRef);
2782
+ }
2783
+ get host() {
2784
+ return getElement(this);
2785
+ }
2786
+ /** Stable application identifier emitted by tree interaction events. */
2787
+ itemId = "";
2788
+ /** Accessible name used by the disclosure and drag handle. */
2789
+ label = "";
2790
+ /** One-based visual and semantic nesting level. */
2791
+ depth = 1;
2792
+ /** Whether this item accepts children and exposes disclosure behavior. */
2793
+ container = false;
2794
+ /** Whether this item participates in pointer drag and drop. */
2795
+ sortable = false;
2796
+ /** Application-defined kind used to reject incompatible sibling drops. */
2797
+ dragType = "item";
2798
+ /** Application-defined parent/list identity included with reorder events. */
2799
+ dropScope = "";
2800
+ /** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
2801
+ accepts = "";
2802
+ /** Initial controlled expansion value. */
2803
+ expanded = false;
2804
+ /** Initial uncontrolled expansion value. */
2805
+ defaultExpanded = false;
2806
+ selected = false;
2807
+ disabled = false;
2808
+ internalExpanded = false;
2809
+ syncExpandedFromProp() {
2810
+ this.internalExpanded = this.expanded;
2811
+ }
2812
+ componentWillLoad() {
2813
+ this.internalExpanded = this.expanded || this.defaultExpanded;
2814
+ }
2815
+ componentDidLoad() {
2816
+ this.host.addEventListener("ui-tree-auto-expand", this.onAutoExpand);
2817
+ }
2818
+ disconnectedCallback() {
2819
+ this.host.removeEventListener("ui-tree-auto-expand", this.onAutoExpand);
2820
+ }
2821
+ setExpanded(expanded, trigger) {
2822
+ if (!this.container || this.disabled || this.internalExpanded === expanded)
2823
+ return;
2824
+ this.internalExpanded = expanded;
2825
+ dispatchDetail(this.host, "expand", { id: this.itemId, expanded, trigger });
2826
+ }
2827
+ onAutoExpand = () => {
2828
+ this.setExpanded(true, "pointer");
2829
+ };
2830
+ onDisclosureClick = (event) => {
2831
+ event.stopPropagation();
2832
+ this.setExpanded(!this.internalExpanded, eventToTrigger(event));
2833
+ };
2834
+ onDisclosureKeydown = (event) => {
2835
+ if (event.key !== "ArrowRight" && event.key !== "ArrowLeft")
2836
+ return;
2837
+ event.preventDefault();
2838
+ event.stopPropagation();
2839
+ this.setExpanded(event.key === "ArrowRight", "keyboard");
2840
+ };
2841
+ onRowClick = (event) => {
2842
+ if (!this.container || this.disabled)
2843
+ return;
2844
+ const path = event.composedPath();
2845
+ const interactive = path.some((node) => node instanceof HTMLElement && (node.matches('a, button, input, select, textarea, [role="button"], [role="link"]') || node.getAttribute("slot") === "actions"));
2846
+ if (!interactive)
2847
+ this.setExpanded(!this.internalExpanded, eventToTrigger(event));
2848
+ };
2849
+ render() {
2850
+ const level = Math.max(1, Math.floor(this.depth));
2851
+ const disclosureLabel = `${this.internalExpanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
2852
+ const dragLabel = `Drag ${this.label || "item"} to reorder`;
2853
+ return h(Host, { key: "ea8ed538aa3883c87257a25614a066965364693f", role: "treeitem", "aria-level": String(level), "aria-expanded": this.container ? String(this.internalExpanded) : void 0, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? "true" : void 0, "data-container": this.container ? "" : void 0, "data-selected": this.selected ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-drag-type": this.dragType || "item", "data-drop-scope": this.dropScope || void 0, "data-accepts": this.accepts || void 0, tabIndex: this.disabled ? -1 : 0, style: {
2854
+ "--ui-tree-item-depth": String(level - 1),
2855
+ "margin-inline-start": level > 1 ? "var(--ui-tree-indent, 16px)" : "0px"
2856
+ } }, 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);
2857
+ }
2858
+ static get watchers() {
2859
+ return {
2860
+ "expanded": [{
2861
+ "syncExpandedFromProp": 0
2862
+ }]
2863
+ };
2864
+ }
2865
+ };
2866
+ UITreeItem.style = uiTreeItemCss();
2867
+ }
2868
+ });
2869
+
2870
+ // dist/esm/ui-tree.entry.js
2871
+ var ui_tree_entry_exports = {};
2872
+ __export(ui_tree_entry_exports, {
2873
+ ui_tree: () => UITree
2874
+ });
2875
+ function classifyDropPosition(rect, clientY, acceptsChildren) {
2876
+ const progress = rect.height > 0 ? Math.min(1, Math.max(0, (clientY - rect.top) / rect.height)) : 0.5;
2877
+ if (!acceptsChildren)
2878
+ return progress < 0.5 ? "before" : "after";
2879
+ if (progress < 0.25)
2880
+ return "before";
2881
+ if (progress > 0.75)
2882
+ return "after";
2883
+ return "inside";
2884
+ }
2885
+ function setElementDragImage(dataTransfer, element) {
2886
+ if (!dataTransfer || typeof dataTransfer.setDragImage !== "function")
2887
+ return;
2888
+ const { height } = element.getBoundingClientRect();
2889
+ dataTransfer.setDragImage(element, 16, Math.max(0, height / 2));
2890
+ }
2891
+ function createHoverIntent(delay, onIntent) {
2892
+ let timer;
2893
+ let pendingKey;
2894
+ function cancel() {
2895
+ if (timer)
2896
+ clearTimeout(timer);
2897
+ timer = void 0;
2898
+ pendingKey = void 0;
2899
+ }
2900
+ return {
2901
+ schedule(key) {
2902
+ if (pendingKey === key && timer)
2903
+ return;
2904
+ cancel();
2905
+ pendingKey = key;
2906
+ timer = setTimeout(() => {
2907
+ timer = void 0;
2908
+ const resolvedKey = pendingKey;
2909
+ pendingKey = void 0;
2910
+ if (resolvedKey)
2911
+ onIntent(resolvedKey);
2912
+ }, Math.max(0, delay));
2913
+ },
2914
+ cancel,
2915
+ destroy: cancel
2916
+ };
2917
+ }
2918
+ var uiTreeCss, UITree;
2919
+ var init_ui_tree_entry = __esm({
2920
+ "dist/esm/ui-tree.entry.js"() {
2921
+ init_index_CEeiinfk();
2922
+ init_events_JwSoedEO();
2923
+ uiTreeCss = () => `:host{--ui-tree-indent:16px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter, 22px)}::slotted(ui-tree-item){--ui-tree-indent:inherit}`;
2924
+ UITree = class {
2925
+ constructor(hostRef) {
2926
+ registerInstance(this, hostRef);
2927
+ }
2928
+ get host() {
2929
+ return getElement(this);
2930
+ }
2931
+ label = "Tree";
2932
+ hoverExpandDelay = 700;
2933
+ source = null;
2934
+ target = null;
2935
+ position = null;
2936
+ hoverIntent = null;
2937
+ componentDidLoad() {
2938
+ this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
2939
+ this.host.addEventListener("dragstart", this.onDragStart);
2940
+ this.host.addEventListener("dragover", this.onDragOver);
2941
+ this.host.addEventListener("dragleave", this.onDragLeave);
2942
+ this.host.addEventListener("drop", this.onDrop);
2943
+ this.host.addEventListener("dragend", this.onDragEnd);
2944
+ this.host.addEventListener("keydown", this.onKeyDown);
2945
+ }
2946
+ disconnectedCallback() {
2947
+ this.hoverIntent?.destroy();
2948
+ this.host.removeEventListener("dragstart", this.onDragStart);
2949
+ this.host.removeEventListener("dragover", this.onDragOver);
2950
+ this.host.removeEventListener("dragleave", this.onDragLeave);
2951
+ this.host.removeEventListener("drop", this.onDrop);
2952
+ this.host.removeEventListener("dragend", this.onDragEnd);
2953
+ this.host.removeEventListener("keydown", this.onKeyDown);
2954
+ }
2955
+ itemFromEvent(event) {
2956
+ return event.composedPath().find((node) => node instanceof HTMLElement && node.localName === "ui-tree-item") ?? null;
2957
+ }
2958
+ itemId(item) {
2959
+ return item.itemId || item.getAttribute("item-id") || "";
2960
+ }
2961
+ rowFor(item) {
2962
+ return item.shadowRoot?.querySelector('[part="row"]') ?? null;
2963
+ }
2964
+ acceptsChildren(item) {
2965
+ return Boolean(item.container ?? item.hasAttribute("container")) && !Boolean(item.disabled ?? item.hasAttribute("disabled"));
2966
+ }
2967
+ itemMetadata(item) {
2968
+ return {
2969
+ type: item.getAttribute("data-drag-type") || item.getAttribute("drag-type") || "item",
2970
+ scope: item.getAttribute("data-drop-scope") || item.getAttribute("drop-scope") || "",
2971
+ accepts: (item.getAttribute("data-accepts") || item.getAttribute("accepts") || "").split(",").map((value) => value.trim()).filter(Boolean)
2972
+ };
2973
+ }
2974
+ permitsDrop(source, target, position) {
2975
+ if (source.contains(target))
2976
+ return false;
2977
+ const sourceMeta = this.itemMetadata(source);
2978
+ const targetMeta = this.itemMetadata(target);
2979
+ if (position === "inside") {
2980
+ return this.acceptsChildren(target) && (targetMeta.accepts.length === 0 || targetMeta.accepts.includes(sourceMeta.type));
2981
+ }
2982
+ return sourceMeta.type === targetMeta.type;
2983
+ }
2984
+ clearTarget() {
2985
+ this.target?.removeAttribute("data-drop-position");
2986
+ this.target = null;
2987
+ this.position = null;
2988
+ this.hoverIntent?.cancel();
2989
+ }
2990
+ finishDrag() {
2991
+ this.source?.removeAttribute("data-dragging");
2992
+ this.source = null;
2993
+ this.clearTarget();
2994
+ }
2995
+ expandTarget = (itemId) => {
2996
+ const item = Array.from(this.host.querySelectorAll("ui-tree-item")).find((candidate) => this.itemId(candidate) === itemId);
2997
+ if (!item || item.getAttribute("aria-expanded") !== "false")
2998
+ return;
2999
+ item.dispatchEvent(new CustomEvent("ui-tree-auto-expand"));
3000
+ };
3001
+ onDragStart = (event) => {
3002
+ const item = this.itemFromEvent(event);
3003
+ if (!item || !Boolean(item.sortable ?? item.hasAttribute("sortable")) || Boolean(item.disabled ?? item.hasAttribute("disabled")))
3004
+ return;
3005
+ const fromHandle = event.composedPath().some((node) => node instanceof HTMLElement && node.getAttribute("part") === "drag-handle");
3006
+ if (!fromHandle) {
3007
+ event.preventDefault();
3008
+ return;
3009
+ }
3010
+ const sourceId = this.itemId(item);
3011
+ const row = this.rowFor(item);
3012
+ if (!sourceId || !row) {
3013
+ event.preventDefault();
3014
+ return;
3015
+ }
3016
+ this.source = item;
3017
+ item.setAttribute("data-dragging", "true");
3018
+ if (event.dataTransfer) {
3019
+ event.dataTransfer.effectAllowed = "move";
3020
+ event.dataTransfer.setData("text/plain", sourceId);
3021
+ }
3022
+ setElementDragImage(event.dataTransfer, row);
3023
+ };
3024
+ onDragOver = (event) => {
3025
+ if (!this.source)
3026
+ return;
3027
+ const target = this.itemFromEvent(event);
3028
+ if (!target || target === this.source) {
3029
+ this.clearTarget();
3030
+ return;
3031
+ }
3032
+ const row = this.rowFor(target);
3033
+ if (!row)
3034
+ return;
3035
+ const position = classifyDropPosition(row.getBoundingClientRect(), event.clientY, this.acceptsChildren(target));
3036
+ if (!this.permitsDrop(this.source, target, position)) {
3037
+ if (event.dataTransfer)
3038
+ event.dataTransfer.dropEffect = "none";
3039
+ this.clearTarget();
3040
+ return;
3041
+ }
3042
+ event.preventDefault();
3043
+ if (event.dataTransfer)
3044
+ event.dataTransfer.dropEffect = "move";
3045
+ if (this.target !== target || this.position !== position) {
3046
+ this.clearTarget();
3047
+ this.target = target;
3048
+ this.position = position;
3049
+ target.setAttribute("data-drop-position", position);
3050
+ }
3051
+ if (position === "inside" && target.getAttribute("aria-expanded") === "false") {
3052
+ this.hoverIntent?.schedule(this.itemId(target));
3053
+ } else {
3054
+ this.hoverIntent?.cancel();
3055
+ }
3056
+ };
3057
+ onDragLeave = (event) => {
3058
+ const related = event.relatedTarget;
3059
+ if (related instanceof Node && this.host.contains(related))
3060
+ return;
3061
+ this.clearTarget();
3062
+ };
3063
+ onDrop = (event) => {
3064
+ if (!this.source || !this.target || !this.position)
3065
+ return;
3066
+ event.preventDefault();
3067
+ const sourceId = this.itemId(this.source);
3068
+ const targetId = this.itemId(this.target);
3069
+ if (sourceId && targetId) {
3070
+ const sourceMeta = this.itemMetadata(this.source);
3071
+ const targetMeta = this.itemMetadata(this.target);
3072
+ dispatchDetail(this.host, "reorder", {
3073
+ sourceId,
3074
+ targetId,
3075
+ position: this.position,
3076
+ sourceType: sourceMeta.type,
3077
+ targetType: targetMeta.type,
3078
+ sourceScope: sourceMeta.scope,
3079
+ targetScope: targetMeta.scope,
3080
+ trigger: "pointer"
3081
+ });
3082
+ }
3083
+ this.finishDrag();
3084
+ };
3085
+ onDragEnd = () => {
3086
+ this.finishDrag();
3087
+ };
3088
+ visibleItems() {
3089
+ return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((item) => item.getClientRects().length > 0 && !item.hasAttribute("disabled"));
3090
+ }
3091
+ onKeyDown = (event) => {
3092
+ const current = this.itemFromEvent(event);
3093
+ if (!current)
3094
+ return;
3095
+ const items = this.visibleItems();
3096
+ const index = items.indexOf(current);
3097
+ if (index < 0)
3098
+ return;
3099
+ const next = event.key === "ArrowDown" ? items[index + 1] : event.key === "ArrowUp" ? items[index - 1] : null;
3100
+ if (!next)
3101
+ return;
3102
+ event.preventDefault();
3103
+ next.focus();
3104
+ };
3105
+ render() {
3106
+ return h(Host, { key: "5761d2840d2694340a4b937d46522f15f81973ac", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "08e5a7b489eed4f4eae9de6462104fd12defd336" }));
3107
+ }
3108
+ };
3109
+ UITree.style = uiTreeCss();
3110
+ }
3111
+ });
3112
+
2493
3113
  // import("./**/*.entry.js") in dist/esm/index-CEeiinfk.js
2494
3114
  var globImport_entry_js;
2495
3115
  var init_ = __esm({
@@ -2521,7 +3141,9 @@ var init_ = __esm({
2521
3141
  "./ui-textarea.entry.js": () => Promise.resolve().then(() => (init_ui_textarea_entry(), ui_textarea_entry_exports)),
2522
3142
  "./ui-toast-region.entry.js": () => Promise.resolve().then(() => (init_ui_toast_region_entry(), ui_toast_region_entry_exports)),
2523
3143
  "./ui-tooltip.entry.js": () => Promise.resolve().then(() => (init_ui_tooltip_entry(), ui_tooltip_entry_exports)),
2524
- "./ui-top-bar.entry.js": () => Promise.resolve().then(() => (init_ui_top_bar_entry(), ui_top_bar_entry_exports))
3144
+ "./ui-top-bar.entry.js": () => Promise.resolve().then(() => (init_ui_top_bar_entry(), ui_top_bar_entry_exports)),
3145
+ "./ui-tree-item.entry.js": () => Promise.resolve().then(() => (init_ui_tree_item_entry(), ui_tree_item_entry_exports)),
3146
+ "./ui-tree.entry.js": () => Promise.resolve().then(() => (init_ui_tree_entry(), ui_tree_entry_exports))
2525
3147
  });
2526
3148
  }
2527
3149
  });
@@ -4072,17 +4694,20 @@ var init_index_CEeiinfk = __esm({
4072
4694
  var index_exports = {};
4073
4695
  __export(index_exports, {
4074
4696
  DEFAULT_AFFORDANCE_NEAR_RADIUS: () => DEFAULT_AFFORDANCE_NEAR_RADIUS2,
4075
- LOOMA_ICONS: () => LOOMA_ICONS,
4697
+ LOOMA_ICONS: () => LOOMA_ICONS2,
4076
4698
  clampRectToViewport: () => clampRectToViewport,
4699
+ classifyDropPosition: () => classifyDropPosition2,
4077
4700
  closeOverlay: () => closeOverlay2,
4701
+ createHoverIntent: () => createHoverIntent2,
4078
4702
  createProximityCoordinator: () => createProximityCoordinator2,
4079
4703
  distanceFromPointToRect: () => distanceFromPointToRect2,
4080
4704
  getTopOverlay: () => getTopOverlay2,
4081
4705
  getVisualViewportRect: () => getVisualViewportRect,
4082
4706
  isTopOverlay: () => isTopOverlay,
4083
- loomaIconMarkup: () => loomaIconMarkup,
4707
+ loomaIconMarkup: () => loomaIconMarkup2,
4084
4708
  openOverlay: () => openOverlay2,
4085
- requestTopOverlayClose: () => requestTopOverlayClose2
4709
+ requestTopOverlayClose: () => requestTopOverlayClose2,
4710
+ setElementDragImage: () => setElementDragImage2
4086
4711
  });
4087
4712
  module.exports = __toCommonJS(index_exports);
4088
4713
 
@@ -4098,7 +4723,7 @@ var globalScripts = () => {
4098
4723
  var defineCustomElements = async (win2, options) => {
4099
4724
  if (typeof window === "undefined") return void 0;
4100
4725
  await globalScripts();
4101
- return bootstrapLazy([["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-affordance-scope", [[769, "ui-affordance-scope", { "nearRadius": [514, "near-radius"] }, null, { "nearRadius": [{ "connectCoordinator": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1] }, null, { "checked": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]]], options);
4726
+ return bootstrapLazy([["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "syncTarget": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-affordance-scope", [[769, "ui-affordance-scope", { "nearRadius": [514, "near-radius"] }, null, { "nearRadius": [{ "connectCoordinator": 0 }] }]]], ["ui-avatar", [[513, "ui-avatar", { "src": [1], "alt": [1], "name": [1], "fallback": [1], "hasImage": [32] }, null, { "src": [{ "watchSrc": 0 }] }]]], ["ui-avatar-group", [[769, "ui-avatar-group", { "max": [2], "label": [1], "overflowCount": [32] }, null, { "max": [{ "syncOverflow": 0 }] }]]], ["ui-badge", [[769, "ui-badge", { "variant": [1], "tone": [1] }]]], ["ui-button", [[769, "ui-button", { "variant": [1], "size": [1], "disabled": [4] }, null, { "variant": [{ "syncToButton": 0 }], "size": [{ "syncToButton": 0 }], "disabled": [{ "syncToButton": 0 }] }]]], ["ui-checkbox", [[769, "ui-checkbox", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "indeterminate": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }], "internalChecked": [{ "syncToInput": 0 }], "indeterminate": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOpen": 0 }] }]]], ["ui-disclosure", [[769, "ui-disclosure", { "open": [4], "defaultOpen": [4, "default-open"], "disabled": [4], "internalOpen": [32], "contentId": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncState": 0 }] }]]], ["ui-floating-action-button", [[769, "ui-floating-action-button", { "disabled": [516], "mobileOnly": [516, "mobile-only"], "label": [1] }]]], ["ui-form-field", [[769, "ui-form-field", { "invalid": [4], "disabled": [4], "required": [4] }]]], ["ui-icon-button", [[769, "ui-icon-button", { "disabled": [516], "label": [1], "size": [513], "variant": [513], "anticipatory": [516] }]]], ["ui-input", [[769, "ui-input", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToInput": 0 }], "defaultValue": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "invalid": [{ "syncToInput": 0 }], "readOnly": [{ "syncToInput": 0 }] }]]], ["ui-menu-item", [[769, "ui-menu-item", { "disabled": [516], "value": [1] }]]], ["ui-popover", [[769, "ui-popover", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1] }, null, { "checked": [{ "syncToInput": 0 }], "disabled": [{ "syncToInput": 0 }], "name": [{ "syncToInput": 0 }], "required": [{ "syncToInput": 0 }], "value": [{ "syncToInput": 0 }] }]]], ["ui-radio-group", [[769, "ui-radio-group", { "value": [1], "name": [1], "orientation": [1], "disabled": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToRadios": 0 }], "name": [{ "syncToRadios": 0 }], "orientation": [{ "syncToRadios": 0 }], "disabled": [{ "syncToRadios": 0 }] }]]], ["ui-search-result-row", [[769, "ui-search-result-row", { "disabled": [516], "selected": [516], "hasLeading": [32], "hasMeta": [32], "hasExcerpt": [32], "hasTrailing": [32] }]]], ["ui-search-shell", [[769, "ui-search-shell", { "hasStatus": [32], "hasFooter": [32] }]]], ["ui-select", [[769, "ui-select", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "required": [4], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToSelect": 0 }], "defaultValue": [{ "syncToSelect": 0 }], "disabled": [{ "syncToSelect": 0 }], "invalid": [{ "syncToSelect": 0 }], "required": [{ "syncToSelect": 0 }] }]]], ["ui-switch", [[769, "ui-switch", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 0 }] }]]], ["ui-tabs", [[769, "ui-tabs", { "value": [1], "defaultValue": [1, "default-value"], "orientation": [1], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncState": 0 }], "orientation": [{ "syncState": 0 }] }]]], ["ui-textarea", [[769, "ui-textarea", { "value": [1], "defaultValue": [1, "default-value"], "disabled": [4], "invalid": [4], "readOnly": [4, "readonly"], "rows": [2], "internalValue": [32] }, null, { "value": [{ "syncFromProp": 0 }], "internalValue": [{ "syncToTextarea": 0 }], "defaultValue": [{ "syncToTextarea": 0 }], "disabled": [{ "syncToTextarea": 0 }], "invalid": [{ "syncToTextarea": 0 }], "readOnly": [{ "syncToTextarea": 0 }], "rows": [{ "syncToTextarea": 0 }] }]]], ["ui-toast-region", [[769, "ui-toast-region", { "open": [4], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]], ["ui-top-bar", [[769, "ui-top-bar", { "hasLeading": [32], "hasSearch": [32], "hasActions": [32] }]]], ["ui-tree", [[769, "ui-tree", { "label": [1], "hoverExpandDelay": [2, "hover-expand-delay"] }]]], ["ui-tree-item", [[769, "ui-tree-item", { "itemId": [1, "item-id"], "label": [1], "depth": [2], "container": [4], "sortable": [4], "dragType": [1, "drag-type"], "dropScope": [1, "drop-scope"], "accepts": [1], "expanded": [4], "defaultExpanded": [4, "default-expanded"], "selected": [4], "disabled": [4], "internalExpanded": [32] }, null, { "expanded": [{ "syncExpandedFromProp": 0 }] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }] }]]]], options);
4102
4727
  };
4103
4728
 
4104
4729
  // loader/index.js
@@ -4330,7 +4955,7 @@ function createProximityCoordinator2(scope, options = {}) {
4330
4955
 
4331
4956
  // src/icons.ts
4332
4957
  var import_lucide = require("lucide");
4333
- var LOOMA_ICONS = {
4958
+ var LOOMA_ICONS2 = {
4334
4959
  "align-center": import_lucide.AlignCenter,
4335
4960
  "align-left": import_lucide.AlignLeft,
4336
4961
  "align-right": import_lucide.AlignRight,
@@ -4372,26 +4997,64 @@ var LOOMA_ICONS = {
4372
4997
  underline: import_lucide.Underline,
4373
4998
  undo: import_lucide.Undo2
4374
4999
  };
4375
- function serializeAttributes(attributes) {
4376
- return Object.entries(attributes).map(([name, value]) => ` ${name}="${escapeAttribute(value)}"`).join("");
5000
+ function serializeAttributes2(attributes) {
5001
+ return Object.entries(attributes).map(([name, value]) => ` ${name}="${escapeAttribute2(value)}"`).join("");
4377
5002
  }
4378
- function escapeAttribute(value) {
5003
+ function escapeAttribute2(value) {
4379
5004
  return String(value).replaceAll("&", "&amp;").replaceAll('"', "&quot;");
4380
5005
  }
4381
- function serializeIconNode(node) {
5006
+ function serializeIconNode2(node) {
4382
5007
  const [tag, attributes] = node;
4383
- return `<${tag}${serializeAttributes(attributes)}></${tag}>`;
5008
+ return `<${tag}${serializeAttributes2(attributes)}></${tag}>`;
4384
5009
  }
4385
- function loomaIconMarkup(name, className = "looma-icon") {
5010
+ function loomaIconMarkup2(name, className = "looma-icon") {
4386
5011
  return [
4387
- `<svg class="${escapeAttribute(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
5012
+ `<svg class="${escapeAttribute2(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
4388
5013
  ' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',
4389
5014
  ' stroke-linecap="round" stroke-linejoin="round">',
4390
- LOOMA_ICONS[name].map(serializeIconNode).join(""),
5015
+ LOOMA_ICONS2[name].map(serializeIconNode2).join(""),
4391
5016
  "</svg>"
4392
5017
  ].join("");
4393
5018
  }
4394
5019
 
5020
+ // src/utils/drag-drop.ts
5021
+ function classifyDropPosition2(rect, clientY, acceptsChildren) {
5022
+ const progress = rect.height > 0 ? Math.min(1, Math.max(0, (clientY - rect.top) / rect.height)) : 0.5;
5023
+ if (!acceptsChildren) return progress < 0.5 ? "before" : "after";
5024
+ if (progress < 0.25) return "before";
5025
+ if (progress > 0.75) return "after";
5026
+ return "inside";
5027
+ }
5028
+ function setElementDragImage2(dataTransfer, element) {
5029
+ if (!dataTransfer || typeof dataTransfer.setDragImage !== "function") return;
5030
+ const { height } = element.getBoundingClientRect();
5031
+ dataTransfer.setDragImage(element, 16, Math.max(0, height / 2));
5032
+ }
5033
+ function createHoverIntent2(delay, onIntent) {
5034
+ let timer;
5035
+ let pendingKey;
5036
+ function cancel() {
5037
+ if (timer) clearTimeout(timer);
5038
+ timer = void 0;
5039
+ pendingKey = void 0;
5040
+ }
5041
+ return {
5042
+ schedule(key) {
5043
+ if (pendingKey === key && timer) return;
5044
+ cancel();
5045
+ pendingKey = key;
5046
+ timer = setTimeout(() => {
5047
+ timer = void 0;
5048
+ const resolvedKey = pendingKey;
5049
+ pendingKey = void 0;
5050
+ if (resolvedKey) onIntent(resolvedKey);
5051
+ }, Math.max(0, delay));
5052
+ },
5053
+ cancel,
5054
+ destroy: cancel
5055
+ };
5056
+ }
5057
+
4395
5058
  // index.ts
4396
5059
  defineCustomElements();
4397
5060
  // Annotate the CommonJS export names for ESM import in node:
@@ -4399,7 +5062,9 @@ defineCustomElements();
4399
5062
  DEFAULT_AFFORDANCE_NEAR_RADIUS,
4400
5063
  LOOMA_ICONS,
4401
5064
  clampRectToViewport,
5065
+ classifyDropPosition,
4402
5066
  closeOverlay,
5067
+ createHoverIntent,
4403
5068
  createProximityCoordinator,
4404
5069
  distanceFromPointToRect,
4405
5070
  getTopOverlay,
@@ -4407,6 +5072,13 @@ defineCustomElements();
4407
5072
  isTopOverlay,
4408
5073
  loomaIconMarkup,
4409
5074
  openOverlay,
4410
- requestTopOverlayClose
5075
+ requestTopOverlayClose,
5076
+ setElementDragImage
4411
5077
  });
5078
+ /**
5079
+ * @license lucide v0.554.0 - ISC
5080
+ *
5081
+ * This source code is licensed under the ISC license.
5082
+ * See the LICENSE file in the root directory of this source tree.
5083
+ */
4412
5084
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/