@vizejs/ui 0.386.0 → 0.388.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/dist/alert-BX93FNvj.d.mts +92 -0
  2. package/dist/alert-DvhiFK_R.mjs +92 -0
  3. package/dist/alert-dialog-D9tqXQ_Q.mjs +176 -0
  4. package/dist/alert-dialog.d.mts +2 -0
  5. package/dist/alert-dialog.mjs +3 -0
  6. package/dist/alert.d.mts +2 -0
  7. package/dist/alert.mjs +2 -0
  8. package/dist/announcer-CW079p2E.mjs +258 -0
  9. package/dist/announcer-DGr2Iz0i.d.mts +6829 -0
  10. package/dist/announcer.d.mts +2 -0
  11. package/dist/announcer.mjs +2 -0
  12. package/dist/aspect-ratio-DDqVT6Hg.d.mts +62 -0
  13. package/dist/aspect-ratio-_HLW6_5i.mjs +63 -0
  14. package/dist/aspect-ratio.d.mts +2 -0
  15. package/dist/aspect-ratio.mjs +2 -0
  16. package/dist/avatar-6fQfQ-1x.mjs +195 -0
  17. package/dist/avatar.d.mts +2 -0
  18. package/dist/avatar.mjs +2 -0
  19. package/dist/badge-BTOyu4i6.mjs +53 -0
  20. package/dist/badge.d.mts +2 -0
  21. package/dist/badge.mjs +2 -0
  22. package/dist/banner-CYiSiZJW.mjs +288 -0
  23. package/dist/banner.d.mts +2 -0
  24. package/dist/banner.mjs +2 -0
  25. package/dist/block-ui-Bd2m1m3K.mjs +111 -0
  26. package/dist/block-ui.d.mts +2 -0
  27. package/dist/block-ui.mjs +2 -0
  28. package/dist/blockquote-eTqp3b_r.mjs +65 -0
  29. package/dist/blockquote.d.mts +2 -0
  30. package/dist/blockquote.mjs +2 -0
  31. package/dist/breadcrumb-BvuPBfkj.mjs +212 -0
  32. package/dist/breadcrumb-Cdyh20z-.d.mts +202 -0
  33. package/dist/breadcrumb.d.mts +2 -0
  34. package/dist/breadcrumb.mjs +2 -0
  35. package/dist/{button-DYg1mIIq.d.mts → button-Dye0M41O.d.mts} +3 -3
  36. package/dist/{button-DT8AKlds.mjs → button-VVxUavbS.mjs} +6 -6
  37. package/dist/button-group-C_mR0Jfw.d.mts +137 -0
  38. package/dist/button-group-DyQbTCnY.mjs +418 -0
  39. package/dist/button-group.d.mts +2 -0
  40. package/dist/button-group.mjs +2 -0
  41. package/dist/button.d.mts +1 -1
  42. package/dist/button.mjs +2 -2
  43. package/dist/callout-DAu-98Ti.mjs +277 -0
  44. package/dist/callout.d.mts +2 -0
  45. package/dist/callout.mjs +2 -0
  46. package/dist/card-D94n04s5.mjs +66 -0
  47. package/dist/card.d.mts +2 -0
  48. package/dist/card.mjs +2 -0
  49. package/dist/catalog.d.mts +2112 -302
  50. package/dist/catalog.mjs +3831 -433
  51. package/dist/{checkbox-BgIvwjyC.mjs → checkbox-bM5y7vH8.mjs} +8 -8
  52. package/dist/checkbox.d.mts +1 -1
  53. package/dist/checkbox.mjs +2 -2
  54. package/dist/cluster-BWF028Xt.d.mts +133 -0
  55. package/dist/cluster-BydJTp9X.mjs +149 -0
  56. package/dist/cluster.d.mts +2 -0
  57. package/dist/cluster.mjs +2 -0
  58. package/dist/code-D93YXaeJ.mjs +66 -0
  59. package/dist/code.d.mts +2 -0
  60. package/dist/code.mjs +2 -0
  61. package/dist/collapsible-Cra5y_if.mjs +269 -0
  62. package/dist/collapsible.d.mts +2 -0
  63. package/dist/collapsible.mjs +2 -0
  64. package/dist/{collection-B_dFZOHO.d.mts → collection-BaPf8lgw.d.mts} +3 -3
  65. package/dist/{collection-eHN150dT.mjs → collection-Cncgrq4U.mjs} +5 -5
  66. package/dist/collection.d.mts +1 -1
  67. package/dist/collection.mjs +1 -1
  68. package/dist/command-CAH0yrMT.d.mts +105 -0
  69. package/dist/command.d.mts +2 -0
  70. package/dist/command.mjs +123 -0
  71. package/dist/{composite-navigation-Skx3LZsv.mjs → composite-navigation-D6WKS_BY.mjs} +4 -4
  72. package/dist/{composite-navigation-QINW9GLy.d.mts → composite-navigation-i7ocwmio.d.mts} +4 -4
  73. package/dist/composite-navigation.d.mts +1 -1
  74. package/dist/composite-navigation.mjs +1 -1
  75. package/dist/container-5lSCSbeX.mjs +113 -0
  76. package/dist/container-CYSiwCA-.d.mts +99 -0
  77. package/dist/container.d.mts +2 -0
  78. package/dist/container.mjs +2 -0
  79. package/dist/context-7SpwFHtK.d.mts +25 -0
  80. package/dist/context.d.mts +1 -24
  81. package/dist/context.mjs +1 -1
  82. package/dist/{controllable-state-BtoxKahh.d.mts → controllable-state-CZZF9Pw5.d.mts} +1 -1
  83. package/dist/controllable-state.d.mts +1 -1
  84. package/dist/controllable-state.mjs +1 -1
  85. package/dist/copy-button-BH2em7nG.mjs +212 -0
  86. package/dist/copy-button.d.mts +2 -0
  87. package/dist/copy-button.mjs +2 -0
  88. package/dist/{id-BV9AJ3cm.d.mts → deterministic-id-DYQJ7KzM.d.mts} +2 -35
  89. package/dist/{id-mziSyAse.mjs → deterministic-id-yMq4HfmS.mjs} +3 -46
  90. package/dist/dialog-trigger-ppGKikEP.mjs +717 -0
  91. package/dist/dialog.d.mts +2 -0
  92. package/dist/dialog.mjs +2 -0
  93. package/dist/{dismissable-layer-4icKahVs.d.mts → dismissable-layer-CTWSFZwj.d.mts} +2 -2
  94. package/dist/{dismissable-layer-CwG1gtdz.mjs → dismissable-layer-CpS07KUV.mjs} +3 -3
  95. package/dist/dismissable-layer.d.mts +1 -1
  96. package/dist/dismissable-layer.mjs +1 -1
  97. package/dist/drag-and-drop-BjYgWGcG.mjs +918 -0
  98. package/dist/drag-and-drop-CagE25Kt.d.mts +47 -0
  99. package/dist/drag-and-drop-controller-types-DoTSR_aM.d.mts +304 -0
  100. package/dist/drag-and-drop.d.mts +3 -0
  101. package/dist/drag-and-drop.mjs +2 -0
  102. package/dist/empty-state-DtyOxCA4.mjs +73 -0
  103. package/dist/empty-state.d.mts +2 -0
  104. package/dist/empty-state.mjs +2 -0
  105. package/dist/error-summary-6Xis_769.d.mts +65 -0
  106. package/dist/error-summary-DMe4IlM9.mjs +209 -0
  107. package/dist/error-summary-types-5ePaC9O3.d.mts +74 -0
  108. package/dist/error-summary.d.mts +3 -0
  109. package/dist/error-summary.mjs +2 -0
  110. package/dist/field-CBs2-Z9B.mjs +254 -0
  111. package/dist/field-WWPaJT1x.d.mts +235 -0
  112. package/dist/field-wiring-9Fy-G1rf.d.mts +14 -0
  113. package/dist/field-wiring-runtime-fQ3GoLuG.mjs +64 -0
  114. package/dist/field-wiring-types-Bfyis5hO.d.mts +73 -0
  115. package/dist/field-wiring.d.mts +3 -0
  116. package/dist/field-wiring.mjs +2 -0
  117. package/dist/field.d.mts +2 -0
  118. package/dist/field.mjs +2 -0
  119. package/dist/{focus-CAWi_I-0.mjs → focus-XxVWOwbs.mjs} +3 -3
  120. package/dist/{focus-K6dOifoZ.d.mts → focus-eObxGOtP.d.mts} +2 -2
  121. package/dist/{focus-guards-Bt0C-0qS.d.mts → focus-guards-BZa7vm6O.d.mts} +2 -2
  122. package/dist/{focus-guards-DhMPQAT8.mjs → focus-guards-DSxiemx7.mjs} +4 -4
  123. package/dist/focus-guards.d.mts +1 -1
  124. package/dist/focus-guards.mjs +1 -1
  125. package/dist/{focus-scope-CavhKWx0.d.mts → focus-scope-CsnioDR4.d.mts} +3 -3
  126. package/dist/{focus-scope-dom-DBwNEWxG.mjs → focus-scope-dom-L_EC5GsX.mjs} +2 -2
  127. package/dist/{focus-scope-D9U1aj67.mjs → focus-scope-mEg8UoeE.mjs} +5 -5
  128. package/dist/focus-scope.d.mts +1 -1
  129. package/dist/focus-scope.mjs +1 -1
  130. package/dist/focus.d.mts +1 -1
  131. package/dist/focus.mjs +1 -1
  132. package/dist/form-1V2V30Sv.d.mts +20 -0
  133. package/dist/form-runtime-CcMDY0Iq.mjs +166 -0
  134. package/dist/form-types-DXwZRLcs.d.mts +183 -0
  135. package/dist/form.d.mts +3 -0
  136. package/dist/form.mjs +2 -0
  137. package/dist/fullscreen-button-NTbC4R0W.mjs +276 -0
  138. package/dist/fullscreen-button.d.mts +2 -0
  139. package/dist/fullscreen-button.mjs +2 -0
  140. package/dist/grid-BSM9h2dL.d.mts +154 -0
  141. package/dist/grid-DeC4Wn7Y.mjs +157 -0
  142. package/dist/grid.d.mts +2 -0
  143. package/dist/grid.mjs +2 -0
  144. package/dist/heading-DToVOKV3.mjs +86 -0
  145. package/dist/heading.d.mts +2 -0
  146. package/dist/heading.mjs +2 -0
  147. package/dist/history-BDgNOjcV.mjs +304 -0
  148. package/dist/history-BkcOSOWb.d.mts +157 -0
  149. package/dist/history.d.mts +2 -0
  150. package/dist/history.mjs +2 -0
  151. package/dist/{hover-BXwwbSaO.d.mts → hover-ZiPRiZkb.d.mts} +2 -2
  152. package/dist/hover.d.mts +1 -1
  153. package/dist/hover.mjs +1 -1
  154. package/dist/icon-DhTTndMu.mjs +233 -0
  155. package/dist/icon-button-BuXquME1.mjs +188 -0
  156. package/dist/icon-button.d.mts +2 -0
  157. package/dist/icon-button.mjs +2 -0
  158. package/dist/icon.d.mts +2 -0
  159. package/dist/icon.mjs +2 -0
  160. package/dist/id-BYG8aXPF.mjs +47 -0
  161. package/dist/id-Ba8FHjAo.d.mts +34 -0
  162. package/dist/id.d.mts +2 -1
  163. package/dist/id.mjs +3 -2
  164. package/dist/index.d.mts +74 -24
  165. package/dist/index.mjs +113 -21
  166. package/dist/{inert-outside-tuHRmaqJ.d.mts → inert-outside-B6KdwAHY.d.mts} +2 -2
  167. package/dist/{inert-outside-CyqtoKQ4.mjs → inert-outside-DOufBTyy.mjs} +4 -4
  168. package/dist/inert-outside.d.mts +1 -1
  169. package/dist/inert-outside.mjs +1 -1
  170. package/dist/input-Blyx59CR.mjs +256 -0
  171. package/dist/input-C0fgeRnS.d.mts +159 -0
  172. package/dist/input.d.mts +2 -0
  173. package/dist/input.mjs +2 -0
  174. package/dist/{interaction-modality-DOZK0BpZ.mjs → interaction-modality-BHnjtU4S.mjs} +3 -3
  175. package/dist/{interaction-modality-jgHKjPFB.d.mts → interaction-modality-BTiZ7j98.d.mts} +2 -2
  176. package/dist/interaction-modality.d.mts +1 -1
  177. package/dist/interaction-modality.mjs +1 -1
  178. package/dist/kbd-sJdXIdIm.mjs +66 -0
  179. package/dist/kbd.d.mts +2 -0
  180. package/dist/kbd.mjs +2 -0
  181. package/dist/link-DDaCjrI5.mjs +154 -0
  182. package/dist/link-MbRDN6wJ.d.mts +94 -0
  183. package/dist/link.d.mts +2 -0
  184. package/dist/link.mjs +2 -0
  185. package/dist/list-DjyCLVfG.mjs +66 -0
  186. package/dist/list.d.mts +2 -0
  187. package/dist/list.mjs +2 -0
  188. package/dist/listbox-IaqaoiRn.mjs +549 -0
  189. package/dist/listbox.d.mts +2 -0
  190. package/dist/listbox.mjs +2 -0
  191. package/dist/live-region-DYSpwCTk.mjs +48 -0
  192. package/dist/live-region-G1iobPK5.d.mts +67 -0
  193. package/dist/live-region-runtime-DVUch8Lu.mjs +62 -0
  194. package/dist/live-region.d.mts +2 -0
  195. package/dist/live-region.mjs +3 -0
  196. package/dist/locale-DzWqhJZs.mjs +206 -0
  197. package/dist/locale.d.mts +2 -0
  198. package/dist/locale.mjs +2 -0
  199. package/dist/{long-press-cll6z2K9.d.mts → long-press-DyYxp191.d.mts} +3 -3
  200. package/dist/{long-press-Dsul69gk.mjs → long-press-yJk5zK0j.mjs} +4 -4
  201. package/dist/long-press.d.mts +1 -1
  202. package/dist/long-press.mjs +1 -1
  203. package/dist/measure-4I0YOAXD.d.mts +97 -0
  204. package/dist/measure-runtime-C4qYJp3_.mjs +170 -0
  205. package/dist/measure.d.mts +2 -0
  206. package/dist/measure.mjs +2 -0
  207. package/dist/media-pdf.d.mts +1 -1
  208. package/dist/media-pdf.mjs +1 -1
  209. package/dist/media-source.d.mts +1 -1
  210. package/dist/media-source.mjs +1 -1
  211. package/dist/media.d.mts +1 -1
  212. package/dist/media.mjs +1 -1
  213. package/dist/meter-B3m17_8g.d.mts +174 -0
  214. package/dist/meter-BwOXVWH8.mjs +243 -0
  215. package/dist/meter.d.mts +2 -0
  216. package/dist/meter.mjs +2 -0
  217. package/dist/motion-OdERKfZR.mjs +174 -0
  218. package/dist/motion-iUSBdWaI.d.mts +98 -0
  219. package/dist/motion.d.mts +2 -0
  220. package/dist/motion.mjs +2 -0
  221. package/dist/{move-BOmXDYbh.d.mts → move-BJGaV7Y9.d.mts} +2 -2
  222. package/dist/move-internal-BM_7g70h.mjs +172 -0
  223. package/dist/move.d.mts +1 -1
  224. package/dist/move.mjs +216 -1
  225. package/dist/native-select-H9qvaqQH.mjs +309 -0
  226. package/dist/native-select.d.mts +2 -0
  227. package/dist/native-select.mjs +2 -0
  228. package/dist/pagination-Bs4SBSE4.mjs +791 -0
  229. package/dist/pagination.d.mts +2 -0
  230. package/dist/pagination.mjs +2 -0
  231. package/dist/{pdf-source-zu1LkCeE.mjs → pdf-source-B5JSDKkQ.mjs} +1 -1
  232. package/dist/{pdf-source-BYFK2Pks.d.mts → pdf-source-adS6ZSmR.d.mts} +1 -1
  233. package/dist/pointer-grace-CAFcO4om.d.mts +57 -0
  234. package/dist/pointer-grace-DI0G3oRJ.mjs +162 -0
  235. package/dist/pointer-grace.d.mts +2 -0
  236. package/dist/pointer-grace.mjs +2 -0
  237. package/dist/popover-DeENBKXE.mjs +714 -0
  238. package/dist/popover.d.mts +2 -0
  239. package/dist/popover.mjs +2 -0
  240. package/dist/portal-DeHaLxGL.mjs +114 -0
  241. package/dist/portal-DhWXejr1.d.mts +71 -0
  242. package/dist/portal.d.mts +2 -0
  243. package/dist/portal.mjs +2 -0
  244. package/dist/positioner-BYJVA3Uy.d.mts +477 -0
  245. package/dist/positioner-BYmQk86M.mjs +38 -0
  246. package/dist/positioner-DaPo2YxM.mjs +708 -0
  247. package/dist/positioner.d.mts +2 -0
  248. package/dist/positioner.mjs +3 -0
  249. package/dist/presence-Bhv1qtvn.d.mts +57 -0
  250. package/dist/presence-CTG1EV3w.mjs +62 -0
  251. package/dist/presence-runtime-CYwCafSh.mjs +105 -0
  252. package/dist/presence-types-CRB4HbML.d.mts +45 -0
  253. package/dist/presence.d.mts +3 -0
  254. package/dist/presence.mjs +3 -0
  255. package/dist/{press-N_mE3Mgx.mjs → press-BjLm6bKg.mjs} +6 -6
  256. package/dist/press-R0_juZq2.d.mts +14 -0
  257. package/dist/{press-event-Cd2OPpmw.mjs → press-event-xlWYF9py.mjs} +1 -1
  258. package/dist/{press-types-CNqStzJf.d.mts → press-types-DfTNpqby.d.mts} +1 -1
  259. package/dist/press.d.mts +2 -13
  260. package/dist/press.mjs +1 -1
  261. package/dist/{primitive-C8jW7DLd.d.mts → primitive-BE2mdUcw.d.mts} +2 -2
  262. package/dist/{primitive-BX31dogp.mjs → primitive-beb2EEOc.mjs} +5 -5
  263. package/dist/primitive.d.mts +1 -1
  264. package/dist/primitive.mjs +2 -2
  265. package/dist/print-button-FqD5HqTV.mjs +206 -0
  266. package/dist/print-button.d.mts +2 -0
  267. package/dist/print-button.mjs +2 -0
  268. package/dist/progress--vbV2wTx.mjs +145 -0
  269. package/dist/progress-C4PlKwWq.d.mts +128 -0
  270. package/dist/progress-bar-BqS94auR.mjs +301 -0
  271. package/dist/progress-bar.d.mts +2 -0
  272. package/dist/progress-bar.mjs +2 -0
  273. package/dist/progress.d.mts +2 -0
  274. package/dist/progress.mjs +2 -0
  275. package/dist/radio-group-DbTmWcxl.mjs +317 -0
  276. package/dist/radio-group.d.mts +2 -0
  277. package/dist/radio-group.mjs +2 -0
  278. package/dist/rating-BjKLGPP6.mjs +569 -0
  279. package/dist/rating-souDdL9t.d.mts +273 -0
  280. package/dist/rating.d.mts +2 -0
  281. package/dist/rating.mjs +2 -0
  282. package/dist/scroll-area-BRSwoi9w.mjs +338 -0
  283. package/dist/scroll-area.d.mts +2 -0
  284. package/dist/scroll-area.mjs +2 -0
  285. package/dist/{scroll-lock-Ckbmm0-J.mjs → scroll-lock-BcmK0baN.mjs} +4 -4
  286. package/dist/{scroll-lock-BgVtX4wT.d.mts → scroll-lock-OfSQnfi0.d.mts} +2 -2
  287. package/dist/scroll-lock.d.mts +1 -1
  288. package/dist/scroll-lock.mjs +1 -1
  289. package/dist/search-field-70Kr2616.mjs +319 -0
  290. package/dist/search-field-Biw9vApG.d.mts +158 -0
  291. package/dist/search-field.d.mts +2 -0
  292. package/dist/search-field.mjs +2 -0
  293. package/dist/separator-CnNDqbdR.d.mts +59 -0
  294. package/dist/separator-DDj3tEAz.mjs +66 -0
  295. package/dist/separator.d.mts +2 -0
  296. package/dist/separator.mjs +2 -0
  297. package/dist/share-button-DfvUDFC-.mjs +243 -0
  298. package/dist/share-button.d.mts +2 -0
  299. package/dist/share-button.mjs +2 -0
  300. package/dist/shortcut-CvA_o0_F.mjs +631 -0
  301. package/dist/shortcut-DAZJ9LEd.d.mts +231 -0
  302. package/dist/shortcut.d.mts +2 -0
  303. package/dist/shortcut.mjs +2 -0
  304. package/dist/skeleton-BYXXcwTH.mjs +101 -0
  305. package/dist/skeleton-CQW-Tsnt.d.mts +99 -0
  306. package/dist/skeleton.d.mts +2 -0
  307. package/dist/skeleton.mjs +2 -0
  308. package/dist/skip-link-BUp9HXXt.mjs +164 -0
  309. package/dist/skip-link-DHDrtnP2.d.mts +98 -0
  310. package/dist/skip-link.d.mts +2 -0
  311. package/dist/skip-link.mjs +2 -0
  312. package/dist/slider-BiZSZLDp.mjs +475 -0
  313. package/dist/slider-CYBbxeNy.d.mts +246 -0
  314. package/dist/slider.d.mts +2 -0
  315. package/dist/slider.mjs +2 -0
  316. package/dist/sortable-BntjgYra.mjs +499 -0
  317. package/dist/sortable-DQl92bwo.d.mts +206 -0
  318. package/dist/sortable.d.mts +2 -0
  319. package/dist/sortable.mjs +2 -0
  320. package/dist/spacer-Bc0dInvi.mjs +117 -0
  321. package/dist/spacer-DFstG4G-.d.mts +105 -0
  322. package/dist/spacer.d.mts +2 -0
  323. package/dist/spacer.mjs +2 -0
  324. package/dist/{spatial-navigation-CHj9mDZH.d.mts → spatial-navigation-BPVJGSiJ.d.mts} +3 -3
  325. package/dist/{spatial-navigation-D6-UDavU.mjs → spatial-navigation-DwcUYMyc.mjs} +2 -2
  326. package/dist/spatial-navigation.d.mts +1 -1
  327. package/dist/spatial-navigation.mjs +1 -1
  328. package/dist/spinner-JnRs8fp-.d.mts +155 -0
  329. package/dist/spinner-bizL-oOg.mjs +200 -0
  330. package/dist/spinner.d.mts +2 -0
  331. package/dist/spinner.mjs +2 -0
  332. package/dist/stack-C7DOIxo-.mjs +137 -0
  333. package/dist/stack-CPtBckZB.d.mts +127 -0
  334. package/dist/stack.d.mts +2 -0
  335. package/dist/stack.mjs +2 -0
  336. package/dist/status-light-BGWgQRRf.mjs +125 -0
  337. package/dist/status-light.d.mts +2 -0
  338. package/dist/status-light.mjs +2 -0
  339. package/dist/stepper-CwX6BZaN.mjs +912 -0
  340. package/dist/stepper.d.mts +2 -0
  341. package/dist/stepper.mjs +2 -0
  342. package/dist/style.css +1 -1
  343. package/dist/surface-C2fnxL3g.mjs +102 -0
  344. package/dist/surface.d.mts +2 -0
  345. package/dist/surface.mjs +2 -0
  346. package/dist/switch-Ck5YmfXb.mjs +197 -0
  347. package/dist/switch.d.mts +2 -0
  348. package/dist/switch.mjs +2 -0
  349. package/dist/table-BxU7htxc.mjs +349 -0
  350. package/dist/table-Ce3yWwlH.d.mts +415 -0
  351. package/dist/table.d.mts +2 -0
  352. package/dist/table.mjs +2 -0
  353. package/dist/tabs-DSXIomI_.mjs +595 -0
  354. package/dist/tabs.d.mts +2 -0
  355. package/dist/tabs.mjs +2 -0
  356. package/dist/text-BVeNKPiv.mjs +76 -0
  357. package/dist/text.d.mts +2 -0
  358. package/dist/text.mjs +2 -0
  359. package/dist/textarea-4eIDNcvv.d.mts +175 -0
  360. package/dist/textarea-BZimEPBR.mjs +279 -0
  361. package/dist/textarea.d.mts +2 -0
  362. package/dist/textarea.mjs +2 -0
  363. package/dist/theme-C8Crmb8V.mjs +139 -0
  364. package/dist/theme-CNK06Pja.d.mts +38 -0
  365. package/dist/theme-constants-DAwnxG-P.mjs +29 -0
  366. package/dist/theme-preset-atelier.css +1 -0
  367. package/dist/theme-preset-headless.css +1 -0
  368. package/dist/theme-preset-high-contrast.css +1 -0
  369. package/dist/theme-preset-midnight.css +1 -0
  370. package/dist/theme-preset-paper.css +1 -0
  371. package/dist/theme-preset-play.css +1 -0
  372. package/dist/theme-preset-signal.css +1 -0
  373. package/dist/theme-scope.d.mts +25 -0
  374. package/dist/theme-scope.mjs +89 -0
  375. package/dist/theme-types-CkIa4Sa3.d.mts +71 -0
  376. package/dist/theme.css +1 -0
  377. package/dist/theme.d.mts +3 -0
  378. package/dist/theme.mjs +3 -0
  379. package/dist/toggle-CBTXzwze.mjs +141 -0
  380. package/dist/toggle-group-DO7eGEs3.d.mts +147 -0
  381. package/dist/toggle-group-DybU9N7k.mjs +523 -0
  382. package/dist/toggle-group.d.mts +2 -0
  383. package/dist/toggle-group.mjs +2 -0
  384. package/dist/toggle.d.mts +2 -0
  385. package/dist/toggle.mjs +2 -0
  386. package/dist/toolbar-CIU1bor0.d.mts +259 -0
  387. package/dist/toolbar-CXE8YCX-.mjs +425 -0
  388. package/dist/toolbar.d.mts +2 -0
  389. package/dist/toolbar.mjs +2 -0
  390. package/dist/tooltip-Cgii5xMx.mjs +485 -0
  391. package/dist/tooltip.d.mts +2 -0
  392. package/dist/tooltip.mjs +2 -0
  393. package/dist/transition-BmgFyzA6.mjs +168 -0
  394. package/dist/transition-BtIWNEFU.d.mts +82 -0
  395. package/dist/transition.d.mts +2 -0
  396. package/dist/transition.mjs +2 -0
  397. package/dist/{typeahead-B7KDxE_u.mjs → typeahead-DZSBI5m5.mjs} +2 -2
  398. package/dist/{typeahead-BbgUB2Bj.d.mts → typeahead-Dl6w5PAN.d.mts} +3 -3
  399. package/dist/typeahead.d.mts +1 -1
  400. package/dist/typeahead.mjs +1 -1
  401. package/dist/virtualizer-BlxKjT3W.mjs +793 -0
  402. package/dist/virtualizer-D9qfT4wS.d.mts +349 -0
  403. package/dist/virtualizer.d.mts +2 -0
  404. package/dist/virtualizer.mjs +2 -0
  405. package/dist/{visually-hidden-BOqfqBFt.d.mts → visually-hidden-CUr9BX0K.d.mts} +1 -1
  406. package/dist/{visually-hidden-BwDOx5yf.mjs → visually-hidden-SDjRJYRK.mjs} +5 -5
  407. package/dist/visually-hidden.d.mts +1 -1
  408. package/dist/visually-hidden.mjs +2 -2
  409. package/package.json +426 -7
  410. package/dist/checkbox-DP3_ko7D.d.mts +0 -61
  411. package/dist/move-BVvMHzxr.mjs +0 -386
@@ -0,0 +1,631 @@
1
+ import { getCurrentScope, isRef, onScopeDispose, shallowReadonly, shallowRef, toValue, watch } from "vue";
2
+ //#region src/families/interaction/shortcut/shortcut-parse.ts
3
+ const parseDiagnostic = "VIZE_UI_SHORTCUT_PATTERN";
4
+ const platformDiagnostic = "VIZE_UI_SHORTCUT_PLATFORM";
5
+ const modifierTokens = new Map([
6
+ ["alt", "alt"],
7
+ ["option", "alt"],
8
+ ["opt", "alt"],
9
+ ["ctrl", "ctrl"],
10
+ ["control", "ctrl"],
11
+ ["meta", "meta"],
12
+ ["cmd", "meta"],
13
+ ["command", "meta"],
14
+ ["win", "meta"],
15
+ ["super", "meta"],
16
+ ["shift", "shift"],
17
+ ["mod", "mod"]
18
+ ]);
19
+ const keyAliases = new Map([
20
+ ["esc", "Escape"],
21
+ ["escape", "Escape"],
22
+ ["return", "Enter"],
23
+ ["enter", "Enter"],
24
+ ["space", " "],
25
+ ["spacebar", " "],
26
+ ["plus", "+"],
27
+ ["tab", "Tab"],
28
+ ["backspace", "Backspace"],
29
+ ["delete", "Delete"],
30
+ ["del", "Delete"],
31
+ ["insert", "Insert"],
32
+ ["home", "Home"],
33
+ ["end", "End"],
34
+ ["pageup", "PageUp"],
35
+ ["pagedown", "PageDown"],
36
+ ["up", "ArrowUp"],
37
+ ["arrowup", "ArrowUp"],
38
+ ["down", "ArrowDown"],
39
+ ["arrowdown", "ArrowDown"],
40
+ ["left", "ArrowLeft"],
41
+ ["arrowleft", "ArrowLeft"],
42
+ ["right", "ArrowRight"],
43
+ ["arrowright", "ArrowRight"],
44
+ ["contextmenu", "ContextMenu"],
45
+ ["capslock", "CapsLock"],
46
+ ["numlock", "NumLock"],
47
+ ["scrolllock", "ScrollLock"],
48
+ ["printscreen", "PrintScreen"],
49
+ ["pause", "Pause"]
50
+ ]);
51
+ const platforms = new Set(["apple", "standard"]);
52
+ const applePlatformPattern = /mac|iphone|ipad|ipod/i;
53
+ /**
54
+ * Detect the modifier layout of the current environment.
55
+ *
56
+ * Server rendering has no ambient keyboard, so the detector deterministically
57
+ * reports `standard` there; pass an explicit platform when formatting keycaps
58
+ * into server-rendered markup.
59
+ */
60
+ function detectShortcutPlatform() {
61
+ const navigatorLike = globalThis.navigator;
62
+ if (!navigatorLike) return "standard";
63
+ const surface = `${navigatorLike.platform ?? ""} ${navigatorLike.userAgent ?? ""}`;
64
+ return applePlatformPattern.test(surface) ? "apple" : "standard";
65
+ }
66
+ function readPlatform(platform) {
67
+ if (platform === void 0) return detectShortcutPlatform();
68
+ if (!platforms.has(platform)) throw new TypeError(`${platformDiagnostic}: platform must be "apple" or "standard"`);
69
+ return platform;
70
+ }
71
+ /** True when the key value is a single character rather than a named key. */
72
+ function isCharacterKeyValue(value) {
73
+ if (value.length === 0) return false;
74
+ return value.length === ((value.codePointAt(0) ?? 0) > 65535 ? 2 : 1);
75
+ }
76
+ /** Canonicalize one key token to its `KeyboardEvent.key` value. */
77
+ function normalizeKeyToken(token) {
78
+ const alias = keyAliases.get(token.toLowerCase());
79
+ if (alias !== void 0) return alias;
80
+ if (isCharacterKeyValue(token)) return token.toLowerCase();
81
+ if (/^f([1-9]|1\d|2[0-4])$/i.test(token)) return token.toUpperCase();
82
+ return token[0].toUpperCase() + token.slice(1);
83
+ }
84
+ function parseChord(step, platform, pattern) {
85
+ const tokens = step.split("+");
86
+ if (tokens.length > 1 && tokens.at(-1) === "" && tokens.at(-2) === "") tokens.splice(-2, 2, "plus");
87
+ const chord = {
88
+ key: "",
89
+ altKey: false,
90
+ ctrlKey: false,
91
+ metaKey: false,
92
+ shiftKey: false
93
+ };
94
+ for (const [index, token] of tokens.entries()) {
95
+ if (token === "") throw new TypeError(`${parseDiagnostic}: empty token in "${pattern}"`);
96
+ const modifier = modifierTokens.get(token.toLowerCase());
97
+ if (modifier !== void 0 && index < tokens.length - 1) {
98
+ const resolved = modifier === "mod" ? platform === "apple" ? "meta" : "ctrl" : modifier;
99
+ const property = `${resolved}Key`;
100
+ if (chord[property]) throw new TypeError(`${parseDiagnostic}: duplicate ${resolved} modifier in "${pattern}"`);
101
+ chord[property] = true;
102
+ continue;
103
+ }
104
+ if (index !== tokens.length - 1) throw new TypeError(`${parseDiagnostic}: "${token}" is not a modifier in "${pattern}"`);
105
+ chord.key = normalizeKeyToken(token);
106
+ }
107
+ if (chord.key === "") throw new TypeError(`${parseDiagnostic}: chord in "${pattern}" is missing a key`);
108
+ return Object.freeze(chord);
109
+ }
110
+ /**
111
+ * Parse a shortcut pattern into a normalized chord sequence.
112
+ *
113
+ * Chord steps are separated by whitespace and each step joins modifiers and
114
+ * one key with `+`, e.g. `"Mod+K"`, `"Ctrl+Shift+P"`, or `"G D"`. `Mod`
115
+ * resolves to Meta on Apple layouts and Control elsewhere.
116
+ */
117
+ function parseShortcut(pattern, options = {}) {
118
+ if (typeof pattern !== "string" || pattern.trim() === "") throw new TypeError(`${parseDiagnostic}: pattern must be a non-empty string`);
119
+ const platform = readPlatform(options.platform);
120
+ const steps = pattern.trim().split(/\s+/);
121
+ return Object.freeze(steps.map((step) => parseChord(step, platform, pattern)));
122
+ }
123
+ const chordShape = [
124
+ "key",
125
+ "altKey",
126
+ "ctrlKey",
127
+ "metaKey",
128
+ "shiftKey"
129
+ ];
130
+ /** Validate and freeze a caller-supplied sequence without re-parsing. */
131
+ function toShortcutSequence(value, platform) {
132
+ if (typeof value === "string") return parseShortcut(value, { platform });
133
+ if (!Array.isArray(value) || value.length === 0) throw new TypeError(`${parseDiagnostic}: shortcut must be a pattern or a non-empty sequence`);
134
+ return Object.freeze(value.map((chord) => {
135
+ if (typeof chord?.key !== "string" || chord.key === "") throw new TypeError(`${parseDiagnostic}: every chord must carry a non-empty key`);
136
+ for (const property of chordShape.slice(1)) if (typeof chord[property] !== "boolean") throw new TypeError(`${parseDiagnostic}: chord ${String(property)} must be a boolean`);
137
+ return Object.freeze({
138
+ key: isCharacterKeyValue(chord.key) ? chord.key.toLowerCase() : chord.key,
139
+ altKey: chord.altKey,
140
+ ctrlKey: chord.ctrlKey,
141
+ metaKey: chord.metaKey,
142
+ shiftKey: chord.shiftKey
143
+ });
144
+ }));
145
+ }
146
+ /** Stable identity string used for routing and conflict detection. */
147
+ function serializeShortcut(sequence) {
148
+ return sequence.map((chord) => [
149
+ chord.altKey ? "Alt+" : "",
150
+ chord.ctrlKey ? "Ctrl+" : "",
151
+ chord.metaKey ? "Meta+" : "",
152
+ chord.shiftKey ? "Shift+" : "",
153
+ chord.key === "+" ? "Plus" : chord.key
154
+ ].join("")).join(" ");
155
+ }
156
+ const modifierKeys = new Set([
157
+ "Alt",
158
+ "AltGraph",
159
+ "Control",
160
+ "Meta",
161
+ "Shift",
162
+ "OS"
163
+ ]);
164
+ /** True when the event is a lone modifier press that can never end a chord. */
165
+ function isModifierOnlyEvent(event) {
166
+ return modifierKeys.has(event.key);
167
+ }
168
+ /** Build the normalized chord described by one keyboard event. */
169
+ function chordFromEvent(event) {
170
+ const key = typeof event.key === "string" ? event.key : "";
171
+ return Object.freeze({
172
+ key: isCharacterKeyValue(key) ? key.toLowerCase() : key,
173
+ altKey: event.altKey === true,
174
+ ctrlKey: event.ctrlKey === true,
175
+ metaKey: event.metaKey === true,
176
+ shiftKey: event.shiftKey === true
177
+ });
178
+ }
179
+ //#endregion
180
+ //#region src/families/interaction/shortcut/shortcut-registry.ts
181
+ const optionDiagnostic$1 = "VIZE_UI_SHORTCUT_OPTION";
182
+ function readOptionalBoolean(value, name) {
183
+ if (value === void 0) return false;
184
+ if (typeof value !== "boolean") throw new TypeError(`${optionDiagnostic$1}: ${name} must be a boolean`);
185
+ return value;
186
+ }
187
+ function validateBindingStatics(options) {
188
+ if (typeof options.handler !== "function") throw new TypeError(`${optionDiagnostic$1}: handler must be a function`);
189
+ if (options.scope !== void 0 && (typeof options.scope !== "string" || options.scope === "")) throw new TypeError(`${optionDiagnostic$1}: scope must be a non-empty string`);
190
+ if (options.description !== void 0 && typeof options.description !== "string") throw new TypeError(`${optionDiagnostic$1}: description must be a string`);
191
+ readOptionalBoolean(options.allowRepeat, "allowRepeat");
192
+ readOptionalBoolean(options.allowInEditable, "allowInEditable");
193
+ if (options.preventDefault !== void 0 && typeof options.preventDefault !== "boolean") throw new TypeError(`${optionDiagnostic$1}: preventDefault must be a boolean`);
194
+ }
195
+ function readWhen(binding) {
196
+ const value = toValue(binding.when);
197
+ if (value === void 0) return true;
198
+ if (typeof value !== "boolean") throw new TypeError(`${optionDiagnostic$1}: when must resolve to a boolean`);
199
+ return value;
200
+ }
201
+ function chordEquals(left, right) {
202
+ if (left.altKey !== right.altKey || left.ctrlKey !== right.ctrlKey || left.metaKey !== right.metaKey || left.shiftKey !== right.shiftKey) return false;
203
+ return isCharacterKeyValue(left.key) ? left.key === right.key : left.key.toLowerCase() === right.key.toLowerCase();
204
+ }
205
+ const nonTextInputTypes = new Set([
206
+ "button",
207
+ "checkbox",
208
+ "color",
209
+ "file",
210
+ "image",
211
+ "radio",
212
+ "range",
213
+ "reset",
214
+ "submit"
215
+ ]);
216
+ /** Detect text-editing targets across light and shadow DOM retargeting. */
217
+ function isEditableEventTarget(event) {
218
+ const path = typeof event.composedPath === "function" ? event.composedPath() : [];
219
+ const target = path.length > 0 ? path[0] : event.target;
220
+ if (!target || target.nodeType !== 1) return false;
221
+ const element = target;
222
+ if (element.isContentEditable === true) return true;
223
+ const tag = element.tagName;
224
+ if (tag === "TEXTAREA" || tag === "SELECT") return true;
225
+ if (tag === "INPUT") return !nonTextInputTypes.has(element.type);
226
+ return false;
227
+ }
228
+ function scopeDepth(scope, activeScopes) {
229
+ if (scope === "global") return -1;
230
+ return activeScopes.lastIndexOf(scope);
231
+ }
232
+ function isCandidate(binding, activeScopes, isEditable, isRepeat) {
233
+ if (binding.scope !== "global" && !activeScopes.includes(binding.scope)) return false;
234
+ if (isEditable && !binding.allowInEditable) return false;
235
+ if (isRepeat && !(binding.allowRepeat && binding.sequence.length === 1)) return false;
236
+ return readWhen(binding);
237
+ }
238
+ function startsWith(sequence, prefix) {
239
+ return prefix.every((chord, index) => chordEquals(sequence[index], chord));
240
+ }
241
+ /**
242
+ * Route one accepted chord against the registered bindings.
243
+ *
244
+ * Exact matches win over pending extensions. Among exact matches the binding
245
+ * in the most recently activated scope wins, and within one scope the most
246
+ * recently registered binding wins.
247
+ */
248
+ function routeChord(bindings, activeScopes, next, context) {
249
+ let winner = null;
250
+ let winnerDepth = Number.NEGATIVE_INFINITY;
251
+ let pendingPreventDefault = false;
252
+ let hasPrefix = false;
253
+ for (const binding of bindings) {
254
+ if (binding.sequence.length < next.length) continue;
255
+ if (!startsWith(binding.sequence, next)) continue;
256
+ if (!isCandidate(binding, activeScopes, context.isEditable, context.isRepeat)) continue;
257
+ if (binding.sequence.length > next.length) {
258
+ hasPrefix = true;
259
+ if (binding.preventDefault) pendingPreventDefault = true;
260
+ continue;
261
+ }
262
+ const depth = scopeDepth(binding.scope, activeScopes);
263
+ if (winner === null || depth > winnerDepth || depth === winnerDepth && binding.order > winner.order) {
264
+ winner = binding;
265
+ winnerDepth = depth;
266
+ }
267
+ }
268
+ if (winner !== null) return {
269
+ type: "match",
270
+ binding: winner
271
+ };
272
+ if (hasPrefix) return {
273
+ type: "pending",
274
+ preventDefault: pendingPreventDefault
275
+ };
276
+ return { type: "none" };
277
+ }
278
+ function toBindingInfo(binding) {
279
+ return Object.freeze({
280
+ shortcut: binding.sequence,
281
+ scope: binding.scope,
282
+ description: binding.description
283
+ });
284
+ }
285
+ /** Group same-scope bindings that claim one identical normalized sequence. */
286
+ function collectConflicts(bindings) {
287
+ const groups = /* @__PURE__ */ new Map();
288
+ for (const binding of bindings) {
289
+ const groupKey = `${binding.scope}${binding.sequenceId}`;
290
+ const group = groups.get(groupKey);
291
+ if (group) group.push(binding);
292
+ else groups.set(groupKey, [binding]);
293
+ }
294
+ const conflicts = [];
295
+ for (const group of groups.values()) {
296
+ if (group.length < 2) continue;
297
+ const [first] = group;
298
+ conflicts.push(Object.freeze({
299
+ scope: first.scope,
300
+ shortcut: first.sequence,
301
+ bindings: Object.freeze(group.map(toBindingInfo))
302
+ }));
303
+ }
304
+ return Object.freeze(conflicts);
305
+ }
306
+ //#endregion
307
+ //#region src/families/interaction/shortcut/shortcut-format.ts
308
+ const symbolModifiers = {
309
+ apple: [
310
+ ["ctrlKey", "⌃"],
311
+ ["altKey", "⌥"],
312
+ ["shiftKey", "⇧"],
313
+ ["metaKey", "⌘"]
314
+ ],
315
+ standard: [
316
+ ["ctrlKey", "Ctrl"],
317
+ ["altKey", "Alt"],
318
+ ["shiftKey", "Shift"],
319
+ ["metaKey", "Meta"]
320
+ ]
321
+ };
322
+ const textModifiers = {
323
+ apple: [
324
+ ["ctrlKey", "Control"],
325
+ ["altKey", "Option"],
326
+ ["shiftKey", "Shift"],
327
+ ["metaKey", "Command"]
328
+ ],
329
+ standard: symbolModifiers.standard
330
+ };
331
+ const symbolKeys = new Map([
332
+ ["Enter", "↩"],
333
+ ["Backspace", "⌫"],
334
+ ["Delete", "⌦"],
335
+ ["Escape", "⎋"],
336
+ ["Tab", "⇥"],
337
+ ["CapsLock", "⇪"]
338
+ ]);
339
+ const sharedKeycaps = new Map([
340
+ ["ArrowUp", "↑"],
341
+ ["ArrowDown", "↓"],
342
+ ["ArrowLeft", "←"],
343
+ ["ArrowRight", "→"],
344
+ [" ", "Space"]
345
+ ]);
346
+ const textKeys = new Map([["Escape", "Esc"]]);
347
+ function keycapForKey(key, platform, style) {
348
+ const shared = sharedKeycaps.get(key);
349
+ if (shared !== void 0) return shared;
350
+ if (style === "symbol" && platform === "apple") {
351
+ const symbol = symbolKeys.get(key);
352
+ if (symbol !== void 0) return symbol;
353
+ }
354
+ const text = textKeys.get(key);
355
+ if (text !== void 0) return text;
356
+ return isCharacterKeyValue(key) ? key.toUpperCase() : key;
357
+ }
358
+ function chordKeycaps(chord, platform, style) {
359
+ const modifiers = style === "symbol" ? symbolModifiers[platform] : textModifiers[platform];
360
+ const keycaps = [];
361
+ for (const [property, keycap] of modifiers) if (chord[property]) keycaps.push(keycap);
362
+ keycaps.push(keycapForKey(chord.key, platform, style));
363
+ return Object.freeze(keycaps);
364
+ }
365
+ function resolveDisplay(options) {
366
+ const platform = readPlatform(options.platform);
367
+ const style = options.style ?? (platform === "apple" ? "symbol" : "text");
368
+ if (style !== "symbol" && style !== "text") throw new TypeError("VIZE_UI_SHORTCUT_FORMAT: style must be \"symbol\" or \"text\"");
369
+ return {
370
+ platform,
371
+ style
372
+ };
373
+ }
374
+ /**
375
+ * Break a shortcut into display keycaps for `<kbd>` rendering.
376
+ *
377
+ * The result carries one array per sequence step; each step lists modifier
378
+ * keycaps in platform order followed by the key keycap. Formatting is
379
+ * deterministic for a given platform, so pass an explicit platform when the
380
+ * output is server-rendered.
381
+ */
382
+ function getShortcutKeycaps(shortcut, options = {}) {
383
+ const { platform, style } = resolveDisplay(options);
384
+ const sequence = typeof shortcut === "string" ? parseShortcut(shortcut, { platform }) : toShortcutSequence(shortcut, platform);
385
+ return Object.freeze(sequence.map((chord) => chordKeycaps(chord, platform, style)));
386
+ }
387
+ /**
388
+ * Format a shortcut as one display string, e.g. `⇧⌘K` or `Ctrl+Shift+K`.
389
+ *
390
+ * Apple symbol keycaps join without separators; every other combination joins
391
+ * with `+`. Sequence steps are joined with a single space.
392
+ */
393
+ function formatShortcut(shortcut, options = {}) {
394
+ const { platform, style } = resolveDisplay(options);
395
+ const joiner = platform === "apple" && style === "symbol" ? "" : "+";
396
+ return getShortcutKeycaps(shortcut, {
397
+ platform,
398
+ style
399
+ }).map((keycaps) => keycaps.join(joiner)).join(" ");
400
+ }
401
+ //#endregion
402
+ //#region src/families/interaction/shortcut/shortcut.ts
403
+ const disposedDiagnostic = "VIZE_UI_SHORTCUT_DISPOSED";
404
+ const setupDiagnostic = "VIZE_UI_SHORTCUT_SETUP";
405
+ const optionDiagnostic = "VIZE_UI_SHORTCUT_OPTION";
406
+ const inputDiagnostic = "VIZE_UI_SHORTCUT_INPUT";
407
+ const emptySequence = Object.freeze([]);
408
+ const emptyScopes = Object.freeze([]);
409
+ function defaultDocument() {
410
+ return typeof globalThis.document === "undefined" ? null : globalThis.document;
411
+ }
412
+ function readTimeout(source) {
413
+ const value = toValue(source) ?? 1e3;
414
+ if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new TypeError(`${optionDiagnostic}: sequenceTimeout must resolve to a finite number >= 0`);
415
+ return value;
416
+ }
417
+ function readDisabled(source) {
418
+ const value = toValue(source);
419
+ if (value === void 0) return false;
420
+ if (typeof value !== "boolean") throw new TypeError(`${optionDiagnostic}: isDisabled must resolve to a boolean`);
421
+ return value;
422
+ }
423
+ function toEventTarget(value) {
424
+ if (value === void 0) return defaultDocument();
425
+ if (value === null) return null;
426
+ if (typeof value.addEventListener !== "function" || typeof value.removeEventListener !== "function") throw new TypeError(`${optionDiagnostic}: target must resolve to an EventTarget or null`);
427
+ return value;
428
+ }
429
+ /**
430
+ * Create an SSR-safe, scope-aware keyboard shortcut registry.
431
+ *
432
+ * The registry resolves `Mod` for one platform, routes chords and multi-chord
433
+ * sequences to the winning binding, and never touches the DOM on the server:
434
+ * with no ambient document it stays detached until a target appears or events
435
+ * are fed through {@link ShortcutRegistry.input}. Call
436
+ * {@link ShortcutRegistry.dispose} when using this factory outside a Vue
437
+ * effect scope.
438
+ */
439
+ function createShortcutRegistry(options = {}) {
440
+ const platform = readPlatform(options.platform);
441
+ const capture = readOptionalBoolean(options.capture, "capture");
442
+ readTimeout(options.sequenceTimeout);
443
+ readDisabled(options.isDisabled);
444
+ const pendingSequence = shallowRef(emptySequence);
445
+ const activeScopes = shallowRef(emptyScopes);
446
+ const bindings = /* @__PURE__ */ new Map();
447
+ const scopeStack = [];
448
+ const detachers = /* @__PURE__ */ new Set();
449
+ let timer = null;
450
+ let order = 0;
451
+ let disposed = false;
452
+ const assertActive = () => {
453
+ if (disposed) throw new Error(`${disposedDiagnostic}: the registry has been disposed`);
454
+ };
455
+ const clearTimer = () => {
456
+ if (timer !== null) clearTimeout(timer);
457
+ timer = null;
458
+ };
459
+ const reset = () => {
460
+ clearTimer();
461
+ if (pendingSequence.value.length === 0) return false;
462
+ pendingSequence.value = emptySequence;
463
+ return true;
464
+ };
465
+ const scheduleReset = (timeout) => {
466
+ clearTimer();
467
+ timer = setTimeout(() => {
468
+ pendingSequence.value = emptySequence;
469
+ timer = null;
470
+ }, timeout);
471
+ };
472
+ const route = (event, pending) => {
473
+ const chord = chordFromEvent(event);
474
+ const next = Object.freeze([...pending, chord]);
475
+ let decision;
476
+ try {
477
+ decision = routeChord(bindings.values(), activeScopes.value, next, {
478
+ isEditable: isEditableEventTarget(event),
479
+ isRepeat: event.repeat === true
480
+ });
481
+ } catch (error) {
482
+ reset();
483
+ throw error;
484
+ }
485
+ if (decision.type === "match") {
486
+ reset();
487
+ if (decision.binding.preventDefault) event.preventDefault();
488
+ const match = Object.freeze({
489
+ shortcut: decision.binding.sequence,
490
+ scope: decision.binding.scope,
491
+ description: decision.binding.description,
492
+ originalEvent: event
493
+ });
494
+ decision.binding.handler(match);
495
+ return true;
496
+ }
497
+ if (decision.type === "pending") {
498
+ pendingSequence.value = next;
499
+ scheduleReset(readTimeout(options.sequenceTimeout));
500
+ if (decision.preventDefault) event.preventDefault();
501
+ return false;
502
+ }
503
+ if (pending.length > 0) {
504
+ reset();
505
+ return route(event, emptySequence);
506
+ }
507
+ return false;
508
+ };
509
+ const input = (event) => {
510
+ assertActive();
511
+ if (!event || typeof event.key !== "string") throw new TypeError(`${inputDiagnostic}: input requires a keyboard event`);
512
+ let disabled;
513
+ try {
514
+ disabled = readDisabled(options.isDisabled);
515
+ } catch (error) {
516
+ reset();
517
+ throw error;
518
+ }
519
+ if (disabled) {
520
+ reset();
521
+ return false;
522
+ }
523
+ if (event.isComposing === true || isModifierOnlyEvent(event)) return false;
524
+ return route(event, pendingSequence.value);
525
+ };
526
+ const nativeListener = (event) => {
527
+ input(event);
528
+ };
529
+ const attach = (target, attachOptions = {}) => {
530
+ assertActive();
531
+ const resolved = toEventTarget(target ?? null);
532
+ if (resolved === null) throw new TypeError(`${optionDiagnostic}: attach requires an EventTarget`);
533
+ const useCapture = attachOptions.capture ?? capture;
534
+ resolved.addEventListener("keydown", nativeListener, useCapture);
535
+ let detached = false;
536
+ const detach = () => {
537
+ if (detached) return;
538
+ detached = true;
539
+ detachers.delete(detach);
540
+ resolved.removeEventListener("keydown", nativeListener, useCapture);
541
+ };
542
+ detachers.add(detach);
543
+ return detach;
544
+ };
545
+ let detachPrimary = null;
546
+ const attachPrimary = () => {
547
+ detachPrimary?.();
548
+ detachPrimary = null;
549
+ const target = toEventTarget(toValue(options.target));
550
+ if (target !== null) detachPrimary = attach(target);
551
+ };
552
+ const stopWatches = [];
553
+ const targetSource = options.target;
554
+ if (isRef(targetSource) || typeof targetSource === "function") stopWatches.push(watch(() => toValue(targetSource), attachPrimary, { flush: "sync" }));
555
+ attachPrimary();
556
+ const disabledSource = options.isDisabled;
557
+ if (isRef(disabledSource) || typeof disabledSource === "function") stopWatches.push(watch(() => readDisabled(disabledSource), (value) => {
558
+ if (value) reset();
559
+ }, { flush: "sync" }));
560
+ return Object.freeze({
561
+ pendingSequence: shallowReadonly(pendingSequence),
562
+ activeScopes: shallowReadonly(activeScopes),
563
+ shortcutProps: Object.freeze({ onKeydown(event) {
564
+ input(event);
565
+ } }),
566
+ register(binding) {
567
+ assertActive();
568
+ validateBindingStatics(binding);
569
+ const key = Symbol("vize-ui-shortcut-binding");
570
+ const sequence = toShortcutSequence(binding.shortcut, platform);
571
+ bindings.set(key, {
572
+ sequence,
573
+ sequenceId: serializeShortcut(sequence),
574
+ scope: binding.scope ?? "global",
575
+ handler: binding.handler,
576
+ when: binding.when,
577
+ preventDefault: binding.preventDefault ?? true,
578
+ allowRepeat: readOptionalBoolean(binding.allowRepeat, "allowRepeat"),
579
+ allowInEditable: readOptionalBoolean(binding.allowInEditable, "allowInEditable"),
580
+ description: binding.description ?? null,
581
+ order: order++
582
+ });
583
+ return () => {
584
+ bindings.delete(key);
585
+ };
586
+ },
587
+ activateScope(scope) {
588
+ assertActive();
589
+ if (typeof scope !== "string" || scope === "" || scope === "global") throw new TypeError(`${optionDiagnostic}: scope must be a non-empty, non-global name`);
590
+ const token = Symbol("vize-ui-shortcut-scope");
591
+ scopeStack.push({
592
+ name: scope,
593
+ token
594
+ });
595
+ activeScopes.value = Object.freeze(scopeStack.map((entry) => entry.name));
596
+ return () => {
597
+ const index = scopeStack.findIndex((entry) => entry.token === token);
598
+ if (index === -1) return;
599
+ scopeStack.splice(index, 1);
600
+ activeScopes.value = Object.freeze(scopeStack.map((entry) => entry.name));
601
+ };
602
+ },
603
+ input,
604
+ attach,
605
+ reset: () => {
606
+ assertActive();
607
+ return reset();
608
+ },
609
+ getBindings: () => Object.freeze([...bindings.values()].map(toBindingInfo)),
610
+ getConflicts: () => collectConflicts(bindings.values()),
611
+ dispose: () => {
612
+ if (disposed) return;
613
+ disposed = true;
614
+ for (const stop of stopWatches) stop();
615
+ for (const detach of Array.from(detachers)) detach();
616
+ detachPrimary = null;
617
+ clearTimer();
618
+ pendingSequence.value = emptySequence;
619
+ bindings.clear();
620
+ }
621
+ });
622
+ }
623
+ /** Create a shortcut registry disposed with the current Vue effect scope. */
624
+ function useShortcutRegistry(options = {}) {
625
+ if (!getCurrentScope()) throw new Error(`${setupDiagnostic}: use inside component setup or an active effect scope`);
626
+ const registry = createShortcutRegistry(options);
627
+ onScopeDispose(registry.dispose);
628
+ return registry;
629
+ }
630
+ //#endregion
631
+ export { detectShortcutPlatform as a, getShortcutKeycaps as i, useShortcutRegistry as n, parseShortcut as o, formatShortcut as r, serializeShortcut as s, createShortcutRegistry as t };