@elevasis/ui 1.7.3 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{CoreAuthKitInner-Y6LQYIPX.js → CoreAuthKitInner-3J4RVQO6.js} +0 -1
  2. package/dist/api/index.js +0 -1
  3. package/dist/auth/context.js +0 -1
  4. package/dist/auth/index.js +0 -1
  5. package/dist/charts/index.css +112 -0
  6. package/dist/charts/index.d.ts +217 -2
  7. package/dist/charts/index.js +15 -384
  8. package/dist/{chunk-YJFTZUJJ.js → chunk-3Q5V2T6L.js} +2 -51
  9. package/dist/chunk-4KPI7YCY.js +1590 -0
  10. package/dist/chunk-6HZAMY6T.js +96 -0
  11. package/dist/{chunk-2ISUX46O.js → chunk-F6RBK7NJ.js} +1 -6
  12. package/dist/{chunk-G4TAF3T6.js → chunk-OK3XFSJJ.js} +77 -67
  13. package/dist/{chunk-K3YVC5RW.js → chunk-Y6DNK5ZD.js} +1 -1
  14. package/dist/{chunk-54S7KNJV.js → chunk-Y7UY3HI4.js} +1 -1
  15. package/dist/chunk-YZ6GTZXL.js +48 -0
  16. package/dist/components/index.d.ts +10 -4
  17. package/dist/components/index.js +107 -720
  18. package/dist/components/navigation/index.js +0 -1
  19. package/dist/execution/index.js +2 -2
  20. package/dist/graph/index.js +1 -2
  21. package/dist/hooks/index.d.ts +54 -2
  22. package/dist/hooks/index.js +2 -2
  23. package/dist/hooks/published.d.ts +54 -2
  24. package/dist/hooks/published.js +3 -3
  25. package/dist/index.d.ts +54 -2
  26. package/dist/index.js +7 -6
  27. package/dist/initialization/index.js +0 -1
  28. package/dist/layout/index.js +0 -1
  29. package/dist/organization/index.js +0 -1
  30. package/dist/profile/index.js +0 -1
  31. package/dist/provider/index.js +2 -3
  32. package/dist/provider/published.js +1 -2
  33. package/dist/router/context.js +0 -1
  34. package/dist/router/index.js +0 -1
  35. package/dist/sse/index.js +1 -1
  36. package/dist/supabase/index.js +0 -1
  37. package/dist/theme/index.js +0 -1
  38. package/dist/typeform/index.js +0 -1
  39. package/dist/typeform/schemas.js +0 -1
  40. package/dist/utils/index.js +0 -1
  41. package/package.json +3 -7
  42. package/dist/chunk-MLKGABMK.js +0 -7
@@ -1,31 +1,31 @@
1
+ import { useCyberColors, EmptyState, CyberLegendItem, CyberAreaChart, ContextViewer, JsonViewer, StyledMarkdown } from '../chunk-4KPI7YCY.js';
2
+ export { APIErrorAlert, CardHeader, CollapsibleSection, ContextViewer, CustomSelector, DetailCardSkeleton, EmptyState, JsonViewer, ListSkeleton, PageNotFound, PageTitleCaption, ResourceCard, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TabCountBadge, TimeRangeSelector, TrendIndicator, catalogItemToResourceDefinition } from '../chunk-4KPI7YCY.js';
1
3
  export { ElevasisLoader, NavigationButton } from '../chunk-YGYF6G7W.js';
2
4
  import '../chunk-TYV5NJV2.js';
3
- import { useMarkAsRead, useMarkAllAsRead, useNotificationCount, useNotifications, useSubmitAction, useDeleteTask } from '../chunk-G4TAF3T6.js';
5
+ import { useResourcesHealth, useMarkAsRead, useMarkAllAsRead, useNotificationCount, useNotifications, useSubmitAction, useDeleteTask } from '../chunk-OK3XFSJJ.js';
6
+ import { getTimeRangeDates, formatBucketTime } from '../chunk-6HZAMY6T.js';
4
7
  import '../chunk-JGJSZ3UE.js';
5
8
  import '../chunk-LHQTTUL2.js';
6
- import { Graph_module_css_default, Graph_module_css_exports, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger, useGraphHighlighting, calculateGraphHeight, GRAPH_CONSTANTS } from '../chunk-2ISUX46O.js';
7
- export { Graph_module_css_exports as graphStyles } from '../chunk-2ISUX46O.js';
8
- import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, ResourceStatusColors, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from '../chunk-YJFTZUJJ.js';
9
- export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-YJFTZUJJ.js';
9
+ import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger, useGraphHighlighting, calculateGraphHeight, GRAPH_CONSTANTS } from '../chunk-F6RBK7NJ.js';
10
+ export { Graph_module_css_default as graphStyles } from '../chunk-F6RBK7NJ.js';
11
+ import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from '../chunk-3Q5V2T6L.js';
12
+ export { CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS } from '../chunk-3Q5V2T6L.js';
13
+ import '../chunk-YZ6GTZXL.js';
10
14
  import '../chunk-TIRMFDM4.js';
11
- import { getResourceIcon } from '../chunk-LFYO3MDC.js';
12
- import { getErrorInfo, getErrorTitle, formatErrorMessage } from '../chunk-4VGWQ5AN.js';
15
+ import '../chunk-LFYO3MDC.js';
16
+ import { getErrorInfo, formatErrorMessage, getErrorTitle } from '../chunk-4VGWQ5AN.js';
13
17
  import '../chunk-2JBWPFHF.js';
14
18
  import '../chunk-FWZJH3TL.js';
15
19
  import '../chunk-NEK6JKPW.js';
16
20
  import '../chunk-L2CM2CUA.js';
17
21
  import '../chunk-KA7LO7U5.js';
18
22
  import '../chunk-DD3CCMCZ.js';
19
- import { useAuthContext } from '../chunk-7PLEQFHO.js';
20
- import { useRouterContext } from '../chunk-Q7DJKLEN.js';
21
- import '../chunk-MLKGABMK.js';
22
- import { Paper, Stack, Text, Group, Badge, Box, useComputedColorScheme, Center, Title, Button, Loader, Collapse, ScrollArea, Card, Skeleton, Select, Alert, Code, ThemeIcon, Grid, Modal, Space, TextInput, Table, Textarea, Radio, Checkbox, NumberInput, Tooltip, UnstyledButton, Divider, Popover, Indicator, ActionIcon, SegmentedControl, Menu, Accordion, SimpleGrid } from '@mantine/core';
23
+ import '../chunk-7PLEQFHO.js';
24
+ import '../chunk-Q7DJKLEN.js';
25
+ import { Paper, Stack, Text, Group, Badge, Box, useComputedColorScheme, Modal, Center, Space, Button, Title, TextInput, Table, Textarea, Radio, Checkbox, Select, NumberInput, Tooltip, Card, Loader, UnstyledButton, Divider, ScrollArea, Popover, Indicator, ActionIcon, SegmentedControl, Alert, ThemeIcon, Menu, Accordion, Collapse, SimpleGrid } from '@mantine/core';
23
26
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
24
- import { IconPlayerPlay, IconPlayerStop, IconArrowsSplit, IconSquare, IconBrain, IconFileText, IconMail, IconSend, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconMinus, IconTrendingUp, IconTrendingDown, IconChevronUp, IconChevronDown, IconAlertCircle, IconInfoCircle, IconChevronRight, IconSelector, IconTrash, IconCircle, IconCircleFilled, IconBell, IconFocus2, IconRobot, IconGitBranch, IconDotsVertical, IconExternalLink, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconNetwork, IconSitemap, IconFileOff, IconCircleX, IconCircleCheck } from '@tabler/icons-react';
25
- import { memo, useMemo, useState, cloneElement, useEffect, useCallback, Fragment as Fragment$1 } from 'react';
26
- import Markdown from 'react-markdown';
27
- import { Prism } from 'react-syntax-highlighter';
28
- import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
27
+ import { memo, useMemo, cloneElement, useEffect, useState, useCallback, Fragment as Fragment$1 } from 'react';
28
+ import { IconPlayerPlay, IconPlayerStop, IconArrowsSplit, IconSquare, IconBrain, IconFileText, IconMail, IconSend, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconChevronUp, IconChevronDown, IconSelector, IconTrash, IconChartBar, IconCircle, IconCircleFilled, IconBell, IconFocus2, IconAlertCircle, IconRobot, IconGitBranch, IconDotsVertical, IconExternalLink, IconChevronRight, IconTool, IconSettings, IconCpu, IconClockHour4, IconVersions, IconNetwork, IconSitemap, IconFileOff, IconCircleX, IconCircleCheck } from '@tabler/icons-react';
29
29
  import { AreaChart } from '@mantine/charts';
30
30
  import { useDisclosure } from '@mantine/hooks';
31
31
  import { formatDistanceToNow } from 'date-fns';
@@ -35,677 +35,6 @@ import { useForm } from '@mantine/form';
35
35
  import dagre from '@dagrejs/dagre';
36
36
  import { notifications } from '@mantine/notifications';
37
37
 
38
- function EmptyState({ icon: Icon, title, description, action, py = "xl" }) {
39
- return /* @__PURE__ */ jsx(Center, { py, children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "xs", children: [
40
- /* @__PURE__ */ jsx(Icon, { size: 48, style: { opacity: 0.5 } }),
41
- /* @__PURE__ */ jsx(Title, { order: 4, children: title }),
42
- description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", ta: "center", children: description }),
43
- action && /* @__PURE__ */ jsx(Button, { variant: "light", onClick: action.onClick, leftSection: action.icon, mt: "sm", children: action.label })
44
- ] }) });
45
- }
46
- function TabCountBadge({ count, isLoading }) {
47
- return /* @__PURE__ */ jsx(Box, { miw: 20, h: 20, style: { display: "flex", alignItems: "center", justifyContent: "center" }, children: isLoading ? /* @__PURE__ */ jsx(Loader, { size: 12 }) : /* @__PURE__ */ jsx(Badge, { size: "sm", variant: "light", circle: count < 10, children: count }) });
48
- }
49
- function TrendIndicator({ current, previous, inverse }) {
50
- const change = previous === 0 ? 0 : (current - previous) / previous * 100;
51
- const isPositive = inverse ? change < 0 : change > 0;
52
- const isFlat = Math.abs(change) < 0.1;
53
- const color = isFlat ? "gray" : isPositive ? "green" : "red";
54
- const Icon = isFlat ? IconMinus : change > 0 ? IconTrendingUp : IconTrendingDown;
55
- return /* @__PURE__ */ jsxs(Group, { gap: 4, children: [
56
- /* @__PURE__ */ jsx(Icon, { size: 12 }),
57
- /* @__PURE__ */ jsx(Badge, { size: "sm", color, variant: "light", children: isFlat ? "No change" : `${isPositive ? "+" : ""}${Math.abs(change).toFixed(1)}%` })
58
- ] });
59
- }
60
- function CollapsibleSection({
61
- title,
62
- count,
63
- countLabel,
64
- children,
65
- emptyMessage,
66
- defaultExpanded = true,
67
- maxHeight = 300
68
- }) {
69
- const [expanded, setExpanded] = useState(defaultExpanded);
70
- const isEmpty = count === 0;
71
- return /* @__PURE__ */ jsxs(
72
- "div",
73
- {
74
- style: {
75
- borderRadius: "8px",
76
- padding: "8px",
77
- border: "1px solid var(--color-border)",
78
- boxShadow: "var(--standard-box-shadow)"
79
- },
80
- children: [
81
- /* @__PURE__ */ jsxs(
82
- Group,
83
- {
84
- gap: "xs",
85
- mb: expanded ? "xs" : 0,
86
- justify: "space-between",
87
- align: "center",
88
- style: { cursor: "pointer" },
89
- onClick: () => setExpanded(!expanded),
90
- children: [
91
- /* @__PURE__ */ jsxs(Group, { gap: "xs", align: "center", style: { flex: 1 }, children: [
92
- typeof title === "string" ? /* @__PURE__ */ jsx(
93
- Text,
94
- {
95
- fw: 600,
96
- size: "sm",
97
- c: "var(--color-text)",
98
- style: { fontFamily: "var(--elevasis-font-family-subtitle)" },
99
- children: title
100
- }
101
- ) : title,
102
- count !== void 0 && countLabel && /* @__PURE__ */ jsxs(Badge, { size: "sm", variant: "light", color: "gray", children: [
103
- count,
104
- " ",
105
- count === 1 ? countLabel.replace(/s$/, "") : countLabel
106
- ] })
107
- ] }),
108
- expanded ? /* @__PURE__ */ jsx(IconChevronUp, { size: 16 }) : /* @__PURE__ */ jsx(IconChevronDown, { size: 16 })
109
- ]
110
- }
111
- ),
112
- /* @__PURE__ */ jsx(Collapse, { in: expanded, children: isEmpty && emptyMessage ? /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: emptyMessage }) : /* @__PURE__ */ jsx(ScrollArea, { h: maxHeight, type: "scroll", offsetScrollbars: true, children }) })
113
- ]
114
- }
115
- );
116
- }
117
- var PageTitleCaption = ({ title, caption, rightSection }) => {
118
- const renderCaption = () => {
119
- if (!caption) return null;
120
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Text, { c: "dimmed", style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, children: caption }) });
121
- };
122
- const titleContent = /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
123
- /* @__PURE__ */ jsx(Title, { order: 1, children: title }),
124
- /* @__PURE__ */ jsx(Space, { h: "4" }),
125
- renderCaption()
126
- ] });
127
- if (!rightSection) {
128
- return titleContent;
129
- }
130
- return /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "end", children: [
131
- titleContent,
132
- rightSection
133
- ] });
134
- };
135
- function StatsCardSkeleton({ chartHeight = 120, withChart = true, statCount = 3 }) {
136
- return /* @__PURE__ */ jsxs(Card, { withBorder: true, children: [
137
- /* @__PURE__ */ jsx(Skeleton, { height: 24, width: 150, mb: "md" }),
138
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb: "xl", children: [
139
- /* @__PURE__ */ jsx(Skeleton, { height: 60, width: 100 }),
140
- statCount >= 2 && /* @__PURE__ */ jsx(Skeleton, { height: 60, width: 100 }),
141
- /* @__PURE__ */ jsx(Skeleton, { height: 40, circle: true })
142
- ] }),
143
- withChart && /* @__PURE__ */ jsx(Skeleton, { height: chartHeight })
144
- ] });
145
- }
146
- function ListSkeleton({ rows = 3, rowHeight = 50 }) {
147
- return /* @__PURE__ */ jsx(Stack, { gap: "xs", children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx(Skeleton, { height: rowHeight }, i)) });
148
- }
149
- function DetailCardSkeleton({ rows = 3 }) {
150
- return /* @__PURE__ */ jsxs(Card, { withBorder: true, children: [
151
- /* @__PURE__ */ jsx(Skeleton, { height: 24, width: 150, mb: "md" }),
152
- /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb: "lg", children: [
153
- /* @__PURE__ */ jsx(Skeleton, { height: 80, width: 100 }),
154
- /* @__PURE__ */ jsx(Skeleton, { height: 80, width: 100 }),
155
- /* @__PURE__ */ jsx(Skeleton, { height: 40, circle: true })
156
- ] }),
157
- /* @__PURE__ */ jsx(Stack, { gap: "xs", children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx(Skeleton, { height: 60 }, i)) })
158
- ] });
159
- }
160
- function CustomSelector({
161
- value,
162
- onChange,
163
- data,
164
- leftSection,
165
- placeholder,
166
- w,
167
- withCheckIcon = false,
168
- disabled
169
- }) {
170
- return /* @__PURE__ */ jsx(
171
- Select,
172
- {
173
- value,
174
- onChange,
175
- data,
176
- leftSection,
177
- placeholder,
178
- w,
179
- size: "xs",
180
- variant: "unstyled",
181
- withCheckIcon,
182
- disabled,
183
- styles: {
184
- wrapper: {
185
- border: "1px solid var(--color-border)",
186
- borderRadius: "var(--mantine-radius-default)",
187
- backgroundColor: "var(--color-surface)",
188
- transition: "border-color 150ms ease, background-color 150ms ease",
189
- "&:hover": {
190
- borderColor: "var(--color-border-hover, var(--mantine-color-dark-3))"
191
- }
192
- },
193
- input: {
194
- fontSize: "var(--mantine-font-size-xs)",
195
- fontWeight: 500,
196
- height: "30px",
197
- minHeight: "30px",
198
- paddingLeft: leftSection ? "30px" : void 0,
199
- borderRadius: "var(--mantine-radius-default)",
200
- cursor: "pointer"
201
- },
202
- section: {
203
- color: "var(--color-text-subtle)"
204
- },
205
- dropdown: {
206
- border: "1px solid var(--color-border)",
207
- backgroundColor: "var(--color-surface)",
208
- boxShadow: "var(--card-shadow)"
209
- },
210
- option: {
211
- fontSize: "var(--mantine-font-size-xs)"
212
- }
213
- }
214
- }
215
- );
216
- }
217
- function APIErrorAlert({
218
- error,
219
- title,
220
- showRequestId = true,
221
- icon = /* @__PURE__ */ jsx(IconAlertCircle, {}),
222
- color = "red"
223
- }) {
224
- const { message, code, requestId, retryAfter } = getErrorInfo(error);
225
- const alertTitle = title || getErrorTitle(code);
226
- return /* @__PURE__ */ jsxs(Alert, { icon, title: alertTitle, color, variant: "light", children: [
227
- /* @__PURE__ */ jsx(Text, { size: "sm", children: message }),
228
- retryAfter && /* @__PURE__ */ jsxs(Text, { size: "sm", mt: "xs", children: [
229
- "Please wait ",
230
- retryAfter,
231
- " seconds before retrying."
232
- ] }),
233
- showRequestId && requestId && /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", mt: "xs", children: [
234
- "Request ID: ",
235
- /* @__PURE__ */ jsx(Code, { children: requestId })
236
- ] })
237
- ] });
238
- }
239
-
240
- // src/components/display/StatCard.module.css.js
241
- var StatCard_module_css_default = { "heroCard": "heroCard", "iconRing": "iconRing", "iconRingSm": "iconRingSm", "heroValue": "heroValue", "heroValueSm": "heroValueSm", "heroLabel": "heroLabel", "heroLabelSm": "heroLabelSm" };
242
- function StatCard(props) {
243
- if (props.variant === "hero") {
244
- return /* @__PURE__ */ jsx(HeroStatCard, { ...props });
245
- }
246
- const { label, value, icon: IconComponent, color } = props;
247
- return /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
248
- /* @__PURE__ */ jsx(ThemeIcon, { size: "lg", variant: "light", color, children: /* @__PURE__ */ jsx(IconComponent, { size: 18 }) }),
249
- /* @__PURE__ */ jsxs("div", { children: [
250
- /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: label }),
251
- /* @__PURE__ */ jsx(Text, { size: "lg", fw: 600, style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, children: value })
252
- ] })
253
- ] }) });
254
- }
255
- function HeroStatCard({
256
- icon: IconComponent,
257
- value,
258
- label,
259
- valueColor,
260
- isLoading,
261
- size = "sm",
262
- children
263
- }) {
264
- const sm = size === "sm";
265
- const iconSize = sm ? 36 : 46;
266
- if (isLoading) {
267
- return /* @__PURE__ */ jsx(Paper, { p: sm ? "md" : "lg", className: StatCard_module_css_default.heroCard, children: /* @__PURE__ */ jsxs(Group, { gap: sm ? "sm" : "md", wrap: "nowrap", children: [
268
- /* @__PURE__ */ jsx(Skeleton, { circle: true, height: iconSize }),
269
- /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
270
- /* @__PURE__ */ jsx(Skeleton, { height: sm ? 24 : 32, width: 60 }),
271
- /* @__PURE__ */ jsx(Skeleton, { height: 12, width: 80 })
272
- ] })
273
- ] }) });
274
- }
275
- return /* @__PURE__ */ jsx(Paper, { p: sm ? "md" : "lg", className: StatCard_module_css_default.heroCard, children: /* @__PURE__ */ jsxs(Group, { gap: sm ? "sm" : "md", wrap: "nowrap", children: [
276
- /* @__PURE__ */ jsx("div", { className: sm ? StatCard_module_css_default.iconRingSm : StatCard_module_css_default.iconRing, children: /* @__PURE__ */ jsx(IconComponent, { size: sm ? 18 : 22 }) }),
277
- /* @__PURE__ */ jsxs(Stack, { gap: 2, style: { flex: children ? 1 : void 0 }, children: [
278
- /* @__PURE__ */ jsx(
279
- "span",
280
- {
281
- className: sm ? StatCard_module_css_default.heroValueSm : StatCard_module_css_default.heroValue,
282
- style: valueColor ? { color: valueColor } : void 0,
283
- children: value
284
- }
285
- ),
286
- children ? /* @__PURE__ */ jsxs(Group, { gap: "sm", wrap: "nowrap", style: { flex: 1 }, children: [
287
- /* @__PURE__ */ jsx("span", { className: sm ? StatCard_module_css_default.heroLabelSm : StatCard_module_css_default.heroLabel, children: label }),
288
- /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children })
289
- ] }) : /* @__PURE__ */ jsx("span", { className: sm ? StatCard_module_css_default.heroLabelSm : StatCard_module_css_default.heroLabel, children: label })
290
- ] })
291
- ] }) });
292
- }
293
- function StatCardSkeleton() {
294
- return /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsx(Skeleton, { height: 60 }) });
295
- }
296
- var customCodeTheme = Object.fromEntries(
297
- Object.entries(oneDark).map(([key, value]) => [
298
- key,
299
- typeof value === "object" && value !== null ? { ...value, background: "none", backgroundColor: "none" } : value
300
- ])
301
- );
302
- var defaultComponents = {
303
- h1: ({ children }) => /* @__PURE__ */ jsx(Title, { order: 3, c: "var(--color-primary)", mb: "xs", mt: "md", children }),
304
- h2: ({ children }) => /* @__PURE__ */ jsx(Title, { order: 4, c: "var(--color-primary)", mb: "xs", mt: "sm", children }),
305
- ul: ({ children }) => /* @__PURE__ */ jsx("ul", { style: { margin: "0.5rem 0", paddingLeft: "1.5rem" }, children }),
306
- ol: ({ children }) => /* @__PURE__ */ jsx("ol", { style: { margin: "0.5rem 0", paddingLeft: "1.5rem" }, children }),
307
- li: ({ children }) => /* @__PURE__ */ jsx("li", { style: { marginBottom: "0.25rem", fontSize: "var(--mantine-font-size-sm)" }, children }),
308
- code: ({ className, children, ...props }) => {
309
- const match = /language-(\w+)/.exec(className || "");
310
- const codeString = String(children).replace(/\n$/, "");
311
- if (match) {
312
- return /* @__PURE__ */ jsx(
313
- Prism,
314
- {
315
- style: customCodeTheme,
316
- language: match[1],
317
- PreTag: "div",
318
- customStyle: {
319
- margin: "0.5rem 0",
320
- borderRadius: "var(--mantine-radius-default)",
321
- fontSize: "0.8rem"
322
- },
323
- children: codeString
324
- }
325
- );
326
- }
327
- return /* @__PURE__ */ jsx(Code, { ...props, children });
328
- },
329
- pre: ({ children }) => /* @__PURE__ */ jsx(Fragment, { children }),
330
- blockquote: ({ children }) => /* @__PURE__ */ jsx(Box, { pl: "sm", my: "xs", style: { borderLeft: "2px solid var(--color-border)" }, children }),
331
- p: ({ children }) => /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, children }),
332
- strong: ({ children }) => /* @__PURE__ */ jsx(Text, { component: "span", fw: 700, children }),
333
- em: ({ children }) => /* @__PURE__ */ jsx(Text, { component: "span", fs: "italic", children })
334
- };
335
- function StyledMarkdown({ children, components, className, style }) {
336
- const mergedComponents = components ? { ...defaultComponents, ...components } : defaultComponents;
337
- return /* @__PURE__ */ jsx("div", { className, style, children: /* @__PURE__ */ jsx(Markdown, { components: mergedComponents, children }) });
338
- }
339
- var jsonTheme = Object.fromEntries(
340
- Object.entries(oneDark).map(([key, value]) => [
341
- key,
342
- typeof value === "object" && value !== null ? { ...value, background: "none", backgroundColor: "none" } : value
343
- ])
344
- );
345
- function JsonViewer({ data, maxHeight, fontSize = "0.8rem" }) {
346
- const jsonString = typeof data === "string" ? data : JSON.stringify(data, null, 2);
347
- return /* @__PURE__ */ jsx(
348
- Prism,
349
- {
350
- language: "json",
351
- style: jsonTheme,
352
- customStyle: {
353
- margin: 0,
354
- fontSize,
355
- maxHeight,
356
- overflow: maxHeight ? "auto" : void 0,
357
- overflowX: "auto"
358
- },
359
- children: jsonString
360
- }
361
- );
362
- }
363
- var subtleMarkdownComponents = {
364
- p: ({ children }) => /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, c: "var(--color-text-subtle)", style: { whiteSpace: "pre-wrap" }, children })
365
- };
366
- var subtleMarkdownWrapperStyle = {
367
- display: "flex",
368
- flexDirection: "column",
369
- gap: 8
370
- };
371
- function ContextViewer({ data }) {
372
- return /* @__PURE__ */ jsx(ContextNode, { data, depth: 0 });
373
- }
374
- function ContextNode({ data, depth }) {
375
- if (data === null || data === void 0) {
376
- return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "No context provided" });
377
- }
378
- if (typeof data === "string") {
379
- return /* @__PURE__ */ jsx(StyledMarkdown, { components: subtleMarkdownComponents, style: subtleMarkdownWrapperStyle, children: data });
380
- }
381
- if (typeof data === "number" || typeof data === "boolean") {
382
- return /* @__PURE__ */ jsx(Text, { size: "sm", children: String(data) });
383
- }
384
- if (Array.isArray(data)) {
385
- return /* @__PURE__ */ jsx(ArrayView, { items: data, depth });
386
- }
387
- if (typeof data === "object") {
388
- return /* @__PURE__ */ jsx(ObjectView, { data, depth });
389
- }
390
- return /* @__PURE__ */ jsx(Text, { size: "sm", children: String(data) });
391
- }
392
- function formatLabel(key) {
393
- return key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
394
- }
395
- function hasMarkdown(value) {
396
- return /(\*\*.+\*\*|^#{1,6}\s|^\s*[-*]\s|\[.+\]\(.+\)|^\|.+\|$|^>\s|```)/.test(value);
397
- }
398
- function NestedSection({ title, children }) {
399
- const [expanded, setExpanded] = useState(true);
400
- return /* @__PURE__ */ jsxs(Stack, { gap: 6, children: [
401
- /* @__PURE__ */ jsxs(Group, { gap: 4, style: { cursor: "pointer", userSelect: "none" }, onClick: () => setExpanded((v) => !v), children: [
402
- /* @__PURE__ */ jsx(
403
- IconChevronRight,
404
- {
405
- size: 14,
406
- color: "var(--color-primary)",
407
- style: {
408
- transition: "transform 150ms ease",
409
- transform: expanded ? "rotate(90deg)" : "rotate(0deg)",
410
- flexShrink: 0
411
- }
412
- }
413
- ),
414
- /* @__PURE__ */ jsx(Text, { size: "sm", fw: 600, style: { fontFamily: "var(--mantine-font-family-headings)" }, children: title })
415
- ] }),
416
- expanded && /* @__PURE__ */ jsx(Box, { pl: "sm", style: { borderLeft: "2px solid var(--color-border)" }, children })
417
- ] });
418
- }
419
- function PrimitiveValue({ value }) {
420
- if (value === null || value === void 0) {
421
- return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "\u2014" });
422
- }
423
- if (typeof value === "boolean") {
424
- return /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, children: value ? "Yes" : "No" });
425
- }
426
- if (typeof value === "number") {
427
- return /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, children: value.toLocaleString() });
428
- }
429
- const str = String(value);
430
- if (hasMarkdown(str)) {
431
- return /* @__PURE__ */ jsx(StyledMarkdown, { components: subtleMarkdownComponents, children: str });
432
- }
433
- return /* @__PURE__ */ jsx(Text, { size: "sm", m: 0, c: "var(--color-text-subtle)", style: { whiteSpace: "pre-wrap" }, children: str });
434
- }
435
- function ArrayView({ items, depth }) {
436
- if (items.length === 0) {
437
- return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "Empty list" });
438
- }
439
- const allPrimitive = items.every((item) => typeof item !== "object" || item === null);
440
- if (allPrimitive) {
441
- return /* @__PURE__ */ jsx(Stack, { gap: 2, children: items.map((item, i) => /* @__PURE__ */ jsxs(Group, { gap: "xs", align: "flex-start", children: [
442
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { userSelect: "none" }, children: "\u2022" }),
443
- /* @__PURE__ */ jsx(PrimitiveValue, { value: item })
444
- ] }, i)) });
445
- }
446
- return /* @__PURE__ */ jsx(Stack, { gap: "sm", children: items.map((item, i) => /* @__PURE__ */ jsx(Paper, { p: "sm", style: { border: "1px solid var(--color-border)" }, children: /* @__PURE__ */ jsx(ContextNode, { data: item, depth: depth + 1 }) }, i)) });
447
- }
448
- function ObjectView({ data, depth }) {
449
- const entries = Object.entries(data);
450
- if (entries.length === 0) {
451
- return /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: "Empty" });
452
- }
453
- const simpleEntries = [];
454
- const complexEntries = [];
455
- for (const [key, value] of entries) {
456
- if (value === null || value === void 0 || typeof value === "boolean" || typeof value === "number") {
457
- simpleEntries.push([key, value]);
458
- } else if (typeof value === "string") {
459
- if (hasMarkdown(value) || value.length > 120) {
460
- complexEntries.push([key, value]);
461
- } else {
462
- simpleEntries.push([key, value]);
463
- }
464
- } else {
465
- complexEntries.push([key, value]);
466
- }
467
- }
468
- return /* @__PURE__ */ jsxs(Stack, { gap: 10, children: [
469
- simpleEntries.length > 0 && /* @__PURE__ */ jsx(Stack, { gap: 6, children: simpleEntries.map(([key, value]) => /* @__PURE__ */ jsxs(Group, { gap: "sm", align: "flex-start", wrap: "nowrap", children: [
470
- /* @__PURE__ */ jsx(
471
- Text,
472
- {
473
- size: "sm",
474
- style: { minWidth: 140, flexShrink: 0, fontFamily: "var(--mantine-font-family-headings)" },
475
- children: formatLabel(key)
476
- }
477
- ),
478
- /* @__PURE__ */ jsx(PrimitiveValue, { value })
479
- ] }, key)) }),
480
- complexEntries.map(([key, value]) => /* @__PURE__ */ jsx(NestedSection, { title: formatLabel(key), children: /* @__PURE__ */ jsx(ContextNode, { data: value, depth: depth + 1 }) }, key))
481
- ] });
482
- }
483
- var TIME_RANGE_OPTIONS = [
484
- { value: "1h", label: "Last 1 hour" },
485
- { value: "24h", label: "Last 24 hours" },
486
- { value: "7d", label: "Last 7 days" },
487
- { value: "30d", label: "Last 30 days" }
488
- ];
489
- function TimeRangeSelector({ value, onChange, width = 180 }) {
490
- return /* @__PURE__ */ jsx(
491
- CustomSelector,
492
- {
493
- value,
494
- onChange: (newValue) => newValue && onChange(newValue),
495
- data: TIME_RANGE_OPTIONS,
496
- leftSection: /* @__PURE__ */ jsx(IconClock, { size: 16, color: "var(--color-text-subtle)" }),
497
- w: width,
498
- withCheckIcon: true
499
- }
500
- );
501
- }
502
- function PageNotFound() {
503
- const { currentPath, navigate } = useRouterContext();
504
- const { user, isLoading } = useAuthContext();
505
- const isAuthPage = currentPath === "/login" || currentPath === "/auth-redirect";
506
- const shouldShowSidebar = user && !isLoading && !isAuthPage;
507
- const height = shouldShowSidebar ? "100%" : "100vh";
508
- return /* @__PURE__ */ jsx(Center, { h: height, bg: "var(--color-background)", children: /* @__PURE__ */ jsxs(Stack, { align: "center", justify: "center", children: [
509
- /* @__PURE__ */ jsx(IconInfoCircle, { size: 60, color: "var(--color-text-subtle)" }),
510
- /* @__PURE__ */ jsx(Title, { order: 1, children: "Page Not Found" }),
511
- /* @__PURE__ */ jsx(Text, { c: "dimmed", size: "lg", children: "The page you are looking for does not exist." }),
512
- /* @__PURE__ */ jsx(Group, { justify: "center", children: /* @__PURE__ */ jsx(Button, { size: "md", onClick: () => navigate("/"), children: "Go Home" }) })
513
- ] }) });
514
- }
515
- function ResourceCard({
516
- resource,
517
- onClick,
518
- layout = "stack",
519
- rightSection,
520
- topSection,
521
- lastRunLabel,
522
- style,
523
- ...rest
524
- }) {
525
- const Icon = getResourceIcon(resource.type);
526
- if (!Icon) {
527
- return /* @__PURE__ */ jsx(Card, { shadow: "sm", withBorder: true, children: /* @__PURE__ */ jsxs(Text, { children: [
528
- "Invalid resource type: ",
529
- resource.type
530
- ] }) });
531
- }
532
- const cardStyle = {
533
- cursor: "pointer",
534
- ...layout === "grid" || layout === "card" ? { transition: "box-shadow var(--duration-fast) var(--easing)" } : {},
535
- ...style
536
- };
537
- const iconSize = layout === "grid" ? 28 : 20;
538
- const details = /* @__PURE__ */ jsxs(Group, { gap: "sm", wrap: "nowrap", children: [
539
- /* @__PURE__ */ jsx(Icon, { size: iconSize, color: "var(--color-primary)" }),
540
- /* @__PURE__ */ jsxs(Stack, { gap: 4, style: { flex: 1, minWidth: 0 }, children: [
541
- /* @__PURE__ */ jsxs(Group, { gap: "xs", align: "center", children: [
542
- /* @__PURE__ */ jsx(
543
- Text,
544
- {
545
- fw: 600,
546
- size: "sm",
547
- style: { fontFamily: "var(--elevasis-font-family-subtitle)" },
548
- ...layout === "stack" ? { lineClamp: 1 } : { truncate: true },
549
- children: resource.name
550
- }
551
- ),
552
- /* @__PURE__ */ jsx(Badge, { variant: "light", size: layout === "grid" ? "xs" : "sm", children: resource.type })
553
- ] }),
554
- resource.description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", ...layout === "stack" ? { lineClamp: 1 } : { truncate: true }, children: resource.description }),
555
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
556
- resource.version && /* @__PURE__ */ jsxs(Badge, { variant: "outline", size: "xs", children: [
557
- "v",
558
- resource.version
559
- ] }),
560
- /* @__PURE__ */ jsx(Badge, { color: ResourceStatusColors[resource.status], variant: "outline", size: layout === "grid" ? "xs" : "sm", children: resource.status.toUpperCase() })
561
- ] }),
562
- lastRunLabel && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: lastRunLabel }),
563
- /* @__PURE__ */ jsx(Text, { size: layout === "grid" ? "sm" : "xs", c: "dimmed", ff: "monospace", children: resource.resourceId })
564
- ] })
565
- ] });
566
- if (layout === "card") {
567
- return /* @__PURE__ */ jsx(
568
- Card,
569
- {
570
- withBorder: true,
571
- padding: 0,
572
- style: cardStyle,
573
- onClick: () => onClick(resource),
574
- "data-resource-id": rest["data-resource-id"],
575
- children: /* @__PURE__ */ jsxs(Stack, { gap: 8, p: "sm", pb: "xs", children: [
576
- /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", justify: "space-between", children: [
577
- /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", style: { minWidth: 0 }, children: [
578
- /* @__PURE__ */ jsx(Icon, { size: 20, color: "var(--color-primary)", style: { flexShrink: 0 } }),
579
- /* @__PURE__ */ jsx(Text, { fw: 600, size: "md", style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, truncate: true, children: resource.name })
580
- ] }),
581
- /* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", style: { flexShrink: 0 }, children: [
582
- resource.version && /* @__PURE__ */ jsxs(Badge, { variant: "light", size: "sm", children: [
583
- "v",
584
- resource.version
585
- ] }),
586
- /* @__PURE__ */ jsx(Badge, { color: ResourceStatusColors[resource.status], variant: "light", size: "sm", children: resource.status.toUpperCase() })
587
- ] })
588
- ] }),
589
- resource.description && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", truncate: true, children: resource.description }),
590
- /* @__PURE__ */ jsxs(Group, { gap: "xs", justify: "space-between", wrap: "nowrap", children: [
591
- rightSection || /* @__PURE__ */ jsx("span", {}),
592
- lastRunLabel && /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap" }, children: lastRunLabel })
593
- ] }),
594
- topSection
595
- ] })
596
- }
597
- );
598
- }
599
- if (layout === "row") {
600
- const [hovered, setHovered] = useState(false);
601
- return /* @__PURE__ */ jsx(
602
- Card,
603
- {
604
- padding: 0,
605
- style: {
606
- cursor: "pointer",
607
- border: "1px solid var(--color-border)",
608
- transition: "background 150ms ease",
609
- background: hovered ? "var(--active-background)" : "var(--glass-background)",
610
- ...style
611
- },
612
- onClick: () => onClick(resource),
613
- onMouseEnter: () => setHovered(true),
614
- onMouseLeave: () => setHovered(false),
615
- "data-resource-id": rest["data-resource-id"],
616
- children: /* @__PURE__ */ jsxs(
617
- "div",
618
- {
619
- style: {
620
- display: "grid",
621
- gridTemplateColumns: "18px 200px 120px 1fr 180px 140px 14px",
622
- alignItems: "center",
623
- gap: "var(--mantine-spacing-sm)"
624
- },
625
- children: [
626
- /* @__PURE__ */ jsx(Icon, { size: 18, color: "var(--color-primary)" }),
627
- /* @__PURE__ */ jsx(Text, { fw: 600, size: "md", truncate: true, style: { fontFamily: "var(--elevasis-font-family-subtitle)" }, children: resource.name }),
628
- /* @__PURE__ */ jsxs(Group, { gap: 6, wrap: "nowrap", children: [
629
- resource.version && /* @__PURE__ */ jsxs(Badge, { variant: "light", size: "sm", children: [
630
- "v",
631
- resource.version
632
- ] }),
633
- /* @__PURE__ */ jsx(Badge, { color: ResourceStatusColors[resource.status], variant: "light", size: "sm", children: resource.status.toUpperCase() })
634
- ] }),
635
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", truncate: true, style: { minWidth: 0 }, children: resource.description || "" }),
636
- /* @__PURE__ */ jsx("div", { style: { whiteSpace: "nowrap" }, children: rightSection }),
637
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", style: { whiteSpace: "nowrap", textAlign: "right" }, children: lastRunLabel || "" }),
638
- /* @__PURE__ */ jsx(
639
- IconChevronRight,
640
- {
641
- size: 14,
642
- style: {
643
- opacity: hovered ? 0.7 : 0,
644
- transition: "opacity 150ms ease"
645
- }
646
- }
647
- )
648
- ]
649
- }
650
- )
651
- }
652
- );
653
- }
654
- if (layout === "grid") {
655
- return /* @__PURE__ */ jsx(
656
- Card,
657
- {
658
- withBorder: true,
659
- padding: "sm",
660
- style: cardStyle,
661
- onClick: () => onClick(resource),
662
- "data-resource-id": rest["data-resource-id"],
663
- children: /* @__PURE__ */ jsxs(Grid, { gutter: "sm", align: "center", children: [
664
- /* @__PURE__ */ jsx(Grid.Col, { span: 8, children: details }),
665
- rightSection && /* @__PURE__ */ jsx(Grid.Col, { span: 4, children: /* @__PURE__ */ jsx(Group, { justify: "flex-end", gap: "md", wrap: "nowrap", children: rightSection }) })
666
- ] })
667
- }
668
- );
669
- }
670
- return /* @__PURE__ */ jsx(
671
- Card,
672
- {
673
- shadow: "sm",
674
- withBorder: true,
675
- style: cardStyle,
676
- onClick: () => onClick(resource),
677
- "data-resource-id": rest["data-resource-id"],
678
- children: /* @__PURE__ */ jsx(Stack, { children: details })
679
- }
680
- );
681
- }
682
-
683
- // src/components/display/ResourceCardAdapters.ts
684
- function catalogItemToResourceDefinition(item) {
685
- return {
686
- resourceId: item.resourceId,
687
- name: item.resourceName,
688
- description: item.description || "",
689
- version: item.version,
690
- type: item.resourceType,
691
- status: item.status
692
- };
693
- }
694
- function CardHeader({ icon, title, subtitle, rightSection }) {
695
- return /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb: "md", children: [
696
- subtitle ? /* @__PURE__ */ jsxs("div", { children: [
697
- /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
698
- icon,
699
- /* @__PURE__ */ jsx(Title, { order: 3, children: title })
700
- ] }),
701
- /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", mt: 2, children: subtitle })
702
- ] }) : /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
703
- icon,
704
- /* @__PURE__ */ jsx(Title, { order: 3, children: title })
705
- ] }),
706
- rightSection
707
- ] });
708
- }
709
38
  var CustomModal = ({ children, opened, onClose, loading, style, size }) => {
710
39
  const canClose = loading === true ? false : true;
711
40
  return /* @__PURE__ */ jsx(
@@ -1021,6 +350,64 @@ function ResourceHealthChart({
1021
350
  }
1022
351
  ) });
1023
352
  }
353
+ function ResourceHealthPanel({ resourceId, resourceType, timeRange }) {
354
+ const colors = useCyberColors();
355
+ const { startDate, endDate } = useMemo(() => getTimeRangeDates(timeRange), [timeRange]);
356
+ const granularity = ["1h", "24h"].includes(timeRange) ? "hour" : "day";
357
+ const { data, isLoading } = useResourcesHealth({
358
+ resources: [{ entityType: resourceType, entityId: resourceId }],
359
+ startDate,
360
+ endDate,
361
+ granularity
362
+ });
363
+ const resourceHealth = data?.resources?.[0];
364
+ const chartData = useMemo(() => {
365
+ if (!resourceHealth?.trendData) return [];
366
+ return resourceHealth.trendData.map((point) => ({
367
+ time: point.time,
368
+ Success: (point.success || 0) - (point.warning || 0),
369
+ Warning: point.warning || 0,
370
+ Failed: point.failure || 0
371
+ }));
372
+ }, [resourceHealth?.trendData]);
373
+ const xTickFormatter = useMemo(() => (value) => formatBucketTime(value, granularity), [granularity]);
374
+ if (isLoading) {
375
+ return /* @__PURE__ */ jsx(Card, { withBorder: true, children: /* @__PURE__ */ jsx(Center, { p: "xl", children: /* @__PURE__ */ jsx(Loader, {}) }) });
376
+ }
377
+ const summary = resourceHealth?.summary;
378
+ return /* @__PURE__ */ jsxs(Card, { withBorder: true, children: [
379
+ /* @__PURE__ */ jsx(Group, { justify: "space-between", mb: "md", children: /* @__PURE__ */ jsxs("div", { children: [
380
+ /* @__PURE__ */ jsx(Title, { order: 3, children: "Execution Health" }),
381
+ /* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
382
+ summary?.total || 0,
383
+ " executions, ",
384
+ summary?.successRate?.toFixed(1) || 0,
385
+ "% success rate"
386
+ ] })
387
+ ] }) }),
388
+ chartData.length === 0 ? /* @__PURE__ */ jsx(EmptyState, { icon: IconChartBar, title: "No execution data for this time range" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
389
+ /* @__PURE__ */ jsxs(Group, { gap: "lg", justify: "center", mb: "xs", h: 24, align: "center", children: [
390
+ /* @__PURE__ */ jsx(CyberLegendItem, { color: colors.green, label: "Success" }),
391
+ /* @__PURE__ */ jsx(CyberLegendItem, { color: colors.yellow, label: "Warning" }),
392
+ /* @__PURE__ */ jsx(CyberLegendItem, { color: colors.red, label: "Failed" })
393
+ ] }),
394
+ /* @__PURE__ */ jsx(
395
+ CyberAreaChart,
396
+ {
397
+ data: chartData,
398
+ series: [
399
+ { dataKey: "Success", color: "green", name: "Success" },
400
+ { dataKey: "Warning", color: "yellow", name: "Warning" },
401
+ { dataKey: "Failed", color: "red", name: "Failed" }
402
+ ],
403
+ height: 200,
404
+ yDomain: [0, "auto"],
405
+ xTickFormatter
406
+ }
407
+ )
408
+ ] })
409
+ ] });
410
+ }
1024
411
  var categoryColors = {
1025
412
  info: "blue",
1026
413
  queue: "cyan",
@@ -1556,7 +943,7 @@ function GraphLegend({ title = "Legend", items, position = "bottom-right" }) {
1556
943
  Card,
1557
944
  {
1558
945
  p: "xs",
1559
- className: void 0,
946
+ className: Graph_module_css_default.legend,
1560
947
  style: {
1561
948
  backgroundColor: "var(--glass-background)"
1562
949
  },
@@ -1636,12 +1023,12 @@ function GraphFitViewHandler({
1636
1023
  return null;
1637
1024
  }
1638
1025
  var colorClassMap = {
1639
- violet: void 0,
1640
- blue: void 0,
1641
- orange: void 0,
1642
- teal: void 0,
1643
- gray: void 0,
1644
- yellow: void 0
1026
+ violet: Graph_module_css_default.nodeAgent,
1027
+ blue: Graph_module_css_default.nodeWorkflow,
1028
+ orange: Graph_module_css_default.nodeTrigger,
1029
+ teal: Graph_module_css_default.nodeIntegration,
1030
+ gray: Graph_module_css_default.nodeExternal,
1031
+ yellow: Graph_module_css_default.nodeHuman
1645
1032
  };
1646
1033
  var BaseNode = memo(function BaseNode2({
1647
1034
  children,
@@ -1654,18 +1041,18 @@ var BaseNode = memo(function BaseNode2({
1654
1041
  showSourceHandle = true,
1655
1042
  showTargetHandle = true
1656
1043
  }) {
1657
- const typeClass = colorClassMap[color] || void 0;
1658
- const highlightClass = highlighted ? void 0 : "";
1044
+ const typeClass = colorClassMap[color] || Graph_module_css_default.nodeAgent;
1045
+ const highlightClass = highlighted ? Graph_module_css_default.nodeHighlighted : "";
1659
1046
  const targetPosition = handleDirection === "horizontal" ? Position.Left : Position.Top;
1660
1047
  const sourcePosition = handleDirection === "horizontal" ? Position.Right : Position.Bottom;
1661
- return /* @__PURE__ */ jsxs("div", { className: `${ void 0} ${typeClass} ${highlightClass} ${className}`, children: [
1048
+ return /* @__PURE__ */ jsxs("div", { className: `${Graph_module_css_default.node} ${typeClass} ${highlightClass} ${className}`, children: [
1662
1049
  showTargetHandle && /* @__PURE__ */ jsx(Handle, { type: "target", position: targetPosition, style: { opacity: 0, pointerEvents: "none" } }),
1663
1050
  showSourceHandle && /* @__PURE__ */ jsx(Handle, { type: "source", position: sourcePosition, style: { opacity: 0, pointerEvents: "none" } }),
1664
1051
  /* @__PURE__ */ jsx(
1665
1052
  Paper,
1666
1053
  {
1667
1054
  p: "sm",
1668
- className: `${ void 0} ${selected ? void 0 : ""}`,
1055
+ className: `${Graph_module_css_default.nodeCard} ${selected ? Graph_module_css_default.nodeCardSelected : ""}`,
1669
1056
  style: {
1670
1057
  width,
1671
1058
  border: `1px solid ${selected ? `var(--mantine-color-${color}-5)` : "var(--color-border)"}`,
@@ -1976,7 +1363,7 @@ function UnifiedWorkflowGraph({
1976
1363
  selectNodesOnDrag: false,
1977
1364
  zoomOnScroll: true,
1978
1365
  panOnDrag: true,
1979
- className: Graph_module_css_exports.graphContainer,
1366
+ className: Graph_module_css_default.graphContainer,
1980
1367
  children: [
1981
1368
  /* @__PURE__ */ jsx(GraphBackground, {}),
1982
1369
  /* @__PURE__ */ jsx(Panel, { position: "top-right", style: { marginTop: 12, marginRight: 12 }, children: /* @__PURE__ */ jsx(
@@ -2101,7 +1488,7 @@ var AgentIterationNode = memo(function AgentIterationNode2({ data, selected }) {
2101
1488
  top: 4,
2102
1489
  right: 4
2103
1490
  },
2104
- children: /* @__PURE__ */ jsx("span", { className: Graph_module_css_exports.livePulse, children: "LIVE" })
1491
+ children: /* @__PURE__ */ jsx("span", { className: Graph_module_css_default.livePulse, children: "LIVE" })
2105
1492
  }
2106
1493
  )
2107
1494
  ] });
@@ -2189,12 +1576,12 @@ function AgentExecutionVisualizer({
2189
1576
  );
2190
1577
  const { handlePaneClick, handleContainerClick } = useNodeSelection(selectedIterationId, handleIterationSelect);
2191
1578
  const handleNodeClick = useCallback(
2192
- (_event, node2) => {
2193
- if (node2.id === "initialization" || node2.id === "completion") {
2194
- handleIterationSelect(selectedIterationId === node2.id ? null : node2.id);
1579
+ (_event, node) => {
1580
+ if (node.id === "initialization" || node.id === "completion") {
1581
+ handleIterationSelect(selectedIterationId === node.id ? null : node.id);
2195
1582
  return;
2196
1583
  }
2197
- const iterationNumber = Number.parseInt(node2.id.replace("iteration-", ""), 10);
1584
+ const iterationNumber = Number.parseInt(node.id.replace("iteration-", ""), 10);
2198
1585
  if (!Number.isNaN(iterationNumber)) {
2199
1586
  handleIterationSelect(iterationNumber === selectedIterationId ? null : iterationNumber);
2200
1587
  }
@@ -2226,7 +1613,7 @@ function AgentExecutionVisualizer({
2226
1613
  selectNodesOnDrag: false,
2227
1614
  zoomOnScroll: false,
2228
1615
  panOnDrag: false,
2229
- className: Graph_module_css_exports.graphContainer,
1616
+ className: Graph_module_css_default.graphContainer,
2230
1617
  children: [
2231
1618
  /* @__PURE__ */ jsx(GraphBackground, {}),
2232
1619
  /* @__PURE__ */ jsx(GraphFitViewButton, { padding: AGENT_CONSTANTS.FIT_VIEW_PADDING, variant: "mantine", duration: 300 }),
@@ -2324,7 +1711,7 @@ var iconMap = {
2324
1711
  IconRocket,
2325
1712
  IconMessageCircle,
2326
1713
  IconArrowUp,
2327
- IconClock: IconClock,
1714
+ IconClock,
2328
1715
  IconFileText,
2329
1716
  IconSend,
2330
1717
  IconMail
@@ -2798,10 +2185,10 @@ function useNewKnowledgeMapLayout(knowledgeMap, agentName) {
2798
2185
  return { nodes: [], edges: [] };
2799
2186
  }
2800
2187
  const agentNodeId = "__agent__";
2801
- const edges = knowledgeMap.nodes.map((node2) => ({
2802
- id: `edge-${agentNodeId}-${node2.id}`,
2188
+ const edges = knowledgeMap.nodes.map((node) => ({
2189
+ id: `edge-${agentNodeId}-${node.id}`,
2803
2190
  source: agentNodeId,
2804
- target: node2.id,
2191
+ target: node.id,
2805
2192
  type: "knowledgeMap",
2806
2193
  data: {}
2807
2194
  }));
@@ -2815,8 +2202,8 @@ function useNewKnowledgeMapLayout(knowledgeMap, agentName) {
2815
2202
  marginy: 40
2816
2203
  });
2817
2204
  dagreGraph.setNode(agentNodeId, { width: NODE_WIDTH, height: NODE_HEIGHT });
2818
- knowledgeMap.nodes.forEach((node2) => {
2819
- dagreGraph.setNode(node2.id, { width: NODE_WIDTH, height: NODE_HEIGHT });
2205
+ knowledgeMap.nodes.forEach((node) => {
2206
+ dagreGraph.setNode(node.id, { width: NODE_WIDTH, height: NODE_HEIGHT });
2820
2207
  });
2821
2208
  edges.forEach((edge) => {
2822
2209
  dagreGraph.setEdge(edge.source, edge.target);
@@ -2839,21 +2226,21 @@ function useNewKnowledgeMapLayout(knowledgeMap, agentName) {
2839
2226
  isAgentNode: true
2840
2227
  }
2841
2228
  };
2842
- const knowledgeNodes = knowledgeMap.nodes.map((node2) => {
2843
- const dagreNode = dagreGraph.node(node2.id);
2229
+ const knowledgeNodes = knowledgeMap.nodes.map((node) => {
2230
+ const dagreNode = dagreGraph.node(node.id);
2844
2231
  return {
2845
- id: node2.id,
2232
+ id: node.id,
2846
2233
  type: "knowledgeMap",
2847
2234
  position: {
2848
2235
  x: dagreNode.x - NODE_WIDTH / 2,
2849
2236
  y: dagreNode.y - NODE_HEIGHT / 2
2850
2237
  },
2851
2238
  data: {
2852
- id: node2.id,
2853
- name: node2.id,
2854
- description: node2.description,
2855
- loaded: node2.loaded,
2856
- hasPrompt: node2.hasPrompt,
2239
+ id: node.id,
2240
+ name: node.id,
2241
+ description: node.description,
2242
+ loaded: node.loaded,
2243
+ hasPrompt: node.hasPrompt,
2857
2244
  isAgentNode: false
2858
2245
  }
2859
2246
  };
@@ -3348,4 +2735,4 @@ var showApiErrorNotification = (error) => {
3348
2735
  });
3349
2736
  };
3350
2737
 
3351
- export { APIErrorAlert, ActionModal, AgentDefinitionDisplay, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, CardHeader, CollapsibleJsonSection, CollapsibleSection, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContentSections, ContextViewer, ContractDisplay, CustomModal, CustomSelector, DetailCardSkeleton, EmptyState, EmptyVisualizer, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FilterBar, FormFieldRenderer, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, JsonViewer, ListSkeleton, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NotificationBell, NotificationItem, NotificationList, NotificationPanel, PageNotFound, PageTitleCaption, ResourceCard, ResourceDefinitionSection, ResourceHealthChart, SortableHeader, StatCard, StatCardSkeleton, StatsCardSkeleton, StyledMarkdown, TabCountBadge, TableSelectionToolbar, TaskCard, TimeRangeSelector, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, TrendIndicator, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowDefinitionDisplay, WorkflowExecutionTimeline, catalogItemToResourceDefinition, getGraphBackgroundStyles, getHealthColor, getIcon, iconMap, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout };
2738
+ export { ActionModal, AgentDefinitionDisplay, AgentExecutionTimeline, AgentExecutionVisualizer, AgentIterationEdge, AgentIterationNode, BaseEdge, BaseNode, CollapsibleJsonSection, ConfigCard, ConfirmationInputModal, ConfirmationModal, ContentSections, ContractDisplay, CustomModal, EmptyVisualizer, ExecutionLogsTable, ExecutionStats, ExecutionStatusBadge, FilterBar, FormFieldRenderer, GraphBackground, GraphContainer, GraphFitViewButton, GraphFitViewHandler, GraphLegend, NewKnowledgeMapEdge, NewKnowledgeMapGraph, NewKnowledgeMapNode, NotificationBell, NotificationItem, NotificationList, NotificationPanel, ResourceDefinitionSection, ResourceHealthChart, ResourceHealthPanel, SortableHeader, TableSelectionToolbar, TaskCard, TimelineAxis, TimelineBar, TimelineContainer, TimelineRow, ToolsListDisplay, UnifiedWorkflowEdge, UnifiedWorkflowGraph, UnifiedWorkflowNode, VisualizerContainer, WorkflowDefinitionDisplay, WorkflowExecutionTimeline, getGraphBackgroundStyles, getHealthColor, getIcon, iconMap, showApiErrorNotification, showErrorNotification, showInfoNotification, showSuccessNotification, showWarningNotification, useGraphBackgroundStyles, useGraphTheme, useNewKnowledgeMapLayout };