ai-design-system 0.1.39 → 0.1.41

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.
@@ -97,7 +97,7 @@ function WorkflowCanvasInner({
97
97
  connectionMode={ConnectionMode.Strict}
98
98
  edges={edges}
99
99
  edgeTypes={edgeTypes}
100
- elementsSelectable={interactive}
100
+ elementsSelectable={true}
101
101
  isValidConnection={isValidConnection}
102
102
  nodes={nodes}
103
103
  nodeTypes={nodeTypes}
@@ -106,8 +106,8 @@ function WorkflowCanvasInner({
106
106
  onConnect={interactive ? onConnect : undefined}
107
107
  onConnectEnd={interactive ? onConnectEnd : undefined}
108
108
  onConnectStart={interactive ? onConnectStart : undefined}
109
- onEdgesChange={interactive ? onEdgesChange : undefined}
110
- onNodesChange={interactive ? onNodesChange : undefined}
109
+ onEdgesChange={onEdgesChange}
110
+ onNodesChange={onNodesChange}
111
111
  onPaneClick={onPaneClick}
112
112
  onNodeClick={onNodeClick}
113
113
  onEdgeClick={onEdgeClick}
@@ -102,7 +102,11 @@ export const FileQueue = React.memo<FileQueueProps>(
102
102
  aria-selected={isClickable ? isSelected : undefined}
103
103
  >
104
104
  <div className="flex items-start gap-2">
105
- <Icon name="file" size="sm" className="mt-0.5" />
105
+ <Icon
106
+ name={file.icon || "file"}
107
+ size="sm"
108
+ className={cn("mt-0.5", file.iconColor)}
109
+ />
106
110
  <QueueItemContent>
107
111
  {file.name}
108
112
  {file.path && (
@@ -4,6 +4,8 @@ export interface FileItem {
4
4
  id: string;
5
5
  name: string;
6
6
  path?: string;
7
+ icon?: string;
8
+ iconColor?: string;
7
9
  }
8
10
 
9
11
  export interface FileGroup {
@@ -66,13 +66,12 @@ export const StateNode = memo(({ data, selected, id }: StateNodeProps) => {
66
66
  const isTerminal = data.isTerminal === true;
67
67
 
68
68
  return (
69
- <Node
70
- className={cn(
71
- "relative flex flex-col items-center justify-center border border-border bg-card shadow-none transition-all duration-150 ease-out",
72
- selected && "border-primary border-2",
73
- isTerminal && "border-2 border-primary",
74
- isDisabled && "opacity-50"
75
- )}
69
+ <Node
70
+ className={cn(
71
+ "relative flex flex-col items-center justify-center border border-border bg-card shadow-none transition-all duration-150 ease-out",
72
+ selected ? "border-primary border-2" : "border border-border",
73
+ isDisabled && "opacity-50"
74
+ )}
76
75
  data-testid={`state-node-${id}`}
77
76
  handles={{ target: true, source: true }}
78
77
  status={status}
package/dist/index.cjs CHANGED
@@ -2984,7 +2984,14 @@ var FileQueue = React3__namespace.memo(
2984
2984
  onKeyDown: (e) => handleKeyDown(e, file.id),
2985
2985
  "aria-selected": isClickable ? isSelected : void 0,
2986
2986
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-2", children: [
2987
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "file", size: "sm", className: "mt-0.5" }),
2987
+ /* @__PURE__ */ jsxRuntime.jsx(
2988
+ Icon,
2989
+ {
2990
+ name: file.icon || "file",
2991
+ size: "sm",
2992
+ className: cn("mt-0.5", file.iconColor)
2993
+ }
2994
+ ),
2988
2995
  /* @__PURE__ */ jsxRuntime.jsxs(QueueItemContent, { children: [
2989
2996
  file.name,
2990
2997
  file.path && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground/70", children: [
@@ -8298,14 +8305,13 @@ var StateNode = React3.memo(({ data, selected, id }) => {
8298
8305
  const displayDescription = data.description;
8299
8306
  const status = data.status;
8300
8307
  const isDisabled = data.enabled === false;
8301
- const isTerminal = data.isTerminal === true;
8308
+ data.isTerminal === true;
8302
8309
  return /* @__PURE__ */ jsxRuntime.jsxs(
8303
8310
  Node2,
8304
8311
  {
8305
8312
  className: cn(
8306
8313
  "relative flex flex-col items-center justify-center border border-border bg-card shadow-none transition-all duration-150 ease-out",
8307
- selected && "border-primary border-2",
8308
- isTerminal && "border-2 border-primary",
8314
+ selected ? "border-primary border-2" : "border border-border",
8309
8315
  isDisabled && "opacity-50"
8310
8316
  ),
8311
8317
  "data-testid": `state-node-${id}`,
@@ -9439,7 +9445,7 @@ function WorkflowCanvasInner({
9439
9445
  connectionMode: react.ConnectionMode.Strict,
9440
9446
  edges,
9441
9447
  edgeTypes,
9442
- elementsSelectable: interactive,
9448
+ elementsSelectable: true,
9443
9449
  isValidConnection,
9444
9450
  nodes,
9445
9451
  nodeTypes,
@@ -9448,8 +9454,8 @@ function WorkflowCanvasInner({
9448
9454
  onConnect: interactive ? onConnect : void 0,
9449
9455
  onConnectEnd: interactive ? onConnectEnd : void 0,
9450
9456
  onConnectStart: interactive ? onConnectStart : void 0,
9451
- onEdgesChange: interactive ? onEdgesChange : void 0,
9452
- onNodesChange: interactive ? onNodesChange : void 0,
9457
+ onEdgesChange,
9458
+ onNodesChange,
9453
9459
  onPaneClick,
9454
9460
  onNodeClick,
9455
9461
  onEdgeClick,