@mastra/playground-ui 36.0.0 → 36.1.0-alpha.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.
- package/CHANGELOG.md +24 -0
- package/dist/components/ScatterPlotChart.cjs.js +13 -0
- package/dist/components/ScatterPlotChart.cjs.js.map +1 -0
- package/dist/components/ScatterPlotChart.d.ts +2 -0
- package/dist/components/ScatterPlotChart.es.js +2 -0
- package/dist/components/ScatterPlotChart.es.js.map +1 -0
- package/dist/components/ThreadList.cjs.js +15 -0
- package/dist/components/ThreadList.cjs.js.map +1 -0
- package/dist/components/ThreadList.d.ts +2 -0
- package/dist/components/ThreadList.es.js +2 -0
- package/dist/components/ThreadList.es.js.map +1 -0
- package/dist/index.cjs.js +789 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +80 -1
- package/dist/index.es.js +764 -8
- package/dist/index.es.js.map +1 -1
- package/dist/scatter-plot-chart-BDRQ77OX.js +162 -0
- package/dist/scatter-plot-chart-BDRQ77OX.js.map +1 -0
- package/dist/scatter-plot-chart-MLvMlaxH.cjs +167 -0
- package/dist/scatter-plot-chart-MLvMlaxH.cjs.map +1 -0
- package/dist/src/domains/logs/hooks/use-logs.d.ts +5 -0
- package/dist/src/ds/components/ScatterPlotChart/index.d.ts +2 -0
- package/dist/src/ds/components/ScatterPlotChart/scatter-plot-chart-tooltip.d.ts +16 -0
- package/dist/src/ds/components/ScatterPlotChart/scatter-plot-chart.d.ts +24 -0
- package/dist/src/ds/components/ScatterPlotChart/scatter-plot-chart.stories.d.ts +11 -0
- package/dist/src/ds/components/ThreadList/index.d.ts +1 -0
- package/dist/src/ds/components/ThreadList/thread-list.d.ts +39 -0
- package/dist/src/ee/index.d.ts +2 -0
- package/dist/src/ee/signals/components/index.d.ts +2 -0
- package/dist/src/ee/signals/components/signal-details-page.d.ts +45 -0
- package/dist/src/ee/signals/components/signals-overview-page.d.ts +16 -0
- package/dist/src/ee/signals/index.d.ts +4 -0
- package/dist/src/ee/signals/signals-chart-data.d.ts +10 -0
- package/dist/src/ee/signals/signals-data.d.ts +2 -0
- package/dist/src/ee/signals/types.d.ts +13 -0
- package/dist/src/ee/topics/components/index.d.ts +6 -0
- package/dist/src/ee/topics/components/topic-trace-details-panel.d.ts +7 -0
- package/dist/src/ee/topics/components/topic-trace-summary-list.d.ts +8 -0
- package/dist/src/ee/topics/components/topics-layout.d.ts +7 -0
- package/dist/src/ee/topics/index.d.ts +3 -0
- package/dist/src/ee/topics/types.d.ts +40 -0
- package/dist/src/ee/topics/utils.d.ts +18 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/lib/query-utils.d.ts +10 -0
- package/dist/thread-list-CX4UNk2L.cjs +79 -0
- package/dist/thread-list-CX4UNk2L.cjs.map +1 -0
- package/dist/thread-list-CkgV4nYA.js +72 -0
- package/dist/thread-list-CkgV4nYA.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ResponsiveContainer, ScatterChart, CartesianGrid, XAxis, YAxis, ZAxis, Tooltip, Scatter } from 'recharts';
|
|
3
|
+
import { C as Colors } from './spacings-0Zbr65EW.js';
|
|
4
|
+
import { c as cn } from './utils-CzYGxqbG.js';
|
|
5
|
+
|
|
6
|
+
function ScatterPlotChartTooltip({
|
|
7
|
+
active,
|
|
8
|
+
payload,
|
|
9
|
+
xKey,
|
|
10
|
+
yKey,
|
|
11
|
+
nameKey,
|
|
12
|
+
formatX,
|
|
13
|
+
formatY,
|
|
14
|
+
formatTooltipLabel
|
|
15
|
+
}) {
|
|
16
|
+
const point = payload?.[0]?.payload;
|
|
17
|
+
if (!active || !point) return null;
|
|
18
|
+
const label = formatTooltipLabel?.(point) ?? (nameKey ? point[nameKey] : void 0);
|
|
19
|
+
const xValue = point[xKey];
|
|
20
|
+
const yValue = point[yKey];
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-border1 bg-surface2 px-3 py-2 text-xs shadow-lg", children: [
|
|
22
|
+
label !== void 0 && /* @__PURE__ */ jsx("p", { className: "mb-1 font-medium text-icon6", children: String(label) }),
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1 text-icon2", children: [
|
|
24
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
25
|
+
/* @__PURE__ */ jsx("span", { className: "text-neutral3", children: "X:" }),
|
|
26
|
+
" ",
|
|
27
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: formatX ? formatX(xValue, point) : String(xValue) })
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
30
|
+
/* @__PURE__ */ jsx("span", { className: "text-neutral3", children: "Y:" }),
|
|
31
|
+
" ",
|
|
32
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono", children: formatY ? formatY(yValue, point) : String(yValue) })
|
|
33
|
+
] })
|
|
34
|
+
] })
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const LABEL_COLOR = "#a1a1aa";
|
|
39
|
+
const DEFAULT_POINT_SIZE = 48;
|
|
40
|
+
const CHART_MARGIN = { top: 16, right: 16, bottom: 16, left: 16 };
|
|
41
|
+
function getScatterPlotPointColor(point, colorKey) {
|
|
42
|
+
const color = colorKey ? point[colorKey] : void 0;
|
|
43
|
+
return typeof color === "string" && color.length > 0 ? color : Colors.accent3;
|
|
44
|
+
}
|
|
45
|
+
function getScatterPlotClickedPoint(payload) {
|
|
46
|
+
return payload?.payload;
|
|
47
|
+
}
|
|
48
|
+
function formatScatterPlotAxisTick(value, formatter) {
|
|
49
|
+
return (formatter?.(value, {}) ?? String(value)).replace(/\s+/g, " ");
|
|
50
|
+
}
|
|
51
|
+
function ScatterPlotChart({
|
|
52
|
+
data,
|
|
53
|
+
xKey,
|
|
54
|
+
yKey,
|
|
55
|
+
nameKey,
|
|
56
|
+
colorKey,
|
|
57
|
+
height = 210,
|
|
58
|
+
xLabel,
|
|
59
|
+
yLabel,
|
|
60
|
+
xDomain,
|
|
61
|
+
yDomain,
|
|
62
|
+
formatX,
|
|
63
|
+
formatY,
|
|
64
|
+
formatTooltipLabel,
|
|
65
|
+
onPointClick,
|
|
66
|
+
className
|
|
67
|
+
}) {
|
|
68
|
+
const isClickable = typeof onPointClick === "function";
|
|
69
|
+
const fillsContainer = height === "100%";
|
|
70
|
+
if (data.length === 0) {
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
"div",
|
|
73
|
+
{
|
|
74
|
+
className: cn(
|
|
75
|
+
"flex items-center justify-center rounded-md border border-border1 text-ui-sm text-neutral3",
|
|
76
|
+
className
|
|
77
|
+
),
|
|
78
|
+
style: { height },
|
|
79
|
+
children: "No data to display"
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
return /* @__PURE__ */ jsx("div", { className: cn(fillsContainer && "flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ jsx("div", { className: cn(fillsContainer && "min-h-0 flex-1"), style: { height: fillsContainer ? void 0 : height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(ScatterChart, { data, margin: CHART_MARGIN, children: [
|
|
84
|
+
/* @__PURE__ */ jsx(CartesianGrid, { stroke: Colors.neutral3, strokeDasharray: "4 4", strokeOpacity: 0.18, vertical: false }),
|
|
85
|
+
/* @__PURE__ */ jsx(
|
|
86
|
+
XAxis,
|
|
87
|
+
{
|
|
88
|
+
dataKey: xKey,
|
|
89
|
+
name: xLabel,
|
|
90
|
+
type: "number",
|
|
91
|
+
tick: { fontSize: 10, fill: LABEL_COLOR, fontFamily: "var(--font-mono)" },
|
|
92
|
+
tickLine: false,
|
|
93
|
+
axisLine: false,
|
|
94
|
+
domain: xDomain,
|
|
95
|
+
tickFormatter: (value) => formatScatterPlotAxisTick(value, formatX)
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ jsx(
|
|
99
|
+
YAxis,
|
|
100
|
+
{
|
|
101
|
+
dataKey: yKey,
|
|
102
|
+
name: yLabel,
|
|
103
|
+
type: "number",
|
|
104
|
+
tick: { fontSize: 10, fill: LABEL_COLOR, fontFamily: "var(--font-mono)" },
|
|
105
|
+
tickLine: false,
|
|
106
|
+
axisLine: false,
|
|
107
|
+
width: 44,
|
|
108
|
+
domain: yDomain,
|
|
109
|
+
tickFormatter: (value) => formatScatterPlotAxisTick(value, formatY)
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ jsx(ZAxis, { range: [DEFAULT_POINT_SIZE, DEFAULT_POINT_SIZE] }),
|
|
113
|
+
/* @__PURE__ */ jsx(
|
|
114
|
+
Tooltip,
|
|
115
|
+
{
|
|
116
|
+
cursor: { stroke: Colors.neutral3, strokeOpacity: 0.16 },
|
|
117
|
+
content: /* @__PURE__ */ jsx(
|
|
118
|
+
ScatterPlotChartTooltip,
|
|
119
|
+
{
|
|
120
|
+
xKey,
|
|
121
|
+
yKey,
|
|
122
|
+
nameKey,
|
|
123
|
+
formatX,
|
|
124
|
+
formatY,
|
|
125
|
+
formatTooltipLabel
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ jsx(
|
|
131
|
+
Scatter,
|
|
132
|
+
{
|
|
133
|
+
data,
|
|
134
|
+
fill: Colors.accent3,
|
|
135
|
+
shape: (props) => {
|
|
136
|
+
const point = props.payload ?? {};
|
|
137
|
+
const cx = props.cx;
|
|
138
|
+
const cy = props.cy;
|
|
139
|
+
if (typeof cx !== "number" || typeof cy !== "number") return /* @__PURE__ */ jsx("g", {});
|
|
140
|
+
return /* @__PURE__ */ jsx(
|
|
141
|
+
"circle",
|
|
142
|
+
{
|
|
143
|
+
cx,
|
|
144
|
+
cy,
|
|
145
|
+
r: 4,
|
|
146
|
+
fill: getScatterPlotPointColor(point, colorKey),
|
|
147
|
+
opacity: 0.9,
|
|
148
|
+
style: { cursor: isClickable ? "pointer" : void 0 }
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
},
|
|
152
|
+
onClick: (_, payload) => {
|
|
153
|
+
const point = getScatterPlotClickedPoint(payload);
|
|
154
|
+
if (point) onPointClick?.(point);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
] }) }) }) });
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export { ScatterPlotChart as S, ScatterPlotChartTooltip as a, getScatterPlotPointColor as b, getScatterPlotClickedPoint as g };
|
|
162
|
+
//# sourceMappingURL=scatter-plot-chart-BDRQ77OX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatter-plot-chart-BDRQ77OX.js","sources":["../src/ds/components/ScatterPlotChart/scatter-plot-chart-tooltip.tsx","../src/ds/components/ScatterPlotChart/scatter-plot-chart.tsx"],"sourcesContent":["import type { ScatterPlotChartFormatter } from './scatter-plot-chart';\n\ntype ScatterTooltipPayload = Array<{\n color?: string;\n payload?: Record<string, unknown>;\n}>;\n\nexport function ScatterPlotChartTooltip({\n active,\n payload,\n xKey,\n yKey,\n nameKey,\n formatX,\n formatY,\n formatTooltipLabel,\n}: {\n active?: boolean;\n payload?: ScatterTooltipPayload;\n xKey: string;\n yKey: string;\n nameKey?: string;\n formatX?: ScatterPlotChartFormatter;\n formatY?: ScatterPlotChartFormatter;\n formatTooltipLabel?: (point: Record<string, unknown>) => string;\n}) {\n const point = payload?.[0]?.payload;\n if (!active || !point) return null;\n\n const label = formatTooltipLabel?.(point) ?? (nameKey ? point[nameKey] : undefined);\n const xValue = point[xKey];\n const yValue = point[yKey];\n\n return (\n <div className=\"rounded-md border border-border1 bg-surface2 px-3 py-2 text-xs shadow-lg\">\n {label !== undefined && <p className=\"mb-1 font-medium text-icon6\">{String(label)}</p>}\n <div className=\"grid gap-1 text-icon2\">\n <p>\n <span className=\"text-neutral3\">X:</span>{' '}\n <span className=\"font-mono\">{formatX ? formatX(xValue, point) : String(xValue)}</span>\n </p>\n <p>\n <span className=\"text-neutral3\">Y:</span>{' '}\n <span className=\"font-mono\">{formatY ? formatY(yValue, point) : String(yValue)}</span>\n </p>\n </div>\n </div>\n );\n}\n","import { CartesianGrid, ResponsiveContainer, Scatter, ScatterChart, Tooltip, XAxis, YAxis, ZAxis } from 'recharts';\nimport { ScatterPlotChartTooltip } from './scatter-plot-chart-tooltip';\nimport { Colors } from '@/ds/tokens';\nimport { cn } from '@/lib/utils';\n\nconst LABEL_COLOR = '#a1a1aa';\nconst DEFAULT_POINT_SIZE = 48;\nconst CHART_MARGIN = { top: 16, right: 16, bottom: 16, left: 16 };\n\nexport type ScatterPlotChartDomain = [number | 'auto', number | 'auto'];\nexport type ScatterPlotChartFormatter = (value: unknown, point: Record<string, unknown>) => string;\nexport type ScatterPlotChartPointClickHandler = (point: Record<string, unknown>) => void;\n\nexport type ScatterPlotChartProps = {\n data: Array<Record<string, unknown>>;\n xKey: string;\n yKey: string;\n nameKey?: string;\n colorKey?: string;\n height?: React.CSSProperties['height'];\n xLabel?: string;\n yLabel?: string;\n xDomain?: ScatterPlotChartDomain;\n yDomain?: ScatterPlotChartDomain;\n formatX?: ScatterPlotChartFormatter;\n formatY?: ScatterPlotChartFormatter;\n formatTooltipLabel?: (point: Record<string, unknown>) => string;\n onPointClick?: ScatterPlotChartPointClickHandler;\n className?: string;\n};\n\nexport function getScatterPlotPointColor(point: Record<string, unknown>, colorKey?: string) {\n const color = colorKey ? point[colorKey] : undefined;\n return typeof color === 'string' && color.length > 0 ? color : Colors.accent3;\n}\n\nexport function getScatterPlotClickedPoint(payload: unknown) {\n return (payload as { payload?: Record<string, unknown> } | undefined)?.payload;\n}\n\nexport function formatScatterPlotAxisTick(value: unknown, formatter?: ScatterPlotChartFormatter) {\n return (formatter?.(value, {}) ?? String(value)).replace(/\\s+/g, '\\u00A0');\n}\n\nexport function ScatterPlotChart({\n data,\n xKey,\n yKey,\n nameKey,\n colorKey,\n height = 210,\n xLabel,\n yLabel,\n xDomain,\n yDomain,\n formatX,\n formatY,\n formatTooltipLabel,\n onPointClick,\n className,\n}: ScatterPlotChartProps) {\n const isClickable = typeof onPointClick === 'function';\n const fillsContainer = height === '100%';\n\n if (data.length === 0) {\n return (\n <div\n className={cn(\n 'flex items-center justify-center rounded-md border border-border1 text-ui-sm text-neutral3',\n className,\n )}\n style={{ height }}\n >\n No data to display\n </div>\n );\n }\n\n return (\n <div className={cn(fillsContainer && 'flex h-full min-h-0 flex-col', className)}>\n <div className={cn(fillsContainer && 'min-h-0 flex-1')} style={{ height: fillsContainer ? undefined : height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <ScatterChart data={data} margin={CHART_MARGIN}>\n <CartesianGrid stroke={Colors.neutral3} strokeDasharray=\"4 4\" strokeOpacity={0.18} vertical={false} />\n <XAxis\n dataKey={xKey}\n name={xLabel}\n type=\"number\"\n tick={{ fontSize: 10, fill: LABEL_COLOR, fontFamily: 'var(--font-mono)' }}\n tickLine={false}\n axisLine={false}\n domain={xDomain}\n tickFormatter={value => formatScatterPlotAxisTick(value, formatX)}\n />\n <YAxis\n dataKey={yKey}\n name={yLabel}\n type=\"number\"\n tick={{ fontSize: 10, fill: LABEL_COLOR, fontFamily: 'var(--font-mono)' }}\n tickLine={false}\n axisLine={false}\n width={44}\n domain={yDomain}\n tickFormatter={value => formatScatterPlotAxisTick(value, formatY)}\n />\n <ZAxis range={[DEFAULT_POINT_SIZE, DEFAULT_POINT_SIZE]} />\n <Tooltip\n cursor={{ stroke: Colors.neutral3, strokeOpacity: 0.16 }}\n content={\n <ScatterPlotChartTooltip\n xKey={xKey}\n yKey={yKey}\n nameKey={nameKey}\n formatX={formatX}\n formatY={formatY}\n formatTooltipLabel={formatTooltipLabel}\n />\n }\n />\n <Scatter\n data={data}\n fill={Colors.accent3}\n shape={(props: unknown) => {\n const point = (props as { payload?: Record<string, unknown> }).payload ?? {};\n const cx = (props as { cx?: number }).cx;\n const cy = (props as { cy?: number }).cy;\n if (typeof cx !== 'number' || typeof cy !== 'number') return <g />;\n return (\n <circle\n cx={cx}\n cy={cy}\n r={4}\n fill={getScatterPlotPointColor(point, colorKey)}\n opacity={0.9}\n style={{ cursor: isClickable ? 'pointer' : undefined }}\n />\n );\n }}\n onClick={(_: unknown, payload: unknown) => {\n const point = getScatterPlotClickedPoint(payload);\n if (point) onPointClick?.(point);\n }}\n />\n </ScatterChart>\n </ResponsiveContainer>\n </div>\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;AAOO,SAAS,uBAAA,CAAwB;AAAA,EACtC,MAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAA,EASG;AACD,EAAA,MAAM,KAAA,GAAQ,OAAA,GAAU,CAAC,CAAA,EAAG,OAAA;AAC5B,EAAA,IAAI,CAAC,MAAA,IAAU,CAAC,KAAA,EAAO,OAAO,IAAA;AAE9B,EAAA,MAAM,QAAQ,kBAAA,GAAqB,KAAK,MAAM,OAAA,GAAU,KAAA,CAAM,OAAO,CAAA,GAAI,MAAA,CAAA;AACzE,EAAA,MAAM,MAAA,GAAS,MAAM,IAAI,CAAA;AACzB,EAAA,MAAM,MAAA,GAAS,MAAM,IAAI,CAAA;AAEzB,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,0EAAA,EACZ,QAAA,EAAA;AAAA,IAAA,KAAA,KAAU,0BAAa,GAAA,CAAC,GAAA,EAAA,EAAE,WAAU,6BAAA,EAA+B,QAAA,EAAA,MAAA,CAAO,KAAK,CAAA,EAAE,CAAA;AAAA,oBAClF,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,uBAAA,EACb,QAAA,EAAA;AAAA,sBAAA,IAAA,CAAC,GAAA,EAAA,EACC,QAAA,EAAA;AAAA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/jsx-runtime');
|
|
4
|
+
const recharts = require('recharts');
|
|
5
|
+
const spacings = require('./spacings-BP8L49kn.cjs');
|
|
6
|
+
const utils = require('./utils-vA5sWo9W.cjs');
|
|
7
|
+
|
|
8
|
+
function ScatterPlotChartTooltip({
|
|
9
|
+
active,
|
|
10
|
+
payload,
|
|
11
|
+
xKey,
|
|
12
|
+
yKey,
|
|
13
|
+
nameKey,
|
|
14
|
+
formatX,
|
|
15
|
+
formatY,
|
|
16
|
+
formatTooltipLabel
|
|
17
|
+
}) {
|
|
18
|
+
const point = payload?.[0]?.payload;
|
|
19
|
+
if (!active || !point) return null;
|
|
20
|
+
const label = formatTooltipLabel?.(point) ?? (nameKey ? point[nameKey] : void 0);
|
|
21
|
+
const xValue = point[xKey];
|
|
22
|
+
const yValue = point[yKey];
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md border border-border1 bg-surface2 px-3 py-2 text-xs shadow-lg", children: [
|
|
24
|
+
label !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-1 font-medium text-icon6", children: String(label) }),
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1 text-icon2", children: [
|
|
26
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
27
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-neutral3", children: "X:" }),
|
|
28
|
+
" ",
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono", children: formatX ? formatX(xValue, point) : String(xValue) })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-neutral3", children: "Y:" }),
|
|
33
|
+
" ",
|
|
34
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono", children: formatY ? formatY(yValue, point) : String(yValue) })
|
|
35
|
+
] })
|
|
36
|
+
] })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const LABEL_COLOR = "#a1a1aa";
|
|
41
|
+
const DEFAULT_POINT_SIZE = 48;
|
|
42
|
+
const CHART_MARGIN = { top: 16, right: 16, bottom: 16, left: 16 };
|
|
43
|
+
function getScatterPlotPointColor(point, colorKey) {
|
|
44
|
+
const color = colorKey ? point[colorKey] : void 0;
|
|
45
|
+
return typeof color === "string" && color.length > 0 ? color : spacings.Colors.accent3;
|
|
46
|
+
}
|
|
47
|
+
function getScatterPlotClickedPoint(payload) {
|
|
48
|
+
return payload?.payload;
|
|
49
|
+
}
|
|
50
|
+
function formatScatterPlotAxisTick(value, formatter) {
|
|
51
|
+
return (formatter?.(value, {}) ?? String(value)).replace(/\s+/g, " ");
|
|
52
|
+
}
|
|
53
|
+
function ScatterPlotChart({
|
|
54
|
+
data,
|
|
55
|
+
xKey,
|
|
56
|
+
yKey,
|
|
57
|
+
nameKey,
|
|
58
|
+
colorKey,
|
|
59
|
+
height = 210,
|
|
60
|
+
xLabel,
|
|
61
|
+
yLabel,
|
|
62
|
+
xDomain,
|
|
63
|
+
yDomain,
|
|
64
|
+
formatX,
|
|
65
|
+
formatY,
|
|
66
|
+
formatTooltipLabel,
|
|
67
|
+
onPointClick,
|
|
68
|
+
className
|
|
69
|
+
}) {
|
|
70
|
+
const isClickable = typeof onPointClick === "function";
|
|
71
|
+
const fillsContainer = height === "100%";
|
|
72
|
+
if (data.length === 0) {
|
|
73
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: utils.cn(
|
|
77
|
+
"flex items-center justify-center rounded-md border border-border1 text-ui-sm text-neutral3",
|
|
78
|
+
className
|
|
79
|
+
),
|
|
80
|
+
style: { height },
|
|
81
|
+
children: "No data to display"
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn(fillsContainer && "flex h-full min-h-0 flex-col", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils.cn(fillsContainer && "min-h-0 flex-1"), style: { height: fillsContainer ? void 0 : height }, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.ScatterChart, { data, margin: CHART_MARGIN, children: [
|
|
86
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.CartesianGrid, { stroke: spacings.Colors.neutral3, strokeDasharray: "4 4", strokeOpacity: 0.18, vertical: false }),
|
|
87
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
+
recharts.XAxis,
|
|
89
|
+
{
|
|
90
|
+
dataKey: xKey,
|
|
91
|
+
name: xLabel,
|
|
92
|
+
type: "number",
|
|
93
|
+
tick: { fontSize: 10, fill: LABEL_COLOR, fontFamily: "var(--font-mono)" },
|
|
94
|
+
tickLine: false,
|
|
95
|
+
axisLine: false,
|
|
96
|
+
domain: xDomain,
|
|
97
|
+
tickFormatter: (value) => formatScatterPlotAxisTick(value, formatX)
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
101
|
+
recharts.YAxis,
|
|
102
|
+
{
|
|
103
|
+
dataKey: yKey,
|
|
104
|
+
name: yLabel,
|
|
105
|
+
type: "number",
|
|
106
|
+
tick: { fontSize: 10, fill: LABEL_COLOR, fontFamily: "var(--font-mono)" },
|
|
107
|
+
tickLine: false,
|
|
108
|
+
axisLine: false,
|
|
109
|
+
width: 44,
|
|
110
|
+
domain: yDomain,
|
|
111
|
+
tickFormatter: (value) => formatScatterPlotAxisTick(value, formatY)
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.ZAxis, { range: [DEFAULT_POINT_SIZE, DEFAULT_POINT_SIZE] }),
|
|
115
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
116
|
+
recharts.Tooltip,
|
|
117
|
+
{
|
|
118
|
+
cursor: { stroke: spacings.Colors.neutral3, strokeOpacity: 0.16 },
|
|
119
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(
|
|
120
|
+
ScatterPlotChartTooltip,
|
|
121
|
+
{
|
|
122
|
+
xKey,
|
|
123
|
+
yKey,
|
|
124
|
+
nameKey,
|
|
125
|
+
formatX,
|
|
126
|
+
formatY,
|
|
127
|
+
formatTooltipLabel
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
133
|
+
recharts.Scatter,
|
|
134
|
+
{
|
|
135
|
+
data,
|
|
136
|
+
fill: spacings.Colors.accent3,
|
|
137
|
+
shape: (props) => {
|
|
138
|
+
const point = props.payload ?? {};
|
|
139
|
+
const cx = props.cx;
|
|
140
|
+
const cy = props.cy;
|
|
141
|
+
if (typeof cx !== "number" || typeof cy !== "number") return /* @__PURE__ */ jsxRuntime.jsx("g", {});
|
|
142
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
143
|
+
"circle",
|
|
144
|
+
{
|
|
145
|
+
cx,
|
|
146
|
+
cy,
|
|
147
|
+
r: 4,
|
|
148
|
+
fill: getScatterPlotPointColor(point, colorKey),
|
|
149
|
+
opacity: 0.9,
|
|
150
|
+
style: { cursor: isClickable ? "pointer" : void 0 }
|
|
151
|
+
}
|
|
152
|
+
);
|
|
153
|
+
},
|
|
154
|
+
onClick: (_, payload) => {
|
|
155
|
+
const point = getScatterPlotClickedPoint(payload);
|
|
156
|
+
if (point) onPointClick?.(point);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
] }) }) }) });
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
exports.ScatterPlotChart = ScatterPlotChart;
|
|
164
|
+
exports.ScatterPlotChartTooltip = ScatterPlotChartTooltip;
|
|
165
|
+
exports.getScatterPlotClickedPoint = getScatterPlotClickedPoint;
|
|
166
|
+
exports.getScatterPlotPointColor = getScatterPlotPointColor;
|
|
167
|
+
//# sourceMappingURL=scatter-plot-chart-MLvMlaxH.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scatter-plot-chart-MLvMlaxH.cjs","sources":["../src/ds/components/ScatterPlotChart/scatter-plot-chart-tooltip.tsx","../src/ds/components/ScatterPlotChart/scatter-plot-chart.tsx"],"sourcesContent":["import type { ScatterPlotChartFormatter } from './scatter-plot-chart';\n\ntype ScatterTooltipPayload = Array<{\n color?: string;\n payload?: Record<string, unknown>;\n}>;\n\nexport function ScatterPlotChartTooltip({\n active,\n payload,\n xKey,\n yKey,\n nameKey,\n formatX,\n formatY,\n formatTooltipLabel,\n}: {\n active?: boolean;\n payload?: ScatterTooltipPayload;\n xKey: string;\n yKey: string;\n nameKey?: string;\n formatX?: ScatterPlotChartFormatter;\n formatY?: ScatterPlotChartFormatter;\n formatTooltipLabel?: (point: Record<string, unknown>) => string;\n}) {\n const point = payload?.[0]?.payload;\n if (!active || !point) return null;\n\n const label = formatTooltipLabel?.(point) ?? (nameKey ? point[nameKey] : undefined);\n const xValue = point[xKey];\n const yValue = point[yKey];\n\n return (\n <div className=\"rounded-md border border-border1 bg-surface2 px-3 py-2 text-xs shadow-lg\">\n {label !== undefined && <p className=\"mb-1 font-medium text-icon6\">{String(label)}</p>}\n <div className=\"grid gap-1 text-icon2\">\n <p>\n <span className=\"text-neutral3\">X:</span>{' '}\n <span className=\"font-mono\">{formatX ? formatX(xValue, point) : String(xValue)}</span>\n </p>\n <p>\n <span className=\"text-neutral3\">Y:</span>{' '}\n <span className=\"font-mono\">{formatY ? formatY(yValue, point) : String(yValue)}</span>\n </p>\n </div>\n </div>\n );\n}\n","import { CartesianGrid, ResponsiveContainer, Scatter, ScatterChart, Tooltip, XAxis, YAxis, ZAxis } from 'recharts';\nimport { ScatterPlotChartTooltip } from './scatter-plot-chart-tooltip';\nimport { Colors } from '@/ds/tokens';\nimport { cn } from '@/lib/utils';\n\nconst LABEL_COLOR = '#a1a1aa';\nconst DEFAULT_POINT_SIZE = 48;\nconst CHART_MARGIN = { top: 16, right: 16, bottom: 16, left: 16 };\n\nexport type ScatterPlotChartDomain = [number | 'auto', number | 'auto'];\nexport type ScatterPlotChartFormatter = (value: unknown, point: Record<string, unknown>) => string;\nexport type ScatterPlotChartPointClickHandler = (point: Record<string, unknown>) => void;\n\nexport type ScatterPlotChartProps = {\n data: Array<Record<string, unknown>>;\n xKey: string;\n yKey: string;\n nameKey?: string;\n colorKey?: string;\n height?: React.CSSProperties['height'];\n xLabel?: string;\n yLabel?: string;\n xDomain?: ScatterPlotChartDomain;\n yDomain?: ScatterPlotChartDomain;\n formatX?: ScatterPlotChartFormatter;\n formatY?: ScatterPlotChartFormatter;\n formatTooltipLabel?: (point: Record<string, unknown>) => string;\n onPointClick?: ScatterPlotChartPointClickHandler;\n className?: string;\n};\n\nexport function getScatterPlotPointColor(point: Record<string, unknown>, colorKey?: string) {\n const color = colorKey ? point[colorKey] : undefined;\n return typeof color === 'string' && color.length > 0 ? color : Colors.accent3;\n}\n\nexport function getScatterPlotClickedPoint(payload: unknown) {\n return (payload as { payload?: Record<string, unknown> } | undefined)?.payload;\n}\n\nexport function formatScatterPlotAxisTick(value: unknown, formatter?: ScatterPlotChartFormatter) {\n return (formatter?.(value, {}) ?? String(value)).replace(/\\s+/g, '\\u00A0');\n}\n\nexport function ScatterPlotChart({\n data,\n xKey,\n yKey,\n nameKey,\n colorKey,\n height = 210,\n xLabel,\n yLabel,\n xDomain,\n yDomain,\n formatX,\n formatY,\n formatTooltipLabel,\n onPointClick,\n className,\n}: ScatterPlotChartProps) {\n const isClickable = typeof onPointClick === 'function';\n const fillsContainer = height === '100%';\n\n if (data.length === 0) {\n return (\n <div\n className={cn(\n 'flex items-center justify-center rounded-md border border-border1 text-ui-sm text-neutral3',\n className,\n )}\n style={{ height }}\n >\n No data to display\n </div>\n );\n }\n\n return (\n <div className={cn(fillsContainer && 'flex h-full min-h-0 flex-col', className)}>\n <div className={cn(fillsContainer && 'min-h-0 flex-1')} style={{ height: fillsContainer ? undefined : height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <ScatterChart data={data} margin={CHART_MARGIN}>\n <CartesianGrid stroke={Colors.neutral3} strokeDasharray=\"4 4\" strokeOpacity={0.18} vertical={false} />\n <XAxis\n dataKey={xKey}\n name={xLabel}\n type=\"number\"\n tick={{ fontSize: 10, fill: LABEL_COLOR, fontFamily: 'var(--font-mono)' }}\n tickLine={false}\n axisLine={false}\n domain={xDomain}\n tickFormatter={value => formatScatterPlotAxisTick(value, formatX)}\n />\n <YAxis\n dataKey={yKey}\n name={yLabel}\n type=\"number\"\n tick={{ fontSize: 10, fill: LABEL_COLOR, fontFamily: 'var(--font-mono)' }}\n tickLine={false}\n axisLine={false}\n width={44}\n domain={yDomain}\n tickFormatter={value => formatScatterPlotAxisTick(value, formatY)}\n />\n <ZAxis range={[DEFAULT_POINT_SIZE, DEFAULT_POINT_SIZE]} />\n <Tooltip\n cursor={{ stroke: Colors.neutral3, strokeOpacity: 0.16 }}\n content={\n <ScatterPlotChartTooltip\n xKey={xKey}\n yKey={yKey}\n nameKey={nameKey}\n formatX={formatX}\n formatY={formatY}\n formatTooltipLabel={formatTooltipLabel}\n />\n }\n />\n <Scatter\n data={data}\n fill={Colors.accent3}\n shape={(props: unknown) => {\n const point = (props as { payload?: Record<string, unknown> }).payload ?? {};\n const cx = (props as { cx?: number }).cx;\n const cy = (props as { cy?: number }).cy;\n if (typeof cx !== 'number' || typeof cy !== 'number') return <g />;\n return (\n <circle\n cx={cx}\n cy={cy}\n r={4}\n fill={getScatterPlotPointColor(point, colorKey)}\n opacity={0.9}\n style={{ cursor: isClickable ? 'pointer' : undefined }}\n />\n );\n }}\n onClick={(_: unknown, payload: unknown) => {\n const point = getScatterPlotClickedPoint(payload);\n if (point) onPointClick?.(point);\n }}\n />\n </ScatterChart>\n </ResponsiveContainer>\n </div>\n </div>\n );\n}\n"],"names":["jsxs","jsx","Colors","cn","ResponsiveContainer","ScatterChart","CartesianGrid","XAxis","YAxis","ZAxis","Tooltip","Scatter"],"mappings":";;;;;;;AAOO,SAAS,uBAAA,CAAwB;AAAA,EACtC,MAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAA,EASG;AACD,EAAA,MAAM,KAAA,GAAQ,OAAA,GAAU,CAAC,CAAA,EAAG,OAAA;AAC5B,EAAA,IAAI,CAAC,MAAA,IAAU,CAAC,KAAA,EAAO,OAAO,IAAA;AAE9B,EAAA,MAAM,QAAQ,kBAAA,GAAqB,KAAK,MAAM,OAAA,GAAU,KAAA,CAAM,OAAO,CAAA,GAAI,MAAA,CAAA;AACzE,EAAA,MAAM,MAAA,GAAS,MAAM,IAAI,CAAA;AACzB,EAAA,MAAM,MAAA,GAAS,MAAM,IAAI,CAAA;AAEzB,EAAA,uBACEA,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,0EAAA,EACZ,QAAA,EAAA;AAAA,IAAA,KAAA,KAAU,0BAAaC,cAAA,CAAC,GAAA,EAAA,EAAE,WAAU,6BAAA,EAA+B,QAAA,EAAA,MAAA,CAAO,KAAK,CAAA,EAAE,CAAA;AAAA,oBAClFD,eAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,uBAAA,EACb,QAAA,EAAA;AAAA,sBAAAA,eAAA,CAAC,GAAA,EAAA,EACC,QAAA,EAAA;AAAA,wBAAAC,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,eAAA,EAAgB,QAAA,EAAA,IAAA,EAAE,CAAA;AAAA,QAAQ,GAAA;AAAA,wBAC1CA,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,WAAA,EAAa,QAAA,EAAA,OAAA,G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AAA;AAAA;AACF;AAAA,KAEJ;AAAA,oBACAA,cAAA;AAAA,MAACU,gBAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,MAAMT,eAAA,CAAO,OAAA;AAAA,QACb,KAAA,EAAO,CAAC,KAAA,KAAmB;AACzB,UAAA,MAAM,KAAA,GAAS,KAAA,CAAgD,OAAA,IAAW,EAAC;AAC3E,UAAA,MAAM,KAAM,KAAA,CAA0B,EAAA;AACtC,UAAA,MAAM,KAAM,KAAA,CAA0B,EAAA;AACtC,UAAA,IAAI,OAAO,OAAO,QAAA,IAAY,OAAO,OAAO,QAAA,EAAU,sCAAQ,GAAA,EAAA,EAAE,CAAA;AAChE,UAAA,uBACED,cAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cACC,EAAA;AAAA,cACA,EAAA;AAAA,cACA,CAAA,EAAG,CAAA;AAAA,cACH,IAAA,EAAM,wBAAA,CAAyB,KAAA,EAAO,QAAQ,CAAA;AAAA,cAC9C,OAAA,EAAS,GAAA;AAAA,cACT,KAAA,EAAO,EAAE,MAAA,EAAQ,WAAA,GAAc,YAAY,MAAA;AAAU;AAAA,WACvD;AAAA,QAEJ,CAAA;AAAA,QACA,OAAA,EAAS,CAAC,CAAA,EAAY,OAAA,KAAqB;AACzC,UAAA,MAAM,KAAA,GAAQ,2BAA2B,OAAO,CAAA;AAChD,UAAA,IAAI,KAAA,iBAAsB,KAAK,CAAA;AAAA,QACjC;AAAA;AAAA;AACF,GAAA,EACF,CAAA,EACF,GACF,CAAA,EACF,CAAA;AAEJ;;;;;;;"}
|
|
@@ -13,5 +13,10 @@ interface UseLogsReturn {
|
|
|
13
13
|
export interface LogsFilters {
|
|
14
14
|
filters?: ListLogsArgs['filters'];
|
|
15
15
|
}
|
|
16
|
+
export declare function getLogsRefetchInterval(query: {
|
|
17
|
+
state: {
|
|
18
|
+
error: unknown;
|
|
19
|
+
};
|
|
20
|
+
}): false | 10000;
|
|
16
21
|
export declare const useLogs: (props?: LogsFilters) => UseLogsReturn;
|
|
17
22
|
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { ScatterPlotChart, getScatterPlotClickedPoint, getScatterPlotPointColor, type ScatterPlotChartDomain, type ScatterPlotChartFormatter, type ScatterPlotChartPointClickHandler, type ScatterPlotChartProps, } from './scatter-plot-chart';
|
|
2
|
+
export { ScatterPlotChartTooltip } from './scatter-plot-chart-tooltip';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ScatterPlotChartFormatter } from './scatter-plot-chart';
|
|
2
|
+
type ScatterTooltipPayload = Array<{
|
|
3
|
+
color?: string;
|
|
4
|
+
payload?: Record<string, unknown>;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function ScatterPlotChartTooltip({ active, payload, xKey, yKey, nameKey, formatX, formatY, formatTooltipLabel, }: {
|
|
7
|
+
active?: boolean;
|
|
8
|
+
payload?: ScatterTooltipPayload;
|
|
9
|
+
xKey: string;
|
|
10
|
+
yKey: string;
|
|
11
|
+
nameKey?: string;
|
|
12
|
+
formatX?: ScatterPlotChartFormatter;
|
|
13
|
+
formatY?: ScatterPlotChartFormatter;
|
|
14
|
+
formatTooltipLabel?: (point: Record<string, unknown>) => string;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type ScatterPlotChartDomain = [number | 'auto', number | 'auto'];
|
|
2
|
+
export type ScatterPlotChartFormatter = (value: unknown, point: Record<string, unknown>) => string;
|
|
3
|
+
export type ScatterPlotChartPointClickHandler = (point: Record<string, unknown>) => void;
|
|
4
|
+
export type ScatterPlotChartProps = {
|
|
5
|
+
data: Array<Record<string, unknown>>;
|
|
6
|
+
xKey: string;
|
|
7
|
+
yKey: string;
|
|
8
|
+
nameKey?: string;
|
|
9
|
+
colorKey?: string;
|
|
10
|
+
height?: React.CSSProperties['height'];
|
|
11
|
+
xLabel?: string;
|
|
12
|
+
yLabel?: string;
|
|
13
|
+
xDomain?: ScatterPlotChartDomain;
|
|
14
|
+
yDomain?: ScatterPlotChartDomain;
|
|
15
|
+
formatX?: ScatterPlotChartFormatter;
|
|
16
|
+
formatY?: ScatterPlotChartFormatter;
|
|
17
|
+
formatTooltipLabel?: (point: Record<string, unknown>) => string;
|
|
18
|
+
onPointClick?: ScatterPlotChartPointClickHandler;
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function getScatterPlotPointColor(point: Record<string, unknown>, colorKey?: string): string;
|
|
22
|
+
export declare function getScatterPlotClickedPoint(payload: unknown): Record<string, unknown> | undefined;
|
|
23
|
+
export declare function formatScatterPlotAxisTick(value: unknown, formatter?: ScatterPlotChartFormatter): string;
|
|
24
|
+
export declare function ScatterPlotChart({ data, xKey, yKey, nameKey, colorKey, height, xLabel, yLabel, xDomain, yDomain, formatX, formatY, formatTooltipLabel, onPointClick, className, }: ScatterPlotChartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ScatterPlotChart } from './scatter-plot-chart';
|
|
3
|
+
declare const meta: Meta<typeof ScatterPlotChart>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ScatterPlotChart>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Empty: Story;
|
|
8
|
+
export declare const Clickable: Story;
|
|
9
|
+
export declare const WithFixedDomains: Story;
|
|
10
|
+
export declare const FillsContainer: Story;
|
|
11
|
+
export declare const CustomTooltipLabel: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './thread-list';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ElementType, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
export interface ThreadListProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
'aria-label'?: string;
|
|
5
|
+
/**
|
|
6
|
+
* When true, drops the standalone block chrome (background, border, rounded corners, inset)
|
|
7
|
+
* so the list can render flush inside an outer container without nesting a second box.
|
|
8
|
+
*/
|
|
9
|
+
embedded?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const ThreadList: ({ children, "aria-label": ariaLabel, embedded }: ThreadListProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export interface ThreadListNewItemProps {
|
|
13
|
+
as?: ElementType;
|
|
14
|
+
href?: string;
|
|
15
|
+
to?: string;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const ThreadListNewItem: ({ as, href, to, children }: ThreadListNewItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const ThreadListSeparator: () => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export interface ThreadListItemsProps {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare const ThreadListItems: ({ children }: ThreadListItemsProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export interface ThreadListItemProps {
|
|
25
|
+
as?: ElementType;
|
|
26
|
+
href?: string;
|
|
27
|
+
to?: string;
|
|
28
|
+
isActive?: boolean;
|
|
29
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
30
|
+
onDelete?: () => void;
|
|
31
|
+
deleteLabel?: string;
|
|
32
|
+
className?: string;
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
export declare const ThreadListItem: ({ as, href, to, isActive, onClick, onDelete, deleteLabel, className, children, }: ThreadListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export interface ThreadListEmptyProps {
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
}
|
|
39
|
+
export declare const ThreadListEmpty: ({ children }: ThreadListEmptyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TopicTraceDetailsPanel } from '../../topics';
|
|
3
|
+
import { Signal, SignalCluster } from '../types';
|
|
4
|
+
export declare const SignalTraceDetailsPanel: typeof TopicTraceDetailsPanel;
|
|
5
|
+
type SignalTab = 'trace-list' | 'chart';
|
|
6
|
+
export declare function getSignalName(signalId: string): string;
|
|
7
|
+
interface SignalClusterSidebarProps {
|
|
8
|
+
signal: Signal;
|
|
9
|
+
selectedClusterIds: string[];
|
|
10
|
+
onClusterSelect: (clusterId: string) => void;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function SignalClusterSidebar({ signal, selectedClusterIds, onClusterSelect, multiple, ariaLabel, }: SignalClusterSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function SignalTraceListTab({ cluster, selectedTraceId, onTraceSelect, }: {
|
|
16
|
+
cluster: SignalCluster;
|
|
17
|
+
selectedTraceId: string | null;
|
|
18
|
+
onTraceSelect: () => void;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
interface SignalChartTabProps {
|
|
21
|
+
signal: Signal;
|
|
22
|
+
selectedClusterIds: string[];
|
|
23
|
+
onClusterToggle: (clusterId: string) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function SignalChartTab({ signal, selectedClusterIds, onClusterToggle }: SignalChartTabProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
interface SignalClusterTabsProps {
|
|
27
|
+
signal: Signal;
|
|
28
|
+
selectedCluster: SignalCluster;
|
|
29
|
+
selectedTraceId: string | null;
|
|
30
|
+
selectedChartClusterIds: string[];
|
|
31
|
+
activeTab: SignalTab;
|
|
32
|
+
onActiveTabChange: (tab: SignalTab) => void;
|
|
33
|
+
onClusterSelect: (clusterId: string) => void;
|
|
34
|
+
onChartClusterToggle: (clusterId: string) => void;
|
|
35
|
+
onTraceSelect: () => void;
|
|
36
|
+
}
|
|
37
|
+
export declare function SignalClusterTabs({ signal, selectedCluster, selectedTraceId, selectedChartClusterIds, activeTab, onActiveTabChange, onClusterSelect, onChartClusterToggle, onTraceSelect, }: SignalClusterTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export interface SignalDetailsPageProps {
|
|
39
|
+
signalId?: string;
|
|
40
|
+
selectedTraceId: string | null;
|
|
41
|
+
tracePanel?: ReactNode;
|
|
42
|
+
onTraceSelect: (signalId: string, traceId: string) => void;
|
|
43
|
+
}
|
|
44
|
+
export declare function SignalDetailsPage({ signalId, selectedTraceId, tracePanel, onTraceSelect }: SignalDetailsPageProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Signal, SignalCluster } from '../types';
|
|
2
|
+
interface SignalClusterCardProps {
|
|
3
|
+
cluster: SignalCluster;
|
|
4
|
+
totalTraceCount: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function SignalClusterCard({ cluster, totalTraceCount }: SignalClusterCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface SignalSectionProps {
|
|
8
|
+
signal: Signal;
|
|
9
|
+
onSeeDetails: (signal: Signal) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function SignalSection({ signal, onSeeDetails }: SignalSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export interface SignalsOverviewPageProps {
|
|
13
|
+
onSignalSelect: (signal: Signal) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function SignalsOverviewPage({ onSignalSelect }: SignalsOverviewPageProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SignalCluster } from './types';
|
|
2
|
+
export type SignalChartPoint = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
cluster: string;
|
|
6
|
+
duration: number;
|
|
7
|
+
spans: number;
|
|
8
|
+
color: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function getSignalChartData(clusters: SignalCluster[]): SignalChartPoint[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TopicTraceSummary } from '../topics';
|
|
2
|
+
export type SignalCluster = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
traceSummaries: TopicTraceSummary[];
|
|
7
|
+
};
|
|
8
|
+
export type Signal = {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
clusters: SignalCluster[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { TopicsLayout } from './topics-layout';
|
|
2
|
+
export type { TopicsLayoutProps } from './topics-layout';
|
|
3
|
+
export { TopicTraceSummaryList } from './topic-trace-summary-list';
|
|
4
|
+
export type { TopicTraceSummaryListProps } from './topic-trace-summary-list';
|
|
5
|
+
export { TopicTraceDetailsPanel } from './topic-trace-details-panel';
|
|
6
|
+
export type { TopicTraceDetailsPanelProps } from './topic-trace-details-panel';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface TopicTraceDetailsPanelProps {
|
|
2
|
+
traceId: string | null;
|
|
3
|
+
selectedSpanId?: string | null;
|
|
4
|
+
onSpanSelect?: (spanId: string | undefined) => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function TopicTraceDetailsPanel({ traceId, selectedSpanId, onSpanSelect, onClose, }: TopicTraceDetailsPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TopicTraceSummary } from '../types';
|
|
2
|
+
export interface TopicTraceSummaryListProps {
|
|
3
|
+
traces: TopicTraceSummary[];
|
|
4
|
+
selectedTraceId?: string | null;
|
|
5
|
+
onTraceSelect: (trace: TopicTraceSummary) => void;
|
|
6
|
+
pageSize?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function TopicTraceSummaryList({ traces, selectedTraceId, onTraceSelect, pageSize, }: TopicTraceSummaryListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface TopicsLayoutProps {
|
|
2
|
+
sidebar?: React.ReactNode;
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
tracePanel?: React.ReactNode;
|
|
5
|
+
contentPadding?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function TopicsLayout({ sidebar, children, tracePanel, contentPadding }: TopicsLayoutProps): import("react/jsx-runtime").JSX.Element;
|