@threadlabs/looma 0.1.23 → 0.1.24

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 (287) hide show
  1. package/dist/chunk-HNFCGIBP.js +8 -0
  2. package/dist/{chunk-GDMQKT5F.js → chunk-IMHSPETJ.js} +32 -30
  3. package/dist/chunk-NB6DBRXQ.js +323 -0
  4. package/dist/cjs/controlled-state-BFya8rAX.js +9 -0
  5. package/dist/cjs/icons-BAdjrnhS.js +680 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/looma.cjs.js +1 -1
  8. package/dist/cjs/ui-affordance-scope.cjs.entry.js +1 -1
  9. package/dist/cjs/ui-avatar-group.cjs.entry.js +9 -17
  10. package/dist/cjs/ui-avatar.cjs.entry.js +2 -2
  11. package/dist/cjs/ui-badge.cjs.entry.js +2 -2
  12. package/dist/cjs/ui-button.cjs.entry.js +1 -1
  13. package/dist/cjs/ui-callout.cjs.entry.js +27 -0
  14. package/dist/cjs/ui-checkbox.cjs.entry.js +13 -7
  15. package/dist/cjs/ui-chip.cjs.entry.js +19 -0
  16. package/dist/cjs/ui-combobox.cjs.entry.js +3 -3
  17. package/dist/cjs/ui-context-menu.cjs.entry.js +1 -1
  18. package/dist/cjs/ui-dialog.cjs.entry.js +44 -8
  19. package/dist/cjs/ui-disclosure.cjs.entry.js +9 -6
  20. package/dist/cjs/ui-floating-action-button.cjs.entry.js +1 -1
  21. package/dist/cjs/ui-form-field.cjs.entry.js +59 -4
  22. package/dist/cjs/ui-icon-button.cjs.entry.js +1 -1
  23. package/dist/cjs/ui-input.cjs.entry.js +1 -1
  24. package/dist/cjs/ui-menu-item.cjs.entry.js +2 -2
  25. package/dist/cjs/ui-menu.cjs.entry.js +14 -9
  26. package/dist/cjs/ui-popover.cjs.entry.js +10 -7
  27. package/dist/cjs/ui-radio-group.cjs.entry.js +1 -1
  28. package/dist/cjs/ui-radio.cjs.entry.js +16 -7
  29. package/dist/cjs/ui-search-result-row.cjs.entry.js +1 -1
  30. package/dist/cjs/ui-search-shell.cjs.entry.js +1 -1
  31. package/dist/cjs/ui-select.cjs.entry.js +1 -1
  32. package/dist/cjs/ui-switch.cjs.entry.js +19 -10
  33. package/dist/cjs/ui-tabs.cjs.entry.js +10 -9
  34. package/dist/cjs/ui-textarea.cjs.entry.js +1 -1
  35. package/dist/cjs/ui-toast-region.cjs.entry.js +30 -19
  36. package/dist/cjs/ui-tooltip.cjs.entry.js +12 -8
  37. package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
  38. package/dist/cjs/ui-tree-item.cjs.entry.js +54 -617
  39. package/dist/cjs/ui-tree.cjs.entry.js +123 -11
  40. package/dist/collection/collection-manifest.json +2 -0
  41. package/dist/collection/components/ui-affordance-scope/ui-affordance-scope.js +1 -1
  42. package/dist/collection/components/ui-avatar/ui-avatar.css +4 -4
  43. package/dist/collection/components/ui-avatar/ui-avatar.js +1 -1
  44. package/dist/collection/components/ui-avatar-group/ui-avatar-group.css +2 -2
  45. package/dist/collection/components/ui-avatar-group/ui-avatar-group.js +8 -16
  46. package/dist/collection/components/ui-badge/ui-badge.css +64 -48
  47. package/dist/collection/components/ui-badge/ui-badge.js +1 -1
  48. package/dist/collection/components/ui-button/ui-button.js +1 -1
  49. package/dist/collection/components/ui-callout/ui-callout.css +74 -0
  50. package/dist/collection/components/ui-callout/ui-callout.js +59 -0
  51. package/dist/collection/components/ui-checkbox/ui-checkbox.js +16 -11
  52. package/dist/collection/components/ui-chip/ui-chip.css +43 -0
  53. package/dist/collection/components/ui-chip/ui-chip.js +45 -0
  54. package/dist/collection/components/ui-combobox/ui-combobox.js +3 -3
  55. package/dist/collection/components/ui-context-menu/ui-context-menu.js +1 -1
  56. package/dist/collection/components/ui-dialog/ui-dialog.js +49 -13
  57. package/dist/collection/components/ui-disclosure/ui-disclosure.js +12 -10
  58. package/dist/collection/components/ui-floating-action-button/ui-floating-action-button.js +1 -1
  59. package/dist/collection/components/ui-form-field/ui-form-field.js +59 -4
  60. package/dist/collection/components/ui-icon-button/ui-icon-button.js +1 -1
  61. package/dist/collection/components/ui-input/ui-input.js +1 -1
  62. package/dist/collection/components/ui-menu/ui-menu.css +12 -23
  63. package/dist/collection/components/ui-menu/ui-menu.js +16 -12
  64. package/dist/collection/components/ui-menu-item/ui-menu-item.css +9 -3
  65. package/dist/collection/components/ui-menu-item/ui-menu-item.js +1 -1
  66. package/dist/collection/components/ui-popover/ui-popover.css +14 -5
  67. package/dist/collection/components/ui-popover/ui-popover.js +12 -10
  68. package/dist/collection/components/ui-radio/ui-radio.js +24 -11
  69. package/dist/collection/components/ui-radio-group/ui-radio-group.js +1 -1
  70. package/dist/collection/components/ui-search-result-row/ui-search-result-row.js +1 -1
  71. package/dist/collection/components/ui-search-shell/ui-search-shell.js +1 -1
  72. package/dist/collection/components/ui-select/ui-select.js +1 -1
  73. package/dist/collection/components/ui-switch/ui-switch.js +22 -14
  74. package/dist/collection/components/ui-tabs/ui-tabs.js +13 -13
  75. package/dist/collection/components/ui-textarea/ui-textarea.js +1 -1
  76. package/dist/collection/components/ui-toast-region/ui-toast-region.js +30 -19
  77. package/dist/collection/components/ui-tooltip/ui-tooltip.css +16 -7
  78. package/dist/collection/components/ui-tooltip/ui-tooltip.js +14 -11
  79. package/dist/collection/components/ui-top-bar/ui-top-bar.js +1 -1
  80. package/dist/collection/components/ui-tree/ui-tree.css +2 -1
  81. package/dist/collection/components/ui-tree/ui-tree.js +122 -10
  82. package/dist/collection/components/ui-tree-item/ui-tree-item.js +61 -44
  83. package/dist/collection/icons.js +6 -1
  84. package/dist/collection/utils/controlled-state.js +4 -0
  85. package/dist/components/index.d.ts +4 -0
  86. package/dist/components/index.js +1 -1
  87. package/dist/components/p-Bk55QiUK.js +1 -0
  88. package/dist/components/p-BnGhGgTH.js +1 -0
  89. package/dist/components/p-CoFximGM.js +13 -0
  90. package/dist/components/p-DIGcRYAW.js +1 -0
  91. package/dist/components/ui-affordance-scope.js +1 -1
  92. package/dist/components/ui-avatar-group.js +1 -1
  93. package/dist/components/ui-avatar.js +1 -1
  94. package/dist/components/ui-badge.js +1 -1
  95. package/dist/components/ui-button.js +1 -1
  96. package/dist/components/ui-callout.d.ts +11 -0
  97. package/dist/components/ui-callout.js +1 -0
  98. package/dist/components/ui-checkbox.js +1 -1
  99. package/dist/components/ui-chip.d.ts +11 -0
  100. package/dist/components/ui-chip.js +1 -0
  101. package/dist/components/ui-combobox.js +1 -1
  102. package/dist/components/ui-context-menu.js +1 -1
  103. package/dist/components/ui-dialog.js +1 -1
  104. package/dist/components/ui-disclosure.js +1 -1
  105. package/dist/components/ui-floating-action-button.js +1 -1
  106. package/dist/components/ui-form-field.js +1 -1
  107. package/dist/components/ui-icon-button.js +1 -1
  108. package/dist/components/ui-input.js +1 -1
  109. package/dist/components/ui-menu-item.js +1 -1
  110. package/dist/components/ui-menu.js +1 -1
  111. package/dist/components/ui-popover.js +1 -1
  112. package/dist/components/ui-radio-group.js +1 -1
  113. package/dist/components/ui-radio.js +1 -1
  114. package/dist/components/ui-search-result-row.js +1 -1
  115. package/dist/components/ui-search-shell.js +1 -1
  116. package/dist/components/ui-select.js +1 -1
  117. package/dist/components/ui-switch.js +1 -1
  118. package/dist/components/ui-tabs.js +1 -1
  119. package/dist/components/ui-textarea.js +1 -1
  120. package/dist/components/ui-toast-region.js +1 -1
  121. package/dist/components/ui-tooltip.js +1 -1
  122. package/dist/components/ui-top-bar.js +1 -1
  123. package/dist/components/ui-tree-item.js +1 -13
  124. package/dist/components/ui-tree.js +1 -1
  125. package/dist/esm/controlled-state-BnGhGgTH.js +6 -0
  126. package/dist/esm/icons-CoFximGM.js +678 -0
  127. package/dist/esm/loader.js +1 -1
  128. package/dist/esm/looma.js +1 -1
  129. package/dist/esm/ui-affordance-scope.entry.js +1 -1
  130. package/dist/esm/ui-avatar-group.entry.js +9 -17
  131. package/dist/esm/ui-avatar.entry.js +2 -2
  132. package/dist/esm/ui-badge.entry.js +2 -2
  133. package/dist/esm/ui-button.entry.js +1 -1
  134. package/dist/esm/ui-callout.entry.js +25 -0
  135. package/dist/esm/ui-checkbox.entry.js +13 -7
  136. package/dist/esm/ui-chip.entry.js +17 -0
  137. package/dist/esm/ui-combobox.entry.js +3 -3
  138. package/dist/esm/ui-context-menu.entry.js +1 -1
  139. package/dist/esm/ui-dialog.entry.js +44 -8
  140. package/dist/esm/ui-disclosure.entry.js +9 -6
  141. package/dist/esm/ui-floating-action-button.entry.js +1 -1
  142. package/dist/esm/ui-form-field.entry.js +59 -4
  143. package/dist/esm/ui-icon-button.entry.js +1 -1
  144. package/dist/esm/ui-input.entry.js +1 -1
  145. package/dist/esm/ui-menu-item.entry.js +2 -2
  146. package/dist/esm/ui-menu.entry.js +14 -9
  147. package/dist/esm/ui-popover.entry.js +10 -7
  148. package/dist/esm/ui-radio-group.entry.js +1 -1
  149. package/dist/esm/ui-radio.entry.js +16 -7
  150. package/dist/esm/ui-search-result-row.entry.js +1 -1
  151. package/dist/esm/ui-search-shell.entry.js +1 -1
  152. package/dist/esm/ui-select.entry.js +1 -1
  153. package/dist/esm/ui-switch.entry.js +19 -10
  154. package/dist/esm/ui-tabs.entry.js +10 -9
  155. package/dist/esm/ui-textarea.entry.js +1 -1
  156. package/dist/esm/ui-toast-region.entry.js +30 -19
  157. package/dist/esm/ui-tooltip.entry.js +12 -8
  158. package/dist/esm/ui-top-bar.entry.js +1 -1
  159. package/dist/esm/ui-tree-item.entry.js +54 -617
  160. package/dist/esm/ui-tree.entry.js +123 -11
  161. package/dist/index.cjs +1224 -842
  162. package/dist/index.d.cts +5 -0
  163. package/dist/index.d.ts +5 -0
  164. package/dist/index.js +12 -2
  165. package/dist/looma/looma.esm.js +1 -1
  166. package/dist/looma/p-03f44c45.entry.js +1 -0
  167. package/dist/looma/p-08f80207.entry.js +1 -0
  168. package/dist/looma/{p-f74e5546.entry.js → p-13f8195a.entry.js} +1 -1
  169. package/dist/looma/{p-5a87b59d.entry.js → p-25e18ad6.entry.js} +1 -1
  170. package/dist/looma/p-2c03fa73.entry.js +1 -0
  171. package/dist/looma/{p-ed368426.entry.js → p-314d5c7c.entry.js} +1 -1
  172. package/dist/looma/{p-5da09f47.entry.js → p-3ef2a21b.entry.js} +1 -1
  173. package/dist/looma/{p-f0487ff3.entry.js → p-5a900d89.entry.js} +1 -1
  174. package/dist/looma/p-5fdcee1d.entry.js +1 -0
  175. package/dist/looma/{p-13347631.entry.js → p-672e3d16.entry.js} +1 -1
  176. package/dist/looma/{p-582973b5.entry.js → p-68430534.entry.js} +1 -1
  177. package/dist/looma/{p-add36e74.entry.js → p-72338f53.entry.js} +1 -1
  178. package/dist/looma/{p-a90d2821.entry.js → p-7ab661ec.entry.js} +1 -1
  179. package/dist/looma/p-7c4a225f.entry.js +1 -0
  180. package/dist/looma/p-82f2fa3d.entry.js +1 -0
  181. package/dist/looma/p-839faf55.entry.js +1 -0
  182. package/dist/looma/{p-7e0bb7f6.entry.js → p-8e254bc4.entry.js} +1 -1
  183. package/dist/looma/p-8e6b1001.entry.js +1 -0
  184. package/dist/looma/p-920656cf.entry.js +1 -0
  185. package/dist/looma/{p-40fe7fee.entry.js → p-97e8cb0e.entry.js} +1 -1
  186. package/dist/looma/p-9d2662ca.entry.js +1 -0
  187. package/dist/looma/p-9e1c4020.entry.js +1 -0
  188. package/dist/looma/p-BnGhGgTH.js +1 -0
  189. package/dist/looma/p-CoFximGM.js +13 -0
  190. package/dist/looma/{p-8b8840b8.entry.js → p-a63e2561.entry.js} +1 -1
  191. package/dist/looma/p-add67e4c.entry.js +1 -0
  192. package/dist/looma/p-b63f6d4f.entry.js +1 -0
  193. package/dist/looma/p-bd00d4e8.entry.js +1 -0
  194. package/dist/looma/p-cc915913.entry.js +1 -0
  195. package/dist/looma/p-cfba8f7c.entry.js +1 -0
  196. package/dist/looma/p-d56571a2.entry.js +1 -0
  197. package/dist/looma/{p-69a5557b.entry.js → p-e0f241ab.entry.js} +1 -1
  198. package/dist/looma/p-f1750fd7.entry.js +1 -0
  199. package/dist/looma/p-fd1e4d22.entry.js +1 -0
  200. package/dist/types/components/ui-avatar-group/ui-avatar-group.d.ts +1 -2
  201. package/dist/types/components/ui-callout/ui-callout.d.ts +6 -0
  202. package/dist/types/components/ui-checkbox/ui-checkbox.d.ts +2 -1
  203. package/dist/types/components/ui-chip/ui-chip.d.ts +6 -0
  204. package/dist/types/components/ui-dialog/ui-dialog.d.ts +7 -1
  205. package/dist/types/components/ui-disclosure/ui-disclosure.d.ts +2 -1
  206. package/dist/types/components/ui-form-field/ui-form-field.d.ts +8 -0
  207. package/dist/types/components/ui-menu/ui-menu.d.ts +2 -1
  208. package/dist/types/components/ui-popover/ui-popover.d.ts +2 -1
  209. package/dist/types/components/ui-radio/ui-radio.d.ts +4 -1
  210. package/dist/types/components/ui-switch/ui-switch.d.ts +2 -1
  211. package/dist/types/components/ui-tabs/ui-tabs.d.ts +2 -1
  212. package/dist/types/components/ui-toast-region/ui-toast-region.d.ts +3 -1
  213. package/dist/types/components/ui-tooltip/ui-tooltip.d.ts +2 -1
  214. package/dist/types/components/ui-tree/ui-tree.d.ts +12 -0
  215. package/dist/types/components/ui-tree-item/ui-tree-item.d.ts +11 -7
  216. package/dist/types/components.d.ts +110 -47
  217. package/dist/types/icons.d.ts +5 -0
  218. package/dist/types/utils/controlled-state.d.ts +4 -0
  219. package/dist/{ui-affordance-scope.entry-VO4C2MZX.js → ui-affordance-scope.entry-3TUZ6GLW.js} +2 -2
  220. package/dist/ui-avatar-group.entry-XGJKN25W.js +51 -0
  221. package/dist/{ui-avatar.entry-T6FU6ZYM.js → ui-avatar.entry-SN3G44HW.js} +3 -3
  222. package/dist/ui-badge.entry-B6WDCWJX.js +22 -0
  223. package/dist/{ui-button.entry-7UXMUGHN.js → ui-button.entry-AZYUELLV.js} +2 -2
  224. package/dist/ui-callout.entry-QRPWRMPC.js +32 -0
  225. package/dist/{ui-checkbox.entry-DMZJB3RE.js → ui-checkbox.entry-OB6GFC4M.js} +17 -8
  226. package/dist/ui-chip.entry-XSNPJXX3.js +22 -0
  227. package/dist/{ui-combobox.entry-ZCTPXEES.js → ui-combobox.entry-IIMMUJF7.js} +5 -5
  228. package/dist/{ui-context-menu.entry-2WMCBGCP.js → ui-context-menu.entry-AIULIE5Y.js} +5 -5
  229. package/dist/{ui-dialog.entry-WO23XOSW.js → ui-dialog.entry-QSYWYHLY.js} +50 -12
  230. package/dist/{ui-disclosure.entry-USX7OUEW.js → ui-disclosure.entry-3BJEYU3U.js} +13 -7
  231. package/dist/{ui-floating-action-button.entry-MXDIN7MV.js → ui-floating-action-button.entry-JEVNV6FI.js} +2 -2
  232. package/dist/ui-form-field.entry-PKSY7UU4.js +120 -0
  233. package/dist/{ui-icon-button.entry-MJUNXHBU.js → ui-icon-button.entry-TPX7BE7R.js} +2 -2
  234. package/dist/{ui-input.entry-AWG63YIG.js → ui-input.entry-6NCLNW4E.js} +2 -2
  235. package/dist/ui-menu-item.entry-KA2K3PKV.js +22 -0
  236. package/dist/{ui-menu.entry-IT3GW5TL.js → ui-menu.entry-7GDO5L2T.js} +22 -14
  237. package/dist/{ui-popover.entry-ZQQB4N6E.js → ui-popover.entry-FR6YRNK6.js} +17 -11
  238. package/dist/{ui-radio-group.entry-V7PCTS7I.js → ui-radio-group.entry-7QHXQSNO.js} +2 -2
  239. package/dist/{ui-radio.entry-JYH6TQBI.js → ui-radio.entry-YNMXKLDW.js} +20 -8
  240. package/dist/{ui-search-result-row.entry-JBNYXXUN.js → ui-search-result-row.entry-AHVVAAIO.js} +2 -2
  241. package/dist/{ui-search-shell.entry-TEAWE76O.js → ui-search-shell.entry-CNBEAMEZ.js} +2 -2
  242. package/dist/{ui-select.entry-F3A6TE2U.js → ui-select.entry-TUY6TCTC.js} +2 -2
  243. package/dist/{ui-switch.entry-MJIICMP2.js → ui-switch.entry-26LFI7B5.js} +23 -11
  244. package/dist/{ui-tabs.entry-6REFIUHV.js → ui-tabs.entry-LXB62RJJ.js} +14 -10
  245. package/dist/{ui-textarea.entry-OJTXCED7.js → ui-textarea.entry-JYGMGPX2.js} +2 -2
  246. package/dist/{ui-toast-region.entry-NOFXLKPS.js → ui-toast-region.entry-TOW4KZLZ.js} +32 -23
  247. package/dist/{ui-tooltip.entry-COWTWVHX.js → ui-tooltip.entry-SKFNYXPH.js} +19 -12
  248. package/dist/{ui-top-bar.entry-PIAWXJNV.js → ui-top-bar.entry-S3YP52EA.js} +2 -2
  249. package/dist/ui-tree-item.entry-LWYIPYLC.js +145 -0
  250. package/dist/{ui-tree.entry-XYI3ZFAZ.js → ui-tree.entry-LXKUQFRU.js} +114 -12
  251. package/editor/{chunk-QCOYOVQL.js → chunk-B5WVJOPV.js} +113 -97
  252. package/editor/extensions/index.d.ts +14 -6
  253. package/editor/extensions/index.js +1 -1
  254. package/editor/index.js +1 -1
  255. package/editor.css +37 -20
  256. package/package.json +1 -1
  257. package/styles.css +10 -0
  258. package/tokens.css +3 -0
  259. package/vue/{chunk-JLW23USW.js → chunk-D4AJULDE.js} +28 -16
  260. package/vue/editor/index.d.ts +5 -15
  261. package/vue/editor/index.js +1 -1
  262. package/vue/index.d.ts +325 -115
  263. package/vue/index.js +5 -1
  264. package/dist/components/p-CaietZcq.js +0 -1
  265. package/dist/components/p-DHd18bK7.js +0 -1
  266. package/dist/looma/p-14c081cf.entry.js +0 -1
  267. package/dist/looma/p-25366205.entry.js +0 -1
  268. package/dist/looma/p-2e3aa869.entry.js +0 -1
  269. package/dist/looma/p-446cda76.entry.js +0 -1
  270. package/dist/looma/p-4fc1b005.entry.js +0 -13
  271. package/dist/looma/p-6a8a4736.entry.js +0 -1
  272. package/dist/looma/p-6bf4038b.entry.js +0 -1
  273. package/dist/looma/p-8204fee6.entry.js +0 -1
  274. package/dist/looma/p-8238e0dc.entry.js +0 -1
  275. package/dist/looma/p-99d88efb.entry.js +0 -1
  276. package/dist/looma/p-a27669b1.entry.js +0 -1
  277. package/dist/looma/p-a6ee76b7.entry.js +0 -1
  278. package/dist/looma/p-b6398a6b.entry.js +0 -1
  279. package/dist/looma/p-d50faaff.entry.js +0 -1
  280. package/dist/looma/p-d77278ce.entry.js +0 -1
  281. package/dist/looma/p-d9ec13b7.entry.js +0 -1
  282. package/dist/looma/p-ecf8005f.entry.js +0 -1
  283. package/dist/ui-avatar-group.entry-TAXJRIIU.js +0 -59
  284. package/dist/ui-badge.entry-MZFYNBMJ.js +0 -22
  285. package/dist/ui-form-field.entry-7ZCMEHPY.js +0 -67
  286. package/dist/ui-menu-item.entry-HFTWG62N.js +0 -22
  287. package/dist/ui-tree-item.entry-BSEWNL2O.js +0 -389
package/dist/index.cjs CHANGED
@@ -402,7 +402,7 @@ var init_ui_affordance_scope_entry = __esm({
402
402
  this.coordinator?.refresh();
403
403
  };
404
404
  render() {
405
- return h(Host, { key: "184b0a908494d480ed23aa14b75d4f7b94e5275b" }, h("slot", { key: "570e810db588c1514c6fd85985c9bc4532993a2b", onSlotchange: this.onSlotChange }));
405
+ return h(Host, { key: "f500fa48554ed6224efd2dbe9632880bf0a15a19" }, h("slot", { key: "37c5c5b7925b260ff8f9edd411ee6c90a12a4909", onSlotchange: this.onSlotChange }));
406
406
  }
407
407
  static get watchers() {
408
408
  return {
@@ -421,12 +421,11 @@ var ui_avatar_group_entry_exports = {};
421
421
  __export(ui_avatar_group_entry_exports, {
422
422
  ui_avatar_group: () => UIAvatarGroup
423
423
  });
424
- var uiAvatarGroupCss, OVERFLOW_ATTR, UIAvatarGroup;
424
+ var uiAvatarGroupCss, UIAvatarGroup;
425
425
  var init_ui_avatar_group_entry = __esm({
426
426
  "dist/esm/ui-avatar-group.entry.js"() {
427
427
  init_index_8BGiMGQ0();
428
- 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}`;
429
- OVERFLOW_ATTR = "data-ui-avatar-group-overflow";
428
+ uiAvatarGroupCss = () => `:host{display:flex;align-items:center;flex-direction:row-reverse;gap:0}::slotted(*){margin-inline-end:-0.5rem;flex-shrink:0}::slotted(*:last-of-type){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}`;
430
429
  UIAvatarGroup = class {
431
430
  constructor(hostRef) {
432
431
  registerInstance(this, hostRef);
@@ -437,32 +436,25 @@ var init_ui_avatar_group_entry = __esm({
437
436
  max = 5;
438
437
  label = "People";
439
438
  overflowCount = 0;
440
- slotRef;
441
439
  syncOverflow() {
442
440
  this.updateOverflow();
443
441
  }
444
442
  componentDidLoad() {
445
- this.slotRef?.addEventListener("slotchange", () => this.updateOverflow());
446
443
  this.updateOverflow();
447
444
  }
448
- componentDidUpdate() {
449
- this.updateOverflow();
445
+ visibleLimit() {
446
+ return Number.isFinite(this.max) ? Math.max(0, Math.floor(this.max)) : 0;
450
447
  }
451
448
  updateOverflow() {
452
- const slot = this.host.shadowRoot?.querySelector("slot");
453
- const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
454
- const children = nodes.filter((el) => !el.hasAttribute(OVERFLOW_ATTR));
449
+ const children = Array.from(this.host.children);
455
450
  const total = children.length;
456
- const visibleCount = Math.min(this.max, total);
457
- const overflowCount = total > this.max ? total - this.max : 0;
458
- children.forEach((el, i) => {
459
- el.hidden = i >= visibleCount;
460
- el.setAttribute("aria-hidden", String(i >= visibleCount));
461
- });
462
- this.overflowCount = overflowCount;
451
+ const visibleLimit = this.visibleLimit();
452
+ const overflowCount = total > visibleLimit ? total - visibleLimit : 0;
453
+ if (this.overflowCount !== overflowCount)
454
+ this.overflowCount = overflowCount;
463
455
  }
464
456
  render() {
465
- return h(Host, { key: "bef6efd3c80d29e47742412a497893789ea8790b", role: "list", "aria-label": this.label || void 0 }, h("slot", { key: "21585b11dcde36868c3e3bc7fbd0c216be6f011b" }), this.overflowCount > 0 && h("span", { key: "ede3b71945d379fe78d522a3346aa29c02d74b15", class: "overflow", role: "listitem", "aria-label": `${this.overflowCount} more`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
457
+ return h(Host, { key: "9ba6693cabc379bbbe6f5698160481f27fe02f31", role: "group", "aria-label": this.label || void 0 }, h("style", { key: "ed231fe96c16a3cdd5a66d4828664c75c6959a9e" }, `::slotted(:nth-child(n + ${this.visibleLimit() + 1})) { display: none !important; }`), h("slot", { key: "463005a7f3c498c80c768151ab32c873ff1abf86", onSlotchange: () => this.updateOverflow() }), this.overflowCount > 0 && h("span", { key: "dc1ba88fd97ca461e6518d223f00a93416e6d0f0", class: "overflow", role: "img", "aria-label": `${this.overflowCount} more ${this.overflowCount === 1 ? "person" : "people"}`, "data-ui-avatar-group-overflow": true }, "+", this.overflowCount));
466
458
  }
467
459
  static get watchers() {
468
460
  return {
@@ -493,7 +485,7 @@ var uiAvatarCss, UIAvatar;
493
485
  var init_ui_avatar_entry = __esm({
494
486
  "dist/esm/ui-avatar.entry.js"() {
495
487
  init_index_8BGiMGQ0();
496
- uiAvatarCss = () => `:host{display:inline-grid;place-items:center;overflow:hidden;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.875rem;font-weight:600;text-transform:uppercase}.avatar{display:contents}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}`;
488
+ uiAvatarCss = () => `:host{display:inline-flex}.avatar{display:inline-grid;place-items:center;overflow:hidden;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.875rem;font-weight:600;text-transform:uppercase}.avatar img{grid-area:1 / 1;inline-size:100%;block-size:100%;object-fit:cover}.avatar .fallback{grid-area:1 / 1;display:inline-flex;align-items:center;justify-content:center;inline-size:100%;block-size:100%}`;
497
489
  UIAvatar = class {
498
490
  constructor(hostRef) {
499
491
  registerInstance(this, hostRef);
@@ -515,7 +507,7 @@ var init_ui_avatar_entry = __esm({
515
507
  render() {
516
508
  const fallbackText = this.fallback || toInitials(this.name || this.alt);
517
509
  const label = this.alt || this.name || "Avatar";
518
- return h(Host, { key: "18214960ad2f1a0370907c0281102af924739de9", role: "img", "aria-label": label, "data-has-image": this.hasImage ? "" : void 0 }, h("div", { key: "c6d0a00de56b756f0e24fdc4b306d89cdae2a44f", class: "avatar" }, h("img", { key: "c5bfecb9d18797bc934ff087ce7ed8a4616ab347", src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? "false" : "true" }), h("span", { key: "1875a45a9c21de3e3a52924ef25b3f8429a788c4", class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? "true" : "false" }, fallbackText)));
510
+ return h(Host, { key: "bbe6c3a775702022a19d819a6cc9d81d798cb3e1", role: "img", "aria-label": label, "data-has-image": this.hasImage ? "" : void 0 }, h("div", { key: "63402327ba5bde122bf5deaea09baf965ee9b047", class: "avatar" }, h("img", { key: "e52b86773684b80d76efa459cb03ae40881f959b", src: this.src, alt: label, onLoad: this.onImageLoad, onError: this.onImageError, hidden: !this.hasImage, "aria-hidden": this.hasImage ? "false" : "true" }), h("span", { key: "82a6d8f0d0c69ca52f81d092a2292fc80238265b", class: "fallback", hidden: this.hasImage, "aria-hidden": this.hasImage ? "true" : "false" }, fallbackText)));
519
511
  }
520
512
  static get watchers() {
521
513
  return {
@@ -538,7 +530,7 @@ var uiBadgeCss, UIBadge;
538
530
  var init_ui_badge_entry = __esm({
539
531
  "dist/esm/ui-badge.entry.js"() {
540
532
  init_index_8BGiMGQ0();
541
- 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)}`;
533
+ uiBadgeCss = () => `:host{--ui-badge-surface:var(--ui-surface-muted);--ui-badge-text:var(--ui-text-secondary);--ui-badge-border:var(--ui-border-default);--ui-badge-font-size:var(--ui-font-size-xs);--ui-badge-font-weight:var(--ui-font-normal);--ui-badge-line-height:var(--ui-line-height-tight);--ui-badge-padding-block:var(--ui-space-0-5);--ui-badge-padding-inline:var(--ui-space-2);display:inline-flex;max-width:100%}.badge__surface{display:inline-flex;align-items:center;justify-content:center;max-width:100%;padding:var(--ui-badge-padding-block) var(--ui-badge-padding-inline);border:1px solid var(--ui-badge-border);border-radius:var(--ui-radius-round);background:var(--ui-badge-surface);color:var(--ui-badge-text);font-family:var(--ui-font-family-sans);font-size:var(--ui-badge-font-size);font-weight:var(--ui-badge-font-weight);line-height:var(--ui-badge-line-height);white-space:nowrap}:host([data-tone='accent']) .badge__surface{--ui-badge-surface:var(--ui-accent-solid);--ui-badge-border:var(--ui-accent-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='danger']) .badge__surface{--ui-badge-surface:var(--ui-danger-solid);--ui-badge-border:var(--ui-danger-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='success']) .badge__surface{--ui-badge-surface:var(--ui-success-solid);--ui-badge-border:var(--ui-success-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-tone='warning']) .badge__surface{--ui-badge-surface:var(--ui-warning-solid);--ui-badge-border:var(--ui-warning-solid);--ui-badge-text:var(--ui-text-primary)}:host([data-tone='info']) .badge__surface{--ui-badge-surface:var(--ui-info-solid);--ui-badge-border:var(--ui-info-solid);--ui-badge-text:var(--ui-text-on-accent)}:host([data-variant='subtle'][data-tone='accent']) .badge__surface{--ui-badge-surface:var(--ui-accent-soft);--ui-badge-border:var(--ui-accent-soft);--ui-badge-text:var(--ui-accent-solid)}:host([data-variant='subtle'][data-tone='danger']) .badge__surface{--ui-badge-surface:var(--ui-danger-soft);--ui-badge-border:var(--ui-danger-soft);--ui-badge-text:var(--ui-danger-solid)}:host([data-variant='subtle'][data-tone='success']) .badge__surface{--ui-badge-surface:var(--ui-success-soft);--ui-badge-border:var(--ui-success-soft);--ui-badge-text:var(--ui-success-solid)}:host([data-variant='subtle'][data-tone='warning']) .badge__surface{--ui-badge-surface:var(--ui-warning-soft);--ui-badge-border:var(--ui-warning-soft);--ui-badge-text:var(--ui-warning-solid)}:host([data-variant='subtle'][data-tone='info']) .badge__surface{--ui-badge-surface:var(--ui-info-soft);--ui-badge-border:var(--ui-info-soft);--ui-badge-text:var(--ui-info-solid)}`;
542
534
  UIBadge = class {
543
535
  constructor(hostRef) {
544
536
  registerInstance(this, hostRef);
@@ -546,7 +538,7 @@ var init_ui_badge_entry = __esm({
546
538
  variant;
547
539
  tone;
548
540
  render() {
549
- return h(Host, { key: "8766c0331ac7fbd6409b604578e159ae093c844b", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("slot", { key: "65016ab530b850c82261e2da718622ff72567634" }));
541
+ return h(Host, { key: "ba96ade6d037a7ed9958e7eed540e62782f846f0", "data-variant": this.variant || void 0, "data-tone": this.tone || void 0 }, h("span", { key: "a1e9587f59de479c19b9ea7aec8c8e932b998369", class: "badge__surface" }, h("slot", { key: "5835ddcea5cda472e700557528fd3cbc9d572616" })));
550
542
  }
551
543
  };
552
544
  UIBadge.style = uiBadgeCss();
@@ -631,7 +623,7 @@ var init_ui_button_entry = __esm({
631
623
  this.host.click();
632
624
  };
633
625
  render() {
634
- return h(Host, { key: "9c8d479fe7f1873a447048944513648bac132d52", "data-size": this.size || void 0, "data-variant": this.variant, "data-disabled": this.disabled ? "true" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "741f48e7efd42262834992c07c4685d3e929d91c", ref: (el) => this.slotRef = el }));
626
+ return h(Host, { key: "58a90293e2ac169c8bc3c6cb3d15428cc73629b7", "data-size": this.size || void 0, "data-variant": this.variant, "data-disabled": this.disabled ? "true" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "05439bdc2af81bcabe9da11b4baf13f880e0a75f", ref: (el) => this.slotRef = el }));
635
627
  }
636
628
  static get watchers() {
637
629
  return {
@@ -651,251 +643,641 @@ var init_ui_button_entry = __esm({
651
643
  }
652
644
  });
653
645
 
654
- // dist/esm/ui-checkbox.entry.js
655
- var ui_checkbox_entry_exports = {};
656
- __export(ui_checkbox_entry_exports, {
657
- ui_checkbox: () => UICheckbox
658
- });
659
- var uiCheckboxCss, UICheckbox;
660
- var init_ui_checkbox_entry = __esm({
661
- "dist/esm/ui-checkbox.entry.js"() {
662
- init_index_8BGiMGQ0();
663
- init_events_JwSoedEO();
664
- 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}`;
665
- UICheckbox = class {
666
- constructor(hostRef) {
667
- registerInstance(this, hostRef);
668
- }
669
- get host() {
670
- return getElement(this);
671
- }
672
- checked = false;
673
- defaultChecked = false;
674
- disabled = false;
675
- indeterminate = false;
676
- required = false;
677
- value = "on";
678
- internalChecked = false;
679
- slotRef;
680
- syncFromProp() {
681
- this.internalChecked = this.checked;
682
- }
683
- syncToInput() {
684
- const input = this.getInput();
685
- if (!input)
686
- return;
687
- this.host.dataset.disabled = this.disabled ? "true" : "";
688
- this.host.setAttribute("aria-disabled", String(this.disabled));
689
- input.checked = this.internalChecked;
690
- input.indeterminate = this.indeterminate;
691
- input.disabled = this.disabled;
692
- input.required = this.required;
693
- input.value = this.value;
694
- }
695
- componentDidLoad() {
696
- this.syncFromProp();
697
- this.internalChecked = this.internalChecked || this.defaultChecked;
698
- this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
699
- this.syncToInput();
700
- const input = this.getInput();
701
- input?.addEventListener("change", this.onInputChange);
702
- }
703
- disconnectedCallback() {
704
- const input = this.getInput();
705
- input?.removeEventListener("change", this.onInputChange);
706
- }
707
- componentDidUpdate() {
708
- this.syncToInput();
709
- }
710
- getInput() {
711
- const slot = this.host.shadowRoot?.querySelector("slot");
712
- const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
713
- return nodes.find((el) => el instanceof HTMLInputElement && el.type === "checkbox") ?? null;
714
- }
715
- onInputChange = (e) => {
716
- const input = e.target;
717
- if (!input)
718
- return;
719
- this.internalChecked = input.checked;
720
- this.indeterminate = input.indeterminate;
721
- dispatchDetail(this.host, "change", {
722
- checked: this.internalChecked,
723
- value: this.value,
724
- trigger: eventToTrigger(e)
725
- });
726
- };
727
- render() {
728
- return h(Host, { key: "66b6708ae71c9eca6c03c63891b590bd050c2506", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "b5e168a9ff0c6e5e747fff6c6264c59744f10a56", ref: (el) => this.slotRef = el }));
729
- }
730
- static get watchers() {
731
- return {
732
- "checked": [{
733
- "syncFromProp": 0
734
- }],
735
- "internalChecked": [{
736
- "syncToInput": 0
737
- }],
738
- "indeterminate": [{
739
- "syncToInput": 0
740
- }],
741
- "disabled": [{
742
- "syncToInput": 0
743
- }],
744
- "required": [{
745
- "syncToInput": 0
746
- }]
747
- };
748
- }
749
- };
750
- UICheckbox.style = uiCheckboxCss();
751
- }
752
- });
753
-
754
- // dist/esm/manager-C-0syqXZ.js
755
- function syncScrollLock() {
756
- if (typeof document === "undefined") {
757
- return;
758
- }
759
- const root = document.documentElement;
760
- if (modalCount > 0) {
761
- root.setAttribute(scrollLockAttribute, "true");
762
- root.style.overflow = "hidden";
763
- return;
764
- }
765
- root.removeAttribute(scrollLockAttribute);
766
- root.style.removeProperty("overflow");
767
- }
768
- function getOverlayDismissible(record) {
769
- return record.dismissible ?? true;
770
- }
771
- function handleEscape(event) {
772
- if (event.key !== "Escape") {
773
- return;
774
- }
775
- requestTopOverlayClose("escape", "keyboard");
776
- }
777
- function handleLightDismiss(event) {
778
- const top = getTopOverlay();
779
- if (!top || !getOverlayDismissible(top)) {
780
- return;
781
- }
782
- const boundary = [top.element, ...top.relatedElements ?? []];
783
- if (event.composedPath().some((target) => target instanceof Node && boundary.some((element) => element.contains(target))))
784
- return;
785
- requestTopOverlayClose("light-dismiss", "pointer");
786
- }
787
- function ensureListeners() {
788
- if (listenersAttached || typeof document === "undefined") {
789
- return;
790
- }
791
- document.addEventListener("keydown", handleEscape);
792
- document.addEventListener("pointerdown", handleLightDismiss, { capture: true });
793
- listenersAttached = true;
794
- }
795
- function removeListenersIfIdle() {
796
- if (!listenersAttached || stack.length > 0 || typeof document === "undefined") {
797
- return;
798
- }
799
- document.removeEventListener("keydown", handleEscape);
800
- document.removeEventListener("pointerdown", handleLightDismiss, { capture: true });
801
- listenersAttached = false;
802
- }
803
- function openOverlay(record) {
804
- closeOverlay(record.id);
805
- stack.push(record);
806
- if (record.modal) {
807
- modalCount += 1;
808
- syncScrollLock();
809
- }
810
- ensureListeners();
811
- }
812
- function closeOverlay(id) {
813
- const index = stack.findIndex((record) => record.id === id);
814
- if (index >= 0) {
815
- const [record] = stack.splice(index, 1);
816
- if (record?.modal) {
817
- modalCount = Math.max(0, modalCount - 1);
818
- syncScrollLock();
819
- }
820
- }
821
- removeListenersIfIdle();
646
+ // dist/esm/icons-CoFximGM.js
647
+ function serializeAttributes(attributes) {
648
+ return Object.entries(attributes).map(([name, value]) => ` ${name}="${escapeAttribute(value)}"`).join("");
822
649
  }
823
- function getTopOverlay() {
824
- return stack.at(-1);
650
+ function escapeAttribute(value) {
651
+ return String(value).replaceAll("&", "&").replaceAll('"', """);
825
652
  }
826
- function requestTopOverlayClose(reason, trigger) {
827
- const top = getTopOverlay();
828
- if (!top) {
829
- return false;
830
- }
831
- if (!getOverlayDismissible(top) && (reason === "escape" || reason === "light-dismiss")) {
832
- return false;
833
- }
834
- top.requestClose(reason, trigger);
835
- return true;
653
+ function serializeIconNode(node) {
654
+ const [tag, attributes] = node;
655
+ return `<${tag}${serializeAttributes(attributes)}></${tag}>`;
836
656
  }
837
- var stack, scrollLockAttribute, modalCount, listenersAttached;
838
- var init_manager_C_0syqXZ = __esm({
839
- "dist/esm/manager-C-0syqXZ.js"() {
840
- stack = [];
841
- scrollLockAttribute = "data-ui-scroll-lock";
842
- modalCount = 0;
843
- listenersAttached = false;
844
- }
845
- });
846
-
847
- // dist/esm/ui-combobox.entry.js
848
- var ui_combobox_entry_exports = {};
849
- __export(ui_combobox_entry_exports, {
850
- ui_combobox: () => UICombobox
851
- });
852
- function formatEditingValue(raw, selection, format) {
853
- const unchanged = { display: raw, selection };
854
- if (!format)
855
- return unchanged;
856
- let result;
857
- try {
858
- result = format(raw, selection);
859
- } catch {
860
- return unchanged;
861
- }
862
- if (!result)
863
- return unchanged;
864
- const characters = Array.from(raw);
865
- let cursor = 0;
866
- for (const character of result.display)
867
- if (character === characters[cursor])
868
- cursor += 1;
869
- if (!Number.isInteger(result.selection.start) || !Number.isInteger(result.selection.end) || cursor !== characters.length || result.selection.start < 0 || result.selection.end < result.selection.start || result.selection.end > result.display.length)
870
- return unchanged;
871
- return result;
657
+ function loomaIconMarkup(name, className = "looma-icon") {
658
+ return [
659
+ `<svg class="${escapeAttribute(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
660
+ ' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',
661
+ ' stroke-linecap="round" stroke-linejoin="round">',
662
+ LOOMA_ICONS[name].map(serializeIconNode).join(""),
663
+ "</svg>"
664
+ ].join("");
872
665
  }
873
- async function validateField(request, config) {
874
- let output = request.raw;
875
- let issues = [];
876
- const check = () => request.signal.throwIfAborted();
877
- try {
878
- check();
879
- if (config.parse)
880
- output = await config.parse(request.raw, request);
881
- check();
882
- if (config.schema) {
883
- const result = await config.schema["~standard"].validate(output);
884
- check();
885
- if (result.issues)
886
- issues = result.issues;
887
- else if ("value" in result)
888
- output = result.value;
889
- }
890
- if (!issues.some((issue) => issue.severity !== "warning")) {
891
- if (config.normalize)
892
- output = await config.normalize(output, request);
893
- check();
894
- if (config.validator) {
895
- const result = await config.validator(output, request);
896
- check();
897
- issues = [...issues, ...result.issues ?? []];
898
- if ("output" in result)
666
+ var Bold, Braces, ChevronDown, ChevronLeft, CircleCheck, CircleX, CodeXml, Columns3, Ellipsis, Eraser, GripHorizontal, GripVertical, Heading1, Heading2, Heading3, Highlighter, Image, Info, Italic, ListOrdered, ListTodo, List, Merge, Minus, NotebookPen, PaintBucket, PanelBottom, PanelLeft, PanelRight, PanelTop, Pilcrow, Plus, Quote, Redo2, Rows3, Split, Strikethrough, Table2, TextAlignCenter, TextAlignEnd, TextAlignStart, Trash2, TriangleAlert, Underline, Undo2, LOOMA_ICONS;
667
+ var init_icons_CoFximGM = __esm({
668
+ "dist/esm/icons-CoFximGM.js"() {
669
+ Bold = [
670
+ ["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" }]
671
+ ];
672
+ Braces = [
673
+ ["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" }],
674
+ ["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" }]
675
+ ];
676
+ ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
677
+ ChevronLeft = [["path", { d: "m15 18-6-6 6-6" }]];
678
+ CircleCheck = [
679
+ ["circle", { cx: "12", cy: "12", r: "10" }],
680
+ ["path", { d: "m9 12 2 2 4-4" }]
681
+ ];
682
+ CircleX = [
683
+ ["circle", { cx: "12", cy: "12", r: "10" }],
684
+ ["path", { d: "m15 9-6 6" }],
685
+ ["path", { d: "m9 9 6 6" }]
686
+ ];
687
+ CodeXml = [
688
+ ["path", { d: "m18 16 4-4-4-4" }],
689
+ ["path", { d: "m6 8-4 4 4 4" }],
690
+ ["path", { d: "m14.5 4-5 16" }]
691
+ ];
692
+ Columns3 = [
693
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
694
+ ["path", { d: "M9 3v18" }],
695
+ ["path", { d: "M15 3v18" }]
696
+ ];
697
+ Ellipsis = [
698
+ ["circle", { cx: "12", cy: "12", r: "1" }],
699
+ ["circle", { cx: "19", cy: "12", r: "1" }],
700
+ ["circle", { cx: "5", cy: "12", r: "1" }]
701
+ ];
702
+ Eraser = [
703
+ [
704
+ "path",
705
+ {
706
+ 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"
707
+ }
708
+ ],
709
+ ["path", { d: "m5.082 11.09 8.828 8.828" }]
710
+ ];
711
+ GripHorizontal = [
712
+ ["circle", { cx: "12", cy: "9", r: "1" }],
713
+ ["circle", { cx: "19", cy: "9", r: "1" }],
714
+ ["circle", { cx: "5", cy: "9", r: "1" }],
715
+ ["circle", { cx: "12", cy: "15", r: "1" }],
716
+ ["circle", { cx: "19", cy: "15", r: "1" }],
717
+ ["circle", { cx: "5", cy: "15", r: "1" }]
718
+ ];
719
+ GripVertical = [
720
+ ["circle", { cx: "9", cy: "12", r: "1" }],
721
+ ["circle", { cx: "9", cy: "5", r: "1" }],
722
+ ["circle", { cx: "9", cy: "19", r: "1" }],
723
+ ["circle", { cx: "15", cy: "12", r: "1" }],
724
+ ["circle", { cx: "15", cy: "5", r: "1" }],
725
+ ["circle", { cx: "15", cy: "19", r: "1" }]
726
+ ];
727
+ Heading1 = [
728
+ ["path", { d: "M4 12h8" }],
729
+ ["path", { d: "M4 18V6" }],
730
+ ["path", { d: "M12 18V6" }],
731
+ ["path", { d: "m17 12 3-2v8" }]
732
+ ];
733
+ Heading2 = [
734
+ ["path", { d: "M4 12h8" }],
735
+ ["path", { d: "M4 18V6" }],
736
+ ["path", { d: "M12 18V6" }],
737
+ ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }]
738
+ ];
739
+ Heading3 = [
740
+ ["path", { d: "M4 12h8" }],
741
+ ["path", { d: "M4 18V6" }],
742
+ ["path", { d: "M12 18V6" }],
743
+ ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }],
744
+ ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]
745
+ ];
746
+ Highlighter = [
747
+ ["path", { d: "m9 11-6 6v3h9l3-3" }],
748
+ ["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" }]
749
+ ];
750
+ Image = [
751
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
752
+ ["circle", { cx: "9", cy: "9", r: "2" }],
753
+ ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
754
+ ];
755
+ Info = [
756
+ ["circle", { cx: "12", cy: "12", r: "10" }],
757
+ ["path", { d: "M12 16v-4" }],
758
+ ["path", { d: "M12 8h.01" }]
759
+ ];
760
+ Italic = [
761
+ ["line", { x1: "19", x2: "10", y1: "4", y2: "4" }],
762
+ ["line", { x1: "14", x2: "5", y1: "20", y2: "20" }],
763
+ ["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
764
+ ];
765
+ ListOrdered = [
766
+ ["path", { d: "M11 5h10" }],
767
+ ["path", { d: "M11 12h10" }],
768
+ ["path", { d: "M11 19h10" }],
769
+ ["path", { d: "M4 4h1v5" }],
770
+ ["path", { d: "M4 9h2" }],
771
+ ["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" }]
772
+ ];
773
+ ListTodo = [
774
+ ["path", { d: "M13 5h8" }],
775
+ ["path", { d: "M13 12h8" }],
776
+ ["path", { d: "M13 19h8" }],
777
+ ["path", { d: "m3 17 2 2 4-4" }],
778
+ ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }]
779
+ ];
780
+ List = [
781
+ ["path", { d: "M3 5h.01" }],
782
+ ["path", { d: "M3 12h.01" }],
783
+ ["path", { d: "M3 19h.01" }],
784
+ ["path", { d: "M8 5h13" }],
785
+ ["path", { d: "M8 12h13" }],
786
+ ["path", { d: "M8 19h13" }]
787
+ ];
788
+ Merge = [
789
+ ["path", { d: "m8 6 4-4 4 4" }],
790
+ ["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }],
791
+ ["path", { d: "m20 22-5-5" }]
792
+ ];
793
+ Minus = [["path", { d: "M5 12h14" }]];
794
+ NotebookPen = [
795
+ ["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4" }],
796
+ ["path", { d: "M2 6h4" }],
797
+ ["path", { d: "M2 10h4" }],
798
+ ["path", { d: "M2 14h4" }],
799
+ ["path", { d: "M2 18h4" }],
800
+ [
801
+ "path",
802
+ {
803
+ d: "M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"
804
+ }
805
+ ]
806
+ ];
807
+ PaintBucket = [
808
+ ["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" }],
809
+ ["path", { d: "m5 2 5 5" }],
810
+ ["path", { d: "M2 13h15" }],
811
+ ["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" }]
812
+ ];
813
+ PanelBottom = [
814
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
815
+ ["path", { d: "M3 15h18" }]
816
+ ];
817
+ PanelLeft = [
818
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
819
+ ["path", { d: "M9 3v18" }]
820
+ ];
821
+ PanelRight = [
822
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
823
+ ["path", { d: "M15 3v18" }]
824
+ ];
825
+ PanelTop = [
826
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
827
+ ["path", { d: "M3 9h18" }]
828
+ ];
829
+ Pilcrow = [
830
+ ["path", { d: "M13 4v16" }],
831
+ ["path", { d: "M17 4v16" }],
832
+ ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }]
833
+ ];
834
+ Plus = [
835
+ ["path", { d: "M5 12h14" }],
836
+ ["path", { d: "M12 5v14" }]
837
+ ];
838
+ Quote = [
839
+ [
840
+ "path",
841
+ {
842
+ 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"
843
+ }
844
+ ],
845
+ [
846
+ "path",
847
+ {
848
+ 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"
849
+ }
850
+ ]
851
+ ];
852
+ Redo2 = [
853
+ ["path", { d: "m15 14 5-5-5-5" }],
854
+ ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]
855
+ ];
856
+ Rows3 = [
857
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
858
+ ["path", { d: "M21 9H3" }],
859
+ ["path", { d: "M21 15H3" }]
860
+ ];
861
+ Split = [
862
+ ["path", { d: "M16 3h5v5" }],
863
+ ["path", { d: "M8 3H3v5" }],
864
+ ["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }],
865
+ ["path", { d: "m15 9 6-6" }]
866
+ ];
867
+ Strikethrough = [
868
+ ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
869
+ ["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
870
+ ["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
871
+ ];
872
+ Table2 = [
873
+ [
874
+ "path",
875
+ {
876
+ 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"
877
+ }
878
+ ]
879
+ ];
880
+ TextAlignCenter = [
881
+ ["path", { d: "M21 5H3" }],
882
+ ["path", { d: "M17 12H7" }],
883
+ ["path", { d: "M19 19H5" }]
884
+ ];
885
+ TextAlignEnd = [
886
+ ["path", { d: "M21 5H3" }],
887
+ ["path", { d: "M21 12H9" }],
888
+ ["path", { d: "M21 19H7" }]
889
+ ];
890
+ TextAlignStart = [
891
+ ["path", { d: "M21 5H3" }],
892
+ ["path", { d: "M15 12H3" }],
893
+ ["path", { d: "M17 19H3" }]
894
+ ];
895
+ Trash2 = [
896
+ ["path", { d: "M10 11v6" }],
897
+ ["path", { d: "M14 11v6" }],
898
+ ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
899
+ ["path", { d: "M3 6h18" }],
900
+ ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]
901
+ ];
902
+ TriangleAlert = [
903
+ ["path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }],
904
+ ["path", { d: "M12 9v4" }],
905
+ ["path", { d: "M12 17h.01" }]
906
+ ];
907
+ Underline = [
908
+ ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }],
909
+ ["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]
910
+ ];
911
+ Undo2 = [
912
+ ["path", { d: "M9 14 4 9l5-5" }],
913
+ ["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" }]
914
+ ];
915
+ LOOMA_ICONS = {
916
+ "align-center": TextAlignCenter,
917
+ "align-left": TextAlignStart,
918
+ "align-right": TextAlignEnd,
919
+ bold: Bold,
920
+ braces: Braces,
921
+ "circle-check": CircleCheck,
922
+ "circle-x": CircleX,
923
+ "chevron-down": ChevronDown,
924
+ "chevron-left": ChevronLeft,
925
+ "code-xml": CodeXml,
926
+ columns: Columns3,
927
+ ellipsis: Ellipsis,
928
+ eraser: Eraser,
929
+ "grip-horizontal": GripHorizontal,
930
+ "grip-vertical": GripVertical,
931
+ "heading-1": Heading1,
932
+ "heading-2": Heading2,
933
+ "heading-3": Heading3,
934
+ highlighter: Highlighter,
935
+ image: Image,
936
+ info: Info,
937
+ italic: Italic,
938
+ list: List,
939
+ "list-ordered": ListOrdered,
940
+ "list-todo": ListTodo,
941
+ merge: Merge,
942
+ "notebook-pen": NotebookPen,
943
+ minus: Minus,
944
+ "paint-bucket": PaintBucket,
945
+ "panel-bottom": PanelBottom,
946
+ "panel-left": PanelLeft,
947
+ "panel-right": PanelRight,
948
+ "panel-top": PanelTop,
949
+ pilcrow: Pilcrow,
950
+ plus: Plus,
951
+ quote: Quote,
952
+ redo: Redo2,
953
+ rows: Rows3,
954
+ split: Split,
955
+ strikethrough: Strikethrough,
956
+ table: Table2,
957
+ trash: Trash2,
958
+ "triangle-alert": TriangleAlert,
959
+ underline: Underline,
960
+ undo: Undo2
961
+ };
962
+ }
963
+ });
964
+
965
+ // dist/esm/ui-callout.entry.js
966
+ var ui_callout_entry_exports = {};
967
+ __export(ui_callout_entry_exports, {
968
+ ui_callout: () => UICallout
969
+ });
970
+ var uiCalloutCss, toneIcons, UICallout;
971
+ var init_ui_callout_entry = __esm({
972
+ "dist/esm/ui-callout.entry.js"() {
973
+ init_index_8BGiMGQ0();
974
+ init_icons_CoFximGM();
975
+ uiCalloutCss = () => `:host{--ui-callout-surface:var(--ui-info-soft);--ui-callout-text:var(--ui-text-primary);--ui-callout-border:var(--ui-info-solid);--ui-callout-icon:var(--ui-info-solid);--ui-callout-padding-block:var(--ui-space-2);--ui-callout-padding-inline:var(--ui-space-3);--ui-callout-icon-column:1rem;--ui-callout-gap:var(--ui-space-2);--ui-callout-icon-size:1rem;--ui-callout-border-width:1px;--ui-callout-leading-border-width:4px;display:block;max-width:100%}.callout__surface{display:grid;grid-template-columns:var(--ui-callout-icon-column) minmax(0, 1fr);gap:var(--ui-callout-gap);align-items:start;padding:var(--ui-callout-padding-block) var(--ui-callout-padding-inline);border:var(--ui-callout-border-width) solid color-mix(in srgb, var(--ui-callout-border) 35%, transparent);border-inline-start:var(--ui-callout-leading-border-width) solid var(--ui-callout-border);border-radius:var(--ui-radius-2);background:var(--ui-callout-surface);color:var(--ui-callout-text);font-family:var(--ui-font-family-sans);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-normal);line-height:var(--ui-line-height-md)}.icon{display:grid;place-items:center;inline-size:var(--ui-callout-icon-column);block-size:var(--ui-callout-icon-column);color:var(--ui-callout-icon)}.icon svg{inline-size:var(--ui-callout-icon-size);block-size:var(--ui-callout-icon-size)}.content{min-inline-size:0}:host([data-tone='note']){--ui-callout-surface:var(--ui-surface-muted);--ui-callout-border:var(--ui-border-strong);--ui-callout-icon:var(--ui-text-secondary)}:host([data-tone='warning']){--ui-callout-surface:var(--ui-warning-soft);--ui-callout-border:var(--ui-warning-solid);--ui-callout-icon:var(--ui-warning-solid)}:host([data-tone='success']){--ui-callout-surface:var(--ui-success-soft);--ui-callout-border:var(--ui-success-solid);--ui-callout-icon:var(--ui-success-solid)}:host([data-tone='error']){--ui-callout-surface:var(--ui-danger-soft);--ui-callout-border:var(--ui-danger-solid);--ui-callout-icon:var(--ui-danger-solid)}`;
976
+ toneIcons = {
977
+ info: "info",
978
+ note: "notebook-pen",
979
+ warning: "triangle-alert",
980
+ success: "circle-check",
981
+ error: "circle-x"
982
+ };
983
+ UICallout = class {
984
+ constructor(hostRef) {
985
+ registerInstance(this, hostRef);
986
+ }
987
+ tone = "info";
988
+ render() {
989
+ const icon = toneIcons[this.tone] ?? toneIcons.info;
990
+ return h(Host, { key: "94bae6fbb688e5c8da979a3bebc12c51b8689c8a", role: "note", "data-tone": this.tone }, h("div", { key: "8fe1a3dae5b7cd3679d187cef018fa0cd810fb76", class: "callout__surface" }, h("span", { key: "ed62ad8e29c30489e075631d83f1732d7a53a378", class: "icon", "aria-hidden": "true", innerHTML: loomaIconMarkup(icon) }), h("div", { key: "97638d28e3979f71913c17b2501a90e3a9251f0f", class: "content" }, h("slot", { key: "6a91a0d3f189eae28aabbe278924ba7f89015f34" }))));
991
+ }
992
+ };
993
+ UICallout.style = uiCalloutCss();
994
+ }
995
+ });
996
+
997
+ // dist/esm/controlled-state-BnGhGgTH.js
998
+ var isControlled, controlledOrDefault;
999
+ var init_controlled_state_BnGhGgTH = __esm({
1000
+ "dist/esm/controlled-state-BnGhGgTH.js"() {
1001
+ isControlled = (value) => value !== void 0;
1002
+ controlledOrDefault = (value, defaultValue) => value === void 0 ? defaultValue : value;
1003
+ }
1004
+ });
1005
+
1006
+ // dist/esm/ui-checkbox.entry.js
1007
+ var ui_checkbox_entry_exports = {};
1008
+ __export(ui_checkbox_entry_exports, {
1009
+ ui_checkbox: () => UICheckbox
1010
+ });
1011
+ var uiCheckboxCss, UICheckbox;
1012
+ var init_ui_checkbox_entry = __esm({
1013
+ "dist/esm/ui-checkbox.entry.js"() {
1014
+ init_index_8BGiMGQ0();
1015
+ init_events_JwSoedEO();
1016
+ init_controlled_state_BnGhGgTH();
1017
+ 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}`;
1018
+ UICheckbox = class {
1019
+ constructor(hostRef) {
1020
+ registerInstance(this, hostRef);
1021
+ }
1022
+ get host() {
1023
+ return getElement(this);
1024
+ }
1025
+ /** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
1026
+ checked;
1027
+ defaultChecked = false;
1028
+ disabled = false;
1029
+ indeterminate = false;
1030
+ required = false;
1031
+ value = "on";
1032
+ internalChecked = false;
1033
+ slotRef;
1034
+ syncFromProp() {
1035
+ if (isControlled(this.checked))
1036
+ this.internalChecked = this.checked;
1037
+ }
1038
+ syncToInput() {
1039
+ const input = this.getInput();
1040
+ if (!input)
1041
+ return;
1042
+ this.host.dataset.disabled = this.disabled ? "true" : "";
1043
+ this.host.setAttribute("aria-disabled", String(this.disabled));
1044
+ input.checked = this.internalChecked;
1045
+ input.indeterminate = this.indeterminate;
1046
+ input.disabled = this.disabled;
1047
+ input.required = this.required;
1048
+ input.value = this.value;
1049
+ }
1050
+ componentDidLoad() {
1051
+ this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
1052
+ this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
1053
+ this.syncToInput();
1054
+ const input = this.getInput();
1055
+ input?.addEventListener("change", this.onInputChange);
1056
+ }
1057
+ disconnectedCallback() {
1058
+ const input = this.getInput();
1059
+ input?.removeEventListener("change", this.onInputChange);
1060
+ }
1061
+ componentDidUpdate() {
1062
+ this.syncToInput();
1063
+ }
1064
+ getInput() {
1065
+ const slot = this.host.shadowRoot?.querySelector("slot");
1066
+ const nodes = slot?.assignedElements() ?? Array.from(this.host.children);
1067
+ return nodes.find((el) => el instanceof HTMLInputElement && el.type === "checkbox") ?? null;
1068
+ }
1069
+ onInputChange = (e) => {
1070
+ const input = e.target;
1071
+ if (!input)
1072
+ return;
1073
+ const checked = input.checked;
1074
+ if (!isControlled(this.checked))
1075
+ this.internalChecked = checked;
1076
+ else
1077
+ this.syncToInput();
1078
+ this.indeterminate = input.indeterminate;
1079
+ dispatchDetail(this.host, "change", {
1080
+ checked,
1081
+ value: this.value,
1082
+ trigger: eventToTrigger(e)
1083
+ });
1084
+ };
1085
+ render() {
1086
+ return h(Host, { key: "eb46eb41a5ab871058960bd2aa1163a03144bc0f", role: "checkbox", "aria-checked": this.indeterminate ? "mixed" : String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "ce18b1f1b63efebf048cd67b87064641cf4d915c", ref: (el) => this.slotRef = el }));
1087
+ }
1088
+ static get watchers() {
1089
+ return {
1090
+ "checked": [{
1091
+ "syncFromProp": 0
1092
+ }],
1093
+ "internalChecked": [{
1094
+ "syncToInput": 0
1095
+ }],
1096
+ "indeterminate": [{
1097
+ "syncToInput": 0
1098
+ }],
1099
+ "disabled": [{
1100
+ "syncToInput": 0
1101
+ }],
1102
+ "required": [{
1103
+ "syncToInput": 0
1104
+ }]
1105
+ };
1106
+ }
1107
+ };
1108
+ UICheckbox.style = uiCheckboxCss();
1109
+ }
1110
+ });
1111
+
1112
+ // dist/esm/ui-chip.entry.js
1113
+ var ui_chip_entry_exports = {};
1114
+ __export(ui_chip_entry_exports, {
1115
+ ui_chip: () => UIChip
1116
+ });
1117
+ var uiChipCss, UIChip;
1118
+ var init_ui_chip_entry = __esm({
1119
+ "dist/esm/ui-chip.entry.js"() {
1120
+ init_index_8BGiMGQ0();
1121
+ uiChipCss = () => `:host{--ui-chip-surface:var(--ui-surface-subtle);--ui-chip-text:var(--ui-text-secondary);--ui-chip-border:var(--ui-border-default);--ui-chip-font-size:var(--ui-font-size-xs);--ui-chip-font-weight:var(--ui-font-normal);--ui-chip-line-height:var(--ui-line-height-tight);--ui-chip-padding-block:var(--ui-space-0-5);--ui-chip-padding-inline:var(--ui-space-2);--ui-chip-notch:var(--ui-space-1);display:inline-flex;max-width:100%}.chip__surface{display:inline-flex;align-items:center;max-width:100%;padding:var(--ui-chip-padding-block) var(--ui-chip-padding-inline);border:1px solid var(--ui-chip-border);background:var(--ui-chip-surface);color:var(--ui-chip-text) !important;font-family:var(--ui-font-family-sans) !important;font-size:var(--ui-chip-font-size) !important;font-weight:var(--ui-chip-font-weight) !important;line-height:var(--ui-chip-line-height) !important;white-space:nowrap}:host([data-appearance='pill']) .chip__surface{border-radius:var(--ui-radius-round)}:host([data-appearance='tag']) .chip__surface{border:0;padding-inline-end:calc(var(--ui-chip-padding-inline) + var(--ui-chip-notch));clip-path:polygon(0 0, calc(100% - var(--ui-chip-notch)) 0, 100% 50%, calc(100% - var(--ui-chip-notch)) 100%, 0 100%)}`;
1122
+ UIChip = class {
1123
+ constructor(hostRef) {
1124
+ registerInstance(this, hostRef);
1125
+ }
1126
+ /** `tag` has a square leading edge and an angled trailing edge; `pill` is fully rounded. */
1127
+ appearance = "tag";
1128
+ render() {
1129
+ return h(Host, { key: "fe1246a1e698098f0ca9cb04e749d5adf233e50c", "data-appearance": this.appearance }, h("span", { key: "a17237699b9eb20fb0a084adbd900a3aa9bc12b0", class: "chip__surface" }, h("slot", { key: "7f4e5dcc82d360083d4ded2617fa39a9dc1fd3ef" })));
1130
+ }
1131
+ };
1132
+ UIChip.style = uiChipCss();
1133
+ }
1134
+ });
1135
+
1136
+ // dist/esm/manager-C-0syqXZ.js
1137
+ function syncScrollLock() {
1138
+ if (typeof document === "undefined") {
1139
+ return;
1140
+ }
1141
+ const root = document.documentElement;
1142
+ if (modalCount > 0) {
1143
+ root.setAttribute(scrollLockAttribute, "true");
1144
+ root.style.overflow = "hidden";
1145
+ return;
1146
+ }
1147
+ root.removeAttribute(scrollLockAttribute);
1148
+ root.style.removeProperty("overflow");
1149
+ }
1150
+ function getOverlayDismissible(record) {
1151
+ return record.dismissible ?? true;
1152
+ }
1153
+ function handleEscape(event) {
1154
+ if (event.key !== "Escape") {
1155
+ return;
1156
+ }
1157
+ requestTopOverlayClose("escape", "keyboard");
1158
+ }
1159
+ function handleLightDismiss(event) {
1160
+ const top = getTopOverlay();
1161
+ if (!top || !getOverlayDismissible(top)) {
1162
+ return;
1163
+ }
1164
+ const boundary = [top.element, ...top.relatedElements ?? []];
1165
+ if (event.composedPath().some((target) => target instanceof Node && boundary.some((element) => element.contains(target))))
1166
+ return;
1167
+ requestTopOverlayClose("light-dismiss", "pointer");
1168
+ }
1169
+ function ensureListeners() {
1170
+ if (listenersAttached || typeof document === "undefined") {
1171
+ return;
1172
+ }
1173
+ document.addEventListener("keydown", handleEscape);
1174
+ document.addEventListener("pointerdown", handleLightDismiss, { capture: true });
1175
+ listenersAttached = true;
1176
+ }
1177
+ function removeListenersIfIdle() {
1178
+ if (!listenersAttached || stack.length > 0 || typeof document === "undefined") {
1179
+ return;
1180
+ }
1181
+ document.removeEventListener("keydown", handleEscape);
1182
+ document.removeEventListener("pointerdown", handleLightDismiss, { capture: true });
1183
+ listenersAttached = false;
1184
+ }
1185
+ function openOverlay(record) {
1186
+ closeOverlay(record.id);
1187
+ stack.push(record);
1188
+ if (record.modal) {
1189
+ modalCount += 1;
1190
+ syncScrollLock();
1191
+ }
1192
+ ensureListeners();
1193
+ }
1194
+ function closeOverlay(id) {
1195
+ const index = stack.findIndex((record) => record.id === id);
1196
+ if (index >= 0) {
1197
+ const [record] = stack.splice(index, 1);
1198
+ if (record?.modal) {
1199
+ modalCount = Math.max(0, modalCount - 1);
1200
+ syncScrollLock();
1201
+ }
1202
+ }
1203
+ removeListenersIfIdle();
1204
+ }
1205
+ function getTopOverlay() {
1206
+ return stack.at(-1);
1207
+ }
1208
+ function requestTopOverlayClose(reason, trigger) {
1209
+ const top = getTopOverlay();
1210
+ if (!top) {
1211
+ return false;
1212
+ }
1213
+ if (!getOverlayDismissible(top) && (reason === "escape" || reason === "light-dismiss")) {
1214
+ return false;
1215
+ }
1216
+ top.requestClose(reason, trigger);
1217
+ return true;
1218
+ }
1219
+ var stack, scrollLockAttribute, modalCount, listenersAttached;
1220
+ var init_manager_C_0syqXZ = __esm({
1221
+ "dist/esm/manager-C-0syqXZ.js"() {
1222
+ stack = [];
1223
+ scrollLockAttribute = "data-ui-scroll-lock";
1224
+ modalCount = 0;
1225
+ listenersAttached = false;
1226
+ }
1227
+ });
1228
+
1229
+ // dist/esm/ui-combobox.entry.js
1230
+ var ui_combobox_entry_exports = {};
1231
+ __export(ui_combobox_entry_exports, {
1232
+ ui_combobox: () => UICombobox
1233
+ });
1234
+ function formatEditingValue(raw, selection, format) {
1235
+ const unchanged = { display: raw, selection };
1236
+ if (!format)
1237
+ return unchanged;
1238
+ let result;
1239
+ try {
1240
+ result = format(raw, selection);
1241
+ } catch {
1242
+ return unchanged;
1243
+ }
1244
+ if (!result)
1245
+ return unchanged;
1246
+ const characters = Array.from(raw);
1247
+ let cursor = 0;
1248
+ for (const character of result.display)
1249
+ if (character === characters[cursor])
1250
+ cursor += 1;
1251
+ if (!Number.isInteger(result.selection.start) || !Number.isInteger(result.selection.end) || cursor !== characters.length || result.selection.start < 0 || result.selection.end < result.selection.start || result.selection.end > result.display.length)
1252
+ return unchanged;
1253
+ return result;
1254
+ }
1255
+ async function validateField(request, config) {
1256
+ let output = request.raw;
1257
+ let issues = [];
1258
+ const check = () => request.signal.throwIfAborted();
1259
+ try {
1260
+ check();
1261
+ if (config.parse)
1262
+ output = await config.parse(request.raw, request);
1263
+ check();
1264
+ if (config.schema) {
1265
+ const result = await config.schema["~standard"].validate(output);
1266
+ check();
1267
+ if (result.issues)
1268
+ issues = result.issues;
1269
+ else if ("value" in result)
1270
+ output = result.value;
1271
+ }
1272
+ if (!issues.some((issue) => issue.severity !== "warning")) {
1273
+ if (config.normalize)
1274
+ output = await config.normalize(output, request);
1275
+ check();
1276
+ if (config.validator) {
1277
+ const result = await config.validator(output, request);
1278
+ check();
1279
+ issues = [...issues, ...result.issues ?? []];
1280
+ if ("output" in result)
899
1281
  output = result.output;
900
1282
  }
901
1283
  }
@@ -1353,20 +1735,20 @@ var init_ui_combobox_entry = __esm({
1353
1735
  const description = [this.helpOpen ? "help-text" : "", this.validation.issues.length ? "validation" : ""].filter(Boolean).join(" ") || void 0;
1354
1736
  const status = this.loading ? "Loading suggestions\u2026" : this.lookupError || (this.expanded ? `${this.rows.length} suggestions available.` : "");
1355
1737
  const groups = [...new Set(this.rows.map((row) => row.group ?? ""))];
1356
- return h(Host, { key: "2378bfd8473852642fef21898f4a756eb3b092ba", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "7aba65aeb336d490ddeaf5db9bba9db8ab8b9dbb", htmlFor: "input", part: "label" }, this.label, this.required ? " *" : ""), h("div", { key: "ee87156259d0fe1e2e56c4b36667e8daf5e1e2c1", class: "field", part: "field", ref: (element) => this.field = element }, h("input", { key: "35c5b85ff9a4bcba9bddaf85ff1f118a94aa077b", id: "input", ref: (element) => this.input = element, role: "combobox", "aria-autocomplete": "list", "aria-expanded": String(this.expanded), "aria-controls": "listbox", "aria-activedescendant": this.expanded && this.active >= 0 ? `option-${this.active}` : void 0, "aria-describedby": description, "aria-invalid": String(this.validation.status === "error"), "aria-busy": String(this.validation.status === "pending"), value: this.display, placeholder: this.placeholder, name: this.name || void 0, disabled: this.disabled, readOnly: this.readOnly, required: this.required, autoComplete: "off", part: "input", onInput: this.onInput, onKeyDown: this.onKeydown, onCompositionstart: () => this.composing = true, onCompositionend: () => {
1738
+ return h(Host, { key: "b485462943bef9e5cb0a4b42f82888024132ab3a", "data-size": this.size, "data-validation": this.validation.status, onFocusout: this.onFocusOut }, h("label", { key: "99db32d80b0a250ff4ebea8481dda94be53df2eb", htmlFor: "input", part: "label" }, this.label, this.required ? " *" : ""), h("div", { key: "922adddf41c07215d3ec73947e8e3fe801c7ef89", class: "field", part: "field", ref: (element) => this.field = element }, h("input", { key: "557780297c5afee8112a5085984c5dd4ea1a02be", id: "input", ref: (element) => this.input = element, role: "combobox", "aria-autocomplete": "list", "aria-expanded": String(this.expanded), "aria-controls": "listbox", "aria-activedescendant": this.expanded && this.active >= 0 ? `option-${this.active}` : void 0, "aria-describedby": description, "aria-invalid": String(this.validation.status === "error"), "aria-busy": String(this.validation.status === "pending"), value: this.display, placeholder: this.placeholder, name: this.name || void 0, disabled: this.disabled, readOnly: this.readOnly, required: this.required, autoComplete: "off", part: "input", onInput: this.onInput, onKeyDown: this.onKeydown, onCompositionstart: () => this.composing = true, onCompositionend: () => {
1357
1739
  this.composing = false;
1358
1740
  this.onInput(new InputEvent("input"));
1359
- } }), this.clearable && h("button", { key: "74e4f44836b751ab5e9f794a39b480602e0c106d", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
1741
+ } }), this.clearable && h("button", { key: "ab180bacc7f5232eb517b7fed9bee0d62a4b1156", type: "button", part: "affordance", "aria-label": `Clear ${this.label}`, disabled: this.disabled || this.readOnly, onClick: () => {
1360
1742
  this.commit(null, "", null, "clear", "pointer");
1361
1743
  this.close();
1362
1744
  this.input?.focus();
1363
- } }, "\xD7"), this.help && h("button", { key: "c870ced139fb22baa50a1795ab78f14c38647d34", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "ba3dc5128c1941b21b53a5ba78a27017b3df5ec8", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "eced588e3fa7958dd6185173faaef01219c30243", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
1745
+ } }, "\xD7"), this.help && h("button", { key: "b4ea9b44c9e22eb9ac259fb67b86368eede2b13f", id: "help", type: "button", part: "affordance", "aria-label": `Help for ${this.label}`, disabled: this.disabled }, h("span", { key: "36222d7a98a4f6abb12f785e9b4f28c2479a4e37", "aria-hidden": "true" }, "?")), this.disclosure && h("button", { key: "1d8757b7c817575b6915d0e8c164e20776df83e5", type: "button", part: "affordance", "aria-label": `Suggestions for ${this.label}`, "aria-controls": "listbox", "aria-expanded": String(this.expanded), disabled: this.disabled || this.readOnly, onClick: () => {
1364
1746
  if (this.expanded)
1365
1747
  this.close();
1366
1748
  else
1367
1749
  this.open("disclosure");
1368
1750
  this.input?.focus();
1369
- } }, h("span", { key: "7cb9f7f2bb15246dcdd2348ea0ca656d1d0c8c33", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "b1b5d42ca457f9b951758bb5e816c8dbbcd1087d", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "9eca2df66c72917e6bfda21205c2a4ef97dd91d5", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "641e1f137c9cfef5d08ec99f6178e59487a20bf1", id: "listbox", role: "listbox", "aria-label": `${this.label} suggestions`, "aria-busy": String(this.loading) }, groups.map((group) => h("div", { role: group ? "group" : "presentation", "aria-label": group || void 0 }, group && h("div", { class: "group", part: "group" }, group), this.rows.map((row, index) => (row.group ?? "") !== group ? null : h("div", { id: `option-${index}`, role: "option", "aria-selected": String(this.selected === row.value), "aria-disabled": String(Boolean(row.disabled)), "data-active": this.active === index ? "" : void 0, part: "option", class: "option", onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(index, "pointer") }, h("slot", { name: `option-${row.id}` }, h("span", { class: "primary", part: "option-primary" }, row.label), row.description && h("span", { class: "secondary", part: "option-secondary" }, row.description)))))), this.canCreate && h("div", { key: "38a3aa6b2ffae30e6f81e1f89d10c9966dd31b10", id: `option-${this.rows.length}`, role: "option", "aria-selected": "false", class: "option", part: "option", "data-active": this.active === this.rows.length ? "" : void 0, onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(this.rows.length, "pointer") }, h("slot", { key: "dd3e895ef363f6d30a0c25e4b5092a8feacc63e5", name: "create" }, "Create \u201C", this.raw, "\u201D"))), this.loading ? h("div", { class: "message" }, h("slot", { name: "loading" }, "Loading suggestions\u2026")) : this.lookupError ? h("div", { class: "message" }, h("slot", { name: "error" }, this.lookupError)) : !this.rows.length && !this.canCreate ? h("div", { class: "message" }, h("slot", { name: "empty" }, "No suggestions.")) : null), h("div", { key: "9cf12a8fde7d9cfb9e2d2a77669ac4708c7fded6", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "1c7b1d3f658e500cbf5f5004a76a39511cc79c49", class: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" }, status, " ", this.validation.status === "pending" ? "Checking value\u2026" : this.validation.issues.map((issue) => issue.message).join(" ")));
1751
+ } }, h("span", { key: "cd2dad7694dc24104521a58d4182d6e866f54095", "aria-hidden": "true" }, "\u2304"))), this.help && h("ui-tooltip", { key: "5e0eecd828a0e82d94b0be5b5f3233cddca4a87b", id: "help-text", for: "help", toggleOnClick: true, onOpen: () => this.helpOpen = true, onClose: () => this.helpOpen = false }, this.help), h("div", { key: "694902d8c8f58664838a943e0e2c14c856be9a08", class: "popup", part: "popup", hidden: !this.expanded, ref: (element) => this.popup = element }, h("div", { key: "81b18e296151afde18c47492aa997bdd13d553bc", id: "listbox", role: "listbox", "aria-label": `${this.label} suggestions`, "aria-busy": String(this.loading) }, groups.map((group) => h("div", { role: group ? "group" : "presentation", "aria-label": group || void 0 }, group && h("div", { class: "group", part: "group" }, group), this.rows.map((row, index) => (row.group ?? "") !== group ? null : h("div", { id: `option-${index}`, role: "option", "aria-selected": String(this.selected === row.value), "aria-disabled": String(Boolean(row.disabled)), "data-active": this.active === index ? "" : void 0, part: "option", class: "option", onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(index, "pointer") }, h("slot", { name: `option-${row.id}` }, h("span", { class: "primary", part: "option-primary" }, row.label), row.description && h("span", { class: "secondary", part: "option-secondary" }, row.description)))))), this.canCreate && h("div", { key: "dbf87523b5c6f17aedf15295d9703557f2d31524", id: `option-${this.rows.length}`, role: "option", "aria-selected": "false", class: "option", part: "option", "data-active": this.active === this.rows.length ? "" : void 0, onPointerDown: (event) => event.preventDefault(), onClick: () => this.choose(this.rows.length, "pointer") }, h("slot", { key: "bd4bdd2b132de7f72c1e5450fb0c0d16254aeedb", name: "create" }, "Create \u201C", this.raw, "\u201D"))), this.loading ? h("div", { class: "message" }, h("slot", { name: "loading" }, "Loading suggestions\u2026")) : this.lookupError ? h("div", { class: "message" }, h("slot", { name: "error" }, this.lookupError)) : !this.rows.length && !this.canCreate ? h("div", { class: "message" }, h("slot", { name: "empty" }, "No suggestions.")) : null), h("div", { key: "0d39fb1acb6d65307fabc3f502785a19710dc4af", id: "validation", class: "message", part: "validation", hidden: !this.validation.issues.length }, this.validation.issues.map((issue) => h("div", null, issue.message))), h("div", { key: "a83334d72b90ca0f411e6161a8bf5e2e8c2e33a8", class: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" }, status, " ", this.validation.status === "pending" ? "Checking value\u2026" : this.validation.issues.map((issue) => issue.message).join(" ")));
1370
1752
  }
1371
1753
  static get watchers() {
1372
1754
  return {
@@ -1613,7 +1995,7 @@ var init_ui_context_menu_entry = __esm({
1613
1995
  this.closeMenu("action", "pointer");
1614
1996
  };
1615
1997
  render() {
1616
- return h(Host, { key: "641dd3aba6120cf4187f4503c64029eaf307dc4f", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "3f550349f9537b951b50a8c291f1951dd5a3b723", name: "trigger" }), h("div", { key: "a612523f054986122638722340d8135c44a85399", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "0711879d09900183e938d8942abb8b9032812a5f", open: this.internalOpen }, h("slot", { key: "8e088dd20a48d8fb81126f2dd020abb886e86e22" }))));
1998
+ return h(Host, { key: "5d927f41a72e680ad6d6d4a3fa0c913360cb8660", "data-open": this.internalOpen ? "" : void 0, "data-focus-trigger": this.internalOpen ? this.focusTrigger : void 0, onKeyDown: this.onKeydown, onClick: this.onItemClick }, h("slot", { key: "e5b1ec05d96093671fb839e3b81ddefb730575e1", name: "trigger" }), h("div", { key: "a0c4a8ca50bcca2b7d3ee53b4c26db054af93151", class: "menu", "data-open": this.internalOpen ? "" : void 0 }, h("ui-menu", { key: "ac03b9dc3fa56d0cbb28115060726de4500a668b", open: this.internalOpen }, h("slot", { key: "f2d8484cb9fb3956a3a5979795633a74d423577d" }))));
1617
1999
  }
1618
2000
  static get watchers() {
1619
2001
  return {
@@ -1644,6 +2026,7 @@ var init_ui_dialog_entry = __esm({
1644
2026
  init_index_8BGiMGQ0();
1645
2027
  init_manager_C_0syqXZ();
1646
2028
  init_events_JwSoedEO();
2029
+ init_controlled_state_BnGhGgTH();
1647
2030
  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}}`;
1648
2031
  UIDialog = class {
1649
2032
  constructor(hostRef) {
@@ -1652,17 +2035,27 @@ var init_ui_dialog_entry = __esm({
1652
2035
  get host() {
1653
2036
  return getElement(this);
1654
2037
  }
1655
- open = false;
2038
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
2039
+ open;
1656
2040
  defaultOpen = false;
1657
2041
  modal = true;
1658
2042
  dismissible = true;
1659
2043
  /** Accessible name forwarded to the native dialog surface. */
1660
2044
  label;
1661
2045
  internalOpen = false;
2046
+ accessibleLabel = "Dialog";
1662
2047
  overlayId = `ui-dialog-${Math.random().toString(36).slice(2, 11)}`;
1663
2048
  dialogRef;
2049
+ contentObserver = null;
1664
2050
  syncFromProp() {
1665
- this.internalOpen = this.open;
2051
+ if (isControlled(this.open))
2052
+ this.internalOpen = this.open;
2053
+ }
2054
+ syncLabelFromProp() {
2055
+ this.syncAccessibleLabel();
2056
+ }
2057
+ componentWillLoad() {
2058
+ this.syncAccessibleLabel();
1666
2059
  }
1667
2060
  syncOpen() {
1668
2061
  if (this.dialogRef) {
@@ -1682,20 +2075,29 @@ var init_ui_dialog_entry = __esm({
1682
2075
  }
1683
2076
  }
1684
2077
  componentDidLoad() {
1685
- this.syncFromProp();
1686
- this.internalOpen = this.internalOpen || this.defaultOpen;
2078
+ this.contentObserver = new MutationObserver(this.syncAccessibleLabel);
2079
+ this.contentObserver.observe(this.host, {
2080
+ childList: true,
2081
+ subtree: true,
2082
+ characterData: true
2083
+ });
2084
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
1687
2085
  this.dialogRef?.addEventListener("close", this.onDialogClose);
2086
+ this.syncAccessibleLabel();
1688
2087
  this.syncOpen();
1689
2088
  }
1690
2089
  disconnectedCallback() {
1691
2090
  this.dialogRef?.removeEventListener("close", this.onDialogClose);
2091
+ this.contentObserver?.disconnect();
2092
+ this.contentObserver = null;
1692
2093
  closeOverlay(this.overlayId);
1693
2094
  }
1694
2095
  componentDidUpdate() {
1695
2096
  this.syncOpen();
1696
2097
  }
1697
2098
  handleRequestClose(reason, trigger) {
1698
- this.internalOpen = false;
2099
+ if (!isControlled(this.open))
2100
+ this.internalOpen = false;
1699
2101
  dispatchDetail(this.host, "close", {
1700
2102
  open: false,
1701
2103
  reason,
@@ -1704,8 +2106,12 @@ var init_ui_dialog_entry = __esm({
1704
2106
  }
1705
2107
  onDialogClose = () => {
1706
2108
  if (this.internalOpen) {
1707
- this.internalOpen = false;
1708
- closeOverlay(this.overlayId);
2109
+ if (!isControlled(this.open)) {
2110
+ this.internalOpen = false;
2111
+ closeOverlay(this.overlayId);
2112
+ } else {
2113
+ requestAnimationFrame(() => this.syncOpen());
2114
+ }
1709
2115
  dispatchDetail(this.host, "close", {
1710
2116
  open: false,
1711
2117
  reason: "programmatic",
@@ -1718,14 +2124,25 @@ var init_ui_dialog_entry = __esm({
1718
2124
  requestTopOverlayClose("escape", "keyboard");
1719
2125
  }
1720
2126
  };
2127
+ syncAccessibleLabel = () => {
2128
+ const explicitLabel = this.label?.trim();
2129
+ const heading = this.host.querySelector('[slot="heading"], [data-ui-dialog-title], h1, h2, h3, h4, h5, h6');
2130
+ const headingLabel = heading?.textContent?.trim();
2131
+ const nextLabel = explicitLabel || headingLabel || "Dialog";
2132
+ if (this.accessibleLabel !== nextLabel)
2133
+ this.accessibleLabel = nextLabel;
2134
+ };
1721
2135
  render() {
1722
- return h(Host, { key: "6e88afd3a595ab0eed3d82a046ffb15e1e167cdb", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "420e4d8de66245a5818a1284adb23a536ebcd907", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.label }, h("slot", { key: "10604688504f013f79b7a6ed5f9ed36bc9c6b48b" })));
2136
+ return h(Host, { key: "b7aa33e24a74527a58718b3fa2218f5a09e9e439", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("dialog", { key: "f24455edc404581b5040c9c0090bf64141f9e296", ref: (el) => this.dialogRef = el, open: this.internalOpen, "aria-label": this.accessibleLabel }, h("slot", { key: "bad318e44b9c80dc0aae04ea5cdbb7b2ab472c35" })));
1723
2137
  }
1724
2138
  static get watchers() {
1725
2139
  return {
1726
2140
  "open": [{
1727
2141
  "syncFromProp": 0
1728
2142
  }],
2143
+ "label": [{
2144
+ "syncLabelFromProp": 0
2145
+ }],
1729
2146
  "internalOpen": [{
1730
2147
  "syncOpen": 0
1731
2148
  }]
@@ -1759,6 +2176,7 @@ var init_ui_disclosure_entry = __esm({
1759
2176
  init_index_8BGiMGQ0();
1760
2177
  init_id_hgBUJRDa();
1761
2178
  init_events_JwSoedEO();
2179
+ init_controlled_state_BnGhGgTH();
1762
2180
  uiDisclosureCss = () => `:host{display:block}::slotted([hidden]){display:none !important}`;
1763
2181
  UIDisclosure = class {
1764
2182
  constructor(hostRef) {
@@ -1767,7 +2185,8 @@ var init_ui_disclosure_entry = __esm({
1767
2185
  get host() {
1768
2186
  return getElement(this);
1769
2187
  }
1770
- open = false;
2188
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
2189
+ open;
1771
2190
  defaultOpen = false;
1772
2191
  disabled = false;
1773
2192
  internalOpen = false;
@@ -1775,7 +2194,8 @@ var init_ui_disclosure_entry = __esm({
1775
2194
  trigger = null;
1776
2195
  content = null;
1777
2196
  syncFromProp() {
1778
- this.internalOpen = this.open;
2197
+ if (isControlled(this.open))
2198
+ this.internalOpen = this.open;
1779
2199
  }
1780
2200
  syncState() {
1781
2201
  if (this.trigger) {
@@ -1787,8 +2207,7 @@ var init_ui_disclosure_entry = __esm({
1787
2207
  }
1788
2208
  componentDidLoad() {
1789
2209
  this.resolveParts();
1790
- this.syncFromProp();
1791
- this.internalOpen = this.internalOpen || this.defaultOpen;
2210
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
1792
2211
  this.syncState();
1793
2212
  this.trigger?.addEventListener("click", this.onTriggerClick);
1794
2213
  this.trigger?.addEventListener("keydown", this.onTriggerKeydown);
@@ -1825,7 +2244,8 @@ var init_ui_disclosure_entry = __esm({
1825
2244
  setOpen(next, action) {
1826
2245
  if (this.internalOpen === next)
1827
2246
  return;
1828
- this.internalOpen = next;
2247
+ if (!isControlled(this.open))
2248
+ this.internalOpen = next;
1829
2249
  dispatchDetail(this.host, next ? "open" : "close", {
1830
2250
  open: next,
1831
2251
  reason: action.reason,
@@ -1846,7 +2266,7 @@ var init_ui_disclosure_entry = __esm({
1846
2266
  this.setOpen(!this.internalOpen, { reason: "action", trigger: "keyboard" });
1847
2267
  };
1848
2268
  render() {
1849
- return h(Host, { key: "3905d2d78a2d3d4ef36b582ba0f426be8e5e0f5e" }, h("slot", { key: "18547ff56457b73319264bba981f994fb947dffb" }));
2269
+ return h(Host, { key: "55a6fd71965104b96b55fd53870becce748a4116" }, h("slot", { key: "542727e10d335ff44fc7cf8250e80f045f89b8f2" }));
1850
2270
  }
1851
2271
  static get watchers() {
1852
2272
  return {
@@ -1881,7 +2301,7 @@ var init_ui_floating_action_button_entry = __esm({
1881
2301
  mobileOnly = false;
1882
2302
  label = "";
1883
2303
  render() {
1884
- return h(Host, { key: "c9a7d8c9b6d6608566b21621a73d939f372c830d", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "8eddccaf6be2f028bc02df967038843120045b84", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "0ea12efb9cb8ecec06238066827a734fb3b01e1e" })));
2304
+ return h(Host, { key: "b41f0aaabbcd23cb79ac06245e69fd8ecb9c9912", "data-disabled": this.disabled ? "" : void 0 }, h("button", { key: "36a023bd66d38845f1116874380d7a28bb46b5a2", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "412c41e4732cc230f84e7758bfc7faab7e0802e2" })));
1885
2305
  }
1886
2306
  };
1887
2307
  UIFloatingActionButton.style = uiFloatingActionButtonCss();
@@ -1909,17 +2329,61 @@ var init_ui_form_field_entry = __esm({
1909
2329
  invalid = false;
1910
2330
  disabled = false;
1911
2331
  required = false;
2332
+ observer = null;
2333
+ activeInput = null;
2334
+ ownedDescriptionIds = /* @__PURE__ */ new Set();
2335
+ wireQueued = false;
1912
2336
  componentDidLoad() {
2337
+ this.observer = new MutationObserver(this.scheduleWire);
2338
+ this.observer.observe(this.host, {
2339
+ childList: true,
2340
+ subtree: true,
2341
+ attributes: true,
2342
+ attributeFilter: ["aria-describedby", "data-slot", "id", "role"]
2343
+ });
1913
2344
  this.wire();
1914
2345
  }
1915
2346
  componentDidUpdate() {
1916
- this.wire();
2347
+ this.scheduleWire();
2348
+ }
2349
+ disconnectedCallback() {
2350
+ this.observer?.disconnect();
2351
+ this.observer = null;
2352
+ this.removeOwnedDescriptions(this.activeInput);
2353
+ this.activeInput = null;
2354
+ this.ownedDescriptionIds.clear();
2355
+ }
2356
+ descriptionIds(input) {
2357
+ return Array.from(new Set((input.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean)));
1917
2358
  }
2359
+ removeOwnedDescriptions(input) {
2360
+ if (!input || this.ownedDescriptionIds.size === 0)
2361
+ return;
2362
+ const remaining = this.descriptionIds(input).filter((id) => !this.ownedDescriptionIds.has(id));
2363
+ if (remaining.length > 0)
2364
+ input.setAttribute("aria-describedby", remaining.join(" "));
2365
+ else
2366
+ input.removeAttribute("aria-describedby");
2367
+ }
2368
+ scheduleWire = () => {
2369
+ if (this.wireQueued)
2370
+ return;
2371
+ this.wireQueued = true;
2372
+ queueMicrotask(() => {
2373
+ this.wireQueued = false;
2374
+ this.wire();
2375
+ });
2376
+ };
1918
2377
  wire() {
1919
2378
  const label = this.host.querySelector("label");
1920
2379
  const input = this.host.querySelector("input, textarea, select");
1921
2380
  const help = this.host.querySelector('[data-slot="help"]');
1922
2381
  const error = this.host.querySelector('[data-slot="error"], [role="alert"]');
2382
+ if (input !== this.activeInput) {
2383
+ this.removeOwnedDescriptions(this.activeInput);
2384
+ this.activeInput = input;
2385
+ this.ownedDescriptionIds.clear();
2386
+ }
1923
2387
  if (!input)
1924
2388
  return;
1925
2389
  if (!input.id) {
@@ -1928,6 +2392,8 @@ var init_ui_form_field_entry = __esm({
1928
2392
  if (label && !label.getAttribute("for")) {
1929
2393
  label.setAttribute("for", input.id);
1930
2394
  }
2395
+ const previousOwnedIds = this.ownedDescriptionIds;
2396
+ const externalIds = this.descriptionIds(input).filter((id) => !previousOwnedIds.has(id));
1931
2397
  const describedIds = [];
1932
2398
  if (help) {
1933
2399
  if (!help.id)
@@ -1939,15 +2405,22 @@ var init_ui_form_field_entry = __esm({
1939
2405
  error.id = createId("form-field-error");
1940
2406
  describedIds.push(error.id);
1941
2407
  }
1942
- if (describedIds.length) {
1943
- input.setAttribute("aria-describedby", describedIds.join(" "));
2408
+ const nextOwnedIds = describedIds.filter((id) => !externalIds.includes(id));
2409
+ const nextDescribedIds = Array.from(/* @__PURE__ */ new Set([...externalIds, ...describedIds]));
2410
+ const nextDescribedBy = nextDescribedIds.join(" ");
2411
+ if (input.getAttribute("aria-describedby") !== nextDescribedBy) {
2412
+ if (nextDescribedBy)
2413
+ input.setAttribute("aria-describedby", nextDescribedBy);
2414
+ else
2415
+ input.removeAttribute("aria-describedby");
1944
2416
  }
2417
+ this.ownedDescriptionIds = new Set(nextOwnedIds);
1945
2418
  input.disabled = this.disabled;
1946
2419
  input.required = this.required;
1947
2420
  input.setAttribute("aria-invalid", this.invalid ? "true" : "false");
1948
2421
  }
1949
2422
  render() {
1950
- return h(Host, { key: "cdd06c6b16ac56f3547e64e7888d8766243392db", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "7d545673a3485f8beee01b13ab56185b98ba8856" }));
2423
+ return h(Host, { key: "0b8fd5608631b5f9159fdf99d6eba918cc6587e4", "data-invalid": this.invalid ? "" : void 0, "data-disabled": this.disabled ? "" : void 0, "data-required": this.required ? "" : void 0 }, h("slot", { key: "4ed78782bcc8b6699a40d8402994b486d71d730a", onSlotchange: this.scheduleWire }));
1951
2424
  }
1952
2425
  };
1953
2426
  UIFormField.style = uiFormFieldCss();
@@ -1975,7 +2448,7 @@ var init_ui_icon_button_entry = __esm({
1975
2448
  /** Reveals this control through a surrounding ui-affordance-scope. */
1976
2449
  anticipatory = false;
1977
2450
  render() {
1978
- return h(Host, { key: "8616d7e52a03a7a42738b11f4cabed3eb38c8640", "data-disabled": this.disabled ? "" : void 0, "data-ui-affordance": this.anticipatory ? "button" : void 0 }, h("button", { key: "fae1362a50a0d80e2fcb3ab41f63ff21cf5d939a", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "e548fc504e3b26e85263fe3fc8faac0887fee16b" })));
2451
+ return h(Host, { key: "fb4534d977b4812f402855f78176b8316ebace61", "data-disabled": this.disabled ? "" : void 0, "data-ui-affordance": this.anticipatory ? "button" : void 0 }, h("button", { key: "b90d290870ad76ba18de88a6b6947a15040ff12a", type: "button", "aria-label": this.label || void 0, disabled: this.disabled }, h("slot", { key: "88ded6ad90a4cfeffcd687990e5ba8b0c7d3bd30" })));
1979
2452
  }
1980
2453
  };
1981
2454
  UIIconButton.style = uiIconButtonCss();
@@ -2065,7 +2538,7 @@ var init_ui_input_entry = __esm({
2065
2538
  });
2066
2539
  };
2067
2540
  render() {
2068
- return h(Host, { key: "a2f2c108144a7acae0dfb1bef6ea1f38a4dcca9c", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "04284765a12089a8a1045056d72551a3494f00fc", ref: (el) => this.slotRef = el }));
2541
+ return h(Host, { key: "fe125b4e8ec35e9ac0b0ca0434aa8439f515c51b", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "ec0609f9143435cf0436abb98488b9f30b71530b", ref: (el) => this.slotRef = el }));
2069
2542
  }
2070
2543
  static get watchers() {
2071
2544
  return {
@@ -2103,7 +2576,7 @@ var uiMenuItemCss, UIMenuItem;
2103
2576
  var init_ui_menu_item_entry = __esm({
2104
2577
  "dist/esm/ui-menu-item.entry.js"() {
2105
2578
  init_index_8BGiMGQ0();
2106
- uiMenuItemCss = () => `:host{display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}:host([aria-disabled='true']),:host([disabled]){opacity:0.6;cursor:not-allowed}`;
2579
+ uiMenuItemCss = () => `:host{display:block;width:100%}.menu-item__surface{display:block;box-sizing:border-box;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}:host(:hover:not([aria-disabled='true']):not([disabled])) .menu-item__surface{background:var(--ui-surface-subtle)}:host([aria-disabled='true']) .menu-item__surface,:host([disabled]) .menu-item__surface{opacity:0.6;cursor:not-allowed}`;
2107
2580
  UIMenuItem = class {
2108
2581
  constructor(hostRef) {
2109
2582
  registerInstance(this, hostRef);
@@ -2111,7 +2584,7 @@ var init_ui_menu_item_entry = __esm({
2111
2584
  disabled = false;
2112
2585
  value = "";
2113
2586
  render() {
2114
- return h(Host, { key: "ebd7c5aa5c8fdce2d2349aef7f1a4505b9190852", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("slot", { key: "7b55a8545034b055f8cbd047a0f16ea729af097e" }));
2587
+ return h(Host, { key: "f8a1721f8e516af04f901b53c3a66ce1de932608", role: "menuitem", tabIndex: this.disabled ? -1 : 0, "aria-disabled": this.disabled ? "true" : void 0, "data-value": this.value || void 0 }, h("span", { key: "6483d0b3ce1be06aed214f626b2d6a2963a44ade", class: "menu-item__surface" }, h("slot", { key: "db470b1cbb54d56a14d05c0d7f72c43e37f4263e" })));
2115
2588
  }
2116
2589
  };
2117
2590
  UIMenuItem.style = uiMenuItemCss();
@@ -2129,8 +2602,9 @@ var init_ui_menu_entry = __esm({
2129
2602
  init_index_8BGiMGQ0();
2130
2603
  init_events_JwSoedEO();
2131
2604
  init_manager_C_0syqXZ();
2605
+ init_controlled_state_BnGhGgTH();
2132
2606
  init_positioning_Bu0dmLBE();
2133
- uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));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}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%;padding:var(--ui-space-2) var(--ui-space-3);text-align:left;background:none;border:none;border-radius:var(--ui-radius-2);color:var(--ui-text-primary);font-size:var(--ui-font-size-md);font-weight:var(--ui-font-medium, 500);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), color var(--ui-motion-fast) var(--ui-motion-ease)}::slotted(ui-menu-item:hover:not([aria-disabled='true']):not([disabled])){background:var(--ui-surface-subtle)}::slotted(ui-menu-item[aria-disabled='true']),::slotted(ui-menu-item[disabled]){opacity:0.6;cursor:not-allowed}`;
2607
+ uiMenuCss = () => `:host{--ui-menu-viewport-gap:var(--ui-space-2, 0.5rem);display:flex;flex-direction:column;box-sizing:border-box;inline-size:max-content;min-inline-size:min(12rem, calc(100vw - (var(--ui-menu-viewport-gap) * 2)));max-inline-size:calc(100vw - (var(--ui-menu-viewport-gap) * 2));padding:0;border:0;border-radius:0;background:transparent;box-shadow:var(--ui-shadow-lg)}.menu__surface{display:flex;flex-direction:column;box-sizing:border-box;padding:var(--ui-space-1);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;overflow:auto;max-block-size:calc(100dvh - (var(--ui-menu-viewport-gap) * 2));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}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}::slotted(ui-menu-item){display:block;width:100%}`;
2134
2608
  UIMenu = class {
2135
2609
  constructor(hostRef) {
2136
2610
  registerInstance(this, hostRef);
@@ -2138,7 +2612,8 @@ var init_ui_menu_entry = __esm({
2138
2612
  get host() {
2139
2613
  return getElement(this);
2140
2614
  }
2141
- open = false;
2615
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
2616
+ open;
2142
2617
  defaultOpen = false;
2143
2618
  /** Id of the control that anchors this menu in the top layer. */
2144
2619
  for;
@@ -2149,7 +2624,8 @@ var init_ui_menu_entry = __esm({
2149
2624
  anchor = null;
2150
2625
  surface = null;
2151
2626
  syncFromProp() {
2152
- this.internalOpen = this.open;
2627
+ if (isControlled(this.open))
2628
+ this.internalOpen = this.open;
2153
2629
  }
2154
2630
  resetSurface() {
2155
2631
  this.setupSurface();
@@ -2175,8 +2651,7 @@ var init_ui_menu_entry = __esm({
2175
2651
  }
2176
2652
  }
2177
2653
  componentDidLoad() {
2178
- this.syncFromProp();
2179
- this.internalOpen = this.internalOpen || this.defaultOpen;
2654
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
2180
2655
  this.host.addEventListener("click", this.onItemClick);
2181
2656
  this.host.addEventListener("keydown", this.onKeydown);
2182
2657
  this.setupSurface();
@@ -2209,7 +2684,8 @@ var init_ui_menu_entry = __esm({
2209
2684
  closeMenu(reason, trigger) {
2210
2685
  if (!this.internalOpen)
2211
2686
  return;
2212
- this.internalOpen = false;
2687
+ if (!isControlled(this.open))
2688
+ this.internalOpen = false;
2213
2689
  dispatchDetail(this.host, "close", {
2214
2690
  open: false,
2215
2691
  reason,
@@ -2237,7 +2713,8 @@ var init_ui_menu_entry = __esm({
2237
2713
  reason: "action",
2238
2714
  trigger: eventToTrigger(e)
2239
2715
  });
2240
- this.internalOpen = false;
2716
+ if (!isControlled(this.open))
2717
+ this.internalOpen = false;
2241
2718
  };
2242
2719
  onKeydown = (e) => {
2243
2720
  if (e.key === "Escape") {
@@ -2260,7 +2737,8 @@ var init_ui_menu_entry = __esm({
2260
2737
  reason: "action",
2261
2738
  trigger: "keyboard"
2262
2739
  });
2263
- this.internalOpen = false;
2740
+ if (!isControlled(this.open))
2741
+ this.internalOpen = false;
2264
2742
  }
2265
2743
  return;
2266
2744
  }
@@ -2271,7 +2749,7 @@ var init_ui_menu_entry = __esm({
2271
2749
  }
2272
2750
  };
2273
2751
  render() {
2274
- return h(Host, { key: "25ae79e914820dfc470fa03d8c843646c3c060d9", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "b3a8b130e55610d948bc3e4603dede59dd560d05" }));
2752
+ return h(Host, { key: "c5af7acaf41b75165e9f7cf47d65b7a1dcd4d1c0", role: "menu", "aria-orientation": "vertical", "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "058fff9a00a1dcba26f6db425096e7a96d889896", class: "menu__surface" }, h("slot", { key: "dbbf9eb4ba2a348b6d85049e229ed0562ee17318" })));
2275
2753
  }
2276
2754
  static get watchers() {
2277
2755
  return {
@@ -2305,8 +2783,9 @@ var init_ui_popover_entry = __esm({
2305
2783
  init_index_8BGiMGQ0();
2306
2784
  init_manager_C_0syqXZ();
2307
2785
  init_events_JwSoedEO();
2786
+ init_controlled_state_BnGhGgTH();
2308
2787
  init_positioning_Bu0dmLBE();
2309
- uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3);box-shadow:var(--ui-shadow-lg);max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;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}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}`;
2788
+ uiPopoverCss = () => `:host{--ui-popover-viewport-gap:var(--ui-space-2, 0.5rem);box-sizing:border-box;max-inline-size:min( 20rem, calc(100vw - (var(--ui-popover-viewport-gap) * 2)) );max-block-size:calc(100dvh - (var(--ui-popover-viewport-gap) * 2));overflow:auto;padding:0;border:0;border-radius:0;background:transparent;box-shadow:var(--ui-shadow-lg)}.popover__surface{box-sizing:border-box;padding:var(--ui-space-3);background:var(--ui-surface-elevated);border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-3)}:host(:not([data-open])){display:none}:host([popover]){position:fixed;inset:auto;margin:0;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}:host([popover]:popover-open){opacity:1;transform:translateY(0) scale(1)}@starting-style{:host([popover]:popover-open){opacity:0;transform:translateY(-4px) scale(0.99)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host([popover]){transition:none}}`;
2310
2789
  UIPopover = class {
2311
2790
  constructor(hostRef) {
2312
2791
  registerInstance(this, hostRef);
@@ -2314,7 +2793,8 @@ var init_ui_popover_entry = __esm({
2314
2793
  get host() {
2315
2794
  return getElement(this);
2316
2795
  }
2317
- open = false;
2796
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
2797
+ open;
2318
2798
  defaultOpen = false;
2319
2799
  /** Optional id of the element this popover follows in the top layer. */
2320
2800
  for;
@@ -2324,7 +2804,8 @@ var init_ui_popover_entry = __esm({
2324
2804
  anchor = null;
2325
2805
  surface = null;
2326
2806
  syncFromProp() {
2327
- this.internalOpen = this.open;
2807
+ if (isControlled(this.open))
2808
+ this.internalOpen = this.open;
2328
2809
  }
2329
2810
  onOpenChange() {
2330
2811
  this.syncOverlay();
@@ -2381,8 +2862,7 @@ var init_ui_popover_entry = __esm({
2381
2862
  }
2382
2863
  }
2383
2864
  componentDidLoad() {
2384
- this.syncFromProp();
2385
- this.internalOpen = this.internalOpen || this.defaultOpen;
2865
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
2386
2866
  this.host.addEventListener("keydown", this.onKeydown);
2387
2867
  this.setupSurface();
2388
2868
  this.syncOverlay();
@@ -2397,7 +2877,8 @@ var init_ui_popover_entry = __esm({
2397
2877
  this.syncOverlay();
2398
2878
  }
2399
2879
  handleRequestClose(reason, trigger) {
2400
- this.internalOpen = false;
2880
+ if (!isControlled(this.open))
2881
+ this.internalOpen = false;
2401
2882
  dispatchDetail(this.host, "close", {
2402
2883
  open: false,
2403
2884
  reason,
@@ -2410,7 +2891,7 @@ var init_ui_popover_entry = __esm({
2410
2891
  }
2411
2892
  };
2412
2893
  render() {
2413
- return h(Host, { key: "cd957cb9fd5d1c05da7729a16d4cb229bc1deffa", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("slot", { key: "d14960a1471948120f7173e18adae8d86e4fabb7" }));
2894
+ return h(Host, { key: "6a38873f2e4d085f733fa116057b1f55418e23ed", "data-open": this.internalOpen ? "" : void 0, onKeyDown: this.onKeydown }, h("div", { key: "6fef6e37921e8c52994617719f1ebb6d9bd54ee2", class: "popover__surface" }, h("slot", { key: "5ee4269592219035a3185f8f06fd71ecb12e4e71" })));
2414
2895
  }
2415
2896
  static get watchers() {
2416
2897
  return {
@@ -2547,7 +3028,7 @@ var init_ui_radio_group_entry = __esm({
2547
3028
  }
2548
3029
  };
2549
3030
  render() {
2550
- return h(Host, { key: "e80e01600d499d1b8e3410060433dac2bb8cf38a", role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "e60dcfa1b174b1a4c9092567e6ec4d9f5bcd9ffe" }));
3031
+ return h(Host, { key: "28c6eb6cc9520b570f40d2193d0c64a7a6c7db01", role: "radiogroup", "aria-orientation": this.orientation, "data-orientation": this.orientation, "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "97814378181be78bfac6090ff173459e1f539728" }));
2551
3032
  }
2552
3033
  static get watchers() {
2553
3034
  return {
@@ -2583,6 +3064,7 @@ var init_ui_radio_entry = __esm({
2583
3064
  "dist/esm/ui-radio.entry.js"() {
2584
3065
  init_index_8BGiMGQ0();
2585
3066
  init_events_JwSoedEO();
3067
+ init_controlled_state_BnGhGgTH();
2586
3068
  uiRadioCss = () => `:host{display:inline-flex;align-items:center;gap:var(--ui-space-2);color:var(--ui-text-primary)}:host([data-disabled='true']),:host([aria-disabled='true']){opacity:0.6;cursor:not-allowed}::slotted(input[type='radio']){accent-color:var(--ui-accent-solid);cursor:pointer}::slotted(input[type='radio']:focus-visible){outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
2587
3069
  UIRadio = class {
2588
3070
  constructor(hostRef) {
@@ -2591,28 +3073,32 @@ var init_ui_radio_entry = __esm({
2591
3073
  get host() {
2592
3074
  return getElement(this);
2593
3075
  }
2594
- checked = false;
3076
+ /** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
3077
+ checked;
2595
3078
  defaultChecked = false;
2596
3079
  disabled = false;
2597
3080
  name = "";
2598
3081
  required = false;
2599
3082
  value = "on";
3083
+ internalChecked = false;
2600
3084
  slotRef;
3085
+ syncFromProp() {
3086
+ if (isControlled(this.checked))
3087
+ this.internalChecked = this.checked;
3088
+ }
2601
3089
  syncToInput() {
2602
3090
  const input = this.getInput();
2603
3091
  if (!input)
2604
3092
  return;
2605
3093
  this.host.toggleAttribute("data-disabled", this.disabled);
2606
- input.checked = this.checked;
3094
+ input.checked = this.internalChecked;
2607
3095
  input.disabled = this.disabled;
2608
3096
  input.name = this.name;
2609
3097
  input.required = this.required;
2610
3098
  input.value = this.value;
2611
3099
  }
2612
3100
  componentDidLoad() {
2613
- if (!this.checked && this.defaultChecked) {
2614
- this.checked = true;
2615
- }
3101
+ this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
2616
3102
  this.slotRef?.addEventListener("slotchange", () => this.syncToInput());
2617
3103
  this.syncToInput();
2618
3104
  const input = this.getInput();
@@ -2634,6 +3120,10 @@ var init_ui_radio_entry = __esm({
2634
3120
  const input = e.target;
2635
3121
  if (!input || !input.checked)
2636
3122
  return;
3123
+ if (!isControlled(this.checked))
3124
+ this.internalChecked = true;
3125
+ else
3126
+ this.syncToInput();
2637
3127
  dispatchDetail(this.host, "change", {
2638
3128
  checked: true,
2639
3129
  value: this.value,
@@ -2641,12 +3131,12 @@ var init_ui_radio_entry = __esm({
2641
3131
  });
2642
3132
  };
2643
3133
  render() {
2644
- return h(Host, { key: "898869b84429366e43c075723e884f34da6fc6df", role: "radio", "aria-checked": String(this.checked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "3f3b881175f25d439807ec9f8f0dd59a1acd6a90", ref: (el) => this.slotRef = el }));
3134
+ return h(Host, { key: "a5220e72dbf1b55ca73a3e6234f31c99d806433a", role: "radio", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0 }, h("slot", { key: "687e94b2036107c807e0319c3620bca7c06cbb26", ref: (el) => this.slotRef = el }));
2645
3135
  }
2646
3136
  static get watchers() {
2647
3137
  return {
2648
3138
  "checked": [{
2649
- "syncToInput": 0
3139
+ "syncFromProp": 0
2650
3140
  }],
2651
3141
  "disabled": [{
2652
3142
  "syncToInput": 0
@@ -2712,7 +3202,7 @@ var init_ui_search_result_row_entry = __esm({
2712
3202
  this.hasTrailing = slotHasContent(this.trailingSlot);
2713
3203
  };
2714
3204
  render() {
2715
- return h(Host, { key: "8ef897782b50f1ecb129a51a25631d3d2bafe1e3" }, h("button", { key: "5b4fb4ac4968551a191e80bde7b991391d931220", class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: "5f5988d87bcf754d8a521e19e0e2a490dd868bd2", class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: "a7671c75c28d71ab843dcbb1fcdd9f4d0e0f7361", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "4ed60057e10ade9d7771812ad28aa25a017d34d8", class: "search-result-row__content", part: "content" }, h("span", { key: "37fa74ef4980ffd0b576ff824532d1267420461c", class: "search-result-row__title", part: "title" }, h("slot", { key: "187df950b39702723fa456b09e220e2b7587f00a", name: "title" })), h("span", { key: "6d2476c57d7c9c7530c3796a723f47f5f4859d71", class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: "d53329dd6865bbda005b0d25a2b9bc7b7a597452", name: "meta", ref: (el) => this.metaSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "8846c9669c0f65a739b770f41a93ddd4bef3f6bd", class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: "b63f70371538901aaff481a9e524bf817883cee6", name: "excerpt", ref: (el) => this.excerptSlot = el, onSlotchange: this.syncSlots }))), h("span", { key: "1e8f94c3d83c3f649595c2843522b0973590a8d5", class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: "cfba9301ad97c1130a01f78c16052fc26e249f4b", name: "trailing", ref: (el) => this.trailingSlot = el, onSlotchange: this.syncSlots }))));
3205
+ return h(Host, { key: "01e795d1c723c4e56f5648c429b40fc7841ff9b5" }, h("button", { key: "7bdde5075c5a3112d14741aa87937e69a8f5fea9", class: "search-result-row", type: "button", disabled: this.disabled, part: "button" }, h("span", { key: "39ba47af68a23875eebdbdf8f87ca7d94d42ec43", class: "search-result-row__leading", part: "leading", hidden: !this.hasLeading }, h("slot", { key: "f108b1c5d284057d5979bf4897f056543a1ff092", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "0daeb171b7010f37d959c91f2a87c1ae7e96a56f", class: "search-result-row__content", part: "content" }, h("span", { key: "d7ec1b67a15fa9c79ea0fd23db73bd7bca40a8ce", class: "search-result-row__title", part: "title" }, h("slot", { key: "8c4a45511580a655e0593c8c57fd98838f2cb896", name: "title" })), h("span", { key: "0d30a58a7079ea0c8992c9b0b02b516a65350425", class: "search-result-row__meta", part: "meta", hidden: !this.hasMeta }, h("slot", { key: "8de66e3b6adf89ed765ccc1c341ccac1b5513a6f", name: "meta", ref: (el) => this.metaSlot = el, onSlotchange: this.syncSlots })), h("span", { key: "7c24542b9bb634a55530952c329242a351e813c3", class: "search-result-row__excerpt", part: "excerpt", hidden: !this.hasExcerpt }, h("slot", { key: "a5bfc4fd17b8535aa996e792498b33f25dd30ecd", name: "excerpt", ref: (el) => this.excerptSlot = el, onSlotchange: this.syncSlots }))), h("span", { key: "25c74d8508a0b3b527ef5529a02e54e407cae5ae", class: "search-result-row__trailing", part: "trailing", hidden: !this.hasTrailing }, h("slot", { key: "cba6f957de902b9ed3dc05c8b20794c9b69c85c6", name: "trailing", ref: (el) => this.trailingSlot = el, onSlotchange: this.syncSlots }))));
2716
3206
  }
2717
3207
  };
2718
3208
  UISearchResultRow.style = uiSearchResultRowCss();
@@ -2756,7 +3246,7 @@ var init_ui_search_shell_entry = __esm({
2756
3246
  this.hasFooter = slotHasContent2(this.footerSlot);
2757
3247
  };
2758
3248
  render() {
2759
- return h("div", { key: "2a09e1ee81d04c0af5420887a9fa0dfb8057040c", class: "search-shell", part: "base" }, h("slot", { key: "9124af2e3e73b686a73b11c7fe8c9d40986e98c1", name: "backdrop" }), h("div", { key: "cec39a8cbbfe99b7bbeb37ce32655a88cee2bec3", class: "search-shell__panel", part: "panel" }, h("div", { key: "8168eda720e031daf350800ac48dcf445be0c417", class: "search-shell__search", part: "search" }, h("slot", { key: "b220c9670a6a53cd93fa434dc97dc9d2582bec08", name: "search" })), h("div", { key: "24386da67dd8ab5e865519e5b0b70fe9c8924010", class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: "7a0dfada13aca3275961667dadc9623729fbf644", name: "status", ref: (el) => this.statusSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "e06b7da6219c7a71d69662c5bdcc24e6baa52aa9", class: "search-shell__body", part: "body" }, h("slot", { key: "fabdea16cf443b57a826fc748b24342ff214b918", name: "body" })), h("div", { key: "d38662a77f19fd59315b1882cda0a55680cc5a0b", class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: "56eb386e22ae033939cdbdf3c6b6edf68594ceb5", name: "footer", ref: (el) => this.footerSlot = el, onSlotchange: this.syncSlots }))));
3249
+ return h("div", { key: "c3a4366e1f22b249233e42fdc83f1620613cce52", class: "search-shell", part: "base" }, h("slot", { key: "4f22e4a44fe7ae190a80a6e5cd695c15eb4f029d", name: "backdrop" }), h("div", { key: "bf452dae29f0ab31266d848a4dd4b794997b34a7", class: "search-shell__panel", part: "panel" }, h("div", { key: "c0ef7d1d8ea95853404d39ddac1bff566d38d18e", class: "search-shell__search", part: "search" }, h("slot", { key: "462532250d8ba36aad1d31fe10da642d79e59faf", name: "search" })), h("div", { key: "4f7d91272d15f6e37df6fba4ae563efae5701b93", class: "search-shell__status", part: "status", hidden: !this.hasStatus }, h("slot", { key: "d761691c1dd2c3012075163bb7eb9ce7e5bf3ef4", name: "status", ref: (el) => this.statusSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "1427a10b3f43ea31c2a482beb17f78d70b5fb2cf", class: "search-shell__body", part: "body" }, h("slot", { key: "6d6e8c2b4ee4833b5476795d4c7e184dda07f81e", name: "body" })), h("div", { key: "8f7d36040f7d21489c703b53581e392a2616963b", class: "search-shell__footer", part: "footer", hidden: !this.hasFooter }, h("slot", { key: "08b84f01091d95895ee8693e9b322511bf614342", name: "footer", ref: (el) => this.footerSlot = el, onSlotchange: this.syncSlots }))));
2760
3250
  }
2761
3251
  };
2762
3252
  UISearchShell.style = uiSearchShellCss();
@@ -2849,7 +3339,7 @@ var init_ui_select_entry = __esm({
2849
3339
  });
2850
3340
  };
2851
3341
  render() {
2852
- return h(Host, { key: "5ac54353f467b70e94fce0ae661dc86c305befe7", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "1386f3e4912720ab597f4567112e9c8b4166bcc6", ref: (el) => this.slotRef = el }));
3342
+ return h(Host, { key: "9a83a040bbad98355999c8099a78c6eba3ffc995", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "4a70aa44651132899e283e45c32213cf3f00be24", ref: (el) => this.slotRef = el }));
2853
3343
  }
2854
3344
  static get watchers() {
2855
3345
  return {
@@ -2888,6 +3378,7 @@ var init_ui_switch_entry = __esm({
2888
3378
  "dist/esm/ui-switch.entry.js"() {
2889
3379
  init_index_8BGiMGQ0();
2890
3380
  init_events_JwSoedEO();
3381
+ init_controlled_state_BnGhGgTH();
2891
3382
  uiSwitchCss = () => `: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}:host([role='switch']){cursor:pointer}:host input[type='checkbox']{appearance:none;-webkit-appearance:none;display:block;position:relative;width:2.25rem;height:1.25rem;padding:0;border:1px solid var(--ui-border-default);border-radius:999px;background:var(--ui-surface-muted);cursor:pointer;transition:background-color var(--ui-motion-fast) var(--ui-motion-ease), border-color var(--ui-motion-fast) var(--ui-motion-ease);margin:0}:host input[type='checkbox']::after{content:'';position:absolute;top:2px;left:2px;width:0.875rem;height:0.875rem;border-radius:999px;background:var(--ui-surface-default);border:1px solid var(--ui-border-default);transition:transform var(--ui-motion-fast) var(--ui-motion-ease)}:host input[type='checkbox']:checked{background:var(--ui-accent-solid);border-color:var(--ui-accent-solid)}:host input[type='checkbox']:checked::after{transform:translateX(calc(2.25rem - 0.875rem - 4px));background:var(--ui-text-on-accent);border-color:var(--ui-text-on-accent)}:host input[type='checkbox']:focus-visible{outline:2px solid var(--ui-accent-solid);outline-offset:2px}`;
2892
3383
  UISwitch = class {
2893
3384
  constructor(hostRef) {
@@ -2896,25 +3387,28 @@ var init_ui_switch_entry = __esm({
2896
3387
  get host() {
2897
3388
  return getElement(this);
2898
3389
  }
2899
- checked = false;
3390
+ /** Controlled checked state. Omit it to use defaultChecked and local interaction state. */
3391
+ checked;
2900
3392
  defaultChecked = false;
2901
3393
  disabled = false;
2902
3394
  required = false;
2903
3395
  value = "on";
2904
3396
  internalChecked = false;
2905
3397
  syncFromProp() {
2906
- this.internalChecked = this.checked;
3398
+ if (isControlled(this.checked))
3399
+ this.internalChecked = this.checked;
2907
3400
  }
2908
3401
  componentDidLoad() {
2909
- this.syncFromProp();
2910
- this.internalChecked = this.internalChecked || this.defaultChecked;
3402
+ this.internalChecked = controlledOrDefault(this.checked, this.defaultChecked);
2911
3403
  }
2912
3404
  toggle = (trigger) => {
2913
3405
  if (this.disabled)
2914
3406
  return;
2915
- this.internalChecked = !this.internalChecked;
3407
+ const checked = !this.internalChecked;
3408
+ if (!isControlled(this.checked))
3409
+ this.internalChecked = checked;
2916
3410
  dispatchDetail(this.host, "change", {
2917
- checked: this.internalChecked,
3411
+ checked,
2918
3412
  value: this.value,
2919
3413
  trigger
2920
3414
  });
@@ -2931,14 +3425,19 @@ var init_ui_switch_entry = __esm({
2931
3425
  this.toggle("pointer");
2932
3426
  };
2933
3427
  render() {
2934
- return h(Host, { key: "14205d2856f8fb49b72d69d40f10ac1473a80c04", role: "switch", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.onKeydown, onClick: this.onClick }, h("input", { key: "974f8e487c8bf9196c05420e1817139dd6b4138c", type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
2935
- this.internalChecked = e.target.checked;
3428
+ return h(Host, { key: "e11500e37da6a52c0cb4e143254363f85911aac1", role: "switch", "aria-checked": String(this.internalChecked), "aria-disabled": String(this.disabled), "data-disabled": this.disabled ? "" : void 0, tabIndex: this.disabled ? -1 : 0, onKeyDown: this.onKeydown, onClick: this.onClick }, h("input", { key: "777310a90b66f67e6a8eb0f77da5274e32f10db0", type: "checkbox", checked: this.internalChecked, disabled: this.disabled, required: this.required, value: this.value, "aria-hidden": "true", tabIndex: -1, onChange: (e) => {
3429
+ const input = e.target;
3430
+ const checked = input.checked;
3431
+ if (!isControlled(this.checked))
3432
+ this.internalChecked = checked;
2936
3433
  dispatchDetail(this.host, "change", {
2937
- checked: this.internalChecked,
3434
+ checked,
2938
3435
  value: this.value,
2939
3436
  trigger: "pointer"
2940
3437
  });
2941
- } }), h("slot", { key: "d1cd89aa2d5312cff8845364cdee64821977cb44" }));
3438
+ if (isControlled(this.checked))
3439
+ input.checked = this.internalChecked;
3440
+ } }), h("slot", { key: "7d72db5b720c0af0c4561b485ca558de61e1ce6e" }));
2942
3441
  }
2943
3442
  static get watchers() {
2944
3443
  return {
@@ -2962,6 +3461,7 @@ var init_ui_tabs_entry = __esm({
2962
3461
  "dist/esm/ui-tabs.entry.js"() {
2963
3462
  init_index_8BGiMGQ0();
2964
3463
  init_events_JwSoedEO();
3464
+ init_controlled_state_BnGhGgTH();
2965
3465
  uiTabsCss = () => `:host{display:flex;flex-direction:column;gap:0}:host([data-orientation='vertical']){flex-direction:row}::slotted([role='tablist']){display:flex;gap:0;max-inline-size:100%;overflow-x:auto;overscroll-behavior-inline:contain;border-bottom:1px solid var(--ui-border-default)}:host([data-orientation='vertical']) ::slotted([role='tablist']){flex-direction:column;border-bottom:none;border-inline-end:1px solid var(--ui-border-default)}::slotted(button[role='tab']),::slotted([role='tab']),::slotted(ui-button) button[role='tab']{padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);font-weight:var(--ui-font-medium, 500);color:var(--ui-text-secondary);background:none;border:none;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color var(--ui-motion-fast) var(--ui-motion-ease);box-shadow:none}::slotted(button[role='tab']:hover),::slotted([role='tab']:hover){color:var(--ui-text-primary)}::slotted(button[role='tab'][aria-selected='true']),::slotted([role='tab'][aria-selected='true']){color:var(--ui-accent-solid);border-bottom-color:var(--ui-accent-solid)}:host([data-orientation='vertical']) ::slotted(button[role='tab']),:host([data-orientation='vertical']) ::slotted([role='tab']){border-bottom:none;border-inline-end:2px solid transparent;margin-bottom:0;margin-inline-end:-1px}:host([data-orientation='vertical']) ::slotted(button[role='tab'][aria-selected='true']),:host([data-orientation='vertical']) ::slotted([role='tab'][aria-selected='true']){border-inline-end-color:var(--ui-accent-solid)}::slotted([role='tabpanel']){padding:var(--ui-space-4)}`;
2966
3466
  UITabs = class {
2967
3467
  constructor(hostRef) {
@@ -2970,12 +3470,14 @@ var init_ui_tabs_entry = __esm({
2970
3470
  get host() {
2971
3471
  return getElement(this);
2972
3472
  }
2973
- value = "";
3473
+ /** Controlled selected tab value. Omit it to use defaultValue and local interaction state. */
3474
+ value;
2974
3475
  defaultValue = "";
2975
3476
  orientation = "horizontal";
2976
3477
  internalValue = "";
2977
3478
  syncFromProp() {
2978
- this.internalValue = this.value;
3479
+ if (isControlled(this.value))
3480
+ this.internalValue = this.value;
2979
3481
  }
2980
3482
  syncState() {
2981
3483
  const tabs = this.getTabs();
@@ -2996,11 +3498,8 @@ var init_ui_tabs_entry = __esm({
2996
3498
  });
2997
3499
  }
2998
3500
  componentDidLoad() {
2999
- this.syncFromProp();
3000
- if (!this.internalValue && this.defaultValue) {
3001
- this.internalValue = this.defaultValue;
3002
- }
3003
- if (!this.internalValue) {
3501
+ this.internalValue = controlledOrDefault(this.value, this.defaultValue);
3502
+ if (!isControlled(this.value) && !this.internalValue) {
3004
3503
  const tabs = this.getTabs();
3005
3504
  if (tabs.length > 0) {
3006
3505
  this.internalValue = tabs[0]?.id ?? tabs[0]?.getAttribute("aria-controls") ?? "";
@@ -3025,7 +3524,8 @@ var init_ui_tabs_entry = __esm({
3025
3524
  if (!newValue)
3026
3525
  return;
3027
3526
  const prev = this.internalValue;
3028
- this.internalValue = newValue;
3527
+ if (!isControlled(this.value))
3528
+ this.internalValue = newValue;
3029
3529
  this.syncState();
3030
3530
  dispatchDetail(this.host, "select", { value: newValue, previousValue: prev || void 0, trigger });
3031
3531
  }
@@ -3054,7 +3554,7 @@ var init_ui_tabs_entry = __esm({
3054
3554
  }
3055
3555
  };
3056
3556
  render() {
3057
- return h(Host, { key: "ca8671f06914de2bd6b412caf11e385d67ae722b", orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: "49beb3783c8f6a330d25164c82933c2bf6345b1e" }));
3557
+ return h(Host, { key: "8681e699c6afdbafd59ed986b8bf3c815b32cd1c", orientation: this.orientation, "data-orientation": this.orientation }, h("slot", { key: "673f4db2ae0aded3bd40934c1fff518cf6f83837" }));
3058
3558
  }
3059
3559
  static get watchers() {
3060
3560
  return {
@@ -3159,7 +3659,7 @@ var init_ui_textarea_entry = __esm({
3159
3659
  });
3160
3660
  };
3161
3661
  render() {
3162
- return h(Host, { key: "9ccc0464bca55b3364645ea90df3890f9ed9d697", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "81c4df31064d4dcd2b2e27dfcf3141cc9f18f54e", ref: (el) => this.slotRef = el }));
3662
+ return h(Host, { key: "6ce80349ca316f7a44d08e83862125f6b4d736a6", "data-invalid": this.invalid ? "" : void 0 }, h("slot", { key: "2c1ce87c9019d8346673ae5e7dd8a543d1bcb91c", ref: (el) => this.slotRef = el }));
3163
3663
  }
3164
3664
  static get watchers() {
3165
3665
  return {
@@ -3211,10 +3711,12 @@ var init_ui_toast_region_entry = __esm({
3211
3711
  return getElement(this);
3212
3712
  }
3213
3713
  open = true;
3214
- internalOpen = true;
3714
+ internalOpen = false;
3215
3715
  surface = null;
3716
+ contentObserver = null;
3717
+ pendingDismiss = null;
3216
3718
  syncFromProp() {
3217
- this.internalOpen = this.open;
3719
+ this.syncContents();
3218
3720
  }
3219
3721
  syncSurface() {
3220
3722
  if (this.internalOpen)
@@ -3224,22 +3726,37 @@ var init_ui_toast_region_entry = __esm({
3224
3726
  }
3225
3727
  componentDidLoad() {
3226
3728
  this.surface = createViewportSurface(this.host);
3227
- this.syncFromProp();
3729
+ this.contentObserver = new MutationObserver(this.syncContents);
3730
+ this.contentObserver.observe(this.host, { childList: true, subtree: true });
3731
+ this.syncContents();
3228
3732
  this.syncSurface();
3229
3733
  this.host.addEventListener("click", this.onClick);
3230
3734
  }
3231
3735
  disconnectedCallback() {
3232
3736
  this.host.removeEventListener("click", this.onClick);
3737
+ this.contentObserver?.disconnect();
3738
+ this.contentObserver = null;
3233
3739
  this.surface?.destroy();
3234
3740
  this.surface = null;
3235
3741
  }
3236
3742
  getToasts() {
3237
3743
  return Array.from(this.host.querySelectorAll("[data-ui-toast]"));
3238
3744
  }
3239
- updateOpenState() {
3240
- const toasts = this.getToasts();
3241
- this.internalOpen = toasts.length > 0;
3242
- }
3745
+ syncContents = () => {
3746
+ const nextOpen = this.open && this.getToasts().length > 0;
3747
+ const wasOpen = this.internalOpen;
3748
+ const completedDismiss = this.pendingDismiss && !this.host.contains(this.pendingDismiss.toast) ? this.pendingDismiss : null;
3749
+ this.internalOpen = nextOpen;
3750
+ if (wasOpen && !nextOpen && completedDismiss) {
3751
+ dispatchDetail(this.host, "close", {
3752
+ open: false,
3753
+ reason: "action",
3754
+ trigger: completedDismiss.trigger
3755
+ });
3756
+ }
3757
+ if (completedDismiss || !this.open)
3758
+ this.pendingDismiss = null;
3759
+ };
3243
3760
  onClick = (e) => {
3244
3761
  const dismissBtn = e.target.closest?.("[data-ui-toast-dismiss]");
3245
3762
  if (!dismissBtn)
@@ -3248,24 +3765,16 @@ var init_ui_toast_region_entry = __esm({
3248
3765
  if (!toast)
3249
3766
  return;
3250
3767
  const id = toast.id ?? "";
3251
- toast.setAttribute("aria-hidden", "true");
3252
- toast.remove();
3768
+ const trigger = eventToTrigger(e);
3769
+ this.pendingDismiss = { toast, trigger };
3253
3770
  dispatchDetail(this.host, "dismiss", {
3254
3771
  id,
3255
3772
  reason: "action",
3256
- trigger: eventToTrigger(e)
3773
+ trigger
3257
3774
  });
3258
- this.updateOpenState();
3259
- if (this.getToasts().length === 0) {
3260
- dispatchDetail(this.host, "close", {
3261
- open: false,
3262
- reason: "action",
3263
- trigger: eventToTrigger(e)
3264
- });
3265
- }
3266
3775
  };
3267
3776
  render() {
3268
- return h(Host, { key: "9ec1cc51ecc4e7a256be5d89a09a10788e46db53", role: "region", "aria-label": "Notifications", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "7b08656f3745a02f8e9f0935e47d6f2cffd88f9b" }));
3777
+ return h(Host, { key: "b4430aceacb7a66202c6a43ad7b0bbe31c51eb94", role: "region", "aria-label": "Notifications", "aria-live": "polite", "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "8bfb02d38366fab29a1668a53b7834ccd1a9aa65" }));
3269
3778
  }
3270
3779
  static get watchers() {
3271
3780
  return {
@@ -3293,8 +3802,9 @@ var init_ui_tooltip_entry = __esm({
3293
3802
  init_index_8BGiMGQ0();
3294
3803
  init_manager_C_0syqXZ();
3295
3804
  init_events_JwSoedEO();
3805
+ init_controlled_state_BnGhGgTH();
3296
3806
  init_positioning_Bu0dmLBE();
3297
- uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md);opacity:0;transform:translateY(4px);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}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}`;
3807
+ uiTooltipCss = () => `:host{position:fixed;inset:auto;margin:0;display:inline-block;box-sizing:border-box;padding:0;border:0;border-radius:0;background:transparent;opacity:0;transform:translateY(4px);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}.tooltip__surface{box-sizing:border-box;border:1px solid var(--ui-border-default);border-radius:var(--ui-radius-2);background:var(--ui-surface-elevated);color:var(--ui-text-primary);padding:var(--ui-space-2) var(--ui-space-3);font-size:var(--ui-font-size-sm);box-shadow:var(--ui-shadow-md)}:host(:popover-open){opacity:1;transform:translateY(0)}@starting-style{:host(:popover-open){opacity:0;transform:translateY(4px)}}:host([hidden]){display:none !important}@media (prefers-reduced-motion: reduce){:host{transition:none}}`;
3298
3808
  UITooltip = class {
3299
3809
  constructor(hostRef) {
3300
3810
  registerInstance(this, hostRef);
@@ -3305,7 +3815,8 @@ var init_ui_tooltip_entry = __esm({
3305
3815
  return getElement(this);
3306
3816
  }
3307
3817
  for = "";
3308
- open = false;
3818
+ /** Controlled open state. Omit it to use defaultOpen and local interaction state. */
3819
+ open;
3309
3820
  defaultOpen = false;
3310
3821
  placement = "top-start";
3311
3822
  /** Pointer hover intent delay in milliseconds. Keyboard focus is immediate. */
@@ -3326,7 +3837,8 @@ var init_ui_tooltip_entry = __esm({
3326
3837
  hideTimer = null;
3327
3838
  syncFromProp() {
3328
3839
  this.clearTimers();
3329
- this.internalOpen = this.open;
3840
+ if (isControlled(this.open))
3841
+ this.internalOpen = this.open;
3330
3842
  }
3331
3843
  resetSurface() {
3332
3844
  this.syncTrigger();
@@ -3352,8 +3864,7 @@ var init_ui_tooltip_entry = __esm({
3352
3864
  componentDidLoad() {
3353
3865
  if (!this.host.id)
3354
3866
  this.host.id = this.overlayId;
3355
- this.syncFromProp();
3356
- this.internalOpen = this.internalOpen || this.defaultOpen;
3867
+ this.internalOpen = controlledOrDefault(this.open, this.defaultOpen);
3357
3868
  this.syncTrigger();
3358
3869
  this.setupSurface();
3359
3870
  this.host.addEventListener("pointerenter", this.onSurfaceEnter);
@@ -3406,460 +3917,188 @@ var init_ui_tooltip_entry = __esm({
3406
3917
  if (!this.trigger)
3407
3918
  return;
3408
3919
  const ids = (this.trigger.getAttribute("aria-describedby") || "").split(/\s+/).filter((id) => id && id !== this.host.id);
3409
- if (ids.length)
3410
- this.trigger.setAttribute("aria-describedby", ids.join(" "));
3411
- else
3412
- this.trigger.removeAttribute("aria-describedby");
3413
- this.trigger.removeEventListener("click", this.onTriggerClick);
3414
- this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
3415
- this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
3416
- this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
3417
- this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
3418
- this.trigger.removeEventListener("focusout", this.onTriggerFocusOut);
3419
- }
3420
- clearShowTimer() {
3421
- if (this.showTimer === null)
3422
- return;
3423
- clearTimeout(this.showTimer);
3424
- this.showTimer = null;
3425
- }
3426
- clearHideTimer() {
3427
- if (this.hideTimer === null)
3428
- return;
3429
- clearTimeout(this.hideTimer);
3430
- this.hideTimer = null;
3431
- }
3432
- clearTimers() {
3433
- this.clearShowTimer();
3434
- this.clearHideTimer();
3435
- }
3436
- setInteractionOpen(nextOpen, trigger) {
3437
- if (this.internalOpen === nextOpen)
3438
- return;
3439
- this.internalOpen = nextOpen;
3440
- dispatchDetail(this.host, nextOpen ? "open" : "close", {
3441
- open: nextOpen,
3442
- reason: "action",
3443
- trigger
3444
- });
3445
- }
3446
- onSurfaceEnter = () => this.clearHideTimer();
3447
- onTriggerClick = (event) => {
3448
- if (!this.toggleOnClick)
3449
- return;
3450
- this.clearTimers();
3451
- this.pinned = !this.pinned;
3452
- this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
3453
- };
3454
- onTriggerKeydown = (event) => {
3455
- if (event.key === "Escape")
3456
- this.clearTimers();
3457
- };
3458
- onTriggerEnter = (event) => {
3459
- if (event.pointerType === "touch")
3460
- return;
3461
- this.clearHideTimer();
3462
- if (this.internalOpen || this.showTimer !== null)
3463
- return;
3464
- this.showTimer = setTimeout(() => {
3465
- this.showTimer = null;
3466
- this.setInteractionOpen(true, "pointer");
3467
- }, Math.max(0, this.showDelay));
3468
- };
3469
- onTriggerLeave = () => {
3470
- this.clearShowTimer();
3471
- if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
3472
- return;
3473
- this.hideTimer = setTimeout(() => {
3474
- this.hideTimer = null;
3475
- this.setInteractionOpen(false, "pointer");
3476
- }, Math.max(0, this.hideDelay));
3477
- };
3478
- onTriggerFocusIn = () => {
3479
- this.focused = true;
3480
- this.clearTimers();
3481
- this.setInteractionOpen(true, "keyboard");
3482
- };
3483
- onTriggerFocusOut = (e) => {
3484
- const related = e.relatedTarget;
3485
- if (related && this.host.contains(related))
3486
- return;
3487
- this.focused = false;
3488
- this.pinned = false;
3489
- this.clearTimers();
3490
- this.setInteractionOpen(false, "keyboard");
3491
- };
3492
- handleRequestClose(reason, trigger) {
3493
- if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
3494
- this.pinned = false;
3495
- this.clearTimers();
3496
- this.internalOpen = false;
3497
- dispatchDetail(this.host, "close", {
3498
- open: false,
3499
- reason,
3500
- trigger
3501
- });
3502
- }
3503
- }
3504
- render() {
3505
- return h(Host, { key: "b0199c23316a707ae3e1e7c361f2838872f62221", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0 }, h("slot", { key: "d0c7822f2f47848a509bf8e310806edbdb320f02" }));
3506
- }
3507
- static get watchers() {
3508
- return {
3509
- "open": [{
3510
- "syncFromProp": 0
3511
- }],
3512
- "for": [{
3513
- "resetSurface": 0
3514
- }],
3515
- "placement": [{
3516
- "resetSurface": 0
3517
- }],
3518
- "internalOpen": [{
3519
- "syncOverlay": 0
3520
- }]
3521
- };
3522
- }
3523
- };
3524
- UITooltip.style = uiTooltipCss();
3525
- }
3526
- });
3527
-
3528
- // dist/esm/ui-top-bar.entry.js
3529
- var ui_top_bar_entry_exports = {};
3530
- __export(ui_top_bar_entry_exports, {
3531
- ui_top_bar: () => UITopBar
3532
- });
3533
- function slotHasContent3(slot) {
3534
- if (!slot) {
3535
- return false;
3536
- }
3537
- return slot.assignedNodes({ flatten: true }).some((node) => {
3538
- if (node.nodeType === Node.TEXT_NODE) {
3539
- return Boolean(node.textContent?.trim());
3540
- }
3541
- return true;
3542
- });
3543
- }
3544
- var uiTopBarCss, UITopBar;
3545
- var init_ui_top_bar_entry = __esm({
3546
- "dist/esm/ui-top-bar.entry.js"() {
3547
- init_index_8BGiMGQ0();
3548
- uiTopBarCss = () => `:host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-block-start:env(safe-area-inset-top);padding-inline-start:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-left) );padding-inline-end:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-right) );background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}`;
3549
- UITopBar = class {
3550
- constructor(hostRef) {
3551
- registerInstance(this, hostRef);
3920
+ if (ids.length)
3921
+ this.trigger.setAttribute("aria-describedby", ids.join(" "));
3922
+ else
3923
+ this.trigger.removeAttribute("aria-describedby");
3924
+ this.trigger.removeEventListener("click", this.onTriggerClick);
3925
+ this.trigger.removeEventListener("keydown", this.onTriggerKeydown);
3926
+ this.trigger.removeEventListener("pointerenter", this.onTriggerEnter);
3927
+ this.trigger.removeEventListener("pointerleave", this.onTriggerLeave);
3928
+ this.trigger.removeEventListener("focusin", this.onTriggerFocusIn);
3929
+ this.trigger.removeEventListener("focusout", this.onTriggerFocusOut);
3552
3930
  }
3553
- get host() {
3554
- return getElement(this);
3931
+ clearShowTimer() {
3932
+ if (this.showTimer === null)
3933
+ return;
3934
+ clearTimeout(this.showTimer);
3935
+ this.showTimer = null;
3555
3936
  }
3556
- hasLeading = false;
3557
- hasSearch = false;
3558
- hasActions = false;
3559
- leadingSlot;
3560
- searchSlot;
3561
- actionsSlot;
3562
- componentDidLoad() {
3563
- this.syncSlots();
3937
+ clearHideTimer() {
3938
+ if (this.hideTimer === null)
3939
+ return;
3940
+ clearTimeout(this.hideTimer);
3941
+ this.hideTimer = null;
3564
3942
  }
3565
- syncSlots = () => {
3566
- this.hasLeading = slotHasContent3(this.leadingSlot);
3567
- this.hasSearch = slotHasContent3(this.searchSlot);
3568
- this.hasActions = slotHasContent3(this.actionsSlot);
3569
- };
3570
- render() {
3571
- return h(Host, { key: "730e45232ab2b86c2ac99dba773f4ca15d7c3c51" }, h("header", { key: "f94f9b4f3f5930fda950895d2eec01d3ec175479", class: "top-bar", part: "base" }, h("div", { key: "038f6a404b0f159b4b826ada73d3c920266354c8", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "2d415368310c319eca3f3eb9b2c885ef79bb4107", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "dfd78b02066a91e9c610e4655a70da704ad65327", class: "top-bar__title" }, h("slot", { key: "499e24a864a31f6e400fd02aab4a3f960c87e572" })), h("div", { key: "5aa94952996487651dffecd2e351548631fa29b6", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "eddad95f8acf787ee0cead2a46e7961a06375d5c", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "dc69d492aa221a8beb888350bf101f8beeceede9", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "7cde7e062f487da8209738a32415636c7a6b72f0", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
3943
+ clearTimers() {
3944
+ this.clearShowTimer();
3945
+ this.clearHideTimer();
3572
3946
  }
3573
- };
3574
- UITopBar.style = uiTopBarCss();
3575
- }
3576
- });
3577
-
3578
- // dist/esm/ui-tree-item.entry.js
3579
- var ui_tree_item_entry_exports = {};
3580
- __export(ui_tree_item_entry_exports, {
3581
- ui_tree_item: () => UITreeItem
3582
- });
3583
- function serializeAttributes(attributes) {
3584
- return Object.entries(attributes).map(([name, value]) => ` ${name}="${escapeAttribute(value)}"`).join("");
3585
- }
3586
- function escapeAttribute(value) {
3587
- return String(value).replaceAll("&", "&amp;").replaceAll('"', "&quot;");
3588
- }
3589
- function serializeIconNode(node) {
3590
- const [tag, attributes] = node;
3591
- return `<${tag}${serializeAttributes(attributes)}></${tag}>`;
3592
- }
3593
- function loomaIconMarkup(name, className = "looma-icon") {
3594
- return [
3595
- `<svg class="${escapeAttribute(className)}" data-looma-icon="${name}" aria-hidden="true" focusable="false"`,
3596
- ' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"',
3597
- ' stroke-linecap="round" stroke-linejoin="round">',
3598
- LOOMA_ICONS[name].map(serializeIconNode).join(""),
3599
- "</svg>"
3600
- ].join("");
3601
- }
3602
- 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;
3603
- var init_ui_tree_item_entry = __esm({
3604
- "dist/esm/ui-tree-item.entry.js"() {
3605
- init_index_8BGiMGQ0();
3606
- init_events_JwSoedEO();
3607
- Bold = [
3608
- ["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" }]
3609
- ];
3610
- Braces = [
3611
- ["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" }],
3612
- ["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" }]
3613
- ];
3614
- ChevronDown = [["path", { d: "m6 9 6 6 6-6" }]];
3615
- ChevronLeft = [["path", { d: "m15 18-6-6 6-6" }]];
3616
- CodeXml = [
3617
- ["path", { d: "m18 16 4-4-4-4" }],
3618
- ["path", { d: "m6 8-4 4 4 4" }],
3619
- ["path", { d: "m14.5 4-5 16" }]
3620
- ];
3621
- Columns3 = [
3622
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3623
- ["path", { d: "M9 3v18" }],
3624
- ["path", { d: "M15 3v18" }]
3625
- ];
3626
- Ellipsis = [
3627
- ["circle", { cx: "12", cy: "12", r: "1" }],
3628
- ["circle", { cx: "19", cy: "12", r: "1" }],
3629
- ["circle", { cx: "5", cy: "12", r: "1" }]
3630
- ];
3631
- Eraser = [
3632
- [
3633
- "path",
3634
- {
3635
- 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"
3636
- }
3637
- ],
3638
- ["path", { d: "m5.082 11.09 8.828 8.828" }]
3639
- ];
3640
- GripHorizontal = [
3641
- ["circle", { cx: "12", cy: "9", r: "1" }],
3642
- ["circle", { cx: "19", cy: "9", r: "1" }],
3643
- ["circle", { cx: "5", cy: "9", r: "1" }],
3644
- ["circle", { cx: "12", cy: "15", r: "1" }],
3645
- ["circle", { cx: "19", cy: "15", r: "1" }],
3646
- ["circle", { cx: "5", cy: "15", r: "1" }]
3647
- ];
3648
- GripVertical = [
3649
- ["circle", { cx: "9", cy: "12", r: "1" }],
3650
- ["circle", { cx: "9", cy: "5", r: "1" }],
3651
- ["circle", { cx: "9", cy: "19", r: "1" }],
3652
- ["circle", { cx: "15", cy: "12", r: "1" }],
3653
- ["circle", { cx: "15", cy: "5", r: "1" }],
3654
- ["circle", { cx: "15", cy: "19", r: "1" }]
3655
- ];
3656
- Heading1 = [
3657
- ["path", { d: "M4 12h8" }],
3658
- ["path", { d: "M4 18V6" }],
3659
- ["path", { d: "M12 18V6" }],
3660
- ["path", { d: "m17 12 3-2v8" }]
3661
- ];
3662
- Heading2 = [
3663
- ["path", { d: "M4 12h8" }],
3664
- ["path", { d: "M4 18V6" }],
3665
- ["path", { d: "M12 18V6" }],
3666
- ["path", { d: "M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1" }]
3667
- ];
3668
- Heading3 = [
3669
- ["path", { d: "M4 12h8" }],
3670
- ["path", { d: "M4 18V6" }],
3671
- ["path", { d: "M12 18V6" }],
3672
- ["path", { d: "M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2" }],
3673
- ["path", { d: "M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]
3674
- ];
3675
- Highlighter = [
3676
- ["path", { d: "m9 11-6 6v3h9l3-3" }],
3677
- ["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" }]
3678
- ];
3679
- Image = [
3680
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2" }],
3681
- ["circle", { cx: "9", cy: "9", r: "2" }],
3682
- ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
3683
- ];
3684
- Italic = [
3685
- ["line", { x1: "19", x2: "10", y1: "4", y2: "4" }],
3686
- ["line", { x1: "14", x2: "5", y1: "20", y2: "20" }],
3687
- ["line", { x1: "15", x2: "9", y1: "4", y2: "20" }]
3688
- ];
3689
- ListOrdered = [
3690
- ["path", { d: "M11 5h10" }],
3691
- ["path", { d: "M11 12h10" }],
3692
- ["path", { d: "M11 19h10" }],
3693
- ["path", { d: "M4 4h1v5" }],
3694
- ["path", { d: "M4 9h2" }],
3695
- ["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" }]
3696
- ];
3697
- ListTodo = [
3698
- ["path", { d: "M13 5h8" }],
3699
- ["path", { d: "M13 12h8" }],
3700
- ["path", { d: "M13 19h8" }],
3701
- ["path", { d: "m3 17 2 2 4-4" }],
3702
- ["rect", { x: "3", y: "4", width: "6", height: "6", rx: "1" }]
3703
- ];
3704
- List = [
3705
- ["path", { d: "M3 5h.01" }],
3706
- ["path", { d: "M3 12h.01" }],
3707
- ["path", { d: "M3 19h.01" }],
3708
- ["path", { d: "M8 5h13" }],
3709
- ["path", { d: "M8 12h13" }],
3710
- ["path", { d: "M8 19h13" }]
3711
- ];
3712
- Merge = [
3713
- ["path", { d: "m8 6 4-4 4 4" }],
3714
- ["path", { d: "M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22" }],
3715
- ["path", { d: "m20 22-5-5" }]
3716
- ];
3717
- Minus = [["path", { d: "M5 12h14" }]];
3718
- PaintBucket = [
3719
- ["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" }],
3720
- ["path", { d: "m5 2 5 5" }],
3721
- ["path", { d: "M2 13h15" }],
3722
- ["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" }]
3723
- ];
3724
- PanelBottom = [
3725
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3726
- ["path", { d: "M3 15h18" }]
3727
- ];
3728
- PanelLeft = [
3729
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3730
- ["path", { d: "M9 3v18" }]
3731
- ];
3732
- PanelRight = [
3733
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3734
- ["path", { d: "M15 3v18" }]
3735
- ];
3736
- PanelTop = [
3737
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3738
- ["path", { d: "M3 9h18" }]
3739
- ];
3740
- Pilcrow = [
3741
- ["path", { d: "M13 4v16" }],
3742
- ["path", { d: "M17 4v16" }],
3743
- ["path", { d: "M19 4H9.5a4.5 4.5 0 0 0 0 9H13" }]
3744
- ];
3745
- Plus = [
3746
- ["path", { d: "M5 12h14" }],
3747
- ["path", { d: "M12 5v14" }]
3748
- ];
3749
- Quote = [
3750
- [
3751
- "path",
3752
- {
3753
- 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"
3754
- }
3755
- ],
3756
- [
3757
- "path",
3758
- {
3759
- 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"
3760
- }
3761
- ]
3762
- ];
3763
- Redo2 = [
3764
- ["path", { d: "m15 14 5-5-5-5" }],
3765
- ["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13" }]
3766
- ];
3767
- Rows3 = [
3768
- ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }],
3769
- ["path", { d: "M21 9H3" }],
3770
- ["path", { d: "M21 15H3" }]
3771
- ];
3772
- Split = [
3773
- ["path", { d: "M16 3h5v5" }],
3774
- ["path", { d: "M8 3H3v5" }],
3775
- ["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3" }],
3776
- ["path", { d: "m15 9 6-6" }]
3777
- ];
3778
- Strikethrough = [
3779
- ["path", { d: "M16 4H9a3 3 0 0 0-2.83 4" }],
3780
- ["path", { d: "M14 12a4 4 0 0 1 0 8H6" }],
3781
- ["line", { x1: "4", x2: "20", y1: "12", y2: "12" }]
3782
- ];
3783
- Table2 = [
3784
- [
3785
- "path",
3786
- {
3787
- 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"
3947
+ setInteractionOpen(nextOpen, trigger) {
3948
+ if (this.internalOpen === nextOpen)
3949
+ return;
3950
+ if (!isControlled(this.open))
3951
+ this.internalOpen = nextOpen;
3952
+ dispatchDetail(this.host, nextOpen ? "open" : "close", {
3953
+ open: nextOpen,
3954
+ reason: "action",
3955
+ trigger
3956
+ });
3957
+ }
3958
+ onSurfaceEnter = () => this.clearHideTimer();
3959
+ onTriggerClick = (event) => {
3960
+ if (!this.toggleOnClick)
3961
+ return;
3962
+ this.clearTimers();
3963
+ this.pinned = !this.pinned;
3964
+ this.setInteractionOpen(this.pinned, event.detail === 0 ? "keyboard" : "pointer");
3965
+ };
3966
+ onTriggerKeydown = (event) => {
3967
+ if (event.key === "Escape")
3968
+ this.clearTimers();
3969
+ };
3970
+ onTriggerEnter = (event) => {
3971
+ if (event.pointerType === "touch")
3972
+ return;
3973
+ this.clearHideTimer();
3974
+ if (this.internalOpen || this.showTimer !== null)
3975
+ return;
3976
+ this.showTimer = setTimeout(() => {
3977
+ this.showTimer = null;
3978
+ this.setInteractionOpen(true, "pointer");
3979
+ }, Math.max(0, this.showDelay));
3980
+ };
3981
+ onTriggerLeave = () => {
3982
+ this.clearShowTimer();
3983
+ if (this.focused || this.pinned || !this.internalOpen || this.hideTimer !== null)
3984
+ return;
3985
+ this.hideTimer = setTimeout(() => {
3986
+ this.hideTimer = null;
3987
+ this.setInteractionOpen(false, "pointer");
3988
+ }, Math.max(0, this.hideDelay));
3989
+ };
3990
+ onTriggerFocusIn = () => {
3991
+ this.focused = true;
3992
+ this.clearTimers();
3993
+ this.setInteractionOpen(true, "keyboard");
3994
+ };
3995
+ onTriggerFocusOut = (e) => {
3996
+ const related = e.relatedTarget;
3997
+ if (related && this.host.contains(related))
3998
+ return;
3999
+ this.focused = false;
4000
+ this.pinned = false;
4001
+ this.clearTimers();
4002
+ this.setInteractionOpen(false, "keyboard");
4003
+ };
4004
+ handleRequestClose(reason, trigger) {
4005
+ if (reason === "escape" || reason === "light-dismiss" && this.toggleOnClick) {
4006
+ this.pinned = false;
4007
+ this.clearTimers();
4008
+ if (!isControlled(this.open))
4009
+ this.internalOpen = false;
4010
+ dispatchDetail(this.host, "close", {
4011
+ open: false,
4012
+ reason,
4013
+ trigger
4014
+ });
3788
4015
  }
3789
- ]
3790
- ];
3791
- TextAlignCenter = [
3792
- ["path", { d: "M21 5H3" }],
3793
- ["path", { d: "M17 12H7" }],
3794
- ["path", { d: "M19 19H5" }]
3795
- ];
3796
- TextAlignEnd = [
3797
- ["path", { d: "M21 5H3" }],
3798
- ["path", { d: "M21 12H9" }],
3799
- ["path", { d: "M21 19H7" }]
3800
- ];
3801
- TextAlignStart = [
3802
- ["path", { d: "M21 5H3" }],
3803
- ["path", { d: "M15 12H3" }],
3804
- ["path", { d: "M17 19H3" }]
3805
- ];
3806
- Trash2 = [
3807
- ["path", { d: "M10 11v6" }],
3808
- ["path", { d: "M14 11v6" }],
3809
- ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
3810
- ["path", { d: "M3 6h18" }],
3811
- ["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]
3812
- ];
3813
- Underline = [
3814
- ["path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }],
3815
- ["line", { x1: "4", x2: "20", y1: "20", y2: "20" }]
3816
- ];
3817
- Undo2 = [
3818
- ["path", { d: "M9 14 4 9l5-5" }],
3819
- ["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" }]
3820
- ];
3821
- LOOMA_ICONS = {
3822
- "align-center": TextAlignCenter,
3823
- "align-left": TextAlignStart,
3824
- "align-right": TextAlignEnd,
3825
- bold: Bold,
3826
- braces: Braces,
3827
- "chevron-down": ChevronDown,
3828
- "chevron-left": ChevronLeft,
3829
- "code-xml": CodeXml,
3830
- columns: Columns3,
3831
- ellipsis: Ellipsis,
3832
- eraser: Eraser,
3833
- "grip-horizontal": GripHorizontal,
3834
- "grip-vertical": GripVertical,
3835
- "heading-1": Heading1,
3836
- "heading-2": Heading2,
3837
- "heading-3": Heading3,
3838
- highlighter: Highlighter,
3839
- image: Image,
3840
- italic: Italic,
3841
- list: List,
3842
- "list-ordered": ListOrdered,
3843
- "list-todo": ListTodo,
3844
- merge: Merge,
3845
- minus: Minus,
3846
- "paint-bucket": PaintBucket,
3847
- "panel-bottom": PanelBottom,
3848
- "panel-left": PanelLeft,
3849
- "panel-right": PanelRight,
3850
- "panel-top": PanelTop,
3851
- pilcrow: Pilcrow,
3852
- plus: Plus,
3853
- quote: Quote,
3854
- redo: Redo2,
3855
- rows: Rows3,
3856
- split: Split,
3857
- strikethrough: Strikethrough,
3858
- table: Table2,
3859
- trash: Trash2,
3860
- underline: Underline,
3861
- undo: Undo2
4016
+ }
4017
+ render() {
4018
+ return h(Host, { key: "ce34c51bc3a9c9f7f31b7f0d329175df0cee1ab3", role: "tooltip", hidden: !this.internalOpen, "data-open": this.internalOpen ? "" : void 0 }, h("div", { key: "e5bb2bcb146fe8ec3b4e9a6abb550961181e3c06", class: "tooltip__surface" }, h("slot", { key: "bdb71bfcb0f72c212cbb5c64fb69510fdded4afb" })));
4019
+ }
4020
+ static get watchers() {
4021
+ return {
4022
+ "open": [{
4023
+ "syncFromProp": 0
4024
+ }],
4025
+ "for": [{
4026
+ "resetSurface": 0
4027
+ }],
4028
+ "placement": [{
4029
+ "resetSurface": 0
4030
+ }],
4031
+ "internalOpen": [{
4032
+ "syncOverlay": 0
4033
+ }]
4034
+ };
4035
+ }
4036
+ };
4037
+ UITooltip.style = uiTooltipCss();
4038
+ }
4039
+ });
4040
+
4041
+ // dist/esm/ui-top-bar.entry.js
4042
+ var ui_top_bar_entry_exports = {};
4043
+ __export(ui_top_bar_entry_exports, {
4044
+ ui_top_bar: () => UITopBar
4045
+ });
4046
+ function slotHasContent3(slot) {
4047
+ if (!slot) {
4048
+ return false;
4049
+ }
4050
+ return slot.assignedNodes({ flatten: true }).some((node) => {
4051
+ if (node.nodeType === Node.TEXT_NODE) {
4052
+ return Boolean(node.textContent?.trim());
4053
+ }
4054
+ return true;
4055
+ });
4056
+ }
4057
+ var uiTopBarCss, UITopBar;
4058
+ var init_ui_top_bar_entry = __esm({
4059
+ "dist/esm/ui-top-bar.entry.js"() {
4060
+ init_index_8BGiMGQ0();
4061
+ uiTopBarCss = () => `:host{position:sticky;inset-block-start:0;z-index:var(--ui-top-bar-z-index, 100);display:block}.top-bar{min-block-size:calc(var(--ui-top-bar-height, 56px) + env(safe-area-inset-top));display:flex;align-items:center;gap:var(--ui-top-bar-gap, var(--ui-space-3, 0.75rem));padding-block-start:env(safe-area-inset-top);padding-inline-start:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-left) );padding-inline-end:max( var(--ui-top-bar-padding-inline, var(--ui-space-4, 1rem)), env(safe-area-inset-right) );background:var(--ui-top-bar-bg, var(--ui-surface, #ffffff));border-block-end:1px solid var(--ui-top-bar-border, var(--ui-border, #e5e7eb))}.top-bar__leading,.top-bar__search,.top-bar__actions{display:flex;align-items:center;flex-shrink:0}.top-bar__actions{gap:var(--ui-top-bar-actions-gap, var(--ui-space-1, 0.25rem))}.top-bar__title{min-inline-size:0;flex:1}[hidden]{display:none}@media (min-width: 768px){:host{display:none}}`;
4062
+ UITopBar = class {
4063
+ constructor(hostRef) {
4064
+ registerInstance(this, hostRef);
4065
+ }
4066
+ get host() {
4067
+ return getElement(this);
4068
+ }
4069
+ hasLeading = false;
4070
+ hasSearch = false;
4071
+ hasActions = false;
4072
+ leadingSlot;
4073
+ searchSlot;
4074
+ actionsSlot;
4075
+ componentDidLoad() {
4076
+ this.syncSlots();
4077
+ }
4078
+ syncSlots = () => {
4079
+ this.hasLeading = slotHasContent3(this.leadingSlot);
4080
+ this.hasSearch = slotHasContent3(this.searchSlot);
4081
+ this.hasActions = slotHasContent3(this.actionsSlot);
4082
+ };
4083
+ render() {
4084
+ return h(Host, { key: "b92aa4e03475b3e623212a1e98f45d5532860b51" }, h("header", { key: "a3552708b0e424e762e100ee55fc6bfac4cd830a", class: "top-bar", part: "base" }, h("div", { key: "4c8a9e3a04ff23a615bf09e368f4212dd5b38157", class: "top-bar__leading", hidden: !this.hasLeading }, h("slot", { key: "64ecc99672b8fd37305810e0776a24bf87ea6f08", name: "leading", ref: (el) => this.leadingSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "37fc003aba2b87f7c8c0e654cd6810d7f231f365", class: "top-bar__title" }, h("slot", { key: "e6c901c15852e83340ca8ad1e264fd5e35445e84" })), h("div", { key: "37b1ac319367eeded4182ada401a31e0b9c2555a", class: "top-bar__search", hidden: !this.hasSearch }, h("slot", { key: "0a8b5ef500dd843909bb35a1133be548411f3b71", name: "search", ref: (el) => this.searchSlot = el, onSlotchange: this.syncSlots })), h("div", { key: "7e5054a3ed6ecfe8d9d8b1b36992843aa0fb62eb", class: "top-bar__actions", hidden: !this.hasActions }, h("slot", { key: "19fe59c5ba4da7f0ceda764948f1288bfaa2a41d", name: "actions", ref: (el) => this.actionsSlot = el, onSlotchange: this.syncSlots }))));
4085
+ }
3862
4086
  };
4087
+ UITopBar.style = uiTopBarCss();
4088
+ }
4089
+ });
4090
+
4091
+ // dist/esm/ui-tree-item.entry.js
4092
+ var ui_tree_item_entry_exports = {};
4093
+ __export(ui_tree_item_entry_exports, {
4094
+ ui_tree_item: () => UITreeItem
4095
+ });
4096
+ var uiTreeItemCss, UITreeItem;
4097
+ var init_ui_tree_item_entry = __esm({
4098
+ "dist/esm/ui-tree-item.entry.js"() {
4099
+ init_index_8BGiMGQ0();
4100
+ init_events_JwSoedEO();
4101
+ init_icons_CoFximGM();
3863
4102
  uiTreeItemCss = () => `: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']) .row-drop-indicator{display:block;inset-block-start:-1px}:host([data-drop-position='after']) .subtree-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}}`;
3864
4103
  UITreeItem = class {
3865
4104
  constructor(hostRef) {
@@ -3872,11 +4111,9 @@ var init_ui_tree_item_entry = __esm({
3872
4111
  itemId = "";
3873
4112
  /** Accessible name used by the disclosure and drag handle. */
3874
4113
  label = "";
3875
- /** One-based visual and semantic nesting level. */
3876
- depth = 1;
3877
- /** Application hierarchy depth used for drop constraints. Defaults to visual depth. */
4114
+ /** Application hierarchy depth override used for drop constraints. Defaults to structural nesting. */
3878
4115
  dropDepth;
3879
- /** Deepest descendant distance, used with the tree's max-depth drop constraint. */
4116
+ /** Virtualized-tree descendant-depth override for the tree's max-depth drop constraint. */
3880
4117
  subtreeDepth;
3881
4118
  /** Whether this item accepts children and exposes disclosure behavior. */
3882
4119
  container = false;
@@ -3888,37 +4125,72 @@ var init_ui_tree_item_entry = __esm({
3888
4125
  dropScope = "";
3889
4126
  /** Comma-separated drag kinds accepted as children. Empty accepts every kind. */
3890
4127
  accepts = "";
3891
- /** Initial controlled expansion value. */
3892
- expanded = false;
4128
+ /** Controlled expansion value. When omitted, `default-expanded` initializes uncontrolled state. */
4129
+ expanded;
3893
4130
  /** Initial uncontrolled expansion value. */
3894
4131
  defaultExpanded = false;
3895
4132
  selected = false;
3896
4133
  disabled = false;
3897
4134
  internalExpanded = false;
4135
+ structuralLevel = 1;
4136
+ tabStop = false;
3898
4137
  syncExpandedFromProp() {
3899
- this.internalExpanded = this.expanded;
4138
+ if (this.expanded !== void 0)
4139
+ this.internalExpanded = this.expanded;
3900
4140
  }
3901
4141
  componentWillLoad() {
3902
- this.internalExpanded = this.expanded || this.defaultExpanded;
4142
+ this.internalExpanded = this.expanded ?? this.defaultExpanded;
4143
+ this.updateStructuralLevel();
3903
4144
  }
3904
- componentDidLoad() {
4145
+ connectedCallback() {
3905
4146
  this.host.addEventListener("ui-tree-auto-expand", this.onAutoExpand);
4147
+ this.host.addEventListener("ui-tree-structure-sync", this.updateStructuralLevel);
4148
+ this.host.addEventListener("ui-tree-roving-tab-stop", this.onRovingTabStop);
4149
+ this.host.addEventListener("ui-tree-request-expanded", this.onExpansionRequest);
3906
4150
  }
3907
4151
  disconnectedCallback() {
3908
4152
  this.host.removeEventListener("ui-tree-auto-expand", this.onAutoExpand);
3909
- }
4153
+ this.host.removeEventListener("ui-tree-structure-sync", this.updateStructuralLevel);
4154
+ this.host.removeEventListener("ui-tree-roving-tab-stop", this.onRovingTabStop);
4155
+ this.host.removeEventListener("ui-tree-request-expanded", this.onExpansionRequest);
4156
+ }
4157
+ updateStructuralLevel = () => {
4158
+ const tree = this.host.closest("ui-tree");
4159
+ let ancestor = this.host.parentElement?.closest("ui-tree-item") ?? null;
4160
+ let level = 1;
4161
+ while (ancestor && tree?.contains(ancestor)) {
4162
+ level += 1;
4163
+ ancestor = ancestor.parentElement?.closest("ui-tree-item") ?? null;
4164
+ }
4165
+ if (this.structuralLevel !== level)
4166
+ this.structuralLevel = level;
4167
+ };
3910
4168
  setExpanded(expanded, trigger) {
3911
- if (!this.container || this.disabled || this.internalExpanded === expanded)
4169
+ const current = this.isExpanded();
4170
+ if (!this.container || this.disabled || current === expanded)
3912
4171
  return;
3913
- this.internalExpanded = expanded;
4172
+ if (this.expanded === void 0)
4173
+ this.internalExpanded = expanded;
3914
4174
  dispatchDetail(this.host, "expand", { id: this.itemId, expanded, trigger });
4175
+ this.host.dispatchEvent(new CustomEvent("ui-tree-expansion-change"));
4176
+ }
4177
+ isExpanded() {
4178
+ return this.expanded ?? this.internalExpanded;
3915
4179
  }
3916
4180
  onAutoExpand = () => {
3917
4181
  this.setExpanded(true, "pointer");
3918
4182
  };
4183
+ onRovingTabStop = (event) => {
4184
+ this.tabStop = Boolean(event.detail?.active) && !this.disabled;
4185
+ };
4186
+ onExpansionRequest = (event) => {
4187
+ const detail = event.detail;
4188
+ if (typeof detail?.expanded === "boolean")
4189
+ this.setExpanded(detail.expanded, detail.trigger ?? "keyboard");
4190
+ };
3919
4191
  onDisclosureClick = (event) => {
3920
4192
  event.stopPropagation();
3921
- this.setExpanded(!this.internalExpanded, eventToTrigger(event));
4193
+ this.setExpanded(!this.isExpanded(), eventToTrigger(event));
3922
4194
  };
3923
4195
  onDisclosureKeydown = (event) => {
3924
4196
  if (event.key !== "ArrowRight" && event.key !== "ArrowLeft")
@@ -3933,16 +4205,17 @@ var init_ui_tree_item_entry = __esm({
3933
4205
  const path = event.composedPath();
3934
4206
  const interactive = path.some((node) => node instanceof HTMLElement && (node.matches('a, button, input, select, textarea, [role="button"], [role="link"]') || node.getAttribute("slot") === "actions"));
3935
4207
  if (!interactive)
3936
- this.setExpanded(!this.internalExpanded, eventToTrigger(event));
4208
+ this.setExpanded(!this.isExpanded(), eventToTrigger(event));
3937
4209
  };
3938
4210
  render() {
3939
- const level = Math.max(1, Math.floor(this.depth));
3940
- const disclosureLabel = `${this.internalExpanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
4211
+ const level = this.structuralLevel;
4212
+ const expanded = this.isExpanded();
4213
+ const disclosureLabel = `${expanded ? "Collapse" : "Expand"} ${this.label || "item"}`;
3941
4214
  const dragLabel = `Drag ${this.label || "item"} to reorder`;
3942
- return h(Host, { key: "606f5fdac8a95489d0c62cd7d4918c6d5d0c759e", 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: {
4215
+ return h(Host, { key: "36ad9eac3e0fe2a606e63294891b1c0697034b46", role: "treeitem", "aria-label": this.label || void 0, "aria-level": String(level), "aria-expanded": this.container ? String(expanded) : 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 || !this.tabStop ? -1 : 0, style: {
3943
4216
  "--ui-tree-item-depth": String(level - 1),
3944
4217
  "margin-inline-start": level > 1 ? "var(--ui-tree-indent, 16px)" : "0px"
3945
- } }, h("div", { key: "2b4bb03d4b24ef668f22b08e803f7f43c2d63ae5", 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: "e7b935158e35cdc6518bdd73d54c42dcfa211aee", class: "leading", part: "leading" }, h("slot", { key: "8448462349fd23b8be0fb673fc6e101bf94beaa7", name: "leading" })), h("span", { key: "e0b6338e1ec9ec043446e42c5f03724adf7e1862", class: "label", part: "label" }, h("slot", { key: "ed44e6f2ce3466c28d2b87fc7511399ecc339255" })), h("span", { key: "2aea78227904fe23cfc4b8e14852a4601e3cc34b", class: "actions", part: "actions" }, h("slot", { key: "7c6549008c2a54c3ea6fcdf9e0fdbe445d379922", name: "actions" })), h("span", { key: "05166ba04765bc518d6b95ca7ae5a67c4394d1bf", class: "drop-indicator row-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, h("span", { key: "7381d6e9e2a8f94695f29e73194b1603d79cefb9", class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" }));
4218
+ } }, h("div", { key: "e92f5bc73accef3b348559ea144e0b769c98c721", 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(expanded), disabled: this.disabled, onClick: this.onDisclosureClick, onKeyDown: this.onDisclosureKeydown }, h("span", { class: { "disclosure-icon": true, "disclosure-icon--expanded": expanded }, innerHTML: loomaIconMarkup("chevron-down") })) : h("span", { class: "disclosure-spacer", "aria-hidden": "true" }), h("span", { key: "dd2d0550d6846d0a4f80a4108968bfc32c18658f", class: "leading", part: "leading" }, h("slot", { key: "622d449a338dce57bc2e64aaf776471e8d3ce1b4", name: "leading" })), h("span", { key: "29c3e6ace4838ab941ada2547356288358faaeb2", class: "label", part: "label" }, h("slot", { key: "f1594c11fa0b9fbe8a3c20df6edce19421cab148" })), h("span", { key: "e4a6408f86b58a325145e713d116fc09322bb0d3", class: "actions", part: "actions" }, h("slot", { key: "ff3afaf1089426e19ee1fc39c6567c3d40ca4272", name: "actions" })), h("span", { key: "efcf23f7aad6c4353fa24bfe2a81001122335f72", class: "drop-indicator row-drop-indicator", part: "drop-indicator", "aria-hidden": "true" })), this.container ? h("div", { class: "children", part: "children", role: "group", hidden: !expanded }, h("slot", { name: "children" })) : null, h("span", { key: "21bfc8a6ad6e487cd044b5a3cbd7e8f900f2d1e1", class: "drop-indicator subtree-drop-indicator", part: "drop-indicator", "aria-hidden": "true" }));
3946
4219
  }
3947
4220
  static get watchers() {
3948
4221
  return {
@@ -4009,7 +4282,7 @@ var init_ui_tree_entry = __esm({
4009
4282
  "dist/esm/ui-tree.entry.js"() {
4010
4283
  init_index_8BGiMGQ0();
4011
4284
  init_events_JwSoedEO();
4012
- 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}`;
4285
+ uiTreeCss = () => `:host{--ui-tree-indent:16px;--ui-tree-gutter:0px;display:block;min-inline-size:0;padding-inline-start:var(--ui-tree-gutter)}::slotted(ui-tree-item){--ui-tree-indent:inherit}`;
4013
4286
  UITree = class {
4014
4287
  constructor(hostRef) {
4015
4288
  registerInstance(this, hostRef);
@@ -4028,6 +4301,8 @@ var init_ui_tree_entry = __esm({
4028
4301
  rejectedPosition = null;
4029
4302
  rejection = null;
4030
4303
  hoverIntent = null;
4304
+ structureObserver = null;
4305
+ tabStop = null;
4031
4306
  componentDidLoad() {
4032
4307
  this.hoverIntent = createHoverIntent(this.hoverExpandDelay, this.expandTarget);
4033
4308
  this.host.addEventListener("dragstart", this.onDragStart);
@@ -4038,6 +4313,11 @@ var init_ui_tree_entry = __esm({
4038
4313
  this.host.addEventListener("drop", this.onDrop);
4039
4314
  this.host.addEventListener("dragend", this.onDragEnd);
4040
4315
  this.host.addEventListener("keydown", this.onKeyDown);
4316
+ this.host.addEventListener("focusin", this.onFocusIn);
4317
+ this.host.addEventListener("ui-tree-expansion-change", this.onExpansionChange);
4318
+ this.syncStructuralLevels();
4319
+ this.structureObserver = new MutationObserver(this.syncStructuralLevels);
4320
+ this.structureObserver.observe(this.host, { childList: true, subtree: true });
4041
4321
  }
4042
4322
  disconnectedCallback() {
4043
4323
  this.hoverIntent?.destroy();
@@ -4049,10 +4329,40 @@ var init_ui_tree_entry = __esm({
4049
4329
  this.host.removeEventListener("drop", this.onDrop);
4050
4330
  this.host.removeEventListener("dragend", this.onDragEnd);
4051
4331
  this.host.removeEventListener("keydown", this.onKeyDown);
4332
+ this.host.removeEventListener("focusin", this.onFocusIn);
4333
+ this.host.removeEventListener("ui-tree-expansion-change", this.onExpansionChange);
4334
+ this.structureObserver?.disconnect();
4335
+ this.structureObserver = null;
4336
+ }
4337
+ syncStructuralLevels = () => {
4338
+ for (const item of Array.from(this.host.querySelectorAll("ui-tree-item"))) {
4339
+ item.dispatchEvent(new CustomEvent("ui-tree-structure-sync"));
4340
+ }
4341
+ this.syncTabStop();
4342
+ };
4343
+ syncTabStop(preferred) {
4344
+ const items = this.visibleItems();
4345
+ const next = preferred && items.includes(preferred) ? preferred : this.tabStop && items.includes(this.tabStop) ? this.tabStop : items[0] ?? null;
4346
+ this.tabStop = next;
4347
+ for (const item of items) {
4348
+ item.dispatchEvent(new CustomEvent("ui-tree-roving-tab-stop", {
4349
+ detail: { active: item === next }
4350
+ }));
4351
+ }
4052
4352
  }
4053
4353
  itemFromEvent(event) {
4054
4354
  return event.composedPath().find((node) => node instanceof HTMLElement && node.localName === "ui-tree-item") ?? null;
4055
4355
  }
4356
+ eventTargetsInteractiveContent(event) {
4357
+ for (const node of event.composedPath()) {
4358
+ if (node instanceof HTMLElement && node.localName === "ui-tree-item")
4359
+ break;
4360
+ if (node instanceof HTMLElement && node.matches('a, button, input, select, textarea, [role="button"], [role="link"]')) {
4361
+ return true;
4362
+ }
4363
+ }
4364
+ return false;
4365
+ }
4056
4366
  itemId(item) {
4057
4367
  return item.itemId || item.getAttribute("item-id") || "";
4058
4368
  }
@@ -4096,9 +4406,23 @@ var init_ui_tree_entry = __esm({
4096
4406
  const dropDepth = item.getAttribute("drop-depth");
4097
4407
  if (dropDepth !== null)
4098
4408
  return Number(dropDepth);
4099
- if (item.depth !== void 0)
4100
- return item.depth;
4101
- return Number(item.getAttribute("depth")) || 1;
4409
+ return Number(item.getAttribute("aria-level")) || 1;
4410
+ }
4411
+ subtreeDepth(item) {
4412
+ if (item.subtreeDepth !== void 0)
4413
+ return Math.max(0, Math.floor(item.subtreeDepth));
4414
+ const override = item.getAttribute("subtree-depth");
4415
+ if (override !== null)
4416
+ return Math.max(0, Math.floor(Number(override)));
4417
+ return Array.from(item.querySelectorAll("ui-tree-item")).reduce((deepest, descendant) => {
4418
+ let nesting = 0;
4419
+ let ancestor = descendant.parentElement?.closest("ui-tree-item") ?? null;
4420
+ while (ancestor && ancestor !== item) {
4421
+ nesting += 1;
4422
+ ancestor = ancestor.parentElement?.closest("ui-tree-item") ?? null;
4423
+ }
4424
+ return ancestor === item ? Math.max(deepest, nesting + 1) : deepest;
4425
+ }, 0);
4102
4426
  }
4103
4427
  dropRejection(source, target, position) {
4104
4428
  if (source.contains(target))
@@ -4113,9 +4437,9 @@ var init_ui_tree_entry = __esm({
4113
4437
  return { reason: "incompatible" };
4114
4438
  }
4115
4439
  const maxDepth = Math.max(0, Math.floor(this.maxDepth));
4116
- if (maxDepth > 0 && source.subtreeDepth !== void 0) {
4440
+ if (maxDepth > 0) {
4117
4441
  const targetDepth = Math.max(0, Math.floor(this.constraintDepth(target)));
4118
- const subtreeDepth = Math.max(0, Math.floor(source.subtreeDepth));
4442
+ const subtreeDepth = this.subtreeDepth(source);
4119
4443
  const resultingDepth = targetDepth + (position === "inside" ? 1 : 0) + subtreeDepth;
4120
4444
  if (resultingDepth > maxDepth)
4121
4445
  return { reason: "max-depth", maxDepth, resultingDepth };
@@ -4301,7 +4625,35 @@ var init_ui_tree_entry = __esm({
4301
4625
  visibleItems() {
4302
4626
  return Array.from(this.host.querySelectorAll("ui-tree-item")).filter((item) => item.getClientRects().length > 0 && !item.hasAttribute("disabled"));
4303
4627
  }
4628
+ parentItem(item) {
4629
+ const parent = item.parentElement?.closest("ui-tree-item") ?? null;
4630
+ return parent && this.host.contains(parent) ? parent : null;
4631
+ }
4632
+ firstVisibleChild(item, items) {
4633
+ return items.find((candidate) => this.parentItem(candidate) === item) ?? null;
4634
+ }
4635
+ focusItem(item) {
4636
+ this.syncTabStop(item);
4637
+ item.focus();
4638
+ }
4639
+ requestExpansion(item, expanded) {
4640
+ item.dispatchEvent(new CustomEvent("ui-tree-request-expanded", {
4641
+ detail: { expanded, trigger: "keyboard" }
4642
+ }));
4643
+ }
4644
+ onFocusIn = (event) => {
4645
+ if (this.eventTargetsInteractiveContent(event))
4646
+ return;
4647
+ const item = this.itemFromEvent(event);
4648
+ if (item)
4649
+ this.syncTabStop(item);
4650
+ };
4651
+ onExpansionChange = () => {
4652
+ requestAnimationFrame(() => this.syncTabStop());
4653
+ };
4304
4654
  onKeyDown = (event) => {
4655
+ if (this.eventTargetsInteractiveContent(event))
4656
+ return;
4305
4657
  const current = this.itemFromEvent(event);
4306
4658
  if (!current)
4307
4659
  return;
@@ -4309,14 +4661,37 @@ var init_ui_tree_entry = __esm({
4309
4661
  const index = items.indexOf(current);
4310
4662
  if (index < 0)
4311
4663
  return;
4312
- const next = event.key === "ArrowDown" ? items[index + 1] : event.key === "ArrowUp" ? items[index - 1] : null;
4313
- if (!next)
4664
+ const next = event.key === "ArrowDown" ? items[index + 1] : event.key === "ArrowUp" ? items[index - 1] : event.key === "Home" ? items[0] : event.key === "End" ? items.at(-1) : null;
4665
+ if (next) {
4666
+ event.preventDefault();
4667
+ this.focusItem(next);
4314
4668
  return;
4315
- event.preventDefault();
4316
- next.focus();
4669
+ }
4670
+ if (event.key === "ArrowLeft") {
4671
+ if (current.getAttribute("aria-expanded") === "true") {
4672
+ event.preventDefault();
4673
+ this.requestExpansion(current, false);
4674
+ } else if (this.parentItem(current)) {
4675
+ event.preventDefault();
4676
+ this.focusItem(this.parentItem(current));
4677
+ }
4678
+ return;
4679
+ }
4680
+ if (event.key === "ArrowRight") {
4681
+ if (current.getAttribute("aria-expanded") === "false") {
4682
+ event.preventDefault();
4683
+ this.requestExpansion(current, true);
4684
+ } else if (current.getAttribute("aria-expanded") === "true") {
4685
+ const child = this.firstVisibleChild(current, items);
4686
+ if (child) {
4687
+ event.preventDefault();
4688
+ this.focusItem(child);
4689
+ }
4690
+ }
4691
+ }
4317
4692
  };
4318
4693
  render() {
4319
- return h(Host, { key: "474c2154d2abe3c76eee9c36bf552390089df6e8", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "93aedd02f984dd33b5efc811fef417d1199917bd" }));
4694
+ return h(Host, { key: "549c09abc67dc60b16bf2d6b7d6346f214e9d6ae", role: "tree", "aria-label": this.label || "Tree" }, h("slot", { key: "fea59bde97611bf384e32ce4fb2b3eec9aca784f" }));
4320
4695
  }
4321
4696
  };
4322
4697
  UITree.style = uiTreeCss();
@@ -4333,7 +4708,9 @@ var init_ = __esm({
4333
4708
  "./ui-avatar.entry.js": () => Promise.resolve().then(() => (init_ui_avatar_entry(), ui_avatar_entry_exports)),
4334
4709
  "./ui-badge.entry.js": () => Promise.resolve().then(() => (init_ui_badge_entry(), ui_badge_entry_exports)),
4335
4710
  "./ui-button.entry.js": () => Promise.resolve().then(() => (init_ui_button_entry(), ui_button_entry_exports)),
4711
+ "./ui-callout.entry.js": () => Promise.resolve().then(() => (init_ui_callout_entry(), ui_callout_entry_exports)),
4336
4712
  "./ui-checkbox.entry.js": () => Promise.resolve().then(() => (init_ui_checkbox_entry(), ui_checkbox_entry_exports)),
4713
+ "./ui-chip.entry.js": () => Promise.resolve().then(() => (init_ui_chip_entry(), ui_chip_entry_exports)),
4337
4714
  "./ui-combobox.entry.js": () => Promise.resolve().then(() => (init_ui_combobox_entry(), ui_combobox_entry_exports)),
4338
4715
  "./ui-context-menu.entry.js": () => Promise.resolve().then(() => (init_ui_context_menu_entry(), ui_context_menu_entry_exports)),
4339
4716
  "./ui-dialog.entry.js": () => Promise.resolve().then(() => (init_ui_dialog_entry(), ui_dialog_entry_exports)),
@@ -5973,7 +6350,7 @@ var globalScripts = () => {
5973
6350
  var defineCustomElements = async (win2, options) => {
5974
6351
  if (typeof window === "undefined") return void 0;
5975
6352
  await globalScripts();
5976
- return bootstrapLazy([["ui-combobox", [[769, "ui-combobox", { "label": [1], "placeholder": [1], "name": [1], "value": [1], "defaultValue": [1, "default-value"], "query": [1], "defaultQuery": [1, "default-query"], "config": [16], "disabled": [4], "readOnly": [4, "readonly"], "required": [4], "size": [1], "disclosure": [4], "clearable": [4], "help": [1], "raw": [32], "display": [32], "selected": [32], "expanded": [32], "rows": [32], "active": [32], "loading": [32], "helpOpen": [32], "lookupError": [32], "validation": [32], "validate": [64] }, null, { "value": [{ "syncValue": 0 }], "query": [{ "syncQuery": 0 }], "disabled": [{ "syncDisabled": 0 }], "readOnly": [{ "syncDisabled": 0 }], "config": [{ "syncConfig": 0 }] }]]], ["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32], "focusTrigger": [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"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 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 }], "internalOpen": [{ "syncSurface": 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"], "maxDepth": [2, "max-depth"] }]]], ["ui-tree-item", [[769, "ui-tree-item", { "itemId": [1, "item-id"], "label": [1], "depth": [2], "dropDepth": [2, "drop-depth"], "subtreeDepth": [2, "subtree-depth"], "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"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "placement": [1], "showDelay": [2, "show-delay"], "hideDelay": [2, "hide-delay"], "toggleOnClick": [4, "toggle-on-click"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]]], options);
6353
+ return bootstrapLazy([["ui-combobox", [[769, "ui-combobox", { "label": [1], "placeholder": [1], "name": [1], "value": [1], "defaultValue": [1, "default-value"], "query": [1], "defaultQuery": [1, "default-query"], "config": [16], "disabled": [4], "readOnly": [4, "readonly"], "required": [4], "size": [1], "disclosure": [4], "clearable": [4], "help": [1], "raw": [32], "display": [32], "selected": [32], "expanded": [32], "rows": [32], "active": [32], "loading": [32], "helpOpen": [32], "lookupError": [32], "validation": [32], "validate": [64] }, null, { "value": [{ "syncValue": 0 }], "query": [{ "syncQuery": 0 }], "disabled": [{ "syncDisabled": 0 }], "readOnly": [{ "syncDisabled": 0 }], "config": [{ "syncConfig": 0 }] }]]], ["ui-context-menu", [[769, "ui-context-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "internalOpen": [32], "focusTrigger": [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-callout", [[769, "ui-callout", { "tone": [1] }]]], ["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-chip", [[769, "ui-chip", { "appearance": [1] }]]], ["ui-dialog", [[769, "ui-dialog", { "open": [4], "defaultOpen": [4, "default-open"], "modal": [4], "dismissible": [4], "label": [1], "internalOpen": [32], "accessibleLabel": [32] }, null, { "open": [{ "syncFromProp": 0 }], "label": [{ "syncLabelFromProp": 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"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "internalOpen": [{ "onOpenChange": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }] }]]], ["ui-radio", [[769, "ui-radio", { "checked": [4], "defaultChecked": [4, "default-checked"], "disabled": [4], "name": [1], "required": [4], "value": [1], "internalChecked": [32] }, null, { "checked": [{ "syncFromProp": 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 }], "internalOpen": [{ "syncSurface": 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"], "maxDepth": [2, "max-depth"] }]]], ["ui-tree-item", [[769, "ui-tree-item", { "itemId": [1, "item-id"], "label": [1], "dropDepth": [2, "drop-depth"], "subtreeDepth": [2, "subtree-depth"], "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], "structuralLevel": [32], "tabStop": [32] }, null, { "expanded": [{ "syncExpandedFromProp": 0 }] }]]], ["ui-menu", [[769, "ui-menu", { "open": [4], "defaultOpen": [4, "default-open"], "for": [1], "placement": [1], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncSurface": 0 }] }]]], ["ui-tooltip", [[769, "ui-tooltip", { "for": [1], "open": [4], "defaultOpen": [4, "default-open"], "placement": [1], "showDelay": [2, "show-delay"], "hideDelay": [2, "hide-delay"], "toggleOnClick": [4, "toggle-on-click"], "internalOpen": [32] }, null, { "open": [{ "syncFromProp": 0 }], "for": [{ "resetSurface": 0 }], "placement": [{ "resetSurface": 0 }], "internalOpen": [{ "syncOverlay": 0 }] }]]]], options);
5977
6354
  };
5978
6355
 
5979
6356
  // loader/index.js
@@ -6435,6 +6812,8 @@ var LOOMA_ICONS2 = {
6435
6812
  "align-right": import_lucide.AlignRight,
6436
6813
  bold: import_lucide.Bold,
6437
6814
  braces: import_lucide.Braces,
6815
+ "circle-check": import_lucide.CircleCheck,
6816
+ "circle-x": import_lucide.CircleX,
6438
6817
  "chevron-down": import_lucide.ChevronDown,
6439
6818
  "chevron-left": import_lucide.ChevronLeft,
6440
6819
  "code-xml": import_lucide.CodeXml,
@@ -6448,11 +6827,13 @@ var LOOMA_ICONS2 = {
6448
6827
  "heading-3": import_lucide.Heading3,
6449
6828
  highlighter: import_lucide.Highlighter,
6450
6829
  image: import_lucide.Image,
6830
+ info: import_lucide.Info,
6451
6831
  italic: import_lucide.Italic,
6452
6832
  list: import_lucide.List,
6453
6833
  "list-ordered": import_lucide.ListOrdered,
6454
6834
  "list-todo": import_lucide.ListTodo,
6455
6835
  merge: import_lucide.Merge,
6836
+ "notebook-pen": import_lucide.NotebookPen,
6456
6837
  minus: import_lucide.Minus,
6457
6838
  "paint-bucket": import_lucide.PaintBucket,
6458
6839
  "panel-bottom": import_lucide.PanelBottom,
@@ -6468,6 +6849,7 @@ var LOOMA_ICONS2 = {
6468
6849
  strikethrough: import_lucide.Strikethrough,
6469
6850
  table: import_lucide.Table2,
6470
6851
  trash: import_lucide.Trash2,
6852
+ "triangle-alert": import_lucide.TriangleAlert,
6471
6853
  underline: import_lucide.Underline,
6472
6854
  undo: import_lucide.Undo2
6473
6855
  };