ai-design-system 0.1.31 → 0.1.32

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.
@@ -1,12 +1,8 @@
1
1
  import {
2
2
  BaseEdge,
3
3
  type EdgeProps,
4
- getBezierPath,
5
4
  getSimpleBezierPath,
6
- type InternalNode,
7
- type Node,
8
- Position,
9
- useInternalNode,
5
+ getSmoothStepPath,
10
6
  } from "@xyflow/react";
11
7
 
12
8
  const Temporary = ({
@@ -39,97 +35,49 @@ const Temporary = ({
39
35
  );
40
36
  };
41
37
 
42
- const getHandleCoordsByPosition = (
43
- node: InternalNode<Node>,
44
- handlePosition: Position,
45
- handleType: "source" | "target"
46
- ) => {
47
- const handle = node.internals.handleBounds?.[handleType]?.find(
48
- (h) => h.position === handlePosition
49
- );
50
-
51
- if (!handle) {
52
- return [0, 0] as const;
53
- }
54
-
55
- let offsetX = handle.width / 2;
56
- let offsetY = handle.height / 2;
57
-
58
- switch (handlePosition) {
59
- case Position.Left:
60
- offsetX = 0;
61
- break;
62
- case Position.Right:
63
- offsetX = handle.width;
64
- break;
65
- case Position.Top:
66
- offsetY = 0;
67
- break;
68
- case Position.Bottom:
69
- offsetY = handle.height;
70
- break;
71
- default:
72
- throw new Error(`Invalid handle position: ${handlePosition}`);
73
- }
74
-
75
- const x = node.internals.positionAbsolute.x + handle.x + offsetX;
76
- const y = node.internals.positionAbsolute.y + handle.y + offsetY;
77
-
78
- return [x, y] as const;
79
- };
80
-
81
- const getEdgeParams = (
82
- source: InternalNode<Node>,
83
- target: InternalNode<Node>
84
- ) => {
85
- const sx = source.internals.positionAbsolute.x + (source.measured?.width ?? 0) / 2;
86
- const sy = source.internals.positionAbsolute.y + (source.measured?.height ?? 0) / 2;
87
- const tx = target.internals.positionAbsolute.x + (target.measured?.width ?? 0) / 2;
88
- const ty = target.internals.positionAbsolute.y + (target.measured?.height ?? 0) / 2;
89
-
90
- const dx = tx - sx;
91
- const dy = ty - sy;
92
-
93
- // Pick source/target positions based on dominant direction
94
- let sourcePos: Position;
95
- let targetPos: Position;
96
-
97
- if (Math.abs(dx) > Math.abs(dy)) {
98
- // Horizontal dominant
99
- sourcePos = dx > 0 ? Position.Right : Position.Left;
100
- targetPos = dx > 0 ? Position.Left : Position.Right;
101
- } else {
102
- // Vertical dominant
103
- sourcePos = dy > 0 ? Position.Bottom : Position.Top;
104
- targetPos = dy > 0 ? Position.Top : Position.Bottom;
105
- }
106
-
107
- const [srcX, srcY] = getHandleCoordsByPosition(source, sourcePos, "source");
108
- const [tgtX, tgtY] = getHandleCoordsByPosition(target, targetPos, "target");
38
+ const Strict = ({
39
+ id,
40
+ sourceX,
41
+ sourceY,
42
+ targetX,
43
+ targetY,
44
+ sourcePosition,
45
+ targetPosition,
46
+ markerEnd,
47
+ style,
48
+ }: EdgeProps) => {
49
+ const [edgePath] = getSmoothStepPath({
50
+ sourceX,
51
+ sourceY,
52
+ sourcePosition,
53
+ targetX,
54
+ targetY,
55
+ targetPosition,
56
+ borderRadius: 0,
57
+ });
109
58
 
110
- return { sx: srcX, sy: srcY, tx: tgtX, ty: tgtY, sourcePos, targetPos };
59
+ return <BaseEdge id={id} markerEnd={markerEnd} path={edgePath} style={style} />;
111
60
  };
112
61
 
113
- const Animated = ({ id, source, target, markerEnd, style }: EdgeProps) => {
114
- const sourceNode = useInternalNode(source);
115
- const targetNode = useInternalNode(target);
116
-
117
- if (!(sourceNode && targetNode)) {
118
- return null;
119
- }
120
-
121
- const { sx, sy, tx, ty, sourcePos, targetPos } = getEdgeParams(
122
- sourceNode,
123
- targetNode
124
- );
125
-
126
- const [edgePath] = getBezierPath({
127
- sourceX: sx,
128
- sourceY: sy,
129
- sourcePosition: sourcePos,
130
- targetX: tx,
131
- targetY: ty,
132
- targetPosition: targetPos,
62
+ const Animated = ({
63
+ id,
64
+ sourceX,
65
+ sourceY,
66
+ targetX,
67
+ targetY,
68
+ sourcePosition,
69
+ targetPosition,
70
+ markerEnd,
71
+ style,
72
+ }: EdgeProps) => {
73
+ const [edgePath] = getSmoothStepPath({
74
+ sourceX,
75
+ sourceY,
76
+ sourcePosition,
77
+ targetX,
78
+ targetY,
79
+ targetPosition,
80
+ borderRadius: 0,
133
81
  });
134
82
 
135
83
  return (
@@ -143,6 +91,7 @@ const Animated = ({ id, source, target, markerEnd, style }: EdgeProps) => {
143
91
  };
144
92
 
145
93
  export const Edge = {
94
+ Strict,
146
95
  Temporary,
147
96
  Animated,
148
97
  };
@@ -23,7 +23,7 @@ export type NodeProps = ComponentProps<typeof Card> & {
23
23
  export const Node = ({ handles, className, status, ...props }: NodeProps) => (
24
24
  <Card
25
25
  className={cn(
26
- "node-container relative size-full h-auto w-sm gap-0 rounded-md bg-card p-0 transition-all duration-200",
26
+ "node-container relative h-[52px] w-[180px] gap-0 overflow-hidden rounded-md bg-card p-0 transition-all duration-200",
27
27
  status === "success" && "border-green-500 border-2",
28
28
  status === "error" && "border-red-500 border-2",
29
29
  className
@@ -24,6 +24,7 @@ import type { WorkflowCanvasProps, WorkflowEdge } from "./interfaces";
24
24
  import "@xyflow/react/dist/style.css";
25
25
 
26
26
  const edgeTypes = {
27
+ straight: Edge.Strict,
27
28
  animated: Edge.Animated,
28
29
  temporary: Edge.Temporary,
29
30
  };
@@ -68,7 +68,7 @@ export const StateNode = memo(({ data, selected, id }: StateNodeProps) => {
68
68
  return (
69
69
  <Node
70
70
  className={cn(
71
- "relative flex h-auto w-auto min-w-[120px] max-w-[180px] flex-col items-center justify-center border border-border bg-card shadow-none transition-all duration-150 ease-out",
71
+ "relative flex flex-col items-center justify-center border border-border bg-card shadow-none transition-all duration-150 ease-out",
72
72
  selected && "border-primary border-2",
73
73
  isTerminal && "border-2 border-primary",
74
74
  isDisabled && "opacity-50"
@@ -87,11 +87,14 @@ export const StateNode = memo(({ data, selected, id }: StateNodeProps) => {
87
87
  {/* Status indicator badge in top right */}
88
88
  <StatusBadge status={status} />
89
89
 
90
- <div className="flex items-center gap-1.5 px-3 py-2">
91
- <Zap className="size-3 shrink-0 text-primary" strokeWidth={1.5} /> <div className="flex flex-col">
92
- <NodeTitle className="text-xs font-medium leading-tight">{displayTitle}</NodeTitle>
90
+ <div className="flex h-full w-full items-center justify-center gap-1.5 px-3 py-2">
91
+ <Zap className="size-3 shrink-0 text-primary" strokeWidth={1.5} />
92
+ <div className="min-w-0 flex-1 text-center">
93
+ <NodeTitle className="line-clamp-2 text-center text-xs font-medium leading-tight" title={displayTitle}>
94
+ {displayTitle}
95
+ </NodeTitle>
93
96
  {displayDescription && (
94
- <NodeDescription className="text-[10px] leading-tight mt-0.5">
97
+ <NodeDescription className="mt-0.5 line-clamp-2 text-center text-[10px] leading-tight" title={displayDescription}>
95
98
  {displayDescription}
96
99
  </NodeDescription>
97
100
  )}
@@ -53,7 +53,7 @@ export const TransitionNode = memo(
53
53
  return (
54
54
  <Node
55
55
  className={cn(
56
- "flex h-auto w-auto min-w-[120px] max-w-[180px] flex-col items-center justify-center border border-border bg-muted/40 shadow-none transition-all duration-150 ease-out",
56
+ "flex flex-col items-center justify-center border border-border bg-secondary text-secondary-foreground shadow-none transition-all duration-150 ease-out",
57
57
  selected && "border-primary border-2"
58
58
  )}
59
59
  data-testid={`transition-node-${id}`}
@@ -78,12 +78,14 @@ export const TransitionNode = memo(
78
78
  </div>
79
79
  )}
80
80
 
81
- <div className="flex items-center gap-1.5 px-3 py-2">
81
+ <div className="flex h-full w-full items-center justify-center gap-1.5 px-3 py-2">
82
82
  <GitBranch className="size-3 shrink-0 text-muted-foreground" strokeWidth={1.5} />
83
- <div className="flex flex-col">
84
- <NodeTitle className="text-xs font-medium leading-tight">{displayTitle}</NodeTitle>
83
+ <div className="min-w-0 flex-1 text-center">
84
+ <NodeTitle className="line-clamp-2 text-center text-xs font-medium leading-tight" title={displayTitle}>
85
+ {displayTitle}
86
+ </NodeTitle>
85
87
  {displayDescription && (
86
- <NodeDescription className="text-[10px] leading-tight mt-0.5">
88
+ <NodeDescription className="mt-0.5 line-clamp-2 text-center text-[10px] leading-tight" title={displayDescription}>
87
89
  {displayDescription}
88
90
  </NodeDescription>
89
91
  )}
@@ -484,7 +484,7 @@ export const WorkflowRunObservabilityDetailsPanel = React.memo<WorkflowRunObserv
484
484
  <div className="space-y-2 border-t border-[#23242a] pt-3">
485
485
  <div className="font-medium text-sm">Events ({events.length})</div>
486
486
  <div className="max-h-32 divide-y divide-[#23242a] overflow-auto rounded border border-[#2a2a2f] bg-[#090a0f] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden">
487
- {events.slice(0, 3).map((event) => (
487
+ {events.map((event) => (
488
488
  <div className="px-2 py-1 text-xs" key={event.id}>
489
489
  <div>{event.title}</div>
490
490
  {event.timestamp ? (
@@ -52,10 +52,75 @@ const baseArgs: Story["args"] = {
52
52
  className: "h-full",
53
53
  }
54
54
 
55
+ const hookFocusedRunActions = [
56
+ { id: 'wake-up-hook', label: 'Resume Hook', resourceTypes: ['hook'], tone: 'neutral' as const, surface: 'details' as const },
57
+ { id: 'cancel-hook', label: 'Cancel Hook', resourceTypes: ['hook'], tone: 'danger' as const, surface: 'menu' as const },
58
+ ]
59
+
60
+ const sleepFocusedRunActions = [
61
+ { id: 'wake-up-sleep', label: 'Wake Up Sleep', resourceTypes: ['sleep'], tone: 'amber' as const, surface: 'details' as const },
62
+ { id: 'cancel-active-sleeps', label: 'Cancel Active Sleeps', resourceTypes: ['sleep'], tone: 'danger' as const, surface: 'menu' as const },
63
+ ]
64
+
55
65
  export const Default: Story = {
56
66
  args: baseArgs,
57
67
  }
58
68
 
69
+ export const NoSelection: Story = {
70
+ args: {
71
+ ...baseArgs,
72
+ selectedRun: null,
73
+ selectedSpanId: null,
74
+ },
75
+ }
76
+
77
+ export const SelectedTraceRunDetails: Story = {
78
+ args: {
79
+ ...baseArgs,
80
+ selectedSpanId: 'span_generateBirthdayCard',
81
+ },
82
+ }
83
+
84
+ export const HookSuspensionState: Story = {
85
+ args: {
86
+ ...baseArgs,
87
+ selectedSpanId: 'hook_01KP45XGJK16SW3BS6GGC5A04B',
88
+ runActions: hookFocusedRunActions,
89
+ },
90
+ }
91
+
92
+ export const SleepSuspensionState: Story = {
93
+ args: {
94
+ ...baseArgs,
95
+ selectedSpanId: 'sleep_wait_01KP45XGJK16SW3BS6GGC5A04H',
96
+ runActions: sleepFocusedRunActions,
97
+ },
98
+ }
99
+
100
+ export const LiveUpdateSnapshot: Story = {
101
+ args: {
102
+ ...baseArgs,
103
+ events: [
104
+ ...workflowEventRecordsMock,
105
+ {
106
+ id: 'evt_4',
107
+ title: 'run_resumed',
108
+ timestamp: '4/13/2026, 12:46:12 PM',
109
+ description: 'Workflow resumed after manual approval.',
110
+ },
111
+ ],
112
+ streams: [
113
+ ...workflowStreamRecordsMock,
114
+ {
115
+ id: 'stream_3',
116
+ channel: 'event',
117
+ payload: JSON.stringify({ event_type: 'run_resumed', actor: 'manager' }),
118
+ timestamp: '12:46:12 PM',
119
+ },
120
+ ],
121
+ },
122
+ }
123
+
59
124
  export const WithStateManagement: Story = {
60
125
  args: baseArgs,
61
126
  render: () => {
@@ -175,6 +175,9 @@ export const WorkflowObservabilityFeature = React.memo<WorkflowObservabilityFeat
175
175
  return null
176
176
  }
177
177
 
178
+ const inboxDefaultSize = inbox.defaultSize ?? 25
179
+ const inboxMinSize = inbox.minSize ?? 25
180
+
178
181
  return [
179
182
  {
180
183
  id: "inbox",
@@ -190,13 +193,15 @@ export const WorkflowObservabilityFeature = React.memo<WorkflowObservabilityFeat
190
193
  className="h-full"
191
194
  />
192
195
  ),
193
- fixedSize: "16rem",
196
+ defaultSize: inboxDefaultSize,
197
+ minSize: inboxMinSize,
198
+ maxSize: 45,
194
199
  },
195
200
  {
196
201
  id: "observability",
197
202
  content: observabilityContent,
198
- defaultSize: 70,
199
- minSize: 40,
203
+ defaultSize: 100 - inboxDefaultSize,
204
+ minSize: 50,
200
205
  },
201
206
  ]
202
207
  }, [inbox, observabilityContent])
package/dist/index.cjs CHANGED
@@ -8223,7 +8223,7 @@ var Node2 = (_a) => {
8223
8223
  Card,
8224
8224
  __spreadProps(__spreadValues({
8225
8225
  className: cn(
8226
- "node-container relative size-full h-auto w-sm gap-0 rounded-md bg-card p-0 transition-all duration-200",
8226
+ "node-container relative h-[52px] w-[180px] gap-0 overflow-hidden rounded-md bg-card p-0 transition-all duration-200",
8227
8227
  status === "success" && "border-green-500 border-2",
8228
8228
  status === "error" && "border-red-500 border-2",
8229
8229
  className
@@ -8284,7 +8284,7 @@ var StateNode = React3.memo(({ data, selected, id }) => {
8284
8284
  Node2,
8285
8285
  {
8286
8286
  className: cn(
8287
- "relative flex h-auto w-auto min-w-[120px] max-w-[180px] flex-col items-center justify-center border border-border bg-card shadow-none transition-all duration-150 ease-out",
8287
+ "relative flex flex-col items-center justify-center border border-border bg-card shadow-none transition-all duration-150 ease-out",
8288
8288
  selected && "border-primary border-2",
8289
8289
  isTerminal && "border-2 border-primary",
8290
8290
  isDisabled && "opacity-50"
@@ -8295,12 +8295,11 @@ var StateNode = React3.memo(({ data, selected, id }) => {
8295
8295
  children: [
8296
8296
  isDisabled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 left-1 rounded-full bg-gray-500/50 p-0.5", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { className: "size-3 text-white" }) }),
8297
8297
  /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status }),
8298
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 px-3 py-2", children: [
8298
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full items-center justify-center gap-1.5 px-3 py-2", children: [
8299
8299
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: "size-3 shrink-0 text-primary", strokeWidth: 1.5 }),
8300
- " ",
8301
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
8302
- /* @__PURE__ */ jsxRuntime.jsx(NodeTitle, { className: "text-xs font-medium leading-tight", children: displayTitle }),
8303
- displayDescription && /* @__PURE__ */ jsxRuntime.jsx(NodeDescription, { className: "text-[10px] leading-tight mt-0.5", children: displayDescription })
8300
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 text-center", children: [
8301
+ /* @__PURE__ */ jsxRuntime.jsx(NodeTitle, { className: "line-clamp-2 text-center text-xs font-medium leading-tight", title: displayTitle, children: displayTitle }),
8302
+ displayDescription && /* @__PURE__ */ jsxRuntime.jsx(NodeDescription, { className: "mt-0.5 line-clamp-2 text-center text-[10px] leading-tight", title: displayDescription, children: displayDescription })
8304
8303
  ] })
8305
8304
  ] })
8306
8305
  ]
@@ -8320,7 +8319,7 @@ var TransitionNode = React3.memo(
8320
8319
  Node2,
8321
8320
  {
8322
8321
  className: cn(
8323
- "flex h-auto w-auto min-w-[120px] max-w-[180px] flex-col items-center justify-center border border-border bg-muted/40 shadow-none transition-all duration-150 ease-out",
8322
+ "flex flex-col items-center justify-center border border-border bg-secondary text-secondary-foreground shadow-none transition-all duration-150 ease-out",
8324
8323
  selected && "border-primary border-2"
8325
8324
  ),
8326
8325
  "data-testid": `transition-node-${id}`,
@@ -8341,11 +8340,11 @@ var TransitionNode = React3.memo(
8341
8340
  ]
8342
8341
  }
8343
8342
  ),
8344
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 px-3 py-2", children: [
8343
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full items-center justify-center gap-1.5 px-3 py-2", children: [
8345
8344
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GitBranch, { className: "size-3 shrink-0 text-muted-foreground", strokeWidth: 1.5 }),
8346
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
8347
- /* @__PURE__ */ jsxRuntime.jsx(NodeTitle, { className: "text-xs font-medium leading-tight", children: displayTitle }),
8348
- displayDescription && /* @__PURE__ */ jsxRuntime.jsx(NodeDescription, { className: "text-[10px] leading-tight mt-0.5", children: displayDescription })
8345
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 text-center", children: [
8346
+ /* @__PURE__ */ jsxRuntime.jsx(NodeTitle, { className: "line-clamp-2 text-center text-xs font-medium leading-tight", title: displayTitle, children: displayTitle }),
8347
+ displayDescription && /* @__PURE__ */ jsxRuntime.jsx(NodeDescription, { className: "mt-0.5 line-clamp-2 text-center text-[10px] leading-tight", title: displayDescription, children: displayDescription })
8349
8348
  ] })
8350
8349
  ] })
8351
8350
  ]
@@ -8741,7 +8740,7 @@ var WorkflowRunObservabilityDetailsPanel = React3__namespace.memo(
8741
8740
  events.length,
8742
8741
  ")"
8743
8742
  ] }),
8744
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-32 divide-y divide-[#23242a] overflow-auto rounded border border-[#2a2a2f] bg-[#090a0f] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", children: events.slice(0, 3).map((event) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-2 py-1 text-xs", children: [
8743
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-32 divide-y divide-[#23242a] overflow-auto rounded border border-[#2a2a2f] bg-[#090a0f] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", children: events.map((event) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-2 py-1 text-xs", children: [
8745
8744
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: event.title }),
8746
8745
  event.timestamp ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[#8a8c96]", children: event.timestamp }) : null
8747
8746
  ] }, event.id)) })
@@ -9225,74 +9224,47 @@ var Temporary = ({
9225
9224
  }
9226
9225
  );
9227
9226
  };
9228
- var getHandleCoordsByPosition = (node, handlePosition, handleType) => {
9229
- var _a, _b;
9230
- const handle = (_b = (_a = node.internals.handleBounds) == null ? void 0 : _a[handleType]) == null ? void 0 : _b.find(
9231
- (h) => h.position === handlePosition
9232
- );
9233
- if (!handle) {
9234
- return [0, 0];
9235
- }
9236
- let offsetX = handle.width / 2;
9237
- let offsetY = handle.height / 2;
9238
- switch (handlePosition) {
9239
- case react$2.Position.Left:
9240
- offsetX = 0;
9241
- break;
9242
- case react$2.Position.Right:
9243
- offsetX = handle.width;
9244
- break;
9245
- case react$2.Position.Top:
9246
- offsetY = 0;
9247
- break;
9248
- case react$2.Position.Bottom:
9249
- offsetY = handle.height;
9250
- break;
9251
- default:
9252
- throw new Error(`Invalid handle position: ${handlePosition}`);
9253
- }
9254
- const x = node.internals.positionAbsolute.x + handle.x + offsetX;
9255
- const y = node.internals.positionAbsolute.y + handle.y + offsetY;
9256
- return [x, y];
9257
- };
9258
- var getEdgeParams = (source, target) => {
9259
- var _a, _b, _c, _d, _e, _f, _g, _h;
9260
- const sx = source.internals.positionAbsolute.x + ((_b = (_a = source.measured) == null ? void 0 : _a.width) != null ? _b : 0) / 2;
9261
- const sy = source.internals.positionAbsolute.y + ((_d = (_c = source.measured) == null ? void 0 : _c.height) != null ? _d : 0) / 2;
9262
- const tx = target.internals.positionAbsolute.x + ((_f = (_e = target.measured) == null ? void 0 : _e.width) != null ? _f : 0) / 2;
9263
- const ty = target.internals.positionAbsolute.y + ((_h = (_g = target.measured) == null ? void 0 : _g.height) != null ? _h : 0) / 2;
9264
- const dx = tx - sx;
9265
- const dy = ty - sy;
9266
- let sourcePos;
9267
- let targetPos;
9268
- if (Math.abs(dx) > Math.abs(dy)) {
9269
- sourcePos = dx > 0 ? react$2.Position.Right : react$2.Position.Left;
9270
- targetPos = dx > 0 ? react$2.Position.Left : react$2.Position.Right;
9271
- } else {
9272
- sourcePos = dy > 0 ? react$2.Position.Bottom : react$2.Position.Top;
9273
- targetPos = dy > 0 ? react$2.Position.Top : react$2.Position.Bottom;
9274
- }
9275
- const [srcX, srcY] = getHandleCoordsByPosition(source, sourcePos, "source");
9276
- const [tgtX, tgtY] = getHandleCoordsByPosition(target, targetPos, "target");
9277
- return { sx: srcX, sy: srcY, tx: tgtX, ty: tgtY, sourcePos, targetPos };
9227
+ var Strict = ({
9228
+ id,
9229
+ sourceX,
9230
+ sourceY,
9231
+ targetX,
9232
+ targetY,
9233
+ sourcePosition,
9234
+ targetPosition,
9235
+ markerEnd,
9236
+ style
9237
+ }) => {
9238
+ const [edgePath] = react$2.getSmoothStepPath({
9239
+ sourceX,
9240
+ sourceY,
9241
+ sourcePosition,
9242
+ targetX,
9243
+ targetY,
9244
+ targetPosition,
9245
+ borderRadius: 0
9246
+ });
9247
+ return /* @__PURE__ */ jsxRuntime.jsx(react$2.BaseEdge, { id, markerEnd, path: edgePath, style });
9278
9248
  };
9279
- var Animated = ({ id, source, target, markerEnd, style }) => {
9280
- const sourceNode = react$2.useInternalNode(source);
9281
- const targetNode = react$2.useInternalNode(target);
9282
- if (!(sourceNode && targetNode)) {
9283
- return null;
9284
- }
9285
- const { sx, sy, tx, ty, sourcePos, targetPos } = getEdgeParams(
9286
- sourceNode,
9287
- targetNode
9288
- );
9289
- const [edgePath] = react$2.getBezierPath({
9290
- sourceX: sx,
9291
- sourceY: sy,
9292
- sourcePosition: sourcePos,
9293
- targetX: tx,
9294
- targetY: ty,
9295
- targetPosition: targetPos
9249
+ var Animated = ({
9250
+ id,
9251
+ sourceX,
9252
+ sourceY,
9253
+ targetX,
9254
+ targetY,
9255
+ sourcePosition,
9256
+ targetPosition,
9257
+ markerEnd,
9258
+ style
9259
+ }) => {
9260
+ const [edgePath] = react$2.getSmoothStepPath({
9261
+ sourceX,
9262
+ sourceY,
9263
+ sourcePosition,
9264
+ targetX,
9265
+ targetY,
9266
+ targetPosition,
9267
+ borderRadius: 0
9296
9268
  });
9297
9269
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9298
9270
  /* @__PURE__ */ jsxRuntime.jsx(react$2.BaseEdge, { id, markerEnd, path: edgePath, style }),
@@ -9300,6 +9272,7 @@ var Animated = ({ id, source, target, markerEnd, style }) => {
9300
9272
  ] });
9301
9273
  };
9302
9274
  var Edge = {
9275
+ Strict,
9303
9276
  Temporary,
9304
9277
  Animated
9305
9278
  };
@@ -9316,6 +9289,7 @@ var Panel = (_a) => {
9316
9289
  );
9317
9290
  };
9318
9291
  var edgeTypes = {
9292
+ straight: Edge.Strict,
9319
9293
  animated: Edge.Animated,
9320
9294
  temporary: Edge.Temporary
9321
9295
  };
@@ -10348,9 +10322,12 @@ var WorkflowObservabilityFeature = React3__namespace.memo(
10348
10322
  }
10349
10323
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border p-6 text-muted-foreground text-sm", children: "Select a run to inspect trace, events, and streams." });
10350
10324
  const rootSections = React3__namespace.useMemo(() => {
10325
+ var _a, _b;
10351
10326
  if (!inbox) {
10352
10327
  return null;
10353
10328
  }
10329
+ const inboxDefaultSize = (_a = inbox.defaultSize) != null ? _a : 25;
10330
+ const inboxMinSize = (_b = inbox.minSize) != null ? _b : 25;
10354
10331
  return [
10355
10332
  {
10356
10333
  id: "inbox",
@@ -10367,13 +10344,15 @@ var WorkflowObservabilityFeature = React3__namespace.memo(
10367
10344
  className: "h-full"
10368
10345
  }
10369
10346
  ),
10370
- fixedSize: "16rem"
10347
+ defaultSize: inboxDefaultSize,
10348
+ minSize: inboxMinSize,
10349
+ maxSize: 45
10371
10350
  },
10372
10351
  {
10373
10352
  id: "observability",
10374
10353
  content: observabilityContent,
10375
- defaultSize: 70,
10376
- minSize: 40
10354
+ defaultSize: 100 - inboxDefaultSize,
10355
+ minSize: 50
10377
10356
  }
10378
10357
  ];
10379
10358
  }, [inbox, observabilityContent]);