@ngrok/mantle 0.80.0 → 0.81.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 (172) hide show
  1. package/dist/accordion.d.ts +13 -31
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +5 -1
  4. package/dist/alert-dialog.d.ts +15 -48
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +8 -26
  7. package/dist/alert.js +1 -1
  8. package/dist/{anchor-_2meGDfj.js → anchor-DfeXTpKW.js} +1 -1
  9. package/dist/anchor.js +1 -1
  10. package/dist/area-chart.d.ts +504 -0
  11. package/dist/area-chart.js +1 -0
  12. package/dist/badge.js +1 -1
  13. package/dist/bar-chart.d.ts +491 -0
  14. package/dist/bar-chart.js +1 -0
  15. package/dist/breadcrumb.d.ts +6 -24
  16. package/dist/breadcrumb.js +1 -1
  17. package/dist/button-BAno7KIU.js +1 -0
  18. package/dist/{index-C2jj8U4a.d.ts → button-C-gMbPso.d.ts} +2 -2
  19. package/dist/{icon-button-C1AfGnQx.d.ts → button-C7vAl6lS.d.ts} +16 -3
  20. package/dist/{button-BPMwa2jN.d.ts → button-DARFK2KJ.d.ts} +1 -1
  21. package/dist/{button-5WsvzIQ6.js → button-DjpEKt2X.js} +1 -1
  22. package/dist/button-DvHMWAPl.js +1 -0
  23. package/dist/button.d.ts +5 -5
  24. package/dist/button.js +1 -1
  25. package/dist/calendar.js +1 -1
  26. package/dist/card.d.ts +5 -20
  27. package/dist/card.js +1 -1
  28. package/dist/centered-layout.d.ts +5 -20
  29. package/dist/centered-layout.js +1 -1
  30. package/dist/chart-BROa2gqt.js +2 -0
  31. package/dist/chart-BcOC6Qj0.d.ts +275 -0
  32. package/dist/checkbox-0EoxOyMA.js +1 -0
  33. package/dist/checkbox.d.ts +1 -1
  34. package/dist/checkbox.js +1 -1
  35. package/dist/choice-BHwFSSyv.js +1 -0
  36. package/dist/{choice-Ct0KK8jw.d.ts → choice-BNRQXszu.d.ts} +5 -20
  37. package/dist/choice.d.ts +1 -1
  38. package/dist/choice.js +1 -1
  39. package/dist/code-block.d.ts +14 -44
  40. package/dist/code-block.js +6 -6
  41. package/dist/code-block_highlight-utils.d.ts +1 -1
  42. package/dist/code-block_highlight-utils.js +1 -1
  43. package/dist/combobox.d.ts +9 -33
  44. package/dist/combobox.js +1 -1
  45. package/dist/command.d.ts +3 -9
  46. package/dist/command.js +1 -1
  47. package/dist/data-table.d.ts +6 -12
  48. package/dist/data-table.js +1 -1
  49. package/dist/description-list.d.ts +4 -16
  50. package/dist/description-list.js +1 -1
  51. package/dist/{primitive-CJRIlrLz.d.ts → dialog-BM4wPCft.d.ts} +9 -16
  52. package/dist/dialog-DWZWd5Jt.js +1 -0
  53. package/dist/dialog.d.ts +13 -43
  54. package/dist/dialog.js +1 -1
  55. package/dist/{dropdown-menu-CoyozLzy.d.ts → dropdown-menu-DZg-Cd69.d.ts} +18 -54
  56. package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
  57. package/dist/dropdown-menu-RyDWoKHx.js +1 -0
  58. package/dist/dropdown-menu.d.ts +2 -2
  59. package/dist/dropdown-menu.js +1 -1
  60. package/dist/empty.d.ts +6 -21
  61. package/dist/empty.js +1 -1
  62. package/dist/field-B1wqeZr4.js +1 -0
  63. package/dist/field.d.ts +15 -45
  64. package/dist/field.js +1 -1
  65. package/dist/hooks.js +1 -1
  66. package/dist/hover-card.d.ts +3 -12
  67. package/dist/hover-card.js +1 -1
  68. package/dist/{svg-only-CdI_v82i.d.ts → icon-CX_gj6sW.d.ts} +1 -1
  69. package/dist/{icon-BDqpcZ-n.d.ts → icon-k4E9yNWD.d.ts} +1 -1
  70. package/dist/icon-lZ48P8Nn.js +1 -0
  71. package/dist/icon.d.ts +3 -3
  72. package/dist/icon.js +1 -1
  73. package/dist/icons-DLCs1hLP.js +1 -0
  74. package/dist/icons.d.ts +2 -2
  75. package/dist/icons.js +1 -1
  76. package/dist/input-BnlpQF0c.js +1 -0
  77. package/dist/{input-DV9M6K4v.d.ts → input-BuYDU6CF.d.ts} +1 -1
  78. package/dist/input.d.ts +2 -2
  79. package/dist/input.js +1 -1
  80. package/dist/line-chart.d.ts +490 -0
  81. package/dist/line-chart.js +1 -0
  82. package/dist/{virtual-UrzmaSQm.js → list-51KQvENW.js} +1 -1
  83. package/dist/list.d.ts +5 -20
  84. package/dist/list.js +1 -1
  85. package/dist/llms.txt +5 -1
  86. package/dist/mantle-dark-high-contrast.css +17 -0
  87. package/dist/mantle-dark.css +13 -0
  88. package/dist/mantle-light-high-contrast.css +15 -0
  89. package/dist/mantle.css +29 -0
  90. package/dist/media-object.d.ts +3 -12
  91. package/dist/media-object.js +1 -1
  92. package/dist/multi-select.d.ts +14 -53
  93. package/dist/multi-select.js +1 -1
  94. package/dist/otp-input.d.ts +5 -17
  95. package/dist/otp-input.js +1 -1
  96. package/dist/pagination.d.ts +5 -14
  97. package/dist/pagination.js +1 -1
  98. package/dist/{index-B8mIWKIU.d.ts → popover-CE4OlWkd.d.ts} +1 -4
  99. package/dist/popover-CQ9s7jG5.js +1 -0
  100. package/dist/popover.d.ts +1 -1
  101. package/dist/popover.js +1 -1
  102. package/dist/primitive-trJDqIXJ.js +1 -0
  103. package/dist/progress.d.ts +2 -8
  104. package/dist/progress.js +1 -1
  105. package/dist/qr-code.d.ts +4 -16
  106. package/dist/qr-code.js +1 -1
  107. package/dist/radio-group.d.ts +10 -40
  108. package/dist/radio-group.js +1 -1
  109. package/dist/scatter-plot.d.ts +495 -0
  110. package/dist/scatter-plot.js +1 -0
  111. package/dist/{select-idm1jy7y.d.ts → select-0z7HVS6r.d.ts} +8 -29
  112. package/dist/select-BCHWvmyC.js +1 -0
  113. package/dist/select.d.ts +1 -1
  114. package/dist/select.js +1 -1
  115. package/dist/selectable-list.d.ts +11 -38
  116. package/dist/selectable-list.js +1 -1
  117. package/dist/sheet.d.ts +12 -39
  118. package/dist/sheet.js +1 -1
  119. package/dist/skip-to-main-link.js +1 -1
  120. package/dist/slider.js +1 -1
  121. package/dist/slot.d.ts +1 -1
  122. package/dist/split-button.d.ts +9 -24
  123. package/dist/split-button.js +1 -1
  124. package/dist/switch.d.ts +1 -1
  125. package/dist/switch.js +1 -1
  126. package/dist/{table-DUSvU_Jw.d.ts → table-Bo0vNxIJ.d.ts} +9 -36
  127. package/dist/table-CGxJwtbL.js +1 -0
  128. package/dist/table.d.ts +1 -1
  129. package/dist/table.js +1 -1
  130. package/dist/tabs.d.ts +21 -36
  131. package/dist/tabs.js +1 -1
  132. package/dist/text-area.d.ts +1 -1
  133. package/dist/text-area.js +1 -1
  134. package/dist/theme-C26-Xolp.js +1 -0
  135. package/dist/theme-switcher.d.ts +6 -15
  136. package/dist/theme-switcher.js +1 -1
  137. package/dist/theme.d.ts +1 -1
  138. package/dist/theme.js +1 -1
  139. package/dist/toast.d.ts +5 -17
  140. package/dist/toast.js +1 -1
  141. package/dist/tooltip.d.ts +26 -8
  142. package/dist/tooltip.js +1 -1
  143. package/package.json +7 -1
  144. package/dist/checkbox-Cq17y0-R.js +0 -1
  145. package/dist/choice-Cc8dA5r8.js +0 -1
  146. package/dist/dialog-CQ2C6vkE.js +0 -1
  147. package/dist/dropdown-menu-CSCDdA3K.js +0 -1
  148. package/dist/field-context-BR01g789.js +0 -1
  149. package/dist/icon-CGgMKpJg.js +0 -1
  150. package/dist/icon-button-DiOhreJD.js +0 -1
  151. package/dist/index-CdPXa9h1.d.ts +0 -1
  152. package/dist/input-CVyAVbim.js +0 -1
  153. package/dist/popover-CBMADtjV.js +0 -1
  154. package/dist/primitive-DCPHJsRs.js +0 -1
  155. package/dist/select-SR_9-bxA.js +0 -1
  156. package/dist/table-GDkapNFi.js +0 -1
  157. package/dist/theme-provider-BftkIiZn.js +0 -1
  158. package/dist/theme-wVnzzx2F.js +0 -1
  159. package/dist/toast-DKgMRv4F.js +0 -1
  160. /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
  161. /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
  162. /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
  163. /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
  164. /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
  165. /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
  166. /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
  167. /package/dist/{svg-only-d-nMCfAI.js → icon-d-nMCfAI.js} +0 -0
  168. /package/dist/{sort-B_DDQcVD.js → icons-B_DDQcVD.js} +0 -0
  169. /package/dist/{traffic-policy-file-CF1lbWtp.js → icons-CF1lbWtp.js} +0 -0
  170. /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
  171. /package/dist/{index-BtwKJTLq.d.ts → slot-BtwKJTLq.d.ts} +0 -0
  172. /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.d.ts} +0 -0
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t}from"react/jsx-runtime";import*as n from"@radix-ui/react-hover-card";const r=({closeDelay:e=300,openDelay:r=100,...i})=>t(n.Root,{closeDelay:e,openDelay:r,...i});r.displayName=`HoverCard`;const i=e=>t(n.Trigger,{"data-slot":`hover-card-trigger`,...e});i.displayName=`HoverCardTrigger`;const a=n.Portal;a.displayName=`HoverCardPortal`;const o=({className:r,onClick:i,align:o=`center`,sideOffset:s=4,...c})=>t(a,{children:t(n.Content,{"data-slot":`hover-card-content`,align:o,sideOffset:s,className:e(`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2`,r),onClick:e=>{e.stopPropagation(),i?.(e)},...c})});o.displayName=n.Content.displayName;const s={Root:r,Content:o,Portal:a,Trigger:i};export{s as HoverCard};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t}from"react/jsx-runtime";import*as n from"@radix-ui/react-hover-card";const r=({closeDelay:e=300,openDelay:r=100,...i})=>t(n.Root,{closeDelay:e,openDelay:r,...i}),i=e=>t(n.Trigger,{"data-slot":`hover-card-trigger`,...e}),a=n.Portal,o={Root:r,Content:({className:r,onClick:i,align:o=`center`,sideOffset:s=4,...c})=>t(a,{children:t(n.Content,{"data-slot":`hover-card-content`,align:o,sideOffset:s,className:e(`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2`,r),onClick:e=>{e.stopPropagation(),i?.(e)},...c})}),Portal:a,Trigger:i};export{o as HoverCard};
@@ -1,4 +1,4 @@
1
- import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
1
+ import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
2
2
  import { ReactNode } from "react";
3
3
  //#region src/components/icon/svg-only.d.ts
4
4
  type SvgOnlyProps = Omit<SvgAttributes, "children"> & {
@@ -1,4 +1,4 @@
1
- import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
1
+ import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
2
2
  import { ReactNode } from "react";
3
3
  //#region src/components/icon/icon.d.ts
4
4
  type IconProps = Omit<SvgAttributes, "children"> & {
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-d-nMCfAI.js";import{jsx as n}from"react/jsx-runtime";const r=({className:r,style:i,svg:a,ref:o,...s})=>n(t,{ref:o,"data-slot":`icon`,className:e(`size-5`,r),style:i,svg:a,...s});export{r as t};
package/dist/icon.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
2
- import { n as IconProps, t as Icon } from "./icon-BDqpcZ-n.js";
3
- import { n as SvgOnlyProps, t as SvgOnly } from "./svg-only-CdI_v82i.js";
1
+ import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
2
+ import { n as IconProps, t as Icon } from "./icon-k4E9yNWD.js";
3
+ import { n as SvgOnlyProps, t as SvgOnly } from "./icon-CX_gj6sW.js";
4
4
  export { Icon, type IconProps, type SvgAttributes, SvgOnly, type SvgOnlyProps };
package/dist/icon.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./svg-only-d-nMCfAI.js";import{t}from"./icon-CGgMKpJg.js";export{t as Icon,e as SvgOnly};
1
+ import{t as e}from"./icon-d-nMCfAI.js";import{t}from"./icon-lZ48P8Nn.js";export{t as Icon,e as SvgOnly};
@@ -0,0 +1 @@
1
+ import{s as e}from"./theme-C26-Xolp.js";import{jsx as t}from"react/jsx-runtime";import{DesktopIcon as n}from"@phosphor-icons/react/Desktop";import{MoonIcon as r}from"@phosphor-icons/react/Moon";import{SunIcon as i}from"@phosphor-icons/react/Sun";function a(n){return t(o,{theme:e(),...n})}function o({theme:e,...a}){switch(e){case`system`:return t(n,{...a});case`light`:return t(i,{...a});case`dark`:return t(r,{...a});case`light-high-contrast`:return t(i,{...a,weight:`fill`});case`dark-high-contrast`:return t(r,{...a,weight:`fill`})}}export{o as n,a as t};
package/dist/icons.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
1
+ import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
2
2
  import { a as AlphanumericSortingDirection, c as TimeSortingDirection, o as SortingDirection, s as SortingMode } from "./direction-BjU0bPST.js";
3
- import { i as Theme } from "./themes-CYNpplwN.js";
3
+ import { i as Theme } from "./theme-CYNpplwN.js";
4
4
  import { ComponentProps } from "react";
5
5
  //#region src/components/icons/sort.d.ts
6
6
  type Props = SvgAttributes & ({
package/dist/icons.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./traffic-policy-file-CF1lbWtp.js";import{t}from"./sort-B_DDQcVD.js";import{n,t as r}from"./theme-wVnzzx2F.js";import{jsx as i}from"react/jsx-runtime";function a(e){return i(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:i(`path`,{d:`M32.272 12.011c-1.298-1.466-2.904-2.205-4.812-2.205-1.176 0-2.26.233-3.255.7a7.995 7.995 0 0 0-2.581 1.906 9.205 9.205 0 0 0-1.715 2.853 9.773 9.773 0 0 0-.628 3.546c0 1.25.194 2.39.58 3.419.362.98.918 1.877 1.635 2.636A7.543 7.543 0 0 0 24 26.584c.965.41 2.025.617 3.176.617.522 0 1.005-.041 1.445-.116.439-.075.858-.2 1.26-.37.4-.175.79-.398 1.18-.664.385-.27.792-.612 1.21-1.018v4.353h-.005v.421h-5.33l-4.005 4.64v.798h15.037v-24.98h-5.697v1.746Zm-.014 7.979a4.25 4.25 0 0 1-.786 1.215 3.555 3.555 0 0 1-2.592 1.1 3.627 3.627 0 0 1-1.464-.292 3.508 3.508 0 0 1-1.166-.808 3.93 3.93 0 0 1-1.054-2.72c0-.519.097-1.006.298-1.457a3.77 3.77 0 0 1 .804-1.181 4.114 4.114 0 0 1 1.162-.808 3.484 3.484 0 0 1 2.817-.016c.448.19.844.463 1.181.81.336.347.6.743.804 1.194.202.452.298.95.298 1.493 0 .505-.104 1.005-.302 1.47m-16.261-7.708a6.173 6.173 0 0 0-2.06-1.602 4.875 4.875 0 0 0-.57-.22 6.383 6.383 0 0 0-.923-.216H8.383L5.697 13.39v-3.082H.002v16.61h5.695V15.712h5.35l.444-.01v11.214h5.697V16.528c0-.885-.084-1.674-.25-2.366a4.655 4.655 0 0 0-.941-1.877zm38.367-2.018h-6.213l-2.47 2.863v-2.864h-5.7v16.61h5.71l.004-11.117h4.144l4.526-5.26zm31.051 7.672 7.79-7.392v-.281H85.7l-5.975 5.991V0h-5.696v26.87h5.696v-6.766l6.262 6.763h7.663v-.316l-8.233-8.617zm-16.11-5.78a9.436 9.436 0 0 0-3.085-1.842 10.953 10.953 0 0 0-3.855-.664c-1.407 0-2.705.226-3.884.678a9.611 9.611 0 0 0-3.072 1.858 8.488 8.488 0 0 0-2.016 2.788 8.281 8.281 0 0 0-.722 3.449c0 1.362.24 2.596.722 3.707a8.52 8.52 0 0 0 2.002 2.862c.85.798 1.86 1.415 3.036 1.847 1.177.432 2.455.647 3.842.647 1.406 0 2.707-.215 3.919-.647 1.204-.431 2.24-1.04 3.098-1.833a8.583 8.583 0 0 0 2.031-2.816c.493-1.09.742-2.29.742-3.611 0-1.316-.244-2.52-.722-3.612a8.424 8.424 0 0 0-2.035-2.81Zm-3.558 7.864c-.2.461-.463.869-.786 1.215a3.573 3.573 0 0 1-2.592 1.1c-.502 0-.981-.096-1.434-.291a3.44 3.44 0 0 1-1.16-.809 4.155 4.155 0 0 1-.788-1.215 3.825 3.825 0 0 1-.297-1.537c0-.517.098-1.004.297-1.456.201-.451.46-.849.787-1.194a3.579 3.579 0 0 1 2.597-1.1c.502 0 .98.096 1.43.29.448.19.839.461 1.16.81.328.345.586.752.786 1.214.2.461.297.954.297 1.471 0 .538-.096 1.04-.297 1.502`})})}function o(e){return i(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:i(`path`,{d:`M27.2 6.18a9.47 9.47 0 0 0-3.12-2.5A9.42 9.42 0 0 0 21.82 3h-6.14l-4.06 4.9V3.1H3V29h8.62V11.53h8.09l.67-.02v17.48H29V12.8c0-1.37-.13-2.6-.38-3.68a7.35 7.35 0 0 0-1.42-2.93Z`})})}export{r as AutoThemeIcon,o as NgrokLettermarkIcon,a as NgrokWordmarkIcon,t as SortIcon,n as ThemeIcon,e as TrafficPolicyFileIcon};
1
+ import{t as e}from"./icons-CF1lbWtp.js";import{t}from"./icons-B_DDQcVD.js";import{n,t as r}from"./icons-DLCs1hLP.js";import{jsx as i}from"react/jsx-runtime";function a(e){return i(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:i(`path`,{d:`M32.272 12.011c-1.298-1.466-2.904-2.205-4.812-2.205-1.176 0-2.26.233-3.255.7a7.995 7.995 0 0 0-2.581 1.906 9.205 9.205 0 0 0-1.715 2.853 9.773 9.773 0 0 0-.628 3.546c0 1.25.194 2.39.58 3.419.362.98.918 1.877 1.635 2.636A7.543 7.543 0 0 0 24 26.584c.965.41 2.025.617 3.176.617.522 0 1.005-.041 1.445-.116.439-.075.858-.2 1.26-.37.4-.175.79-.398 1.18-.664.385-.27.792-.612 1.21-1.018v4.353h-.005v.421h-5.33l-4.005 4.64v.798h15.037v-24.98h-5.697v1.746Zm-.014 7.979a4.25 4.25 0 0 1-.786 1.215 3.555 3.555 0 0 1-2.592 1.1 3.627 3.627 0 0 1-1.464-.292 3.508 3.508 0 0 1-1.166-.808 3.93 3.93 0 0 1-1.054-2.72c0-.519.097-1.006.298-1.457a3.77 3.77 0 0 1 .804-1.181 4.114 4.114 0 0 1 1.162-.808 3.484 3.484 0 0 1 2.817-.016c.448.19.844.463 1.181.81.336.347.6.743.804 1.194.202.452.298.95.298 1.493 0 .505-.104 1.005-.302 1.47m-16.261-7.708a6.173 6.173 0 0 0-2.06-1.602 4.875 4.875 0 0 0-.57-.22 6.383 6.383 0 0 0-.923-.216H8.383L5.697 13.39v-3.082H.002v16.61h5.695V15.712h5.35l.444-.01v11.214h5.697V16.528c0-.885-.084-1.674-.25-2.366a4.655 4.655 0 0 0-.941-1.877zm38.367-2.018h-6.213l-2.47 2.863v-2.864h-5.7v16.61h5.71l.004-11.117h4.144l4.526-5.26zm31.051 7.672 7.79-7.392v-.281H85.7l-5.975 5.991V0h-5.696v26.87h5.696v-6.766l6.262 6.763h7.663v-.316l-8.233-8.617zm-16.11-5.78a9.436 9.436 0 0 0-3.085-1.842 10.953 10.953 0 0 0-3.855-.664c-1.407 0-2.705.226-3.884.678a9.611 9.611 0 0 0-3.072 1.858 8.488 8.488 0 0 0-2.016 2.788 8.281 8.281 0 0 0-.722 3.449c0 1.362.24 2.596.722 3.707a8.52 8.52 0 0 0 2.002 2.862c.85.798 1.86 1.415 3.036 1.847 1.177.432 2.455.647 3.842.647 1.406 0 2.707-.215 3.919-.647 1.204-.431 2.24-1.04 3.098-1.833a8.583 8.583 0 0 0 2.031-2.816c.493-1.09.742-2.29.742-3.611 0-1.316-.244-2.52-.722-3.612a8.424 8.424 0 0 0-2.035-2.81Zm-3.558 7.864c-.2.461-.463.869-.786 1.215a3.573 3.573 0 0 1-2.592 1.1c-.502 0-.981-.096-1.434-.291a3.44 3.44 0 0 1-1.16-.809 4.155 4.155 0 0 1-.788-1.215 3.825 3.825 0 0 1-.297-1.537c0-.517.098-1.004.297-1.456.201-.451.46-.849.787-1.194a3.579 3.579 0 0 1 2.597-1.1c.502 0 .98.096 1.43.29.448.19.839.461 1.16.81.328.345.586.752.786 1.214.2.461.297.954.297 1.471 0 .538-.096 1.04-.297 1.502`})})}function o(e){return i(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:i(`path`,{d:`M27.2 6.18a9.47 9.47 0 0 0-3.12-2.5A9.42 9.42 0 0 0 21.82 3h-6.14l-4.06 4.9V3.1H3V29h8.62V11.53h8.09l.67-.02v17.48H29V12.8c0-1.37-.13-2.6-.38-3.68a7.35 7.35 0 0 0-1.42-2.93Z`})})}export{r as AutoThemeIcon,o as NgrokLettermarkIcon,a as NgrokWordmarkIcon,t as SortIcon,n as ThemeIcon,e as TrafficPolicyFileIcon};
@@ -0,0 +1 @@
1
+ import{t as e}from"./compose-refs-BdBMM9ga.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./icon-lZ48P8Nn.js";import{t as r}from"./clsx-DUGZgXfJ.js";import{a as i,r as a}from"./field-Bpptk_9t.js";import{createContext as o,useContext as s,useMemo as c,useRef as l}from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{CheckCircleIcon as f}from"@phosphor-icons/react/CheckCircle";import{WarningIcon as p}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as m}from"@phosphor-icons/react/WarningDiamond";const h=({children:e,className:t,ref:n,...r})=>{let i=!!e,a=l(null);return i?u(v,{className:t,forwardedRef:n,innerRef:a,...r,children:e}):u(v,{...r,className:t,forwardedRef:n,innerRef:a,children:u(g,{...r})})},g=({"aria-invalid":n,className:r,ref:o,validation:c,...l})=>{let{"aria-invalid":d,forwardedRef:f,innerRef:p,validation:m,...h}=s(_),g=i(),{ariaInvalid:v,validation:y}=a({"aria-invalid":d??n,validation:m??c??g}),b={...h,...l,type:l.type??h.type??`text`};return u(`input`,{"aria-invalid":v,"data-slot":`input-capture`,"data-validation":y,className:t(`placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] focus:outline-hidden`,r),ref:e(o,f,p),...b})},_=o({validation:void 0,innerRef:{current:null}}),v=({"aria-invalid":e,"aria-disabled":n,"data-slot":r=`input`,children:o,className:s,disabled:l,forwardedRef:f,innerRef:p,style:m,type:h,validation:g,...v})=>{let b=i(),{validation:x}=a({"aria-invalid":e,validation:g??b}),S=c(()=>({"aria-invalid":e,"aria-disabled":n,disabled:l,type:h,validation:g,...v,forwardedRef:f,innerRef:p}),[e,n,l,h,g,v,f,p]);return u(_.Provider,{value:S,children:d(`div`,{role:`none`,"data-slot":r,"data-disabled":(l??n)||void 0,"data-validation":x||void 0,className:t(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-hidden focus-within:ring-4`,`data-disabled:opacity-50`,`has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5`,`border-form text-strong focus-within:border-accent-600 focus-within:ring-focus-accent`,`data-validation-success:border-success-600 focus-within:data-validation-success:border-success-600 focus-within:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 focus-within:data-validation-warning:border-warning-600 focus-within:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 focus-within:data-validation-error:border-danger-600 focus-within:data-validation-error:ring-focus-danger`,`autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] has-autofill:bg-blue-50 has-autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,s),onMouseDown:e=>{e.target!==p?.current&&e.preventDefault()},onClick:()=>{p?.current?.focus()},onKeyDown:()=>{p?.current!==document.activeElement&&p?.current?.focus()},style:m,children:[o,u(y,{name:v.name,validation:x})]})})},y=({name:e,validation:t})=>{switch(t){case`error`:return d(`div`,{className:`text-danger-600 order-last select-none`,children:[u(`span`,{className:`sr-only`,children:r(`The value entered for the`,e,`input has failed validation.`)}),u(n,{svg:u(p,{"aria-hidden":!0,weight:`fill`})})]});case`success`:return u(`div`,{className:`text-success-600 order-last select-none`,children:u(n,{svg:u(f,{weight:`fill`})})});case`warning`:return u(`div`,{className:`text-warning-600 order-last select-none`,children:u(n,{svg:u(m,{weight:`fill`})})});default:return null}};export{g as n,h as t};
@@ -1,4 +1,4 @@
1
- import { o as WithValidation } from "./validation-7QeiTFwl.js";
1
+ import { o as WithValidation } from "./field-7QeiTFwl.js";
2
2
  import { ComponentProps, PropsWithChildren } from "react";
3
3
  //#region src/components/input/types.d.ts
4
4
  /**
package/dist/input.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { o as WithValidation, r as Validation } from "./validation-7QeiTFwl.js";
2
- import { a as AutoComplete, c as WithInputType, i as InputProps, n as InputCapture, o as InputType, r as InputCaptureProps, s as WithAutoComplete, t as Input } from "./input-DV9M6K4v.js";
1
+ import { o as WithValidation, r as Validation } from "./field-7QeiTFwl.js";
2
+ import { a as AutoComplete, c as WithInputType, i as InputProps, n as InputCapture, o as InputType, r as InputCaptureProps, s as WithAutoComplete, t as Input } from "./input-BuYDU6CF.js";
3
3
  import { ComponentProps } from "react";
4
4
  //#region src/components/input/password-input.d.ts
5
5
  type PasswordInputProps = Omit<ComponentProps<"input">, "autoComplete" | "type"> & WithValidation & WithAutoComplete & {
package/dist/input.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./icon-CGgMKpJg.js";import{n as t,t as n}from"./input-CVyAVbim.js";import{t as r}from"./use-prefers-reduced-motion-CagaNRgm.js";import{t as i}from"./is-input-CXmS0OFN.js";import{useEffect as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{EyeIcon as u}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as d}from"@phosphor-icons/react/EyeClosed";import{flushSync as f}from"react-dom";const p=({onValueVisibilityChange:i,ref:p,showValue:m=!1,...h})=>{let[g,_]=s(m),v=g?`text`:`password`,y=g?u:d,b=o(null),x=o(null);return a(()=>{_(m)},[m]),l(n,{"data-slot":`password-input`,type:v,ref:p,...h,children:[c(t,{}),l(`button`,{type:`button`,tabIndex:-1,className:`text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0`,onClick:()=>{x.current&&=(x.current.cancel(),null);let e=!g;f(()=>{_(e)}),i?.(e);let t=b.current;t&&!r()&&(x.current=t.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:200,easing:`ease-out`}),x.current.onfinish=()=>{x.current=null})},children:[l(`span`,{className:`sr-only`,children:[`Turn password visibility `,g?`off`:`on`]}),c(e,{ref:b,svg:c(y,{"aria-hidden":!0})})]})]})};export{n as Input,t as InputCapture,p as PasswordInput,i as isInput};
1
+ import{t as e}from"./icon-lZ48P8Nn.js";import{n as t,t as n}from"./input-BnlpQF0c.js";import{t as r}from"./use-prefers-reduced-motion-CagaNRgm.js";import{t as i}from"./input-CXmS0OFN.js";import{useEffect as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{EyeIcon as u}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as d}from"@phosphor-icons/react/EyeClosed";import{flushSync as f}from"react-dom";const p=({onValueVisibilityChange:i,ref:p,showValue:m=!1,...h})=>{let[g,_]=s(m),v=g?`text`:`password`,y=g?u:d,b=o(null),x=o(null);return a(()=>{_(m)},[m]),l(n,{"data-slot":`password-input`,type:v,ref:p,...h,children:[c(t,{}),l(`button`,{type:`button`,tabIndex:-1,className:`text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0`,onClick:()=>{x.current&&=(x.current.cancel(),null);let e=!g;f(()=>{_(e)}),i?.(e);let t=b.current;t&&!r()&&(x.current=t.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:200,easing:`ease-out`}),x.current.onfinish=()=>{x.current=null})},children:[l(`span`,{className:`sr-only`,children:[`Turn password visibility `,g?`off`:`on`]}),c(e,{ref:b,svg:c(y,{"aria-hidden":!0})})]})]})};export{n as Input,t as InputCapture,p as PasswordInput,i as isInput};
@@ -0,0 +1,490 @@
1
+ import { _ as SeriesColor, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f as ChartDatum, g as PointShape, h as CurveKind, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ContinuousXScale, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibleName } from "./chart-BcOC6Qj0.js";
2
+ //#region src/components/line-chart/line-chart.d.ts
3
+ /**
4
+ * Props for {@link LineChart.Root}. Lines encode value by vertical position,
5
+ * not length from a baseline, so the full y domain stays overridable via
6
+ * `yDomain` — and lines never stack, so there is no `stacked` prop.
7
+ */
8
+ type LineChartRootProps<TDatum extends ChartDatum = ChartDatum> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibleName & {
9
+ /** Rows of data; each `LineChart.Line` reads one numeric key per row. */
10
+ data: readonly TDatum[];
11
+ /** The key of each row's x value. */
12
+ xKey: Extract<keyof TDatum, string>;
13
+ /**
14
+ * Override the auto-detected x scale (`Date` values → `"time"`, numbers →
15
+ * `"linear"`, strings → `"point"`).
16
+ */
17
+ xScale?: ContinuousXScale;
18
+ };
19
+ /**
20
+ * Props for {@link LineChart.Line}.
21
+ */
22
+ type LineChartLineProps = {
23
+ /** The row key this series reads its numeric values from. */
24
+ dataKey: string;
25
+ /** Display name for the legend, tooltip, and data table. Defaults to `dataKey`. */
26
+ label?: string;
27
+ /**
28
+ * One of the validated chart tokens (`"chart-1"`…`"chart-8"`, `"chart-other"`)
29
+ * or any CSS color as an escape hatch. Defaults to the next sticky slot in
30
+ * mount order. Static colors (raw hex) do not adapt across themes; custom
31
+ * palettes must be validated for colorblind-safe adjacency and surface
32
+ * contrast, and a series that carries good/bad meaning should wear the
33
+ * semantic status colors, never a categorical slot.
34
+ */
35
+ color?: SeriesColor;
36
+ /**
37
+ * Interpolation between points: `"linear"` (default), `"monotone"`
38
+ * (smoothed), or `"step"`.
39
+ */
40
+ curve?: CurveKind;
41
+ /**
42
+ * Draw point markers with a surface ring. Auto-hidden when points are
43
+ * denser than ~12px apart.
44
+ */
45
+ markers?: boolean;
46
+ /**
47
+ * Join across `null`/missing values instead of leaving gaps. Gaps are the
48
+ * default and usually correct.
49
+ */
50
+ connectNulls?: boolean;
51
+ /**
52
+ * The glyph the hover dot and canvas point markers wear: `"circle"` (default), `"square"`,
53
+ * `"triangle"`, or `"diamond"` — a redundant encoding alongside color that
54
+ * keeps series distinguishable without color vision.
55
+ */
56
+ shape?: PointShape;
57
+ };
58
+ /**
59
+ * Props for {@link LineChart.Grid}.
60
+ */
61
+ type LineChartGridProps = GridPrimitiveProps;
62
+ /**
63
+ * Props for {@link LineChart.XAxis}. The tick formatter receives the row's x
64
+ * value — a `Date` on time scales, a number on linear scales, and the
65
+ * category value on point scales.
66
+ */
67
+ type LineChartXAxisProps = XAxisPrimitiveProps;
68
+ /**
69
+ * Props for {@link LineChart.YAxis}.
70
+ */
71
+ type LineChartYAxisProps = YAxisPrimitiveProps;
72
+ /**
73
+ * Props for {@link LineChart.ReferenceLine}.
74
+ */
75
+ type LineChartReferenceLineProps = ReferenceLinePrimitiveProps;
76
+ /**
77
+ * Props for {@link LineChart.Tooltip}.
78
+ */
79
+ type LineChartTooltipProps = TooltipPrimitiveProps;
80
+ /**
81
+ * Props for {@link LineChart.Legend}.
82
+ */
83
+ type LineChartLegendProps = LegendPrimitiveProps;
84
+ /**
85
+ * Props for {@link LineChart.CopyButton}.
86
+ */
87
+ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
88
+ /**
89
+ * The root of a line chart: owns the data, the scales, the canvas renderer,
90
+ * and the entire interaction contract (a crosshair snapped to the nearest x
91
+ * with a tooltip reading every series, keyboard stepping with polite
92
+ * announcements, an sr-only data table, Enter/Space + click activation).
93
+ * Rendering is canvas with min/max decimation, so series of 100k+ points stay
94
+ * smooth. Compose the chrome and series parts as children.
95
+ *
96
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartroot
97
+ *
98
+ * @example
99
+ * ```tsx
100
+ * const data = [
101
+ * { time: new Date("2026-07-18T10:00:00Z"), p50: 120, p99: 480 },
102
+ * { time: new Date("2026-07-18T10:01:00Z"), p50: 132, p99: 510 },
103
+ * { time: new Date("2026-07-18T10:02:00Z"), p50: 101, p99: 460 },
104
+ * ];
105
+ *
106
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
107
+ * <LineChart.Grid />
108
+ * <LineChart.XAxis />
109
+ * <LineChart.YAxis />
110
+ * <LineChart.Line dataKey="p50" label="p50" />
111
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
112
+ * <LineChart.Tooltip />
113
+ * <LineChart.Legend />
114
+ * </LineChart.Root>
115
+ * ```
116
+ */
117
+ declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: LineChartRootProps<TDatum>) => import("react").JSX.Element;
118
+ /**
119
+ * One line series. Renders nothing itself — it registers the series with the
120
+ * chart, which paints it on canvas. Compose one `Line` per series; `null` and
121
+ * missing values render as gaps unless `connectNulls` joins across them.
122
+ *
123
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartline
124
+ *
125
+ * @example
126
+ * ```tsx
127
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
128
+ * <LineChart.Grid />
129
+ * <LineChart.XAxis />
130
+ * <LineChart.YAxis />
131
+ * <LineChart.Line dataKey="p50" label="p50" />
132
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
133
+ * <LineChart.Legend />
134
+ * </LineChart.Root>
135
+ * ```
136
+ */
137
+ declare const Line: (props: LineChartLineProps) => null;
138
+ /**
139
+ * Horizontal hairline gridlines behind the lines (renderless; painted on
140
+ * canvas). Omit the part to omit the grid.
141
+ *
142
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartgrid
143
+ *
144
+ * @example
145
+ * ```tsx
146
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
147
+ * <LineChart.Grid />
148
+ * <LineChart.XAxis />
149
+ * <LineChart.YAxis />
150
+ * <LineChart.Line dataKey="p50" label="p50" />
151
+ * <LineChart.Legend />
152
+ * </LineChart.Root>
153
+ * ```
154
+ */
155
+ declare const Grid: (props: LineChartGridProps) => null;
156
+ /**
157
+ * Tick labels along the bottom of the plot (renderless; painted on canvas).
158
+ * Labels that would collide are skipped, never rotated.
159
+ *
160
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartxaxis
161
+ *
162
+ * @example
163
+ * ```tsx
164
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
165
+ * <LineChart.Grid />
166
+ * <LineChart.XAxis tickFormat={(time) => (time instanceof Date ? time.toLocaleTimeString() : String(time))} />
167
+ * <LineChart.YAxis />
168
+ * <LineChart.Line dataKey="p50" label="p50" />
169
+ * <LineChart.Legend />
170
+ * </LineChart.Root>
171
+ * ```
172
+ */
173
+ declare const XAxis: (props: LineChartXAxisProps) => null;
174
+ /**
175
+ * Value tick labels along the left of the plot (renderless; painted on
176
+ * canvas). Ticks land on clean thousands-separated numbers.
177
+ *
178
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartyaxis
179
+ *
180
+ * @example
181
+ * ```tsx
182
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
183
+ * <LineChart.Grid />
184
+ * <LineChart.XAxis />
185
+ * <LineChart.YAxis tickFormat={(value) => `${value}ms`} />
186
+ * <LineChart.Line dataKey="p50" label="p50" />
187
+ * <LineChart.Legend />
188
+ * </LineChart.Root>
189
+ * ```
190
+ */
191
+ declare const YAxis: (props: LineChartYAxisProps) => null;
192
+ /**
193
+ * A dashed horizontal marker at a y value — an SLO threshold, a budget, a
194
+ * limit (renderless; painted on canvas).
195
+ *
196
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartreferenceline
197
+ *
198
+ * @example
199
+ * ```tsx
200
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
201
+ * <LineChart.Grid />
202
+ * <LineChart.XAxis />
203
+ * <LineChart.YAxis />
204
+ * <LineChart.Line dataKey="p50" label="p50" />
205
+ * <LineChart.ReferenceLine y={500} label="SLO" />
206
+ * <LineChart.Legend />
207
+ * </LineChart.Root>
208
+ * ```
209
+ */
210
+ declare const ReferenceLine: (props: LineChartReferenceLineProps) => null;
211
+ /**
212
+ * Customizes the hover/keyboard tooltip readout. The tooltip itself is part
213
+ * of `LineChart.Root`'s interaction contract and renders whether or not this
214
+ * part is composed — compose it to format the label or values, append a
215
+ * footer, or replace the content entirely via the render-prop `children`.
216
+ *
217
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linecharttooltip
218
+ *
219
+ * @example
220
+ * ```tsx
221
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
222
+ * <LineChart.Grid />
223
+ * <LineChart.XAxis />
224
+ * <LineChart.YAxis />
225
+ * <LineChart.Line dataKey="p50" label="p50" />
226
+ * <LineChart.Tooltip valueFormat={(value) => `${value}ms`} footer="Click to view logs" />
227
+ * <LineChart.Legend />
228
+ * </LineChart.Root>
229
+ * ```
230
+ */
231
+ declare const Tooltip: (props: LineChartTooltipProps) => null;
232
+ /**
233
+ * The legend: series names keyed by color swatches, rendered as real DOM in
234
+ * flow below the plot. Always compose it on multi-series charts — identity
235
+ * must never rely on color-matching alone. It renders nothing for a single
236
+ * series (the chart's title already names it).
237
+ *
238
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartlegend
239
+ *
240
+ * @example
241
+ * ```tsx
242
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
243
+ * <LineChart.Grid />
244
+ * <LineChart.XAxis />
245
+ * <LineChart.YAxis />
246
+ * <LineChart.Line dataKey="p50" label="p50" />
247
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
248
+ * <LineChart.Legend />
249
+ * </LineChart.Root>
250
+ * ```
251
+ */
252
+ declare const Legend: (props: LineChartLegendProps) => import("react").JSX.Element;
253
+ /**
254
+ * A button that copies the chart's current data to the clipboard as a
255
+ * markdown table (ISO dates, plain numbers, one column per series) —
256
+ * pasteable into Slack, issues, docs, spreadsheets, and LLM chats. Renders
257
+ * in flow where composed (alongside `Legend`, below the plot); `Root` is
258
+ * relatively positioned, so `className` can dock it over a corner instead
259
+ * (e.g. `absolute right-0 top-0`).
260
+ *
261
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartcopybutton
262
+ *
263
+ * @example
264
+ * ```tsx
265
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
266
+ * <LineChart.Line dataKey="p50" label="p50" />
267
+ * <LineChart.Line dataKey="p99" label="p99" />
268
+ * <LineChart.Legend />
269
+ * <LineChart.CopyButton />
270
+ * </LineChart.Root>
271
+ * ```
272
+ */
273
+ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").JSX.Element;
274
+ /**
275
+ * A canvas-rendered line chart for trends over a continuous x — time above
276
+ * all. Series colors come from the theme's validated `--color-chart-*`
277
+ * tokens; lines keep a fixed slot color for the chart's lifetime even as
278
+ * other series are filtered in and out. Interaction — a crosshair snapped to
279
+ * the nearest x with an every-series tooltip, keyboard stepping, aria-live
280
+ * announcements, and an sr-only data table — ships with `Root`
281
+ * unconditionally. Min/max decimation keeps 100k+ point series smooth.
282
+ *
283
+ * @see https://mantle.ngrok.com/components/charts/line-chart
284
+ *
285
+ * @example
286
+ * Composition:
287
+ * ```
288
+ * LineChart.Root
289
+ * ├── LineChart.Grid
290
+ * ├── LineChart.XAxis
291
+ * ├── LineChart.YAxis
292
+ * ├── LineChart.Line (one per series)
293
+ * ├── LineChart.ReferenceLine
294
+ * ├── LineChart.Tooltip
295
+ * └── LineChart.Legend
296
+ * ```
297
+ *
298
+ * @example
299
+ * ```tsx
300
+ * const data = [
301
+ * { time: new Date("2026-07-18T10:00:00Z"), p50: 120, p99: 480 },
302
+ * { time: new Date("2026-07-18T10:01:00Z"), p50: 132, p99: 510 },
303
+ * { time: new Date("2026-07-18T10:02:00Z"), p50: 101, p99: 460 },
304
+ * ];
305
+ *
306
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
307
+ * <LineChart.Grid />
308
+ * <LineChart.XAxis />
309
+ * <LineChart.YAxis />
310
+ * <LineChart.Line dataKey="p50" label="p50" />
311
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
312
+ * <LineChart.Tooltip />
313
+ * <LineChart.Legend />
314
+ * </LineChart.Root>
315
+ * ```
316
+ */
317
+ declare const LineChart: {
318
+ /**
319
+ * The root of a line chart: owns the data, the scales, the canvas renderer,
320
+ * and the entire interaction contract.
321
+ *
322
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartroot
323
+ *
324
+ * @example
325
+ * ```tsx
326
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
327
+ * <LineChart.Grid />
328
+ * <LineChart.XAxis />
329
+ * <LineChart.YAxis />
330
+ * <LineChart.Line dataKey="p50" label="p50" />
331
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
332
+ * <LineChart.Tooltip />
333
+ * <LineChart.Legend />
334
+ * </LineChart.Root>
335
+ * ```
336
+ */
337
+ readonly Root: typeof Root;
338
+ /**
339
+ * One line series; registers with the chart and paints on canvas.
340
+ *
341
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartline
342
+ *
343
+ * @example
344
+ * ```tsx
345
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
346
+ * <LineChart.Grid />
347
+ * <LineChart.XAxis />
348
+ * <LineChart.YAxis />
349
+ * <LineChart.Line dataKey="p50" label="p50" />
350
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
351
+ * <LineChart.Tooltip />
352
+ * <LineChart.Legend />
353
+ * </LineChart.Root>
354
+ * ```
355
+ */
356
+ readonly Line: typeof Line;
357
+ /**
358
+ * Hairline gridlines behind the lines.
359
+ *
360
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartgrid
361
+ *
362
+ * @example
363
+ * ```tsx
364
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
365
+ * <LineChart.Grid />
366
+ * <LineChart.XAxis />
367
+ * <LineChart.YAxis />
368
+ * <LineChart.Line dataKey="p50" label="p50" />
369
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
370
+ * <LineChart.Tooltip />
371
+ * <LineChart.Legend />
372
+ * </LineChart.Root>
373
+ * ```
374
+ */
375
+ readonly Grid: typeof Grid;
376
+ /**
377
+ * Tick labels along the bottom of the plot.
378
+ *
379
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartxaxis
380
+ *
381
+ * @example
382
+ * ```tsx
383
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
384
+ * <LineChart.Grid />
385
+ * <LineChart.XAxis tickFormat={(time) => (time instanceof Date ? time.toLocaleTimeString() : String(time))} />
386
+ * <LineChart.YAxis />
387
+ * <LineChart.Line dataKey="p50" label="p50" />
388
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
389
+ * <LineChart.Tooltip />
390
+ * <LineChart.Legend />
391
+ * </LineChart.Root>
392
+ * ```
393
+ */
394
+ readonly XAxis: typeof XAxis;
395
+ /**
396
+ * Value tick labels along the left of the plot.
397
+ *
398
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartyaxis
399
+ *
400
+ * @example
401
+ * ```tsx
402
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
403
+ * <LineChart.Grid />
404
+ * <LineChart.XAxis />
405
+ * <LineChart.YAxis tickFormat={(value) => `${value}ms`} />
406
+ * <LineChart.Line dataKey="p50" label="p50" />
407
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
408
+ * <LineChart.Tooltip />
409
+ * <LineChart.Legend />
410
+ * </LineChart.Root>
411
+ * ```
412
+ */
413
+ readonly YAxis: typeof YAxis;
414
+ /**
415
+ * A dashed horizontal marker at a y value (threshold, budget, limit).
416
+ *
417
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartreferenceline
418
+ *
419
+ * @example
420
+ * ```tsx
421
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
422
+ * <LineChart.Grid />
423
+ * <LineChart.XAxis />
424
+ * <LineChart.YAxis />
425
+ * <LineChart.Line dataKey="p50" label="p50" />
426
+ * <LineChart.ReferenceLine y={500} label="SLO" />
427
+ * <LineChart.Tooltip />
428
+ * <LineChart.Legend />
429
+ * </LineChart.Root>
430
+ * ```
431
+ */
432
+ readonly ReferenceLine: typeof ReferenceLine;
433
+ /**
434
+ * Customizes the always-on hover/keyboard tooltip readout.
435
+ *
436
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linecharttooltip
437
+ *
438
+ * @example
439
+ * ```tsx
440
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
441
+ * <LineChart.Grid />
442
+ * <LineChart.XAxis />
443
+ * <LineChart.YAxis />
444
+ * <LineChart.Line dataKey="p50" label="p50" />
445
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
446
+ * <LineChart.Tooltip valueFormat={(value) => `${value}ms`} />
447
+ * <LineChart.Legend />
448
+ * </LineChart.Root>
449
+ * ```
450
+ */
451
+ readonly Tooltip: typeof Tooltip;
452
+ /**
453
+ * The legend; always compose it on multi-series charts. Renders nothing for
454
+ * a single series.
455
+ *
456
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartlegend
457
+ *
458
+ * @example
459
+ * ```tsx
460
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
461
+ * <LineChart.Grid />
462
+ * <LineChart.XAxis />
463
+ * <LineChart.YAxis />
464
+ * <LineChart.Line dataKey="p50" label="p50" />
465
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
466
+ * <LineChart.Tooltip />
467
+ * <LineChart.Legend />
468
+ * </LineChart.Root>
469
+ * ```
470
+ */
471
+ readonly Legend: typeof Legend;
472
+ /**
473
+ * Copies the chart's current data to the clipboard as a markdown table.
474
+ *
475
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartcopybutton
476
+ *
477
+ * @example
478
+ * ```tsx
479
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
480
+ * <LineChart.Line dataKey="p50" label="p50" />
481
+ * <LineChart.Line dataKey="p99" label="p99" />
482
+ * <LineChart.Legend />
483
+ * <LineChart.CopyButton />
484
+ * </LineChart.Root>
485
+ * ```
486
+ */
487
+ readonly CopyButton: typeof CopyButton;
488
+ };
489
+ //#endregion
490
+ export { type ChartDatumEvent, LineChart, type LineChartCopyButtonProps, type LineChartGridProps, type LineChartLegendProps, type LineChartLineProps, type LineChartReferenceLineProps, type LineChartRootProps, type LineChartTooltipProps, type LineChartXAxisProps, type LineChartYAxisProps };
@@ -0,0 +1 @@
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BROa2gqt.js";import{jsx as l}from"react/jsx-runtime";const u={Root:e=>l(o,{kind:`line`,componentName:`LineChart`,slotName:`line-chart`,...e}),Line:e=>a(`LineChart.Line`,`line`,e),Grid:e=>n(`LineChart.Grid`,e),XAxis:e=>t(`LineChart.XAxis`,e),YAxis:e=>r(`LineChart.YAxis`,e),ReferenceLine:t=>e(`LineChart.ReferenceLine`,t),Tooltip:e=>s(`LineChart.Tooltip`,e),Legend:e=>l(i,{partName:`LineChart.Legend`,slotName:`line-chart`,...e}),CopyButton:e=>l(c,{partName:`LineChart.CopyButton`,slotName:`line-chart`,...e})};export{u as LineChart};
@@ -1 +1 @@
1
- import{n as e}from"./compose-refs-BdBMM9ga.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-CDk0Bb9z.js";import{Children as r,createContext as i,isValidElement as a,useCallback as o,useContext as s,useEffect as c,useId as l,useMemo as u,useRef as d,useState as f}from"react";import p from"tiny-invariant";import{jsx as m}from"react/jsx-runtime";import{useVirtualizer as h}from"@tanstack/react-virtual";const g=i(null);function _(e){let t=s(g);return p(t,`List.${e} must be composed inside List.Root / List.VirtualRoot (or a SelectableList viewport).`),t}const v=i(null),y=i(null);function b(e){return a(e)?e.props.disabled===!0:!1}function x({start:e,step:t,count:n,isItemDisabled:r}){for(let i=e;i>=0&&i<n;i+=t)if(!r(i))return i;return-1}const S=`a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])`;function C(e){let t=e.matches(S)?e:e.querySelector(S);return t instanceof HTMLElement?t:null}function w(e){let t=e instanceof Element?e.closest(`[data-index]`):null;if(t==null)return null;let n=Number(t.getAttribute(`data-index`));return!Number.isInteger(n)||n<0?null:{item:t,index:n}}function T(e,t){if(!(e instanceof Element))return!1;let n=e.closest(`a[href], button, input, select, textarea, label, [role="button"], [role="link"], [role="menuitem"], [contenteditable="true"]`);return n!=null&&t.contains(n)}function E({count:e,isItemDisabled:t,focusItemAt:n}){return{onKeyDown:r=>{if(r.target instanceof HTMLElement&&(r.target.isContentEditable||r.target.tagName===`INPUT`||r.target.tagName===`TEXTAREA`||r.target.tagName===`SELECT`)||r.altKey||r.ctrlKey||r.metaKey)return;let i=w(r.target);if(i==null)return;let a=-1,o=1;switch(r.key){case`ArrowDown`:o=1,a=x({start:i.index+1,step:o,count:e,isItemDisabled:t});break;case`ArrowUp`:o=-1,a=x({start:i.index-1,step:o,count:e,isItemDisabled:t});break;case`Home`:o=1,a=x({start:0,step:o,count:e,isItemDisabled:t});break;case`End`:o=-1,a=x({start:e-1,step:o,count:e,isItemDisabled:t});break;default:return}r.preventDefault(),a>=0&&a!==i.index&&n(a,o)}}}function D({count:e,enabled:t,isItemDisabled:n,onActivate:r,itemId:i,scrollToIndex:a}){let[o,s]=f(-1),l=d(!1),u=o>=e?e-1:o;if(c(()=>{o>=e&&s(e-1)},[o,e]),!t)return{activeIndex:-1,collectionProps:{}};let p=e=>n?.(e)??!1,m=(t,n)=>x({start:t,step:n,count:e,isItemDisabled:p}),h=e=>{e<0||(s(e),a(e))};return{activeIndex:u,collectionProps:{tabIndex:0,"aria-activedescendant":u>=0?i(u):void 0,onMouseDown:e=>{let t=w(e.target);if(t!=null&&!p(t.index)){s(t.index),l.current=!1;return}l.current=!0},onClick:e=>{if(e.defaultPrevented)return;let t=w(e.target);t==null||p(t.index)||T(e.target,t.item)||(s(t.index),r?.(t.index))},onFocus:t=>{if(t.target!==t.currentTarget){let e=w(t.target);e!=null&&!p(e.index)&&s(e.index),t.target instanceof HTMLElement&&t.target.tabIndex>=0||t.currentTarget.focus({preventScroll:!0}),l.current=!1;return}let n=l.current;l.current=!1,e>0&&!n&&s(e=>e<0?m(0,1):e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(s(-1),l.current=!1)},onKeyDown:t=>{if(t.target===t.currentTarget&&!(t.altKey||t.ctrlKey||t.metaKey))switch(l.current=!1,t.key){case`ArrowDown`:t.preventDefault(),h(m(u<0?0:u+1,1));break;case`ArrowUp`:t.preventDefault(),h(u<0?m(0,1):m(u-1,-1));break;case`Home`:t.preventDefault(),h(m(0,1));break;case`End`:t.preventDefault(),h(m(e-1,-1));break;case` `:case`Enter`:!t.repeat&&u>=0&&!p(u)&&(t.preventDefault(),r?.(u));break;default:break}}}}}function O({count:e,focusItemAt:t,isItemDisabled:n,onActivate:r,itemId:i,scrollToIndex:a,semantics:o}){let s=l(),c=u(()=>({semantics:o}),[o]),d=u(()=>i??(e=>`${s}-item-${e}`),[i,s]),{activeIndex:f,collectionProps:p}=D({count:e,enabled:o===`grid`,isItemDisabled:n,onActivate:r,itemId:d,scrollToIndex:a}),m=u(()=>({activeIndex:f,stampItemId:i==null?d:null}),[f,d,i]);return{collectionProps:o===`list`?E({count:e,isItemDisabled:n,focusItemAt:t}):p,gridNav:m,listContext:c}}function k({"aria-label":e,"aria-labelledby":n,"aria-multiselectable":r,children:i,className:a,collectionProps:o,gridNav:s,listContext:c,viewportProps:l,ref:u}){return m(g.Provider,{value:c,children:m(y.Provider,{value:s,children:m(`div`,{ref:u,"data-slot":`list`,className:t(`border-popover bg-popover scrollbar overscroll-none overflow-x-hidden overflow-y-auto rounded-md border p-1`,a),...l,children:m(`div`,{"data-slot":`list-collection`,role:c.semantics===`grid`?`grid`:`list`,"aria-label":e,"aria-labelledby":n,"aria-multiselectable":r,className:`relative flex w-full flex-col gap-px outline-hidden`,...o,children:i})})})})}k.displayName=`ListPrimitiveShell`;const A=({asChild:r,children:i,className:a,disabled:o=!1,ref:c,selected:l=!1,style:u,...d})=>{let{semantics:f}=_(`Item`),p=s(v),h=s(y),g=f===`grid`,b=r?n:`div`,x=p?.placement??null,S=p?.index,C=g&&h!=null&&S!=null&&h.activeIndex===S;return m(b,{ref:e(c,x?.measureRef??null),"data-slot":`list-item`,...d,id:g&&S!=null&&h?.stampItemId!=null?h.stampItemId(S):d.id,"data-index":S,"data-state":l?`selected`:`unselected`,"data-disabled":o||void 0,"data-active":C||void 0,role:g?`row`:`listitem`,"aria-selected":g?l:void 0,"aria-disabled":g&&o?!0:d[`aria-disabled`],"aria-rowindex":g?x?.posInSet:void 0,"aria-posinset":g?void 0:x?.posInSet,"aria-setsize":g?void 0:x?.setSize,className:t(`rounded-md data-[state=selected]:bg-selected-menu-item data-[active]:bg-active-menu-item data-[active]:data-[state=selected]:bg-active-selected-menu-item`,!o&&`hover:bg-active-menu-item hover:data-[state=selected]:bg-active-selected-menu-item`,!g&&!o&&`has-[:focus-visible]:bg-active-menu-item has-[:focus-visible]:data-[state=selected]:bg-active-selected-menu-item`,a),style:x?{...u,...x.style}:u,children:i})};A.displayName=`ListPrimitiveItem`;function j({children:e,index:t}){let n=u(()=>({index:t,placement:null}),[t]);return m(v.Provider,{value:n,children:e})}j.displayName=`ListPrimitivePlainItem`;const M=({"aria-label":t,"aria-labelledby":n,"aria-multiselectable":i,children:s,className:c,isItemDisabled:l,onActivate:f,itemId:p,ref:h,semantics:g=`list`,..._})=>{let v=d(null),y=e(v,h),x=u(()=>r.toArray(s).filter(a),[s]),S=o(e=>{v.current?.querySelector(`[data-index="${e}"]`)?.scrollIntoView({block:`nearest`})},[]),w=o((e,t)=>{let n=v.current;if(n!=null)for(let r=e;r>=0&&r<x.length;r+=t){let e=n.querySelector(`[data-index="${r}"]`);if(e==null)continue;let t=C(e);if(t!=null){t.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`});return}}},[x.length]),{collectionProps:T,gridNav:E,listContext:D}=O({count:x.length,focusItemAt:w,isItemDisabled:l??(e=>b(x[e])),onActivate:f,itemId:p,scrollToIndex:S,semantics:g});return m(k,{"aria-label":t,"aria-labelledby":n,"aria-multiselectable":i,className:c,collectionProps:T,gridNav:E,listContext:D,viewportProps:_,ref:y,children:x.map((e,t)=>m(j,{index:t,children:e},e.key??t))})};M.displayName=`ListPrimitiveRoot`;function N({virtualItem:e,count:t,measureRef:n}){return{posInSet:e.index+1,setSize:t,measureRef:n,style:{position:`absolute`,left:0,top:0,width:`100%`,transform:`translateY(${e.start}px)`}}}function P({children:e,count:t,measureRef:n,virtualItem:r}){let i=u(()=>({index:r.index,placement:N({virtualItem:r,count:t,measureRef:n})}),[r,t,n]);return m(v.Provider,{value:i,children:e})}P.displayName=`ListPrimitiveWindowedItem`;const F=({"aria-label":t,"aria-labelledby":n,"aria-multiselectable":i,children:s,className:l,estimateItemHeight:f=44,isItemDisabled:p,onActivate:g,overscan:_=8,itemId:v,ref:y,semantics:x=`list`,...S})=>{let w=d(null),T=e(w,y),E=u(()=>r.toArray(s).filter(a),[s]),D=E.length,A=h({count:D,getScrollElement:()=>w.current,estimateSize:()=>f,getItemKey:e=>E[e]?.key??e,overscan:_,gap:1}),j=o(e=>A.scrollToIndex(e,{align:`auto`}),[A]),M=d(null);c(()=>()=>{M.current!=null&&cancelAnimationFrame(M.current)},[]);let{collectionProps:N,gridNav:F,listContext:I}=O({count:D,focusItemAt:o((e,t)=>{M.current!=null&&(cancelAnimationFrame(M.current),M.current=null);let n=e,r=0,i=()=>{M.current=null;let e=w.current;if(e==null||n<0||n>=D)return;A.scrollToIndex(n,{align:`auto`});let a=e.querySelector(`[data-index="${n}"]`);if(a!=null){let e=C(a);if(e!=null){e.focus({preventScroll:!0});return}n+=t,r=0}r+=1,r<10&&(M.current=requestAnimationFrame(i))};i()},[D,A]),isItemDisabled:p??(e=>b(E[e])),onActivate:g,itemId:v,scrollToIndex:j,semantics:x}),L=A.getVirtualItems(),R=L.some(e=>e.index===F.activeIndex);return m(k,{"aria-label":t,"aria-labelledby":n,"aria-multiselectable":i,className:l,collectionProps:{...N,"aria-activedescendant":R?N[`aria-activedescendant`]:void 0,"aria-rowcount":x===`grid`?D:void 0,style:{height:`${A.getTotalSize()}px`}},gridNav:F,listContext:I,viewportProps:S,ref:T,children:L.map(e=>{let t=E[e.index];return t==null?null:m(P,{virtualItem:e,count:D,measureRef:A.measureElement,children:t},e.key)})})};F.displayName=`ListPrimitiveVirtualRoot`;export{A as n,M as r,F as t};
1
+ import{n as e}from"./compose-refs-BdBMM9ga.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-CDk0Bb9z.js";import{Children as r,createContext as i,isValidElement as a,useCallback as o,useContext as s,useEffect as c,useId as l,useMemo as u,useRef as d,useState as f}from"react";import p from"tiny-invariant";import{jsx as m}from"react/jsx-runtime";import{useVirtualizer as h}from"@tanstack/react-virtual";const g=i(null);function _(e){let t=s(g);return p(t,`List.${e} must be composed inside List.Root / List.VirtualRoot (or a SelectableList viewport).`),t}const v=i(null),y=i(null);function b(e){return a(e)?e.props.disabled===!0:!1}function x({start:e,step:t,count:n,isItemDisabled:r}){for(let i=e;i>=0&&i<n;i+=t)if(!r(i))return i;return-1}const S=`a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])`;function C(e){let t=e.matches(S)?e:e.querySelector(S);return t instanceof HTMLElement?t:null}function w(e){let t=e instanceof Element?e.closest(`[data-index]`):null;if(t==null)return null;let n=Number(t.getAttribute(`data-index`));return!Number.isInteger(n)||n<0?null:{item:t,index:n}}function T(e,t){if(!(e instanceof Element))return!1;let n=e.closest(`a[href], button, input, select, textarea, label, [role="button"], [role="link"], [role="menuitem"], [contenteditable="true"]`);return n!=null&&t.contains(n)}function E({count:e,isItemDisabled:t,focusItemAt:n}){return{onKeyDown:r=>{if(r.target instanceof HTMLElement&&(r.target.isContentEditable||r.target.tagName===`INPUT`||r.target.tagName===`TEXTAREA`||r.target.tagName===`SELECT`)||r.altKey||r.ctrlKey||r.metaKey)return;let i=w(r.target);if(i==null)return;let a=-1,o=1;switch(r.key){case`ArrowDown`:o=1,a=x({start:i.index+1,step:o,count:e,isItemDisabled:t});break;case`ArrowUp`:o=-1,a=x({start:i.index-1,step:o,count:e,isItemDisabled:t});break;case`Home`:o=1,a=x({start:0,step:o,count:e,isItemDisabled:t});break;case`End`:o=-1,a=x({start:e-1,step:o,count:e,isItemDisabled:t});break;default:return}r.preventDefault(),a>=0&&a!==i.index&&n(a,o)}}}function D({count:e,enabled:t,isItemDisabled:n,onActivate:r,itemId:i,scrollToIndex:a}){let[o,s]=f(-1),l=d(!1),u=o>=e?e-1:o;if(c(()=>{o>=e&&s(e-1)},[o,e]),!t)return{activeIndex:-1,collectionProps:{}};let p=e=>n?.(e)??!1,m=(t,n)=>x({start:t,step:n,count:e,isItemDisabled:p}),h=e=>{e<0||(s(e),a(e))};return{activeIndex:u,collectionProps:{tabIndex:0,"aria-activedescendant":u>=0?i(u):void 0,onMouseDown:e=>{let t=w(e.target);if(t!=null&&!p(t.index)){s(t.index),l.current=!1;return}l.current=!0},onClick:e=>{if(e.defaultPrevented)return;let t=w(e.target);t==null||p(t.index)||T(e.target,t.item)||(s(t.index),r?.(t.index))},onFocus:t=>{if(t.target!==t.currentTarget){let e=w(t.target);e!=null&&!p(e.index)&&s(e.index),t.target instanceof HTMLElement&&t.target.tabIndex>=0||t.currentTarget.focus({preventScroll:!0}),l.current=!1;return}let n=l.current;l.current=!1,e>0&&!n&&s(e=>e<0?m(0,1):e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(s(-1),l.current=!1)},onKeyDown:t=>{if(t.target===t.currentTarget&&!(t.altKey||t.ctrlKey||t.metaKey))switch(l.current=!1,t.key){case`ArrowDown`:t.preventDefault(),h(m(u<0?0:u+1,1));break;case`ArrowUp`:t.preventDefault(),h(u<0?m(0,1):m(u-1,-1));break;case`Home`:t.preventDefault(),h(m(0,1));break;case`End`:t.preventDefault(),h(m(e-1,-1));break;case` `:case`Enter`:!t.repeat&&u>=0&&!p(u)&&(t.preventDefault(),r?.(u));break;default:break}}}}}function O({count:e,focusItemAt:t,isItemDisabled:n,onActivate:r,itemId:i,scrollToIndex:a,semantics:o}){let s=l(),c=u(()=>({semantics:o}),[o]),d=u(()=>i??(e=>`${s}-item-${e}`),[i,s]),{activeIndex:f,collectionProps:p}=D({count:e,enabled:o===`grid`,isItemDisabled:n,onActivate:r,itemId:d,scrollToIndex:a}),m=u(()=>({activeIndex:f,stampItemId:i==null?d:null}),[f,d,i]);return{collectionProps:o===`list`?E({count:e,isItemDisabled:n,focusItemAt:t}):p,gridNav:m,listContext:c}}function k({"aria-label":e,"aria-labelledby":n,"aria-multiselectable":r,children:i,className:a,collectionProps:o,gridNav:s,listContext:c,viewportProps:l,ref:u}){return m(g.Provider,{value:c,children:m(y.Provider,{value:s,children:m(`div`,{ref:u,"data-slot":`list`,className:t(`border-popover bg-popover scrollbar overscroll-none overflow-x-hidden overflow-y-auto rounded-md border p-1`,a),...l,children:m(`div`,{"data-slot":`list-collection`,role:c.semantics===`grid`?`grid`:`list`,"aria-label":e,"aria-labelledby":n,"aria-multiselectable":r,className:`relative flex w-full flex-col gap-px outline-hidden`,...o,children:i})})})})}const A=({asChild:r,children:i,className:a,disabled:o=!1,ref:c,selected:l=!1,style:u,...d})=>{let{semantics:f}=_(`Item`),p=s(v),h=s(y),g=f===`grid`,b=r?n:`div`,x=p?.placement??null,S=p?.index,C=g&&h!=null&&S!=null&&h.activeIndex===S;return m(b,{ref:e(c,x?.measureRef??null),"data-slot":`list-item`,...d,id:g&&S!=null&&h?.stampItemId!=null?h.stampItemId(S):d.id,"data-index":S,"data-state":l?`selected`:`unselected`,"data-disabled":o||void 0,"data-active":C||void 0,role:g?`row`:`listitem`,"aria-selected":g?l:void 0,"aria-disabled":g&&o?!0:d[`aria-disabled`],"aria-rowindex":g?x?.posInSet:void 0,"aria-posinset":g?void 0:x?.posInSet,"aria-setsize":g?void 0:x?.setSize,className:t(`rounded-md data-[state=selected]:bg-selected-menu-item data-[active]:bg-active-menu-item data-[active]:data-[state=selected]:bg-active-selected-menu-item`,!o&&`hover:bg-active-menu-item hover:data-[state=selected]:bg-active-selected-menu-item`,!g&&!o&&`has-[:focus-visible]:bg-active-menu-item has-[:focus-visible]:data-[state=selected]:bg-active-selected-menu-item`,a),style:x?{...u,...x.style}:u,children:i})};function j({children:e,index:t}){let n=u(()=>({index:t,placement:null}),[t]);return m(v.Provider,{value:n,children:e})}const M=({"aria-label":t,"aria-labelledby":n,"aria-multiselectable":i,children:s,className:c,isItemDisabled:l,onActivate:f,itemId:p,ref:h,semantics:g=`list`,..._})=>{let v=d(null),y=e(v,h),x=u(()=>r.toArray(s).filter(a),[s]),S=o(e=>{v.current?.querySelector(`[data-index="${e}"]`)?.scrollIntoView({block:`nearest`})},[]),w=o((e,t)=>{let n=v.current;if(n!=null)for(let r=e;r>=0&&r<x.length;r+=t){let e=n.querySelector(`[data-index="${r}"]`);if(e==null)continue;let t=C(e);if(t!=null){t.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`});return}}},[x.length]),{collectionProps:T,gridNav:E,listContext:D}=O({count:x.length,focusItemAt:w,isItemDisabled:l??(e=>b(x[e])),onActivate:f,itemId:p,scrollToIndex:S,semantics:g});return m(k,{"aria-label":t,"aria-labelledby":n,"aria-multiselectable":i,className:c,collectionProps:T,gridNav:E,listContext:D,viewportProps:_,ref:y,children:x.map((e,t)=>m(j,{index:t,children:e},e.key??t))})};function N({virtualItem:e,count:t,measureRef:n}){return{posInSet:e.index+1,setSize:t,measureRef:n,style:{position:`absolute`,left:0,top:0,width:`100%`,transform:`translateY(${e.start}px)`}}}function P({children:e,count:t,measureRef:n,virtualItem:r}){let i=u(()=>({index:r.index,placement:N({virtualItem:r,count:t,measureRef:n})}),[r,t,n]);return m(v.Provider,{value:i,children:e})}const F=({"aria-label":t,"aria-labelledby":n,"aria-multiselectable":i,children:s,className:l,estimateItemHeight:f=44,isItemDisabled:p,onActivate:g,overscan:_=8,itemId:v,ref:y,semantics:x=`list`,...S})=>{let w=d(null),T=e(w,y),E=u(()=>r.toArray(s).filter(a),[s]),D=E.length,A=h({count:D,getScrollElement:()=>w.current,estimateSize:()=>f,getItemKey:e=>E[e]?.key??e,overscan:_,gap:1}),j=o(e=>A.scrollToIndex(e,{align:`auto`}),[A]),M=d(null);c(()=>()=>{M.current!=null&&cancelAnimationFrame(M.current)},[]);let{collectionProps:N,gridNav:F,listContext:I}=O({count:D,focusItemAt:o((e,t)=>{M.current!=null&&(cancelAnimationFrame(M.current),M.current=null);let n=e,r=0,i=()=>{M.current=null;let e=w.current;if(e==null||n<0||n>=D)return;A.scrollToIndex(n,{align:`auto`});let a=e.querySelector(`[data-index="${n}"]`);if(a!=null){let e=C(a);if(e!=null){e.focus({preventScroll:!0});return}n+=t,r=0}r+=1,r<10&&(M.current=requestAnimationFrame(i))};i()},[D,A]),isItemDisabled:p??(e=>b(E[e])),onActivate:g,itemId:v,scrollToIndex:j,semantics:x}),L=A.getVirtualItems(),R=L.some(e=>e.index===F.activeIndex);return m(k,{"aria-label":t,"aria-labelledby":n,"aria-multiselectable":i,className:l,collectionProps:{...N,"aria-activedescendant":R?N[`aria-activedescendant`]:void 0,"aria-rowcount":x===`grid`?D:void 0,style:{height:`${A.getTotalSize()}px`}},gridNav:F,listContext:I,viewportProps:S,ref:T,children:L.map(e=>{let t=E[e.index];return t==null?null:m(P,{virtualItem:e,count:D,measureRef:A.measureElement,children:t},e.key)})})};export{A as n,M as r,F as t};