@genfeedai/workflow-ui 0.1.3 → 0.1.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.
Files changed (84) hide show
  1. package/dist/canvas.d.mts +16 -2
  2. package/dist/canvas.mjs +10 -8
  3. package/dist/chunk-6PSJTBNV.mjs +638 -0
  4. package/dist/chunk-7H3WJJYS.mjs +52 -0
  5. package/dist/{chunk-HCXI63ME.mjs → chunk-AUQGOJOQ.mjs} +27 -4
  6. package/dist/{chunk-AOTUCJMA.mjs → chunk-GWBGK3KL.mjs} +2 -2
  7. package/dist/chunk-JTPADIUO.mjs +130 -0
  8. package/dist/{chunk-SQK4JDYY.mjs → chunk-LT3ZJJL6.mjs} +9 -2
  9. package/dist/{chunk-7P2JWDC7.mjs → chunk-O5II6BOJ.mjs} +1198 -254
  10. package/dist/{chunk-AUZR6REQ.mjs → chunk-OQREHJXK.mjs} +1 -1
  11. package/dist/chunk-OY7BRSGG.mjs +60 -0
  12. package/dist/{chunk-E3YBVMYZ.mjs → chunk-PANZDSP6.mjs} +274 -305
  13. package/dist/chunk-PCIWWD37.mjs +90 -0
  14. package/dist/{chunk-RIGVIEYB.mjs → chunk-R727OFBR.mjs} +11 -1
  15. package/dist/chunk-ZD2BADZO.mjs +1294 -0
  16. package/dist/contextMenuStore-DMg0hJQ1.d.mts +22 -0
  17. package/dist/hooks.d.mts +53 -244
  18. package/dist/hooks.mjs +6 -6
  19. package/dist/index.d.mts +11 -7
  20. package/dist/index.mjs +13 -11
  21. package/dist/lib.d.mts +250 -4
  22. package/dist/lib.mjs +562 -2
  23. package/dist/nodes.d.mts +3 -1
  24. package/dist/nodes.mjs +6 -6
  25. package/dist/panels.mjs +3 -4
  26. package/dist/{promptLibraryStore-zqb59nsu.d.mts → promptLibraryStore-Bgw5LzvD.d.mts} +33 -5
  27. package/dist/provider.d.mts +2 -2
  28. package/dist/provider.mjs +0 -1
  29. package/dist/stores.d.mts +4 -3
  30. package/dist/stores.mjs +3 -40
  31. package/dist/toolbar.d.mts +3 -1
  32. package/dist/toolbar.mjs +5 -4
  33. package/dist/{types-ipAnBzAJ.d.mts → types-CF6DPx0P.d.mts} +8 -3
  34. package/dist/ui.d.mts +1 -1
  35. package/dist/ui.mjs +0 -1
  36. package/dist/{hooks.d.ts → useCommentNavigation-NzJjkaj2.d.mts} +15 -2
  37. package/dist/workflowStore-UAAKOOIK.mjs +2 -0
  38. package/package.json +30 -24
  39. package/dist/canvas.d.ts +0 -27
  40. package/dist/canvas.js +0 -45
  41. package/dist/chunk-3SPPKCWR.js +0 -458
  42. package/dist/chunk-3TMV3K34.js +0 -534
  43. package/dist/chunk-3YFFDHC5.js +0 -300
  44. package/dist/chunk-4MZ62VMF.js +0 -37
  45. package/dist/chunk-5HJFQVUR.js +0 -61
  46. package/dist/chunk-5LQ4QBR5.js +0 -2
  47. package/dist/chunk-6DOEUDD5.js +0 -254
  48. package/dist/chunk-AXFOCPPP.js +0 -998
  49. package/dist/chunk-BMFRA6GK.js +0 -1546
  50. package/dist/chunk-E323WAZG.mjs +0 -272
  51. package/dist/chunk-ECD5J2BA.js +0 -6022
  52. package/dist/chunk-EMGXUNBL.js +0 -120
  53. package/dist/chunk-EMUMKW5C.js +0 -107
  54. package/dist/chunk-FOMOOERN.js +0 -2
  55. package/dist/chunk-IASLG6IA.mjs +0 -118
  56. package/dist/chunk-IHF35QZD.js +0 -1095
  57. package/dist/chunk-JLWKW3G5.js +0 -2
  58. package/dist/chunk-KDIWRSYV.js +0 -375
  59. package/dist/chunk-L5TF4EHW.mjs +0 -1
  60. package/dist/chunk-RJ262NXS.js +0 -24
  61. package/dist/chunk-RXNEDWK2.js +0 -141
  62. package/dist/chunk-SEV2DWKF.js +0 -744
  63. package/dist/chunk-ZJWP5KGZ.mjs +0 -33
  64. package/dist/hooks.js +0 -56
  65. package/dist/index.d.ts +0 -29
  66. package/dist/index.js +0 -180
  67. package/dist/lib.d.ts +0 -164
  68. package/dist/lib.js +0 -144
  69. package/dist/nodes.d.ts +0 -128
  70. package/dist/nodes.js +0 -151
  71. package/dist/panels.d.ts +0 -22
  72. package/dist/panels.js +0 -21
  73. package/dist/promptLibraryStore-BZnfmEkc.d.ts +0 -464
  74. package/dist/provider.d.ts +0 -29
  75. package/dist/provider.js +0 -17
  76. package/dist/stores.d.ts +0 -96
  77. package/dist/stores.js +0 -113
  78. package/dist/toolbar.d.ts +0 -73
  79. package/dist/toolbar.js +0 -34
  80. package/dist/types-ipAnBzAJ.d.ts +0 -46
  81. package/dist/ui.d.ts +0 -67
  82. package/dist/ui.js +0 -84
  83. package/dist/workflowStore-7SDJC4UR.mjs +0 -3
  84. package/dist/workflowStore-LNJQ5RZG.js +0 -12
@@ -1,272 +0,0 @@
1
- // src/lib/mediaExtraction.ts
2
- function getMediaFromNode(nodeType, data) {
3
- switch (nodeType) {
4
- case "imageGen": {
5
- const imgData = data;
6
- const urls = imgData.outputImages?.length ? imgData.outputImages : [];
7
- return {
8
- url: imgData.outputImage,
9
- urls,
10
- type: imgData.outputImage || urls.length ? "image" : null
11
- };
12
- }
13
- case "videoGen": {
14
- const vidData = data;
15
- return { url: vidData.outputVideo, type: vidData.outputVideo ? "video" : null };
16
- }
17
- case "imageInput": {
18
- const inputData = data;
19
- return { url: inputData.image, type: inputData.image ? "image" : null };
20
- }
21
- case "videoInput": {
22
- const vidInputData = data;
23
- return { url: vidInputData.video, type: vidInputData.video ? "video" : null };
24
- }
25
- case "motionControl": {
26
- const mcData = data;
27
- return { url: mcData.outputVideo, type: mcData.outputVideo ? "video" : null };
28
- }
29
- case "download": {
30
- const outData = data;
31
- if (outData.inputVideo) {
32
- return { url: outData.inputVideo, type: "video" };
33
- }
34
- if (outData.inputImage) {
35
- return { url: outData.inputImage, type: "image" };
36
- }
37
- return { url: null, type: null };
38
- }
39
- default:
40
- return { url: null, type: null };
41
- }
42
- }
43
-
44
- // src/lib/schemaHandles.ts
45
- var HANDLE_FIELDS = /* @__PURE__ */ new Set([
46
- // Text inputs
47
- "prompt",
48
- "negative_prompt",
49
- "subject_reference",
50
- // Image inputs (single)
51
- "image",
52
- "image_input",
53
- "start_image",
54
- "first_frame_image",
55
- "end_image",
56
- "last_frame",
57
- "mask",
58
- "mask_image",
59
- "control_image",
60
- "init_image",
61
- "subject_image",
62
- "face_image",
63
- "style_image",
64
- "pose_image",
65
- "image_url",
66
- "tail_image_url",
67
- // Image inputs (array)
68
- "reference_images",
69
- // Video inputs
70
- "video",
71
- "video_url",
72
- // Audio inputs
73
- "audio",
74
- "audio_url"
75
- ]);
76
- var FIELD_TO_HANDLE_TYPE = {
77
- // Text fields
78
- prompt: "text",
79
- negative_prompt: "text",
80
- subject_reference: "text",
81
- // Image fields (single)
82
- image: "image",
83
- image_input: "image",
84
- start_image: "image",
85
- first_frame_image: "image",
86
- end_image: "image",
87
- last_frame: "image",
88
- mask: "image",
89
- mask_image: "image",
90
- control_image: "image",
91
- init_image: "image",
92
- subject_image: "image",
93
- face_image: "image",
94
- style_image: "image",
95
- pose_image: "image",
96
- image_url: "image",
97
- tail_image_url: "image",
98
- // Image fields (array)
99
- reference_images: "image",
100
- // Video fields
101
- video: "video",
102
- video_url: "video",
103
- // Audio fields
104
- audio: "audio",
105
- audio_url: "audio"
106
- };
107
- function generateHandlesFromSchema(inputSchema, staticHandles) {
108
- if (!inputSchema) return staticHandles;
109
- const schema = inputSchema;
110
- if (!schema.properties) return staticHandles;
111
- const staticIds = new Set(staticHandles.map((h) => h.id));
112
- const dynamicHandles = [];
113
- for (const [fieldName, prop] of Object.entries(schema.properties)) {
114
- if (!HANDLE_FIELDS.has(fieldName) || staticIds.has(fieldName)) continue;
115
- const handleType = FIELD_TO_HANDLE_TYPE[fieldName];
116
- if (!handleType) continue;
117
- const label = prop.title || fieldName.replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
118
- dynamicHandles.push({
119
- id: fieldName,
120
- type: handleType,
121
- label,
122
- multiple: prop.type === "array",
123
- required: schema.required?.includes(fieldName),
124
- fromSchema: true
125
- });
126
- }
127
- return [...staticHandles, ...dynamicHandles];
128
- }
129
- function isSchemaHandle(handle) {
130
- return handle.fromSchema === true;
131
- }
132
-
133
- // src/lib/models/registry.ts
134
- var IMAGE_MODELS = [
135
- { value: "nano-banana", label: "Nano Banana", apiId: "google/nano-banana" },
136
- { value: "nano-banana-pro", label: "Nano Banana Pro", apiId: "google/nano-banana-pro" }
137
- ];
138
- var IMAGE_MODEL_MAP = Object.fromEntries(
139
- IMAGE_MODELS.map((m) => [m.apiId, m.value])
140
- );
141
- var IMAGE_MODEL_ID_MAP = Object.fromEntries(
142
- IMAGE_MODELS.map((m) => [m.value, m.apiId])
143
- );
144
- var DEFAULT_IMAGE_MODEL = "nano-banana-pro";
145
- var VIDEO_MODELS = [
146
- {
147
- value: "veo-3.1-fast",
148
- label: "Veo 3.1 Fast",
149
- description: "Fast",
150
- apiId: "google/veo-3.1-fast"
151
- },
152
- { value: "veo-3.1", label: "Veo 3.1", description: "High quality", apiId: "google/veo-3.1" }
153
- ];
154
- var VIDEO_MODEL_MAP = Object.fromEntries(
155
- VIDEO_MODELS.map((m) => [m.apiId, m.value])
156
- );
157
- var VIDEO_MODEL_ID_MAP = Object.fromEntries(
158
- VIDEO_MODELS.map((m) => [m.value, m.apiId])
159
- );
160
- var DEFAULT_VIDEO_MODEL = "veo-3.1-fast";
161
- var LIPSYNC_MODELS = [
162
- { value: "bytedance/omni-human", label: "OmniHuman (Image)", supportsImage: true },
163
- { value: "veed/fabric-1.0", label: "VEED Fabric (Image)", supportsImage: true },
164
- { value: "sync/lipsync-2-pro", label: "Sync Labs Pro (Video)", supportsImage: false },
165
- { value: "sync/lipsync-2", label: "Sync Labs (Video)", supportsImage: false },
166
- { value: "pixverse/lipsync", label: "Pixverse", supportsImage: true }
167
- ];
168
- var LIPSYNC_SYNC_MODES = [
169
- { value: "loop", label: "Loop" },
170
- { value: "bounce", label: "Bounce" },
171
- { value: "cut_off", label: "Cut Off" },
172
- { value: "silence", label: "Silence" },
173
- { value: "remap", label: "Remap" }
174
- ];
175
- var DEFAULT_LIPSYNC_MODEL = "bytedance/omni-human";
176
- var LLM_MODELS = [
177
- {
178
- value: "meta-llama-3.1-405b-instruct",
179
- label: "Llama 3.1 405B",
180
- apiId: "meta/meta-llama-3.1-405b-instruct"
181
- },
182
- {
183
- value: "claude-4.5-sonnet",
184
- label: "Claude 4.5 Sonnet",
185
- apiId: "anthropic/claude-4.5-sonnet"
186
- }
187
- ];
188
- var LLM_MODEL_MAP = Object.fromEntries(
189
- LLM_MODELS.map((m) => [m.apiId, m.value])
190
- );
191
- var LLM_MODEL_ID_MAP = Object.fromEntries(
192
- LLM_MODELS.map((m) => [m.value, m.apiId])
193
- );
194
- var DEFAULT_LLM_MODEL = "meta-llama-3.1-405b-instruct";
195
- function getImageModelLabel(model) {
196
- return IMAGE_MODELS.find((m) => m.value === model)?.label ?? model;
197
- }
198
- function getVideoModelLabel(model) {
199
- return VIDEO_MODELS.find((m) => m.value === model)?.label ?? model;
200
- }
201
- function getLipSyncModelLabel(model) {
202
- return LIPSYNC_MODELS.find((m) => m.value === model)?.label ?? model;
203
- }
204
- function getLLMModelLabel(model) {
205
- return LLM_MODELS.find((m) => m.value === model)?.label ?? model;
206
- }
207
- function lipSyncModelSupportsImage(model) {
208
- return LIPSYNC_MODELS.find((m) => m.value === model)?.supportsImage ?? false;
209
- }
210
-
211
- // src/lib/easing.ts
212
- var EASING_PRESETS = {
213
- // Linear - no easing
214
- linear: [0, 0, 1, 1],
215
- // Standard easing functions
216
- easeIn: [0.42, 0, 1, 1],
217
- easeOut: [0, 0, 0.58, 1],
218
- easeInOut: [0.42, 0, 0.58, 1],
219
- // Quadratic easing
220
- easeInQuad: [0.55, 0.085, 0.68, 0.53],
221
- easeOutQuad: [0.25, 0.46, 0.45, 0.94],
222
- easeInOutQuad: [0.455, 0.03, 0.515, 0.955],
223
- // Cubic easing
224
- easeInCubic: [0.55, 0.055, 0.675, 0.19],
225
- easeOutCubic: [0.215, 0.61, 0.355, 1],
226
- easeInOutCubic: [0.645, 0.045, 0.355, 1],
227
- // Exponential easing
228
- easeInExpo: [0.95, 0.05, 0.795, 0.035],
229
- easeOutExpo: [0.19, 1, 0.22, 1],
230
- easeInOutExpo: [1, 0, 0, 1]
231
- };
232
- function evaluateBezier(t, curve) {
233
- const [x1, y1, x2, y2] = curve;
234
- const epsilon = 1e-6;
235
- let guess = t;
236
- for (let i = 0; i < 8; i++) {
237
- const x = 3 * (1 - guess) * (1 - guess) * guess * x1 + 3 * (1 - guess) * guess * guess * x2 + guess * guess * guess - t;
238
- if (Math.abs(x) < epsilon) break;
239
- const dx = 3 * (1 - guess) * (1 - guess) * x1 + 6 * (1 - guess) * guess * (x2 - x1) + 3 * guess * guess * (1 - x2);
240
- guess -= x / dx;
241
- }
242
- return 3 * (1 - guess) * (1 - guess) * guess * y1 + 3 * (1 - guess) * guess * guess * y2 + guess * guess * guess;
243
- }
244
- function applySpeedCurve(duration, curve, sampleRate = 60) {
245
- const timestamps = [];
246
- for (let i = 0; i <= sampleRate; i++) {
247
- const t = i / sampleRate;
248
- const easedT = evaluateBezier(t, curve);
249
- timestamps.push(easedT * duration);
250
- }
251
- return timestamps;
252
- }
253
- function getEasingDisplayName(preset) {
254
- const names = {
255
- linear: "Linear",
256
- easeIn: "Ease In",
257
- easeOut: "Ease Out",
258
- easeInOut: "Ease In Out",
259
- easeInQuad: "Ease In Quadratic",
260
- easeOutQuad: "Ease Out Quadratic",
261
- easeInOutQuad: "Ease In Out Quadratic",
262
- easeInCubic: "Ease In Cubic",
263
- easeOutCubic: "Ease Out Cubic",
264
- easeInOutCubic: "Ease In Out Cubic",
265
- easeInExpo: "Ease In Exponential",
266
- easeOutExpo: "Ease Out Exponential",
267
- easeInOutExpo: "Ease In Out Exponential"
268
- };
269
- return names[preset] || preset;
270
- }
271
-
272
- export { DEFAULT_IMAGE_MODEL, DEFAULT_LIPSYNC_MODEL, DEFAULT_LLM_MODEL, DEFAULT_VIDEO_MODEL, EASING_PRESETS, IMAGE_MODELS, IMAGE_MODEL_ID_MAP, IMAGE_MODEL_MAP, LIPSYNC_MODELS, LIPSYNC_SYNC_MODES, LLM_MODELS, LLM_MODEL_ID_MAP, LLM_MODEL_MAP, VIDEO_MODELS, VIDEO_MODEL_ID_MAP, VIDEO_MODEL_MAP, applySpeedCurve, evaluateBezier, generateHandlesFromSchema, getEasingDisplayName, getImageModelLabel, getLLMModelLabel, getLipSyncModelLabel, getMediaFromNode, getVideoModelLabel, isSchemaHandle, lipSyncModelSupportsImage };