@ngrok/mantle 0.94.1 → 0.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (601) hide show
  1. package/README.md +2 -2
  2. package/dist/CaretDown-MgTrjdYK.js +1 -0
  3. package/dist/CaretLeft-CZIqCyEF.js +1 -0
  4. package/dist/CaretRight-BKz4JHCI.js +1 -0
  5. package/dist/Check-C5a1hX4x.js +1 -0
  6. package/dist/CheckCircle-Bi4tSau6.js +1 -0
  7. package/dist/CircleNotch-BKE0NAIr.js +1 -0
  8. package/dist/Copy-BYWMO6PW.js +1 -0
  9. package/dist/Desktop-BaSlSeg2.js +1 -0
  10. package/dist/Eye-C38LQkZ_.js +1 -0
  11. package/dist/EyeClosed-BvOq-W8o.js +1 -0
  12. package/dist/FileText-CqAezJDn.js +1 -0
  13. package/dist/Info-weHV1B4q.js +1 -0
  14. package/dist/MagnifyingGlass-DCAoDH5_.js +1 -0
  15. package/dist/Megaphone-Cir2KHXa.js +1 -0
  16. package/dist/Minus-KBzmC4_K.js +1 -0
  17. package/dist/Moon-hn_oivM6.js +1 -0
  18. package/dist/Plus-D90-H9Ei.js +1 -0
  19. package/dist/Question-BhvEyO0K.js +1 -0
  20. package/dist/SidebarSimple-BXKgNz4l.js +1 -0
  21. package/dist/SortAscending-CEk4rgu_.js +1 -0
  22. package/dist/SortDescending-C0cE7hpU.js +1 -0
  23. package/dist/Sun-C3SaXdLl.js +1 -0
  24. package/dist/Terminal-aKZ6Y9Lk.js +1 -0
  25. package/dist/Warning-DTwF27_O.js +1 -0
  26. package/dist/WarningDiamond-BwpdVJ34.js +1 -0
  27. package/dist/X-BPGjP4b6.js +1 -0
  28. package/dist/accordion-BmDXs1-q.js +1 -0
  29. package/dist/accordion-NpJz3Uer.js +1 -0
  30. package/dist/accordion-parts.d.ts +268 -0
  31. package/dist/accordion-parts.js +1 -0
  32. package/dist/accordion.d.ts +4 -395
  33. package/dist/accordion.js +1 -1
  34. package/dist/agent.json +409 -42
  35. package/dist/alert-DCGSrVTa.js +1 -0
  36. package/dist/{alert-D0zRRUHV.d.ts → alert-Dz541Ve9.d.ts} +7 -193
  37. package/dist/alert-center-Bb39SBqJ.js +1 -0
  38. package/dist/alert-center-CGBbqO-y.d.ts +391 -0
  39. package/dist/alert-center-parts.d.ts +6 -0
  40. package/dist/alert-center-parts.js +1 -0
  41. package/dist/alert-center.d.ts +6 -587
  42. package/dist/alert-center.js +1 -1
  43. package/dist/alert-dialog-CtKnvX5N.js +1 -0
  44. package/dist/alert-dialog-parts.d.ts +569 -0
  45. package/dist/alert-dialog-parts.js +1 -0
  46. package/dist/alert-dialog.d.ts +2 -1065
  47. package/dist/alert-dialog.js +1 -1
  48. package/dist/alert-parts.d.ts +6 -0
  49. package/dist/alert-parts.js +1 -0
  50. package/dist/alert.d.ts +43 -1
  51. package/dist/alert.js +1 -1
  52. package/dist/anchor-DW5_Gb-1.js +1 -0
  53. package/dist/anchor.d.ts +1 -1
  54. package/dist/anchor.js +1 -1
  55. package/dist/app-layout-D7kwv9su.js +1 -0
  56. package/dist/app-layout-k6UjK30v.d.ts +1167 -0
  57. package/dist/app-layout-parts.d.ts +6 -0
  58. package/dist/app-layout-parts.js +1 -0
  59. package/dist/app-layout.d.ts +98 -1883
  60. package/dist/app-layout.js +1 -1
  61. package/dist/area-chart-C6lKu7Un.d.ts +390 -0
  62. package/dist/area-chart-SAaGaZFD.js +1 -0
  63. package/dist/area-chart-parts.d.ts +6 -0
  64. package/dist/area-chart-parts.js +1 -0
  65. package/dist/area-chart.d.ts +4 -579
  66. package/dist/area-chart.js +1 -1
  67. package/dist/avatar-BMZ81f_5.js +1 -0
  68. package/dist/avatar-Ti8GKSnS.d.ts +201 -0
  69. package/dist/avatar-parts.d.ts +6 -0
  70. package/dist/avatar-parts.js +1 -0
  71. package/dist/avatar.d.ts +3 -275
  72. package/dist/avatar.js +1 -1
  73. package/dist/badge.d.ts +3 -2
  74. package/dist/badge.js +1 -1
  75. package/dist/bar-chart-C0Ra1ZpG.js +1 -0
  76. package/dist/bar-chart-Cb5fA8V7.d.ts +386 -0
  77. package/dist/bar-chart-parts.d.ts +6 -0
  78. package/dist/bar-chart-parts.js +1 -0
  79. package/dist/bar-chart.d.ts +4 -583
  80. package/dist/bar-chart.js +1 -1
  81. package/dist/behaviors-BW8RjkkS.js +1 -0
  82. package/dist/behaviors-BbOq5SFv.js +1 -0
  83. package/dist/behaviors-C7R7ZIoN.js +1 -0
  84. package/dist/behaviors-CHF5PT3C.js +1 -0
  85. package/dist/behaviors-CSZQSSfL.js +1 -0
  86. package/dist/behaviors-CcjvGa0d.js +1 -0
  87. package/dist/behaviors-CnarRd47.js +1 -0
  88. package/dist/behaviors-CoNi6Rd-.js +1 -0
  89. package/dist/behaviors-D9VIyDk1.js +1 -0
  90. package/dist/behaviors-DHVC34f9.js +1 -0
  91. package/dist/behaviors-DkCIgQ8w.js +1 -0
  92. package/dist/behaviors-Mkc_HjTB.js +1 -0
  93. package/dist/breadcrumb-CAzq3SlR.js +1 -0
  94. package/dist/breadcrumb-parts.d.ts +287 -0
  95. package/dist/breadcrumb-parts.js +1 -0
  96. package/dist/breadcrumb.d.ts +53 -543
  97. package/dist/breadcrumb.js +1 -1
  98. package/dist/browser-only-CokCtIvB.js +1 -0
  99. package/dist/browser-only.js +1 -1
  100. package/dist/button-Bqm7U0OC.js +1 -0
  101. package/dist/{button-5Pc7Mby_.d.ts → button-C6-6TecO.d.ts} +4 -4
  102. package/dist/{button-DnYv7IOT.d.ts → button-CL17Dxza.d.ts} +7 -5
  103. package/dist/button-CRCiBPEF.js +1 -0
  104. package/dist/{button-Ddj6yr10.d.ts → button-CRMoQyum.d.ts} +2 -3
  105. package/dist/button-Cr2iY2cI.js +1 -0
  106. package/dist/button-DhoE-BbZ.js +1 -0
  107. package/dist/button.d.ts +3 -3
  108. package/dist/button.js +1 -1
  109. package/dist/calendar-DQtapcSC.js +1 -0
  110. package/dist/calendar.d.ts +1 -1
  111. package/dist/calendar.js +1 -1
  112. package/dist/card-DbtGVKyo.d.ts +129 -0
  113. package/dist/card-parts.d.ts +6 -0
  114. package/dist/card-parts.js +1 -0
  115. package/dist/card.d.ts +3 -228
  116. package/dist/card.js +1 -1
  117. package/dist/centered-layout-parts.d.ts +169 -0
  118. package/dist/centered-layout-parts.js +1 -0
  119. package/dist/centered-layout.d.ts +2 -299
  120. package/dist/centered-layout.js +1 -1
  121. package/dist/chart-B0n2xyYi.js +1 -0
  122. package/dist/chart-BPsMxs1f.js +1 -0
  123. package/dist/chart-BmZoTjRu.js +1 -0
  124. package/dist/chart-Bybyh2Dc.js +1 -0
  125. package/dist/chart-CACfdGlp.d.ts +86 -0
  126. package/dist/chart-CBQJUTIX.js +1 -0
  127. package/dist/chart-Cb0MBaZx.js +1 -0
  128. package/dist/chart-CmMcfDmv.js +1 -0
  129. package/dist/chart-Dlp9FidW.js +2 -0
  130. package/dist/{chart-Dl8gFo_D.d.ts → chart-XvStK-oM.d.ts} +3 -79
  131. package/dist/chart-wTwYzUMJ.js +1 -0
  132. package/dist/checkbox-DH7WFfuR.js +1 -0
  133. package/dist/checkbox-DsVXD96X.js +1 -0
  134. package/dist/checkbox-TX74-Iep.js +1 -0
  135. package/dist/checkbox-group-parts.d.ts +197 -0
  136. package/dist/checkbox-group-parts.js +1 -0
  137. package/dist/checkbox.d.ts +59 -8
  138. package/dist/checkbox.js +1 -1
  139. package/dist/{choice-CNiOSzqV.d.ts → choice-BekuLm-b.d.ts} +16 -204
  140. package/dist/choice-DGI8VNR9.d.ts +1 -0
  141. package/dist/choice-PDT386cc.js +1 -0
  142. package/dist/choice-parts.d.ts +7 -0
  143. package/dist/choice-parts.js +1 -0
  144. package/dist/choice.d.ts +63 -1
  145. package/dist/choice.js +1 -1
  146. package/dist/code-UKPv6LVP.js +1 -0
  147. package/dist/{code-block-CKzsAMzj.js → code-block-B-xD4_RW.js} +3 -3
  148. package/dist/code-block-B7XPzZnp.js +1 -0
  149. package/dist/code-block-BXXceNVo.js +1 -0
  150. package/dist/code-block-C7uzLs8t.js +1 -0
  151. package/dist/{code-block-BDw6MEwH.d.ts → code-block-Cs1Lcmdr.d.ts} +81 -252
  152. package/dist/code-block-Erv7wuWW.d.ts +173 -0
  153. package/dist/code-block-parts.d.ts +380 -0
  154. package/dist/code-block-parts.js +1 -0
  155. package/dist/code-block.d.ts +66 -691
  156. package/dist/code-block.js +6 -6
  157. package/dist/code-block_highlight-utils.d.ts +2 -1
  158. package/dist/code-block_highlight-utils.js +1 -1
  159. package/dist/code.d.ts +1 -1
  160. package/dist/code.js +1 -1
  161. package/dist/combobox-6LXe1cLx.js +1 -0
  162. package/dist/combobox-parts.d.ts +303 -0
  163. package/dist/combobox-parts.js +1 -0
  164. package/dist/combobox.d.ts +2 -465
  165. package/dist/combobox.js +1 -1
  166. package/dist/command-B8L-zjGt.js +1 -0
  167. package/dist/command-CCMWCjAK.js +1 -0
  168. package/dist/command-VKj84zAX.d.ts +859 -0
  169. package/dist/command-cbgO9CiG.js +1 -0
  170. package/dist/command-parts.d.ts +6 -0
  171. package/dist/command-parts.js +1 -0
  172. package/dist/command.d.ts +71 -1115
  173. package/dist/command.js +1 -1
  174. package/dist/compose-refs-Ce1vWUz0.js +1 -0
  175. package/dist/cx-CfAFHj5_.js +73 -0
  176. package/dist/cx-DhYnQ07J.js +1 -0
  177. package/dist/cx.d.ts +20 -14
  178. package/dist/cx.js +1 -1
  179. package/dist/data-table-C-FgaN3_.js +1 -0
  180. package/dist/data-table-Cw9dUo1w.js +1 -0
  181. package/dist/data-table-CwqrMtp0.js +1 -0
  182. package/dist/data-table-GUbt8mzo.d.ts +38 -0
  183. package/dist/data-table-parts.d.ts +763 -0
  184. package/dist/data-table-parts.js +1 -0
  185. package/dist/data-table.d.ts +12 -1208
  186. package/dist/data-table.js +1 -1
  187. package/dist/description-list-CjcKOOnr.d.ts +110 -0
  188. package/dist/description-list-parts.d.ts +6 -0
  189. package/dist/description-list-parts.js +1 -0
  190. package/dist/description-list.d.ts +3 -183
  191. package/dist/description-list.js +1 -1
  192. package/dist/dialog-4Ed3U7hz.js +1 -0
  193. package/dist/dialog-BDb_obii.d.ts +166 -0
  194. package/dist/dialog-BaR9D58J.js +1 -0
  195. package/dist/dialog-BkNxAcol.d.ts +467 -0
  196. package/dist/dialog-DSYuhFD5.js +1 -0
  197. package/dist/dialog-fXMCxM9W.js +1 -0
  198. package/dist/dialog-parts.d.ts +6 -0
  199. package/dist/dialog-parts.js +1 -0
  200. package/dist/dialog.d.ts +88 -2
  201. package/dist/dialog.js +1 -1
  202. package/dist/dropdown-menu-BuluRn0Z.js +1 -0
  203. package/dist/dropdown-menu-CDXlp0QT.d.ts +507 -0
  204. package/dist/dropdown-menu-parts.d.ts +6 -0
  205. package/dist/dropdown-menu-parts.js +1 -0
  206. package/dist/dropdown-menu.d.ts +57 -1
  207. package/dist/dropdown-menu.js +1 -1
  208. package/dist/empty-parts.d.ts +120 -0
  209. package/dist/empty-parts.js +1 -0
  210. package/dist/empty.d.ts +2 -216
  211. package/dist/empty.js +1 -1
  212. package/dist/field-BRYypbjO.js +1 -0
  213. package/dist/field-BVMx7HoG.js +1 -0
  214. package/dist/field-BwCq1b9R.js +1 -0
  215. package/dist/field-CYAaNexp.js +1 -0
  216. package/dist/field-DRHAcM1s.js +1 -0
  217. package/dist/field-parts.d.ts +767 -0
  218. package/dist/field-parts.js +1 -0
  219. package/dist/field.d.ts +21 -1201
  220. package/dist/field.js +1 -1
  221. package/dist/flag.d.ts +1 -1
  222. package/dist/flag.js +1 -1
  223. package/dist/float-C_vwTtzU.js +1 -0
  224. package/dist/float-JmSzKDHd.js +1 -0
  225. package/dist/float-OhVY3cf4.js +1 -0
  226. package/dist/hooks-B-Cd15iL.js +1 -0
  227. package/dist/hooks-BP_uqBsI.js +1 -0
  228. package/dist/hooks-BsOjpTgs.js +1 -0
  229. package/dist/hooks-BybaGF7O.js +1 -0
  230. package/dist/hooks-C9b-2wGy.js +1 -0
  231. package/dist/hooks-CMmpICCH.js +1 -0
  232. package/dist/hooks-CUYIUcp6.js +1 -0
  233. package/dist/hooks-DKbOd_pQ.js +1 -0
  234. package/dist/hooks-DejuqCNF.js +1 -0
  235. package/dist/hooks-GsDfo7Zl.js +1 -0
  236. package/dist/hooks-PsYFJkz2.js +1 -0
  237. package/dist/hooks-lDz_S9UG.js +1 -0
  238. package/dist/hooks.d.ts +96 -7
  239. package/dist/hooks.js +1 -1
  240. package/dist/hover-card-BEC5EQiH.js +1 -0
  241. package/dist/hover-card-parts.d.ts +160 -0
  242. package/dist/hover-card-parts.js +1 -0
  243. package/dist/hover-card.d.ts +8 -280
  244. package/dist/hover-card.js +1 -1
  245. package/dist/icon-0RoVrpGj.js +1 -0
  246. package/dist/icon-BSGMvJ0W.js +1 -0
  247. package/dist/icon-DIiKxRTh.js +1 -0
  248. package/dist/{icon-QCm1ui29.d.ts → icon-Dqn_LLrR.d.ts} +1 -1
  249. package/dist/{icon-DuIYoyft.d.ts → icon-KTcDR4--.d.ts} +1 -1
  250. package/dist/icon.d.ts +2 -2
  251. package/dist/icon.js +1 -1
  252. package/dist/icons-CVgj9Whd.js +1 -0
  253. package/dist/icons-D_4cZaL1.js +1 -0
  254. package/dist/icons-DucrvIOa.js +1 -0
  255. package/dist/icons.js +1 -1
  256. package/dist/{index-KJ06KK6t.d.ts → index-CCkilmv8.d.ts} +1 -1
  257. package/dist/input-83xaPZWK.js +1 -0
  258. package/dist/input-B78ah4AB.js +1 -0
  259. package/dist/{input-DC4nW0Sr.d.ts → input-Bvpu3ruQ.d.ts} +1 -1
  260. package/dist/input.d.ts +2 -2
  261. package/dist/input.js +1 -1
  262. package/dist/kbd-Bz_Rbpv8.js +1 -0
  263. package/dist/kbd.d.ts +1 -1
  264. package/dist/kbd.js +1 -1
  265. package/dist/{label-epgtywRz.d.ts → label-DZpKu3Pu.d.ts} +1 -1
  266. package/dist/label-DmkAp9xI.js +1 -0
  267. package/dist/label.d.ts +1 -1
  268. package/dist/label.js +1 -1
  269. package/dist/layer-container-DDOZJ0fn.js +1 -0
  270. package/dist/layer-container.d.ts +9 -1
  271. package/dist/layer-container.js +1 -1
  272. package/dist/line-chart-CBL7eCqF.js +1 -0
  273. package/dist/line-chart-CIDFDkyb.d.ts +380 -0
  274. package/dist/line-chart-parts.d.ts +6 -0
  275. package/dist/line-chart-parts.js +1 -0
  276. package/dist/line-chart.d.ts +4 -568
  277. package/dist/line-chart.js +1 -1
  278. package/dist/list-CC3Pi__V.js +1 -0
  279. package/dist/list-Cx4KNfgC.d.ts +286 -0
  280. package/dist/list-FiFQJ0BU.js +1 -0
  281. package/dist/list-parts.d.ts +6 -0
  282. package/dist/list-parts.js +1 -0
  283. package/dist/list.d.ts +3 -400
  284. package/dist/list.js +1 -1
  285. package/dist/live-region-78gbKwlB.js +1 -0
  286. package/dist/live-region.d.ts +1 -1
  287. package/dist/live-region.js +1 -1
  288. package/dist/llms.txt +33 -10
  289. package/dist/main-9d96oUPG.js +1 -0
  290. package/dist/main.d.ts +1 -1
  291. package/dist/main.js +1 -1
  292. package/dist/mantle.css +1287 -893
  293. package/dist/media-object-parts.d.ts +65 -0
  294. package/dist/media-object-parts.js +1 -0
  295. package/dist/media-object.d.ts +2 -118
  296. package/dist/media-object.js +1 -1
  297. package/dist/migrations/0017-select-owned-behavior.yml +117 -0
  298. package/dist/migrations/0018-combobox-owned-behavior.yml +1661 -0
  299. package/dist/migrations/0019-multi-select-owned-behavior.yml +1414 -0
  300. package/dist/migrations/0020-native-floats.yml +823 -0
  301. package/dist/migrations/0021-native-radio-group.yml +397 -0
  302. package/dist/migrations/0024-command-owned-behavior.yml +66 -0
  303. package/dist/migrations/0026-native-dropdown-menu.yml +351 -0
  304. package/dist/migrations/0029-data-attribute-contract.yml +1707 -0
  305. package/dist/migrations/0030-between-variant.yml +1954 -0
  306. package/dist/multi-select-parts.d.ts +487 -0
  307. package/dist/multi-select-parts.js +1 -0
  308. package/dist/multi-select-qC0BuYKD.js +1 -0
  309. package/dist/multi-select.d.ts +6 -803
  310. package/dist/multi-select.js +1 -1
  311. package/dist/otp-input-LPdkb_Fg.js +1 -0
  312. package/dist/otp-input-parts.d.ts +211 -0
  313. package/dist/otp-input-parts.js +1 -0
  314. package/dist/otp-input-zl6MVio6.js +1 -0
  315. package/dist/otp-input.d.ts +11 -252
  316. package/dist/otp-input.js +1 -1
  317. package/dist/overlay-prompt-BIzMQvx7.js +1 -0
  318. package/dist/overlay-prompt-CDnhSoPJ.js +1 -0
  319. package/dist/overlay-prompt.d.ts +57 -0
  320. package/dist/overlay-prompt.js +1 -0
  321. package/dist/pagination-B2ESEbMI.d.ts +171 -0
  322. package/dist/pagination-CxaLKZcE.js +1 -0
  323. package/dist/pagination-Df1gTCN-.js +1 -0
  324. package/dist/pagination-cursor-pagination-parts.d.ts +6 -0
  325. package/dist/pagination-cursor-pagination-parts.js +1 -0
  326. package/dist/pagination.d.ts +38 -303
  327. package/dist/pagination.js +1 -1
  328. package/dist/popover-DOd6zLvE.d.ts +226 -0
  329. package/dist/popover-DWvHbepV.js +1 -0
  330. package/dist/popover-parts.d.ts +6 -0
  331. package/dist/popover-parts.js +1 -0
  332. package/dist/popover.d.ts +60 -2
  333. package/dist/popover.js +1 -1
  334. package/dist/position-Cv3XpSur.d.ts +5 -0
  335. package/dist/progress-BE0c8GW8.js +1 -0
  336. package/dist/progress-ZhFJhv9u.js +1 -0
  337. package/dist/progress-bar-parts.d.ts +86 -0
  338. package/dist/progress-bar-parts.js +1 -0
  339. package/dist/progress-donut-parts.d.ts +94 -0
  340. package/dist/progress-donut-parts.js +1 -0
  341. package/dist/progress-mJQMhxMX.js +1 -0
  342. package/dist/progress-zDpT3TY4.d.ts +2 -0
  343. package/dist/progress.d.ts +4 -268
  344. package/dist/progress.js +1 -1
  345. package/dist/qr-code-0zh10iIE.d.ts +148 -0
  346. package/dist/qr-code-BOOubA9x.js +1 -0
  347. package/dist/qr-code-D8tBKtjP.js +1 -0
  348. package/dist/qr-code-DzJjumoc.d.ts +46 -0
  349. package/dist/qr-code-encoder.browser.d.ts +15 -0
  350. package/dist/qr-code-encoder.browser.js +1 -0
  351. package/dist/qr-code-encoder.d.ts +15 -0
  352. package/dist/qr-code-encoder.js +1 -0
  353. package/dist/qr-code-parts.d.ts +6 -0
  354. package/dist/qr-code-parts.js +1 -0
  355. package/dist/qr-code.d.ts +4 -227
  356. package/dist/qr-code.js +1 -1
  357. package/dist/query-C0e5VYNp.d.ts +440 -0
  358. package/dist/query-V5NifJGs.js +1 -0
  359. package/dist/query-filter.js +1 -1
  360. package/dist/query-parts.d.ts +6 -0
  361. package/dist/query-parts.js +1 -0
  362. package/dist/query.d.ts +3 -637
  363. package/dist/query.js +1 -1
  364. package/dist/radio-group-B9jtIbV1.d.ts +39 -0
  365. package/dist/radio-group-f3ThXQCx.js +1 -0
  366. package/dist/radio-group-parts.d.ts +249 -0
  367. package/dist/radio-group-parts.js +1 -0
  368. package/dist/radio-group-zA5DjlLg.js +1 -0
  369. package/dist/radio-group.d.ts +7 -399
  370. package/dist/radio-group.js +1 -1
  371. package/dist/sandbar-Cm2yMjEZ.js +1 -0
  372. package/dist/sandbar-DU4wpKRc.d.ts +345 -0
  373. package/dist/sandbar-parts.d.ts +6 -0
  374. package/dist/sandbar-parts.js +1 -0
  375. package/dist/sandbar.d.ts +3 -438
  376. package/dist/sandbar.js +1 -1
  377. package/dist/sandboxed-on-click-Cg3lewoG.js +1 -0
  378. package/dist/sandboxed-on-click-DOw_Jkhk.js +1 -0
  379. package/dist/sandboxed-on-click.d.ts +1 -1
  380. package/dist/sandboxed-on-click.js +1 -1
  381. package/dist/scatter-plot-1vFxkpjT.js +1 -0
  382. package/dist/scatter-plot-D25jLIVw.d.ts +388 -0
  383. package/dist/scatter-plot-parts.d.ts +6 -0
  384. package/dist/scatter-plot-parts.js +1 -0
  385. package/dist/scatter-plot.d.ts +4 -573
  386. package/dist/scatter-plot.js +1 -1
  387. package/dist/segmented-control-DuiDPKDZ.js +1 -0
  388. package/dist/segmented-control-parts.d.ts +72 -0
  389. package/dist/segmented-control-parts.js +1 -0
  390. package/dist/segmented-control.d.ts +4 -100
  391. package/dist/segmented-control.js +1 -1
  392. package/dist/select-08IEtypH.js +1 -0
  393. package/dist/select-DM2wWfOO.d.ts +478 -0
  394. package/dist/select-parts.d.ts +6 -0
  395. package/dist/select-parts.js +1 -0
  396. package/dist/select.d.ts +63 -1
  397. package/dist/select.js +1 -1
  398. package/dist/selectable-list-Ax5F2Gz1.js +1 -0
  399. package/dist/selectable-list-CyLc3EEt.d.ts +407 -0
  400. package/dist/selectable-list-GcpbbRM1.js +1 -0
  401. package/dist/selectable-list-parts.d.ts +6 -0
  402. package/dist/selectable-list-parts.js +1 -0
  403. package/dist/selectable-list.d.ts +3 -643
  404. package/dist/selectable-list.js +1 -1
  405. package/dist/separator-BB1ohsjn.js +1 -0
  406. package/dist/{separator-Ck4sPrdN.d.ts → separator-BzHNVyyv.d.ts} +1 -1
  407. package/dist/separator.d.ts +1 -1
  408. package/dist/separator.js +1 -1
  409. package/dist/sheet-5JgxVaWC.js +1 -0
  410. package/dist/sheet-parts.d.ts +732 -0
  411. package/dist/sheet-parts.js +1 -0
  412. package/dist/sheet-qYPi5MP8.js +1 -0
  413. package/dist/sheet.d.ts +11 -1224
  414. package/dist/sheet.js +1 -1
  415. package/dist/sidebar-CsC9fyPL.js +1 -0
  416. package/dist/sidebar-HDVxTNPi.js +1 -0
  417. package/dist/sidebar-OBA7L42d.d.ts +1480 -0
  418. package/dist/sidebar-parts.d.ts +6 -0
  419. package/dist/sidebar-parts.js +1 -0
  420. package/dist/sidebar.d.ts +108 -2518
  421. package/dist/sidebar.js +1 -1
  422. package/dist/skeleton-DB0oQyAx.js +1 -0
  423. package/dist/skeleton.d.ts +1 -1
  424. package/dist/skeleton.js +1 -1
  425. package/dist/skip-to-main-link-BGhAWSqB.js +1 -0
  426. package/dist/skip-to-main-link.d.ts +1 -1
  427. package/dist/skip-to-main-link.js +1 -1
  428. package/dist/slider-YlBozcPQ.js +1 -0
  429. package/dist/slider.d.ts +149 -15
  430. package/dist/slider.js +1 -1
  431. package/dist/slot-5ZSmrISx.d.ts +19 -0
  432. package/dist/slot-BxngGBJ2.js +1 -0
  433. package/dist/slot-CBcGhRdV.js +1 -0
  434. package/dist/{slot-BEMQMbk3.d.ts → slot-tuk2J6bY.d.ts} +6 -23
  435. package/dist/slot.d.ts +1 -1
  436. package/dist/slot.js +1 -1
  437. package/dist/split-button-DvJHD7cZ.js +1 -0
  438. package/dist/split-button-parts.d.ts +178 -0
  439. package/dist/split-button-parts.js +1 -0
  440. package/dist/split-button.d.ts +2 -314
  441. package/dist/split-button.js +1 -1
  442. package/dist/strata-parts.d.ts +256 -0
  443. package/dist/strata-parts.js +1 -0
  444. package/dist/strata.d.ts +4 -493
  445. package/dist/strata.js +1 -1
  446. package/dist/switch-DajWYrq3.js +1 -0
  447. package/dist/switch.d.ts +36 -4
  448. package/dist/switch.js +1 -1
  449. package/dist/{table-Ii9hHUWN.d.ts → table-C2KnE83u.d.ts} +5 -444
  450. package/dist/table-DJHK48-8.js +1 -0
  451. package/dist/table-parts.d.ts +6 -0
  452. package/dist/table-parts.js +1 -0
  453. package/dist/table.d.ts +81 -1
  454. package/dist/table.js +1 -1
  455. package/dist/tabs-36-4SlRo.js +1 -0
  456. package/dist/tabs-CC_HAqr4.d.ts +193 -0
  457. package/dist/tabs-DayeszXP.js +1 -0
  458. package/dist/tabs-headless-tabs-parts.d.ts +6 -0
  459. package/dist/tabs-headless-tabs-parts.js +1 -0
  460. package/dist/tabs-parts.d.ts +237 -0
  461. package/dist/tabs-parts.js +1 -0
  462. package/dist/tabs.d.ts +43 -420
  463. package/dist/tabs.js +1 -1
  464. package/dist/text-area-D29JTaZg.js +1 -0
  465. package/dist/text-area.d.ts +1 -1
  466. package/dist/text-area.js +1 -1
  467. package/dist/theme-D6rP5Fy8.js +1 -0
  468. package/dist/theme-switcher-PKMCyJxT.js +1 -0
  469. package/dist/theme-switcher.d.ts +23 -19
  470. package/dist/theme-switcher.js +1 -1
  471. package/dist/theme-xoFnLba6.js +1 -0
  472. package/dist/theme.d.ts +70 -65
  473. package/dist/theme.js +1 -1
  474. package/dist/time-zone-CpWYKHdp.js +1 -0
  475. package/dist/time-zone-DZ4hUJ8K.js +1 -0
  476. package/dist/time-zone.d.ts +190 -0
  477. package/dist/time-zone.js +1 -0
  478. package/dist/toast-BJZ__22c.js +1 -0
  479. package/dist/toast-Cb9IN-6e.d.ts +185 -0
  480. package/dist/toast-DM_oq-3E.js +1 -0
  481. package/dist/toast-parts.d.ts +6 -0
  482. package/dist/toast-parts.js +1 -0
  483. package/dist/toast.d.ts +7 -256
  484. package/dist/toast.js +1 -1
  485. package/dist/tokens.dark.json +31 -266
  486. package/dist/tokens.json +139 -205
  487. package/dist/tooltip-D4HZn19B.js +1 -0
  488. package/dist/tooltip-DP6Lz6jv.d.ts +180 -0
  489. package/dist/tooltip-Uy-kz0rK.d.ts +1 -0
  490. package/dist/tooltip-parts.d.ts +7 -0
  491. package/dist/tooltip-parts.js +1 -0
  492. package/dist/tooltip.d.ts +57 -1
  493. package/dist/tooltip.js +1 -1
  494. package/dist/truncated-text-B5u2AlNg.js +1 -0
  495. package/dist/truncated-text-BoXHP-cD.js +1 -0
  496. package/dist/truncated-text.d.ts +3 -5
  497. package/dist/truncated-text.js +1 -1
  498. package/dist/types.d.ts +1 -1
  499. package/dist/types.js +1 -1
  500. package/dist/typography-C2BmSH12.d.ts +148 -0
  501. package/dist/typography-parts.d.ts +6 -0
  502. package/dist/typography-parts.js +1 -0
  503. package/dist/typography.d.ts +52 -0
  504. package/dist/typography.js +1 -0
  505. package/dist/use-combobox-OhIEVioc.d.ts +23 -0
  506. package/dist/use-float-WEqqhXBE.d.ts +18 -0
  507. package/dist/use-listbox-D4uIonSN.d.ts +1 -0
  508. package/dist/utils-BN3rwHzz.js +1 -0
  509. package/dist/utils-BlLYcYik.js +1 -0
  510. package/dist/utils-C4astHJG.js +1 -0
  511. package/dist/utils-CPSttKPD.js +1 -0
  512. package/dist/utils.js +1 -1
  513. package/dist/visually-hidden.d.ts +1 -1
  514. package/dist/visually-hidden.js +1 -1
  515. package/dist/well.d.ts +2 -2
  516. package/dist/well.js +1 -1
  517. package/dist/world-map-BDd3N_Ap.d.ts +424 -0
  518. package/dist/world-map-D3c8Pq-h.js +1 -0
  519. package/dist/world-map-parts.d.ts +6 -0
  520. package/dist/world-map-parts.js +1 -0
  521. package/dist/world-map-t9U-IMKS.js +1 -0
  522. package/dist/world-map.d.ts +80 -0
  523. package/dist/world-map.js +1 -0
  524. package/package.json +15 -18
  525. package/dist/alert-BkJHDx9X.js +0 -1
  526. package/dist/anchor-Dc6IgvXV.js +0 -1
  527. package/dist/browser-only-CZfkNw5A.js +0 -1
  528. package/dist/button-B9bChDgl.js +0 -1
  529. package/dist/button-BQZ6eoD3.js +0 -1
  530. package/dist/button-D8jixIbH.js +0 -1
  531. package/dist/button-DNLTJ32M.js +0 -1
  532. package/dist/chart-BLCqzt56.js +0 -1
  533. package/dist/chart-CChZiCrt.js +0 -1
  534. package/dist/chart-CUmSu9d7.js +0 -1
  535. package/dist/chart-DtgZBAas.js +0 -2
  536. package/dist/checkbox-Cu5cgZmk.js +0 -1
  537. package/dist/choice-CCVG2hb9.js +0 -1
  538. package/dist/clsx-DUGZgXfJ.js +0 -1
  539. package/dist/clsx-Dj3RWZ2l.js +0 -1
  540. package/dist/code-BPKNY1_w.js +0 -1
  541. package/dist/cx-CK7o_rVv.js +0 -1
  542. package/dist/dialog-CIEuwNys.d.ts +0 -958
  543. package/dist/dialog-CbEEA0fl.d.ts +0 -32
  544. package/dist/dialog-DmzoDfY3.js +0 -1
  545. package/dist/dropdown-menu-CeY498yk.d.ts +0 -775
  546. package/dist/dropdown-menu-uheL0prz.js +0 -1
  547. package/dist/field-Bpvn4tQp.js +0 -1
  548. package/dist/field-Cai_4c1l.js +0 -1
  549. package/dist/icon-BudQMD2S.js +0 -1
  550. package/dist/icon-xb7d9M7X.js +0 -1
  551. package/dist/icons-DEDCLZ8B.js +0 -1
  552. package/dist/icons-DXadFwpo.js +0 -1
  553. package/dist/icons-DcesO4Ng.js +0 -1
  554. package/dist/input-DQyN6gN0.js +0 -1
  555. package/dist/input-fW8QSZEO.js +0 -1
  556. package/dist/interactive-target-BXScNeOr.js +0 -1
  557. package/dist/kbd-P1nQshWo.js +0 -1
  558. package/dist/label-DO1RlMKl.js +0 -1
  559. package/dist/layer-container-DL4yclOu.js +0 -1
  560. package/dist/list-cQZPSjfz.js +0 -1
  561. package/dist/live-region-Dhapu8a5.js +0 -1
  562. package/dist/main-CHyWYDak.js +0 -1
  563. package/dist/popover-Bei0jyfH.d.ts +0 -357
  564. package/dist/popover-DhgunktK.js +0 -1
  565. package/dist/popover-T2EyaqGK.d.ts +0 -1
  566. package/dist/primitive-D8CzV_Ft.js +0 -1
  567. package/dist/radio-group-BJQ6EOqh.d.ts +0 -27
  568. package/dist/radio-group-ggEkCi0V.js +0 -1
  569. package/dist/sandboxed-on-click-D4PL5_GR.js +0 -1
  570. package/dist/select-1xuUx_os.js +0 -1
  571. package/dist/select-BpaXHxJm.d.ts +0 -890
  572. package/dist/separator-DnvhwY2J.js +0 -1
  573. package/dist/shake-CAUpKBHe.js +0 -1
  574. package/dist/sheet-DHy_vlme.js +0 -1
  575. package/dist/skeleton-DHfyjuQi.js +0 -1
  576. package/dist/slot-B7rwscwd.js +0 -1
  577. package/dist/table-BnLdXUai.js +0 -1
  578. package/dist/theme-BNdZl352.js +0 -1
  579. package/dist/tooltip-CstGDKwy.d.ts +0 -283
  580. package/dist/tooltip-DQO40Mrq.js +0 -1
  581. package/dist/use-breakpoint-B4Kh0xE6.js +0 -1
  582. package/dist/use-callback-ref-DiOXFQzM.js +0 -1
  583. package/dist/use-composed-refs-DPYmLDSe.js +0 -1
  584. package/dist/use-copy-to-clipboard-hBL6_65i.js +0 -1
  585. package/dist/use-inert-siblings-C4RHXrZc.js +0 -1
  586. package/dist/use-is-apple-platform-Bq6_KbVX.js +0 -1
  587. package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +0 -1
  588. package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +0 -1
  589. package/dist/use-matches-media-query-FfvtNKQe.js +0 -1
  590. package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +0 -1
  591. package/dist/use-swipe-to-dismiss-BYdlca8r.js +0 -1
  592. /package/dist/{use-is-hydrated-BeLOGKwE.js → hooks-BeLOGKwE.js} +0 -0
  593. /package/dist/{suggestions-Ciz2vaJO.js → query-filter-Ciz2vaJO.js} +0 -0
  594. /package/dist/{direction-CvDpql3O.js → sorting-CvDpql3O.js} +0 -0
  595. /package/dist/{booleanish-BfvnW6vy.js → types-BfvnW6vy.js} +0 -0
  596. /package/dist/{css-properties-D85fCNV3.js → types-D85fCNV3.js} +0 -0
  597. /package/dist/{alternate-announcement-BkH4bOKp.js → utils-BkH4bOKp.js} +0 -0
  598. /package/dist/{copy-to-clipboard-Dd83caRw.js → utils-Dd83caRw.js} +0 -0
  599. /package/dist/{in-view-Dxv_GrUU.js → utils-Dxv_GrUU.js} +0 -0
  600. /package/dist/{data-slot-EM6s2WEU.js → utils-EM6s2WEU.js} +0 -0
  601. /package/dist/{cookie-ca4g5CKp.js → utils-ca4g5CKp.js} +0 -0
package/dist/field.js CHANGED
@@ -1 +1 @@
1
- "use client";import{t as e}from"./use-isomorphic-layout-effect-CL6iq0Bj.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./button-B9bChDgl.js";import{t as i}from"./label-DO1RlMKl.js";import{t as a}from"./popover-DhgunktK.js";import{t as o}from"./slot-B7rwscwd.js";import{n as s,r as c,t as l}from"./field-Cai_4c1l.js";import{i as u,n as d,r as f,t as p}from"./field-Bpvn4tQp.js";import{c as m}from"react/compiler-runtime";import{Children as h,Fragment as g,cloneElement as _,isValidElement as v,useContext as y,useId as b,useState as x}from"react";import S from"tiny-invariant";import{jsx as C}from"react/jsx-runtime";import{QuestionIcon as w}from"@phosphor-icons/react/Question";const T=e=>{let t=[],n=/* @__PURE__ */ new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},E=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),D=({children:e,errorItemType:t})=>{let n=!1;return h.forEach(e,e=>{n||e==null||typeof e==`boolean`||(typeof e==`string`?e.trim().length>0&&(n=!0):n=v(e)?e.type===t?E(e.props.children):e.type!==g||D({children:e.props.children,errorItemType:t}):!0)}),n},O=e=>{let r=m(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`field-set`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ C(`fieldset`,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},k=e=>{let r=m(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`field-legend`),r[5]=a,r[6]=c);let l;r[7]===i?l=r[8]:(l=t(`text-strong mb-1.5 text-sm font-medium font-sans`,i),r[7]=i,r[8]=l);let u;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l?(u=/* @__PURE__ */ C(`legend`,{ref:s,"data-slot":c,className:l,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u):u=r[13],u},A=e=>{let t=m(11),r,a,o;t[0]===e?(r=t[1],a=t[2],o=t[3]):({"data-slot":r,ref:o,...a}=e,t[0]=e,t[1]=r,t[2]=a,t[3]=o);let c=y(s),l;t[4]===r?l=t[5]:(l=n(r,`field-label`),t[4]=r,t[5]=l);let u=c?.controlId,d;return t[6]!==a||t[7]!==o||t[8]!==l||t[9]!==u?(d=/* @__PURE__ */ C(i,{ref:o,"data-slot":l,...a,htmlFor:u}),t[6]=a,t[7]=o,t[8]=l,t[9]=u,t[10]=d):d=t[10],d},j=e=>{let r=m(16),i,a,s,c,l;r[0]===e?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5]):({"data-slot":s,asChild:i,className:a,ref:l,...c}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l);let u=i?o:`p`,d;r[6]===s?d=r[7]:(d=n(s,`field-label-text`),r[6]=s,r[7]=d);let f;r[8]===a?f=r[9]:(f=t(`text-strong text-sm font-medium font-sans`,a),r[8]=a,r[9]=f);let p;return r[10]!==u||r[11]!==c||r[12]!==l||r[13]!==d||r[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),r[10]=u,r[11]=c,r[12]=l,r[13]=d,r[14]=f,r[15]=p):p=r[15],p},M=e=>{let r=m(16),i,a,s,c,l;r[0]===e?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5]):({"data-slot":s,asChild:i,className:a,ref:l,...c}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l);let u=i?o:`div`,d;r[6]===s?d=r[7]:(d=n(s,`field-label-row`),r[6]=s,r[7]=d);let f;r[8]===a?f=r[9]:(f=t(`flex items-center gap-1`,a),r[8]=a,r[9]=f);let p;return r[10]!==u||r[11]!==c||r[12]!==l||r[13]!==d||r[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),r[10]=u,r[11]=c,r[12]=l,r[13]=d,r[14]=f,r[15]=p):p=r[15],p},N=a.Root,P=/* @__PURE__ */ C(w,{}),F=e=>{let i=m(28),o,s,c,l,u,d,f,p,h,g;i[0]===e?(o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],h=i[9],g=i[10]):({appearance:d,className:o,"data-slot":s,icon:f,intent:p,label:c,ref:u,size:h,type:g,...l}=e,i[0]=e,i[1]=o,i[2]=s,i[3]=c,i[4]=l,i[5]=u,i[6]=d,i[7]=f,i[8]=p,i[9]=h,i[10]=g);let _=d===void 0?`ghost`:d,v=f===void 0?P:f,y=p===void 0?`neutral`:p,b=h===void 0?`xs`:h,x=g===void 0?`button`:g,S;i[11]===s?S=i[12]:(S=n(s,`field-help-trigger`),i[11]=s,i[12]=S);let w;i[13]===o?w=i[14]:(w=t(`text-body -my-0.5`,o),i[13]=o,i[14]=w);let T;i[15]!==_||i[16]!==v||i[17]!==y||i[18]!==c||i[19]!==l||i[20]!==u||i[21]!==b||i[22]!==w||i[23]!==x?(T=/* @__PURE__ */ C(r,{ref:u,appearance:_,className:w,icon:v,intent:y,label:c,size:b,type:x,...l}),i[15]=_,i[16]=v,i[17]=y,i[18]=c,i[19]=l,i[20]=u,i[21]=b,i[22]=w,i[23]=x,i[24]=T):T=i[24];let E;return i[25]!==S||i[26]!==T?(E=/* @__PURE__ */ C(a.Trigger,{asChild:!0,"data-slot":S,children:T}),i[25]=S,i[26]=T,i[27]=E):E=i[27],E},I=e=>{let t=m(10),r,i,o;t[0]===e?(r=t[1],i=t[2],o=t[3]):({"data-slot":r,ref:o,...i}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=o);let s;t[4]===r?s=t[5]:(s=n(r,`field-help-content`),t[4]=r,t[5]=s);let c;return t[6]!==i||t[7]!==o||t[8]!==s?(c=/* @__PURE__ */ C(a.Content,{ref:o,"data-slot":s,...i}),t[6]=i,t[7]=o,t[8]=s,t[9]=c):c=t[9],c},L=e=>{let r=m(18),i,a,s,c,l,u;r[0]===e?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5],u=r[6]):({"data-slot":c,asChild:i,children:a,className:s,ref:u,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l,r[6]=u);let d=i?o:`span`,f;r[7]===c?f=r[8]:(f=n(c,`field-optional`),r[7]=c,r[8]=f);let p;r[9]===s?p=r[10]:(p=t(`text-muted text-sm font-normal font-sans`,s),r[9]=s,r[10]=p);let h=a??`(Optional)`,g;return r[11]!==d||r[12]!==l||r[13]!==u||r[14]!==f||r[15]!==p||r[16]!==h?(g=/* @__PURE__ */ C(d,{ref:u,"data-slot":f,className:p,...l,children:h}),r[11]=d,r[12]=l,r[13]=u,r[14]=f,r[15]=p,r[16]=h,r[17]=g):g=r[17],g},R=e=>{let r=m(16),i,a,s,c,l;r[0]===e?(i=r[1],a=r[2],s=r[3],c=r[4],l=r[5]):({"data-slot":s,asChild:i,className:a,ref:l,...c}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=s,r[4]=c,r[5]=l);let u=i?o:`div`,d;r[6]===s?d=r[7]:(d=n(s,`field-group`),r[6]=s,r[7]=d);let f;r[8]===a?f=r[9]:(f=t(`flex w-full flex-col gap-4`,a),r[8]=a,r[9]=f);let p;return r[10]!==u||r[11]!==c||r[12]!==l||r[13]!==d||r[14]!==f?(p=/* @__PURE__ */ C(u,{ref:l,"data-slot":d,className:f,...c}),r[10]=u,r[11]=c,r[12]=l,r[13]=d,r[14]=f,r[15]=p):p=r[15],p},z=e=>{let r=m(37),i,a,c,l,d,f,h,g,_;r[0]===e?(i=r[1],a=r[2],c=r[3],l=r[4],d=r[5],f=r[6],h=r[7],g=r[8],_=r[9]):({"data-slot":l,asChild:i,children:a,className:c,id:d,name:f,ref:g,validation:_,...h}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=c,r[4]=l,r[5]=d,r[6]=f,r[7]=h,r[8]=g,r[9]=_);let v=i?o:`div`,y=b(),S=d??y,w=b(),T=b(),[E,D]=x(!1),O=_??(E?`error`:void 0),k;r[10]===O?k=r[11]:(k=u(O),r[10]=O,r[11]=k);let A=k,j;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(j=()=>(D(!0),()=>{D(!1)}),r[12]=j):j=r[12];let M=j,N;r[13]!==S||r[14]!==w||r[15]!==T||r[16]!==f||r[17]!==A?(N={controlId:S,descriptionId:w,errorId:T,name:f,registerError:M,validation:A},r[13]=S,r[14]=w,r[15]=T,r[16]=f,r[17]=A,r[18]=N):N=r[18];let P=N,F;r[19]===l?F=r[20]:(F=n(l,`field-item`),r[19]=l,r[20]=F);let I;r[21]===c?I=r[22]:(I=t(`flex w-full flex-col gap-1.5`,c),r[21]=c,r[22]=I);let L;r[23]!==v||r[24]!==a||r[25]!==h||r[26]!==g||r[27]!==F||r[28]!==I||r[29]!==A?(L=/* @__PURE__ */ C(v,{ref:g,"data-slot":F,"data-validation":A,className:I,...h,children:a}),r[23]=v,r[24]=a,r[25]=h,r[26]=g,r[27]=F,r[28]=I,r[29]=A,r[30]=L):L=r[30];let R;r[31]!==L||r[32]!==A?(R=/* @__PURE__ */ C(p,{validation:A,children:L}),r[31]=L,r[32]=A,r[33]=R):R=r[33];let z;return r[34]!==P||r[35]!==R?(z=/* @__PURE__ */ C(s.Provider,{value:P,children:R}),r[34]=P,r[35]=R,r[36]=z):z=r[36],z},B=e=>{let t=m(30),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=y(s),u,d,f,h,g,b,x,w,T;if(t[4]!==n||t[5]!==a||t[6]!==r||t[7]!==i){T=Symbol.for(`react.early_return_sentinel`);bb0:{let e=c({context:a});if(typeof n==`function`){T=/* @__PURE__ */ C(p,{validation:e.validation,children:/* @__PURE__ */ C(l.Provider,{value:a?e.ariaProps:null,children:n(e.ariaProps)})});break bb0}S(v(n),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),f=p,w=e.validation,d=l.Provider,x=a?e.ariaProps:null,u=o,h=i,g=r,b=_(n,e.ariaProps)}t[4]=n,t[5]=a,t[6]=r,t[7]=i,t[8]=u,t[9]=d,t[10]=f,t[11]=h,t[12]=g,t[13]=b,t[14]=x,t[15]=w,t[16]=T}else u=t[8],d=t[9],f=t[10],h=t[11],g=t[12],b=t[13],x=t[14],w=t[15],T=t[16];if(T!==Symbol.for(`react.early_return_sentinel`))return T;let E;t[17]!==u||t[18]!==h||t[19]!==g||t[20]!==b?(E=/* @__PURE__ */ C(u,{ref:h,...g,children:b}),t[17]=u,t[18]=h,t[19]=g,t[20]=b,t[21]=E):E=t[21];let D;t[22]!==d||t[23]!==x||t[24]!==E?(D=/* @__PURE__ */ C(d,{value:x,children:E}),t[22]=d,t[23]=x,t[24]=E,t[25]=D):D=t[25];let O;return t[26]!==f||t[27]!==w||t[28]!==D?(O=/* @__PURE__ */ C(f,{validation:w,children:D}),t[26]=f,t[27]=w,t[28]=D,t[29]=O):O=t[29],O},V=e=>{let r=m(17),i,a,c,l,u;r[0]===e?(i=r[1],a=r[2],c=r[3],l=r[4],u=r[5]):({"data-slot":c,asChild:i,className:a,ref:u,...l}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=c,r[4]=l,r[5]=u);let d=i?o:`p`,f=y(s),p;r[6]===c?p=r[7]:(p=n(c,`field-description`),r[6]=c,r[7]=p);let h=f?.descriptionId,g;r[8]===a?g=r[9]:(g=t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,a),r[8]=a,r[9]=g);let _;return r[10]!==d||r[11]!==l||r[12]!==u||r[13]!==p||r[14]!==h||r[15]!==g?(_=/* @__PURE__ */ C(d,{ref:u,"data-slot":p,id:h,className:g,...l}),r[10]=d,r[11]=l,r[12]=u,r[13]=p,r[14]=h,r[15]=g,r[16]=_):_=r[16],_},H=e=>{let r=m(16),i,a,o,s,c;if(r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c),!E(i))return null;let l;r[6]===o?l=r[7]:(l=n(o,`field-error`),r[6]=o,r[7]=l);let u;r[8]===a?u=r[9]:(u=t(`text-danger-600 text-sm leading-4`,a),r[8]=a,r[9]=u);let d;return r[10]!==i||r[11]!==s||r[12]!==c||r[13]!==l||r[14]!==u?(d=/* @__PURE__ */ C(`li`,{ref:c,"data-slot":l,className:u,...s,children:i}),r[10]=i,r[11]=s,r[12]=c,r[13]=l,r[14]=u,r[15]=d):d=r[15],d},U=e=>{let t=m(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({messages:n,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=T(n).map(K),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==i||t[8]!==a?(o=/* @__PURE__ */ C(W,{ref:i,...r,children:a}),t[6]=r,t[7]=i,t[8]=a,t[9]=o):o=t[9],o},W=r=>{let i=m(25),a,c,l,u,d,f;i[0]===r?(a=i[1],c=i[2],l=i[3],u=i[4],d=i[5],f=i[6]):({"data-slot":u,asChild:a,children:c,className:l,ref:f,...d}=r,i[0]=r,i[1]=a,i[2]=c,i[3]=l,i[4]=u,i[5]=d,i[6]=f);let p;i[7]===c?p=i[8]:(p=D({children:c,errorItemType:H}),i[7]=c,i[8]=p);let h=p,g=y(s),_=g?.registerError,v,b;if(i[9]!==h||i[10]!==_?(v=()=>{if(h&&_!=null)return _()},b=[h,_],i[9]=h,i[10]=_,i[11]=v,i[12]=b):(v=i[11],b=i[12]),e(v,b),!h)return null;let x=a?o:`ul`,S;i[13]===u?S=i[14]:(S=n(u,`field-error-list`),i[13]=u,i[14]=S);let w=g?.errorId,T;i[15]===l?T=i[16]:(T=t(`m-0 flex w-full flex-col list-none p-0`,l),i[15]=l,i[16]=T);let E;return i[17]!==x||i[18]!==c||i[19]!==d||i[20]!==f||i[21]!==S||i[22]!==w||i[23]!==T?(E=/* @__PURE__ */ C(x,{ref:f,"data-slot":S,id:w,role:`list`,className:T,...d,children:c}),i[17]=x,i[18]=c,i[19]=d,i[20]=f,i[21]=S,i[22]=w,i[23]=T,i[24]=E):E=i[24],E},G={Item:z,Control:B,Group:R,Set:O,Legend:k,Label:A,LabelText:j,LabelRow:M,Help:N,HelpTrigger:F,HelpContent:I,Optional:L,Description:V,Errors:U,ErrorList:W,ErrorItem:H};function K(e){return/* @__PURE__ */ C(H,{children:e},e)}const q=e=>T(e?.map(e=>typeof e==`string`||!e?e:e.message));export{G as Field,d as isAriaInvalid,f as parseValidation,u as resolveValidation,q as toErrorMessages};
1
+ import*as e from"./field-parts.js";import{r as t}from"./field-DRHAcM1s.js";import{n,r,t as i}from"./field-BRYypbjO.js";const a=e=>t(e?.map(e=>typeof e==`string`||!e?e:e.message));export{e as Field,i as isAriaInvalid,n as parseValidation,r as resolveValidation,a as toErrorMessages};
package/dist/flag.d.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  *
4
4
  * @see https://mantle.ngrok.com/components/data-display/flag
5
5
  */
6
- import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
7
6
  import { ComponentProps } from "react";
7
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
8
8
  /** All valid values for a flag
9
9
  * @see https://www.flagpack.xyz/docs/flag-index
10
10
  */
package/dist/flag.js CHANGED
@@ -1 +1 @@
1
- "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{c as n}from"react/compiler-runtime";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";const o=a(``,{variants:{size:{s:`rounded-[0.0625rem]`,m:`rounded-[0.09375rem]`,l:`rounded-xs`}}}),s=a(``,{variants:{size:{s:`w-4 h-3`,m:`w-5 h-3.75`,l:`w-8 h-6`}}});function c(a){let c=n(31),l,u,d,f,p,m;c[0]===a?(l=c[1],u=c[2],d=c[3],f=c[4],p=c[5],m=c[6]):({"data-slot":d,className:l,code:u,size:p,loading:m,...f}=a,c[0]=a,c[1]=l,c[2]=u,c[3]=d,c[4]=f,c[5]=p,c[6]=m);let h=p===void 0?`l`:p,g=m===void 0?`lazy`:m,_,v,y,b,x;if(c[7]!==l||c[8]!==d||c[9]!==f||c[10]!==h){let n=o({size:h}),r=s({size:h});c[16]===d?y=c[17]:(y=t(d,`flag`),c[16]=d,c[17]=y),b=e(`flag relative overflow-hidden`,n,r,l),x=f,_=!0,v=e(`absolute inset-0 border border-[#000]/10`,n),c[7]=l,c[8]=d,c[9]=f,c[10]=h,c[11]=_,c[12]=v,c[13]=y,c[14]=b,c[15]=x}else _=c[11],v=c[12],y=c[13],b=c[14],x=c[15];let S;c[18]!==_||c[19]!==v?(S=/* @__PURE__ */ r(`div`,{"aria-hidden":_,className:v}),c[18]=_,c[19]=v,c[20]=S):S=c[20];let C=`https://assets.ngrok.com/flags/${h}/${u}.svg`,w=`flag for ${u}`,T;c[21]!==g||c[22]!==w||c[23]!==C?(T=/* @__PURE__ */ r(`img`,{className:`h-full w-full block object-cover`,src:C,alt:w,loading:g}),c[21]=g,c[22]=w,c[23]=C,c[24]=T):T=c[24];let E;return c[25]!==T||c[26]!==y||c[27]!==b||c[28]!==x||c[29]!==S?(E=/* @__PURE__ */ i(`div`,{"data-slot":y,className:b,...x,children:[S,T]}),c[25]=T,c[26]=y,c[27]=b,c[28]=x,c[29]=S,c[30]=E):E=c[30],E}const l=/* @__PURE__ */ `004.008.010.016.020.024.028.031.032.040.044.048.050.051.052.056.060.064.068.070.072.074.076.084.086.090.092.096.100.104.108.112.116.120.124.132.136.140.144.148.152.156.158.162.166.170.174.178.180.184.188.191.192.196.203.204.208.212.214.218.222.226.231.232.233.234.238.239.242.246.248.250.254.258.260.262.266.268.270.275.276.288.292.296.300.304.308.312.316.320.324.328.332.334.336.340.344.348.352.356.360.364.368.372.376.380.384.388.392.398.400.404.408.410.414.417.418.422.426.428.430.434.438.440.442.446.450.454.458.462.466.470.474.478.480.484.492.496.498.499.500.504.508.512.516.520.524.528.531.533.534.540.548.554.558.562.566.570.574.578.580.581.583.584.585.586.591.598.600.604.608.612.616.620.624.626.630.634.638.642.643.646.652.654.659.660.662.663.666.670.674.678.682.686.688.690.694.702.703.704.705.706.710.716.724.728.729.732.740.744.748.752.756.760.762.764.768.772.776.780.784.788.792.795.796.798.800.804.807.818.831.832.833.834.836.840.850.854.858.860.862.876.882.887.894.ABW.AD.AE.AF.AFG.AFRUN.AG.AGO.AI.AIA.AL.ALA.ALB.AM.AMS.AND.AO.AQ.AR.ARE.ARG.ARM.AS.ASM.AT.ATA.ATF.ATG.AU.AUS.AUT.AW.AX.AZ.AZE.BA.BB.BD.BDI.BE.BEL.BEN.BF.BFA.BG.BGD.BGR.BH.BHR.BHS.BI.BIH.BJ.BL.BLM.BLR.BLZ.BM.BMU.BN.BO.BOL.BQ-BO.BQ-SA.BQ-SE.BR.BRA.BRB.BRN.BS.BT.BTN.BV.BVT.BW.BWA.BY.BZ.CA.CAF.CAN.CC.CCK.CD.CF.CG.CH.CHE.CHL.CHN.CI.CIV.CK.CL.CM.CMR.CN.CO.COD.COG.COK.COL.COM.CPV.CR.CRI.CU.CUB.CUW.CV.CW.CX.CXR.CY.CYM.CYP.CZ.CZE.DE.DEU.DJ.DJI.DK.DM.DMA.DNK.DO.DOM.EC.ECU.EE.EG.EGY.EH.ER.ERI.ES.ESH.ESP.EST.ET.ETH.EU.FI.FIN.FJ.FJI.FK.FLK.FM.FO.FR.FRA.FRO.FSM.GA.GAB.GB-ENG.GB-NIR.GB-SCT.GB-UKM.GB-WLS.GB.GBR.GD.GE.GEO.GF.GG.GGY.GH.GHA.GI.GIB.GIN.GL.GLP.GM.GMB.GN.GNB.GNQ.GP.GQ.GR.GRC.GRD.GRL.GS.GT.GTM.GU.GUF.GUM.GUY.GW.GY.HK.HKG.HM.HMD.HN.HND.HR.HRV.HT.HTI.HU.HUN.ID.IDN.IE.IL.IM.IMN.IN.IND.IO.IOT.IQ.IR.IRL.IRN.IRQ.IS.ISL.ISR.IT.ITA.JAM.JE.JEY.JM.JO.JOR.JP.JPN.KAZ.KE.KEN.KG.KGZ.KH.KHM.KI.KIR.KM.KN-SK.KNA.KOR.KP.KR.KW.KWT.KY.KZ.LA.LAO.LB.LBN.LBR.LBY.LC.LCA.LI.LIE.LK.LKA.LR.LS.LSO.LT.LTU.LU.LUX.LV.LVA.LY.MA.MAC.MAF.MAR.MC.MCO.MD.MDA.MDG.MDV.ME.MEX.MF.MG.MH.MHL.MK.MKD.ML.MLI.MLT.MM.MMR.MN.MNE.MNG.MNP.MO.MOZ.MP.MQ.MR.MRT.MS.MSR.MT.MTQ.MU.MUS.MV.MW.MWI.MX.MY.MYS.MZ.NA.NAM.NC.NCL.NE.NER.NF.NFK.NG.NGA.NI.NIC.NIU.NL.NLD.NO.NOR.NP.NPL.NR.NRU.NU.NZ.NZL.OM.OMN.PA.PAK.PAN.PCN.PE.PER.PF.PG.PH.PHL.PK.PL.PLW.PM.PN.PNG.POL.PR.PRI.PRK.PRT.PRY.PS.PSE.PT.PW.PY.PYF.QA.QAT.RAINBOW.RE.REU.RO.ROU.RS.RU.RUS.RW.RWA.SA.SAU.SB.SC.SD.SDN.SE.SEN.SG.SGP.SGS.SH.SHN.SI.SJ.SJM.SK.SL.SLB.SLE.SLV.SM.SMR.SN.SO.SOM.SPM.SR.SRB.SS.SSD.ST.STP.SUR.SV.SVK.SVN.SWE.SWZ.SX.SXM.SY.SYC.SYR.SZ.TC.TCA.TCD.TD.TF.TG.TGO.TH.THA.TJ.TJK.TK.TKL.TKM.TL.TLS.TM.TN.TO.TON.TR.TT.TTO.TUN.TUR.TUV.TV.TW.TWN.TZ.TZA.UA.UG.UGA.UKR.UM.UMI.UNASUR.URY.US.USA.UY.UZ.UZB.VA.VAT.VC.VCT.VE.VEN.VG.VGB.VI.VIR.VN.VNM.VU.VUT.WF.WLF.WS.WSM.YE.YEM.ZA.ZAF.ZM.ZMB.ZW.ZWE`.split(`.`),u=new Set(l);function d(e){return typeof e==`string`&&u.has(e)}export{c as Flag,l as countryCodes,d as isCountryCode};
1
+ import{cva as e}from"class-variance-authority";import{n as t,t as n}from"./cx-CfAFHj5_.js";import{t as r}from"./utils-EM6s2WEU.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=e(``,{variants:{size:{s:`rounded-[0.0625rem]`,m:`rounded-[0.09375rem]`,l:`rounded-xs`}}}),s=e(``,{variants:{size:{s:`w-4 h-3`,m:`w-5 h-3.75`,l:`w-8 h-6`}}});function c({"data-slot":e,className:c,code:l,size:u=`l`,loading:d=`lazy`,...f}){let p=o({size:u}),m=s({size:u});return/* @__PURE__ */ a(`div`,{"data-slot":r(e,`flag`),className:n(`flag relative overflow-hidden`,p,m,c),...f,children:[/* @__PURE__ */ i(`div`,{"aria-hidden":!0,className:t(`absolute inset-0 border border-[#000]/10`,p)}),/* @__PURE__ */ i(`img`,{className:`h-full w-full block object-cover`,src:`https://assets.ngrok.com/flags/${u}/${l}.svg`,alt:`flag for ${l}`,loading:d})]})}const l=/* @__PURE__ */ `004.008.010.016.020.024.028.031.032.040.044.048.050.051.052.056.060.064.068.070.072.074.076.084.086.090.092.096.100.104.108.112.116.120.124.132.136.140.144.148.152.156.158.162.166.170.174.178.180.184.188.191.192.196.203.204.208.212.214.218.222.226.231.232.233.234.238.239.242.246.248.250.254.258.260.262.266.268.270.275.276.288.292.296.300.304.308.312.316.320.324.328.332.334.336.340.344.348.352.356.360.364.368.372.376.380.384.388.392.398.400.404.408.410.414.417.418.422.426.428.430.434.438.440.442.446.450.454.458.462.466.470.474.478.480.484.492.496.498.499.500.504.508.512.516.520.524.528.531.533.534.540.548.554.558.562.566.570.574.578.580.581.583.584.585.586.591.598.600.604.608.612.616.620.624.626.630.634.638.642.643.646.652.654.659.660.662.663.666.670.674.678.682.686.688.690.694.702.703.704.705.706.710.716.724.728.729.732.740.744.748.752.756.760.762.764.768.772.776.780.784.788.792.795.796.798.800.804.807.818.831.832.833.834.836.840.850.854.858.860.862.876.882.887.894.ABW.AD.AE.AF.AFG.AFRUN.AG.AGO.AI.AIA.AL.ALA.ALB.AM.AMS.AND.AO.AQ.AR.ARE.ARG.ARM.AS.ASM.AT.ATA.ATF.ATG.AU.AUS.AUT.AW.AX.AZ.AZE.BA.BB.BD.BDI.BE.BEL.BEN.BF.BFA.BG.BGD.BGR.BH.BHR.BHS.BI.BIH.BJ.BL.BLM.BLR.BLZ.BM.BMU.BN.BO.BOL.BQ-BO.BQ-SA.BQ-SE.BR.BRA.BRB.BRN.BS.BT.BTN.BV.BVT.BW.BWA.BY.BZ.CA.CAF.CAN.CC.CCK.CD.CF.CG.CH.CHE.CHL.CHN.CI.CIV.CK.CL.CM.CMR.CN.CO.COD.COG.COK.COL.COM.CPV.CR.CRI.CU.CUB.CUW.CV.CW.CX.CXR.CY.CYM.CYP.CZ.CZE.DE.DEU.DJ.DJI.DK.DM.DMA.DNK.DO.DOM.EC.ECU.EE.EG.EGY.EH.ER.ERI.ES.ESH.ESP.EST.ET.ETH.EU.FI.FIN.FJ.FJI.FK.FLK.FM.FO.FR.FRA.FRO.FSM.GA.GAB.GB-ENG.GB-NIR.GB-SCT.GB-UKM.GB-WLS.GB.GBR.GD.GE.GEO.GF.GG.GGY.GH.GHA.GI.GIB.GIN.GL.GLP.GM.GMB.GN.GNB.GNQ.GP.GQ.GR.GRC.GRD.GRL.GS.GT.GTM.GU.GUF.GUM.GUY.GW.GY.HK.HKG.HM.HMD.HN.HND.HR.HRV.HT.HTI.HU.HUN.ID.IDN.IE.IL.IM.IMN.IN.IND.IO.IOT.IQ.IR.IRL.IRN.IRQ.IS.ISL.ISR.IT.ITA.JAM.JE.JEY.JM.JO.JOR.JP.JPN.KAZ.KE.KEN.KG.KGZ.KH.KHM.KI.KIR.KM.KN-SK.KNA.KOR.KP.KR.KW.KWT.KY.KZ.LA.LAO.LB.LBN.LBR.LBY.LC.LCA.LI.LIE.LK.LKA.LR.LS.LSO.LT.LTU.LU.LUX.LV.LVA.LY.MA.MAC.MAF.MAR.MC.MCO.MD.MDA.MDG.MDV.ME.MEX.MF.MG.MH.MHL.MK.MKD.ML.MLI.MLT.MM.MMR.MN.MNE.MNG.MNP.MO.MOZ.MP.MQ.MR.MRT.MS.MSR.MT.MTQ.MU.MUS.MV.MW.MWI.MX.MY.MYS.MZ.NA.NAM.NC.NCL.NE.NER.NF.NFK.NG.NGA.NI.NIC.NIU.NL.NLD.NO.NOR.NP.NPL.NR.NRU.NU.NZ.NZL.OM.OMN.PA.PAK.PAN.PCN.PE.PER.PF.PG.PH.PHL.PK.PL.PLW.PM.PN.PNG.POL.PR.PRI.PRK.PRT.PRY.PS.PSE.PT.PW.PY.PYF.QA.QAT.RAINBOW.RE.REU.RO.ROU.RS.RU.RUS.RW.RWA.SA.SAU.SB.SC.SD.SDN.SE.SEN.SG.SGP.SGS.SH.SHN.SI.SJ.SJM.SK.SL.SLB.SLE.SLV.SM.SMR.SN.SO.SOM.SPM.SR.SRB.SS.SSD.ST.STP.SUR.SV.SVK.SVN.SWE.SWZ.SX.SXM.SY.SYC.SYR.SZ.TC.TCA.TCD.TD.TF.TG.TGO.TH.THA.TJ.TJK.TK.TKL.TKM.TL.TLS.TM.TN.TO.TON.TR.TT.TTO.TUN.TUR.TUV.TV.TW.TWN.TZ.TZA.UA.UG.UGA.UKR.UM.UMI.UNASUR.URY.US.USA.UY.UZ.UZB.VA.VAT.VC.VCT.VE.VEN.VG.VGB.VI.VIR.VN.VNM.VU.VUT.WF.WLF.WS.WSM.YE.YEM.ZA.ZAF.ZM.ZMB.ZW.ZWE`.split(`.`),u=new Set(l);function d(e){return typeof e==`string`&&u.has(e)}export{c as Flag,l as countryCodes,d as isCountryCode};
@@ -0,0 +1 @@
1
+ const e={top:`bottom`,right:`left`,bottom:`top`,left:`right`};function t(e,t,n){return{top:e.top,bottom:n.height-e.bottom,left:e.left,right:n.width-e.right}[t]}function n({anchor:e,side:t,sideOffset:n,size:r,viewport:i}){switch(t){case`top`:return e.top-n-r.height>=8;case`bottom`:return e.bottom+n+r.height<=i.height-8;case`left`:return e.left-n-r.width>=8;case`right`:return e.right+n+r.width<=i.width-8}}function r({align:e,end:t,length:n,start:r,viewportLength:i}){let a={start:r,center:r+(t-r-n)/2,end:t-n}[e],o=i-8-n;return Math.max(8,Math.min(a,o))}function i({align:i,anchor:a,side:o,sideOffset:s,size:c,viewport:l}){let u=e[o],d=!n({anchor:a,side:o,sideOffset:s,size:c,viewport:l})&&(n({anchor:a,side:u,sideOffset:s,size:c,viewport:l})||t(a,u,l)>t(a,o,l))?u:o;return d===`top`||d===`bottom`?{side:d,x:r({align:i,start:a.left,end:a.right,length:c.width,viewportLength:l.width}),y:d===`top`?a.top-s-c.height:a.bottom+s}:{side:d,x:d===`left`?a.left-s-c.width:a.right+s,y:r({align:i,start:a.top,end:a.bottom,length:c.height,viewportLength:l.height})}}const a={top:{edge:`bottom`,origin:``,transform:`translateY(100%)`},right:{edge:`left`,origin:`0 0`,transform:`translateY(50%) rotate(90deg) translateX(-50%)`},bottom:{edge:`top`,origin:`center 0`,transform:`rotate(180deg)`},left:{edge:`right`,origin:`100% 0`,transform:`translateY(50%) rotate(-90deg) translateX(50%)`}},o={start:`end`,end:`start`},s=[`transform`,`scale`,`translate`,`rotate`,`filter`,`perspective`,`backdrop-filter`,`-webkit-backdrop-filter`];function c(e){for(let t=e.parentElement;t!=null;t=t.parentElement){let e=getComputedStyle(t);if(s.some(t=>![``,`none`].includes(e.getPropertyValue(t)))||/paint|layout|strict|content/.test(e.getPropertyValue(`contain`))||/transform|filter|perspective/.test(e.getPropertyValue(`will-change`)))return t}return null}function l(e,t,n){let r=e.getBoundingClientRect(),i=e.offsetWidth===0?1:r.width/e.offsetWidth,a=e.offsetHeight===0?1:r.height/e.offsetHeight;return{x:(t-r.left)/i-e.clientLeft+e.scrollLeft,y:(n-r.top)/a-e.clientTop+e.scrollTop}}function u(e){if(typeof e.currentCSSZoom==`number`)return e.currentCSSZoom;let t=1;for(let n=e;n!=null;n=n.parentElement)t*=Number.parseFloat(getComputedStyle(n).zoom)||1;return t}const d=e=>`${e.left} ${e.top} ${e.width} ${e.height} ${document.documentElement.clientWidth} ${document.documentElement.clientHeight}`;function f(e,t){if(typeof IntersectionObserver>`u`||typeof ResizeObserver>`u`)return()=>{};let n,r=!1,i=(a=1)=>{n?.disconnect();let{left:o,top:s,width:c,height:l}=e.getBoundingClientRect();if(c===0||l===0)return;let u=document.documentElement,d=[s,u.clientWidth-o-c,u.clientHeight-s-l,o].map(e=>`${-Math.floor(e)}px`),f=!0;n=new IntersectionObserver(([e])=>{if(r)return;let n=e?.intersectionRatio??a;f?(f=!1,n!==a&&(t(),i(n))):(t(),i())},{rootMargin:d.join(` `),threshold:a}),n.observe(e)},a=new ResizeObserver(()=>{r||(t(),i())});return a.observe(e),()=>{r=!0,a.disconnect(),n?.disconnect()}}function p({align:e,anchor:t,dir:n,floating:r,side:s,sideOffset:p}){let m=(s===`top`||s===`bottom`)&&e!==`center`&&(n??getComputedStyle(t).direction)===`rtl`?o[e]:e,h=r.querySelector(`:scope > [data-float-arrow]`);r.style.inset=`auto`;let g=`togglePopover`in HTMLElement.prototype,_=(s===`top`||s===`bottom`)&&getComputedStyle(r).overflowY!==`visible`,v=``,y=!1,b=()=>{y=!1;let e=p+(h?.offsetHeight??0),n=t.getBoundingClientRect();v=d(n);let o=u(r),f={top:n.top/o,right:n.right/o,bottom:n.bottom/o,left:n.left/o,width:n.width/o,height:n.height/o};r.style.setProperty(`--anchor-width`,`${f.width}px`),r.style.setProperty(`--anchor-height`,`${f.height}px`);let b=r.offsetWidth,x=r.offsetHeight,S=_?r.scrollHeight+x-r.clientHeight:x,C={width:document.documentElement.clientWidth/o,height:document.documentElement.clientHeight/o},w=i({align:m,anchor:f,side:s,sideOffset:e,size:{width:b,height:S},viewport:C}),T={top:f.top-e,bottom:C.height-f.bottom-e,left:C.height,right:C.height}[w.side];r.style.setProperty(`--available-height`,`${Math.max(T-8,0)}px`),w.side===`top`&&(w={...w,y:f.top-e-r.offsetHeight});let E=g?null:c(r),D=E==null?{x:w.x,y:w.y}:l(E,w.x*o,w.y*o);r.style.left=`${D.x}px`,r.style.top=`${D.y}px`;let O=f.left+f.width/2-w.x,k=f.top+f.height/2-w.y;if(r.dataset.side=w.side,r.style.transformOrigin={top:`${O}px 100%`,bottom:`${O}px 0`,left:`100% ${k}px`,right:`0 ${k}px`}[w.side],h!=null){let e=a[w.side],t=w.side===`top`||w.side===`bottom`,n=t?b:x,r=Math.max(0,Math.min((t?O:k)-h.offsetWidth/2,n-h.offsetWidth));h.style.position=`absolute`,h.style.inset=`auto`,h.style.setProperty(e.edge,`0`),h.style.setProperty(t?`left`:`top`,`${r}px`),h.style.transformOrigin=e.origin,h.style.transform=e.transform}};b();let x=0,S=()=>{cancelAnimationFrame(x),x=requestAnimationFrame(()=>{(y||d(t.getBoundingClientRect())!==v)&&b()})},C=typeof ResizeObserver>`u`?void 0:new ResizeObserver(()=>{y=!0,S()});C?.observe(r),h!=null&&C?.observe(h),window.addEventListener(`scroll`,S,{capture:!0,passive:!0}),window.addEventListener(`resize`,S,{passive:!0});let w=f(t,S);return()=>{cancelAnimationFrame(x),C?.disconnect(),w(),window.removeEventListener(`scroll`,S,{capture:!0}),window.removeEventListener(`resize`,S)}}export{p as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./alert-DO00UiQe.js";import{t}from"./cx-CfAFHj5_.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i(t){for(let n of e(t))if(n.focus({preventScroll:!0}),t.ownerDocument.activeElement===n)return;t.focus({preventScroll:!0})}function a({className:e,height:i=7,width:a=14,...o}){return/* @__PURE__ */ n(`span`,{"data-float-arrow":``,className:`block`,children:/* @__PURE__ */ r(`svg`,{"aria-hidden":`true`,className:t(`block`,`fill-(--background-color-popover)`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`filter-[drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,e),height:i,preserveAspectRatio:`none`,viewBox:`0 0 30 10`,width:a,...o,children:[/* @__PURE__ */ n(`polygon`,{points:`0,0 30,0 15,10`}),/* @__PURE__ */ n(`polyline`,{className:`stroke-(--border-color-popover)`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`})]})})}export{i as n,a as t};
@@ -0,0 +1 @@
1
+ "use client";import{useCallback as e,useEffect as t,useInsertionEffect as n,useRef as r,useState as i}from"react";import{t as a}from"./browser-only-ymFoM3Ya.js";import{t as o}from"./hooks-C9b-2wGy.js";import{t as s}from"./hooks-BeLOGKwE.js";import{t as c}from"./hooks-DejuqCNF.js";import{a as l,o as u}from"./layer-container-DDOZJ0fn.js";import{t as d}from"./float-C_vwTtzU.js";const f=`pointer-events-auto fixed z-50 m-0 inset-auto overflow-visible overscroll-none starting:opacity-0 starting:scale-95 not-data-open:opacity-0 not-data-open:scale-95 transition-[opacity,scale,display,overlay] transition-discrete duration-200 ease-out-strong not-data-open:duration-150 motion-reduce:transition-none`,p=a()&&`togglePopover`in HTMLElement.prototype,m=[];function h(e,t){if(!(t instanceof Element)||!e.contains(t))return!1;let n=t.closest(`[data-radix-popper-content-wrapper], [data-mantle-modal-content], [aria-expanded='true'][aria-controls]:is([role='combobox'], [aria-haspopup]:not([aria-haspopup='false']))`);return n!=null&&n!==e&&e.contains(n)}function g(e){let t=m.at(-1);e.key!==`Escape`||t==null||h(t.element,e.target)||t.escape(e)}function _(e){return m.length===0&&window.addEventListener(`keydown`,g,{capture:!0}),m.push(e),()=>{m.splice(m.indexOf(e),1),m.length===0&&window.removeEventListener(`keydown`,g,{capture:!0})}}function v(e){return e==null?document.body:e instanceof Element?e.querySelector(`:scope > [data-mantle-modal-content]`)??e:e}const y=/* @__PURE__ */ new WeakMap;function b(e){return e.querySelector(`:scope > [data-float-arrow]`)}function x(e){return Array.from(e.ownerDocument.querySelectorAll(`dialog[open]`)).some(t=>!t.contains(e)&&t.matches(`:modal`))}function S({align:a,dir:f,dismissOnOutside:m,dismissWhenCovered:h,getAnchor:g,getInsideElements:S,onDismiss:C,onEscapeKeyDown:w,onFocusOutside:T,onHide:E,onInteractOutside:D,onPointerDownOutside:O,onShow:k,open:A,side:j,sideOffset:M}){let N=u(),P=s(),F=r(null),I=l(N,F),[L,R]=i(A);A&&!L&&R(!0);let z=o(C),B=o(w),V=o(O),H=o(T),U=o(D),W=r(k),G=r(E);n(()=>{W.current=k,G.current=E});let K=o(g),q=o(S);t(()=>{if(A||!L)return;let e=setTimeout(()=>R(!1),150);return()=>clearTimeout(e)},[A,L]),t(()=>{A&&I&&h&&z(`covered`)},[I,z,h,A]);let J=A&&!I,Y=r(null),X=r(null),Z=()=>{let e=K();if(e==null)return;let t=Y.current;t==null?X.current?.():(e!==t.anchor||b(t.floating)!==t.arrow||t.rtl!=null&&getComputedStyle(e).direction===`rtl`!==t.rtl)&&t.retrack(e)};c(Z);let Q=o(Z);t(Z);let $=e((e,t)=>{if(p&&x(e)){h&&z(`covered`);return}let n=f==null&&a!==`center`&&(j===`top`||j===`bottom`),r=!0,i=!1,o=(e,t)=>{i||(i=!0,z(e,t))},s=e=>{r&&Reflect.get(e,`newState`)===`closed`&&(r=!1,o(`browser`))},c=e=>{B(e),e.defaultPrevented||(e.preventDefault(),o(`escape`))},l=y.get(e),u=l!=null,g;if(l==null){let t={element:e,escape:c};g={entry:t,popEscape:_(t)}}else l.entry.escape=c,g={entry:l.entry,popEscape:l.popEscape};y.set(e,g),e.addEventListener(`beforetoggle`,s),!u&&p&&e.showPopover();let v=t=>d({align:a,anchor:t,dir:f,floating:e,side:j,sideOffset:M}),S=v(t),C={floating:e,anchor:t,arrow:b(e),rtl:n?getComputedStyle(t).direction===`rtl`:null,retrack:t=>{S(),S=v(t),C.anchor=t,C.arrow=b(e),C.rtl=n?getComputedStyle(t).direction===`rtl`:null}};Y.current=C;let w=t=>t instanceof Node&&(e.contains(t)||(q()?.some(e=>e?.contains(t)===!0)??!1)),T=(e,t)=>{let n=e.target;if(n==null||w(n))return null;let r=new CustomEvent(`mantle.float.outside`,{cancelable:!0,detail:{originalEvent:e}});return n.addEventListener(r.type,()=>{t(r),U(r)},{once:!0}),n.dispatchEvent(r),r.defaultPrevented?null:r},E=null,D=!1,O=0,k=e=>{E=null,i=!1;let t=T(e,V);t!=null&&(e.button===0&&!e.ctrlKey?(E={pointerId:e.pointerId,event:t},D=!0,clearTimeout(O),O=window.setTimeout(()=>{D=!1})):o(`outside`,t))},A=e=>{if(E==null||E.pointerId!==e.pointerId)return;let t=E.event;E=null,w(e.target)||o(`outside`,t)},N=e=>{E?.pointerId===e.pointerId&&(E=null)},P=e=>{if(E!=null&&D)return;let t=T(e,H);t!=null&&o(`outside`,t)},I=e.ownerDocument;return m&&(I.addEventListener(`pointerdown`,k),I.addEventListener(`pointerup`,A,{capture:!0}),I.addEventListener(`pointercancel`,N,{capture:!0}),I.addEventListener(`focusin`,P)),u||W.current?.(e),()=>{Y.current=null,I.removeEventListener(`pointerdown`,k),I.removeEventListener(`pointerup`,A,{capture:!0}),I.removeEventListener(`pointercancel`,N,{capture:!0}),clearTimeout(O),I.removeEventListener(`focusin`,P),S(),e.removeEventListener(`beforetoggle`,s);let t=e.contains(I.activeElement);queueMicrotask(()=>{if(y.get(e)!==g)return;y.delete(e),g.popEscape();let n=F.current;n!=null&&n!==e&&y.has(n)?t&&!n.contains(I.activeElement)&&n.focus({preventScroll:!0}):G.current?.(e,t),r&&p&&(r=!1,e.hidePopover())})}},[a,f,z,m,h,B,H,q,U,V,j,M]),ee=e(e=>{if(F.current=e,!J||e==null)return;let t=K();if(t!=null&&e.isConnected)return $(e,t);let n,r=0,i=()=>{let t=K();return X.current!==i||t==null||!e.isConnected?!1:(X.current=null,n=$(e,t),!0)};X.current=i;let a=()=>{X.current===i&&!e.isConnected&&(r=requestAnimationFrame(()=>{i(),a()}))};return a(),()=>{cancelAnimationFrame(r),X.current===i&&(X.current=null),n?.()}},[K,$,J]);return{present:L,portalTarget:L&&P?v(N):null,floatingRef:ee,reconcile:Q}}function C(){let t=r(null),n=r(null);return{triggerRef:t,setTrigger:e(e=>{t.current=e,e!=null&&n.current?.()},[]),onTriggerChangeRef:n}}function w(e,n){t(()=>(e.current=n,()=>{e.current=null}),[e,n])}export{w as a,S as i,p as n,C as o,v as r,f as t};
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./alert-DO00UiQe.js";import{useEffect as t,useLayoutEffect as n}from"react";function r({tabStops:e,current:t,backwards:n}){let r=e[0],i=e[e.length-1];if(r==null||i==null)return null;let a=e.findIndex(e=>e===t);if(a!==-1)return n?a===0?i:null:a===e.length-1?r:null;if(t==null)return n?i:r;if(n){let n=e.filter(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)!==0);return n[n.length-1]??i}return e.find(e=>(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING)!==0)??r}function i(n,{active:i=!0}={}){t(()=>{let t=n.current;if(!i||t==null)return;let a=!t.hasAttribute(`tabindex`);a&&(t.tabIndex=-1);let o=0,s=60,c=()=>{if(t.contains(document.activeElement))return;let[n]=e(t);(n??t).focus(),--s,!t.contains(document.activeElement)&&s>0&&(o=requestAnimationFrame(c))};c();let l=n=>{if(n.key!==`Tab`||n.defaultPrevented||!(n.target instanceof Node)||!t.contains(n.target))return;let i=e(t);if(i.length===0){n.preventDefault();return}let a=r({tabStops:i,current:document.activeElement,backwards:n.shiftKey});a!=null&&(n.preventDefault(),a.focus())};return document.addEventListener(`keydown`,l),()=>{cancelAnimationFrame(o),document.removeEventListener(`keydown`,l),a&&t.removeAttribute(`tabindex`)}},[i,n])}function a(e,{active:t=!0}={}){n(()=>{let n=e.current;if(t&&n!=null)return o(n)},[t,e])}function o(e){let t=e.parentElement;if(t==null)return;let n=/* @__PURE__ */ new Set,r=()=>{for(let r of t.children)r!==e&&r instanceof HTMLElement&&!r.inert&&(r.inert=!0,n.add(r))};r();let i=new MutationObserver(r);return i.observe(t,{childList:!0}),()=>{i.disconnect();for(let e of n)e.inert=!1}}export{i as n,a as t};
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./hooks-C9b-2wGy.js";import{n as t}from"./hooks-CMmpICCH.js";import{t as n}from"./utils-Dxv_GrUU.js";import{useCallback as r,useEffect as i,useMemo as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";function l(e,t){let[n,r]=s(e);return i(()=>{let n=window.setTimeout(()=>{r(e)},t.waitMs);return()=>{window.clearTimeout(n)}},[e,t.waitMs]),n}function u(t,n){let a=e(t),s=o(0);return i(()=>()=>window.clearTimeout(s.current),[]),r((...e)=>{window.clearTimeout(s.current),s.current=window.setTimeout(()=>a(...e),n.waitMs)},[a,n.waitMs])}const d=/* @__PURE__ */ new Map;function f(e){e.key==null?d.clear():d.has(e.key)&&(e.newValue==null?d.delete(e.key):d.set(e.key,e.newValue))}function p(){try{return window.localStorage}catch{return null}}function m(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===p(),i=n.key==null||n.key===e;r&&i&&(f(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function h(){return null}function g(e){let t=d.get(e);if(t!=null)return t;try{return window.localStorage.getItem(e)}catch{return null}}function _(e,t){try{window.localStorage.setItem(e,t),d.delete(e)}catch{d.set(e,t)}}function v(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function y(e,t){let n=a(()=>m(e),[e]),i=c(n,()=>g(e),h);return[i==null?t:v(i,t),r(t=>{let n=JSON.stringify(t);_(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:p()}))},[e])]}const b=/* @__PURE__ */ new Map;function x(e){e.key==null?b.clear():b.has(e.key)&&(e.newValue==null?b.delete(e.key):b.set(e.key,e.newValue))}function S(){try{return window.sessionStorage}catch{return null}}function C(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===S(),i=n.key==null||n.key===e;r&&i&&(x(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function w(){return null}function T(e){let t=b.get(e);if(t!=null)return t;try{return window.sessionStorage.getItem(e)}catch{return null}}function E(e,t){try{window.sessionStorage.setItem(e,t),b.delete(e)}catch{b.set(e,t)}}function D(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function O(e,t){let n=a(()=>C(e),[e]),i=c(n,()=>T(e),w);return[i==null?t:D(i,t),r(t=>{let n=JSON.stringify(t);E(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:S()}))},[e])]}function k({anchorRef:e,key:t}){return r(n=>{if(n==null)return;let r=e.current,i=r!=null&&r.key===t?j(n,r):()=>!1;return()=>{e.current={...i()&&r!=null?r:R(n),key:t}}},[e,t])}const A=[`wheel`,`touchstart`,`pointerdown`,`keydown`];function j(e,t){let n=z(e,t);if(typeof ResizeObserver>`u`)return()=>!1;let r=0,i=!0,a=e.getBoundingClientRect(),o=()=>Math.abs(n.scrollTop-r)>1,s=()=>n===document.scrollingElement?window:n,c=()=>{o()&&f()},l,u=e=>{s().removeEventListener(`scroll`,c),l?.(),n=e;let t=e.style.overflowAnchor;e.style.overflowAnchor=`none`,l=()=>{e.style.overflowAnchor=t},r=e.scrollTop,s().addEventListener(`scroll`,c,{passive:!0})},d=new ResizeObserver(()=>{let n=e.getBoundingClientRect();o()?f():n.width===a.width?n.height!==a.height&&f():u(z(e,t)),a=n}),f=()=>{let e=i&&!o();i=!1,d.disconnect(),s().removeEventListener(`scroll`,c),l?.();for(let e of A)window.removeEventListener(e,f,!0);return e};u(n),d.observe(e);for(let e of A)window.addEventListener(e,f,{capture:!0,passive:!0});return f}function M(e){let t=e;for(;t!=null;){let{overflowY:e}=getComputedStyle(t);if((e===`auto`||e===`scroll`)&&(t.scrollHeight>t.clientHeight||N(t)))return t;t=t.parentElement}return document.scrollingElement instanceof HTMLElement?document.scrollingElement:document.documentElement}function N(e){let t=getComputedStyle(e),n=e.getBoundingClientRect().bottom-Number.parseFloat(t.borderBottomWidth)-Number.parseFloat(t.paddingBottom),r=e.getBoundingClientRect().top+Number.parseFloat(t.borderTopWidth);for(let t of e.childNodes)if(t.nodeType===Node.TEXT_NODE&&t.textContent?.trim()){let e=document.createRange();e.selectNodeContents(t),r=Math.max(r,e.getBoundingClientRect().bottom)}let i=Array.from(e.children).findLast(I);for(;i!=null;)r=Math.max(r,i.getBoundingClientRect().bottom+Number.parseFloat(getComputedStyle(i).marginBottom)),i=Array.from(i.children).findLast(I);return n-r>1}function P(e){return e===document.scrollingElement?0:e.getBoundingClientRect().top}function F(e,t){if(e===t)return{top:P(t)-t.scrollTop,height:t.scrollHeight};let{top:n,height:r}=e.getBoundingClientRect();return{top:n,height:r}}function I(e){let{position:t}=getComputedStyle(e);return t!==`absolute`&&t!==`fixed`&&t!==`sticky`}function L(e){return Array.from(e.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())}function R(e){let t=M(e),n=P(t),r=[],i=e;for(;;){let e=Array.from(i.children),t=e.filter(I),a=t.findIndex(e=>e.getBoundingClientRect().bottom>n),o=t[a];if(o==null)break;let{top:s}=o.getBoundingClientRect();if(s>n&&(a===0||L(i)))break;if(r.push(e.indexOf(o)),i=o,s>n)return{path:r,fraction:0,offset:n-s}}let{top:a,height:o}=F(i,t);return{path:r,fraction:o>0?(n-a)/o:0,offset:0}}function z(e,t){let n=M(e),r=e,{fraction:i,offset:a}=t;for(let e of t.path){let t=r.children[e];if(t==null){i=0,a=0;break}r=t}let{top:o,height:s}=F(r,n);return n.scrollTo({top:n.scrollTop+o+i*s+a-P(n),behavior:`instant`}),n}function B(){let e=t();return a(()=>e?`auto`:`smooth`,[e])}function V(e,{root:t,margin:r,amount:a,once:c=!1,initial:l=!1}={}){let[u,d]=s(l),f=o(l);return i(()=>{let i=e.current;if(i==null||c&&f.current)return;function o(){if(f.current=!0,d(!0),!c)return()=>{f.current=!1,d(!1)}}let s={root:t?.current??void 0,margin:r,amount:a};return n(i,o,s)},[t,e,r,c,a]),u}function H(){let e=o([]),t=o([]),[n,i]=s({undo:0,redo:0}),c=r(n=>{e.current.push(n),t.current=[],i({undo:e.current.length,redo:0})},[]),l=r(n=>{let r=e.current[e.current.length-1];if(r!==void 0)return e.current.pop(),t.current.push(n),i({undo:e.current.length,redo:t.current.length}),r},[]),u=r(n=>{let r=t.current[t.current.length-1];if(r!==void 0)return t.current.pop(),e.current.push(n),i({undo:e.current.length,redo:t.current.length}),r},[]),d=n.undo>0,f=n.redo>0;return a(()=>({canUndo:d,canRedo:f,push:c,undo:l,redo:u}),[d,f,c,l,u])}export{O as a,l as c,k as i,V as n,y as o,B as r,u as s,H as t};
@@ -0,0 +1 @@
1
+ "use client";import{useSyncExternalStore as e}from"react";import{n as t}from"./hooks-CUYIUcp6.js";function n(){return e(g,_,()=>`default`)}function r(t){return e(y(t),x(t),()=>!1)}const i={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},a={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let o=null,s=null;function c(){return o||={"2xl":window.matchMedia(i[`2xl`]),xl:window.matchMedia(i.xl),lg:window.matchMedia(i.lg),md:window.matchMedia(i.md),sm:window.matchMedia(i.sm),xs:window.matchMedia(i.xs),"2xs":window.matchMedia(i[`2xs`])},o}function l(e){return s||={"2xl":window.matchMedia(a[`2xl`]),xl:window.matchMedia(a.xl),lg:window.matchMedia(a.lg),md:window.matchMedia(a.md),sm:window.matchMedia(a.sm),xs:window.matchMedia(a.xs),"2xs":window.matchMedia(a[`2xs`])},s[e]}let u=`default`;const d=/* @__PURE__ */ new Set;let f=!1;function p(){let e=c();for(let n of t)if(e[n].matches)return n;return`default`}let m=!1;function h(){m||(m=!0,requestAnimationFrame(()=>{m=!1;let e=p();if(e!==u){u=e;for(let e of d)e()}}))}function g(e){if(d.add(e),!f){f=!0;let e=c();u=p();for(let t of Object.values(e))t.addEventListener(`change`,h)}return e(),()=>{if(d.delete(e),d.size===0&&f){f=!1;let e=c();for(let t of Object.values(e))t.removeEventListener(`change`,h)}}}function _(){return f||(u=p()),u}const v=/* @__PURE__ */ new Map;function y(e){let t=v.get(e);return t||(t=t=>{let n=l(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},v.set(e,t),t)}const b=/* @__PURE__ */ new Map;function x(e){let t=b.get(e);return t||(t=()=>l(e).matches,b.set(e,t),t)}export{r as n,n as t};
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./utils-Dd83caRw.js";function t(){return e}export{t};
@@ -0,0 +1 @@
1
+ "use client";import{useInsertionEffect as e,useMemo as t,useRef as n}from"react";function r(r){let i=n(r);return e(()=>{i.current=r}),t(()=>((...e)=>i.current?.(...e)),[])}export{r as t};
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./browser-only-ymFoM3Ya.js";import{t}from"./hooks-lDz_S9UG.js";const n=`(prefers-reduced-motion: no-preference)`;function r(){return!e()||!window.matchMedia?.(n).matches}function i(){return!t(n)}export{i as n,r as t};
@@ -0,0 +1 @@
1
+ const e=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],t=[`default`,...e];export{e as n,t};
@@ -0,0 +1 @@
1
+ "use client";import{useSyncExternalStore as e}from"react";import{t}from"./utils-BlLYcYik.js";function n(){return()=>{}}function r(){return!1}function i(){return e(n,t,r)}export{i as t};
@@ -0,0 +1 @@
1
+ "use client";import{useEffect as e,useLayoutEffect as t}from"react";import{t as n}from"./browser-only-ymFoM3Ya.js";const r=n()?t:e;export{r as t};
@@ -0,0 +1 @@
1
+ "use client";import{useEffect as e,useState as t}from"react";function n(){let[n,r]=t(!1);return e(()=>{let e=requestAnimationFrame(()=>{r(!0)});return()=>{cancelAnimationFrame(e)}},[]),n}export{n as t};
@@ -0,0 +1 @@
1
+ "use client";import{useEffect as e,useLayoutEffect as t,useRef as n}from"react";function r({offset:e,size:t,velocity:n,threshold:r,flickVelocity:i}){return e>0&&(e>=t*r||n>=i)}function i(e,t){return t<=0?0:(1-1/(.55*e/t+1))*t}function a(e,t){switch(t){case`right`:return e.clientX;case`left`:return-e.clientX;case`down`:return e.clientY;case`up`:return-e.clientY}}function o(e,t){return t===`left`||t===`right`?e.clientY:e.clientX}function s(e,t){switch(t){case`right`:return`${e}px`;case`left`:return`${-e}px`;case`down`:return`0 ${e}px`;case`up`:return`0 ${-e}px`}}function c(e,t,n){e.property===`flex-basis`?e.target.style.flexBasis=`${e.size-t}px`:e.target.style.translate=s(t,n)}function l(e){e.target.style.removeProperty(`transition`),e.target.style.removeProperty(e.property===`flex-basis`?`flex-basis`:`translate`)}function u(s,u){let d=n(u);t(()=>{d.current=u}),e(()=>{let e=s.current;if(e==null)return;let t=null,n=!1,u=()=>{document.removeEventListener(`pointermove`,f),document.removeEventListener(`pointerup`,p),document.removeEventListener(`pointercancel`,p),t=null},f=e=>{let{direction:n=`right`}=d.current;if(t==null||e.pointerId!==t.pointerId)return;let r=a(e,n),s=r-t.start;if(!t.dragging){let r=Math.abs(o(e,n)-t.crossStart);if(r>=8&&r>Math.abs(s)){u();return}if(Math.abs(s)<8)return;t.dragging=!0,t.target.style.transition=`none`}let l=e.timeStamp-t.lastTime;l>0&&(t.velocity=(r-t.last)/l),t.last=r,t.lastTime=e.timeStamp,t.offset=Math.max(0,s);let f=s>=0?s:-i(-s,t.size);c(t,f,n)},p=e=>{let{onDismiss:i,threshold:a=.25,flickVelocity:o=.4}=d.current;if(t==null||e.pointerId!==t.pointerId)return;let s=t;if(u(),!s.dragging||(n=!0,window.setTimeout(()=>{n=!1},0),l(s),e.type===`pointercancel`))return;let c=e.timeStamp-s.lastTime>100?0:s.velocity;r({...s,velocity:c,threshold:a,flickVelocity:o})&&i()},m=n=>{let{active:r=!0,direction:i=`right`,property:s=`translate`,target:c}=d.current;if(!(typeof r==`function`?r():r)||!n.isPrimary||n.button!==0||t!=null)return;let l=c?.current??e,u=l.getBoundingClientRect(),m=a(n,i);t={target:l,property:typeof s==`function`?s():s,pointerId:n.pointerId,start:m,crossStart:o(n,i),size:i===`left`||i===`right`?u.width:u.height,dragging:!1,last:m,lastTime:n.timeStamp,velocity:0,offset:0},document.addEventListener(`pointermove`,f),document.addEventListener(`pointerup`,p),document.addEventListener(`pointercancel`,p)},h=e=>{n&&(n=!1,e.preventDefault(),e.stopPropagation())};return e.addEventListener(`pointerdown`,m),e.addEventListener(`click`,h,!0),()=>{t?.dragging&&l(t),u(),e.removeEventListener(`pointerdown`,m),e.removeEventListener(`click`,h,!0)}},[s])}export{u as n,i as t};
@@ -0,0 +1 @@
1
+ "use client";import{useCallback as e,useRef as t,useSyncExternalStore as n}from"react";function r(r){let i=t(null),a=e(()=>((i.current==null||i.current.query!==r)&&(i.current={query:r,list:window.matchMedia?.(r)}),i.current.list),[r]),o=e(e=>{let t=a();return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}},[a]),s=e(()=>a()?.matches??!1,[a]);return n(o,s,()=>!1)}export{r as t};
package/dist/hooks.d.ts CHANGED
@@ -345,7 +345,7 @@ type UseInertSiblingsOptions = {
345
345
  *
346
346
  * It reaches siblings only, not the rest of the document, so it fits a
347
347
  * surface that covers one row of a layout in place: a panel that covers the
348
- * card and the rail beside it, with a notice above the row still usable.
348
+ * card and the sidebar beside it, with a notice above the row still usable.
349
349
  * Pair it with `useFocusTrap` to keep keyboard focus inside the element.
350
350
  *
351
351
  * The element must be mounted when `active` turns on; the hook reads the ref
@@ -415,9 +415,9 @@ declare function useIsHydrated(): boolean;
415
415
  * // A persisted-collapsed `open` snaps on load and animates on every later toggle.
416
416
  * return (
417
417
  * <div
418
- * data-state={open ? "expanded" : "collapsed"}
418
+ * data-expanded={open ? "" : undefined}
419
419
  * data-hydrated={isHydrated ? "" : undefined}
420
- * className="w-52 transition-[width] data-[state=collapsed]:w-13 not-data-hydrated:transition-none"
420
+ * className="w-52 transition-[width] not-data-expanded:w-13 not-data-hydrated:transition-none"
421
421
  * />
422
422
  * );
423
423
  * }
@@ -515,7 +515,7 @@ declare function useLocalStorage(key: string, defaultValue: string): readonly [v
515
515
  * // Detect if the user prefers a dark color scheme
516
516
  * const prefersDark = useMatchesMediaQuery("(prefers-color-scheme: dark)");
517
517
  *
518
- * return <div className={prefersDark ? "dark" : "light"}>Hello</div>;
518
+ * return <div className={cx(prefersDark ? "dark" : "light")}>Hello</div>;
519
519
  *
520
520
  * @example
521
521
  * // Show a different layout on portrait orientation
@@ -614,6 +614,95 @@ export declare function getPrefersReducedMotion(): boolean;
614
614
  * return <Carousel autoplay={!prefersReducedMotion} />;
615
615
  */
616
616
  export declare function usePrefersReducedMotion(): boolean;
617
+ /**
618
+ * Where a reader is in some content: the child indexes from the content's
619
+ * element down to the deepest element at the top edge of the region that
620
+ * scrolls it, and how far that edge is into the element, as a fraction of its
621
+ * height. A path and a fraction, not a `scrollTop`: the same content laid out
622
+ * at another width wraps differently, so the same text sits at another offset.
623
+ *
624
+ * Treat it as opaque. Hold it in a ref that outlives the content, and pass the
625
+ * ref to {@link useScrollAnchor}.
626
+ *
627
+ * @see https://mantle.ngrok.com/hooks#usescrollanchor
628
+ */
629
+ type ScrollAnchor = {
630
+ /** The `key` the content had when the anchor was read. */
631
+ key: string | number | undefined;
632
+ path: Array<number>;
633
+ fraction: number;
634
+ /** Pixels from the element's top edge, for an edge in a gap above it. */
635
+ offset: number;
636
+ };
637
+ /**
638
+ * The options for {@link useScrollAnchor}.
639
+ *
640
+ * @see https://mantle.ngrok.com/hooks#usescrollanchor
641
+ *
642
+ * @example
643
+ * ```tsx
644
+ * const anchorContent = useScrollAnchor({ anchorRef: scrollAnchorRef, key: messages.at(-1)?.id });
645
+ * ```
646
+ */
647
+ type UseScrollAnchorOptions = {
648
+ /**
649
+ * Holds the reader's place between two mounts. Create it above every place
650
+ * that shows the same content, such as in the provider that holds a
651
+ * conversation, so it outlives each of them.
652
+ */
653
+ anchorRef: RefObject<ScrollAnchor | null>;
654
+ /**
655
+ * Names the content the anchor belongs to. The region scrolls back to the
656
+ * anchor only when the key is the same as when the anchor was read, so a
657
+ * new message or a new conversation scrolls the way the content decides.
658
+ * Pass the id of the last item. Omit it to restore every anchor.
659
+ */
660
+ key?: string | number;
661
+ };
662
+ /**
663
+ * Keeps the reader's place in some content across a remount, at the same
664
+ * width or another. Returns a ref for the content's element. When the element
665
+ * detaches, the hook writes the reader's place to `anchorRef`; when an element
666
+ * attaches, it scrolls back to that place before the first paint.
667
+ *
668
+ * The region it scrolls is the element itself or its nearest ancestor that
669
+ * can scroll up and down, such as `AppLayout.Body` or `AppLayout.SidePanelBody`,
670
+ * else the document. Fixed and sticky children do not count as the place,
671
+ * and the restore is instant even under `scroll-behavior: smooth`.
672
+ * Until the reader scrolls, a later change of the content's width, such as a
673
+ * sidebar that expands again, restores the place again.
674
+ * Put the ref on an element whose subtree is the same in every place the
675
+ * content shows, such as a transcript's list, so the place reads the same in
676
+ * each.
677
+ *
678
+ * Use it when one piece of content has two homes that a navigation swaps,
679
+ * such as a conversation that is a page on one route and a side panel on the
680
+ * others. The reader finds the same text at the top edge in the new home, and
681
+ * a view transition between the two snapshots the new home already there.
682
+ *
683
+ * Content that scrolls on its own when it changes, such as to the newest
684
+ * message, skips that scroll on mount, or the scroll overrides the anchor.
685
+ * Attach one element for each anchor at a time.
686
+ *
687
+ * @see https://mantle.ngrok.com/hooks#usescrollanchor
688
+ *
689
+ * @example
690
+ * ```tsx
691
+ * function Transcript() {
692
+ * const { messages, scrollAnchorRef } = useConversation();
693
+ * const anchorContent = useScrollAnchor({ anchorRef: scrollAnchorRef, key: messages.at(-1)?.id });
694
+ *
695
+ * return (
696
+ * <ol ref={anchorContent}>
697
+ * {messages.map((message) => (
698
+ * <li key={message.id}>{message.text}</li>
699
+ * ))}
700
+ * </ol>
701
+ * );
702
+ * }
703
+ * ```
704
+ */
705
+ declare function useScrollAnchor({ anchorRef, key }: UseScrollAnchorOptions): RefCallback<HTMLElement>;
617
706
  /**
618
707
  * `scroll-behavior` values:
619
708
  *
@@ -781,8 +870,8 @@ type UseSwipeToDismissOptions = {
781
870
  * <aside
782
871
  * ref={panelRef}
783
872
  * aria-label="Assistant"
784
- * data-state={open ? "open" : "closed"}
785
- * className="transition-[translate] duration-200 ease-out-strong motion-reduce:transition-none data-state-closed:translate-x-full"
873
+ * data-open={open ? "" : undefined}
874
+ * className="transition-[translate] duration-200 ease-out-strong motion-reduce:transition-none not-data-open:translate-x-full"
786
875
  * >
787
876
  * <div ref={headerRef} className="touch-pan-y">
788
877
  * Assistant
@@ -968,4 +1057,4 @@ type UseUndoRedoReturn<T> = {
968
1057
  * );
969
1058
  */
970
1059
  declare function useUndoRedo<T extends {}>(): UseUndoRedoReturn<T>;
971
- export { type Breakpoint, type SwipeDirection, type SwipeProperty, type TailwindBreakpoint, type UseFocusTrapOptions, type UseInViewOptions, type UseInertSiblingsOptions, type UseSwipeToDismissOptions, type UseUndoRedoReturn, breakpoints, useBreakpoint, useCallbackRef, useComposedRefs, useCopyToClipboard, useDebounce, useDebouncedCallback, useFocusTrap, useInView, useInertSiblings, useIsBelowBreakpoint, useIsHydrated, useIsHydratedAfterPaint, useLocalStorage, useSessionStorage, useSwipeToDismiss, useUndoRedo };
1060
+ export { type Breakpoint, type ScrollAnchor, type SwipeDirection, type SwipeProperty, type TailwindBreakpoint, type UseFocusTrapOptions, type UseInViewOptions, type UseInertSiblingsOptions, type UseScrollAnchorOptions, type UseSwipeToDismissOptions, type UseUndoRedoReturn, breakpoints, useBreakpoint, useCallbackRef, useComposedRefs, useCopyToClipboard, useDebounce, useDebouncedCallback, useFocusTrap, useInView, useInertSiblings, useIsBelowBreakpoint, useIsHydrated, useIsHydratedAfterPaint, useLocalStorage, useScrollAnchor, useSessionStorage, useSwipeToDismiss, useUndoRedo };
package/dist/hooks.js CHANGED
@@ -1 +1 @@
1
- "use client";import{n as e,r as t,t as n}from"./use-breakpoint-B4Kh0xE6.js";import{t as r}from"./use-callback-ref-DiOXFQzM.js";import{t as i}from"./use-copy-to-clipboard-hBL6_65i.js";import{n as a,t as o}from"./use-inert-siblings-C4RHXrZc.js";import{t as s}from"./use-is-hydrated-BeLOGKwE.js";import{t as c}from"./use-is-hydrated-after-paint-CrHt3OHw.js";import{t as l}from"./use-isomorphic-layout-effect-CL6iq0Bj.js";import{t as u}from"./use-matches-media-query-FfvtNKQe.js";import{n as d,t as f}from"./use-prefers-reduced-motion-Ck6dnOM9.js";import{n as p}from"./use-swipe-to-dismiss-BYdlca8r.js";import{t as m}from"./use-composed-refs-DPYmLDSe.js";import{t as h}from"./in-view-Dxv_GrUU.js";import{c as g}from"react/compiler-runtime";import{useEffect as _,useRef as v,useState as y,useSyncExternalStore as b}from"react";function x(e,t){let n=g(4),[r,i]=y(e),a,o;return n[0]!==t.waitMs||n[1]!==e?(a=()=>{let n=window.setTimeout(()=>{i(e)},t.waitMs);return()=>{window.clearTimeout(n)}},o=[e,t.waitMs],n[0]=t.waitMs,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),_(a,o),r}function S(e,t){let n=g(5),i=r(e),a=v(0),o,s;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>()=>window.clearTimeout(a.current),s=[],n[0]=o,n[1]=s):(o=n[0],s=n[1]),_(o,s);let c;return n[2]!==t.waitMs||n[3]!==i?(c=(...e)=>{let n=e;window.clearTimeout(a.current),a.current=window.setTimeout(()=>i(...n),t.waitMs)},n[2]=t.waitMs,n[3]=i,n[4]=c):c=n[4],c}const C=/* @__PURE__ */ new Map;function w(e){e.key==null?C.clear():C.has(e.key)&&(e.newValue==null?C.delete(e.key):C.set(e.key,e.newValue))}function T(){try{return window.localStorage}catch{return null}}function E(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===T(),i=n.key==null||n.key===e;r&&i&&(w(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function D(){return null}function O(e){let t=C.get(e);if(t!=null)return t;try{return window.localStorage.getItem(e)}catch{return null}}function k(e,t){try{window.localStorage.setItem(e,t),C.delete(e)}catch{C.set(e,t)}}function A(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function j(e,t){let n=g(12),r;n[0]===e?r=n[1]:(r=E(e),n[0]=e,n[1]=r);let i=r,a;n[2]===e?a=n[3]:(a=()=>O(e),n[2]=e,n[3]=a);let o=b(i,a,D),s;n[4]!==t||n[5]!==o?(s=o==null?t:A(o,t),n[4]=t,n[5]=o,n[6]=s):s=n[6];let c=s,l;n[7]===e?l=n[8]:(l=t=>{let n=JSON.stringify(t);k(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:T()}))},n[7]=e,n[8]=l);let u=l,d;return n[9]!==u||n[10]!==c?(d=[c,u],n[9]=u,n[10]=c,n[11]=d):d=n[11],d}const M=/* @__PURE__ */ new Map;function N(e){e.key==null?M.clear():M.has(e.key)&&(e.newValue==null?M.delete(e.key):M.set(e.key,e.newValue))}function P(){try{return window.sessionStorage}catch{return null}}function F(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===P(),i=n.key==null||n.key===e;r&&i&&(N(n),t())}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function I(){return null}function L(e){let t=M.get(e);if(t!=null)return t;try{return window.sessionStorage.getItem(e)}catch{return null}}function R(e,t){try{window.sessionStorage.setItem(e,t),M.delete(e)}catch{M.set(e,t)}}function z(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function B(e,t){let n=g(12),r;n[0]===e?r=n[1]:(r=F(e),n[0]=e,n[1]=r);let i=r,a;n[2]===e?a=n[3]:(a=()=>L(e),n[2]=e,n[3]=a);let o=b(i,a,I),s;n[4]!==t||n[5]!==o?(s=o==null?t:z(o,t),n[4]=t,n[5]=o,n[6]=s):s=n[6];let c=s,l;n[7]===e?l=n[8]:(l=t=>{let n=JSON.stringify(t);R(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:P()}))},n[7]=e,n[8]=l);let u=l,d;return n[9]!==u||n[10]!==c?(d=[c,u],n[9]=u,n[10]=c,n[11]=d):d=n[11],d}function V(){return d()?`auto`:`smooth`}function H(e,t){let n=g(9),r;n[0]===t?r=n[1]:(r=t===void 0?{}:t,n[0]=t,n[1]=r);let{root:i,margin:a,amount:o,once:s,initial:c}=r,l=s!==void 0&&s,u=c!==void 0&&c,[d,f]=y(u),p=v(u),m,b;return n[2]!==o||n[3]!==a||n[4]!==l||n[5]!==e||n[6]!==i?(m=()=>{let t=e.current;if(t==null||l&&p.current)return;let n=function(){if(p.current=!0,f(!0),!l)return()=>{p.current=!1,f(!1)}},r={root:i?.current??void 0,margin:a,amount:o};return h(t,n,r)},b=[i,e,a,l,o],n[2]=o,n[3]=a,n[4]=l,n[5]=e,n[6]=i,n[7]=m,n[8]=b):(m=n[7],b=n[8]),_(m,b),d}function U(){let e=g(9),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0];let n=v(t),r;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[1]=r):r=e[1];let i=v(r),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={undo:0,redo:0},e[2]=a):a=e[2];let[o,s]=y(a),c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=e=>{n.current.push(e),i.current=[],s({undo:n.current.length,redo:0})},e[3]=c):c=e[3];let l=c,u;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{let t=n.current[n.current.length-1];if(t!==void 0)return n.current.pop(),i.current.push(e),s({undo:n.current.length,redo:i.current.length}),t},e[4]=u):u=e[4];let d=u,f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=e=>{let t=i.current[i.current.length-1];if(t!==void 0)return i.current.pop(),n.current.push(e),s({undo:n.current.length,redo:i.current.length}),t},e[5]=f):f=e[5];let p=f,m=o.undo>0,h=o.redo>0,_;return e[6]!==h||e[7]!==m?(_={canUndo:m,canRedo:h,push:l,undo:d,redo:p},e[6]=h,e[7]=m,e[8]=_):_=e[8],_}export{n as breakpoints,f as getPrefersReducedMotion,e as useBreakpoint,r as useCallbackRef,m as useComposedRefs,i as useCopyToClipboard,x as useDebounce,S as useDebouncedCallback,a as useFocusTrap,H as useInView,o as useInertSiblings,t as useIsBelowBreakpoint,s as useIsHydrated,c as useIsHydratedAfterPaint,l as useIsomorphicLayoutEffect,j as useLocalStorage,u as useMatchesMediaQuery,d as usePrefersReducedMotion,V as useScrollBehavior,B as useSessionStorage,p as useSwipeToDismiss,U as useUndoRedo};
1
+ import{t as e}from"./hooks-CUYIUcp6.js";import{n as t,t as n}from"./hooks-BsOjpTgs.js";import{t as r}from"./hooks-C9b-2wGy.js";import{t as i}from"./hooks-BybaGF7O.js";import{a,c as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./hooks-BP_uqBsI.js";import{n as p,t as m}from"./hooks-B-Cd15iL.js";import{t as h}from"./hooks-BeLOGKwE.js";import{t as g}from"./hooks-GsDfo7Zl.js";import{t as _}from"./hooks-DejuqCNF.js";import{t as v}from"./hooks-lDz_S9UG.js";import{n as y,t as b}from"./hooks-CMmpICCH.js";import{n as x}from"./hooks-PsYFJkz2.js";import{t as S}from"./compose-refs-Ce1vWUz0.js";export{e as breakpoints,b as getPrefersReducedMotion,n as useBreakpoint,r as useCallbackRef,S as useComposedRefs,i as useCopyToClipboard,o as useDebounce,d as useDebouncedCallback,p as useFocusTrap,c as useInView,m as useInertSiblings,t as useIsBelowBreakpoint,h as useIsHydrated,g as useIsHydratedAfterPaint,_ as useIsomorphicLayoutEffect,l as useLocalStorage,v as useMatchesMediaQuery,y as usePrefersReducedMotion,s as useScrollAnchor,u as useScrollBehavior,a as useSessionStorage,x as useSwipeToDismiss,f as useUndoRedo};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,useContext as t,useEffect as n,useId as r,useMemo as i,useRef as a,useState as o}from"react";import{createPortal as s}from"react-dom";import c from"tiny-invariant";import{t as l}from"./compose-refs-Ce1vWUz0.js";import{t as u}from"./cx-CfAFHj5_.js";import{t as d}from"./utils-EM6s2WEU.js";import{t as f}from"./float-JmSzKDHd.js";import{a as p,i as m,n as h,o as g}from"./float-OhVY3cf4.js";import{t as _}from"./layer-container-DDOZJ0fn.js";import{t as v}from"./slot-CBcGhRdV.js";import{jsx as y}from"react/jsx-runtime";const b=e(null);function x(e){let n=t(b);return c(n!=null,`\`HoverCard.${e}\` must be rendered inside \`HoverCard.Root\`.`),n}function S({children:e,closeDelay:t=300,defaultOpen:s=!1,onOpenChange:c,open:l,openDelay:u=100}){let[d,f]=o(s),p=l??d,m=a(void 0),{triggerRef:h,setTrigger:_,onTriggerChangeRef:v}=g(),x=a(null);n(()=>()=>clearTimeout(m.current),[]);let S=r(),C=i(()=>{let e=e=>{clearTimeout(m.current),e!==p&&(l===void 0&&f(e),c?.(e))};return{open:p,setOpen:e,openSoon:()=>{clearTimeout(m.current),m.current=setTimeout(()=>e(!0),u)},closeSoon:()=>{clearTimeout(m.current),m.current=setTimeout(()=>{let t=x.current,n=t?.ownerDocument.getSelection();(t==null||n==null||n.isCollapsed||!t.contains(n.anchorNode))&&e(!1)},t)},cancelPending:()=>clearTimeout(m.current),contentId:S,triggerRef:h,setTrigger:_,onTriggerChangeRef:v,contentRef:x}},[t,S,c,v,p,u,l,_,h]);return/* @__PURE__ */ y(b.Provider,{value:C,children:e})}const C=({asChild:e=!1,"data-slot":t,onBlur:n,onFocus:r,onPointerEnter:i,onPointerLeave:a,onTouchStart:o,ref:s,...c})=>{let u=x(`Trigger`),f=l(s,u.setTrigger);return/* @__PURE__ */ y(e?v:`a`,{"data-slot":d(t,`hover-card-trigger`),ref:f,...c,onPointerEnter:e=>{i?.(e),e.defaultPrevented||e.pointerType!==`touch`&&u.openSoon()},onPointerLeave:e=>{a?.(e),e.defaultPrevented||e.pointerType!==`touch`&&u.closeSoon()},onFocus:e=>{r?.(e),e.defaultPrevented||u.openSoon()},onBlur:e=>{n?.(e),e.defaultPrevented||u.closeSoon()},onTouchStart:e=>{o?.(e),e.defaultPrevented||e.preventDefault()}})},w=({align:e=`center`,className:t,"data-slot":n,onClick:r,onEscapeKeyDown:i,onPointerEnter:a,onPointerLeave:o,ref:c,side:f=`bottom`,sideOffset:g=4,...v})=>{let b=x(`Content`),{portalTarget:S,floatingRef:C,reconcile:w}=m({open:b.open,onDismiss:()=>b.setOpen(!1),getAnchor:()=>b.triggerRef.current,getInsideElements:()=>[b.triggerRef.current],dismissOnOutside:!0,dismissWhenCovered:!0,side:f,align:e,sideOffset:g,onEscapeKeyDown:i});p(b.onTriggerChangeRef,w);let T=l(c,C,b.contentRef);return S!=null&&s(/* @__PURE__ */ y(_,{modal:!1,id:b.contentId,popover:h?`hint`:void 0,"data-slot":d(n,`hover-card-content`),"data-open":b.open?``:void 0,inert:!b.open,className:u(`pointer-events-auto fixed z-50 m-0 inset-auto overflow-visible overscroll-none starting:opacity-0 starting:scale-95 not-data-open:opacity-0 not-data-open:scale-95 transition-[opacity,scale,display,overlay] transition-discrete duration-200 ease-out-strong not-data-open:duration-150 motion-reduce:transition-none`,`bg-popover border-popover w-64 rounded-md border p-4 shadow-md outline-hidden`,t),ref:T,...v,onClick:e=>{e.stopPropagation(),r?.(e)},onPointerEnter:e=>{a?.(e),e.defaultPrevented||b.cancelPending()},onPointerLeave:e=>{o?.(e),e.defaultPrevented||e.pointerType!==`touch`&&b.closeSoon()}}),S)},T=({"data-slot":e,...t})=>/* @__PURE__ */ y(f,{"data-slot":d(e,`hover-card-arrow`),...t});export{C as i,w as n,S as r,T as t};
@@ -0,0 +1,160 @@
1
+ /**
2
+ * The parts of the `HoverCard` namespace. `index.ts` imports them as one module
3
+ * namespace, so a bundler keeps only the parts a consumer reads.
4
+ */
5
+ import { ComponentProps, ReactNode } from "react";
6
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
7
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
8
+ import { n as Side, t as Align } from "./position-Cv3XpSur.js";
9
+ type HoverCardRootProps = {
10
+ children?: ReactNode;
11
+ /** The open state, for a controlled hover card. Pair it with `onOpenChange`. */
12
+ open?: boolean;
13
+ /**
14
+ * The open state on the first render, for an uncontrolled hover card.
15
+ * @default false
16
+ */
17
+ defaultOpen?: boolean;
18
+ /** Runs when the hover card opens or closes. */
19
+ onOpenChange?: (open: boolean) => void;
20
+ /**
21
+ * How long the pointer or focus rests on the trigger before the card opens, in milliseconds.
22
+ * @default 100
23
+ */
24
+ openDelay?: number;
25
+ /**
26
+ * How long the card stays open after the pointer or focus leaves, in milliseconds.
27
+ * @default 300
28
+ */
29
+ closeDelay?: number;
30
+ };
31
+ /**
32
+ * A card that previews the content behind a link when a pointer rests on the
33
+ * link or the link takes focus. This is the root, stateful part that owns the
34
+ * open state and the delays. It renders no element.
35
+ *
36
+ * Use it for sighted pointer users only: a touch never opens it, and a screen
37
+ * reader does not announce it. Keep everything it shows reachable from the link.
38
+ *
39
+ * `HoverCard.Content` is a native `popover="hint"` in the browser's top layer,
40
+ * so it paints above the page and every overlay, and no `overflow` or `z-index`
41
+ * clips it. It closes when an overlay that does not hold it opens.
42
+ *
43
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardroot
44
+ *
45
+ * @example
46
+ * ```tsx
47
+ * <HoverCard.Root>
48
+ * <HoverCard.Trigger asChild>
49
+ * <a href="https://ngrok.com">ngrok</a>
50
+ * </HoverCard.Trigger>
51
+ * <HoverCard.Content>
52
+ * <p>Unified ingress for developers.</p>
53
+ * </HoverCard.Content>
54
+ * </HoverCard.Root>
55
+ * ```
56
+ */
57
+ declare function Root({ children, closeDelay, defaultOpen, onOpenChange, open: openProp, openDelay }: HoverCardRootProps): import("react").JSX.Element;
58
+ /**
59
+ * The link that opens the hover card when a pointer rests on it or it takes focus.
60
+ *
61
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardtrigger
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * <HoverCard.Root>
66
+ * <HoverCard.Trigger asChild>
67
+ * <a href="https://ngrok.com">ngrok</a>
68
+ * </HoverCard.Trigger>
69
+ * <HoverCard.Content>
70
+ * <p>Unified ingress for developers.</p>
71
+ * </HoverCard.Content>
72
+ * </HoverCard.Root>
73
+ * ```
74
+ */
75
+ declare const Trigger: ({ asChild, "data-slot": dataSlot, onBlur, onFocus, onPointerEnter, onPointerLeave, onTouchStart, ref, ...props }: ComponentProps<"a"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
76
+ type HoverCardContentProps = ComponentProps<"div"> & WithDataSlot & {
77
+ /**
78
+ * The side of the trigger the card prefers. It flips to the opposite side
79
+ * when only that side has room.
80
+ * @default "bottom"
81
+ */
82
+ side?: Side;
83
+ /**
84
+ * How the card lines up with the trigger along `side`.
85
+ * @default "center"
86
+ */
87
+ align?: Align;
88
+ /**
89
+ * The gap between the trigger and the card, in pixels.
90
+ * @default 4
91
+ */
92
+ sideOffset?: number;
93
+ /** Runs on Escape while the card is the top float. Call `event.preventDefault()` to keep it open. */
94
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
95
+ };
96
+ /**
97
+ * The card. It mounts while the hover card is open, as a `popover="hint"`
98
+ * element in the top layer next to `HoverCard.Trigger`. A pointer that moves
99
+ * from the trigger onto the card keeps it open. It closes on Escape and on a
100
+ * press outside it. It portals into the overlay or float that holds it, else
101
+ * into `document.body`.
102
+ *
103
+ * **Data attributes:**
104
+ *
105
+ * | Data Attribute | Value | Description |
106
+ * | -------------- | ---------------------------------------------- | ----------------------------------------------- |
107
+ * | `data-slot` | `"hover-card-content"` | On the card, with any composing part's chain ahead of it. |
108
+ * | `data-open` | present while open | Presence-only. Absent while the exit transition plays. |
109
+ * | `data-side` | `"top"` \| `"right"` \| `"bottom"` \| `"left"` | The side of the trigger the card resolved to. |
110
+ *
111
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardcontent
112
+ *
113
+ * @example
114
+ * ```tsx
115
+ * <HoverCard.Root>
116
+ * <HoverCard.Trigger asChild>
117
+ * <a href="https://ngrok.com">ngrok</a>
118
+ * </HoverCard.Trigger>
119
+ * <HoverCard.Content>
120
+ * <p>Unified ingress for developers.</p>
121
+ * </HoverCard.Content>
122
+ * </HoverCard.Root>
123
+ * ```
124
+ */
125
+ declare const Content: ({ align, className, "data-slot": dataSlot, onClick, onEscapeKeyDown, onPointerEnter, onPointerLeave, ref, side, sideOffset, ...props }: HoverCardContentProps) => false | import("react").ReactPortal;
126
+ type HoverCardArrowProps = Omit<ComponentProps<"svg">, "children" | "width" | "height"> & WithDataSlot & {
127
+ /**
128
+ * The width of the arrow, in pixels.
129
+ * @default 14
130
+ */
131
+ width?: number;
132
+ /**
133
+ * The height of the arrow, in pixels.
134
+ * @default 7
135
+ */
136
+ height?: number;
137
+ };
138
+ /**
139
+ * An optional tip that points from `HoverCard.Content` at its trigger. Render
140
+ * it as a direct child of `HoverCard.Content`. It moves to the edge of the card
141
+ * that faces the trigger and centers on the trigger, also after the card flips
142
+ * or shifts.
143
+ *
144
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardarrow
145
+ *
146
+ * @example
147
+ * ```tsx
148
+ * <HoverCard.Root>
149
+ * <HoverCard.Trigger asChild>
150
+ * <a href="https://ngrok.com">ngrok</a>
151
+ * </HoverCard.Trigger>
152
+ * <HoverCard.Content>
153
+ * <HoverCard.Arrow />
154
+ * <p>Unified ingress for developers.</p>
155
+ * </HoverCard.Content>
156
+ * </HoverCard.Root>
157
+ * ```
158
+ */
159
+ declare const Arrow: ({ "data-slot": dataSlot, ...props }: HoverCardArrowProps) => import("react").JSX.Element;
160
+ export { Arrow, Content, Root, Trigger };
@@ -0,0 +1 @@
1
+ export{t as Arrow,n as Content,r as Root,i as Trigger}from"./hover-card-BEC5EQiH.js";