@ngrok/mantle 0.93.7 → 0.94.1

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 (311) hide show
  1. package/README.md +11 -2
  2. package/dist/accordion.d.ts +73 -21
  3. package/dist/accordion.js +1 -1
  4. package/dist/agent.json +1234 -84
  5. package/dist/alert-BkJHDx9X.js +1 -0
  6. package/dist/{alert-BcSBNR3S.d.ts → alert-D0zRRUHV.d.ts} +35 -25
  7. package/dist/alert-center.d.ts +67 -55
  8. package/dist/alert-center.js +1 -1
  9. package/dist/alert-dialog.d.ts +35 -10
  10. package/dist/alert-dialog.js +1 -1
  11. package/dist/alert.d.ts +6 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/anchor-Dc6IgvXV.js +1 -0
  14. package/dist/anchor.d.ts +17 -5
  15. package/dist/anchor.js +1 -1
  16. package/dist/app-layout.d.ts +33 -18
  17. package/dist/app-layout.js +1 -1
  18. package/dist/area-chart.d.ts +153 -97
  19. package/dist/area-chart.js +1 -1
  20. package/dist/avatar.d.ts +36 -24
  21. package/dist/avatar.js +1 -1
  22. package/dist/badge.d.ts +19 -7
  23. package/dist/badge.js +1 -1
  24. package/dist/bar-chart.d.ts +155 -100
  25. package/dist/bar-chart.js +1 -1
  26. package/dist/breadcrumb.d.ts +47 -36
  27. package/dist/breadcrumb.js +1 -1
  28. package/dist/browser-only-CZfkNw5A.js +1 -0
  29. package/dist/browser-only-ymFoM3Ya.js +1 -0
  30. package/dist/browser-only.d.ts +8 -0
  31. package/dist/browser-only.js +1 -1
  32. package/dist/{button-BX-4lYUn.d.ts → button-5Pc7Mby_.d.ts} +4 -4
  33. package/dist/button-B9bChDgl.js +1 -0
  34. package/dist/button-D8jixIbH.js +1 -0
  35. package/dist/button-DNLTJ32M.js +1 -0
  36. package/dist/{button-CPsKGDK0.d.ts → button-Ddj6yr10.d.ts} +34 -27
  37. package/dist/{button-Yxyu1XMd.d.ts → button-DnYv7IOT.d.ts} +29 -22
  38. package/dist/button.d.ts +9 -3
  39. package/dist/button.js +1 -1
  40. package/dist/calendar.d.ts +8 -1
  41. package/dist/calendar.js +1 -1
  42. package/dist/card.d.ts +7 -2
  43. package/dist/card.js +1 -1
  44. package/dist/centered-layout.d.ts +34 -23
  45. package/dist/centered-layout.js +1 -1
  46. package/dist/chart-BLCqzt56.js +1 -0
  47. package/dist/chart-CChZiCrt.js +1 -0
  48. package/dist/chart-CUmSu9d7.js +1 -0
  49. package/dist/{chart-BpfbtOUN.d.ts → chart-Dl8gFo_D.d.ts} +117 -121
  50. package/dist/chart-DtgZBAas.js +2 -0
  51. package/dist/checkbox-Cu5cgZmk.js +1 -0
  52. package/dist/checkbox.d.ts +15 -2
  53. package/dist/checkbox.js +1 -1
  54. package/dist/choice-CCVG2hb9.js +1 -0
  55. package/dist/{choice-BLR0_MeB.d.ts → choice-CNiOSzqV.d.ts} +26 -20
  56. package/dist/choice.d.ts +6 -1
  57. package/dist/choice.js +1 -1
  58. package/dist/code-BPKNY1_w.js +1 -0
  59. package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
  60. package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
  61. package/dist/code-block.d.ts +28 -19
  62. package/dist/code-block.js +1 -1
  63. package/dist/code-block_highlight-utils.d.ts +6 -1
  64. package/dist/code-block_highlight-utils.js +1 -1
  65. package/dist/code.d.ts +16 -3
  66. package/dist/code.js +1 -1
  67. package/dist/color-CHZbU1Ww.js +1 -0
  68. package/dist/color.js +1 -1
  69. package/dist/combobox.d.ts +42 -28
  70. package/dist/combobox.js +1 -1
  71. package/dist/command.d.ts +59 -47
  72. package/dist/command.js +1 -1
  73. package/dist/compose-refs-BdRUneoc.js +1 -0
  74. package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
  75. package/dist/cx.d.ts +4 -4
  76. package/dist/cx.js +1 -1
  77. package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
  78. package/dist/data-table.d.ts +83 -52
  79. package/dist/data-table.js +1 -1
  80. package/dist/description-list.d.ts +13 -2
  81. package/dist/description-list.js +1 -1
  82. package/dist/{dialog-2fRO4ca4.d.ts → dialog-CIEuwNys.d.ts} +32 -8
  83. package/dist/dialog-CbEEA0fl.d.ts +32 -0
  84. package/dist/dialog-DmzoDfY3.js +1 -0
  85. package/dist/dialog.d.ts +7 -2
  86. package/dist/dialog.js +1 -1
  87. package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-CeY498yk.d.ts} +41 -33
  88. package/dist/dropdown-menu-uheL0prz.js +1 -0
  89. package/dist/dropdown-menu.d.ts +6 -1
  90. package/dist/dropdown-menu.js +1 -1
  91. package/dist/empty.d.ts +7 -2
  92. package/dist/empty.js +1 -1
  93. package/dist/field-Bpvn4tQp.js +1 -0
  94. package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
  95. package/dist/field-Cai_4c1l.js +1 -0
  96. package/dist/field.d.ts +53 -42
  97. package/dist/field.js +1 -1
  98. package/dist/flag.d.ts +11 -3
  99. package/dist/flag.js +1 -1
  100. package/dist/hooks.d.ts +35 -10
  101. package/dist/hooks.js +1 -1
  102. package/dist/hover-card.d.ts +25 -14
  103. package/dist/hover-card.js +1 -1
  104. package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
  105. package/dist/{icon-ByLVhdYq.d.ts → icon-DuIYoyft.d.ts} +8 -2
  106. package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
  107. package/dist/icon-xb7d9M7X.js +1 -0
  108. package/dist/icon.d.ts +8 -3
  109. package/dist/icon.js +1 -1
  110. package/dist/icons-DEDCLZ8B.js +1 -0
  111. package/dist/icons-DXadFwpo.js +1 -0
  112. package/dist/icons-DcesO4Ng.js +1 -0
  113. package/dist/icons.d.ts +13 -1
  114. package/dist/icons.js +1 -1
  115. package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
  116. package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
  117. package/dist/input-BjCDSOPA.js +1 -0
  118. package/dist/{input-Dx5owTCc.d.ts → input-DC4nW0Sr.d.ts} +12 -2
  119. package/dist/input-fW8QSZEO.js +1 -0
  120. package/dist/input.d.ts +37 -5
  121. package/dist/input.js +1 -1
  122. package/dist/kbd-P1nQshWo.js +1 -0
  123. package/dist/kbd.d.ts +17 -5
  124. package/dist/kbd.js +1 -1
  125. package/dist/label-DO1RlMKl.js +1 -0
  126. package/dist/{label-Dn5CPJUj.d.ts → label-epgtywRz.d.ts} +14 -8
  127. package/dist/label.d.ts +6 -1
  128. package/dist/label.js +1 -1
  129. package/dist/layer-container-DL4yclOu.js +1 -0
  130. package/dist/layer-container.d.ts +2 -2
  131. package/dist/layer-container.js +1 -1
  132. package/dist/line-chart.d.ts +147 -90
  133. package/dist/line-chart.js +1 -1
  134. package/dist/list-cQZPSjfz.js +1 -0
  135. package/dist/list.d.ts +34 -16
  136. package/dist/list.js +1 -1
  137. package/dist/live-region-Dhapu8a5.js +1 -0
  138. package/dist/live-region.d.ts +15 -2
  139. package/dist/live-region.js +1 -1
  140. package/dist/llms.txt +82 -79
  141. package/dist/main-CHyWYDak.js +1 -0
  142. package/dist/main.d.ts +13 -1
  143. package/dist/main.js +1 -1
  144. package/dist/mantle.css +133 -88
  145. package/dist/media-object.d.ts +16 -4
  146. package/dist/media-object.js +1 -1
  147. package/dist/migrations/0014-chart-named-colors.yml +1389 -0
  148. package/dist/migrations/0015-segmented-control.yml +788 -0
  149. package/dist/multi-select.d.ts +42 -29
  150. package/dist/multi-select.js +1 -1
  151. package/dist/otp-input.d.ts +20 -8
  152. package/dist/otp-input.js +1 -1
  153. package/dist/pagination.d.ts +93 -4
  154. package/dist/pagination.js +1 -1
  155. package/dist/{popover-BfB2I9G0.d.ts → popover-Bei0jyfH.d.ts} +87 -12
  156. package/dist/popover-DhgunktK.js +1 -0
  157. package/dist/popover-T2EyaqGK.d.ts +1 -0
  158. package/dist/popover.d.ts +7 -2
  159. package/dist/popover.js +1 -1
  160. package/dist/primitive-D8CzV_Ft.js +1 -0
  161. package/dist/progress.d.ts +28 -11
  162. package/dist/progress.js +1 -1
  163. package/dist/qr-code.d.ts +11 -3
  164. package/dist/qr-code.js +1 -1
  165. package/dist/query-filter.d.ts +6 -6
  166. package/dist/query.d.ts +9 -4
  167. package/dist/query.js +1 -1
  168. package/dist/radio-group-BJQ6EOqh.d.ts +27 -0
  169. package/dist/radio-group-BliblUqe.js +1 -0
  170. package/dist/radio-group-ggEkCi0V.js +1 -0
  171. package/dist/radio-group.d.ts +21 -100
  172. package/dist/radio-group.js +1 -1
  173. package/dist/sandbar.d.ts +43 -30
  174. package/dist/sandbar.js +1 -1
  175. package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
  176. package/dist/sandboxed-on-click.d.ts +8 -0
  177. package/dist/sandboxed-on-click.js +1 -1
  178. package/dist/scatter-plot.d.ts +137 -76
  179. package/dist/scatter-plot.js +1 -1
  180. package/dist/segmented-control.d.ts +136 -0
  181. package/dist/segmented-control.js +1 -0
  182. package/dist/select-1xuUx_os.js +1 -0
  183. package/dist/{select-BkhBxtOT.d.ts → select-BpaXHxJm.d.ts} +33 -25
  184. package/dist/select.d.ts +6 -1
  185. package/dist/select.js +1 -1
  186. package/dist/selectable-list.d.ts +29 -18
  187. package/dist/selectable-list.js +1 -1
  188. package/dist/{separator-D9AWEkcJ.d.ts → separator-Ck4sPrdN.d.ts} +4 -2
  189. package/dist/separator-DnvhwY2J.js +1 -0
  190. package/dist/separator.d.ts +6 -1
  191. package/dist/separator.js +1 -1
  192. package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
  193. package/dist/sheet-DHy_vlme.js +1 -0
  194. package/dist/sheet.d.ts +36 -7
  195. package/dist/sheet.js +1 -1
  196. package/dist/sidebar.d.ts +53 -37
  197. package/dist/sidebar.js +1 -1
  198. package/dist/skeleton-DHfyjuQi.js +1 -0
  199. package/dist/skeleton.d.ts +15 -4
  200. package/dist/skeleton.js +1 -1
  201. package/dist/skip-to-main-link.d.ts +12 -1
  202. package/dist/skip-to-main-link.js +1 -1
  203. package/dist/slider.d.ts +11 -1
  204. package/dist/slider.js +1 -1
  205. package/dist/slot-B7rwscwd.js +1 -0
  206. package/dist/{slot-C0OCJjdJ.d.ts → slot-BEMQMbk3.d.ts} +6 -4
  207. package/dist/slot.d.ts +6 -1
  208. package/dist/slot.js +1 -1
  209. package/dist/source-all.css +5 -1
  210. package/dist/split-button.d.ts +20 -9
  211. package/dist/split-button.js +1 -1
  212. package/dist/strata.d.ts +35 -22
  213. package/dist/strata.js +1 -1
  214. package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
  215. package/dist/switch.d.ts +14 -2
  216. package/dist/switch.js +1 -1
  217. package/dist/table-BnLdXUai.js +1 -0
  218. package/dist/{table-vT6Okwfa.d.ts → table-Ii9hHUWN.d.ts} +84 -5
  219. package/dist/table.d.ts +6 -1
  220. package/dist/table.js +1 -1
  221. package/dist/tabs.d.ts +24 -12
  222. package/dist/tabs.js +1 -1
  223. package/dist/text-area.d.ts +12 -2
  224. package/dist/text-area.js +1 -1
  225. package/dist/theme-BNdZl352.js +1 -0
  226. package/dist/theme-switcher.d.ts +18 -4
  227. package/dist/theme-switcher.js +1 -1
  228. package/dist/theme.d.ts +25 -11
  229. package/dist/theme.js +1 -1
  230. package/dist/toast.d.ts +15 -2
  231. package/dist/toast.js +1 -1
  232. package/dist/tokens.dark.json +3261 -0
  233. package/dist/tokens.json +4933 -0
  234. package/dist/tokens.resolver.json +37 -0
  235. package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CstGDKwy.d.ts} +18 -11
  236. package/dist/tooltip-DQO40Mrq.js +1 -0
  237. package/dist/tooltip.d.ts +6 -1
  238. package/dist/tooltip.js +1 -1
  239. package/dist/truncated-text.d.ts +28 -14
  240. package/dist/truncated-text.js +1 -1
  241. package/dist/types.d.ts +1 -1
  242. package/dist/types.js +1 -1
  243. package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
  244. package/dist/use-callback-ref-DiOXFQzM.js +1 -0
  245. package/dist/use-composed-refs-DPYmLDSe.js +1 -0
  246. package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
  247. package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
  248. package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
  249. package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
  250. package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
  251. package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
  252. package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
  253. package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
  254. package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
  255. package/dist/utils.d.ts +1 -1
  256. package/dist/utils.js +1 -1
  257. package/dist/visually-hidden.d.ts +14 -1
  258. package/dist/visually-hidden.js +1 -1
  259. package/dist/well.d.ts +7 -2
  260. package/dist/well.js +1 -1
  261. package/package.json +21 -7
  262. package/src/components/chart/d3-license.md +25 -0
  263. package/dist/alert-P9lwn25X.js +0 -1
  264. package/dist/anchor-CgcbWEUs.js +0 -1
  265. package/dist/browser-only-BTSrYWLj.js +0 -1
  266. package/dist/button-69InNC_m.js +0 -1
  267. package/dist/button-B8k98Pby.js +0 -1
  268. package/dist/button-Dge0D5bl.js +0 -1
  269. package/dist/chart-BpWfQAwf.js +0 -2
  270. package/dist/checkbox-DmSQXs26.js +0 -1
  271. package/dist/choice-2Lrv8_nl.js +0 -1
  272. package/dist/code-DUJzSl4K.js +0 -1
  273. package/dist/compose-refs-sFdxsL7k.js +0 -1
  274. package/dist/dialog-7TUgiSzX.js +0 -1
  275. package/dist/dialog-Dp0QGWwo.d.ts +0 -28
  276. package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
  277. package/dist/field-Bihblt8U.js +0 -1
  278. package/dist/field-CPvjazWN.js +0 -1
  279. package/dist/icon-kK0c-POG.js +0 -1
  280. package/dist/icons-CDLz5lpI.js +0 -1
  281. package/dist/icons-CSwTVV2m.js +0 -1
  282. package/dist/icons-DP3lQw5O.js +0 -1
  283. package/dist/input-CpQ6jlpI.js +0 -1
  284. package/dist/kbd-CLHsJ99p.js +0 -1
  285. package/dist/label-nHqqYS7e.js +0 -1
  286. package/dist/layer-container-kEQiE4zV.js +0 -1
  287. package/dist/list-RFRIQxU2.js +0 -1
  288. package/dist/live-region-DQ1QLv3L.js +0 -1
  289. package/dist/main-CC1L9IsH.js +0 -1
  290. package/dist/popover-C96V8SXi.d.ts +0 -1
  291. package/dist/popover-DxOqLKxy.js +0 -1
  292. package/dist/primitive-Dz9Al-us.js +0 -1
  293. package/dist/radio-group-HDVxTNPi.js +0 -1
  294. package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
  295. package/dist/select-CAAYk4Yj.js +0 -1
  296. package/dist/separator-DfzxVutO.js +0 -1
  297. package/dist/sheet-CSJc_sB4.js +0 -1
  298. package/dist/skeleton-DBpI-ko5.js +0 -1
  299. package/dist/slot-DdYN1L1C.js +0 -1
  300. package/dist/table-CFHiDBW8.js +0 -1
  301. package/dist/theme-C-glc5Q-.js +0 -1
  302. package/dist/tooltip-b6oiTaWq.js +0 -1
  303. package/dist/use-breakpoint--mo7kr9d.js +0 -1
  304. package/dist/use-callback-ref-BvVyI5K1.js +0 -1
  305. package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
  306. package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
  307. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
  308. package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
  309. package/dist/use-matches-media-query-m860lols.js +0 -1
  310. package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
  311. package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
@@ -1,23 +1,23 @@
1
1
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import { r as VariantProps } from "./index-BhfgyurF.js";
2
+ import { r as VariantProps } from "./index-KJ06KK6t.js";
3
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
4
4
  import { ComponentProps, ReactNode } from "react";
5
5
  /**
6
6
  * The visual style of an `IconButton`: how much visual weight it carries.
7
- * The union matches `Button`'s without `link` — an icon-only link has no text
7
+ * The union matches `Button`'s without `link`: an icon-only link has no text
8
8
  * to read as a link.
9
9
  *
10
- * - `"filled"` — solid fill; the heaviest weight on the page
11
- * - `"ghost"` — no border or fill until hovered
12
- * - `"outlined"` — bordered on the form background
10
+ * - `"filled"`: solid fill; the heaviest weight on the page
11
+ * - `"ghost"`: no border or fill until hovered
12
+ * - `"outlined"`: bordered on the form background
13
13
  */
14
14
  type IconButtonAppearance = "filled" | "ghost" | "outlined";
15
15
  /**
16
- * The tone of an `IconButton` — the purpose its color communicates to the
17
- * user. Narrower than `ButtonIntent`: an icon carries no text to name the
16
+ * The tone of an `IconButton` (the purpose its color communicates to the
17
+ * user). Narrower than `ButtonIntent`: an icon carries no text to name the
18
18
  * action a tone colors, so `IconButton` draws the neutral tone only.
19
19
  *
20
- * - `"neutral"` — the workhorse tone; the only tone `IconButton` draws
20
+ * - `"neutral"`: the workhorse tone; the only tone `IconButton` draws
21
21
  */
22
22
  type IconButtonIntent = "neutral";
23
23
  /**
@@ -50,8 +50,8 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
50
50
  */
51
51
  "aria-label"?: never;
52
52
  /**
53
- * The visual style of the IconButton. Required — there is no default,
54
- * so every call site states the weight it means. The union matches
53
+ * The visual style of the IconButton. Required: there is no default,
54
+ * so every call site states the visual weight it means. The union matches
55
55
  * `Button`'s without `link`.
56
56
  *
57
57
  * @enum
@@ -61,13 +61,14 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
61
61
  */
62
62
  appearance: IconButtonAppearance;
63
63
  /**
64
- * The tone of the IconButton. Narrower than `Button`'s — `"neutral"` is
65
- * the only tone `IconButton` draws, so the accent and danger tones are
66
- * a type error here. Still required, so a call site reads the same on
64
+ * The tone of the IconButton: the purpose its color communicates to the
65
+ * user. Narrower than `Button`'s: `"neutral"` is the only tone
66
+ * `IconButton` draws, so the accent and danger tones are a type error
67
+ * here. Still required, so a call site reads the same on
67
68
  * both components and keeps compiling if more tones land.
68
69
  *
69
70
  * @enum
70
- * - `"neutral"`: the workhorse tone — routine and secondary actions
71
+ * - `"neutral"`: the workhorse tone: routine and secondary actions
71
72
  */
72
73
  intent: IconButtonIntent;
73
74
  /**
@@ -92,7 +93,7 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
92
93
  icon: ReactNode;
93
94
  /**
94
95
  * The behavior of the button when activated. Defaults to `"button"`, so the
95
- * button does not accidentally submit a surrounding `<form>` — pass
96
+ * button does not accidentally submit a surrounding `<form>`. Pass
96
97
  * `type="submit"` to submit a form, or `type="reset"` to reset it.
97
98
  *
98
99
  * When `asChild` is used, `type` has no effect and is not forwarded to the
@@ -113,19 +114,19 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
113
114
  * A button that renders one icon and nothing else. Its required `label` prop
114
115
  * carries the accessible name.
115
116
  *
116
- * `appearance` (visual weight) and `intent` (tone) are required — every call
117
+ * `appearance` (visual weight) and `intent` (tone) are required: every call
117
118
  * site states what it means; there are no implicit defaults.
118
119
  *
119
120
  * `IconButton` draws all three of `Button`'s box appearances, each in the
120
121
  * neutral tone only, and each one matches its `Button` twin. `link` stays off
121
- * the union — an icon-only link has no text to read as a link. The accent and
122
- * danger tones stay off `intent` — an icon carries no text to name the action
122
+ * the union: an icon-only link has no text to read as a link. The accent and
123
+ * danger tones stay off `intent`: an icon carries no text to name the action
123
124
  * a tone colors.
124
125
  *
125
126
  * The border radius is driven by the `--icon-button-border-radius` CSS
126
127
  * variable (default: `0.375rem`). Wrappers can set it to slot icon buttons
127
- * into their chrome — e.g. `ButtonGroup`'s panel appearance tightens it to
128
- * `0.125rem`.
128
+ * into their chrome. For example, `ButtonGroup`'s panel appearance tightens
129
+ * it to `0.125rem`.
129
130
  *
130
131
  * **Disabled and loading.** A native `<button>` gets the `disabled` attribute.
131
132
  * Under `asChild`, the child gets no `disabled` attribute, because it is inert
@@ -144,6 +145,12 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
144
145
  * | `data-loading` | present when `isLoading` | Presence-only, never `"false"`. |
145
146
  * | `data-disabled` | present when disabled | Presence-only, never `"false"`, since the `data-disabled:` variant matches the attribute's existence. Set when the button resolves disabled: `disabled`, `aria-disabled="true"`, or `isLoading` with no explicit `disabled`. `disabled={false}` keeps a loading button enabled and omits it. |
146
147
  *
148
+ * @useWhen Run an action from a compact button that shows one icon and no text, such as a close or
149
+ * a copy button.
150
+ *
151
+ * @siblings
152
+ * - `Button`: the button shows a text label.
153
+ *
147
154
  * @see https://mantle.ngrok.com/components/actions/icon-button
148
155
  *
149
156
  * @example
@@ -159,7 +166,7 @@ type IconButtonProps = Omit<ComponentProps<"button">, "aria-label"> & WithAsChil
159
166
  * ```
160
167
  *
161
168
  * @example
162
- * Submit a form — opt in with `type="submit"` (the default `"button"` does not submit):
169
+ * Submit a form. Opt in with `type="submit"` (the default `"button"` does not submit):
163
170
  * ```tsx
164
171
  * <IconButton
165
172
  * type="submit"
package/dist/button.d.ts CHANGED
@@ -1,5 +1,11 @@
1
- import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-CPsKGDK0.js";
2
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-Yxyu1XMd.js";
3
- import { n as ButtonGroupProps, t as ButtonGroup } from "./button-BX-4lYUn.js";
1
+ /**
2
+ * Re-exports for the Button component family.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/actions/button
5
+ * @see https://mantle.ngrok.com/components/actions/icon-button
6
+ */
7
+ import { i as ButtonIntent, n as ButtonAppearance, r as ButtonProps, t as Button } from "./button-Ddj6yr10.js";
8
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance, t as IconButton } from "./button-DnYv7IOT.js";
9
+ import { n as ButtonGroupProps, t as ButtonGroup } from "./button-5Pc7Mby_.js";
4
10
  import { t as ButtonSize } from "./button-L4exxu_L.js";
5
11
  export { Button, type ButtonAppearance, ButtonGroup, type ButtonGroupProps, type ButtonIntent, type ButtonProps, type ButtonSize, IconButton, type IconButtonAppearance, type IconButtonIntent, type IconButtonProps };
package/dist/button.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./button-Dge0D5bl.js";import{t}from"./button-B8k98Pby.js";import{t as n}from"./button-69InNC_m.js";export{e as Button,n as ButtonGroup,t as IconButton};
1
+ import{t as e}from"./button-DNLTJ32M.js";import{t}from"./button-B9bChDgl.js";import{t as n}from"./button-D8jixIbH.js";export{e as Button,n as ButtonGroup,t as IconButton};
@@ -1,4 +1,9 @@
1
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
1
+ /**
2
+ * Re-exports for the Calendar component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/preview/calendar
5
+ */
6
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
2
7
  import { ComponentProps } from "react";
3
8
  import { DateRange, DayPicker } from "react-day-picker";
4
9
  /**
@@ -26,6 +31,8 @@ type CalendarProps = ComponentProps<typeof DayPicker> & WithDataSlot;
26
31
  * @preview The API is not stable and may change. There may also be bugs.
27
32
  * Please file an issue at https://github.com/ngrok/mantle/issues if you find any.
28
33
  *
34
+ * @useWhen Pick one date or a range of dates from a month grid.
35
+ *
29
36
  * @see https://mantle.ngrok.com/components/preview/calendar
30
37
  *
31
38
  * @example
package/dist/calendar.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-kK0c-POG.js";import{t as r}from"./button-BQZ6eoD3.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";import{CaretRightIcon as o}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as s}from"@phosphor-icons/react/CaretLeft";import{DayPicker as c}from"react-day-picker";const l=r({appearance:`ghost`,intent:`neutral`,size:`sm`});function u(e){let t=i(2),{orientation:r}=e,c;return t[0]===r?c=t[1]:(c=/* @__PURE__ */ a(n,{svg:a(r===`left`?s:o,{}),className:`size-4`}),t[0]=r,t[1]=c),c}const d={Chevron:u},f={button_next:e(l,`absolute right-0`),button_previous:e(l,`absolute left-0`),caption_label:`text-sm font-medium`,day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`};function p(n){let r=i(27),o,s,l,u,p;r[0]===n?(o=r[1],s=r[2],l=r[3],u=r[4],p=r[5]):({"data-slot":l,className:o,classNames:s,showOutsideDays:p,...u}=n,r[0]=n,r[1]=o,r[2]=s,r[3]=l,r[4]=u,r[5]=p);let m=p!==void 0&&p,h=u.mode,g;r[6]===s?g=r[7]:(g=s??{},r[6]=s,r[7]=g);let _,v;r[8]===g?(_=r[9],v=r[10]):({root:v,..._}=g,r[8]=g,r[9]=_,r[10]=v);let y;r[11]!==o||r[12]!==v?(y=e(`isolate`,o,v),r[11]=o,r[12]=v,r[13]=y):y=r[13];let b=h===`range`&&`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`,x;r[14]===b?x=r[15]:(x=e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,b),r[14]=b,r[15]=x);let S;r[16]!==_||r[17]!==y||r[18]!==x?(S={...f,root:y,day:x,..._},r[16]=_,r[17]=y,r[18]=x,r[19]=S):S=r[19];let C=S,w;r[20]===l?w=r[21]:(w=t(l,`calendar`),r[20]=l,r[21]=w);let T;return r[22]!==C||r[23]!==u||r[24]!==m||r[25]!==w?(T=/* @__PURE__ */ a(c,{"data-slot":w,animate:!1,components:d,classNames:C,showOutsideDays:m,...u}),r[22]=C,r[23]=u,r[24]=m,r[25]=w,r[26]=T):T=r[26],T}export{p as Calendar};
1
+ "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./button-BQZ6eoD3.js";import{t as r}from"./icon-xb7d9M7X.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";import{CaretRightIcon as o}from"@phosphor-icons/react/CaretRight";import{CaretLeftIcon as s}from"@phosphor-icons/react/CaretLeft";import{DayPicker as c}from"react-day-picker";const l=n({appearance:`ghost`,intent:`neutral`,size:`sm`});function u(e){let t=i(2),{orientation:n}=e,c;return t[0]===n?c=t[1]:(c=/* @__PURE__ */ a(r,{svg:a(n===`left`?s:o,{}),className:`size-4`}),t[0]=n,t[1]=c),c}const d={Chevron:u},f={button_next:e(l,`absolute right-0`),button_previous:e(l,`absolute left-0`),caption_label:`text-sm font-medium`,day_button:`day size-full rounded-md not-aria-selected:not-disabled:hover:bg-filled-accent/15`,disabled:`text-muted opacity-50`,hidden:`invisible`,month:`space-y-4`,month_caption:`flex justify-center pt-1 relative items-center`,month_grid:`w-full border-collapse space-y-1`,months:`flex flex-col sm:flex-row gap-y-4 sm:gap-x-4 sm:gap-y-0 relative max-w-min`,nav:`flex items-center absolute inset-x-0 top-1 h-5 justify-between z-10`,outside:`day-outside aria-selected:text-on-filled opacity-50 text-muted`,range_end:`day-range-end [&:not(.day-range-start)]:rounded-l-none`,range_middle:`day-range-middle not-disabled:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none not-disabled:aria-selected:hover:bg-filled-accent/25`,range_start:`day-range-start [&:not(.day-range-end)]:rounded-r-none`,selected:`not-disabled:bg-filled-accent text-on-filled not-disabled:hover:bg-filled-accent`,today:`not-aria-selected:not-disabled:text-accent-600 font-medium not-aria-selected:not-disabled:bg-filled-accent/10 rounded-md`,week:`flex w-full mt-1`,weekday:`text-body w-7 text-[0.8rem] text-center font-normal`,weekdays:`flex`};function p(n){let r=i(27),o,s,l,u,p;r[0]===n?(o=r[1],s=r[2],l=r[3],u=r[4],p=r[5]):({"data-slot":l,className:o,classNames:s,showOutsideDays:p,...u}=n,r[0]=n,r[1]=o,r[2]=s,r[3]=l,r[4]=u,r[5]=p);let m=p!==void 0&&p,h=u.mode,g;r[6]===s?g=r[7]:(g=s??{},r[6]=s,r[7]=g);let _,v;r[8]===g?(_=r[9],v=r[10]):({root:v,..._}=g,r[8]=g,r[9]=_,r[10]=v);let y;r[11]!==o||r[12]!==v?(y=e(`isolate`,o,v),r[11]=o,r[12]=v,r[13]=y):y=r[13];let b=h===`range`&&`first:has-aria-selected:rounded-l-md last:has-aria-selected:rounded-r-md`,x;r[14]===b?x=r[15]:(x=e(`overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7 rounded-md`,b),r[14]=b,r[15]=x);let S;r[16]!==_||r[17]!==y||r[18]!==x?(S={...f,root:y,day:x,..._},r[16]=_,r[17]=y,r[18]=x,r[19]=S):S=r[19];let C=S,w;r[20]===l?w=r[21]:(w=t(l,`calendar`),r[20]=l,r[21]=w);let T;return r[22]!==C||r[23]!==u||r[24]!==m||r[25]!==w?(T=/* @__PURE__ */ a(c,{"data-slot":w,animate:!1,components:d,classNames:C,showOutsideDays:m,...u}),r[22]=C,r[23]=u,r[24]=m,r[25]=w,r[26]=T):T=r[26],T}export{p as Calendar};
package/dist/card.d.ts CHANGED
@@ -1,6 +1,11 @@
1
+ /**
2
+ * Re-exports for the Card component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/structure/card
5
+ */
1
6
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import "./index-BhfgyurF.js";
7
+ import "./index-KJ06KK6t.js";
8
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
4
9
  import { ComponentProps } from "react";
5
10
  type CardProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
6
11
  /**
package/dist/card.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a={Root:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`card`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`border-card bg-card relative rounded-md border`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Body:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`card-body`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`p-6 border-t border-card-muted first:border-t-0`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Footer:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`card-footer`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`px-6 py-3 border-t border-card-muted first:border-t-0`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Header:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`card-header`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`px-6 py-3 border-t border-card-muted first:border-t-0`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Title:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({"data-slot":l,className:c,asChild:s,ref:d,...u}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`h3`,p;o[6]===l?p=o[7]:(p=t(l,`card-title`),o[6]=l,o[7]=p);let m;o[8]===c?m=o[9]:(m=e(`text-strong text-base font-medium`,c),o[8]=c,o[9]=m);let h;return o[10]!==f||o[11]!==u||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{ref:d,"data-slot":p,className:m,...u}),o[10]=f,o[11]=u,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h}};export{a as Card};
1
+ "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-B7rwscwd.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a={Root:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`card`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`border-card bg-card relative rounded-md border`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Body:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`card-body`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`p-6 border-t border-card-muted first:border-t-0`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Footer:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`card-footer`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`px-6 py-3 border-t border-card-muted first:border-t-0`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Header:a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":l,asChild:f,className:c,children:s,ref:u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p=f!==void 0&&f?n:`div`,m;o[7]===l?m=o[8]:(m=t(l,`card-header`),o[7]=l,o[8]=m);let h;o[9]===c?h=o[10]:(h=e(`px-6 py-3 border-t border-card-muted first:border-t-0`,c),o[9]=c,o[10]=h);let g;return o[11]!==p||o[12]!==s||o[13]!==u||o[14]!==d||o[15]!==m||o[16]!==h?(g=/* @__PURE__ */ i(p,{ref:u,"data-slot":m,className:h,...d,children:s}),o[11]=p,o[12]=s,o[13]=u,o[14]=d,o[15]=m,o[16]=h,o[17]=g):g=o[17],g},Title:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({"data-slot":l,className:c,asChild:s,ref:d,...u}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`h3`,p;o[6]===l?p=o[7]:(p=t(l,`card-title`),o[6]=l,o[7]=p);let m;o[8]===c?m=o[9]:(m=e(`text-strong text-base font-medium`,c),o[8]=c,o[9]=m);let h;return o[10]!==f||o[11]!==u||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{ref:d,"data-slot":p,className:m,...u}),o[10]=f,o[11]=u,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h}};export{a as Card};
@@ -1,5 +1,10 @@
1
+ /**
2
+ * Re-exports for the CenteredLayout component.
3
+ *
4
+ * @see https://mantle.ngrok.com/layouts/centered-layout
5
+ */
1
6
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
7
+ import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
3
8
  import { ComponentProps } from "react";
4
9
  /**
5
10
  * The outer frame of a centered page flow. Renders a `<div>` with
@@ -7,7 +12,7 @@ import { ComponentProps } from "react";
7
12
  * `CenteredLayout.Notice` and `CenteredLayout.Header` (pinned top),
8
13
  * `CenteredLayout.Body` (which grows), and `CenteredLayout.Footer` (pinned
9
14
  * bottom). Consumers whose host requires an exact height can merge `h-full`
10
- * via `className` — `cx` is tailwind-merge-backed, so the override is
15
+ * via `className`. `cx` is tailwind-merge-backed, so the override is
11
16
  * deterministic.
12
17
  *
13
18
  * @see https://mantle.ngrok.com/layouts/centered-layout
@@ -32,22 +37,22 @@ import { ComponentProps } from "react";
32
37
  */
33
38
  declare const Root: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
34
39
  /**
35
- * A full-window-width strip pinned above everything else in the layout —
36
- * including `CenteredLayout.Header` — for maintenance notices, environment
40
+ * A full-window-width strip pinned above everything else in the layout
41
+ * (including `CenteredLayout.Header`) for maintenance notices, environment
37
42
  * warnings, and similar app-wide messaging. Renders an unstyled `<div>`
38
43
  * (`w-full shrink-0`): the notice content brings its own colors and layout,
39
44
  * and the part collapses to nothing when empty, so it can stay mounted and
40
45
  * conditionally render its contents. The same slot contract as
41
46
  * `AppLayout.Notice`, so an app-wide banner composes identically across
42
47
  * mantle's layouts. Deliberately
43
- * not named Banner — `CenteredLayout.Header` renders the page's `<header>`
48
+ * not named Banner: `CenteredLayout.Header` renders the page's `<header>`
44
49
  * (the ARIA `banner` landmark), and this part is not that. Optional: omitting
45
50
  * it is fine.
46
51
  *
47
52
  * On flows that scroll (checkout, plan pickers), the strip scrolls away with
48
53
  * the page by default; merge `sticky top-0 z-20` via `className` to pin it to
49
54
  * the window. To pin it alongside a sticky `Header`, wrap the two strips in
50
- * a single `sticky top-0` container instead — two elements pinned at `top-0`
55
+ * a single `sticky top-0` container instead. Two elements pinned at `top-0`
51
56
  * overlap each other once the page scrolls.
52
57
  *
53
58
  * @see https://mantle.ngrok.com/layouts/centered-layout
@@ -68,7 +73,7 @@ declare const Root: ({ asChild, children, className, "data-slot": dataSlot, ...p
68
73
  */
69
74
  declare const Notice: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
70
75
  /**
71
- * A utility strip at the top of the layout — an account chip, a close/dismiss
76
+ * A utility strip at the top of the layout: an account chip, a close/dismiss
72
77
  * button, and similar page furniture for focused flows (checkout, plan
73
78
  * pickers). Renders a semantic `<header>` (a page-level frame, so it is
74
79
  * exposed as a `banner` landmark when not nested inside a sectioning element)
@@ -77,7 +82,7 @@ declare const Notice: ({ asChild, children, className, "data-slot": dataSlot, ..
77
82
  * omitting it is fine.
78
83
  *
79
84
  * To pin it to the window while the page scrolls (e.g. a close button that
80
- * stays reachable), merge `sticky top-0 z-10` via `className` — prefer
85
+ * stays reachable), merge `sticky top-0 z-10` via `className`. Prefer
81
86
  * `sticky` over `fixed`, which removes the strip from flow and underlaps the
82
87
  * content below it.
83
88
  *
@@ -108,7 +113,7 @@ declare const Header: ({ asChild, children, className, "data-slot": dataSlot, ..
108
113
  * clipping.
109
114
  *
110
115
  * By convention the brand mark (a fully-styled logo/wordmark anchor) is the
111
- * **first child** of `Body` — there is deliberately no `Logo` part because it
116
+ * **first child** of `Body`. There is deliberately no `Logo` part because it
112
117
  * would own nothing: vertical spacing comes from `Body`'s `gap-6`, and the
113
118
  * mark arrives as already-styled JSX.
114
119
  *
@@ -134,11 +139,11 @@ declare const Header: ({ asChild, children, className, "data-slot": dataSlot, ..
134
139
  */
135
140
  declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
136
141
  /**
137
- * A pinned utility strip at the bottom of the layout — a theme switcher,
142
+ * A pinned utility strip at the bottom of the layout: a theme switcher,
138
143
  * legal links, and similar page furniture. Renders a semantic `<footer>`
139
- * (a page-level frame, so it is exposed as a `contentinfo` landmark — unlike
144
+ * (a page-level frame, so it is exposed as a `contentinfo` landmark, unlike
140
145
  * `Card.Footer`'s generic div) with `flex shrink-0 items-center px-4 py-4`.
141
- * It sits **outside** the centered `flex-1` region — which is exactly why
146
+ * It sits **outside** the centered `flex-1` region. That is exactly why
142
147
  * `Body` exists as a separate part. Optional: omitting it is fine.
143
148
  *
144
149
  * @see https://mantle.ngrok.com/layouts/centered-layout
@@ -164,11 +169,17 @@ declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...p
164
169
  declare const Footer: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"footer"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
165
170
  /**
166
171
  * A viewport-filling centered page flow for sign-in, sign-up, onboarding,
167
- * 404, checkout, and other focused full-page states. It owns structure only —
172
+ * 404, checkout, and other focused full-page states. It owns structure only:
168
173
  * the flex/overflow skeleton and region ordering. App state (routing,
169
174
  * sessions) never enters it, and landmark semantics stay compositional:
170
175
  * brand marks, links, and the `Main` landmark arrive as composed JSX.
171
176
  *
177
+ * @useWhen Center one focused full-page flow, such as sign-in, sign-up, onboarding, checkout, or a
178
+ * 404 page.
179
+ *
180
+ * @siblings
181
+ * - `AppLayout`: the page sits in a signed-in app, with a sidebar and a header that persist across routes.
182
+ *
172
183
  * @see https://mantle.ngrok.com/layouts/centered-layout
173
184
  *
174
185
  * @example
@@ -228,16 +239,16 @@ declare const CenteredLayout: {
228
239
  */
229
240
  readonly Root: typeof Root;
230
241
  /**
231
- * A full-window-width strip pinned above everything else in the layout —
232
- * including `Header` — for maintenance notices and environment warnings.
242
+ * A full-window-width strip pinned above everything else in the layout
243
+ * (including `Header`) for maintenance notices and environment warnings.
233
244
  * Renders an unstyled `<div>` (`w-full shrink-0`): the notice content
234
245
  * brings its own colors, and the part collapses to nothing when empty. The
235
246
  * same slot contract as `AppLayout.Notice`, so an app-wide banner
236
247
  * composes identically across mantle's layouts. Merge
237
- * `sticky top-0 z-20` via `className` to pin it while a long flow scrolls
238
- * (to pin it alongside a sticky `Header`, wrap the two strips in a single
239
- * `sticky top-0` container instead — two elements pinned at `top-0`
240
- * overlap once the page scrolls). Optional — omitting it is fine.
248
+ * `sticky top-0 z-20` via `className` to pin it while a long flow scrolls.
249
+ * To pin it alongside a sticky `Header`, wrap the two strips in a single
250
+ * `sticky top-0` container instead. Two elements pinned at `top-0`
251
+ * overlap once the page scrolls. Optional: omitting it is fine.
241
252
  *
242
253
  * @see https://mantle.ngrok.com/layouts/centered-layout
243
254
  *
@@ -259,9 +270,9 @@ declare const CenteredLayout: {
259
270
  /**
260
271
  * A utility strip at the top of the layout (account chip, close button)
261
272
  * rendered as a semantic `<header>` (`banner` landmark) outside the
262
- * centered `flex-1` region — the mirror of `Footer`. Merge
273
+ * centered `flex-1` region, the mirror of `Footer`. Merge
263
274
  * `sticky top-0 z-10` via `className` to pin it to the window while the
264
- * page scrolls. Optional — omitting it is fine.
275
+ * page scrolls. Optional: omitting it is fine.
265
276
  *
266
277
  * @see https://mantle.ngrok.com/layouts/centered-layout
267
278
  *
@@ -283,7 +294,7 @@ declare const CenteredLayout: {
283
294
  readonly Header: typeof Header;
284
295
  /**
285
296
  * The growing, centered region of the layout. By convention the brand mark
286
- * (a fully-styled logo/wordmark anchor) is its **first child** — spacing
297
+ * (a fully-styled logo/wordmark anchor) is its **first child**. Spacing
287
298
  * comes from `Body`'s `gap-6`, so no dedicated `Logo` part exists.
288
299
  *
289
300
  * @see https://mantle.ngrok.com/layouts/centered-layout
@@ -310,7 +321,7 @@ declare const CenteredLayout: {
310
321
  /**
311
322
  * A pinned utility strip (theme switcher, legal links) rendered as a
312
323
  * semantic `<footer>` (`contentinfo` landmark) outside the centered
313
- * `flex-1` region. Optional — omitting it is fine.
324
+ * `flex-1` region. Optional: omitting it is fine.
314
325
  *
315
326
  * @see https://mantle.ngrok.com/layouts/centered-layout
316
327
  *
@@ -1 +1 @@
1
- import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a={Root:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex min-h-full flex-col`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Notice:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout-notice`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`w-full shrink-0`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Header:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`header`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout-header`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex shrink-0 items-center px-4 py-4`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Body:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout-body`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex flex-1 flex-col items-center justify-center gap-6 py-4`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Footer:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`footer`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout-footer`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex shrink-0 items-center px-4 py-4`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h}};export{a as CenteredLayout};
1
+ "use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-B7rwscwd.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a={Root:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex min-h-full flex-col`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Notice:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout-notice`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`w-full shrink-0`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Header:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`header`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout-header`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex shrink-0 items-center px-4 py-4`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Body:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`div`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout-body`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex flex-1 flex-col items-center justify-center gap-6 py-4`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h},Footer:a=>{let o=r(16),s,c,l,u,d;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5]):({asChild:s,children:c,className:l,"data-slot":u,...d}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d);let f=s?n:`footer`,p;o[6]===u?p=o[7]:(p=t(u,`centered-layout-footer`),o[6]=u,o[7]=p);let m;o[8]===l?m=o[9]:(m=e(`flex shrink-0 items-center px-4 py-4`,l),o[8]=l,o[9]=m);let h;return o[10]!==f||o[11]!==c||o[12]!==d||o[13]!==p||o[14]!==m?(h=/* @__PURE__ */ i(f,{"data-slot":p,className:m,...d,children:c}),o[10]=f,o[11]=c,o[12]=d,o[13]=p,o[14]=m,o[15]=h):h=o[15],h}};export{a as CenteredLayout};
@@ -0,0 +1 @@
1
+ import{g as e,h as t}from"./chart-DtgZBAas.js";const n=5e3,r=2e4,i=(e,r)=>{let{color:i,surface:a,shape:o,totalPointCount:s,indexes:c,xAt:l,yAt:u,radiusAt:d}=r;if(e.fillStyle=i,s>2e4){e.beginPath();for(let t of c)d(t)<=0||e.rect(l(t)-1,u(t)-1,2,2);e.fill();return}let f=s<=n;e.strokeStyle=a,e.lineWidth=2;for(let n of c){let r=d(n);r<=0||(e.beginPath(),t(e,l(n),u(n),r,o),e.fill(),f&&e.stroke())}},a=1/510,o=[1e3,4e3,16e3];let s=null,c=null;const l=()=>(c??=import(`./chart-CUmSu9d7.js`).then(e=>(s=e.Scatter3d,e.Scatter3d),e=>{throw c=null,reportError(e),e}),c);var u=class{#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&&s!=null){this.#t=new s(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 l()}catch{this.#n=!1,this.#u();return}this.#n=!1,this.#c(),this.#e.requestPaint()}#u(){let e=o[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 t=this.#e,n=t.colors(),r=t.specs();if(n==null||t.rowCount()===0||r.length===0)return null;if(t.is3d())return this.#c()?.paint(e,n,r)??null;let a=t.xCoefficients(),o=t.yCoefficients(),s=t.xs(),c=t.columns(),l=this.#s;if(l==null||l.columns!==c||l.specs!==r){let e=r.map((e,n)=>t.definedIndexes(c[n]??/* @__PURE__ */ new Float64Array));l={columns:c,specs:r,indexes:e,total:e.reduce((e,t)=>e+t.length,0)},this.#s=l}let u=l.indexes,d=l.total;return r.forEach((r,c)=>{let l=t.reveal(r.dataKey);if(l<.00196078431372549)return;let f=t.paintedValues(r,c);e.save(),e.globalAlpha=l,i(e,{color:n.series.get(r.dataKey)??`currentColor`,surface:n.chrome.surface,shape:t.shape(r.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 d=e=>new u(e);export{n as a,r as i,d as n,l as r,a as t};
@@ -0,0 +1 @@
1
+ import{f as e,i as t,p as n,r}from"./chart-DtgZBAas.js";import i from"tiny-invariant";const a=`http://www.w3.org/2000/svg`,o=e=>e?.namespaceURI===a,s=[`underlay`,`marks`,`overlay`],c={fillStyle:`#000`,strokeStyle:`#000`,lineWidth:1,globalAlpha:1,lineJoin:`miter`,lineCap:`butt`,dash:``,font:`10px sans-serif`,textAlign:`start`,textBaseline:`alphabetic`,clip:null},l=e=>String(Math.round(e*100)/100),u={start:`start`,left:`start`,center:`middle`,right:`end`,end:`end`},d={top:`text-before-edge`,hanging:`hanging`,middle:`central`,alphabetic:`alphabetic`,ideographic:`ideographic`,bottom:`text-after-edge`},f=/* @__PURE__ */ new WeakMap,p=e=>(f.has(e)||f.set(e,e.createElement(`canvas`).getContext(`2d`)),f.get(e)??null),m=e=>Number.parseFloat(e)||10,h=e=>e==null?``:`${l(e.x)},${l(e.y)},${l(e.width)},${l(e.height)}`,g=(e,t)=>{if(e==null)return t;let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y);return{x:n,y:r,width:Math.max(0,Math.min(e.x+e.width,t.x+t.width)-n),height:Math.max(0,Math.min(e.y+e.height,t.y+t.height)-r)}};var _=class{#e={...c};#t=[];#n=[];#r=null;#i=0;#a=!1;#o;layer=`overlay`;marks={underlay:[],marks:[],overlay:[]};constructor(e){this.#o=e}get fillStyle(){return this.#e.fillStyle}set fillStyle(e){i(typeof e==`string`,`The SVG chart backend fills with color strings only.`),this.#e.fillStyle=e}get strokeStyle(){return this.#e.strokeStyle}set strokeStyle(e){i(typeof e==`string`,`The SVG chart backend strokes with color strings only.`),this.#e.strokeStyle=e}get lineWidth(){return this.#e.lineWidth}set lineWidth(e){this.#e.lineWidth=e}get globalAlpha(){return this.#e.globalAlpha}set globalAlpha(e){this.#e.globalAlpha=e}get lineJoin(){return this.#e.lineJoin}set lineJoin(e){this.#e.lineJoin=e}get lineCap(){return this.#e.lineCap}set lineCap(e){this.#e.lineCap=e}get font(){return this.#e.font}set font(e){this.#e.font=e}get textAlign(){return this.#e.textAlign}set textAlign(e){this.#e.textAlign=e}get textBaseline(){return this.#e.textBaseline}set textBaseline(e){this.#e.textBaseline=e}reset(){this.#e={...c},this.#t=[],this.beginPath();for(let e of s)this.marks[e]=[];this.layer=`overlay`}save(){this.#t.push({...this.#e})}restore(){let e=this.#t.pop();e!=null&&(this.#e=e)}beginPath(){this.#n=[],this.#r=null,this.#i=0,this.#a=!1}closePath(){this.#n.push(`Z`)}moveTo(e,t){this.#n.push(`M${l(e)} ${l(t)}`),this.#i+=1,this.#r=null,this.#a=!0}lineTo(e,t){let n=this.#a?`L`:`M`;this.#n.push(`${n}${l(e)} ${l(t)}`),this.#r=null,this.#a=!0}bezierCurveTo(e,t,n,r,i,a){this.#n.push(`C${l(e)} ${l(t)} ${l(n)} ${l(r)} ${l(i)} ${l(a)}`),this.#r=null,this.#a=!0}rect(e,t,n,r){this.#n.push(`M${l(e)} ${l(t)}h${l(n)}v${l(r)}h${l(-n)}Z`),this.#i+=1,this.#r=this.#i===1?{x:e,y:t,width:n,height:r}:null,this.#a=!0}roundRect(e,t,n,r,i){let[a=0,o=0,s=0,c=0]=i,u=e+n,d=t+r,f=(e,t,n)=>e>0?`A${l(e)} ${l(e)} 0 0 1 ${l(t)} ${l(n)}`:`L${l(t)} ${l(n)}`;this.#n.push(`M${l(e+a)} ${l(t)}`,`L${l(u-o)} ${l(t)}`,f(o,u,t+o),`L${l(u)} ${l(d-s)}`,f(s,u-s,d),`L${l(e+c)} ${l(d)}`,f(c,e,d-c),`L${l(e)} ${l(t+a)}`,f(a,e+a,t),`Z`),this.#i+=1,this.#r=null,this.#a=!0}arc(e,t,n,r,i){let a=e+n*Math.cos(r),o=t+n*Math.sin(r);this.#n.push(`${this.#a?`L`:`M`}${l(a)} ${l(o)}`);let s=i-r,c=l(n);if(s>=Math.PI*2){let i=e-n*Math.cos(r),s=t-n*Math.sin(r);this.#n.push(`A${c} ${c} 0 1 1 ${l(i)} ${l(s)}`,`A${c} ${c} 0 1 1 ${l(a)} ${l(o)}`)}else{let r=e+n*Math.cos(i),a=t+n*Math.sin(i),o=+(s>Math.PI);this.#n.push(`A${c} ${c} 0 ${o} 1 ${l(r)} ${l(a)}`)}this.#r=null,this.#a=!0}fill(){this.#s(`fill`,this.#n.join(``))}stroke(){this.#s(`stroke`,this.#n.join(``))}fillRect(e,t,n,r){this.#s(`fill`,`M${l(e)} ${l(t)}h${l(n)}v${l(r)}h${l(-n)}Z`)}clip(){let e=this.#r;i(e!=null,`The SVG chart backend clips to one rectangle only.`),this.#e.clip=g(this.#e.clip,e)}setLineDash(e){this.#e.dash=e.join(` `)}fillText(e,t,n){this.marks[this.layer].push({type:`text`,text:e,x:t,y:n,state:{...this.#e}})}measureText(e){let t=p(this.#o);return t==null?{width:e.length*m(this.#e.font)*.6}:(t.font=this.#e.font,{width:t.measureText(e).width})}#s(e,t){if(t===``)return;let n=this.#e,r=e===`fill`?`f|${n.fillStyle}|${n.globalAlpha}|${h(n.clip)}`:`s|${n.strokeStyle}|${n.globalAlpha}|${n.lineWidth}|${n.lineJoin}|${n.lineCap}|${n.dash}|${h(n.clip)}`,i=this.marks[this.layer],a=i.at(-1);a?.type===`path`&&a.key===r?a.data+=t:i.push({type:`path`,key:r,data:t,paint:e,state:{...n}})}};const v=/* @__PURE__ */ new WeakMap,y=(e,t,n)=>{let r=v.get(e);r??(r=/* @__PURE__ */ new Map,v.set(e,r)),r.get(t)!==n&&(r.set(t,n),n===``?e.style.removeProperty(t):e.style.setProperty(t,n))},b=(e,t,n)=>{n==null?e.hasAttribute(t)&&e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)};let x=0;var S=class{svg;#e;#t;#n;#r;#i=/* @__PURE__ */ new Map;#a=0;#o=null;constructor(e,t){this.#e=e,x+=1,this.#r=`mantle-chart-${x}`;let n=this.#s(`svg`);n.setAttribute(`data-slot`,`${t}-svg`),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`),n.style.position=`absolute`,n.style.inset=`0`,n.style.width=`100%`,n.style.height=`100%`,n.style.overflow=`hidden`,n.style.direction=`ltr`,this.#t=this.#s(`defs`),n.append(this.#t),this.#n={underlay:this.#s(`g`),marks:this.#s(`g`),overlay:this.#s(`g`)};for(let e of s)n.append(this.#n[e]);this.svg=n}#s(e){return this.#e.createElementNS(a,e)}id(e){return`${this.#r}-${e}`}define(e){let t=e.id===``?null:this.#t.querySelector(`#${e.id}`);t==null?this.#t.append(e):t.replaceWith(e)}undefine(e){for(let t of Array.from(this.#t.children))t.id.startsWith(e)&&t.remove()}write(e,t){let n=/* @__PURE__ */ new Set;for(let t of s)this.#c(this.#n[t],e.marks[t],n);for(let[e,t]of this.#i)n.has(e)||(t.remove(),this.#i.delete(e));this.#u(t)}#c(e,t,n){for(t.forEach((t,r)=>{let i=t.type===`path`?`path`:`text`,a=e.children[r],s;o(a)&&a.localName===i?s=a:(s=this.#s(i),a==null?e.append(s):a.replaceWith(s));let{state:c}=t,f=h(c.clip);b(s,`clip-path`,f===``?null:`url(#${this.#l(f,c.clip)})`),f!==``&&n.add(f),y(s,`opacity`,c.globalAlpha===1?``:String(c.globalAlpha)),t.type===`path`?(b(s,`d`,t.data),t.paint===`fill`?(y(s,`fill`,c.fillStyle),y(s,`stroke`,`none`),y(s,`stroke-width`,``),y(s,`stroke-linejoin`,``),y(s,`stroke-linecap`,``),y(s,`stroke-dasharray`,``)):(y(s,`fill`,`none`),y(s,`stroke`,c.strokeStyle),y(s,`stroke-width`,String(c.lineWidth)),y(s,`stroke-linejoin`,c.lineJoin),y(s,`stroke-linecap`,c.lineCap),y(s,`stroke-dasharray`,c.dash))):(b(s,`x`,l(t.x)),b(s,`y`,l(t.y)),y(s,`font`,c.font),y(s,`fill`,c.fillStyle),y(s,`text-anchor`,u[c.textAlign]),y(s,`dominant-baseline`,d[c.textBaseline]),s.textContent!==t.text&&(s.textContent=t.text))});e.children.length>t.length;)e.lastElementChild?.remove()}#l(e,t){let n=this.#i.get(e);if(n==null&&t!=null){n=this.#s(`clipPath`),this.#a+=1,n.id=this.id(`clip-${this.#a}`);let r=this.#s(`rect`);r.setAttribute(`x`,l(t.x)),r.setAttribute(`y`,l(t.y)),r.setAttribute(`width`,l(t.width)),r.setAttribute(`height`,l(t.height)),n.append(r),this.#t.append(n),this.#i.set(e,n)}return n?.id??``}#u(e){let t=this.#n.marks;if(e==null){b(t,`mask`,null);return}if(this.#o==null){let e=this.#s(`mask`);e.id=this.id(`fade`),e.setAttribute(`maskUnits`,`userSpaceOnUse`);let t=this.#s(`linearGradient`);t.id=this.id(`fade-ramp`),t.setAttribute(`gradientUnits`,`userSpaceOnUse`);let n=this.#s(`stop`);n.setAttribute(`offset`,`0`),n.setAttribute(`stop-color`,`white`);let r=this.#s(`stop`);r.setAttribute(`offset`,`1`),r.setAttribute(`stop-color`,`white`),t.append(n,r);let i=this.#s(`rect`);i.setAttribute(`x`,`0`),i.setAttribute(`y`,`0`),i.setAttribute(`width`,`100%`),i.setAttribute(`height`,`100%`),i.setAttribute(`fill`,`url(#${t.id})`),e.append(i),this.#t.append(t,e),this.#o={mask:e,gradient:t,rect:i}}let{gradient:n}=this.#o;b(n,`x1`,l(e.left)),b(n,`x2`,l(e.left+e.width)),n.firstElementChild?.setAttribute(`stop-opacity`,String(1-e.alpha)),b(t,`mask`,`url(#${this.#o.mask.id})`)}},C=class{kind=`svg`;element;#e;#t;#n;#r=null;#i=null;constructor({root:e,slotName:t}){this.#e=e;let n=e.ownerDocument;this.#t=new S(n,t),this.#n=new _(n),this.element=this.#t.svg}paintSignature({orientation:e}){return e}resolvePaint({series:e,orientation:n,signature:i}){this.#i=null;let a=/* @__PURE__ */ new Map,o=/* @__PURE__ */ new Map,s=/* @__PURE__ */ new Map,c=this.#t.id(`texture-`);return this.#t.undefine(c),e.forEach((e,t)=>{if(a.set(e.dataKey,e.color),o.set(e.dataKey,`${e.colorInput}|${e.texture}`),e.mark!==`bar`||e.texture===`solid`)return;let r=`${c}${t}`;this.#t.define(this.#o(r,e.texture,e.color,n)),s.set(e.dataKey,`url(#${r})`)}),{signature:i,series:a,inputs:o,barFills:s,chrome:r,fontFamily:this.#a,resolve:t}}#a=()=>{if(this.#i==null){let e=this.#e.ownerDocument.defaultView;this.#i=e?.getComputedStyle(this.#e).fontFamily||`sans-serif`}return this.#i};#o(t,r,i,o){let s=this.#e.ownerDocument,c=s.createElementNS(a,`pattern`);c.id=t,c.setAttribute(`patternUnits`,`userSpaceOnUse`),c.setAttribute(`width`,`8`),c.setAttribute(`height`,`8`);let l=new _(s);e(l,{texture:r,ground:n(i),ink:i,orientation:o});let u=s.createElementNS(a,`g`);for(let e of l.marks.overlay){if(e.type!==`path`)continue;let t=s.createElementNS(a,`path`);t.setAttribute(`d`,e.data),e.paint===`fill`?t.style.setProperty(`fill`,e.state.fillStyle):(t.style.setProperty(`fill`,`none`),t.style.setProperty(`stroke`,e.state.strokeStyle),t.style.setProperty(`stroke-width`,String(e.state.lineWidth)),t.style.setProperty(`stroke-linecap`,e.state.lineCap)),u.append(t)}return c.append(u),c}measureContext(){return this.#n}begin(){return this.#n.reset(),this.#r=null,this.#n}composite(e,t){let n=this.#n;n.layer=`underlay`,t.underlay(),n.layer=`marks`,t.marks(),n.layer=`overlay`,this.#r=t.fade}end(){this.#t.write(this.#n,this.#r),this.#n.reset()}release(){}destroy(){}};const w=Object.assign(e=>new C(e),{kind:`svg`});export{w as t};
@@ -0,0 +1 @@
1
+ import{h as e,m as t}from"./chart-DtgZBAas.js";import{a as n}from"./chart-BLCqzt56.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=(t,r)=>{let{count:i,order:a,screenX:o,screenY:s,radius:c,colorAt:l,shapeAt:u,alphaAt:d,surface:f}=r;if(t.save(),i>2e4){let e=``,n=-1;for(let r of a){let i=l(r);i!==e&&(t.fillStyle=i,e=i);let a=d(r);a!==n&&(t.globalAlpha=a,n=a);let u=Math.max(1,(c[r]??0)/2);t.fillRect((o[r]??0)-u/2,(s[r]??0)-u/2,u,u)}t.restore();return}let p=i<=n;t.strokeStyle=f,t.lineWidth=2;let m=``,h=-1;for(let n of a){let r=l(n);r!==m&&(t.fillStyle=r,m=r);let i=d(n);i!==h&&(t.globalAlpha=i,h=i),t.beginPath(),e(t,o[n]??0,s[n]??0,c[n]??0,u(n)),t.fill(),p&&t.stroke()}t.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 t({speed:.12});#r=new t({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};