@elevasis/ui 1.7.4 → 1.7.6
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/charts/index.css +112 -0
- package/dist/charts/index.d.ts +217 -2
- package/dist/charts/index.js +15 -384
- package/dist/{chunk-YJFTZUJJ.js → chunk-3Q5V2T6L.js} +2 -51
- package/dist/chunk-4KPI7YCY.js +1590 -0
- package/dist/chunk-6HZAMY6T.js +96 -0
- package/dist/{chunk-G4TAF3T6.js → chunk-OK3XFSJJ.js} +77 -67
- package/dist/chunk-YZ6GTZXL.js +48 -0
- package/dist/components/index.d.ts +9 -2
- package/dist/components/index.js +74 -686
- package/dist/execution/index.js +2 -1
- package/dist/hooks/index.d.ts +54 -2
- package/dist/hooks/index.js +2 -1
- package/dist/hooks/published.d.ts +54 -2
- package/dist/hooks/published.js +3 -2
- package/dist/index.d.ts +54 -2
- package/dist/index.js +4 -2
- package/package.json +3 -3
package/dist/charts/index.js
CHANGED
|
@@ -1,384 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var DARK = {
|
|
17
|
-
cyan: "#00e5ff",
|
|
18
|
-
cyanDim: "#00b8d4",
|
|
19
|
-
blue: "#448aff",
|
|
20
|
-
green: "#00ff88",
|
|
21
|
-
greenDim: "#00c853",
|
|
22
|
-
red: "#ff1744",
|
|
23
|
-
redDim: "#d50000",
|
|
24
|
-
yellow: "#ffab00",
|
|
25
|
-
magenta: "#ff4081",
|
|
26
|
-
...THEME_DERIVED,
|
|
27
|
-
cardGlow: "0 0 30px rgba(0, 229, 255, 0.06)"
|
|
28
|
-
};
|
|
29
|
-
var LIGHT = {
|
|
30
|
-
cyan: "#0091ea",
|
|
31
|
-
cyanDim: "#0277bd",
|
|
32
|
-
blue: "#4d8af0",
|
|
33
|
-
green: "#00a854",
|
|
34
|
-
greenDim: "#00873e",
|
|
35
|
-
red: "#d32f2f",
|
|
36
|
-
redDim: "#b71c1c",
|
|
37
|
-
yellow: "#f9a825",
|
|
38
|
-
magenta: "#c51162",
|
|
39
|
-
...THEME_DERIVED,
|
|
40
|
-
cardGlow: "0 0 20px rgba(0, 145, 234, 0.06)"
|
|
41
|
-
};
|
|
42
|
-
function useCyberColors() {
|
|
43
|
-
const scheme = useComputedColorScheme("dark");
|
|
44
|
-
return useMemo(() => scheme === "dark" ? DARK : LIGHT, [scheme]);
|
|
45
|
-
}
|
|
46
|
-
function getSeriesColor(key, colors) {
|
|
47
|
-
switch (key) {
|
|
48
|
-
case "Success Rate":
|
|
49
|
-
return colors.cyan;
|
|
50
|
-
case "Executions":
|
|
51
|
-
return colors.blue;
|
|
52
|
-
case "Success Count":
|
|
53
|
-
return colors.green;
|
|
54
|
-
case "Error Count":
|
|
55
|
-
return colors.red;
|
|
56
|
-
default:
|
|
57
|
-
return colors.cyan;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
function CyberDefs({ colors }) {
|
|
61
|
-
const gradients = [
|
|
62
|
-
{ id: "gradCyan", color: colors.cyan, opacity: 0.35 },
|
|
63
|
-
{ id: "gradBlue", color: colors.blue, opacity: 0.3 },
|
|
64
|
-
{ id: "gradGreen", color: colors.green, opacity: 0.3 },
|
|
65
|
-
{ id: "gradRed", color: colors.red, opacity: 0.3 },
|
|
66
|
-
{ id: "gradYellow", color: colors.yellow, opacity: 0.3 }
|
|
67
|
-
];
|
|
68
|
-
const filters = [
|
|
69
|
-
{ id: "glowCyan", std: 3 },
|
|
70
|
-
{ id: "glowBlue", std: 3 },
|
|
71
|
-
{ id: "glowGreen", std: 2.5 },
|
|
72
|
-
{ id: "glowRed", std: 2.5 },
|
|
73
|
-
{ id: "glowYellow", std: 2.5 }
|
|
74
|
-
];
|
|
75
|
-
return /* @__PURE__ */ jsxs("defs", { children: [
|
|
76
|
-
gradients.map((g) => /* @__PURE__ */ jsxs("linearGradient", { id: g.id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
77
|
-
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: g.color, stopOpacity: g.opacity }),
|
|
78
|
-
/* @__PURE__ */ jsx("stop", { offset: "60%", stopColor: g.color, stopOpacity: g.opacity * 0.2 }),
|
|
79
|
-
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: g.color, stopOpacity: 0 })
|
|
80
|
-
] }, g.id)),
|
|
81
|
-
filters.map((f) => /* @__PURE__ */ jsxs("filter", { id: f.id, x: "-20%", y: "-20%", width: "140%", height: "140%", children: [
|
|
82
|
-
/* @__PURE__ */ jsx("feGaussianBlur", { in: "SourceGraphic", stdDeviation: f.std, result: "blur" }),
|
|
83
|
-
/* @__PURE__ */ jsxs("feMerge", { children: [
|
|
84
|
-
/* @__PURE__ */ jsx("feMergeNode", { in: "blur" }),
|
|
85
|
-
/* @__PURE__ */ jsx("feMergeNode", { in: "SourceGraphic" })
|
|
86
|
-
] })
|
|
87
|
-
] }, f.id)),
|
|
88
|
-
/* @__PURE__ */ jsxs("filter", { id: "dotGlow", x: "-50%", y: "-50%", width: "200%", height: "200%", children: [
|
|
89
|
-
/* @__PURE__ */ jsx("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "4", result: "blur" }),
|
|
90
|
-
/* @__PURE__ */ jsxs("feMerge", { children: [
|
|
91
|
-
/* @__PURE__ */ jsx("feMergeNode", { in: "blur" }),
|
|
92
|
-
/* @__PURE__ */ jsx("feMergeNode", { in: "blur" }),
|
|
93
|
-
/* @__PURE__ */ jsx("feMergeNode", { in: "SourceGraphic" })
|
|
94
|
-
] })
|
|
95
|
-
] }),
|
|
96
|
-
/* @__PURE__ */ jsxs("filter", { id: "pulseGlow", x: "-30%", y: "-30%", width: "160%", height: "160%", children: [
|
|
97
|
-
/* @__PURE__ */ jsx("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "5", result: "blur" }),
|
|
98
|
-
/* @__PURE__ */ jsxs("feMerge", { children: [
|
|
99
|
-
/* @__PURE__ */ jsx("feMergeNode", { in: "blur" }),
|
|
100
|
-
/* @__PURE__ */ jsx("feMergeNode", { in: "blur" }),
|
|
101
|
-
/* @__PURE__ */ jsx("feMergeNode", { in: "SourceGraphic" })
|
|
102
|
-
] })
|
|
103
|
-
] })
|
|
104
|
-
] });
|
|
105
|
-
}
|
|
106
|
-
function PulseDefs({ series, colors, isLight }) {
|
|
107
|
-
return /* @__PURE__ */ jsx("defs", { children: series.map((s, i) => {
|
|
108
|
-
const color = colors[s.color ?? "cyan"];
|
|
109
|
-
const dur = "6s";
|
|
110
|
-
const delay = "0s";
|
|
111
|
-
const keyTimes = "0;0.3;1";
|
|
112
|
-
const keySplines = "0.33 0 0.67 1;0 0 1 1";
|
|
113
|
-
const animateProps = {
|
|
114
|
-
dur,
|
|
115
|
-
keyTimes,
|
|
116
|
-
keySplines,
|
|
117
|
-
repeatCount: "indefinite",
|
|
118
|
-
calcMode: "spline",
|
|
119
|
-
begin: delay
|
|
120
|
-
};
|
|
121
|
-
return /* @__PURE__ */ jsxs("linearGradient", { id: `pulse-${i}`, x1: "0", y1: "0", x2: "1", y2: "0", children: [
|
|
122
|
-
/* @__PURE__ */ jsx("stop", { offset: "0", stopColor: color, stopOpacity: 0, children: /* @__PURE__ */ jsx("animate", { attributeName: "offset", values: "-0.15;1.0;1.0", ...animateProps }) }),
|
|
123
|
-
/* @__PURE__ */ jsx("stop", { offset: "0", stopColor: isLight ? "white" : color, stopOpacity: isLight ? 0.6 : 0.9, children: /* @__PURE__ */ jsx("animate", { attributeName: "offset", values: "-0.075;1.075;1.075", ...animateProps }) }),
|
|
124
|
-
/* @__PURE__ */ jsx("stop", { offset: "0", stopColor: color, stopOpacity: 0, children: /* @__PURE__ */ jsx("animate", { attributeName: "offset", values: "0;1.15;1.15", ...animateProps }) })
|
|
125
|
-
] }, i);
|
|
126
|
-
}) });
|
|
127
|
-
}
|
|
128
|
-
function CyberActiveDot({
|
|
129
|
-
cx,
|
|
130
|
-
cy,
|
|
131
|
-
color,
|
|
132
|
-
dotStroke
|
|
133
|
-
}) {
|
|
134
|
-
if (cx == null || cy == null) return null;
|
|
135
|
-
return /* @__PURE__ */ jsxs("g", { filter: "url(#dotGlow)", children: [
|
|
136
|
-
/* @__PURE__ */ jsxs("circle", { cx, cy, r: 6, fill: "none", stroke: color, strokeWidth: 2, opacity: 0.5, children: [
|
|
137
|
-
/* @__PURE__ */ jsx("animate", { attributeName: "r", from: "4", to: "10", dur: "1.2s", repeatCount: "indefinite" }),
|
|
138
|
-
/* @__PURE__ */ jsx("animate", { attributeName: "opacity", from: "0.6", to: "0", dur: "1.2s", repeatCount: "indefinite" })
|
|
139
|
-
] }),
|
|
140
|
-
/* @__PURE__ */ jsx("circle", { cx, cy, r: 4, fill: color, stroke: dotStroke, strokeWidth: 2 })
|
|
141
|
-
] });
|
|
142
|
-
}
|
|
143
|
-
function CyberTooltipContent({
|
|
144
|
-
active,
|
|
145
|
-
payload,
|
|
146
|
-
label,
|
|
147
|
-
colors,
|
|
148
|
-
labelFormatter,
|
|
149
|
-
valueFormatter
|
|
150
|
-
}) {
|
|
151
|
-
if (!active || !payload?.length) return null;
|
|
152
|
-
const filtered = payload.filter((entry) => !entry.name?.startsWith("_pulse_"));
|
|
153
|
-
if (!filtered.length) return null;
|
|
154
|
-
const displayLabel = label && labelFormatter ? labelFormatter(label) : label;
|
|
155
|
-
return /* @__PURE__ */ jsxs(
|
|
156
|
-
"div",
|
|
157
|
-
{
|
|
158
|
-
style: {
|
|
159
|
-
background: colors.tooltipBg,
|
|
160
|
-
border: `1px solid ${colors.tooltipBorder}`,
|
|
161
|
-
borderRadius: 8,
|
|
162
|
-
padding: "10px 14px",
|
|
163
|
-
backdropFilter: "var(--glass-blur)",
|
|
164
|
-
WebkitBackdropFilter: "var(--glass-blur)",
|
|
165
|
-
boxShadow: "var(--standard-box-shadow)",
|
|
166
|
-
fontFamily: "var(--mantine-font-family-monospace, monospace)",
|
|
167
|
-
minWidth: 160
|
|
168
|
-
},
|
|
169
|
-
children: [
|
|
170
|
-
/* @__PURE__ */ jsx(
|
|
171
|
-
"div",
|
|
172
|
-
{
|
|
173
|
-
style: {
|
|
174
|
-
fontSize: 11,
|
|
175
|
-
color: colors.tickText,
|
|
176
|
-
marginBottom: 8,
|
|
177
|
-
letterSpacing: "0.05em",
|
|
178
|
-
textTransform: "uppercase",
|
|
179
|
-
borderBottom: `1px solid ${colors.tooltipBorder}`,
|
|
180
|
-
paddingBottom: 6
|
|
181
|
-
},
|
|
182
|
-
children: displayLabel
|
|
183
|
-
}
|
|
184
|
-
),
|
|
185
|
-
filtered.map((entry) => {
|
|
186
|
-
const color = entry.color || getSeriesColor(entry.dataKey, colors);
|
|
187
|
-
return /* @__PURE__ */ jsxs(
|
|
188
|
-
"div",
|
|
189
|
-
{
|
|
190
|
-
style: {
|
|
191
|
-
display: "flex",
|
|
192
|
-
justifyContent: "space-between",
|
|
193
|
-
alignItems: "center",
|
|
194
|
-
gap: 16,
|
|
195
|
-
padding: "3px 0",
|
|
196
|
-
fontSize: 12
|
|
197
|
-
},
|
|
198
|
-
children: [
|
|
199
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
200
|
-
/* @__PURE__ */ jsx(
|
|
201
|
-
"div",
|
|
202
|
-
{
|
|
203
|
-
style: {
|
|
204
|
-
width: 8,
|
|
205
|
-
height: 8,
|
|
206
|
-
borderRadius: "50%",
|
|
207
|
-
backgroundColor: color,
|
|
208
|
-
boxShadow: `0 0 6px ${color}`
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
),
|
|
212
|
-
/* @__PURE__ */ jsx("span", { style: { color: colors.tooltipText }, children: entry.name ?? entry.dataKey })
|
|
213
|
-
] }),
|
|
214
|
-
/* @__PURE__ */ jsx("span", { style: { color, fontWeight: 600, fontVariantNumeric: "tabular-nums" }, children: entry.value != null && valueFormatter ? valueFormatter(entry.value) : String(entry.value) })
|
|
215
|
-
]
|
|
216
|
-
},
|
|
217
|
-
entry.dataKey
|
|
218
|
-
);
|
|
219
|
-
})
|
|
220
|
-
]
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
function CyberLegendItem({ color, label }) {
|
|
225
|
-
return /* @__PURE__ */ jsxs(Group, { gap: 8, children: [
|
|
226
|
-
/* @__PURE__ */ jsx(
|
|
227
|
-
"div",
|
|
228
|
-
{
|
|
229
|
-
style: {
|
|
230
|
-
width: 10,
|
|
231
|
-
height: 10,
|
|
232
|
-
borderRadius: "50%",
|
|
233
|
-
backgroundColor: color,
|
|
234
|
-
boxShadow: `0 0 8px ${color}, 0 0 16px ${color}40`
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
),
|
|
238
|
-
/* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", style: { letterSpacing: "0.03em" }, children: label })
|
|
239
|
-
] });
|
|
240
|
-
}
|
|
241
|
-
var COLOR_MAP = {
|
|
242
|
-
cyan: { gradient: "url(#gradCyan)", filter: "url(#glowCyan)", key: "cyan" },
|
|
243
|
-
blue: { gradient: "url(#gradBlue)", filter: "url(#glowBlue)", key: "blue" },
|
|
244
|
-
green: { gradient: "url(#gradGreen)", filter: "url(#glowGreen)", key: "green" },
|
|
245
|
-
red: { gradient: "url(#gradRed)", filter: "url(#glowRed)", key: "red" },
|
|
246
|
-
yellow: { gradient: "url(#gradYellow)", filter: "url(#glowYellow)", key: "yellow" }
|
|
247
|
-
};
|
|
248
|
-
function CyberAreaChart({
|
|
249
|
-
data,
|
|
250
|
-
series,
|
|
251
|
-
xDataKey = "time",
|
|
252
|
-
height = 300,
|
|
253
|
-
yAxisLabel,
|
|
254
|
-
yDomain,
|
|
255
|
-
yTickFormatter,
|
|
256
|
-
showGrid = true,
|
|
257
|
-
showZeroBaseline = true,
|
|
258
|
-
baselineColor,
|
|
259
|
-
lineOnly = false,
|
|
260
|
-
margin = { top: 8, right: 20, left: 0, bottom: 0 },
|
|
261
|
-
xTickFormatter,
|
|
262
|
-
tooltipFormatter
|
|
263
|
-
}) {
|
|
264
|
-
const isLight = useComputedColorScheme("dark") === "light";
|
|
265
|
-
const colors = useCyberColors();
|
|
266
|
-
const [ready, setReady] = useState(false);
|
|
267
|
-
useEffect(() => {
|
|
268
|
-
const frame = requestAnimationFrame(() => setReady(true));
|
|
269
|
-
return () => cancelAnimationFrame(frame);
|
|
270
|
-
}, []);
|
|
271
|
-
const allZero = useMemo(() => {
|
|
272
|
-
if (!showZeroBaseline || !data.length) return false;
|
|
273
|
-
return data.every((row) => series.every((s) => row[s.dataKey] === 0));
|
|
274
|
-
}, [data, series, showZeroBaseline]);
|
|
275
|
-
if (!ready || !data.length) return /* @__PURE__ */ jsx(Box, { style: { height } });
|
|
276
|
-
const gridProps = {
|
|
277
|
-
stroke: colors.gridLine,
|
|
278
|
-
strokeDasharray: "3 6",
|
|
279
|
-
strokeOpacity: 1
|
|
280
|
-
};
|
|
281
|
-
const xAxisConfig = {
|
|
282
|
-
stroke: "none",
|
|
283
|
-
tick: {
|
|
284
|
-
fill: colors.tickText,
|
|
285
|
-
fontSize: 11,
|
|
286
|
-
fontFamily: "var(--mantine-font-family-monospace, monospace)"
|
|
287
|
-
},
|
|
288
|
-
tickLine: false,
|
|
289
|
-
axisLine: { stroke: colors.grid, strokeWidth: 1 }
|
|
290
|
-
};
|
|
291
|
-
const yTickStyle = {
|
|
292
|
-
fill: colors.tickText,
|
|
293
|
-
fontSize: 11,
|
|
294
|
-
fontFamily: "var(--mantine-font-family-monospace, monospace)"
|
|
295
|
-
};
|
|
296
|
-
return /* @__PURE__ */ jsx(Box, { style: { width: "100%", height }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs(AreaChart, { data, margin, children: [
|
|
297
|
-
/* @__PURE__ */ jsx(CyberDefs, { colors }),
|
|
298
|
-
/* @__PURE__ */ jsx(PulseDefs, { series, colors, isLight }),
|
|
299
|
-
showGrid && /* @__PURE__ */ jsx(CartesianGrid, { ...gridProps }),
|
|
300
|
-
/* @__PURE__ */ jsx(XAxis, { dataKey: xDataKey, ...xAxisConfig, tickFormatter: xTickFormatter }),
|
|
301
|
-
/* @__PURE__ */ jsx(
|
|
302
|
-
YAxis,
|
|
303
|
-
{
|
|
304
|
-
domain: yDomain ?? [0, (max) => Math.max(max, 1)],
|
|
305
|
-
allowDecimals: false,
|
|
306
|
-
stroke: "none",
|
|
307
|
-
tick: yTickStyle,
|
|
308
|
-
tickFormatter: yTickFormatter,
|
|
309
|
-
tickLine: false,
|
|
310
|
-
axisLine: { stroke: colors.grid, strokeWidth: 1 },
|
|
311
|
-
label: yAxisLabel ? {
|
|
312
|
-
value: yAxisLabel,
|
|
313
|
-
angle: -90,
|
|
314
|
-
position: "insideLeft",
|
|
315
|
-
offset: 0,
|
|
316
|
-
style: { fill: colors.tickText, fontSize: 11 }
|
|
317
|
-
} : void 0
|
|
318
|
-
}
|
|
319
|
-
),
|
|
320
|
-
/* @__PURE__ */ jsx(
|
|
321
|
-
Tooltip,
|
|
322
|
-
{
|
|
323
|
-
content: /* @__PURE__ */ jsx(CyberTooltipContent, { colors, labelFormatter: xTickFormatter, valueFormatter: tooltipFormatter }),
|
|
324
|
-
cursor: { stroke: colors.cyan, strokeOpacity: 0.2 }
|
|
325
|
-
}
|
|
326
|
-
),
|
|
327
|
-
allZero && (() => {
|
|
328
|
-
const bColor = colors[baselineColor ?? series[0]?.color ?? "cyan"];
|
|
329
|
-
return /* @__PURE__ */ jsx(
|
|
330
|
-
ReferenceLine,
|
|
331
|
-
{
|
|
332
|
-
y: 0,
|
|
333
|
-
stroke: bColor,
|
|
334
|
-
strokeWidth: 2,
|
|
335
|
-
style: {
|
|
336
|
-
filter: `drop-shadow(0 0 4px ${bColor}) drop-shadow(0 0 8px ${bColor})`
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
);
|
|
340
|
-
})(),
|
|
341
|
-
series.map((s) => {
|
|
342
|
-
const cm = COLOR_MAP[s.color ?? "cyan"];
|
|
343
|
-
const strokeColor = colors[cm.key];
|
|
344
|
-
return /* @__PURE__ */ jsx(
|
|
345
|
-
Area,
|
|
346
|
-
{
|
|
347
|
-
type: "monotone",
|
|
348
|
-
dataKey: s.dataKey,
|
|
349
|
-
name: s.name ?? s.dataKey,
|
|
350
|
-
stroke: strokeColor,
|
|
351
|
-
strokeWidth: lineOnly ? 3 : 2,
|
|
352
|
-
fill: lineOnly ? "transparent" : cm.gradient,
|
|
353
|
-
filter: cm.filter,
|
|
354
|
-
dot: false,
|
|
355
|
-
activeDot: /* @__PURE__ */ jsx(CyberActiveDot, { color: strokeColor, dotStroke: colors.dotStroke }),
|
|
356
|
-
animationBegin: 100,
|
|
357
|
-
animationDuration: s.animationDuration ?? 1200,
|
|
358
|
-
animationEasing: "ease-out"
|
|
359
|
-
},
|
|
360
|
-
s.dataKey
|
|
361
|
-
);
|
|
362
|
-
}),
|
|
363
|
-
series.map((s, i) => /* @__PURE__ */ jsx(
|
|
364
|
-
Area,
|
|
365
|
-
{
|
|
366
|
-
type: "monotone",
|
|
367
|
-
dataKey: s.dataKey,
|
|
368
|
-
name: `_pulse_${s.dataKey}`,
|
|
369
|
-
stroke: `url(#pulse-${i})`,
|
|
370
|
-
strokeWidth: 3,
|
|
371
|
-
fill: "none",
|
|
372
|
-
filter: "url(#pulseGlow)",
|
|
373
|
-
dot: false,
|
|
374
|
-
activeDot: false,
|
|
375
|
-
tooltipType: "none",
|
|
376
|
-
isAnimationActive: false,
|
|
377
|
-
style: { pointerEvents: "none" }
|
|
378
|
-
},
|
|
379
|
-
`pulse-${s.dataKey}`
|
|
380
|
-
))
|
|
381
|
-
] }) }) });
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export { CyberAreaChart, CyberLegendItem, getSeriesColor, useCyberColors };
|
|
1
|
+
export { ActivityTrendChart, CombinedTrendChart, CostTrendChart, CyberAreaChart, CyberDonut, CyberDonutTooltip, CyberLegendItem, HeroStatsRow, getSeriesColor, useCyberColors } from '../chunk-4KPI7YCY.js';
|
|
2
|
+
import '../chunk-YGYF6G7W.js';
|
|
3
|
+
import '../chunk-6HZAMY6T.js';
|
|
4
|
+
import '../chunk-LHQTTUL2.js';
|
|
5
|
+
import '../chunk-YZ6GTZXL.js';
|
|
6
|
+
import '../chunk-LFYO3MDC.js';
|
|
7
|
+
import '../chunk-4VGWQ5AN.js';
|
|
8
|
+
import '../chunk-2JBWPFHF.js';
|
|
9
|
+
import '../chunk-FWZJH3TL.js';
|
|
10
|
+
import '../chunk-NEK6JKPW.js';
|
|
11
|
+
import '../chunk-L2CM2CUA.js';
|
|
12
|
+
import '../chunk-KA7LO7U5.js';
|
|
13
|
+
import '../chunk-DD3CCMCZ.js';
|
|
14
|
+
import '../chunk-7PLEQFHO.js';
|
|
15
|
+
import '../chunk-Q7DJKLEN.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { isStepStartedContext, isConditionalRouteContext, isStepCompletedContext, isStepFailedContext, isLifecycleEvent, isIterationEvent, isToolCallEvent, toWorkflowLogMessage } from './chunk-YZ6GTZXL.js';
|
|
1
2
|
import { useMemo } from 'react';
|
|
2
3
|
import dagre from '@dagrejs/dagre';
|
|
3
4
|
import { IconCircleDot, IconLoader, IconAlertTriangle, IconX, IconCheck } from '@tabler/icons-react';
|
|
4
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
6
|
|
|
6
|
-
// src/execution/hooks/useMergedExecution.ts
|
|
7
7
|
function useMergedExecution(fetchedExecution, streamingLogs) {
|
|
8
8
|
return useMemo(() => {
|
|
9
9
|
if (!fetchedExecution) return void 0;
|
|
@@ -17,55 +17,6 @@ function useMergedExecution(fetchedExecution, streamingLogs) {
|
|
|
17
17
|
};
|
|
18
18
|
}, [fetchedExecution, streamingLogs]);
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
// ../core/src/execution/engine/workflow/logging.ts
|
|
22
|
-
function isStepStartedContext(ctx) {
|
|
23
|
-
return ctx.contextType === "step-started" || "stepStatus" in ctx && ctx.stepStatus === "started";
|
|
24
|
-
}
|
|
25
|
-
function isStepCompletedContext(ctx) {
|
|
26
|
-
return ctx.contextType === "step-completed" || "stepStatus" in ctx && ctx.stepStatus === "completed";
|
|
27
|
-
}
|
|
28
|
-
function isStepFailedContext(ctx) {
|
|
29
|
-
return ctx.contextType === "step-failed" || "stepStatus" in ctx && ctx.stepStatus === "failed";
|
|
30
|
-
}
|
|
31
|
-
function isConditionalRouteContext(ctx) {
|
|
32
|
-
return ctx.contextType === "conditional-route" || "target" in ctx && "stepId" in ctx && !("stepStatus" in ctx);
|
|
33
|
-
}
|
|
34
|
-
function toWorkflowLogMessage(log) {
|
|
35
|
-
if (log.context?.type === "workflow") {
|
|
36
|
-
return {
|
|
37
|
-
level: log.level,
|
|
38
|
-
message: log.message,
|
|
39
|
-
timestamp: log.timestamp,
|
|
40
|
-
context: log.context
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return {
|
|
44
|
-
level: log.level,
|
|
45
|
-
message: log.message,
|
|
46
|
-
timestamp: log.timestamp,
|
|
47
|
-
context: log.context
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// ../core/src/execution/engine/agent/observability/logging.ts
|
|
52
|
-
function isLifecycleEvent(ctx) {
|
|
53
|
-
return "stage" in ctx && ctx.stage !== void 0;
|
|
54
|
-
}
|
|
55
|
-
function isIterationEvent(ctx) {
|
|
56
|
-
return "eventType" in ctx && ctx.eventType !== void 0;
|
|
57
|
-
}
|
|
58
|
-
function isToolCallEvent(ctx) {
|
|
59
|
-
return "eventType" in ctx && ctx.eventType === "tool-call";
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// ../core/src/execution/engine/base/types.ts
|
|
63
|
-
var ResourceStatusColors = {
|
|
64
|
-
dev: "var(--color-primary)",
|
|
65
|
-
prod: "var(--color-success)"
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
// src/execution/hooks/useExecutionPath.ts
|
|
69
20
|
function useExecutionPath(executionLogs, workflowDefinition) {
|
|
70
21
|
return useMemo(() => {
|
|
71
22
|
if (!executionLogs || executionLogs.length === 0) {
|
|
@@ -867,4 +818,4 @@ function calculateBarPosition(startTime, endTime, executionStart, executionEnd)
|
|
|
867
818
|
};
|
|
868
819
|
}
|
|
869
820
|
|
|
870
|
-
export { AGENT_CONSTANTS, CONTAINER_CONSTANTS,
|
|
821
|
+
export { AGENT_CONSTANTS, CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS, STATUS_COLORS, TIMELINE_CONSTANTS, WORKFLOW_CONSTANTS, calculateBarPosition, formatDuration, getEdgeColor, getEdgeOpacity, getResourceStatusColor, getStatusColors, getStatusIcon, shouldAnimateEdge, useAgentIterationData, useExecutionPath, useMergedExecution, useReactFlowAgent, useTimelineData, useUnifiedWorkflowLayout, useWorkflowStepsLayout };
|