@ngrok/mantle 0.79.3 → 0.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +158 -19
- package/dist/accordion.js +1 -1
- package/dist/agent.json +5 -1
- package/dist/alert-dialog.d.ts +465 -32
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +116 -14
- package/dist/alert.js +1 -1
- package/dist/anchor-DfeXTpKW.js +1 -0
- package/dist/anchor.d.ts +2 -2
- package/dist/anchor.js +1 -1
- package/dist/area-chart.d.ts +504 -0
- package/dist/area-chart.js +1 -0
- package/dist/as-child-D23mGo4f.d.ts +49 -0
- package/dist/badge.d.ts +44 -5
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +491 -0
- package/dist/bar-chart.js +1 -0
- package/dist/breadcrumb.d.ts +196 -14
- package/dist/breadcrumb.js +1 -1
- package/dist/button-BAno7KIU.js +1 -0
- package/dist/{index-BSAizFod.d.ts → button-C-gMbPso.d.ts} +5 -5
- package/dist/{icon-button-BvQvT790.d.ts → button-C7vAl6lS.d.ts} +22 -63
- package/dist/button-D9n09xUg.js +1 -0
- package/dist/{button-DcXOWUYo.d.ts → button-DARFK2KJ.d.ts} +4 -4
- package/dist/button-DjpEKt2X.js +1 -0
- package/dist/button-DvHMWAPl.js +1 -0
- package/dist/button.d.ts +5 -5
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +0 -3
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +131 -9
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +209 -8
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BROa2gqt.js +2 -0
- package/dist/chart-BcOC6Qj0.d.ts +275 -0
- package/dist/checkbox-0EoxOyMA.js +1 -0
- package/dist/checkbox.d.ts +13 -11
- package/dist/checkbox.js +1 -1
- package/dist/choice-BHwFSSyv.js +1 -0
- package/dist/choice-BNRQXszu.d.ts +254 -0
- package/dist/choice.d.ts +1 -252
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +242 -52
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +3 -2
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +171 -16
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +279 -81
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdBMM9ga.js +1 -0
- package/dist/data-table.d.ts +28 -6
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +67 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-BM4wPCft.d.ts +24 -0
- package/dist/dialog-DWZWd5Jt.js +1 -0
- package/dist/dialog.d.ts +226 -35
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-DZg-Cd69.d.ts} +137 -32
- package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
- package/dist/dropdown-menu-RyDWoKHx.js +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -22
- package/dist/empty.js +1 -1
- package/dist/field-B1wqeZr4.js +1 -0
- package/dist/field.d.ts +568 -47
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +0 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +3 -4
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +48 -7
- package/dist/hover-card.js +1 -1
- package/dist/{svg-only-BFeFS1aa.d.ts → icon-CX_gj6sW.d.ts} +2 -2
- package/dist/icon-d-nMCfAI.js +1 -0
- package/dist/{icon-Cevjo93X.d.ts → icon-k4E9yNWD.d.ts} +2 -2
- package/dist/icon-lZ48P8Nn.js +1 -0
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/{sort-BPX2Fk9t.js → icons-B_DDQcVD.js} +1 -1
- package/dist/{traffic-policy-file-0g5RXFqu.js → icons-CF1lbWtp.js} +1 -1
- package/dist/icons-DLCs1hLP.js +1 -0
- package/dist/icons.d.ts +7 -15
- package/dist/icons.js +1 -1
- package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
- package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
- package/dist/input-BnlpQF0c.js +1 -0
- package/dist/{types-C19IR7jf.d.ts → input-BuYDU6CF.d.ts} +42 -2
- package/dist/input.d.ts +5 -56
- package/dist/input.js +1 -1
- package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
- package/dist/label-D-D11mlp.js +1 -0
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/line-chart.d.ts +490 -0
- package/dist/line-chart.js +1 -0
- package/dist/list-51KQvENW.js +1 -0
- package/dist/list.d.ts +135 -6
- package/dist/list.js +1 -1
- package/dist/llms.txt +5 -1
- package/dist/main.d.ts +20 -4
- package/dist/main.js +1 -1
- package/dist/mantle-dark-high-contrast.css +17 -0
- package/dist/mantle-dark.css +13 -0
- package/dist/mantle-light-high-contrast.css +15 -0
- package/dist/mantle.css +29 -0
- package/dist/media-object.d.ts +18 -4
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +282 -24
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +118 -6
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +61 -6
- package/dist/pagination.js +1 -1
- package/dist/popover-CE4OlWkd.d.ts +208 -0
- package/dist/popover-CQ9s7jG5.js +1 -0
- package/dist/popover.d.ts +1 -181
- package/dist/popover.js +1 -1
- package/dist/primitive-trJDqIXJ.js +1 -0
- package/dist/progress.d.ts +2 -8
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +101 -5
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +110 -35
- package/dist/radio-group.js +1 -1
- package/dist/sandboxed-on-click.d.ts +2 -2
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +495 -0
- package/dist/scatter-plot.js +1 -0
- package/dist/select-0z7HVS6r.d.ts +579 -0
- package/dist/select-BCHWvmyC.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +225 -298
- package/dist/selectable-list.js +1 -1
- package/dist/separator-B5UmkVRL.d.ts +75 -0
- package/dist/separator-bpE_kooz.js +1 -0
- package/dist/separator.d.ts +1 -52
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +285 -38
- package/dist/sheet.js +1 -1
- package/dist/skeleton-CsbUHbBA.js +1 -0
- package/dist/skeleton.d.ts +4 -7
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +24 -4
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/{index-Rv8RL7xy.d.ts → slot-BtwKJTLq.d.ts} +1 -1
- package/dist/slot-CDk0Bb9z.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +14 -14
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +10 -7
- package/dist/switch.js +1 -1
- package/dist/table-Bo0vNxIJ.d.ts +848 -0
- package/dist/table-CGxJwtbL.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +124 -25
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-C26-Xolp.js +1 -0
- package/dist/theme-switcher.d.ts +105 -33
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +54 -15
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +86 -10
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +50 -5
- package/dist/tooltip.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/package.json +9 -3
- package/dist/anchor-C_tjSVy6.js +0 -1
- package/dist/as-child-CYEVu1WY.d.ts +0 -23
- package/dist/button-5t6-JS_I.js +0 -1
- package/dist/button-ClC60Nzg.js +0 -1
- package/dist/checkbox-DJ2xl7Rc.js +0 -1
- package/dist/choice-DOdyNzFC.js +0 -1
- package/dist/compose-refs-Cjf2gfB8.js +0 -1
- package/dist/dialog-vxLIvB8M.js +0 -1
- package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
- package/dist/field-context-BR01g789.js +0 -1
- package/dist/icon-CDtYjF_H.js +0 -1
- package/dist/icon-button-DV2-GZHf.js +0 -1
- package/dist/index-g2rfwNCH.d.ts +0 -1
- package/dist/input-Ct1YOqSy.js +0 -1
- package/dist/label-BMlHW_2D.js +0 -1
- package/dist/popover-D5WxxnBY.js +0 -1
- package/dist/primitive-C64-m48O.d.ts +0 -13
- package/dist/primitive-IKruV2iB.js +0 -1
- package/dist/select-Bwt2YduR.d.ts +0 -345
- package/dist/select-D-5u0Blc.js +0 -1
- package/dist/separator-kBnnv3Cw.js +0 -1
- package/dist/skeleton-Bu3tgNcW.js +0 -1
- package/dist/slot-DmPrjM7N.js +0 -1
- package/dist/svg-only-DDx6FtJd.js +0 -1
- package/dist/table-CPH2md2-.js +0 -1
- package/dist/table-CwFHXC-G.d.ts +0 -414
- package/dist/theme-D3MDng6U.js +0 -1
- package/dist/theme-provider-C9zpDyJW.js +0 -1
- package/dist/toast-BsCjaMVS.js +0 -1
- package/dist/virtual-DZMBu7Ch.js +0 -1
- /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
- /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
- /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
- /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
- /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
- /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
- /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.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 ChartAccessibleName } from "./chart-BcOC6Qj0.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"> & ChartAccessibleName & {
|
|
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-BROa2gqt.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};
|