@adoptai/genui-components 0.1.33 → 0.1.45

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 (113) hide show
  1. package/README.md +5 -0
  2. package/dist/builders/BuilderForm.d.ts +16 -1
  3. package/dist/builders/BuilderForm.d.ts.map +1 -1
  4. package/dist/builders/EscalationCard.d.ts +6 -1
  5. package/dist/builders/EscalationCard.d.ts.map +1 -1
  6. package/dist/builders/FieldRenderer.d.ts +5 -1
  7. package/dist/builders/FieldRenderer.d.ts.map +1 -1
  8. package/dist/builders/FormBuilder.d.ts +7 -1
  9. package/dist/builders/FormBuilder.d.ts.map +1 -1
  10. package/dist/builders/StepperBuilder.d.ts +6 -1
  11. package/dist/builders/StepperBuilder.d.ts.map +1 -1
  12. package/dist/builders/fields.d.ts +5 -1
  13. package/dist/builders/fields.d.ts.map +1 -1
  14. package/dist/builders/resolver.d.ts +11 -0
  15. package/dist/builders/resolver.d.ts.map +1 -1
  16. package/dist/composites/aging-report/resolver.cjs +1 -1
  17. package/dist/composites/aging-report/resolver.cjs.map +1 -1
  18. package/dist/composites/aging-report/resolver.js +1 -1
  19. package/dist/composites/aging-report/resolver.js.map +1 -1
  20. package/dist/composites/balance-sheet/resolver.cjs +1 -1
  21. package/dist/composites/balance-sheet/resolver.cjs.map +1 -1
  22. package/dist/composites/balance-sheet/resolver.js +1 -1
  23. package/dist/composites/balance-sheet/resolver.js.map +1 -1
  24. package/dist/composites/connect-integration/resolver.cjs +465 -0
  25. package/dist/composites/connect-integration/resolver.cjs.map +1 -0
  26. package/dist/composites/connect-integration/resolver.js +463 -0
  27. package/dist/composites/connect-integration/resolver.js.map +1 -0
  28. package/dist/composites/entity-card-grid/resolver.cjs +2 -2
  29. package/dist/composites/entity-card-grid/resolver.cjs.map +1 -1
  30. package/dist/composites/entity-card-grid/resolver.js +2 -2
  31. package/dist/composites/entity-card-grid/resolver.js.map +1 -1
  32. package/dist/composites/general-ledger/resolver.cjs +1 -0
  33. package/dist/composites/general-ledger/resolver.cjs.map +1 -1
  34. package/dist/composites/general-ledger/resolver.d.ts.map +1 -1
  35. package/dist/composites/general-ledger/resolver.js +1 -0
  36. package/dist/composites/general-ledger/resolver.js.map +1 -1
  37. package/dist/composites/income-statement/resolver.cjs +1 -1
  38. package/dist/composites/income-statement/resolver.cjs.map +1 -1
  39. package/dist/composites/income-statement/resolver.js +1 -1
  40. package/dist/composites/income-statement/resolver.js.map +1 -1
  41. package/dist/composites/integrations-list/resolver.cjs +511 -0
  42. package/dist/composites/integrations-list/resolver.cjs.map +1 -0
  43. package/dist/composites/integrations-list/resolver.js +509 -0
  44. package/dist/composites/integrations-list/resolver.js.map +1 -0
  45. package/dist/composites/key-value-list/resolver.cjs +28 -3
  46. package/dist/composites/key-value-list/resolver.cjs.map +1 -1
  47. package/dist/composites/key-value-list/resolver.d.ts.map +1 -1
  48. package/dist/composites/key-value-list/resolver.js +28 -3
  49. package/dist/composites/key-value-list/resolver.js.map +1 -1
  50. package/dist/composites/pipeline-preview/resolver.cjs +926 -0
  51. package/dist/composites/pipeline-preview/resolver.cjs.map +1 -0
  52. package/dist/composites/pipeline-preview/resolver.js +924 -0
  53. package/dist/composites/pipeline-preview/resolver.js.map +1 -0
  54. package/dist/composites/reconciliation-view/resolver.cjs +90 -32
  55. package/dist/composites/reconciliation-view/resolver.cjs.map +1 -1
  56. package/dist/composites/reconciliation-view/resolver.d.ts.map +1 -1
  57. package/dist/composites/reconciliation-view/resolver.js +91 -33
  58. package/dist/composites/reconciliation-view/resolver.js.map +1 -1
  59. package/dist/composites/stacked-breakdown/resolver.cjs +13 -2
  60. package/dist/composites/stacked-breakdown/resolver.cjs.map +1 -1
  61. package/dist/composites/stacked-breakdown/resolver.d.ts.map +1 -1
  62. package/dist/composites/stacked-breakdown/resolver.js +13 -2
  63. package/dist/composites/stacked-breakdown/resolver.js.map +1 -1
  64. package/dist/composites/stat-grid/resolver.cjs +83 -5
  65. package/dist/composites/stat-grid/resolver.cjs.map +1 -1
  66. package/dist/composites/stat-grid/resolver.d.ts.map +1 -1
  67. package/dist/composites/stat-grid/resolver.js +84 -6
  68. package/dist/composites/stat-grid/resolver.js.map +1 -1
  69. package/dist/composites/trial-balance/resolver.cjs +1 -1
  70. package/dist/composites/trial-balance/resolver.cjs.map +1 -1
  71. package/dist/composites/trial-balance/resolver.js +1 -1
  72. package/dist/composites/trial-balance/resolver.js.map +1 -1
  73. package/dist/composites/variance-analysis/resolver.cjs +1 -1
  74. package/dist/composites/variance-analysis/resolver.cjs.map +1 -1
  75. package/dist/composites/variance-analysis/resolver.js +1 -1
  76. package/dist/composites/variance-analysis/resolver.js.map +1 -1
  77. package/dist/composites/workflow-stepper/resolver.cjs +976 -0
  78. package/dist/composites/workflow-stepper/resolver.cjs.map +1 -0
  79. package/dist/composites/workflow-stepper/resolver.d.ts +20 -0
  80. package/dist/composites/workflow-stepper/resolver.d.ts.map +1 -0
  81. package/dist/composites/workflow-stepper/resolver.js +969 -0
  82. package/dist/composites/workflow-stepper/resolver.js.map +1 -0
  83. package/dist/index.cjs +1182 -275
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.d.ts +7 -0
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/index.js +1019 -120
  88. package/dist/index.js.map +1 -1
  89. package/dist/renderer.cjs +1067 -211
  90. package/dist/renderer.cjs.map +1 -1
  91. package/dist/renderer.js +929 -73
  92. package/dist/renderer.js.map +1 -1
  93. package/dist/resolver.cjs +1066 -210
  94. package/dist/resolver.cjs.map +1 -1
  95. package/dist/resolver.d.ts.map +1 -1
  96. package/dist/resolver.js +929 -73
  97. package/dist/resolver.js.map +1 -1
  98. package/dist/schemas/index.cjs +75 -1
  99. package/dist/schemas/index.cjs.map +1 -1
  100. package/dist/schemas/index.d.ts +122 -0
  101. package/dist/schemas/index.d.ts.map +1 -1
  102. package/dist/schemas/index.js +75 -1
  103. package/dist/schemas/index.js.map +1 -1
  104. package/dist/schemas/workflow-stepper.d.ts +122 -0
  105. package/dist/schemas/workflow-stepper.d.ts.map +1 -0
  106. package/dist/shared/FitText.d.ts +22 -0
  107. package/dist/shared/FitText.d.ts.map +1 -0
  108. package/dist/shared/InteractionContext.d.ts +20 -0
  109. package/dist/shared/InteractionContext.d.ts.map +1 -0
  110. package/dist/shared/styles.d.ts +14 -0
  111. package/dist/shared/styles.d.ts.map +1 -0
  112. package/dist/tool-definitions.json +114 -3
  113. package/package.json +2 -2
@@ -0,0 +1,969 @@
1
+ "use client";
2
+ import React4, { createContext, useContext, useState, useRef, useCallback, useEffect } from 'react';
3
+ import { toPng } from 'html-to-image';
4
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __defProps = Object.defineProperties;
8
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+
26
+ // src/shared/theme.ts
27
+ var BORDER = "#dedede";
28
+ var MUTED = "#777777";
29
+ var PAPER = "#f6f6f6";
30
+ var ACCENT = "#ff5000";
31
+ var ACCENT_SOFT = "#cc4000";
32
+ var SECONDARY = "#0364ff";
33
+ var CHART_PALETTE = [
34
+ "#ff5000",
35
+ "#0364ff",
36
+ "#16a34a",
37
+ "#dc2626",
38
+ "#7c3aed",
39
+ "#0891b2",
40
+ "#f59e0b",
41
+ "#6366f1",
42
+ "#ec4899",
43
+ "#84cc16",
44
+ "#e11d48",
45
+ "#0ea5e9"
46
+ ];
47
+ function ColumnSettingsPanel({ columns, hidden, onToggle, onShowAll, onHideAll }) {
48
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "6px", minWidth: "180px" }, children: [
49
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", paddingBottom: "4px", borderBottom: `1px solid ${BORDER}` }, children: [
50
+ /* @__PURE__ */ jsx(
51
+ "button",
52
+ {
53
+ onClick: onShowAll,
54
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: ACCENT, fontWeight: 500, padding: 0 },
55
+ children: "Show all"
56
+ }
57
+ ),
58
+ /* @__PURE__ */ jsx(
59
+ "button",
60
+ {
61
+ onClick: onHideAll,
62
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: MUTED, fontWeight: 500, padding: 0 },
63
+ children: "Hide all"
64
+ }
65
+ )
66
+ ] }),
67
+ columns.map((col) => /* @__PURE__ */ jsxs(
68
+ "label",
69
+ {
70
+ style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", fontSize: "12px", color: "var(--foreground)" },
71
+ children: [
72
+ /* @__PURE__ */ jsx(
73
+ "input",
74
+ {
75
+ type: "checkbox",
76
+ checked: !hidden.has(col.key),
77
+ onChange: () => onToggle(col.key),
78
+ style: { accentColor: ACCENT, width: "14px", height: "14px", margin: 0, cursor: "pointer" }
79
+ }
80
+ ),
81
+ col.label
82
+ ]
83
+ },
84
+ col.key
85
+ ))
86
+ ] });
87
+ }
88
+ var DOT_COLOR = "#aaaaaa";
89
+ var DOT_HOVER = "#555555";
90
+ function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "component" }) {
91
+ const [open, setOpen] = useState(false);
92
+ const [view, setView] = useState("main");
93
+ const contentRef = useRef(null);
94
+ const menuRef = useRef(null);
95
+ const btnRef = useRef(null);
96
+ const close = useCallback(() => {
97
+ setOpen(false);
98
+ setView("main");
99
+ }, []);
100
+ useEffect(() => {
101
+ if (!open) return;
102
+ const handler = (e) => {
103
+ var _a, _b;
104
+ if ((_a = menuRef.current) == null ? void 0 : _a.contains(e.target)) return;
105
+ if ((_b = btnRef.current) == null ? void 0 : _b.contains(e.target)) return;
106
+ close();
107
+ };
108
+ document.addEventListener("mousedown", handler);
109
+ return () => document.removeEventListener("mousedown", handler);
110
+ }, [open, close]);
111
+ const handleDownloadPNG = useCallback(async () => {
112
+ if (!contentRef.current) return;
113
+ try {
114
+ const url = await toPng(contentRef.current, { backgroundColor: "white", pixelRatio: 2 });
115
+ const a = document.createElement("a");
116
+ a.href = url;
117
+ a.download = `${filename}.png`;
118
+ a.click();
119
+ } catch (e) {
120
+ }
121
+ close();
122
+ }, [filename, close]);
123
+ const handleCSV = useCallback(() => {
124
+ onDownloadCSV == null ? void 0 : onDownloadCSV();
125
+ close();
126
+ }, [onDownloadCSV, close]);
127
+ return /* @__PURE__ */ jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column" }, children: [
128
+ /* @__PURE__ */ jsx("div", { ref: contentRef, style: { width: "100%" }, children }),
129
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: "4px", position: "relative", zIndex: 10, flexShrink: 0 }, children: [
130
+ /* @__PURE__ */ jsx(
131
+ "button",
132
+ {
133
+ ref: btnRef,
134
+ onClick: () => {
135
+ setOpen((o) => !o);
136
+ setView("main");
137
+ },
138
+ "aria-label": "Component actions",
139
+ style: {
140
+ background: "none",
141
+ border: "none",
142
+ cursor: "pointer",
143
+ padding: "4px 8px",
144
+ display: "flex",
145
+ gap: "3px",
146
+ alignItems: "center",
147
+ borderRadius: "6px",
148
+ transition: "background 0.15s"
149
+ },
150
+ onMouseEnter: (e) => {
151
+ e.currentTarget.style.background = "#f2f2f2";
152
+ e.currentTarget.querySelectorAll("circle").forEach((c) => c.style.fill = DOT_HOVER);
153
+ },
154
+ onMouseLeave: (e) => {
155
+ e.currentTarget.style.background = "none";
156
+ e.currentTarget.querySelectorAll("circle").forEach((c) => c.style.fill = DOT_COLOR);
157
+ },
158
+ children: /* @__PURE__ */ jsxs("svg", { width: "20", height: "6", viewBox: "0 0 20 6", children: [
159
+ /* @__PURE__ */ jsx("circle", { cx: "3", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } }),
160
+ /* @__PURE__ */ jsx("circle", { cx: "10", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } }),
161
+ /* @__PURE__ */ jsx("circle", { cx: "17", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } })
162
+ ] })
163
+ }
164
+ ),
165
+ open && /* @__PURE__ */ jsx(
166
+ "div",
167
+ {
168
+ ref: menuRef,
169
+ style: {
170
+ position: "absolute",
171
+ bottom: "100%",
172
+ right: 0,
173
+ marginBottom: "4px",
174
+ background: "white",
175
+ border: `1px solid ${BORDER}`,
176
+ borderRadius: "0.75rem",
177
+ boxShadow: "0 4px 12px rgba(0,0,0,0.06)",
178
+ zIndex: 50,
179
+ padding: view === "columns" ? "10px" : "4px",
180
+ minWidth: view === "columns" ? "200px" : "160px"
181
+ },
182
+ children: view === "main" ? /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
183
+ columnConfig && /* @__PURE__ */ jsx(MenuButton, { label: "Customize columns", onClick: () => setView("columns") }),
184
+ onDownloadCSV && /* @__PURE__ */ jsx(MenuButton, { label: "Download CSV", onClick: handleCSV }),
185
+ /* @__PURE__ */ jsx(MenuButton, { label: "Download PNG", onClick: handleDownloadPNG })
186
+ ] }) : /* @__PURE__ */ jsxs("div", { children: [
187
+ /* @__PURE__ */ jsx(
188
+ "button",
189
+ {
190
+ onClick: () => setView("main"),
191
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: MUTED, marginBottom: "6px", padding: 0 },
192
+ children: "\u2190 Back"
193
+ }
194
+ ),
195
+ /* @__PURE__ */ jsx(
196
+ ColumnSettingsPanel,
197
+ {
198
+ columns: columnConfig.columns,
199
+ hidden: columnConfig.hidden,
200
+ onToggle: columnConfig.onToggle,
201
+ onShowAll: columnConfig.onShowAll,
202
+ onHideAll: columnConfig.onHideAll
203
+ }
204
+ )
205
+ ] })
206
+ }
207
+ )
208
+ ] })
209
+ ] });
210
+ }
211
+ function MenuButton({ label, onClick }) {
212
+ return /* @__PURE__ */ jsx(
213
+ "button",
214
+ {
215
+ onClick,
216
+ style: {
217
+ background: "none",
218
+ border: "none",
219
+ cursor: "pointer",
220
+ padding: "8px 12px",
221
+ fontSize: "12.5px",
222
+ color: "var(--foreground)",
223
+ textAlign: "left",
224
+ borderRadius: "8px",
225
+ transition: "background 0.15s",
226
+ whiteSpace: "nowrap"
227
+ },
228
+ onMouseEnter: (e) => e.currentTarget.style.background = "#f2f2f2",
229
+ onMouseLeave: (e) => e.currentTarget.style.background = "none",
230
+ children: label
231
+ }
232
+ );
233
+ }
234
+ var DEFAULT_TOKENS = {
235
+ BORDER,
236
+ MUTED,
237
+ PAPER,
238
+ ACCENT,
239
+ ACCENT_SOFT,
240
+ SECONDARY,
241
+ CHART_PALETTE: [...CHART_PALETTE]
242
+ };
243
+ var GenUIThemeContext = createContext(DEFAULT_TOKENS);
244
+ function useTheme() {
245
+ return useContext(GenUIThemeContext);
246
+ }
247
+ var DEFAULT_INTERACTION = {
248
+ selectedStepId: null,
249
+ onStepSelect: void 0
250
+ };
251
+ var GenUIInteractionContext = createContext(DEFAULT_INTERACTION);
252
+ function useGenUIInteraction() {
253
+ return useContext(GenUIInteractionContext);
254
+ }
255
+ var STATUS_COLORS = {
256
+ done: "#15803d",
257
+ active: "",
258
+ // filled from theme ACCENT at render time
259
+ review: "#f59e0b",
260
+ pending: "#9ca3af",
261
+ failed: "#dc2626"
262
+ };
263
+ var STATUS_LABELS = {
264
+ done: "Complete",
265
+ active: "In progress",
266
+ review: "In review",
267
+ pending: "Pending",
268
+ failed: "Failed"
269
+ };
270
+ var HUMAN_PALETTE = ["#2563eb", "#0f766e", "#7c3aed", "#b45309", "#be185d", "#4d7c0f"];
271
+ function hashColor(name) {
272
+ let h = 0;
273
+ for (let i = 0; i < name.length; i++) h = h * 31 + name.charCodeAt(i) | 0;
274
+ return HUMAN_PALETTE[Math.abs(h) % HUMAN_PALETTE.length];
275
+ }
276
+ function initialsOf(a) {
277
+ var _a, _b, _c, _d;
278
+ if (a.initials) return a.initials.slice(0, 2).toUpperCase();
279
+ const parts = a.name.trim().split(/\s+/);
280
+ return (((_b = (_a = parts[0]) == null ? void 0 : _a[0]) != null ? _b : "") + ((_d = (_c = parts[1]) == null ? void 0 : _c[0]) != null ? _d : "")).toUpperCase() || "?";
281
+ }
282
+ function SparkMark({ size, color }) {
283
+ return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
284
+ "path",
285
+ {
286
+ d: "M12 2C12 2 12.8 6.5 14.5 9.5C16.2 12.5 20 13 20 13C20 13 16.2 13.5 14.5 16.5C12.8 19.5 12 24 12 24C12 24 11.2 19.5 9.5 16.5C7.8 13.5 4 13 4 13C4 13 7.8 12.5 9.5 9.5C11.2 6.5 12 2 12 2Z",
287
+ fill: color
288
+ }
289
+ ) });
290
+ }
291
+ function AvatarStack({ assignees, accent }) {
292
+ const shown = assignees.slice(0, 4);
293
+ const overflow = assignees.length - shown.length;
294
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
295
+ shown.map((a, i) => {
296
+ const isAgent = a.kind === "agent";
297
+ const bg = isAgent ? `${accent}1f` : a.color || hashColor(a.name);
298
+ return /* @__PURE__ */ jsx(
299
+ "div",
300
+ {
301
+ title: `${a.name}${a.role ? ` \xB7 ${a.role}` : isAgent ? " \xB7 agent" : ""}`,
302
+ style: {
303
+ width: 20,
304
+ height: 20,
305
+ borderRadius: "50%",
306
+ flexShrink: 0,
307
+ marginLeft: i === 0 ? 0 : -7,
308
+ zIndex: shown.length - i,
309
+ display: "flex",
310
+ alignItems: "center",
311
+ justifyContent: "center",
312
+ background: bg,
313
+ border: "1.5px solid white",
314
+ boxShadow: isAgent ? `inset 0 0 0 1px ${accent}59` : "none"
315
+ },
316
+ children: isAgent ? /* @__PURE__ */ jsx(SparkMark, { size: 11, color: accent }) : /* @__PURE__ */ jsx("span", { style: { fontSize: 8, fontWeight: 700, color: "white", letterSpacing: "0.02em" }, children: initialsOf(a) })
317
+ },
318
+ `${a.name}-${i}`
319
+ );
320
+ }),
321
+ overflow > 0 && /* @__PURE__ */ jsxs(
322
+ "span",
323
+ {
324
+ style: {
325
+ marginLeft: -7,
326
+ zIndex: 0,
327
+ width: 20,
328
+ height: 20,
329
+ borderRadius: "50%",
330
+ background: "#f2f2f2",
331
+ border: "1.5px solid white",
332
+ display: "flex",
333
+ alignItems: "center",
334
+ justifyContent: "center",
335
+ fontSize: 8,
336
+ fontWeight: 700,
337
+ color: "#777777"
338
+ },
339
+ children: [
340
+ "+",
341
+ overflow
342
+ ]
343
+ }
344
+ )
345
+ ] });
346
+ }
347
+ function IndexDot({ step, index, accent }) {
348
+ var _a;
349
+ const n = (_a = step.n) != null ? _a : index + 1;
350
+ const base = {
351
+ width: 18,
352
+ height: 18,
353
+ borderRadius: "50%",
354
+ flexShrink: 0,
355
+ display: "flex",
356
+ alignItems: "center",
357
+ justifyContent: "center",
358
+ fontSize: 10,
359
+ fontWeight: 700,
360
+ lineHeight: 1
361
+ };
362
+ if (step.status === "done") {
363
+ return /* @__PURE__ */ jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#15803d", color: "white" }), children: /* @__PURE__ */ jsx("span", { style: { fontSize: 10 }, children: "\u2713" }) });
364
+ }
365
+ if (step.status === "failed") {
366
+ return /* @__PURE__ */ jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#dc2626", color: "white" }), children: /* @__PURE__ */ jsx("span", { style: { fontSize: 10 }, children: "!" }) });
367
+ }
368
+ if (step.status === "active") {
369
+ return /* @__PURE__ */ jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: accent, color: "white" }), children: n });
370
+ }
371
+ if (step.status === "review") {
372
+ return /* @__PURE__ */ jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "white", border: "1.5px solid #f59e0b", color: "#b45309" }), children: n });
373
+ }
374
+ return /* @__PURE__ */ jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#f2f2f2", color: "#9ca3af" }), children: n });
375
+ }
376
+ var CARD_MIN = 132;
377
+ var CARD_GAP = 16;
378
+ var AUTO_COMPACT_BELOW = 360;
379
+ function useContainerWidth(ref) {
380
+ const [w, setW] = React4.useState(0);
381
+ React4.useLayoutEffect(() => {
382
+ const el = ref.current;
383
+ if (!el || typeof ResizeObserver === "undefined") return;
384
+ const ro = new ResizeObserver((entries) => {
385
+ var _a;
386
+ const cr = (_a = entries[0]) == null ? void 0 : _a.contentRect;
387
+ if (cr) setW(cr.width);
388
+ });
389
+ ro.observe(el);
390
+ setW(el.getBoundingClientRect().width);
391
+ return () => ro.disconnect();
392
+ }, [ref]);
393
+ return w;
394
+ }
395
+ var KEYFRAMES = `
396
+ @keyframes wfsPulse{0%,100%{opacity:1}50%{opacity:.35}}
397
+ @keyframes wfsLampPulse{0%,100%{box-shadow:0 0 0 0 var(--wfs-accent,#6366f1)73}50%{box-shadow:0 0 0 4px transparent}}
398
+ @keyframes wfsRise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
399
+ @keyframes wfsShimmer{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}
400
+ .wfs-rise{animation:wfsRise 0.32s cubic-bezier(0.22,1,0.36,1) both}
401
+ @media (prefers-reduced-motion: reduce){
402
+ .wfs-anim,.wfs-rise,.wfs-shim{animation:none !important}
403
+ .wfs-rise{opacity:1 !important;transform:none !important}
404
+ }`;
405
+ function ProgressMeter({
406
+ done,
407
+ total,
408
+ accent,
409
+ muted,
410
+ loading
411
+ }) {
412
+ const pct = total > 0 ? Math.round(done / total * 100) : 0;
413
+ return /* @__PURE__ */ jsxs(
414
+ "div",
415
+ {
416
+ "data-testid": "workflow-stepper-progress",
417
+ style: { display: "flex", alignItems: "center", gap: 8, padding: "0 2px 6px" },
418
+ children: [
419
+ /* @__PURE__ */ jsx(
420
+ "span",
421
+ {
422
+ style: {
423
+ fontSize: 10.5,
424
+ fontWeight: 600,
425
+ color: muted,
426
+ fontVariantNumeric: "tabular-nums",
427
+ letterSpacing: "0.01em",
428
+ whiteSpace: "nowrap"
429
+ },
430
+ children: loading ? "\u2014" : `${done} / ${total} \xB7 ${pct}%`
431
+ }
432
+ ),
433
+ /* @__PURE__ */ jsx(
434
+ "span",
435
+ {
436
+ style: {
437
+ flex: 1,
438
+ height: 3,
439
+ borderRadius: 3,
440
+ background: "#eceff4",
441
+ overflow: "hidden",
442
+ minWidth: 40
443
+ },
444
+ children: /* @__PURE__ */ jsx(
445
+ "span",
446
+ {
447
+ className: loading ? "wfs-shim" : void 0,
448
+ style: {
449
+ display: "block",
450
+ height: "100%",
451
+ width: loading ? "100%" : `${pct}%`,
452
+ borderRadius: 3,
453
+ background: loading ? `linear-gradient(90deg, #eceff4, ${accent}55, #eceff4)` : accent,
454
+ backgroundSize: loading ? "200px 100%" : void 0,
455
+ animation: loading ? "wfsShimmer 1.1s linear infinite" : void 0,
456
+ transition: "width 0.45s cubic-bezier(0.22,1,0.36,1)"
457
+ }
458
+ }
459
+ )
460
+ }
461
+ )
462
+ ]
463
+ }
464
+ );
465
+ }
466
+ function WorkflowStepperRenderer({
467
+ data,
468
+ selectedStep = null,
469
+ onSelectStep,
470
+ density = "auto",
471
+ loading = false,
472
+ loadingSteps = 6,
473
+ showProgress = true
474
+ }) {
475
+ var _a, _b, _c, _d, _e, _f;
476
+ const { BORDER: BORDER2, MUTED: MUTED2, ACCENT: ACCENT2 } = useTheme();
477
+ const steps = (_a = data.steps) != null ? _a : [];
478
+ const activeStepId = (_d = (_c = data.active_step) != null ? _c : (_b = steps.find((s) => s.status === "active")) == null ? void 0 : _b.id) != null ? _d : null;
479
+ const interactive = typeof onSelectStep === "function";
480
+ const statusColor = (s) => s === "active" ? ACCENT2 : STATUS_COLORS[s];
481
+ const doneCount = steps.filter((s) => s.status === "done").length;
482
+ const rootRef = React4.useRef(null);
483
+ const containerW = useContainerWidth(rootRef);
484
+ let resolved = density === "auto" ? "full" : density;
485
+ if (density === "auto" && containerW > 0) {
486
+ const needed = steps.length * CARD_MIN + Math.max(0, steps.length - 1) * CARD_GAP;
487
+ resolved = containerW < AUTO_COMPACT_BELOW || needed > containerW * 1.6 ? "compact" : "full";
488
+ }
489
+ const scrollerRef = React4.useRef(null);
490
+ React4.useEffect(() => {
491
+ if (resolved !== "full" || loading) return;
492
+ const sc = scrollerRef.current;
493
+ if (!sc) return;
494
+ const el = sc.querySelector(
495
+ `[data-testid="workflow-stepper-step-${selectedStep != null ? selectedStep : activeStepId}"]`
496
+ );
497
+ if (el && sc.scrollWidth > sc.clientWidth) {
498
+ el.scrollIntoView({ inline: "center", block: "nearest", behavior: "smooth" });
499
+ }
500
+ }, [resolved, loading, selectedStep, activeStepId]);
501
+ const [edges, setEdges] = React4.useState({
502
+ left: false,
503
+ right: false
504
+ });
505
+ const updateEdges = React4.useCallback(() => {
506
+ const sc = scrollerRef.current;
507
+ if (!sc) return;
508
+ const max = sc.scrollWidth - sc.clientWidth;
509
+ const sl = sc.scrollLeft;
510
+ const left = sl > 1;
511
+ const right = sl < max - 1;
512
+ setEdges((prev) => prev.left === left && prev.right === right ? prev : { left, right });
513
+ }, []);
514
+ React4.useLayoutEffect(() => {
515
+ if (resolved !== "full" || loading) return;
516
+ updateEdges();
517
+ const sc = scrollerRef.current;
518
+ if (!sc || typeof ResizeObserver === "undefined") return;
519
+ const ro = new ResizeObserver(updateEdges);
520
+ ro.observe(sc);
521
+ return () => ro.disconnect();
522
+ }, [resolved, loading, steps.length, updateEdges]);
523
+ const edgeMask = edges.left || edges.right ? `linear-gradient(90deg, ${edges.left ? "transparent 0, #000 14px" : "#000 0"}, ${edges.right ? "#000 calc(100% - 14px), transparent 100%" : "#000 100%"})` : void 0;
524
+ const themeStyle = { ["--wfs-accent"]: ACCENT2 };
525
+ if (loading) {
526
+ const ghosts = Array.from({ length: Math.max(2, loadingSteps) });
527
+ return /* @__PURE__ */ jsxs("div", { "data-testid": "workflow-stepper-loading", style: __spreadValues({ width: "100%", minWidth: 0 }, themeStyle), children: [
528
+ /* @__PURE__ */ jsx("style", { children: KEYFRAMES }),
529
+ showProgress && /* @__PURE__ */ jsx(ProgressMeter, { done: 0, total: 0, accent: ACCENT2, muted: MUTED2, loading: true }),
530
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "stretch", gap: CARD_GAP, padding: "2px 2px 6px", overflow: "hidden" }, children: ghosts.map((_, i) => /* @__PURE__ */ jsx(
531
+ "div",
532
+ {
533
+ className: "wfs-shim",
534
+ "aria-hidden": "true",
535
+ style: {
536
+ flex: "0 1 168px",
537
+ minWidth: CARD_MIN,
538
+ height: 84,
539
+ borderRadius: 10,
540
+ border: `1px solid ${BORDER2}`,
541
+ background: `linear-gradient(90deg, #f4f6f9, #eceff4 40%, #f4f6f9 80%)`,
542
+ backgroundSize: "200px 100%",
543
+ animation: "wfsShimmer 1.1s linear infinite",
544
+ animationDelay: `${i * 0.08}s`
545
+ }
546
+ },
547
+ i
548
+ )) })
549
+ ] });
550
+ }
551
+ if (resolved === "compact") {
552
+ const activeStep = (_e = steps.find((s) => s.id === activeStepId)) != null ? _e : null;
553
+ return /* @__PURE__ */ jsxs(
554
+ "div",
555
+ {
556
+ ref: rootRef,
557
+ "data-testid": "workflow-stepper-compact",
558
+ style: __spreadValues({ width: "100%", minWidth: 0 }, themeStyle),
559
+ children: [
560
+ /* @__PURE__ */ jsx("style", { children: KEYFRAMES }),
561
+ showProgress && /* @__PURE__ */ jsx(ProgressMeter, { done: doneCount, total: steps.length, accent: ACCENT2, muted: MUTED2 }),
562
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, minWidth: 0 }, children: [
563
+ /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: steps.map((s, i) => {
564
+ const sel = selectedStep === s.id;
565
+ const act = s.status === "active";
566
+ const done = s.status === "done";
567
+ const reached = s.status !== "pending";
568
+ const clickable = interactive && reached;
569
+ const size = act ? 11 : done ? 9 : 8;
570
+ return /* @__PURE__ */ jsxs(React4.Fragment, { children: [
571
+ i > 0 && /* @__PURE__ */ jsx(
572
+ "span",
573
+ {
574
+ "aria-hidden": "true",
575
+ style: {
576
+ width: 14,
577
+ height: 1.5,
578
+ borderRadius: 1,
579
+ background: steps[i - 1].status === "done" ? "#15803d" : "#e5e7eb",
580
+ transition: "background 0.36s ease-out"
581
+ }
582
+ }
583
+ ),
584
+ /* @__PURE__ */ jsx(
585
+ "button",
586
+ {
587
+ type: "button",
588
+ disabled: interactive && !reached,
589
+ "aria-disabled": interactive && !reached ? true : void 0,
590
+ title: `${s.title} \xB7 ${STATUS_LABELS[s.status]}`,
591
+ onClick: clickable ? () => onSelectStep == null ? void 0 : onSelectStep(sel ? null : s.id) : void 0,
592
+ "data-testid": `workflow-stepper-step-${s.id}`,
593
+ "data-status": s.status,
594
+ "data-reached": reached || void 0,
595
+ className: act ? "wfs-anim" : void 0,
596
+ style: {
597
+ position: "relative",
598
+ width: size,
599
+ height: size,
600
+ padding: 0,
601
+ borderRadius: "50%",
602
+ background: statusColor(s.status),
603
+ flexShrink: 0,
604
+ // border-box so the selected 2px border can't grow the dot
605
+ // and reflow the rail.
606
+ boxSizing: "border-box",
607
+ opacity: reached ? 1 : 0.55,
608
+ border: sel ? `2px solid ${ACCENT2}` : done ? "none" : "1px solid rgba(255,255,255,0.6)",
609
+ boxShadow: sel ? "0 0 0 2px #fff" : "none",
610
+ cursor: clickable ? "pointer" : "default",
611
+ transition: "width 0.15s, height 0.15s",
612
+ animation: act ? "wfsLampPulse 1.8s ease-in-out infinite" : "none"
613
+ }
614
+ }
615
+ )
616
+ ] }, s.id);
617
+ }) }),
618
+ activeStep && /* @__PURE__ */ jsxs(Fragment, { children: [
619
+ /* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: { width: 1, height: 16, background: "#e6eaf1", flexShrink: 0 } }),
620
+ /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: 7, minWidth: 0 }, children: [
621
+ /* @__PURE__ */ jsx(
622
+ "span",
623
+ {
624
+ "aria-hidden": "true",
625
+ style: {
626
+ width: 17,
627
+ height: 17,
628
+ borderRadius: "50%",
629
+ flexShrink: 0,
630
+ display: "flex",
631
+ alignItems: "center",
632
+ justifyContent: "center",
633
+ fontSize: 9.5,
634
+ fontWeight: 700,
635
+ lineHeight: 1,
636
+ background: activeStep.status === "done" ? "#15803d" : activeStep.status === "review" ? "#fff" : activeStep.status === "failed" ? "#dc2626" : ACCENT2,
637
+ color: activeStep.status === "review" ? "#b45309" : "#fff",
638
+ border: activeStep.status === "review" ? "1.5px solid #f59e0b" : "none"
639
+ },
640
+ children: activeStep.status === "done" ? "\u2713" : activeStep.status === "failed" ? "!" : (_f = activeStep.n) != null ? _f : steps.findIndex((x) => x.id === activeStep.id) + 1
641
+ }
642
+ ),
643
+ /* @__PURE__ */ jsxs(
644
+ "span",
645
+ {
646
+ style: {
647
+ fontSize: 12.5,
648
+ fontWeight: 650,
649
+ color: "var(--foreground)",
650
+ letterSpacing: "-0.01em",
651
+ whiteSpace: "nowrap",
652
+ overflow: "hidden",
653
+ textOverflow: "ellipsis",
654
+ minWidth: 0
655
+ },
656
+ children: [
657
+ activeStep.title,
658
+ activeStep.sub ? /* @__PURE__ */ jsxs("span", { style: { fontWeight: 400, color: MUTED2 }, children: [
659
+ " \xB7 ",
660
+ activeStep.sub
661
+ ] }) : null
662
+ ]
663
+ }
664
+ )
665
+ ] })
666
+ ] })
667
+ ] })
668
+ ]
669
+ }
670
+ );
671
+ }
672
+ return /* @__PURE__ */ jsxs("div", { ref: rootRef, "data-testid": "workflow-stepper", style: __spreadValues({ width: "100%", minWidth: 0 }, themeStyle), children: [
673
+ /* @__PURE__ */ jsx("style", { children: KEYFRAMES }),
674
+ showProgress && /* @__PURE__ */ jsx(ProgressMeter, { done: doneCount, total: steps.length, accent: ACCENT2, muted: MUTED2 }),
675
+ /* @__PURE__ */ jsxs(
676
+ "div",
677
+ {
678
+ ref: scrollerRef,
679
+ className: "wfs-scroller",
680
+ onScroll: updateEdges,
681
+ style: {
682
+ display: "flex",
683
+ alignItems: "stretch",
684
+ overflowX: "auto",
685
+ scrollSnapType: "x proximity",
686
+ padding: "2px 2px 4px",
687
+ // Thin, always-styled scrollbar (Firefox + Windows/desktop WebKit
688
+ // where overlay scrollbars aren't available). macOS/mobile show
689
+ // overlay scrollbars on scroll; harmless either way.
690
+ scrollbarWidth: "thin",
691
+ scrollbarColor: "#c2c9d6 transparent",
692
+ // Edge fade ONLY on the side(s) with hidden content — never when the
693
+ // row isn't scrollable, so the last card's right edge stays crisp.
694
+ maskImage: edgeMask,
695
+ WebkitMaskImage: edgeMask
696
+ },
697
+ children: [
698
+ /* @__PURE__ */ jsx("style", { children: `
699
+ .wfs-scroller::-webkit-scrollbar{height:8px}
700
+ .wfs-scroller::-webkit-scrollbar-track{background:transparent}
701
+ .wfs-scroller::-webkit-scrollbar-thumb{background:#c2c9d6;border-radius:8px;border:2px solid transparent;background-clip:padding-box}
702
+ .wfs-scroller:hover::-webkit-scrollbar-thumb{background:#aab2c2;background-clip:padding-box}
703
+ ` }),
704
+ steps.map((step, i) => {
705
+ var _a2;
706
+ const isSelected = selectedStep === step.id;
707
+ const isActive = step.status === "active";
708
+ const reached = step.status !== "pending";
709
+ const clickable = interactive && reached;
710
+ const color = statusColor(step.status);
711
+ const humans = ((_a2 = step.assignees) != null ? _a2 : []).filter((a) => a.kind === "human");
712
+ const roleCaption = humans.map((h) => h.role).filter(Boolean).slice(0, 2).join(" \xB7 ");
713
+ return /* @__PURE__ */ jsxs(React4.Fragment, { children: [
714
+ i > 0 && /* @__PURE__ */ jsx(
715
+ "div",
716
+ {
717
+ style: {
718
+ width: CARD_GAP,
719
+ flexShrink: 0,
720
+ display: "flex",
721
+ alignItems: "center"
722
+ },
723
+ "aria-hidden": "true",
724
+ children: /* @__PURE__ */ jsx(
725
+ "div",
726
+ {
727
+ style: {
728
+ width: "100%",
729
+ height: 1.5,
730
+ borderRadius: 1,
731
+ // Fill sweep: completed rails wash green left→right.
732
+ background: steps[i - 1].status === "done" ? "linear-gradient(90deg, #15803d, #15803d)" : "#e5e7eb",
733
+ backgroundSize: "100% 100%",
734
+ transition: "background 0.36s ease-out"
735
+ }
736
+ }
737
+ )
738
+ }
739
+ ),
740
+ /* @__PURE__ */ jsxs(
741
+ "div",
742
+ {
743
+ role: clickable ? "button" : void 0,
744
+ tabIndex: clickable ? 0 : void 0,
745
+ "aria-disabled": interactive && !reached ? true : void 0,
746
+ className: "wfs-rise",
747
+ "data-testid": `workflow-stepper-step-${step.id}`,
748
+ "data-status": step.status,
749
+ "data-selected": isSelected || void 0,
750
+ "data-reached": reached || void 0,
751
+ onClick: clickable ? () => onSelectStep == null ? void 0 : onSelectStep(isSelected ? null : step.id) : void 0,
752
+ onKeyDown: clickable ? (e) => {
753
+ if (e.key === "Enter" || e.key === " ") {
754
+ e.preventDefault();
755
+ onSelectStep == null ? void 0 : onSelectStep(isSelected ? null : step.id);
756
+ }
757
+ } : void 0,
758
+ onMouseEnter: clickable ? (e) => {
759
+ e.currentTarget.style.transform = "translateY(-1px)";
760
+ e.currentTarget.style.boxShadow = "0 3px 10px rgba(15,23,42,0.08)";
761
+ } : void 0,
762
+ onMouseLeave: clickable ? (e) => {
763
+ e.currentTarget.style.transform = "none";
764
+ e.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.04)";
765
+ } : void 0,
766
+ style: {
767
+ position: "relative",
768
+ flex: "0 1 168px",
769
+ minWidth: CARD_MIN,
770
+ maxWidth: 208,
771
+ scrollSnapAlign: "center",
772
+ borderRadius: 10,
773
+ boxSizing: "border-box",
774
+ // Selection changes border COLOR only (constant 1px width) so
775
+ // the card never reflows the row on click.
776
+ border: `1px solid ${isSelected ? ACCENT2 : BORDER2}`,
777
+ background: isSelected ? `${ACCENT2}0d` : "white",
778
+ boxShadow: "0 1px 2px rgba(0,0,0,0.04)",
779
+ padding: "10px 11px",
780
+ display: "flex",
781
+ flexDirection: "column",
782
+ gap: 7,
783
+ cursor: clickable ? "pointer" : "default",
784
+ opacity: reached ? 1 : 0.62,
785
+ transition: "border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.12s",
786
+ animationDelay: `${Math.min(i, 10) * 0.04}s`,
787
+ overflow: "hidden"
788
+ },
789
+ children: [
790
+ isActive && !isSelected && /* @__PURE__ */ jsx(
791
+ "span",
792
+ {
793
+ style: {
794
+ position: "absolute",
795
+ left: 0,
796
+ top: 6,
797
+ bottom: 6,
798
+ width: 2,
799
+ borderRadius: 2,
800
+ background: ACCENT2
801
+ }
802
+ }
803
+ ),
804
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
805
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
806
+ /* @__PURE__ */ jsx(IndexDot, { step, index: i, accent: ACCENT2 }),
807
+ /* @__PURE__ */ jsx(
808
+ "span",
809
+ {
810
+ className: isActive ? "wfs-anim" : void 0,
811
+ style: {
812
+ width: 6,
813
+ height: 6,
814
+ borderRadius: "50%",
815
+ background: color,
816
+ animation: isActive ? "wfsLampPulse 1.8s ease-in-out infinite" : "none"
817
+ }
818
+ }
819
+ )
820
+ ] }),
821
+ /* @__PURE__ */ jsx(
822
+ "span",
823
+ {
824
+ style: {
825
+ fontSize: 9,
826
+ fontWeight: 600,
827
+ letterSpacing: "0.05em",
828
+ textTransform: "uppercase",
829
+ color
830
+ },
831
+ children: STATUS_LABELS[step.status]
832
+ }
833
+ )
834
+ ] }),
835
+ /* @__PURE__ */ jsxs("div", { style: { minWidth: 0 }, children: [
836
+ /* @__PURE__ */ jsx(
837
+ "div",
838
+ {
839
+ style: {
840
+ fontSize: 12.5,
841
+ fontWeight: 600,
842
+ color: "var(--foreground)",
843
+ lineHeight: 1.25,
844
+ letterSpacing: "-0.01em",
845
+ overflow: "hidden",
846
+ textOverflow: "ellipsis",
847
+ whiteSpace: "nowrap"
848
+ },
849
+ children: step.title
850
+ }
851
+ ),
852
+ step.sub && /* @__PURE__ */ jsx(
853
+ "div",
854
+ {
855
+ style: {
856
+ fontSize: 10.5,
857
+ color: MUTED2,
858
+ marginTop: 2,
859
+ overflow: "hidden",
860
+ textOverflow: "ellipsis",
861
+ whiteSpace: "nowrap"
862
+ },
863
+ children: step.sub
864
+ }
865
+ )
866
+ ] }),
867
+ /* @__PURE__ */ jsxs(
868
+ "div",
869
+ {
870
+ style: {
871
+ display: "flex",
872
+ alignItems: "center",
873
+ justifyContent: "space-between",
874
+ marginTop: "auto",
875
+ minHeight: 20
876
+ },
877
+ children: [
878
+ step.assignees && step.assignees.length > 0 ? /* @__PURE__ */ jsx(AvatarStack, { assignees: step.assignees, accent: ACCENT2 }) : /* @__PURE__ */ jsx("span", {}),
879
+ roleCaption && /* @__PURE__ */ jsx(
880
+ "span",
881
+ {
882
+ style: {
883
+ fontSize: 9,
884
+ color: "#9ca3af",
885
+ fontWeight: 500,
886
+ textAlign: "right",
887
+ maxWidth: 76,
888
+ lineHeight: 1.2,
889
+ overflow: "hidden"
890
+ },
891
+ children: roleCaption
892
+ }
893
+ )
894
+ ]
895
+ }
896
+ )
897
+ ]
898
+ }
899
+ )
900
+ ] }, step.id);
901
+ })
902
+ ]
903
+ }
904
+ )
905
+ ] });
906
+ }
907
+ function WorkflowStepperResolver(p) {
908
+ var _a;
909
+ const { selectedStepId, onStepSelect } = useGenUIInteraction();
910
+ return /* @__PURE__ */ jsx(ComponentActions, { filename: (_a = p.title) != null ? _a : "workflow-stepper", children: /* @__PURE__ */ jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: 10 }, children: [
911
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, flexWrap: "wrap" }, children: [
912
+ /* @__PURE__ */ jsx(
913
+ "p",
914
+ {
915
+ style: {
916
+ fontFamily: "var(--font-serif)",
917
+ fontSize: "15px",
918
+ fontWeight: 400,
919
+ color: "var(--foreground)",
920
+ letterSpacing: "-0.01em",
921
+ margin: 0
922
+ },
923
+ children: p.title
924
+ }
925
+ ),
926
+ p.period && /* @__PURE__ */ jsx(
927
+ "span",
928
+ {
929
+ style: {
930
+ fontSize: 11,
931
+ fontWeight: 600,
932
+ padding: "2px 8px",
933
+ borderRadius: 9999,
934
+ background: "#f2f2f2",
935
+ color: "#777777",
936
+ fontVariantNumeric: "tabular-nums"
937
+ },
938
+ children: p.period
939
+ }
940
+ ),
941
+ p.badge && /* @__PURE__ */ jsx(
942
+ "span",
943
+ {
944
+ style: {
945
+ fontSize: 11,
946
+ fontWeight: 600,
947
+ padding: "2px 8px",
948
+ borderRadius: 9999,
949
+ border: "1px solid #dedede",
950
+ color: "#777777"
951
+ },
952
+ children: p.badge
953
+ }
954
+ )
955
+ ] }),
956
+ /* @__PURE__ */ jsx(
957
+ WorkflowStepperRenderer,
958
+ {
959
+ data: p,
960
+ selectedStep: selectedStepId,
961
+ onSelectStep: onStepSelect
962
+ }
963
+ )
964
+ ] }) });
965
+ }
966
+
967
+ export { WorkflowStepperRenderer, WorkflowStepperResolver };
968
+ //# sourceMappingURL=resolver.js.map
969
+ //# sourceMappingURL=resolver.js.map