@mastra/playground-ui 69.0.0-alpha.13 → 69.0.0-alpha.14

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 (131) hide show
  1. package/components.css +17 -39
  2. package/dist/{Workflow-CjRQqVIK.cjs → Workflow-CJIrfzSm.cjs} +2 -2
  3. package/dist/Workflow-CJIrfzSm.cjs.map +1 -0
  4. package/dist/{Workflow-DhMn2YRg.js → Workflow-bQ6HPvmu.js} +2 -2
  5. package/dist/Workflow-bQ6HPvmu.js.map +1 -0
  6. package/dist/{ask-user-u4FScaHG.cjs → ask-user-4Te-yUfM.cjs} +2 -2
  7. package/dist/{ask-user-u4FScaHG.cjs.map → ask-user-4Te-yUfM.cjs.map} +1 -1
  8. package/dist/{ask-user-D-zUs18z.js → ask-user-WgBDxVx9.js} +2 -2
  9. package/dist/{ask-user-D-zUs18z.js.map → ask-user-WgBDxVx9.js.map} +1 -1
  10. package/dist/components/Sidebar.cjs.js +1 -1
  11. package/dist/components/Sidebar.cjs.js.map +1 -1
  12. package/dist/components/Sidebar.es.js +1 -1
  13. package/dist/components/Sidebar.es.js.map +1 -1
  14. package/dist/components/Workflow.cjs.js +1 -1
  15. package/dist/components/Workflow.es.js +1 -1
  16. package/dist/components/ai/ask-user.cjs.js +1 -1
  17. package/dist/components/ai/ask-user.es.js +1 -1
  18. package/dist/domains/chat/attachments/composer-attachment.cjs.js +1 -1
  19. package/dist/domains/chat/attachments/composer-attachment.cjs.js.map +1 -1
  20. package/dist/domains/chat/attachments/composer-attachment.es.js +1 -1
  21. package/dist/domains/chat/attachments/composer-attachment.es.js.map +1 -1
  22. package/dist/domains/chat/tools/badges/ask-user-badge.cjs.js +1 -1
  23. package/dist/domains/chat/tools/badges/ask-user-badge.es.js +1 -1
  24. package/dist/domains/chat/tools/mcp-input-request-tool.cjs.js +1 -1
  25. package/dist/domains/chat/tools/mcp-input-request-tool.es.js +1 -1
  26. package/dist/domains/dashboards/kinds/kpis/kpis-plan.cjs.js +5 -2
  27. package/dist/domains/dashboards/kinds/kpis/kpis-plan.cjs.js.map +1 -1
  28. package/dist/domains/dashboards/kinds/kpis/kpis-plan.es.js +6 -3
  29. package/dist/domains/dashboards/kinds/kpis/kpis-plan.es.js.map +1 -1
  30. package/dist/domains/dashboards/kinds/kpis/kpis-widget.cjs.js +9 -10
  31. package/dist/domains/dashboards/kinds/kpis/kpis-widget.cjs.js.map +1 -1
  32. package/dist/domains/dashboards/kinds/kpis/kpis-widget.es.js +9 -10
  33. package/dist/domains/dashboards/kinds/kpis/kpis-widget.es.js.map +1 -1
  34. package/dist/domains/dashboards/kinds/kpis/options.cjs.js +76 -40
  35. package/dist/domains/dashboards/kinds/kpis/options.cjs.js.map +1 -1
  36. package/dist/domains/dashboards/kinds/kpis/options.es.js +77 -41
  37. package/dist/domains/dashboards/kinds/kpis/options.es.js.map +1 -1
  38. package/dist/domains/dashboards/kinds/table/table-view.cjs.js +1 -1
  39. package/dist/domains/dashboards/kinds/table/table-view.cjs.js.map +1 -1
  40. package/dist/domains/dashboards/kinds/table/table-view.es.js +1 -1
  41. package/dist/domains/dashboards/kinds/table/table-view.es.js.map +1 -1
  42. package/dist/domains/dashboards/lib/table.cjs.js +2 -1
  43. package/dist/domains/dashboards/lib/table.cjs.js.map +1 -1
  44. package/dist/domains/dashboards/lib/table.es.js +2 -1
  45. package/dist/domains/dashboards/lib/table.es.js.map +1 -1
  46. package/dist/domains/dashboards/lib/timeseries.cjs.js +5 -2
  47. package/dist/domains/dashboards/lib/timeseries.cjs.js.map +1 -1
  48. package/dist/domains/dashboards/lib/timeseries.es.js +6 -3
  49. package/dist/domains/dashboards/lib/timeseries.es.js.map +1 -1
  50. package/dist/domains/dashboards/lib/values.cjs.js +21 -1
  51. package/dist/domains/dashboards/lib/values.cjs.js.map +1 -1
  52. package/dist/domains/dashboards/lib/values.es.js +21 -2
  53. package/dist/domains/dashboards/lib/values.es.js.map +1 -1
  54. package/dist/domains/metrics/components/kpi-card.cjs.js +1 -1
  55. package/dist/domains/metrics/components/kpi-card.cjs.js.map +1 -1
  56. package/dist/domains/metrics/components/kpi-card.es.js +1 -1
  57. package/dist/domains/metrics/components/kpi-card.es.js.map +1 -1
  58. package/dist/domains/metrics/lib/chart-colors.cjs.js +9 -1
  59. package/dist/domains/metrics/lib/chart-colors.cjs.js.map +1 -1
  60. package/dist/domains/metrics/lib/chart-colors.es.js +9 -1
  61. package/dist/domains/metrics/lib/chart-colors.es.js.map +1 -1
  62. package/dist/domains/metrics.cjs.js +2 -2
  63. package/dist/domains/metrics.es.js +2 -2
  64. package/dist/domains/workflows/components/workflow-layout.cjs.js +1 -1
  65. package/dist/domains/workflows/components/workflow-layout.es.js +1 -1
  66. package/dist/domains/workflows/components/workflow-step-detail.cjs.js +2 -2
  67. package/dist/domains/workflows/components/workflow-step-detail.es.js +2 -2
  68. package/dist/domains/workflows/workflow/data/workflow-data-button.cjs.js +1 -1
  69. package/dist/domains/workflows/workflow/data/workflow-data-button.es.js +1 -1
  70. package/dist/domains/workflows/workflow/use-workflow-graph-runtime.cjs.js +1 -1
  71. package/dist/domains/workflows/workflow/use-workflow-graph-runtime.es.js +1 -1
  72. package/dist/domains/workflows/workflow/utils.cjs.js +1 -1
  73. package/dist/domains/workflows/workflow/utils.es.js +1 -1
  74. package/dist/domains/workflows/workflow/workflow-body-graph.cjs.js +1 -1
  75. package/dist/domains/workflows/workflow/workflow-body-graph.es.js +1 -1
  76. package/dist/domains/workflows/workflow/workflow-data-edge.cjs.js +1 -1
  77. package/dist/domains/workflows/workflow/workflow-data-edge.es.js +1 -1
  78. package/dist/domains/workflows/workflow/workflow-debug-step-controls.cjs.js +1 -1
  79. package/dist/domains/workflows/workflow/workflow-debug-step-controls.es.js +1 -1
  80. package/dist/domains/workflows/workflow/workflow-graph-inner.cjs.js +2 -2
  81. package/dist/domains/workflows/workflow/workflow-graph-inner.es.js +2 -2
  82. package/dist/domains/workflows/workflow/workflow-graph-layout.cjs.js +1 -1
  83. package/dist/domains/workflows/workflow/workflow-graph-layout.es.js +1 -1
  84. package/dist/domains/workflows/workflow/workflow-graph-node.cjs.js +1 -1
  85. package/dist/domains/workflows/workflow/workflow-graph-node.es.js +1 -1
  86. package/dist/domains/workflows/workflow/workflow-graph.cjs.js +1 -1
  87. package/dist/domains/workflows/workflow/workflow-graph.es.js +1 -1
  88. package/dist/domains/workflows/workflow/workflow-map-config-dialog.cjs.js +1 -1
  89. package/dist/domains/workflows/workflow/workflow-map-config-dialog.es.js +1 -1
  90. package/dist/domains/workflows/workflow/workflow-nested-graph.cjs.js +1 -1
  91. package/dist/domains/workflows/workflow/workflow-nested-graph.es.js +1 -1
  92. package/dist/domains/workflows/workflow/workflow-step-action-bar.cjs.js +1 -1
  93. package/dist/domains/workflows/workflow/workflow-step-action-bar.es.js +1 -1
  94. package/dist/domains/workflows/workflow/workflow-step-node-utils.cjs.js +1 -1
  95. package/dist/domains/workflows/workflow/workflow-step-node-utils.es.js +1 -1
  96. package/dist/ee/signals/noise-detail-panel.cjs.js +1 -1
  97. package/dist/ee/signals/noise-detail-panel.cjs.js.map +1 -1
  98. package/dist/ee/signals/noise-detail-panel.es.js +1 -1
  99. package/dist/ee/signals/noise-detail-panel.es.js.map +1 -1
  100. package/dist/ee/signals/theme-detail-panel.cjs.js +1 -1
  101. package/dist/ee/signals/theme-detail-panel.cjs.js.map +1 -1
  102. package/dist/ee/signals/theme-detail-panel.es.js +1 -1
  103. package/dist/ee/signals/theme-detail-panel.es.js.map +1 -1
  104. package/dist/ee/signals/theme-filter-banner.cjs.js +1 -1
  105. package/dist/ee/signals/theme-filter-banner.cjs.js.map +1 -1
  106. package/dist/ee/signals/theme-filter-banner.es.js +1 -1
  107. package/dist/ee/signals/theme-filter-banner.es.js.map +1 -1
  108. package/dist/primitives/raised-surface.cjs.js +3 -4
  109. package/dist/primitives/raised-surface.cjs.js.map +1 -1
  110. package/dist/primitives/raised-surface.es.js +3 -4
  111. package/dist/primitives/raised-surface.es.js.map +1 -1
  112. package/dist/src/domains/dashboards/kinds/kpis/index.d.ts +3 -3
  113. package/dist/src/domains/dashboards/kinds/kpis/kpis-plan.d.ts +4 -1
  114. package/dist/src/domains/dashboards/kinds/kpis/options.d.ts +22 -8
  115. package/dist/src/domains/dashboards/kinds/table/index.d.ts +1 -1
  116. package/dist/src/domains/dashboards/kinds/timeseries/index.d.ts +1 -1
  117. package/dist/src/domains/dashboards/lib/format.d.ts +1 -1
  118. package/dist/src/domains/dashboards/lib/table.d.ts +1 -1
  119. package/dist/src/domains/dashboards/lib/timeseries.d.ts +20 -7
  120. package/dist/src/domains/dashboards/lib/values.d.ts +10 -1
  121. package/dist/src/domains/metrics/components/kpi-card.d.ts +2 -2
  122. package/dist/src/domains/metrics/lib/chart-colors.d.ts +8 -0
  123. package/dist/src/ds/primitives/raised-surface.d.ts +3 -4
  124. package/dist/style.css +25 -102
  125. package/dist/{use-workflow-graph-runtime-BL1GTfFA.js → use-workflow-graph-runtime-B52q85yy.js} +2 -2
  126. package/dist/{use-workflow-graph-runtime-BL1GTfFA.js.map → use-workflow-graph-runtime-B52q85yy.js.map} +1 -1
  127. package/dist/{use-workflow-graph-runtime-D8yhI6RZ.cjs → use-workflow-graph-runtime-DRvtMfsj.cjs} +2 -2
  128. package/dist/{use-workflow-graph-runtime-D8yhI6RZ.cjs.map → use-workflow-graph-runtime-DRvtMfsj.cjs.map} +1 -1
  129. package/package.json +6 -6
  130. package/dist/Workflow-CjRQqVIK.cjs.map +0 -1
  131. package/dist/Workflow-DhMn2YRg.js.map +0 -1
package/components.css CHANGED
@@ -25,10 +25,9 @@
25
25
  * element wearing the utility: a custom property that referenced it would be
26
26
  * substituted once on the root and inherited as a finished string.
27
27
  *
28
- * `--surface-tint` is the state layer of a surface that cannot carry a
29
- * pseudo-element — an `<input>`. An inset shadow paints over the element's own
30
- * fill and under its content, so a wash there behaves like `state-layer`'s
31
- * `::before` without needing a child, and it sits below the rim layer so the
28
+ * `--surface-tint` is the state layer of a bare control — an `<input>`, a
29
+ * `Button`. An inset shadow paints over the element's own fill and under its
30
+ * content, so a wash there behaves like `state-layer`, and it sits below the rim layer so the
32
31
  * boundary keeps its resting weight while the fill moves. Each utility resets
33
32
  * it, because a custom property would otherwise inherit into every raised
34
33
  * surface nested inside a hovered one. */
@@ -81,49 +80,28 @@
81
80
  * hover inverts across themes. Layered, the same rung is +9/-9 from whatever it
82
81
  * sits on, in both themes, whatever the resting rung.
83
82
  *
84
- * The layer is a pseudo-element rather than a `background-image` so it can still
85
- * transition, and it stops a pixel short of the edge to leave the inset rim of
86
- * `shadow-raised` visible. `isolation` is what keeps a negative z-index from
87
- * escaping to an ancestor's stacking context.
83
+ * The rung is a flat `background-image` over the element's own fill. The
84
+ * background is clipped to the element's own shape, so it follows any radius
85
+ * and stops at the inside of a border, and inset shadows (the rim of
86
+ * `shadow-raised`) paint over it. It switches instantly: a background image
87
+ * cannot transition.
88
88
  *
89
89
  * It does not touch the rim: `--surface-rim` inherits, so brightening it here
90
90
  * would repaint the rim of every raised surface nested inside the hovered one.
91
91
  *
92
- * This and `--surface-tint` are the same rung by two mechanisms, and both stay:
93
- * the pseudo-element transitions its colour and stops a pixel short of the rim,
94
- * which is what a surface with content inside it wants; the tint paints edge to
95
- * edge, cannot transition (a box-shadow list transitions as a whole, so the rim
96
- * and the drops would animate with it), and is the only option for an element
97
- * that cannot own a child — an `<input>`. Reach for this one unless the element
98
- * is a bare control. */
92
+ * `--surface-tint` is the same rung in the shadow slot, for a bare control whose
93
+ * states are all expressed there (an `<input>`, a `Button`). Reach for this one
94
+ * on anything else. A surface that paints its own `background-image` loses it
95
+ * while hovered, so it keeps its fill in `background-color` or `--surface-tint`. */
99
96
  @utility state-layer {
100
- position: relative;
101
- isolation: isolate;
102
-
103
- &::before {
104
- content: '';
105
- position: absolute;
106
- inset: 1px;
107
- z-index: -1;
108
- border-radius: inherit;
109
- pointer-events: none;
110
- transition: background-color var(--duration-fast) var(--ease-out-custom);
111
- }
112
-
113
97
  &:not(:disabled, [aria-disabled='true']) {
114
- &:hover::before,
115
- &:focus-visible::before {
116
- background-color: var(--fill-subtle);
98
+ &:hover,
99
+ &:focus-visible {
100
+ background-image: linear-gradient(var(--fill-subtle), var(--fill-subtle));
117
101
  }
118
102
 
119
- &:active::before {
120
- background-color: var(--fill);
121
- }
122
- }
123
-
124
- @media (prefers-reduced-motion: reduce) {
125
- &::before {
126
- transition: none;
103
+ &:active {
104
+ background-image: linear-gradient(var(--fill), var(--fill));
127
105
  }
128
106
  }
129
107
  }
@@ -810,7 +810,7 @@ var WorkflowEdgeDataButton = ({ previousStepId, output, label, selected, onInspe
810
810
  onClick: onInspect ?? (() => setIsOpen(true)),
811
811
  "aria-label": `View ${dataLabel}`,
812
812
  "aria-pressed": selected,
813
- className: require_utils.cn(require_primitives_raised_surface.raisedSurfaceStyle, require_primitives_raised_surface.surfaceStateLayerStyle, "h-7 rounded-lg px-2 text-foreground aria-pressed:before:bg-fill"),
813
+ className: require_utils.cn(require_primitives_raised_surface.raisedSurfaceStyle, require_primitives_raised_surface.surfaceStateLayerStyle, "h-7 rounded-lg px-2 text-foreground aria-pressed:bg-[linear-gradient(var(--fill),var(--fill))]"),
814
814
  icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Database, { className: "text-muted-foreground" }),
815
815
  children: "Data"
816
816
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Dialog.Dialog, {
@@ -1464,4 +1464,4 @@ Object.defineProperty(exports, "workflowFitOptions", {
1464
1464
  }
1465
1465
  });
1466
1466
 
1467
- //# sourceMappingURL=Workflow-CjRQqVIK.cjs.map
1467
+ //# sourceMappingURL=Workflow-CJIrfzSm.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Workflow-CJIrfzSm.cjs","names":["createContext","Repeat2","Workflow","GitFork","ArrowRightLeft","CalendarClock","Timer","Bot","Wrench","GitBranch","Braces","Badge","Timer","CalendarClock","List","Workflow","PlayCircle","Clock","Layers","Network","Repeat1","Repeat","RefreshCw","GitBranch","CornerDownRight","useState","formatDuration","Txt","Code","useState","Braces","raisedSurfaceStyle","Badge","_Fragment","CopyButton","Code","cn","Txt","formatDate","formatShortDate","formatDuration","useState","cn","Collapsible","raisedSurfaceStyle","Txt","Shimmer","Metadata","_Fragment","CollapsibleTrigger","DisclosureChevron","CollapsibleContent","ActivityWick","useCodemirrorTheme","javascript","EditorView","jsonLanguage","CopyButton","CodeMirror","codeFoldGutter","useState","_Fragment","Button","cn","raisedSurfaceStyle","surfaceStateLayerStyle","Database","Dialog","DialogContent","DialogHeader","DialogTitle","DialogBody","Txt","_Fragment","Handle","Position","cn","Txt","useInternalNode","Position","getBezierPath","useId","_Fragment","BaseEdge","EdgeLabelRenderer","useViewport","Badge","GitFork","forwardRef","useViewport","useReactFlow","useStore","Panel","cn","Button","Minus","Slider","Plus","Maximize","useRef","useId","useContext","useReactFlow","useNodesInitialized","useStore","cn","ReactFlow","Background","BackgroundVariant","_Fragment","Handle","Position","Txt","Badge","Pause","Button","Loader2","StepForwardIcon","PlayIcon","Skeleton","AlertCircleIcon","DropdownMenu","Button","MoreVerticalIcon","PanelRightIcon","BracesIcon","Clock3Icon","PlayIcon","StepForwardIcon","RotateCcwIcon","AlertCircleIcon","ShieldAlertIcon","DropdownMenu"],"sources":["../src/ds/components/Workflow/workflow-canvas-inset.ts","../src/ds/components/Workflow/cards/workflow-card-kind.ts","../src/ds/components/Workflow/cards/workflow-type-badge.tsx","../src/ds/components/Workflow/cards/workflow-card-badge-utils.ts","../src/ds/components/Workflow/cards/workflow-clock.tsx","../src/ds/components/Workflow/cards/condition/workflow-condition-expression.ts","../src/ds/components/Workflow/cards/condition/workflow-condition-source.tsx","../src/ds/components/Workflow/cards/condition/workflow-condition-card-view.tsx","../src/ds/components/Workflow/cards/timing/workflow-time-dial.tsx","../src/ds/components/Workflow/cards/timing/workflow-timing.tsx","../src/ds/components/Workflow/cards/step/workflow-step-card-view.tsx","../src/ds/components/Workflow/data/workflow-code-dialog-content.tsx","../src/ds/components/Workflow/data/workflow-edge-data-button.tsx","../src/ds/components/Workflow/graph/types.ts","../src/ds/components/Workflow/graph/workflow-boundary-node.tsx","../src/ds/components/Workflow/graph/workflow-data-edge-view.tsx","../src/ds/components/Workflow/graph/workflow-camera-duration.ts","../src/ds/components/Workflow/graph/workflow-graph-groups.tsx","../src/ds/components/Workflow/graph/zoom-slider.tsx","../src/ds/components/Workflow/graph/workflow-graph-canvas.tsx","../src/ds/components/Workflow/graph/workflow-node-frame.tsx","../src/ds/components/Workflow/controls/workflow-debug-controls.tsx","../src/ds/components/Workflow/graph/workflow-graph-placeholder.tsx","../src/ds/components/Workflow/cards/condition/workflow-condition-card.tsx","../src/ds/components/Workflow/controls/workflow-step-actions.tsx","../src/ds/components/Workflow/controls/workflow-step-action.tsx"],"sourcesContent":["import type { FitViewOptions } from '@xyflow/react';\nimport { createContext } from 'react';\n\nexport const WorkflowCanvasInsetContext = createContext(0);\n\nexport function workflowFitOptions(leftInset: number, isInline = false): FitViewOptions {\n return {\n maxZoom: 1,\n padding: isInline ? '20px' : { left: `${leftInset + 40}px`, right: '40px', top: '40px', bottom: '64px' },\n };\n}\n","import {\n ArrowRightLeft,\n Bot,\n Braces,\n CalendarClock,\n GitBranch,\n GitFork,\n Repeat2,\n Timer,\n Workflow,\n Wrench,\n} from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\nimport type { WorkflowStepCardViewProps } from '../types';\nimport type { BadgeVariant } from '@/ds/components/Badge';\n\nexport type WorkflowTypeBadgeProps = Pick<\n WorkflowStepCardViewProps,\n 'nodeKind' | 'isForEach' | 'isNestedWorkflowStep' | 'stepGraph' | 'isParallel' | 'mapConfig' | 'date' | 'duration'\n>;\n\nexport function getWorkflowCardBadge(props: WorkflowTypeBadgeProps): {\n label: string;\n Icon: LucideIcon;\n tone: BadgeVariant;\n indicator?: string;\n} {\n if (props.isForEach) return { label: 'For each', tone: 'orange', Icon: Repeat2, indicator: 'foreach' };\n if (props.isNestedWorkflowStep || props.stepGraph)\n return { label: 'Workflow', tone: 'purple', Icon: Workflow, indicator: 'workflow' };\n if (props.isParallel && !props.nodeKind)\n return { label: 'Parallel', tone: 'blue', Icon: GitFork, indicator: 'parallel' };\n if (props.nodeKind === 'map' || props.mapConfig)\n return { label: 'Map', tone: 'orange', Icon: ArrowRightLeft, indicator: 'map' };\n if (props.nodeKind === 'wait-until' || props.date)\n return { label: 'Wait until', tone: 'purple', Icon: CalendarClock, indicator: 'sleep-until' };\n if (props.nodeKind === 'delay' || props.duration !== undefined)\n return { label: 'Delay', tone: 'purple', Icon: Timer, indicator: 'sleep' };\n if (props.nodeKind === 'agent') return { label: 'Agent', tone: 'cyan', Icon: Bot };\n if (props.nodeKind === 'tool') return { label: 'Tool', tone: 'pink', Icon: Wrench };\n if (props.nodeKind === 'classifier') return { label: 'Classifier', tone: 'blue', Icon: GitBranch };\n return { label: 'Step', tone: 'neutral', Icon: Braces };\n}\n","import { getWorkflowCardBadge } from './workflow-card-kind';\nimport type { WorkflowTypeBadgeProps } from './workflow-card-kind';\nimport { Badge } from '@/ds/components/Badge';\n\nexport function WorkflowTypeBadge(props: WorkflowTypeBadgeProps) {\n const { label, Icon, tone } = getWorkflowCardBadge(props);\n return (\n <Badge size=\"xs\" variant={tone} icon={<Icon aria-hidden />}>\n {label}\n </Badge>\n );\n}\n","import {\n CalendarClock,\n Clock,\n CornerDownRight,\n GitBranch,\n Layers,\n List,\n Network,\n PlayCircle,\n RefreshCw,\n Repeat,\n Repeat1,\n Timer,\n Workflow,\n} from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\n\nexport const BADGE_COLORS = {\n sleep: 'var(--badge-purple-indicator)',\n forEach: 'var(--badge-orange-indicator)',\n map: 'var(--badge-orange-indicator)',\n parallel: 'var(--badge-blue-indicator)',\n suspend: 'var(--badge-pink-indicator)',\n after: 'var(--badge-cyan-indicator)',\n workflow: 'var(--badge-purple-indicator)',\n when: 'var(--badge-amber-indicator)',\n dountil: 'var(--badge-purple-indicator)',\n dowhile: 'var(--badge-cyan-indicator)',\n until: 'var(--badge-amber-indicator)',\n while: 'var(--badge-green-indicator)',\n if: 'var(--badge-blue-indicator)',\n else: 'var(--muted-foreground)',\n} as const;\n\nexport const BADGE_ICONS = {\n sleep: Timer,\n sleepUntil: CalendarClock,\n forEach: List,\n map: List,\n parallel: Workflow,\n suspend: PlayCircle,\n after: Clock,\n workflow: Layers,\n when: Network,\n dountil: Repeat1,\n dowhile: Repeat,\n until: Timer,\n while: RefreshCw,\n if: GitBranch,\n else: CornerDownRight,\n} as const;\n\nexport interface ConditionIconConfig {\n icon: LucideIcon | undefined;\n color: string | undefined;\n}\n\nexport interface WorkflowCardIndicator {\n id: string;\n label: string;\n icon: LucideIcon;\n color: string;\n}\n\nconst CONDITION_LABELS: Record<string, string> = {\n when: 'When condition',\n dountil: 'Do until condition',\n dowhile: 'Do while condition',\n until: 'Until condition',\n while: 'While condition',\n if: 'If condition',\n else: 'Else condition',\n and: 'And condition',\n or: 'Or condition',\n not: 'Not condition',\n};\n\nexport const getConditionIconAndColor = (type?: string): ConditionIconConfig => {\n switch (type) {\n case 'when':\n return { icon: BADGE_ICONS.when, color: BADGE_COLORS.when };\n case 'dountil':\n return { icon: BADGE_ICONS.dountil, color: BADGE_COLORS.dountil };\n case 'dowhile':\n return { icon: BADGE_ICONS.dowhile, color: BADGE_COLORS.dowhile };\n case 'until':\n return { icon: BADGE_ICONS.until, color: BADGE_COLORS.until };\n case 'while':\n return { icon: BADGE_ICONS.while, color: BADGE_COLORS.while };\n case 'if':\n return { icon: BADGE_ICONS.if, color: BADGE_COLORS.if };\n case 'else':\n return { icon: BADGE_ICONS.else, color: BADGE_COLORS.else };\n case 'and':\n case 'or':\n case 'not':\n return { icon: BADGE_ICONS.when, color: BADGE_COLORS.when };\n default:\n return { icon: undefined, color: undefined };\n }\n};\n\nexport const getConditionIndicator = (type?: string): WorkflowCardIndicator | undefined => {\n const { icon, color } = getConditionIconAndColor(type);\n\n if (!type || !icon || !color) {\n return undefined;\n }\n\n return {\n id: `condition-${type}`,\n label: CONDITION_LABELS[type] ?? `${type} condition`,\n icon,\n color,\n };\n};\n\nexport interface WorkflowNodeBadgeInfo {\n isSleepNode: boolean;\n isForEachNode: boolean;\n isMapNode: boolean;\n isNestedWorkflow: boolean;\n hasSpecialBadge: boolean;\n}\n\nexport interface WorkflowCardBadgesProps {\n duration?: number;\n date?: Date;\n isForEach?: boolean;\n mapConfig?: string;\n canSuspend?: boolean;\n isParallel?: boolean;\n stepGraph?: unknown;\n}\n\nexport const getNodeBadgeInfo = ({\n duration,\n date,\n isForEach,\n mapConfig,\n canSuspend,\n isParallel,\n stepGraph,\n}: WorkflowCardBadgesProps): WorkflowNodeBadgeInfo => {\n const isSleepNode = Boolean(duration || date);\n const isForEachNode = Boolean(isForEach);\n const isMapNode = Boolean(mapConfig && !isForEach);\n const isNestedWorkflow = Boolean(stepGraph);\n const hasSpecialBadge =\n isSleepNode || Boolean(canSuspend || isParallel) || isForEachNode || isMapNode || isNestedWorkflow;\n\n return {\n isSleepNode,\n isForEachNode,\n isMapNode,\n isNestedWorkflow,\n hasSpecialBadge,\n };\n};\n\nexport const getNodeIndicators = (props: WorkflowCardBadgesProps): WorkflowCardIndicator[] => {\n const { isSleepNode, isForEachNode, isMapNode, isNestedWorkflow } = getNodeBadgeInfo(props);\n const indicators: WorkflowCardIndicator[] = [];\n\n if (isSleepNode) {\n indicators.push({\n id: props.date ? 'sleep-until' : 'sleep',\n label: props.date ? 'Sleep until step' : 'Sleep step',\n icon: props.date ? BADGE_ICONS.sleepUntil : BADGE_ICONS.sleep,\n color: BADGE_COLORS.sleep,\n });\n }\n\n if (props.canSuspend) {\n indicators.push({\n id: 'suspend',\n label: 'Suspend/resume step',\n icon: BADGE_ICONS.suspend,\n color: BADGE_COLORS.suspend,\n });\n }\n\n if (props.isParallel) {\n indicators.push({\n id: 'parallel',\n label: 'Parallel step',\n icon: BADGE_ICONS.parallel,\n color: BADGE_COLORS.parallel,\n });\n }\n\n if (isNestedWorkflow) {\n indicators.push({\n id: 'workflow',\n label: 'Nested workflow step',\n icon: BADGE_ICONS.workflow,\n color: BADGE_COLORS.workflow,\n });\n }\n\n if (isForEachNode) {\n indicators.push({\n id: 'foreach',\n label: 'Foreach step',\n icon: BADGE_ICONS.forEach,\n color: BADGE_COLORS.forEach,\n });\n }\n\n if (isMapNode) {\n indicators.push({\n id: 'map',\n label: 'Map step',\n icon: BADGE_ICONS.map,\n color: BADGE_COLORS.map,\n });\n }\n\n return indicators;\n};\n","import { useEffect, useState } from 'react';\nimport { Txt } from '@/ds/components/Txt';\nimport { formatDuration } from '@/utils/duration';\n\ninterface WorkflowClockProps {\n startedAt: number;\n endedAt?: number;\n isRunning?: boolean;\n spansSuspension?: boolean;\n}\n\nexport const WorkflowClock = ({ startedAt, endedAt, isRunning = false, spansSuspension }: WorkflowClockProps) => {\n if (isRunning && endedAt === undefined && Number.isFinite(startedAt)) {\n return <RunningWorkflowClock key={startedAt} startedAt={startedAt} spansSuspension={spansSuspension} />;\n }\n return <ElapsedTime startedAt={startedAt} endedAt={endedAt} spansSuspension={spansSuspension} />;\n};\n\nfunction RunningWorkflowClock({ startedAt, spansSuspension }: Omit<WorkflowClockProps, 'isRunning'>) {\n const [time, setTime] = useState(() => Date.now());\n useEffect(() => {\n const interval = setInterval(() => setTime(Date.now()), 100);\n return () => clearInterval(interval);\n }, []);\n return <ElapsedTime startedAt={startedAt} endedAt={time} spansSuspension={spansSuspension} />;\n}\n\nfunction ElapsedTime({ startedAt, endedAt, spansSuspension }: Omit<WorkflowClockProps, 'isRunning'>) {\n const elapsed = endedAt === undefined ? undefined : formatDuration(endedAt - startedAt);\n\n return (\n <Txt\n variant=\"meta\"\n tone=\"muted\"\n font=\"mono\"\n className=\"whitespace-nowrap\"\n title={elapsed && spansSuspension ? 'Includes time spent suspended waiting for input' : undefined}\n >\n {elapsed === undefined ? <span aria-label=\"Timing unavailable\">—</span> : elapsed}\n </Txt>\n );\n}\n","import type { WorkflowCardCondition } from '../../types';\n\nexport function conditionExpression(condition: WorkflowCardCondition) {\n if (condition.fnString !== undefined) return condition.fnString;\n return JSON.stringify({ ref: condition.ref, query: condition.query, conj: condition.conj }, null, 2);\n}\n","import { useEffect, useState } from 'react';\nimport { Code } from '@/ds/components/Code';\nimport { formatTypeScript } from '@/utils/formatting';\n\nconst MAX_FORMATTED_SOURCE_CHARS = 10_000;\n\nexport function WorkflowConditionSource({ source }: { source: string }) {\n if (source.length > MAX_FORMATTED_SOURCE_CHARS) return <Code code={source} />;\n return <FormattedConditionSource key={source} source={source} />;\n}\n\nfunction FormattedConditionSource({ source }: { source: string }) {\n const [formatted, setFormatted] = useState<string>();\n\n useEffect(() => {\n let cancelled = false;\n formatTypeScript(source)\n .then(expression => {\n if (!cancelled) setFormatted(expression.trim());\n })\n .catch(() => undefined);\n return () => {\n cancelled = true;\n };\n }, [source]);\n\n return <Code code={formatted ?? source} lang={formatted === undefined ? undefined : 'typescript'} />;\n}\n","import { Braces } from 'lucide-react';\nimport type { WorkflowConditionCardViewProps } from '../../types';\nimport { getConditionIndicator } from '../workflow-card-badge-utils';\nimport { conditionExpression } from './workflow-condition-expression';\nimport { WorkflowConditionSource } from './workflow-condition-source';\nimport { Badge } from '@/ds/components/Badge';\nimport { Code } from '@/ds/components/Code';\nimport { CopyButton } from '@/ds/components/CopyButton';\nimport { raisedSurfaceStyle } from '@/ds/primitives/raised-surface';\n\nconst surfaceClasses = 'rounded-[calc(var(--radius-xl)-2px)] bg-card text-meta';\n\nexport function WorkflowConditionCardView({\n type,\n conditions,\n previousDisplayStatus,\n actionBar,\n}: WorkflowConditionCardViewProps) {\n const indicator = getConditionIndicator(type);\n const Icon = indicator?.icon ?? Braces;\n const label = indicator?.label.replace(/ condition$/, '') ?? 'Condition';\n const occurrences = new Map<string, number>();\n const sources = conditions.map(condition => {\n const expression = conditionExpression(condition);\n const identity = `${condition.type}:${expression}`;\n const occurrence = occurrences.get(identity) ?? 0;\n occurrences.set(identity, occurrence + 1);\n return { condition, expression, key: `${identity}:${occurrence}` };\n });\n const copyContent =\n conditions.length > 1 ? JSON.stringify(conditions, null, 2) : sources.map(source => source.expression).join('\\n');\n const hasExpression = type !== 'else' && sources.some(({ expression }) => expression.trim().length > 0);\n\n return (\n <div\n className={`${raisedSurfaceStyle} w-[274px] overflow-hidden rounded-xl p-0.5 has-focus-visible:outline-1 has-focus-visible:outline-offset-4 has-focus-visible:outline-border-focus`}\n data-workflow-node\n data-testid=\"workflow-condition-node\"\n data-workflow-step-status={previousDisplayStatus ?? 'idle'}\n >\n <div className=\"flex h-[46px] items-center gap-2 px-2.5 text-meta text-muted-foreground\">\n <Badge size=\"xs\" variant={type === 'else' ? 'neutral' : 'amber'} emphasis=\"subtle\" icon={<Icon aria-hidden />}>\n {label}\n </Badge>\n {hasExpression && (\n <>\n <span className=\"ml-auto\">Expression</span>\n <CopyButton content={copyContent} tooltip=\"Copy expression\" className=\"nodrag nopan\" />\n </>\n )}\n </div>\n {hasExpression ? (\n <div\n role=\"region\"\n aria-label=\"Condition details\"\n tabIndex={0}\n className={`${surfaceClasses} nodrag nopan nowheel max-h-55 overflow-auto p-3.5 text-foreground [&_pre]:leading-relaxed [&_pre]:whitespace-pre-wrap`}\n >\n {sources.map(({ condition, expression, key }) => (\n <div key={key}>\n {condition.conj && (\n <Badge size=\"xs\" variant=\"neutral\">\n {condition.conj.toUpperCase()}\n </Badge>\n )}\n {condition.fnString !== undefined ? (\n <WorkflowConditionSource source={condition.fnString} />\n ) : (\n <Code code={expression} />\n )}\n </div>\n ))}\n </div>\n ) : (\n <p className={`${surfaceClasses} p-3 text-muted-foreground`}>\n {type === 'else' ? 'When no other branch matches' : 'Condition expression unavailable'}\n </p>\n )}\n {actionBar && <div className=\"nodrag nopan flex justify-end px-2.5 py-1.5 empty:hidden\">{actionBar}</div>}\n </div>\n );\n}\n","import type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '@/utils/cn';\n\nexport type DurationUnit = 'ms' | 's' | 'min' | 'h';\n\nconst DIAL_CENTER = 58;\nconst CLOCK_TICK_ANGLES = Array.from({ length: 60 }, (_, index) => index * 6);\nconst DURATION_TICK_ANGLES = Array.from({ length: 41 }, (_, index) => -120 + index * 6);\n\nfunction pointAt(angle: number, radius: number) {\n const radians = (angle * Math.PI) / 180;\n return {\n x: DIAL_CENTER + Math.sin(radians) * radius,\n y: DIAL_CENTER - Math.cos(radians) * radius,\n };\n}\n\nfunction DialTick({ angle, major, className, ...props }: ComponentProps<'line'> & { angle: number; major: boolean }) {\n const outer = pointAt(angle, 49);\n const inner = pointAt(angle, major ? 38 : 43);\n return (\n <line\n x1={inner.x}\n y1={inner.y}\n x2={outer.x}\n y2={outer.y}\n className={cn(major ? 'stroke-placeholder' : 'stroke-border-strong', className)}\n {...props}\n />\n );\n}\n\nfunction DialHand({ angle, length }: { angle: number; length: number }) {\n const tip = pointAt(angle, length);\n return (\n <line\n x1={DIAL_CENTER}\n y1={DIAL_CENTER}\n x2={tip.x}\n y2={tip.y}\n className=\"stroke-1.5 stroke-muted-foreground\"\n strokeLinecap=\"round\"\n />\n );\n}\n\nfunction DialFace({ tickAngles, children }: { tickAngles: number[]; children: ReactNode }) {\n return (\n <span className=\"block size-28 shrink-0 text-muted-foreground\" aria-hidden>\n <svg viewBox=\"0 0 116 116\" fill=\"none\" className=\"block size-full overflow-visible\">\n {tickAngles.map((angle, index) => (\n <DialTick key={angle} angle={angle} major={index % 5 === 0} />\n ))}\n {children}\n </svg>\n </span>\n );\n}\n\nexport function ClockDial({ date }: { date: Date }) {\n const minutes = date.getUTCMinutes();\n return (\n <DialFace tickAngles={CLOCK_TICK_ANGLES}>\n <DialHand angle={((date.getUTCHours() % 12) + minutes / 60) * 30} length={26} />\n <DialHand angle={minutes * 6} length={37} />\n <circle cx={DIAL_CENTER} cy={DIAL_CENTER} r={2} fill=\"currentColor\" />\n </DialFace>\n );\n}\n\nexport function DurationDial({ amount, unit }: { amount: number; unit: DurationUnit }) {\n const scale = Math.max({ h: 24, ms: 1000, s: 60, min: 60 }[unit], Math.ceil(amount / 10) * 10);\n return (\n <DialFace tickAngles={DURATION_TICK_ANGLES}>\n <DialTick\n angle={-120 + (amount / scale) * 240}\n major\n className=\"stroke-foreground stroke-2\"\n strokeLinecap=\"round\"\n />\n <text x={DIAL_CENTER} y={94} textAnchor=\"middle\" className=\"fill-muted-foreground font-body text-meta\">\n {scale} {unit}\n </text>\n <text x={DIAL_CENTER} y={106} textAnchor=\"middle\" className=\"fill-placeholder font-body text-meta\">\n scale\n </text>\n </DialFace>\n );\n}\n","import type { ReactNode } from 'react';\nimport type { WorkflowStepCardViewProps } from '../../types';\nimport { ClockDial, DurationDial } from './workflow-time-dial';\nimport type { DurationUnit } from './workflow-time-dial';\nimport { Txt } from '@/ds/components/Txt';\nimport { formatDate, formatShortDate } from '@/utils/date-format';\nimport { formatDuration } from '@/utils/duration';\n\nconst captionClasses = 'text-meta tracking-wider whitespace-nowrap text-muted-foreground uppercase';\n\nfunction durationReading(duration: number): { amount: number; unit: DurationUnit } {\n if (duration < 1000) return { amount: duration, unit: 'ms' };\n if (duration < 60000) return { amount: duration / 1000, unit: 's' };\n if (duration < 3600000) return { amount: duration / 60000, unit: 'min' };\n return { amount: duration / 3600000, unit: 'h' };\n}\n\nfunction TimingReading({\n value,\n unit,\n caption,\n dial,\n}: {\n value: string;\n unit?: string;\n caption: string;\n dial: ReactNode;\n}) {\n return (\n <span className=\"mt-1 flex min-h-27 items-center justify-between gap-1 text-foreground\">\n <span className=\"z-10 flex min-w-0 flex-col gap-2\">\n <Txt\n as=\"span\"\n variant=\"display\"\n className=\"flex items-baseline gap-1 leading-none tracking-tighter whitespace-nowrap tabular-nums\"\n >\n {value}\n {unit && <small className=\"text-meta tracking-normal text-muted-foreground\">{unit}</small>}\n </Txt>\n <span className={captionClasses}>{caption}</span>\n </span>\n {dial}\n </span>\n );\n}\n\nexport function WorkflowTiming({ duration, date }: Pick<WorkflowStepCardViewProps, 'duration' | 'date'>) {\n if (date) {\n const scheduled = new Date(date);\n if (!Number.isFinite(scheduled.getTime())) {\n return <span className={captionClasses}>Schedule unavailable</span>;\n }\n return (\n <TimingReading\n value={formatDate(scheduled, 'time', { timeZone: 'UTC' }) ?? ''}\n unit=\"UTC\"\n caption={formatShortDate(scheduled, { timeZone: 'UTC', now: 0 }) ?? ''}\n dial={<ClockDial date={scheduled} />}\n />\n );\n }\n if (duration === undefined) return null;\n if (!Number.isFinite(duration) || duration < 0) {\n return <span className={captionClasses}>Delay unavailable</span>;\n }\n const reading = durationReading(duration);\n return (\n <TimingReading\n value={formatDuration(duration) ?? ''}\n caption=\"Configured delay\"\n dial={<DurationDial {...reading} />}\n />\n );\n}\n","import { useState } from 'react';\nimport type { CSSProperties } from 'react';\nimport type { WorkflowCardDisplayStatus, WorkflowStepCardViewProps } from '../../types';\nimport { WorkflowTiming } from '../timing/workflow-timing';\nimport { getNodeIndicators } from '../workflow-card-badge-utils';\nimport { getWorkflowCardBadge } from '../workflow-card-kind';\nimport { WorkflowClock } from '../workflow-clock';\nimport { WorkflowTypeBadge } from '../workflow-type-badge';\nimport { ActivityWick } from '@/ds/components/Activity';\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/ds/components/Collapsible';\nimport { DisclosureChevron } from '@/ds/components/DisclosureChevron';\nimport { Metadata } from '@/ds/components/Metadata';\nimport { Shimmer } from '@/ds/components/Shimmer';\nimport { Txt } from '@/ds/components/Txt';\nimport { raisedSurfaceStyle, surfaceStateLayerStyle } from '@/ds/primitives/raised-surface';\nimport { cn } from '@/utils/cn';\n\ntype ReportedStatus = NonNullable<WorkflowCardDisplayStatus>;\n\nconst statusLabels = {\n running: 'Running',\n success: 'Completed',\n failed: 'Failed',\n suspended: 'Needs input',\n waiting: 'Waiting',\n paused: 'Paused',\n skipped: 'Skipped',\n canceled: 'Canceled',\n tripwire: 'Tripwire blocked',\n} satisfies Record<ReportedStatus, string>;\n\nconst statusLineClasses: Partial<Record<ReportedStatus, string>> = {\n success: 'after:bg-success-indicator',\n failed: 'after:bg-destructive-indicator',\n tripwire: 'after:bg-warning-indicator',\n waiting: 'after:bg-warning-indicator',\n paused: 'after:bg-warning-indicator',\n skipped: 'after:bg-muted-foreground',\n};\n\nconst footerStatusClasses: Partial<Record<ReportedStatus, string>> = {\n success: 'text-success-indicator',\n failed: 'text-destructive-foreground',\n suspended: 'text-warning-foreground',\n tripwire: 'text-warning-foreground',\n};\n\nconst suspendedWickStyle: CSSProperties & { '--belt-hue': string } = { '--belt-hue': 'var(--warning-indicator)' };\n\nexport function WorkflowStepCardView(props: WorkflowStepCardViewProps) {\n const {\n label,\n description,\n displayStatus,\n stepKey,\n isSelected,\n isWaiting,\n isHovered,\n onHoverChange,\n onSelect,\n isForEach,\n foreachProgress,\n startedAt,\n endedAt,\n actionBar,\n body,\n } = props;\n const [expanded, setExpanded] = useState(props.initiallyOpen ?? false);\n const isRunning = displayStatus === 'running';\n const isSuspended = displayStatus === 'suspended';\n const reportedStatusLabel =\n displayStatus && Object.hasOwn(statusLabels, displayStatus) ? statusLabels[displayStatus] : undefined;\n const statusLabel = displayStatus ? (reportedStatusLabel ?? 'Status unavailable') : 'Not started';\n const kind = getWorkflowCardBadge(props);\n const capabilities = getNodeIndicators(props)\n .filter(indicator => indicator.id !== kind.indicator)\n .map(indicator => indicator.label.replace(/ step$/, ''));\n const hasActivity = isRunning || isSuspended;\n const isStacked = isForEach && !expanded;\n const isBodyExpanded = Boolean(body) && expanded;\n const Summary = onSelect ? 'button' : 'div';\n\n return (\n <div\n className={cn(\n 'relative isolate w-[274px]',\n isBodyExpanded && 'w-172',\n isStacked &&\n 'pb-3 before:absolute before:inset-x-1.5 before:top-2 before:bottom-1.5 before:-z-10 before:rounded-xl before:border before:border-border before:bg-card after:absolute after:inset-x-3 after:top-3.5 after:bottom-0 after:-z-20 after:rounded-xl after:border after:border-border after:bg-card',\n )}\n >\n <Collapsible\n open={expanded}\n onOpenChange={setExpanded}\n className={cn(\n raisedSurfaceStyle,\n 'relative rounded-xl border border-transparent text-foreground transition-[border-color,background-color,box-shadow] [--card-radius:calc(var(--radius-xl)-2px)] motion-reduce:transition-none',\n 'after:pointer-events-none after:absolute after:inset-x-4 after:-top-px after:h-px after:mask-x-from-76%',\n displayStatus && statusLineClasses[displayStatus],\n 'has-focus-visible:outline-1 has-focus-visible:outline-offset-4 has-focus-visible:outline-border-focus',\n isSelected && 'outline-1 outline-offset-4 outline-border-focus',\n isBodyExpanded && 'border-dashed border-muted-foreground/40 shadow-none',\n isWaiting && 'border-info-indicator',\n isHovered && !isSelected && 'bg-muted',\n )}\n data-workflow-node\n data-workflow-step-key={stepKey}\n data-workflow-step-status={displayStatus ?? 'idle'}\n data-workflow-step-active={isSelected || undefined}\n data-workflow-step-waiting={isWaiting || undefined}\n data-workflow-step-hovered={isHovered || undefined}\n data-testid={props.isNestedWorkflowStep ? 'workflow-nested-node' : 'workflow-default-node'}\n onMouseEnter={() => onHoverChange?.(true)}\n onMouseLeave={() => onHoverChange?.(false)}\n >\n <div className=\"m-0.5 overflow-hidden rounded-(--card-radius)\">\n <Summary\n className={cn(\n 'nodrag nopan flex w-full flex-col text-left',\n onSelect && 'group cursor-pointer focus-visible:outline-hidden',\n )}\n type={onSelect ? 'button' : undefined}\n aria-label={onSelect ? `Inspect ${label}` : undefined}\n aria-pressed={onSelect ? Boolean(isSelected) : undefined}\n onClick={onSelect}\n >\n <span className=\"flex items-start justify-between gap-2.5 rounded-(--card-radius) px-3.5 py-3 group-hover:bg-fill-subtle\">\n <Txt as=\"span\" variant=\"column\" tone=\"ink\" className=\"min-w-0 wrap-anywhere\" title={label}>\n <Shimmer active={isRunning}>{label}</Shimmer>\n </Txt>\n <WorkflowTypeBadge {...props} />\n </span>\n <span className=\"flex flex-col gap-2 rounded-t-(--card-radius) bg-card px-3.5 py-3 empty:py-1.5\">\n {description && (\n <Txt as=\"span\" variant=\"caption\" tone=\"muted\" className=\"wrap-anywhere\">\n {description}\n </Txt>\n )}\n <WorkflowTiming duration={props.duration} date={props.date} />\n {isWaiting && (\n <Txt as=\"span\" variant=\"meta\" className=\"text-info-indicator\">\n Next step in debug\n </Txt>\n )}\n {isForEach && foreachProgress && (\n <Txt as=\"span\" variant=\"meta\" className=\"flex flex-col gap-2 py-1\">\n <span>\n <strong>{foreachProgress.completedCount}</strong> of {foreachProgress.totalCount} items complete\n </span>\n {foreachProgress.totalCount > 0 ? (\n <progress\n className=\"h-1 w-full appearance-none border-0 bg-muted accent-success-indicator [&::-moz-progress-bar]:bg-success-indicator [&::-webkit-progress-bar]:bg-muted [&::-webkit-progress-value]:bg-success-indicator\"\n aria-label={`${label} completed items`}\n value={foreachProgress.completedCount}\n max={foreachProgress.totalCount}\n />\n ) : (\n <span>No items to process</span>\n )}\n </Txt>\n )}\n {capabilities.length > 0 && (\n <Txt as=\"span\" variant=\"meta\" tone=\"muted\">\n <Metadata>\n {capabilities.map(capability => (\n <Metadata.Item key={capability}>{capability}</Metadata.Item>\n ))}\n </Metadata>\n </Txt>\n )}\n </span>\n </Summary>\n <div\n className={cn(\n 'nodrag nopan flex min-h-7 items-center justify-between gap-2 bg-card px-3.5 pb-2.5 text-meta text-muted-foreground',\n displayStatus && footerStatusClasses[displayStatus],\n )}\n >\n <span role=\"status\" className={isRunning ? 'sr-only motion-reduce:not-sr-only' : undefined}>\n {statusLabel}\n </span>\n {startedAt !== undefined && (\n <span className=\"ml-auto\">\n <WorkflowClock\n startedAt={startedAt}\n endedAt={endedAt}\n isRunning={isRunning}\n spansSuspension={props.spansSuspension}\n />\n </span>\n )}\n {actionBar}\n </div>\n\n {body && (\n <>\n <CollapsibleTrigger\n className={cn(\n surfaceStateLayerStyle,\n 'nodrag nopan flex min-h-11 w-full items-center justify-between border-t border-border bg-card px-3.5 py-2.5 text-caption focus-visible:outline-hidden',\n )}\n >\n <span>\n {expanded ? 'Collapse' : 'Expand'} {isForEach ? 'loop' : 'workflow'}\n </span>\n <DisclosureChevron direction=\"right\" className=\"size-3.5\" />\n </CollapsibleTrigger>\n <CollapsibleContent className=\"h-155 overflow-hidden border-t border-dashed border-border\">\n {body}\n </CollapsibleContent>\n </>\n )}\n </div>\n {hasActivity && (\n <ActivityWick\n status={isSuspended ? 'ready' : 'working'}\n aria-hidden\n className=\"before:hidden\"\n style={isSuspended ? suspendedWickStyle : undefined}\n />\n )}\n </Collapsible>\n </div>\n );\n}\n","import { javascript } from '@codemirror/lang-javascript';\nimport { jsonLanguage } from '@codemirror/lang-json';\nimport { EditorView } from '@codemirror/view';\nimport CodeMirror from '@uiw/react-codemirror';\nimport { codeFoldGutter, useCodemirrorTheme } from '@/ds/components/CodeEditor';\nimport { CopyButton } from '@/ds/components/CopyButton';\n\nexport const WorkflowCodeContent = ({\n data,\n language = 'auto',\n}: {\n data: unknown;\n language?: 'json' | 'javascript' | 'auto';\n}) => {\n const theme = useCodemirrorTheme();\n\n const getExtensions = (content: string) => {\n if (language === 'javascript') {\n return [javascript(), EditorView.lineWrapping];\n }\n if (language === 'json') {\n return [jsonLanguage, EditorView.lineWrapping];\n }\n\n try {\n JSON.parse(content);\n return [jsonLanguage, EditorView.lineWrapping];\n } catch {\n if (\n content.includes('=>') ||\n content.includes('function') ||\n content.includes('const ') ||\n content.includes('return ')\n ) {\n return [javascript(), EditorView.lineWrapping];\n }\n return [EditorView.lineWrapping];\n }\n };\n\n if (typeof data !== 'string') {\n const content = JSON.stringify(data, null, 2);\n return (\n <div className=\"relative overflow-auto\" style={{ maxHeight: 500 }}>\n <div className=\"absolute top-2 right-2 z-10 rounded-full bg-muted\">\n <CopyButton content={content} />\n </div>\n <div className=\"rounded-lg bg-muted p-4\">\n <CodeMirror\n value={content}\n theme={theme}\n extensions={[jsonLanguage, EditorView.lineWrapping, codeFoldGutter]}\n basicSetup={{ foldGutter: false }}\n />\n </div>\n </div>\n );\n }\n\n const extensions = getExtensions(data);\n\n let displayContent = data;\n try {\n const json = JSON.parse(data);\n displayContent = JSON.stringify(json, null, 2);\n } catch {}\n\n return (\n <div className=\"relative overflow-auto\" style={{ maxHeight: 500 }}>\n <div className=\"absolute top-2 right-2 z-10 rounded-full bg-muted\">\n <CopyButton content={data} />\n </div>\n <div className=\"rounded-lg bg-muted p-4\">\n <CodeMirror\n value={displayContent}\n theme={theme}\n extensions={[...extensions, codeFoldGutter]}\n basicSetup={{ foldGutter: false }}\n />\n </div>\n </div>\n );\n};\n","import { Database } from 'lucide-react';\nimport { useState } from 'react';\nimport type { MouseEventHandler } from 'react';\nimport { WorkflowCodeContent } from './workflow-code-dialog-content';\nimport { Button } from '@/ds/components/Button';\nimport { Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle } from '@/ds/components/Dialog';\nimport { Txt } from '@/ds/components/Txt';\nimport { raisedSurfaceStyle, surfaceStateLayerStyle } from '@/ds/primitives/raised-surface';\nimport { cn } from '@/lib/utils';\n\nexport interface WorkflowEdgeDataButtonProps {\n previousStepId?: string;\n output?: unknown;\n label?: string;\n selected?: boolean;\n onInspect?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport const WorkflowEdgeDataButton = ({\n previousStepId,\n output,\n label,\n selected,\n onInspect,\n}: WorkflowEdgeDataButtonProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const dataLabel = label ?? (previousStepId ? `${previousStepId} output` : 'Previous output');\n\n if (output === undefined) {\n return null;\n }\n\n return (\n <>\n <Button\n size=\"sm\"\n variant=\"ghost\"\n onClick={onInspect ?? (() => setIsOpen(true))}\n aria-label={`View ${dataLabel}`}\n aria-pressed={selected}\n className={cn(\n raisedSurfaceStyle,\n surfaceStateLayerStyle,\n 'h-7 rounded-lg px-2 text-foreground aria-pressed:bg-[linear-gradient(var(--fill),var(--fill))]',\n )}\n icon={<Database className=\"text-muted-foreground\" />}\n >\n Data\n </Button>\n\n <Dialog open={isOpen} onOpenChange={setIsOpen}>\n <DialogContent size=\"xl\">\n <DialogHeader>\n <DialogTitle>Step output</DialogTitle>\n </DialogHeader>\n <DialogBody>\n <div className=\"min-w-0 rounded-lg border border-border bg-background p-3\">\n <Txt variant=\"caption\" tone=\"ink\" className=\"mb-2 block\">\n {dataLabel}\n </Txt>\n <WorkflowCodeContent data={output} />\n </div>\n </DialogBody>\n </DialogContent>\n </Dialog>\n </>\n );\n};\n","import type { Edge, Node } from '@xyflow/react';\n\nexport const WORKFLOW_DATA_EDGE_TYPE = 'workflow-data-edge';\nexport const WORKFLOW_BOUNDARY_NODE_TYPE = 'workflow-boundary-node';\n\nexport interface WorkflowDataEdgeData {\n [key: string]: unknown;\n previousStepId?: string;\n nextStepId?: string;\n conditionNode?: boolean;\n boundaryPayload?: 'workflow-input' | 'workflow-output';\n edgeStatus?: 'success' | 'idle';\n dataLabelPlacement?: 'source' | 'hidden';\n}\n\nexport type WorkflowDataEdgeModel = Edge<WorkflowDataEdgeData, typeof WORKFLOW_DATA_EDGE_TYPE>;\n\nexport type WorkflowBoundaryNodeData = {\n boundaryRole: 'start' | 'end';\n label: string;\n};\n\nexport type WorkflowBoundaryNodeModel = Node<WorkflowBoundaryNodeData, typeof WORKFLOW_BOUNDARY_NODE_TYPE>;\n","import { Handle, Position } from '@xyflow/react';\nimport type { NodeProps } from '@xyflow/react';\n\nimport type { WorkflowBoundaryNodeModel } from './types';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/utils/cn';\n\nexport const WorkflowBoundaryNode = ({ data }: NodeProps<WorkflowBoundaryNodeModel>) => {\n const isStart = data.boundaryRole === 'start';\n\n return (\n <>\n {!isStart && <Handle type=\"target\" position={Position.Top} style={{ visibility: 'hidden' }} />}\n <div\n data-workflow-boundary-node\n data-testid={`workflow-boundary-${data.boundaryRole}`}\n className={cn(\n 'relative flex h-[38px] w-28 items-center justify-center text-muted-foreground after:absolute after:inset-x-0 after:mask-x-from-60%',\n isStart\n ? 'after:bottom-0 after:h-px after:bg-muted-foreground'\n : 'after:top-0 after:h-1 after:border-y after:border-muted-foreground',\n )}\n >\n <Txt variant=\"meta\">{data.label}</Txt>\n </div>\n {isStart && <Handle type=\"source\" position={Position.Bottom} style={{ visibility: 'hidden' }} />}\n </>\n );\n};\n","import { BaseEdge, EdgeLabelRenderer, getBezierPath, Position, useInternalNode } from '@xyflow/react';\nimport type { EdgeProps } from '@xyflow/react';\nimport { useId } from 'react';\nimport type { ReactNode } from 'react';\nimport { WorkflowEdgeDataButton } from '../data/workflow-edge-data-button';\nimport type { WorkflowDataEdgeModel } from './types';\n\nexport interface WorkflowDataEdgeViewProps extends EdgeProps<WorkflowDataEdgeModel> {\n output?: unknown;\n dataControl?: ReactNode;\n}\n\nexport function WorkflowDataEdgeView({ output, label, dataControl, ...props }: WorkflowDataEdgeViewProps) {\n const source = useInternalNode(props.source);\n const target = useInternalNode(props.target);\n const sourceWidth = source?.measured?.width ?? source?.width;\n const sourceHeight = source?.measured?.height ?? source?.height;\n const targetWidth = target?.measured?.width ?? target?.width;\n const hasBottomSource =\n source && sourceWidth !== undefined && sourceHeight !== undefined && props.sourcePosition === Position.Bottom;\n const hasTopTarget = target && targetWidth !== undefined && props.targetPosition === Position.Top;\n // Nested canvases scale DOM handle measurements twice; route in graph coordinates.\n const sourceX = hasBottomSource ? source.internals.positionAbsolute.x + sourceWidth / 2 : props.sourceX;\n const sourceY = hasBottomSource ? source.internals.positionAbsolute.y + sourceHeight : props.sourceY;\n const targetX = hasTopTarget ? target.internals.positionAbsolute.x + targetWidth / 2 : props.targetX;\n const targetY = hasTopTarget ? target.internals.positionAbsolute.y : props.targetY;\n const [edgePath, midpointX, midpointY] = getBezierPath({\n ...props,\n sourceX,\n sourceY,\n targetX,\n targetY,\n });\n const labelPlacement = props.data?.dataLabelPlacement;\n const labelX = labelPlacement === 'source' ? sourceX : midpointX;\n const labelY = labelPlacement === 'source' ? sourceY + Math.min(24, Math.max(0, (targetY - sourceY) / 4)) : midpointY;\n const arrowId = useId();\n const isExecuted = props.data?.edgeStatus === 'success';\n const pathColor = isExecuted ? 'var(--success-indicator)' : 'var(--muted-foreground)';\n\n return (\n <>\n <defs>\n <marker id={arrowId} viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"5\" markerHeight=\"5\" orient=\"auto\">\n <path d=\"M1 1 L9 5 L1 9 Z\" fill={pathColor} />\n </marker>\n </defs>\n <BaseEdge\n id={props.id}\n path={edgePath}\n markerEnd={`url(#${arrowId})`}\n style={{\n ...props.style,\n stroke: pathColor,\n strokeWidth: isExecuted ? 2 : 1,\n strokeLinecap: 'round',\n strokeDasharray: isExecuted ? 'none' : '5 6',\n }}\n vectorEffect=\"non-scaling-stroke\"\n data-edge-status={props.data?.edgeStatus ?? 'idle'}\n data-edge-from={props.data?.previousStepId}\n data-edge-to={props.data?.nextStepId}\n />\n {labelPlacement !== 'hidden' && (\n <EdgeLabelRenderer>\n <div\n className=\"nodrag nopan flex items-center justify-center\"\n style={{\n position: 'absolute',\n pointerEvents: 'all',\n transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)`,\n }}\n >\n {dataControl ?? (\n <WorkflowEdgeDataButton\n previousStepId={props.data?.boundaryPayload ? undefined : props.data?.previousStepId}\n output={output}\n label={typeof label === 'string' ? label : undefined}\n />\n )}\n </div>\n </EdgeLabelRenderer>\n )}\n </>\n );\n}\n","export function workflowCameraDuration() {\n return window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ? 0 : 300;\n}\n","import { useViewport } from '@xyflow/react';\nimport type { Node } from '@xyflow/react';\nimport { GitFork } from 'lucide-react';\nimport { Badge } from '@/ds/components/Badge';\n\nexport interface WorkflowGraphGroup {\n id: string;\n label: string;\n description: string;\n nodeIds: string[];\n}\n\nexport function WorkflowGraphGroups({ nodes, groups }: { nodes: Node[]; groups: WorkflowGraphGroup[] }) {\n const { x, y, zoom } = useViewport();\n return (\n <div\n className=\"pointer-events-none absolute inset-0 z-0 origin-top-left\"\n style={{ transform: `translate(${x}px, ${y}px) scale(${zoom})` }}\n >\n {groups.map(group => {\n const members = nodes.flatMap(node => {\n if (!group.nodeIds.includes(node.id) || !node.measured?.width || !node.measured.height) return [];\n return [{ x: node.position.x, y: node.position.y, width: node.measured.width, height: node.measured.height }];\n });\n if (!members.length || members.length !== group.nodeIds.length) return null;\n const left = Math.min(...members.map(node => node.x)) - 20;\n const top = Math.min(...members.map(node => node.y)) - 54;\n const right = Math.max(...members.map(node => node.x + node.width)) + 20;\n const bottom = Math.max(...members.map(node => node.y + node.height)) + 20;\n return (\n <div\n key={group.id}\n className=\"absolute rounded-xl border border-dashed border-muted-foreground/25 bg-muted-foreground/3\"\n style={{ transform: `translate(${left}px, ${top}px)`, width: right - left, height: bottom - top }}\n >\n <div className=\"flex items-center gap-2 px-5 py-4 text-meta text-muted-foreground\">\n <Badge size=\"xs\" variant=\"blue\" emphasis=\"subtle\" icon={<GitFork aria-hidden />}>\n {group.label}\n </Badge>\n <span>{group.description}</span>\n </div>\n </div>\n );\n })}\n </div>\n );\n}\n","import type { PanelProps } from '@xyflow/react';\nimport { Panel, useViewport, useReactFlow, useStore } from '@xyflow/react';\nimport { Maximize, Minus, Plus } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { workflowCameraDuration } from './workflow-camera-duration';\nimport { Button } from '@/ds/components/Button';\nimport { Slider } from '@/ds/components/Slider';\nimport { cn } from '@/utils/cn';\n\nexport const ZoomSlider = forwardRef<\n HTMLDivElement,\n Omit<PanelProps, 'children'> & { compact?: boolean; onFitView?: () => void }\n>(({ className, compact = false, onFitView, ...props }, ref) => {\n const { zoom } = useViewport();\n const { zoomTo, zoomIn, zoomOut, fitView } = useReactFlow();\n const minZoom = useStore(state => state.minZoom);\n const maxZoom = useStore(state => state.maxZoom);\n\n return (\n <Panel\n ref={ref}\n className={cn(\n 'flex items-center gap-1 rounded-full border border-border bg-background p-1 text-foreground',\n className,\n )}\n {...props}\n >\n <Button\n size=\"icon-sm\"\n tooltip=\"Zoom out\"\n disabled={zoom <= minZoom}\n onClick={() => zoomOut({ duration: workflowCameraDuration() })}\n >\n <Minus />\n </Button>\n {!compact && (\n <Slider\n className=\"w-35\"\n aria-label=\"Canvas zoom\"\n value={[zoom]}\n min={minZoom}\n max={maxZoom}\n step={0.01}\n largeStep={0.25}\n format={{ style: 'percent' }}\n onValueChange={values => {\n const [nextZoom] = values;\n if (nextZoom !== undefined) void zoomTo(nextZoom);\n }}\n />\n )}\n <Button\n size=\"icon-sm\"\n tooltip=\"Zoom in\"\n disabled={zoom >= maxZoom}\n onClick={() => zoomIn({ duration: workflowCameraDuration() })}\n >\n <Plus />\n </Button>\n <Button\n size=\"sm\"\n className=\"min-w-16 tabular-nums\"\n tooltip=\"Reset to actual size (100%)\"\n onClick={() => zoomTo(1, { duration: workflowCameraDuration() })}\n >\n {(100 * zoom).toFixed(0)}%\n </Button>\n <Button\n size=\"icon-sm\"\n tooltip=\"Fit view\"\n onClick={onFitView ?? (() => fitView({ duration: workflowCameraDuration(), maxZoom: 1 }))}\n >\n <Maximize />\n </Button>\n </Panel>\n );\n});\n\nZoomSlider.displayName = 'ZoomSlider';\n","import { Background, BackgroundVariant, ReactFlow, useNodesInitialized, useReactFlow, useStore } from '@xyflow/react';\nimport type { Edge, Node, ReactFlowProps } from '@xyflow/react';\nimport { useContext, useEffect, useId, useRef } from 'react';\nimport { WorkflowCanvasInsetContext, workflowFitOptions } from '../workflow-canvas-inset';\nimport { workflowCameraDuration } from './workflow-camera-duration';\nimport { WorkflowGraphGroups } from './workflow-graph-groups';\nimport type { WorkflowGraphGroup } from './workflow-graph-groups';\nimport { ZoomSlider } from './zoom-slider';\nimport { cn } from '@/utils/cn';\nimport '@xyflow/react/dist/style.css';\n\nexport type { WorkflowGraphGroup } from './workflow-graph-groups';\n\nexport interface WorkflowGraphCanvasProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> extends Pick<\n ReactFlowProps<NodeType, EdgeType>,\n 'nodes' | 'edges' | 'nodeTypes' | 'edgeTypes' | 'onNodesChange' | 'onNodeClick'\n> {\n focusNodeId?: string;\n variant?: 'default' | 'nested' | 'inline';\n groups?: WorkflowGraphGroup[];\n}\n\nexport function WorkflowGraphCanvas<NodeType extends Node, EdgeType extends Edge>({\n nodes,\n edges,\n nodeTypes,\n edgeTypes,\n onNodesChange,\n onNodeClick,\n focusNodeId,\n groups,\n variant = 'default',\n}: WorkflowGraphCanvasProps<NodeType, EdgeType>) {\n const graphRef = useRef<HTMLDivElement>(null);\n const backgroundId = useId();\n const panelInset = useContext(WorkflowCanvasInsetContext);\n const leftInset = variant === 'default' ? panelInset : 0;\n const isInline = variant === 'inline';\n const { getNodes, setCenter, fitView } = useReactFlow<NodeType, EdgeType>();\n const nodesInitialized = useNodesInitialized();\n const canvasWidth = useStore(state => state.width);\n const canvasHeight = useStore(state => state.height);\n const hasCompactZoom = canvasWidth - leftInset < 560;\n const inlineNodeLayout = isInline\n ? JSON.stringify(\n nodes?.map(node => [\n node.id,\n node.position.x,\n node.position.y,\n node.measured?.width ?? node.width,\n node.measured?.height ?? node.height,\n ]),\n )\n : undefined;\n\n useEffect(() => {\n if (!canvasWidth || !canvasHeight || !nodesInitialized) return;\n if (variant === 'default') return;\n void fitView({ ...workflowFitOptions(leftInset, isInline), duration: 0 });\n }, [canvasWidth, canvasHeight, nodesInitialized, inlineNodeLayout, fitView, leftInset, isInline, variant]);\n\n useEffect(() => {\n if (!canvasWidth || !canvasHeight || !nodesInitialized || !focusNodeId) return;\n const focusNode = getNodes().find(node => node.id === focusNodeId);\n if (!focusNode) return;\n if (!graphRef.current?.contains(document.activeElement)) {\n graphRef.current?.focus({ preventScroll: true });\n }\n const width = focusNode.measured?.width ?? focusNode.width ?? 274;\n const height = focusNode.measured?.height ?? focusNode.height ?? 100;\n const duration = workflowCameraDuration();\n const exceedsVisibleWidth = canvasWidth > 0 && width > canvasWidth - leftInset - 80;\n const exceedsVisibleHeight = canvasHeight > 0 && height > canvasHeight - 104;\n if (exceedsVisibleWidth || exceedsVisibleHeight) {\n void fitView({ ...workflowFitOptions(leftInset), nodes: [{ id: focusNode.id }], duration });\n return;\n }\n void setCenter(focusNode.position.x + width / 2 - leftInset / 2, focusNode.position.y + height / 2, {\n duration,\n zoom: 1,\n });\n }, [canvasWidth, canvasHeight, nodesInitialized, focusNodeId, getNodes, setCenter, fitView, leftInset]);\n\n return (\n <div\n ref={graphRef}\n tabIndex={-1}\n data-testid=\"workflow-graph-viewport\"\n className={cn('size-full outline-none', variant === 'nested' ? 'bg-sidebar' : 'bg-background')}\n >\n <ReactFlow\n fitView={variant === 'default'}\n fitViewOptions={workflowFitOptions(leftInset)}\n nodes={nodes}\n edges={edges}\n nodeTypes={nodeTypes}\n edgeTypes={edgeTypes}\n onNodesChange={onNodesChange}\n onNodeClick={onNodeClick}\n nodesDraggable={false}\n nodesConnectable={false}\n elementsSelectable={false}\n deleteKeyCode={null}\n panOnScroll={!isInline}\n panOnDrag={!isInline}\n zoomOnPinch={!isInline}\n zoomOnDoubleClick={!isInline}\n preventScrolling={!isInline}\n proOptions={isInline ? { hideAttribution: true } : undefined}\n zoomOnScroll={false}\n minZoom={0.1}\n maxZoom={4}\n >\n {!isInline && (\n <ZoomSlider\n position=\"top-right\"\n className=\"m-2!\"\n compact={hasCompactZoom}\n onFitView={() => fitView({ ...workflowFitOptions(leftInset), duration: workflowCameraDuration() })}\n />\n )}\n {groups && <WorkflowGraphGroups nodes={nodes ?? []} groups={groups} />}\n {!isInline && <Background id={backgroundId} variant={BackgroundVariant.Dots} gap={12} size={0.5} />}\n </ReactFlow>\n </div>\n );\n}\n","import { Handle, Position } from '@xyflow/react';\nimport type { ReactNode } from 'react';\n\nexport interface WorkflowNodeFrameProps {\n withoutTopHandle?: boolean;\n withoutBottomHandle?: boolean;\n children: ReactNode;\n}\n\nexport function WorkflowNodeFrame({ withoutTopHandle, withoutBottomHandle, children }: WorkflowNodeFrameProps) {\n return (\n <>\n {!withoutTopHandle && <Handle type=\"target\" position={Position.Top} style={{ visibility: 'hidden' }} />}\n <div className=\"nodrag pointer-events-auto\">{children}</div>\n {!withoutBottomHandle && <Handle type=\"source\" position={Position.Bottom} style={{ visibility: 'hidden' }} />}\n </>\n );\n}\n","import { Loader2, Pause, PlayIcon, StepForwardIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport { Badge } from '@/ds/components/Badge';\nimport { Button } from '@/ds/components/Button';\nimport { Txt } from '@/ds/components/Txt';\n\nexport interface WorkflowDebugControlsProps {\n isStreaming?: boolean;\n canRunNextStep: boolean;\n nextStepLabel?: string;\n disabled?: boolean;\n children?: ReactNode;\n onRunNextStep: () => void;\n onContinueRun: () => void;\n}\n\nexport function WorkflowDebugControls({\n isStreaming,\n canRunNextStep,\n nextStepLabel,\n disabled,\n children,\n onRunNextStep,\n onContinueRun,\n}: WorkflowDebugControlsProps) {\n const nextStepFallback = canRunNextStep ? 'Ready to advance' : 'Next step unavailable';\n const actionsDisabled = !canRunNextStep || isStreaming || disabled;\n\n return (\n <div className=\"flex min-w-0 flex-col gap-3\" data-testid=\"workflow-debug-step-controls\">\n <div className=\"rounded-xl border border-surface-rim bg-background p-3\">\n <div className=\"mb-2 flex flex-wrap items-center justify-between gap-2\">\n <Txt as=\"span\" variant=\"meta\" tone=\"muted\">\n Next step\n </Txt>\n <Badge size=\"sm\" icon={<Pause />} emphasis=\"subtle\">\n Step by step\n </Badge>\n </div>\n <div className=\"text-subheading break-words text-foreground\" aria-live=\"polite\">\n {nextStepLabel || nextStepFallback}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button\n type=\"button\"\n variant=\"primary\"\n className=\"min-w-0 flex-1\"\n aria-label=\"Run next step\"\n onClick={onRunNextStep}\n disabled={actionsDisabled}\n icon={isStreaming ? <Loader2 className=\"motion-safe:animate-spin\" /> : <StepForwardIcon />}\n >\n {isStreaming ? 'Running step…' : 'Run next step'}\n </Button>\n\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-md\"\n tooltip=\"Continue full run\"\n onClick={onContinueRun}\n disabled={actionsDisabled}\n >\n <PlayIcon />\n </Button>\n {children}\n </div>\n </div>\n );\n}\n","import { AlertCircleIcon } from 'lucide-react';\nimport { Skeleton } from '@/ds/components/Skeleton';\n\nexport type WorkflowGraphPlaceholderProps = { isLoading: true } | { isLoading?: false; workflowName: string };\n\nexport function WorkflowGraphPlaceholder(props: WorkflowGraphPlaceholderProps) {\n if (props.isLoading) {\n return (\n <div className=\"p-4\">\n <Skeleton className=\"h-full\" />\n </div>\n );\n }\n\n return (\n <div className=\"grid h-full place-items-center\">\n <div className=\"flex flex-col items-center gap-2\">\n <AlertCircleIcon />\n <div>We couldn&apos;t find {props.workflowName} workflow.</div>\n </div>\n </div>\n );\n}\n","import type { WorkflowConditionCardViewProps } from '../../types';\nimport { WorkflowConditionCardView } from './workflow-condition-card-view';\n\nexport type WorkflowConditionCardProps = Omit<WorkflowConditionCardViewProps, 'type'>;\n\nexport function WorkflowConditionCard({ conditions, ...props }: WorkflowConditionCardProps) {\n return <WorkflowConditionCardView {...props} type={conditions[0]?.type} conditions={conditions} />;\n}\n","import { MoreVerticalIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport { Button } from '@/ds/components/Button';\nimport { DropdownMenu } from '@/ds/components/DropdownMenu';\n\nexport function WorkflowStepActions({ children }: { children: ReactNode }) {\n return (\n <DropdownMenu>\n <DropdownMenu.Trigger\n render={\n <Button\n size=\"icon-sm\"\n variant=\"ghost\"\n aria-label=\"Step actions\"\n title=\"Step actions\"\n className=\"nodrag nopan\"\n >\n <MoreVerticalIcon />\n </Button>\n }\n />\n <DropdownMenu.Content align=\"end\">{children}</DropdownMenu.Content>\n </DropdownMenu>\n );\n}\n","import {\n AlertCircleIcon,\n BracesIcon,\n Clock3Icon,\n PanelRightIcon,\n PlayIcon,\n RotateCcwIcon,\n ShieldAlertIcon,\n StepForwardIcon,\n} from 'lucide-react';\nimport { DropdownMenu } from '@/ds/components/DropdownMenu';\n\nconst actions = {\n nested: { icon: PanelRightIcon, label: 'View nested graph', activeLabel: 'Hide nested graph' },\n map: { icon: BracesIcon, label: 'Map config', activeLabel: 'Hide map config' },\n timeTravel: { icon: Clock3Icon, label: 'Time travel' },\n runStep: { icon: PlayIcon, label: 'Run step' },\n continueRun: { icon: StepForwardIcon, label: 'Continue run' },\n resumeData: { icon: RotateCcwIcon, label: 'Resume data' },\n error: { icon: AlertCircleIcon, label: 'Error' },\n tripwire: { icon: ShieldAlertIcon, label: 'Tripwire' },\n};\n\nexport interface WorkflowStepActionProps {\n action: keyof typeof actions;\n isActive?: boolean;\n onSelect: () => void;\n}\n\nexport function WorkflowStepAction({ action, isActive, onSelect }: WorkflowStepActionProps) {\n const definition = actions[action];\n const ActionIcon = definition.icon;\n const label = isActive && 'activeLabel' in definition ? definition.activeLabel : definition.label;\n return (\n <DropdownMenu.Item onSelect={onSelect} className={action === 'tripwire' ? 'text-warning-foreground' : undefined}>\n <ActionIcon />\n <span>{label}</span>\n </DropdownMenu.Item>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAa,8BAAA,GAA6BA,MAAAA,cAAAA,CAAc,CAAC;AAEzD,SAAgB,mBAAmB,WAAmB,WAAW,OAAuB;CACtF,OAAO;EACL,SAAS;EACT,SAAS,WAAW,SAAS;GAAE,MAAM,GAAG,YAAY,GAAG;GAAK,OAAO;GAAQ,KAAK;GAAQ,QAAQ;EAAO;CACzG;AACF;;ACWA,SAAgB,qBAAqB,OAKnC;CACA,IAAI,MAAM,WAAW,OAAO;EAAE,OAAO;EAAY,MAAM;EAAU,MAAMC,aAAAA;EAAS,WAAW;CAAU;CACrG,IAAI,MAAM,wBAAwB,MAAM,WACtC,OAAO;EAAE,OAAO;EAAY,MAAM;EAAU,MAAMC,aAAAA;EAAU,WAAW;CAAW;CACpF,IAAI,MAAM,cAAc,CAAC,MAAM,UAC7B,OAAO;EAAE,OAAO;EAAY,MAAM;EAAQ,MAAMC,aAAAA;EAAS,WAAW;CAAW;CACjF,IAAI,MAAM,aAAa,SAAS,MAAM,WACpC,OAAO;EAAE,OAAO;EAAO,MAAM;EAAU,MAAMC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AMC,aAAAA;EAAU,OAAO;CAAW;CAC7C,aAAa;EAAE,MAAMC,aAAAA;EAAiB,OAAO;CAAe;CAC5D,YAAY;EAAE,MAAMC,aAAAA;EAAe,OAAO;CAAc;CACxD,OAAO;EAAE,MAAMC,aAAAA;EAAiB,OAAO;CAAQ;CAC/C,UAAU;EAAE,MAAMC,aAAAA;EAAiB,OAAO;CAAW;AACvD;AAQA,SAAgB,mBAAmB,EAAE,QAAQ,UAAU,YAAqC;CAC1F,MAAM,aAAa,QAAQ;CAC3B,MAAM,aAAa,WAAW;CAC9B,MAAM,QAAQ,YAAY,iBAAiB,aAAa,WAAW,cAAc,WAAW;CAC5F,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,sBAAAA,aAAa,MAAd;EAA6B;EAAU,WAAW,WAAW,aAAa,4BAA4B,KAAA;EAAtG,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD,CAAa,CAAA,GACb,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAA,UAAO,MAAY,CAAA,CACF;;AAEvB"}
@@ -808,7 +808,7 @@ var WorkflowEdgeDataButton = ({ previousStepId, output, label, selected, onInspe
808
808
  onClick: onInspect ?? (() => setIsOpen(true)),
809
809
  "aria-label": `View ${dataLabel}`,
810
810
  "aria-pressed": selected,
811
- className: cn(raisedSurfaceStyle, surfaceStateLayerStyle, "h-7 rounded-lg px-2 text-foreground aria-pressed:before:bg-fill"),
811
+ className: cn(raisedSurfaceStyle, surfaceStateLayerStyle, "h-7 rounded-lg px-2 text-foreground aria-pressed:bg-[linear-gradient(var(--fill),var(--fill))]"),
812
812
  icon: /* @__PURE__ */ jsx(Database, { className: "text-muted-foreground" }),
813
813
  children: "Data"
814
814
  }), /* @__PURE__ */ jsx(Dialog, {
@@ -1313,4 +1313,4 @@ function WorkflowStepAction({ action, isActive, onSelect }) {
1313
1313
  }
1314
1314
  export { WorkflowTypeBadge as C, getNodeIndicators as S, workflowFitOptions as T, BADGE_COLORS as _, WorkflowDebugControls as a, getConditionIndicator as b, WorkflowDataEdgeView as c, WORKFLOW_DATA_EDGE_TYPE as d, WorkflowEdgeDataButton as f, WorkflowClock as g, WorkflowConditionCardView as h, WorkflowGraphPlaceholder as i, WorkflowBoundaryNode as l, WorkflowStepCardView as m, WorkflowStepActions as n, WorkflowNodeFrame as o, WorkflowCodeContent as p, WorkflowConditionCard as r, WorkflowGraphCanvas as s, WorkflowStepAction as t, WORKFLOW_BOUNDARY_NODE_TYPE as u, BADGE_ICONS as v, WorkflowCanvasInsetContext as w, getNodeBadgeInfo as x, getConditionIconAndColor as y };
1315
1315
 
1316
- //# sourceMappingURL=Workflow-DhMn2YRg.js.map
1316
+ //# sourceMappingURL=Workflow-bQ6HPvmu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Workflow-bQ6HPvmu.js","names":["_Fragment","_Fragment","_Fragment","_Fragment","_Fragment","_Fragment"],"sources":["../src/ds/components/Workflow/workflow-canvas-inset.ts","../src/ds/components/Workflow/cards/workflow-card-kind.ts","../src/ds/components/Workflow/cards/workflow-type-badge.tsx","../src/ds/components/Workflow/cards/workflow-card-badge-utils.ts","../src/ds/components/Workflow/cards/workflow-clock.tsx","../src/ds/components/Workflow/cards/condition/workflow-condition-expression.ts","../src/ds/components/Workflow/cards/condition/workflow-condition-source.tsx","../src/ds/components/Workflow/cards/condition/workflow-condition-card-view.tsx","../src/ds/components/Workflow/cards/timing/workflow-time-dial.tsx","../src/ds/components/Workflow/cards/timing/workflow-timing.tsx","../src/ds/components/Workflow/cards/step/workflow-step-card-view.tsx","../src/ds/components/Workflow/data/workflow-code-dialog-content.tsx","../src/ds/components/Workflow/data/workflow-edge-data-button.tsx","../src/ds/components/Workflow/graph/types.ts","../src/ds/components/Workflow/graph/workflow-boundary-node.tsx","../src/ds/components/Workflow/graph/workflow-data-edge-view.tsx","../src/ds/components/Workflow/graph/workflow-camera-duration.ts","../src/ds/components/Workflow/graph/workflow-graph-groups.tsx","../src/ds/components/Workflow/graph/zoom-slider.tsx","../src/ds/components/Workflow/graph/workflow-graph-canvas.tsx","../src/ds/components/Workflow/graph/workflow-node-frame.tsx","../src/ds/components/Workflow/controls/workflow-debug-controls.tsx","../src/ds/components/Workflow/graph/workflow-graph-placeholder.tsx","../src/ds/components/Workflow/cards/condition/workflow-condition-card.tsx","../src/ds/components/Workflow/controls/workflow-step-actions.tsx","../src/ds/components/Workflow/controls/workflow-step-action.tsx"],"sourcesContent":["import type { FitViewOptions } from '@xyflow/react';\nimport { createContext } from 'react';\n\nexport const WorkflowCanvasInsetContext = createContext(0);\n\nexport function workflowFitOptions(leftInset: number, isInline = false): FitViewOptions {\n return {\n maxZoom: 1,\n padding: isInline ? '20px' : { left: `${leftInset + 40}px`, right: '40px', top: '40px', bottom: '64px' },\n };\n}\n","import {\n ArrowRightLeft,\n Bot,\n Braces,\n CalendarClock,\n GitBranch,\n GitFork,\n Repeat2,\n Timer,\n Workflow,\n Wrench,\n} from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\nimport type { WorkflowStepCardViewProps } from '../types';\nimport type { BadgeVariant } from '@/ds/components/Badge';\n\nexport type WorkflowTypeBadgeProps = Pick<\n WorkflowStepCardViewProps,\n 'nodeKind' | 'isForEach' | 'isNestedWorkflowStep' | 'stepGraph' | 'isParallel' | 'mapConfig' | 'date' | 'duration'\n>;\n\nexport function getWorkflowCardBadge(props: WorkflowTypeBadgeProps): {\n label: string;\n Icon: LucideIcon;\n tone: BadgeVariant;\n indicator?: string;\n} {\n if (props.isForEach) return { label: 'For each', tone: 'orange', Icon: Repeat2, indicator: 'foreach' };\n if (props.isNestedWorkflowStep || props.stepGraph)\n return { label: 'Workflow', tone: 'purple', Icon: Workflow, indicator: 'workflow' };\n if (props.isParallel && !props.nodeKind)\n return { label: 'Parallel', tone: 'blue', Icon: GitFork, indicator: 'parallel' };\n if (props.nodeKind === 'map' || props.mapConfig)\n return { label: 'Map', tone: 'orange', Icon: ArrowRightLeft, indicator: 'map' };\n if (props.nodeKind === 'wait-until' || props.date)\n return { label: 'Wait until', tone: 'purple', Icon: CalendarClock, indicator: 'sleep-until' };\n if (props.nodeKind === 'delay' || props.duration !== undefined)\n return { label: 'Delay', tone: 'purple', Icon: Timer, indicator: 'sleep' };\n if (props.nodeKind === 'agent') return { label: 'Agent', tone: 'cyan', Icon: Bot };\n if (props.nodeKind === 'tool') return { label: 'Tool', tone: 'pink', Icon: Wrench };\n if (props.nodeKind === 'classifier') return { label: 'Classifier', tone: 'blue', Icon: GitBranch };\n return { label: 'Step', tone: 'neutral', Icon: Braces };\n}\n","import { getWorkflowCardBadge } from './workflow-card-kind';\nimport type { WorkflowTypeBadgeProps } from './workflow-card-kind';\nimport { Badge } from '@/ds/components/Badge';\n\nexport function WorkflowTypeBadge(props: WorkflowTypeBadgeProps) {\n const { label, Icon, tone } = getWorkflowCardBadge(props);\n return (\n <Badge size=\"xs\" variant={tone} icon={<Icon aria-hidden />}>\n {label}\n </Badge>\n );\n}\n","import {\n CalendarClock,\n Clock,\n CornerDownRight,\n GitBranch,\n Layers,\n List,\n Network,\n PlayCircle,\n RefreshCw,\n Repeat,\n Repeat1,\n Timer,\n Workflow,\n} from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\n\nexport const BADGE_COLORS = {\n sleep: 'var(--badge-purple-indicator)',\n forEach: 'var(--badge-orange-indicator)',\n map: 'var(--badge-orange-indicator)',\n parallel: 'var(--badge-blue-indicator)',\n suspend: 'var(--badge-pink-indicator)',\n after: 'var(--badge-cyan-indicator)',\n workflow: 'var(--badge-purple-indicator)',\n when: 'var(--badge-amber-indicator)',\n dountil: 'var(--badge-purple-indicator)',\n dowhile: 'var(--badge-cyan-indicator)',\n until: 'var(--badge-amber-indicator)',\n while: 'var(--badge-green-indicator)',\n if: 'var(--badge-blue-indicator)',\n else: 'var(--muted-foreground)',\n} as const;\n\nexport const BADGE_ICONS = {\n sleep: Timer,\n sleepUntil: CalendarClock,\n forEach: List,\n map: List,\n parallel: Workflow,\n suspend: PlayCircle,\n after: Clock,\n workflow: Layers,\n when: Network,\n dountil: Repeat1,\n dowhile: Repeat,\n until: Timer,\n while: RefreshCw,\n if: GitBranch,\n else: CornerDownRight,\n} as const;\n\nexport interface ConditionIconConfig {\n icon: LucideIcon | undefined;\n color: string | undefined;\n}\n\nexport interface WorkflowCardIndicator {\n id: string;\n label: string;\n icon: LucideIcon;\n color: string;\n}\n\nconst CONDITION_LABELS: Record<string, string> = {\n when: 'When condition',\n dountil: 'Do until condition',\n dowhile: 'Do while condition',\n until: 'Until condition',\n while: 'While condition',\n if: 'If condition',\n else: 'Else condition',\n and: 'And condition',\n or: 'Or condition',\n not: 'Not condition',\n};\n\nexport const getConditionIconAndColor = (type?: string): ConditionIconConfig => {\n switch (type) {\n case 'when':\n return { icon: BADGE_ICONS.when, color: BADGE_COLORS.when };\n case 'dountil':\n return { icon: BADGE_ICONS.dountil, color: BADGE_COLORS.dountil };\n case 'dowhile':\n return { icon: BADGE_ICONS.dowhile, color: BADGE_COLORS.dowhile };\n case 'until':\n return { icon: BADGE_ICONS.until, color: BADGE_COLORS.until };\n case 'while':\n return { icon: BADGE_ICONS.while, color: BADGE_COLORS.while };\n case 'if':\n return { icon: BADGE_ICONS.if, color: BADGE_COLORS.if };\n case 'else':\n return { icon: BADGE_ICONS.else, color: BADGE_COLORS.else };\n case 'and':\n case 'or':\n case 'not':\n return { icon: BADGE_ICONS.when, color: BADGE_COLORS.when };\n default:\n return { icon: undefined, color: undefined };\n }\n};\n\nexport const getConditionIndicator = (type?: string): WorkflowCardIndicator | undefined => {\n const { icon, color } = getConditionIconAndColor(type);\n\n if (!type || !icon || !color) {\n return undefined;\n }\n\n return {\n id: `condition-${type}`,\n label: CONDITION_LABELS[type] ?? `${type} condition`,\n icon,\n color,\n };\n};\n\nexport interface WorkflowNodeBadgeInfo {\n isSleepNode: boolean;\n isForEachNode: boolean;\n isMapNode: boolean;\n isNestedWorkflow: boolean;\n hasSpecialBadge: boolean;\n}\n\nexport interface WorkflowCardBadgesProps {\n duration?: number;\n date?: Date;\n isForEach?: boolean;\n mapConfig?: string;\n canSuspend?: boolean;\n isParallel?: boolean;\n stepGraph?: unknown;\n}\n\nexport const getNodeBadgeInfo = ({\n duration,\n date,\n isForEach,\n mapConfig,\n canSuspend,\n isParallel,\n stepGraph,\n}: WorkflowCardBadgesProps): WorkflowNodeBadgeInfo => {\n const isSleepNode = Boolean(duration || date);\n const isForEachNode = Boolean(isForEach);\n const isMapNode = Boolean(mapConfig && !isForEach);\n const isNestedWorkflow = Boolean(stepGraph);\n const hasSpecialBadge =\n isSleepNode || Boolean(canSuspend || isParallel) || isForEachNode || isMapNode || isNestedWorkflow;\n\n return {\n isSleepNode,\n isForEachNode,\n isMapNode,\n isNestedWorkflow,\n hasSpecialBadge,\n };\n};\n\nexport const getNodeIndicators = (props: WorkflowCardBadgesProps): WorkflowCardIndicator[] => {\n const { isSleepNode, isForEachNode, isMapNode, isNestedWorkflow } = getNodeBadgeInfo(props);\n const indicators: WorkflowCardIndicator[] = [];\n\n if (isSleepNode) {\n indicators.push({\n id: props.date ? 'sleep-until' : 'sleep',\n label: props.date ? 'Sleep until step' : 'Sleep step',\n icon: props.date ? BADGE_ICONS.sleepUntil : BADGE_ICONS.sleep,\n color: BADGE_COLORS.sleep,\n });\n }\n\n if (props.canSuspend) {\n indicators.push({\n id: 'suspend',\n label: 'Suspend/resume step',\n icon: BADGE_ICONS.suspend,\n color: BADGE_COLORS.suspend,\n });\n }\n\n if (props.isParallel) {\n indicators.push({\n id: 'parallel',\n label: 'Parallel step',\n icon: BADGE_ICONS.parallel,\n color: BADGE_COLORS.parallel,\n });\n }\n\n if (isNestedWorkflow) {\n indicators.push({\n id: 'workflow',\n label: 'Nested workflow step',\n icon: BADGE_ICONS.workflow,\n color: BADGE_COLORS.workflow,\n });\n }\n\n if (isForEachNode) {\n indicators.push({\n id: 'foreach',\n label: 'Foreach step',\n icon: BADGE_ICONS.forEach,\n color: BADGE_COLORS.forEach,\n });\n }\n\n if (isMapNode) {\n indicators.push({\n id: 'map',\n label: 'Map step',\n icon: BADGE_ICONS.map,\n color: BADGE_COLORS.map,\n });\n }\n\n return indicators;\n};\n","import { useEffect, useState } from 'react';\nimport { Txt } from '@/ds/components/Txt';\nimport { formatDuration } from '@/utils/duration';\n\ninterface WorkflowClockProps {\n startedAt: number;\n endedAt?: number;\n isRunning?: boolean;\n spansSuspension?: boolean;\n}\n\nexport const WorkflowClock = ({ startedAt, endedAt, isRunning = false, spansSuspension }: WorkflowClockProps) => {\n if (isRunning && endedAt === undefined && Number.isFinite(startedAt)) {\n return <RunningWorkflowClock key={startedAt} startedAt={startedAt} spansSuspension={spansSuspension} />;\n }\n return <ElapsedTime startedAt={startedAt} endedAt={endedAt} spansSuspension={spansSuspension} />;\n};\n\nfunction RunningWorkflowClock({ startedAt, spansSuspension }: Omit<WorkflowClockProps, 'isRunning'>) {\n const [time, setTime] = useState(() => Date.now());\n useEffect(() => {\n const interval = setInterval(() => setTime(Date.now()), 100);\n return () => clearInterval(interval);\n }, []);\n return <ElapsedTime startedAt={startedAt} endedAt={time} spansSuspension={spansSuspension} />;\n}\n\nfunction ElapsedTime({ startedAt, endedAt, spansSuspension }: Omit<WorkflowClockProps, 'isRunning'>) {\n const elapsed = endedAt === undefined ? undefined : formatDuration(endedAt - startedAt);\n\n return (\n <Txt\n variant=\"meta\"\n tone=\"muted\"\n font=\"mono\"\n className=\"whitespace-nowrap\"\n title={elapsed && spansSuspension ? 'Includes time spent suspended waiting for input' : undefined}\n >\n {elapsed === undefined ? <span aria-label=\"Timing unavailable\">—</span> : elapsed}\n </Txt>\n );\n}\n","import type { WorkflowCardCondition } from '../../types';\n\nexport function conditionExpression(condition: WorkflowCardCondition) {\n if (condition.fnString !== undefined) return condition.fnString;\n return JSON.stringify({ ref: condition.ref, query: condition.query, conj: condition.conj }, null, 2);\n}\n","import { useEffect, useState } from 'react';\nimport { Code } from '@/ds/components/Code';\nimport { formatTypeScript } from '@/utils/formatting';\n\nconst MAX_FORMATTED_SOURCE_CHARS = 10_000;\n\nexport function WorkflowConditionSource({ source }: { source: string }) {\n if (source.length > MAX_FORMATTED_SOURCE_CHARS) return <Code code={source} />;\n return <FormattedConditionSource key={source} source={source} />;\n}\n\nfunction FormattedConditionSource({ source }: { source: string }) {\n const [formatted, setFormatted] = useState<string>();\n\n useEffect(() => {\n let cancelled = false;\n formatTypeScript(source)\n .then(expression => {\n if (!cancelled) setFormatted(expression.trim());\n })\n .catch(() => undefined);\n return () => {\n cancelled = true;\n };\n }, [source]);\n\n return <Code code={formatted ?? source} lang={formatted === undefined ? undefined : 'typescript'} />;\n}\n","import { Braces } from 'lucide-react';\nimport type { WorkflowConditionCardViewProps } from '../../types';\nimport { getConditionIndicator } from '../workflow-card-badge-utils';\nimport { conditionExpression } from './workflow-condition-expression';\nimport { WorkflowConditionSource } from './workflow-condition-source';\nimport { Badge } from '@/ds/components/Badge';\nimport { Code } from '@/ds/components/Code';\nimport { CopyButton } from '@/ds/components/CopyButton';\nimport { raisedSurfaceStyle } from '@/ds/primitives/raised-surface';\n\nconst surfaceClasses = 'rounded-[calc(var(--radius-xl)-2px)] bg-card text-meta';\n\nexport function WorkflowConditionCardView({\n type,\n conditions,\n previousDisplayStatus,\n actionBar,\n}: WorkflowConditionCardViewProps) {\n const indicator = getConditionIndicator(type);\n const Icon = indicator?.icon ?? Braces;\n const label = indicator?.label.replace(/ condition$/, '') ?? 'Condition';\n const occurrences = new Map<string, number>();\n const sources = conditions.map(condition => {\n const expression = conditionExpression(condition);\n const identity = `${condition.type}:${expression}`;\n const occurrence = occurrences.get(identity) ?? 0;\n occurrences.set(identity, occurrence + 1);\n return { condition, expression, key: `${identity}:${occurrence}` };\n });\n const copyContent =\n conditions.length > 1 ? JSON.stringify(conditions, null, 2) : sources.map(source => source.expression).join('\\n');\n const hasExpression = type !== 'else' && sources.some(({ expression }) => expression.trim().length > 0);\n\n return (\n <div\n className={`${raisedSurfaceStyle} w-[274px] overflow-hidden rounded-xl p-0.5 has-focus-visible:outline-1 has-focus-visible:outline-offset-4 has-focus-visible:outline-border-focus`}\n data-workflow-node\n data-testid=\"workflow-condition-node\"\n data-workflow-step-status={previousDisplayStatus ?? 'idle'}\n >\n <div className=\"flex h-[46px] items-center gap-2 px-2.5 text-meta text-muted-foreground\">\n <Badge size=\"xs\" variant={type === 'else' ? 'neutral' : 'amber'} emphasis=\"subtle\" icon={<Icon aria-hidden />}>\n {label}\n </Badge>\n {hasExpression && (\n <>\n <span className=\"ml-auto\">Expression</span>\n <CopyButton content={copyContent} tooltip=\"Copy expression\" className=\"nodrag nopan\" />\n </>\n )}\n </div>\n {hasExpression ? (\n <div\n role=\"region\"\n aria-label=\"Condition details\"\n tabIndex={0}\n className={`${surfaceClasses} nodrag nopan nowheel max-h-55 overflow-auto p-3.5 text-foreground [&_pre]:leading-relaxed [&_pre]:whitespace-pre-wrap`}\n >\n {sources.map(({ condition, expression, key }) => (\n <div key={key}>\n {condition.conj && (\n <Badge size=\"xs\" variant=\"neutral\">\n {condition.conj.toUpperCase()}\n </Badge>\n )}\n {condition.fnString !== undefined ? (\n <WorkflowConditionSource source={condition.fnString} />\n ) : (\n <Code code={expression} />\n )}\n </div>\n ))}\n </div>\n ) : (\n <p className={`${surfaceClasses} p-3 text-muted-foreground`}>\n {type === 'else' ? 'When no other branch matches' : 'Condition expression unavailable'}\n </p>\n )}\n {actionBar && <div className=\"nodrag nopan flex justify-end px-2.5 py-1.5 empty:hidden\">{actionBar}</div>}\n </div>\n );\n}\n","import type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '@/utils/cn';\n\nexport type DurationUnit = 'ms' | 's' | 'min' | 'h';\n\nconst DIAL_CENTER = 58;\nconst CLOCK_TICK_ANGLES = Array.from({ length: 60 }, (_, index) => index * 6);\nconst DURATION_TICK_ANGLES = Array.from({ length: 41 }, (_, index) => -120 + index * 6);\n\nfunction pointAt(angle: number, radius: number) {\n const radians = (angle * Math.PI) / 180;\n return {\n x: DIAL_CENTER + Math.sin(radians) * radius,\n y: DIAL_CENTER - Math.cos(radians) * radius,\n };\n}\n\nfunction DialTick({ angle, major, className, ...props }: ComponentProps<'line'> & { angle: number; major: boolean }) {\n const outer = pointAt(angle, 49);\n const inner = pointAt(angle, major ? 38 : 43);\n return (\n <line\n x1={inner.x}\n y1={inner.y}\n x2={outer.x}\n y2={outer.y}\n className={cn(major ? 'stroke-placeholder' : 'stroke-border-strong', className)}\n {...props}\n />\n );\n}\n\nfunction DialHand({ angle, length }: { angle: number; length: number }) {\n const tip = pointAt(angle, length);\n return (\n <line\n x1={DIAL_CENTER}\n y1={DIAL_CENTER}\n x2={tip.x}\n y2={tip.y}\n className=\"stroke-1.5 stroke-muted-foreground\"\n strokeLinecap=\"round\"\n />\n );\n}\n\nfunction DialFace({ tickAngles, children }: { tickAngles: number[]; children: ReactNode }) {\n return (\n <span className=\"block size-28 shrink-0 text-muted-foreground\" aria-hidden>\n <svg viewBox=\"0 0 116 116\" fill=\"none\" className=\"block size-full overflow-visible\">\n {tickAngles.map((angle, index) => (\n <DialTick key={angle} angle={angle} major={index % 5 === 0} />\n ))}\n {children}\n </svg>\n </span>\n );\n}\n\nexport function ClockDial({ date }: { date: Date }) {\n const minutes = date.getUTCMinutes();\n return (\n <DialFace tickAngles={CLOCK_TICK_ANGLES}>\n <DialHand angle={((date.getUTCHours() % 12) + minutes / 60) * 30} length={26} />\n <DialHand angle={minutes * 6} length={37} />\n <circle cx={DIAL_CENTER} cy={DIAL_CENTER} r={2} fill=\"currentColor\" />\n </DialFace>\n );\n}\n\nexport function DurationDial({ amount, unit }: { amount: number; unit: DurationUnit }) {\n const scale = Math.max({ h: 24, ms: 1000, s: 60, min: 60 }[unit], Math.ceil(amount / 10) * 10);\n return (\n <DialFace tickAngles={DURATION_TICK_ANGLES}>\n <DialTick\n angle={-120 + (amount / scale) * 240}\n major\n className=\"stroke-foreground stroke-2\"\n strokeLinecap=\"round\"\n />\n <text x={DIAL_CENTER} y={94} textAnchor=\"middle\" className=\"fill-muted-foreground font-body text-meta\">\n {scale} {unit}\n </text>\n <text x={DIAL_CENTER} y={106} textAnchor=\"middle\" className=\"fill-placeholder font-body text-meta\">\n scale\n </text>\n </DialFace>\n );\n}\n","import type { ReactNode } from 'react';\nimport type { WorkflowStepCardViewProps } from '../../types';\nimport { ClockDial, DurationDial } from './workflow-time-dial';\nimport type { DurationUnit } from './workflow-time-dial';\nimport { Txt } from '@/ds/components/Txt';\nimport { formatDate, formatShortDate } from '@/utils/date-format';\nimport { formatDuration } from '@/utils/duration';\n\nconst captionClasses = 'text-meta tracking-wider whitespace-nowrap text-muted-foreground uppercase';\n\nfunction durationReading(duration: number): { amount: number; unit: DurationUnit } {\n if (duration < 1000) return { amount: duration, unit: 'ms' };\n if (duration < 60000) return { amount: duration / 1000, unit: 's' };\n if (duration < 3600000) return { amount: duration / 60000, unit: 'min' };\n return { amount: duration / 3600000, unit: 'h' };\n}\n\nfunction TimingReading({\n value,\n unit,\n caption,\n dial,\n}: {\n value: string;\n unit?: string;\n caption: string;\n dial: ReactNode;\n}) {\n return (\n <span className=\"mt-1 flex min-h-27 items-center justify-between gap-1 text-foreground\">\n <span className=\"z-10 flex min-w-0 flex-col gap-2\">\n <Txt\n as=\"span\"\n variant=\"display\"\n className=\"flex items-baseline gap-1 leading-none tracking-tighter whitespace-nowrap tabular-nums\"\n >\n {value}\n {unit && <small className=\"text-meta tracking-normal text-muted-foreground\">{unit}</small>}\n </Txt>\n <span className={captionClasses}>{caption}</span>\n </span>\n {dial}\n </span>\n );\n}\n\nexport function WorkflowTiming({ duration, date }: Pick<WorkflowStepCardViewProps, 'duration' | 'date'>) {\n if (date) {\n const scheduled = new Date(date);\n if (!Number.isFinite(scheduled.getTime())) {\n return <span className={captionClasses}>Schedule unavailable</span>;\n }\n return (\n <TimingReading\n value={formatDate(scheduled, 'time', { timeZone: 'UTC' }) ?? ''}\n unit=\"UTC\"\n caption={formatShortDate(scheduled, { timeZone: 'UTC', now: 0 }) ?? ''}\n dial={<ClockDial date={scheduled} />}\n />\n );\n }\n if (duration === undefined) return null;\n if (!Number.isFinite(duration) || duration < 0) {\n return <span className={captionClasses}>Delay unavailable</span>;\n }\n const reading = durationReading(duration);\n return (\n <TimingReading\n value={formatDuration(duration) ?? ''}\n caption=\"Configured delay\"\n dial={<DurationDial {...reading} />}\n />\n );\n}\n","import { useState } from 'react';\nimport type { CSSProperties } from 'react';\nimport type { WorkflowCardDisplayStatus, WorkflowStepCardViewProps } from '../../types';\nimport { WorkflowTiming } from '../timing/workflow-timing';\nimport { getNodeIndicators } from '../workflow-card-badge-utils';\nimport { getWorkflowCardBadge } from '../workflow-card-kind';\nimport { WorkflowClock } from '../workflow-clock';\nimport { WorkflowTypeBadge } from '../workflow-type-badge';\nimport { ActivityWick } from '@/ds/components/Activity';\nimport { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/ds/components/Collapsible';\nimport { DisclosureChevron } from '@/ds/components/DisclosureChevron';\nimport { Metadata } from '@/ds/components/Metadata';\nimport { Shimmer } from '@/ds/components/Shimmer';\nimport { Txt } from '@/ds/components/Txt';\nimport { raisedSurfaceStyle, surfaceStateLayerStyle } from '@/ds/primitives/raised-surface';\nimport { cn } from '@/utils/cn';\n\ntype ReportedStatus = NonNullable<WorkflowCardDisplayStatus>;\n\nconst statusLabels = {\n running: 'Running',\n success: 'Completed',\n failed: 'Failed',\n suspended: 'Needs input',\n waiting: 'Waiting',\n paused: 'Paused',\n skipped: 'Skipped',\n canceled: 'Canceled',\n tripwire: 'Tripwire blocked',\n} satisfies Record<ReportedStatus, string>;\n\nconst statusLineClasses: Partial<Record<ReportedStatus, string>> = {\n success: 'after:bg-success-indicator',\n failed: 'after:bg-destructive-indicator',\n tripwire: 'after:bg-warning-indicator',\n waiting: 'after:bg-warning-indicator',\n paused: 'after:bg-warning-indicator',\n skipped: 'after:bg-muted-foreground',\n};\n\nconst footerStatusClasses: Partial<Record<ReportedStatus, string>> = {\n success: 'text-success-indicator',\n failed: 'text-destructive-foreground',\n suspended: 'text-warning-foreground',\n tripwire: 'text-warning-foreground',\n};\n\nconst suspendedWickStyle: CSSProperties & { '--belt-hue': string } = { '--belt-hue': 'var(--warning-indicator)' };\n\nexport function WorkflowStepCardView(props: WorkflowStepCardViewProps) {\n const {\n label,\n description,\n displayStatus,\n stepKey,\n isSelected,\n isWaiting,\n isHovered,\n onHoverChange,\n onSelect,\n isForEach,\n foreachProgress,\n startedAt,\n endedAt,\n actionBar,\n body,\n } = props;\n const [expanded, setExpanded] = useState(props.initiallyOpen ?? false);\n const isRunning = displayStatus === 'running';\n const isSuspended = displayStatus === 'suspended';\n const reportedStatusLabel =\n displayStatus && Object.hasOwn(statusLabels, displayStatus) ? statusLabels[displayStatus] : undefined;\n const statusLabel = displayStatus ? (reportedStatusLabel ?? 'Status unavailable') : 'Not started';\n const kind = getWorkflowCardBadge(props);\n const capabilities = getNodeIndicators(props)\n .filter(indicator => indicator.id !== kind.indicator)\n .map(indicator => indicator.label.replace(/ step$/, ''));\n const hasActivity = isRunning || isSuspended;\n const isStacked = isForEach && !expanded;\n const isBodyExpanded = Boolean(body) && expanded;\n const Summary = onSelect ? 'button' : 'div';\n\n return (\n <div\n className={cn(\n 'relative isolate w-[274px]',\n isBodyExpanded && 'w-172',\n isStacked &&\n 'pb-3 before:absolute before:inset-x-1.5 before:top-2 before:bottom-1.5 before:-z-10 before:rounded-xl before:border before:border-border before:bg-card after:absolute after:inset-x-3 after:top-3.5 after:bottom-0 after:-z-20 after:rounded-xl after:border after:border-border after:bg-card',\n )}\n >\n <Collapsible\n open={expanded}\n onOpenChange={setExpanded}\n className={cn(\n raisedSurfaceStyle,\n 'relative rounded-xl border border-transparent text-foreground transition-[border-color,background-color,box-shadow] [--card-radius:calc(var(--radius-xl)-2px)] motion-reduce:transition-none',\n 'after:pointer-events-none after:absolute after:inset-x-4 after:-top-px after:h-px after:mask-x-from-76%',\n displayStatus && statusLineClasses[displayStatus],\n 'has-focus-visible:outline-1 has-focus-visible:outline-offset-4 has-focus-visible:outline-border-focus',\n isSelected && 'outline-1 outline-offset-4 outline-border-focus',\n isBodyExpanded && 'border-dashed border-muted-foreground/40 shadow-none',\n isWaiting && 'border-info-indicator',\n isHovered && !isSelected && 'bg-muted',\n )}\n data-workflow-node\n data-workflow-step-key={stepKey}\n data-workflow-step-status={displayStatus ?? 'idle'}\n data-workflow-step-active={isSelected || undefined}\n data-workflow-step-waiting={isWaiting || undefined}\n data-workflow-step-hovered={isHovered || undefined}\n data-testid={props.isNestedWorkflowStep ? 'workflow-nested-node' : 'workflow-default-node'}\n onMouseEnter={() => onHoverChange?.(true)}\n onMouseLeave={() => onHoverChange?.(false)}\n >\n <div className=\"m-0.5 overflow-hidden rounded-(--card-radius)\">\n <Summary\n className={cn(\n 'nodrag nopan flex w-full flex-col text-left',\n onSelect && 'group cursor-pointer focus-visible:outline-hidden',\n )}\n type={onSelect ? 'button' : undefined}\n aria-label={onSelect ? `Inspect ${label}` : undefined}\n aria-pressed={onSelect ? Boolean(isSelected) : undefined}\n onClick={onSelect}\n >\n <span className=\"flex items-start justify-between gap-2.5 rounded-(--card-radius) px-3.5 py-3 group-hover:bg-fill-subtle\">\n <Txt as=\"span\" variant=\"column\" tone=\"ink\" className=\"min-w-0 wrap-anywhere\" title={label}>\n <Shimmer active={isRunning}>{label}</Shimmer>\n </Txt>\n <WorkflowTypeBadge {...props} />\n </span>\n <span className=\"flex flex-col gap-2 rounded-t-(--card-radius) bg-card px-3.5 py-3 empty:py-1.5\">\n {description && (\n <Txt as=\"span\" variant=\"caption\" tone=\"muted\" className=\"wrap-anywhere\">\n {description}\n </Txt>\n )}\n <WorkflowTiming duration={props.duration} date={props.date} />\n {isWaiting && (\n <Txt as=\"span\" variant=\"meta\" className=\"text-info-indicator\">\n Next step in debug\n </Txt>\n )}\n {isForEach && foreachProgress && (\n <Txt as=\"span\" variant=\"meta\" className=\"flex flex-col gap-2 py-1\">\n <span>\n <strong>{foreachProgress.completedCount}</strong> of {foreachProgress.totalCount} items complete\n </span>\n {foreachProgress.totalCount > 0 ? (\n <progress\n className=\"h-1 w-full appearance-none border-0 bg-muted accent-success-indicator [&::-moz-progress-bar]:bg-success-indicator [&::-webkit-progress-bar]:bg-muted [&::-webkit-progress-value]:bg-success-indicator\"\n aria-label={`${label} completed items`}\n value={foreachProgress.completedCount}\n max={foreachProgress.totalCount}\n />\n ) : (\n <span>No items to process</span>\n )}\n </Txt>\n )}\n {capabilities.length > 0 && (\n <Txt as=\"span\" variant=\"meta\" tone=\"muted\">\n <Metadata>\n {capabilities.map(capability => (\n <Metadata.Item key={capability}>{capability}</Metadata.Item>\n ))}\n </Metadata>\n </Txt>\n )}\n </span>\n </Summary>\n <div\n className={cn(\n 'nodrag nopan flex min-h-7 items-center justify-between gap-2 bg-card px-3.5 pb-2.5 text-meta text-muted-foreground',\n displayStatus && footerStatusClasses[displayStatus],\n )}\n >\n <span role=\"status\" className={isRunning ? 'sr-only motion-reduce:not-sr-only' : undefined}>\n {statusLabel}\n </span>\n {startedAt !== undefined && (\n <span className=\"ml-auto\">\n <WorkflowClock\n startedAt={startedAt}\n endedAt={endedAt}\n isRunning={isRunning}\n spansSuspension={props.spansSuspension}\n />\n </span>\n )}\n {actionBar}\n </div>\n\n {body && (\n <>\n <CollapsibleTrigger\n className={cn(\n surfaceStateLayerStyle,\n 'nodrag nopan flex min-h-11 w-full items-center justify-between border-t border-border bg-card px-3.5 py-2.5 text-caption focus-visible:outline-hidden',\n )}\n >\n <span>\n {expanded ? 'Collapse' : 'Expand'} {isForEach ? 'loop' : 'workflow'}\n </span>\n <DisclosureChevron direction=\"right\" className=\"size-3.5\" />\n </CollapsibleTrigger>\n <CollapsibleContent className=\"h-155 overflow-hidden border-t border-dashed border-border\">\n {body}\n </CollapsibleContent>\n </>\n )}\n </div>\n {hasActivity && (\n <ActivityWick\n status={isSuspended ? 'ready' : 'working'}\n aria-hidden\n className=\"before:hidden\"\n style={isSuspended ? suspendedWickStyle : undefined}\n />\n )}\n </Collapsible>\n </div>\n );\n}\n","import { javascript } from '@codemirror/lang-javascript';\nimport { jsonLanguage } from '@codemirror/lang-json';\nimport { EditorView } from '@codemirror/view';\nimport CodeMirror from '@uiw/react-codemirror';\nimport { codeFoldGutter, useCodemirrorTheme } from '@/ds/components/CodeEditor';\nimport { CopyButton } from '@/ds/components/CopyButton';\n\nexport const WorkflowCodeContent = ({\n data,\n language = 'auto',\n}: {\n data: unknown;\n language?: 'json' | 'javascript' | 'auto';\n}) => {\n const theme = useCodemirrorTheme();\n\n const getExtensions = (content: string) => {\n if (language === 'javascript') {\n return [javascript(), EditorView.lineWrapping];\n }\n if (language === 'json') {\n return [jsonLanguage, EditorView.lineWrapping];\n }\n\n try {\n JSON.parse(content);\n return [jsonLanguage, EditorView.lineWrapping];\n } catch {\n if (\n content.includes('=>') ||\n content.includes('function') ||\n content.includes('const ') ||\n content.includes('return ')\n ) {\n return [javascript(), EditorView.lineWrapping];\n }\n return [EditorView.lineWrapping];\n }\n };\n\n if (typeof data !== 'string') {\n const content = JSON.stringify(data, null, 2);\n return (\n <div className=\"relative overflow-auto\" style={{ maxHeight: 500 }}>\n <div className=\"absolute top-2 right-2 z-10 rounded-full bg-muted\">\n <CopyButton content={content} />\n </div>\n <div className=\"rounded-lg bg-muted p-4\">\n <CodeMirror\n value={content}\n theme={theme}\n extensions={[jsonLanguage, EditorView.lineWrapping, codeFoldGutter]}\n basicSetup={{ foldGutter: false }}\n />\n </div>\n </div>\n );\n }\n\n const extensions = getExtensions(data);\n\n let displayContent = data;\n try {\n const json = JSON.parse(data);\n displayContent = JSON.stringify(json, null, 2);\n } catch {}\n\n return (\n <div className=\"relative overflow-auto\" style={{ maxHeight: 500 }}>\n <div className=\"absolute top-2 right-2 z-10 rounded-full bg-muted\">\n <CopyButton content={data} />\n </div>\n <div className=\"rounded-lg bg-muted p-4\">\n <CodeMirror\n value={displayContent}\n theme={theme}\n extensions={[...extensions, codeFoldGutter]}\n basicSetup={{ foldGutter: false }}\n />\n </div>\n </div>\n );\n};\n","import { Database } from 'lucide-react';\nimport { useState } from 'react';\nimport type { MouseEventHandler } from 'react';\nimport { WorkflowCodeContent } from './workflow-code-dialog-content';\nimport { Button } from '@/ds/components/Button';\nimport { Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle } from '@/ds/components/Dialog';\nimport { Txt } from '@/ds/components/Txt';\nimport { raisedSurfaceStyle, surfaceStateLayerStyle } from '@/ds/primitives/raised-surface';\nimport { cn } from '@/lib/utils';\n\nexport interface WorkflowEdgeDataButtonProps {\n previousStepId?: string;\n output?: unknown;\n label?: string;\n selected?: boolean;\n onInspect?: MouseEventHandler<HTMLButtonElement>;\n}\n\nexport const WorkflowEdgeDataButton = ({\n previousStepId,\n output,\n label,\n selected,\n onInspect,\n}: WorkflowEdgeDataButtonProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const dataLabel = label ?? (previousStepId ? `${previousStepId} output` : 'Previous output');\n\n if (output === undefined) {\n return null;\n }\n\n return (\n <>\n <Button\n size=\"sm\"\n variant=\"ghost\"\n onClick={onInspect ?? (() => setIsOpen(true))}\n aria-label={`View ${dataLabel}`}\n aria-pressed={selected}\n className={cn(\n raisedSurfaceStyle,\n surfaceStateLayerStyle,\n 'h-7 rounded-lg px-2 text-foreground aria-pressed:bg-[linear-gradient(var(--fill),var(--fill))]',\n )}\n icon={<Database className=\"text-muted-foreground\" />}\n >\n Data\n </Button>\n\n <Dialog open={isOpen} onOpenChange={setIsOpen}>\n <DialogContent size=\"xl\">\n <DialogHeader>\n <DialogTitle>Step output</DialogTitle>\n </DialogHeader>\n <DialogBody>\n <div className=\"min-w-0 rounded-lg border border-border bg-background p-3\">\n <Txt variant=\"caption\" tone=\"ink\" className=\"mb-2 block\">\n {dataLabel}\n </Txt>\n <WorkflowCodeContent data={output} />\n </div>\n </DialogBody>\n </DialogContent>\n </Dialog>\n </>\n );\n};\n","import type { Edge, Node } from '@xyflow/react';\n\nexport const WORKFLOW_DATA_EDGE_TYPE = 'workflow-data-edge';\nexport const WORKFLOW_BOUNDARY_NODE_TYPE = 'workflow-boundary-node';\n\nexport interface WorkflowDataEdgeData {\n [key: string]: unknown;\n previousStepId?: string;\n nextStepId?: string;\n conditionNode?: boolean;\n boundaryPayload?: 'workflow-input' | 'workflow-output';\n edgeStatus?: 'success' | 'idle';\n dataLabelPlacement?: 'source' | 'hidden';\n}\n\nexport type WorkflowDataEdgeModel = Edge<WorkflowDataEdgeData, typeof WORKFLOW_DATA_EDGE_TYPE>;\n\nexport type WorkflowBoundaryNodeData = {\n boundaryRole: 'start' | 'end';\n label: string;\n};\n\nexport type WorkflowBoundaryNodeModel = Node<WorkflowBoundaryNodeData, typeof WORKFLOW_BOUNDARY_NODE_TYPE>;\n","import { Handle, Position } from '@xyflow/react';\nimport type { NodeProps } from '@xyflow/react';\n\nimport type { WorkflowBoundaryNodeModel } from './types';\nimport { Txt } from '@/ds/components/Txt';\nimport { cn } from '@/utils/cn';\n\nexport const WorkflowBoundaryNode = ({ data }: NodeProps<WorkflowBoundaryNodeModel>) => {\n const isStart = data.boundaryRole === 'start';\n\n return (\n <>\n {!isStart && <Handle type=\"target\" position={Position.Top} style={{ visibility: 'hidden' }} />}\n <div\n data-workflow-boundary-node\n data-testid={`workflow-boundary-${data.boundaryRole}`}\n className={cn(\n 'relative flex h-[38px] w-28 items-center justify-center text-muted-foreground after:absolute after:inset-x-0 after:mask-x-from-60%',\n isStart\n ? 'after:bottom-0 after:h-px after:bg-muted-foreground'\n : 'after:top-0 after:h-1 after:border-y after:border-muted-foreground',\n )}\n >\n <Txt variant=\"meta\">{data.label}</Txt>\n </div>\n {isStart && <Handle type=\"source\" position={Position.Bottom} style={{ visibility: 'hidden' }} />}\n </>\n );\n};\n","import { BaseEdge, EdgeLabelRenderer, getBezierPath, Position, useInternalNode } from '@xyflow/react';\nimport type { EdgeProps } from '@xyflow/react';\nimport { useId } from 'react';\nimport type { ReactNode } from 'react';\nimport { WorkflowEdgeDataButton } from '../data/workflow-edge-data-button';\nimport type { WorkflowDataEdgeModel } from './types';\n\nexport interface WorkflowDataEdgeViewProps extends EdgeProps<WorkflowDataEdgeModel> {\n output?: unknown;\n dataControl?: ReactNode;\n}\n\nexport function WorkflowDataEdgeView({ output, label, dataControl, ...props }: WorkflowDataEdgeViewProps) {\n const source = useInternalNode(props.source);\n const target = useInternalNode(props.target);\n const sourceWidth = source?.measured?.width ?? source?.width;\n const sourceHeight = source?.measured?.height ?? source?.height;\n const targetWidth = target?.measured?.width ?? target?.width;\n const hasBottomSource =\n source && sourceWidth !== undefined && sourceHeight !== undefined && props.sourcePosition === Position.Bottom;\n const hasTopTarget = target && targetWidth !== undefined && props.targetPosition === Position.Top;\n // Nested canvases scale DOM handle measurements twice; route in graph coordinates.\n const sourceX = hasBottomSource ? source.internals.positionAbsolute.x + sourceWidth / 2 : props.sourceX;\n const sourceY = hasBottomSource ? source.internals.positionAbsolute.y + sourceHeight : props.sourceY;\n const targetX = hasTopTarget ? target.internals.positionAbsolute.x + targetWidth / 2 : props.targetX;\n const targetY = hasTopTarget ? target.internals.positionAbsolute.y : props.targetY;\n const [edgePath, midpointX, midpointY] = getBezierPath({\n ...props,\n sourceX,\n sourceY,\n targetX,\n targetY,\n });\n const labelPlacement = props.data?.dataLabelPlacement;\n const labelX = labelPlacement === 'source' ? sourceX : midpointX;\n const labelY = labelPlacement === 'source' ? sourceY + Math.min(24, Math.max(0, (targetY - sourceY) / 4)) : midpointY;\n const arrowId = useId();\n const isExecuted = props.data?.edgeStatus === 'success';\n const pathColor = isExecuted ? 'var(--success-indicator)' : 'var(--muted-foreground)';\n\n return (\n <>\n <defs>\n <marker id={arrowId} viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"5\" markerHeight=\"5\" orient=\"auto\">\n <path d=\"M1 1 L9 5 L1 9 Z\" fill={pathColor} />\n </marker>\n </defs>\n <BaseEdge\n id={props.id}\n path={edgePath}\n markerEnd={`url(#${arrowId})`}\n style={{\n ...props.style,\n stroke: pathColor,\n strokeWidth: isExecuted ? 2 : 1,\n strokeLinecap: 'round',\n strokeDasharray: isExecuted ? 'none' : '5 6',\n }}\n vectorEffect=\"non-scaling-stroke\"\n data-edge-status={props.data?.edgeStatus ?? 'idle'}\n data-edge-from={props.data?.previousStepId}\n data-edge-to={props.data?.nextStepId}\n />\n {labelPlacement !== 'hidden' && (\n <EdgeLabelRenderer>\n <div\n className=\"nodrag nopan flex items-center justify-center\"\n style={{\n position: 'absolute',\n pointerEvents: 'all',\n transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)`,\n }}\n >\n {dataControl ?? (\n <WorkflowEdgeDataButton\n previousStepId={props.data?.boundaryPayload ? undefined : props.data?.previousStepId}\n output={output}\n label={typeof label === 'string' ? label : undefined}\n />\n )}\n </div>\n </EdgeLabelRenderer>\n )}\n </>\n );\n}\n","export function workflowCameraDuration() {\n return window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ? 0 : 300;\n}\n","import { useViewport } from '@xyflow/react';\nimport type { Node } from '@xyflow/react';\nimport { GitFork } from 'lucide-react';\nimport { Badge } from '@/ds/components/Badge';\n\nexport interface WorkflowGraphGroup {\n id: string;\n label: string;\n description: string;\n nodeIds: string[];\n}\n\nexport function WorkflowGraphGroups({ nodes, groups }: { nodes: Node[]; groups: WorkflowGraphGroup[] }) {\n const { x, y, zoom } = useViewport();\n return (\n <div\n className=\"pointer-events-none absolute inset-0 z-0 origin-top-left\"\n style={{ transform: `translate(${x}px, ${y}px) scale(${zoom})` }}\n >\n {groups.map(group => {\n const members = nodes.flatMap(node => {\n if (!group.nodeIds.includes(node.id) || !node.measured?.width || !node.measured.height) return [];\n return [{ x: node.position.x, y: node.position.y, width: node.measured.width, height: node.measured.height }];\n });\n if (!members.length || members.length !== group.nodeIds.length) return null;\n const left = Math.min(...members.map(node => node.x)) - 20;\n const top = Math.min(...members.map(node => node.y)) - 54;\n const right = Math.max(...members.map(node => node.x + node.width)) + 20;\n const bottom = Math.max(...members.map(node => node.y + node.height)) + 20;\n return (\n <div\n key={group.id}\n className=\"absolute rounded-xl border border-dashed border-muted-foreground/25 bg-muted-foreground/3\"\n style={{ transform: `translate(${left}px, ${top}px)`, width: right - left, height: bottom - top }}\n >\n <div className=\"flex items-center gap-2 px-5 py-4 text-meta text-muted-foreground\">\n <Badge size=\"xs\" variant=\"blue\" emphasis=\"subtle\" icon={<GitFork aria-hidden />}>\n {group.label}\n </Badge>\n <span>{group.description}</span>\n </div>\n </div>\n );\n })}\n </div>\n );\n}\n","import type { PanelProps } from '@xyflow/react';\nimport { Panel, useViewport, useReactFlow, useStore } from '@xyflow/react';\nimport { Maximize, Minus, Plus } from 'lucide-react';\nimport { forwardRef } from 'react';\nimport { workflowCameraDuration } from './workflow-camera-duration';\nimport { Button } from '@/ds/components/Button';\nimport { Slider } from '@/ds/components/Slider';\nimport { cn } from '@/utils/cn';\n\nexport const ZoomSlider = forwardRef<\n HTMLDivElement,\n Omit<PanelProps, 'children'> & { compact?: boolean; onFitView?: () => void }\n>(({ className, compact = false, onFitView, ...props }, ref) => {\n const { zoom } = useViewport();\n const { zoomTo, zoomIn, zoomOut, fitView } = useReactFlow();\n const minZoom = useStore(state => state.minZoom);\n const maxZoom = useStore(state => state.maxZoom);\n\n return (\n <Panel\n ref={ref}\n className={cn(\n 'flex items-center gap-1 rounded-full border border-border bg-background p-1 text-foreground',\n className,\n )}\n {...props}\n >\n <Button\n size=\"icon-sm\"\n tooltip=\"Zoom out\"\n disabled={zoom <= minZoom}\n onClick={() => zoomOut({ duration: workflowCameraDuration() })}\n >\n <Minus />\n </Button>\n {!compact && (\n <Slider\n className=\"w-35\"\n aria-label=\"Canvas zoom\"\n value={[zoom]}\n min={minZoom}\n max={maxZoom}\n step={0.01}\n largeStep={0.25}\n format={{ style: 'percent' }}\n onValueChange={values => {\n const [nextZoom] = values;\n if (nextZoom !== undefined) void zoomTo(nextZoom);\n }}\n />\n )}\n <Button\n size=\"icon-sm\"\n tooltip=\"Zoom in\"\n disabled={zoom >= maxZoom}\n onClick={() => zoomIn({ duration: workflowCameraDuration() })}\n >\n <Plus />\n </Button>\n <Button\n size=\"sm\"\n className=\"min-w-16 tabular-nums\"\n tooltip=\"Reset to actual size (100%)\"\n onClick={() => zoomTo(1, { duration: workflowCameraDuration() })}\n >\n {(100 * zoom).toFixed(0)}%\n </Button>\n <Button\n size=\"icon-sm\"\n tooltip=\"Fit view\"\n onClick={onFitView ?? (() => fitView({ duration: workflowCameraDuration(), maxZoom: 1 }))}\n >\n <Maximize />\n </Button>\n </Panel>\n );\n});\n\nZoomSlider.displayName = 'ZoomSlider';\n","import { Background, BackgroundVariant, ReactFlow, useNodesInitialized, useReactFlow, useStore } from '@xyflow/react';\nimport type { Edge, Node, ReactFlowProps } from '@xyflow/react';\nimport { useContext, useEffect, useId, useRef } from 'react';\nimport { WorkflowCanvasInsetContext, workflowFitOptions } from '../workflow-canvas-inset';\nimport { workflowCameraDuration } from './workflow-camera-duration';\nimport { WorkflowGraphGroups } from './workflow-graph-groups';\nimport type { WorkflowGraphGroup } from './workflow-graph-groups';\nimport { ZoomSlider } from './zoom-slider';\nimport { cn } from '@/utils/cn';\nimport '@xyflow/react/dist/style.css';\n\nexport type { WorkflowGraphGroup } from './workflow-graph-groups';\n\nexport interface WorkflowGraphCanvasProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> extends Pick<\n ReactFlowProps<NodeType, EdgeType>,\n 'nodes' | 'edges' | 'nodeTypes' | 'edgeTypes' | 'onNodesChange' | 'onNodeClick'\n> {\n focusNodeId?: string;\n variant?: 'default' | 'nested' | 'inline';\n groups?: WorkflowGraphGroup[];\n}\n\nexport function WorkflowGraphCanvas<NodeType extends Node, EdgeType extends Edge>({\n nodes,\n edges,\n nodeTypes,\n edgeTypes,\n onNodesChange,\n onNodeClick,\n focusNodeId,\n groups,\n variant = 'default',\n}: WorkflowGraphCanvasProps<NodeType, EdgeType>) {\n const graphRef = useRef<HTMLDivElement>(null);\n const backgroundId = useId();\n const panelInset = useContext(WorkflowCanvasInsetContext);\n const leftInset = variant === 'default' ? panelInset : 0;\n const isInline = variant === 'inline';\n const { getNodes, setCenter, fitView } = useReactFlow<NodeType, EdgeType>();\n const nodesInitialized = useNodesInitialized();\n const canvasWidth = useStore(state => state.width);\n const canvasHeight = useStore(state => state.height);\n const hasCompactZoom = canvasWidth - leftInset < 560;\n const inlineNodeLayout = isInline\n ? JSON.stringify(\n nodes?.map(node => [\n node.id,\n node.position.x,\n node.position.y,\n node.measured?.width ?? node.width,\n node.measured?.height ?? node.height,\n ]),\n )\n : undefined;\n\n useEffect(() => {\n if (!canvasWidth || !canvasHeight || !nodesInitialized) return;\n if (variant === 'default') return;\n void fitView({ ...workflowFitOptions(leftInset, isInline), duration: 0 });\n }, [canvasWidth, canvasHeight, nodesInitialized, inlineNodeLayout, fitView, leftInset, isInline, variant]);\n\n useEffect(() => {\n if (!canvasWidth || !canvasHeight || !nodesInitialized || !focusNodeId) return;\n const focusNode = getNodes().find(node => node.id === focusNodeId);\n if (!focusNode) return;\n if (!graphRef.current?.contains(document.activeElement)) {\n graphRef.current?.focus({ preventScroll: true });\n }\n const width = focusNode.measured?.width ?? focusNode.width ?? 274;\n const height = focusNode.measured?.height ?? focusNode.height ?? 100;\n const duration = workflowCameraDuration();\n const exceedsVisibleWidth = canvasWidth > 0 && width > canvasWidth - leftInset - 80;\n const exceedsVisibleHeight = canvasHeight > 0 && height > canvasHeight - 104;\n if (exceedsVisibleWidth || exceedsVisibleHeight) {\n void fitView({ ...workflowFitOptions(leftInset), nodes: [{ id: focusNode.id }], duration });\n return;\n }\n void setCenter(focusNode.position.x + width / 2 - leftInset / 2, focusNode.position.y + height / 2, {\n duration,\n zoom: 1,\n });\n }, [canvasWidth, canvasHeight, nodesInitialized, focusNodeId, getNodes, setCenter, fitView, leftInset]);\n\n return (\n <div\n ref={graphRef}\n tabIndex={-1}\n data-testid=\"workflow-graph-viewport\"\n className={cn('size-full outline-none', variant === 'nested' ? 'bg-sidebar' : 'bg-background')}\n >\n <ReactFlow\n fitView={variant === 'default'}\n fitViewOptions={workflowFitOptions(leftInset)}\n nodes={nodes}\n edges={edges}\n nodeTypes={nodeTypes}\n edgeTypes={edgeTypes}\n onNodesChange={onNodesChange}\n onNodeClick={onNodeClick}\n nodesDraggable={false}\n nodesConnectable={false}\n elementsSelectable={false}\n deleteKeyCode={null}\n panOnScroll={!isInline}\n panOnDrag={!isInline}\n zoomOnPinch={!isInline}\n zoomOnDoubleClick={!isInline}\n preventScrolling={!isInline}\n proOptions={isInline ? { hideAttribution: true } : undefined}\n zoomOnScroll={false}\n minZoom={0.1}\n maxZoom={4}\n >\n {!isInline && (\n <ZoomSlider\n position=\"top-right\"\n className=\"m-2!\"\n compact={hasCompactZoom}\n onFitView={() => fitView({ ...workflowFitOptions(leftInset), duration: workflowCameraDuration() })}\n />\n )}\n {groups && <WorkflowGraphGroups nodes={nodes ?? []} groups={groups} />}\n {!isInline && <Background id={backgroundId} variant={BackgroundVariant.Dots} gap={12} size={0.5} />}\n </ReactFlow>\n </div>\n );\n}\n","import { Handle, Position } from '@xyflow/react';\nimport type { ReactNode } from 'react';\n\nexport interface WorkflowNodeFrameProps {\n withoutTopHandle?: boolean;\n withoutBottomHandle?: boolean;\n children: ReactNode;\n}\n\nexport function WorkflowNodeFrame({ withoutTopHandle, withoutBottomHandle, children }: WorkflowNodeFrameProps) {\n return (\n <>\n {!withoutTopHandle && <Handle type=\"target\" position={Position.Top} style={{ visibility: 'hidden' }} />}\n <div className=\"nodrag pointer-events-auto\">{children}</div>\n {!withoutBottomHandle && <Handle type=\"source\" position={Position.Bottom} style={{ visibility: 'hidden' }} />}\n </>\n );\n}\n","import { Loader2, Pause, PlayIcon, StepForwardIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport { Badge } from '@/ds/components/Badge';\nimport { Button } from '@/ds/components/Button';\nimport { Txt } from '@/ds/components/Txt';\n\nexport interface WorkflowDebugControlsProps {\n isStreaming?: boolean;\n canRunNextStep: boolean;\n nextStepLabel?: string;\n disabled?: boolean;\n children?: ReactNode;\n onRunNextStep: () => void;\n onContinueRun: () => void;\n}\n\nexport function WorkflowDebugControls({\n isStreaming,\n canRunNextStep,\n nextStepLabel,\n disabled,\n children,\n onRunNextStep,\n onContinueRun,\n}: WorkflowDebugControlsProps) {\n const nextStepFallback = canRunNextStep ? 'Ready to advance' : 'Next step unavailable';\n const actionsDisabled = !canRunNextStep || isStreaming || disabled;\n\n return (\n <div className=\"flex min-w-0 flex-col gap-3\" data-testid=\"workflow-debug-step-controls\">\n <div className=\"rounded-xl border border-surface-rim bg-background p-3\">\n <div className=\"mb-2 flex flex-wrap items-center justify-between gap-2\">\n <Txt as=\"span\" variant=\"meta\" tone=\"muted\">\n Next step\n </Txt>\n <Badge size=\"sm\" icon={<Pause />} emphasis=\"subtle\">\n Step by step\n </Badge>\n </div>\n <div className=\"text-subheading break-words text-foreground\" aria-live=\"polite\">\n {nextStepLabel || nextStepFallback}\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button\n type=\"button\"\n variant=\"primary\"\n className=\"min-w-0 flex-1\"\n aria-label=\"Run next step\"\n onClick={onRunNextStep}\n disabled={actionsDisabled}\n icon={isStreaming ? <Loader2 className=\"motion-safe:animate-spin\" /> : <StepForwardIcon />}\n >\n {isStreaming ? 'Running step…' : 'Run next step'}\n </Button>\n\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-md\"\n tooltip=\"Continue full run\"\n onClick={onContinueRun}\n disabled={actionsDisabled}\n >\n <PlayIcon />\n </Button>\n {children}\n </div>\n </div>\n );\n}\n","import { AlertCircleIcon } from 'lucide-react';\nimport { Skeleton } from '@/ds/components/Skeleton';\n\nexport type WorkflowGraphPlaceholderProps = { isLoading: true } | { isLoading?: false; workflowName: string };\n\nexport function WorkflowGraphPlaceholder(props: WorkflowGraphPlaceholderProps) {\n if (props.isLoading) {\n return (\n <div className=\"p-4\">\n <Skeleton className=\"h-full\" />\n </div>\n );\n }\n\n return (\n <div className=\"grid h-full place-items-center\">\n <div className=\"flex flex-col items-center gap-2\">\n <AlertCircleIcon />\n <div>We couldn&apos;t find {props.workflowName} workflow.</div>\n </div>\n </div>\n );\n}\n","import type { WorkflowConditionCardViewProps } from '../../types';\nimport { WorkflowConditionCardView } from './workflow-condition-card-view';\n\nexport type WorkflowConditionCardProps = Omit<WorkflowConditionCardViewProps, 'type'>;\n\nexport function WorkflowConditionCard({ conditions, ...props }: WorkflowConditionCardProps) {\n return <WorkflowConditionCardView {...props} type={conditions[0]?.type} conditions={conditions} />;\n}\n","import { MoreVerticalIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\nimport { Button } from '@/ds/components/Button';\nimport { DropdownMenu } from '@/ds/components/DropdownMenu';\n\nexport function WorkflowStepActions({ children }: { children: ReactNode }) {\n return (\n <DropdownMenu>\n <DropdownMenu.Trigger\n render={\n <Button\n size=\"icon-sm\"\n variant=\"ghost\"\n aria-label=\"Step actions\"\n title=\"Step actions\"\n className=\"nodrag nopan\"\n >\n <MoreVerticalIcon />\n </Button>\n }\n />\n <DropdownMenu.Content align=\"end\">{children}</DropdownMenu.Content>\n </DropdownMenu>\n );\n}\n","import {\n AlertCircleIcon,\n BracesIcon,\n Clock3Icon,\n PanelRightIcon,\n PlayIcon,\n RotateCcwIcon,\n ShieldAlertIcon,\n StepForwardIcon,\n} from 'lucide-react';\nimport { DropdownMenu } from '@/ds/components/DropdownMenu';\n\nconst actions = {\n nested: { icon: PanelRightIcon, label: 'View nested graph', activeLabel: 'Hide nested graph' },\n map: { icon: BracesIcon, label: 'Map config', activeLabel: 'Hide map config' },\n timeTravel: { icon: Clock3Icon, label: 'Time travel' },\n runStep: { icon: PlayIcon, label: 'Run step' },\n continueRun: { icon: StepForwardIcon, label: 'Continue run' },\n resumeData: { icon: RotateCcwIcon, label: 'Resume data' },\n error: { icon: AlertCircleIcon, label: 'Error' },\n tripwire: { icon: ShieldAlertIcon, label: 'Tripwire' },\n};\n\nexport interface WorkflowStepActionProps {\n action: keyof typeof actions;\n isActive?: boolean;\n onSelect: () => void;\n}\n\nexport function WorkflowStepAction({ action, isActive, onSelect }: WorkflowStepActionProps) {\n const definition = actions[action];\n const ActionIcon = definition.icon;\n const label = isActive && 'activeLabel' in definition ? definition.activeLabel : definition.label;\n return (\n <DropdownMenu.Item onSelect={onSelect} className={action === 'tripwire' ? 'text-warning-foreground' : undefined}>\n <ActionIcon />\n <span>{label}</span>\n </DropdownMenu.Item>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAa,6BAA6B,cAAc,CAAC;AAEzD,SAAgB,mBAAmB,WAAmB,WAAW,OAAuB;CACtF,OAAO;EACL,SAAS;EACT,SAAS,WAAW,SAAS;GAAE,MAAM,GAAG,YAAY,GAAG;GAAK,OAAO;GAAQ,KAAK;GAAQ,QAAQ;EAAO;CACzG;AACF;;ACWA,SAAgB,qBAAqB,OAKnC;CACA,IAAI,MAAM,WAAW,OAAO;EAAE,OAAO;EAAY,MAAM;EAAU,MAAM;EAAS,WAAW;CAAU;CACrG,IAAI,MAAM,wBAAwB,MAAM,WACtC,OAAO;EAAE,OAAO;EAAY,MAAM;EAAU,MAAM;EAAU,WAAW;CAAW;CACpF,IAAI,MAAM,cAAc,CAAC,MAAM,UAC7B,OAAO;EAAE,OAAO;EAAY,MAAM;EAAQ,MAAM;EAAS,WAAW;CAAW;CACjF,IAAI,MAAM,aAAa,SAAS,MAAM,WACpC,OAAO;EAAE,OAAO;EAAO,MAAM;EAAU,MAAM;EAAgB,WAAW;CAAM;CAChF,IAAI,MAAM,aAAa,gBAAgB,MAAM,MAC3C,OAAO;EAAE,OAAO;EAAc,MAAM;EAAU,MAAM;EAAe,WAAW;CAAc;CAC9F,IAAI,MAAM,aAAa,WAAW,MAAM,aAAa,KAAA,GACnD,OAAO;EAAE,OAAO;EAAS,MAAM;EAAU,MAAM;EAAO,WAAW;CAAQ;CAC3E,IAAI,MAAM,aAAa,SAAS,OAAO;EAAE,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AM;EAAY,OAAO;EAAc,aAAa;CAAkB;CAC7E,YAAY;EAAE,MAAM;EAAY,OAAO;CAAc;CACrD,SAAS;EAAE,MAAM;EAAU,OAAO;CAAW;CAC7C,aAAa;EAAE,MAAM;EAAiB,OAAO;CAAe;CAC5D,YAAY;EAAE,MAAM;EAAe,OAAO;CAAc;CACxD,OAAO;EAAE,MAAM;EAAiB,OAAO;CAAQ;CAC/C,UAAU;EAAE,MAAM;EAAiB,OAAO;CAAW;AACvD;AAQA,SAAgB,mBAAmB,EAAE,QAAQ,UAAU,YAAqC;CAC1F,MAAM,aAAa,QAAQ;CAC3B,MAAM,aAAa,WAAW;CAC9B,MAAM,QAAQ,YAAY,iBAAiB,aAAa,WAAW,cAAc,WAAW;CAC5F,OACE,qBAAC,aAAa,MAAd;EAA6B;EAAU,WAAW,WAAW,aAAa,4BAA4B,KAAA;EAAtG,UAAA,CACE,oBAAC,YAAD,CAAa,CAAA,GACb,oBAAC,QAAD,EAAA,UAAO,MAAY,CAAA,CACF;;AAEvB"}
@@ -76,7 +76,7 @@ var AskUserOptionRow = ({ control, label, description, disabled = false, classNa
76
76
  className: "contents",
77
77
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_Field.FieldLabel, {
78
78
  "aria-disabled": disabled || void 0,
79
- className: require_utils.cn("state-layer flex items-start gap-2.5 rounded-lg px-3 py-2 data-disabled:opacity-50", className),
79
+ className: require_utils.cn("flex items-start gap-2.5 rounded-lg state-layer px-3 py-2 data-disabled:opacity-50", className),
80
80
  ...props,
81
81
  children: [control, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
82
82
  className: "grid gap-0.5",
@@ -492,4 +492,4 @@ Object.defineProperty(exports, "AskUserTextAnswer", {
492
492
  }
493
493
  });
494
494
 
495
- //# sourceMappingURL=ask-user-u4FScaHG.cjs.map
495
+ //# sourceMappingURL=ask-user-4Te-yUfM.cjs.map