@foresthubai/workflow-builder 0.4.2 → 0.4.4
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.
- package/LICENSE +661 -661
- package/NOTICE +16 -16
- package/README.md +110 -110
- package/dist/components/ui/command.d.ts +2 -2
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/graph/BaseNode.js +10 -10
- package/dist/graph/reactFlowRegistry.d.ts.map +1 -1
- package/dist/hooks/useWorkflowSerialization.d.ts.map +1 -1
- package/dist/hooks/useWorkflowSerialization.js +8 -11
- package/dist/hooks/useWorkflowSerialization.js.map +1 -1
- package/package.json +2 -2
- package/src/BuilderLayout.tsx +345 -345
- package/src/Canvas.tsx +261 -261
- package/src/CanvasEditor.tsx +142 -142
- package/src/CanvasTabsToolbar.tsx +176 -176
- package/src/RightConfigPanel.tsx +266 -266
- package/src/WorkflowBuilder.tsx +408 -408
- package/src/cn.ts +6 -6
- package/src/components/ui/add-button.tsx +39 -39
- package/src/components/ui/alert-dialog.tsx +141 -141
- package/src/components/ui/alert.tsx +59 -59
- package/src/components/ui/badge.tsx +36 -36
- package/src/components/ui/button.tsx +85 -85
- package/src/components/ui/card.tsx +79 -79
- package/src/components/ui/checkbox.tsx +28 -28
- package/src/components/ui/collapsible.tsx +9 -9
- package/src/components/ui/command.tsx +153 -153
- package/src/components/ui/delete-button.tsx +23 -23
- package/src/components/ui/dialog.tsx +125 -125
- package/src/components/ui/dropdown-menu.tsx +198 -198
- package/src/components/ui/input.tsx +55 -55
- package/src/components/ui/label.tsx +24 -24
- package/src/components/ui/readonly-banner.tsx +15 -15
- package/src/components/ui/resizable.tsx +43 -43
- package/src/components/ui/scroll-area.tsx +102 -102
- package/src/components/ui/select.tsx +160 -160
- package/src/components/ui/separator.tsx +29 -29
- package/src/components/ui/switch.tsx +27 -27
- package/src/components/ui/textarea.tsx +51 -51
- package/src/components/ui/toast.tsx +127 -127
- package/src/components/ui/toaster.tsx +33 -33
- package/src/components/ui/toggle-group.tsx +59 -59
- package/src/components/ui/toggle.tsx +43 -43
- package/src/components/ui/tooltip.tsx +32 -32
- package/src/dialogs/NodePickerDialog.tsx +84 -84
- package/src/dialogs/ValidationDialog.tsx +184 -184
- package/src/graph/BaseNode.tsx +557 -557
- package/src/graph/CustomEdge.tsx +185 -185
- package/src/graph/CustomNode.tsx +16 -16
- package/src/graph/FunctionCallNode.tsx +30 -30
- package/src/graph/PortHandle.tsx +189 -189
- package/src/graph/reactFlowRegistry.ts +26 -26
- package/src/hooks/use-toast.ts +125 -125
- package/src/hooks/useAvailableVariables.ts +20 -20
- package/src/hooks/useCanvasHistory.ts +22 -22
- package/src/hooks/useCanvasTabs.ts +168 -168
- package/src/hooks/useFunctionDiagnosticsSync.ts +40 -40
- package/src/hooks/useFunctionRegistry.ts +26 -26
- package/src/hooks/useFunctions.ts +44 -44
- package/src/hooks/useGraph.ts +161 -161
- package/src/hooks/useNodeDefinitions.ts +82 -82
- package/src/hooks/useParamErrors.ts +26 -26
- package/src/hooks/useResolvedTheme.ts +30 -30
- package/src/hooks/useResourceDiagnosticsSync.ts +58 -58
- package/src/hooks/useSuppressThemeTransition.ts +79 -79
- package/src/hooks/useWorkflowSerialization.ts +141 -144
- package/src/i18n/index.ts +53 -53
- package/src/i18n/locales/de.json +501 -501
- package/src/i18n/locales/en.json +557 -557
- package/src/index.ts +27 -27
- package/src/inputs/ExpressionInput.tsx +297 -297
- package/src/inputs/ParameterEditor.tsx +515 -515
- package/src/inputs/PortSection.tsx +144 -144
- package/src/panels/BuilderSidebar.tsx +301 -301
- package/src/panels/ChannelConfigPanel.tsx +49 -49
- package/src/panels/ChannelsPanel.tsx +28 -28
- package/src/panels/DebugConsolePanel.tsx +73 -73
- package/src/panels/DebugContextPanel.tsx +77 -77
- package/src/panels/DebugExternalIOPanel.tsx +180 -180
- package/src/panels/DiagnosticsPanel.tsx +170 -170
- package/src/panels/EdgeConfigPanel.tsx +104 -104
- package/src/panels/FunctionConfigPanel.tsx +179 -179
- package/src/panels/FunctionListPanel.tsx +45 -45
- package/src/panels/MemoryConfigPanel.tsx +55 -55
- package/src/panels/MemoryPanel.tsx +40 -40
- package/src/panels/ModelConfigPanel.tsx +41 -41
- package/src/panels/ModelsPanel.tsx +36 -36
- package/src/panels/NodeConfigPanel.tsx +630 -630
- package/src/panels/NodeLibrary.tsx +288 -288
- package/src/panels/ResourceConfigPanel.tsx +132 -132
- package/src/panels/ResourceListPanel.tsx +113 -113
- package/src/panels/VariableConfigPanel.tsx +161 -161
- package/src/panels/VariablesPanel.tsx +145 -145
- package/src/stores/canvasStore.test.ts +44 -44
- package/src/stores/canvasStore.ts +245 -245
- package/src/stores/debugStore.ts +74 -74
- package/src/stores/diagnosticsStore.ts +130 -130
- package/src/stores/editorStore.ts +190 -190
- package/src/styles/index.css +526 -526
- package/src/utils/categoryConstants.ts +26 -26
- package/src/utils/channelOperations.ts +86 -86
- package/src/utils/connectionRules.ts +137 -137
- package/src/utils/functionOperations.ts +179 -179
- package/src/utils/graphOperations.ts +550 -550
- package/src/utils/history.ts +207 -207
- package/src/utils/memoryOperations.ts +57 -57
- package/src/utils/migrateFunctionNodes.ts +107 -107
- package/src/utils/modelOperations.ts +55 -55
- package/src/utils/paramDisplay.ts +71 -71
- package/src/utils/resourceHelpers.ts +32 -32
- package/src/utils/translation.ts +28 -28
- package/src/utils/variableOperations.ts +75 -75
- package/tailwind-preset.ts +166 -166
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -6
- package/dist/lib/utils.js.map +0 -1
- package/dist/toolbars/CanvasTabsToolbar.d.ts +0 -11
- package/dist/toolbars/CanvasTabsToolbar.d.ts.map +0 -1
- package/dist/toolbars/CanvasTabsToolbar.js +0 -101
- package/dist/toolbars/CanvasTabsToolbar.js.map +0 -1
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { declaredVarKey, type DeclaredVariable } from "@foresthubai/workflow-core/variable";
|
|
2
|
-
import type { DataType } from "@foresthubai/workflow-core";
|
|
3
|
-
import { getOrCreateCanvasStore } from "../stores/canvasStore";
|
|
4
|
-
import { useEditorStore } from "../stores/editorStore";
|
|
5
|
-
import { generateId } from "@foresthubai/workflow-core/id";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Per-canvas mutation helpers for declared variables. Mirrors
|
|
9
|
-
* utils/modelOperations.ts, but declared variables are canvas-scoped (they live
|
|
10
|
-
* in canvasStore.variables, not editorStore), so every helper takes a canvasId.
|
|
11
|
-
*
|
|
12
|
-
* Each write takes a history checkpoint first, matching the inline editor it
|
|
13
|
-
* replaces, so a single edit is one undo step.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/** Pick a fresh `var<N>` name that doesn't collide with existing declared variables. */
|
|
17
|
-
function nextDefaultName(existingNames: string[]): string {
|
|
18
|
-
let counter = 1;
|
|
19
|
-
while (existingNames.includes(`var${counter}`)) counter++;
|
|
20
|
-
return `var${counter}`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/** Create a new declared variable on the given canvas. Returns its uid. */
|
|
24
|
-
export function addDeclaredVariable(canvasId: string): string {
|
|
25
|
-
const store = getOrCreateCanvasStore(canvasId);
|
|
26
|
-
store.takeCheckpoint();
|
|
27
|
-
const existingNames = Object.values(store.getState().variables)
|
|
28
|
-
.filter((v): v is DeclaredVariable => v.kind === "declared")
|
|
29
|
-
.map((v) => v.name);
|
|
30
|
-
const uid = generateId();
|
|
31
|
-
const newVar: DeclaredVariable = {
|
|
32
|
-
kind: "declared",
|
|
33
|
-
uid,
|
|
34
|
-
name: nextDefaultName(existingNames),
|
|
35
|
-
dataType: "int",
|
|
36
|
-
};
|
|
37
|
-
store.getState().setVariables((vars) => ({ ...vars, [declaredVarKey(uid)]: newVar }));
|
|
38
|
-
return uid;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/** Apply a partial patch to a declared variable. `kind`/`uid` are fixed. */
|
|
42
|
-
export function updateDeclaredVariable(canvasId: string, uid: string, updates: Partial<Omit<DeclaredVariable, "kind" | "uid">>): void {
|
|
43
|
-
const store = getOrCreateCanvasStore(canvasId);
|
|
44
|
-
store.takeCheckpoint();
|
|
45
|
-
const key = declaredVarKey(uid);
|
|
46
|
-
store.getState().setVariables((vars) => {
|
|
47
|
-
const existing = vars[key];
|
|
48
|
-
if (!existing || existing.kind !== "declared") return vars;
|
|
49
|
-
return { ...vars, [key]: { ...existing, ...updates } };
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Change a declared variable's dataType. The previous initialValue is dropped —
|
|
55
|
-
* a value entered for one type rarely makes sense for another, so we reset
|
|
56
|
-
* rather than attempt a lossy coercion.
|
|
57
|
-
*/
|
|
58
|
-
export function setDeclaredVariableType(canvasId: string, uid: string, dataType: DataType): void {
|
|
59
|
-
updateDeclaredVariable(canvasId, uid, { dataType, initialValue: undefined });
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/** Delete a declared variable and clear its selection if it was open. */
|
|
63
|
-
export function deleteDeclaredVariable(canvasId: string, uid: string): void {
|
|
64
|
-
const store = getOrCreateCanvasStore(canvasId);
|
|
65
|
-
store.takeCheckpoint();
|
|
66
|
-
const key = declaredVarKey(uid);
|
|
67
|
-
store.getState().setVariables((vars) => {
|
|
68
|
-
const { [key]: _drop, ...rest } = vars;
|
|
69
|
-
return rest;
|
|
70
|
-
});
|
|
71
|
-
const sel = useEditorStore.getState().selection;
|
|
72
|
-
if (sel.kind === "variable" && sel.uid === uid) {
|
|
73
|
-
useEditorStore.getState().clearSelection();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
1
|
+
import { declaredVarKey, type DeclaredVariable } from "@foresthubai/workflow-core/variable";
|
|
2
|
+
import type { DataType } from "@foresthubai/workflow-core";
|
|
3
|
+
import { getOrCreateCanvasStore } from "../stores/canvasStore";
|
|
4
|
+
import { useEditorStore } from "../stores/editorStore";
|
|
5
|
+
import { generateId } from "@foresthubai/workflow-core/id";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Per-canvas mutation helpers for declared variables. Mirrors
|
|
9
|
+
* utils/modelOperations.ts, but declared variables are canvas-scoped (they live
|
|
10
|
+
* in canvasStore.variables, not editorStore), so every helper takes a canvasId.
|
|
11
|
+
*
|
|
12
|
+
* Each write takes a history checkpoint first, matching the inline editor it
|
|
13
|
+
* replaces, so a single edit is one undo step.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** Pick a fresh `var<N>` name that doesn't collide with existing declared variables. */
|
|
17
|
+
function nextDefaultName(existingNames: string[]): string {
|
|
18
|
+
let counter = 1;
|
|
19
|
+
while (existingNames.includes(`var${counter}`)) counter++;
|
|
20
|
+
return `var${counter}`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Create a new declared variable on the given canvas. Returns its uid. */
|
|
24
|
+
export function addDeclaredVariable(canvasId: string): string {
|
|
25
|
+
const store = getOrCreateCanvasStore(canvasId);
|
|
26
|
+
store.takeCheckpoint();
|
|
27
|
+
const existingNames = Object.values(store.getState().variables)
|
|
28
|
+
.filter((v): v is DeclaredVariable => v.kind === "declared")
|
|
29
|
+
.map((v) => v.name);
|
|
30
|
+
const uid = generateId();
|
|
31
|
+
const newVar: DeclaredVariable = {
|
|
32
|
+
kind: "declared",
|
|
33
|
+
uid,
|
|
34
|
+
name: nextDefaultName(existingNames),
|
|
35
|
+
dataType: "int",
|
|
36
|
+
};
|
|
37
|
+
store.getState().setVariables((vars) => ({ ...vars, [declaredVarKey(uid)]: newVar }));
|
|
38
|
+
return uid;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Apply a partial patch to a declared variable. `kind`/`uid` are fixed. */
|
|
42
|
+
export function updateDeclaredVariable(canvasId: string, uid: string, updates: Partial<Omit<DeclaredVariable, "kind" | "uid">>): void {
|
|
43
|
+
const store = getOrCreateCanvasStore(canvasId);
|
|
44
|
+
store.takeCheckpoint();
|
|
45
|
+
const key = declaredVarKey(uid);
|
|
46
|
+
store.getState().setVariables((vars) => {
|
|
47
|
+
const existing = vars[key];
|
|
48
|
+
if (!existing || existing.kind !== "declared") return vars;
|
|
49
|
+
return { ...vars, [key]: { ...existing, ...updates } };
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Change a declared variable's dataType. The previous initialValue is dropped —
|
|
55
|
+
* a value entered for one type rarely makes sense for another, so we reset
|
|
56
|
+
* rather than attempt a lossy coercion.
|
|
57
|
+
*/
|
|
58
|
+
export function setDeclaredVariableType(canvasId: string, uid: string, dataType: DataType): void {
|
|
59
|
+
updateDeclaredVariable(canvasId, uid, { dataType, initialValue: undefined });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Delete a declared variable and clear its selection if it was open. */
|
|
63
|
+
export function deleteDeclaredVariable(canvasId: string, uid: string): void {
|
|
64
|
+
const store = getOrCreateCanvasStore(canvasId);
|
|
65
|
+
store.takeCheckpoint();
|
|
66
|
+
const key = declaredVarKey(uid);
|
|
67
|
+
store.getState().setVariables((vars) => {
|
|
68
|
+
const { [key]: _drop, ...rest } = vars;
|
|
69
|
+
return rest;
|
|
70
|
+
});
|
|
71
|
+
const sel = useEditorStore.getState().selection;
|
|
72
|
+
if (sel.kind === "variable" && sel.uid === uid) {
|
|
73
|
+
useEditorStore.getState().clearSelection();
|
|
74
|
+
}
|
|
75
|
+
}
|
package/tailwind-preset.ts
CHANGED
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
import type { Config } from "tailwindcss";
|
|
2
|
-
import animate from "tailwindcss-animate";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Tailwind preset for @foresthubai/workflow-builder.
|
|
6
|
-
*
|
|
7
|
-
* This is the single source of truth that binds the design-system tokens
|
|
8
|
-
* defined in `src/styles/index.css` (raw HSL triplets like `--primary`) to the
|
|
9
|
-
* Tailwind utility classes the builder's components reference (`bg-primary`,
|
|
10
|
-
* `text-muted-foreground`, `border-border`, `bg-node-agent`, …). It also ships
|
|
11
|
-
* the `darkMode` strategy, the accordion keyframes, and the
|
|
12
|
-
* `tailwindcss-animate` plugin that the builder's shadcn components depend on.
|
|
13
|
-
*
|
|
14
|
-
* Any consumer embedding the builder must:
|
|
15
|
-
* 1. spread this preset: `presets: [workflowBuilderPreset]`
|
|
16
|
-
* 2. import the tokens once: `import "@foresthubai/workflow-builder/styles/index.css"`
|
|
17
|
-
* 3. add the builder to their Tailwind `content` so its classes are emitted
|
|
18
|
-
* (a glob over its built JS under node_modules/@foresthubai/workflow-builder,
|
|
19
|
-
* or, when consuming source as this monorepo does, the builder's src tree).
|
|
20
|
-
*
|
|
21
|
-
* `content` is intentionally NOT part of the preset: its globs are
|
|
22
|
-
* consumer-relative (source tree in this monorepo, node_modules in a published
|
|
23
|
-
* install), so each consumer owns that path.
|
|
24
|
-
*/
|
|
25
|
-
const preset: Omit<Config, "content"> = {
|
|
26
|
-
darkMode: ["class"],
|
|
27
|
-
theme: {
|
|
28
|
-
extend: {
|
|
29
|
-
fontFamily: {
|
|
30
|
-
// The builder's base body face (applied on the .fh-builder root)
|
|
31
|
-
// and its display/heading face. Defined here so `font-sans`/`font-heading`
|
|
32
|
-
// resolve to the builder's type even in portaled content (dialogs, menus)
|
|
33
|
-
// that renders outside the root and can't inherit the root's font.
|
|
34
|
-
sans: ["Poppins", "system-ui", "sans-serif"],
|
|
35
|
-
heading: ["Inter", "system-ui", "sans-serif"],
|
|
36
|
-
},
|
|
37
|
-
colors: {
|
|
38
|
-
// ───────────────────────────────────────────────────────────
|
|
39
|
-
// GENERAL UI — surfaces, text, controls. Reusable by host apps.
|
|
40
|
-
// ───────────────────────────────────────────────────────────
|
|
41
|
-
|
|
42
|
-
// Surfaces & controls
|
|
43
|
-
border: "hsl(var(--border))",
|
|
44
|
-
input: "hsl(var(--border))",
|
|
45
|
-
ring: "hsl(var(--ring))",
|
|
46
|
-
background: "hsl(var(--background))",
|
|
47
|
-
foreground: "hsl(var(--foreground))",
|
|
48
|
-
field: "hsl(var(--field))",
|
|
49
|
-
overlay: "hsl(var(--overlay))",
|
|
50
|
-
|
|
51
|
-
primary: {
|
|
52
|
-
DEFAULT: "hsl(var(--primary))",
|
|
53
|
-
foreground: "hsl(var(--primary-foreground))",
|
|
54
|
-
glow: "hsl(var(--primary-glow))",
|
|
55
|
-
},
|
|
56
|
-
secondary: {
|
|
57
|
-
DEFAULT: "hsl(var(--secondary))",
|
|
58
|
-
foreground: "hsl(var(--secondary-foreground))",
|
|
59
|
-
},
|
|
60
|
-
destructive: {
|
|
61
|
-
DEFAULT: "hsl(var(--destructive))",
|
|
62
|
-
foreground: "hsl(var(--destructive-foreground))",
|
|
63
|
-
},
|
|
64
|
-
muted: {
|
|
65
|
-
DEFAULT: "hsl(var(--muted))",
|
|
66
|
-
foreground: "hsl(var(--muted-foreground))",
|
|
67
|
-
},
|
|
68
|
-
accent: {
|
|
69
|
-
DEFAULT: "hsl(var(--accent))",
|
|
70
|
-
foreground: "hsl(var(--accent-foreground))",
|
|
71
|
-
},
|
|
72
|
-
popover: {
|
|
73
|
-
DEFAULT: "hsl(var(--popover))",
|
|
74
|
-
foreground: "hsl(var(--popover-foreground))",
|
|
75
|
-
},
|
|
76
|
-
card: {
|
|
77
|
-
DEFAULT: "hsl(var(--card))",
|
|
78
|
-
foreground: "hsl(var(--card-foreground))",
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
// Status
|
|
82
|
-
success: {
|
|
83
|
-
DEFAULT: "hsl(var(--success))",
|
|
84
|
-
foreground: "hsl(var(--success-foreground))",
|
|
85
|
-
},
|
|
86
|
-
warning: {
|
|
87
|
-
DEFAULT: "hsl(var(--warning))",
|
|
88
|
-
foreground: "hsl(var(--warning-foreground))",
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
// Sidebar
|
|
92
|
-
sidebar: {
|
|
93
|
-
DEFAULT: "hsl(var(--sidebar-background))",
|
|
94
|
-
foreground: "hsl(var(--sidebar-foreground))",
|
|
95
|
-
primary: "hsl(var(--sidebar-primary))",
|
|
96
|
-
"primary-foreground": "hsl(var(--sidebar-primary-foreground))",
|
|
97
|
-
accent: "hsl(var(--sidebar-accent))",
|
|
98
|
-
"accent-foreground": "hsl(var(--sidebar-accent-foreground))",
|
|
99
|
-
border: "hsl(var(--sidebar-border))",
|
|
100
|
-
ring: "hsl(var(--sidebar-ring))",
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
// ───────────────────────────────────────────────────────────
|
|
104
|
-
// BUILDER / GRAPH ONLY — canvas, edges, node categories.
|
|
105
|
-
// Host apps embedding the builder don't reference these.
|
|
106
|
-
// ───────────────────────────────────────────────────────────
|
|
107
|
-
canvas: {
|
|
108
|
-
bg: "hsl(var(--canvas-background))",
|
|
109
|
-
},
|
|
110
|
-
panel: {
|
|
111
|
-
background: "hsl(var(--panel-background))",
|
|
112
|
-
border: "hsl(var(--panel-border))",
|
|
113
|
-
},
|
|
114
|
-
edge: {
|
|
115
|
-
default: "hsl(var(--edge-default))",
|
|
116
|
-
},
|
|
117
|
-
"selection-glow": "hsl(var(--selection-glow))",
|
|
118
|
-
|
|
119
|
-
// Node category signals
|
|
120
|
-
node: {
|
|
121
|
-
agent: "hsl(var(--node-agent))",
|
|
122
|
-
input: "hsl(var(--node-input))",
|
|
123
|
-
output: "hsl(var(--node-output))",
|
|
124
|
-
trigger: "hsl(var(--node-trigger))",
|
|
125
|
-
logic: "hsl(var(--node-logic))",
|
|
126
|
-
data: "hsl(var(--node-data))",
|
|
127
|
-
tool: "hsl(var(--node-tool))",
|
|
128
|
-
function: "hsl(var(--node-function))",
|
|
129
|
-
shadow: "hsl(var(--node-shadow))",
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
borderRadius: {
|
|
133
|
-
lg: "var(--radius)",
|
|
134
|
-
md: "calc(var(--radius) - 2px)",
|
|
135
|
-
sm: "calc(var(--radius) - 4px)",
|
|
136
|
-
},
|
|
137
|
-
backgroundImage: {
|
|
138
|
-
"gradient-subtle": "var(--gradient-subtle)",
|
|
139
|
-
"gradient-glass": "var(--gradient-glass)",
|
|
140
|
-
},
|
|
141
|
-
boxShadow: {
|
|
142
|
-
sm: "var(--shadow-sm)",
|
|
143
|
-
md: "var(--shadow-md)",
|
|
144
|
-
lg: "var(--shadow-lg)",
|
|
145
|
-
glow: "var(--shadow-glow)",
|
|
146
|
-
},
|
|
147
|
-
keyframes: {
|
|
148
|
-
"accordion-down": {
|
|
149
|
-
from: { height: "0" },
|
|
150
|
-
to: { height: "var(--radix-accordion-content-height)" },
|
|
151
|
-
},
|
|
152
|
-
"accordion-up": {
|
|
153
|
-
from: { height: "var(--radix-accordion-content-height)" },
|
|
154
|
-
to: { height: "0" },
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
animation: {
|
|
158
|
-
"accordion-down": "accordion-down 0.2s ease-out",
|
|
159
|
-
"accordion-up": "accordion-up 0.2s ease-out",
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
plugins: [animate],
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export default preset;
|
|
1
|
+
import type { Config } from "tailwindcss";
|
|
2
|
+
import animate from "tailwindcss-animate";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Tailwind preset for @foresthubai/workflow-builder.
|
|
6
|
+
*
|
|
7
|
+
* This is the single source of truth that binds the design-system tokens
|
|
8
|
+
* defined in `src/styles/index.css` (raw HSL triplets like `--primary`) to the
|
|
9
|
+
* Tailwind utility classes the builder's components reference (`bg-primary`,
|
|
10
|
+
* `text-muted-foreground`, `border-border`, `bg-node-agent`, …). It also ships
|
|
11
|
+
* the `darkMode` strategy, the accordion keyframes, and the
|
|
12
|
+
* `tailwindcss-animate` plugin that the builder's shadcn components depend on.
|
|
13
|
+
*
|
|
14
|
+
* Any consumer embedding the builder must:
|
|
15
|
+
* 1. spread this preset: `presets: [workflowBuilderPreset]`
|
|
16
|
+
* 2. import the tokens once: `import "@foresthubai/workflow-builder/styles/index.css"`
|
|
17
|
+
* 3. add the builder to their Tailwind `content` so its classes are emitted
|
|
18
|
+
* (a glob over its built JS under node_modules/@foresthubai/workflow-builder,
|
|
19
|
+
* or, when consuming source as this monorepo does, the builder's src tree).
|
|
20
|
+
*
|
|
21
|
+
* `content` is intentionally NOT part of the preset: its globs are
|
|
22
|
+
* consumer-relative (source tree in this monorepo, node_modules in a published
|
|
23
|
+
* install), so each consumer owns that path.
|
|
24
|
+
*/
|
|
25
|
+
const preset: Omit<Config, "content"> = {
|
|
26
|
+
darkMode: ["class"],
|
|
27
|
+
theme: {
|
|
28
|
+
extend: {
|
|
29
|
+
fontFamily: {
|
|
30
|
+
// The builder's base body face (applied on the .fh-builder root)
|
|
31
|
+
// and its display/heading face. Defined here so `font-sans`/`font-heading`
|
|
32
|
+
// resolve to the builder's type even in portaled content (dialogs, menus)
|
|
33
|
+
// that renders outside the root and can't inherit the root's font.
|
|
34
|
+
sans: ["Poppins", "system-ui", "sans-serif"],
|
|
35
|
+
heading: ["Inter", "system-ui", "sans-serif"],
|
|
36
|
+
},
|
|
37
|
+
colors: {
|
|
38
|
+
// ───────────────────────────────────────────────────────────
|
|
39
|
+
// GENERAL UI — surfaces, text, controls. Reusable by host apps.
|
|
40
|
+
// ───────────────────────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
// Surfaces & controls
|
|
43
|
+
border: "hsl(var(--border))",
|
|
44
|
+
input: "hsl(var(--border))",
|
|
45
|
+
ring: "hsl(var(--ring))",
|
|
46
|
+
background: "hsl(var(--background))",
|
|
47
|
+
foreground: "hsl(var(--foreground))",
|
|
48
|
+
field: "hsl(var(--field))",
|
|
49
|
+
overlay: "hsl(var(--overlay))",
|
|
50
|
+
|
|
51
|
+
primary: {
|
|
52
|
+
DEFAULT: "hsl(var(--primary))",
|
|
53
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
54
|
+
glow: "hsl(var(--primary-glow))",
|
|
55
|
+
},
|
|
56
|
+
secondary: {
|
|
57
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
58
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
59
|
+
},
|
|
60
|
+
destructive: {
|
|
61
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
62
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
63
|
+
},
|
|
64
|
+
muted: {
|
|
65
|
+
DEFAULT: "hsl(var(--muted))",
|
|
66
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
67
|
+
},
|
|
68
|
+
accent: {
|
|
69
|
+
DEFAULT: "hsl(var(--accent))",
|
|
70
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
71
|
+
},
|
|
72
|
+
popover: {
|
|
73
|
+
DEFAULT: "hsl(var(--popover))",
|
|
74
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
75
|
+
},
|
|
76
|
+
card: {
|
|
77
|
+
DEFAULT: "hsl(var(--card))",
|
|
78
|
+
foreground: "hsl(var(--card-foreground))",
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
// Status
|
|
82
|
+
success: {
|
|
83
|
+
DEFAULT: "hsl(var(--success))",
|
|
84
|
+
foreground: "hsl(var(--success-foreground))",
|
|
85
|
+
},
|
|
86
|
+
warning: {
|
|
87
|
+
DEFAULT: "hsl(var(--warning))",
|
|
88
|
+
foreground: "hsl(var(--warning-foreground))",
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// Sidebar
|
|
92
|
+
sidebar: {
|
|
93
|
+
DEFAULT: "hsl(var(--sidebar-background))",
|
|
94
|
+
foreground: "hsl(var(--sidebar-foreground))",
|
|
95
|
+
primary: "hsl(var(--sidebar-primary))",
|
|
96
|
+
"primary-foreground": "hsl(var(--sidebar-primary-foreground))",
|
|
97
|
+
accent: "hsl(var(--sidebar-accent))",
|
|
98
|
+
"accent-foreground": "hsl(var(--sidebar-accent-foreground))",
|
|
99
|
+
border: "hsl(var(--sidebar-border))",
|
|
100
|
+
ring: "hsl(var(--sidebar-ring))",
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
// ───────────────────────────────────────────────────────────
|
|
104
|
+
// BUILDER / GRAPH ONLY — canvas, edges, node categories.
|
|
105
|
+
// Host apps embedding the builder don't reference these.
|
|
106
|
+
// ───────────────────────────────────────────────────────────
|
|
107
|
+
canvas: {
|
|
108
|
+
bg: "hsl(var(--canvas-background))",
|
|
109
|
+
},
|
|
110
|
+
panel: {
|
|
111
|
+
background: "hsl(var(--panel-background))",
|
|
112
|
+
border: "hsl(var(--panel-border))",
|
|
113
|
+
},
|
|
114
|
+
edge: {
|
|
115
|
+
default: "hsl(var(--edge-default))",
|
|
116
|
+
},
|
|
117
|
+
"selection-glow": "hsl(var(--selection-glow))",
|
|
118
|
+
|
|
119
|
+
// Node category signals
|
|
120
|
+
node: {
|
|
121
|
+
agent: "hsl(var(--node-agent))",
|
|
122
|
+
input: "hsl(var(--node-input))",
|
|
123
|
+
output: "hsl(var(--node-output))",
|
|
124
|
+
trigger: "hsl(var(--node-trigger))",
|
|
125
|
+
logic: "hsl(var(--node-logic))",
|
|
126
|
+
data: "hsl(var(--node-data))",
|
|
127
|
+
tool: "hsl(var(--node-tool))",
|
|
128
|
+
function: "hsl(var(--node-function))",
|
|
129
|
+
shadow: "hsl(var(--node-shadow))",
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
borderRadius: {
|
|
133
|
+
lg: "var(--radius)",
|
|
134
|
+
md: "calc(var(--radius) - 2px)",
|
|
135
|
+
sm: "calc(var(--radius) - 4px)",
|
|
136
|
+
},
|
|
137
|
+
backgroundImage: {
|
|
138
|
+
"gradient-subtle": "var(--gradient-subtle)",
|
|
139
|
+
"gradient-glass": "var(--gradient-glass)",
|
|
140
|
+
},
|
|
141
|
+
boxShadow: {
|
|
142
|
+
sm: "var(--shadow-sm)",
|
|
143
|
+
md: "var(--shadow-md)",
|
|
144
|
+
lg: "var(--shadow-lg)",
|
|
145
|
+
glow: "var(--shadow-glow)",
|
|
146
|
+
},
|
|
147
|
+
keyframes: {
|
|
148
|
+
"accordion-down": {
|
|
149
|
+
from: { height: "0" },
|
|
150
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
151
|
+
},
|
|
152
|
+
"accordion-up": {
|
|
153
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
154
|
+
to: { height: "0" },
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
animation: {
|
|
158
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
159
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
plugins: [animate],
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export default preset;
|
package/dist/lib/utils.d.ts
DELETED
package/dist/lib/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/lib/utils.js
DELETED
package/dist/lib/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAExC,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACxC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAC9B,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CanvasTab } from "../hooks/useCanvasTabs";
|
|
2
|
-
interface CanvasTabsToolbarProps {
|
|
3
|
-
tabs: CanvasTab[];
|
|
4
|
-
activeTabId: string;
|
|
5
|
-
onTabChange: (tabId: string) => void;
|
|
6
|
-
onTabClose: (tabId: string) => void;
|
|
7
|
-
onTabReorder: (fromIndex: number, toIndex: number) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const CanvasTabsToolbar: ({ tabs, activeTabId, onTabChange, onTabClose, onTabReorder, }: CanvasTabsToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=CanvasTabsToolbar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasTabsToolbar.d.ts","sourceRoot":"","sources":["../../src/toolbars/CanvasTabsToolbar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,UAAU,sBAAsB;IAC9B,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,iBAAiB,GAAI,+DAM/B,sBAAsB,4CA0JxB,CAAC"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ScrollArea } from "../components/ui/scroll-area";
|
|
3
|
-
import { cn } from "../lib/utils";
|
|
4
|
-
import { FunctionSquare, Workflow, X } from "lucide-react";
|
|
5
|
-
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
6
|
-
import { MAIN_CANVAS_ID } from "../stores/canvasStore";
|
|
7
|
-
export const CanvasTabsToolbar = ({ tabs, activeTabId, onTabChange, onTabClose, onTabReorder, }) => {
|
|
8
|
-
const containerRef = useRef(null);
|
|
9
|
-
const viewportRef = useRef(null);
|
|
10
|
-
const dragIndex = useRef(null);
|
|
11
|
-
// Translate vertical mouse-wheel deltas into horizontal scroll on the tabs
|
|
12
|
-
// viewport. A non-passive native listener is required because React's
|
|
13
|
-
// synthetic onWheel is passive — preventDefault() there is a no-op, so the
|
|
14
|
-
// page would also scroll vertically alongside the toolbar shift. We leave
|
|
15
|
-
// genuine horizontal wheels (touchpads, tilt wheels) alone by gating on
|
|
16
|
-
// deltaY, and skip the override entirely when there's nothing to scroll
|
|
17
|
-
// so vertical-page scrolling still works when the pointer happens to
|
|
18
|
-
// hover an unfilled toolbar.
|
|
19
|
-
useEffect(() => {
|
|
20
|
-
const el = viewportRef.current;
|
|
21
|
-
if (!el)
|
|
22
|
-
return;
|
|
23
|
-
const handler = (e) => {
|
|
24
|
-
if (e.deltaY === 0)
|
|
25
|
-
return;
|
|
26
|
-
if (el.scrollWidth <= el.clientWidth)
|
|
27
|
-
return;
|
|
28
|
-
e.preventDefault();
|
|
29
|
-
el.scrollLeft += e.deltaY;
|
|
30
|
-
};
|
|
31
|
-
el.addEventListener("wheel", handler, { passive: false });
|
|
32
|
-
return () => el.removeEventListener("wheel", handler);
|
|
33
|
-
}, []);
|
|
34
|
-
// dropSlot: insertion index (before which tab the dragged tab lands)
|
|
35
|
-
const [dropSlot, setDropSlot] = useState(null);
|
|
36
|
-
// indicatorX: pixel offset from container left for the visual line
|
|
37
|
-
const [indicatorX, setIndicatorX] = useState(null);
|
|
38
|
-
const isMainTab = (index) => tabs[index]?.id === MAIN_CANVAS_ID;
|
|
39
|
-
const clearDrag = useCallback(() => {
|
|
40
|
-
dragIndex.current = null;
|
|
41
|
-
setDropSlot(null);
|
|
42
|
-
setIndicatorX(null);
|
|
43
|
-
}, []);
|
|
44
|
-
const handleTabDragOver = useCallback((e, index) => {
|
|
45
|
-
if (dragIndex.current === null || !containerRef.current)
|
|
46
|
-
return;
|
|
47
|
-
// Ignore Main tab entirely — not a valid drag target
|
|
48
|
-
if (tabs[index]?.id === MAIN_CANVAS_ID)
|
|
49
|
-
return;
|
|
50
|
-
e.preventDefault();
|
|
51
|
-
e.stopPropagation();
|
|
52
|
-
e.dataTransfer.dropEffect = "move";
|
|
53
|
-
const rect = e.currentTarget.getBoundingClientRect();
|
|
54
|
-
const containerRect = containerRef.current.getBoundingClientRect();
|
|
55
|
-
const midX = rect.left + rect.width / 2;
|
|
56
|
-
const isLeftHalf = e.clientX < midX;
|
|
57
|
-
// Slot: insertion index
|
|
58
|
-
const slot = isLeftHalf ? index : index + 1;
|
|
59
|
-
// Tabs are now flush with a 1px separator between them — land the indicator on that seam.
|
|
60
|
-
const raw = isLeftHalf ? rect.left - containerRect.left : rect.right - containerRect.left;
|
|
61
|
-
// Clamp so the indicator stays fully visible inside the container
|
|
62
|
-
const x = Math.round(Math.max(0, Math.min(raw, containerRef.current.clientWidth - 2)));
|
|
63
|
-
setDropSlot(slot);
|
|
64
|
-
setIndicatorX(x);
|
|
65
|
-
}, [tabs]);
|
|
66
|
-
return (
|
|
67
|
-
// ScrollArea provides the horizontal overlay scrollbar (hover-only, in the
|
|
68
|
-
// panel gutter so the tab row doesn't shift). The Root carries the bg +
|
|
69
|
-
// bottom border; the inner div inside the Viewport stays the drag/drop
|
|
70
|
-
// container — containerRef points at it so the indicator's coordinates
|
|
71
|
-
// remain relative to the (scrollable) tab row, not the fixed Root.
|
|
72
|
-
_jsx(ScrollArea, { className: "bg-card/80 border-b border-border/50", viewportRef: viewportRef, children: _jsxs("div", { ref: containerRef, className: "relative flex items-stretch", onDragOver: (e) => {
|
|
73
|
-
// Fallback for empty area past last tab
|
|
74
|
-
if (dragIndex.current === null || !containerRef.current)
|
|
75
|
-
return;
|
|
76
|
-
e.preventDefault();
|
|
77
|
-
e.dataTransfer.dropEffect = "move";
|
|
78
|
-
}, onDrop: (e) => {
|
|
79
|
-
e.preventDefault();
|
|
80
|
-
if (dragIndex.current !== null && dropSlot !== null) {
|
|
81
|
-
const from = dragIndex.current;
|
|
82
|
-
const target = dropSlot > from ? dropSlot - 1 : dropSlot;
|
|
83
|
-
if (target > 0 && target !== from) {
|
|
84
|
-
onTabReorder(from, target);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
clearDrag();
|
|
88
|
-
}, children: [indicatorX !== null && (_jsx("div", { className: "absolute top-0 bottom-0 bg-primary z-10 pointer-events-none", style: { left: 0, width: "2px", transform: `translateX(${indicatorX}px)` } })), tabs.map((tab, index) => {
|
|
89
|
-
const isDraggable = !isMainTab(index);
|
|
90
|
-
return (_jsxs(React.Fragment, { children: [index > 0 && _jsx("div", { className: "w-px bg-border/70 shrink-0" }), _jsxs("div", { draggable: isDraggable, onDragStart: (e) => {
|
|
91
|
-
if (!isDraggable)
|
|
92
|
-
return;
|
|
93
|
-
dragIndex.current = index;
|
|
94
|
-
e.dataTransfer.effectAllowed = "move";
|
|
95
|
-
}, onDragOver: (e) => handleTabDragOver(e, index), onDragEnd: clearDrag, className: cn("group flex items-center gap-1.5 pl-2 pr-1 text-sm font-medium cursor-pointer transition-colors", "hover:bg-field/80", activeTabId === tab.id ? "bg-field text-foreground" : "text-muted-foreground hover:text-foreground", isDraggable ? "cursor-grab active:cursor-grabbing" : "select-none"), onClick: () => onTabChange(tab.id), children: [isMainTab(index) ? (_jsx(Workflow, { className: "w-3.5 h-3.5 shrink-0" })) : (_jsx(FunctionSquare, { className: "w-3.5 h-3.5 shrink-0" })), _jsx("span", { className: "truncate max-w-[120px] py-1", children: tab.label }), tab.id !== MAIN_CANVAS_ID ? (_jsx("button", { type: "button", "aria-label": `Close tab ${tab.label}`, title: `Close tab ${tab.label}`, className: "flex items-center justify-center w-4 h-4 shrink-0 rounded opacity-0 group-hover:opacity-100 transition-opacity hover:bg-destructive/15 hover:text-destructive", onClick: (e) => {
|
|
96
|
-
e.stopPropagation();
|
|
97
|
-
onTabClose(tab.id);
|
|
98
|
-
}, children: _jsx(X, { className: "w-3.5 h-3.5" }) })) : (_jsx("span", { className: "w-1 shrink-0" }))] })] }, tab.id));
|
|
99
|
-
})] }) }));
|
|
100
|
-
};
|
|
101
|
-
//# sourceMappingURL=CanvasTabsToolbar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasTabsToolbar.js","sourceRoot":"","sources":["../../src/toolbars/CanvasTabsToolbar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAUvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,IAAI,EACJ,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,GACW,EAAE,EAAE;IAC3B,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACjD,MAAM,SAAS,GAAG,MAAM,CAAgB,IAAI,CAAC,CAAC;IAE9C,2EAA2E;IAC3E,sEAAsE;IACtE,2EAA2E;IAC3E,0EAA0E;IAC1E,wEAAwE;IACxE,wEAAwE;IACxE,qEAAqE;IACrE,6BAA6B;IAC7B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC;QAC/B,IAAI,CAAC,EAAE;YAAE,OAAO;QAChB,MAAM,OAAO,GAAG,CAAC,CAAa,EAAE,EAAE;YAChC,IAAI,CAA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