ai-design-system 0.1.31 → 0.1.33

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
@@ -982,6 +982,11 @@ var defaultIcons = {
982
982
  viewBox: "0 0 24 24",
983
983
  path: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 00-2.91-.09zM12 15l-3-3a22 22 0 012-3.95A12.88 12.88 0 0122 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 01-4 2z"
984
984
  },
985
+ "play": {
986
+ name: "play",
987
+ viewBox: "0 0 24 24",
988
+ path: "M8 5v14l11-7z"
989
+ },
985
990
  "file-text": {
986
991
  name: "file-text",
987
992
  viewBox: "0 0 24 24",
@@ -8223,7 +8228,7 @@ var Node2 = (_a) => {
8223
8228
  Card,
8224
8229
  __spreadProps(__spreadValues({
8225
8230
  className: cn(
8226
- "node-container relative size-full h-auto w-sm gap-0 rounded-md bg-card p-0 transition-all duration-200",
8231
+ "node-container relative h-[52px] w-[180px] gap-0 overflow-hidden rounded-md bg-card p-0 transition-all duration-200",
8227
8232
  status === "success" && "border-green-500 border-2",
8228
8233
  status === "error" && "border-red-500 border-2",
8229
8234
  className
@@ -8284,7 +8289,7 @@ var StateNode = React3.memo(({ data, selected, id }) => {
8284
8289
  Node2,
8285
8290
  {
8286
8291
  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",
8292
+ "relative flex flex-col items-center justify-center border border-border bg-card shadow-none transition-all duration-150 ease-out",
8288
8293
  selected && "border-primary border-2",
8289
8294
  isTerminal && "border-2 border-primary",
8290
8295
  isDisabled && "opacity-50"
@@ -8295,12 +8300,11 @@ var StateNode = React3.memo(({ data, selected, id }) => {
8295
8300
  children: [
8296
8301
  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
8302
  /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status }),
8298
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 px-3 py-2", children: [
8303
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full items-center justify-center gap-1.5 px-3 py-2", children: [
8299
8304
  /* @__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 })
8305
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 text-center", children: [
8306
+ /* @__PURE__ */ jsxRuntime.jsx(NodeTitle, { className: "line-clamp-2 text-center text-xs font-medium leading-tight", title: displayTitle, children: displayTitle }),
8307
+ displayDescription && /* @__PURE__ */ jsxRuntime.jsx(NodeDescription, { className: "mt-0.5 line-clamp-2 text-center text-[10px] leading-tight", title: displayDescription, children: displayDescription })
8304
8308
  ] })
8305
8309
  ] })
8306
8310
  ]
@@ -8320,7 +8324,7 @@ var TransitionNode = React3.memo(
8320
8324
  Node2,
8321
8325
  {
8322
8326
  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",
8327
+ "flex flex-col items-center justify-center border border-border bg-secondary text-secondary-foreground shadow-none transition-all duration-150 ease-out",
8324
8328
  selected && "border-primary border-2"
8325
8329
  ),
8326
8330
  "data-testid": `transition-node-${id}`,
@@ -8341,11 +8345,11 @@ var TransitionNode = React3.memo(
8341
8345
  ]
8342
8346
  }
8343
8347
  ),
8344
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 px-3 py-2", children: [
8348
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full w-full items-center justify-center gap-1.5 px-3 py-2", children: [
8345
8349
  /* @__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 })
8350
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1 text-center", children: [
8351
+ /* @__PURE__ */ jsxRuntime.jsx(NodeTitle, { className: "line-clamp-2 text-center text-xs font-medium leading-tight", title: displayTitle, children: displayTitle }),
8352
+ displayDescription && /* @__PURE__ */ jsxRuntime.jsx(NodeDescription, { className: "mt-0.5 line-clamp-2 text-center text-[10px] leading-tight", title: displayDescription, children: displayDescription })
8349
8353
  ] })
8350
8354
  ] })
8351
8355
  ]
@@ -8741,7 +8745,7 @@ var WorkflowRunObservabilityDetailsPanel = React3__namespace.memo(
8741
8745
  events.length,
8742
8746
  ")"
8743
8747
  ] }),
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: [
8748
+ /* @__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
8749
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: event.title }),
8746
8750
  event.timestamp ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[#8a8c96]", children: event.timestamp }) : null
8747
8751
  ] }, event.id)) })
@@ -9225,74 +9229,47 @@ var Temporary = ({
9225
9229
  }
9226
9230
  );
9227
9231
  };
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 };
9232
+ var Strict = ({
9233
+ id,
9234
+ sourceX,
9235
+ sourceY,
9236
+ targetX,
9237
+ targetY,
9238
+ sourcePosition,
9239
+ targetPosition,
9240
+ markerEnd,
9241
+ style
9242
+ }) => {
9243
+ const [edgePath] = react$2.getSmoothStepPath({
9244
+ sourceX,
9245
+ sourceY,
9246
+ sourcePosition,
9247
+ targetX,
9248
+ targetY,
9249
+ targetPosition,
9250
+ borderRadius: 0
9251
+ });
9252
+ return /* @__PURE__ */ jsxRuntime.jsx(react$2.BaseEdge, { id, markerEnd, path: edgePath, style });
9278
9253
  };
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
9254
+ var Animated = ({
9255
+ id,
9256
+ sourceX,
9257
+ sourceY,
9258
+ targetX,
9259
+ targetY,
9260
+ sourcePosition,
9261
+ targetPosition,
9262
+ markerEnd,
9263
+ style
9264
+ }) => {
9265
+ const [edgePath] = react$2.getSmoothStepPath({
9266
+ sourceX,
9267
+ sourceY,
9268
+ sourcePosition,
9269
+ targetX,
9270
+ targetY,
9271
+ targetPosition,
9272
+ borderRadius: 0
9296
9273
  });
9297
9274
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9298
9275
  /* @__PURE__ */ jsxRuntime.jsx(react$2.BaseEdge, { id, markerEnd, path: edgePath, style }),
@@ -9300,6 +9277,7 @@ var Animated = ({ id, source, target, markerEnd, style }) => {
9300
9277
  ] });
9301
9278
  };
9302
9279
  var Edge = {
9280
+ Strict,
9303
9281
  Temporary,
9304
9282
  Animated
9305
9283
  };
@@ -9316,6 +9294,7 @@ var Panel = (_a) => {
9316
9294
  );
9317
9295
  };
9318
9296
  var edgeTypes = {
9297
+ straight: Edge.Strict,
9319
9298
  animated: Edge.Animated,
9320
9299
  temporary: Edge.Temporary
9321
9300
  };
@@ -10348,9 +10327,12 @@ var WorkflowObservabilityFeature = React3__namespace.memo(
10348
10327
  }
10349
10328
  ) : /* @__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
10329
  const rootSections = React3__namespace.useMemo(() => {
10330
+ var _a, _b;
10351
10331
  if (!inbox) {
10352
10332
  return null;
10353
10333
  }
10334
+ const inboxDefaultSize = (_a = inbox.defaultSize) != null ? _a : 25;
10335
+ const inboxMinSize = (_b = inbox.minSize) != null ? _b : 25;
10354
10336
  return [
10355
10337
  {
10356
10338
  id: "inbox",
@@ -10367,13 +10349,15 @@ var WorkflowObservabilityFeature = React3__namespace.memo(
10367
10349
  className: "h-full"
10368
10350
  }
10369
10351
  ),
10370
- fixedSize: "16rem"
10352
+ defaultSize: inboxDefaultSize,
10353
+ minSize: inboxMinSize,
10354
+ maxSize: 45
10371
10355
  },
10372
10356
  {
10373
10357
  id: "observability",
10374
10358
  content: observabilityContent,
10375
- defaultSize: 70,
10376
- minSize: 40
10359
+ defaultSize: 100 - inboxDefaultSize,
10360
+ minSize: 50
10377
10361
  }
10378
10362
  ];
10379
10363
  }, [inbox, observabilityContent]);