@funstack/ui 0.1.0-alpha.2 → 0.1.0-alpha.21

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 (1046) hide show
  1. package/README.md +22 -1
  2. package/dist/accordion/accordion-context.mjs.map +1 -1
  3. package/dist/accordion/accordion-item.d.mts +22 -4
  4. package/dist/accordion/accordion-item.d.mts.map +1 -1
  5. package/dist/accordion/accordion-item.mjs +32 -10
  6. package/dist/accordion/accordion-item.mjs.map +1 -1
  7. package/dist/accordion/accordion-panel.d.mts +19 -4
  8. package/dist/accordion/accordion-panel.d.mts.map +1 -1
  9. package/dist/accordion/accordion-panel.mjs +8 -6
  10. package/dist/accordion/accordion-panel.mjs.map +1 -1
  11. package/dist/accordion/accordion-root.d.mts +39 -5
  12. package/dist/accordion/accordion-root.d.mts.map +1 -1
  13. package/dist/accordion/accordion-root.mjs +75 -67
  14. package/dist/accordion/accordion-root.mjs.map +1 -1
  15. package/dist/accordion/accordion-trigger.d.mts +12 -4
  16. package/dist/accordion/accordion-trigger.d.mts.map +1 -1
  17. package/dist/accordion/accordion-trigger.mjs +14 -28
  18. package/dist/accordion/accordion-trigger.mjs.map +1 -1
  19. package/dist/accordion/index.d.mts +2 -0
  20. package/dist/accordion/index.d.mts.map +1 -1
  21. package/dist/accordion/index.mjs +2 -0
  22. package/dist/accordion/index.mjs.map +1 -1
  23. package/dist/alert-dialog/alert-dialog-action.d.mts +73 -0
  24. package/dist/alert-dialog/alert-dialog-action.d.mts.map +1 -0
  25. package/dist/alert-dialog/alert-dialog-action.mjs +23 -0
  26. package/dist/alert-dialog/alert-dialog-action.mjs.map +1 -0
  27. package/dist/alert-dialog/alert-dialog-cancel.d.mts +31 -0
  28. package/dist/alert-dialog/alert-dialog-cancel.d.mts.map +1 -0
  29. package/dist/alert-dialog/alert-dialog-cancel.mjs +50 -0
  30. package/dist/alert-dialog/alert-dialog-cancel.mjs.map +1 -0
  31. package/dist/alert-dialog/alert-dialog-context.mjs +24 -0
  32. package/dist/alert-dialog/alert-dialog-context.mjs.map +1 -0
  33. package/dist/alert-dialog/alert-dialog-description.d.mts +25 -0
  34. package/dist/alert-dialog/alert-dialog-description.d.mts.map +1 -0
  35. package/dist/alert-dialog/alert-dialog-description.mjs +20 -0
  36. package/dist/alert-dialog/alert-dialog-description.mjs.map +1 -0
  37. package/dist/alert-dialog/alert-dialog-form.d.mts +27 -0
  38. package/dist/alert-dialog/alert-dialog-form.d.mts.map +1 -0
  39. package/dist/alert-dialog/alert-dialog-form.mjs +22 -0
  40. package/dist/alert-dialog/alert-dialog-form.mjs.map +1 -0
  41. package/dist/alert-dialog/alert-dialog-popup.d.mts +42 -0
  42. package/dist/alert-dialog/alert-dialog-popup.d.mts.map +1 -0
  43. package/dist/alert-dialog/alert-dialog-popup.mjs +53 -0
  44. package/dist/alert-dialog/alert-dialog-popup.mjs.map +1 -0
  45. package/dist/alert-dialog/alert-dialog-root.d.mts +31 -0
  46. package/dist/alert-dialog/alert-dialog-root.d.mts.map +1 -0
  47. package/dist/alert-dialog/alert-dialog-root.mjs +23 -0
  48. package/dist/alert-dialog/alert-dialog-root.mjs.map +1 -0
  49. package/dist/alert-dialog/alert-dialog-title.d.mts +23 -0
  50. package/dist/alert-dialog/alert-dialog-title.d.mts.map +1 -0
  51. package/dist/alert-dialog/alert-dialog-title.mjs +18 -0
  52. package/dist/alert-dialog/alert-dialog-title.mjs.map +1 -0
  53. package/dist/alert-dialog/alert-dialog-trigger.d.mts +23 -0
  54. package/dist/alert-dialog/alert-dialog-trigger.d.mts.map +1 -0
  55. package/dist/alert-dialog/alert-dialog-trigger.mjs +18 -0
  56. package/dist/alert-dialog/alert-dialog-trigger.mjs.map +1 -0
  57. package/dist/alert-dialog/index.d.mts +33 -0
  58. package/dist/alert-dialog/index.d.mts.map +1 -0
  59. package/dist/alert-dialog/index.mjs +33 -0
  60. package/dist/alert-dialog/index.mjs.map +1 -0
  61. package/dist/avatar/avatar-context.mjs +24 -0
  62. package/dist/avatar/avatar-context.mjs.map +1 -0
  63. package/dist/avatar/avatar-fallback.d.mts +32 -0
  64. package/dist/avatar/avatar-fallback.d.mts.map +1 -0
  65. package/dist/avatar/avatar-fallback.mjs +31 -0
  66. package/dist/avatar/avatar-fallback.mjs.map +1 -0
  67. package/dist/avatar/avatar-image.d.mts +37 -0
  68. package/dist/avatar/avatar-image.d.mts.map +1 -0
  69. package/dist/avatar/avatar-image.mjs +91 -0
  70. package/dist/avatar/avatar-image.mjs.map +1 -0
  71. package/dist/avatar/avatar-root.d.mts +48 -0
  72. package/dist/avatar/avatar-root.d.mts.map +1 -0
  73. package/dist/avatar/avatar-root.mjs +81 -0
  74. package/dist/avatar/avatar-root.mjs.map +1 -0
  75. package/dist/avatar/index.d.mts +24 -0
  76. package/dist/avatar/index.d.mts.map +1 -0
  77. package/dist/avatar/index.mjs +24 -0
  78. package/dist/avatar/index.mjs.map +1 -0
  79. package/dist/bin/skill-installer.d.mts +1 -0
  80. package/dist/bin/skill-installer.mjs +12 -0
  81. package/dist/bin/skill-installer.mjs.map +1 -0
  82. package/dist/button/button.d.mts +118 -0
  83. package/dist/button/button.d.mts.map +1 -0
  84. package/dist/button/button.mjs +98 -0
  85. package/dist/button/button.mjs.map +1 -0
  86. package/dist/button/index.d.mts +3 -0
  87. package/dist/button/index.mjs +1 -0
  88. package/dist/checkbox/checkbox.d.mts +32 -9
  89. package/dist/checkbox/checkbox.d.mts.map +1 -1
  90. package/dist/checkbox/checkbox.mjs +25 -50
  91. package/dist/checkbox/checkbox.mjs.map +1 -1
  92. package/dist/checkbox-group/checkbox-group-context.mjs.map +1 -1
  93. package/dist/checkbox-group/checkbox-group-item.d.mts +20 -5
  94. package/dist/checkbox-group/checkbox-group-item.d.mts.map +1 -1
  95. package/dist/checkbox-group/checkbox-group-item.mjs +25 -27
  96. package/dist/checkbox-group/checkbox-group-item.mjs.map +1 -1
  97. package/dist/checkbox-group/checkbox-group-label.d.mts +10 -0
  98. package/dist/checkbox-group/checkbox-group-label.d.mts.map +1 -1
  99. package/dist/checkbox-group/checkbox-group-label.mjs +3 -6
  100. package/dist/checkbox-group/checkbox-group-label.mjs.map +1 -1
  101. package/dist/checkbox-group/checkbox-group-parent.d.mts +22 -5
  102. package/dist/checkbox-group/checkbox-group-parent.d.mts.map +1 -1
  103. package/dist/checkbox-group/checkbox-group-parent.mjs +17 -13
  104. package/dist/checkbox-group/checkbox-group-parent.mjs.map +1 -1
  105. package/dist/checkbox-group/checkbox-group-root.d.mts +37 -7
  106. package/dist/checkbox-group/checkbox-group-root.d.mts.map +1 -1
  107. package/dist/checkbox-group/checkbox-group-root.mjs +102 -102
  108. package/dist/checkbox-group/checkbox-group-root.mjs.map +1 -1
  109. package/dist/checkbox-group/index.d.mts +2 -0
  110. package/dist/checkbox-group/index.d.mts.map +1 -1
  111. package/dist/checkbox-group/index.mjs +2 -0
  112. package/dist/checkbox-group/index.mjs.map +1 -1
  113. package/dist/collapsible/collapsible-context.mjs +8 -0
  114. package/dist/collapsible/collapsible-context.mjs.map +1 -0
  115. package/dist/collapsible/collapsible-panel.d.mts +53 -0
  116. package/dist/collapsible/collapsible-panel.d.mts.map +1 -0
  117. package/dist/collapsible/collapsible-panel.mjs +41 -0
  118. package/dist/collapsible/collapsible-panel.mjs.map +1 -0
  119. package/dist/collapsible/collapsible-root.d.mts +108 -0
  120. package/dist/collapsible/collapsible-root.d.mts.map +1 -0
  121. package/dist/collapsible/collapsible-root.mjs +147 -0
  122. package/dist/collapsible/collapsible-root.mjs.map +1 -0
  123. package/dist/collapsible/collapsible-trigger.d.mts +45 -0
  124. package/dist/collapsible/collapsible-trigger.d.mts.map +1 -0
  125. package/dist/collapsible/collapsible-trigger.mjs +62 -0
  126. package/dist/collapsible/collapsible-trigger.mjs.map +1 -0
  127. package/dist/collapsible/index.d.mts +21 -0
  128. package/dist/collapsible/index.d.mts.map +1 -0
  129. package/dist/collapsible/index.mjs +21 -0
  130. package/dist/collapsible/index.mjs.map +1 -0
  131. package/dist/combobox/chip-text.mjs +24 -0
  132. package/dist/combobox/chip-text.mjs.map +1 -0
  133. package/dist/combobox/combobox-chips.d.mts +159 -0
  134. package/dist/combobox/combobox-chips.d.mts.map +1 -0
  135. package/dist/combobox/combobox-chips.mjs +198 -0
  136. package/dist/combobox/combobox-chips.mjs.map +1 -0
  137. package/dist/combobox/combobox-clear.d.mts +29 -5
  138. package/dist/combobox/combobox-clear.d.mts.map +1 -1
  139. package/dist/combobox/combobox-clear.mjs +17 -8
  140. package/dist/combobox/combobox-clear.mjs.map +1 -1
  141. package/dist/combobox/combobox-context.mjs +4 -5
  142. package/dist/combobox/combobox-context.mjs.map +1 -1
  143. package/dist/combobox/combobox-group.d.mts +49 -1
  144. package/dist/combobox/combobox-group.d.mts.map +1 -1
  145. package/dist/combobox/combobox-group.mjs +14 -3
  146. package/dist/combobox/combobox-group.mjs.map +1 -1
  147. package/dist/combobox/combobox-input.d.mts +27 -5
  148. package/dist/combobox/combobox-input.d.mts.map +1 -1
  149. package/dist/combobox/combobox-input.mjs +53 -13
  150. package/dist/combobox/combobox-input.mjs.map +1 -1
  151. package/dist/combobox/combobox-keyboard.mjs +127 -0
  152. package/dist/combobox/combobox-keyboard.mjs.map +1 -0
  153. package/dist/combobox/combobox-label.d.mts +18 -1
  154. package/dist/combobox/combobox-label.d.mts.map +1 -1
  155. package/dist/combobox/combobox-label.mjs +4 -1
  156. package/dist/combobox/combobox-label.mjs.map +1 -1
  157. package/dist/combobox/combobox-list.d.mts +15 -1
  158. package/dist/combobox/combobox-list.d.mts.map +1 -1
  159. package/dist/combobox/combobox-list.mjs +13 -13
  160. package/dist/combobox/combobox-list.mjs.map +1 -1
  161. package/dist/combobox/combobox-option.d.mts +30 -5
  162. package/dist/combobox/combobox-option.d.mts.map +1 -1
  163. package/dist/combobox/combobox-option.mjs +9 -5
  164. package/dist/combobox/combobox-option.mjs.map +1 -1
  165. package/dist/combobox/combobox-popup.d.mts +24 -3
  166. package/dist/combobox/combobox-popup.d.mts.map +1 -1
  167. package/dist/combobox/combobox-popup.mjs +24 -29
  168. package/dist/combobox/combobox-popup.mjs.map +1 -1
  169. package/dist/combobox/combobox-root.d.mts +183 -43
  170. package/dist/combobox/combobox-root.d.mts.map +1 -1
  171. package/dist/combobox/combobox-root.mjs +476 -270
  172. package/dist/combobox/combobox-root.mjs.map +1 -1
  173. package/dist/combobox/combobox-trigger.d.mts +36 -8
  174. package/dist/combobox/combobox-trigger.d.mts.map +1 -1
  175. package/dist/combobox/combobox-trigger.mjs +50 -41
  176. package/dist/combobox/combobox-trigger.mjs.map +1 -1
  177. package/dist/combobox/index.d.mts +13 -5
  178. package/dist/combobox/index.d.mts.map +1 -1
  179. package/dist/combobox/index.mjs +13 -5
  180. package/dist/combobox/index.mjs.map +1 -1
  181. package/dist/combobox/use-combobox-form.mjs +53 -0
  182. package/dist/combobox/use-combobox-form.mjs.map +1 -0
  183. package/dist/combobox/use-combobox-text.mjs +43 -0
  184. package/dist/combobox/use-combobox-text.mjs.map +1 -0
  185. package/dist/csp/csp-provider.d.mts +33 -0
  186. package/dist/csp/csp-provider.d.mts.map +1 -0
  187. package/dist/csp/csp-provider.mjs +26 -0
  188. package/dist/csp/csp-provider.mjs.map +1 -0
  189. package/dist/csp/index.d.mts +3 -0
  190. package/dist/csp/index.mjs +3 -0
  191. package/dist/csp/style-hashes.d.mts +21 -0
  192. package/dist/csp/style-hashes.d.mts.map +1 -0
  193. package/dist/csp/style-hashes.mjs +23 -0
  194. package/dist/csp/style-hashes.mjs.map +1 -0
  195. package/dist/dialog/dialog-close.d.mts +56 -12
  196. package/dist/dialog/dialog-close.d.mts.map +1 -1
  197. package/dist/dialog/dialog-close.mjs +63 -55
  198. package/dist/dialog/dialog-close.mjs.map +1 -1
  199. package/dist/dialog/dialog-context.d.mts +2 -0
  200. package/dist/dialog/dialog-context.mjs +20 -2
  201. package/dist/dialog/dialog-context.mjs.map +1 -1
  202. package/dist/dialog/dialog-description.d.mts +14 -1
  203. package/dist/dialog/dialog-description.d.mts.map +1 -1
  204. package/dist/dialog/dialog-description.mjs +10 -4
  205. package/dist/dialog/dialog-description.mjs.map +1 -1
  206. package/dist/dialog/dialog-dismiss.mjs +108 -0
  207. package/dist/dialog/dialog-dismiss.mjs.map +1 -0
  208. package/dist/dialog/dialog-form.d.mts +43 -11
  209. package/dist/dialog/dialog-form.d.mts.map +1 -1
  210. package/dist/dialog/dialog-form.mjs +64 -37
  211. package/dist/dialog/dialog-form.mjs.map +1 -1
  212. package/dist/dialog/dialog-popup.d.mts +48 -14
  213. package/dist/dialog/dialog-popup.d.mts.map +1 -1
  214. package/dist/dialog/dialog-popup.mjs +184 -241
  215. package/dist/dialog/dialog-popup.mjs.map +1 -1
  216. package/dist/dialog/dialog-root.d.mts +54 -19
  217. package/dist/dialog/dialog-root.d.mts.map +1 -1
  218. package/dist/dialog/dialog-root.mjs +76 -92
  219. package/dist/dialog/dialog-root.mjs.map +1 -1
  220. package/dist/dialog/dialog-title.d.mts +13 -1
  221. package/dist/dialog/dialog-title.d.mts.map +1 -1
  222. package/dist/dialog/dialog-title.mjs +10 -4
  223. package/dist/dialog/dialog-title.mjs.map +1 -1
  224. package/dist/dialog/dialog-trigger.d.mts +30 -6
  225. package/dist/dialog/dialog-trigger.d.mts.map +1 -1
  226. package/dist/dialog/dialog-trigger.mjs +50 -28
  227. package/dist/dialog/dialog-trigger.mjs.map +1 -1
  228. package/dist/dialog/index.d.mts +7 -3
  229. package/dist/dialog/index.d.mts.map +1 -1
  230. package/dist/dialog/index.mjs +7 -3
  231. package/dist/dialog/index.mjs.map +1 -1
  232. package/dist/docs/components/accordion.md +428 -0
  233. package/dist/docs/components/alert-dialog.md +546 -0
  234. package/dist/docs/components/avatar.md +354 -0
  235. package/dist/docs/components/button.md +511 -0
  236. package/dist/docs/components/checkbox-group.md +483 -0
  237. package/dist/docs/components/checkbox.md +373 -0
  238. package/dist/docs/components/collapsible.md +408 -0
  239. package/dist/docs/components/combobox.md +960 -0
  240. package/dist/docs/components/context-menu.md +524 -0
  241. package/dist/docs/components/dialog.md +694 -0
  242. package/dist/docs/components/drawer.md +622 -0
  243. package/dist/docs/components/field.md +765 -0
  244. package/dist/docs/components/hover-card.md +494 -0
  245. package/dist/docs/components/menu.md +670 -0
  246. package/dist/docs/components/meter.md +313 -0
  247. package/dist/docs/components/multi-select.md +622 -0
  248. package/dist/docs/components/number-field.md +528 -0
  249. package/dist/docs/components/otp-field.md +501 -0
  250. package/dist/docs/components/popover.md +656 -0
  251. package/dist/docs/components/progress.md +450 -0
  252. package/dist/docs/components/radio-group.md +457 -0
  253. package/dist/docs/components/scroll-area.md +294 -0
  254. package/dist/docs/components/select.md +670 -0
  255. package/dist/docs/components/separator.md +182 -0
  256. package/dist/docs/components/slider.md +558 -0
  257. package/dist/docs/components/switch.md +311 -0
  258. package/dist/docs/components/tabs.md +473 -0
  259. package/dist/docs/components/toast.md +602 -0
  260. package/dist/docs/components/toggle-group.md +341 -0
  261. package/dist/docs/components/toggle.md +245 -0
  262. package/dist/docs/components/toolbar.md +390 -0
  263. package/dist/docs/components/tooltip.md +494 -0
  264. package/dist/docs/concepts/action-props.md +281 -0
  265. package/dist/docs/concepts/ai-agents.md +56 -0
  266. package/dist/docs/concepts/browser-owned-state.md +133 -0
  267. package/dist/docs/concepts/content-security-policy.md +69 -0
  268. package/dist/docs/concepts/experimental.md +36 -0
  269. package/dist/docs/concepts/pending-and-optimistic.md +263 -0
  270. package/dist/docs/concepts/render.md +23 -0
  271. package/dist/docs/concepts/server-components.md +132 -0
  272. package/dist/docs/concepts/suspense.md +129 -0
  273. package/dist/docs/concepts/transitions.md +112 -0
  274. package/dist/docs/getting-started.md +102 -0
  275. package/dist/docs/index.md +191 -0
  276. package/dist/docs/roadmap.md +150 -0
  277. package/dist/docs/why.md +104 -0
  278. package/dist/drawer/drawer-close.d.mts +26 -0
  279. package/dist/drawer/drawer-close.d.mts.map +1 -0
  280. package/dist/drawer/drawer-close.mjs +19 -0
  281. package/dist/drawer/drawer-close.mjs.map +1 -0
  282. package/dist/drawer/drawer-description.d.mts +23 -0
  283. package/dist/drawer/drawer-description.d.mts.map +1 -0
  284. package/dist/drawer/drawer-description.mjs +18 -0
  285. package/dist/drawer/drawer-description.mjs.map +1 -0
  286. package/dist/drawer/drawer-form.d.mts +24 -0
  287. package/dist/drawer/drawer-form.d.mts.map +1 -0
  288. package/dist/drawer/drawer-form.mjs +19 -0
  289. package/dist/drawer/drawer-form.mjs.map +1 -0
  290. package/dist/drawer/drawer-popup.d.mts +77 -0
  291. package/dist/drawer/drawer-popup.d.mts.map +1 -0
  292. package/dist/drawer/drawer-popup.mjs +124 -0
  293. package/dist/drawer/drawer-popup.mjs.map +1 -0
  294. package/dist/drawer/drawer-root.d.mts +31 -0
  295. package/dist/drawer/drawer-root.d.mts.map +1 -0
  296. package/dist/drawer/drawer-root.mjs +23 -0
  297. package/dist/drawer/drawer-root.mjs.map +1 -0
  298. package/dist/drawer/drawer-swipe.d.mts +5 -0
  299. package/dist/drawer/drawer-swipe.d.mts.map +1 -0
  300. package/dist/drawer/drawer-swipe.mjs +193 -0
  301. package/dist/drawer/drawer-swipe.mjs.map +1 -0
  302. package/dist/drawer/drawer-title.d.mts +23 -0
  303. package/dist/drawer/drawer-title.d.mts.map +1 -0
  304. package/dist/drawer/drawer-title.mjs +18 -0
  305. package/dist/drawer/drawer-title.mjs.map +1 -0
  306. package/dist/drawer/drawer-trigger.d.mts +23 -0
  307. package/dist/drawer/drawer-trigger.d.mts.map +1 -0
  308. package/dist/drawer/drawer-trigger.mjs +18 -0
  309. package/dist/drawer/drawer-trigger.mjs.map +1 -0
  310. package/dist/drawer/index.d.mts +34 -0
  311. package/dist/drawer/index.d.mts.map +1 -0
  312. package/dist/drawer/index.mjs +33 -0
  313. package/dist/drawer/index.mjs.map +1 -0
  314. package/dist/field/field-control.d.mts +65 -0
  315. package/dist/field/field-control.d.mts.map +1 -0
  316. package/dist/field/field-control.mjs +92 -0
  317. package/dist/field/field-control.mjs.map +1 -0
  318. package/dist/field/field-description.d.mts +35 -0
  319. package/dist/field/field-description.d.mts.map +1 -0
  320. package/dist/field/field-description.mjs +35 -0
  321. package/dist/field/field-description.mjs.map +1 -0
  322. package/dist/field/field-error.d.mts +42 -0
  323. package/dist/field/field-error.d.mts.map +1 -0
  324. package/dist/field/field-error.mjs +43 -0
  325. package/dist/field/field-error.mjs.map +1 -0
  326. package/dist/field/field-label.d.mts +39 -0
  327. package/dist/field/field-label.d.mts.map +1 -0
  328. package/dist/field/field-label.mjs +50 -0
  329. package/dist/field/field-label.mjs.map +1 -0
  330. package/dist/field/field-root.d.mts +72 -0
  331. package/dist/field/field-root.d.mts.map +1 -0
  332. package/dist/field/field-root.mjs +309 -0
  333. package/dist/field/field-root.mjs.map +1 -0
  334. package/dist/field/index.d.mts +27 -0
  335. package/dist/field/index.d.mts.map +1 -0
  336. package/dist/field/index.mjs +26 -0
  337. package/dist/field/index.mjs.map +1 -0
  338. package/dist/field/use-server-error-visibility.mjs +44 -0
  339. package/dist/field/use-server-error-visibility.mjs.map +1 -0
  340. package/dist/form/form-root.d.mts +74 -0
  341. package/dist/form/form-root.d.mts.map +1 -0
  342. package/dist/form/form-root.mjs +158 -0
  343. package/dist/form/form-root.mjs.map +1 -0
  344. package/dist/form/form-submit.d.mts +56 -0
  345. package/dist/form/form-submit.d.mts.map +1 -0
  346. package/dist/form/form-submit.mjs +53 -0
  347. package/dist/form/form-submit.mjs.map +1 -0
  348. package/dist/form/index.d.mts +18 -0
  349. package/dist/form/index.d.mts.map +1 -0
  350. package/dist/form/index.mjs +18 -0
  351. package/dist/form/index.mjs.map +1 -0
  352. package/dist/hover-card/hover-card-context.mjs +13 -0
  353. package/dist/hover-card/hover-card-context.mjs.map +1 -0
  354. package/dist/hover-card/hover-card-popup.d.mts +102 -0
  355. package/dist/hover-card/hover-card-popup.d.mts.map +1 -0
  356. package/dist/hover-card/hover-card-popup.mjs +80 -0
  357. package/dist/hover-card/hover-card-popup.mjs.map +1 -0
  358. package/dist/hover-card/hover-card-root.d.mts +94 -0
  359. package/dist/hover-card/hover-card-root.d.mts.map +1 -0
  360. package/dist/hover-card/hover-card-root.mjs +74 -0
  361. package/dist/hover-card/hover-card-root.mjs.map +1 -0
  362. package/dist/hover-card/hover-card-trigger.d.mts +65 -0
  363. package/dist/hover-card/hover-card-trigger.d.mts.map +1 -0
  364. package/dist/hover-card/hover-card-trigger.mjs +109 -0
  365. package/dist/hover-card/hover-card-trigger.mjs.map +1 -0
  366. package/dist/hover-card/index.d.mts +24 -0
  367. package/dist/hover-card/index.d.mts.map +1 -0
  368. package/dist/hover-card/index.mjs +24 -0
  369. package/dist/hover-card/index.mjs.map +1 -0
  370. package/dist/hover-card/use-hover-card-interest.mjs +242 -0
  371. package/dist/hover-card/use-hover-card-interest.mjs.map +1 -0
  372. package/dist/index.d.mts +118 -13
  373. package/dist/index.mjs +22 -1
  374. package/dist/internal/{action-details.mjs → action/action-details.mjs} +1 -1
  375. package/dist/internal/action/action-details.mjs.map +1 -0
  376. package/dist/internal/action/call-urgent-handler.mjs +32 -0
  377. package/dist/internal/action/call-urgent-handler.mjs.map +1 -0
  378. package/dist/internal/action/report-dropped.mjs +27 -0
  379. package/dist/internal/action/report-dropped.mjs.map +1 -0
  380. package/dist/internal/action/use-action-trigger.mjs +67 -0
  381. package/dist/internal/action/use-action-trigger.mjs.map +1 -0
  382. package/dist/internal/action/use-connected.mjs +24 -0
  383. package/dist/internal/action/use-connected.mjs.map +1 -0
  384. package/dist/internal/action/use-controllable-action.mjs +153 -0
  385. package/dist/internal/action/use-controllable-action.mjs.map +1 -0
  386. package/dist/internal/action/use-multiple-selection.mjs +83 -0
  387. package/dist/internal/action/use-multiple-selection.mjs.map +1 -0
  388. package/dist/internal/action/use-pure-trigger.mjs +34 -0
  389. package/dist/internal/action/use-pure-trigger.mjs.map +1 -0
  390. package/dist/internal/action/use-step-commit.mjs +147 -0
  391. package/dist/internal/action/use-step-commit.mjs.map +1 -0
  392. package/dist/internal/announce.mjs +20 -0
  393. package/dist/internal/announce.mjs.map +1 -0
  394. package/dist/internal/arrow-keys.mjs +21 -0
  395. package/dist/internal/arrow-keys.mjs.map +1 -0
  396. package/dist/internal/csp-context.mjs +8 -0
  397. package/dist/internal/csp-context.mjs.map +1 -0
  398. package/dist/internal/decimal.mjs +33 -0
  399. package/dist/internal/decimal.mjs.map +1 -0
  400. package/dist/internal/details-summary.mjs +56 -0
  401. package/dist/internal/details-summary.mjs.map +1 -0
  402. package/dist/internal/dev-warn.mjs +17 -0
  403. package/dist/internal/dev-warn.mjs.map +1 -0
  404. package/dist/internal/dom-order.mjs +17 -0
  405. package/dist/internal/dom-order.mjs.map +1 -0
  406. package/dist/internal/form/field-context.d.mts +19 -0
  407. package/dist/internal/form/field-context.d.mts.map +1 -0
  408. package/dist/internal/form/field-context.mjs +24 -0
  409. package/dist/internal/form/field-context.mjs.map +1 -0
  410. package/dist/internal/form/focus-first-invalid.mjs +67 -0
  411. package/dist/internal/form/focus-first-invalid.mjs.map +1 -0
  412. package/dist/internal/form/form-status-watcher.mjs +31 -0
  413. package/dist/internal/form/form-status-watcher.mjs.map +1 -0
  414. package/dist/internal/form/group-member.mjs +37 -0
  415. package/dist/internal/form/group-member.mjs.map +1 -0
  416. package/dist/internal/form/hidden-values.mjs +29 -0
  417. package/dist/internal/form/hidden-values.mjs.map +1 -0
  418. package/dist/internal/{sync-presence.mjs → form/sync-presence.mjs} +6 -2
  419. package/dist/internal/form/sync-presence.mjs.map +1 -0
  420. package/dist/internal/form/use-checkable-input.mjs +79 -0
  421. package/dist/internal/form/use-checkable-input.mjs.map +1 -0
  422. package/dist/internal/form/use-field-control.mjs +125 -0
  423. package/dist/internal/form/use-field-control.mjs.map +1 -0
  424. package/dist/internal/form/use-fieldset-group.mjs +46 -0
  425. package/dist/internal/form/use-fieldset-group.mjs.map +1 -0
  426. package/dist/internal/form/use-form-owner-event.mjs +44 -0
  427. package/dist/internal/form/use-form-owner-event.mjs.map +1 -0
  428. package/dist/internal/form/use-form-reset.mjs +39 -0
  429. package/dist/internal/form/use-form-reset.mjs.map +1 -0
  430. package/dist/internal/{use-native-checked.mjs → form/use-native-checked.mjs} +8 -9
  431. package/dist/internal/form/use-native-checked.mjs.map +1 -0
  432. package/dist/internal/{use-native-group-reconciliation.mjs → form/use-native-group-reconciliation.mjs} +15 -12
  433. package/dist/internal/form/use-native-group-reconciliation.mjs.map +1 -0
  434. package/dist/internal/{use-native-select-value.mjs → form/use-native-select-value.mjs} +8 -6
  435. package/dist/internal/form/use-native-select-value.mjs.map +1 -0
  436. package/dist/internal/form/validity.d.mts +35 -0
  437. package/dist/internal/form/validity.d.mts.map +1 -0
  438. package/dist/internal/form/validity.mjs +98 -0
  439. package/dist/internal/form/validity.mjs.map +1 -0
  440. package/dist/internal/overlay/anchor-position.d.mts +15 -0
  441. package/dist/internal/overlay/anchor-position.d.mts.map +1 -0
  442. package/dist/internal/overlay/anchor-position.mjs +132 -0
  443. package/dist/internal/overlay/anchor-position.mjs.map +1 -0
  444. package/dist/internal/overlay/content-focus-probe.mjs +42 -0
  445. package/dist/internal/overlay/content-focus-probe.mjs.map +1 -0
  446. package/dist/internal/overlay/css-transition-cut.mjs +66 -0
  447. package/dist/internal/overlay/css-transition-cut.mjs.map +1 -0
  448. package/dist/internal/overlay/focus-visible.mjs +26 -0
  449. package/dist/internal/overlay/focus-visible.mjs.map +1 -0
  450. package/dist/internal/overlay/invokers.mjs +63 -0
  451. package/dist/internal/overlay/invokers.mjs.map +1 -0
  452. package/dist/internal/overlay/modal-registry.mjs +39 -0
  453. package/dist/internal/overlay/modal-registry.mjs.map +1 -0
  454. package/dist/internal/overlay/overlay-popup.mjs +103 -0
  455. package/dist/internal/overlay/overlay-popup.mjs.map +1 -0
  456. package/dist/internal/overlay/overlay-show.mjs +73 -0
  457. package/dist/internal/overlay/overlay-show.mjs.map +1 -0
  458. package/dist/internal/overlay/popover-open.mjs +18 -0
  459. package/dist/internal/overlay/popover-open.mjs.map +1 -0
  460. package/dist/internal/overlay/trigger-ref.mjs +26 -0
  461. package/dist/internal/overlay/trigger-ref.mjs.map +1 -0
  462. package/dist/internal/overlay/use-apply-open-state.mjs +44 -0
  463. package/dist/internal/overlay/use-apply-open-state.mjs.map +1 -0
  464. package/dist/internal/{use-exit-animation.mjs → overlay/use-exit-animation.mjs} +28 -8
  465. package/dist/internal/overlay/use-exit-animation.mjs.map +1 -0
  466. package/dist/internal/overlay/use-interest-dismiss.mjs +85 -0
  467. package/dist/internal/overlay/use-interest-dismiss.mjs.map +1 -0
  468. package/dist/internal/overlay/use-modal-registration.mjs +47 -0
  469. package/dist/internal/overlay/use-modal-registration.mjs.map +1 -0
  470. package/dist/internal/overlay/use-overlay-close.mjs +72 -0
  471. package/dist/internal/overlay/use-overlay-close.mjs.map +1 -0
  472. package/dist/internal/overlay/use-overlay-root.d.mts +2 -0
  473. package/dist/internal/overlay/use-overlay-root.mjs +193 -0
  474. package/dist/internal/overlay/use-overlay-root.mjs.map +1 -0
  475. package/dist/internal/overlay/use-popover-popup.mjs +287 -0
  476. package/dist/internal/overlay/use-popover-popup.mjs.map +1 -0
  477. package/dist/internal/overlay/use-popover-trigger.d.mts +16 -0
  478. package/dist/internal/overlay/use-popover-trigger.d.mts.map +1 -0
  479. package/dist/internal/overlay/use-popover-trigger.mjs +142 -0
  480. package/dist/internal/overlay/use-popover-trigger.mjs.map +1 -0
  481. package/dist/internal/overlay/use-resolved-placement.mjs +162 -0
  482. package/dist/internal/overlay/use-resolved-placement.mjs.map +1 -0
  483. package/dist/internal/platform-attributes.d.mts +2 -1
  484. package/dist/internal/platform-attributes.d.mts.map +1 -1
  485. package/dist/internal/pointer-capture.mjs +20 -0
  486. package/dist/internal/pointer-capture.mjs.map +1 -0
  487. package/dist/internal/range-value.mjs +51 -0
  488. package/dist/internal/range-value.mjs.map +1 -0
  489. package/dist/internal/render-element.d.mts +2 -0
  490. package/dist/internal/render-element.mjs +123 -0
  491. package/dist/internal/render-element.mjs.map +1 -0
  492. package/dist/internal/shipped-styles.mjs +14 -0
  493. package/dist/internal/shipped-styles.mjs.map +1 -0
  494. package/dist/internal/swipe-arithmetic.mjs +75 -0
  495. package/dist/internal/swipe-arithmetic.mjs.map +1 -0
  496. package/dist/internal/swipe.mjs +169 -0
  497. package/dist/internal/swipe.mjs.map +1 -0
  498. package/dist/internal/toolbar-context.mjs +17 -0
  499. package/dist/internal/toolbar-context.mjs.map +1 -0
  500. package/dist/internal/transition-boundary.mjs +5 -9
  501. package/dist/internal/transition-boundary.mjs.map +1 -1
  502. package/dist/internal/typeahead.mjs +52 -0
  503. package/dist/internal/typeahead.mjs.map +1 -0
  504. package/dist/internal/types.d.mts +42 -9
  505. package/dist/internal/types.d.mts.map +1 -1
  506. package/dist/internal/use-active-option.mjs +51 -0
  507. package/dist/internal/use-active-option.mjs.map +1 -0
  508. package/dist/internal/use-deferred-leave.mjs +113 -0
  509. package/dist/internal/use-deferred-leave.mjs.map +1 -0
  510. package/dist/internal/use-dev-warning.mjs +8 -4
  511. package/dist/internal/use-dev-warning.mjs.map +1 -1
  512. package/dist/internal/use-element-check.mjs +39 -0
  513. package/dist/internal/use-element-check.mjs.map +1 -0
  514. package/dist/internal/use-item-order.mjs +42 -0
  515. package/dist/internal/use-item-order.mjs.map +1 -0
  516. package/dist/internal/use-latest.mjs +28 -0
  517. package/dist/internal/use-latest.mjs.map +1 -0
  518. package/dist/internal/use-merged-refs.mjs +19 -0
  519. package/dist/internal/use-merged-refs.mjs.map +1 -0
  520. package/dist/internal/use-mount-fixed.mjs +22 -0
  521. package/dist/internal/use-mount-fixed.mjs.map +1 -0
  522. package/dist/internal/use-name-warning.mjs +140 -0
  523. package/dist/internal/use-name-warning.mjs.map +1 -0
  524. package/dist/internal/use-native-focusgroup.mjs +19 -0
  525. package/dist/internal/use-native-focusgroup.mjs.map +1 -0
  526. package/dist/internal/use-option-registry.mjs +70 -0
  527. package/dist/internal/use-option-registry.mjs.map +1 -0
  528. package/dist/internal/use-register-count.mjs +27 -0
  529. package/dist/internal/use-register-count.mjs.map +1 -0
  530. package/dist/internal/use-render.d.mts +2 -0
  531. package/dist/internal/use-render.mjs +12 -35
  532. package/dist/internal/use-render.mjs.map +1 -1
  533. package/dist/internal/use-roving-focus.mjs +288 -0
  534. package/dist/internal/use-roving-focus.mjs.map +1 -0
  535. package/dist/internal/use-value-set.mjs +20 -0
  536. package/dist/internal/use-value-set.mjs.map +1 -0
  537. package/dist/internal/value-set.mjs +41 -0
  538. package/dist/internal/value-set.mjs.map +1 -0
  539. package/dist/menu/index.d.mts +8 -2
  540. package/dist/menu/index.d.mts.map +1 -1
  541. package/dist/menu/index.mjs +7 -1
  542. package/dist/menu/index.mjs.map +1 -1
  543. package/dist/menu/menu-checkbox-item.d.mts +27 -3
  544. package/dist/menu/menu-checkbox-item.d.mts.map +1 -1
  545. package/dist/menu/menu-checkbox-item.mjs +6 -3
  546. package/dist/menu/menu-checkbox-item.mjs.map +1 -1
  547. package/dist/menu/menu-context-trigger.d.mts +63 -0
  548. package/dist/menu/menu-context-trigger.d.mts.map +1 -0
  549. package/dist/menu/menu-context-trigger.mjs +231 -0
  550. package/dist/menu/menu-context-trigger.mjs.map +1 -0
  551. package/dist/menu/menu-context.d.mts +1 -1
  552. package/dist/menu/menu-context.mjs +44 -1
  553. package/dist/menu/menu-context.mjs.map +1 -1
  554. package/dist/menu/menu-dom.mjs +35 -4
  555. package/dist/menu/menu-dom.mjs.map +1 -1
  556. package/dist/menu/menu-gestures.mjs +166 -0
  557. package/dist/menu/menu-gestures.mjs.map +1 -0
  558. package/dist/menu/menu-group.d.mts +36 -1
  559. package/dist/menu/menu-group.d.mts.map +1 -1
  560. package/dist/menu/menu-group.mjs +15 -5
  561. package/dist/menu/menu-group.mjs.map +1 -1
  562. package/dist/menu/menu-hover.mjs +0 -1
  563. package/dist/menu/menu-hover.mjs.map +1 -1
  564. package/dist/menu/menu-item.d.mts +42 -5
  565. package/dist/menu/menu-item.d.mts.map +1 -1
  566. package/dist/menu/menu-item.mjs +18 -9
  567. package/dist/menu/menu-item.mjs.map +1 -1
  568. package/dist/menu/menu-outside.mjs +101 -0
  569. package/dist/menu/menu-outside.mjs.map +1 -0
  570. package/dist/menu/menu-point.mjs +85 -0
  571. package/dist/menu/menu-point.mjs.map +1 -0
  572. package/dist/menu/menu-popup.d.mts +68 -11
  573. package/dist/menu/menu-popup.d.mts.map +1 -1
  574. package/dist/menu/menu-popup.mjs +106 -116
  575. package/dist/menu/menu-popup.mjs.map +1 -1
  576. package/dist/menu/menu-radio-group.d.mts +20 -1
  577. package/dist/menu/menu-radio-group.d.mts.map +1 -1
  578. package/dist/menu/menu-radio-group.mjs +14 -7
  579. package/dist/menu/menu-radio-group.mjs.map +1 -1
  580. package/dist/menu/menu-radio-item.d.mts +18 -0
  581. package/dist/menu/menu-radio-item.d.mts.map +1 -1
  582. package/dist/menu/menu-radio-item.mjs +5 -1
  583. package/dist/menu/menu-radio-item.mjs.map +1 -1
  584. package/dist/menu/menu-root.d.mts +61 -12
  585. package/dist/menu/menu-root.d.mts.map +1 -1
  586. package/dist/menu/menu-root.mjs +72 -17
  587. package/dist/menu/menu-root.mjs.map +1 -1
  588. package/dist/menu/menu-submenu-trigger.d.mts +24 -9
  589. package/dist/menu/menu-submenu-trigger.d.mts.map +1 -1
  590. package/dist/menu/menu-submenu-trigger.mjs +48 -26
  591. package/dist/menu/menu-submenu-trigger.mjs.map +1 -1
  592. package/dist/menu/menu-trigger.d.mts +37 -16
  593. package/dist/menu/menu-trigger.d.mts.map +1 -1
  594. package/dist/menu/menu-trigger.mjs +39 -23
  595. package/dist/menu/menu-trigger.mjs.map +1 -1
  596. package/dist/menu/use-menu-item.mjs +14 -16
  597. package/dist/menu/use-menu-item.mjs.map +1 -1
  598. package/dist/menu/use-menu-keyboard.mjs +68 -0
  599. package/dist/menu/use-menu-keyboard.mjs.map +1 -0
  600. package/dist/meter/index.d.mts +26 -0
  601. package/dist/meter/index.d.mts.map +1 -0
  602. package/dist/meter/index.mjs +25 -0
  603. package/dist/meter/index.mjs.map +1 -0
  604. package/dist/meter/meter-context.mjs +13 -0
  605. package/dist/meter/meter-context.mjs.map +1 -0
  606. package/dist/meter/meter-indicator.d.mts +30 -0
  607. package/dist/meter/meter-indicator.d.mts.map +1 -0
  608. package/dist/meter/meter-indicator.mjs +27 -0
  609. package/dist/meter/meter-indicator.mjs.map +1 -0
  610. package/dist/meter/meter-label.d.mts +30 -0
  611. package/dist/meter/meter-label.d.mts.map +1 -0
  612. package/dist/meter/meter-label.mjs +30 -0
  613. package/dist/meter/meter-label.mjs.map +1 -0
  614. package/dist/meter/meter-region.d.mts +9 -0
  615. package/dist/meter/meter-region.d.mts.map +1 -0
  616. package/dist/meter/meter-region.mjs +39 -0
  617. package/dist/meter/meter-region.mjs.map +1 -0
  618. package/dist/meter/meter-root.d.mts +113 -0
  619. package/dist/meter/meter-root.d.mts.map +1 -0
  620. package/dist/meter/meter-root.mjs +85 -0
  621. package/dist/meter/meter-root.mjs.map +1 -0
  622. package/dist/meter/meter-track.d.mts +30 -0
  623. package/dist/meter/meter-track.d.mts.map +1 -0
  624. package/dist/meter/meter-track.mjs +27 -0
  625. package/dist/meter/meter-track.mjs.map +1 -0
  626. package/dist/meter/meter-value.d.mts +34 -0
  627. package/dist/meter/meter-value.d.mts.map +1 -0
  628. package/dist/meter/meter-value.mjs +31 -0
  629. package/dist/meter/meter-value.mjs.map +1 -0
  630. package/dist/multi-select/index.d.mts +37 -0
  631. package/dist/multi-select/index.d.mts.map +1 -0
  632. package/dist/multi-select/index.mjs +37 -0
  633. package/dist/multi-select/index.mjs.map +1 -0
  634. package/dist/multi-select/multi-select-context.mjs +19 -0
  635. package/dist/multi-select/multi-select-context.mjs.map +1 -0
  636. package/dist/multi-select/multi-select-group.d.mts +120 -0
  637. package/dist/multi-select/multi-select-group.d.mts.map +1 -0
  638. package/dist/multi-select/multi-select-group.mjs +111 -0
  639. package/dist/multi-select/multi-select-group.mjs.map +1 -0
  640. package/dist/multi-select/multi-select-keyboard.mjs +145 -0
  641. package/dist/multi-select/multi-select-keyboard.mjs.map +1 -0
  642. package/dist/multi-select/multi-select-label.d.mts +42 -0
  643. package/dist/multi-select/multi-select-label.d.mts.map +1 -0
  644. package/dist/multi-select/multi-select-label.mjs +41 -0
  645. package/dist/multi-select/multi-select-label.mjs.map +1 -0
  646. package/dist/multi-select/multi-select-list.d.mts +47 -0
  647. package/dist/multi-select/multi-select-list.d.mts.map +1 -0
  648. package/dist/multi-select/multi-select-list.mjs +65 -0
  649. package/dist/multi-select/multi-select-list.mjs.map +1 -0
  650. package/dist/multi-select/multi-select-option.d.mts +68 -0
  651. package/dist/multi-select/multi-select-option.d.mts.map +1 -0
  652. package/dist/multi-select/multi-select-option.mjs +93 -0
  653. package/dist/multi-select/multi-select-option.mjs.map +1 -0
  654. package/dist/multi-select/multi-select-popup.d.mts +58 -0
  655. package/dist/multi-select/multi-select-popup.d.mts.map +1 -0
  656. package/dist/multi-select/multi-select-popup.mjs +71 -0
  657. package/dist/multi-select/multi-select-popup.mjs.map +1 -0
  658. package/dist/multi-select/multi-select-root.d.mts +125 -0
  659. package/dist/multi-select/multi-select-root.d.mts.map +1 -0
  660. package/dist/multi-select/multi-select-root.mjs +257 -0
  661. package/dist/multi-select/multi-select-root.mjs.map +1 -0
  662. package/dist/multi-select/multi-select-trigger.d.mts +66 -0
  663. package/dist/multi-select/multi-select-trigger.d.mts.map +1 -0
  664. package/dist/multi-select/multi-select-trigger.mjs +169 -0
  665. package/dist/multi-select/multi-select-trigger.mjs.map +1 -0
  666. package/dist/multi-select/multi-select-value.d.mts +57 -0
  667. package/dist/multi-select/multi-select-value.d.mts.map +1 -0
  668. package/dist/multi-select/multi-select-value.mjs +41 -0
  669. package/dist/multi-select/multi-select-value.mjs.map +1 -0
  670. package/dist/number-field/index.d.mts +29 -0
  671. package/dist/number-field/index.d.mts.map +1 -0
  672. package/dist/number-field/index.mjs +28 -0
  673. package/dist/number-field/index.mjs.map +1 -0
  674. package/dist/number-field/number-field-arithmetic.mjs +97 -0
  675. package/dist/number-field/number-field-arithmetic.mjs.map +1 -0
  676. package/dist/number-field/number-field-context.d.mts +7 -0
  677. package/dist/number-field/number-field-context.d.mts.map +1 -0
  678. package/dist/number-field/number-field-context.mjs +13 -0
  679. package/dist/number-field/number-field-context.mjs.map +1 -0
  680. package/dist/number-field/number-field-decrement.d.mts +19 -0
  681. package/dist/number-field/number-field-decrement.d.mts.map +1 -0
  682. package/dist/number-field/number-field-decrement.mjs +22 -0
  683. package/dist/number-field/number-field-decrement.mjs.map +1 -0
  684. package/dist/number-field/number-field-format.mjs +279 -0
  685. package/dist/number-field/number-field-format.mjs.map +1 -0
  686. package/dist/number-field/number-field-increment.d.mts +19 -0
  687. package/dist/number-field/number-field-increment.d.mts.map +1 -0
  688. package/dist/number-field/number-field-increment.mjs +22 -0
  689. package/dist/number-field/number-field-increment.mjs.map +1 -0
  690. package/dist/number-field/number-field-input.d.mts +38 -0
  691. package/dist/number-field/number-field-input.d.mts.map +1 -0
  692. package/dist/number-field/number-field-input.mjs +161 -0
  693. package/dist/number-field/number-field-input.mjs.map +1 -0
  694. package/dist/number-field/number-field-label.d.mts +33 -0
  695. package/dist/number-field/number-field-label.d.mts.map +1 -0
  696. package/dist/number-field/number-field-label.mjs +43 -0
  697. package/dist/number-field/number-field-label.mjs.map +1 -0
  698. package/dist/number-field/number-field-root.d.mts +157 -0
  699. package/dist/number-field/number-field-root.d.mts.map +1 -0
  700. package/dist/number-field/number-field-root.mjs +445 -0
  701. package/dist/number-field/number-field-root.mjs.map +1 -0
  702. package/dist/number-field/use-number-field-dev-warnings.mjs +28 -0
  703. package/dist/number-field/use-number-field-dev-warnings.mjs.map +1 -0
  704. package/dist/number-field/use-step-button.d.mts +44 -0
  705. package/dist/number-field/use-step-button.d.mts.map +1 -0
  706. package/dist/number-field/use-step-button.mjs +175 -0
  707. package/dist/number-field/use-step-button.mjs.map +1 -0
  708. package/dist/otp-field/index.d.mts +23 -0
  709. package/dist/otp-field/index.d.mts.map +1 -0
  710. package/dist/otp-field/index.mjs +23 -0
  711. package/dist/otp-field/index.mjs.map +1 -0
  712. package/dist/otp-field/otp-field-context.mjs +13 -0
  713. package/dist/otp-field/otp-field-context.mjs.map +1 -0
  714. package/dist/otp-field/otp-field-filter.d.mts +5 -0
  715. package/dist/otp-field/otp-field-filter.d.mts.map +1 -0
  716. package/dist/otp-field/otp-field-filter.mjs +135 -0
  717. package/dist/otp-field/otp-field-filter.mjs.map +1 -0
  718. package/dist/otp-field/otp-field-input.d.mts +41 -0
  719. package/dist/otp-field/otp-field-input.d.mts.map +1 -0
  720. package/dist/otp-field/otp-field-input.mjs +177 -0
  721. package/dist/otp-field/otp-field-input.mjs.map +1 -0
  722. package/dist/otp-field/otp-field-root.d.mts +143 -0
  723. package/dist/otp-field/otp-field-root.d.mts.map +1 -0
  724. package/dist/otp-field/otp-field-root.mjs +397 -0
  725. package/dist/otp-field/otp-field-root.mjs.map +1 -0
  726. package/dist/otp-field/otp-field-slot.d.mts +52 -0
  727. package/dist/otp-field/otp-field-slot.d.mts.map +1 -0
  728. package/dist/otp-field/otp-field-slot.mjs +67 -0
  729. package/dist/otp-field/otp-field-slot.mjs.map +1 -0
  730. package/dist/popover/index.d.mts +6 -4
  731. package/dist/popover/index.d.mts.map +1 -1
  732. package/dist/popover/index.mjs +6 -4
  733. package/dist/popover/index.mjs.map +1 -1
  734. package/dist/popover/popover-close.d.mts +48 -8
  735. package/dist/popover/popover-close.d.mts.map +1 -1
  736. package/dist/popover/popover-close.mjs +41 -67
  737. package/dist/popover/popover-close.mjs.map +1 -1
  738. package/dist/popover/popover-context.mjs.map +1 -1
  739. package/dist/popover/popover-description.d.mts +12 -0
  740. package/dist/popover/popover-description.d.mts.map +1 -1
  741. package/dist/popover/popover-description.mjs +2 -0
  742. package/dist/popover/popover-description.mjs.map +1 -1
  743. package/dist/popover/popover-popup.d.mts +64 -18
  744. package/dist/popover/popover-popup.d.mts.map +1 -1
  745. package/dist/popover/popover-popup.mjs +31 -36
  746. package/dist/popover/popover-popup.mjs.map +1 -1
  747. package/dist/popover/popover-root.d.mts +40 -18
  748. package/dist/popover/popover-root.d.mts.map +1 -1
  749. package/dist/popover/popover-root.mjs +15 -10
  750. package/dist/popover/popover-root.mjs.map +1 -1
  751. package/dist/popover/popover-title.d.mts +11 -0
  752. package/dist/popover/popover-title.d.mts.map +1 -1
  753. package/dist/popover/popover-title.mjs +2 -0
  754. package/dist/popover/popover-title.mjs.map +1 -1
  755. package/dist/popover/popover-trigger.d.mts +38 -18
  756. package/dist/popover/popover-trigger.d.mts.map +1 -1
  757. package/dist/popover/popover-trigger.mjs +14 -9
  758. package/dist/popover/popover-trigger.mjs.map +1 -1
  759. package/dist/progress/index.d.mts +26 -0
  760. package/dist/progress/index.d.mts.map +1 -0
  761. package/dist/progress/index.mjs +26 -0
  762. package/dist/progress/index.mjs.map +1 -0
  763. package/dist/progress/progress-context.mjs +13 -0
  764. package/dist/progress/progress-context.mjs.map +1 -0
  765. package/dist/progress/progress-indicator.d.mts +30 -0
  766. package/dist/progress/progress-indicator.d.mts.map +1 -0
  767. package/dist/progress/progress-indicator.mjs +31 -0
  768. package/dist/progress/progress-indicator.mjs.map +1 -0
  769. package/dist/progress/progress-label.d.mts +30 -0
  770. package/dist/progress/progress-label.d.mts.map +1 -0
  771. package/dist/progress/progress-label.mjs +32 -0
  772. package/dist/progress/progress-label.mjs.map +1 -0
  773. package/dist/progress/progress-root.d.mts +96 -0
  774. package/dist/progress/progress-root.d.mts.map +1 -0
  775. package/dist/progress/progress-root.mjs +82 -0
  776. package/dist/progress/progress-root.mjs.map +1 -0
  777. package/dist/progress/progress-track.d.mts +30 -0
  778. package/dist/progress/progress-track.d.mts.map +1 -0
  779. package/dist/progress/progress-track.mjs +31 -0
  780. package/dist/progress/progress-track.mjs.map +1 -0
  781. package/dist/progress/progress-value.d.mts +34 -0
  782. package/dist/progress/progress-value.d.mts.map +1 -0
  783. package/dist/progress/progress-value.mjs +35 -0
  784. package/dist/progress/progress-value.mjs.map +1 -0
  785. package/dist/radio-group/index.d.mts +2 -0
  786. package/dist/radio-group/index.d.mts.map +1 -1
  787. package/dist/radio-group/index.mjs +2 -0
  788. package/dist/radio-group/index.mjs.map +1 -1
  789. package/dist/radio-group/radio-group-context.mjs.map +1 -1
  790. package/dist/radio-group/radio-group-item.d.mts +21 -5
  791. package/dist/radio-group/radio-group-item.d.mts.map +1 -1
  792. package/dist/radio-group/radio-group-item.mjs +22 -25
  793. package/dist/radio-group/radio-group-item.mjs.map +1 -1
  794. package/dist/radio-group/radio-group-label.d.mts +10 -0
  795. package/dist/radio-group/radio-group-label.d.mts.map +1 -1
  796. package/dist/radio-group/radio-group-label.mjs +3 -6
  797. package/dist/radio-group/radio-group-label.mjs.map +1 -1
  798. package/dist/radio-group/radio-group-root.d.mts +34 -8
  799. package/dist/radio-group/radio-group-root.d.mts.map +1 -1
  800. package/dist/radio-group/radio-group-root.mjs +48 -39
  801. package/dist/radio-group/radio-group-root.mjs.map +1 -1
  802. package/dist/select/index.d.mts +2 -0
  803. package/dist/select/index.d.mts.map +1 -1
  804. package/dist/select/index.mjs +2 -0
  805. package/dist/select/index.mjs.map +1 -1
  806. package/dist/select/select-dom.mjs +9 -18
  807. package/dist/select/select-dom.mjs.map +1 -1
  808. package/dist/select/select-group-label.d.mts +10 -0
  809. package/dist/select/select-group-label.d.mts.map +1 -1
  810. package/dist/select/select-group-label.mjs +5 -1
  811. package/dist/select/select-group-label.mjs.map +1 -1
  812. package/dist/select/select-group.d.mts +15 -1
  813. package/dist/select/select-group.d.mts.map +1 -1
  814. package/dist/select/select-group.mjs +8 -4
  815. package/dist/select/select-group.mjs.map +1 -1
  816. package/dist/select/select-option.d.mts +19 -1
  817. package/dist/select/select-option.d.mts.map +1 -1
  818. package/dist/select/select-option.mjs +4 -2
  819. package/dist/select/select-option.mjs.map +1 -1
  820. package/dist/select/select-root.d.mts +28 -3
  821. package/dist/select/select-root.d.mts.map +1 -1
  822. package/dist/select/select-root.mjs +39 -12
  823. package/dist/select/select-root.mjs.map +1 -1
  824. package/dist/select/select-separator.d.mts +9 -0
  825. package/dist/select/select-separator.d.mts.map +1 -1
  826. package/dist/select/select-separator.mjs +2 -0
  827. package/dist/select/select-separator.mjs.map +1 -1
  828. package/dist/select/select-trigger.d.mts +9 -0
  829. package/dist/select/select-trigger.d.mts.map +1 -1
  830. package/dist/select/select-trigger.mjs +5 -1
  831. package/dist/select/select-trigger.mjs.map +1 -1
  832. package/dist/select/select-value.d.mts +9 -0
  833. package/dist/select/select-value.d.mts.map +1 -1
  834. package/dist/select/select-value.mjs +5 -6
  835. package/dist/select/select-value.mjs.map +1 -1
  836. package/dist/separator/index.d.mts +3 -0
  837. package/dist/separator/index.mjs +1 -0
  838. package/dist/separator/separator.d.mts +58 -0
  839. package/dist/separator/separator.d.mts.map +1 -0
  840. package/dist/separator/separator.mjs +41 -0
  841. package/dist/separator/separator.mjs.map +1 -0
  842. package/dist/slider/index.d.mts +34 -0
  843. package/dist/slider/index.d.mts.map +1 -0
  844. package/dist/slider/index.mjs +29 -0
  845. package/dist/slider/index.mjs.map +1 -0
  846. package/dist/slider/slider-arithmetic.mjs +165 -0
  847. package/dist/slider/slider-arithmetic.mjs.map +1 -0
  848. package/dist/slider/slider-context.mjs +13 -0
  849. package/dist/slider/slider-context.mjs.map +1 -0
  850. package/dist/slider/slider-indicator.d.mts +34 -0
  851. package/dist/slider/slider-indicator.d.mts.map +1 -0
  852. package/dist/slider/slider-indicator.mjs +38 -0
  853. package/dist/slider/slider-indicator.mjs.map +1 -0
  854. package/dist/slider/slider-label.d.mts +33 -0
  855. package/dist/slider/slider-label.d.mts.map +1 -0
  856. package/dist/slider/slider-label.mjs +40 -0
  857. package/dist/slider/slider-label.mjs.map +1 -0
  858. package/dist/slider/slider-root.d.mts +155 -0
  859. package/dist/slider/slider-root.d.mts.map +1 -0
  860. package/dist/slider/slider-root.mjs +434 -0
  861. package/dist/slider/slider-root.mjs.map +1 -0
  862. package/dist/slider/slider-thumb.d.mts +87 -0
  863. package/dist/slider/slider-thumb.d.mts.map +1 -0
  864. package/dist/slider/slider-thumb.mjs +150 -0
  865. package/dist/slider/slider-thumb.mjs.map +1 -0
  866. package/dist/slider/slider-track.d.mts +46 -0
  867. package/dist/slider/slider-track.d.mts.map +1 -0
  868. package/dist/slider/slider-track.mjs +57 -0
  869. package/dist/slider/slider-track.mjs.map +1 -0
  870. package/dist/slider/slider-value.d.mts +45 -0
  871. package/dist/slider/slider-value.d.mts.map +1 -0
  872. package/dist/slider/slider-value.mjs +41 -0
  873. package/dist/slider/slider-value.mjs.map +1 -0
  874. package/dist/slider/use-slider-dev-warnings.mjs +29 -0
  875. package/dist/slider/use-slider-dev-warnings.mjs.map +1 -0
  876. package/dist/slider/use-thumb-registry.mjs +51 -0
  877. package/dist/slider/use-thumb-registry.mjs.map +1 -0
  878. package/dist/switch/switch.d.mts +30 -9
  879. package/dist/switch/switch.d.mts.map +1 -1
  880. package/dist/switch/switch.mjs +24 -46
  881. package/dist/switch/switch.mjs.map +1 -1
  882. package/dist/tabs/index.d.mts +2 -0
  883. package/dist/tabs/index.d.mts.map +1 -1
  884. package/dist/tabs/index.mjs +2 -0
  885. package/dist/tabs/index.mjs.map +1 -1
  886. package/dist/tabs/tabs-context.d.mts +7 -3
  887. package/dist/tabs/tabs-context.d.mts.map +1 -1
  888. package/dist/tabs/tabs-context.mjs.map +1 -1
  889. package/dist/tabs/tabs-indicator.d.mts +17 -0
  890. package/dist/tabs/tabs-indicator.d.mts.map +1 -1
  891. package/dist/tabs/tabs-indicator.mjs +4 -1
  892. package/dist/tabs/tabs-indicator.mjs.map +1 -1
  893. package/dist/tabs/tabs-list.d.mts +19 -1
  894. package/dist/tabs/tabs-list.d.mts.map +1 -1
  895. package/dist/tabs/tabs-list.mjs +12 -23
  896. package/dist/tabs/tabs-list.mjs.map +1 -1
  897. package/dist/tabs/tabs-panel.d.mts +22 -4
  898. package/dist/tabs/tabs-panel.d.mts.map +1 -1
  899. package/dist/tabs/tabs-panel.mjs +4 -2
  900. package/dist/tabs/tabs-panel.mjs.map +1 -1
  901. package/dist/tabs/tabs-root.d.mts +43 -8
  902. package/dist/tabs/tabs-root.d.mts.map +1 -1
  903. package/dist/tabs/tabs-root.mjs +23 -10
  904. package/dist/tabs/tabs-root.mjs.map +1 -1
  905. package/dist/tabs/tabs-tab.d.mts +25 -5
  906. package/dist/tabs/tabs-tab.d.mts.map +1 -1
  907. package/dist/tabs/tabs-tab.mjs +5 -2
  908. package/dist/tabs/tabs-tab.mjs.map +1 -1
  909. package/dist/{internal → tabs}/use-until-found.mjs +1 -1
  910. package/dist/tabs/use-until-found.mjs.map +1 -0
  911. package/dist/toast/index.d.mts +27 -0
  912. package/dist/toast/index.d.mts.map +1 -0
  913. package/dist/toast/index.mjs +28 -0
  914. package/dist/toast/index.mjs.map +1 -0
  915. package/dist/toast/toast-action.d.mts +86 -0
  916. package/dist/toast/toast-action.d.mts.map +1 -0
  917. package/dist/toast/toast-action.mjs +81 -0
  918. package/dist/toast/toast-action.mjs.map +1 -0
  919. package/dist/toast/toast-close.d.mts +52 -0
  920. package/dist/toast/toast-close.d.mts.map +1 -0
  921. package/dist/toast/toast-close.mjs +53 -0
  922. package/dist/toast/toast-close.mjs.map +1 -0
  923. package/dist/toast/toast-context.mjs +19 -0
  924. package/dist/toast/toast-context.mjs.map +1 -0
  925. package/dist/toast/toast-description.d.mts +39 -0
  926. package/dist/toast/toast-description.d.mts.map +1 -0
  927. package/dist/toast/toast-description.mjs +37 -0
  928. package/dist/toast/toast-description.mjs.map +1 -0
  929. package/dist/toast/toast-hotkey.mjs +27 -0
  930. package/dist/toast/toast-hotkey.mjs.map +1 -0
  931. package/dist/toast/toast-queue.mjs +137 -0
  932. package/dist/toast/toast-queue.mjs.map +1 -0
  933. package/dist/toast/toast-root.d.mts +63 -0
  934. package/dist/toast/toast-root.d.mts.map +1 -0
  935. package/dist/toast/toast-root.mjs +209 -0
  936. package/dist/toast/toast-root.mjs.map +1 -0
  937. package/dist/toast/toast-timers.mjs +65 -0
  938. package/dist/toast/toast-timers.mjs.map +1 -0
  939. package/dist/toast/toast-title.d.mts +38 -0
  940. package/dist/toast/toast-title.d.mts.map +1 -0
  941. package/dist/toast/toast-title.mjs +35 -0
  942. package/dist/toast/toast-title.mjs.map +1 -0
  943. package/dist/toast/toast-viewport.d.mts +81 -0
  944. package/dist/toast/toast-viewport.d.mts.map +1 -0
  945. package/dist/toast/toast-viewport.mjs +345 -0
  946. package/dist/toast/toast-viewport.mjs.map +1 -0
  947. package/dist/toast/toast.d.mts +162 -0
  948. package/dist/toast/toast.d.mts.map +1 -0
  949. package/dist/toast/toast.mjs +161 -0
  950. package/dist/toast/toast.mjs.map +1 -0
  951. package/dist/toast/use-modal-portal-host.mjs +52 -0
  952. package/dist/toast/use-modal-portal-host.mjs.map +1 -0
  953. package/dist/toast/use-toast-announcements.mjs +46 -0
  954. package/dist/toast/use-toast-announcements.mjs.map +1 -0
  955. package/dist/toast/use-toast-focus.mjs +75 -0
  956. package/dist/toast/use-toast-focus.mjs.map +1 -0
  957. package/dist/toast/use-toast-pauses.mjs +58 -0
  958. package/dist/toast/use-toast-pauses.mjs.map +1 -0
  959. package/dist/toggle/toggle.d.mts +26 -6
  960. package/dist/toggle/toggle.d.mts.map +1 -1
  961. package/dist/toggle/toggle.mjs +12 -6
  962. package/dist/toggle/toggle.mjs.map +1 -1
  963. package/dist/toggle-group/index.d.mts +18 -0
  964. package/dist/toggle-group/index.d.mts.map +1 -0
  965. package/dist/toggle-group/index.mjs +17 -0
  966. package/dist/toggle-group/index.mjs.map +1 -0
  967. package/dist/toggle-group/toggle-group-context.d.mts +6 -0
  968. package/dist/toggle-group/toggle-group-context.d.mts.map +1 -0
  969. package/dist/toggle-group/toggle-group-context.mjs +13 -0
  970. package/dist/toggle-group/toggle-group-context.mjs.map +1 -0
  971. package/dist/toggle-group/toggle-group-item.d.mts +71 -0
  972. package/dist/toggle-group/toggle-group-item.d.mts.map +1 -0
  973. package/dist/toggle-group/toggle-group-item.mjs +69 -0
  974. package/dist/toggle-group/toggle-group-item.mjs.map +1 -0
  975. package/dist/toggle-group/toggle-group-root.d.mts +156 -0
  976. package/dist/toggle-group/toggle-group-root.d.mts.map +1 -0
  977. package/dist/toggle-group/toggle-group-root.mjs +177 -0
  978. package/dist/toggle-group/toggle-group-root.mjs.map +1 -0
  979. package/dist/toolbar/index.d.mts +19 -0
  980. package/dist/toolbar/index.d.mts.map +1 -0
  981. package/dist/toolbar/index.mjs +19 -0
  982. package/dist/toolbar/index.mjs.map +1 -0
  983. package/dist/toolbar/toolbar-root.d.mts +65 -0
  984. package/dist/toolbar/toolbar-root.d.mts.map +1 -0
  985. package/dist/toolbar/toolbar-root.mjs +67 -0
  986. package/dist/toolbar/toolbar-root.mjs.map +1 -0
  987. package/dist/toolbar/toolbar-separator.d.mts +38 -0
  988. package/dist/toolbar/toolbar-separator.d.mts.map +1 -0
  989. package/dist/toolbar/toolbar-separator.mjs +33 -0
  990. package/dist/toolbar/toolbar-separator.mjs.map +1 -0
  991. package/dist/tooltip/index.d.mts +10 -5
  992. package/dist/tooltip/index.d.mts.map +1 -1
  993. package/dist/tooltip/index.mjs +8 -3
  994. package/dist/tooltip/index.mjs.map +1 -1
  995. package/dist/tooltip/tooltip-arrow.d.mts +46 -0
  996. package/dist/tooltip/tooltip-arrow.d.mts.map +1 -0
  997. package/dist/tooltip/tooltip-arrow.mjs +47 -0
  998. package/dist/tooltip/tooltip-arrow.mjs.map +1 -0
  999. package/dist/tooltip/tooltip-context.d.mts +11 -0
  1000. package/dist/tooltip/tooltip-context.d.mts.map +1 -1
  1001. package/dist/tooltip/tooltip-context.mjs +2 -1
  1002. package/dist/tooltip/tooltip-context.mjs.map +1 -1
  1003. package/dist/tooltip/tooltip-popup.d.mts +49 -7
  1004. package/dist/tooltip/tooltip-popup.d.mts.map +1 -1
  1005. package/dist/tooltip/tooltip-popup.mjs +37 -15
  1006. package/dist/tooltip/tooltip-popup.mjs.map +1 -1
  1007. package/dist/tooltip/tooltip-root.d.mts +24 -2
  1008. package/dist/tooltip/tooltip-root.d.mts.map +1 -1
  1009. package/dist/tooltip/tooltip-root.mjs +29 -6
  1010. package/dist/tooltip/tooltip-root.mjs.map +1 -1
  1011. package/dist/tooltip/tooltip-trigger.d.mts +28 -3
  1012. package/dist/tooltip/tooltip-trigger.d.mts.map +1 -1
  1013. package/dist/tooltip/tooltip-trigger.mjs +26 -6
  1014. package/dist/tooltip/tooltip-trigger.mjs.map +1 -1
  1015. package/dist/tooltip/tooltip-warm.mjs +29 -0
  1016. package/dist/tooltip/tooltip-warm.mjs.map +1 -0
  1017. package/dist/tooltip/use-tooltip-interaction.mjs +128 -77
  1018. package/dist/tooltip/use-tooltip-interaction.mjs.map +1 -1
  1019. package/package.json +30 -2
  1020. package/skills/funstack-ui-knowledge/SKILL.md +84 -0
  1021. package/dist/accordion/accordion-context.d.mts +0 -5
  1022. package/dist/accordion/accordion-context.d.mts.map +0 -1
  1023. package/dist/internal/action-details.mjs.map +0 -1
  1024. package/dist/internal/anchor-position.d.mts +0 -7
  1025. package/dist/internal/anchor-position.d.mts.map +0 -1
  1026. package/dist/internal/anchor-position.mjs +0 -16
  1027. package/dist/internal/anchor-position.mjs.map +0 -1
  1028. package/dist/internal/sync-presence.mjs.map +0 -1
  1029. package/dist/internal/use-action-trigger.mjs +0 -58
  1030. package/dist/internal/use-action-trigger.mjs.map +0 -1
  1031. package/dist/internal/use-controllable-action.mjs +0 -119
  1032. package/dist/internal/use-controllable-action.mjs.map +0 -1
  1033. package/dist/internal/use-exit-animation.mjs.map +0 -1
  1034. package/dist/internal/use-form-reset.mjs +0 -54
  1035. package/dist/internal/use-form-reset.mjs.map +0 -1
  1036. package/dist/internal/use-native-checked.mjs.map +0 -1
  1037. package/dist/internal/use-native-group-reconciliation.mjs.map +0 -1
  1038. package/dist/internal/use-native-select-value.mjs.map +0 -1
  1039. package/dist/internal/use-popover-popup.mjs +0 -274
  1040. package/dist/internal/use-popover-popup.mjs.map +0 -1
  1041. package/dist/internal/use-popover-root.d.mts +0 -2
  1042. package/dist/internal/use-popover-root.mjs +0 -112
  1043. package/dist/internal/use-popover-root.mjs.map +0 -1
  1044. package/dist/internal/use-popover-trigger.mjs +0 -86
  1045. package/dist/internal/use-popover-trigger.mjs.map +0 -1
  1046. package/dist/internal/use-until-found.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-step-commit.mjs","names":[],"sources":["../../../src/internal/action/use-step-commit.ts"],"sourcesContent":["\"use client\";\nimport { addTransitionType, useCallback, useMemo, useRef, useState } from \"react\";\nimport type { RefObject } from \"react\";\nimport { createActionDetails } from \"./action-details.js\";\nimport type { ActionDetails, ChangeAction, ChangeReason } from \"../types.js\";\nimport { useActionTrigger } from \"./use-action-trigger.js\";\nimport { useControllableAction } from \"./use-controllable-action.js\";\nimport { useLatest } from \"../use-latest.js\";\n\n/** A value in a box: `null` is a value for some controls, so \"none\" is the box's absence. */\ninterface Boxed<V> {\n readonly value: V;\n}\n\nexport interface StepCommitOptions<T, V, S, F extends object> {\n /** The controlled value (`undefined`: uncontrolled). */\n readonly controlled: T | undefined;\n readonly defaultValue: T | undefined;\n readonly initialValue: T;\n /** `valueChangeAction`: run in the step transition on every step. */\n readonly stepAction: ChangeAction<T, F & ActionDetails> | undefined;\n /** `valueCommitAction`: the action of `useControllableAction`, once per gesture. */\n readonly commitAction: ChangeAction<T, F & ActionDetails> | undefined;\n /** The step transition's types (`transitionTypes(component, \"change\")`). */\n readonly stepTypes: readonly string[];\n /** The commit transition's types (`transitionTypes(component, \"commit\")`). */\n readonly commitTypes: readonly string[];\n /** `useControllableAction`'s mode-switch warning. */\n readonly warn: { readonly component: string; readonly prop: string };\n /** The value as the control works with it internally. Stable (a module-level function). */\n readonly toShown: (value: T) => V;\n /** Back to the prop's shape, for the actions. */\n readonly fromShown: (shown: V) => T;\n /** The no-op test of a step and of a commit (conventions 2.3 item 8). */\n readonly equals: (a: V, b: V) => boolean;\n /** The component's `details` fields for a step or a commit from `source`. */\n readonly details: (reason: ChangeReason, source: S | null) => F;\n /** A pointer is captured (a drag, a held button): holds `live` on screen by itself. */\n readonly captured: boolean;\n /** Applied to every step's value before the no-op test (NumberField's rounding). */\n readonly normalize?: ((next: V) => V) | undefined;\n /** Called by a step that changed the value, before its action runs. */\n readonly onStep?: ((next: V) => void) | undefined;\n /** Called by a commit that dispatched, after the dispatch. */\n readonly onCommit?: ((next: V, source: S | null, reason: ChangeReason) => void) | undefined;\n}\n\nexport interface StepCommit<T, V, S> {\n /** What the control shows: `live` while held, else the optimistic value. */\n readonly shown: V;\n /** `shown` for handlers; also written by `step` ahead of the render. */\n readonly shownRef: RefObject<V>;\n /** The optimistic value, in the prop's shape. */\n readonly optimistic: T;\n /** The optimistic value, through `toShown`. */\n readonly optimisticShown: V;\n /** A step or a commit is in flight. */\n readonly pending: boolean;\n /** The source of the latest step or commit (raw: not cleared when nothing is pending). */\n readonly pendingSource: S | null;\n /**\n * One step: a pointer move, a key press, a tick, a platform change, the `\"dismiss\"` revert.\n * Returns `false` when `next` equals what is shown (nothing happened).\n */\n readonly step: (\n next: V,\n source: S | null,\n reason: ChangeReason,\n event: Event | undefined,\n ) => boolean;\n /**\n * Ends the open gesture: dispatches the commit of the value its steps reached, unless no\n * gesture is open or the value is back where the gesture began. Returns whether it dispatched.\n */\n readonly commit: (source: S | null, reason: ChangeReason, event: Event | undefined) => boolean;\n /** Opens a gesture at the shown value. */\n readonly openGesture: () => void;\n /** Opens a gesture at the shown value and shows it as `live` (a pointer capture begins). */\n readonly captureGesture: () => void;\n /**\n * Opens a gesture that began at `start`, unless one is open; the value it reached is left as\n * the step that calls this wrote it (Slider's native `input`, whose `change` commits later).\n */\n readonly markGestureStart: (start: V) => void;\n /**\n * For `useFieldValueChange`: whether the latest change was the user's (`\"activate\"`); consumes\n * it, so a later change from elsewhere is not taken for an edit.\n */\n readonly takeEdit: () => boolean;\n}\n\n/**\n * The step and commit core of a continuous control (conventions 2.3 corollary; slider.md 2.2 to\n * 2.4, number-field.md 2.2 to 2.4), shared by Slider and NumberField. Two channels: every step\n * runs `stepAction` in its own transition (`useActionTrigger`, no re-entry guard), once per\n * gesture `commitAction` is the action of `useControllableAction`. The value a gesture has\n * reached is urgent state (`live`), shown while a pointer is captured, a step waits for its\n * commit (`stepHeld`) or anything is in flight. A rejected commit in uncontrolled mode, for the\n * latest commit only, leaves the transition and reports the revert as a `\"dismiss\"` step.\n *\n * `T` is the prop's value, `V` the value the control works with (Slider: an array per thumb),\n * `S` the source of a gesture (Slider: the thumb index; NumberField: the button, key, wheel or\n * input), `F` the component's `details` fields.\n */\nexport function useStepCommit<T, V, S, F extends object>(\n options: StepCommitOptions<T, V, S, F>,\n): StepCommit<T, V, S> {\n const { controlled, defaultValue, initialValue, commitAction, commitTypes, warn, toShown } =\n options;\n\n /** The value the open gesture has reached, for rendering. */\n const [live, setLive] = useState<Boxed<V> | null>(null);\n /**\n * A step was taken and its gesture's commit has not been dispatched yet. Holds `live` on\n * screen between a step and its commit when no step transition runs (no `stepAction`):\n * otherwise react-dom restores a controlled input to the old value after its `input`, and\n * Firefox then fires no `change` (slider.md 2.2).\n */\n const [stepHeld, setStepHeld] = useState(false);\n const [pendingSource, setPendingSource] = useState<S | null>(null);\n\n /** The value of the latest step, read by the commit in the same or a later event. */\n const liveRef = useRef<Boxed<V> | null>(null);\n /** The shown value when the open gesture began; `null` when no gesture is open. */\n const gestureStart = useRef<Boxed<V> | null>(null);\n const commitSeq = useRef(0);\n /**\n * The reason of the latest change the user or the platform made, consumed by `takeEdit`:\n * `\"activate\"` dismisses a shown server error, a rollback does not.\n */\n const lastReason = useRef<ChangeReason | null>(null);\n\n const runCommit = async (next: T, details: F & ActionDetails): Promise<void> => {\n const seq = ++commitSeq.current;\n try {\n await commitAction?.(next, details);\n } catch (error) {\n // In uncontrolled mode, tell the preview channel about the rollback, for the latest commit\n // only. Yield once to leave the commit's transition (conventions 2.6).\n if (controlled === undefined && seq === commitSeq.current) {\n await undefined;\n // `step` and `committedRef` are declared below; this runs long after the render.\n step(toShown(committedRef.current), null, \"dismiss\", undefined);\n }\n throw error;\n }\n };\n\n const commitState = useControllableAction<T, F & ActionDetails>({\n controlled,\n defaultValue,\n initialValue,\n action: runCommit,\n transitionTypes: () => commitTypes,\n warn,\n });\n const { optimistic, committed, dispatch } = commitState;\n const committedRef = useLatest(committed);\n\n // A step is not a re-entry: a continuous control dispatches one step per key press or pointer\n // move and every step must run (design/components/button.md 16.1), so no in-flight guard.\n const { pending: stepPending, run: runStep } = useActionTrigger({\n ignoreWhilePending: false,\n });\n\n const optimisticShown = useMemo(() => toShown(optimistic), [optimistic, toShown]);\n const held = options.captured || stepHeld || stepPending || commitState.pending;\n const shown = held && live !== null ? live.value : optimisticShown;\n const pending = stepPending || commitState.pending;\n\n const shownRef = useLatest(shown);\n\n const latest = useLatest({\n stepAction: options.stepAction,\n stepTypes: options.stepTypes,\n fromShown: options.fromShown,\n equals: options.equals,\n details: options.details,\n normalize: options.normalize,\n onStep: options.onStep,\n onCommit: options.onCommit,\n runStep,\n });\n\n const step = useCallback(\n (next: V, source: S | null, reason: ChangeReason, event: Event | undefined): boolean => {\n const { normalize, equals, onStep } = latest.current;\n if (normalize !== undefined) next = normalize(next);\n // No-op against what the user sees (conventions 2.3 item 8).\n if (equals(next, shownRef.current)) return false;\n const reached = { value: next };\n liveRef.current = reached;\n shownRef.current = next;\n // A controlled parent that adopts steps changes the optimistic value per step.\n lastReason.current = reason;\n setLive(reached);\n setPendingSource(source);\n onStep?.(next);\n // A revert has no commit after it: the optimistic value already shows the committed one.\n if (reason !== \"dismiss\") setStepHeld(true);\n const { stepAction: action, stepTypes, fromShown, details, runStep: run } = latest.current;\n // Without a step action there is nothing to run and no consumer update to keep\n // interruptible: no transition, so `data-pending` does not blink on every pointer move.\n if (action === undefined) return true;\n run(() => {\n for (const type of stepTypes) addTransitionType(type);\n return action(fromShown(next), createActionDetails(event, details(reason, source)));\n });\n return true;\n },\n [latest, shownRef],\n );\n\n const commit = useCallback(\n (source: S | null, reason: ChangeReason, event: Event | undefined): boolean => {\n const start = gestureStart.current;\n gestureStart.current = null;\n // The commit's own pending state holds `live` from here (set in this same batch).\n setStepHeld(false);\n const reached = liveRef.current;\n const { equals, fromShown, details, onCommit } = latest.current;\n // Nothing changed since the gesture began (a drag out and back, a trailing `change`).\n if (start === null || reached === null || equals(reached.value, start.value)) return false;\n const next = reached.value;\n lastReason.current = reason;\n setPendingSource(source);\n dispatch(fromShown(next), createActionDetails(event, details(reason, source)));\n onCommit?.(next, source, reason);\n return true;\n },\n [dispatch, latest],\n );\n\n const openGesture = useCallback(() => {\n const start = { value: shownRef.current };\n gestureStart.current = start;\n liveRef.current = start;\n }, [shownRef]);\n\n const captureGesture = useCallback(() => {\n openGesture();\n // A capture alone holds `live` on screen: start it from what is shown, not from the value\n // an earlier gesture left behind (a press that steps nothing).\n setLive({ value: shownRef.current });\n }, [openGesture, shownRef]);\n\n const markGestureStart = useCallback((start: V) => {\n if (gestureStart.current === null) gestureStart.current = { value: start };\n }, []);\n\n const takeEdit = useCallback(() => {\n const edit = lastReason.current === \"activate\";\n lastReason.current = null;\n return edit;\n }, []);\n\n return {\n shown,\n shownRef,\n optimistic,\n optimisticShown,\n pending,\n pendingSource,\n step,\n commit,\n openGesture,\n captureGesture,\n markGestureStart,\n takeEdit,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwGA,SAAgB,cACd,SACqB;CACrB,MAAM,EAAE,YAAY,cAAc,cAAc,cAAc,aAAa,MAAM,YAC/E;;CAGF,MAAM,CAAC,MAAM,WAAW,SAA0B,IAAI;;;;;;;CAOtD,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAC9C,MAAM,CAAC,eAAe,oBAAoB,SAAmB,IAAI;;CAGjE,MAAM,UAAU,OAAwB,IAAI;;CAE5C,MAAM,eAAe,OAAwB,IAAI;CACjD,MAAM,YAAY,OAAO,CAAC;;;;;CAK1B,MAAM,aAAa,OAA4B,IAAI;CAEnD,MAAM,YAAY,OAAO,MAAS,YAA8C;EAC9E,MAAM,MAAM,EAAE,UAAU;EACxB,IAAI;GACF,MAAM,eAAe,MAAM,OAAO;EACpC,SAAS,OAAO;GAGd,IAAI,eAAe,KAAA,KAAa,QAAQ,UAAU,SAAS;IACzD,MAAM,KAAA;IAEN,KAAK,QAAQ,aAAa,OAAO,GAAG,MAAM,WAAW,KAAA,CAAS;GAChE;GACA,MAAM;EACR;CACF;CAEA,MAAM,cAAc,sBAA4C;EAC9D;EACA;EACA;EACA,QAAQ;EACR,uBAAuB;EACvB;CACF,CAAC;CACD,MAAM,EAAE,YAAY,WAAW,aAAa;CAC5C,MAAM,eAAe,UAAU,SAAS;CAIxC,MAAM,EAAE,SAAS,aAAa,KAAK,YAAY,iBAAiB,EAC9D,oBAAoB,MACtB,CAAC;CAED,MAAM,kBAAkB,cAAc,QAAQ,UAAU,GAAG,CAAC,YAAY,OAAO,CAAC;CAEhF,MAAM,SADO,QAAQ,YAAY,YAAY,eAAe,YAAY,YAClD,SAAS,OAAO,KAAK,QAAQ;CACnD,MAAM,UAAU,eAAe,YAAY;CAE3C,MAAM,WAAW,UAAU,KAAK;CAEhC,MAAM,SAAS,UAAU;EACvB,YAAY,QAAQ;EACpB,WAAW,QAAQ;EACnB,WAAW,QAAQ;EACnB,QAAQ,QAAQ;EAChB,SAAS,QAAQ;EACjB,WAAW,QAAQ;EACnB,QAAQ,QAAQ;EAChB,UAAU,QAAQ;EAClB;CACF,CAAC;CAED,MAAM,OAAO,aACV,MAAS,QAAkB,QAAsB,UAAsC;EACtF,MAAM,EAAE,WAAW,QAAQ,WAAW,OAAO;EAC7C,IAAI,cAAc,KAAA,GAAW,OAAO,UAAU,IAAI;EAElD,IAAI,OAAO,MAAM,SAAS,OAAO,GAAG,OAAO;EAC3C,MAAM,UAAU,EAAE,OAAO,KAAK;EAC9B,QAAQ,UAAU;EAClB,SAAS,UAAU;EAEnB,WAAW,UAAU;EACrB,QAAQ,OAAO;EACf,iBAAiB,MAAM;EACvB,SAAS,IAAI;EAEb,IAAI,WAAW,WAAW,YAAY,IAAI;EAC1C,MAAM,EAAE,YAAY,QAAQ,WAAW,WAAW,SAAS,SAAS,QAAQ,OAAO;EAGnF,IAAI,WAAW,KAAA,GAAW,OAAO;EACjC,UAAU;GACR,KAAK,MAAM,QAAQ,WAAW,kBAAkB,IAAI;GACpD,OAAO,OAAO,UAAU,IAAI,GAAG,oBAAoB,OAAO,QAAQ,QAAQ,MAAM,CAAC,CAAC;EACpF,CAAC;EACD,OAAO;CACT,GACA,CAAC,QAAQ,QAAQ,CACnB;CAEA,MAAM,SAAS,aACZ,QAAkB,QAAsB,UAAsC;EAC7E,MAAM,QAAQ,aAAa;EAC3B,aAAa,UAAU;EAEvB,YAAY,KAAK;EACjB,MAAM,UAAU,QAAQ;EACxB,MAAM,EAAE,QAAQ,WAAW,SAAS,aAAa,OAAO;EAExD,IAAI,UAAU,QAAQ,YAAY,QAAQ,OAAO,QAAQ,OAAO,MAAM,KAAK,GAAG,OAAO;EACrF,MAAM,OAAO,QAAQ;EACrB,WAAW,UAAU;EACrB,iBAAiB,MAAM;EACvB,SAAS,UAAU,IAAI,GAAG,oBAAoB,OAAO,QAAQ,QAAQ,MAAM,CAAC,CAAC;EAC7E,WAAW,MAAM,QAAQ,MAAM;EAC/B,OAAO;CACT,GACA,CAAC,UAAU,MAAM,CACnB;CAEA,MAAM,cAAc,kBAAkB;EACpC,MAAM,QAAQ,EAAE,OAAO,SAAS,QAAQ;EACxC,aAAa,UAAU;EACvB,QAAQ,UAAU;CACpB,GAAG,CAAC,QAAQ,CAAC;CAmBb,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,gBA3BqB,kBAAkB;GACvC,YAAY;GAGZ,QAAQ,EAAE,OAAO,SAAS,QAAQ,CAAC;EACrC,GAAG,CAAC,aAAa,QAAQ,CAsBV;EACb,kBArBuB,aAAa,UAAa;GACjD,IAAI,aAAa,YAAY,MAAM,aAAa,UAAU,EAAE,OAAO,MAAM;EAC3E,GAAG,CAAC,CAmBa;EACf,UAlBe,kBAAkB;GACjC,MAAM,OAAO,WAAW,YAAY;GACpC,WAAW,UAAU;GACrB,OAAO;EACT,GAAG,CAAC,CAcK;CACT;AACF"}
@@ -0,0 +1,20 @@
1
+ //#region src/internal/announce.ts
2
+ /** Whether `target` has `ariaNotify()` (not jsdom, nor a lagging test build). */
3
+ function canAnnounce(target) {
4
+ return typeof target.ariaNotify === "function";
5
+ }
6
+ /**
7
+ * Speaks `message` in the context of `target` through `target.ariaNotify()`, with `priority`
8
+ * when given. An empty message, or an engine without `ariaNotify`, announces nothing.
9
+ */
10
+ function announce(target, message, priority) {
11
+ if (message === "") return;
12
+ const notifying = target;
13
+ if (typeof notifying.ariaNotify !== "function") return;
14
+ if (priority === void 0) notifying.ariaNotify(message);
15
+ else notifying.ariaNotify(message, { priority });
16
+ }
17
+ //#endregion
18
+ export { announce, canAnnounce };
19
+
20
+ //# sourceMappingURL=announce.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"announce.mjs","names":[],"sources":["../../src/internal/announce.ts"],"sourcesContent":["// Directive-free: screen-reader announcements (design/components/number-field.md 8.3,\n// conventions 8) through `ariaNotify()`, which every supported engine has (Chrome 141,\n// Firefox 150, Safari 27). No live region fallback (docs/vision.md: no fallbacks): a region in\n// `document.body` would be inert under a modal dialog anyway. No part renders a live region for\n// these announcements.\n\n/** `ariaNotify()` on an element or a document, where the engine has it (not in the DOM types yet). */\ninterface AriaNotifyTarget {\n ariaNotify?: (announcement: string, options?: { priority?: \"normal\" | \"high\" }) => void;\n}\n\n/** Whether `target` has `ariaNotify()` (not jsdom, nor a lagging test build). */\nexport function canAnnounce(target: Element | Document): boolean {\n return typeof (target as AriaNotifyTarget).ariaNotify === \"function\";\n}\n\n/**\n * Speaks `message` in the context of `target` through `target.ariaNotify()`, with `priority`\n * when given. An empty message, or an engine without `ariaNotify`, announces nothing.\n */\nexport function announce(\n target: Element | Document,\n message: string,\n priority?: \"normal\" | \"high\",\n): void {\n if (message === \"\") return;\n const notifying = target as AriaNotifyTarget;\n if (typeof notifying.ariaNotify !== \"function\") return;\n if (priority === undefined) notifying.ariaNotify(message);\n else notifying.ariaNotify(message, { priority });\n}\n"],"mappings":";;AAYA,SAAgB,YAAY,QAAqC;CAC/D,OAAO,OAAQ,OAA4B,eAAe;AAC5D;;;;;AAMA,SAAgB,SACd,QACA,SACA,UACM;CACN,IAAI,YAAY,IAAI;CACpB,MAAM,YAAY;CAClB,IAAI,OAAO,UAAU,eAAe,YAAY;CAChD,IAAI,aAAa,KAAA,GAAW,UAAU,WAAW,OAAO;MACnD,UAAU,WAAW,SAAS,EAAE,SAAS,CAAC;AACjD"}
@@ -0,0 +1,21 @@
1
+ //#region src/internal/arrow-keys.ts
2
+ /** The move `key` makes along `orientation` (Home / End on both axes; mirrored when `rtl`). */
3
+ function resolveArrowKey(key, orientation, rtl) {
4
+ switch (key) {
5
+ case "Home": return "first";
6
+ case "End": return "last";
7
+ case "ArrowRight": return orientation === "horizontal" ? rtl ? "prev" : "next" : null;
8
+ case "ArrowLeft": return orientation === "horizontal" ? rtl ? "next" : "prev" : null;
9
+ case "ArrowDown": return orientation === "vertical" ? "next" : null;
10
+ case "ArrowUp": return orientation === "vertical" ? "prev" : null;
11
+ default: return null;
12
+ }
13
+ }
14
+ /** Keyboard focus: the ring shows even where the engine's heuristic would not. */
15
+ function focusWithRing(element) {
16
+ element.focus({ focusVisible: true });
17
+ }
18
+ //#endregion
19
+ export { focusWithRing, resolveArrowKey };
20
+
21
+ //# sourceMappingURL=arrow-keys.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-keys.mjs","names":[],"sources":["../../src/internal/arrow-keys.ts"],"sourcesContent":["// Arrow-key navigation shared by the roving-focus engine and Tabs.List. No directive: pure\n// functions (conventions 7.1).\nimport type { Orientation } from \"./types.js\";\n\nexport type ArrowMove = \"next\" | \"prev\" | \"first\" | \"last\";\n\n/** The move `key` makes along `orientation` (Home / End on both axes; mirrored when `rtl`). */\nexport function resolveArrowKey(\n key: string,\n orientation: Orientation,\n rtl: boolean,\n): ArrowMove | null {\n switch (key) {\n case \"Home\":\n return \"first\";\n case \"End\":\n return \"last\";\n case \"ArrowRight\":\n return orientation === \"horizontal\" ? (rtl ? \"prev\" : \"next\") : null;\n case \"ArrowLeft\":\n return orientation === \"horizontal\" ? (rtl ? \"next\" : \"prev\") : null;\n case \"ArrowDown\":\n return orientation === \"vertical\" ? \"next\" : null;\n case \"ArrowUp\":\n return orientation === \"vertical\" ? \"prev\" : null;\n default:\n return null;\n }\n}\n\n/** Keyboard focus: the ring shows even where the engine's heuristic would not. */\nexport function focusWithRing(element: HTMLElement): void {\n element.focus({ focusVisible: true } as FocusOptions);\n}\n"],"mappings":";;AAOA,SAAgB,gBACd,KACA,aACA,KACkB;CAClB,QAAQ,KAAR;EACE,KAAK,QACH,OAAO;EACT,KAAK,OACH,OAAO;EACT,KAAK,cACH,OAAO,gBAAgB,eAAgB,MAAM,SAAS,SAAU;EAClE,KAAK,aACH,OAAO,gBAAgB,eAAgB,MAAM,SAAS,SAAU;EAClE,KAAK,aACH,OAAO,gBAAgB,aAAa,SAAS;EAC/C,KAAK,WACH,OAAO,gBAAgB,aAAa,SAAS;EAC/C,SACE,OAAO;CACX;AACF;;AAGA,SAAgB,cAAc,SAA4B;CACxD,QAAQ,MAAM,EAAE,cAAc,KAAK,CAAiB;AACtD"}
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { createContext } from "react";
3
+ //#region src/internal/csp-context.ts
4
+ const CSPContext = createContext(null);
5
+ //#endregion
6
+ export { CSPContext };
7
+
8
+ //# sourceMappingURL=csp-context.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csp-context.mjs","names":[],"sources":["../../src/internal/csp-context.ts"],"sourcesContent":["\"use client\";\nimport { createContext } from \"react\";\n\n/** What `<CSPProvider>` gives the parts that render a hoisted `<style>` (conventions 12). */\nexport interface CSPContextValue {\n /** Forwarded as the `nonce` of every library `<style>`. */\n readonly nonce: string | undefined;\n}\n\nexport const CSPContext = createContext<CSPContextValue | null>(null);\n"],"mappings":";;;AASA,MAAa,aAAa,cAAsC,IAAI"}
@@ -0,0 +1,33 @@
1
+ //#region src/internal/decimal.ts
2
+ /** Number of decimal places of `n` as written (`0.1` → 1, `1e-7` → 7, `5` → 0). */
3
+ function decimalsOf(n) {
4
+ if (!Number.isFinite(n)) return 0;
5
+ const text = String(n);
6
+ const exponent = /e-(\d+)$/i.exec(text);
7
+ if (exponent !== null) {
8
+ const mantissa = text.slice(0, exponent.index);
9
+ const dot = mantissa.indexOf(".");
10
+ return Number(exponent[1]) + (dot === -1 ? 0 : mantissa.length - dot - 1);
11
+ }
12
+ const dot = text.indexOf(".");
13
+ return dot === -1 ? 0 : text.length - dot - 1;
14
+ }
15
+ /** Tolerance for grid computations on binary floating point (`0.3 / 0.1` is `2.9999999999999996`). */
16
+ const EPSILON = 1e-9;
17
+ /** The decimal places a grid of `step` from `min` needs: the larger of the two. */
18
+ function gridDecimals(step, min) {
19
+ return Math.max(decimalsOf(step), decimalsOf(min));
20
+ }
21
+ /**
22
+ * `value` rounded to `decimals` places through `toFixed` (decimal, not binary, rounding of the
23
+ * written digits: `roundTo(0.1 + 0.2, 1)` is `0.3`). `-0` becomes `0`.
24
+ */
25
+ function roundTo(value, decimals) {
26
+ if (!Number.isFinite(value)) return value;
27
+ const result = decimals <= 0 ? Math.round(value) : Number(value.toFixed(Math.min(decimals, 100)));
28
+ return result === 0 ? 0 : result;
29
+ }
30
+ //#endregion
31
+ export { EPSILON, decimalsOf, gridDecimals, roundTo };
32
+
33
+ //# sourceMappingURL=decimal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decimal.mjs","names":[],"sources":["../../src/internal/decimal.ts"],"sourcesContent":["// Decimal helpers shared by Slider and NumberField (design/components/number-field.md 5.4). No\n// directive: no React, no client-only API.\n\n/** Number of decimal places of `n` as written (`0.1` → 1, `1e-7` → 7, `5` → 0). */\nexport function decimalsOf(n: number): number {\n if (!Number.isFinite(n)) return 0;\n const text = String(n);\n const exponent = /e-(\\d+)$/i.exec(text);\n if (exponent !== null) {\n const mantissa = text.slice(0, exponent.index);\n const dot = mantissa.indexOf(\".\");\n return Number(exponent[1]) + (dot === -1 ? 0 : mantissa.length - dot - 1);\n }\n const dot = text.indexOf(\".\");\n return dot === -1 ? 0 : text.length - dot - 1;\n}\n\n/** Tolerance for grid computations on binary floating point (`0.3 / 0.1` is `2.9999999999999996`). */\nexport const EPSILON = 1e-9;\n\n/** The decimal places a grid of `step` from `min` needs: the larger of the two. */\nexport function gridDecimals(step: number, min: number): number {\n return Math.max(decimalsOf(step), decimalsOf(min));\n}\n\n/**\n * `value` rounded to `decimals` places through `toFixed` (decimal, not binary, rounding of the\n * written digits: `roundTo(0.1 + 0.2, 1)` is `0.3`). `-0` becomes `0`.\n */\nexport function roundTo(value: number, decimals: number): number {\n if (!Number.isFinite(value)) return value;\n // `toFixed` takes at most 100 digits; anything near that is already exact.\n const result = decimals <= 0 ? Math.round(value) : Number(value.toFixed(Math.min(decimals, 100)));\n return result === 0 ? 0 : result;\n}\n"],"mappings":";;AAIA,SAAgB,WAAW,GAAmB;CAC5C,IAAI,CAAC,OAAO,SAAS,CAAC,GAAG,OAAO;CAChC,MAAM,OAAO,OAAO,CAAC;CACrB,MAAM,WAAW,YAAY,KAAK,IAAI;CACtC,IAAI,aAAa,MAAM;EACrB,MAAM,WAAW,KAAK,MAAM,GAAG,SAAS,KAAK;EAC7C,MAAM,MAAM,SAAS,QAAQ,GAAG;EAChC,OAAO,OAAO,SAAS,EAAE,KAAK,QAAQ,KAAK,IAAI,SAAS,SAAS,MAAM;CACzE;CACA,MAAM,MAAM,KAAK,QAAQ,GAAG;CAC5B,OAAO,QAAQ,KAAK,IAAI,KAAK,SAAS,MAAM;AAC9C;;AAGA,MAAa,UAAU;;AAGvB,SAAgB,aAAa,MAAc,KAAqB;CAC9D,OAAO,KAAK,IAAI,WAAW,IAAI,GAAG,WAAW,GAAG,CAAC;AACnD;;;;;AAMA,SAAgB,QAAQ,OAAe,UAA0B;CAC/D,IAAI,CAAC,OAAO,SAAS,KAAK,GAAG,OAAO;CAEpC,MAAM,SAAS,YAAY,IAAI,KAAK,MAAM,KAAK,IAAI,OAAO,MAAM,QAAQ,KAAK,IAAI,UAAU,GAAG,CAAC,CAAC;CAChG,OAAO,WAAW,IAAI,IAAI;AAC5B"}
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { useElementCheck } from "./use-element-check.mjs";
3
+ //#region src/internal/details-summary.ts
4
+ const isDev = process.env.NODE_ENV !== "production";
5
+ const NESTED_INTERACTIVE = "a[href], button, label, input, select, textarea, [contenteditable]:not([contenteditable='false'])";
6
+ /**
7
+ * Nested controls with an activation behaviour of their own. The browser runs theirs instead of
8
+ * the summary's (no toggle), so their click must keep its default: navigation, check, submit.
9
+ */
10
+ const SELF_ACTIVATING = "a[href], button, label, input:is([type='button'], [type='submit'], [type='reset'], [type='image'], [type='checkbox'], [type='radio'], [type='file'], [type='color'])";
11
+ /** The interactive descendant of the summary that was clicked (a link in the heading), if any. */
12
+ function nestedInteractive(target, summary) {
13
+ if (!(target instanceof Element) || target === summary) return null;
14
+ const interactive = target.closest(NESTED_INTERACTIVE);
15
+ return interactive !== null && interactive !== summary && summary.contains(interactive) ? interactive : null;
16
+ }
17
+ /**
18
+ * The click rule of a `<summary>` Trigger whose click the library handles (library mode, or a
19
+ * disabled Trigger in JS-free mode). Returns `true` when the click is a toggle request: it has
20
+ * been cancelled, so the browser does not touch `open`, and the caller dispatches unless
21
+ * disabled. Returns `false` for a click on interactive content nested in the summary, which never
22
+ * toggles: a control without an activation behaviour of its own (text input, select, textarea,
23
+ * contenteditable) would let the click fall through to the summary's toggle, so that click is
24
+ * cancelled; focus and pickers happen on mousedown and are unaffected. Self-activating controls
25
+ * (links, buttons, checkboxes) already pre-empt the summary's behaviour and keep their default.
26
+ */
27
+ function interceptSummaryClick(event) {
28
+ const nested = nestedInteractive(event.target, event.currentTarget);
29
+ if (nested !== null) {
30
+ if (!nested.matches(SELF_ACTIVATING)) event.preventDefault();
31
+ return false;
32
+ }
33
+ event.preventDefault();
34
+ return true;
35
+ }
36
+ /**
37
+ * The development check of a part that must render a `<details>` (`Accordion.Item`,
38
+ * `Collapsible.Root`); `part` is its public name and `semantics` the platform behaviours the
39
+ * part relies on, named in the message. Pass `semantics` as `isDev && "..."` so the text folds
40
+ * away in production, where the hook is a no-op returning `undefined` (`useElementCheck`). Call
41
+ * the result from the part's own ref.
42
+ */
43
+ function useDetailsCheck(part, semantics) {
44
+ return useElementCheck(isDev && ((element) => element.tagName !== "DETAILS" ? `${part}: expected to render a <details> element but got <${element.tagName.toLowerCase()}>. The platform semantics (${String(semantics)}) need a real <details>.` : null));
45
+ }
46
+ /**
47
+ * The development check of a part that must render a `<summary>` (`Accordion.Trigger`,
48
+ * `Collapsible.Trigger`); see {@link useDetailsCheck}.
49
+ */
50
+ function useSummaryCheck(part) {
51
+ return useElementCheck(isDev && ((element) => element.tagName !== "SUMMARY" ? `${part}: expected to render a <summary> element but got <${element.tagName.toLowerCase()}>. Only a <summary> toggles its parent <details>.` : null));
52
+ }
53
+ //#endregion
54
+ export { interceptSummaryClick, useDetailsCheck, useSummaryCheck };
55
+
56
+ //# sourceMappingURL=details-summary.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"details-summary.mjs","names":[],"sources":["../../src/internal/details-summary.ts"],"sourcesContent":["\"use client\";\nimport type { MouseEvent } from \"react\";\nimport { useElementCheck } from \"./use-element-check.js\";\nimport type { ElementCheck } from \"./use-element-check.js\";\n\n// The `<details>` / `<summary>` pair shared by Accordion (Item and Trigger) and Collapsible (Root\n// and Trigger): the Trigger's click rule (accordion.md 2.2, collapsible.md 2.2) and the\n// development checks of the rendered elements. The state side is not shared: an Accordion owns a\n// set, a Collapsible one boolean.\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\nconst NESTED_INTERACTIVE =\n \"a[href], button, label, input, select, textarea, [contenteditable]:not([contenteditable='false'])\";\n\n/**\n * Nested controls with an activation behaviour of their own. The browser runs theirs instead of\n * the summary's (no toggle), so their click must keep its default: navigation, check, submit.\n */\nconst SELF_ACTIVATING =\n \"a[href], button, label, input:is([type='button'], [type='submit'], [type='reset'], \" +\n \"[type='image'], [type='checkbox'], [type='radio'], [type='file'], [type='color'])\";\n\n/** The interactive descendant of the summary that was clicked (a link in the heading), if any. */\nfunction nestedInteractive(target: EventTarget | null, summary: HTMLElement): Element | null {\n if (!(target instanceof Element) || target === summary) return null;\n const interactive = target.closest(NESTED_INTERACTIVE);\n return interactive !== null && interactive !== summary && summary.contains(interactive)\n ? interactive\n : null;\n}\n\n/**\n * The click rule of a `<summary>` Trigger whose click the library handles (library mode, or a\n * disabled Trigger in JS-free mode). Returns `true` when the click is a toggle request: it has\n * been cancelled, so the browser does not touch `open`, and the caller dispatches unless\n * disabled. Returns `false` for a click on interactive content nested in the summary, which never\n * toggles: a control without an activation behaviour of its own (text input, select, textarea,\n * contenteditable) would let the click fall through to the summary's toggle, so that click is\n * cancelled; focus and pickers happen on mousedown and are unaffected. Self-activating controls\n * (links, buttons, checkboxes) already pre-empt the summary's behaviour and keep their default.\n */\nexport function interceptSummaryClick(event: MouseEvent<HTMLElement>): boolean {\n const nested = nestedInteractive(event.target, event.currentTarget);\n if (nested !== null) {\n if (!nested.matches(SELF_ACTIVATING)) event.preventDefault();\n return false;\n }\n event.preventDefault();\n return true;\n}\n\n/**\n * The development check of a part that must render a `<details>` (`Accordion.Item`,\n * `Collapsible.Root`); `part` is its public name and `semantics` the platform behaviours the\n * part relies on, named in the message. Pass `semantics` as `isDev && \"...\"` so the text folds\n * away in production, where the hook is a no-op returning `undefined` (`useElementCheck`). Call\n * the result from the part's own ref.\n */\nexport function useDetailsCheck(\n part: string,\n semantics: string | false,\n): ElementCheck<HTMLDetailsElement> | undefined {\n return useElementCheck<HTMLDetailsElement>(\n isDev &&\n ((element) =>\n element.tagName !== \"DETAILS\"\n ? `${part}: expected to render a <details> element but got <${element.tagName.toLowerCase()}>. ` +\n `The platform semantics (${String(semantics)}) need a real <details>.`\n : null),\n );\n}\n\n/**\n * The development check of a part that must render a `<summary>` (`Accordion.Trigger`,\n * `Collapsible.Trigger`); see {@link useDetailsCheck}.\n */\nexport function useSummaryCheck(part: string): ElementCheck<HTMLElement> | undefined {\n return useElementCheck(\n isDev &&\n ((element) =>\n element.tagName !== \"SUMMARY\"\n ? `${part}: expected to render a <summary> element but got <${element.tagName.toLowerCase()}>. ` +\n \"Only a <summary> toggles its parent <details>.\"\n : null),\n );\n}\n"],"mappings":";;;AAUA,MAAM,QAAQ,QAAQ,IAAI,aAAa;AAEvC,MAAM,qBACJ;;;;;AAMF,MAAM,kBACJ;;AAIF,SAAS,kBAAkB,QAA4B,SAAsC;CAC3F,IAAI,EAAE,kBAAkB,YAAY,WAAW,SAAS,OAAO;CAC/D,MAAM,cAAc,OAAO,QAAQ,kBAAkB;CACrD,OAAO,gBAAgB,QAAQ,gBAAgB,WAAW,QAAQ,SAAS,WAAW,IAClF,cACA;AACN;;;;;;;;;;;AAYA,SAAgB,sBAAsB,OAAyC;CAC7E,MAAM,SAAS,kBAAkB,MAAM,QAAQ,MAAM,aAAa;CAClE,IAAI,WAAW,MAAM;EACnB,IAAI,CAAC,OAAO,QAAQ,eAAe,GAAG,MAAM,eAAe;EAC3D,OAAO;CACT;CACA,MAAM,eAAe;CACrB,OAAO;AACT;;;;;;;;AASA,SAAgB,gBACd,MACA,WAC8C;CAC9C,OAAO,gBACL,WACI,YACA,QAAQ,YAAY,YAChB,GAAG,KAAK,oDAAoD,QAAQ,QAAQ,YAAY,EAAE,6BAC/D,OAAO,SAAS,EAAE,4BAC7C,KACV;AACF;;;;;AAMA,SAAgB,gBAAgB,MAAqD;CACnF,OAAO,gBACL,WACI,YACA,QAAQ,YAAY,YAChB,GAAG,KAAK,oDAAoD,QAAQ,QAAQ,YAAY,EAAE,qDAE1F,KACV;AACF"}
@@ -0,0 +1,17 @@
1
+ //#region src/internal/dev-warn.ts
2
+ const isDev = process.env.NODE_ENV !== "production";
3
+ const seen = /* @__PURE__ */ new Set();
4
+ /**
5
+ * Logs `message` through `console.error` once per `key` in development. Called during render,
6
+ * so a discarded render may warn; keys name the part and the condition (a Server Component has
7
+ * no element identity to key on).
8
+ */
9
+ function warnOnce(key, message) {
10
+ if (!isDev || seen.has(key)) return;
11
+ seen.add(key);
12
+ console.error(message);
13
+ }
14
+ //#endregion
15
+ export { warnOnce };
16
+
17
+ //# sourceMappingURL=dev-warn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-warn.mjs","names":[],"sources":["../../src/internal/dev-warn.ts"],"sourcesContent":["// No \"use client\": usable during the render of a directive-free part that may run as a Server\n// Component, where an effect (`useDevWarning`) never runs (design/components/progress.md 8.1,\n// implementation note 14.3).\n\nconst isDev = process.env.NODE_ENV !== \"production\";\n\nconst seen = new Set<string>();\n\n/**\n * Logs `message` through `console.error` once per `key` in development. Called during render,\n * so a discarded render may warn; keys name the part and the condition (a Server Component has\n * no element identity to key on).\n */\nexport function warnOnce(key: string, message: string): void {\n if (!isDev || seen.has(key)) return;\n seen.add(key);\n console.error(message);\n}\n\n/** Tests only: forget every key, so the next `warnOnce` warns again. */\nexport function resetWarnOnce(): void {\n seen.clear();\n}\n"],"mappings":";AAIA,MAAM,QAAQ,QAAQ,IAAI,aAAa;AAEvC,MAAM,uBAAO,IAAI,IAAY;;;;;;AAO7B,SAAgB,SAAS,KAAa,SAAuB;CAC3D,IAAI,CAAC,SAAS,KAAK,IAAI,GAAG,GAAG;CAC7B,KAAK,IAAI,GAAG;CACZ,QAAQ,MAAM,OAAO;AACvB"}
@@ -0,0 +1,17 @@
1
+ //#region src/internal/dom-order.ts
2
+ /** A `sort` comparator putting nodes in document order. */
3
+ function compareDocumentOrder(a, b) {
4
+ if (a === b) return 0;
5
+ const position = a.compareDocumentPosition(b);
6
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;
7
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;
8
+ return 0;
9
+ }
10
+ /** Sorts items into the document order of their elements. */
11
+ function sortByDocumentOrder(items, elementOf) {
12
+ return [...items].sort((a, b) => compareDocumentOrder(elementOf(a), elementOf(b)));
13
+ }
14
+ //#endregion
15
+ export { compareDocumentOrder, sortByDocumentOrder };
16
+
17
+ //# sourceMappingURL=dom-order.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom-order.mjs","names":[],"sources":["../../src/internal/dom-order.ts"],"sourcesContent":["// Document-order helpers. No directive: pure DOM reads (conventions 7.1).\n\n/** A `sort` comparator putting nodes in document order. */\nexport function compareDocumentOrder(a: Node, b: Node): number {\n if (a === b) return 0;\n const position = a.compareDocumentPosition(b);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING) return -1;\n if (position & Node.DOCUMENT_POSITION_PRECEDING) return 1;\n return 0;\n}\n\n/** Sorts items into the document order of their elements. */\nexport function sortByDocumentOrder<T>(items: readonly T[], elementOf: (item: T) => Node): T[] {\n return [...items].sort((a, b) => compareDocumentOrder(elementOf(a), elementOf(b)));\n}\n"],"mappings":";;AAGA,SAAgB,qBAAqB,GAAS,GAAiB;CAC7D,IAAI,MAAM,GAAG,OAAO;CACpB,MAAM,WAAW,EAAE,wBAAwB,CAAC;CAC5C,IAAI,WAAW,KAAK,6BAA6B,OAAO;CACxD,IAAI,WAAW,KAAK,6BAA6B,OAAO;CACxD,OAAO;AACT;;AAGA,SAAgB,oBAAuB,OAAqB,WAAmC;CAC7F,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,GAAG,MAAM,qBAAqB,UAAU,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;AACnF"}
@@ -0,0 +1,19 @@
1
+ import { FieldValidity } from "./validity.mjs";
2
+ //#region src/internal/form/field-context.d.ts
3
+ /** The state every Field part receives (design/components/field-form.md 4.1). */
4
+ export interface FieldState {
5
+ /** An error is shown: the control matches `:user-invalid`, or a server error for this field is shown. */
6
+ readonly invalid: boolean;
7
+ /** The messages shown: `[validationMessage]` for a native constraint, the strings `validate` returned for a custom one, the server's strings for a server error; `[]` while valid. */
8
+ readonly messages: readonly string[];
9
+ /** A snapshot of the control's `ValidityState` (all valid on the server and before the first read). */
10
+ readonly validity: FieldValidity;
11
+ /** `Field.Root disabled` or the control's own `disabled`. */
12
+ readonly disabled: boolean;
13
+ /** `Field.Root required` or the control's own `required`. */
14
+ readonly required: boolean;
15
+ /** The enclosing form's submission is in flight (`useFormStatus().pending`); `false` outside a form. */
16
+ readonly pending: boolean;
17
+ }
18
+ //#endregion
19
+ //# sourceMappingURL=field-context.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-context.d.mts","names":[],"sources":["../../../src/internal/form/field-context.ts"],"mappings":";;;iBAMiB;;WAEN;;WAEA;;WAEA,UAAU;;WAEV;;WAEA;;WAEA"}
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { dataAttr } from "../data-attr.mjs";
3
+ import { createContext, use } from "react";
4
+ //#region src/internal/form/field-context.ts
5
+ const FieldContext = createContext(null);
6
+ function useFieldContext(part) {
7
+ const ctx = use(FieldContext);
8
+ if (ctx === null) throw new Error(`${part} must be rendered inside a Field.Root.`);
9
+ return ctx;
10
+ }
11
+ const FormContext = createContext(null);
12
+ /** The four state attributes every Field part renders (design 6.1). */
13
+ function fieldDataAttributes(state) {
14
+ return {
15
+ "data-invalid": dataAttr(state.invalid),
16
+ "data-disabled": dataAttr(state.disabled),
17
+ "data-required": dataAttr(state.required),
18
+ "data-pending": dataAttr(state.pending)
19
+ };
20
+ }
21
+ //#endregion
22
+ export { FieldContext, FormContext, fieldDataAttributes, useFieldContext };
23
+
24
+ //# sourceMappingURL=field-context.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-context.mjs","names":[],"sources":["../../../src/internal/form/field-context.ts"],"sourcesContent":["\"use client\";\nimport { createContext, use } from \"react\";\nimport { dataAttr } from \"../data-attr.js\";\nimport type { FieldValidity, FormErrors, ValidatableElement } from \"./validity.js\";\n\n/** The state every Field part receives (design/components/field-form.md 4.1). */\nexport interface FieldState {\n /** An error is shown: the control matches `:user-invalid`, or a server error for this field is shown. */\n readonly invalid: boolean;\n /** The messages shown: `[validationMessage]` for a native constraint, the strings `validate` returned for a custom one, the server's strings for a server error; `[]` while valid. */\n readonly messages: readonly string[];\n /** A snapshot of the control's `ValidityState` (all valid on the server and before the first read). */\n readonly validity: FieldValidity;\n /** `Field.Root disabled` or the control's own `disabled`. */\n readonly disabled: boolean;\n /** `Field.Root required` or the control's own `required`. */\n readonly required: boolean;\n /** The enclosing form's submission is in flight (`useFormStatus().pending`); `false` outside a form. */\n readonly pending: boolean;\n}\n\nexport interface FieldIds {\n readonly control: string;\n readonly label: string;\n readonly description: string;\n readonly error: string;\n}\n\n/** What a control reports to its Field (design 7.1). */\nexport interface FieldControlRegistration {\n /** The element the Field labels, describes and listens to (the input, or a group's fieldset). */\n readonly element: HTMLElement;\n /** `<label for>` can target it. Groups report `false`. */\n readonly labelable: boolean;\n /** The control's own `required` / `disabled` props (for the Field's `data-*` state). */\n readonly required: boolean;\n readonly disabled: boolean;\n /**\n * Where `validity`, `validationMessage` and the custom-validity slot are read and written when\n * that is not the registered element (NumberField: the hidden `input[type=number]` after the\n * visible text input). `:user-invalid`, the listeners and the focus target stay on `element`;\n * after writing the slot the Field mirrors this element's `validationMessage` into `element`\n * (design/components/field-form.md, `validityElement`). Resolved on every read.\n */\n readonly validityElement?: (() => ValidatableElement | null) | undefined;\n}\n\nexport interface FieldContextValue {\n readonly ids: FieldIds;\n /** `Field.Root name`. */\n readonly name: string | undefined;\n /** `Field.Root disabled` / `required` (the props, not the merged state). */\n readonly disabled: boolean;\n readonly required: boolean;\n readonly state: FieldState;\n /** The registered control is labelable (default `true`, also before any registration). */\n readonly labelable: boolean;\n /**\n * The registered control's element, or `null` (handlers only): `Field.Label` focuses a\n * `<button>` control instead of activating it (MultiSelect, multi-select.md B.10).\n */\n readonly controlElement: () => HTMLElement | null;\n /** Registers the Field's control; returns the unregister function. The first one wins. */\n readonly registerControl: (registration: FieldControlRegistration) => () => void;\n /** A `Field.Error` is mounted (the Field may cancel the platform bubble). */\n readonly registerError: () => () => void;\n /**\n * The control's value changed in the DOM without an `input` / `change` event the Field could\n * hear (a Combobox selection, a CheckboxGroup's derived `required`, a rolled-back optimistic\n * value): re-reads the slot and the mirror after the commit that wrote it, and refreshes the\n * other Fields of the `Form.Root` (cross-field rules). `edit`: the user made the change, so a\n * shown server error is dismissed as by an `input` event. Call from a layout effect.\n */\n readonly notifyChange: (edit: boolean) => void;\n}\n\nexport const FieldContext = createContext<FieldContextValue | null>(null);\n\nexport function useFieldContext(part: string): FieldContextValue {\n const ctx = use(FieldContext);\n if (ctx === null) throw new Error(`${part} must be rendered inside a Field.Root.`);\n return ctx;\n}\n\n/** What a Field registers with its Form (design 3.5). */\nexport interface FormFieldRegistration {\n /** The control, or a group's first enabled (or checked) member. */\n readonly getFocusTarget: () => HTMLElement | null;\n /** The Field shows a server error at the latest commit. */\n readonly showsServerError: () => boolean;\n /** The server messages shown, for an announcement when focus does not move. */\n readonly serverMessages: () => readonly string[];\n /** Re-runs `validate` and re-reads validity (another Field's control changed). */\n readonly refresh: () => void;\n}\n\nexport interface FormContextValue {\n readonly errors: FormErrors | undefined;\n readonly registerField: (registration: FormFieldRegistration) => () => void;\n /**\n * The `FormData` of the submission in flight when the Form ran it itself (the intercepted path),\n * else `null`: the stale-value suppression of design 3.2 item 2 is computed against it.\n */\n readonly submittedData: () => FormData | null;\n /** Refreshes every registered Field except `source` (a change no DOM event carried). */\n readonly refreshFields: (source: FormFieldRegistration | null) => void;\n}\n\nexport const FormContext = createContext<FormContextValue | null>(null);\n\n/** The four state attributes every Field part renders (design 6.1). */\nexport function fieldDataAttributes(state: FieldState) {\n return {\n \"data-invalid\": dataAttr(state.invalid),\n \"data-disabled\": dataAttr(state.disabled),\n \"data-required\": dataAttr(state.required),\n \"data-pending\": dataAttr(state.pending),\n };\n}\n"],"mappings":";;;;AA4EA,MAAa,eAAe,cAAwC,IAAI;AAExE,SAAgB,gBAAgB,MAAiC;CAC/D,MAAM,MAAM,IAAI,YAAY;CAC5B,IAAI,QAAQ,MAAM,MAAM,IAAI,MAAM,GAAG,KAAK,uCAAuC;CACjF,OAAO;AACT;AA0BA,MAAa,cAAc,cAAuC,IAAI;;AAGtE,SAAgB,oBAAoB,OAAmB;CACrD,OAAO;EACL,gBAAgB,SAAS,MAAM,OAAO;EACtC,iBAAiB,SAAS,MAAM,QAAQ;EACxC,iBAAiB,SAAS,MAAM,QAAQ;EACxC,gBAAgB,SAAS,MAAM,OAAO;CACxC;AACF"}
@@ -0,0 +1,67 @@
1
+ import { sortByDocumentOrder } from "../dom-order.mjs";
2
+ import { announce } from "../announce.mjs";
3
+ //#region src/internal/form/focus-first-invalid.ts
4
+ /** The submission attempt in progress: every target added during the current task. */
5
+ let batch = null;
6
+ /**
7
+ * Adds a control whose `invalid` event (fired on `source`) a Field cancelled during a submission
8
+ * attempt, and focuses the first collected control in document order in a microtask, so the
9
+ * result does not depend on the browser's dispatch order or on how many forms are on the page.
10
+ *
11
+ * The batch lives until the end of the task (a `setTimeout`), not just one microtask: when the
12
+ * browser dispatches the `invalid` events itself (a click on a submit button), it runs a
13
+ * microtask checkpoint after each listener, so the microtask of the first event runs before the
14
+ * second event fires. Every add therefore queues a focus of the batch's first target; later ones
15
+ * re-focus the same element, which is a no-op.
16
+ *
17
+ * A second `invalid` for the same `source` (the element the event fired on) starts a new batch:
18
+ * one validation fires it once per element, so it belongs to the next attempt, even when that
19
+ * attempt comes before the timer (two attempts in one task, or a test that does not yield to
20
+ * timers between them). Joining the old batch would compare focus with the old attempt's.
21
+ *
22
+ * Skips the focus when focus moved during the attempt to an element that is not one of the
23
+ * collected targets: a plain `<input required>` with no Field kept the platform's behaviour
24
+ * (bubble and focus), and the library does not fight it.
25
+ */
26
+ function collectInvalid(target, message, source) {
27
+ if (target === null) return;
28
+ if (batch !== null && batch.sources.has(source)) batch = null;
29
+ if (batch === null) {
30
+ const created = {
31
+ sources: /* @__PURE__ */ new Set(),
32
+ targets: [],
33
+ messages: /* @__PURE__ */ new Map(),
34
+ activeBefore: target.ownerDocument.activeElement,
35
+ moved: false,
36
+ announced: null
37
+ };
38
+ batch = created;
39
+ setTimeout(() => {
40
+ if (batch === created) batch = null;
41
+ }, 0);
42
+ }
43
+ const current = batch;
44
+ current.sources.add(source);
45
+ if (!current.targets.includes(target)) current.targets.push(target);
46
+ current.messages.set(target, message);
47
+ queueMicrotask(() => focusFirst(current));
48
+ }
49
+ function focusFirst(current) {
50
+ const { targets, activeBefore } = current;
51
+ const connected = targets.filter((t) => t.isConnected);
52
+ if (connected.length === 0) return;
53
+ const active = connected[0].ownerDocument.activeElement;
54
+ if (active !== activeBefore && active !== null && !connected.includes(active)) return;
55
+ const first = sortByDocumentOrder(connected, (t) => t)[0];
56
+ if (active !== first) {
57
+ current.moved = true;
58
+ first.focus();
59
+ } else if (!current.moved && current.announced !== first) {
60
+ current.announced = first;
61
+ announce(first, current.messages.get(first) ?? "");
62
+ }
63
+ }
64
+ //#endregion
65
+ export { collectInvalid };
66
+
67
+ //# sourceMappingURL=focus-first-invalid.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-first-invalid.mjs","names":[],"sources":["../../../src/internal/form/focus-first-invalid.ts"],"sourcesContent":["// Directive-free: the module-level first-invalid collector (design/components/field-form.md 2.5).\nimport { announce } from \"../announce.js\";\nimport { sortByDocumentOrder } from \"../dom-order.js\";\n\ninterface Batch {\n /** The elements whose `invalid` event was collected (a group's members, not its target). */\n readonly sources: Set<Element>;\n readonly targets: HTMLElement[];\n /** The message each target's Field shows, for the announcement when focus does not move. */\n readonly messages: Map<HTMLElement, string>;\n /** `document.activeElement` when the first target arrived. */\n readonly activeBefore: Element | null;\n /** The batch moved focus (later microtasks then re-focus, never announce). */\n moved: boolean;\n /** The target already announced. */\n announced: HTMLElement | null;\n}\n\n/** The submission attempt in progress: every target added during the current task. */\nlet batch: Batch | null = null;\n\n/**\n * Adds a control whose `invalid` event (fired on `source`) a Field cancelled during a submission\n * attempt, and focuses the first collected control in document order in a microtask, so the\n * result does not depend on the browser's dispatch order or on how many forms are on the page.\n *\n * The batch lives until the end of the task (a `setTimeout`), not just one microtask: when the\n * browser dispatches the `invalid` events itself (a click on a submit button), it runs a\n * microtask checkpoint after each listener, so the microtask of the first event runs before the\n * second event fires. Every add therefore queues a focus of the batch's first target; later ones\n * re-focus the same element, which is a no-op.\n *\n * A second `invalid` for the same `source` (the element the event fired on) starts a new batch:\n * one validation fires it once per element, so it belongs to the next attempt, even when that\n * attempt comes before the timer (two attempts in one task, or a test that does not yield to\n * timers between them). Joining the old batch would compare focus with the old attempt's.\n *\n * Skips the focus when focus moved during the attempt to an element that is not one of the\n * collected targets: a plain `<input required>` with no Field kept the platform's behaviour\n * (bubble and focus), and the library does not fight it.\n */\nexport function collectInvalid(target: HTMLElement | null, message: string, source: Element): void {\n if (target === null) return;\n if (batch !== null && batch.sources.has(source)) batch = null;\n if (batch === null) {\n const created: Batch = {\n sources: new Set(),\n targets: [],\n messages: new Map(),\n activeBefore: target.ownerDocument.activeElement,\n moved: false,\n announced: null,\n };\n batch = created;\n setTimeout(() => {\n if (batch === created) batch = null;\n }, 0);\n }\n const current = batch;\n current.sources.add(source);\n if (!current.targets.includes(target)) current.targets.push(target);\n current.messages.set(target, message);\n queueMicrotask(() => focusFirst(current));\n}\n\n/**\n * Tests only: forget the submission attempt in progress. Its timer is a task away, and the next\n * test can start before it runs (no task in between); its attempt would then join this one and\n * compare focus with an element of the previous test.\n */\nexport function resetInvalidBatch(): void {\n batch = null;\n}\n\nfunction focusFirst(current: Batch): void {\n const { targets, activeBefore } = current;\n const connected = targets.filter((t) => t.isConnected);\n if (connected.length === 0) return;\n const active = connected[0]!.ownerDocument.activeElement;\n if (active !== activeBefore && active !== null && !connected.includes(active as HTMLElement)) {\n return;\n }\n const first = sortByDocumentOrder(connected, (t) => t)[0]!;\n if (active !== first) {\n current.moved = true;\n first.focus();\n } else if (!current.moved && current.announced !== first) {\n // Focus was already on the first invalid control (an implicit submission with Enter): the\n // cancelled bubble was the only announcement, so speak the message instead.\n current.announced = first;\n announce(first, current.messages.get(first) ?? \"\");\n }\n}\n"],"mappings":";;;;AAmBA,IAAI,QAAsB;;;;;;;;;;;;;;;;;;;;;AAsB1B,SAAgB,eAAe,QAA4B,SAAiB,QAAuB;CACjG,IAAI,WAAW,MAAM;CACrB,IAAI,UAAU,QAAQ,MAAM,QAAQ,IAAI,MAAM,GAAG,QAAQ;CACzD,IAAI,UAAU,MAAM;EAClB,MAAM,UAAiB;GACrB,yBAAS,IAAI,IAAI;GACjB,SAAS,CAAC;GACV,0BAAU,IAAI,IAAI;GAClB,cAAc,OAAO,cAAc;GACnC,OAAO;GACP,WAAW;EACb;EACA,QAAQ;EACR,iBAAiB;GACf,IAAI,UAAU,SAAS,QAAQ;EACjC,GAAG,CAAC;CACN;CACA,MAAM,UAAU;CAChB,QAAQ,QAAQ,IAAI,MAAM;CAC1B,IAAI,CAAC,QAAQ,QAAQ,SAAS,MAAM,GAAG,QAAQ,QAAQ,KAAK,MAAM;CAClE,QAAQ,SAAS,IAAI,QAAQ,OAAO;CACpC,qBAAqB,WAAW,OAAO,CAAC;AAC1C;AAWA,SAAS,WAAW,SAAsB;CACxC,MAAM,EAAE,SAAS,iBAAiB;CAClC,MAAM,YAAY,QAAQ,QAAQ,MAAM,EAAE,WAAW;CACrD,IAAI,UAAU,WAAW,GAAG;CAC5B,MAAM,SAAS,UAAU,EAAE,CAAE,cAAc;CAC3C,IAAI,WAAW,gBAAgB,WAAW,QAAQ,CAAC,UAAU,SAAS,MAAqB,GACzF;CAEF,MAAM,QAAQ,oBAAoB,YAAY,MAAM,CAAC,CAAC,CAAC;CACvD,IAAI,WAAW,OAAO;EACpB,QAAQ,QAAQ;EAChB,MAAM,MAAM;CACd,OAAO,IAAI,CAAC,QAAQ,SAAS,QAAQ,cAAc,OAAO;EAGxD,QAAQ,YAAY;EACpB,SAAS,OAAO,QAAQ,SAAS,IAAI,KAAK,KAAK,EAAE;CACnD;AACF"}
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { useEffect, useRef } from "react";
3
+ import { useFormStatus } from "react-dom";
4
+ //#region src/internal/form/form-status-watcher.tsx
5
+ /**
6
+ * Observes React's form channel (Dialog design 8.1, Field/Form design 3.2): rendered inside a
7
+ * `<form>`, `useFormStatus().pending` covers the action's whole transition, including the
8
+ * Suspense wait of what it re-renders. On `true → false` the submission settled without throwing
9
+ * (a rejection unmounts the form through the nearest Error Boundary, so the edge is never seen).
10
+ * Used by `Dialog.Form` and `Form.Root`.
11
+ */
12
+ function FormStatusWatcher({ onPendingChange, onSettled }) {
13
+ const { pending } = useFormStatus();
14
+ const previous = useRef(false);
15
+ useEffect(() => {
16
+ const was = previous.current;
17
+ previous.current = pending;
18
+ if (was === pending) return;
19
+ onPendingChange(pending);
20
+ if (was && !pending) onSettled();
21
+ }, [
22
+ pending,
23
+ onPendingChange,
24
+ onSettled
25
+ ]);
26
+ return null;
27
+ }
28
+ //#endregion
29
+ export { FormStatusWatcher };
30
+
31
+ //# sourceMappingURL=form-status-watcher.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-status-watcher.mjs","names":[],"sources":["../../../src/internal/form/form-status-watcher.tsx"],"sourcesContent":["\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { useFormStatus } from \"react-dom\";\n\nexport interface FormStatusWatcherProps {\n readonly onPendingChange: (pending: boolean) => void;\n readonly onSettled: () => void;\n}\n\n/**\n * Observes React's form channel (Dialog design 8.1, Field/Form design 3.2): rendered inside a\n * `<form>`, `useFormStatus().pending` covers the action's whole transition, including the\n * Suspense wait of what it re-renders. On `true → false` the submission settled without throwing\n * (a rejection unmounts the form through the nearest Error Boundary, so the edge is never seen).\n * Used by `Dialog.Form` and `Form.Root`.\n */\nexport function FormStatusWatcher({ onPendingChange, onSettled }: FormStatusWatcherProps) {\n const { pending } = useFormStatus();\n const previous = useRef(false);\n useEffect(() => {\n const was = previous.current;\n previous.current = pending;\n if (was === pending) return;\n onPendingChange(pending);\n if (was && !pending) onSettled();\n }, [pending, onPendingChange, onSettled]);\n return null;\n}\n"],"mappings":";;;;;;;;;;;AAgBA,SAAgB,kBAAkB,EAAE,iBAAiB,aAAqC;CACxF,MAAM,EAAE,YAAY,cAAc;CAClC,MAAM,WAAW,OAAO,KAAK;CAC7B,gBAAgB;EACd,MAAM,MAAM,SAAS;EACrB,SAAS,UAAU;EACnB,IAAI,QAAQ,SAAS;EACrB,gBAAgB,OAAO;EACvB,IAAI,OAAO,CAAC,SAAS,UAAU;CACjC,GAAG;EAAC;EAAS;EAAiB;CAAS,CAAC;CACxC,OAAO;AACT"}
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { dataAttr } from "../data-attr.mjs";
3
+ import { guardCheckableChange } from "./use-native-checked.mjs";
4
+ //#region src/internal/form/group-member.ts
5
+ /**
6
+ * The owned layer (conventions 1.2) of a group Item's `<input>`: `type`, the group's `name` /
7
+ * `form`, `value`, `checked` (the optimistic state), `defaultChecked` (never rendered), a
8
+ * checkbox's `aria-checked` (removed), `disabled`, `required`, the state `data-*` attributes,
9
+ * and the guarded `onChange`.
10
+ */
11
+ function groupMemberProps(options) {
12
+ const { type, component, checked, pending, effectiveDisabled, invalid, activate } = options;
13
+ return {
14
+ type,
15
+ name: options.name,
16
+ value: options.value,
17
+ checked,
18
+ defaultChecked: void 0,
19
+ ...type === "checkbox" && { "aria-checked": void 0 },
20
+ disabled: options.ownDisabled,
21
+ form: options.form,
22
+ required: options.required,
23
+ "data-checked": dataAttr(checked),
24
+ "data-pending": dataAttr(pending),
25
+ "data-disabled": dataAttr(effectiveDisabled),
26
+ ...invalid !== void 0 && { "aria-invalid": invalid },
27
+ onChange: (event) => {
28
+ if (effectiveDisabled) return;
29
+ const nativeEvent = event.nativeEvent;
30
+ guardCheckableChange(nativeEvent, () => activate(nativeEvent), component);
31
+ }
32
+ };
33
+ }
34
+ //#endregion
35
+ export { groupMemberProps };
36
+
37
+ //# sourceMappingURL=group-member.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group-member.mjs","names":[],"sources":["../../../src/internal/form/group-member.ts"],"sourcesContent":["\"use client\";\nimport type { ChangeEvent, ComponentPropsWithRef } from \"react\";\nimport { dataAttr } from \"../data-attr.js\";\nimport type { DataAttributes } from \"../render-element.js\";\nimport { guardCheckableChange } from \"./use-native-checked.js\";\n\nexport interface GroupMemberPropsOptions {\n readonly type: \"radio\" | \"checkbox\";\n /** Dispatch-guard name (`\"RadioGroup.Item\"`). */\n readonly component: string;\n /** The group's shared `name` and `form`. */\n readonly name: string;\n readonly form: string | undefined;\n readonly value: string;\n readonly required: boolean;\n /** Optimistic. */\n readonly checked: boolean;\n readonly pending: boolean;\n /** Own `disabled` prop or the Root's: `data-disabled` and the click guard. */\n readonly effectiveDisabled: boolean;\n /** The member's own `disabled` prop only: the Root's reaches it through `<fieldset disabled>`. */\n readonly ownDisabled: boolean;\n /** CheckboxGroup inside a Field: the group's `aria-invalid` (the fieldset cannot carry it). */\n readonly invalid?: \"true\" | \"false\" | undefined;\n /** The user checked (radio) or toggled (checkbox) the input. */\n readonly activate: (event: Event) => void;\n}\n\n/**\n * The owned layer (conventions 1.2) of a group Item's `<input>`: `type`, the group's `name` /\n * `form`, `value`, `checked` (the optimistic state), `defaultChecked` (never rendered), a\n * checkbox's `aria-checked` (removed), `disabled`, `required`, the state `data-*` attributes,\n * and the guarded `onChange`.\n */\nexport function groupMemberProps(\n options: GroupMemberPropsOptions,\n): Partial<ComponentPropsWithRef<\"input\">> & DataAttributes {\n const { type, component, checked, pending, effectiveDisabled, invalid, activate } = options;\n return {\n type,\n name: options.name,\n value: options.value,\n checked,\n defaultChecked: undefined,\n ...(type === \"checkbox\" && { \"aria-checked\": undefined }),\n // Owned (Switch precedent) so that native disabledness, `data-disabled` and the click guard\n // agree. Only the Item's own prop: `Root disabled` reaches the input through the fieldset.\n disabled: options.ownDisabled,\n form: options.form,\n required: options.required,\n \"data-checked\": dataAttr(checked),\n \"data-pending\": dataAttr(pending),\n \"data-disabled\": dataAttr(effectiveDisabled),\n ...(invalid !== undefined && { \"aria-invalid\": invalid }),\n onChange: (event: ChangeEvent<HTMLInputElement>) => {\n // A natively disabled input fires no click; this covers `render` elements that do not\n // honour `disabled`.\n if (effectiveDisabled) return;\n const nativeEvent = event.nativeEvent;\n guardCheckableChange(nativeEvent, () => activate(nativeEvent), component);\n },\n };\n}\n"],"mappings":";;;;;;;;;;AAkCA,SAAgB,iBACd,SAC0D;CAC1D,MAAM,EAAE,MAAM,WAAW,SAAS,SAAS,mBAAmB,SAAS,aAAa;CACpF,OAAO;EACL;EACA,MAAM,QAAQ;EACd,OAAO,QAAQ;EACf;EACA,gBAAgB,KAAA;EAChB,GAAI,SAAS,cAAc,EAAE,gBAAgB,KAAA,EAAU;EAGvD,UAAU,QAAQ;EAClB,MAAM,QAAQ;EACd,UAAU,QAAQ;EAClB,gBAAgB,SAAS,OAAO;EAChC,gBAAgB,SAAS,OAAO;EAChC,iBAAiB,SAAS,iBAAiB;EAC3C,GAAI,YAAY,KAAA,KAAa,EAAE,gBAAgB,QAAQ;EACvD,WAAW,UAAyC;GAGlD,IAAI,mBAAmB;GACvB,MAAM,cAAc,MAAM;GAC1B,qBAAqB,mBAAmB,SAAS,WAAW,GAAG,SAAS;EAC1E;CACF;AACF"}
@@ -0,0 +1,29 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ //#region src/internal/form/hidden-values.tsx
3
+ /**
4
+ * The form value of a set-valued Root that has no form element of its own, Combobox `multiple`
5
+ * and MultiSelect (design/components/combobox.md 15.8, multi-select.md B.10; conventions 1.1):
6
+ * one `<input type="hidden" name value>` per value, in value order. An empty selection keeps one
7
+ * nameless input, which posts nothing but is still the form-associated element of the reset
8
+ * listener and an enclosing Field.
9
+ */
10
+ function HiddenValues({ name, form, values, inputRef }) {
11
+ if (name === void 0) return null;
12
+ if (values.length === 0) return /* @__PURE__ */ jsx("input", {
13
+ ref: inputRef,
14
+ type: "hidden",
15
+ form,
16
+ value: ""
17
+ }, "");
18
+ return values.map((v, i) => /* @__PURE__ */ jsx("input", {
19
+ ref: i === 0 ? inputRef : void 0,
20
+ type: "hidden",
21
+ name,
22
+ form,
23
+ value: v
24
+ }, `v:${v}`));
25
+ }
26
+ //#endregion
27
+ export { HiddenValues };
28
+
29
+ //# sourceMappingURL=hidden-values.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hidden-values.mjs","names":[],"sources":["../../../src/internal/form/hidden-values.tsx"],"sourcesContent":["// No \"use client\" directive: a plain component with no hook, rendered by the client Roots that\n// use it (conventions 7.1).\nimport type { ReactNode, Ref } from \"react\";\n\nexport interface HiddenValuesProps {\n /** The `name` of every input; `undefined` renders nothing. */\n readonly name: string | undefined;\n readonly form: string | undefined;\n /** The optimistic selection, in value order. */\n readonly values: readonly string[];\n /** Attached to the first input: the form-associated element of the reset listener and a Field. */\n readonly inputRef: Ref<HTMLInputElement>;\n}\n\n/**\n * The form value of a set-valued Root that has no form element of its own, Combobox `multiple`\n * and MultiSelect (design/components/combobox.md 15.8, multi-select.md B.10; conventions 1.1):\n * one `<input type=\"hidden\" name value>` per value, in value order. An empty selection keeps one\n * nameless input, which posts nothing but is still the form-associated element of the reset\n * listener and an enclosing Field.\n */\nexport function HiddenValues({ name, form, values, inputRef }: HiddenValuesProps): ReactNode {\n if (name === undefined) return null;\n if (values.length === 0)\n return <input key=\"\" ref={inputRef} type=\"hidden\" form={form} value=\"\" />;\n return values.map((v, i) => (\n <input\n key={`v:${v}`}\n ref={i === 0 ? inputRef : undefined}\n type=\"hidden\"\n name={name}\n form={form}\n value={v}\n />\n ));\n}\n"],"mappings":";;;;;;;;;AAqBA,SAAgB,aAAa,EAAE,MAAM,MAAM,QAAQ,YAA0C;CAC3F,IAAI,SAAS,KAAA,GAAW,OAAO;CAC/B,IAAI,OAAO,WAAW,GACpB,OAAO,oBAAC,SAAD;EAAc,KAAK;EAAU,MAAK;EAAe;EAAM,OAAM;CAAI,GAAtD,EAAsD;CAC1E,OAAO,OAAO,KAAK,GAAG,MACpB,oBAAC,SAAD;EAEE,KAAK,MAAM,IAAI,WAAW,KAAA;EAC1B,MAAK;EACC;EACA;EACN,OAAO;CACR,GANM,KAAK,GAMX,CACF;AACH"}
@@ -1,4 +1,4 @@
1
- //#region src/internal/sync-presence.ts
1
+ //#region src/internal/form/sync-presence.ts
2
2
  /**
3
3
  * Makes a boolean attribute's presence match `present`. For group members that may hydrate after
4
4
  * their Root (`RadioGroup.Item`, `CheckboxGroup.Item` / `Parent`): hydration keeps server
@@ -13,7 +13,11 @@ function syncPresence(el, name, present) {
13
13
  else el.removeAttribute(name);
14
14
  }
15
15
  }
16
+ /** `syncPresence` for each entry of `attributes`, in order. */
17
+ function syncPresences(el, attributes) {
18
+ for (const [name, present] of Object.entries(attributes)) syncPresence(el, name, present);
19
+ }
16
20
  //#endregion
17
- export { syncPresence };
21
+ export { syncPresence, syncPresences };
18
22
 
19
23
  //# sourceMappingURL=sync-presence.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-presence.mjs","names":[],"sources":["../../../src/internal/form/sync-presence.ts"],"sourcesContent":["/**\n * Makes a boolean attribute's presence match `present`. For group members that may hydrate after\n * their Root (`RadioGroup.Item`, `CheckboxGroup.Item` / `Parent`): hydration keeps server\n * attributes that differ from the client render (React only warns), and a member hydrating late\n * can render a different state than the server did.\n *\n * No `\"use client\"` directive: no client-only API (conventions 7.1).\n */\nexport function syncPresence(el: Element, name: string, present: boolean): void {\n if (el.hasAttribute(name) !== present) {\n if (present) el.setAttribute(name, \"\");\n else el.removeAttribute(name);\n }\n}\n\n/** `syncPresence` for each entry of `attributes`, in order. */\nexport function syncPresences(el: Element, attributes: Readonly<Record<string, boolean>>): void {\n for (const [name, present] of Object.entries(attributes)) syncPresence(el, name, present);\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,aAAa,IAAa,MAAc,SAAwB;CAC9E,IAAI,GAAG,aAAa,IAAI,MAAM,SAAS;EACrC,IAAI,SAAS,GAAG,aAAa,MAAM,EAAE;OAChC,GAAG,gBAAgB,IAAI;CAC9B;AACF;;AAGA,SAAgB,cAAc,IAAa,YAAqD;CAC9F,KAAK,MAAM,CAAC,MAAM,YAAY,OAAO,QAAQ,UAAU,GAAG,aAAa,IAAI,MAAM,OAAO;AAC1F"}