@cere/cere-design-system 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +76 -0
  2. package/dist/buttons.d.mts +27 -22
  3. package/dist/buttons.d.ts +27 -22
  4. package/dist/buttons.js +5 -5
  5. package/dist/buttons.mjs +4 -4
  6. package/dist/charts.d.mts +1 -23
  7. package/dist/charts.d.ts +1 -23
  8. package/dist/charts.js +2 -9
  9. package/dist/charts.js.map +1 -1
  10. package/dist/charts.mjs +1 -8
  11. package/dist/{chunk-THQKYTQE.js → chunk-2KDN37PQ.js} +28 -32
  12. package/dist/chunk-2KDN37PQ.js.map +1 -0
  13. package/dist/{chunk-3WCMINE5.mjs → chunk-34LFXT6C.mjs} +25 -29
  14. package/dist/chunk-34LFXT6C.mjs.map +1 -0
  15. package/dist/chunk-3KCXCVOX.mjs +411 -0
  16. package/dist/chunk-3KCXCVOX.mjs.map +1 -0
  17. package/dist/{chunk-NXTVJ6PY.js → chunk-4OKTICU5.js} +10 -10
  18. package/dist/chunk-4OKTICU5.js.map +1 -0
  19. package/dist/{chunk-FN5YL4BK.js → chunk-72TQ56EP.js} +47 -45
  20. package/dist/chunk-72TQ56EP.js.map +1 -0
  21. package/dist/{chunk-QYYQYZHV.js → chunk-7KXKK2RE.js} +3 -5
  22. package/dist/chunk-7KXKK2RE.js.map +1 -0
  23. package/dist/{chunk-CCN6M4LI.js → chunk-ARSCL4ZZ.js} +18 -10
  24. package/dist/chunk-ARSCL4ZZ.js.map +1 -0
  25. package/dist/chunk-AWVNEU6R.mjs +1478 -0
  26. package/dist/chunk-AWVNEU6R.mjs.map +1 -0
  27. package/dist/{chunk-CUCKULYC.mjs → chunk-BH4FNZKK.mjs} +74 -1260
  28. package/dist/chunk-BH4FNZKK.mjs.map +1 -0
  29. package/dist/{chunk-FFZ5S7PQ.mjs → chunk-BOQPWZIB.mjs} +6 -5
  30. package/dist/chunk-BOQPWZIB.mjs.map +1 -0
  31. package/dist/chunk-BT7XUTT5.mjs +392 -0
  32. package/dist/chunk-BT7XUTT5.mjs.map +1 -0
  33. package/dist/{chunk-ATIFLPH6.mjs → chunk-D7D25O6E.mjs} +4 -2
  34. package/dist/{chunk-ATIFLPH6.mjs.map → chunk-D7D25O6E.mjs.map} +1 -1
  35. package/dist/{chunk-JS4IB5IU.mjs → chunk-DRGMEIPT.mjs} +2 -2
  36. package/dist/chunk-DRGMEIPT.mjs.map +1 -0
  37. package/dist/{chunk-KF2Y7HO3.js → chunk-DZXNYLVG.js} +43 -246
  38. package/dist/chunk-DZXNYLVG.js.map +1 -0
  39. package/dist/{chunk-IE6GCHDI.mjs → chunk-GR52ENYI.mjs} +26 -29
  40. package/dist/chunk-GR52ENYI.mjs.map +1 -0
  41. package/dist/chunk-GTBKQXXI.js +1472 -0
  42. package/dist/chunk-GTBKQXXI.js.map +1 -0
  43. package/dist/{chunk-463SRKKD.js → chunk-HJ24WKU4.js} +14 -5
  44. package/dist/chunk-HJ24WKU4.js.map +1 -0
  45. package/dist/{chunk-EOF3QNPF.js → chunk-KKIKOIMP.js} +140 -1028
  46. package/dist/chunk-KKIKOIMP.js.map +1 -0
  47. package/dist/{chunk-MNM6HE72.js → chunk-LVJSKRX3.js} +16 -15
  48. package/dist/chunk-LVJSKRX3.js.map +1 -0
  49. package/dist/{chunk-KPDYKK3V.js → chunk-PFZZJZ64.js} +8 -8
  50. package/dist/{chunk-KPDYKK3V.js.map → chunk-PFZZJZ64.js.map} +1 -1
  51. package/dist/{chunk-KVBMZNWT.mjs → chunk-POCAW2G4.mjs} +18 -10
  52. package/dist/chunk-POCAW2G4.mjs.map +1 -0
  53. package/dist/{chunk-L2TIGA7I.js → chunk-QCFLZ7X3.js} +39 -42
  54. package/dist/chunk-QCFLZ7X3.js.map +1 -0
  55. package/dist/{chunk-6EUAU67C.mjs → chunk-SG2TD7FQ.mjs} +8 -8
  56. package/dist/chunk-SG2TD7FQ.mjs.map +1 -0
  57. package/dist/{chunk-QY65OUAC.mjs → chunk-SSFALO6S.mjs} +13 -4
  58. package/dist/chunk-SSFALO6S.mjs.map +1 -0
  59. package/dist/{chunk-PWF2NJDB.mjs → chunk-WC2TCWXK.mjs} +82 -14
  60. package/dist/chunk-WC2TCWXK.mjs.map +1 -0
  61. package/dist/{chunk-ZGCN5WCG.js → chunk-XZZZ4MZV.js} +83 -15
  62. package/dist/chunk-XZZZ4MZV.js.map +1 -0
  63. package/dist/chunk-YCDCQSYH.js +411 -0
  64. package/dist/chunk-YCDCQSYH.js.map +1 -0
  65. package/dist/{chunk-CWJ4OU6W.mjs → chunk-ZDAZYIXB.mjs} +2 -4
  66. package/dist/chunk-ZDAZYIXB.mjs.map +1 -0
  67. package/dist/feedback.d.mts +20 -8
  68. package/dist/feedback.d.ts +20 -8
  69. package/dist/feedback.js +5 -5
  70. package/dist/feedback.mjs +4 -4
  71. package/dist/fonts/HumanSans-BlackOblique.otf +0 -0
  72. package/dist/fonts/HumanSans-Thin.otf +0 -0
  73. package/dist/fonts/HumanSans-ThinOblique.otf +0 -0
  74. package/dist/fonts/human-sans-font.css +88 -0
  75. package/dist/fonts/human-sans.css +3 -0
  76. package/dist/fonts/inter.css +3 -0
  77. package/dist/icons.d.mts +2 -3
  78. package/dist/icons.d.ts +2 -3
  79. package/dist/icons.js +2 -2
  80. package/dist/icons.mjs +1 -1
  81. package/dist/index.d.mts +37 -8
  82. package/dist/index.d.ts +37 -8
  83. package/dist/index.js +23 -90
  84. package/dist/index.js.map +1 -1
  85. package/dist/index.mjs +46 -113
  86. package/dist/index.mjs.map +1 -1
  87. package/dist/inputs.d.mts +23 -3
  88. package/dist/inputs.d.ts +23 -3
  89. package/dist/inputs.js +5 -5
  90. package/dist/inputs.js.map +1 -1
  91. package/dist/inputs.mjs +15 -15
  92. package/dist/layout.d.mts +37 -283
  93. package/dist/layout.d.ts +37 -283
  94. package/dist/layout.js +8 -32
  95. package/dist/layout.js.map +1 -1
  96. package/dist/layout.mjs +16 -40
  97. package/dist/navigation.d.mts +9 -114
  98. package/dist/navigation.d.ts +9 -114
  99. package/dist/navigation.js +5 -9
  100. package/dist/navigation.js.map +1 -1
  101. package/dist/navigation.mjs +6 -10
  102. package/dist/third-party.d.mts +3 -527
  103. package/dist/third-party.d.ts +3 -527
  104. package/dist/third-party.js +2 -40
  105. package/dist/third-party.js.map +1 -1
  106. package/dist/third-party.mjs +3 -41
  107. package/dist/tokens.css +45 -71
  108. package/dist/utilities.js +2 -4
  109. package/dist/utilities.js.map +1 -1
  110. package/dist/utilities.mjs +2 -4
  111. package/package.json +23 -9
  112. package/dist/WorkflowNode-BnxXO6t_.d.mts +0 -46
  113. package/dist/WorkflowNode-BnxXO6t_.d.ts +0 -46
  114. package/dist/chunk-27JEWSWA.mjs +0 -233
  115. package/dist/chunk-27JEWSWA.mjs.map +0 -1
  116. package/dist/chunk-3WCMINE5.mjs.map +0 -1
  117. package/dist/chunk-463SRKKD.js.map +0 -1
  118. package/dist/chunk-6EUAU67C.mjs.map +0 -1
  119. package/dist/chunk-AIY6222Q.js +0 -11
  120. package/dist/chunk-AIY6222Q.js.map +0 -1
  121. package/dist/chunk-AJBM7IE6.mjs +0 -2366
  122. package/dist/chunk-AJBM7IE6.mjs.map +0 -1
  123. package/dist/chunk-CCN6M4LI.js.map +0 -1
  124. package/dist/chunk-CUCKULYC.mjs.map +0 -1
  125. package/dist/chunk-CWJ4OU6W.mjs.map +0 -1
  126. package/dist/chunk-EOF3QNPF.js.map +0 -1
  127. package/dist/chunk-FFZ5S7PQ.mjs.map +0 -1
  128. package/dist/chunk-FN5YL4BK.js.map +0 -1
  129. package/dist/chunk-HLH2VWXL.js +0 -2658
  130. package/dist/chunk-HLH2VWXL.js.map +0 -1
  131. package/dist/chunk-IE6GCHDI.mjs.map +0 -1
  132. package/dist/chunk-JS4IB5IU.mjs.map +0 -1
  133. package/dist/chunk-KF2Y7HO3.js.map +0 -1
  134. package/dist/chunk-KVBMZNWT.mjs.map +0 -1
  135. package/dist/chunk-L2TIGA7I.js.map +0 -1
  136. package/dist/chunk-MNM6HE72.js.map +0 -1
  137. package/dist/chunk-NXTVJ6PY.js.map +0 -1
  138. package/dist/chunk-PWF2NJDB.mjs.map +0 -1
  139. package/dist/chunk-QD6RLAO2.mjs +0 -11
  140. package/dist/chunk-QD6RLAO2.mjs.map +0 -1
  141. package/dist/chunk-QY65OUAC.mjs.map +0 -1
  142. package/dist/chunk-QYYQYZHV.js.map +0 -1
  143. package/dist/chunk-T7LPABOL.mjs +0 -595
  144. package/dist/chunk-T7LPABOL.mjs.map +0 -1
  145. package/dist/chunk-THQKYTQE.js.map +0 -1
  146. package/dist/chunk-X7E6GMFL.js +0 -233
  147. package/dist/chunk-X7E6GMFL.js.map +0 -1
  148. package/dist/chunk-XF66WQZE.mjs +0 -1535
  149. package/dist/chunk-XF66WQZE.mjs.map +0 -1
  150. package/dist/chunk-YQOZPLTY.js +0 -1535
  151. package/dist/chunk-YQOZPLTY.js.map +0 -1
  152. package/dist/chunk-ZGCN5WCG.js.map +0 -1
  153. package/dist/index.css +0 -79
  154. package/dist/index.css.map +0 -1
  155. /package/dist/{HumanSans-Black-C4YJONK7.otf → fonts/HumanSans-Black.otf} +0 -0
  156. /package/dist/{HumanSans-Bold-4EAJ3L3T.otf → fonts/HumanSans-Bold.otf} +0 -0
  157. /package/dist/{HumanSans-BoldOblique-4D325T4F.otf → fonts/HumanSans-BoldOblique.otf} +0 -0
  158. /package/dist/{HumanSans-ExtraLight-VL7DEKQ4.otf → fonts/HumanSans-ExtraLight.otf} +0 -0
  159. /package/dist/{HumanSans-ExtraLightOblique-VK2JTUXF.otf → fonts/HumanSans-ExtraLightOblique.otf} +0 -0
  160. /package/dist/{HumanSans-Light-YV7AFKRB.otf → fonts/HumanSans-Light.otf} +0 -0
  161. /package/dist/{HumanSans-LightOblique-VIXV7QA6.otf → fonts/HumanSans-LightOblique.otf} +0 -0
  162. /package/dist/{HumanSans-Medium-UULJ3PIR.otf → fonts/HumanSans-Medium.otf} +0 -0
  163. /package/dist/{HumanSans-MediumOblique-M7FHDZRS.otf → fonts/HumanSans-MediumOblique.otf} +0 -0
  164. /package/dist/{HumanSans-Regular-QMFEP3F6.otf → fonts/HumanSans-Regular.otf} +0 -0
  165. /package/dist/{HumanSans-RegularOblique-YPKQJAAM.otf → fonts/HumanSans-RegularOblique.otf} +0 -0
@@ -1,2658 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
- var _chunkX7E6GMFLjs = require('./chunk-X7E6GMFL.js');
4
-
5
-
6
-
7
- var _chunkKPDYKK3Vjs = require('./chunk-KPDYKK3V.js');
8
-
9
-
10
- var _chunk2EBCST6Xjs = require('./chunk-2EBCST6X.js');
11
-
12
-
13
- var _chunkMNM6HE72js = require('./chunk-MNM6HE72.js');
14
-
15
-
16
- var _chunkFN5YL4BKjs = require('./chunk-FN5YL4BK.js');
17
-
18
-
19
-
20
- var _chunkZGCN5WCGjs = require('./chunk-ZGCN5WCG.js');
21
-
22
- // src/components/layout/Logo.tsx
23
- var _material = require('@mui/material');
24
- var _jsxruntime = require('react/jsx-runtime');
25
- var sizesMap = {
26
- large: 38,
27
- medium: 32,
28
- small: 24
29
- };
30
- var Container = _material.styled.call(void 0, (0, _material.Stack))({
31
- [`& .${_material.svgIconClasses.root}`]: {
32
- fontSize: "inherit"
33
- }
34
- });
35
- var Logo = ({ children, size = "medium", icon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk2EBCST6Xjs.CereIcon, { color: "primary" }) }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Container, { direction: "row", alignItems: "center", spacing: 2, fontSize: sizesMap[size], children: [
36
- icon,
37
- children && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Stack, { children })
38
- ] });
39
-
40
- // src/components/layout/Dialog.tsx
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
- var _Close = require('@mui/icons-material/Close'); var _Close2 = _interopRequireDefault(_Close);
54
-
55
- var Dialog = ({
56
- open,
57
- title,
58
- onClose,
59
- onSubmit,
60
- submitLabel = "Save",
61
- cancelLabel = "Cancel",
62
- isLoading = false,
63
- disableSubmit = false,
64
- showActions = true,
65
- headerAction,
66
- fullWidth = true,
67
- maxWidth = "md",
68
- children,
69
- dividers = true,
70
- confirmBeforeClose = false,
71
- customActions,
72
- ...dialogProps
73
- }) => {
74
- const handleCloseAttempt = (e) => {
75
- if (e) e.stopPropagation();
76
- onClose();
77
- };
78
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
79
- _material.Dialog,
80
- {
81
- open,
82
- onClose: (_, reason) => {
83
- if (confirmBeforeClose) return;
84
- if (reason === "backdropClick" || reason === "escapeKeyDown") {
85
- onClose();
86
- }
87
- },
88
- fullWidth,
89
- maxWidth,
90
- ...dialogProps,
91
- PaperProps: {
92
- sx: { minHeight: dialogProps.fullScreen ? void 0 : "auto" },
93
- ...dialogProps.PaperProps
94
- },
95
- children: [
96
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.DialogTitle, { sx: { display: "flex", justifyContent: "space-between", alignItems: "center", p: 2 }, children: [
97
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center" }, children: typeof title === "string" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "h6", children: title }) : title }),
98
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center" }, children: [
99
- headerAction,
100
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
101
- _material.IconButton,
102
- {
103
- edge: "end",
104
- color: "inherit",
105
- onClick: handleCloseAttempt,
106
- "aria-label": "close",
107
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, {})
108
- }
109
- )
110
- ] })
111
- ] }),
112
- dividers && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, {}),
113
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { dividers, children }),
114
- (showActions || customActions) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
115
- dividers && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, {}),
116
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogActions, { children: customActions || /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
117
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
118
- _material.Button,
119
- {
120
- onClick: handleCloseAttempt,
121
- disabled: isLoading,
122
- children: cancelLabel
123
- }
124
- ),
125
- onSubmit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
126
- _material.Button,
127
- {
128
- variant: "contained",
129
- color: "primary",
130
- onClick: onSubmit,
131
- disabled: disableSubmit || isLoading,
132
- startIcon: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.CircularProgress, { size: 20 }) : void 0,
133
- children: submitLabel
134
- }
135
- )
136
- ] }) })
137
- ] })
138
- ]
139
- }
140
- );
141
- };
142
-
143
- // src/components/layout/KpiCard.tsx
144
- var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
145
- var _Box = require('@mui/material/Box'); var _Box2 = _interopRequireDefault(_Box);
146
- var _Typography = require('@mui/material/Typography'); var _Typography2 = _interopRequireDefault(_Typography);
147
-
148
- var toneColor = (tone, theme) => {
149
- switch (tone) {
150
- case "violet":
151
- return theme.palette.primary.main;
152
- case "blue":
153
- return theme.palette.info.main;
154
- case "green":
155
- return theme.palette.success.main;
156
- case "orange":
157
- return theme.palette.warning.main;
158
- case "pink":
159
- return _nullishCoalesce(_optionalChain([theme, 'access', _2 => _2.palette, 'access', _3 => _3.secondary, 'optionalAccess', _4 => _4.main]), () => ( theme.palette.primary.main));
160
- case "neutral":
161
- default:
162
- return theme.palette.grey[300];
163
- }
164
- };
165
- var KpiCard = React.forwardRef(
166
- function KpiCard2({ icon, label, value, sub, tone = "neutral", ...rest }, ref) {
167
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
168
- _Box2.default,
169
- {
170
- ref,
171
- "data-tone": tone,
172
- ...rest,
173
- sx: (theme) => ({
174
- position: "relative",
175
- display: "flex",
176
- flexDirection: "column",
177
- gap: 0.5,
178
- padding: 2,
179
- paddingLeft: 2.5,
180
- borderRadius: 1.5,
181
- backgroundColor: theme.palette.background.paper,
182
- border: `1px solid ${theme.palette.divider}`,
183
- overflow: "hidden",
184
- "&::before": {
185
- content: '""',
186
- position: "absolute",
187
- left: 0,
188
- top: 0,
189
- bottom: 0,
190
- width: 4,
191
- backgroundColor: toneColor(tone, theme)
192
- }
193
- }),
194
- children: [
195
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { sx: { display: "flex", alignItems: "center", gap: 0.75 }, children: [
196
- icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { sx: { display: "inline-flex", color: "text.secondary" }, children: icon }),
197
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "eyebrow", component: "span", children: label })
198
- ] }),
199
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "panelTitle", component: "div", children: value }),
200
- sub && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "body2", sx: { color: "text.secondary" }, children: sub })
201
- ]
202
- }
203
- );
204
- }
205
- );
206
-
207
- // src/components/layout/AgentAvatar.tsx
208
-
209
-
210
-
211
- var hashSeed = (seed) => {
212
- let h = 5381;
213
- for (let i = 0; i < seed.length; i += 1) {
214
- h = (h << 5) + h + seed.charCodeAt(i) & 4294967295;
215
- }
216
- return Math.abs(h);
217
- };
218
- var palette = (theme) => [
219
- theme.palette.primary.main,
220
- theme.palette.primary.dark,
221
- _nullishCoalesce(_optionalChain([theme, 'access', _5 => _5.palette, 'access', _6 => _6.secondary, 'optionalAccess', _7 => _7.main]), () => ( theme.palette.primary.main))
222
- ];
223
- var AgentAvatar = React2.forwardRef(
224
- function AgentAvatar2({ seed, name, size = 40, shadow = false, iconUrl, ariaLabel, ...rest }, ref) {
225
- const initial = (_nullishCoalesce(_optionalChain([name, 'optionalAccess', _8 => _8.trim, 'call', _9 => _9(), 'optionalAccess', _10 => _10[0]]), () => ( "?"))).toUpperCase();
226
- const radius = Math.round(size * 0.28);
227
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
228
- _Box2.default,
229
- {
230
- ref,
231
- role: "img",
232
- "aria-label": _nullishCoalesce(ariaLabel, () => ( name)),
233
- ...rest,
234
- sx: (theme) => {
235
- const colors = palette(theme);
236
- const paletteIndex = hashSeed(seed) % colors.length;
237
- return {
238
- width: size,
239
- height: size,
240
- borderRadius: `${radius}px`,
241
- backgroundColor: colors[paletteIndex],
242
- color: theme.palette.common.white,
243
- display: "inline-flex",
244
- alignItems: "center",
245
- justifyContent: "center",
246
- fontWeight: 700,
247
- fontSize: Math.round(size * 0.42),
248
- lineHeight: 1,
249
- overflow: "hidden",
250
- flexShrink: 0,
251
- boxShadow: shadow ? theme.shadows[3] : "inset 0 1px 0 rgba(255,255,255,0.2)",
252
- userSelect: "none"
253
- };
254
- },
255
- children: iconUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
256
- _Box2.default,
257
- {
258
- component: "img",
259
- src: iconUrl,
260
- alt: "",
261
- sx: { width: "100%", height: "100%", objectFit: "cover" }
262
- }
263
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "aria-hidden": "true", children: initial })
264
- }
265
- );
266
- }
267
- );
268
-
269
- // src/components/layout/NumberedList.tsx
270
-
271
-
272
-
273
-
274
- var toneColors = (tone, theme) => {
275
- switch (tone) {
276
- case "blue":
277
- return { bg: theme.palette.info.light, fg: theme.palette.info.dark };
278
- case "green":
279
- return { bg: theme.palette.success.light, fg: theme.palette.success.dark };
280
- case "orange":
281
- return { bg: theme.palette.warning.light, fg: theme.palette.warning.dark };
282
- case "pink":
283
- return {
284
- bg: _nullishCoalesce(_optionalChain([theme, 'access', _11 => _11.palette, 'access', _12 => _12.secondary, 'optionalAccess', _13 => _13.light]), () => ( theme.palette.primary.light)),
285
- fg: _nullishCoalesce(_optionalChain([theme, 'access', _14 => _14.palette, 'access', _15 => _15.secondary, 'optionalAccess', _16 => _16.main]), () => ( theme.palette.primary.main))
286
- };
287
- case "neutral":
288
- return { bg: theme.palette.grey[100], fg: theme.palette.text.primary };
289
- case "violet":
290
- default:
291
- return { bg: theme.palette.primary.light, fg: theme.palette.primary.main };
292
- }
293
- };
294
- var NumberedList = React3.forwardRef(
295
- function NumberedList2({ items, tone = "violet", startAt = 1, ...rest }, ref) {
296
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
297
- _Box2.default,
298
- {
299
- ref,
300
- component: "ol",
301
- "data-tone": tone,
302
- ...rest,
303
- sx: (theme) => {
304
- const { bg, fg } = toneColors(tone, theme);
305
- return {
306
- listStyle: "none",
307
- margin: 0,
308
- padding: 0,
309
- display: "flex",
310
- flexDirection: "column",
311
- gap: 1.5,
312
- "--numbered-list-bg": bg,
313
- "--numbered-list-fg": fg
314
- };
315
- },
316
- children: items.map((item, idx) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
317
- _Box2.default,
318
- {
319
- component: "li",
320
- sx: { display: "flex", alignItems: "flex-start", gap: 1.5 },
321
- children: [
322
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
323
- _Box2.default,
324
- {
325
- "aria-hidden": "true",
326
- sx: {
327
- flexShrink: 0,
328
- width: 28,
329
- height: 28,
330
- borderRadius: "50%",
331
- display: "inline-flex",
332
- alignItems: "center",
333
- justifyContent: "center",
334
- fontWeight: 700,
335
- fontSize: 13,
336
- backgroundColor: "var(--numbered-list-bg)",
337
- color: "var(--numbered-list-fg)"
338
- },
339
- children: startAt + idx
340
- }
341
- ),
342
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { sx: { flex: 1, minWidth: 0 }, children: [
343
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "subtitle1", component: "div", children: item.title }),
344
- item.detail && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
345
- _Typography2.default,
346
- {
347
- variant: "body2",
348
- component: "div",
349
- sx: { color: "text.secondary", mt: 0.25 },
350
- children: item.detail
351
- }
352
- )
353
- ] }),
354
- item.cta && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { sx: { flexShrink: 0 }, children: item.cta })
355
- ]
356
- },
357
- `${idx}-${item.title}`
358
- ))
359
- }
360
- );
361
- }
362
- );
363
-
364
- // src/components/layout/Drawer.tsx
365
-
366
- var _Drawer = require('@mui/material/Drawer'); var _Drawer2 = _interopRequireDefault(_Drawer);
367
- var _styles = require('@mui/material/styles');
368
-
369
-
370
-
371
- // src/components/layout/drawerWidth.ts
372
- function resolveDrawerWidth(width, theme, defaultWidth) {
373
- if (width === void 0) {
374
- return { width: defaultWidth };
375
- }
376
- if (typeof width === "number" || typeof width === "string") {
377
- return { width };
378
- }
379
- const base = _nullishCoalesce(width.xs, () => ( defaultWidth));
380
- const css = { width: base };
381
- ["sm", "md", "lg", "xl"].forEach((bp) => {
382
- const value = width[bp];
383
- if (value !== void 0) {
384
- css[theme.breakpoints.up(bp)] = { width: value };
385
- }
386
- });
387
- return css;
388
- }
389
-
390
- // src/components/layout/Drawer.tsx
391
-
392
- var StyledDrawer = _styles.styled.call(void 0, _Drawer2.default, {
393
- shouldForwardProp: (prop) => prop !== "width" && prop !== "miniWidth" && prop !== "collapsed" && prop !== "topOffset"
394
- })(({ theme, width, miniWidth = 72, collapsed, topOffset = 0 }) => {
395
- const widthCss = collapsed ? { width: miniWidth } : resolveDrawerWidth(width, theme, 240);
396
- return {
397
- ...widthCss,
398
- flexShrink: 0,
399
- "& .MuiDrawer-paper": {
400
- ...widthCss,
401
- boxSizing: "border-box",
402
- boxShadow: "0px 2px 10px rgba(0, 0, 0, 0.05)",
403
- transition: theme.transitions.create(["width", "top", "height"], {
404
- easing: theme.transitions.easing.sharp,
405
- duration: theme.transitions.duration.enteringScreen
406
- }),
407
- overflow: "visible",
408
- // Let internal content handle scrolling
409
- display: "flex",
410
- flexDirection: "column",
411
- top: `${topOffset}px !important`,
412
- height: topOffset > 0 ? `calc(100% - ${topOffset}px) !important` : "100%",
413
- zIndex: `${theme.zIndex.modal} !important`
414
- // Use modal zIndex to be above everything except AppBar (which is modal + 1)
415
- }
416
- };
417
- });
418
- var Drawer = React.default.forwardRef(function Drawer2({
419
- width,
420
- miniWidth = 72,
421
- collapsed = false,
422
- title,
423
- header,
424
- showCloseButton,
425
- tabs,
426
- activeTab = 0,
427
- onTabChange,
428
- footer,
429
- contentProps,
430
- anchor = "right",
431
- variant = "temporary",
432
- topOffset = 0,
433
- children,
434
- onClose,
435
- ...props
436
- }, ref) {
437
- const defaultWidth = variant === "temporary" || variant === "persistent" ? 400 : 240;
438
- const finalWidth = _nullishCoalesce(width, () => ( defaultWidth));
439
- const shouldShowClose = _nullishCoalesce(showCloseButton, () => ( (variant === "temporary" || variant === "persistent")));
440
- const hasHeader = title || header || shouldShowClose || tabs;
441
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
442
- StyledDrawer,
443
- {
444
- ref,
445
- width: finalWidth,
446
- miniWidth,
447
- collapsed,
448
- anchor,
449
- variant,
450
- topOffset,
451
- onClose,
452
- ModalProps: {
453
- ...props.ModalProps,
454
- style: {
455
- zIndex: topOffset > 0 ? void 0 : void 0
456
- // Let styled component handle zIndex
457
- }
458
- },
459
- BackdropProps: {
460
- ...props.BackdropProps,
461
- style: {
462
- backgroundColor: "rgba(0, 0, 0, 0.5)"
463
- }
464
- },
465
- ...props,
466
- children: [
467
- hasHeader && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
468
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
469
- _material.Box,
470
- {
471
- sx: {
472
- display: "flex",
473
- alignItems: "center",
474
- justifyContent: "space-between",
475
- p: 2,
476
- minHeight: 64,
477
- borderBottom: 1,
478
- borderColor: "divider"
479
- },
480
- children: header || /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
481
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { sx: { flex: 1 }, children: typeof title === "string" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "h6", children: title }) : title }),
482
- shouldShowClose && onClose && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
483
- _material.IconButton,
484
- {
485
- onClick: (e) => {
486
- e.stopPropagation();
487
- onClose(e, "backdropClick");
488
- },
489
- size: "small",
490
- sx: { ml: 1 },
491
- "aria-label": "close",
492
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, {})
493
- }
494
- )
495
- ] })
496
- }
497
- ),
498
- tabs && tabs.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
499
- _material.Tabs,
500
- {
501
- value: activeTab,
502
- onChange: (_, newValue) => _optionalChain([onTabChange, 'optionalCall', _17 => _17(newValue)]),
503
- variant: tabs.length > 4 ? "scrollable" : "standard",
504
- scrollButtons: tabs.length > 4 ? "auto" : false,
505
- sx: {
506
- borderBottom: 1,
507
- borderColor: "divider",
508
- px: 2,
509
- "& .MuiTabs-scrollableContainer": {
510
- overflow: "auto"
511
- }
512
- },
513
- children: tabs.map((tab, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Tab, { label: tab }, index))
514
- }
515
- )
516
- ] }),
517
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
518
- _material.Box,
519
- {
520
- sx: {
521
- flex: 1,
522
- overflow: "auto",
523
- display: "flex",
524
- flexDirection: "column"
525
- },
526
- ...contentProps,
527
- children
528
- }
529
- ),
530
- footer && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
531
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, {}),
532
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
533
- _material.Box,
534
- {
535
- sx: {
536
- p: 2,
537
- borderTop: 1,
538
- borderColor: "divider"
539
- },
540
- children: footer
541
- }
542
- )
543
- ] })
544
- ]
545
- }
546
- );
547
- });
548
-
549
- // src/components/layout/MetaField.tsx
550
-
551
-
552
-
553
-
554
- var MetaField = React.default.forwardRef(function MetaField2({ label, value, mono = false, title }, ref) {
555
- const resolvedTitle = _nullishCoalesce(title, () => ( (typeof value === "string" ? value : void 0)));
556
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { ref, sx: { display: "flex", flexDirection: "column", gap: 0.25, minWidth: 0 }, children: [
557
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
558
- _Typography2.default,
559
- {
560
- variant: "caption",
561
- sx: {
562
- color: "text.secondary",
563
- textTransform: "uppercase",
564
- letterSpacing: 0.4,
565
- fontSize: 10,
566
- fontWeight: 600
567
- },
568
- children: label
569
- }
570
- ),
571
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
572
- _Typography2.default,
573
- {
574
- variant: "body2",
575
- sx: {
576
- fontFamily: mono ? "monospace" : void 0,
577
- fontSize: 13,
578
- overflow: "hidden",
579
- textOverflow: "ellipsis",
580
- whiteSpace: "nowrap"
581
- },
582
- title: resolvedTitle,
583
- children: value
584
- }
585
- )
586
- ] });
587
- });
588
-
589
- // src/components/layout/ScrollableRow.tsx
590
-
591
-
592
- var _IconButton = require('@mui/material/IconButton'); var _IconButton2 = _interopRequireDefault(_IconButton);
593
- var _ChevronLeft = require('@mui/icons-material/ChevronLeft'); var _ChevronLeft2 = _interopRequireDefault(_ChevronLeft);
594
- var _ChevronRight = require('@mui/icons-material/ChevronRight'); var _ChevronRight2 = _interopRequireDefault(_ChevronRight);
595
-
596
- var EDGE_TOLERANCE_PX = 4;
597
- var ScrollableRow = ({
598
- children,
599
- leftLabel = "Scroll left",
600
- rightLabel = "Scroll right",
601
- minNudge = 160,
602
- nudgeFraction = 0.6
603
- }) => {
604
- const scrollerRef = _react.useRef.call(void 0, null);
605
- const [canLeft, setCanLeft] = _react.useState.call(void 0, false);
606
- const [canRight, setCanRight] = _react.useState.call(void 0, false);
607
- _react.useEffect.call(void 0, () => {
608
- const el = scrollerRef.current;
609
- if (!el) return;
610
- const update = () => {
611
- setCanLeft(el.scrollLeft > EDGE_TOLERANCE_PX);
612
- setCanRight(el.scrollLeft + el.clientWidth < el.scrollWidth - EDGE_TOLERANCE_PX);
613
- };
614
- update();
615
- el.addEventListener("scroll", update, { passive: true });
616
- const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(update) : null;
617
- _optionalChain([ro, 'optionalAccess', _18 => _18.observe, 'call', _19 => _19(el)]);
618
- for (const c of Array.from(el.children)) _optionalChain([ro, 'optionalAccess', _20 => _20.observe, 'call', _21 => _21(c)]);
619
- const mo = typeof MutationObserver !== "undefined" ? new MutationObserver(() => {
620
- for (const c of Array.from(el.children)) _optionalChain([ro, 'optionalAccess', _22 => _22.observe, 'call', _23 => _23(c)]);
621
- update();
622
- }) : null;
623
- _optionalChain([mo, 'optionalAccess', _24 => _24.observe, 'call', _25 => _25(el, { childList: true })]);
624
- return () => {
625
- el.removeEventListener("scroll", update);
626
- _optionalChain([ro, 'optionalAccess', _26 => _26.disconnect, 'call', _27 => _27()]);
627
- _optionalChain([mo, 'optionalAccess', _28 => _28.disconnect, 'call', _29 => _29()]);
628
- };
629
- }, []);
630
- const nudge = (dir) => {
631
- const el = scrollerRef.current;
632
- if (!el) return;
633
- el.scrollBy({ left: dir * Math.max(minNudge, el.clientWidth * nudgeFraction), behavior: "smooth" });
634
- };
635
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { sx: { position: "relative", flex: 1, minWidth: 0 }, children: [
636
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
637
- _Box2.default,
638
- {
639
- ref: scrollerRef,
640
- "data-scrollable-row-scroller": true,
641
- sx: {
642
- display: "flex",
643
- gap: 1,
644
- overflowX: "auto",
645
- overflowY: "hidden",
646
- scrollbarWidth: "thin",
647
- py: 0.25
648
- },
649
- children
650
- }
651
- ),
652
- canLeft && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
653
- _IconButton2.default,
654
- {
655
- size: "small",
656
- "aria-label": leftLabel,
657
- onClick: () => nudge(-1),
658
- sx: {
659
- position: "absolute",
660
- left: -6,
661
- top: "50%",
662
- transform: "translateY(-50%)",
663
- bgcolor: "background.paper",
664
- boxShadow: 1,
665
- "&:hover": { bgcolor: "background.paper" }
666
- },
667
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronLeft2.default, { fontSize: "small" })
668
- }
669
- ),
670
- canRight && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
671
- _IconButton2.default,
672
- {
673
- size: "small",
674
- "aria-label": rightLabel,
675
- onClick: () => nudge(1),
676
- sx: {
677
- position: "absolute",
678
- right: -6,
679
- top: "50%",
680
- transform: "translateY(-50%)",
681
- bgcolor: "background.paper",
682
- boxShadow: 1,
683
- "&:hover": { bgcolor: "background.paper" }
684
- },
685
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronRight2.default, { fontSize: "small" })
686
- }
687
- )
688
- ] });
689
- };
690
-
691
- // src/components/layout/SectionRow.tsx
692
-
693
-
694
-
695
-
696
- var SectionRow = React.default.forwardRef(function SectionRow2({ title, subtitle, action, leftLabel, rightLabel, children }, ref) {
697
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { ref, component: "section", sx: { mb: 4 }, children: [
698
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
699
- _Box2.default,
700
- {
701
- component: "header",
702
- sx: {
703
- display: "flex",
704
- alignItems: "flex-end",
705
- justifyContent: "space-between",
706
- gap: 1.5,
707
- mb: 1.5
708
- },
709
- children: [
710
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { sx: { minWidth: 0 }, children: [
711
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { component: "h2", variant: "h6", sx: { m: 0 }, children: title }),
712
- subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "caption", sx: { color: "text.secondary" }, children: subtitle })
713
- ] }),
714
- action && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: action })
715
- ]
716
- }
717
- ),
718
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollableRow, { leftLabel, rightLabel, children })
719
- ] });
720
- });
721
-
722
- // src/components/layout/GradientSurface.tsx
723
-
724
-
725
-
726
- var PALETTES = [
727
- { base: "linear-gradient(115deg, #0d0627 0%, #23194b 55%, #8B00EC 130%)", blobA: "#BD32A7", blobB: "#8B00EC" },
728
- { base: "linear-gradient(115deg, #2a1635 0%, #5b2a55 55%, #c75a8a 130%)", blobA: "#ff7ea8", blobB: "#ffd1a8" },
729
- { base: "linear-gradient(115deg, #0e2a2c 0%, #1d5d63 55%, #59c6c4 130%)", blobA: "#59c6c4", blobB: "#2bb0a0" },
730
- { base: "linear-gradient(115deg, #131534 0%, #2c3a8c 55%, #6088e8 130%)", blobA: "#6088e8", blobB: "#3b5db8" },
731
- { base: "linear-gradient(115deg, #1a0f30 0%, #3d2a78 55%, #8a5cf6 130%)", blobA: "#a892ff", blobB: "#6b4cf0" },
732
- { base: "linear-gradient(115deg, #2b1124 0%, #6d2244 55%, #d44a7a 130%)", blobA: "#d44a7a", blobB: "#a8345e" }
733
- ];
734
- var GRADIENT_PALETTE_COUNT = PALETTES.length;
735
- var GradientSurface = React.default.forwardRef(
736
- function GradientSurface2({ index, children, sx }, ref) {
737
- const wrapped = (index % GRADIENT_PALETTE_COUNT + GRADIENT_PALETTE_COUNT) % GRADIENT_PALETTE_COUNT;
738
- const palette2 = PALETTES[wrapped];
739
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
740
- _Box2.default,
741
- {
742
- ref,
743
- "data-gradient-index": wrapped,
744
- sx: [
745
- {
746
- position: "relative",
747
- overflow: "hidden",
748
- background: palette2.base,
749
- color: "common.white",
750
- "&::before, &::after": {
751
- content: '""',
752
- position: "absolute",
753
- pointerEvents: "none",
754
- borderRadius: "50%",
755
- filter: "blur(6px)"
756
- },
757
- "&::before": {
758
- width: 460,
759
- height: 460,
760
- top: -120,
761
- right: -120,
762
- opacity: 0.7,
763
- background: `radial-gradient(circle, ${palette2.blobA} 0%, transparent 70%)`
764
- },
765
- "&::after": {
766
- width: 520,
767
- height: 520,
768
- bottom: -180,
769
- left: -160,
770
- opacity: 0.55,
771
- background: `radial-gradient(circle, ${palette2.blobB} 0%, transparent 70%)`
772
- }
773
- },
774
- ...Array.isArray(sx) ? sx : [sx]
775
- ],
776
- children
777
- }
778
- );
779
- }
780
- );
781
-
782
- // src/components/layout/DefinitionRow.tsx
783
-
784
-
785
-
786
-
787
- var DefinitionRow = React.default.forwardRef(
788
- function DefinitionRow2({ icon, label, sublabel, value, hint, dense = false, divider = true }, ref) {
789
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
790
- _Box2.default,
791
- {
792
- ref,
793
- "data-density": dense ? "dense" : "normal",
794
- sx: {
795
- py: dense ? 0.75 : 1.25,
796
- display: "flex",
797
- alignItems: "center",
798
- gap: 1.5,
799
- ...divider && {
800
- borderBottom: "1px solid",
801
- borderColor: "divider",
802
- "&:last-child": { borderBottom: "none" }
803
- }
804
- },
805
- children: [
806
- icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { sx: { display: "flex", alignItems: "center", color: "text.secondary" }, children: icon }),
807
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { sx: { minWidth: 0, flex: 1 }, children: [
808
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "body2", sx: { fontWeight: 500, lineHeight: 1.2 }, children: label }),
809
- sublabel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "caption", sx: { color: "text.secondary" }, children: sublabel })
810
- ] }),
811
- (value || hint) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
812
- _Box2.default,
813
- {
814
- sx: {
815
- display: "flex",
816
- flexDirection: "column",
817
- alignItems: "flex-end",
818
- textAlign: "right"
819
- },
820
- children: [
821
- value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "body2", sx: { color: "text.secondary" }, children: value }),
822
- hint && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "caption", sx: { color: "text.disabled" }, children: hint })
823
- ]
824
- }
825
- )
826
- ]
827
- }
828
- );
829
- }
830
- );
831
-
832
- // src/components/layout/PanelDialog.tsx
833
-
834
- var _Dialog = require('@mui/material/Dialog'); var _Dialog2 = _interopRequireDefault(_Dialog);
835
-
836
-
837
-
838
- var _Slide = require('@mui/material/Slide'); var _Slide2 = _interopRequireDefault(_Slide);
839
-
840
-
841
- var WIDTH_PX = {
842
- sm: 420,
843
- md: 640,
844
- lg: 880,
845
- xl: 1080
846
- };
847
- var SlideLeft = _react.forwardRef.call(void 0,
848
- function SlideLeft2(props, ref) {
849
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Slide2.default, { direction: "left", ref, ...props });
850
- }
851
- );
852
- var SlideUp = _react.forwardRef.call(void 0,
853
- function SlideUp2(props, ref) {
854
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Slide2.default, { direction: "up", ref, ...props });
855
- }
856
- );
857
- function PanelDialog({
858
- open,
859
- onClose,
860
- title,
861
- headerActions,
862
- width = "md",
863
- side = "right",
864
- ariaLabel,
865
- hideHeader = false,
866
- paperSx,
867
- backdropSx,
868
- transition,
869
- children
870
- }) {
871
- const accessibleName = _nullishCoalesce(ariaLabel, () => ( (typeof title === "string" ? title : void 0)));
872
- const isRight = side === "right";
873
- const resolvedTransition = _nullishCoalesce(transition, () => ( (isRight ? "slide-left" : "fade")));
874
- const TransitionComponent = resolvedTransition === "slide-left" ? SlideLeft : resolvedTransition === "slide-up" ? SlideUp : void 0;
875
- const paperBaseSx = {
876
- width: WIDTH_PX[width],
877
- maxWidth: "100%",
878
- // Lay paper children out as a flex column so the body can `flex: 1` and
879
- // own its own scroll region.
880
- display: "flex",
881
- flexDirection: "column",
882
- ...isRight && {
883
- position: "absolute",
884
- right: 0,
885
- top: 0,
886
- bottom: 0,
887
- margin: 0,
888
- // Use dynamic viewport units so mobile browsers (esp. iOS Safari) don't
889
- // pop the layout when the URL bar shows/hides.
890
- maxHeight: "100dvh",
891
- height: "100dvh",
892
- borderRadius: 0
893
- }
894
- };
895
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
896
- _Dialog2.default,
897
- {
898
- open,
899
- onClose,
900
- slots: TransitionComponent ? { transition: TransitionComponent } : void 0,
901
- slotProps: {
902
- paper: {
903
- "aria-label": accessibleName,
904
- sx: [paperBaseSx, ...Array.isArray(paperSx) ? paperSx : [paperSx]]
905
- },
906
- ...backdropSx ? { backdrop: { sx: backdropSx } } : {}
907
- },
908
- children: [
909
- !hideHeader && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
910
- _Box2.default,
911
- {
912
- sx: {
913
- display: "flex",
914
- alignItems: "center",
915
- justifyContent: "space-between",
916
- gap: 1,
917
- px: 2,
918
- py: 1.5,
919
- borderBottom: "1px solid",
920
- borderColor: "divider"
921
- },
922
- children: [
923
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { sx: { display: "flex", alignItems: "center", minWidth: 0 }, children: typeof title === "string" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "h6", noWrap: true, children: title }) : title }),
924
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
925
- headerActions,
926
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _IconButton2.default, { "aria-label": "Close", onClick: onClose, edge: "end", size: "small", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, { fontSize: "small" }) })
927
- ] })
928
- ]
929
- }
930
- ),
931
- hideHeader && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
932
- _IconButton2.default,
933
- {
934
- "aria-label": "Close",
935
- onClick: onClose,
936
- size: "small",
937
- sx: {
938
- position: "absolute",
939
- top: 12,
940
- right: 12,
941
- zIndex: 2,
942
- bgcolor: "background.paper",
943
- boxShadow: 1,
944
- "&:hover": { bgcolor: "background.paper" }
945
- },
946
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, { fontSize: "small" })
947
- }
948
- ),
949
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { sx: { flex: 1, overflow: "auto", minHeight: 0 }, children })
950
- ]
951
- }
952
- );
953
- }
954
-
955
- // src/components/layout/SplitDialogContent.tsx
956
-
957
-
958
-
959
- var SplitDialogContent = React.default.forwardRef(
960
- function SplitDialogContent2({ left, right, rightWidth = 320, collapseBelow = 860, sx }, ref) {
961
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
962
- _Box2.default,
963
- {
964
- ref,
965
- sx: {
966
- display: "grid",
967
- gridTemplateColumns: `1fr ${rightWidth}px`,
968
- gap: "28px",
969
- // Right padding reserves room for the floating close button on PanelDialog.
970
- padding: "28px 56px 36px 36px",
971
- overflowY: "auto",
972
- [`@media (max-width: ${collapseBelow}px)`]: {
973
- gridTemplateColumns: "1fr",
974
- padding: "22px 56px 28px 22px"
975
- },
976
- ...sx
977
- },
978
- children: [
979
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { sx: { display: "flex", flexDirection: "column", gap: "22px", minWidth: 0 }, children: left }),
980
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Box2.default, { component: "aside", sx: { display: "flex", flexDirection: "column", gap: "14px" }, children: right })
981
- ]
982
- }
983
- );
984
- }
985
- );
986
-
987
- // src/components/layout/List.tsx
988
-
989
-
990
-
991
-
992
-
993
-
994
-
995
-
996
-
997
-
998
- var List = React.default.forwardRef(function List2(props, ref) {
999
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.List, { ref, ...props });
1000
- });
1001
- var StyledListItem = _styles.styled.call(void 0, _material.ListItem, {
1002
- shouldForwardProp: (prop) => prop !== "hoverable"
1003
- })(({ hoverable = true, theme }) => ({
1004
- border: `1px solid ${theme.palette.grey[200]}`,
1005
- borderRadius: 8,
1006
- marginBottom: 8,
1007
- ...hoverable && {
1008
- "&:hover": {
1009
- backgroundColor: theme.palette.grey[50]
1010
- }
1011
- }
1012
- }));
1013
- var ListItem = React.default.forwardRef(function ListItem2({ primary, secondary, icon, action, hoverable = true, children, ...props }, ref) {
1014
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, StyledListItem, { ref, hoverable, ...props, children: [
1015
- icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemIcon, { children: icon }),
1016
- (primary || secondary) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1017
- _material.ListItemText,
1018
- {
1019
- primary,
1020
- secondary
1021
- }
1022
- ),
1023
- children,
1024
- action && action
1025
- ] });
1026
- });
1027
-
1028
- // src/components/layout/Avatar.tsx
1029
-
1030
- var _Avatar = require('@mui/material/Avatar'); var _Avatar2 = _interopRequireDefault(_Avatar);
1031
-
1032
-
1033
- var sizeMap = {
1034
- small: 32,
1035
- medium: 40,
1036
- large: 56
1037
- };
1038
- var StyledAvatar = _styles.styled.call(void 0, _Avatar2.default, {
1039
- shouldForwardProp: (prop) => prop !== "avatarSize"
1040
- })(({ avatarSize = 40, theme }) => ({
1041
- width: avatarSize,
1042
- height: avatarSize,
1043
- backgroundColor: theme.palette.primary.main,
1044
- color: theme.palette.primary.contrastText,
1045
- fontWeight: 600
1046
- }));
1047
- var Avatar = React.default.forwardRef(function Avatar2({ size = "medium", ...props }, ref) {
1048
- const avatarSize = typeof size === "number" ? size : sizeMap[size];
1049
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledAvatar, { ref, avatarSize, ...props });
1050
- });
1051
-
1052
- // src/components/layout/Table.tsx
1053
-
1054
-
1055
-
1056
-
1057
-
1058
-
1059
-
1060
-
1061
-
1062
-
1063
-
1064
-
1065
- var StyledTableContainer = _styles.styled.call(void 0, (0, _material.TableContainer))(({ theme }) => ({
1066
- borderRadius: 8,
1067
- border: `1px solid ${theme.palette.grey[200]}`
1068
- }));
1069
- var StyledTableHead = _styles.styled.call(void 0, (0, _material.TableHead))(({ theme }) => ({
1070
- backgroundColor: theme.palette.grey[50],
1071
- "& .MuiTableCell-head": {
1072
- fontWeight: 600,
1073
- color: theme.palette.text.primary
1074
- }
1075
- }));
1076
- var Table = React.default.forwardRef(function Table2({ stickyHeader = false, children, ...props }, ref) {
1077
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledTableContainer, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Table, { ref, stickyHeader, ...props, children }) });
1078
- });
1079
- var TableHeader = React.default.forwardRef(
1080
- function TableHeader2({ columns, orderBy, order = "asc", onSort }, ref) {
1081
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledTableHead, { ref, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.TableRow, { children: columns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.TableCell, { align: column.align || "left", children: column.sortable && onSort ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1082
- _material.TableSortLabel,
1083
- {
1084
- active: orderBy === column.id,
1085
- direction: orderBy === column.id ? order : "asc",
1086
- onClick: () => onSort(column.id),
1087
- children: column.label
1088
- }
1089
- ) : column.label }, column.id)) }) });
1090
- }
1091
- );
1092
-
1093
- // src/components/layout/Grid.tsx
1094
-
1095
-
1096
- // src/components/layout/Breadcrumbs.tsx
1097
-
1098
- var _Breadcrumbs = require('@mui/material/Breadcrumbs'); var _Breadcrumbs2 = _interopRequireDefault(_Breadcrumbs);
1099
- var _Link = require('@mui/material/Link'); var _Link2 = _interopRequireDefault(_Link);
1100
-
1101
-
1102
-
1103
- var StyledBreadcrumbs = _styles.styled.call(void 0, (0, _Breadcrumbs2.default))(({ theme }) => ({
1104
- "& .MuiBreadcrumbs-ol": {
1105
- flexWrap: "nowrap"
1106
- },
1107
- "& .MuiBreadcrumbs-separator": {
1108
- color: theme.palette.text.secondary
1109
- }
1110
- }));
1111
- var StyledLink = _styles.styled.call(void 0, (0, _Link2.default))(({ theme }) => ({
1112
- color: theme.palette.primary.main,
1113
- textDecoration: "none",
1114
- "&:hover": {
1115
- textDecoration: "underline"
1116
- }
1117
- }));
1118
- var Breadcrumbs = React.default.forwardRef(function Breadcrumbs2({ items, ...props }, ref) {
1119
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledBreadcrumbs, { ref, ...props, children: items.map((item, index) => {
1120
- const isLast = index === items.length - 1;
1121
- if (isLast || !item.href && !item.onClick) {
1122
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { color: "text.primary", children: item.label }, index);
1123
- }
1124
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1125
- StyledLink,
1126
- {
1127
- href: item.href,
1128
- onClick: (e) => {
1129
- if (item.onClick) {
1130
- e.preventDefault();
1131
- item.onClick();
1132
- }
1133
- },
1134
- children: item.label
1135
- },
1136
- index
1137
- );
1138
- }) });
1139
- });
1140
-
1141
- // src/components/layout/Accordion.tsx
1142
-
1143
-
1144
-
1145
-
1146
-
1147
-
1148
- var _ExpandMore = require('@mui/icons-material/ExpandMore'); var _ExpandMore2 = _interopRequireDefault(_ExpandMore);
1149
-
1150
-
1151
- var StyledAccordion = _styles.styled.call(void 0, (0, _material.Accordion))(({ theme }) => ({
1152
- borderRadius: 8,
1153
- boxShadow: "none",
1154
- border: `1px solid ${theme.palette.grey[200]}`,
1155
- "&:before": {
1156
- display: "none"
1157
- },
1158
- "&.Mui-expanded": {
1159
- margin: 0
1160
- }
1161
- }));
1162
- var StyledAccordionSummary = _styles.styled.call(void 0, (0, _material.AccordionSummary))(({ theme }) => ({
1163
- backgroundColor: theme.palette.grey[50],
1164
- borderRadius: "8px 8px 0 0",
1165
- "&.Mui-expanded": {
1166
- borderRadius: "8px 8px 0 0"
1167
- },
1168
- "& .MuiAccordionSummary-content": {
1169
- margin: "12px 0"
1170
- }
1171
- }));
1172
- var StyledAccordionDetails = _styles.styled.call(void 0, (0, _material.AccordionDetails))({
1173
- padding: "16px"
1174
- });
1175
- var Accordion = React.default.forwardRef(function Accordion2({ title, children, defaultExpanded = false, ...props }, ref) {
1176
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, StyledAccordion, { ref, defaultExpanded, ...props, children: [
1177
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledAccordionSummary, { expandIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ExpandMore2.default, {}), children: title }),
1178
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledAccordionDetails, { children })
1179
- ] });
1180
- });
1181
-
1182
- // src/components/layout/Paper.tsx
1183
-
1184
- var _Paper = require('@mui/material/Paper'); var _Paper2 = _interopRequireDefault(_Paper);
1185
-
1186
-
1187
- var StyledPaper = _styles.styled.call(void 0, (0, _Paper2.default))(({ theme }) => ({
1188
- borderRadius: 8,
1189
- "&.MuiPaper-elevation": {
1190
- boxShadow: "0px 2px 8px rgba(0, 0, 0, 0.08)"
1191
- },
1192
- "&.MuiPaper-outlined": {
1193
- border: `1px solid ${theme.palette.grey[200]}`,
1194
- boxShadow: "none"
1195
- }
1196
- }));
1197
- var Paper = React.default.forwardRef(function Paper2({ variant = "elevation", ...props }, ref) {
1198
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1199
- StyledPaper,
1200
- {
1201
- ref,
1202
- variant,
1203
- elevation: variant === "elevation" ? 1 : 0,
1204
- ...props
1205
- }
1206
- );
1207
- });
1208
-
1209
- // src/components/layout/Divider.tsx
1210
-
1211
- var _Divider = require('@mui/material/Divider'); var _Divider2 = _interopRequireDefault(_Divider);
1212
-
1213
-
1214
- var StyledDivider = _styles.styled.call(void 0, (0, _Divider2.default))(({ theme }) => ({
1215
- borderColor: theme.palette.grey[200]
1216
- }));
1217
- var Divider3 = React.default.forwardRef(function Divider4(props, ref) {
1218
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledDivider, { ref, ...props });
1219
- });
1220
-
1221
- // src/components/layout/Stack.tsx
1222
-
1223
-
1224
- // src/components/layout/Box.tsx
1225
-
1226
-
1227
- // src/components/layout/Container.tsx
1228
-
1229
-
1230
- // src/components/layout/AppBar.tsx
1231
-
1232
-
1233
-
1234
-
1235
-
1236
-
1237
- var StyledAppBar = _styles.styled.call(void 0, _material.AppBar, {
1238
- shouldForwardProp: (prop) => prop !== "appBarHeight"
1239
- })(({ appBarHeight = 64, theme }) => ({
1240
- backgroundColor: theme.palette.background.paper,
1241
- borderBottom: `1px solid ${theme.palette.grey[200]}`,
1242
- boxShadow: "none",
1243
- height: appBarHeight,
1244
- zIndex: 1300
1245
- }));
1246
- var StyledToolbar = _styles.styled.call(void 0, (0, _material.Toolbar))(({ theme }) => ({
1247
- height: "100%",
1248
- paddingLeft: theme.spacing(2),
1249
- paddingRight: theme.spacing(2),
1250
- gap: theme.spacing(2)
1251
- }));
1252
- var AppBar = ({ height = 64, children, ...props }) => {
1253
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledAppBar, { position: "fixed", appBarHeight: height, ...props, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledToolbar, { children }) });
1254
- };
1255
-
1256
- // src/components/layout/Collapse.tsx
1257
-
1258
-
1259
-
1260
-
1261
-
1262
- var Collapse = React.default.forwardRef(function Collapse2(props, ref) {
1263
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Collapse, { ref, ...props });
1264
- });
1265
-
1266
- // src/components/layout/EntityHeader/EntityHeader.tsx
1267
-
1268
-
1269
-
1270
-
1271
-
1272
- var _MoreHoriz = require('@mui/icons-material/MoreHoriz'); var _MoreHoriz2 = _interopRequireDefault(_MoreHoriz);
1273
-
1274
- var EntityHeader = React.default.forwardRef(
1275
- function EntityHeader2({
1276
- title,
1277
- subtitle,
1278
- role,
1279
- id,
1280
- primaryAction,
1281
- startActions,
1282
- endActions,
1283
- onCopyId,
1284
- onMoreOptions,
1285
- headingLevel = "h2",
1286
- divider = true
1287
- }, ref) {
1288
- const getPrimaryActionLabel = () => {
1289
- if (!primaryAction) return "";
1290
- const { label, count } = primaryAction;
1291
- return count !== void 0 ? `${label} (${count})` : label;
1292
- };
1293
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _Box2.default, { ref, children: [
1294
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1295
- _Box2.default,
1296
- {
1297
- sx: {
1298
- display: "flex",
1299
- alignItems: "center",
1300
- justifyContent: "space-between",
1301
- px: 3,
1302
- py: 2,
1303
- gap: 1
1304
- },
1305
- children: [
1306
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1307
- _Box2.default,
1308
- {
1309
- sx: {
1310
- display: "flex",
1311
- alignItems: "center",
1312
- gap: 1,
1313
- flexWrap: "wrap"
1314
- },
1315
- children: [
1316
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1317
- _Box2.default,
1318
- {
1319
- sx: {
1320
- display: "flex",
1321
- flexDirection: "column",
1322
- gap: 0.5
1323
- },
1324
- children: [
1325
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1326
- _Typography2.default,
1327
- {
1328
- component: headingLevel,
1329
- sx: {
1330
- fontSize: "16px",
1331
- fontWeight: 500,
1332
- lineHeight: "24px",
1333
- letterSpacing: "0.15px",
1334
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary
1335
- },
1336
- children: title
1337
- }
1338
- ),
1339
- subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1340
- _Typography2.default,
1341
- {
1342
- variant: "body2",
1343
- sx: {
1344
- fontSize: "11px",
1345
- fontWeight: 500,
1346
- lineHeight: "16px",
1347
- letterSpacing: "0.5px",
1348
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textSecondary
1349
- },
1350
- children: subtitle
1351
- }
1352
- )
1353
- ]
1354
- }
1355
- ),
1356
- role && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKPDYKK3Vjs.RoleBadge, { label: role, color: "primary", size: "small" }),
1357
- id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKPDYKK3Vjs.IDBlock, { id, label: "ID", entityType: "entity", onCopy: onCopyId })
1358
- ]
1359
- }
1360
- ),
1361
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1362
- _Box2.default,
1363
- {
1364
- sx: {
1365
- display: "flex",
1366
- alignItems: "center",
1367
- gap: 1,
1368
- flexShrink: 0
1369
- },
1370
- children: [
1371
- startActions,
1372
- primaryAction && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1373
- _chunkMNM6HE72js.Button,
1374
- {
1375
- variant: "primary",
1376
- startIcon: primaryAction.icon,
1377
- onClick: primaryAction.onClick,
1378
- sx: {
1379
- textTransform: "capitalize"
1380
- },
1381
- children: getPrimaryActionLabel()
1382
- }
1383
- ),
1384
- endActions,
1385
- onMoreOptions && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1386
- _IconButton2.default,
1387
- {
1388
- onClick: onMoreOptions,
1389
- size: "small",
1390
- "aria-label": "More options",
1391
- sx: {
1392
- padding: "8px",
1393
- border: `1px solid ${_chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside}`,
1394
- borderRadius: "8px",
1395
- "&:hover": {
1396
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.hoverOverlay,
1397
- borderColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.borderDefault
1398
- }
1399
- },
1400
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1401
- _MoreHoriz2.default,
1402
- {
1403
- sx: {
1404
- fontSize: "20px",
1405
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textSecondary
1406
- }
1407
- }
1408
- )
1409
- }
1410
- )
1411
- ]
1412
- }
1413
- )
1414
- ]
1415
- }
1416
- ),
1417
- divider && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1418
- _Divider2.default,
1419
- {
1420
- sx: {
1421
- borderColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside
1422
- }
1423
- }
1424
- )
1425
- ] });
1426
- }
1427
- );
1428
-
1429
- // src/components/layout/DeploymentDashboardCard/DeploymentDashboardCard.tsx
1430
-
1431
-
1432
-
1433
-
1434
-
1435
-
1436
-
1437
-
1438
-
1439
-
1440
- var _WorkOutline = require('@mui/icons-material/WorkOutline'); var _WorkOutline2 = _interopRequireDefault(_WorkOutline);
1441
- var _Waves = require('@mui/icons-material/Waves'); var _Waves2 = _interopRequireDefault(_Waves);
1442
- var _RocketLaunchOutlined = require('@mui/icons-material/RocketLaunchOutlined'); var _RocketLaunchOutlined2 = _interopRequireDefault(_RocketLaunchOutlined);
1443
- var _InsertLink = require('@mui/icons-material/InsertLink'); var _InsertLink2 = _interopRequireDefault(_InsertLink);
1444
- var _SmartToyOutlined = require('@mui/icons-material/SmartToyOutlined'); var _SmartToyOutlined2 = _interopRequireDefault(_SmartToyOutlined);
1445
-
1446
-
1447
- // src/hooks/useControlledExpand.ts
1448
-
1449
- function useControlledExpand(controlledExpanded, onToggle, defaultExpanded = false) {
1450
- const [internal, setInternal] = _react.useState.call(void 0, defaultExpanded);
1451
- const isControlled = controlledExpanded !== void 0 && onToggle != null;
1452
- const expanded = isControlled ? controlledExpanded : internal;
1453
- const toggle = isControlled ? () => onToggle() : () => setInternal((prev) => !prev);
1454
- return { expanded, toggle };
1455
- }
1456
-
1457
- // src/components/layout/DeploymentDashboardCard/DeploymentDashboardCard.tsx
1458
-
1459
- var ENTITY_LABELS = {
1460
- workspace: "Workspace",
1461
- stream: "Stream",
1462
- deployment: "Deployment",
1463
- engagement: "Engagement",
1464
- agent: "Agent"
1465
- };
1466
- var ENTITY_ICON_SIZE = 16;
1467
- var ENTITY_ICONS = {
1468
- workspace: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _WorkOutline2.default, { sx: { fontSize: ENTITY_ICON_SIZE } }),
1469
- stream: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Waves2.default, { sx: { fontSize: ENTITY_ICON_SIZE } }),
1470
- deployment: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _RocketLaunchOutlined2.default, { sx: { fontSize: ENTITY_ICON_SIZE } }),
1471
- engagement: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _InsertLink2.default, { sx: { fontSize: ENTITY_ICON_SIZE } }),
1472
- agent: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SmartToyOutlined2.default, { sx: { fontSize: ENTITY_ICON_SIZE } })
1473
- };
1474
- var STATUS_DOT_COLORS = {
1475
- normal: _chunkZGCN5WCGjs.deploymentStatusColors.normal,
1476
- warning: _chunkZGCN5WCGjs.deploymentStatusColors.warning,
1477
- error: _chunkZGCN5WCGjs.deploymentStatusColors.error,
1478
- disabled: _chunkZGCN5WCGjs.deploymentStatusColors.disabledDim
1479
- };
1480
- var CHEVRON_SIZE = 16;
1481
- var ENTITY_CHIP_STYLES = {
1482
- borderRadius: "12px",
1483
- borderWidth: "1.5px",
1484
- padding: { left: 0.75, right: 1, vertical: 0.25 },
1485
- gap: 0.5
1486
- };
1487
- var ENTITY_CHIP_TYPOGRAPHY = {
1488
- fontSize: "12px",
1489
- fontWeight: 500,
1490
- lineHeight: 1.33,
1491
- letterSpacing: "0.07px"
1492
- };
1493
- var StatusDot = _styles.styled.call(void 0, _material.Box, {
1494
- shouldForwardProp: (p) => p !== "status"
1495
- })(({ status }) => ({
1496
- width: 8,
1497
- height: 8,
1498
- borderRadius: "50%",
1499
- backgroundColor: status ? _nullishCoalesce(STATUS_DOT_COLORS[status], () => ( "transparent")) : "transparent",
1500
- flexShrink: 0
1501
- }));
1502
- var EntityChip = ({ entityType, color }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1503
- _material.Box,
1504
- {
1505
- sx: {
1506
- display: "inline-flex",
1507
- alignItems: "center",
1508
- gap: ENTITY_CHIP_STYLES.gap,
1509
- pl: ENTITY_CHIP_STYLES.padding.left,
1510
- pr: ENTITY_CHIP_STYLES.padding.right,
1511
- py: ENTITY_CHIP_STYLES.padding.vertical,
1512
- borderRadius: ENTITY_CHIP_STYLES.borderRadius,
1513
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.surfaceHigh,
1514
- border: `${ENTITY_CHIP_STYLES.borderWidth} solid ${color}`,
1515
- flexShrink: 0
1516
- },
1517
- children: [
1518
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { sx: { color, display: "flex", alignItems: "center" }, children: ENTITY_ICONS[entityType] }),
1519
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1520
- _material.Typography,
1521
- {
1522
- variant: "body2",
1523
- fontWeight: ENTITY_CHIP_TYPOGRAPHY.fontWeight,
1524
- sx: {
1525
- color: "common.black",
1526
- lineHeight: ENTITY_CHIP_TYPOGRAPHY.lineHeight,
1527
- fontSize: ENTITY_CHIP_TYPOGRAPHY.fontSize,
1528
- letterSpacing: ENTITY_CHIP_TYPOGRAPHY.letterSpacing
1529
- },
1530
- children: ENTITY_LABELS[entityType]
1531
- }
1532
- )
1533
- ]
1534
- }
1535
- );
1536
- var CapacityBar = ({ value, indented = false }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { pl: indented ? "40px" : 0, pr: "20px", py: 1 }, children: [
1537
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", justifyContent: "space-between", mb: 1 }, children: [
1538
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "body2", sx: { color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary }, children: "Capacity" }),
1539
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Typography, { variant: "body2", sx: { color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.accentBlue }, children: [
1540
- value,
1541
- "%"
1542
- ] })
1543
- ] }),
1544
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1545
- _material.LinearProgress,
1546
- {
1547
- variant: "determinate",
1548
- value,
1549
- sx: {
1550
- height: 4,
1551
- borderRadius: "20px",
1552
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside,
1553
- "& .MuiLinearProgress-bar": {
1554
- borderRadius: "20px",
1555
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.accentBlue
1556
- }
1557
- }
1558
- }
1559
- )
1560
- ] });
1561
- var getActionButtonStyles = (action) => {
1562
- const baseStyles = {
1563
- display: "inline-flex",
1564
- alignItems: "center",
1565
- gap: 0.5,
1566
- cursor: action.onClick ? "pointer" : "default",
1567
- background: "none",
1568
- font: "inherit",
1569
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary,
1570
- whiteSpace: "nowrap",
1571
- "&:hover": action.onClick ? { opacity: 0.7 } : void 0
1572
- };
1573
- const variantStyles = action.outlined ? {
1574
- border: `1px solid ${_chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside}`,
1575
- borderRadius: "8px",
1576
- p: 1,
1577
- bgcolor: "white"
1578
- } : {
1579
- border: "none",
1580
- p: 0
1581
- };
1582
- return { ...baseStyles, ...variantStyles };
1583
- };
1584
- var CardAction = ({ action }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1585
- _material.Box,
1586
- {
1587
- component: action.onClick ? "button" : "span",
1588
- onClick: action.onClick,
1589
- sx: getActionButtonStyles(action),
1590
- children: [
1591
- action.icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { component: "span", sx: { display: "flex", alignItems: "center" }, children: action.icon }),
1592
- action.label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "body2", fontWeight: 500, component: "span", sx: { fontSize: "14px" }, children: action.label })
1593
- ]
1594
- }
1595
- );
1596
- var CardActionList = ({ actions }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: actions.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardAction, { action }, action.id)) });
1597
- var DeploymentDashboardCard = ({
1598
- entityType,
1599
- title,
1600
- id: idDisplay,
1601
- createdAt,
1602
- updatedAt,
1603
- capacity,
1604
- actions = [],
1605
- statusIndicator = null,
1606
- expandable = false,
1607
- expanded: controlledExpanded,
1608
- onExpandToggle,
1609
- onCopyId,
1610
- className,
1611
- children
1612
- }) => {
1613
- const theme = _material.useTheme.call(void 0, );
1614
- const entityColor = _nullishCoalesce(_optionalChain([theme, 'access', _30 => _30.palette, 'access', _31 => _31.deployment, 'optionalAccess', _32 => _32.entity, 'optionalAccess', _33 => _33[entityType]]), () => ( _chunkZGCN5WCGjs.deploymentEntityColors[entityType]));
1615
- const isControlled = expandable && onExpandToggle != null;
1616
- const { expanded, toggle } = useControlledExpand(
1617
- isControlled ? controlledExpanded : void 0,
1618
- isControlled ? onExpandToggle : void 0
1619
- );
1620
- const isWorkspace = entityType === "workspace";
1621
- const isDeployment = entityType === "deployment";
1622
- const getClampedCapacity = (capacity2) => {
1623
- if (!isDeployment || capacity2 == null) {
1624
- return void 0;
1625
- }
1626
- return Math.min(100, Math.max(0, capacity2));
1627
- };
1628
- const capacityClamped = getClampedCapacity(capacity);
1629
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1630
- _material.Paper,
1631
- {
1632
- className,
1633
- elevation: 0,
1634
- sx: {
1635
- border: `1px solid ${isWorkspace ? _chunkFN5YL4BKjs.deploymentSurfaceTokens.accentBlue : _chunkFN5YL4BKjs.deploymentSurfaceTokens.borderDefault}`,
1636
- borderRadius: isWorkspace ? "4px" : "12px",
1637
- boxShadow: isWorkspace ? _chunkFN5YL4BKjs.deploymentSurfaceTokens.workspaceShadow : "none",
1638
- px: 1,
1639
- py: isDeployment ? 2 : 1,
1640
- pl: 1,
1641
- display: "flex",
1642
- flexDirection: "column",
1643
- gap: 0
1644
- },
1645
- children: [
1646
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1647
- _material.Box,
1648
- {
1649
- sx: {
1650
- display: "flex",
1651
- justifyContent: "space-between",
1652
- alignItems: isDeployment ? "flex-start" : "center",
1653
- width: "100%"
1654
- },
1655
- children: [
1656
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", flexDirection: "column", gap: 0.5, minWidth: 0 }, children: [
1657
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
1658
- expandable ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1659
- _material.IconButton,
1660
- {
1661
- size: "small",
1662
- onClick: toggle,
1663
- "aria-label": expanded ? "Collapse" : "Expand",
1664
- sx: { p: "5px" },
1665
- children: expanded ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ExpandMore2.default, { sx: { fontSize: CHEVRON_SIZE, color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.accentBlue } }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronRight2.default, { sx: { fontSize: CHEVRON_SIZE, color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.accentBlue } })
1666
- }
1667
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { sx: { width: 26, flexShrink: 0 } }),
1668
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EntityChip, { entityType, color: entityColor }),
1669
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1670
- _material.Typography,
1671
- {
1672
- variant: "subtitle1",
1673
- fontWeight: 500,
1674
- noWrap: true,
1675
- sx: { color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary, fontSize: "16px", letterSpacing: "0.08px" },
1676
- children: title
1677
- }
1678
- ),
1679
- idDisplay != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkKPDYKK3Vjs.IDBlock, { id: idDisplay, label: "ID", entityType, onCopy: onCopyId })
1680
- ] }),
1681
- (createdAt != null || updatedAt != null) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1682
- _material.Box,
1683
- {
1684
- sx: {
1685
- display: "flex",
1686
- gap: 2,
1687
- px: "34px",
1688
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textSecondary
1689
- },
1690
- children: [
1691
- createdAt != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Typography, { variant: "body2", sx: { color: "inherit", fontSize: "14px" }, children: [
1692
- "Created: ",
1693
- createdAt
1694
- ] }),
1695
- updatedAt != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Typography, { variant: "body2", sx: { color: "inherit", fontSize: "14px" }, children: [
1696
- "Last Updated: ",
1697
- updatedAt
1698
- ] })
1699
- ]
1700
- }
1701
- ),
1702
- capacityClamped !== void 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CapacityBar, { value: capacityClamped, indented: expandable })
1703
- ] }),
1704
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", gap: 1, alignItems: "center", flexShrink: 0 }, children: [
1705
- statusIndicator != null && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StatusDot, { status: statusIndicator, "aria-hidden": true }),
1706
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardActionList, { actions })
1707
- ] })
1708
- ]
1709
- }
1710
- ),
1711
- children && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { sx: { mt: 1.5, display: "flex", flexDirection: "column", gap: 1 }, children })
1712
- ]
1713
- }
1714
- );
1715
- };
1716
-
1717
- // src/components/layout/DeploymentEntityContextMenu/DeploymentEntityContextMenu.tsx
1718
-
1719
-
1720
-
1721
- var StyledMenu = _styles.styled.call(void 0, (0, _material.Menu))({
1722
- "& .MuiPaper-root": {
1723
- borderRadius: 4,
1724
- boxShadow: _chunkFN5YL4BKjs.deploymentSurfaceTokens.workspaceShadow,
1725
- minWidth: 220,
1726
- border: `1px solid ${_chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside}`,
1727
- padding: 8
1728
- },
1729
- "& .MuiList-root": {
1730
- padding: 0
1731
- }
1732
- });
1733
- var StyledMenuItem = _styles.styled.call(void 0, (0, _material.MenuItem))({
1734
- gap: 8,
1735
- padding: "8px 0",
1736
- borderRadius: 4,
1737
- minHeight: "auto",
1738
- "&:hover": {
1739
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.hoverLight
1740
- },
1741
- "& .MuiListItemIcon-root": {
1742
- minWidth: "auto",
1743
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary,
1744
- "& .MuiSvgIcon-root": {
1745
- fontSize: 24
1746
- }
1747
- },
1748
- "& .MuiListItemText-root .MuiTypography-root": {
1749
- fontSize: 16,
1750
- fontWeight: 500,
1751
- lineHeight: 1.5,
1752
- letterSpacing: "0.08px",
1753
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary
1754
- }
1755
- });
1756
- var HighlightedMenuItem = _styles.styled.call(void 0, StyledMenuItem)({
1757
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.highlightBg,
1758
- border: `1px solid ${_chunkFN5YL4BKjs.deploymentSurfaceTokens.highlightBorder}`,
1759
- padding: 8,
1760
- "&:hover": {
1761
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.highlightBgHover
1762
- }
1763
- });
1764
- var ToggleMenuItem = _styles.styled.call(void 0, (0, _material.MenuItem))({
1765
- gap: 8,
1766
- padding: "8px 0",
1767
- cursor: "default",
1768
- minHeight: "auto",
1769
- "&:hover": {
1770
- backgroundColor: "transparent"
1771
- },
1772
- "& .MuiListItemText-root .MuiTypography-root": {
1773
- fontSize: 16,
1774
- fontWeight: 500,
1775
- lineHeight: 1.5,
1776
- letterSpacing: "0.08px",
1777
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary
1778
- }
1779
- });
1780
- var EnableSwitch = _styles.styled.call(void 0, (0, _material.Switch))(({ theme }) => ({
1781
- width: 32,
1782
- height: 20,
1783
- padding: 0,
1784
- "& .MuiSwitch-switchBase": {
1785
- padding: 2,
1786
- "&.Mui-checked": {
1787
- transform: "translateX(12px)",
1788
- color: theme.palette.common.white,
1789
- "& + .MuiSwitch-track": {
1790
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.switchGreen,
1791
- opacity: 1
1792
- }
1793
- }
1794
- },
1795
- "& .MuiSwitch-thumb": {
1796
- width: 16,
1797
- height: 16
1798
- },
1799
- "& .MuiSwitch-track": {
1800
- borderRadius: 100,
1801
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.switchTrackOff,
1802
- opacity: 1
1803
- }
1804
- }));
1805
- var StyledDivider2 = _styles.styled.call(void 0, (0, _material.Divider))({
1806
- margin: "0 !important",
1807
- borderColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside
1808
- });
1809
- var DeploymentEntityContextMenu = ({
1810
- open,
1811
- anchorEl,
1812
- onClose,
1813
- items,
1814
- enableToggle = false,
1815
- enableChecked = false,
1816
- onEnableChange
1817
- }) => {
1818
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1819
- StyledMenu,
1820
- {
1821
- anchorEl,
1822
- open,
1823
- onClose,
1824
- anchorOrigin: { vertical: "bottom", horizontal: "right" },
1825
- transformOrigin: { vertical: "top", horizontal: "right" },
1826
- slotProps: { paper: { "aria-label": "Entity context menu" } },
1827
- children: [
1828
- items.map((item) => {
1829
- if (item.type === "divider") {
1830
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledDivider2, {}, item.id);
1831
- }
1832
- if (item.type === "toggle") {
1833
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ToggleMenuItem, { disableRipple: true, children: [
1834
- onEnableChange && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1835
- EnableSwitch,
1836
- {
1837
- size: "small",
1838
- checked: enableChecked,
1839
- onChange: (_, checked) => onEnableChange(checked),
1840
- inputProps: { "aria-label": item.label }
1841
- }
1842
- ),
1843
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemText, { primary: item.label })
1844
- ] }, item.id);
1845
- }
1846
- const Row = item.highlighted ? HighlightedMenuItem : StyledMenuItem;
1847
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1848
- Row,
1849
- {
1850
- onClick: () => {
1851
- _optionalChain([item, 'access', _34 => _34.onClick, 'optionalCall', _35 => _35()]);
1852
- onClose();
1853
- },
1854
- children: [
1855
- item.icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemIcon, { children: item.icon }),
1856
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemText, { primary: item.label })
1857
- ]
1858
- },
1859
- item.id
1860
- );
1861
- }),
1862
- enableToggle && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1863
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledDivider2, {}),
1864
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ToggleMenuItem, { disableRipple: true, children: [
1865
- onEnableChange && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1866
- EnableSwitch,
1867
- {
1868
- size: "small",
1869
- checked: enableChecked,
1870
- onChange: (_, checked) => onEnableChange(checked),
1871
- inputProps: { "aria-label": "Enable" }
1872
- }
1873
- ),
1874
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.ListItemText, { primary: "Enable" })
1875
- ] })
1876
- ] })
1877
- ]
1878
- }
1879
- );
1880
- };
1881
-
1882
- // src/components/layout/DeploymentEntityContextMenu/contextMenuItems.tsx
1883
- var _AddCircleOutline = require('@mui/icons-material/AddCircleOutline'); var _AddCircleOutline2 = _interopRequireDefault(_AddCircleOutline);
1884
- var _Edit = require('@mui/icons-material/Edit'); var _Edit2 = _interopRequireDefault(_Edit);
1885
- var _ContentCopy = require('@mui/icons-material/ContentCopy'); var _ContentCopy2 = _interopRequireDefault(_ContentCopy);
1886
-
1887
- var _Description = require('@mui/icons-material/Description'); var _Description2 = _interopRequireDefault(_Description);
1888
- var _Settings = require('@mui/icons-material/Settings'); var _Settings2 = _interopRequireDefault(_Settings);
1889
-
1890
- var contextMenuItems = {
1891
- /** Add Engagement action (Add Circle icon) */
1892
- addEngagement: (onClick) => ({
1893
- id: "add-engagement",
1894
- label: "Add Engagement",
1895
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _AddCircleOutline2.default, {}),
1896
- onClick
1897
- }),
1898
- /** Add Agent action (Add Circle icon) */
1899
- addAgent: (onClick) => ({
1900
- id: "add-agent",
1901
- label: "Add Agent",
1902
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _AddCircleOutline2.default, {}),
1903
- onClick
1904
- }),
1905
- /** Add Stream action (Add Circle icon) */
1906
- addStream: (onClick) => ({
1907
- id: "add-stream",
1908
- label: "Add Stream",
1909
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _AddCircleOutline2.default, {}),
1910
- onClick
1911
- }),
1912
- /** Edit action (Pen / Edit icon) */
1913
- edit: (onClick) => ({
1914
- id: "edit",
1915
- label: "Edit",
1916
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Edit2.default, {}),
1917
- onClick
1918
- }),
1919
- /** Copy ID action (Copy icon) */
1920
- copyId: (onClick) => ({
1921
- id: "copy-id",
1922
- label: "Copy ID",
1923
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ContentCopy2.default, {}),
1924
- onClick
1925
- }),
1926
- /** Agent Flow Visualization — highlighted action (SmartToy icon) */
1927
- agentFlowVisualization: (onClick) => ({
1928
- id: "agent-flow",
1929
- label: "Agent Flow Visualization",
1930
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SmartToyOutlined2.default, {}),
1931
- onClick,
1932
- highlighted: true
1933
- }),
1934
- /** View Logs action (Document / Description icon) */
1935
- viewLogs: (onClick) => ({
1936
- id: "view-logs",
1937
- label: "View Logs",
1938
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Description2.default, {}),
1939
- onClick
1940
- }),
1941
- /** Horizontal divider between sections */
1942
- divider: () => ({
1943
- id: "divider",
1944
- label: "",
1945
- type: "divider"
1946
- }),
1947
- /** Enable toggle row (switch on left + label) */
1948
- enable: () => ({
1949
- id: "enable",
1950
- label: "Enable",
1951
- type: "toggle"
1952
- }),
1953
- /** Settings action (Settings / Gear icon) */
1954
- settings: (onClick) => ({
1955
- id: "settings",
1956
- label: "Settings",
1957
- icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Settings2.default, {}),
1958
- onClick
1959
- })
1960
- };
1961
-
1962
- // src/components/layout/DeploymentDashboardTree/DeploymentDashboardTree.tsx
1963
-
1964
-
1965
-
1966
- var TREE_SP = {
1967
- /** Vertical gap between sibling rows (Figma S / sp-8) */
1968
- rowGap: 8,
1969
- /** Gap between rail and children column (Figma sp-12) */
1970
- railGap: 12,
1971
- /** Rail width (Figma) */
1972
- railWidth: 4,
1973
- /** Total horizontal indent per level = railWidth + railGap (Figma M = 16) */
1974
- indentPerLevel: 4 + 12
1975
- };
1976
- var RAIL_OPACITY = {
1977
- workspace: 0.5,
1978
- stream: 0.5,
1979
- deployment: 0.4,
1980
- engagement: 0.4,
1981
- agent: 0.4
1982
- };
1983
- var Rail = _styles.styled.call(void 0, _material.Box, {
1984
- shouldForwardProp: (p) => p !== "railColor"
1985
- })(({ railColor }) => ({
1986
- width: TREE_SP.railWidth,
1987
- borderRadius: TREE_SP.railWidth / 2,
1988
- backgroundColor: railColor,
1989
- flexShrink: 0,
1990
- alignSelf: "stretch"
1991
- }));
1992
- var TreeRow = ({ node, depth, onExpandToggle, onCopyId, renderCard }) => {
1993
- const hasChildren = Boolean(node.children && node.children.length > 0);
1994
- const { expanded, toggle } = useControlledExpand(
1995
- onExpandToggle != null ? node.expanded : void 0,
1996
- onExpandToggle ? () => onExpandToggle(node.id) : void 0,
1997
- _nullishCoalesce(node.expanded, () => ( false))
1998
- );
1999
- const entityColor = _nullishCoalesce(_chunkZGCN5WCGjs.deploymentEntityColors[node.entityType], () => ( _chunkZGCN5WCGjs.deploymentEntityColors.workspace));
2000
- const railOpacity = _nullishCoalesce(RAIL_OPACITY[node.entityType], () => ( 0.5));
2001
- const railColor = _styles.alpha.call(void 0, entityColor, railOpacity);
2002
- const renderedChildren = hasChildren && expanded ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", gap: `${TREE_SP.railGap}px` }, children: [
2003
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Rail, { railColor, "aria-hidden": true, "data-rail": true }),
2004
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2005
- _material.Box,
2006
- {
2007
- role: "group",
2008
- sx: {
2009
- flex: 1,
2010
- minWidth: 0,
2011
- display: "flex",
2012
- flexDirection: "column",
2013
- gap: `${TREE_SP.rowGap}px`
2014
- },
2015
- children: node.children.map((child) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2016
- TreeRow,
2017
- {
2018
- node: child,
2019
- depth: depth + 1,
2020
- onExpandToggle,
2021
- onCopyId,
2022
- renderCard
2023
- },
2024
- child.id
2025
- ))
2026
- }
2027
- )
2028
- ] }) : null;
2029
- const cardContent = _nullishCoalesce(_optionalChain([renderCard, 'optionalCall', _36 => _36(node)]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2030
- DeploymentDashboardCard,
2031
- {
2032
- entityType: node.entityType,
2033
- title: node.title,
2034
- id: node.idDisplay,
2035
- createdAt: node.createdAt,
2036
- updatedAt: node.updatedAt,
2037
- capacity: node.capacity,
2038
- actions: node.actions,
2039
- statusIndicator: node.statusIndicator,
2040
- expandable: hasChildren,
2041
- expanded,
2042
- onExpandToggle: hasChildren ? toggle : void 0,
2043
- onCopyId: onCopyId && node.idDisplay ? () => onCopyId(node.id) : void 0,
2044
- children: renderedChildren
2045
- }
2046
- )));
2047
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { role: "treeitem", children: cardContent });
2048
- };
2049
- var DeploymentDashboardTree = ({
2050
- nodes,
2051
- onExpandToggle,
2052
- onCopyId,
2053
- renderCard
2054
- }) => {
2055
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2056
- _material.Box,
2057
- {
2058
- role: "tree",
2059
- sx: {
2060
- display: "flex",
2061
- flexDirection: "column",
2062
- gap: `${TREE_SP.rowGap}px`,
2063
- p: `${TREE_SP.rowGap}px`
2064
- },
2065
- children: nodes.map((node) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2066
- TreeRow,
2067
- {
2068
- node,
2069
- depth: 0,
2070
- onExpandToggle,
2071
- onCopyId,
2072
- renderCard
2073
- },
2074
- node.id
2075
- ))
2076
- }
2077
- );
2078
- };
2079
-
2080
- // src/components/layout/DeploymentDashboardPanel/DeploymentDashboardPanel.tsx
2081
-
2082
-
2083
-
2084
- var PANEL_RADIUS = 12;
2085
- var PANEL_SHADOW = "0px 1px 3px rgba(0, 0, 0, 0.08)";
2086
- var StyledPanel = _styles.styled.call(void 0, (0, _material.Box))({
2087
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.surfaceHigh,
2088
- border: `1px solid ${_chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside}`,
2089
- borderRadius: PANEL_RADIUS,
2090
- boxShadow: PANEL_SHADOW,
2091
- overflow: "hidden"
2092
- });
2093
- var DeploymentDashboardPanel = ({
2094
- children,
2095
- className,
2096
- padding = 2
2097
- }) => {
2098
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledPanel, { className, sx: { p: padding }, children });
2099
- };
2100
-
2101
- // src/components/layout/WorkflowTopBar/WorkflowTopBar.tsx
2102
-
2103
-
2104
-
2105
-
2106
-
2107
-
2108
-
2109
-
2110
-
2111
- var _Cancel = require('@mui/icons-material/Cancel'); var _Cancel2 = _interopRequireDefault(_Cancel);
2112
-
2113
-
2114
- var WorkflowTopBar = ({
2115
- title = "Agent visualization flow chart",
2116
- executionId,
2117
- executionIdLabel = "Job ID",
2118
- onExecutionIdChange,
2119
- onClearExecutionId,
2120
- submitLabel = "Submit",
2121
- onSubmit,
2122
- inspectorLabel = "Inspector",
2123
- onInspectorToggle,
2124
- onClose,
2125
- showInspectorToggle = true,
2126
- showCloseButton = true,
2127
- sx,
2128
- ...boxProps
2129
- }) => {
2130
- const chrome = _styles.useTheme.call(void 0, ).palette.workflow.chrome;
2131
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2132
- _material.Box,
2133
- {
2134
- sx: [
2135
- {
2136
- backgroundColor: "common.white",
2137
- display: "flex",
2138
- flexDirection: "column",
2139
- width: "100%"
2140
- },
2141
- ...Array.isArray(sx) ? sx : [sx]
2142
- ],
2143
- ...boxProps,
2144
- children: [
2145
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2146
- _material.Box,
2147
- {
2148
- sx: {
2149
- display: "flex",
2150
- alignItems: "center",
2151
- justifyContent: "space-between",
2152
- gap: 2,
2153
- px: 2,
2154
- py: 2,
2155
- minHeight: 72
2156
- },
2157
- children: [
2158
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2159
- _material.Typography,
2160
- {
2161
- variant: "subtitle1",
2162
- sx: {
2163
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary,
2164
- fontWeight: 500,
2165
- minWidth: 220
2166
- },
2167
- children: title
2168
- }
2169
- ),
2170
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2171
- _material.Box,
2172
- {
2173
- sx: {
2174
- display: "flex",
2175
- alignItems: "center",
2176
- gap: 2,
2177
- justifyContent: "flex-end",
2178
- flex: 1,
2179
- minWidth: 0
2180
- },
2181
- children: [
2182
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2183
- _material.Box,
2184
- {
2185
- sx: {
2186
- display: "flex",
2187
- alignItems: "center",
2188
- backgroundColor: chrome.inputBg,
2189
- borderRadius: "4px 4px 0 0",
2190
- borderBottom: `2px solid ${chrome.inputBorder}`,
2191
- px: 2,
2192
- minWidth: 320,
2193
- maxWidth: 440,
2194
- flex: "1 1 auto",
2195
- minHeight: 56
2196
- },
2197
- children: [
2198
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { flex: 1, minWidth: 0 }, children: [
2199
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2200
- _material.Typography,
2201
- {
2202
- variant: "caption",
2203
- sx: {
2204
- color: chrome.labelText,
2205
- fontSize: 12,
2206
- display: "block"
2207
- },
2208
- children: executionIdLabel
2209
- }
2210
- ),
2211
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2212
- _material.InputBase,
2213
- {
2214
- value: executionId,
2215
- onChange: (event) => _optionalChain([onExecutionIdChange, 'optionalCall', _37 => _37(event.target.value)]),
2216
- inputProps: { "aria-label": executionIdLabel },
2217
- sx: {
2218
- width: "100%",
2219
- mt: 0.25,
2220
- "& .MuiInputBase-input": {
2221
- p: 0,
2222
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary,
2223
- fontSize: 16,
2224
- lineHeight: 1.5
2225
- }
2226
- }
2227
- }
2228
- )
2229
- ] }),
2230
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2231
- _material.IconButton,
2232
- {
2233
- size: "small",
2234
- "aria-label": `Clear ${executionIdLabel.toLowerCase()}`,
2235
- onClick: onClearExecutionId,
2236
- sx: { color: chrome.iconColor, ml: 1 },
2237
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Cancel2.default, { fontSize: "small" })
2238
- }
2239
- )
2240
- ]
2241
- }
2242
- ),
2243
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2244
- _chunkMNM6HE72js.Button,
2245
- {
2246
- variant: "primary",
2247
- onClick: onSubmit,
2248
- sx: {
2249
- backgroundColor: chrome.buttonPrimary,
2250
- "&:hover": {
2251
- backgroundColor: chrome.buttonHover
2252
- },
2253
- "&:active": {
2254
- backgroundColor: chrome.buttonActive
2255
- }
2256
- },
2257
- children: submitLabel
2258
- }
2259
- ),
2260
- showInspectorToggle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMNM6HE72js.Button, { variant: "secondary", onClick: onInspectorToggle, children: inspectorLabel }),
2261
- showCloseButton && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2262
- _material.IconButton,
2263
- {
2264
- "aria-label": "Close workflow chrome",
2265
- onClick: onClose,
2266
- sx: {
2267
- width: 30,
2268
- height: 30,
2269
- backgroundColor: _material.alpha.call(void 0, chrome.closeBtnBg, 0.28),
2270
- color: chrome.iconColor
2271
- },
2272
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, { fontSize: "small" })
2273
- }
2274
- )
2275
- ]
2276
- }
2277
- )
2278
- ]
2279
- }
2280
- ),
2281
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { borderColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside } })
2282
- ]
2283
- }
2284
- );
2285
- };
2286
-
2287
- // src/components/layout/WorkflowSideInspector/WorkflowSideInspector.tsx
2288
-
2289
-
2290
-
2291
-
2292
-
2293
-
2294
-
2295
-
2296
-
2297
-
2298
- var _ContentCopyOutlined = require('@mui/icons-material/ContentCopyOutlined'); var _ContentCopyOutlined2 = _interopRequireDefault(_ContentCopyOutlined);
2299
-
2300
- var INSPECTOR_WIDTH = 320;
2301
- var InfoBlock = ({ label, value, mutedColor }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
2302
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "body2", sx: { color: mutedColor }, children: label }),
2303
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2304
- _material.Typography,
2305
- {
2306
- variant: "body2",
2307
- sx: { color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary, whiteSpace: "pre-wrap" },
2308
- children: value
2309
- }
2310
- )
2311
- ] });
2312
- var WorkflowSideInspector = ({
2313
- open = true,
2314
- title = "Inspector",
2315
- nodeTitle = "Player location cubby",
2316
- nodeDescription = "Retrieving everything we know about this player so far.",
2317
- nodeType = "cubbies",
2318
- inputValue = "Get player topic tree",
2319
- outputValue = "Topic tree with emotional trends and behavior patterns",
2320
- cubbyId = "ID:S8787",
2321
- timestamp = "2026-02-11 14:32:10",
2322
- duration = "120ms",
2323
- showInput = true,
2324
- showOutput = true,
2325
- showTimestamp = true,
2326
- showDuration = true,
2327
- actionLabel,
2328
- onClose,
2329
- onCopyCubbyId,
2330
- onAction,
2331
- sx,
2332
- ...paperProps
2333
- }) => {
2334
- const theme = _material.useTheme.call(void 0, );
2335
- const chrome = theme.palette.workflow.chrome;
2336
- if (!open) {
2337
- return null;
2338
- }
2339
- const accent = theme.palette.workflow.node[nodeType].accent;
2340
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2341
- _material.Paper,
2342
- {
2343
- elevation: 0,
2344
- sx: {
2345
- width: INSPECTOR_WIDTH,
2346
- minWidth: INSPECTOR_WIDTH,
2347
- maxWidth: INSPECTOR_WIDTH,
2348
- p: 3,
2349
- backgroundColor: theme.palette.common.white,
2350
- borderRadius: 0,
2351
- boxShadow: "0px 5px 8px rgba(0, 3, 11, 0.12), 0px 0px 1px rgba(0, 3, 11, 0.24)",
2352
- display: "flex",
2353
- flexDirection: "column",
2354
- gap: 3,
2355
- ...sx
2356
- },
2357
- ...paperProps,
2358
- children: [
2359
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", flexDirection: "column", gap: 1.25 }, children: [
2360
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
2361
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "subtitle1", sx: { color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary }, children: title }),
2362
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2363
- _material.IconButton,
2364
- {
2365
- "aria-label": "Close inspector",
2366
- onClick: onClose,
2367
- sx: {
2368
- border: `1px solid ${_chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside}`,
2369
- borderRadius: 2
2370
- },
2371
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, { fontSize: "small" })
2372
- }
2373
- )
2374
- ] }),
2375
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { borderColor: chrome.divider } })
2376
- ] }),
2377
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", flexDirection: "column", gap: 3, flex: 1 }, children: [
2378
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
2379
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2380
- _material.Typography,
2381
- {
2382
- variant: "subtitle1",
2383
- sx: { color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary, fontWeight: 500 },
2384
- children: nodeTitle
2385
- }
2386
- ),
2387
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "body2", sx: { color: chrome.mutedText }, children: nodeDescription }),
2388
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2389
- _material.Box,
2390
- {
2391
- sx: {
2392
- display: "inline-flex",
2393
- alignItems: "center",
2394
- alignSelf: "flex-start",
2395
- gap: 1,
2396
- px: 1.25,
2397
- py: 0.5,
2398
- borderRadius: "999px",
2399
- border: `1px solid ${accent}`,
2400
- backgroundColor: _material.alpha.call(void 0, accent, 0.12)
2401
- },
2402
- children: [
2403
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2404
- _material.Box,
2405
- {
2406
- sx: {
2407
- width: 10,
2408
- height: 10,
2409
- borderRadius: "50%",
2410
- backgroundColor: accent
2411
- }
2412
- }
2413
- ),
2414
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "caption", sx: { color: accent, fontWeight: 500 }, children: _chunkX7E6GMFLjs.WORKFLOW_NODE_LABELS[nodeType] })
2415
- ]
2416
- }
2417
- )
2418
- ] }),
2419
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { borderColor: chrome.divider } }),
2420
- (showInput || showOutput) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2421
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
2422
- showInput && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InfoBlock, { label: "Input", value: inputValue, mutedColor: chrome.mutedText }),
2423
- showOutput && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InfoBlock, { label: "Output", value: outputValue, mutedColor: chrome.mutedText })
2424
- ] }),
2425
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { borderColor: chrome.divider } })
2426
- ] }),
2427
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", flexDirection: "column", gap: 1 }, children: [
2428
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "body2", sx: { color: chrome.mutedText }, children: "Cubby ID" }),
2429
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2430
- _chunkMNM6HE72js.Button,
2431
- {
2432
- variant: "secondary",
2433
- size: "small",
2434
- startIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ContentCopyOutlined2.default, { fontSize: "small" }),
2435
- onClick: onCopyCubbyId,
2436
- sx: { alignSelf: "flex-start" },
2437
- children: cubbyId
2438
- }
2439
- )
2440
- ] }),
2441
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { borderColor: chrome.divider } }),
2442
- (showTimestamp || showDuration) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2443
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", flexDirection: "column", gap: 2 }, children: [
2444
- showTimestamp && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InfoBlock, { label: "Timestamp", value: timestamp, mutedColor: chrome.mutedText }),
2445
- showDuration && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InfoBlock, { label: "Duration", value: duration, mutedColor: chrome.mutedText })
2446
- ] }),
2447
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { borderColor: chrome.divider } })
2448
- ] })
2449
- ] }),
2450
- actionLabel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMNM6HE72js.Button, { variant: "primary", fullWidth: true, onClick: onAction, children: actionLabel })
2451
- ]
2452
- }
2453
- );
2454
- };
2455
-
2456
- // src/components/layout/WorkflowTimeBar/WorkflowTimeBar.tsx
2457
-
2458
-
2459
-
2460
-
2461
-
2462
-
2463
-
2464
- var _Stop = require('@mui/icons-material/Stop'); var _Stop2 = _interopRequireDefault(_Stop);
2465
-
2466
-
2467
- var _Replay = require('@mui/icons-material/Replay'); var _Replay2 = _interopRequireDefault(_Replay);
2468
-
2469
-
2470
- var SpeedButton = ({ value, selected, onClick }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2471
- _chunkMNM6HE72js.Button,
2472
- {
2473
- variant: selected ? "primary" : "secondary",
2474
- size: "small",
2475
- onClick,
2476
- sx: {
2477
- minWidth: 48,
2478
- px: 1.5,
2479
- py: 0.25,
2480
- borderRadius: 1,
2481
- fontSize: 14,
2482
- lineHeight: 1.4
2483
- },
2484
- children: `${value}x`
2485
- }
2486
- );
2487
- var WorkflowTimeBar = ({
2488
- elapsedTime = "01m : 12s",
2489
- progress = 26,
2490
- currentStep = 1,
2491
- totalSteps = 16,
2492
- speedOptions = [0.5, 1, 2, 4],
2493
- selectedSpeed = 0.5,
2494
- onStop,
2495
- onPreviousStep,
2496
- onNextStep,
2497
- onSpeedChange,
2498
- onReset,
2499
- sx,
2500
- ...boxProps
2501
- }) => {
2502
- const chrome = _styles.useTheme.call(void 0, ).palette.workflow.chrome;
2503
- const boundedProgress = Math.max(0, Math.min(100, progress));
2504
- const atFirstStep = currentStep <= 1;
2505
- const atLastStep = currentStep >= totalSteps;
2506
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
2507
- _material.Box,
2508
- {
2509
- sx: [
2510
- {
2511
- width: "100%",
2512
- backgroundColor: "common.white",
2513
- px: 2,
2514
- pb: 2,
2515
- display: "flex",
2516
- flexDirection: "column",
2517
- gap: 2
2518
- },
2519
- ...Array.isArray(sx) ? sx : [sx]
2520
- ],
2521
- ...boxProps,
2522
- children: [
2523
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Divider, { sx: { borderColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside } }),
2524
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 2 }, children: [
2525
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2526
- _material.IconButton,
2527
- {
2528
- onClick: onStop,
2529
- "aria-label": "Stop playback",
2530
- sx: {
2531
- width: 40,
2532
- height: 40,
2533
- border: `1px solid ${_chunkFN5YL4BKjs.deploymentSurfaceTokens.strokeOutside}`,
2534
- borderRadius: 1,
2535
- color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary,
2536
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.surfaceHigh
2537
- },
2538
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Stop2.default, { sx: { fontSize: 16 } })
2539
- }
2540
- ),
2541
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { flex: 1, minWidth: 220, px: 1 }, children: [
2542
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2543
- _material.Typography,
2544
- {
2545
- variant: "body2",
2546
- sx: { color: _chunkFN5YL4BKjs.deploymentSurfaceTokens.textPrimary, mb: 0.5 },
2547
- children: elapsedTime
2548
- }
2549
- ),
2550
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2551
- _material.LinearProgress,
2552
- {
2553
- variant: "determinate",
2554
- value: boundedProgress,
2555
- sx: {
2556
- height: 3,
2557
- borderRadius: 999,
2558
- backgroundColor: chrome.progressBg,
2559
- "& .MuiLinearProgress-bar": {
2560
- backgroundColor: _chunkFN5YL4BKjs.deploymentSurfaceTokens.accentBlue
2561
- }
2562
- }
2563
- }
2564
- )
2565
- ] }),
2566
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 3 }, children: [
2567
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
2568
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "subtitle1", sx: { fontWeight: 500 }, children: "Steps" }),
2569
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2570
- _material.IconButton,
2571
- {
2572
- size: "small",
2573
- "aria-label": "Previous step",
2574
- onClick: onPreviousStep,
2575
- disabled: atFirstStep,
2576
- sx: { backgroundColor: chrome.stepBtnBg },
2577
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronLeft2.default, { fontSize: "small" })
2578
- }
2579
- ),
2580
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "subtitle1", sx: { minWidth: 52, textAlign: "center" }, children: `${currentStep} / ${totalSteps}` }),
2581
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2582
- _material.IconButton,
2583
- {
2584
- size: "small",
2585
- "aria-label": "Next step",
2586
- onClick: onNextStep,
2587
- disabled: atLastStep,
2588
- sx: { backgroundColor: chrome.stepBtnBgHover },
2589
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ChevronRight2.default, { fontSize: "small" })
2590
- }
2591
- )
2592
- ] }),
2593
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
2594
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { variant: "subtitle1", sx: { fontWeight: 500 }, children: "Speed" }),
2595
- speedOptions.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2596
- SpeedButton,
2597
- {
2598
- value: option,
2599
- selected: option === selectedSpeed,
2600
- onClick: () => _optionalChain([onSpeedChange, 'optionalCall', _38 => _38(option)])
2601
- },
2602
- option
2603
- )),
2604
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.IconButton, { "aria-label": "Reset playback", onClick: onReset, size: "small", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Replay2.default, { fontSize: "small" }) })
2605
- ] })
2606
- ] })
2607
- ] })
2608
- ]
2609
- }
2610
- );
2611
- };
2612
-
2613
-
2614
-
2615
-
2616
-
2617
-
2618
-
2619
-
2620
-
2621
-
2622
-
2623
-
2624
-
2625
-
2626
-
2627
-
2628
-
2629
-
2630
-
2631
-
2632
-
2633
-
2634
-
2635
-
2636
-
2637
-
2638
-
2639
-
2640
-
2641
-
2642
-
2643
-
2644
-
2645
-
2646
-
2647
-
2648
-
2649
-
2650
-
2651
-
2652
-
2653
-
2654
-
2655
-
2656
-
2657
- exports.Logo = Logo; exports.Dialog = Dialog; exports.KpiCard = KpiCard; exports.AgentAvatar = AgentAvatar; exports.NumberedList = NumberedList; exports.resolveDrawerWidth = resolveDrawerWidth; exports.Drawer = Drawer; exports.MetaField = MetaField; exports.ScrollableRow = ScrollableRow; exports.SectionRow = SectionRow; exports.GRADIENT_PALETTE_COUNT = GRADIENT_PALETTE_COUNT; exports.GradientSurface = GradientSurface; exports.DefinitionRow = DefinitionRow; exports.PanelDialog = PanelDialog; exports.SplitDialogContent = SplitDialogContent; exports.ListItemText = _material.ListItemText; exports.ListItemIcon = _material.ListItemIcon; exports.ListItemSecondaryAction = _material.ListItemSecondaryAction; exports.List = List; exports.ListItem = ListItem; exports.Avatar = Avatar; exports.Table = Table; exports.TableHeader = TableHeader; exports.Grid2 = _material.Grid2; exports.Breadcrumbs = Breadcrumbs; exports.Accordion = Accordion; exports.Paper = Paper; exports.Divider = Divider3; exports.Stack = _material.Stack; exports.Box = _material.Box; exports.Container = _material.Container; exports.Toolbar = _material.Toolbar; exports.AppBar = AppBar; exports.Collapse = Collapse; exports.EntityHeader = EntityHeader; exports.DeploymentDashboardCard = DeploymentDashboardCard; exports.DeploymentEntityContextMenu = DeploymentEntityContextMenu; exports.contextMenuItems = contextMenuItems; exports.DeploymentDashboardTree = DeploymentDashboardTree; exports.DeploymentDashboardPanel = DeploymentDashboardPanel; exports.WorkflowTopBar = WorkflowTopBar; exports.WorkflowSideInspector = WorkflowSideInspector; exports.WorkflowTimeBar = WorkflowTimeBar;
2658
- //# sourceMappingURL=chunk-HLH2VWXL.js.map