@genfeedai/workflow-ui 0.2.2 → 0.2.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/README.md +11 -33
- package/dist/canvas.d.ts +22 -22
- package/dist/canvas.mjs +16 -17
- package/dist/{chunk-WBR34V4L.mjs → chunk-2FUPL67V.mjs} +1593 -1045
- package/dist/{chunk-4VEN4UN7.mjs → chunk-53XDE62A.mjs} +818 -623
- package/dist/{chunk-PCIWWD37.mjs → chunk-7LV4UAUS.mjs} +19 -19
- package/dist/{chunk-7SKSRSS7.mjs → chunk-B4EAAKYF.mjs} +16 -16
- package/dist/{chunk-ZJD5WMR3.mjs → chunk-C6MQBJFC.mjs} +45 -13
- package/dist/{chunk-7H3WJJYS.mjs → chunk-ESVULCFY.mjs} +12 -6
- package/dist/{chunk-GWBGK3KL.mjs → chunk-FWJIAW2E.mjs} +82 -47
- package/dist/{chunk-R727OFBR.mjs → chunk-GPYIIWD5.mjs} +404 -350
- package/dist/{chunk-OQREHJXK.mjs → chunk-IYFWAJBB.mjs} +208 -203
- package/dist/{chunk-2JQSKIWR.mjs → chunk-MGLAKMDP.mjs} +24 -23
- package/dist/{chunk-LT3ZJJL6.mjs → chunk-OJWVEEMM.mjs} +497 -399
- package/dist/{chunk-ZD2BADZO.mjs → chunk-ORVDYXDP.mjs} +221 -175
- package/dist/{chunk-CV4M7CNU.mjs → chunk-QQVHGJ2G.mjs} +149 -142
- package/dist/{chunk-6PSJTBNV.mjs → chunk-U4QPE4CY.mjs} +387 -347
- package/dist/{chunk-EFXQT23N.mjs → chunk-VVQ4CH77.mjs} +5 -5
- package/dist/{chunk-VRN3UWE5.mjs → chunk-XRC3O5GK.mjs} +73 -73
- package/dist/{chunk-FT33LFII.mjs → chunk-YUIK4AHM.mjs} +1 -1
- package/dist/{chunk-JT4Y5H3U.mjs → chunk-ZSITTZ4S.mjs} +630 -569
- package/dist/hooks.d.ts +37 -37
- package/dist/hooks.mjs +10 -10
- package/dist/index.d.ts +26 -11
- package/dist/index.mjs +99 -20
- package/dist/lib.d.ts +203 -203
- package/dist/lib.mjs +228 -199
- package/dist/nodes.d.ts +2 -2
- package/dist/nodes.mjs +12 -13
- package/dist/panels.d.ts +2 -3
- package/dist/panels.mjs +3 -3
- package/dist/provider.d.ts +2 -2
- package/dist/provider.mjs +2 -2
- package/dist/stores.d.ts +5 -5
- package/dist/stores.mjs +5 -5
- package/dist/toolbar.d.ts +42 -24
- package/dist/toolbar.mjs +4 -5
- package/dist/ui.d.ts +2 -2
- package/dist/ui.mjs +2 -2
- package/dist/{useCommentNavigation-BakbiiIc.d.ts → useRequiredInputs-ByoIS-fT.d.ts} +160 -160
- package/dist/{promptLibraryStore-Dl3Q3cP6.d.ts → workflowStore-Bsz0nd5c.d.ts} +368 -368
- package/dist/workflowStore-N2F7WIG3.mjs +2 -0
- package/package.json +79 -77
- package/src/styles/workflow-ui.css +56 -19
- package/dist/chunk-OY7BRSGG.mjs +0 -60
- package/dist/workflowStore-UAAKOOIK.mjs +0 -2
- package/dist/{types-IEKYuYhu.d.ts → types-CRXJnajq.d.ts} +1 -1
package/package.json
CHANGED
|
@@ -1,81 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "@genfeedai/workflow-ui",
|
|
3
|
-
"version": "0.2.2",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"license": "AGPL-3.0",
|
|
6
|
-
"description": "Shared UI components for Genfeed workflow editor",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/genfeedai/packages.git",
|
|
10
|
-
"directory": "workflow-ui"
|
|
11
|
-
},
|
|
12
|
-
"publishConfig": {
|
|
13
|
-
"access": "public",
|
|
14
|
-
"registry": "https://registry.npmjs.org/"
|
|
15
|
-
},
|
|
16
|
-
"module": "./dist/index.mjs",
|
|
17
|
-
"types": "./dist/index.d.ts",
|
|
18
|
-
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"types": "./dist/index.d.ts",
|
|
21
|
-
"import": "./dist/index.mjs"
|
|
22
|
-
},
|
|
23
|
-
"./canvas": {
|
|
24
|
-
"types": "./dist/canvas.d.ts",
|
|
25
|
-
"import": "./dist/canvas.mjs"
|
|
26
|
-
},
|
|
27
|
-
"./nodes": {
|
|
28
|
-
"types": "./dist/nodes.d.ts",
|
|
29
|
-
"import": "./dist/nodes.mjs"
|
|
30
|
-
},
|
|
31
|
-
"./panels": {
|
|
32
|
-
"types": "./dist/panels.d.ts",
|
|
33
|
-
"import": "./dist/panels.mjs"
|
|
34
|
-
},
|
|
35
|
-
"./toolbar": {
|
|
36
|
-
"types": "./dist/toolbar.d.ts",
|
|
37
|
-
"import": "./dist/toolbar.mjs"
|
|
38
|
-
},
|
|
39
|
-
"./hooks": {
|
|
40
|
-
"types": "./dist/hooks.d.ts",
|
|
41
|
-
"import": "./dist/hooks.mjs"
|
|
42
|
-
},
|
|
43
|
-
"./stores": {
|
|
44
|
-
"types": "./dist/stores.d.ts",
|
|
45
|
-
"import": "./dist/stores.mjs"
|
|
46
|
-
},
|
|
47
|
-
"./provider": {
|
|
48
|
-
"types": "./dist/provider.d.ts",
|
|
49
|
-
"import": "./dist/provider.mjs"
|
|
50
|
-
},
|
|
51
|
-
"./ui": {
|
|
52
|
-
"types": "./dist/ui.d.ts",
|
|
53
|
-
"import": "./dist/ui.mjs"
|
|
54
|
-
},
|
|
55
|
-
"./lib": {
|
|
56
|
-
"types": "./dist/lib.d.ts",
|
|
57
|
-
"import": "./dist/lib.mjs"
|
|
58
|
-
},
|
|
59
|
-
"./styles": "./src/styles/workflow-ui.css"
|
|
60
|
-
},
|
|
61
|
-
"files": [
|
|
62
|
-
"dist",
|
|
63
|
-
"src/styles"
|
|
64
|
-
],
|
|
65
|
-
"sideEffects": [
|
|
66
|
-
"**/*.css"
|
|
67
|
-
],
|
|
68
|
-
"peerDependencies": {
|
|
69
|
-
"@xyflow/react": ">=12.0.0",
|
|
70
|
-
"next": ">=14.0.0",
|
|
71
|
-
"react": ">=19.0.0",
|
|
72
|
-
"react-dom": ">=19.0.0",
|
|
73
|
-
"zustand": ">=5.0.0",
|
|
74
|
-
"zundo": ">=2.0.0"
|
|
75
|
-
},
|
|
76
2
|
"dependencies": {
|
|
77
3
|
"@dagrejs/dagre": "^2.0.4",
|
|
78
|
-
"@genfeedai/
|
|
4
|
+
"@genfeedai/core": "^0.2.1",
|
|
5
|
+
"@genfeedai/types": "^0.2.2",
|
|
79
6
|
"@radix-ui/react-checkbox": "^1.1.4",
|
|
80
7
|
"@radix-ui/react-label": "^2.1.2",
|
|
81
8
|
"@radix-ui/react-select": "^2.1.6",
|
|
@@ -87,8 +14,8 @@
|
|
|
87
14
|
"nanoid": "^5.1.6",
|
|
88
15
|
"tailwind-merge": "^3.4.0"
|
|
89
16
|
},
|
|
17
|
+
"description": "Shared UI components for Genfeed workflow editor",
|
|
90
18
|
"devDependencies": {
|
|
91
|
-
"@genfeedai/core": "workspace:*",
|
|
92
19
|
"@testing-library/jest-dom": "6.6.3",
|
|
93
20
|
"@testing-library/react": "16.2.0",
|
|
94
21
|
"@types/node": "^25.2.3",
|
|
@@ -105,10 +32,85 @@
|
|
|
105
32
|
"zundo": "2.3.0",
|
|
106
33
|
"zustand": "5.0.3"
|
|
107
34
|
},
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"import": "./dist/index.mjs",
|
|
38
|
+
"types": "./dist/index.d.ts"
|
|
39
|
+
},
|
|
40
|
+
"./canvas": {
|
|
41
|
+
"import": "./dist/canvas.mjs",
|
|
42
|
+
"types": "./dist/canvas.d.ts"
|
|
43
|
+
},
|
|
44
|
+
"./hooks": {
|
|
45
|
+
"import": "./dist/hooks.mjs",
|
|
46
|
+
"types": "./dist/hooks.d.ts"
|
|
47
|
+
},
|
|
48
|
+
"./lib": {
|
|
49
|
+
"import": "./dist/lib.mjs",
|
|
50
|
+
"types": "./dist/lib.d.ts"
|
|
51
|
+
},
|
|
52
|
+
"./nodes": {
|
|
53
|
+
"import": "./dist/nodes.mjs",
|
|
54
|
+
"types": "./dist/nodes.d.ts"
|
|
55
|
+
},
|
|
56
|
+
"./panels": {
|
|
57
|
+
"import": "./dist/panels.mjs",
|
|
58
|
+
"types": "./dist/panels.d.ts"
|
|
59
|
+
},
|
|
60
|
+
"./provider": {
|
|
61
|
+
"import": "./dist/provider.mjs",
|
|
62
|
+
"types": "./dist/provider.d.ts"
|
|
63
|
+
},
|
|
64
|
+
"./stores": {
|
|
65
|
+
"import": "./dist/stores.mjs",
|
|
66
|
+
"types": "./dist/stores.d.ts"
|
|
67
|
+
},
|
|
68
|
+
"./styles": "./src/styles/workflow-ui.css",
|
|
69
|
+
"./toolbar": {
|
|
70
|
+
"import": "./dist/toolbar.mjs",
|
|
71
|
+
"types": "./dist/toolbar.d.ts"
|
|
72
|
+
},
|
|
73
|
+
"./ui": {
|
|
74
|
+
"import": "./dist/ui.mjs",
|
|
75
|
+
"types": "./dist/ui.d.ts"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"files": [
|
|
79
|
+
"dist",
|
|
80
|
+
"src/styles"
|
|
81
|
+
],
|
|
82
|
+
"license": "AGPL-3.0",
|
|
83
|
+
"module": "./dist/index.mjs",
|
|
84
|
+
"name": "@genfeedai/workflow-ui",
|
|
85
|
+
"peerDependencies": {
|
|
86
|
+
"@xyflow/react": ">=12.0.0",
|
|
87
|
+
"next": ">=14.0.0",
|
|
88
|
+
"react": ">=19.0.0",
|
|
89
|
+
"react-dom": ">=19.0.0",
|
|
90
|
+
"zundo": ">=2.0.0",
|
|
91
|
+
"zustand": ">=5.0.0"
|
|
92
|
+
},
|
|
93
|
+
"publishConfig": {
|
|
94
|
+
"access": "public",
|
|
95
|
+
"registry": "https://registry.npmjs.org/"
|
|
96
|
+
},
|
|
97
|
+
"repository": {
|
|
98
|
+
"directory": "workflow-ui",
|
|
99
|
+
"type": "git",
|
|
100
|
+
"url": "git+https://github.com/genfeedai/packages.git"
|
|
101
|
+
},
|
|
108
102
|
"scripts": {
|
|
109
103
|
"build": "tsup",
|
|
110
104
|
"dev": "tsup --watch",
|
|
111
105
|
"prepublishOnly": "bun run build",
|
|
106
|
+
"publish": "PACKAGE_FILTER=workflow-ui PUBLISH_PROVENANCE=0 node ../scripts/publish-public-packages.mjs",
|
|
107
|
+
"publish:dry-run": "PACKAGE_FILTER=workflow-ui PUBLISH_DRY_RUN=1 PUBLISH_PROVENANCE=0 node ../scripts/publish-public-packages.mjs",
|
|
112
108
|
"test": "vitest run"
|
|
113
|
-
}
|
|
109
|
+
},
|
|
110
|
+
"sideEffects": [
|
|
111
|
+
"**/*.css"
|
|
112
|
+
],
|
|
113
|
+
"type": "module",
|
|
114
|
+
"types": "./dist/index.d.ts",
|
|
115
|
+
"version": "0.2.4"
|
|
114
116
|
}
|
|
@@ -50,10 +50,18 @@
|
|
|
50
50
|
border: 2px solid var(--background);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.react-flow__handle-left {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.react-flow__handle-
|
|
53
|
+
.react-flow__handle-left {
|
|
54
|
+
left: -5px;
|
|
55
|
+
}
|
|
56
|
+
.react-flow__handle-right {
|
|
57
|
+
right: -5px;
|
|
58
|
+
}
|
|
59
|
+
.react-flow__handle-top {
|
|
60
|
+
top: -5px;
|
|
61
|
+
}
|
|
62
|
+
.react-flow__handle-bottom {
|
|
63
|
+
bottom: -5px;
|
|
64
|
+
}
|
|
57
65
|
|
|
58
66
|
.react-flow__edge-path {
|
|
59
67
|
stroke: var(--muted-foreground);
|
|
@@ -61,17 +69,29 @@
|
|
|
61
69
|
}
|
|
62
70
|
|
|
63
71
|
/* Edge type colors (based on data type flowing through) */
|
|
64
|
-
.react-flow__edge.edge-image .react-flow__edge-path {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
.react-flow__edge.edge-
|
|
68
|
-
|
|
72
|
+
.react-flow__edge.edge-image .react-flow__edge-path {
|
|
73
|
+
stroke: var(--handle-image);
|
|
74
|
+
}
|
|
75
|
+
.react-flow__edge.edge-video .react-flow__edge-path {
|
|
76
|
+
stroke: var(--handle-video);
|
|
77
|
+
}
|
|
78
|
+
.react-flow__edge.edge-text .react-flow__edge-path {
|
|
79
|
+
stroke: var(--handle-text);
|
|
80
|
+
}
|
|
81
|
+
.react-flow__edge.edge-number .react-flow__edge-path {
|
|
82
|
+
stroke: var(--handle-number);
|
|
83
|
+
}
|
|
84
|
+
.react-flow__edge.edge-audio .react-flow__edge-path {
|
|
85
|
+
stroke: var(--handle-audio);
|
|
86
|
+
}
|
|
69
87
|
|
|
70
88
|
/* Selected edge - highlight with glow (preserves type color) */
|
|
71
89
|
.react-flow__edge.selected .react-flow__edge-path {
|
|
72
90
|
stroke-width: 3px;
|
|
73
91
|
filter: drop-shadow(0 0 6px currentColor) brightness(1.3);
|
|
74
|
-
transition:
|
|
92
|
+
transition:
|
|
93
|
+
stroke-width 0.15s ease,
|
|
94
|
+
filter 0.15s ease;
|
|
75
95
|
}
|
|
76
96
|
|
|
77
97
|
/* Dimmed edges (not connected to selection) */
|
|
@@ -83,7 +103,9 @@
|
|
|
83
103
|
/* Highlighted edges (connected to selection) - brighten the type color */
|
|
84
104
|
.react-flow__edge.highlighted .react-flow__edge-path {
|
|
85
105
|
filter: drop-shadow(0 0 4px currentColor) brightness(1.2);
|
|
86
|
-
transition:
|
|
106
|
+
transition:
|
|
107
|
+
opacity 0.2s ease,
|
|
108
|
+
filter 0.2s ease;
|
|
87
109
|
}
|
|
88
110
|
|
|
89
111
|
/* Executing edges (during workflow execution) - pipe flow effect */
|
|
@@ -109,7 +131,9 @@
|
|
|
109
131
|
stroke-width: 1.5px;
|
|
110
132
|
stroke-dasharray: 5 5;
|
|
111
133
|
opacity: 0.3;
|
|
112
|
-
transition:
|
|
134
|
+
transition:
|
|
135
|
+
opacity 0.2s ease,
|
|
136
|
+
stroke 0.2s ease;
|
|
113
137
|
}
|
|
114
138
|
|
|
115
139
|
.react-flow__background {
|
|
@@ -150,12 +174,24 @@
|
|
|
150
174
|
Handle Type Color Classes
|
|
151
175
|
========================================================================== */
|
|
152
176
|
|
|
153
|
-
.handle-image {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
.handle-
|
|
157
|
-
|
|
158
|
-
|
|
177
|
+
.handle-image {
|
|
178
|
+
background: var(--handle-image) !important;
|
|
179
|
+
}
|
|
180
|
+
.handle-video {
|
|
181
|
+
background: var(--handle-video) !important;
|
|
182
|
+
}
|
|
183
|
+
.handle-text {
|
|
184
|
+
background: var(--handle-text) !important;
|
|
185
|
+
}
|
|
186
|
+
.handle-number {
|
|
187
|
+
background: var(--handle-number) !important;
|
|
188
|
+
}
|
|
189
|
+
.handle-audio {
|
|
190
|
+
background: var(--handle-audio) !important;
|
|
191
|
+
}
|
|
192
|
+
.handle-output {
|
|
193
|
+
background: var(--handle-output) !important;
|
|
194
|
+
}
|
|
159
195
|
|
|
160
196
|
/* ==========================================================================
|
|
161
197
|
Animation Keyframes
|
|
@@ -163,7 +199,8 @@
|
|
|
163
199
|
|
|
164
200
|
/* Processing node glow animation */
|
|
165
201
|
@keyframes processing-glow {
|
|
166
|
-
0%,
|
|
202
|
+
0%,
|
|
203
|
+
100% {
|
|
167
204
|
box-shadow: 0 0 8px 2px var(--node-color, var(--primary));
|
|
168
205
|
}
|
|
169
206
|
50% {
|
package/dist/chunk-OY7BRSGG.mjs
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// ../core/dist/index.mjs
|
|
2
|
-
var PRICING = {
|
|
3
|
-
// Image generation (per image)
|
|
4
|
-
"nano-banana": 0.039,
|
|
5
|
-
"nano-banana-pro": {
|
|
6
|
-
"1K": 0.15,
|
|
7
|
-
"2K": 0.15,
|
|
8
|
-
"4K": 0.3
|
|
9
|
-
},
|
|
10
|
-
// Legacy aliases
|
|
11
|
-
"imagen-4-fast": 0.039,
|
|
12
|
-
"imagen-4": 0.15,
|
|
13
|
-
// Video generation (per second)
|
|
14
|
-
"veo-3.1-fast": { withAudio: 0.15, withoutAudio: 0.1 },
|
|
15
|
-
"veo-3.1": { withAudio: 0.4, withoutAudio: 0.2 },
|
|
16
|
-
// Legacy aliases
|
|
17
|
-
"veo-3-fast": { withAudio: 0.15, withoutAudio: 0.1 },
|
|
18
|
-
"veo-3": { withAudio: 0.4, withoutAudio: 0.2 },
|
|
19
|
-
// LLM (per token, derived from $9.50/million)
|
|
20
|
-
llama: 95e-7,
|
|
21
|
-
// Luma Reframe
|
|
22
|
-
"luma-reframe-image": {
|
|
23
|
-
"photon-flash-1": 0.01,
|
|
24
|
-
"photon-1": 0.03
|
|
25
|
-
},
|
|
26
|
-
"luma-reframe-video": 0.06,
|
|
27
|
-
// per second
|
|
28
|
-
// Topaz Upscale (tiered by megapixels)
|
|
29
|
-
"topaz-image-upscale": [
|
|
30
|
-
{ maxMP: 1, price: 0.05 },
|
|
31
|
-
{ maxMP: 4, price: 0.08 },
|
|
32
|
-
{ maxMP: 9, price: 0.16 },
|
|
33
|
-
{ maxMP: 16, price: 0.27 },
|
|
34
|
-
{ maxMP: 25, price: 0.41 },
|
|
35
|
-
{ maxMP: Infinity, price: 0.82 }
|
|
36
|
-
],
|
|
37
|
-
// Topaz Video (per 5 seconds based on resolution and fps)
|
|
38
|
-
"topaz-video-upscale": {
|
|
39
|
-
"720p-15": 0.014,
|
|
40
|
-
"720p-24": 0.022,
|
|
41
|
-
"720p-30": 0.027,
|
|
42
|
-
"720p-60": 0.054,
|
|
43
|
-
"1080p-15": 0.051,
|
|
44
|
-
"1080p-24": 0.081,
|
|
45
|
-
"1080p-30": 0.101,
|
|
46
|
-
"1080p-60": 0.203,
|
|
47
|
-
"4k-15": 0.187,
|
|
48
|
-
"4k-24": 0.299,
|
|
49
|
-
"4k-30": 0.373,
|
|
50
|
-
"4k-60": 0.747
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var IMAGE_NODE_TYPES = ["imageGen", "image-gen", "ImageGenNode"];
|
|
54
|
-
var VIDEO_NODE_TYPES = ["videoGen", "video-gen", "VideoGenNode"];
|
|
55
|
-
var LUMA_NODE_TYPES = ["reframe", "lumaReframeImage", "lumaReframeVideo"];
|
|
56
|
-
var TOPAZ_NODE_TYPES = ["upscale", "topazImageUpscale", "topazVideoUpscale"];
|
|
57
|
-
var DEFAULT_VIDEO_DURATION = 8;
|
|
58
|
-
var LUMA_ASPECT_RATIOS = ["1:1", "3:4", "4:3", "9:16", "16:9", "9:21", "21:9"];
|
|
59
|
-
|
|
60
|
-
export { DEFAULT_VIDEO_DURATION, IMAGE_NODE_TYPES, LUMA_ASPECT_RATIOS, LUMA_NODE_TYPES, PRICING, TOPAZ_NODE_TYPES, VIDEO_NODE_TYPES };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
1
|
import { ProviderModel, ModelCapability, IQueryPrompts, IPrompt, ICreatePrompt } from '@genfeedai/types';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
3
|
|
|
4
4
|
interface FileUploadService {
|
|
5
5
|
uploadFile: (path: string, file: File) => Promise<{
|