@threadlabs/looma 0.1.16 → 0.1.17

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 (121) hide show
  1. package/dist/{chunk-SVINNT3E.js → chunk-OY4D3W4U.js} +29 -29
  2. package/dist/{chunk-G53JEAQK.js → chunk-SZJQ3NPX.js} +6 -3
  3. package/dist/chunk-YHXJC5M5.js +341 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/looma.cjs.js +1 -1
  6. package/dist/cjs/{manager-BOpVXb92.js → manager-C9j3HZay.js} +5 -2
  7. package/dist/cjs/positioning-i0WrCAdF.js +384 -0
  8. package/dist/cjs/ui-affordance-scope.cjs.entry.js +3 -113
  9. package/dist/cjs/ui-context-menu.cjs.entry.js +40 -5
  10. package/dist/cjs/ui-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/ui-menu.cjs.entry.js +83 -2
  12. package/dist/cjs/ui-popover.cjs.entry.js +43 -3
  13. package/dist/cjs/ui-toast-region.cjs.entry.js +17 -2
  14. package/dist/cjs/ui-tooltip.cjs.entry.js +95 -27
  15. package/dist/cjs/ui-tree-item.cjs.entry.js +1 -1
  16. package/dist/collection/components/ui-context-menu/ui-context-menu.css +17 -4
  17. package/dist/collection/components/ui-context-menu/ui-context-menu.js +38 -3
  18. package/dist/collection/components/ui-menu/ui-menu.css +39 -0
  19. package/dist/collection/components/ui-menu/ui-menu.js +128 -1
  20. package/dist/collection/components/ui-popover/ui-popover.css +31 -0
  21. package/dist/collection/components/ui-popover/ui-popover.js +87 -1
  22. package/dist/collection/components/ui-toast-region/ui-toast-region.css +6 -0
  23. package/dist/collection/components/ui-toast-region/ui-toast-region.js +16 -1
  24. package/dist/collection/components/ui-tooltip/ui-tooltip.css +20 -0
  25. package/dist/collection/components/ui-tooltip/ui-tooltip.js +160 -25
  26. package/dist/collection/components/ui-tree-item/ui-tree-item.css +10 -6
  27. package/dist/collection/input-modality.js +24 -0
  28. package/dist/collection/overlay/manager.js +5 -2
  29. package/dist/collection/overlay/positioning.js +246 -0
  30. package/dist/components/p-CEYIKqYc.js +1 -0
  31. package/dist/components/p-DOulVJT7.js +1 -0
  32. package/dist/components/p-PM9a74r7.js +1 -0
  33. package/dist/components/ui-affordance-scope.js +1 -1
  34. package/dist/components/ui-context-menu.js +1 -1
  35. package/dist/components/ui-dialog.js +1 -1
  36. package/dist/components/ui-menu.js +1 -1
  37. package/dist/components/ui-popover.js +1 -1
  38. package/dist/components/ui-toast-region.js +1 -1
  39. package/dist/components/ui-tooltip.js +1 -1
  40. package/dist/components/ui-tree-item.js +1 -1
  41. package/dist/esm/loader.js +1 -1
  42. package/dist/esm/looma.js +1 -1
  43. package/dist/esm/{manager-CR7f2MQC.js → manager-PM9a74r7.js} +5 -2
  44. package/dist/esm/positioning-Bu0dmLBE.js +379 -0
  45. package/dist/esm/ui-affordance-scope.entry.js +1 -111
  46. package/dist/esm/ui-context-menu.entry.js +40 -5
  47. package/dist/esm/ui-dialog.entry.js +1 -1
  48. package/dist/esm/ui-menu.entry.js +83 -2
  49. package/dist/esm/ui-popover.entry.js +43 -3
  50. package/dist/esm/ui-toast-region.entry.js +17 -2
  51. package/dist/esm/ui-tooltip.entry.js +95 -27
  52. package/dist/esm/ui-tree-item.entry.js +1 -1
  53. package/dist/index.cjs +776 -59
  54. package/dist/index.d.cts +44 -1
  55. package/dist/index.d.ts +44 -1
  56. package/dist/index.js +235 -4
  57. package/dist/looma/looma.esm.js +1 -1
  58. package/dist/looma/{p-c6721aba.entry.js → p-11083743.entry.js} +1 -1
  59. package/dist/looma/p-1674cda4.entry.js +1 -0
  60. package/dist/looma/p-2e6f791e.entry.js +1 -0
  61. package/dist/looma/p-54c41576.entry.js +1 -0
  62. package/dist/looma/p-9194a99d.entry.js +1 -0
  63. package/dist/looma/p-Bu0dmLBE.js +1 -0
  64. package/dist/looma/p-PM9a74r7.js +1 -0
  65. package/dist/looma/p-ba01f45d.entry.js +1 -0
  66. package/dist/looma/p-caa8fc7b.entry.js +1 -0
  67. package/dist/looma/{p-ef9ca2ed.entry.js → p-d01960c2.entry.js} +2 -2
  68. package/dist/types/components/ui-context-menu/ui-context-menu.d.ts +3 -0
  69. package/dist/types/components/ui-menu/ui-menu.d.ts +13 -0
  70. package/dist/types/components/ui-popover/ui-popover.d.ts +9 -0
  71. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +2 -0
  72. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +16 -1
  73. package/dist/types/components.d.ts +71 -0
  74. package/dist/types/input-modality.d.ts +6 -0
  75. package/dist/types/overlay/manager.d.ts +3 -0
  76. package/dist/types/overlay/positioning.d.ts +33 -0
  77. package/dist/ui-affordance-scope.entry-X7DTKJGL.js +54 -0
  78. package/dist/{ui-avatar-group.entry-DQDP325O.js → ui-avatar-group.entry-MC34FKAN.js} +1 -1
  79. package/dist/{ui-avatar.entry-WYIDMOFE.js → ui-avatar.entry-OKRQWTQV.js} +1 -1
  80. package/dist/{ui-badge.entry-VGHXPEDT.js → ui-badge.entry-RI7JB7KV.js} +1 -1
  81. package/dist/{ui-button.entry-LKPLOJ22.js → ui-button.entry-PFO5TTPN.js} +1 -1
  82. package/dist/{ui-checkbox.entry-J74HEA22.js → ui-checkbox.entry-UHFWVISP.js} +1 -1
  83. package/dist/{ui-context-menu.entry-MQM2FCLI.js → ui-context-menu.entry-AIXB6U5D.js} +40 -6
  84. package/dist/{ui-dialog.entry-DQMMDO4Z.js → ui-dialog.entry-LPREQH2T.js} +2 -2
  85. package/dist/{ui-disclosure.entry-ONF7UZDC.js → ui-disclosure.entry-7XCUIYVZ.js} +1 -1
  86. package/dist/{ui-floating-action-button.entry-FKTGVC5T.js → ui-floating-action-button.entry-5PNIMUAW.js} +1 -1
  87. package/dist/{ui-form-field.entry-M3ISWQNU.js → ui-form-field.entry-77YW46SM.js} +1 -1
  88. package/dist/{ui-icon-button.entry-AWFIQUHM.js → ui-icon-button.entry-4AD6ALPQ.js} +1 -1
  89. package/dist/{ui-input.entry-JZ6RETMT.js → ui-input.entry-E7E6QDTV.js} +1 -1
  90. package/dist/{ui-menu-item.entry-5MFR5LFL.js → ui-menu-item.entry-H3HFLUB6.js} +1 -1
  91. package/dist/ui-menu.entry-UAKZU4HG.js +184 -0
  92. package/dist/{ui-popover.entry-ELCMKO6Y.js → ui-popover.entry-GVQKX26B.js} +46 -4
  93. package/dist/{ui-radio-group.entry-RJHUPPEM.js → ui-radio-group.entry-MNSR6UEE.js} +1 -1
  94. package/dist/{ui-radio.entry-3VRDPOY4.js → ui-radio.entry-6D4WTI5E.js} +1 -1
  95. package/dist/{ui-search-result-row.entry-J34YPAV7.js → ui-search-result-row.entry-J2TILUH2.js} +1 -1
  96. package/dist/{ui-search-shell.entry-IJ4UUP27.js → ui-search-shell.entry-FSWHEZQF.js} +1 -1
  97. package/dist/{ui-select.entry-C6YD3HQ5.js → ui-select.entry-JRCYYNNW.js} +1 -1
  98. package/dist/{ui-switch.entry-UZDF5QTI.js → ui-switch.entry-YZWMNRP2.js} +1 -1
  99. package/dist/{ui-tabs.entry-YRAKWOMR.js → ui-tabs.entry-F2Y344JY.js} +1 -1
  100. package/dist/{ui-textarea.entry-JLDKFT3K.js → ui-textarea.entry-3EZCUUAK.js} +1 -1
  101. package/dist/{ui-toast-region.entry-GC7C7KXF.js → ui-toast-region.entry-BTV4AW3I.js} +20 -3
  102. package/dist/ui-tooltip.entry-U644CF5U.js +214 -0
  103. package/dist/{ui-top-bar.entry-5W5UA5KV.js → ui-top-bar.entry-FGGOREQR.js} +1 -1
  104. package/dist/{ui-tree-item.entry-3LM7IXIK.js → ui-tree-item.entry-XVMHEONY.js} +2 -2
  105. package/dist/{ui-tree.entry-X4FU42A6.js → ui-tree.entry-4R7DYGAM.js} +1 -1
  106. package/editor.css +3 -4
  107. package/package.json +1 -1
  108. package/tokens.css +14 -2
  109. package/vue/editor/index.js +62 -51
  110. package/dist/components/p-CR7f2MQC.js +0 -1
  111. package/dist/components/p-QiwSQmKJ.js +0 -1
  112. package/dist/looma/p-2ae73d5b.entry.js +0 -1
  113. package/dist/looma/p-3ac2e0d4.entry.js +0 -1
  114. package/dist/looma/p-65c25c94.entry.js +0 -1
  115. package/dist/looma/p-8c09c724.entry.js +0 -1
  116. package/dist/looma/p-95cd639d.entry.js +0 -1
  117. package/dist/looma/p-96f73d07.entry.js +0 -1
  118. package/dist/looma/p-CR7f2MQC.js +0 -1
  119. package/dist/ui-affordance-scope.entry-PFP2TDKO.js +0 -145
  120. package/dist/ui-menu.entry-IOEIDATQ.js +0 -98
  121. package/dist/ui-tooltip.entry-F26XDTYX.js +0 -145
@@ -1,4 +1,4 @@
1
- import{r as a,g as t,h as e,H as i}from"./p-CEeiinfk.js";import{d as r,e as d}from"./p-JwSoedEO.js";
1
+ import{r as a,g as t,h as i,H as e}from"./p-CEeiinfk.js";import{d as r,e as d}from"./p-JwSoedEO.js";
2
2
  /**
3
3
  * @license lucide v0.554.0 - ISC
4
4
  *
@@ -10,4 +10,4 @@ import{r as a,g as t,h as e,H as i}from"./p-CEeiinfk.js";import{d as r,e as d}fr
10
10
  *
11
11
  * This source code is licensed under the ISC license.
12
12
  * See the LICENSE file in the root directory of this source tree.
13
- */function n(a){return String(a).replaceAll("&","&amp;").replaceAll('"',"&quot;")}function s(a){const[t,e]=a;return`<${t}${function(a){return Object.entries(a).map((([a,t])=>` ${a}="${n(t)}"`)).join("")}(e)}></${t}>`}function c(a,t="looma-icon"){return[`<svg class="${n(t)}" data-looma-icon="${a}" aria-hidden="true" focusable="false"`,' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',' stroke-linecap="round" stroke-linejoin="round">',o[a].map(s).join(""),"</svg>"].join("")}const h=class{constructor(t){a(this,t)}get host(){return t(this)}itemId="";label="";depth=1;container=!1;sortable=!1;dragType="item";dropScope="";accepts="";expanded=!1;defaultExpanded=!1;selected=!1;disabled=!1;internalExpanded=!1;syncExpandedFromProp(){this.internalExpanded=this.expanded}componentWillLoad(){this.internalExpanded=this.expanded||this.defaultExpanded}componentDidLoad(){this.host.addEventListener("ui-tree-auto-expand",this.onAutoExpand)}disconnectedCallback(){this.host.removeEventListener("ui-tree-auto-expand",this.onAutoExpand)}setExpanded(a,t){this.container&&!this.disabled&&this.internalExpanded!==a&&(this.internalExpanded=a,r(this.host,"expand",{id:this.itemId,expanded:a,trigger:t}))}onAutoExpand=()=>{this.setExpanded(!0,"pointer")};onDisclosureClick=a=>{a.stopPropagation(),this.setExpanded(!this.internalExpanded,d(a))};onDisclosureKeydown=a=>{"ArrowRight"!==a.key&&"ArrowLeft"!==a.key||(a.preventDefault(),a.stopPropagation(),this.setExpanded("ArrowRight"===a.key,"keyboard"))};onRowClick=a=>{this.container&&!this.disabled&&(a.composedPath().some((a=>a instanceof HTMLElement&&(a.matches('a, button, input, select, textarea, [role="button"], [role="link"]')||"actions"===a.getAttribute("slot"))))||this.setExpanded(!this.internalExpanded,d(a)))};render(){const a=Math.max(1,Math.floor(this.depth)),t=`${this.internalExpanded?"Collapse":"Expand"} ${this.label||"item"}`,r=`Drag ${this.label||"item"} to reorder`;return e(i,{key:"ea8ed538aa3883c87257a25614a066965364693f",role:"treeitem","aria-level":String(a),"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:{"--ui-tree-item-depth":String(a-1),"margin-inline-start":a>1?"var(--ui-tree-indent, 16px)":"0px"}},e("div",{key:"740b93aa47e65d8a1cb899d4b9c966d9ad1d456f",class:"row",part:"row",onClick:this.onRowClick},this.sortable&&!this.disabled?e("button",{class:"drag-handle",part:"drag-handle",type:"button",draggable:!0,"aria-label":r,title:r},e("span",{innerHTML:c("grip-vertical")})):null,this.container?e("button",{class:"disclosure",part:"disclosure",type:"button","aria-label":t,"aria-expanded":String(this.internalExpanded),disabled:this.disabled,onClick:this.onDisclosureClick,onKeyDown:this.onDisclosureKeydown},e("span",{class:{"disclosure-icon":!0,"disclosure-icon--expanded":this.internalExpanded},innerHTML:c("chevron-down")})):e("span",{class:"disclosure-spacer","aria-hidden":"true"}),e("span",{key:"37e1b7f1cdddf623734becef465ffde83d8b86f2",class:"leading",part:"leading"},e("slot",{key:"0ab3a60c98628f009918d0d720772154912d2709",name:"leading"})),e("span",{key:"defdd343f25a0f4354110e981f3889e1d09c27ee",class:"label",part:"label"},e("slot",{key:"bde46ccacc1a620348062fc300503c4f1736316b"})),e("span",{key:"caff9ada38c41be90aeb6e331f4c54a51f31d26c",class:"actions",part:"actions"},e("slot",{key:"e11704d6871445c91eaa29c99302d8b751be69d3",name:"actions"})),e("span",{key:"7e40559d6c5ba56710bc705083ad2ede3046e0b1",class:"drop-indicator",part:"drop-indicator","aria-hidden":"true"})),this.container?e("div",{class:"children",part:"children",role:"group",hidden:!this.internalExpanded},e("slot",{name:"children"})):null)}static get watchers(){return{expanded:[{syncExpandedFromProp:0}]}}};h.style=":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}}";export{h as ui_tree_item}
13
+ */function n(a){return String(a).replaceAll("&","&amp;").replaceAll('"',"&quot;")}function s(a){const[t,i]=a;return`<${t}${function(a){return Object.entries(a).map((([a,t])=>` ${a}="${n(t)}"`)).join("")}(i)}></${t}>`}function c(a,t="looma-icon"){return[`<svg class="${n(t)}" data-looma-icon="${a}" aria-hidden="true" focusable="false"`,' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',' stroke-linecap="round" stroke-linejoin="round">',o[a].map(s).join(""),"</svg>"].join("")}const h=class{constructor(t){a(this,t)}get host(){return t(this)}itemId="";label="";depth=1;container=!1;sortable=!1;dragType="item";dropScope="";accepts="";expanded=!1;defaultExpanded=!1;selected=!1;disabled=!1;internalExpanded=!1;syncExpandedFromProp(){this.internalExpanded=this.expanded}componentWillLoad(){this.internalExpanded=this.expanded||this.defaultExpanded}componentDidLoad(){this.host.addEventListener("ui-tree-auto-expand",this.onAutoExpand)}disconnectedCallback(){this.host.removeEventListener("ui-tree-auto-expand",this.onAutoExpand)}setExpanded(a,t){this.container&&!this.disabled&&this.internalExpanded!==a&&(this.internalExpanded=a,r(this.host,"expand",{id:this.itemId,expanded:a,trigger:t}))}onAutoExpand=()=>{this.setExpanded(!0,"pointer")};onDisclosureClick=a=>{a.stopPropagation(),this.setExpanded(!this.internalExpanded,d(a))};onDisclosureKeydown=a=>{"ArrowRight"!==a.key&&"ArrowLeft"!==a.key||(a.preventDefault(),a.stopPropagation(),this.setExpanded("ArrowRight"===a.key,"keyboard"))};onRowClick=a=>{this.container&&!this.disabled&&(a.composedPath().some((a=>a instanceof HTMLElement&&(a.matches('a, button, input, select, textarea, [role="button"], [role="link"]')||"actions"===a.getAttribute("slot"))))||this.setExpanded(!this.internalExpanded,d(a)))};render(){const a=Math.max(1,Math.floor(this.depth)),t=`${this.internalExpanded?"Collapse":"Expand"} ${this.label||"item"}`,r=`Drag ${this.label||"item"} to reorder`;return i(e,{key:"ea8ed538aa3883c87257a25614a066965364693f",role:"treeitem","aria-level":String(a),"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:{"--ui-tree-item-depth":String(a-1),"margin-inline-start":a>1?"var(--ui-tree-indent, 16px)":"0px"}},i("div",{key:"740b93aa47e65d8a1cb899d4b9c966d9ad1d456f",class:"row",part:"row",onClick:this.onRowClick},this.sortable&&!this.disabled?i("button",{class:"drag-handle",part:"drag-handle",type:"button",draggable:!0,"aria-label":r,title:r},i("span",{innerHTML:c("grip-vertical")})):null,this.container?i("button",{class:"disclosure",part:"disclosure",type:"button","aria-label":t,"aria-expanded":String(this.internalExpanded),disabled:this.disabled,onClick:this.onDisclosureClick,onKeyDown:this.onDisclosureKeydown},i("span",{class:{"disclosure-icon":!0,"disclosure-icon--expanded":this.internalExpanded},innerHTML:c("chevron-down")})):i("span",{class:"disclosure-spacer","aria-hidden":"true"}),i("span",{key:"37e1b7f1cdddf623734becef465ffde83d8b86f2",class:"leading",part:"leading"},i("slot",{key:"0ab3a60c98628f009918d0d720772154912d2709",name:"leading"})),i("span",{key:"defdd343f25a0f4354110e981f3889e1d09c27ee",class:"label",part:"label"},i("slot",{key:"bde46ccacc1a620348062fc300503c4f1736316b"})),i("span",{key:"caff9ada38c41be90aeb6e331f4c54a51f31d26c",class:"actions",part:"actions"},i("slot",{key:"e11704d6871445c91eaa29c99302d8b751be69d3",name:"actions"})),i("span",{key:"7e40559d6c5ba56710bc705083ad2ede3046e0b1",class:"drop-indicator",part:"drop-indicator","aria-hidden":"true"})),this.container?i("div",{class:"children",part:"children",role:"group",hidden:!this.internalExpanded},i("slot",{name:"children"})):null)}static get watchers(){return{expanded:[{syncExpandedFromProp:0}]}}};h.style=":host{--ui-tree-indent:16px;--ui-tree-row-min-height:32px;--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;font-size:var(--ui-tree-font-size, var(--ui-font-size-ui, 0.9375rem));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), min-block-size var(--ui-motion-base) 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}:host-context(html[data-ui-input-modality='touch']){--ui-tree-row-min-height:44px}:host-context(html[data-ui-input-modality='touch']) .drag-handle{display:none}@media (prefers-reduced-motion: reduce){.row,.disclosure-icon,.drag-handle{transition:none}}";export{h as ui_tree_item}
@@ -12,12 +12,15 @@ export declare class UIContextMenu {
12
12
  private contextTarget;
13
13
  private pointerX;
14
14
  private pointerY;
15
+ private pointPositioned;
16
+ private surface;
15
17
  syncFromProp(): void;
16
18
  syncTarget(): void;
17
19
  syncOverlay(): void;
18
20
  componentDidLoad(): void;
19
21
  componentDidUpdate(): void;
20
22
  disconnectedCallback(): void;
23
+ private setupSurface;
21
24
  private resolveTargets;
22
25
  private attachTargetListeners;
23
26
  private detachTargetListeners;
@@ -1,11 +1,24 @@
1
+ import { type AnchoredPlacement } from '../../overlay/positioning';
1
2
  export declare class UIMenu {
2
3
  host: HTMLElement;
3
4
  open: boolean;
4
5
  defaultOpen: boolean;
6
+ /** Id of the control that anchors this menu in the top layer. */
7
+ for?: string;
8
+ /** Preferred placement; Looma flips and shifts when space is constrained. */
9
+ placement: AnchoredPlacement;
5
10
  internalOpen: boolean;
11
+ private overlayId;
12
+ private anchor;
13
+ private surface;
6
14
  syncFromProp(): void;
15
+ resetSurface(): void;
16
+ syncSurface(): void;
7
17
  componentDidLoad(): void;
8
18
  disconnectedCallback(): void;
19
+ private setupSurface;
20
+ private syncAnchorState;
21
+ private closeMenu;
9
22
  private getItems;
10
23
  private isItemDisabled;
11
24
  private onItemClick;
@@ -1,11 +1,20 @@
1
+ import { type AnchoredPlacement } from '../../overlay/positioning';
1
2
  export declare class UIPopover {
2
3
  host: HTMLElement;
3
4
  open: boolean;
4
5
  defaultOpen: boolean;
6
+ /** Optional id of the element this popover follows in the top layer. */
7
+ for?: string;
8
+ placement: AnchoredPlacement;
5
9
  internalOpen: boolean;
6
10
  private overlayId;
11
+ private anchor;
12
+ private surface;
7
13
  syncFromProp(): void;
8
14
  onOpenChange(): void;
15
+ resetSurface(): void;
16
+ private setupSurface;
17
+ private syncSurface;
9
18
  private syncOverlay;
10
19
  componentDidLoad(): void;
11
20
  disconnectedCallback(): void;
@@ -2,7 +2,9 @@ export declare class UIToastRegion {
2
2
  host: HTMLElement;
3
3
  open: boolean;
4
4
  internalOpen: boolean;
5
+ private surface;
5
6
  syncFromProp(): void;
7
+ syncSurface(): void;
6
8
  componentDidLoad(): void;
7
9
  disconnectedCallback(): void;
8
10
  private getToasts;
@@ -1,19 +1,34 @@
1
+ import { type AnchoredPlacement } from '../../overlay/positioning';
1
2
  export declare class UITooltip {
2
3
  host: HTMLElement;
3
4
  for: string;
4
5
  open: boolean;
5
6
  defaultOpen: boolean;
7
+ placement: AnchoredPlacement;
8
+ /** Pointer hover intent delay in milliseconds. Keyboard focus is immediate. */
9
+ showDelay: number;
10
+ /** Pointer leave grace period in milliseconds. */
11
+ hideDelay: number;
6
12
  internalOpen: boolean;
7
13
  private overlayId;
8
14
  private trigger;
15
+ private surface;
16
+ private showTimer;
17
+ private hideTimer;
9
18
  syncFromProp(): void;
19
+ resetSurface(): void;
10
20
  syncOverlay(): void;
11
21
  componentDidLoad(): void;
12
22
  componentDidUpdate(): void;
13
23
  disconnectedCallback(): void;
14
- private resolveTrigger;
24
+ private syncTrigger;
25
+ private setupSurface;
15
26
  private attachTriggerListeners;
16
27
  private detachTriggerListeners;
28
+ private clearShowTimer;
29
+ private clearHideTimer;
30
+ private clearTimers;
31
+ private setInteractionOpen;
17
32
  private onTriggerEnter;
18
33
  private onTriggerLeave;
19
34
  private onTriggerFocusIn;
@@ -5,6 +5,8 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { AnchoredPlacement } from "./overlay/positioning";
9
+ export { AnchoredPlacement } from "./overlay/positioning";
8
10
  export namespace Components {
9
11
  interface UiAffordanceScope {
10
12
  /**
@@ -212,10 +214,19 @@ export namespace Components {
212
214
  * @default false
213
215
  */
214
216
  "defaultOpen": boolean;
217
+ /**
218
+ * Id of the control that anchors this menu in the top layer.
219
+ */
220
+ "for"?: string;
215
221
  /**
216
222
  * @default false
217
223
  */
218
224
  "open": boolean;
225
+ /**
226
+ * Preferred placement; Looma flips and shifts when space is constrained.
227
+ * @default 'bottom-start'
228
+ */
229
+ "placement": AnchoredPlacement;
219
230
  }
220
231
  interface UiMenuItem {
221
232
  /**
@@ -232,10 +243,18 @@ export namespace Components {
232
243
  * @default false
233
244
  */
234
245
  "defaultOpen": boolean;
246
+ /**
247
+ * Optional id of the element this popover follows in the top layer.
248
+ */
249
+ "for"?: string;
235
250
  /**
236
251
  * @default false
237
252
  */
238
253
  "open": boolean;
254
+ /**
255
+ * @default 'bottom-start'
256
+ */
257
+ "placement": AnchoredPlacement;
239
258
  }
240
259
  interface UiRadio {
241
260
  /**
@@ -396,10 +415,24 @@ export namespace Components {
396
415
  * @default ''
397
416
  */
398
417
  "for": string;
418
+ /**
419
+ * Pointer leave grace period in milliseconds.
420
+ * @default 100
421
+ */
422
+ "hideDelay": number;
399
423
  /**
400
424
  * @default false
401
425
  */
402
426
  "open": boolean;
427
+ /**
428
+ * @default 'top-start'
429
+ */
430
+ "placement": AnchoredPlacement;
431
+ /**
432
+ * Pointer hover intent delay in milliseconds. Keyboard focus is immediate.
433
+ * @default 500
434
+ */
435
+ "showDelay": number;
403
436
  }
404
437
  interface UiTopBar {
405
438
  }
@@ -888,10 +921,19 @@ declare namespace LocalJSX {
888
921
  * @default false
889
922
  */
890
923
  "defaultOpen"?: boolean;
924
+ /**
925
+ * Id of the control that anchors this menu in the top layer.
926
+ */
927
+ "for"?: string;
891
928
  /**
892
929
  * @default false
893
930
  */
894
931
  "open"?: boolean;
932
+ /**
933
+ * Preferred placement; Looma flips and shifts when space is constrained.
934
+ * @default 'bottom-start'
935
+ */
936
+ "placement"?: AnchoredPlacement;
895
937
  }
896
938
  interface UiMenuItem {
897
939
  /**
@@ -908,10 +950,18 @@ declare namespace LocalJSX {
908
950
  * @default false
909
951
  */
910
952
  "defaultOpen"?: boolean;
953
+ /**
954
+ * Optional id of the element this popover follows in the top layer.
955
+ */
956
+ "for"?: string;
911
957
  /**
912
958
  * @default false
913
959
  */
914
960
  "open"?: boolean;
961
+ /**
962
+ * @default 'bottom-start'
963
+ */
964
+ "placement"?: AnchoredPlacement;
915
965
  }
916
966
  interface UiRadio {
917
967
  /**
@@ -1072,10 +1122,24 @@ declare namespace LocalJSX {
1072
1122
  * @default ''
1073
1123
  */
1074
1124
  "for"?: string;
1125
+ /**
1126
+ * Pointer leave grace period in milliseconds.
1127
+ * @default 100
1128
+ */
1129
+ "hideDelay"?: number;
1075
1130
  /**
1076
1131
  * @default false
1077
1132
  */
1078
1133
  "open"?: boolean;
1134
+ /**
1135
+ * @default 'top-start'
1136
+ */
1137
+ "placement"?: AnchoredPlacement;
1138
+ /**
1139
+ * Pointer hover intent delay in milliseconds. Keyboard focus is immediate.
1140
+ * @default 500
1141
+ */
1142
+ "showDelay"?: number;
1079
1143
  }
1080
1144
  interface UiTopBar {
1081
1145
  }
@@ -1224,6 +1288,8 @@ declare namespace LocalJSX {
1224
1288
  interface UiMenuAttributes {
1225
1289
  "open": boolean;
1226
1290
  "defaultOpen": boolean;
1291
+ "for": string;
1292
+ "placement": AnchoredPlacement;
1227
1293
  }
1228
1294
  interface UiMenuItemAttributes {
1229
1295
  "disabled": boolean;
@@ -1232,6 +1298,8 @@ declare namespace LocalJSX {
1232
1298
  interface UiPopoverAttributes {
1233
1299
  "open": boolean;
1234
1300
  "defaultOpen": boolean;
1301
+ "for": string;
1302
+ "placement": AnchoredPlacement;
1235
1303
  }
1236
1304
  interface UiRadioAttributes {
1237
1305
  "checked": boolean;
@@ -1286,6 +1354,9 @@ declare namespace LocalJSX {
1286
1354
  "for": string;
1287
1355
  "open": boolean;
1288
1356
  "defaultOpen": boolean;
1357
+ "placement": AnchoredPlacement;
1358
+ "showDelay": number;
1359
+ "hideDelay": number;
1289
1360
  }
1290
1361
  interface UiTreeAttributes {
1291
1362
  "label": string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Reflects real touch use instead of guessing from device capability media
3
+ * queries. Hybrid devices therefore keep compact pointer affordances until the
4
+ * user actually touches the interface.
5
+ */
6
+ export declare function initializeInputModality(owner?: Document): void;
@@ -4,6 +4,9 @@ export interface OverlayRecord {
4
4
  id: string;
5
5
  modal: boolean;
6
6
  element: HTMLElement;
7
+ /** Controls that are part of the overlay interaction boundary (for example,
8
+ * the button that toggles an anchored menu). */
9
+ relatedElements?: readonly HTMLElement[];
7
10
  dismissible?: boolean;
8
11
  requestClose: (reason: OverlayCloseReason, trigger: OverlayTrigger) => void;
9
12
  }
@@ -26,7 +26,40 @@ export interface ProximityCoordinator {
26
26
  /** Removes the scope-level listeners and all reflected interaction state. */
27
27
  destroy(): void;
28
28
  }
29
+ export type AnchoredPlacement = "bottom-start" | "bottom-end" | "top-start" | "top-end";
30
+ export interface AnchoredSurfaceOptions {
31
+ anchor?: HTMLElement | null;
32
+ placement?: AnchoredPlacement;
33
+ gap?: number;
34
+ viewportGap?: number;
35
+ }
36
+ export interface AnchoredSurface {
37
+ setAnchor(anchor: HTMLElement | null): void;
38
+ show(): void;
39
+ showAtPoint(point: Point): void;
40
+ hide(): void;
41
+ refresh(): void;
42
+ destroy(): void;
43
+ }
44
+ export interface ViewportSurface {
45
+ show(): void;
46
+ hide(): void;
47
+ destroy(): void;
48
+ }
29
49
  export declare const DEFAULT_AFFORDANCE_NEAR_RADIUS = 16;
50
+ /**
51
+ * Places unanchored floating UI, such as a toast region, in the browser top
52
+ * layer. Its viewport position remains CSS-owned; the controller only provides
53
+ * the native Popover API boundary and its no-Popover fallback.
54
+ */
55
+ export declare function createViewportSurface(surface: HTMLElement): ViewportSurface;
56
+ /**
57
+ * One lightweight positioning controller for Looma floating UI. Native
58
+ * Popover provides the top layer and CSS Anchor Positioning follows a named
59
+ * element. Browsers without Anchor Positioning use the same flip/shift
60
+ * geometry through scroll/resize listeners that exist only while open.
61
+ */
62
+ export declare function createAnchoredSurface(surface: HTMLElement, options?: AnchoredSurfaceOptions): AnchoredSurface;
30
63
  export declare function getVisualViewportRect(owner?: Window): ViewportRect;
31
64
  export declare function clampRectToViewport(rect: RectLike, viewport?: ViewportRect, gutter?: number): Point;
32
65
  export declare function distanceFromPointToRect(point: Point, rect: RectLike): number;
@@ -0,0 +1,54 @@
1
+ import {
2
+ DEFAULT_AFFORDANCE_NEAR_RADIUS,
3
+ createProximityCoordinator
4
+ } from "./chunk-YHXJC5M5.js";
5
+ import {
6
+ Host,
7
+ getElement,
8
+ h,
9
+ registerInstance
10
+ } from "./chunk-OY4D3W4U.js";
11
+
12
+ // dist/esm/ui-affordance-scope.entry.js
13
+ var uiAffordanceScopeCss = () => `:host{display:contents;--ui-affordance-scope-engaged:0}:host([data-ui-interaction='engaged']){--ui-affordance-scope-engaged:1}`;
14
+ var UIAffordanceScope = class {
15
+ constructor(hostRef) {
16
+ registerInstance(this, hostRef);
17
+ }
18
+ get host() {
19
+ return getElement(this);
20
+ }
21
+ /** Distance outside each registered affordance that reveals its near state. */
22
+ nearRadius = DEFAULT_AFFORDANCE_NEAR_RADIUS;
23
+ coordinator = null;
24
+ componentDidLoad() {
25
+ this.connectCoordinator();
26
+ }
27
+ disconnectedCallback() {
28
+ this.coordinator?.destroy();
29
+ this.coordinator = null;
30
+ }
31
+ connectCoordinator() {
32
+ this.coordinator?.destroy();
33
+ this.coordinator = createProximityCoordinator(this.host, {
34
+ nearRadius: this.nearRadius
35
+ });
36
+ }
37
+ onSlotChange = () => {
38
+ this.coordinator?.refresh();
39
+ };
40
+ render() {
41
+ return h(Host, { key: "184b0a908494d480ed23aa14b75d4f7b94e5275b" }, h("slot", { key: "570e810db588c1514c6fd85985c9bc4532993a2b", onSlotchange: this.onSlotChange }));
42
+ }
43
+ static get watchers() {
44
+ return {
45
+ "nearRadius": [{
46
+ "connectCoordinator": 0
47
+ }]
48
+ };
49
+ }
50
+ };
51
+ UIAffordanceScope.style = uiAffordanceScopeCss();
52
+ export {
53
+ UIAffordanceScope as ui_affordance_scope
54
+ };
@@ -3,7 +3,7 @@ import {
3
3
  getElement,
4
4
  h,
5
5
  registerInstance
6
- } from "./chunk-SVINNT3E.js";
6
+ } from "./chunk-OY4D3W4U.js";
7
7
 
8
8
  // dist/esm/ui-avatar-group.entry.js
9
9
  var uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*:not([data-ui-avatar-group-overflow])){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type:not([data-ui-avatar-group-overflow])){margin-inline-end:0}.overflow{margin-inline-end:-0.5rem;display:inline-flex;align-items:center;justify-content:center;inline-size:2.5rem;block-size:2.5rem;border-radius:999px;border:1px solid var(--ui-border-default);background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;font-weight:600;flex-shrink:0}`;
@@ -2,7 +2,7 @@ import {
2
2
  Host,
3
3
  h,
4
4
  registerInstance
5
- } from "./chunk-SVINNT3E.js";
5
+ } from "./chunk-OY4D3W4U.js";
6
6
 
7
7
  // dist/esm/ui-avatar.entry.js
8
8
  function toInitials(value) {
@@ -2,7 +2,7 @@ import {
2
2
  Host,
3
3
  h,
4
4
  registerInstance
5
- } from "./chunk-SVINNT3E.js";
5
+ } from "./chunk-OY4D3W4U.js";
6
6
 
7
7
  // dist/esm/ui-badge.entry.js
8
8
  var uiBadgeCss = () => `:host{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);color:var(--ui-text-secondary);font:inherit;font-size:0.75rem;line-height:1;padding:0.25em 0.6em;white-space:nowrap}:host([data-tone='accent']){background:var(--ui-accent-solid);border-color:var(--ui-accent-solid);color:var(--ui-text-on-accent)}:host([data-tone='danger']){background:var(--ui-danger-solid);border-color:var(--ui-danger-solid);color:var(--ui-text-on-accent)}:host([data-tone='success']){background:var(--ui-success-solid);border-color:var(--ui-success-solid);color:var(--ui-text-on-accent)}:host([data-tone='warning']){background:var(--ui-warning-solid);border-color:var(--ui-warning-solid);color:var(--ui-text-primary)}:host([data-tone='info']){background:var(--ui-info-solid);border-color:var(--ui-info-solid);color:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']){background:var(--ui-accent-soft);border-color:var(--ui-accent-soft);color:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']){background:var(--ui-danger-soft);border-color:var(--ui-danger-soft);color:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']){background:var(--ui-success-soft);border-color:var(--ui-success-soft);color:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']){background:var(--ui-warning-soft);border-color:var(--ui-warning-soft);color:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']){background:var(--ui-info-soft);border-color:var(--ui-info-soft);color:var(--ui-info-solid)}`;
@@ -6,7 +6,7 @@ import {
6
6
  getElement,
7
7
  h,
8
8
  registerInstance
9
- } from "./chunk-SVINNT3E.js";
9
+ } from "./chunk-OY4D3W4U.js";
10
10
 
11
11
  // dist/esm/ui-button.entry.js
12
12
  var uiButtonCss = () => `:host{display:inline-flex;vertical-align:middle;color:var(--ui-text-primary)}:host([variant='outline'])::slotted(button),::slotted(button){appearance:none;border:1px solid var(--ui-border-default);border-radius:var(--ui-button-radius, var(--ui-radius-2));background:var(--ui-surface-default);color:inherit;font:inherit;font-weight:var(--ui-font-medium, 500);line-height:var(--ui-line-height-tight);padding:var(--ui-space-2) var(--ui-space-3);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease), box-shadow var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host([data-size='sm'])::slotted(button){padding:var(--ui-space-1) var(--ui-space-2);font-size:0.875rem}:host([data-size='lg'])::slotted(button){padding:var(--ui-space-3) var(--ui-space-4);font-size:1rem}::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:var(--ui-border-strong)}::slotted(button:active:enabled){background:var(--ui-surface-subtle)}:host([variant='solid'])::slotted(button){border-color:var(--ui-accent-solid);background:var(--ui-accent-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-solid-shadow, inset 0 1px rgb(255 255 255 / 0.16), var(--ui-shadow-xs))}:host([variant='solid'])::slotted(button:hover:enabled){background:var(--ui-accent-hover);border-color:var(--ui-accent-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='solid'])::slotted(button:active:enabled){background:var(--ui-accent-active);border-color:var(--ui-accent-active);box-shadow:none;transform:translateY(0)}:host([variant='destructive'])::slotted(button){border-color:var(--ui-danger-solid);background:var(--ui-danger-solid);color:var(--ui-text-on-accent);box-shadow:var(--ui-button-destructive-shadow, inset 0 1px rgb(255 255 255 / 0.14), var(--ui-shadow-xs))}:host([variant='destructive'])::slotted(button:hover:enabled){background:var(--ui-danger-hover);border-color:var(--ui-danger-hover);box-shadow:var(--ui-shadow-sm);transform:translateY(-1px)}:host([variant='destructive'])::slotted(button:active:enabled){box-shadow:none;transform:translateY(0)}:host([variant='ghost'])::slotted(button){border-color:transparent;background:transparent}:host([variant='ghost'])::slotted(button:hover:enabled){background:var(--ui-surface-muted);border-color:transparent}:host([variant='ghost'])::slotted(button:active:enabled){background:var(--ui-surface-subtle);border-color:transparent}::slotted(button:focus-visible){outline:2px solid var(--ui-focus-ring);outline-offset:2px}::slotted(button:disabled),:host([data-disabled]){opacity:0.6;cursor:not-allowed}`;
@@ -7,7 +7,7 @@ import {
7
7
  getElement,
8
8
  h,
9
9
  registerInstance
10
- } from "./chunk-SVINNT3E.js";
10
+ } from "./chunk-OY4D3W4U.js";
11
11
 
12
12
  // dist/esm/ui-checkbox.entry.js
13
13
  var uiCheckboxCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([aria-disabled='true']),:host([data-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='checkbox']){accent-color:var(--ui-accent-solid);width:1.125em;height:1.125em;cursor:pointer}::slotted(input[type='checkbox']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
@@ -2,7 +2,10 @@ import {
2
2
  closeOverlay,
3
3
  openOverlay,
4
4
  requestTopOverlayClose
5
- } from "./chunk-G53JEAQK.js";
5
+ } from "./chunk-SZJQ3NPX.js";
6
+ import {
7
+ createAnchoredSurface
8
+ } from "./chunk-YHXJC5M5.js";
6
9
  import {
7
10
  dispatchDetail
8
11
  } from "./chunk-UL7UIUJZ.js";
@@ -11,10 +14,10 @@ import {
11
14
  getElement,
12
15
  h,
13
16
  registerInstance
14
- } from "./chunk-SVINNT3E.js";
17
+ } from "./chunk-OY4D3W4U.js";
15
18
 
16
19
  // dist/esm/ui-context-menu.entry.js
17
- var uiContextMenuCss = () => `:host{display:contents}.menu{position:fixed;z-index:var(--ui-z-overlay, 1000);min-width:12rem}.menu[data-open]{display:block}.menu:not([data-open]){display:none !important}`;
20
+ var uiContextMenuCss = () => `:host{display:contents}.menu{position:fixed;inset:auto;margin:0;z-index:var(--ui-z-overlay, 1000);min-width:12rem;opacity:0;transform:translateY(-4px) scale(0.99);transition:opacity var(--ui-motion-fast) var(--ui-motion-ease), transform var(--ui-motion-fast) var(--ui-motion-ease), display var(--ui-motion-fast) allow-discrete, overlay var(--ui-motion-fast) allow-discrete}.menu:popover-open{opacity:1;transform:translateY(0) scale(1)}@starting-style{.menu:popover-open{opacity:0;transform:translateY(-4px) scale(0.99)}}.menu[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){.menu{transition:none}}`;
18
21
  var UIContextMenu = class {
19
22
  constructor(hostRef) {
20
23
  registerInstance(this, hostRef);
@@ -34,6 +37,8 @@ var UIContextMenu = class {
34
37
  contextTarget = null;
35
38
  pointerX = 0;
36
39
  pointerY = 0;
40
+ pointPositioned = false;
41
+ surface = null;
37
42
  syncFromProp() {
38
43
  this.internalOpen = this.open;
39
44
  }
@@ -44,6 +49,11 @@ var UIContextMenu = class {
44
49
  syncOverlay() {
45
50
  this.syncTriggerState();
46
51
  if (this.internalOpen) {
52
+ if (this.pointPositioned) {
53
+ this.surface?.showAtPoint({ x: this.pointerX, y: this.pointerY });
54
+ } else {
55
+ this.surface?.show();
56
+ }
47
57
  openOverlay({
48
58
  id: this.overlayId,
49
59
  modal: false,
@@ -52,6 +62,7 @@ var UIContextMenu = class {
52
62
  requestClose: (reason, trigger) => this.closeMenu(reason, trigger)
53
63
  });
54
64
  } else {
65
+ this.surface?.hide();
55
66
  closeOverlay(this.overlayId);
56
67
  }
57
68
  }
@@ -60,18 +71,33 @@ var UIContextMenu = class {
60
71
  this.internalOpen = this.internalOpen || this.defaultOpen;
61
72
  this.resolveTargets();
62
73
  this.attachTargetListeners();
74
+ this.setupSurface();
63
75
  this.syncTriggerState();
64
76
  this.syncOverlay();
65
77
  }
66
78
  componentDidUpdate() {
67
79
  this.resolveTargets();
68
80
  this.attachTargetListeners();
81
+ if (!this.pointPositioned)
82
+ this.surface?.setAnchor(this.trigger);
69
83
  this.syncTriggerState();
70
84
  }
71
85
  disconnectedCallback() {
72
86
  this.detachTargetListeners();
87
+ this.surface?.destroy();
88
+ this.surface = null;
73
89
  closeOverlay(this.overlayId);
74
90
  }
91
+ setupSurface() {
92
+ const menu = this.host.shadowRoot?.querySelector(".menu");
93
+ if (!menu)
94
+ return;
95
+ this.surface?.destroy();
96
+ this.surface = createAnchoredSurface(menu, {
97
+ anchor: this.trigger,
98
+ placement: "bottom-start"
99
+ });
100
+ }
75
101
  resolveTargets() {
76
102
  const previousTrigger = this.trigger;
77
103
  const previousContextTarget = this.contextTarget;
@@ -111,6 +137,8 @@ var UIContextMenu = class {
111
137
  openMenu(x, y, trigger) {
112
138
  this.pointerX = x;
113
139
  this.pointerY = y;
140
+ this.pointPositioned = true;
141
+ this.surface?.showAtPoint({ x, y });
114
142
  this.internalOpen = true;
115
143
  dispatchDetail(this.host, "open", {
116
144
  open: true,
@@ -122,8 +150,14 @@ var UIContextMenu = class {
122
150
  openFromTrigger(trigger) {
123
151
  if (!this.trigger)
124
152
  return;
125
- const rect = this.trigger.getBoundingClientRect();
126
- this.openMenu(rect.left, rect.bottom, trigger);
153
+ this.pointPositioned = false;
154
+ this.internalOpen = true;
155
+ dispatchDetail(this.host, "open", {
156
+ open: true,
157
+ reason: "action",
158
+ trigger
159
+ });
160
+ this.focusFirstItem();
127
161
  }
128
162
  closeMenu(reason, trigger, returnFocus = true) {
129
163
  if (!this.internalOpen)
@@ -189,7 +223,7 @@ var UIContextMenu = class {
189
223
  this.closeMenu("action", "pointer");
190
224
  };
191
225
  render() {
192
- return h(Host, { key: "79fbca2c89f1d1fd1f4796ad88d2a599e811a3f9", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "9308cadfa155930e3e46dfb4a69a847ae388958b", name: "trigger" }), h("div", { key: "16cfba2b32444ac9e3cac1f040f81f17fd5db23c", class: "menu", "data-open": this.internalOpen ? "" : void 0, style: { left: `${this.pointerX}px`, top: `${this.pointerY}px` } }, h("ui-menu", { key: "59f18e0df3bb1fe85efa8eeca00b336bbde47c70", open: this.internalOpen }, h("slot", { key: "5bdbb7773c9c1ae43ec2e05fca9558482815e28a" }))));
226
+ return h(Host, { key: "aee76fad23434fb3cdaf885c698f62237c2a9468", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "da047f870b7a93f1acbba5fa1628b5cb66139d99", name: "trigger" }), h("div", { key: "388a473ac7fb626a20d0feda14f0d8dd16f6ab94", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "67ca5c05ff40d2dd1d5f17a8634636503f98c02d", open: this.internalOpen }, h("slot", { key: "b7c7dfac4342afa1df67459e94de7ac7dca4a251" }))));
193
227
  }
194
228
  static get watchers() {
195
229
  return {
@@ -2,7 +2,7 @@ import {
2
2
  closeOverlay,
3
3
  openOverlay,
4
4
  requestTopOverlayClose
5
- } from "./chunk-G53JEAQK.js";
5
+ } from "./chunk-SZJQ3NPX.js";
6
6
  import {
7
7
  dispatchDetail
8
8
  } from "./chunk-UL7UIUJZ.js";
@@ -11,7 +11,7 @@ import {
11
11
  getElement,
12
12
  h,
13
13
  registerInstance
14
- } from "./chunk-SVINNT3E.js";
14
+ } from "./chunk-OY4D3W4U.js";
15
15
 
16
16
  // dist/esm/ui-dialog.entry.js
17
17
  var uiDialogCss = () => `:host{display:block}:host:not([data-open]){display:none}:host dialog{--ui-dialog-duration:var(--ui-motion-base);--ui-dialog-viewport-gap:var(--ui-space-4, 1rem);position:fixed;inset:0;inline-size:min( calc(100% - (var(--ui-dialog-viewport-gap) * 2)), var(--ui-dialog-max-width, 440px) );max-inline-size:none;max-block-size:calc(100dvh - (var(--ui-dialog-viewport-gap) * 2));margin:auto;padding:var(--ui-space-4);overflow:auto;background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-dialog);box-shadow:var(--ui-shadow-dialog);visibility:hidden;pointer-events:none;opacity:0;transform:scale(0.96);transition:opacity var(--ui-dialog-duration) var(--ui-motion-ease), transform var(--ui-dialog-duration) var(--ui-motion-ease), visibility var(--ui-dialog-duration), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]{visibility:visible;pointer-events:auto;opacity:1;transform:scale(1);animation:ui-dialog-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-enter{from{opacity:0;transform:scale(0.96)}}:host dialog::backdrop{background-color:transparent;transition:background-color var(--ui-dialog-duration) var(--ui-motion-ease), display var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete, overlay var(--ui-dialog-duration) var(--ui-motion-ease) allow-discrete}:host dialog[open]::backdrop{background-color:var(--ui-overlay-backdrop);animation:ui-dialog-backdrop-enter var(--ui-dialog-duration) var(--ui-motion-ease)}@keyframes ui-dialog-backdrop-enter{from{background-color:transparent}}`;
@@ -11,7 +11,7 @@ import {
11
11
  getElement,
12
12
  h,
13
13
  registerInstance
14
- } from "./chunk-SVINNT3E.js";
14
+ } from "./chunk-OY4D3W4U.js";
15
15
 
16
16
  // dist/esm/ui-disclosure.entry.js
17
17
  var uiDisclosureCss = () => `:host{display:block}::slotted([hidden]){display:none !important}`;