@dilipod/ui 0.4.22 → 0.4.23

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.
@@ -0,0 +1,8 @@
1
+ export interface FlowchartDiagramProps {
2
+ /** Mermaid flowchart syntax string */
3
+ mermaid: string;
4
+ /** Optional className for the container */
5
+ className?: string;
6
+ }
7
+ export declare function FlowchartDiagram({ mermaid, className }: FlowchartDiagramProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=flowchart-diagram.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowchart-diagram.d.ts","sourceRoot":"","sources":["../../src/components/flowchart-diagram.tsx"],"names":[],"mappings":"AAoRA,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAA;IACf,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,qBAAqB,2CAmC7E"}
@@ -0,0 +1,35 @@
1
+ export interface WorkerSpecDocumentation {
2
+ scope: string | null;
3
+ goal: string | null;
4
+ steps: Array<{
5
+ step: number;
6
+ title: string;
7
+ description: string;
8
+ tools_used?: string[];
9
+ }> | null;
10
+ diagram: string | null;
11
+ expected_impact: {
12
+ time_saved_per_occurrence_minutes: number;
13
+ frequency: string;
14
+ yearly_hours_saved: number;
15
+ yearly_cost_savings_euros: number;
16
+ qualitative_benefits: string[];
17
+ } | null;
18
+ technical_requirements: string[] | null;
19
+ integration_points: string[] | null;
20
+ edge_cases_handled: Array<{
21
+ scenario: string;
22
+ handling: string;
23
+ }> | null;
24
+ version: number;
25
+ model_used: string | null;
26
+ updated_at: string;
27
+ }
28
+ export interface WorkerSpecProps {
29
+ /** The Knowledge Builder final documentation */
30
+ documentation: WorkerSpecDocumentation | null;
31
+ /** Optional className for the container */
32
+ className?: string;
33
+ }
34
+ export declare function WorkerSpec({ documentation, className }: WorkerSpecProps): import("react/jsx-runtime").JSX.Element;
35
+ //# sourceMappingURL=worker-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-spec.d.ts","sourceRoot":"","sources":["../../src/components/worker-spec.tsx"],"names":[],"mappings":"AA6BA,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,WAAW,EAAE,MAAM,CAAA;QACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;KACtB,CAAC,GAAG,IAAI,CAAA;IACT,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,eAAe,EAAE;QACf,iCAAiC,EAAE,MAAM,CAAA;QACzC,SAAS,EAAE,MAAM,CAAA;QACjB,kBAAkB,EAAE,MAAM,CAAA;QAC1B,yBAAyB,EAAE,MAAM,CAAA;QACjC,oBAAoB,EAAE,MAAM,EAAE,CAAA;KAC/B,GAAG,IAAI,CAAA;IACR,sBAAsB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IACvC,kBAAkB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IACnC,kBAAkB,EAAE,KAAK,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAC,GAAG,IAAI,CAAA;IACT,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,aAAa,EAAE,uBAAuB,GAAG,IAAI,CAAA;IAC7C,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAqDD,wBAAgB,UAAU,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,eAAe,2CAiRvE"}
package/dist/index.d.ts CHANGED
@@ -94,6 +94,10 @@ export { WorkflowFlow } from './components/workflow-flow';
94
94
  export type { WorkflowFlowProps, N8nWorkflow as WorkflowFlowN8nWorkflow, N8nNode } from './components/workflow-flow';
95
95
  export { WorkflowViewer } from './components/workflow-viewer';
96
96
  export type { WorkflowViewerProps, N8nWorkflow, SimWorkflow, WorkflowTemplate } from './components/workflow-viewer';
97
+ export { WorkerSpec } from './components/worker-spec';
98
+ export type { WorkerSpecProps, WorkerSpecDocumentation } from './components/worker-spec';
99
+ export { FlowchartDiagram } from './components/flowchart-diagram';
100
+ export type { FlowchartDiagramProps } from './components/flowchart-diagram';
97
101
  export { cn } from './lib/utils';
98
102
  export * from './icons';
99
103
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,EACL,KAAK,EACL,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,GACZ,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,QAAQ,EAAE,gBAAgB,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(index_exports, {
426
426
  EmptyState: () => EmptyState,
427
427
  ErrorState: () => ErrorState,
428
428
  FilePreview: () => FilePreview,
429
+ FlowchartDiagram: () => FlowchartDiagram,
429
430
  FormField: () => FormField,
430
431
  IconBox: () => IconBox,
431
432
  ImpactMetricsForm: () => ImpactMetricsForm,
@@ -517,6 +518,7 @@ __export(index_exports, {
517
518
  TooltipTrigger: () => TooltipTrigger,
518
519
  UsageBar: () => UsageBar,
519
520
  UsageChart: () => UsageChart,
521
+ WorkerSpec: () => WorkerSpec,
520
522
  WorkflowFlow: () => WorkflowFlow,
521
523
  WorkflowViewer: () => WorkflowViewer,
522
524
  alertVariants: () => alertVariants,
@@ -6141,6 +6143,422 @@ function WorkflowViewer({
6141
6143
  ] })
6142
6144
  ] });
6143
6145
  }
6146
+ function parseMermaidFlowchart(mermaid) {
6147
+ const nodes = /* @__PURE__ */ new Map();
6148
+ const edges = [];
6149
+ const lines = mermaid.split(/\\n|\n/).map((l) => l.trim()).filter((l) => l && !l.startsWith("flowchart") && !l.startsWith("graph"));
6150
+ function parseNodeDef(str) {
6151
+ const decisionMatch = str.match(/^([A-Za-z0-9_]+)\{(.+?)\}$/);
6152
+ if (decisionMatch) return { id: decisionMatch[1], label: decisionMatch[2], type: "decision" };
6153
+ const bracketMatch = str.match(/^([A-Za-z0-9_]+)\[?\(?\[?(.+?)\]?\)?\]?$/);
6154
+ if (bracketMatch) {
6155
+ const label = bracketMatch[2];
6156
+ const isTerminal = /^(start|end|begin|finish|done)$/i.test(label);
6157
+ return { id: bracketMatch[1], label, type: isTerminal ? "terminal" : "action" };
6158
+ }
6159
+ return { id: str.trim() };
6160
+ }
6161
+ for (const line of lines) {
6162
+ const edgeMatch = line.match(/^(.+?)\s*-->(?:\|(.+?)\|)?\s*(.+)$/);
6163
+ if (!edgeMatch) continue;
6164
+ const leftRaw = edgeMatch[1].trim();
6165
+ const edgeLabel = edgeMatch[2]?.trim();
6166
+ const rightRaw = edgeMatch[3].trim();
6167
+ const left = parseNodeDef(leftRaw);
6168
+ const right = parseNodeDef(rightRaw);
6169
+ if (left.label && !nodes.has(left.id)) {
6170
+ nodes.set(left.id, { id: left.id, label: left.label, type: left.type || "action" });
6171
+ }
6172
+ if (right.label && !nodes.has(right.id)) {
6173
+ nodes.set(right.id, { id: right.id, label: right.label, type: right.type || "action" });
6174
+ }
6175
+ if (!nodes.has(left.id)) {
6176
+ nodes.set(left.id, { id: left.id, label: left.id, type: "action" });
6177
+ }
6178
+ if (!nodes.has(right.id)) {
6179
+ nodes.set(right.id, { id: right.id, label: right.id, type: "action" });
6180
+ }
6181
+ edges.push({ from: left.id, to: right.id, label: edgeLabel });
6182
+ }
6183
+ return { nodes: Array.from(nodes.values()), edges };
6184
+ }
6185
+ function findMergePoint(branchStarts, outgoing) {
6186
+ const reachable = /* @__PURE__ */ new Map();
6187
+ for (const start of branchStarts) {
6188
+ const q2 = [start];
6189
+ const seen2 = /* @__PURE__ */ new Set();
6190
+ while (q2.length > 0) {
6191
+ const id = q2.shift();
6192
+ if (seen2.has(id)) continue;
6193
+ seen2.add(id);
6194
+ if (!reachable.has(id)) reachable.set(id, /* @__PURE__ */ new Set());
6195
+ reachable.get(id).add(start);
6196
+ const outs = outgoing.get(id) || [];
6197
+ for (const e of outs) q2.push(e.to);
6198
+ }
6199
+ }
6200
+ const allBranches = new Set(branchStarts);
6201
+ const q = [branchStarts[0]];
6202
+ const seen = /* @__PURE__ */ new Set();
6203
+ while (q.length > 0) {
6204
+ const id = q.shift();
6205
+ if (seen.has(id)) continue;
6206
+ seen.add(id);
6207
+ if (!allBranches.has(id) && reachable.get(id)?.size === branchStarts.length) {
6208
+ return id;
6209
+ }
6210
+ const outs = outgoing.get(id) || [];
6211
+ for (const e of outs) q.push(e.to);
6212
+ }
6213
+ return null;
6214
+ }
6215
+ function buildLayout(startId, outgoing, incoming, nodeMap, visited) {
6216
+ const items = [];
6217
+ let currentId = startId;
6218
+ while (currentId) {
6219
+ if (visited.has(currentId)) break;
6220
+ const node = nodeMap.get(currentId);
6221
+ if (!node) break;
6222
+ const outs = outgoing.get(currentId) || [];
6223
+ if (outs.length <= 1) {
6224
+ visited.add(currentId);
6225
+ items.push({ type: "node", nodeId: currentId });
6226
+ if (outs.length === 1) {
6227
+ const nextId = outs[0].to;
6228
+ if (visited.has(nextId)) break;
6229
+ items.push({ type: "arrow", label: outs[0].label });
6230
+ currentId = nextId;
6231
+ } else {
6232
+ currentId = null;
6233
+ }
6234
+ } else {
6235
+ visited.add(currentId);
6236
+ items.push({ type: "node", nodeId: currentId });
6237
+ const branchStarts = outs.map((e) => e.to);
6238
+ const mergeId = findMergePoint(branchStarts, outgoing);
6239
+ const branches = [];
6240
+ for (const edge of outs) {
6241
+ if (visited.has(edge.to) && edge.to !== mergeId) {
6242
+ branches.push({ label: edge.label, items: [] });
6243
+ continue;
6244
+ }
6245
+ const branchItems = buildLayout(edge.to, outgoing, incoming, nodeMap, visited);
6246
+ branches.push({ label: edge.label, items: branchItems });
6247
+ }
6248
+ items.push({ type: "branch", decision: currentId, branches, mergeId });
6249
+ if (mergeId && !visited.has(mergeId)) {
6250
+ items.push({ type: "arrow" });
6251
+ currentId = mergeId;
6252
+ } else {
6253
+ currentId = null;
6254
+ }
6255
+ }
6256
+ }
6257
+ return items;
6258
+ }
6259
+ function FlowArrow({ label }) {
6260
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
6261
+ label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium text-purple-600 bg-purple-50 px-1.5 py-0.5 rounded mb-0.5", children: label }),
6262
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-4 bg-gray-300" }),
6263
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-0 h-0 border-l-[4px] border-r-[4px] border-t-[5px] border-l-transparent border-r-transparent border-t-gray-300" })
6264
+ ] });
6265
+ }
6266
+ function FlowNodeBox({ node }) {
6267
+ if (node.type === "decision") {
6268
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6269
+ "div",
6270
+ {
6271
+ className: "bg-amber-50 border-2 border-amber-300 rounded-lg px-4 py-2.5 text-xs font-medium text-amber-800 text-center my-1",
6272
+ style: { minWidth: "120px" },
6273
+ children: [
6274
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-amber-400 mr-1", children: "\u25C7" }),
6275
+ node.label
6276
+ ]
6277
+ }
6278
+ );
6279
+ }
6280
+ if (node.type === "terminal") {
6281
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-gray-100 border border-gray-200 rounded-full px-5 py-1.5 text-xs font-medium text-gray-500 text-center my-1", children: node.label });
6282
+ }
6283
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white border border-gray-200 rounded-sm px-4 py-2 text-xs font-medium text-[var(--black)] text-center shadow-sm my-1 max-w-[220px]", children: node.label });
6284
+ }
6285
+ function RenderLayoutItems({ items, nodeMap }) {
6286
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: items.map((item, i) => {
6287
+ if (item.type === "node") {
6288
+ const node = nodeMap.get(item.nodeId);
6289
+ if (!node) return null;
6290
+ return /* @__PURE__ */ jsxRuntime.jsx(FlowNodeBox, { node }, `node-${item.nodeId}`);
6291
+ }
6292
+ if (item.type === "arrow") {
6293
+ return /* @__PURE__ */ jsxRuntime.jsx(FlowArrow, { label: item.label }, `arrow-${i}`);
6294
+ }
6295
+ if (item.type === "branch") {
6296
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center w-full", children: [
6297
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-3 bg-gray-300" }),
6298
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start justify-center gap-6 w-full", children: item.branches.map((branch, j) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center min-w-[100px]", children: [
6299
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
6300
+ branch.label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium text-purple-600 bg-purple-50 px-1.5 py-0.5 rounded mb-1", children: branch.label }),
6301
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-0 h-0 border-l-[4px] border-r-[4px] border-t-[5px] border-l-transparent border-r-transparent border-t-gray-300" })
6302
+ ] }),
6303
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsxRuntime.jsx(RenderLayoutItems, { items: branch.items, nodeMap }) })
6304
+ ] }, j)) }),
6305
+ item.mergeId && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-3 bg-gray-300" })
6306
+ ] }, `branch-${item.decision}-${i}`);
6307
+ }
6308
+ return null;
6309
+ }) });
6310
+ }
6311
+ function FlowchartDiagram({ mermaid, className }) {
6312
+ const { nodes, edges } = parseMermaidFlowchart(mermaid);
6313
+ if (nodes.length === 0) {
6314
+ return /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "text-xs bg-white border border-gray-100 rounded-sm p-3 overflow-x-auto whitespace-pre-wrap", children: mermaid });
6315
+ }
6316
+ const outgoing = /* @__PURE__ */ new Map();
6317
+ const incoming = /* @__PURE__ */ new Map();
6318
+ for (const edge of edges) {
6319
+ if (!outgoing.has(edge.from)) outgoing.set(edge.from, []);
6320
+ outgoing.get(edge.from).push(edge);
6321
+ if (!incoming.has(edge.to)) incoming.set(edge.to, []);
6322
+ incoming.get(edge.to).push(edge);
6323
+ }
6324
+ const nodeMap = new Map(nodes.map((n) => [n.id, n]));
6325
+ const roots = nodes.filter((n) => !incoming.has(n.id) || incoming.get(n.id).length === 0);
6326
+ const startId = roots.length > 0 ? roots[0].id : nodes[0].id;
6327
+ const visited = /* @__PURE__ */ new Set();
6328
+ const layout = buildLayout(startId, outgoing, incoming, nodeMap, visited);
6329
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col items-center py-2", children: /* @__PURE__ */ jsxRuntime.jsx(RenderLayoutItems, { items: layout, nodeMap }) }) });
6330
+ }
6331
+ var frequencyLabels = {
6332
+ multiple_daily: "occurrence",
6333
+ daily: "day",
6334
+ weekly: "week",
6335
+ monthly: "month",
6336
+ quarterly: "quarter",
6337
+ yearly: "year"
6338
+ };
6339
+ function SectionHeader({
6340
+ icon,
6341
+ title,
6342
+ count: count2,
6343
+ expanded,
6344
+ onToggle,
6345
+ iconColor = "text-[var(--cyan)]"
6346
+ }) {
6347
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6348
+ "button",
6349
+ {
6350
+ onClick: onToggle,
6351
+ className: "flex items-center gap-1.5 text-xs font-semibold text-muted-foreground uppercase tracking-wide hover:text-[var(--black)] transition-colors w-full",
6352
+ children: [
6353
+ expanded ? /* @__PURE__ */ jsxRuntime.jsx(react_star.CaretDown, { size: 12 }) : /* @__PURE__ */ jsxRuntime.jsx(react_star.CaretRight, { size: 12 }),
6354
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: iconColor, children: icon }),
6355
+ title,
6356
+ count2 !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-normal", children: [
6357
+ "(",
6358
+ count2,
6359
+ ")"
6360
+ ] })
6361
+ ]
6362
+ }
6363
+ );
6364
+ }
6365
+ function WorkerSpec({ documentation, className }) {
6366
+ const [expandedSections, setExpandedSections] = React51.useState(
6367
+ /* @__PURE__ */ new Set(["goal", "scope", "steps", "diagram", "impact", "requirements", "edge_cases"])
6368
+ );
6369
+ const toggleSection = (section) => {
6370
+ setExpandedSections((prev) => {
6371
+ const next = new Set(prev);
6372
+ if (next.has(section)) {
6373
+ next.delete(section);
6374
+ } else {
6375
+ next.add(section);
6376
+ }
6377
+ return next;
6378
+ });
6379
+ };
6380
+ if (!documentation) {
6381
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 p-6 rounded-sm border border-dashed border-gray-300 bg-gray-50/50", children: [
6382
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-sm bg-gray-100 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(react_star.Robot, { size: 20, className: "text-gray-400" }) }),
6383
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6384
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-[var(--black)]", children: "Worker Spec Pending" }),
6385
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: "The final specification will be generated automatically after the documentation is approved." })
6386
+ ] })
6387
+ ] }) });
6388
+ }
6389
+ const freqLabel = documentation.expected_impact?.frequency ? frequencyLabels[documentation.expected_impact.frequency] || documentation.expected_impact.frequency : "occurrence";
6390
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
6391
+ documentation.goal && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6392
+ /* @__PURE__ */ jsxRuntime.jsx(
6393
+ SectionHeader,
6394
+ {
6395
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react_star.Target, { size: 12, weight: "fill" }),
6396
+ title: "Goal",
6397
+ expanded: expandedSections.has("goal"),
6398
+ onToggle: () => toggleSection("goal")
6399
+ }
6400
+ ),
6401
+ expandedSections.has("goal") && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed pl-5 mt-2", children: documentation.goal })
6402
+ ] }),
6403
+ documentation.scope && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6404
+ /* @__PURE__ */ jsxRuntime.jsx(
6405
+ SectionHeader,
6406
+ {
6407
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react_star.Crosshair, { size: 12, weight: "fill" }),
6408
+ title: "Scope",
6409
+ expanded: expandedSections.has("scope"),
6410
+ onToggle: () => toggleSection("scope")
6411
+ }
6412
+ ),
6413
+ expandedSections.has("scope") && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed pl-5 mt-2", children: documentation.scope })
6414
+ ] }),
6415
+ documentation.steps && documentation.steps.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6416
+ /* @__PURE__ */ jsxRuntime.jsx(
6417
+ SectionHeader,
6418
+ {
6419
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react_star.ListNumbers, { size: 12, weight: "fill" }),
6420
+ title: "Steps",
6421
+ count: documentation.steps.length,
6422
+ expanded: expandedSections.has("steps"),
6423
+ onToggle: () => toggleSection("steps")
6424
+ }
6425
+ ),
6426
+ expandedSections.has("steps") && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3 pl-5 mt-2", children: documentation.steps.map((step, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-3", children: [
6427
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-6 h-6 rounded-sm bg-[var(--cyan)]/10 flex items-center justify-center text-xs font-bold text-[var(--cyan)] shrink-0 mt-0.5", children: step.step || i + 1 }),
6428
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
6429
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-[var(--black)]", children: step.title }),
6430
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mt-0.5", children: step.description }),
6431
+ step.tools_used && step.tools_used.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mt-1.5", children: step.tools_used.map((tool, j) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-sm bg-gray-100 text-[10px] font-medium text-gray-600", children: [
6432
+ /* @__PURE__ */ jsxRuntime.jsx(react_star.Wrench, { size: 10 }),
6433
+ tool
6434
+ ] }, j)) })
6435
+ ] })
6436
+ ] }, i)) })
6437
+ ] }),
6438
+ documentation.diagram && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6439
+ /* @__PURE__ */ jsxRuntime.jsx(
6440
+ SectionHeader,
6441
+ {
6442
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react_star.TreeStructure, { size: 12, weight: "fill" }),
6443
+ title: "Workflow Diagram",
6444
+ expanded: expandedSections.has("diagram"),
6445
+ onToggle: () => toggleSection("diagram"),
6446
+ iconColor: "text-purple-500"
6447
+ }
6448
+ ),
6449
+ expandedSections.has("diagram") && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pl-5 mt-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-white border border-gray-100 rounded-sm p-4 overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(FlowchartDiagram, { mermaid: documentation.diagram }) }) })
6450
+ ] }),
6451
+ documentation.expected_impact && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6452
+ /* @__PURE__ */ jsxRuntime.jsx(
6453
+ SectionHeader,
6454
+ {
6455
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react_star.Lightning, { size: 12, weight: "fill" }),
6456
+ title: "Expected Impact",
6457
+ expanded: expandedSections.has("impact"),
6458
+ onToggle: () => toggleSection("impact"),
6459
+ iconColor: "text-purple-500"
6460
+ }
6461
+ ),
6462
+ expandedSections.has("impact") && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pl-5 mt-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-emerald-50/50 border border-emerald-100 rounded-sm p-4", children: [
6463
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-3 mb-3", children: [
6464
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-sm p-3 border border-emerald-100 text-center", children: [
6465
+ /* @__PURE__ */ jsxRuntime.jsx(react_star.Clock, { size: 18, className: "text-emerald-600 mx-auto mb-1" }),
6466
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-bold text-[var(--black)]", children: [
6467
+ documentation.expected_impact.time_saved_per_occurrence_minutes,
6468
+ " min"
6469
+ ] }),
6470
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-[10px] text-muted-foreground", children: [
6471
+ "saved per ",
6472
+ freqLabel
6473
+ ] })
6474
+ ] }),
6475
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-sm p-3 border border-emerald-100 text-center", children: [
6476
+ /* @__PURE__ */ jsxRuntime.jsx(react_star.TrendUp, { size: 18, className: "text-emerald-600 mx-auto mb-1" }),
6477
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-bold text-[var(--black)]", children: [
6478
+ documentation.expected_impact.yearly_hours_saved,
6479
+ "h"
6480
+ ] }),
6481
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-muted-foreground", children: "saved per year" })
6482
+ ] }),
6483
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white rounded-sm p-3 border border-emerald-100 text-center", children: [
6484
+ /* @__PURE__ */ jsxRuntime.jsx(react_star.CurrencyEur, { size: 18, className: "text-emerald-600 mx-auto mb-1" }),
6485
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-bold text-[var(--black)]", children: [
6486
+ "\u20AC",
6487
+ documentation.expected_impact.yearly_cost_savings_euros.toLocaleString()
6488
+ ] }),
6489
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] text-muted-foreground", children: "estimated yearly savings" })
6490
+ ] })
6491
+ ] }),
6492
+ documentation.expected_impact.qualitative_benefits && documentation.expected_impact.qualitative_benefits.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: documentation.expected_impact.qualitative_benefits.map((benefit, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2 text-sm text-emerald-700", children: [
6493
+ /* @__PURE__ */ jsxRuntime.jsx(react_star.Sparkle, { size: 14, className: "text-emerald-500 shrink-0 mt-0.5", weight: "fill" }),
6494
+ benefit
6495
+ ] }, i)) })
6496
+ ] }) })
6497
+ ] }),
6498
+ (documentation.technical_requirements && documentation.technical_requirements.length > 0 || documentation.integration_points && documentation.integration_points.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6499
+ /* @__PURE__ */ jsxRuntime.jsx(
6500
+ SectionHeader,
6501
+ {
6502
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react_star.Plugs, { size: 12, weight: "fill" }),
6503
+ title: "Requirements & Integrations",
6504
+ expanded: expandedSections.has("requirements"),
6505
+ onToggle: () => toggleSection("requirements")
6506
+ }
6507
+ ),
6508
+ expandedSections.has("requirements") && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid md:grid-cols-2 gap-4 pl-5 mt-2", children: [
6509
+ documentation.technical_requirements && documentation.technical_requirements.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6510
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2", children: "Technical Requirements" }),
6511
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-1.5", children: documentation.technical_requirements.map((req, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-sm text-muted-foreground", children: [
6512
+ /* @__PURE__ */ jsxRuntime.jsx(react_star.Wrench, { size: 12, className: "text-gray-400 shrink-0 mt-1" }),
6513
+ req
6514
+ ] }, i)) })
6515
+ ] }),
6516
+ documentation.integration_points && documentation.integration_points.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6517
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2", children: "Integration Points" }),
6518
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-1.5", children: documentation.integration_points.map((point, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-sm text-muted-foreground", children: [
6519
+ /* @__PURE__ */ jsxRuntime.jsx(react_star.Plugs, { size: 12, className: "text-gray-400 shrink-0 mt-1" }),
6520
+ point
6521
+ ] }, i)) })
6522
+ ] })
6523
+ ] })
6524
+ ] }),
6525
+ documentation.edge_cases_handled && documentation.edge_cases_handled.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
6526
+ /* @__PURE__ */ jsxRuntime.jsx(
6527
+ SectionHeader,
6528
+ {
6529
+ icon: /* @__PURE__ */ jsxRuntime.jsx(react_star.ShieldCheck, { size: 12, weight: "fill" }),
6530
+ title: "Edge Cases Handled",
6531
+ count: documentation.edge_cases_handled.length,
6532
+ expanded: expandedSections.has("edge_cases"),
6533
+ onToggle: () => toggleSection("edge_cases"),
6534
+ iconColor: "text-amber-500"
6535
+ }
6536
+ ),
6537
+ expandedSections.has("edge_cases") && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2 pl-5 mt-2", children: documentation.edge_cases_handled.map((ec, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-sm p-3 bg-gray-50 rounded-sm border border-gray-100", children: [
6538
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-[var(--black)]", children: ec.scenario }),
6539
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground mt-1", children: [
6540
+ "\u2192 ",
6541
+ ec.handling
6542
+ ] })
6543
+ ] }, i)) })
6544
+ ] }),
6545
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-3 border-t border-gray-100 flex items-center gap-2 text-xs text-muted-foreground", children: [
6546
+ /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "outline", size: "sm", children: [
6547
+ "v",
6548
+ documentation.version
6549
+ ] }),
6550
+ documentation.model_used && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6551
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\u2022" }),
6552
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: documentation.model_used })
6553
+ ] }),
6554
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "\u2022" }),
6555
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
6556
+ "Updated ",
6557
+ new Date(documentation.updated_at).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" })
6558
+ ] })
6559
+ ] })
6560
+ ] }) });
6561
+ }
6144
6562
 
6145
6563
  // src/index.ts
6146
6564
  __reExport(index_exports, icons_exports);
@@ -6209,6 +6627,7 @@ exports.DropdownMenuTrigger = DropdownMenuTrigger;
6209
6627
  exports.EmptyState = EmptyState;
6210
6628
  exports.ErrorState = ErrorState;
6211
6629
  exports.FilePreview = FilePreview;
6630
+ exports.FlowchartDiagram = FlowchartDiagram;
6212
6631
  exports.FormField = FormField;
6213
6632
  exports.IconBox = IconBox;
6214
6633
  exports.ImpactMetricsForm = ImpactMetricsForm;
@@ -6300,6 +6719,7 @@ exports.TooltipProvider = TooltipProvider;
6300
6719
  exports.TooltipTrigger = TooltipTrigger;
6301
6720
  exports.UsageBar = UsageBar;
6302
6721
  exports.UsageChart = UsageChart;
6722
+ exports.WorkerSpec = WorkerSpec;
6303
6723
  exports.WorkflowFlow = WorkflowFlow;
6304
6724
  exports.WorkflowViewer = WorkflowViewer;
6305
6725
  exports.alertVariants = alertVariants;