@humain/ui 2.1.63 → 2.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/organisms/ai/AIToolCall/AIToolCall.d.ts +9 -3
- package/dist/components/organisms/ai/AIToolRun/index.d.ts +1 -1
- package/dist/components/organisms/ai/AIToolRun/validation.d.ts +24 -3
- package/dist/components/organisms/ai/_shared/format-ai-duration.d.ts +1 -0
- package/dist/components/organisms/ai/_shared/workflow-step-renderer.d.ts +1 -0
- package/dist/index.js +52 -52
- package/dist/index151.js +1 -1
- package/dist/index174.js +7 -339
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +310 -137
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +148 -174
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +186 -78
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +74 -124
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +133 -1
- package/dist/index179.js.map +1 -0
- package/dist/index180.js +2 -201
- package/dist/index181.js +201 -0
- package/dist/{index180.js.map → index181.js.map} +1 -1
- package/dist/index183.js +130 -166
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +195 -983
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +1069 -369
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +395 -197
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +198 -243
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +263 -3
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +3 -209
- package/dist/index189.js.map +1 -1
- package/dist/index190.js +190 -777
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +771 -252
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +250 -65
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +72 -523
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +537 -144
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +139 -720
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +707 -167
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +175 -151
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +152 -487
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +472 -225
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +236 -260
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +265 -215
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +207 -307
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +302 -135
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +140 -271
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +263 -253
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +244 -137
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +100 -238
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +278 -74
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +56 -97
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +142 -47
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +38 -84
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +72 -252
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +274 -26
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +29 -94
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +98 -25
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +20 -565
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +564 -17
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +20 -23
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +20 -95
- package/dist/index219.js.map +1 -1
- package/dist/index220.js +92 -88
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +97 -29
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +24 -470
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +446 -196
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +199 -729
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +750 -61
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +58 -181
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +175 -259
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +246 -172
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +195 -32
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +12 -40
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +23 -26
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +45 -22
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +27 -48
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +52 -26
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +40 -225
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +217 -39
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +50 -0
- package/dist/index237.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/wc/AIToolCall.js +218 -0
- package/dist/wc/AIToolCall.js.map +1 -0
- package/dist/wc/hf-ai-tool-call.js +34 -219
- package/dist/wc/hf-ai-tool-call.js.map +1 -1
- package/dist/wc/hf-ai-tool-run.js +673 -576
- package/dist/wc/hf-ai-tool-run.js.map +1 -1
- package/dist/wc/workflow-step-renderer.js +79 -78
- package/dist/wc/workflow-step-renderer.js.map +1 -1
- package/dist/wc-react/AIToolCall.js +218 -0
- package/dist/wc-react/AIToolCall.js.map +1 -0
- package/dist/wc-react/hf-ai-tool-call.js +32 -217
- package/dist/wc-react/hf-ai-tool-call.js.map +1 -1
- package/dist/wc-react/hf-ai-tool-run.js +698 -601
- package/dist/wc-react/hf-ai-tool-run.js.map +1 -1
- package/dist/wc-react/workflow-step-renderer.js +58 -57
- package/dist/wc-react/workflow-step-renderer.js.map +1 -1
- package/package.json +1 -1
- package/skills/humain-ui/SKILL.md +1 -1
- package/skills/humain-ui-wc/SKILL.md +1 -1
- package/skills/humain-ui-wc.skill +0 -0
- package/skills/humain-ui.skill +0 -0
- package/dist/index182.js +0 -143
- package/dist/index182.js.map +0 -1
- package/dist/wc/wrench.js +0 -10
- package/dist/wc/wrench.js.map +0 -1
- package/dist/wc-react/wrench.js +0 -10
- package/dist/wc-react/wrench.js.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { a as q } from "./rolldown-runtime.js";
|
|
2
|
-
import { i as
|
|
2
|
+
import { i as L, t as $ } from "./vendor/react.js";
|
|
3
3
|
import { n as f, t as R } from "./utils.js";
|
|
4
4
|
import { t as W } from "./createLucideIcon.js";
|
|
5
|
-
import { t as
|
|
5
|
+
import { t as A } from "./check.js";
|
|
6
6
|
import { t as V } from "./chevron-down.js";
|
|
7
7
|
import { t as P } from "./chevron-right.js";
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
8
|
+
import { t as M } from "./circle-alert.js";
|
|
9
|
+
import { t as B } from "./react.js";
|
|
10
|
+
import { t as F } from "./AnimatePresence.js";
|
|
11
11
|
import { t as K } from "./use-reduced-motion.js";
|
|
12
|
-
import { t as
|
|
12
|
+
import { t as E } from "./dist.js";
|
|
13
13
|
var O = [
|
|
14
14
|
["path", {
|
|
15
15
|
d: "M12 2v4",
|
|
@@ -57,25 +57,30 @@ var O = [
|
|
|
57
57
|
height: "18",
|
|
58
58
|
rx: "1",
|
|
59
59
|
key: "1wsw3u"
|
|
60
|
-
}]], G = W("pause", U),
|
|
60
|
+
}]], G = W("pause", U), l = /* @__PURE__ */ q(L(), 1);
|
|
61
|
+
function H(e) {
|
|
62
|
+
const r = Math.max(0, Math.round(e / 1e3)), a = Math.floor(r / 3600), n = Math.floor(r % 3600 / 60), o = r % 60;
|
|
63
|
+
return a > 0 ? [a ? `${a}h` : "", n ? `${n}m` : ""].filter(Boolean).join(" ") : n > 0 ? `${n}m${o ? ` ${o}s` : ""}` : `${r}s`;
|
|
64
|
+
}
|
|
65
|
+
var t = $(), J = {
|
|
61
66
|
pending: "text-muted-foreground",
|
|
62
67
|
running: "text-primary",
|
|
63
68
|
suspended: "text-warning",
|
|
64
69
|
completed: "text-success",
|
|
65
70
|
error: "text-destructive"
|
|
66
|
-
},
|
|
71
|
+
}, Q = {
|
|
67
72
|
pending: "bg-accent text-muted-foreground",
|
|
68
73
|
running: "bg-primary/20 text-primary",
|
|
69
74
|
suspended: "bg-warning/20 text-warning",
|
|
70
75
|
completed: "bg-success/20 text-success",
|
|
71
76
|
error: "bg-destructive/20 text-destructive"
|
|
72
|
-
}, I =
|
|
73
|
-
variants: { status: H },
|
|
74
|
-
defaultVariants: { status: "pending" }
|
|
75
|
-
}), Q = _("size-5 shrink-0 flex items-center justify-center rounded-full", {
|
|
77
|
+
}, I = E("flex items-start gap-3 px-4 py-3 transition-colors motion-reduce:transition-none", {
|
|
76
78
|
variants: { status: J },
|
|
77
79
|
defaultVariants: { status: "pending" }
|
|
78
|
-
}), X = {
|
|
80
|
+
}), X = E("size-5 shrink-0 flex items-center justify-center rounded-full", {
|
|
81
|
+
variants: { status: Q },
|
|
82
|
+
defaultVariants: { status: "pending" }
|
|
83
|
+
}), Y = {
|
|
79
84
|
contained: {
|
|
80
85
|
rootClassName: "relative",
|
|
81
86
|
hasDivider: !0,
|
|
@@ -92,22 +97,12 @@ var O = [
|
|
|
92
97
|
hasConnector: !0
|
|
93
98
|
}
|
|
94
99
|
};
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
-
return r.flatMap((n) =>
|
|
100
|
+
function j(e, r) {
|
|
101
|
+
const a = new Set(e);
|
|
102
|
+
return r.flatMap((n) => a.has(n.id) ? [n.id] : []);
|
|
98
103
|
}
|
|
99
|
-
function
|
|
100
|
-
return e.length === r.length && e.every((
|
|
101
|
-
}
|
|
102
|
-
function Z(e) {
|
|
103
|
-
if (e < 1e3) return `${e}ms`;
|
|
104
|
-
if (e < 6e4) return `${(e / 1e3).toFixed(1)}s`;
|
|
105
|
-
const r = Math.floor(e / 1e3), s = Math.floor(r / 3600), n = Math.floor(r % 3600 / 60), o = r % 60;
|
|
106
|
-
return [
|
|
107
|
-
s > 0 ? `${s}h` : null,
|
|
108
|
-
n > 0 ? `${n}m` : null,
|
|
109
|
-
o > 0 ? `${o}s` : null
|
|
110
|
-
].filter((l) => l !== null).join(" ");
|
|
104
|
+
function Z(e, r) {
|
|
105
|
+
return e.length === r.length && e.every((a, n) => a === r[n]);
|
|
111
106
|
}
|
|
112
107
|
function ee(e) {
|
|
113
108
|
return typeof e == "object" && e !== null && Symbol.iterator in e && typeof e[Symbol.iterator] == "function";
|
|
@@ -117,14 +112,14 @@ function te(e) {
|
|
|
117
112
|
}
|
|
118
113
|
var z = /* @__PURE__ */ new WeakMap();
|
|
119
114
|
function re(e, r) {
|
|
120
|
-
const
|
|
115
|
+
const a = [];
|
|
121
116
|
let n = !1, o = !Array.isArray(e);
|
|
122
|
-
for (let
|
|
123
|
-
const u = S(
|
|
124
|
-
|
|
117
|
+
for (let c = r.next(); !c.done; c = r.next()) {
|
|
118
|
+
const u = S(c.value);
|
|
119
|
+
a.push(u.content), n ||= u.hasRenderableContent, o ||= u.changed;
|
|
125
120
|
}
|
|
126
121
|
return {
|
|
127
|
-
content: o ?
|
|
122
|
+
content: o ? a : e,
|
|
128
123
|
hasRenderableContent: n,
|
|
129
124
|
changed: o
|
|
130
125
|
};
|
|
@@ -140,27 +135,27 @@ function S(e) {
|
|
|
140
135
|
hasRenderableContent: !0,
|
|
141
136
|
changed: !1
|
|
142
137
|
};
|
|
143
|
-
if (
|
|
144
|
-
if (e.type !==
|
|
138
|
+
if (l.isValidElement(e)) {
|
|
139
|
+
if (e.type !== l.Fragment) return {
|
|
145
140
|
content: e,
|
|
146
141
|
hasRenderableContent: !0,
|
|
147
142
|
changed: !1
|
|
148
143
|
};
|
|
149
144
|
const r = S(e.props.children);
|
|
150
145
|
return {
|
|
151
|
-
content: r.changed ?
|
|
146
|
+
content: r.changed ? l.cloneElement(e, void 0, r.content) : e,
|
|
152
147
|
hasRenderableContent: r.hasRenderableContent,
|
|
153
148
|
changed: r.changed
|
|
154
149
|
};
|
|
155
150
|
}
|
|
156
151
|
if (ee(e)) {
|
|
157
|
-
const r = e[Symbol.iterator](),
|
|
158
|
-
if (
|
|
159
|
-
const o = z.get(
|
|
152
|
+
const r = e[Symbol.iterator](), a = te(r) ? r : null;
|
|
153
|
+
if (a !== null) {
|
|
154
|
+
const o = z.get(a);
|
|
160
155
|
if (o !== void 0) return o;
|
|
161
156
|
}
|
|
162
157
|
const n = re(e, r);
|
|
163
|
-
return
|
|
158
|
+
return a !== null && z.set(a, n), n;
|
|
164
159
|
}
|
|
165
160
|
return {
|
|
166
161
|
content: e,
|
|
@@ -171,7 +166,7 @@ function S(e) {
|
|
|
171
166
|
function ne(e) {
|
|
172
167
|
return e?.trim() ? e : void 0;
|
|
173
168
|
}
|
|
174
|
-
function
|
|
169
|
+
function ae(e) {
|
|
175
170
|
switch (e) {
|
|
176
171
|
case "pending":
|
|
177
172
|
return "Pending";
|
|
@@ -187,8 +182,8 @@ function se(e) {
|
|
|
187
182
|
return R(e);
|
|
188
183
|
}
|
|
189
184
|
}
|
|
190
|
-
function
|
|
191
|
-
const n = f(
|
|
185
|
+
function _({ status: e, index: r, className: a }) {
|
|
186
|
+
const n = f(X({ status: e }), a);
|
|
192
187
|
switch (e) {
|
|
193
188
|
case "pending":
|
|
194
189
|
return /* @__PURE__ */ (0, t.jsx)("div", {
|
|
@@ -215,41 +210,46 @@ function M({ status: e, index: r, className: s }) {
|
|
|
215
210
|
return /* @__PURE__ */ (0, t.jsx)("div", {
|
|
216
211
|
"data-slot": "workflow-step-icon",
|
|
217
212
|
className: f(n, "delight-check-bounce motion-reduce:!animate-none"),
|
|
218
|
-
children: /* @__PURE__ */ (0, t.jsx)(
|
|
213
|
+
children: /* @__PURE__ */ (0, t.jsx)(A, { className: "size-3" })
|
|
219
214
|
});
|
|
220
215
|
case "error":
|
|
221
216
|
return /* @__PURE__ */ (0, t.jsx)("div", {
|
|
222
217
|
"data-slot": "workflow-step-icon",
|
|
223
218
|
className: f(n, "delight-shake motion-reduce:!animate-none"),
|
|
224
|
-
children: /* @__PURE__ */ (0, t.jsx)(
|
|
219
|
+
children: /* @__PURE__ */ (0, t.jsx)(M, { className: "size-3" })
|
|
225
220
|
});
|
|
226
221
|
default:
|
|
227
222
|
return R(e);
|
|
228
223
|
}
|
|
229
224
|
}
|
|
230
|
-
|
|
231
|
-
function D({ step: e, index: r, isLast:
|
|
232
|
-
const k =
|
|
233
|
-
/* @__PURE__ */ (0, t.jsx)(
|
|
225
|
+
_.displayName = "WorkflowStepStatusIcon";
|
|
226
|
+
function D({ step: e, index: r, isLast: a, appearance: n = "contained", itemSlot: o = "workflow-step-item", expandable: c = !0, expanded: u, active: b = !1, onExpandedChange: C }) {
|
|
227
|
+
const k = l.useId(), d = l.useId(), p = S(e.content), y = p.hasRenderableContent, h = ne(e.error), m = h !== void 0, x = y || m, v = x && c, N = K(), g = Y[n], i = { duration: N ? 0 : 0.2 }, s = /* @__PURE__ */ (0, t.jsxs)(t.Fragment, { children: [
|
|
228
|
+
/* @__PURE__ */ (0, t.jsx)(_, {
|
|
234
229
|
status: e.status,
|
|
235
230
|
index: r
|
|
236
231
|
}),
|
|
237
232
|
/* @__PURE__ */ (0, t.jsxs)("div", {
|
|
238
233
|
className: "min-w-0 flex-1 text-start",
|
|
239
234
|
children: [/* @__PURE__ */ (0, t.jsxs)("div", {
|
|
240
|
-
className: "flex items-center gap-2",
|
|
235
|
+
className: "flex flex-wrap items-center gap-2",
|
|
241
236
|
children: [
|
|
237
|
+
e.contextLabel && /* @__PURE__ */ (0, t.jsx)("span", {
|
|
238
|
+
"data-slot": "workflow-step-context",
|
|
239
|
+
className: "rounded-full border border-border px-2 py-0.5 text-[0.6875rem] font-medium leading-none text-secondary-foreground",
|
|
240
|
+
children: e.contextLabel
|
|
241
|
+
}),
|
|
242
242
|
/* @__PURE__ */ (0, t.jsx)("span", {
|
|
243
243
|
className: f("text-sm font-medium", e.status === "pending" ? "text-text-quaternary" : "text-foreground"),
|
|
244
244
|
children: e.title
|
|
245
245
|
}),
|
|
246
246
|
/* @__PURE__ */ (0, t.jsx)("span", {
|
|
247
247
|
className: "text-xs text-secondary-foreground",
|
|
248
|
-
children:
|
|
248
|
+
children: ae(e.status)
|
|
249
249
|
}),
|
|
250
250
|
e.durationMs !== void 0 && /* @__PURE__ */ (0, t.jsx)("span", {
|
|
251
251
|
className: "text-xs text-muted-foreground",
|
|
252
|
-
children:
|
|
252
|
+
children: H(e.durationMs)
|
|
253
253
|
})
|
|
254
254
|
]
|
|
255
255
|
}), e.description && /* @__PURE__ */ (0, t.jsx)("p", {
|
|
@@ -266,26 +266,26 @@ function D({ step: e, index: r, isLast: s, appearance: n = "contained", itemSlot
|
|
|
266
266
|
"data-slot": o,
|
|
267
267
|
"data-step-status": e.status,
|
|
268
268
|
"data-appearance": n,
|
|
269
|
-
className: f(g.rootClassName, g.hasDivider && !
|
|
269
|
+
className: f(g.rootClassName, g.hasDivider && !a && "border-b border-border"),
|
|
270
270
|
children: [
|
|
271
271
|
v ? /* @__PURE__ */ (0, t.jsx)("button", {
|
|
272
272
|
type: "button",
|
|
273
|
-
onClick:
|
|
273
|
+
onClick: C,
|
|
274
274
|
"aria-current": b ? "step" : void 0,
|
|
275
275
|
"aria-expanded": u,
|
|
276
276
|
"aria-controls": k,
|
|
277
277
|
"aria-describedby": m ? d : void 0,
|
|
278
278
|
className: f(I({ status: e.status }), "w-full cursor-pointer hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring"),
|
|
279
|
-
children:
|
|
279
|
+
children: s
|
|
280
280
|
}) : /* @__PURE__ */ (0, t.jsx)("div", {
|
|
281
281
|
"aria-current": b ? "step" : void 0,
|
|
282
282
|
"aria-describedby": m ? d : void 0,
|
|
283
283
|
className: f(I({ status: e.status }), "w-full"),
|
|
284
|
-
children:
|
|
284
|
+
children: s
|
|
285
285
|
}),
|
|
286
|
-
/* @__PURE__ */ (0, t.jsx)(
|
|
286
|
+
/* @__PURE__ */ (0, t.jsx)(F, {
|
|
287
287
|
initial: !1,
|
|
288
|
-
children: u && x && /* @__PURE__ */ (0, t.jsx)(
|
|
288
|
+
children: u && x && /* @__PURE__ */ (0, t.jsx)(B.div, {
|
|
289
289
|
id: k,
|
|
290
290
|
"data-slot": "workflow-step-panel",
|
|
291
291
|
initial: {
|
|
@@ -308,7 +308,7 @@ function D({ step: e, index: r, isLast: s, appearance: n = "contained", itemSlot
|
|
|
308
308
|
className: "rounded-lg border border-destructive/50 bg-destructive/10 p-3",
|
|
309
309
|
children: /* @__PURE__ */ (0, t.jsxs)("div", {
|
|
310
310
|
className: "flex items-start gap-2",
|
|
311
|
-
children: [/* @__PURE__ */ (0, t.jsx)(
|
|
311
|
+
children: [/* @__PURE__ */ (0, t.jsx)(M, { className: "mt-0.5 size-4 shrink-0 text-destructive" }), /* @__PURE__ */ (0, t.jsx)("p", {
|
|
312
312
|
className: "text-sm text-destructive",
|
|
313
313
|
children: h
|
|
314
314
|
})]
|
|
@@ -325,7 +325,7 @@ function D({ step: e, index: r, isLast: s, appearance: n = "contained", itemSlot
|
|
|
325
325
|
className: "sr-only",
|
|
326
326
|
children: h
|
|
327
327
|
}),
|
|
328
|
-
g.hasConnector && !
|
|
328
|
+
g.hasConnector && !a && /* @__PURE__ */ (0, t.jsx)("div", {
|
|
329
329
|
"data-slot": "workflow-step-connector",
|
|
330
330
|
"aria-hidden": "true",
|
|
331
331
|
className: "absolute top-8 -bottom-3 start-6 w-px bg-border"
|
|
@@ -334,33 +334,33 @@ function D({ step: e, index: r, isLast: s, appearance: n = "contained", itemSlot
|
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
D.displayName = "WorkflowStepItem";
|
|
337
|
-
function
|
|
338
|
-
const d =
|
|
339
|
-
|
|
337
|
+
function se({ steps: e, appearance: r = "contained", itemSlot: a = "workflow-step-item", expandable: n = !0, activeStepId: o, expandedStepIds: c, defaultExpandedStepIds: u = [], onExpandedStepIdsChange: b, className: C, renderItems: k = !0 }) {
|
|
338
|
+
const d = c !== void 0, p = d ? [...c] : void 0, [y, h] = l.useState(() => j(u, e)), m = l.useRef(p ?? []), x = l.useRef(d), v = j(d ? c : y, e), N = new Set(v);
|
|
339
|
+
l.useLayoutEffect(() => {
|
|
340
340
|
p !== void 0 && (m.current = p);
|
|
341
|
-
}, [p]),
|
|
341
|
+
}, [p]), l.useLayoutEffect(() => {
|
|
342
342
|
const i = x.current;
|
|
343
|
-
x.current = d, !d && h((
|
|
344
|
-
const w =
|
|
345
|
-
return
|
|
343
|
+
x.current = d, !d && h((s) => {
|
|
344
|
+
const w = j(i ? m.current : s, e);
|
|
345
|
+
return Z(w, s) ? s : w;
|
|
346
346
|
});
|
|
347
347
|
}, [d, e]);
|
|
348
348
|
const g = (i) => {
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
const w =
|
|
349
|
+
const s = new Set(v);
|
|
350
|
+
s.has(i) ? s.delete(i) : s.add(i);
|
|
351
|
+
const w = j([...s], e);
|
|
352
352
|
d || h([...w]), b?.([...w]);
|
|
353
353
|
};
|
|
354
354
|
return k ? /* @__PURE__ */ (0, t.jsx)("ol", {
|
|
355
355
|
"data-slot": "workflow-step-list",
|
|
356
356
|
"data-appearance": r,
|
|
357
|
-
className: f("m-0 list-none p-0",
|
|
358
|
-
children: e.map((i,
|
|
357
|
+
className: f("m-0 list-none p-0", C),
|
|
358
|
+
children: e.map((i, s) => /* @__PURE__ */ (0, t.jsx)("li", { children: /* @__PURE__ */ (0, t.jsx)(D, {
|
|
359
359
|
step: i,
|
|
360
|
-
index:
|
|
361
|
-
isLast:
|
|
360
|
+
index: s,
|
|
361
|
+
isLast: s === e.length - 1,
|
|
362
362
|
appearance: r,
|
|
363
|
-
itemSlot:
|
|
363
|
+
itemSlot: a,
|
|
364
364
|
expandable: n,
|
|
365
365
|
expanded: N.has(i.id),
|
|
366
366
|
active: o === i.id,
|
|
@@ -368,10 +368,11 @@ function ae({ steps: e, appearance: r = "contained", itemSlot: s = "workflow-ste
|
|
|
368
368
|
}) }, i.id))
|
|
369
369
|
}) : null;
|
|
370
370
|
}
|
|
371
|
-
|
|
371
|
+
se.displayName = "WorkflowStepRenderer";
|
|
372
372
|
export {
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
H as i,
|
|
374
|
+
se as n,
|
|
375
|
+
_ as r,
|
|
375
376
|
D as t
|
|
376
377
|
};
|
|
377
378
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-step-renderer.js","names":["__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.25.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/loader.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.25.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/pause.mjs","../../src/components/organisms/ai/_shared/workflow-step-renderer.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.25.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 2v4\", key: \"3427ic\" }],\n [\"path\", { d: \"m16.2 7.8 2.9-2.9\", key: \"r700ao\" }],\n [\"path\", { d: \"M18 12h4\", key: \"wj9ykh\" }],\n [\"path\", { d: \"m16.2 16.2 2.9 2.9\", key: \"1bxg5t\" }],\n [\"path\", { d: \"M12 18v4\", key: \"jadmvz\" }],\n [\"path\", { d: \"m4.9 19.1 2.9-2.9\", key: \"bwix9q\" }],\n [\"path\", { d: \"M2 12h4\", key: \"j09sii\" }],\n [\"path\", { d: \"m4.9 4.9 2.9 2.9\", key: \"giyufr\" }]\n];\nconst Loader = createLucideIcon(\"loader\", __iconNode);\n\nexport { __iconNode, Loader as default };\n//# sourceMappingURL=loader.mjs.map\n","/**\n * @license lucide-react v1.25.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { x: \"14\", y: \"3\", width: \"5\", height: \"18\", rx: \"1\", key: \"kaeet6\" }],\n [\"rect\", { x: \"5\", y: \"3\", width: \"5\", height: \"18\", rx: \"1\", key: \"1wsw3u\" }]\n];\nconst Pause = createLucideIcon(\"pause\", __iconNode);\n\nexport { __iconNode, Pause as default };\n//# sourceMappingURL=pause.mjs.map\n","import { cva } from 'class-variance-authority';\nimport {\n AlertCircle,\n Check,\n ChevronDown,\n ChevronRight,\n Loader,\n Pause,\n} from 'lucide-react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { assertNever, cn } from '@/lib/utils';\n\nexport type WorkflowStepStatus =\n | 'pending'\n | 'running'\n | 'suspended'\n | 'completed'\n | 'error';\n\nexport type WorkflowStepAppearance = 'contained' | 'embedded' | 'timeline';\n\nexport interface WorkflowStepViewModel {\n id: string;\n title: string;\n description?: string;\n status: WorkflowStepStatus;\n content?: React.ReactNode;\n durationMs?: number;\n error?: string;\n}\n\nexport interface WorkflowStepRendererProps {\n steps: readonly WorkflowStepViewModel[];\n appearance?: WorkflowStepAppearance;\n itemSlot?: string;\n expandable?: boolean;\n activeStepId?: string;\n expandedStepIds?: readonly string[];\n defaultExpandedStepIds?: readonly string[];\n onExpandedStepIdsChange?: (ids: readonly string[]) => void;\n className?: string;\n}\n\ninterface PrivateWorkflowStepRendererProps extends WorkflowStepRendererProps {\n renderItems?: boolean;\n}\n\nconst workflowStepItemStatusClasses = {\n pending: 'text-muted-foreground',\n running: 'text-primary',\n suspended: 'text-warning',\n completed: 'text-success',\n error: 'text-destructive',\n} as const satisfies Record<WorkflowStepStatus, string>;\n\nconst workflowStepIconStatusClasses = {\n pending: 'bg-accent text-muted-foreground',\n running: 'bg-primary/20 text-primary',\n suspended: 'bg-warning/20 text-warning',\n completed: 'bg-success/20 text-success',\n error: 'bg-destructive/20 text-destructive',\n} as const satisfies Record<WorkflowStepStatus, string>;\n\nexport const workflowStepItemVariants = cva(\n 'flex items-start gap-3 px-4 py-3 transition-colors motion-reduce:transition-none',\n {\n variants: {\n status: workflowStepItemStatusClasses,\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nexport const workflowStepIconVariants = cva(\n 'size-5 shrink-0 flex items-center justify-center rounded-full',\n {\n variants: {\n status: workflowStepIconStatusClasses,\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nconst workflowStepAppearanceConfig = {\n contained: {\n rootClassName: 'relative',\n hasDivider: true,\n hasConnector: false,\n },\n embedded: {\n rootClassName: 'relative',\n hasDivider: true,\n hasConnector: false,\n },\n timeline: {\n rootClassName: 'relative',\n hasDivider: false,\n hasConnector: true,\n },\n} as const satisfies Record<\n WorkflowStepAppearance,\n { rootClassName: string; hasDivider: boolean; hasConnector: boolean }\n>;\n\nexport function normalizeExpandedWorkflowStepIds(\n ids: readonly string[],\n steps: readonly WorkflowStepViewModel[],\n): string[] {\n const requested = new Set(ids);\n return steps.flatMap((step) => (requested.has(step.id) ? [step.id] : []));\n}\n\nfunction areWorkflowStepIdsEqual(\n left: readonly string[],\n right: readonly string[],\n): boolean {\n return (\n left.length === right.length &&\n left.every((id, index) => id === right[index])\n );\n}\n\nfunction formatWorkflowStepDuration(durationMs: number): string {\n if (durationMs < 1000) return `${durationMs}ms`;\n if (durationMs < 60_000) return `${(durationMs / 1000).toFixed(1)}s`;\n\n const totalSeconds = Math.floor(durationMs / 1000);\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = totalSeconds % 60;\n\n return [\n hours > 0 ? `${hours}h` : null,\n minutes > 0 ? `${minutes}m` : null,\n seconds > 0 ? `${seconds}s` : null,\n ]\n .filter((part): part is string => part !== null)\n .join(' ');\n}\n\nfunction isIterableWorkflowStepContent(\n content: React.ReactNode,\n): content is Iterable<React.ReactNode> {\n return (\n typeof content === 'object' &&\n content !== null &&\n Symbol.iterator in content &&\n typeof (content as Iterable<React.ReactNode>)[Symbol.iterator] ===\n 'function'\n );\n}\n\nfunction isIteratorWorkflowStepContent(\n content: unknown,\n): content is Iterator<React.ReactNode> {\n return (\n typeof (content as Partial<Iterator<React.ReactNode>>).next === 'function'\n );\n}\n\ninterface NormalizedWorkflowStepContent {\n content: React.ReactNode;\n hasRenderableContent: boolean;\n changed: boolean;\n}\n\nconst normalizedOneShotWorkflowStepContent = new WeakMap<\n object,\n NormalizedWorkflowStepContent\n>();\n\nfunction normalizeIterableWorkflowStepContent(\n content: Iterable<React.ReactNode>,\n iterator: Iterator<React.ReactNode>,\n): NormalizedWorkflowStepContent {\n const normalizedChildren: React.ReactNode[] = [];\n let hasRenderableContent = false;\n let changed = !Array.isArray(content);\n\n for (let result = iterator.next(); !result.done; result = iterator.next()) {\n const normalizedChild = normalizeWorkflowStepContent(result.value);\n normalizedChildren.push(normalizedChild.content);\n hasRenderableContent ||= normalizedChild.hasRenderableContent;\n changed ||= normalizedChild.changed;\n }\n\n return {\n content: changed ? normalizedChildren : content,\n hasRenderableContent,\n changed,\n };\n}\n\nfunction normalizeWorkflowStepContent(\n content: React.ReactNode,\n): NormalizedWorkflowStepContent {\n if (\n content === null ||\n content === undefined ||\n typeof content === 'boolean' ||\n content === ''\n ) {\n return { content, hasRenderableContent: false, changed: false };\n }\n\n if (\n typeof content === 'string' ||\n typeof content === 'number' ||\n typeof content === 'bigint'\n ) {\n return { content, hasRenderableContent: true, changed: false };\n }\n\n if (React.isValidElement<{ children?: React.ReactNode }>(content)) {\n if (content.type !== React.Fragment) {\n return { content, hasRenderableContent: true, changed: false };\n }\n\n const normalizedChildren = normalizeWorkflowStepContent(\n content.props.children,\n );\n return {\n content: normalizedChildren.changed\n ? React.cloneElement(content, undefined, normalizedChildren.content)\n : content,\n hasRenderableContent: normalizedChildren.hasRenderableContent,\n changed: normalizedChildren.changed,\n };\n }\n\n if (isIterableWorkflowStepContent(content)) {\n const iterator = content[Symbol.iterator]();\n const oneShotCacheKey = isIteratorWorkflowStepContent(iterator)\n ? (iterator as object)\n : null;\n\n if (oneShotCacheKey !== null) {\n const cached = normalizedOneShotWorkflowStepContent.get(oneShotCacheKey);\n if (cached !== undefined) return cached;\n }\n\n const normalized = normalizeIterableWorkflowStepContent(content, iterator);\n if (oneShotCacheKey !== null) {\n normalizedOneShotWorkflowStepContent.set(oneShotCacheKey, normalized);\n }\n return normalized;\n }\n\n return { content, hasRenderableContent: true, changed: false };\n}\n\nfunction getNonBlankWorkflowStepError(\n error: string | undefined,\n): string | undefined {\n return error?.trim() ? error : undefined;\n}\n\nfunction getWorkflowStepStatusLabel(status: WorkflowStepStatus): string {\n switch (status) {\n case 'pending':\n return 'Pending';\n case 'running':\n return 'Running';\n case 'suspended':\n return 'Paused';\n case 'completed':\n return 'Completed';\n case 'error':\n return 'Error';\n default:\n return assertNever(status);\n }\n}\n\nexport interface WorkflowStepStatusIconProps {\n status: WorkflowStepStatus;\n index: number;\n className?: string;\n}\n\nexport function WorkflowStepStatusIcon({\n status,\n index,\n className,\n}: WorkflowStepStatusIconProps) {\n const iconClass = cn(workflowStepIconVariants({ status }), className);\n\n switch (status) {\n case 'pending':\n return (\n <div data-slot=\"workflow-step-icon\" className={iconClass}>\n <span className=\"text-xs font-medium\">{index + 1}</span>\n </div>\n );\n case 'running':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(\n iconClass,\n 'delight-status-pulse motion-reduce:!animate-none',\n )}\n >\n <Loader className=\"size-3 animate-spin motion-reduce:animate-none\" />\n </div>\n );\n case 'suspended':\n return (\n <div data-slot=\"workflow-step-icon\" className={iconClass}>\n <Pause className=\"size-3\" />\n </div>\n );\n case 'completed':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(\n iconClass,\n 'delight-check-bounce motion-reduce:!animate-none',\n )}\n >\n <Check className=\"size-3\" />\n </div>\n );\n case 'error':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(iconClass, 'delight-shake motion-reduce:!animate-none')}\n >\n <AlertCircle className=\"size-3\" />\n </div>\n );\n default:\n return assertNever(status);\n }\n}\n\nWorkflowStepStatusIcon.displayName = 'WorkflowStepStatusIcon';\n\nexport interface WorkflowStepItemProps {\n step: WorkflowStepViewModel;\n index: number;\n isLast: boolean;\n appearance?: WorkflowStepAppearance;\n itemSlot?: string;\n expandable?: boolean;\n expanded: boolean;\n active?: boolean;\n onExpandedChange: () => void;\n}\n\nexport function WorkflowStepItem({\n step,\n index,\n isLast,\n appearance = 'contained',\n itemSlot = 'workflow-step-item',\n expandable = true,\n expanded,\n active = false,\n onExpandedChange,\n}: WorkflowStepItemProps) {\n const contentId = React.useId();\n const errorDescriptionId = React.useId();\n const normalizedContent = normalizeWorkflowStepContent(step.content);\n const hasContent = normalizedContent.hasRenderableContent;\n const error = getNonBlankWorkflowStepError(step.error);\n const hasError = error !== undefined;\n const hasExpandableDetails = hasContent || hasError;\n const isDisclosureControl = hasExpandableDetails && expandable;\n const prefersReducedMotion = useReducedMotion();\n const appearanceConfig = workflowStepAppearanceConfig[appearance];\n const disclosureTransition = {\n duration: prefersReducedMotion ? 0 : 0.2,\n };\n const stepContent = (\n <>\n <WorkflowStepStatusIcon status={step.status} index={index} />\n\n <div className=\"min-w-0 flex-1 text-start\">\n <div className=\"flex items-center gap-2\">\n <span\n className={cn(\n 'text-sm font-medium',\n step.status === 'pending'\n ? 'text-text-quaternary'\n : 'text-foreground',\n )}\n >\n {step.title}\n </span>\n <span className=\"text-xs text-secondary-foreground\">\n {getWorkflowStepStatusLabel(step.status)}\n </span>\n {step.durationMs !== undefined && (\n <span className=\"text-xs text-muted-foreground\">\n {formatWorkflowStepDuration(step.durationMs)}\n </span>\n )}\n </div>\n {step.description && (\n <p className=\"mt-0.5 text-xs text-text-quaternary\">\n {step.description}\n </p>\n )}\n </div>\n\n {isDisclosureControl && (\n <div className=\"shrink-0\">\n {expanded ? (\n <ChevronDown className=\"size-4 text-muted-foreground\" />\n ) : (\n <ChevronRight className=\"size-4 text-muted-foreground rtl:rotate-180\" />\n )}\n </div>\n )}\n </>\n );\n\n return (\n <div\n data-slot={itemSlot}\n data-step-status={step.status}\n data-appearance={appearance}\n className={cn(\n appearanceConfig.rootClassName,\n appearanceConfig.hasDivider && !isLast && 'border-b border-border',\n )}\n >\n {isDisclosureControl ? (\n <button\n type=\"button\"\n onClick={onExpandedChange}\n aria-current={active ? 'step' : undefined}\n aria-expanded={expanded}\n aria-controls={contentId}\n aria-describedby={hasError ? errorDescriptionId : undefined}\n className={cn(\n workflowStepItemVariants({ status: step.status }),\n 'w-full cursor-pointer hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring',\n )}\n >\n {stepContent}\n </button>\n ) : (\n <div\n aria-current={active ? 'step' : undefined}\n aria-describedby={hasError ? errorDescriptionId : undefined}\n className={cn(\n workflowStepItemVariants({ status: step.status }),\n 'w-full',\n )}\n >\n {stepContent}\n </div>\n )}\n\n <AnimatePresence initial={false}>\n {expanded && hasExpandableDetails && (\n <motion.div\n id={contentId}\n data-slot=\"workflow-step-panel\"\n initial={{ height: 0, opacity: 0 }}\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={disclosureTransition}\n className=\"overflow-hidden motion-reduce:transition-none\"\n >\n <div className=\"px-4 pb-3 ps-12\">\n {hasError && (\n <div className=\"rounded-lg border border-destructive/50 bg-destructive/10 p-3\">\n <div className=\"flex items-start gap-2\">\n <AlertCircle className=\"mt-0.5 size-4 shrink-0 text-destructive\" />\n <p className=\"text-sm text-destructive\">{error}</p>\n </div>\n </div>\n )}\n {hasContent && (\n <div className={hasError ? 'mt-3' : undefined}>\n {normalizedContent.content}\n </div>\n )}\n </div>\n </motion.div>\n )}\n </AnimatePresence>\n\n {hasError && (\n <span id={errorDescriptionId} className=\"sr-only\">\n {error}\n </span>\n )}\n\n {appearanceConfig.hasConnector && !isLast && (\n <div\n data-slot=\"workflow-step-connector\"\n aria-hidden=\"true\"\n className=\"absolute top-8 -bottom-3 start-6 w-px bg-border\"\n />\n )}\n </div>\n );\n}\n\nWorkflowStepItem.displayName = 'WorkflowStepItem';\n\nexport function WorkflowStepRenderer({\n steps,\n appearance = 'contained',\n itemSlot = 'workflow-step-item',\n expandable = true,\n activeStepId,\n expandedStepIds: controlledExpandedStepIds,\n defaultExpandedStepIds = [],\n onExpandedStepIdsChange,\n className,\n renderItems = true,\n}: PrivateWorkflowStepRendererProps) {\n const isControlled = controlledExpandedStepIds !== undefined;\n const controlledSnapshot = isControlled\n ? [...controlledExpandedStepIds]\n : undefined;\n const [uncontrolledExpandedStepIds, setUncontrolledExpandedStepIds] =\n React.useState<readonly string[]>(() =>\n normalizeExpandedWorkflowStepIds(defaultExpandedStepIds, steps),\n );\n const lastControlledExpandedStepIdsRef = React.useRef<readonly string[]>(\n controlledSnapshot ?? [],\n );\n const wasControlledRef = React.useRef(isControlled);\n const rawExpandedStepIds = isControlled\n ? controlledExpandedStepIds\n : uncontrolledExpandedStepIds;\n const visibleExpandedStepIds = normalizeExpandedWorkflowStepIds(\n rawExpandedStepIds,\n steps,\n );\n const expandedSet = new Set(visibleExpandedStepIds);\n\n React.useLayoutEffect(() => {\n if (controlledSnapshot !== undefined) {\n lastControlledExpandedStepIdsRef.current = controlledSnapshot;\n }\n }, [controlledSnapshot]);\n\n React.useLayoutEffect(() => {\n const wasControlled = wasControlledRef.current;\n wasControlledRef.current = isControlled;\n if (isControlled) return;\n\n setUncontrolledExpandedStepIds((current) => {\n const source = wasControlled\n ? lastControlledExpandedStepIdsRef.current\n : current;\n const reconciled = normalizeExpandedWorkflowStepIds(source, steps);\n return areWorkflowStepIdsEqual(reconciled, current)\n ? current\n : reconciled;\n });\n }, [isControlled, steps]);\n\n const toggleStep = (id: string) => {\n const next = new Set(visibleExpandedStepIds);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n const normalizedNext = normalizeExpandedWorkflowStepIds([...next], steps);\n if (!isControlled) {\n setUncontrolledExpandedStepIds([...normalizedNext]);\n }\n onExpandedStepIdsChange?.([...normalizedNext]);\n };\n\n if (!renderItems) return null;\n\n return (\n <ol\n data-slot=\"workflow-step-list\"\n data-appearance={appearance}\n className={cn('m-0 list-none p-0', className)}\n >\n {steps.map((step, index) => (\n <li key={step.id}>\n <WorkflowStepItem\n step={step}\n index={index}\n isLast={index === steps.length - 1}\n appearance={appearance}\n itemSlot={itemSlot}\n expandable={expandable}\n expanded={expandedSet.has(step.id)}\n active={activeStepId === step.id}\n onExpandedChange={() => toggleStep(step.id)}\n />\n </li>\n ))}\n </ol>\n );\n}\n\nWorkflowStepRenderer.displayName = 'WorkflowStepRenderer';\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;AASA,IAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AAAA,EACxC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAqB,KAAK;AAAA,EAAS,CAAC;AAAA,EAClD,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAY,KAAK;AAAA,EAAS,CAAC;AAAA,EACzC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAsB,KAAK;AAAA,EAAS,CAAC;AAAA,EACnD,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAY,KAAK;AAAA,EAAS,CAAC;AAAA,EACzC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAqB,KAAK;AAAA,EAAS,CAAC;AAAA,EAClD,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AAAA,EACxC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAoB,KAAK;AAAA,EAAS,CAAC;AACnD,GACM,IAAS,EAAiB,UAAUA,CAAU,GCV9C,IAAa,CACjB,CAAC,QAAQ;AAAA,EAAE,GAAG;AAAA,EAAM,GAAG;AAAA,EAAK,OAAO;AAAA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L;AAAA,EACC,CAAA,IAvBmB;AAyB3B;AAEA,GAAqB,cAAc"}
|
|
1
|
+
{"version":3,"file":"workflow-step-renderer.js","names":["__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.25.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/loader.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.25.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/pause.mjs","../../src/components/organisms/ai/_shared/format-ai-duration.ts","../../src/components/organisms/ai/_shared/workflow-step-renderer.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.25.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 2v4\", key: \"3427ic\" }],\n [\"path\", { d: \"m16.2 7.8 2.9-2.9\", key: \"r700ao\" }],\n [\"path\", { d: \"M18 12h4\", key: \"wj9ykh\" }],\n [\"path\", { d: \"m16.2 16.2 2.9 2.9\", key: \"1bxg5t\" }],\n [\"path\", { d: \"M12 18v4\", key: \"jadmvz\" }],\n [\"path\", { d: \"m4.9 19.1 2.9-2.9\", key: \"bwix9q\" }],\n [\"path\", { d: \"M2 12h4\", key: \"j09sii\" }],\n [\"path\", { d: \"m4.9 4.9 2.9 2.9\", key: \"giyufr\" }]\n];\nconst Loader = createLucideIcon(\"loader\", __iconNode);\n\nexport { __iconNode, Loader as default };\n//# sourceMappingURL=loader.mjs.map\n","/**\n * @license lucide-react v1.25.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"rect\", { x: \"14\", y: \"3\", width: \"5\", height: \"18\", rx: \"1\", key: \"kaeet6\" }],\n [\"rect\", { x: \"5\", y: \"3\", width: \"5\", height: \"18\", rx: \"1\", key: \"1wsw3u\" }]\n];\nconst Pause = createLucideIcon(\"pause\", __iconNode);\n\nexport { __iconNode, Pause as default };\n//# sourceMappingURL=pause.mjs.map\n","export function formatAIDuration(durationMs: number): string {\n const totalSeconds = Math.max(0, Math.round(durationMs / 1000));\n const hours = Math.floor(totalSeconds / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = totalSeconds % 60;\n\n if (hours > 0) {\n return [hours ? `${hours}h` : '', minutes ? `${minutes}m` : '']\n .filter(Boolean)\n .join(' ');\n }\n if (minutes > 0) {\n return `${minutes}m${seconds ? ` ${seconds}s` : ''}`;\n }\n return `${totalSeconds}s`;\n}\n","import { cva } from 'class-variance-authority';\nimport {\n AlertCircle,\n Check,\n ChevronDown,\n ChevronRight,\n Loader,\n Pause,\n} from 'lucide-react';\nimport { AnimatePresence, motion, useReducedMotion } from 'motion/react';\nimport * as React from 'react';\nimport { assertNever, cn } from '@/lib/utils';\nimport { formatAIDuration } from './format-ai-duration';\n\nexport type WorkflowStepStatus =\n | 'pending'\n | 'running'\n | 'suspended'\n | 'completed'\n | 'error';\n\nexport type WorkflowStepAppearance = 'contained' | 'embedded' | 'timeline';\n\nexport interface WorkflowStepViewModel {\n id: string;\n title: string;\n description?: string;\n contextLabel?: string;\n status: WorkflowStepStatus;\n content?: React.ReactNode;\n durationMs?: number;\n error?: string;\n}\n\nexport interface WorkflowStepRendererProps {\n steps: readonly WorkflowStepViewModel[];\n appearance?: WorkflowStepAppearance;\n itemSlot?: string;\n expandable?: boolean;\n activeStepId?: string;\n expandedStepIds?: readonly string[];\n defaultExpandedStepIds?: readonly string[];\n onExpandedStepIdsChange?: (ids: readonly string[]) => void;\n className?: string;\n}\n\ninterface PrivateWorkflowStepRendererProps extends WorkflowStepRendererProps {\n renderItems?: boolean;\n}\n\nconst workflowStepItemStatusClasses = {\n pending: 'text-muted-foreground',\n running: 'text-primary',\n suspended: 'text-warning',\n completed: 'text-success',\n error: 'text-destructive',\n} as const satisfies Record<WorkflowStepStatus, string>;\n\nconst workflowStepIconStatusClasses = {\n pending: 'bg-accent text-muted-foreground',\n running: 'bg-primary/20 text-primary',\n suspended: 'bg-warning/20 text-warning',\n completed: 'bg-success/20 text-success',\n error: 'bg-destructive/20 text-destructive',\n} as const satisfies Record<WorkflowStepStatus, string>;\n\nexport const workflowStepItemVariants = cva(\n 'flex items-start gap-3 px-4 py-3 transition-colors motion-reduce:transition-none',\n {\n variants: {\n status: workflowStepItemStatusClasses,\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nexport const workflowStepIconVariants = cva(\n 'size-5 shrink-0 flex items-center justify-center rounded-full',\n {\n variants: {\n status: workflowStepIconStatusClasses,\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nconst workflowStepAppearanceConfig = {\n contained: {\n rootClassName: 'relative',\n hasDivider: true,\n hasConnector: false,\n },\n embedded: {\n rootClassName: 'relative',\n hasDivider: true,\n hasConnector: false,\n },\n timeline: {\n rootClassName: 'relative',\n hasDivider: false,\n hasConnector: true,\n },\n} as const satisfies Record<\n WorkflowStepAppearance,\n { rootClassName: string; hasDivider: boolean; hasConnector: boolean }\n>;\n\nexport function normalizeExpandedWorkflowStepIds(\n ids: readonly string[],\n steps: readonly WorkflowStepViewModel[],\n): string[] {\n const requested = new Set(ids);\n return steps.flatMap((step) => (requested.has(step.id) ? [step.id] : []));\n}\n\nfunction areWorkflowStepIdsEqual(\n left: readonly string[],\n right: readonly string[],\n): boolean {\n return (\n left.length === right.length &&\n left.every((id, index) => id === right[index])\n );\n}\n\nfunction isIterableWorkflowStepContent(\n content: React.ReactNode,\n): content is Iterable<React.ReactNode> {\n return (\n typeof content === 'object' &&\n content !== null &&\n Symbol.iterator in content &&\n typeof (content as Iterable<React.ReactNode>)[Symbol.iterator] ===\n 'function'\n );\n}\n\nfunction isIteratorWorkflowStepContent(\n content: unknown,\n): content is Iterator<React.ReactNode> {\n return (\n typeof (content as Partial<Iterator<React.ReactNode>>).next === 'function'\n );\n}\n\ninterface NormalizedWorkflowStepContent {\n content: React.ReactNode;\n hasRenderableContent: boolean;\n changed: boolean;\n}\n\nconst normalizedOneShotWorkflowStepContent = new WeakMap<\n object,\n NormalizedWorkflowStepContent\n>();\n\nfunction normalizeIterableWorkflowStepContent(\n content: Iterable<React.ReactNode>,\n iterator: Iterator<React.ReactNode>,\n): NormalizedWorkflowStepContent {\n const normalizedChildren: React.ReactNode[] = [];\n let hasRenderableContent = false;\n let changed = !Array.isArray(content);\n\n for (let result = iterator.next(); !result.done; result = iterator.next()) {\n const normalizedChild = normalizeWorkflowStepContent(result.value);\n normalizedChildren.push(normalizedChild.content);\n hasRenderableContent ||= normalizedChild.hasRenderableContent;\n changed ||= normalizedChild.changed;\n }\n\n return {\n content: changed ? normalizedChildren : content,\n hasRenderableContent,\n changed,\n };\n}\n\nfunction normalizeWorkflowStepContent(\n content: React.ReactNode,\n): NormalizedWorkflowStepContent {\n if (\n content === null ||\n content === undefined ||\n typeof content === 'boolean' ||\n content === ''\n ) {\n return { content, hasRenderableContent: false, changed: false };\n }\n\n if (\n typeof content === 'string' ||\n typeof content === 'number' ||\n typeof content === 'bigint'\n ) {\n return { content, hasRenderableContent: true, changed: false };\n }\n\n if (React.isValidElement<{ children?: React.ReactNode }>(content)) {\n if (content.type !== React.Fragment) {\n return { content, hasRenderableContent: true, changed: false };\n }\n\n const normalizedChildren = normalizeWorkflowStepContent(\n content.props.children,\n );\n return {\n content: normalizedChildren.changed\n ? React.cloneElement(content, undefined, normalizedChildren.content)\n : content,\n hasRenderableContent: normalizedChildren.hasRenderableContent,\n changed: normalizedChildren.changed,\n };\n }\n\n if (isIterableWorkflowStepContent(content)) {\n const iterator = content[Symbol.iterator]();\n const oneShotCacheKey = isIteratorWorkflowStepContent(iterator)\n ? (iterator as object)\n : null;\n\n if (oneShotCacheKey !== null) {\n const cached = normalizedOneShotWorkflowStepContent.get(oneShotCacheKey);\n if (cached !== undefined) return cached;\n }\n\n const normalized = normalizeIterableWorkflowStepContent(content, iterator);\n if (oneShotCacheKey !== null) {\n normalizedOneShotWorkflowStepContent.set(oneShotCacheKey, normalized);\n }\n return normalized;\n }\n\n return { content, hasRenderableContent: true, changed: false };\n}\n\nfunction getNonBlankWorkflowStepError(\n error: string | undefined,\n): string | undefined {\n return error?.trim() ? error : undefined;\n}\n\nfunction getWorkflowStepStatusLabel(status: WorkflowStepStatus): string {\n switch (status) {\n case 'pending':\n return 'Pending';\n case 'running':\n return 'Running';\n case 'suspended':\n return 'Paused';\n case 'completed':\n return 'Completed';\n case 'error':\n return 'Error';\n default:\n return assertNever(status);\n }\n}\n\nexport interface WorkflowStepStatusIconProps {\n status: WorkflowStepStatus;\n index: number;\n className?: string;\n}\n\nexport function WorkflowStepStatusIcon({\n status,\n index,\n className,\n}: WorkflowStepStatusIconProps) {\n const iconClass = cn(workflowStepIconVariants({ status }), className);\n\n switch (status) {\n case 'pending':\n return (\n <div data-slot=\"workflow-step-icon\" className={iconClass}>\n <span className=\"text-xs font-medium\">{index + 1}</span>\n </div>\n );\n case 'running':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(\n iconClass,\n 'delight-status-pulse motion-reduce:!animate-none',\n )}\n >\n <Loader className=\"size-3 animate-spin motion-reduce:animate-none\" />\n </div>\n );\n case 'suspended':\n return (\n <div data-slot=\"workflow-step-icon\" className={iconClass}>\n <Pause className=\"size-3\" />\n </div>\n );\n case 'completed':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(\n iconClass,\n 'delight-check-bounce motion-reduce:!animate-none',\n )}\n >\n <Check className=\"size-3\" />\n </div>\n );\n case 'error':\n return (\n <div\n data-slot=\"workflow-step-icon\"\n className={cn(iconClass, 'delight-shake motion-reduce:!animate-none')}\n >\n <AlertCircle className=\"size-3\" />\n </div>\n );\n default:\n return assertNever(status);\n }\n}\n\nWorkflowStepStatusIcon.displayName = 'WorkflowStepStatusIcon';\n\nexport interface WorkflowStepItemProps {\n step: WorkflowStepViewModel;\n index: number;\n isLast: boolean;\n appearance?: WorkflowStepAppearance;\n itemSlot?: string;\n expandable?: boolean;\n expanded: boolean;\n active?: boolean;\n onExpandedChange: () => void;\n}\n\nexport function WorkflowStepItem({\n step,\n index,\n isLast,\n appearance = 'contained',\n itemSlot = 'workflow-step-item',\n expandable = true,\n expanded,\n active = false,\n onExpandedChange,\n}: WorkflowStepItemProps) {\n const contentId = React.useId();\n const errorDescriptionId = React.useId();\n const normalizedContent = normalizeWorkflowStepContent(step.content);\n const hasContent = normalizedContent.hasRenderableContent;\n const error = getNonBlankWorkflowStepError(step.error);\n const hasError = error !== undefined;\n const hasExpandableDetails = hasContent || hasError;\n const isDisclosureControl = hasExpandableDetails && expandable;\n const prefersReducedMotion = useReducedMotion();\n const appearanceConfig = workflowStepAppearanceConfig[appearance];\n const disclosureTransition = {\n duration: prefersReducedMotion ? 0 : 0.2,\n };\n const stepContent = (\n <>\n <WorkflowStepStatusIcon status={step.status} index={index} />\n\n <div className=\"min-w-0 flex-1 text-start\">\n <div className=\"flex flex-wrap items-center gap-2\">\n {step.contextLabel && (\n <span\n data-slot=\"workflow-step-context\"\n className=\"rounded-full border border-border px-2 py-0.5 text-[0.6875rem] font-medium leading-none text-secondary-foreground\"\n >\n {step.contextLabel}\n </span>\n )}\n <span\n className={cn(\n 'text-sm font-medium',\n step.status === 'pending'\n ? 'text-text-quaternary'\n : 'text-foreground',\n )}\n >\n {step.title}\n </span>\n <span className=\"text-xs text-secondary-foreground\">\n {getWorkflowStepStatusLabel(step.status)}\n </span>\n {step.durationMs !== undefined && (\n <span className=\"text-xs text-muted-foreground\">\n {formatAIDuration(step.durationMs)}\n </span>\n )}\n </div>\n {step.description && (\n <p className=\"mt-0.5 text-xs text-text-quaternary\">\n {step.description}\n </p>\n )}\n </div>\n\n {isDisclosureControl && (\n <div className=\"shrink-0\">\n {expanded ? (\n <ChevronDown className=\"size-4 text-muted-foreground\" />\n ) : (\n <ChevronRight className=\"size-4 text-muted-foreground rtl:rotate-180\" />\n )}\n </div>\n )}\n </>\n );\n\n return (\n <div\n data-slot={itemSlot}\n data-step-status={step.status}\n data-appearance={appearance}\n className={cn(\n appearanceConfig.rootClassName,\n appearanceConfig.hasDivider && !isLast && 'border-b border-border',\n )}\n >\n {isDisclosureControl ? (\n <button\n type=\"button\"\n onClick={onExpandedChange}\n aria-current={active ? 'step' : undefined}\n aria-expanded={expanded}\n aria-controls={contentId}\n aria-describedby={hasError ? errorDescriptionId : undefined}\n className={cn(\n workflowStepItemVariants({ status: step.status }),\n 'w-full cursor-pointer hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring',\n )}\n >\n {stepContent}\n </button>\n ) : (\n <div\n aria-current={active ? 'step' : undefined}\n aria-describedby={hasError ? errorDescriptionId : undefined}\n className={cn(\n workflowStepItemVariants({ status: step.status }),\n 'w-full',\n )}\n >\n {stepContent}\n </div>\n )}\n\n <AnimatePresence initial={false}>\n {expanded && hasExpandableDetails && (\n <motion.div\n id={contentId}\n data-slot=\"workflow-step-panel\"\n initial={{ height: 0, opacity: 0 }}\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={disclosureTransition}\n className=\"overflow-hidden motion-reduce:transition-none\"\n >\n <div className=\"px-4 pb-3 ps-12\">\n {hasError && (\n <div className=\"rounded-lg border border-destructive/50 bg-destructive/10 p-3\">\n <div className=\"flex items-start gap-2\">\n <AlertCircle className=\"mt-0.5 size-4 shrink-0 text-destructive\" />\n <p className=\"text-sm text-destructive\">{error}</p>\n </div>\n </div>\n )}\n {hasContent && (\n <div className={hasError ? 'mt-3' : undefined}>\n {normalizedContent.content}\n </div>\n )}\n </div>\n </motion.div>\n )}\n </AnimatePresence>\n\n {hasError && (\n <span id={errorDescriptionId} className=\"sr-only\">\n {error}\n </span>\n )}\n\n {appearanceConfig.hasConnector && !isLast && (\n <div\n data-slot=\"workflow-step-connector\"\n aria-hidden=\"true\"\n className=\"absolute top-8 -bottom-3 start-6 w-px bg-border\"\n />\n )}\n </div>\n );\n}\n\nWorkflowStepItem.displayName = 'WorkflowStepItem';\n\nexport function WorkflowStepRenderer({\n steps,\n appearance = 'contained',\n itemSlot = 'workflow-step-item',\n expandable = true,\n activeStepId,\n expandedStepIds: controlledExpandedStepIds,\n defaultExpandedStepIds = [],\n onExpandedStepIdsChange,\n className,\n renderItems = true,\n}: PrivateWorkflowStepRendererProps) {\n const isControlled = controlledExpandedStepIds !== undefined;\n const controlledSnapshot = isControlled\n ? [...controlledExpandedStepIds]\n : undefined;\n const [uncontrolledExpandedStepIds, setUncontrolledExpandedStepIds] =\n React.useState<readonly string[]>(() =>\n normalizeExpandedWorkflowStepIds(defaultExpandedStepIds, steps),\n );\n const lastControlledExpandedStepIdsRef = React.useRef<readonly string[]>(\n controlledSnapshot ?? [],\n );\n const wasControlledRef = React.useRef(isControlled);\n const rawExpandedStepIds = isControlled\n ? controlledExpandedStepIds\n : uncontrolledExpandedStepIds;\n const visibleExpandedStepIds = normalizeExpandedWorkflowStepIds(\n rawExpandedStepIds,\n steps,\n );\n const expandedSet = new Set(visibleExpandedStepIds);\n\n React.useLayoutEffect(() => {\n if (controlledSnapshot !== undefined) {\n lastControlledExpandedStepIdsRef.current = controlledSnapshot;\n }\n }, [controlledSnapshot]);\n\n React.useLayoutEffect(() => {\n const wasControlled = wasControlledRef.current;\n wasControlledRef.current = isControlled;\n if (isControlled) return;\n\n setUncontrolledExpandedStepIds((current) => {\n const source = wasControlled\n ? lastControlledExpandedStepIdsRef.current\n : current;\n const reconciled = normalizeExpandedWorkflowStepIds(source, steps);\n return areWorkflowStepIdsEqual(reconciled, current)\n ? current\n : reconciled;\n });\n }, [isControlled, steps]);\n\n const toggleStep = (id: string) => {\n const next = new Set(visibleExpandedStepIds);\n if (next.has(id)) next.delete(id);\n else next.add(id);\n const normalizedNext = normalizeExpandedWorkflowStepIds([...next], steps);\n if (!isControlled) {\n setUncontrolledExpandedStepIds([...normalizedNext]);\n }\n onExpandedStepIdsChange?.([...normalizedNext]);\n };\n\n if (!renderItems) return null;\n\n return (\n <ol\n data-slot=\"workflow-step-list\"\n data-appearance={appearance}\n className={cn('m-0 list-none p-0', className)}\n >\n {steps.map((step, index) => (\n <li key={step.id}>\n <WorkflowStepItem\n step={step}\n index={index}\n isLast={index === steps.length - 1}\n appearance={appearance}\n itemSlot={itemSlot}\n expandable={expandable}\n expanded={expandedSet.has(step.id)}\n active={activeStepId === step.id}\n onExpandedChange={() => toggleStep(step.id)}\n />\n </li>\n ))}\n </ol>\n );\n}\n\nWorkflowStepRenderer.displayName = 'WorkflowStepRenderer';\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;AASA,IAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AAAA,EACxC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAqB,KAAK;AAAA,EAAS,CAAC;AAAA,EAClD,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAY,KAAK;AAAA,EAAS,CAAC;AAAA,EACzC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAsB,KAAK;AAAA,EAAS,CAAC;AAAA,EACnD,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAY,KAAK;AAAA,EAAS,CAAC;AAAA,EACzC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAqB,KAAK;AAAA,EAAS,CAAC;AAAA,EAClD,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAW,KAAK;AAAA,EAAS,CAAC;AAAA,EACxC,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAoB,KAAK;AAAA,EAAS,CAAC;AACnD,GACM,IAAS,EAAiB,UAAUA,CAAU,GCV9C,IAAa,CACjB,CAAC,QAAQ;AAAA,EAAE,GAAG;AAAA,EAAM,GAAG;AAAA,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