@ngrok/mantle 0.94.0 → 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 (615) hide show
  1. package/README.md +11 -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 +8 -359
  33. package/dist/accordion.js +1 -1
  34. package/dist/agent.json +464 -92
  35. package/dist/alert-DCGSrVTa.js +1 -0
  36. package/dist/{alert-HffaioZM.d.ts → alert-Dz541Ve9.d.ts} +10 -196
  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 +9 -590
  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 +3 -1054
  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 +6 -6
  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 +6 -581
  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 +5 -277
  72. package/dist/avatar.js +1 -1
  73. package/dist/badge.d.ts +10 -9
  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 +65 -555
  97. package/dist/breadcrumb.js +1 -1
  98. package/dist/browser-only-CokCtIvB.js +1 -0
  99. package/dist/browser-only-ymFoM3Ya.js +1 -0
  100. package/dist/browser-only.js +1 -1
  101. package/dist/button-Bqm7U0OC.js +1 -0
  102. package/dist/{button-K0pKc3GN.d.ts → button-C6-6TecO.d.ts} +5 -5
  103. package/dist/{button-BGwOPjGV.d.ts → button-CL17Dxza.d.ts} +28 -25
  104. package/dist/button-CRCiBPEF.js +1 -0
  105. package/dist/{button-Cgf2IcEC.d.ts → button-CRMoQyum.d.ts} +27 -28
  106. package/dist/button-Cr2iY2cI.js +1 -0
  107. package/dist/button-DhoE-BbZ.js +1 -0
  108. package/dist/button.d.ts +3 -3
  109. package/dist/button.js +1 -1
  110. package/dist/calendar-DQtapcSC.js +1 -0
  111. package/dist/calendar.d.ts +1 -1
  112. package/dist/calendar.js +1 -1
  113. package/dist/card-DbtGVKyo.d.ts +129 -0
  114. package/dist/card-parts.d.ts +6 -0
  115. package/dist/card-parts.js +1 -0
  116. package/dist/card.d.ts +3 -228
  117. package/dist/card.js +1 -1
  118. package/dist/centered-layout-parts.d.ts +169 -0
  119. package/dist/centered-layout-parts.js +1 -0
  120. package/dist/centered-layout.d.ts +3 -300
  121. package/dist/centered-layout.js +1 -1
  122. package/dist/chart-B0n2xyYi.js +1 -0
  123. package/dist/chart-BPsMxs1f.js +1 -0
  124. package/dist/chart-BmZoTjRu.js +1 -0
  125. package/dist/chart-Bybyh2Dc.js +1 -0
  126. package/dist/chart-CACfdGlp.d.ts +86 -0
  127. package/dist/chart-CBQJUTIX.js +1 -0
  128. package/dist/chart-Cb0MBaZx.js +1 -0
  129. package/dist/chart-CmMcfDmv.js +1 -0
  130. package/dist/chart-Dlp9FidW.js +2 -0
  131. package/dist/{chart-jitNqimS.d.ts → chart-XvStK-oM.d.ts} +23 -99
  132. package/dist/chart-wTwYzUMJ.js +1 -0
  133. package/dist/checkbox-DH7WFfuR.js +1 -0
  134. package/dist/checkbox-DsVXD96X.js +1 -0
  135. package/dist/checkbox-TX74-Iep.js +1 -0
  136. package/dist/checkbox-group-parts.d.ts +197 -0
  137. package/dist/checkbox-group-parts.js +1 -0
  138. package/dist/checkbox.d.ts +60 -9
  139. package/dist/checkbox.js +1 -1
  140. package/dist/choice-BekuLm-b.d.ts +217 -0
  141. package/dist/choice-DGI8VNR9.d.ts +1 -0
  142. package/dist/choice-PDT386cc.js +1 -0
  143. package/dist/choice-parts.d.ts +7 -0
  144. package/dist/choice-parts.js +1 -0
  145. package/dist/choice.d.ts +63 -1
  146. package/dist/choice.js +1 -1
  147. package/dist/code-UKPv6LVP.js +1 -0
  148. package/dist/{code-block-W3kWPxCJ.js → code-block-B-xD4_RW.js} +1 -1
  149. package/dist/code-block-B7XPzZnp.js +1 -0
  150. package/dist/code-block-BXXceNVo.js +1 -0
  151. package/dist/code-block-C7uzLs8t.js +1 -0
  152. package/dist/{code-block-BGdV4Yty.d.ts → code-block-Cs1Lcmdr.d.ts} +82 -253
  153. package/dist/code-block-Erv7wuWW.d.ts +173 -0
  154. package/dist/code-block-parts.d.ts +380 -0
  155. package/dist/code-block-parts.js +1 -0
  156. package/dist/code-block.d.ts +66 -693
  157. package/dist/code-block.js +6 -6
  158. package/dist/code-block_highlight-utils.d.ts +2 -1
  159. package/dist/code-block_highlight-utils.js +1 -1
  160. package/dist/code.d.ts +4 -4
  161. package/dist/code.js +1 -1
  162. package/dist/combobox-6LXe1cLx.js +1 -0
  163. package/dist/combobox-parts.d.ts +303 -0
  164. package/dist/combobox-parts.js +1 -0
  165. package/dist/combobox.d.ts +5 -468
  166. package/dist/combobox.js +1 -1
  167. package/dist/command-B8L-zjGt.js +1 -0
  168. package/dist/command-CCMWCjAK.js +1 -0
  169. package/dist/command-VKj84zAX.d.ts +859 -0
  170. package/dist/command-cbgO9CiG.js +1 -0
  171. package/dist/command-parts.d.ts +6 -0
  172. package/dist/command-parts.js +1 -0
  173. package/dist/command.d.ts +91 -1135
  174. package/dist/command.js +1 -1
  175. package/dist/compose-refs-BdRUneoc.js +1 -0
  176. package/dist/compose-refs-Ce1vWUz0.js +1 -0
  177. package/dist/cx-CfAFHj5_.js +73 -0
  178. package/dist/cx-DhYnQ07J.js +1 -0
  179. package/dist/cx.d.ts +23 -17
  180. package/dist/cx.js +1 -1
  181. package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
  182. package/dist/data-table-C-FgaN3_.js +1 -0
  183. package/dist/data-table-Cw9dUo1w.js +1 -0
  184. package/dist/data-table-CwqrMtp0.js +1 -0
  185. package/dist/data-table-GUbt8mzo.d.ts +38 -0
  186. package/dist/data-table-parts.d.ts +763 -0
  187. package/dist/data-table-parts.js +1 -0
  188. package/dist/data-table.d.ts +21 -1217
  189. package/dist/data-table.js +1 -1
  190. package/dist/description-list-CjcKOOnr.d.ts +110 -0
  191. package/dist/description-list-parts.d.ts +6 -0
  192. package/dist/description-list-parts.js +1 -0
  193. package/dist/description-list.d.ts +3 -183
  194. package/dist/description-list.js +1 -1
  195. package/dist/dialog-4Ed3U7hz.js +1 -0
  196. package/dist/dialog-BDb_obii.d.ts +166 -0
  197. package/dist/dialog-BaR9D58J.js +1 -0
  198. package/dist/dialog-BkNxAcol.d.ts +467 -0
  199. package/dist/dialog-DSYuhFD5.js +1 -0
  200. package/dist/dialog-fXMCxM9W.js +1 -0
  201. package/dist/dialog-parts.d.ts +6 -0
  202. package/dist/dialog-parts.js +1 -0
  203. package/dist/dialog.d.ts +88 -2
  204. package/dist/dialog.js +1 -1
  205. package/dist/dropdown-menu-BuluRn0Z.js +1 -0
  206. package/dist/dropdown-menu-CDXlp0QT.d.ts +507 -0
  207. package/dist/dropdown-menu-parts.d.ts +6 -0
  208. package/dist/dropdown-menu-parts.js +1 -0
  209. package/dist/dropdown-menu.d.ts +57 -1
  210. package/dist/dropdown-menu.js +1 -1
  211. package/dist/empty-parts.d.ts +120 -0
  212. package/dist/empty-parts.js +1 -0
  213. package/dist/empty.d.ts +2 -216
  214. package/dist/empty.js +1 -1
  215. package/dist/field-BRYypbjO.js +1 -0
  216. package/dist/field-BVMx7HoG.js +1 -0
  217. package/dist/field-BwCq1b9R.js +1 -0
  218. package/dist/field-CYAaNexp.js +1 -0
  219. package/dist/field-DRHAcM1s.js +1 -0
  220. package/dist/field-parts.d.ts +767 -0
  221. package/dist/field-parts.js +1 -0
  222. package/dist/field.d.ts +21 -1201
  223. package/dist/field.js +1 -1
  224. package/dist/flag.d.ts +3 -3
  225. package/dist/flag.js +1 -1
  226. package/dist/float-C_vwTtzU.js +1 -0
  227. package/dist/float-JmSzKDHd.js +1 -0
  228. package/dist/float-OhVY3cf4.js +1 -0
  229. package/dist/hooks-B-Cd15iL.js +1 -0
  230. package/dist/hooks-BP_uqBsI.js +1 -0
  231. package/dist/hooks-BeLOGKwE.js +1 -0
  232. package/dist/hooks-BsOjpTgs.js +1 -0
  233. package/dist/hooks-BybaGF7O.js +1 -0
  234. package/dist/hooks-C9b-2wGy.js +1 -0
  235. package/dist/hooks-CMmpICCH.js +1 -0
  236. package/dist/hooks-CUYIUcp6.js +1 -0
  237. package/dist/hooks-DKbOd_pQ.js +1 -0
  238. package/dist/hooks-DejuqCNF.js +1 -0
  239. package/dist/hooks-GsDfo7Zl.js +1 -0
  240. package/dist/hooks-PsYFJkz2.js +1 -0
  241. package/dist/hooks-lDz_S9UG.js +1 -0
  242. package/dist/hooks.d.ts +126 -17
  243. package/dist/hooks.js +1 -1
  244. package/dist/hover-card-BEC5EQiH.js +1 -0
  245. package/dist/hover-card-parts.d.ts +160 -0
  246. package/dist/hover-card-parts.js +1 -0
  247. package/dist/hover-card.d.ts +9 -281
  248. package/dist/hover-card.js +1 -1
  249. package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
  250. package/dist/icon-0RoVrpGj.js +1 -0
  251. package/dist/icon-BSGMvJ0W.js +1 -0
  252. package/dist/icon-DIiKxRTh.js +1 -0
  253. package/dist/{icon-DXDyhy2N.d.ts → icon-Dqn_LLrR.d.ts} +2 -2
  254. package/dist/{icon-NYvyyRMG.d.ts → icon-KTcDR4--.d.ts} +2 -2
  255. package/dist/icon.d.ts +3 -3
  256. package/dist/icon.js +1 -1
  257. package/dist/icons-CVgj9Whd.js +1 -0
  258. package/dist/icons-D_4cZaL1.js +1 -0
  259. package/dist/icons-DucrvIOa.js +1 -0
  260. package/dist/icons.d.ts +2 -2
  261. package/dist/icons.js +1 -1
  262. package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
  263. package/dist/{index-KJ06KK6t.d.ts → index-CCkilmv8.d.ts} +1 -1
  264. package/dist/input-83xaPZWK.js +1 -0
  265. package/dist/input-B78ah4AB.js +1 -0
  266. package/dist/{input-q8o5uMhW.d.ts → input-Bvpu3ruQ.d.ts} +2 -2
  267. package/dist/input.d.ts +5 -5
  268. package/dist/input.js +1 -1
  269. package/dist/kbd-Bz_Rbpv8.js +1 -0
  270. package/dist/kbd.d.ts +5 -5
  271. package/dist/kbd.js +1 -1
  272. package/dist/{label-r2sJcSQ4.d.ts → label-DZpKu3Pu.d.ts} +8 -8
  273. package/dist/label-DmkAp9xI.js +1 -0
  274. package/dist/label.d.ts +1 -1
  275. package/dist/label.js +1 -1
  276. package/dist/layer-container-DDOZJ0fn.js +1 -0
  277. package/dist/layer-container.d.ts +11 -3
  278. package/dist/layer-container.js +1 -1
  279. package/dist/line-chart-CBL7eCqF.js +1 -0
  280. package/dist/line-chart-CIDFDkyb.d.ts +380 -0
  281. package/dist/line-chart-parts.d.ts +6 -0
  282. package/dist/line-chart-parts.js +1 -0
  283. package/dist/line-chart.d.ts +5 -569
  284. package/dist/line-chart.js +1 -1
  285. package/dist/list-CC3Pi__V.js +1 -0
  286. package/dist/list-Cx4KNfgC.d.ts +286 -0
  287. package/dist/list-FiFQJ0BU.js +1 -0
  288. package/dist/list-parts.d.ts +6 -0
  289. package/dist/list-parts.js +1 -0
  290. package/dist/list.d.ts +9 -406
  291. package/dist/list.js +1 -1
  292. package/dist/live-region-78gbKwlB.js +1 -0
  293. package/dist/live-region.d.ts +2 -2
  294. package/dist/live-region.js +1 -1
  295. package/dist/llms.txt +50 -26
  296. package/dist/main-9d96oUPG.js +1 -0
  297. package/dist/main.d.ts +1 -1
  298. package/dist/main.js +1 -1
  299. package/dist/mantle.css +1304 -910
  300. package/dist/media-object-parts.d.ts +65 -0
  301. package/dist/media-object-parts.js +1 -0
  302. package/dist/media-object.d.ts +5 -121
  303. package/dist/media-object.js +1 -1
  304. package/dist/migrations/0017-select-owned-behavior.yml +117 -0
  305. package/dist/migrations/0018-combobox-owned-behavior.yml +1661 -0
  306. package/dist/migrations/0019-multi-select-owned-behavior.yml +1414 -0
  307. package/dist/migrations/0020-native-floats.yml +823 -0
  308. package/dist/migrations/0021-native-radio-group.yml +397 -0
  309. package/dist/migrations/0024-command-owned-behavior.yml +66 -0
  310. package/dist/migrations/0026-native-dropdown-menu.yml +351 -0
  311. package/dist/migrations/0029-data-attribute-contract.yml +1707 -0
  312. package/dist/migrations/0030-between-variant.yml +1954 -0
  313. package/dist/multi-select-parts.d.ts +487 -0
  314. package/dist/multi-select-parts.js +1 -0
  315. package/dist/multi-select-qC0BuYKD.js +1 -0
  316. package/dist/multi-select.d.ts +6 -803
  317. package/dist/multi-select.js +1 -1
  318. package/dist/otp-input-LPdkb_Fg.js +1 -0
  319. package/dist/otp-input-parts.d.ts +211 -0
  320. package/dist/otp-input-parts.js +1 -0
  321. package/dist/otp-input-zl6MVio6.js +1 -0
  322. package/dist/otp-input.d.ts +11 -252
  323. package/dist/otp-input.js +1 -1
  324. package/dist/overlay-prompt-BIzMQvx7.js +1 -0
  325. package/dist/overlay-prompt-CDnhSoPJ.js +1 -0
  326. package/dist/overlay-prompt.d.ts +57 -0
  327. package/dist/overlay-prompt.js +1 -0
  328. package/dist/pagination-B2ESEbMI.d.ts +171 -0
  329. package/dist/pagination-CxaLKZcE.js +1 -0
  330. package/dist/pagination-Df1gTCN-.js +1 -0
  331. package/dist/pagination-cursor-pagination-parts.d.ts +6 -0
  332. package/dist/pagination-cursor-pagination-parts.js +1 -0
  333. package/dist/pagination.d.ts +39 -304
  334. package/dist/pagination.js +1 -1
  335. package/dist/popover-DOd6zLvE.d.ts +226 -0
  336. package/dist/popover-DWvHbepV.js +1 -0
  337. package/dist/popover-parts.d.ts +6 -0
  338. package/dist/popover-parts.js +1 -0
  339. package/dist/popover.d.ts +60 -2
  340. package/dist/popover.js +1 -1
  341. package/dist/position-Cv3XpSur.d.ts +5 -0
  342. package/dist/progress-BE0c8GW8.js +1 -0
  343. package/dist/progress-ZhFJhv9u.js +1 -0
  344. package/dist/progress-bar-parts.d.ts +86 -0
  345. package/dist/progress-bar-parts.js +1 -0
  346. package/dist/progress-donut-parts.d.ts +94 -0
  347. package/dist/progress-donut-parts.js +1 -0
  348. package/dist/progress-mJQMhxMX.js +1 -0
  349. package/dist/progress-zDpT3TY4.d.ts +2 -0
  350. package/dist/progress.d.ts +4 -268
  351. package/dist/progress.js +1 -1
  352. package/dist/qr-code-0zh10iIE.d.ts +148 -0
  353. package/dist/qr-code-BOOubA9x.js +1 -0
  354. package/dist/qr-code-D8tBKtjP.js +1 -0
  355. package/dist/qr-code-DzJjumoc.d.ts +46 -0
  356. package/dist/qr-code-encoder.browser.d.ts +15 -0
  357. package/dist/qr-code-encoder.browser.js +1 -0
  358. package/dist/qr-code-encoder.d.ts +15 -0
  359. package/dist/qr-code-encoder.js +1 -0
  360. package/dist/qr-code-parts.d.ts +6 -0
  361. package/dist/qr-code-parts.js +1 -0
  362. package/dist/qr-code.d.ts +4 -227
  363. package/dist/qr-code.js +1 -1
  364. package/dist/query-C0e5VYNp.d.ts +440 -0
  365. package/dist/query-V5NifJGs.js +1 -0
  366. package/dist/query-filter.d.ts +6 -6
  367. package/dist/query-filter.js +1 -1
  368. package/dist/query-parts.d.ts +6 -0
  369. package/dist/query-parts.js +1 -0
  370. package/dist/query.d.ts +5 -634
  371. package/dist/query.js +1 -1
  372. package/dist/radio-group-B9jtIbV1.d.ts +39 -0
  373. package/dist/radio-group-BliblUqe.js +1 -0
  374. package/dist/radio-group-f3ThXQCx.js +1 -0
  375. package/dist/radio-group-parts.d.ts +249 -0
  376. package/dist/radio-group-parts.js +1 -0
  377. package/dist/radio-group-zA5DjlLg.js +1 -0
  378. package/dist/radio-group.d.ts +7 -399
  379. package/dist/radio-group.js +1 -1
  380. package/dist/sandbar-Cm2yMjEZ.js +1 -0
  381. package/dist/sandbar-DU4wpKRc.d.ts +345 -0
  382. package/dist/sandbar-parts.d.ts +6 -0
  383. package/dist/sandbar-parts.js +1 -0
  384. package/dist/sandbar.d.ts +6 -441
  385. package/dist/sandbar.js +1 -1
  386. package/dist/sandboxed-on-click-Cg3lewoG.js +1 -0
  387. package/dist/sandboxed-on-click-DOw_Jkhk.js +1 -0
  388. package/dist/sandboxed-on-click.d.ts +1 -1
  389. package/dist/sandboxed-on-click.js +1 -1
  390. package/dist/scatter-plot-1vFxkpjT.js +1 -0
  391. package/dist/scatter-plot-D25jLIVw.d.ts +388 -0
  392. package/dist/scatter-plot-parts.d.ts +6 -0
  393. package/dist/scatter-plot-parts.js +1 -0
  394. package/dist/scatter-plot.d.ts +5 -575
  395. package/dist/scatter-plot.js +1 -1
  396. package/dist/segmented-control-DuiDPKDZ.js +1 -0
  397. package/dist/segmented-control-parts.d.ts +72 -0
  398. package/dist/segmented-control-parts.js +1 -0
  399. package/dist/segmented-control.d.ts +4 -100
  400. package/dist/segmented-control.js +1 -1
  401. package/dist/select-08IEtypH.js +1 -0
  402. package/dist/select-DM2wWfOO.d.ts +478 -0
  403. package/dist/select-parts.d.ts +6 -0
  404. package/dist/select-parts.js +1 -0
  405. package/dist/select.d.ts +63 -1
  406. package/dist/select.js +1 -1
  407. package/dist/selectable-list-Ax5F2Gz1.js +1 -0
  408. package/dist/selectable-list-CyLc3EEt.d.ts +407 -0
  409. package/dist/selectable-list-GcpbbRM1.js +1 -0
  410. package/dist/selectable-list-parts.d.ts +6 -0
  411. package/dist/selectable-list-parts.js +1 -0
  412. package/dist/selectable-list.d.ts +7 -647
  413. package/dist/selectable-list.js +1 -1
  414. package/dist/separator-BB1ohsjn.js +1 -0
  415. package/dist/{separator-QfH0ot5K.d.ts → separator-BzHNVyyv.d.ts} +2 -2
  416. package/dist/separator.d.ts +1 -1
  417. package/dist/separator.js +1 -1
  418. package/dist/sheet-5JgxVaWC.js +1 -0
  419. package/dist/sheet-parts.d.ts +732 -0
  420. package/dist/sheet-parts.js +1 -0
  421. package/dist/sheet-qYPi5MP8.js +1 -0
  422. package/dist/sheet.d.ts +11 -1208
  423. package/dist/sheet.js +1 -1
  424. package/dist/sidebar-CsC9fyPL.js +1 -0
  425. package/dist/sidebar-OBA7L42d.d.ts +1480 -0
  426. package/dist/sidebar-parts.d.ts +6 -0
  427. package/dist/sidebar-parts.js +1 -0
  428. package/dist/sidebar.d.ts +108 -2518
  429. package/dist/sidebar.js +1 -1
  430. package/dist/skeleton-DB0oQyAx.js +1 -0
  431. package/dist/skeleton.d.ts +5 -5
  432. package/dist/skeleton.js +1 -1
  433. package/dist/skip-to-main-link-BGhAWSqB.js +1 -0
  434. package/dist/skip-to-main-link.d.ts +1 -1
  435. package/dist/skip-to-main-link.js +1 -1
  436. package/dist/slider-YlBozcPQ.js +1 -0
  437. package/dist/slider.d.ts +150 -16
  438. package/dist/slider.js +1 -1
  439. package/dist/slot-5ZSmrISx.d.ts +19 -0
  440. package/dist/slot-BxngGBJ2.js +1 -0
  441. package/dist/slot-CBcGhRdV.js +1 -0
  442. package/dist/slot-tuk2J6bY.d.ts +50 -0
  443. package/dist/slot.d.ts +1 -1
  444. package/dist/slot.js +1 -1
  445. package/dist/source-all.css +5 -1
  446. package/dist/split-button-DvJHD7cZ.js +1 -0
  447. package/dist/split-button-parts.d.ts +178 -0
  448. package/dist/split-button-parts.js +1 -0
  449. package/dist/split-button.d.ts +2 -314
  450. package/dist/split-button.js +1 -1
  451. package/dist/strata-parts.d.ts +256 -0
  452. package/dist/strata-parts.js +1 -0
  453. package/dist/strata.d.ts +6 -495
  454. package/dist/strata.js +1 -1
  455. package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
  456. package/dist/switch-DajWYrq3.js +1 -0
  457. package/dist/switch.d.ts +37 -5
  458. package/dist/switch.js +1 -1
  459. package/dist/{table-rWiVWEgB.d.ts → table-C2KnE83u.d.ts} +6 -445
  460. package/dist/table-DJHK48-8.js +1 -0
  461. package/dist/table-parts.d.ts +6 -0
  462. package/dist/table-parts.js +1 -0
  463. package/dist/table.d.ts +81 -1
  464. package/dist/table.js +1 -1
  465. package/dist/tabs-36-4SlRo.js +1 -0
  466. package/dist/tabs-CC_HAqr4.d.ts +193 -0
  467. package/dist/tabs-DayeszXP.js +1 -0
  468. package/dist/tabs-headless-tabs-parts.d.ts +6 -0
  469. package/dist/tabs-headless-tabs-parts.js +1 -0
  470. package/dist/tabs-parts.d.ts +237 -0
  471. package/dist/tabs-parts.js +1 -0
  472. package/dist/tabs.d.ts +43 -420
  473. package/dist/tabs.js +1 -1
  474. package/dist/text-area-D29JTaZg.js +1 -0
  475. package/dist/text-area.d.ts +2 -2
  476. package/dist/text-area.js +1 -1
  477. package/dist/theme-D6rP5Fy8.js +1 -0
  478. package/dist/theme-switcher-PKMCyJxT.js +1 -0
  479. package/dist/theme-switcher.d.ts +26 -22
  480. package/dist/theme-switcher.js +1 -1
  481. package/dist/theme-xoFnLba6.js +1 -0
  482. package/dist/theme.d.ts +84 -77
  483. package/dist/theme.js +1 -1
  484. package/dist/time-zone-CpWYKHdp.js +1 -0
  485. package/dist/time-zone-DZ4hUJ8K.js +1 -0
  486. package/dist/time-zone.d.ts +190 -0
  487. package/dist/time-zone.js +1 -0
  488. package/dist/toast-BJZ__22c.js +1 -0
  489. package/dist/toast-Cb9IN-6e.d.ts +185 -0
  490. package/dist/toast-DM_oq-3E.js +1 -0
  491. package/dist/toast-parts.d.ts +6 -0
  492. package/dist/toast-parts.js +1 -0
  493. package/dist/toast.d.ts +7 -256
  494. package/dist/toast.js +1 -1
  495. package/dist/tokens.dark.json +3026 -0
  496. package/dist/tokens.json +4867 -0
  497. package/dist/tokens.resolver.json +37 -0
  498. package/dist/tooltip-D4HZn19B.js +1 -0
  499. package/dist/tooltip-DP6Lz6jv.d.ts +180 -0
  500. package/dist/tooltip-Uy-kz0rK.d.ts +1 -0
  501. package/dist/tooltip-parts.d.ts +7 -0
  502. package/dist/tooltip-parts.js +1 -0
  503. package/dist/tooltip.d.ts +57 -1
  504. package/dist/tooltip.js +1 -1
  505. package/dist/truncated-text-B5u2AlNg.js +1 -0
  506. package/dist/truncated-text-BoXHP-cD.js +1 -0
  507. package/dist/truncated-text.d.ts +4 -6
  508. package/dist/truncated-text.js +1 -1
  509. package/dist/types.d.ts +1 -1
  510. package/dist/types.js +1 -1
  511. package/dist/typography-C2BmSH12.d.ts +148 -0
  512. package/dist/typography-parts.d.ts +6 -0
  513. package/dist/typography-parts.js +1 -0
  514. package/dist/typography.d.ts +52 -0
  515. package/dist/typography.js +1 -0
  516. package/dist/use-combobox-OhIEVioc.d.ts +23 -0
  517. package/dist/use-float-WEqqhXBE.d.ts +18 -0
  518. package/dist/use-listbox-D4uIonSN.d.ts +1 -0
  519. package/dist/utils-BN3rwHzz.js +1 -0
  520. package/dist/utils-BlLYcYik.js +1 -0
  521. package/dist/utils-C4astHJG.js +1 -0
  522. package/dist/utils-CPSttKPD.js +1 -0
  523. package/dist/{copy-to-clipboard-DInu78k_.js → utils-Dd83caRw.js} +1 -1
  524. package/dist/utils.d.ts +1 -1
  525. package/dist/utils.js +1 -1
  526. package/dist/visually-hidden.d.ts +2 -2
  527. package/dist/visually-hidden.js +1 -1
  528. package/dist/well.d.ts +2 -2
  529. package/dist/well.js +1 -1
  530. package/dist/world-map-BDd3N_Ap.d.ts +424 -0
  531. package/dist/world-map-D3c8Pq-h.js +1 -0
  532. package/dist/world-map-parts.d.ts +6 -0
  533. package/dist/world-map-parts.js +1 -0
  534. package/dist/world-map-t9U-IMKS.js +1 -0
  535. package/dist/world-map.d.ts +80 -0
  536. package/dist/world-map.js +1 -0
  537. package/package.json +30 -19
  538. package/dist/alert-CH99Rw-R.js +0 -1
  539. package/dist/anchor-CgcbWEUs.js +0 -1
  540. package/dist/browser-only-BTSrYWLj.js +0 -1
  541. package/dist/button-69InNC_m.js +0 -1
  542. package/dist/button-BQZ6eoD3.js +0 -1
  543. package/dist/button-BWGUuWnu.js +0 -1
  544. package/dist/button-Cu9e3SM7.js +0 -1
  545. package/dist/chart-BO9EwQ60.js +0 -1
  546. package/dist/chart-CE5Uaqz9.js +0 -1
  547. package/dist/chart-DCTGGlWL.js +0 -1
  548. package/dist/chart-DudCw24t.js +0 -2
  549. package/dist/checkbox-CS504fKk.js +0 -1
  550. package/dist/choice-BwfmbepO.d.ts +0 -405
  551. package/dist/choice-uyYccm0A.js +0 -1
  552. package/dist/clsx-DUGZgXfJ.js +0 -1
  553. package/dist/clsx-Dj3RWZ2l.js +0 -1
  554. package/dist/code-DUJzSl4K.js +0 -1
  555. package/dist/compose-refs-sFdxsL7k.js +0 -1
  556. package/dist/cx-CK7o_rVv.js +0 -1
  557. package/dist/dialog-B9JAGy_x.d.ts +0 -28
  558. package/dist/dialog-CsugEt2A.js +0 -1
  559. package/dist/dialog-DD5H3EH1.d.ts +0 -942
  560. package/dist/dropdown-menu-DHdgaw4P.js +0 -1
  561. package/dist/dropdown-menu-DmDxYPde.d.ts +0 -775
  562. package/dist/field-Bihblt8U.js +0 -1
  563. package/dist/field-CPvjazWN.js +0 -1
  564. package/dist/icon-BudQMD2S.js +0 -1
  565. package/dist/icon-kK0c-POG.js +0 -1
  566. package/dist/icons-4JA-SGfv.js +0 -1
  567. package/dist/icons-CDLz5lpI.js +0 -1
  568. package/dist/icons-CSwTVV2m.js +0 -1
  569. package/dist/input-DHovzBjS.js +0 -1
  570. package/dist/input-DQyN6gN0.js +0 -1
  571. package/dist/interactive-target-BXScNeOr.js +0 -1
  572. package/dist/kbd-CLHsJ99p.js +0 -1
  573. package/dist/label-DmDwzPD8.js +0 -1
  574. package/dist/layer-container-kEQiE4zV.js +0 -1
  575. package/dist/list-CO_yLdln.js +0 -1
  576. package/dist/live-region-DQ1QLv3L.js +0 -1
  577. package/dist/main-CC1L9IsH.js +0 -1
  578. package/dist/popover-BhTFutCz.d.ts +0 -1
  579. package/dist/popover-DxOqLKxy.js +0 -1
  580. package/dist/popover-lwkwWcRW.d.ts +0 -291
  581. package/dist/primitive-Dz9Al-us.js +0 -1
  582. package/dist/radio-group-jj2abc0t.js +0 -1
  583. package/dist/radio-group-sLz5AA9I.d.ts +0 -27
  584. package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
  585. package/dist/select-BqmpVJJT.d.ts +0 -890
  586. package/dist/select-C6Su0dU0.js +0 -1
  587. package/dist/separator-DfzxVutO.js +0 -1
  588. package/dist/shake-DL6WhMXM.js +0 -1
  589. package/dist/sheet-Bd2LIhzF.js +0 -1
  590. package/dist/skeleton-DBpI-ko5.js +0 -1
  591. package/dist/slot-D12N_fZJ.d.ts +0 -67
  592. package/dist/slot-DdYN1L1C.js +0 -1
  593. package/dist/table-CFHiDBW8.js +0 -1
  594. package/dist/theme-DdZgLvKH.js +0 -1
  595. package/dist/tooltip-CpK3XTor.d.ts +0 -283
  596. package/dist/tooltip-b6oiTaWq.js +0 -1
  597. package/dist/use-breakpoint--mo7kr9d.js +0 -1
  598. package/dist/use-callback-ref-BvVyI5K1.js +0 -1
  599. package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
  600. package/dist/use-inert-siblings-CNmNuS2h.js +0 -1
  601. package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
  602. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
  603. package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
  604. package/dist/use-matches-media-query-m860lols.js +0 -1
  605. package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
  606. package/dist/use-swipe-to-dismiss-i__cTF2v.js +0 -1
  607. /package/dist/{suggestions-Ciz2vaJO.js → query-filter-Ciz2vaJO.js} +0 -0
  608. /package/dist/{radio-group-HDVxTNPi.js → sidebar-HDVxTNPi.js} +0 -0
  609. /package/dist/{direction-CvDpql3O.js → sorting-CvDpql3O.js} +0 -0
  610. /package/dist/{booleanish-BfvnW6vy.js → types-BfvnW6vy.js} +0 -0
  611. /package/dist/{css-properties-D85fCNV3.js → types-D85fCNV3.js} +0 -0
  612. /package/dist/{alternate-announcement-BkH4bOKp.js → utils-BkH4bOKp.js} +0 -0
  613. /package/dist/{in-view-Dxv_GrUU.js → utils-Dxv_GrUU.js} +0 -0
  614. /package/dist/{data-slot-EM6s2WEU.js → utils-EM6s2WEU.js} +0 -0
  615. /package/dist/{cookie-ca4g5CKp.js → utils-ca4g5CKp.js} +0 -0
@@ -0,0 +1,86 @@
1
+ import { t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
2
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
3
+ import { _ as XValue, g as XTickContext, h as SeriesColor, p as GridLines, v as YTickContext } from "./chart-XvStK-oM.js";
4
+ import { ComponentProps } from "react";
5
+ /**
6
+ * The copy button part: copies the chart's data as a Markdown table.
7
+ *
8
+ * This module is internal shared implementation, not exported from the package.
9
+ */
10
+ type CopyButtonPrimitiveProps = Omit<ComponentProps<"button">, "aria-label" | "children" | "type" | "onCopy"> & SelfClosingWithAsChild & WithDataSlot & {
11
+ /**
12
+ * Not part of the API: `label` is the single way to name the button.
13
+ * Typed `never` rather than only omitted because TypeScript skips
14
+ * excess-attribute checks for hyphenated JSX attributes; the `never`
15
+ * type makes the JSX call site a compile error.
16
+ */
17
+ "aria-label"?: never;
18
+ /**
19
+ * The accessible name for the copy button, rendered as its `aria-label`
20
+ * (like the `alt` text on an `<img>`).
21
+ *
22
+ * @default "Copy data as Markdown"
23
+ */
24
+ label?: string;
25
+ /**
26
+ * Callback fired after a successful copy, passes the serialized markdown.
27
+ */
28
+ onCopy?: (value: string) => void;
29
+ /**
30
+ * Callback fired when an error occurs during copying.
31
+ */
32
+ onCopyError?: (error: unknown) => void;
33
+ };
34
+ type GridPrimitiveProps = {
35
+ /** Which gridlines to draw. */
36
+ lines?: GridLines;
37
+ };
38
+ type XAxisPrimitiveProps = {
39
+ /**
40
+ * Format a tick label. Receives the chart's x values: the category value on
41
+ * band/point scales, a `Date` on time scales, and a number on linear scales.
42
+ * The second argument carries the `defaultLabel` the axis paints without a
43
+ * formatter, so a formatter can decorate it. The chart compares the function
44
+ * by identity, so a new function paints the chart again. The React Compiler
45
+ * in your build keeps an inline function stable. Without it, define the
46
+ * function outside the component.
47
+ */
48
+ tickFormat?: (value: XValue, context: XTickContext) => string;
49
+ /**
50
+ * Target tick count (continuous scales only; a density-derived default
51
+ * otherwise). Approximate: ticks land on human-friendly steps, and a linear
52
+ * axis whose x values are all integers never renders fractional ticks:
53
+ * the integer step wins over the requested count.
54
+ */
55
+ tickCount?: number;
56
+ };
57
+ type YAxisPrimitiveProps = {
58
+ /**
59
+ * Format a tick label. Defaults to thousands-separated numbers. The second
60
+ * argument carries the tick `step` and the `defaultLabel`, whose precision
61
+ * follows the step. A formatter that adds a unit can decorate
62
+ * `defaultLabel` and needs no precision of its own. The chart compares the
63
+ * function by identity, so a new function paints the chart again. The React
64
+ * Compiler in your build keeps an inline function stable. Without it, define
65
+ * the function outside the component.
66
+ */
67
+ tickFormat?: (value: number, context: YTickContext) => string;
68
+ /**
69
+ * Maximum tick count. When omitted, the axis aims for about 5 ticks. Ticks
70
+ * land on human-friendly steps, so the axis can render fewer. The plot
71
+ * height also limits the count: a vertical axis keeps about 28px for each
72
+ * tick, and it drops a label that would overlap its neighbor. When every
73
+ * series value is an integer (counts), the axis never renders fractional
74
+ * ticks.
75
+ */
76
+ tickCount?: number;
77
+ };
78
+ type ReferenceLinePrimitiveProps = {
79
+ /** The y value the line marks (an SLO threshold, a budget, a limit). */
80
+ y: number;
81
+ /** A short label painted above the line's right end. */
82
+ label?: string;
83
+ /** Line color; defaults to the neutral reference color. */
84
+ color?: SeriesColor;
85
+ };
86
+ export { CopyButtonPrimitiveProps as a, YAxisPrimitiveProps as i, ReferenceLinePrimitiveProps as n, XAxisPrimitiveProps as r, GridPrimitiveProps as t };
@@ -0,0 +1 @@
1
+ "use client";import{t as e}from"./Check-C5a1hX4x.js";import{t}from"./Copy-BYWMO6PW.js";import{useEffect as n,useRef as r,useState as i}from"react";import{t as a}from"./hooks-BybaGF7O.js";import{t as o}from"./utils-BkH4bOKp.js";import{t as s}from"./utils-EM6s2WEU.js";import{t as c}from"./button-Bqm7U0OC.js";import{t as l}from"./icon-0RoVrpGj.js";import{t as u}from"./live-region-78gbKwlB.js";import{t as d}from"./chart-Dlp9FidW.js";import{d as f}from"./chart-B0n2xyYi.js";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";const g=({partName:g,slotName:_,label:v=`Copy data as Markdown`,onCopy:y,onCopyError:b,onClick:x,ref:S,"data-slot":C,...w})=>{let T=f(g),E=a(),[D,O]=i(``),k=D!==``,A=r(!1),j=r(void 0);return n(()=>()=>{j.current!=null&&clearTimeout(j.current)},[]),/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(c,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"data-slot":s(C,`${_}-copy-button`),label:v,icon:/* @__PURE__ */ m(l,{active:k?`check`:`copy`,icons:{check:/* @__PURE__ */ m(e,{}),copy:/* @__PURE__ */ m(t,{})}}),ref:S,onClick:async e=>{try{if(x?.(e),e.defaultPrevented){j.current!=null&&(clearTimeout(j.current),j.current=void 0),O(``);return}let{data:t,xKey:n,xScale:r,zKey:i}=T.dataRef.current,a=d({data:t,xKey:n,xScale:r,zKey:i,series:T.store.getSnapshot().series});await E(a),y?.(a),O(o(`Copied`,A)),j.current!=null&&clearTimeout(j.current),j.current=setTimeout(()=>{O(``)},2e3)}catch(e){b?.(e)}},...w}),/* @__PURE__ */ m(u,{children:D})]})};export{g as t};
@@ -0,0 +1 @@
1
+ import{S as e,g as t}from"./chart-BmZoTjRu.js";import"./chart-CmMcfDmv.js";import{n}from"./chart-Bybyh2Dc.js";const r=Math.PI/2-.05,i=e=>({cosYaw:Math.cos(e.yaw),sinYaw:Math.sin(e.yaw),cosPitch:Math.cos(e.pitch),sinPitch:Math.sin(e.pitch)}),a=(e,t,n,r)=>{let i=e*r.cosYaw+n*r.sinYaw,a=-e*r.sinYaw+n*r.cosYaw,o=t*r.cosPitch-a*r.sinPitch,s=t*r.sinPitch+a*r.cosPitch,c=4/(4+s);return{x:i*c,y:o*c,depth:s,scale:c}},o=e=>Math.min(r,Math.max(-r,e)),s=(e,t)=>{let n=t[1]-t[0];return n===0?0:(e-t[0])/n*2-1},c=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1],[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],l=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]],u=(e,r)=>{let{count:i,order:a,screenX:o,screenY:s,radius:c,colorAt:l,shapeAt:u,alphaAt:d,surface:f}=r;if(e.save(),i>2e4){let t=``,n=-1;for(let r of a){let i=l(r);i!==t&&(e.fillStyle=i,t=i);let a=d(r);a!==n&&(e.globalAlpha=a,n=a);let u=Math.max(1,(c[r]??0)/2);e.fillRect((o[r]??0)-u/2,(s[r]??0)-u/2,u,u)}e.restore();return}let p=i<=n;e.strokeStyle=f,e.lineWidth=2;let m=``,h=-1;for(let n of a){let r=l(n);r!==m&&(e.fillStyle=r,m=r);let i=d(n);i!==h&&(e.globalAlpha=i,h=i);let a=u(n);e.beginPath(),a===`circle`?e.arc(o[n]??0,s[n]??0,c[n]??0,0,Math.PI*2):t(e,o[n]??0,s[n]??0,c[n]??0,a),e.fill(),p&&e.stroke()}e.restore()},d=(e,t)=>{let{gridColor:n,axisColor:r,corners:i,edges:a,cubeAlpha:o,axes:s}=t;if(e.save(),o>.01){e.globalAlpha=o,e.strokeStyle=n,e.lineWidth=1,e.beginPath();for(let[t,n]of a){let r=i[t],a=i[n];r!=null&&a!=null&&(e.moveTo(r.x,r.y),e.lineTo(a.x,a.y))}e.stroke()}e.strokeStyle=r;for(let{alpha:t,from:n,to:r}of s)t<=.01||(e.globalAlpha=t,e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(r.x,r.y),e.stroke());e.restore()},f=(e,t)=>{let{textColor:n,fontFamily:r,plot:i,center:a,axes:o}=t;e.save(),e.fillStyle=n,e.font=`11px ${r}`,e.textAlign=`center`,e.textBaseline=`middle`;for(let{label:t,alpha:n,from:r,to:s}of o){if(n<=.01)continue;let o=Math.hypot(r.x-a.x,r.y-a.y),c=Math.hypot(s.x-a.x,s.y-a.y),l=c>=o?s:r,u=c>=o?r:s,d=Math.max(1,Math.hypot(l.x-u.x,l.y-u.y)),f=(l.x-u.x)/d*16,p=(l.y-u.y)/d*16,m=Math.min(i.left+i.width-8,Math.max(i.left+8,l.x+f)),h=Math.min(i.top+i.height-6,Math.max(i.top+6,l.y+p));e.globalAlpha=n,e.fillText(t,m,h)}e.restore()},p=e=>e===3?{yaw:.65,pitch:-.35}:{yaw:0,pitch:0},m=e=>[+(e>=2),+(e>=3)];var h=class{#e;#t=p(3);#n=new e({speed:.12});#r=new e({speed:.16});#i=null;#a=null;#o=/* @__PURE__ */ new Int32Array;constructor(e,t){this.#e=e,this.snap(t)}setDimensions(e,t){let n=p(e);if(!t.glide){this.snap(e);return}let r=n.yaw+Math.round((this.#t.yaw-n.yaw)/(Math.PI*2))*Math.PI*2,i=performance.now();this.#r.aim(m(e),i),this.#n.jump([this.#t.yaw,this.#t.pitch]),this.#n.aim([r,n.pitch],i)}snap(e){let t=p(e);this.#r.jump(m(e)),this.#t=t,this.#n.jump([t.yaw,t.pitch])}settle(e){this.#r.jump(m(e)),this.#n.active&&this.snap(e)}tick(e){let t=this.#r.tick(e);if(this.#n.tick(e)){t=!0;let e=this.#n.values();this.#t={yaw:e[0]??this.#t.yaw,pitch:e[1]??this.#t.pitch}}return t}resetProjection(){this.#a=null}press({x:e,y:t,moved:n}){this.#i={lastX:e,lastY:t,moved:n}}dragTo(e,t){let n=this.#i;if(n==null)return`none`;let r=e-n.lastX,i=t-n.lastY;return!n.moved&&Math.abs(r)+Math.abs(i)<=3?`held`:(n.moved=!0,this.#t={yaw:this.#t.yaw+r*.008,pitch:o(this.#t.pitch+i*.008)},this.#n.jump([this.#t.yaw,this.#t.pitch]),n.lastX=e,n.lastY=t,`rotated`)}release(){let e=this.#i;return this.#i=null,e==null?`none`:e.moved?`rotated`:`tap`}paintLabels(e,t){let n=this.#e.colors();n!=null&&f(e,{textColor:n.chrome.tickText,fontFamily:n.fontFamily(),plot:this.#e.plot(),center:t.center,axes:t.axes})}paint(e,t,n){let r=this.#e,o=r.plot(),f=r.rowCount(),p=r.xs(),m=r.zs(),h=i(this.#t),g=o.left+o.width/2,_=o.top+o.height/2,v=this.#r.values(),y=v[0]??1,b=v[1]??1,x=.85-.22*y-.11*b,S=Math.min(o.width,o.height)/2*x,C=r.domains(),w=n.map(e=>r.reveal(e.dataKey)),T=(e,t,n)=>{let r=a(e,t,n,h);return{x:g+r.x*S,y:_-r.y*S}},E=c.map(([e,t,n])=>T(e,t,n)),D=n[0],O=n.length===1&&D!=null?D.dataKey:`y`,k=[{label:r.xKey(),alpha:1,from:T(-1,-y,-b),to:T(1,-y,-b)},{label:O,alpha:y,from:T(-1,-1,-b),to:T(-1,1,-b)},{label:r.zKey()??`z`,alpha:b,from:T(-1,-y,-1),to:T(-1,-y,1)}];d(e,{gridColor:t.chrome.grid,axisColor:t.chrome.baseline,corners:E,edges:l,cubeAlpha:b,axes:k});let A=f*n.length,j=this.#a;(j==null||j.screenX.length<A)&&(j={screenX:new Float64Array(A),screenY:new Float64Array(A),radius:new Float64Array(A),seriesIndex:new Int32Array(A),pointIndex:new Int32Array(A),depths:new Float64Array(A),count:0});let M=j.depths,N=0;n.forEach((e,t)=>{let n=r.paintedValues(e,t);for(let e=0;e<f;e++){let r=n[e]??NaN,i=m[e]??NaN;if(Number.isNaN(r)||Number.isNaN(i))continue;let o=a(s(p[e]??0,C.x),s(r,C.y)*y,s(i,C.z)*b,h);j.screenX[N]=g+o.x*S,j.screenY[N]=_-o.y*S,j.radius[N]=4*o.scale,j.seriesIndex[N]=t,j.pointIndex[N]=e,M[N]=o.depth,N+=1}}),j.count=N,this.#a=j;let P={center:{x:g,y:_},axes:k};if(w.every(e=>e<.00196078431372549))return P;this.#o.length<N&&(this.#o=new Int32Array(A));let F=this.#o.subarray(0,N);for(let e=0;e<N;e++)F[e]=e;F.sort((e,t)=>(M[t]??0)-(M[e]??0));let I=n.map(e=>r.shape(e.dataKey));return u(e,{count:N,order:F,screenX:j.screenX,screenY:j.screenY,radius:j.radius,colorAt:e=>{let r=n[j.seriesIndex[e]??0];return r==null?`currentColor`:t.series.get(r.dataKey)??`currentColor`},shapeAt:e=>I[j.seriesIndex[e]??0]??`circle`,alphaAt:e=>w[j.seriesIndex[e]??0]??1,surface:t.chrome.surface}),P}hitAt(e,t,n){let r=this.#e.specs(),i=n*n,a=null,o=this.#a;if(o==null)return null;for(let n=0;n<o.count;n++){let s=(o.screenX[n]??0)-e,c=(o.screenY[n]??0)-t,l=s*s+c*c;if(l<i){let e=r[o.seriesIndex[n]??0];if(e==null)continue;i=l,a={seriesKey:e.dataKey,index:o.pointIndex[n]??0,screenX:o.screenX[n]??0,screenY:o.screenY[n]??0}}}return a}screenFor(e){let t=this.#a;if(t==null)return null;for(let n=0;n<t.count;n++)if((t.pointIndex[n]??-1)===e)return{x:t.screenX[n]??0,y:t.screenY[n]??0};return null}};export{h as Scatter3d};
@@ -0,0 +1 @@
1
+ import{_ as e}from"./chart-BmZoTjRu.js";import{r as t}from"./chart-Bybyh2Dc.js";const n=1/510,r=[1e3,4e3,16e3];let i=null,a=null;const o=()=>(a??=import(`./chart-Cb0MBaZx.js`).then(e=>(i=e.Scatter3d,e.Scatter3d),e=>{throw a=null,reportError(e),e}),a);var s=class{kind=`scatter`;#e;#t=null;#n=!1;#r=0;#i=null;#a=null;#o=3;#s=null;constructor(e){this.#e=e}#c(){if(this.#t==null&&i!=null){this.#t=new i(this.#e,this.#o),this.#d();let e=this.#a;this.#a=null,e!=null&&this.#t.press(e)}return this.#t!=null||this.#n?this.#t:(this.#n=!0,this.#l(),null)}async#l(){try{await o()}catch{this.#n=!1,this.#u();return}this.#n=!1,this.#c(),this.#e.requestPaint()}#u(){let e=r[this.#r];e!=null&&this.#i==null&&(this.#r+=1,this.#i=setTimeout(()=>{this.#i=null,this.#e.requestPaint()},e))}#d(){this.#i!=null&&(clearTimeout(this.#i),this.#i=null),this.#r=0}setDimensions(e,t){this.#o=e,this.#t?.setDimensions(e,t)}settle(e){this.#o=e,this.#t?.settle(e)}tick(e){return this.#t?.tick(e)??!1}resetProjection(){this.#d(),this.#t?.resetProjection()}pressAt(e,t){if(!this.#e.is3d())return!1;this.#d();let n=this.#c();return n==null?this.#a={x:e,y:t,moved:!1}:n.press({x:e,y:t,moved:!1}),!0}dragTo(e,t){let n=this.#a;return n==null?this.#t?.dragTo(e,t)??`none`:(n.moved||=Math.abs(e-n.x)+Math.abs(t-n.y)>3,`held`)}release(){let e=this.#a;return e==null?this.#t?.release()??`none`:(this.#a=null,e.moved?`rotated`:`tap`)}paint(e){let n=this.#e,r=n.colors(),i=n.specs();if(r==null||n.rowCount()===0||i.length===0)return null;if(n.is3d())return this.#c()?.paint(e,r,i)??null;let a=n.xCoefficients(),o=n.yCoefficients(),s=n.xs(),c=n.columns(),l=this.#s;if(l==null||l.columns!==c||l.specs!==i){let e=i.map((e,t)=>n.definedIndexes(c[t]??/* @__PURE__ */ new Float64Array));l={columns:c,specs:i,indexes:e,total:e.reduce((e,t)=>e+t.length,0)},this.#s=l}let u=l.indexes,d=l.total;return i.forEach((i,c)=>{let l=n.reveal(i.dataKey);if(l<.00196078431372549)return;let f=n.paintedValues(i,c);e.save(),e.globalAlpha=l,t(e,{color:r.series.get(i.dataKey)??`currentColor`,surface:r.chrome.surface,shape:n.shape(i.dataKey),totalPointCount:d,indexes:u[c]??[],xAt:e=>(s[e]??0)*a.k+a.b,yAt:e=>(f[e]??0)*o.k+o.b,radiusAt:()=>4}),e.restore()}),null}paintLabels(e,t){this.#t?.paintLabels(e,t)}hitAt(t,n){let r=this.#e;if(r.is3d())return this.#t?.hitAt(t,n,24)??null;let i=r.specs(),a=576,o=null,s=r.xCoefficients(),c=r.yCoefficients(),l=r.xs(),u=r.rowCount(),d=e=>(l[e]??0)*s.k+s.b,f=s.k>0,p=f?e(u,e=>d(e)-t<=-24):0,m=f?e(u,e=>d(e)-t<24):u;for(let e of i){let i=r.columnOf(e.dataKey);if(i!=null)for(let r=p;r<m;r++){let s=i[r]??NaN;if(Number.isNaN(s))continue;let l=d(r),u=s*c.k+c.b,f=l-t,p=u-n,m=f*f+p*p;m<a&&(a=m,o={seriesKey:e.dataKey,index:r,screenX:l,screenY:u})}}return o}screenFor(e){let t=this.#e;if(t.is3d())return this.#t?.screenFor(e)??null;let n=t.xCoefficients(),r=t.yCoefficients();for(let i of t.specs()){let a=t.columnOf(i.dataKey)?.[e]??NaN;if(!Number.isNaN(a))return{x:(t.xs()[e]??0)*n.k+n.b,y:a*r.k+r.b}}return null}};const c=e=>new s(e);export{c as n,o as r,n as t};
@@ -0,0 +1,2 @@
1
+ import{D as e,T as t}from"./chart-BmZoTjRu.js";const n=e=>e.replaceAll(`|`,`\\|`).replaceAll(/\s*\n\s*/g,` `),r=(t,r)=>{let i=r===`time`?new Date(e(t,!0)):t;return i instanceof Date?Number.isNaN(i.getTime())?`—`:i.toISOString():typeof i==`number`?Number.isFinite(i)?String(i):`—`:typeof i==`string`?n(i):`—`},i=e=>typeof e==`number`&&Number.isFinite(e)?String(e):`—`,a=e=>`| ${e.join(` | `)} |`,o=({data:e,xKey:o,xScale:s,series:c,zKey:l})=>{let u=[n(o),...c.map(e=>n(e.label)),...l==null?[]:[n(l)]],d=e.map(e=>[r(t(e,o),s),...c.map(n=>i(t(e,n.dataKey))),...l==null?[]:[i(t(e,l))]]);return[a(u),a(u.map(()=>`---`)),...d.map(e=>a(e))].join(`
2
+ `)};export{o as t};
@@ -1,11 +1,10 @@
1
- import { t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
2
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
1
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
3
2
  import { t as Color } from "./index-BZhHLrBi.js";
4
3
  import { ComponentProps, ReactNode } from "react";
5
4
  /**
6
5
  * Shared types for the internal canvas chart engine.
7
6
  *
8
- * This module is internal shared implementation — it is not exported from the
7
+ * This module is internal shared implementation. It is not exported from the
9
8
  * package. The public components built on it are `BarChart` (../bar-chart),
10
9
  * `LineChart` (../line-chart), `AreaChart` (../area-chart), and
11
10
  * `ScatterPlot` (../scatter-plot), mirroring how `dialog/primitive` backs
@@ -17,7 +16,7 @@ import { ComponentProps, ReactNode } from "react";
17
16
  */
18
17
  type XValue = string | number | Date;
19
18
  /**
20
- * A single row of chart data — any object shape. Series read one numeric key
19
+ * A single row of chart data: any object shape. Series read one numeric key
21
20
  * per row; the x key identifies the row's position on the x axis. Missing
22
21
  * keys and `null` values are rendered as gaps. Typed as `object` (not an
23
22
  * index signature) so interface-typed rows compose without ceremony; reads
@@ -27,10 +26,10 @@ type ChartDatum = object;
27
26
  /**
28
27
  * How x values map onto the x axis:
29
28
  *
30
- * - `"band"` — categorical bands with air between them (bar charts).
31
- * - `"point"` — categorical positions with no band thickness (line/area over categories).
32
- * - `"linear"` — continuous numeric axis.
33
- * - `"time"` — continuous time axis with calendar-aware ticks.
29
+ * - `"band"`: categorical bands with air between them (bar charts).
30
+ * - `"point"`: categorical positions with no band thickness (line/area over categories).
31
+ * - `"linear"`: continuous numeric axis.
32
+ * - `"time"`: continuous time axis with calendar-aware ticks.
34
33
  */
35
34
  type XScaleKind = "band" | "point" | "linear" | "time";
36
35
  /**
@@ -86,12 +85,12 @@ type PointShape = "circle" | "square" | "triangle" | "diamond" | "triangle-down"
86
85
  * The fill texture a bar series wears: solid color (the default), diagonal
87
86
  * hatch lines at 45° (`"hatch"`), the 135° mirror (`"hatch-reverse"`), both
88
87
  * (`"crosshatch"`), rungs perpendicular to the bar's length
89
- * (`"perpendicular"` — horizontal lines on vertical bars), rungs parallel to
90
- * it (`"parallel"` — vertical lines on vertical bars), the orthogonal lattice
88
+ * (`"perpendicular"`: horizontal lines on vertical bars), rungs parallel to
89
+ * it (`"parallel"`: vertical lines on vertical bars), the orthogonal lattice
91
90
  * of both rung directions (`"grid"`), or an offset dot field (`"dots"`).
92
91
  *
93
92
  * The two rung textures flip with `orientation`, in opposite senses. Every
94
- * other value is direction-free, `"grid"` included — it is the orthogonal
93
+ * other value is direction-free, `"grid"` included. It is the orthogonal
95
94
  * lattice against `"crosshatch"`'s diagonal one.
96
95
  *
97
96
  * A textured series paints its marks in the full series color over a light
@@ -104,7 +103,7 @@ type BarTexture = "solid" | "hatch" | "hatch-reverse" | "crosshatch" | "perpendi
104
103
  /**
105
104
  * The direction a bar chart's bars run: vertical columns rising from a bottom
106
105
  * baseline (the default), or horizontal bars growing rightward from a left
107
- * baseline — the layout for long category labels, which move into the left
106
+ * baseline: the layout for long category labels, which move into the left
108
107
  * gutter at full width instead of colliding under the plot.
109
108
  */
110
109
  type BarOrientation = "vertical" | "horizontal";
@@ -153,7 +152,7 @@ type YTickContext = {
153
152
  };
154
153
  /**
155
154
  * The hover/keyboard snapshot published by the engine. One snapshot describes
156
- * the active x position and every series' value at it — the tooltip, the
155
+ * the active x position and every series' value at it. The tooltip, the
157
156
  * aria-live announcement, and `onDatumActivate` all read from it.
158
157
  */
159
158
  type HoverSnapshot = {
@@ -209,9 +208,10 @@ type ChartDatumEvent<TDatum extends ChartDatum = ChartDatum> = {
209
208
  * zero, so their minimum is fixed at `0`; line charts may override both ends.
210
209
  */
211
210
  type YDomain = [number | "auto", number | "auto"];
211
+ type ChartListPrimitiveProps = ComponentProps<"div"> & WithDataSlot;
212
212
  /**
213
213
  * The shared React layer of the chart family. `BarChart`, `LineChart`,
214
- * `AreaChart`, and `ScatterPlot` are thin public wrappers over these
214
+ * `AreaChart`, `ScatterPlot`, and `WorldMap` are thin public wrappers over these
215
215
  * primitives, mirroring how `dialog/primitive` backs the dialog family and
216
216
  * `list/primitive` backs the list family.
217
217
  *
@@ -229,17 +229,17 @@ type YDomain = [number | "auto", number | "auto"];
229
229
  * can see, and a table of sparklines holds no hidden tables until a reader
230
230
  * asks for one.
231
231
  *
232
- * This module is internal shared implementation — it is not exported from the
232
+ * This module is internal shared implementation. It is not exported from the
233
233
  * package.
234
234
  */
235
235
  /**
236
236
  * Every interactive chart must have an accessible name: either a direct
237
237
  * `aria-label` or an `aria-labelledby` reference to a visible title (preferred
238
- * when the chart sits under a heading — no drift-prone duplicated text).
238
+ * when the chart sits under a heading, so no duplicated text can drift).
239
239
  * Enforced at the type level; the name lands on the interaction overlay (the
240
- * chart's single named element — the canvas itself is aria-hidden so AT never
241
- * announces the chart twice). Decorative charts are exempt — see
242
- * {@link ChartAccessibilityProps}.
240
+ * chart's single named element: the canvas itself is aria-hidden, so assistive
241
+ * technology never announces the chart twice). Decorative charts are exempt;
242
+ * see {@link ChartAccessibilityProps}.
243
243
  */
244
244
  type ChartAccessibleName = {
245
245
  "aria-label": string;
@@ -407,35 +407,6 @@ type ChartAccessibilityProps<TMode extends ChartMode = ChartMode> = {
407
407
  } & ChartAccessibleName & ChartNoInteractionProps : {
408
408
  mode?: "interactive";
409
409
  } & ChartAccessibleName & ChartInteractionProps);
410
- /**
411
- * The copy button part: copies the chart's data as a Markdown table.
412
- *
413
- * This module is internal shared implementation — not exported from the package.
414
- */
415
- type CopyButtonPrimitiveProps = Omit<ComponentProps<"button">, "aria-label" | "children" | "type" | "onCopy"> & SelfClosingWithAsChild & WithDataSlot & {
416
- /**
417
- * Not part of the API: `label` is the single way to name the button.
418
- * Typed `never` rather than only omitted because TypeScript skips
419
- * excess-attribute checks for hyphenated JSX attributes; the `never`
420
- * type makes the JSX call site a compile error.
421
- */
422
- "aria-label"?: never;
423
- /**
424
- * The accessible name for the copy button, rendered as its `aria-label`
425
- * (like the `alt` text on an `<img>`).
426
- *
427
- * @default "Copy data as Markdown"
428
- */
429
- label?: string;
430
- /**
431
- * Callback fired after a successful copy, passes the serialized markdown.
432
- */
433
- onCopy?: (value: string) => void;
434
- /**
435
- * Callback fired when an error occurs during copying.
436
- */
437
- onCopyError?: (error: unknown) => void;
438
- };
439
410
  type LegendPrimitiveProps = Omit<ComponentProps<"div">, "children"> & {
440
411
  /**
441
412
  * Classes for the legend. The legend wraps its items and does not shrink.
@@ -445,57 +416,10 @@ type LegendPrimitiveProps = Omit<ComponentProps<"div">, "children"> & {
445
416
  /** Replace the default legend items; receives the registered series. */
446
417
  children?: (series: SeriesMeta[]) => ReactNode;
447
418
  };
448
- type ChartListPrimitiveProps = ComponentProps<"div"> & WithDataSlot;
449
- type GridPrimitiveProps = {
450
- /** Which gridlines to draw. */
451
- lines?: GridLines;
452
- };
453
- type XAxisPrimitiveProps = {
454
- /**
455
- * Format a tick label. Receives the chart's x values: the category value on
456
- * band/point scales, a `Date` on time scales, and a number on linear scales.
457
- * The second argument carries the `defaultLabel` the axis paints without a
458
- * formatter, so a formatter can decorate it.
459
- */
460
- tickFormat?: (value: XValue, context: XTickContext) => string;
461
- /**
462
- * Target tick count (continuous scales only; a density-derived default
463
- * otherwise). Approximate: ticks land on human-friendly steps, and a linear
464
- * axis whose x values are all integers never renders fractional ticks —
465
- * the integer step wins over the requested count.
466
- */
467
- tickCount?: number;
468
- };
469
- type YAxisPrimitiveProps = {
470
- /**
471
- * Format a tick label. Defaults to thousands-separated numbers. The second
472
- * argument carries the tick `step` and the `defaultLabel`, whose precision
473
- * follows the step. A formatter that adds a unit can decorate
474
- * `defaultLabel` and needs no precision of its own.
475
- */
476
- tickFormat?: (value: number, context: YTickContext) => string;
477
- /**
478
- * Maximum tick count. When omitted, the axis aims for about 5 ticks. Ticks
479
- * land on human-friendly steps, so the axis can render fewer. The plot
480
- * height also limits the count: a vertical axis keeps about 28px for each
481
- * tick, and it drops a label that would overlap its neighbor. When every
482
- * series value is an integer (counts), the axis never renders fractional
483
- * ticks.
484
- */
485
- tickCount?: number;
486
- };
487
- type ReferenceLinePrimitiveProps = {
488
- /** The y value the line marks (an SLO threshold, a budget, a limit). */
489
- y: number;
490
- /** A short label painted above the line's right end. */
491
- label?: string;
492
- /** Line color; defaults to the neutral reference color. */
493
- color?: SeriesColor;
494
- };
495
419
  /**
496
420
  * Root props shared by every chart kind, WITHOUT the accessibility/interaction
497
421
  * union or the data/x props. Public wrappers `Omit` from this base and
498
- * re-intersect `ChartAccessibilityProps` — `Omit` over a union type flattens
422
+ * re-intersect `ChartAccessibilityProps`: `Omit` over a union type flattens
499
423
  * it, which would silently make the required accessible name optional and
500
424
  * erase the `mode` discriminant.
501
425
  */
@@ -512,8 +436,8 @@ type ChartRootBaseProps = Omit<ComponentProps<"div">, "aria-label" | "aria-label
512
436
  /** Animate enter/update transitions. `prefers-reduced-motion` always wins. */
513
437
  animate?: boolean;
514
438
  /**
515
- * Hold the previous render at reduced opacity while fresh data loads —
516
- * never swap a chart that has rendered once for a skeleton.
439
+ * Hold the previous render at reduced opacity while fresh data loads.
440
+ * Never swap a chart that has rendered once for a skeleton.
517
441
  */
518
442
  pending?: boolean;
519
443
  };
@@ -529,4 +453,4 @@ type TooltipPrimitiveProps = Omit<ComponentProps<"div">, "children"> & {
529
453
  /** Replace the entire readout. */
530
454
  children?: (snapshot: HoverSnapshot) => ReactNode;
531
455
  };
532
- export { CurveKind as _, XAxisPrimitiveProps as a, LegendPrimitiveProps as c, ChartMode as d, BarOrientation as f, ContinuousXScale as g, ChartDatumEvent as h, ReferenceLinePrimitiveProps as i, CopyButtonPrimitiveProps as l, ChartDatum as m, ChartRootBaseProps as n, YAxisPrimitiveProps as o, BarTexture as p, GridPrimitiveProps as r, ChartListPrimitiveProps as s, TooltipPrimitiveProps as t, ChartAccessibilityProps as u, PointShape as v, SeriesColor as y };
456
+ export { XValue as _, ChartMode as a, BarTexture as c, ContinuousXScale as d, CurveKind as f, XTickContext as g, SeriesColor as h, ChartAccessibilityProps as i, ChartDatum as l, PointShape as m, ChartRootBaseProps as n, ChartListPrimitiveProps as o, GridLines as p, LegendPrimitiveProps as r, BarOrientation as s, TooltipPrimitiveProps as t, ChartDatumEvent as u, YTickContext as v };
@@ -0,0 +1 @@
1
+ import e from"tiny-invariant";import{C as t,E as n,T as r}from"./chart-BmZoTjRu.js";import{r as i,t as a}from"./chart-Bybyh2Dc.js";const o={west:-180,south:-90,east:180,north:90},s=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]],c=Math.PI/2*1.0144,l=Math.PI/180,u=(e,t)=>{let n=(Math.abs(e)<=180?e:((e+180)%360+360)%360-180)*l,r=Math.min(18,Math.abs(t)/5),i=Math.floor(r),a=r-i,o=s[i]??[1,0],u=s[i+1]??[1,0],d=s[i+2]??u,f=e=>u[e]+a*(d[e]-o[e])/2+a*a*(d[e]-2*u[e]+o[e])/2,p=c*f(1);return[n*f(0),t<0?-p:p]},d=(e,t,{inset:n})=>{let r=t.west>=180||t.east<=-180?-360*Math.floor((t.west+180)/360):0,i=Math.max(-180,t.west+r),a=Math.min(180,t.east+r),{south:o,north:s}=t,c=(o*s<0?[o,0,s]:[o,s]).flatMap(e=>[u(i,e)[0],u(a,e)[0]]),l=[u(0,o)[1],u(0,s)[1]],d=Math.min(...c),f=Math.max(...c),p=Math.min(...l),m=Math.max(...l),h=Math.max(0,e.width-n*2),g=Math.max(0,e.height-n*2),_=Math.min(h/Math.max(f-d,1e-9),g/Math.max(m-p,1e-9));return{scale:_,centerX:e.left+e.width/2-(d+f)/2*_,centerY:e.top+e.height/2+(p+m)/2*_}},f=(e,t,n)=>{let[r,i]=u(t,n);return[e.centerX+r*e.scale,e.centerY-i*e.scale]},p=(e,t)=>{let n=[],r=[0,0],i=0,a=0;for(;i<e.length;){let o=0,s=0,c;do c=e.charCodeAt(i)-63,i+=1,s|=(c&31)<<o,o+=5;while(c>=32);let l=s&1?~(s>>1):s>>1,u=(r[a]??0)+l;r[a]=u,n.push(u/t),a=1-a}return n},m=e=>{let t=[];for(let n=0;n<e.length;n+=2)t.push(...u(e[n]??0,e[n+1]??0));return t},h=(e,t,n)=>{for(let n=0;n<t.length;n+=2){let r=t[n]??0,i=t[n+1]??0;n===0?e.moveTo(r,i):e.lineTo(r,i)}n&&e.closePath()},g=e=>{let t=[];for(let n=90;n>=-90;n-=2.5)t.push(...u(e,n));return t},_=/* @__PURE__ */ new WeakMap,v=e=>{let t=_.get(e);if(t!=null)return t;let n={land:new Path2D,outline:new Path2D,graticule:new Path2D};for(let t of e.rings)h(n.land,m(p(t,e.precision)),!0);let r=g(180),i=g(-180);for(let e=i.length-2;e>=0;e-=2)r.push(i[e]??0,i[e+1]??0);h(n.outline,r,!0);for(let e=-150;e<180;e+=30)h(n.graticule,g(e),!1);for(let e=-60;e<90;e+=30)h(n.graticule,m([-180,e,180,e]),!1);return _.set(e,n),n},y=(e,t)=>{let n=new Path2D;return n.addPath(e,{a:t.scale,d:-t.scale,e:t.centerX,f:t.centerY}),n},b=(e,t)=>{let n=e*l,r=t*l;return[Math.cos(r)*Math.cos(n),Math.cos(r)*Math.sin(n),Math.sin(r)]},x=(e,t)=>{let n=b(e.longitude,e.latitude),r=b(t.longitude,t.latitude),i=Math.min(1,Math.max(-1,n[0]*r[0]+n[1]*r[1]+n[2]*r[2])),a=Math.acos(i),o=Math.max(1,Math.ceil(a/(2*l))),s=Math.sin(a),c=[],u=[c];for(let e=0;e<=o;e++){let t=e/o,i=s<1e-9?1-t:Math.sin((1-t)*a)/s,d=s<1e-9?t:Math.sin(t*a)/s,f=i*n[0]+d*r[0],p=i*n[1]+d*r[1],m=i*n[2]+d*r[2],h=Math.atan2(p,f)/l,g=Math.atan2(m,Math.hypot(f,p))/l,_=c.at(-2),v=c.at(-1);if(_!=null&&v!=null&&Math.abs(h-_)>180){let e=_>0?180:-180,t=v+(e-_)/(h+2*e-_)*(g-v);_!==e&&c.push(e,t),c=h===-e?[]:[-e,t],u.push(c)}c.push(h,g)}return u},S=(e,t)=>{let n=new Path2D;for(let r of x(e,t))h(n,m(r),!1);return n},C=(e,[t,n])=>{let r=Math.round(Math.abs(e)*10)/10;return r===0?`0.0°`:`${r.toFixed(1)}° ${e<0?n:t}`},w=(e,t)=>`${C(t,[`N`,`S`])}, ${C(e,[`E`,`W`])}`,T=.6,E=1/510,D=e=>t(Math.max(0,e)/900);var O=class{land;bounds;connectors=/* @__PURE__ */ new Map;callouts=/* @__PURE__ */ new Map;version=0;#e=null;constructor(e,t){this.land=e,this.bounds=t}createView=e=>new j(e,this);setBounds(e){this.bounds=e,this.changed()}listen(e){this.#e=e}changed(){this.version+=1,this.#e?.paint()}calloutsChanged(){this.#e?.place()}};const k=e=>`isPointInPath`in e,A=(e,t)=>e.scale===t.scale&&e.centerX===t.centerX&&e.centerY===t.centerY;var j=class{kind=`geo`;#e;#t;#n=0;#r=/* @__PURE__ */ new Float64Array;#i=null;#a=null;#o=null;#s=null;#c=null;#l=[];#u=!1;constructor(e,t){this.#e=e,this.#t=t,t.listen({paint:e.requestPaint,place:()=>{this.#u=!0,e.requestPaint()}})}settle(){this.#l=[]}tick(e){return this.#n=e,this.#l=this.#e.animates()?this.#l.filter(t=>T*(1-D(e-t.start))>=E):[],this.#l.length>0}resetProjection(){this.#h(),this.#y(),this.#b()}paint(t){let n=this.#e.colors();if(n==null)return null;e(k(t),`WorldMap paints on the canvas backend only.`);let r=this.#f();this.#u&&this.#b();let o=this.#p(r);t.fillStyle=n.resolve(`var(--world-map-ocean-color, var(--color-neutral-50))`),t.fill(o.outline),this.#e.grid()&&(t.save(),t.clip(o.outline),t.strokeStyle=n.chrome.grid,t.lineWidth=1,t.stroke(o.graticule),t.restore()),t.fillStyle=n.resolve(`var(--world-map-land-color, var(--color-neutral-200))`),t.fill(o.land),t.strokeStyle=n.chrome.grid,t.lineWidth=1,t.stroke(o.outline);for(let e of this.#m(r))t.save(),t.strokeStyle=n.resolve(e.color),t.lineWidth=1.5,t.lineCap=`round`,t.setLineDash(e.dashed?[4,4]:[]),t.stroke(e.path),t.restore();let s=this.#e.specs();if(this.#e.rowCount()===0||s.length===0)return this.#l=[],null;let c=this.#g(),l=this.#r.length>0?Math.min(c.total,a):c.total,{scale:u,centerX:d,centerY:p}=r,m=this.#r;t.save();for(let{seriesIndex:e,indexes:r}of c.runs){let a=s[e],o=c.x[e],f=c.y[e];if(a==null||o==null||f==null)continue;let h=this.#e.reveal(a.dataKey);h<E||(t.globalAlpha=h,i(t,{color:n.series.get(a.dataKey)??`currentColor`,surface:n.chrome.surface,shape:this.#e.shape(a.dataKey),totalPointCount:l,indexes:r,xAt:e=>d+(o[e]??0)*u,yAt:e=>p-(f[e]??0)*u,radiusAt:e=>m[e]??4}))}t.restore();for(let e of this.#l){let i=D(this.#n-e.start),[a,o]=f(r,e.longitude,e.latitude),c=s[e.seriesIndex];t.save(),t.globalAlpha=T*(1-i),t.strokeStyle=c==null?`currentColor`:n.series.get(c.dataKey)??`currentColor`,t.lineWidth=2,t.beginPath(),t.arc(a,o,e.radius+14*i,0,Math.PI*2),t.stroke(),t.restore()}return null}hitAt(e,t){if(!this.#d(e,t))return null;let{scale:n,centerX:r,centerY:i}=this.#f(),a=this.#g(),o=this.#e.specs(),s=this.#r,c=(e-r)/n,l=(i-t)/n,u=1/n**2,d=576*u,f=null;for(let{seriesIndex:e,indexes:t}of a.runs.toReversed()){let p=o[e],m=a.x[e],h=a.y[e];if(p!=null&&m!=null&&h!=null)for(let e=t.length-1;e>=0;e--){let a=t[e]??0,o=m[a]??0,g=h[a]??0,_=(o-c)**2+(g-l)**2,v=s.length>0&&_<=(s[a]??0)**2*u;if(!v&&_>=d)continue;let y=r+o*n,b=i-g*n;if(this.#d(y,b)&&(d=_,f={seriesKey:p.dataKey,index:a,screenX:y,screenY:b},v))return f}}return f}screenFor(e,t){let n=this.#f(),r=this.#g(),i=this.#e.columns(),a=this.#e.specs();for(let o=0;o<i.length;o++)if((t==null||a[o]?.dataKey===t)&&!Number.isNaN(i[o]?.[e]??NaN)){let t=n.centerX+(r.x[o]?.[e]??0)*n.scale,i=n.centerY-(r.y[o]?.[e]??0)*n.scale;return this.#d(t,i)?{x:t,y:i}:null}return null}plots(e){return this.screenFor(e,null)!=null}radiusAt(e){return this.#r[e]??4}#d(e,t){let n=this.#e.plot();return e>=n.left-.5&&e<=n.left+n.width+.5&&t>=n.top-.5&&t<=n.top+n.height+.5}#f(){let e=this.#e.plot(),t=this.#t.bounds,n=d(e,t??o,{inset:t==null?.5:0}),r=this.#i;return r!=null&&A(r,n)?r:(this.#i=n,this.#b(),n)}#p(e){let t=this.#a;if(t?.fit===e)return t;let n=v(this.#t.land),r={fit:e,land:y(n.land,e),outline:y(n.outline,e),graticule:y(n.graticule,e)};return this.#a=r,r}#m(e){let t=this.#t,n=this.#o;if(n!=null&&n.fit===e&&n.version===t.version)return n.lines;let r=[...t.connectors.values()].map(t=>({path:y(S(t.from,t.to),e),color:t.color,dashed:t.lineStyle===`dashed`}));return this.#o={fit:e,version:t.version,lines:r},r}#h(){let t=this.#e,i=t.sizeKey();if(i==null){this.#r=/* @__PURE__ */ new Float64Array;return}let a=t.rowCount(),o=new Float64Array(a),s=0,c=!1;for(let e=0;e<a;e++){let n=t.sourceRow(e),a=n==null?void 0:r(n,i);c||=a!==void 0;let l=typeof a==`number`&&Number.isFinite(a)&&a>0?a:0;o[e]=l,s=Math.max(s,l)}e(a===0||c,()=>n(`WorldMap.Root`,`sizeKey`,i,Array.from({length:a},(e,n)=>t.sourceRow(n)??{})));for(let e=0;e<a;e++)o[e]=Math.max(4,16*Math.sqrt((o[e]??0)/(s||1)));this.#r=o}#g(){let e=this.#e.columns(),t=this.#s;if(t?.columns===e)return t;let n=this.#_(e),r={columns:e,...this.#v(e),runs:n,total:n.reduce((e,t)=>e+t.indexes.length,0)};return this.#s=r,r}#_(e){let t=e.map(e=>this.#e.definedIndexes(e));if(this.#r.length===0)return t.map((e,t)=>({seriesIndex:t,indexes:e}));let n=t.flatMap((e,t)=>e.map(e=>({seriesIndex:t,index:e}))).toSorted((e,t)=>this.radiusAt(t.index)-this.radiusAt(e.index)),r=[];for(let{seriesIndex:e,index:t}of n){let n=r.at(-1);n?.seriesIndex===e?n.indexes.push(t):r.push({seriesIndex:e,indexes:[t]})}return r}#v(e){let t=this.#e.xs(),n=this.#e.rowCount(),r=[],i=[];for(let a of e){let e=new Float64Array(n),o=new Float64Array(n);for(let r=0;r<n;r++){let n=a[r]??NaN;if(Number.isNaN(n))continue;let[i,s]=u(t[r]??0,n);e[r]=i,o[r]=s}r.push(e),i.push(o)}return{x:r,y:i}}#y(){let e=this.#e,t=e.rowCount(),n=this.#c;if(t>5e3||t===0&&n==null){this.#c=null,this.#l=[];return}let r=n!=null&&e.animates(),i=performance.now(),a=e.xs(),o=/* @__PURE__ */ new Set,s=/* @__PURE__ */ new Map;e.columns().forEach((c,l)=>{let u=e.specs()[l]?.dataKey??``;for(let e=0;e<t;e++){let t=c[e]??NaN;if(Number.isNaN(t))continue;let d=a[e]??NaN,f=`${u}|${d}|${t}`;if(o.add(f),r&&!n.has(f)){let n=Math.max(this.radiusAt(e),s.get(f)?.radius??0);s.set(f,{seriesIndex:l,longitude:d,latitude:t,radius:n,start:i})}}}),s.size<=48&&(this.#l=[...this.#l,...s.values()].slice(-48)),this.#c=o}#b(){this.#u=!1;let e=this.#i,t=this.#t.callouts;if(e==null||t.size===0)return;let n=this.#e.plot(),r=this.#e.plotOffset();for(let{element:i,place:a,side:o,size:s}of t.values()){if(s==null)continue;let[t,c]=f(e,a.longitude,a.latitude);if(!this.#d(t,c)){i.style.visibility=`hidden`;continue}let{width:l,height:u}=s,d=this.#x(a)+8,p=Math.min(Math.max(t-l/2,n.left),Math.max(n.left,n.left+n.width-l)),m=c-d-u,h=c+d,g=m>=n.top,_=h+u<=n.top+n.height,v=o===`top`?g||!_:!_&&g,y=v?Math.max(n.top,m):Math.min(h,Math.max(n.top,n.top+n.height-u));i.dataset.side=v?`top`:`bottom`,i.style.transform=`translate(${Math.round(r.left+p)}px, ${Math.round(r.top+y)}px)`,i.style.visibility=`visible`}}#x(e){if(this.#r.length===0)return 4;let t=this.#e.xs(),n=4;for(let r of this.#e.columns())for(let i=0;i<r.length;i++)t[i]===e.longitude&&r[i]===e.latitude&&(n=Math.max(n,this.radiusAt(i)));return n}};export{w as n,O as t};
@@ -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}from"react";import o from"tiny-invariant";import{t as s}from"./behaviors-DHVC34f9.js";import{t as c}from"./hooks-C9b-2wGy.js";import{t as l}from"./compose-refs-Ce1vWUz0.js";import{t as u}from"./cx-DhYnQ07J.js";import{n as d}from"./cx-CfAFHj5_.js";import{t as f}from"./utils-EM6s2WEU.js";import{t as p}from"./utils-CPSttKPD.js";import{t as m}from"./radio-group-BliblUqe.js";import{t as h}from"./slot-CBcGhRdV.js";import{t as g}from"./checkbox-TX74-Iep.js";import{jsx as _,jsxs as v}from"react/jsx-runtime";const y=[],b=`[data-slot~="checkbox-group-card"] > input[type="checkbox"]`,x=e(null),S=({"data-slot":e,children:t,defaultValue:r=y,disabled:o=!1,form:u,name:d,onValueChange:p,ref:m,value:h,...g})=>{let[v,S]=s({value:h,defaultValue:r,onChange:e=>p?.([...e])}),C=a(null),w=c(e=>{let t=Array.from(e?.querySelectorAll(b)??[]),n=new Set(t.filter(e=>!e.checked).map(e=>e.value)),r=v.filter(e=>!n.has(e)),i=t.filter(e=>e.checked&&!r.includes(e.value)).map(e=>e.value);(r.length!==v.length||i.length>0)&&S([...r,...i])}),T=a(null),E=l(m,C,w),D=()=>C.current?.querySelectorAll(b)??[],O=c(()=>{for(let e of D())e.defaultChecked=e.checked}),k=c(()=>{S(r);let e=h??r;for(let t of D())t.checked=e.includes(t.value)});n(()=>{let e=C.current,t=u==null?e?.closest(`form`):e?.ownerDocument.getElementById(u),n,r=e=>{O(),n=window.setTimeout(()=>{e.defaultPrevented||k()})};return t?.addEventListener(`reset`,r),()=>{t?.removeEventListener(`reset`,r),window.clearTimeout(n)}},[k,u,O]);let A=i(()=>({value:v,setChecked:({value:e,checked:t})=>{let n=T.current,r=n!=null&&n.from===v?n.value:v;if(r.includes(e)===t)return;let i=t?[...r,e]:r.filter(t=>t!==e);T.current={from:v,value:i},queueMicrotask(()=>{T.current=null}),S(i)},disabled:o,name:d||void 0,form:d?u:void 0}),[v,S,o,d,u]);return/* @__PURE__ */ _(x.Provider,{value:A,children:/* @__PURE__ */ _(`div`,{role:`group`,"data-slot":f(e,`checkbox-group`),...g,ref:E,children:t})})},C=({"aria-describedby":e,"aria-label":n,"aria-labelledby":s,autoFocus:c,children:l,className:u,"data-slot":h,disabled:y=!1,id:b,onClick:S,value:C,...w})=>{let T=t(x);o(T,`CheckboxGroup.Card must be rendered inside CheckboxGroup.Root.`);let E=r(),D=b??E,O=`${E}-title`,k=`${E}-description`,A=`${E}-content`,j=a(null),M=a(!1),N=T.value.includes(C),P=T.disabled||y,F=i(()=>({titleId:O,descriptionId:k,radioId:D,contentId:A,checked:N,disabled:P}),[O,k,D,A,N,P]);return/* @__PURE__ */ _(m.Provider,{value:F,children:/* @__PURE__ */ v(`div`,{"data-slot":f(h,`checkbox-group-card`),className:d(`group/checkbox border-card bg-card [&_label]:cursor-inherit relative isolate block rounded-md border p-4 text-sm cursor-pointer has-[>input:disabled]:cursor-default has-[>input:focus-visible]:focus-ring has-[>input:disabled]:border-form/50 not-has-[>input:disabled]:hover:bg-card-hover has-[>input:checked]:border-accent-500/50 has-[>input:checked]:bg-selected-menu-item not-has-[>input:disabled]:hover:has-[>input:checked]:bg-active-selected-menu-item`,u),...w,onClick:e=>{if(M.current)return;S?.(e);let t=j.current;if(t==null)return;if(e.target===t){e.detail>0&&!e.defaultPrevented&&t.focus({preventScroll:!0});return}let n=e.target instanceof Element?e.target.closest(p):null;e.defaultPrevented||n!=null&&e.currentTarget.contains(n)||(t.focus({preventScroll:!0}),M.current=!0,t.click(),M.current=!1)},children:[/* @__PURE__ */ _(g,{"aria-describedby":e?`${e} ${k}`:k,"aria-label":n,"aria-labelledby":s??(n==null?A:void 0),autoFocus:c,checked:N,className:`absolute inset-0 z-1 m-0 size-full cursor-inherit opacity-0! disabled:pointer-events-none`,defaultValue:C,disabled:P,form:T.form,id:D,name:T.name,onCheckedChange:e=>T.setChecked({value:C,checked:e}),ref:e=>{if(j.current=e,e==null)return;e.getAttribute(`aria-labelledby`)===A&&Array.from(e.parentElement?.getElementsByTagName(`label`)??[]).some(e=>e.htmlFor===D)&&e.removeAttribute(`aria-labelledby`);let t=e.nextElementSibling;Array.from(t?.querySelectorAll(`a[href], button, details, input, select, textarea, label, [role="button"], [role="link"], [role="menuitem"], [tabindex]:not([tabindex="-1"]), [contenteditable="true"]`)??[]).some(e=>!(e instanceof HTMLLabelElement&&e.htmlFor===D))?t?.removeAttribute(`aria-hidden`):t?.setAttribute(`aria-hidden`,`true`)}}),/* @__PURE__ */ _(`div`,{id:A,"data-slot":`checkbox-group-card-label`,className:`covered-item-content contents`,children:l})]})})},w=/* @__PURE__ */ _(`span`,{className:u(`block size-4 shrink-0 rounded border bg-center bg-no-repeat`,`bg-form border-form`,`group-has-[>input:checked]/checkbox:border-accent-600 group-has-[>input:checked]/checkbox:bg-accent-600 group-has-[>input:checked]/checkbox:bg-checked-icon`,`group-hover/checkbox:group-has-[>input:enabled:not(:checked)]/checkbox:border-neutral-400`,`group-has-[>input:disabled]/checkbox:opacity-50`)}),T=({"data-slot":e,children:n,className:r,...i})=>{let a=t(m),o=typeof n==`function`?n({checked:a?.checked??!1,disabled:a?.disabled??!1}):n;return/* @__PURE__ */ _(`span`,{"data-slot":f(e,`checkbox-group-indicator`),className:d(`inline-flex size-5 select-none items-center justify-center shrink-0`,r),...i,children:n==null?w:o})},E=({"data-slot":e,asChild:t=!1,className:n,...r})=>/* @__PURE__ */ _(t?h:`div`,{"data-slot":f(e,`checkbox-group-item-content`),className:d(`min-w-0 flex-1 group-has-[>input:disabled]/checkbox:opacity-50`,n),...r});export{S as i,T as n,E as r,C as t};
@@ -0,0 +1 @@
1
+ function e({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{e as t};
@@ -0,0 +1 @@
1
+ "use client";import{useRef as e,useState as t}from"react";import{t as n}from"./hooks-DejuqCNF.js";import{t as r}from"./compose-refs-Ce1vWUz0.js";import{t as i}from"./cx-DhYnQ07J.js";import{t as a}from"./utils-EM6s2WEU.js";import{n as o}from"./field-BRYypbjO.js";import{n as s}from"./field-CYAaNexp.js";import{jsx as c}from"react/jsx-runtime";const l=e=>e===`indeterminate`,u=({"data-slot":u,"aria-invalid":d,className:f,checked:p,defaultChecked:m,defaultValue:h=`on`,onChange:g,onCheckedChange:_,onClick:v,readOnly:y,ref:b,validation:x,...S})=>{let C=e(null),w=r(C,b),[T]=t(m),E=s(),{ariaInvalid:D,validation:O}=o({"aria-invalid":d,validation:x??E}),k=p??T;n(()=>{C.current&&(C.current.indeterminate=l(k))},[k]);let A=p==null?{defaultChecked:l(T)?void 0:T}:{checked:!l(p)&&p};return/* @__PURE__ */ c(`input`,{"aria-checked":l(p)?`mixed`:p,"aria-invalid":D,"aria-readonly":y||void 0,"data-slot":a(u,`checkbox`),className:i(`border-form bg-form shrink-0 cursor-pointer select-none appearance-none rounded border disabled:cursor-default disabled:opacity-50`,`bg-center bg-no-repeat focus:outline-hidden`,`focus-visible:border-accent-600 focus-visible:focus-ring`,`checked:border-accent-600 checked:bg-accent-600 checked:bg-checked-icon`,`indeterminate:border-accent-600 indeterminate:bg-accent-600 indeterminate:bg-indeterminate-icon`,`data-[validation=success]:border-success-600 data-[validation=success]:checked:bg-success-600 data-[validation=success]:indeterminate:bg-success-600 focus-visible:data-[validation=success]:border-success-600 focus-visible:data-[validation=success]:ring-focus-success`,`data-[validation=warning]:border-warning-600 data-[validation=warning]:checked:bg-warning-600 data-[validation=warning]:indeterminate:bg-warning-600 focus-visible:data-[validation=warning]:border-warning-600 focus-visible:data-[validation=warning]:ring-focus-warning`,`data-[validation=error]:border-danger-600 data-[validation=error]:checked:bg-danger-600 data-[validation=error]:indeterminate:bg-danger-600 focus-visible:data-[validation=error]:border-danger-600 focus-visible:data-[validation=error]:ring-focus-danger`,`where:block where:size-4 where:p-0`,f),...A,"data-validation":O||void 0,defaultValue:h,onChange:g==null&&_==null?void 0:e=>{g?.(e),y||_?.(e.currentTarget.checked)},onClick:e=>{y?e.preventDefault():v?.(e)},readOnly:y,ref:w,type:`checkbox`,...S})};export{u as t};
@@ -0,0 +1,197 @@
1
+ /**
2
+ * The parts of the `CheckboxGroup` namespace. `index.ts` imports them as one
3
+ * module namespace, so a bundler keeps only the parts a consumer reads.
4
+ */
5
+ import { ComponentProps, ReactNode, Ref } from "react";
6
+ import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
7
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
8
+ type CheckboxGroupRootProps = Omit<ComponentProps<"div">, "defaultValue" | "ref"> & {
9
+ /** The checked values. Pair it with `onValueChange`. */
10
+ value?: string[];
11
+ /**
12
+ * The checked values on first render, for an uncontrolled group. A form reset returns to them.
13
+ * @default []
14
+ */
15
+ defaultValue?: string[];
16
+ /** The event handler called with the checked values after the user checks or unchecks a card. */
17
+ onValueChange?: (value: string[]) => void;
18
+ /**
19
+ * Whether every card is disabled.
20
+ * @default false
21
+ */
22
+ disabled?: boolean;
23
+ /** The form field name. With a name, a form submits one entry for each checked value. */
24
+ name?: string;
25
+ /** The `id` of the form the checkboxes belong to, when the group sits outside it. Needs a `name`. */
26
+ form?: string;
27
+ ref?: Ref<HTMLDivElement>;
28
+ } & WithDataSlot;
29
+ /**
30
+ * A group of checkbox cards. It holds the checked values, and the user can
31
+ * check any number of cards. Each card holds a native
32
+ * `<input type="checkbox">`, so the browser owns each Tab stop, Space, and
33
+ * the form contract: with a `name`, a form submits one entry for each checked
34
+ * value, and a reset returns to `defaultValue`.
35
+ *
36
+ * The recommended Field composition is `Field.Set` + `Field.Legend` +
37
+ * `CheckboxGroup.Root`: the legend names the set. Inside any card, a
38
+ * `Choice.Title` names the option through `aria-labelledby`, and a
39
+ * `Choice.Description` describes it through `aria-describedby`.
40
+ *
41
+ * Why no `asChild`: the root is the `role="group"` element around the
42
+ * checkboxes, and its form reset reads the cards inside it.
43
+ *
44
+ * @see https://mantle.ngrok.com/components/forms/checkbox#checkboxgrouproot
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <CheckboxGroup.Root aria-label="Interests" defaultValue={["tunnels"]} name="interests">
49
+ * <CheckboxGroup.Card value="tunnels">
50
+ * <CheckboxGroup.ItemContent>
51
+ * <p className="text-strong font-medium">Tunnels</p>
52
+ * <p className="text-muted">Put a local service online.</p>
53
+ * </CheckboxGroup.ItemContent>
54
+ * <CheckboxGroup.Indicator />
55
+ * </CheckboxGroup.Card>
56
+ * <CheckboxGroup.Card value="gateway">
57
+ * <CheckboxGroup.ItemContent>
58
+ * <p className="text-strong font-medium">API gateway</p>
59
+ * <p className="text-muted">Secure and route API traffic.</p>
60
+ * </CheckboxGroup.ItemContent>
61
+ * <CheckboxGroup.Indicator />
62
+ * </CheckboxGroup.Card>
63
+ * </CheckboxGroup.Root>
64
+ * ```
65
+ */
66
+ declare const Root: ({ "data-slot": dataSlot, children, defaultValue, disabled, form, name, onValueChange, ref, value, ...props }: CheckboxGroupRootProps) => import("react").JSX.Element;
67
+ type CheckboxGroupCardProps = Omit<ComponentProps<"div">, "children"> & {
68
+ children?: ReactNode;
69
+ /**
70
+ * Whether this card is disabled.
71
+ * @default false
72
+ */
73
+ disabled?: boolean;
74
+ /** The value the group adds when the user checks this card. Required: a form submits it. */
75
+ value: string;
76
+ /** Focus this card's checkbox on mount. */
77
+ autoFocus?: boolean;
78
+ } & WithDataSlot;
79
+ /**
80
+ * A checkbox card. Use it inside `CheckboxGroup.Root`, alone or in a layout
81
+ * element such as a grid. It looks like `RadioGroup.Card`: a bordered card
82
+ * that takes an accent border and tint when checked.
83
+ *
84
+ * It renders a `<div>` with a native `<input type="checkbox">` that covers
85
+ * it, over its content. Assistive technology outlines the whole card, and a
86
+ * click anywhere on it toggles the checkbox. Links, buttons, labels, and form
87
+ * controls in the card sit over the checkbox and keep their own clicks. When
88
+ * the card holds none, assistive technology skips its text, which already
89
+ * names the checkbox, so it stops once on each card. Style its state with
90
+ * `has-[>input:checked]:`, `has-[>input:disabled]:`, and
91
+ * `has-[>input:focus-visible]:`; from a child, use `group-has-[>input:checked]/checkbox:`.
92
+ *
93
+ * `id`, `autoFocus`, `aria-label`, `aria-labelledby`, and `aria-describedby`
94
+ * go to the checkbox; the rest go to the card's `<div>`. A `Choice.Title`
95
+ * inside the card names it through `aria-labelledby`, and a
96
+ * `Choice.Description` describes it through `aria-describedby`.
97
+ *
98
+ * | Data Attribute | Value | Description |
99
+ * | -------------- | ------------------------------- | --------------------------------------------------------------- |
100
+ * | `data-slot` | `"checkbox-group-card"` | The card. |
101
+ * | `data-slot` | `"checkbox-group-card-label"` | The `display: contents` wrapper of the card's children. |
102
+ *
103
+ * Why no `asChild`: the card must render the native checkbox as its first child.
104
+ *
105
+ * @see https://mantle.ngrok.com/components/forms/checkbox#checkboxgroupcard
106
+ *
107
+ * @example
108
+ * ```tsx
109
+ * <CheckboxGroup.Root aria-label="Interests" defaultValue={["tunnels"]} name="interests">
110
+ * <CheckboxGroup.Card value="tunnels">
111
+ * <CheckboxGroup.ItemContent>
112
+ * <p className="text-strong font-medium">Tunnels</p>
113
+ * <p className="text-muted">Put a local service online.</p>
114
+ * </CheckboxGroup.ItemContent>
115
+ * <CheckboxGroup.Indicator />
116
+ * </CheckboxGroup.Card>
117
+ * <CheckboxGroup.Card value="gateway">
118
+ * <CheckboxGroup.ItemContent>
119
+ * <p className="text-strong font-medium">API gateway</p>
120
+ * <p className="text-muted">Secure and route API traffic.</p>
121
+ * </CheckboxGroup.ItemContent>
122
+ * <CheckboxGroup.Indicator />
123
+ * </CheckboxGroup.Card>
124
+ * </CheckboxGroup.Root>
125
+ * ```
126
+ */
127
+ declare const Card: ({ "aria-describedby": ariaDescribedBy, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, autoFocus, children, className, "data-slot": dataSlot, disabled: disabledProp, id, onClick, value, ...props }: CheckboxGroupCardProps) => import("react").JSX.Element;
128
+ /** The state of the card that a render-props `CheckboxGroup.Indicator` receives. */
129
+ type CheckboxGroupIndicatorState = {
130
+ checked: boolean;
131
+ disabled: boolean;
132
+ };
133
+ type CheckboxGroupIndicatorProps = Omit<ComponentProps<"span">, "children"> & {
134
+ /** A custom mark, or a function of the card's state that returns one. Without it, the indicator draws a check box. */
135
+ children?: ReactNode | ((state: CheckboxGroupIndicatorState) => ReactNode);
136
+ } & WithDataSlot;
137
+ /**
138
+ * The selection mark of a `CheckboxGroup.Card`. By default, it is a check
139
+ * box that fills when the card is checked. To change the mark, pass:
140
+ * - a different element, styled from the card's state with
141
+ * `group-has-[>input:checked]/checkbox:`, such as a checkmark that shows
142
+ * only when checked
143
+ * - a render-props function that receives `{ checked, disabled }` and returns an element
144
+ *
145
+ * @see https://mantle.ngrok.com/components/forms/checkbox#checkboxgroupindicator
146
+ *
147
+ * @example
148
+ * ```tsx
149
+ * <CheckboxGroup.Root aria-label="Interests" defaultValue={["tunnels"]} name="interests">
150
+ * <CheckboxGroup.Card value="tunnels">
151
+ * <CheckboxGroup.ItemContent>
152
+ * <p className="text-strong font-medium">Tunnels</p>
153
+ * <p className="text-muted">Put a local service online.</p>
154
+ * </CheckboxGroup.ItemContent>
155
+ * <CheckboxGroup.Indicator />
156
+ * </CheckboxGroup.Card>
157
+ * <CheckboxGroup.Card value="gateway">
158
+ * <CheckboxGroup.ItemContent>
159
+ * <p className="text-strong font-medium">API gateway</p>
160
+ * <p className="text-muted">Secure and route API traffic.</p>
161
+ * </CheckboxGroup.ItemContent>
162
+ * <CheckboxGroup.Indicator />
163
+ * </CheckboxGroup.Card>
164
+ * </CheckboxGroup.Root>
165
+ * ```
166
+ */
167
+ declare const Indicator: ({ "data-slot": dataSlot, children, className, ...props }: CheckboxGroupIndicatorProps) => import("react").JSX.Element;
168
+ type CheckboxGroupItemContentProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
169
+ /**
170
+ * The content of a checkbox card: its title, description, and any other
171
+ * content. It fills the space beside the indicator and dims with a disabled
172
+ * card.
173
+ *
174
+ * @see https://mantle.ngrok.com/components/forms/checkbox#checkboxgroupitemcontent
175
+ *
176
+ * @example
177
+ * ```tsx
178
+ * <CheckboxGroup.Root aria-label="Interests" defaultValue={["tunnels"]} name="interests">
179
+ * <CheckboxGroup.Card value="tunnels">
180
+ * <CheckboxGroup.ItemContent>
181
+ * <p className="text-strong font-medium">Tunnels</p>
182
+ * <p className="text-muted">Put a local service online.</p>
183
+ * </CheckboxGroup.ItemContent>
184
+ * <CheckboxGroup.Indicator />
185
+ * </CheckboxGroup.Card>
186
+ * <CheckboxGroup.Card value="gateway">
187
+ * <CheckboxGroup.ItemContent>
188
+ * <p className="text-strong font-medium">API gateway</p>
189
+ * <p className="text-muted">Secure and route API traffic.</p>
190
+ * </CheckboxGroup.ItemContent>
191
+ * <CheckboxGroup.Indicator />
192
+ * </CheckboxGroup.Card>
193
+ * </CheckboxGroup.Root>
194
+ * ```
195
+ */
196
+ declare const ItemContent: ({ "data-slot": dataSlot, asChild, className, ...props }: CheckboxGroupItemContentProps) => import("react").JSX.Element;
197
+ export { Card, Indicator, ItemContent, Root };
@@ -0,0 +1 @@
1
+ export{t as Card,n as Indicator,r as ItemContent,i as Root}from"./checkbox-DH7WFfuR.js";