@ngrok/mantle 0.80.0 → 0.81.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 (175) hide show
  1. package/dist/accordion.d.ts +19 -37
  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 +167 -83
  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 +505 -0
  11. package/dist/area-chart.js +1 -0
  12. package/dist/badge.js +1 -1
  13. package/dist/bar-chart.d.ts +492 -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-1cVjAcj8.d.ts +334 -0
  31. package/dist/chart-Do2qkrxl.js +2 -0
  32. package/dist/checkbox-0EoxOyMA.js +1 -0
  33. package/dist/checkbox.d.ts +13 -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 +60 -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 +70 -18
  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 +40 -32
  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-BbbQuae2.d.ts +1 -0
  56. package/dist/{dropdown-menu-CoyozLzy.d.ts → dropdown-menu-D6pMAY7I.d.ts} +156 -54
  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 +26 -53
  64. package/dist/field.js +1 -1
  65. package/dist/flag.d.ts +1 -1
  66. package/dist/hooks.js +1 -1
  67. package/dist/hover-card.d.ts +3 -12
  68. package/dist/hover-card.js +1 -1
  69. package/dist/{svg-only-CdI_v82i.d.ts → icon-CX_gj6sW.d.ts} +1 -1
  70. package/dist/{icon-BDqpcZ-n.d.ts → icon-k4E9yNWD.d.ts} +1 -1
  71. package/dist/icon-lZ48P8Nn.js +1 -0
  72. package/dist/icon.d.ts +3 -3
  73. package/dist/icon.js +1 -1
  74. package/dist/icons-DLCs1hLP.js +1 -0
  75. package/dist/icons.d.ts +53 -2
  76. package/dist/icons.js +1 -1
  77. package/dist/input-BnlpQF0c.js +1 -0
  78. package/dist/{input-DV9M6K4v.d.ts → input-BuYDU6CF.d.ts} +1 -1
  79. package/dist/input.d.ts +2 -2
  80. package/dist/input.js +1 -1
  81. package/dist/line-chart.d.ts +491 -0
  82. package/dist/line-chart.js +1 -0
  83. package/dist/{virtual-UrzmaSQm.js → list-51KQvENW.js} +1 -1
  84. package/dist/list.d.ts +5 -20
  85. package/dist/list.js +1 -1
  86. package/dist/llms.txt +5 -1
  87. package/dist/mantle-dark-high-contrast.css +17 -0
  88. package/dist/mantle-dark.css +13 -0
  89. package/dist/mantle-light-high-contrast.css +15 -0
  90. package/dist/mantle.css +29 -0
  91. package/dist/media-object.d.ts +45 -12
  92. package/dist/media-object.js +1 -1
  93. package/dist/multi-select.d.ts +14 -53
  94. package/dist/multi-select.js +1 -1
  95. package/dist/otp-input.d.ts +5 -17
  96. package/dist/otp-input.js +1 -1
  97. package/dist/pagination.d.ts +11 -21
  98. package/dist/pagination.js +1 -1
  99. package/dist/{index-B8mIWKIU.d.ts → popover-CE4OlWkd.d.ts} +1 -4
  100. package/dist/popover-CQ9s7jG5.js +1 -0
  101. package/dist/popover.d.ts +1 -1
  102. package/dist/popover.js +1 -1
  103. package/dist/primitive-trJDqIXJ.js +1 -0
  104. package/dist/progress.d.ts +2 -8
  105. package/dist/progress.js +1 -1
  106. package/dist/qr-code.d.ts +4 -16
  107. package/dist/qr-code.js +1 -1
  108. package/dist/radio-group.d.ts +129 -40
  109. package/dist/radio-group.js +1 -1
  110. package/dist/sandboxed-on-click.d.ts +2 -2
  111. package/dist/scatter-plot.d.ts +495 -0
  112. package/dist/scatter-plot.js +1 -0
  113. package/dist/{select-idm1jy7y.d.ts → select-0z7HVS6r.d.ts} +8 -29
  114. package/dist/select-BCHWvmyC.js +1 -0
  115. package/dist/select.d.ts +1 -1
  116. package/dist/select.js +1 -1
  117. package/dist/selectable-list.d.ts +11 -38
  118. package/dist/selectable-list.js +1 -1
  119. package/dist/sheet.d.ts +22 -49
  120. package/dist/sheet.js +1 -1
  121. package/dist/skip-to-main-link.js +1 -1
  122. package/dist/slider.js +1 -1
  123. package/dist/slot.d.ts +1 -1
  124. package/dist/split-button.d.ts +155 -31
  125. package/dist/split-button.js +1 -1
  126. package/dist/switch.d.ts +1 -1
  127. package/dist/switch.js +1 -1
  128. package/dist/table-CGxJwtbL.js +1 -0
  129. package/dist/{table-DUSvU_Jw.d.ts → table-CZBYEmyK.d.ts} +11 -38
  130. package/dist/table.d.ts +1 -1
  131. package/dist/table.js +1 -1
  132. package/dist/tabs.d.ts +21 -36
  133. package/dist/tabs.js +1 -1
  134. package/dist/text-area.d.ts +2 -2
  135. package/dist/text-area.js +1 -1
  136. package/dist/theme-C26-Xolp.js +1 -0
  137. package/dist/{themes-CYNpplwN.d.ts → theme-FbfjYiD3.d.ts} +16 -0
  138. package/dist/theme-switcher.d.ts +6 -15
  139. package/dist/theme-switcher.js +1 -1
  140. package/dist/theme.d.ts +42 -2
  141. package/dist/theme.js +1 -1
  142. package/dist/toast.d.ts +9 -17
  143. package/dist/toast.js +1 -1
  144. package/dist/tooltip.d.ts +26 -8
  145. package/dist/tooltip.js +1 -1
  146. package/dist/types.js +1 -1
  147. package/package.json +20 -14
  148. package/dist/checkbox-Cq17y0-R.js +0 -1
  149. package/dist/choice-Cc8dA5r8.js +0 -1
  150. package/dist/dialog-CQ2C6vkE.js +0 -1
  151. package/dist/dropdown-menu-CSCDdA3K.js +0 -1
  152. package/dist/field-context-BR01g789.js +0 -1
  153. package/dist/icon-CGgMKpJg.js +0 -1
  154. package/dist/icon-button-DiOhreJD.js +0 -1
  155. package/dist/index-CdPXa9h1.d.ts +0 -1
  156. package/dist/input-CVyAVbim.js +0 -1
  157. package/dist/popover-CBMADtjV.js +0 -1
  158. package/dist/primitive-DCPHJsRs.js +0 -1
  159. package/dist/select-SR_9-bxA.js +0 -1
  160. package/dist/table-GDkapNFi.js +0 -1
  161. package/dist/theme-provider-BftkIiZn.js +0 -1
  162. package/dist/theme-wVnzzx2F.js +0 -1
  163. package/dist/toast-DKgMRv4F.js +0 -1
  164. /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
  165. /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
  166. /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
  167. /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
  168. /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
  169. /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
  170. /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
  171. /package/dist/{svg-only-d-nMCfAI.js → icon-d-nMCfAI.js} +0 -0
  172. /package/dist/{sort-B_DDQcVD.js → icons-B_DDQcVD.js} +0 -0
  173. /package/dist/{traffic-policy-file-CF1lbWtp.js → icons-CF1lbWtp.js} +0 -0
  174. /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
  175. /package/dist/{index-BtwKJTLq.d.ts → slot-BtwKJTLq.d.ts} +0 -0
@@ -0,0 +1,491 @@
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 ChartAccessibilityProps } from "./chart-1cVjAcj8.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"> & ChartAccessibilityProps & {
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
+ * └── LineChart.CopyButton
297
+ * ```
298
+ *
299
+ * @example
300
+ * ```tsx
301
+ * const data = [
302
+ * { time: new Date("2026-07-18T10:00:00Z"), p50: 120, p99: 480 },
303
+ * { time: new Date("2026-07-18T10:01:00Z"), p50: 132, p99: 510 },
304
+ * { time: new Date("2026-07-18T10:02:00Z"), p50: 101, p99: 460 },
305
+ * ];
306
+ *
307
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
308
+ * <LineChart.Grid />
309
+ * <LineChart.XAxis />
310
+ * <LineChart.YAxis />
311
+ * <LineChart.Line dataKey="p50" label="p50" />
312
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
313
+ * <LineChart.Tooltip />
314
+ * <LineChart.Legend />
315
+ * </LineChart.Root>
316
+ * ```
317
+ */
318
+ declare const LineChart: {
319
+ /**
320
+ * The root of a line chart: owns the data, the scales, the canvas renderer,
321
+ * and the entire interaction contract.
322
+ *
323
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartroot
324
+ *
325
+ * @example
326
+ * ```tsx
327
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
328
+ * <LineChart.Grid />
329
+ * <LineChart.XAxis />
330
+ * <LineChart.YAxis />
331
+ * <LineChart.Line dataKey="p50" label="p50" />
332
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
333
+ * <LineChart.Tooltip />
334
+ * <LineChart.Legend />
335
+ * </LineChart.Root>
336
+ * ```
337
+ */
338
+ readonly Root: typeof Root;
339
+ /**
340
+ * One line series; registers with the chart and paints on canvas.
341
+ *
342
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartline
343
+ *
344
+ * @example
345
+ * ```tsx
346
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
347
+ * <LineChart.Grid />
348
+ * <LineChart.XAxis />
349
+ * <LineChart.YAxis />
350
+ * <LineChart.Line dataKey="p50" label="p50" />
351
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
352
+ * <LineChart.Tooltip />
353
+ * <LineChart.Legend />
354
+ * </LineChart.Root>
355
+ * ```
356
+ */
357
+ readonly Line: typeof Line;
358
+ /**
359
+ * Hairline gridlines behind the lines.
360
+ *
361
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartgrid
362
+ *
363
+ * @example
364
+ * ```tsx
365
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
366
+ * <LineChart.Grid />
367
+ * <LineChart.XAxis />
368
+ * <LineChart.YAxis />
369
+ * <LineChart.Line dataKey="p50" label="p50" />
370
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
371
+ * <LineChart.Tooltip />
372
+ * <LineChart.Legend />
373
+ * </LineChart.Root>
374
+ * ```
375
+ */
376
+ readonly Grid: typeof Grid;
377
+ /**
378
+ * Tick labels along the bottom of the plot.
379
+ *
380
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartxaxis
381
+ *
382
+ * @example
383
+ * ```tsx
384
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
385
+ * <LineChart.Grid />
386
+ * <LineChart.XAxis tickFormat={(time) => (time instanceof Date ? time.toLocaleTimeString() : String(time))} />
387
+ * <LineChart.YAxis />
388
+ * <LineChart.Line dataKey="p50" label="p50" />
389
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
390
+ * <LineChart.Tooltip />
391
+ * <LineChart.Legend />
392
+ * </LineChart.Root>
393
+ * ```
394
+ */
395
+ readonly XAxis: typeof XAxis;
396
+ /**
397
+ * Value tick labels along the left of the plot.
398
+ *
399
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartyaxis
400
+ *
401
+ * @example
402
+ * ```tsx
403
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
404
+ * <LineChart.Grid />
405
+ * <LineChart.XAxis />
406
+ * <LineChart.YAxis tickFormat={(value) => `${value}ms`} />
407
+ * <LineChart.Line dataKey="p50" label="p50" />
408
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
409
+ * <LineChart.Tooltip />
410
+ * <LineChart.Legend />
411
+ * </LineChart.Root>
412
+ * ```
413
+ */
414
+ readonly YAxis: typeof YAxis;
415
+ /**
416
+ * A dashed horizontal marker at a y value (threshold, budget, limit).
417
+ *
418
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartreferenceline
419
+ *
420
+ * @example
421
+ * ```tsx
422
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
423
+ * <LineChart.Grid />
424
+ * <LineChart.XAxis />
425
+ * <LineChart.YAxis />
426
+ * <LineChart.Line dataKey="p50" label="p50" />
427
+ * <LineChart.ReferenceLine y={500} label="SLO" />
428
+ * <LineChart.Tooltip />
429
+ * <LineChart.Legend />
430
+ * </LineChart.Root>
431
+ * ```
432
+ */
433
+ readonly ReferenceLine: typeof ReferenceLine;
434
+ /**
435
+ * Customizes the always-on hover/keyboard tooltip readout.
436
+ *
437
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linecharttooltip
438
+ *
439
+ * @example
440
+ * ```tsx
441
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
442
+ * <LineChart.Grid />
443
+ * <LineChart.XAxis />
444
+ * <LineChart.YAxis />
445
+ * <LineChart.Line dataKey="p50" label="p50" />
446
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
447
+ * <LineChart.Tooltip valueFormat={(value) => `${value}ms`} />
448
+ * <LineChart.Legend />
449
+ * </LineChart.Root>
450
+ * ```
451
+ */
452
+ readonly Tooltip: typeof Tooltip;
453
+ /**
454
+ * The legend; always compose it on multi-series charts. Renders nothing for
455
+ * a single series.
456
+ *
457
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartlegend
458
+ *
459
+ * @example
460
+ * ```tsx
461
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
462
+ * <LineChart.Grid />
463
+ * <LineChart.XAxis />
464
+ * <LineChart.YAxis />
465
+ * <LineChart.Line dataKey="p50" label="p50" />
466
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
467
+ * <LineChart.Tooltip />
468
+ * <LineChart.Legend />
469
+ * </LineChart.Root>
470
+ * ```
471
+ */
472
+ readonly Legend: typeof Legend;
473
+ /**
474
+ * Copies the chart's current data to the clipboard as a markdown table.
475
+ *
476
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartcopybutton
477
+ *
478
+ * @example
479
+ * ```tsx
480
+ * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
481
+ * <LineChart.Line dataKey="p50" label="p50" />
482
+ * <LineChart.Line dataKey="p99" label="p99" />
483
+ * <LineChart.Legend />
484
+ * <LineChart.CopyButton />
485
+ * </LineChart.Root>
486
+ * ```
487
+ */
488
+ readonly CopyButton: typeof CopyButton;
489
+ };
490
+ //#endregion
491
+ 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-Do2qkrxl.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};
package/dist/list.d.ts CHANGED
@@ -141,10 +141,7 @@ type ListRootProps = Omit<ListRootProps$1, "semantics" | "onActivate" | "itemId"
141
141
  * </List.Root>
142
142
  * ```
143
143
  */
144
- declare const Root: {
145
- (props: ListRootProps): import("react").JSX.Element;
146
- displayName: string;
147
- };
144
+ declare const Root: (props: ListRootProps) => import("react").JSX.Element;
148
145
  /**
149
146
  * Props for `List.VirtualRoot` — the internal list primitive's
150
147
  * `VirtualRoot` props (viewport props plus `estimateItemHeight` / `overscan`),
@@ -185,10 +182,7 @@ type ListVirtualRootProps = Omit<VirtualRootProps, "semantics" | "onActivate" |
185
182
  * </List.VirtualRoot>
186
183
  * ```
187
184
  */
188
- declare const VirtualRoot: {
189
- (props: ListVirtualRootProps): import("react").JSX.Element;
190
- displayName: string;
191
- };
185
+ declare const VirtualRoot: (props: ListVirtualRootProps) => import("react").JSX.Element;
192
186
  /**
193
187
  * Props for `List.Item`. Extends `<button>` props (minus `type`, which is fixed
194
188
  * to `"button"`) with `asChild` and the optional `current` accent.
@@ -251,10 +245,7 @@ type ListItemProps = Omit<ComponentProps<"button">, "type"> & WithAsChild & {
251
245
  * </List.Root>
252
246
  * ```
253
247
  */
254
- declare const Item: {
255
- ({ asChild, className, current, disabled, onClick, ref, ...props }: ListItemProps): import("react").JSX.Element;
256
- displayName: string;
257
- };
248
+ declare const Item: ({ asChild, className, current, disabled, onClick, ref, ...props }: ListItemProps) => import("react").JSX.Element;
258
249
  /**
259
250
  * The emphasized title line inside a `List.Item`, in the stronger foreground
260
251
  * color. A styled `<span>`.
@@ -273,10 +264,7 @@ declare const Item: {
273
264
  * </List.Root>
274
265
  * ```
275
266
  */
276
- declare const ItemTitle: {
277
- ({ className, ref, ...props }: ComponentProps<"span">): import("react").JSX.Element;
278
- displayName: string;
279
- };
267
+ declare const ItemTitle: ({ className, ref, ...props }: ComponentProps<"span">) => import("react").JSX.Element;
280
268
  /**
281
269
  * The de-emphasized sub-line inside a `List.Item`, in the muted body color. A
282
270
  * styled `<span>`.
@@ -295,10 +283,7 @@ declare const ItemTitle: {
295
283
  * </List.Root>
296
284
  * ```
297
285
  */
298
- declare const ItemDescription: {
299
- ({ className, ref, ...props }: ComponentProps<"span">): import("react").JSX.Element;
300
- displayName: string;
301
- };
286
+ declare const ItemDescription: ({ className, ref, ...props }: ComponentProps<"span">) => import("react").JSX.Element;
302
287
  /**
303
288
  * A scrollable, optionally-virtualized list of clickable items — the action /
304
289
  * navigation counterpart to `SelectableList` (e.g. an account switcher or SSO
package/dist/list.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{n,r,t as i}from"./virtual-UrzmaSQm.js";import{jsx as a}from"react/jsx-runtime";const o=e=>a(r,{semantics:`list`,...e});o.displayName=`ListRoot`;const s=e=>a(i,{semantics:`list`,...e});s.displayName=`ListVirtualRoot`;const c=({asChild:r,className:i,current:o,disabled:s,onClick:c,ref:l,...u})=>a(n,{selected:o,disabled:s,children:a(r?t:`button`,{ref:l,"data-slot":`list-item-control`,"aria-current":o||void 0,...r?{"aria-disabled":s||void 0,tabIndex:s?-1:void 0}:{type:`button`,disabled:s},onClick:e=>{if(r&&s){e.preventDefault(),e.stopPropagation();return}c?.(e)},className:e(`flex w-full cursor-pointer flex-col gap-0.5 rounded-md bg-transparent px-2 py-1.5 text-left text-sm`,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50 aria-disabled:pointer-events-none`,`focus-visible:outline-hidden`,i),...u,onClickCapture:r&&s?e=>{e.preventDefault(),e.stopPropagation()}:u.onClickCapture})});c.displayName=`ListItem`;const l=({className:t,ref:n,...r})=>a(`span`,{ref:n,"data-slot":`list-item-title`,className:e(`text-strong font-medium`,t),...r});l.displayName=`ListItemTitle`;const u=({className:t,ref:n,...r})=>a(`span`,{ref:n,"data-slot":`list-item-description`,className:e(`text-body leading-4`,t),...r});u.displayName=`ListItemDescription`;const d={Root:o,VirtualRoot:s,Item:c,ItemTitle:l,ItemDescription:u};export{d as List};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{n,r,t as i}from"./list-51KQvENW.js";import{jsx as a}from"react/jsx-runtime";const o={Root:e=>a(r,{semantics:`list`,...e}),VirtualRoot:e=>a(i,{semantics:`list`,...e}),Item:({asChild:r,className:i,current:o,disabled:s,onClick:c,ref:l,...u})=>a(n,{selected:o,disabled:s,children:a(r?t:`button`,{ref:l,"data-slot":`list-item-control`,"aria-current":o||void 0,...r?{"aria-disabled":s||void 0,tabIndex:s?-1:void 0}:{type:`button`,disabled:s},onClick:e=>{if(r&&s){e.preventDefault(),e.stopPropagation();return}c?.(e)},className:e(`flex w-full cursor-pointer flex-col gap-0.5 rounded-md bg-transparent px-2 py-1.5 text-left text-sm`,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50 aria-disabled:pointer-events-none`,`focus-visible:outline-hidden`,i),...u,onClickCapture:r&&s?e=>{e.preventDefault(),e.stopPropagation()}:u.onClickCapture})}),ItemTitle:({className:t,ref:n,...r})=>a(`span`,{ref:n,"data-slot":`list-item-title`,className:e(`text-strong font-medium`,t),...r}),ItemDescription:({className:t,ref:n,...r})=>a(`span`,{ref:n,"data-slot":`list-item-description`,className:e(`text-body leading-4`,t),...r})};export{o as List};
package/dist/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # @ngrok/mantle (0.80.0)
1
+ # @ngrok/mantle (0.81.1)
2
2
 
3
3
  > Offline discovery hint shipped inside the @ngrok/mantle npm package. Authoritative metadata lives at https://mantle.ngrok.com/for-ai-agents.
4
4
 
@@ -23,7 +23,9 @@ Full text: https://mantle.ngrok.com/llms-full.txt
23
23
  - `@ngrok/mantle/alert`
24
24
  - `@ngrok/mantle/alert-dialog`
25
25
  - `@ngrok/mantle/anchor`
26
+ - `@ngrok/mantle/area-chart`
26
27
  - `@ngrok/mantle/badge`
28
+ - `@ngrok/mantle/bar-chart`
27
29
  - `@ngrok/mantle/breadcrumb`
28
30
  - `@ngrok/mantle/browser-only`
29
31
  - `@ngrok/mantle/button`
@@ -53,6 +55,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
53
55
  - `@ngrok/mantle/input`
54
56
  - `@ngrok/mantle/kbd`
55
57
  - `@ngrok/mantle/label`
58
+ - `@ngrok/mantle/line-chart`
56
59
  - `@ngrok/mantle/list`
57
60
  - `@ngrok/mantle/main`
58
61
  - `@ngrok/mantle/media-object`
@@ -64,6 +67,7 @@ Full text: https://mantle.ngrok.com/llms-full.txt
64
67
  - `@ngrok/mantle/qr-code`
65
68
  - `@ngrok/mantle/radio-group`
66
69
  - `@ngrok/mantle/sandboxed-on-click`
70
+ - `@ngrok/mantle/scatter-plot`
67
71
  - `@ngrok/mantle/select`
68
72
  - `@ngrok/mantle/selectable-list`
69
73
  - `@ngrok/mantle/separator`
@@ -284,6 +284,23 @@ MARK: DARK HICON DEFS
284
284
  --color-selected-menu-item: var(--color-accent-50);
285
285
  --color-active-selected-menu-item: var(--color-accent-100);
286
286
 
287
+ /* Chart series tokens — dark-high-contrast picks validated against the card
288
+ surface (#121212): CVD adjacency (worst ΔE 9.6), normal-vision floor
289
+ (15.1), chroma, and contrast (6.76:1–12.23:1, zero warns) all pass. The
290
+ standard dark lightness band (L ≤ 0.67) is unsatisfiable by construction
291
+ in this theme — its ramps are bimodal around the band, and every in-band
292
+ step fails 3:1 contrast — so these deliberately brighter marks are the
293
+ correct high-contrast trade-off. */
294
+ --color-chart-1: var(--color-blue-300);
295
+ --color-chart-2: var(--color-green-300);
296
+ --color-chart-3: var(--color-pink-600);
297
+ --color-chart-4: var(--color-red-300);
298
+ --color-chart-5: var(--color-teal-300);
299
+ --color-chart-6: var(--color-orange-300);
300
+ --color-chart-7: var(--color-violet-300);
301
+ --color-chart-8: var(--color-yellow-300);
302
+ --color-chart-other: var(--color-neutral-500);
303
+
287
304
  --text-color-strong: var(--color-black);
288
305
  --text-color-body: var(--color-neutral-950);
289
306
  --text-color-muted: --alpha(var(--color-black) / 0.75);