@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,495 @@
1
+ import { _ as SeriesColor, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f as ChartDatum, g as PointShape, i as GridPrimitiveProps, l as YAxisPrimitiveProps, 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/scatter-plot/scatter-plot.d.ts
3
+ /**
4
+ * Props for {@link ScatterPlot.Root}. Scatter x values must be continuous
5
+ * (numbers or `Date`s — there is no categorical scatter axis). Providing
6
+ * `zKey` switches the chart into the 3D projection: points render inside a
7
+ * rotatable cube (drag to orbit), depth-sorted with gentle perspective.
8
+ *
9
+ * Scatter is an all-pairs chart form — any two marks can sit side by side —
10
+ * so with the default chart tokens keep it to FOUR series or fewer; beyond
11
+ * that, fold into an "Other" series or facet into small multiples.
12
+ */
13
+ type ScatterPlotRootProps<TDatum extends ChartDatum = ChartDatum> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibilityProps & {
14
+ /** Rows of data; each row is one point per composed `ScatterPlot.Point` series. */
15
+ data: readonly TDatum[];
16
+ /** The key of each row's x value (number or `Date`). */
17
+ xKey: Extract<keyof TDatum, string>;
18
+ /** Override the auto-detected x scale (`Date` values → `"time"`, numbers → `"linear"`). */
19
+ xScale?: "linear" | "time";
20
+ } & ScatterPlotDepthProps<TDatum>;
21
+ /**
22
+ * The 3D half of {@link ScatterPlot.Root}'s props: `dimensions` only means
23
+ * something in the 3D projection, so it is only representable alongside
24
+ * `zKey`.
25
+ */
26
+ type ScatterPlotDepthProps<TDatum extends ChartDatum = ChartDatum> = {
27
+ /**
28
+ * The key of each row's depth value. Providing it renders the scatter in
29
+ * 3D: drag the plot to rotate the cube. Axis parts and reference lines
30
+ * apply to the 2D projection only and are ignored in 3D (the cube frame
31
+ * carries orientation).
32
+ */
33
+ zKey: Extract<keyof TDatum, string>;
34
+ /**
35
+ * How many axes the cloud currently occupies (default `3`). Changing it
36
+ * morphs the points onto the x axis line (`1`), the xy plane (`2`), or
37
+ * the full cube (`3`) with a smooth glide — the pattern behind "click
38
+ * 1D/2D/3D to see the clusters separate" explainers. The y and z frame
39
+ * edges fade in with their dimension.
40
+ */
41
+ dimensions?: 1 | 2 | 3;
42
+ } | {
43
+ zKey?: never;
44
+ dimensions?: never;
45
+ };
46
+ /**
47
+ * Props for {@link ScatterPlot.Point}.
48
+ */
49
+ type ScatterPlotPointProps = {
50
+ /** The row key this series reads its y values from. */
51
+ dataKey: string;
52
+ /** Display name for the legend, tooltip, and data table. Defaults to `dataKey`. */
53
+ label?: string;
54
+ /**
55
+ * One of the validated chart tokens (`"chart-1"`…`"chart-8"`, `"chart-other"`)
56
+ * or any CSS color as an escape hatch. Defaults to the next sticky slot in
57
+ * mount order. Static colors (raw hex) do not adapt across themes; custom
58
+ * palettes must be validated for colorblind-safe adjacency and surface
59
+ * contrast, and a series that carries good/bad meaning should wear the
60
+ * semantic status colors, never a categorical slot.
61
+ */
62
+ color?: SeriesColor;
63
+ /**
64
+ * The glyph this series' points wear: `"circle"` (default), `"square"`,
65
+ * `"triangle"`, or `"diamond"`. Give each series a distinct shape on
66
+ * multi-series scatters — shape is the redundant encoding that keeps
67
+ * overlapping clouds distinguishable without color vision. The legend key
68
+ * and hover dot mirror it.
69
+ */
70
+ shape?: PointShape;
71
+ };
72
+ /**
73
+ * Props for {@link ScatterPlot.Grid}.
74
+ */
75
+ type ScatterPlotGridProps = GridPrimitiveProps;
76
+ /**
77
+ * Props for {@link ScatterPlot.XAxis}.
78
+ */
79
+ type ScatterPlotXAxisProps = XAxisPrimitiveProps;
80
+ /**
81
+ * Props for {@link ScatterPlot.YAxis}.
82
+ */
83
+ type ScatterPlotYAxisProps = YAxisPrimitiveProps;
84
+ /**
85
+ * Props for {@link ScatterPlot.ReferenceLine}.
86
+ */
87
+ type ScatterPlotReferenceLineProps = ReferenceLinePrimitiveProps;
88
+ /**
89
+ * Props for {@link ScatterPlot.Tooltip}.
90
+ */
91
+ type ScatterPlotTooltipProps = TooltipPrimitiveProps;
92
+ /**
93
+ * Props for {@link ScatterPlot.Legend}.
94
+ */
95
+ type ScatterPlotLegendProps = LegendPrimitiveProps;
96
+ /**
97
+ * Props for {@link ScatterPlot.CopyButton}.
98
+ */
99
+ type ScatterPlotCopyButtonProps = CopyButtonPrimitiveProps;
100
+ /**
101
+ * The root of a scatter plot: owns the data, the scales, the canvas
102
+ * renderer, and the entire interaction contract. Hovering hits the nearest
103
+ * point within 24px (never a pinpoint target); the tooltip reads that point's
104
+ * series, x, y — and z in 3D. With `zKey` the plot becomes a rotatable 3D
105
+ * cube: drag to orbit, with points depth-sorted under gentle perspective.
106
+ *
107
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotroot
108
+ *
109
+ * @example
110
+ * ```tsx
111
+ * const data = [
112
+ * { latency: 12, throughputA: 840, throughputB: 720 },
113
+ * { latency: 28, throughputA: 610, throughputB: 590 },
114
+ * { latency: 45, throughputA: 340, throughputB: 410 },
115
+ * ];
116
+ *
117
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
118
+ * <ScatterPlot.Grid />
119
+ * <ScatterPlot.XAxis />
120
+ * <ScatterPlot.YAxis />
121
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
122
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
123
+ * <ScatterPlot.Tooltip />
124
+ * <ScatterPlot.Legend />
125
+ * </ScatterPlot.Root>
126
+ * ```
127
+ */
128
+ declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: ScatterPlotRootProps<TDatum>) => import("react").JSX.Element;
129
+ /**
130
+ * One point series. Renders nothing itself — it registers the series with the
131
+ * chart, which paints its points on canvas (r≥4 dots with a surface ring,
132
+ * degrading gracefully past thousands of points).
133
+ *
134
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotpoint
135
+ *
136
+ * @example
137
+ * ```tsx
138
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
139
+ * <ScatterPlot.Grid />
140
+ * <ScatterPlot.XAxis />
141
+ * <ScatterPlot.YAxis />
142
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
143
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
144
+ * <ScatterPlot.Tooltip />
145
+ * <ScatterPlot.Legend />
146
+ * </ScatterPlot.Root>
147
+ * ```
148
+ */
149
+ declare const Point: (props: ScatterPlotPointProps) => null;
150
+ /**
151
+ * Hairline gridlines behind the points (renderless; painted on canvas; 2D
152
+ * only — the 3D cube frame carries orientation). Omit the part to omit the
153
+ * grid.
154
+ *
155
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotgrid
156
+ *
157
+ * @example
158
+ * ```tsx
159
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
160
+ * <ScatterPlot.Grid lines="both" />
161
+ * <ScatterPlot.XAxis />
162
+ * <ScatterPlot.YAxis />
163
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
164
+ * <ScatterPlot.Legend />
165
+ * </ScatterPlot.Root>
166
+ * ```
167
+ */
168
+ declare const Grid: (props: ScatterPlotGridProps) => null;
169
+ /**
170
+ * Value labels along the bottom of the plot (renderless; painted on canvas;
171
+ * 2D only). Labels that would collide are skipped, never rotated.
172
+ *
173
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotxaxis
174
+ *
175
+ * @example
176
+ * ```tsx
177
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
178
+ * <ScatterPlot.Grid />
179
+ * <ScatterPlot.XAxis tickFormat={(value) => `${value}ms`} />
180
+ * <ScatterPlot.YAxis />
181
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
182
+ * <ScatterPlot.Legend />
183
+ * </ScatterPlot.Root>
184
+ * ```
185
+ */
186
+ declare const XAxis: (props: ScatterPlotXAxisProps) => null;
187
+ /**
188
+ * Value tick labels along the left of the plot (renderless; painted on
189
+ * canvas; 2D only). Ticks land on clean thousands-separated numbers.
190
+ *
191
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotyaxis
192
+ *
193
+ * @example
194
+ * ```tsx
195
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
196
+ * <ScatterPlot.Grid />
197
+ * <ScatterPlot.XAxis />
198
+ * <ScatterPlot.YAxis tickFormat={(value) => `${value / 1000}k`} />
199
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
200
+ * <ScatterPlot.Legend />
201
+ * </ScatterPlot.Root>
202
+ * ```
203
+ */
204
+ declare const YAxis: (props: ScatterPlotYAxisProps) => null;
205
+ /**
206
+ * A dashed horizontal marker at a y value (renderless; painted on canvas; 2D
207
+ * only — ignored in the 3D projection).
208
+ *
209
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotreferenceline
210
+ *
211
+ * @example
212
+ * ```tsx
213
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
214
+ * <ScatterPlot.Grid />
215
+ * <ScatterPlot.XAxis />
216
+ * <ScatterPlot.YAxis />
217
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
218
+ * <ScatterPlot.ReferenceLine y={500} label="Target" />
219
+ * <ScatterPlot.Legend />
220
+ * </ScatterPlot.Root>
221
+ * ```
222
+ */
223
+ declare const ReferenceLine: (props: ScatterPlotReferenceLineProps) => null;
224
+ /**
225
+ * Customizes the hover/keyboard tooltip readout. The tooltip itself is part
226
+ * of `ScatterPlot.Root`'s interaction contract and renders whether or not
227
+ * this part is composed — compose it to format the label or values, append a
228
+ * footer, or replace the content entirely via the render-prop `children`.
229
+ * In 3D the readout also carries the point's z value.
230
+ *
231
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplottooltip
232
+ *
233
+ * @example
234
+ * ```tsx
235
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
236
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
237
+ * <ScatterPlot.Tooltip valueFormat={(value) => `${value} rps`} />
238
+ * <ScatterPlot.Legend />
239
+ * </ScatterPlot.Root>
240
+ * ```
241
+ */
242
+ declare const Tooltip: (props: ScatterPlotTooltipProps) => null;
243
+ /**
244
+ * The legend: series names keyed by color dots, rendered as real DOM in flow
245
+ * below the plot. Always compose it on multi-series charts — identity must
246
+ * never rely on color-matching alone. It renders nothing for a single series
247
+ * (the chart's title already names it).
248
+ *
249
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotlegend
250
+ *
251
+ * @example
252
+ * ```tsx
253
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
254
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
255
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
256
+ * <ScatterPlot.Tooltip />
257
+ * <ScatterPlot.Legend />
258
+ * </ScatterPlot.Root>
259
+ * ```
260
+ */
261
+ declare const Legend: (props: ScatterPlotLegendProps) => import("react").JSX.Element;
262
+ /**
263
+ * A button that copies the chart's current data to the clipboard as a
264
+ * markdown table (ISO dates, plain numbers, one column per series, plus the
265
+ * z column on 3D scatters) — pasteable into Slack, issues, docs,
266
+ * spreadsheets, and LLM chats. Renders in flow where composed (alongside
267
+ * `Legend`, below the plot); `Root` is relatively positioned, so `className`
268
+ * can dock it over a corner instead (e.g. `absolute right-0 top-0`).
269
+ *
270
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotcopybutton
271
+ *
272
+ * @example
273
+ * ```tsx
274
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
275
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
276
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
277
+ * <ScatterPlot.Legend />
278
+ * <ScatterPlot.CopyButton />
279
+ * </ScatterPlot.Root>
280
+ * ```
281
+ */
282
+ declare const CopyButton: (props: ScatterPlotCopyButtonProps) => import("react").JSX.Element;
283
+ /**
284
+ * A canvas-rendered scatter plot for correlating two measures — three with
285
+ * the 3D projection (`zKey`), which renders a rotatable, depth-sorted point
286
+ * cloud (drag to orbit). Hover hits the nearest point within 24px; keyboard
287
+ * stepping, polite announcements, and the sr-only data table ship with `Root`
288
+ * unconditionally. Scatter is an all-pairs chart form: with the default chart
289
+ * tokens keep it to four series or fewer.
290
+ *
291
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot
292
+ *
293
+ * @example
294
+ * Composition:
295
+ * ```
296
+ * ScatterPlot.Root
297
+ * ├── ScatterPlot.Grid
298
+ * ├── ScatterPlot.XAxis
299
+ * ├── ScatterPlot.YAxis
300
+ * ├── ScatterPlot.Point (one per series)
301
+ * ├── ScatterPlot.ReferenceLine
302
+ * ├── ScatterPlot.Tooltip
303
+ * └── ScatterPlot.Legend
304
+ * ```
305
+ *
306
+ * @example
307
+ * ```tsx
308
+ * const data = [
309
+ * { latency: 12, throughputA: 840, throughputB: 720 },
310
+ * { latency: 28, throughputA: 610, throughputB: 590 },
311
+ * { latency: 45, throughputA: 340, throughputB: 410 },
312
+ * ];
313
+ *
314
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
315
+ * <ScatterPlot.Grid />
316
+ * <ScatterPlot.XAxis />
317
+ * <ScatterPlot.YAxis />
318
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
319
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
320
+ * <ScatterPlot.Tooltip />
321
+ * <ScatterPlot.Legend />
322
+ * </ScatterPlot.Root>
323
+ * ```
324
+ */
325
+ declare const ScatterPlot: {
326
+ /**
327
+ * The root of a scatter plot: owns the data, the scales, the canvas
328
+ * renderer, and the entire interaction contract. `zKey` enables the 3D
329
+ * projection (drag to rotate).
330
+ *
331
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotroot
332
+ *
333
+ * @example
334
+ * ```tsx
335
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
336
+ * <ScatterPlot.Grid />
337
+ * <ScatterPlot.XAxis />
338
+ * <ScatterPlot.YAxis />
339
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
340
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
341
+ * <ScatterPlot.Tooltip />
342
+ * <ScatterPlot.Legend />
343
+ * </ScatterPlot.Root>
344
+ * ```
345
+ */
346
+ readonly Root: typeof Root;
347
+ /**
348
+ * One point series; registers with the chart and paints on canvas.
349
+ *
350
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotpoint
351
+ *
352
+ * @example
353
+ * ```tsx
354
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
355
+ * <ScatterPlot.Grid />
356
+ * <ScatterPlot.XAxis />
357
+ * <ScatterPlot.YAxis />
358
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
359
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
360
+ * <ScatterPlot.Tooltip />
361
+ * <ScatterPlot.Legend />
362
+ * </ScatterPlot.Root>
363
+ * ```
364
+ */
365
+ readonly Point: typeof Point;
366
+ /**
367
+ * Hairline gridlines behind the points (2D only).
368
+ *
369
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotgrid
370
+ *
371
+ * @example
372
+ * ```tsx
373
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
374
+ * <ScatterPlot.Grid lines="both" />
375
+ * <ScatterPlot.XAxis />
376
+ * <ScatterPlot.YAxis />
377
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
378
+ * <ScatterPlot.Tooltip />
379
+ * <ScatterPlot.Legend />
380
+ * </ScatterPlot.Root>
381
+ * ```
382
+ */
383
+ readonly Grid: typeof Grid;
384
+ /**
385
+ * Value labels along the bottom of the plot (2D only).
386
+ *
387
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotxaxis
388
+ *
389
+ * @example
390
+ * ```tsx
391
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
392
+ * <ScatterPlot.Grid />
393
+ * <ScatterPlot.XAxis tickFormat={(value) => `${value}ms`} />
394
+ * <ScatterPlot.YAxis />
395
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
396
+ * <ScatterPlot.Tooltip />
397
+ * <ScatterPlot.Legend />
398
+ * </ScatterPlot.Root>
399
+ * ```
400
+ */
401
+ readonly XAxis: typeof XAxis;
402
+ /**
403
+ * Value tick labels along the left of the plot (2D only).
404
+ *
405
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotyaxis
406
+ *
407
+ * @example
408
+ * ```tsx
409
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
410
+ * <ScatterPlot.Grid />
411
+ * <ScatterPlot.XAxis />
412
+ * <ScatterPlot.YAxis tickFormat={(value) => `${value / 1000}k`} />
413
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
414
+ * <ScatterPlot.Tooltip />
415
+ * <ScatterPlot.Legend />
416
+ * </ScatterPlot.Root>
417
+ * ```
418
+ */
419
+ readonly YAxis: typeof YAxis;
420
+ /**
421
+ * A dashed horizontal marker at a y value (2D only).
422
+ *
423
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotreferenceline
424
+ *
425
+ * @example
426
+ * ```tsx
427
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
428
+ * <ScatterPlot.Grid />
429
+ * <ScatterPlot.XAxis />
430
+ * <ScatterPlot.YAxis />
431
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
432
+ * <ScatterPlot.ReferenceLine y={500} label="Target" />
433
+ * <ScatterPlot.Tooltip />
434
+ * <ScatterPlot.Legend />
435
+ * </ScatterPlot.Root>
436
+ * ```
437
+ */
438
+ readonly ReferenceLine: typeof ReferenceLine;
439
+ /**
440
+ * Customizes the always-on hover/keyboard tooltip readout (z included in 3D).
441
+ *
442
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplottooltip
443
+ *
444
+ * @example
445
+ * ```tsx
446
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
447
+ * <ScatterPlot.Grid />
448
+ * <ScatterPlot.XAxis />
449
+ * <ScatterPlot.YAxis />
450
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
451
+ * <ScatterPlot.Tooltip valueFormat={(value) => `${value} rps`} />
452
+ * <ScatterPlot.Legend />
453
+ * </ScatterPlot.Root>
454
+ * ```
455
+ */
456
+ readonly Tooltip: typeof Tooltip;
457
+ /**
458
+ * The legend; always compose it on multi-series charts. Renders nothing for
459
+ * a single series.
460
+ *
461
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotlegend
462
+ *
463
+ * @example
464
+ * ```tsx
465
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
466
+ * <ScatterPlot.Grid />
467
+ * <ScatterPlot.XAxis />
468
+ * <ScatterPlot.YAxis />
469
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
470
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
471
+ * <ScatterPlot.Tooltip />
472
+ * <ScatterPlot.Legend />
473
+ * </ScatterPlot.Root>
474
+ * ```
475
+ */
476
+ readonly Legend: typeof Legend;
477
+ /**
478
+ * Copies the chart's current data to the clipboard as a markdown table.
479
+ *
480
+ * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotcopybutton
481
+ *
482
+ * @example
483
+ * ```tsx
484
+ * <ScatterPlot.Root data={data} xKey="latency" aria-label="Latency vs throughput">
485
+ * <ScatterPlot.Point dataKey="throughputA" label="Region A" />
486
+ * <ScatterPlot.Point dataKey="throughputB" label="Region B" />
487
+ * <ScatterPlot.Legend />
488
+ * <ScatterPlot.CopyButton />
489
+ * </ScatterPlot.Root>
490
+ * ```
491
+ */
492
+ readonly CopyButton: typeof CopyButton;
493
+ };
494
+ //#endregion
495
+ export { type ChartDatumEvent, ScatterPlot, type ScatterPlotCopyButtonProps, type ScatterPlotGridProps, type ScatterPlotLegendProps, type ScatterPlotPointProps, type ScatterPlotReferenceLineProps, type ScatterPlotRootProps, type ScatterPlotTooltipProps, type ScatterPlotXAxisProps, type ScatterPlotYAxisProps };
@@ -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:`scatter`,componentName:`ScatterPlot`,slotName:`scatter-plot`,...e}),Point:e=>a(`ScatterPlot.Point`,`scatter`,e),Grid:e=>n(`ScatterPlot.Grid`,e),XAxis:e=>t(`ScatterPlot.XAxis`,e),YAxis:e=>r(`ScatterPlot.YAxis`,e),ReferenceLine:t=>e(`ScatterPlot.ReferenceLine`,t),Tooltip:e=>s(`ScatterPlot.Tooltip`,e),Legend:e=>l(i,{partName:`ScatterPlot.Legend`,slotName:`scatter-plot`,...e}),CopyButton:e=>l(c,{partName:`ScatterPlot.CopyButton`,slotName:`scatter-plot`,...e})};export{u as ScatterPlot};
@@ -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 { n as Separator } from "./separator-B5UmkVRL.js";
3
3
  import { ComponentProps, FocusEvent, PropsWithChildren, ReactNode, Ref, SelectHTMLAttributes } from "react";
4
4
  import * as SelectPrimitive from "@radix-ui/react-select";
@@ -77,10 +77,7 @@ type SelectProps = PropsWithChildren & {
77
77
  * </Select.Root>
78
78
  * ```
79
79
  */
80
- declare const Root: {
81
- ({ "aria-invalid": _ariaInvalid, children, id, validation, onBlur, onValueChange, onChange, ref, ...props }: SelectProps): import("react").JSX.Element;
82
- displayName: string;
83
- };
80
+ declare const Root: ({ "aria-invalid": _ariaInvalid, children, id, validation, onBlur, onValueChange, onChange, ref, ...props }: SelectProps) => import("react").JSX.Element;
84
81
  /**
85
82
  * A group of related options within a select menu. Similar to an html `<optgroup>` element.
86
83
  * Use in conjunction with Select.Label to ensure good accessibility via automatic labelling.
@@ -110,10 +107,7 @@ declare const Root: {
110
107
  * </Select.Root>
111
108
  * ```
112
109
  */
113
- declare const Group: {
114
- ({ className, ref, ...props }: ComponentProps<typeof SelectPrimitive.Group>): import("react").JSX.Element;
115
- displayName: string;
116
- };
110
+ declare const Group: ({ className, ref, ...props }: ComponentProps<typeof SelectPrimitive.Group>) => import("react").JSX.Element;
117
111
  type SelectTriggerProps = ComponentProps<typeof SelectPrimitive.Trigger> & WithAriaInvalid & WithValidation;
118
112
  /**
119
113
  * The button that toggles the select. The Select.Content will position itself adjacent to the trigger.
@@ -147,10 +141,7 @@ type SelectTriggerProps = ComponentProps<typeof SelectPrimitive.Trigger> & WithA
147
141
  * </Select.Root>
148
142
  * ```
149
143
  */
150
- declare const Trigger: {
151
- ({ "aria-invalid": ariaInValidProp, className, children, id: propId, ref, validation: propValidation, ...props }: SelectTriggerProps): import("react").JSX.Element;
152
- displayName: string;
153
- };
144
+ declare const Trigger: ({ "aria-invalid": ariaInValidProp, className, children, id: propId, ref, validation: propValidation, ...props }: SelectTriggerProps) => import("react").JSX.Element;
154
145
  type SelectContentProps = ComponentProps<typeof SelectPrimitive.Content> & {
155
146
  /**
156
147
  * The width of the content. Defaults to the width of the trigger.
@@ -192,10 +183,7 @@ type SelectContentProps = ComponentProps<typeof SelectPrimitive.Content> & {
192
183
  * </Select.Root>
193
184
  * ```
194
185
  */
195
- declare const Content: {
196
- ({ className, children, position, ref, width, ...props }: SelectContentProps): import("react").JSX.Element;
197
- displayName: string;
198
- };
186
+ declare const Content: ({ className, children, position, ref, width, ...props }: SelectContentProps) => import("react").JSX.Element;
199
187
  /**
200
188
  * Used to render the label of a group. It won't be focusable using arrow keys.
201
189
  *
@@ -224,10 +212,7 @@ declare const Content: {
224
212
  * </Select.Root>
225
213
  * ```
226
214
  */
227
- declare const Label: {
228
- ({ className, ref, ...props }: ComponentProps<typeof SelectPrimitive.Label>): import("react").JSX.Element;
229
- displayName: string;
230
- };
215
+ declare const Label: ({ className, ref, ...props }: ComponentProps<typeof SelectPrimitive.Label>) => import("react").JSX.Element;
231
216
  type SelectItemProps = ComponentProps<typeof SelectPrimitive.Item> & {
232
217
  icon?: ReactNode;
233
218
  };
@@ -261,10 +246,7 @@ type SelectItemProps = ComponentProps<typeof SelectPrimitive.Item> & {
261
246
  * </Select.Root>
262
247
  * ```
263
248
  */
264
- declare const Item: {
265
- ({ className, children, icon, ref, ...props }: SelectItemProps): import("react").JSX.Element;
266
- displayName: string;
267
- };
249
+ declare const Item: ({ className, children, icon, ref, ...props }: SelectItemProps) => import("react").JSX.Element;
268
250
  /**
269
251
  * Used to visually separate items or groups of items in the select content.
270
252
  *
@@ -293,10 +275,7 @@ declare const Item: {
293
275
  * </Select.Root>
294
276
  * ```
295
277
  */
296
- declare const SelectSeparatorComponent: {
297
- ({ className, ref, ...props }: ComponentProps<typeof Separator>): import("react").JSX.Element;
298
- displayName: string;
299
- };
278
+ declare const SelectSeparatorComponent: ({ className, ref, ...props }: ComponentProps<typeof Separator>) => import("react").JSX.Element;
300
279
  /**
301
280
  * Displays a list of options for the user to pick from—triggered by a button.
302
281
  *
@@ -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{a as r,r as i}from"./field-Bpptk_9t.js";import{t as a}from"./field-B1wqeZr4.js";import{n as o}from"./separator-bpE_kooz.js";import{CaretDownIcon as s}from"@phosphor-icons/react/CaretDown";import{createContext as c,useContext as l,useMemo as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{CheckIcon as p}from"@phosphor-icons/react/Check";import{CaretUpIcon as m}from"@phosphor-icons/react/CaretUp";import*as h from"@radix-ui/react-select";const g=c({}),_=({"aria-invalid":e,children:t,id:n,validation:r,onBlur:i,onValueChange:a,onChange:o,ref:s,...c})=>{let l=u(()=>({"aria-invalid":e,id:n,validation:r,onBlur:i,ref:s}),[e,n,r,i,s]);return d(h.Root,{...c,onValueChange:e=>{o?.(e),a?.(e)},children:d(g.Provider,{value:l,children:t})})},v=({className:e,ref:n,...r})=>d(h.Group,{ref:n,"data-slot":`select-group`,className:t(`space-y-px`,e),...r}),y=h.Value,b=({"aria-invalid":o,className:c,children:u,id:p,ref:m,validation:_,...v})=>{let y=l(g),b=l(a),x=r(),{ariaInvalid:S,validation:C}=i({"aria-invalid":b?b[`aria-invalid`]:y[`aria-invalid`]??o,validation:y.validation??_??x}),w=b?b.id:y.id??p;return f(h.Trigger,{"data-slot":`select-trigger`,className:t(`h-9 text-sm`,`border-form bg-form text-strong font-sans placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:text-left`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger`,c),"data-validation":C||void 0,id:w,ref:e(m,y.ref),...v,...b?{"aria-describedby":b[`aria-describedby`],"aria-errormessage":b[`aria-errormessage`]}:void 0,"aria-invalid":S,children:[u,d(h.Icon,{asChild:!0,children:d(n,{svg:d(s,{weight:`bold`}),className:`size-4`})})]})},x=({className:e,ref:r,...i})=>d(h.ScrollUpButton,{ref:r,className:t(`flex cursor-default items-center justify-center py-1`,e),...i,children:d(n,{svg:d(m,{weight:`bold`}),className:`size-4`})}),S=({className:e,ref:r,...i})=>d(h.ScrollDownButton,{ref:r,className:t(`flex cursor-default items-center justify-center py-1`,e),...i,children:d(n,{svg:d(s,{weight:`bold`}),className:`size-4`})}),C={Root:_,Content:({className:e,children:n,position:r=`popper`,ref:i,width:a=`trigger`,...o})=>d(h.Portal,{children:f(h.Content,{ref:i,"data-slot":`select-content`,className:t(`border-popover 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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md`,`bg-popover font-sans`,r===`popper`&&`data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-(--radix-select-content-available-height)`,a===`trigger`&&`w-(--radix-select-trigger-width)`,e),position:r,...o,children:[d(x,{}),d(h.Viewport,{className:t(`p-1 space-y-px`,r===`popper`&&`h-(--radix-select-trigger-height) w-full`),children:n}),d(S,{})]})}),Group:v,Item:({className:e,children:r,icon:i,ref:a,...o})=>f(h.Item,{ref:a,"data-slot":`select-item`,className:t(`relative flex gap-2 w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2 pr-8 text-strong text-sm outline-hidden`,`focus:bg-active-menu-item`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`data-state-checked:bg-selected-menu-item`,`focus:data-state-checked:bg-active-selected-menu-item`,e),...o,children:[i&&d(n,{svg:i}),d(h.ItemText,{children:r}),d(h.ItemIndicator,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:d(n,{svg:d(p,{weight:`bold`}),className:`size-4 text-accent-600`})})]}),Label:({className:e,ref:n,...r})=>d(h.Label,{ref:n,"data-slot":`select-label`,className:t(`px-2 py-1.5 text-sm font-medium`,e),...r}),Separator:({className:e,ref:n,...r})=>d(o,{ref:n,"data-slot":`select-separator`,className:t(`-mx-1 my-1 h-px w-auto`,e),...r}),Trigger:b,Value:y};export{C as t};
package/dist/select.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Select } from "./select-idm1jy7y.js";
1
+ import { t as Select } from "./select-0z7HVS6r.js";
2
2
  export { Select };
package/dist/select.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./select-SR_9-bxA.js";export{e as Select};
1
+ import{t as e}from"./select-BCHWvmyC.js";export{e as Select};