@genfeedai/workflow-ui 0.1.5 → 0.2.1
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 +53 -0
- package/dist/canvas.mjs +3 -3
- package/dist/{chunk-JTPADIUO.mjs → chunk-2JQSKIWR.mjs} +32 -15
- package/dist/{chunk-O5II6BOJ.mjs → chunk-4VEN4UN7.mjs} +2 -2
- package/dist/{chunk-AUQGOJOQ.mjs → chunk-JT4Y5H3U.mjs} +2 -2
- package/dist/{chunk-PANZDSP6.mjs → chunk-WBR34V4L.mjs} +1 -1
- package/dist/{hooks.d.mts → hooks.d.ts} +2 -2
- package/dist/{index.d.mts → index.d.ts} +8 -8
- package/dist/index.mjs +4 -4
- package/dist/{lib.d.mts → lib.d.ts} +3 -14
- package/dist/lib.mjs +1 -1
- package/dist/nodes.mjs +1 -1
- package/dist/{promptLibraryStore-Bgw5LzvD.d.mts → promptLibraryStore-Dl3Q3cP6.d.ts} +2 -2
- package/dist/{provider.d.mts → provider.d.ts} +2 -2
- package/dist/{stores.d.mts → stores.d.ts} +4 -4
- package/dist/toolbar.mjs +2 -2
- package/dist/{types-CF6DPx0P.d.mts → types-IEKYuYhu.d.ts} +1 -1
- package/dist/{useCommentNavigation-NzJjkaj2.d.mts → useCommentNavigation-BakbiiIc.d.ts} +1 -1
- package/package.json +22 -31
- /package/dist/{canvas.d.mts → canvas.d.ts} +0 -0
- /package/dist/{contextMenuStore-DMg0hJQ1.d.mts → contextMenuStore-DMg0hJQ1.d.ts} +0 -0
- /package/dist/{nodes.d.mts → nodes.d.ts} +0 -0
- /package/dist/{panels.d.mts → panels.d.ts} +0 -0
- /package/dist/{toolbar.d.mts → toolbar.d.ts} +0 -0
- /package/dist/{ui.d.mts → ui.d.ts} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @genfeedai/workflow-ui
|
|
2
|
+
|
|
3
|
+
Shared UI components for the Genfeed workflow editor built on React Flow.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @genfeedai/workflow-ui
|
|
9
|
+
# or
|
|
10
|
+
bun add @genfeedai/workflow-ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Peer Dependencies
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @xyflow/react react react-dom zustand zundo next
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { WorkflowCanvas } from '@genfeedai/workflow-ui/canvas';
|
|
23
|
+
import { useWorkflowStore } from '@genfeedai/workflow-ui/stores';
|
|
24
|
+
import { WorkflowProvider } from '@genfeedai/workflow-ui/provider';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Subpath Exports
|
|
28
|
+
|
|
29
|
+
| Export | Description |
|
|
30
|
+
|--------|-------------|
|
|
31
|
+
| `@genfeedai/workflow-ui` | Main entry (re-exports all) |
|
|
32
|
+
| `@genfeedai/workflow-ui/canvas` | Workflow canvas components |
|
|
33
|
+
| `@genfeedai/workflow-ui/nodes` | Node type components |
|
|
34
|
+
| `@genfeedai/workflow-ui/panels` | Side panels (inspector, settings) |
|
|
35
|
+
| `@genfeedai/workflow-ui/toolbar` | Toolbar components |
|
|
36
|
+
| `@genfeedai/workflow-ui/hooks` | React hooks |
|
|
37
|
+
| `@genfeedai/workflow-ui/stores` | Zustand stores |
|
|
38
|
+
| `@genfeedai/workflow-ui/provider` | Context providers |
|
|
39
|
+
| `@genfeedai/workflow-ui/ui` | Primitive UI components |
|
|
40
|
+
| `@genfeedai/workflow-ui/lib` | Utility functions |
|
|
41
|
+
| `@genfeedai/workflow-ui/styles` | CSS stylesheet |
|
|
42
|
+
|
|
43
|
+
### Styles
|
|
44
|
+
|
|
45
|
+
Import the stylesheet in your app:
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import '@genfeedai/workflow-ui/styles';
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
AGPL-3.0
|
package/dist/canvas.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { ConnectionDropMenu, EdgeToolbar, EditableEdge, GroupOverlay, HelperLines, NodeSearch, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { ConnectionDropMenu, EdgeToolbar, EditableEdge, GroupOverlay, HelperLines, NodeSearch, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './chunk-4VEN4UN7.mjs';
|
|
2
|
+
import './chunk-WBR34V4L.mjs';
|
|
3
3
|
import './chunk-ZJD5WMR3.mjs';
|
|
4
4
|
import './chunk-6PSJTBNV.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-2JQSKIWR.mjs';
|
|
6
6
|
import './chunk-OY7BRSGG.mjs';
|
|
7
7
|
import './chunk-ZD2BADZO.mjs';
|
|
8
8
|
import './chunk-GWBGK3KL.mjs';
|
|
@@ -28,8 +28,10 @@ function calculateWorkflowCost(nodes) {
|
|
|
28
28
|
nodeLabel: label,
|
|
29
29
|
nodeType: type,
|
|
30
30
|
model,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
unitPrice: cost,
|
|
32
|
+
quantity: 1,
|
|
33
|
+
subtotal: cost,
|
|
34
|
+
unit: "per image"
|
|
33
35
|
});
|
|
34
36
|
continue;
|
|
35
37
|
}
|
|
@@ -43,33 +45,40 @@ function calculateWorkflowCost(nodes) {
|
|
|
43
45
|
const entry = priceEntry;
|
|
44
46
|
perSecond = generateAudio ? entry.withAudio ?? 0 : entry.withoutAudio ?? 0;
|
|
45
47
|
}
|
|
48
|
+
const subtotal = perSecond * duration;
|
|
46
49
|
estimates.push({
|
|
47
50
|
nodeId: node.id,
|
|
48
51
|
nodeLabel: label,
|
|
49
52
|
nodeType: type,
|
|
50
53
|
model,
|
|
54
|
+
unitPrice: perSecond,
|
|
55
|
+
quantity: duration,
|
|
56
|
+
subtotal,
|
|
51
57
|
unit: `${duration}s video`,
|
|
52
|
-
|
|
58
|
+
duration,
|
|
59
|
+
withAudio: generateAudio
|
|
53
60
|
});
|
|
54
61
|
continue;
|
|
55
62
|
}
|
|
56
63
|
if (isNodeType(type, LUMA_NODE_TYPES)) {
|
|
57
64
|
const model = getDataField(data, "model", "photon-flash-1");
|
|
58
65
|
const inputType = getDataField(data, "inputType", "image");
|
|
59
|
-
let
|
|
66
|
+
let subtotal = 0;
|
|
60
67
|
if (inputType === "video") {
|
|
61
|
-
|
|
68
|
+
subtotal = PRICING["luma-reframe-video"] * DEFAULT_VIDEO_DURATION;
|
|
62
69
|
} else {
|
|
63
70
|
const imageEntry = PRICING["luma-reframe-image"];
|
|
64
|
-
|
|
71
|
+
subtotal = imageEntry[model] ?? 0.01;
|
|
65
72
|
}
|
|
66
73
|
estimates.push({
|
|
67
74
|
nodeId: node.id,
|
|
68
75
|
nodeLabel: label,
|
|
69
76
|
nodeType: type,
|
|
70
77
|
model,
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
unitPrice: subtotal,
|
|
79
|
+
quantity: 1,
|
|
80
|
+
subtotal,
|
|
81
|
+
unit: inputType === "video" ? "per video" : "per image"
|
|
73
82
|
});
|
|
74
83
|
continue;
|
|
75
84
|
}
|
|
@@ -87,8 +96,11 @@ function calculateWorkflowCost(nodes) {
|
|
|
87
96
|
nodeLabel: label,
|
|
88
97
|
nodeType: type,
|
|
89
98
|
model: "topaz-video",
|
|
99
|
+
unitPrice: pricePerChunk,
|
|
100
|
+
quantity: chunks,
|
|
101
|
+
subtotal: pricePerChunk * chunks,
|
|
90
102
|
unit: `${duration}s video`,
|
|
91
|
-
|
|
103
|
+
duration
|
|
92
104
|
});
|
|
93
105
|
} else {
|
|
94
106
|
const tier = PRICING["topaz-image-upscale"].find((t) => 1 <= t.maxMP) ?? PRICING["topaz-image-upscale"][0];
|
|
@@ -97,8 +109,10 @@ function calculateWorkflowCost(nodes) {
|
|
|
97
109
|
nodeLabel: label,
|
|
98
110
|
nodeType: type,
|
|
99
111
|
model: getDataField(data, "model", "topaz-standard-v2"),
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
unitPrice: tier.price,
|
|
113
|
+
quantity: 1,
|
|
114
|
+
subtotal: tier.price,
|
|
115
|
+
unit: "per image"
|
|
102
116
|
});
|
|
103
117
|
}
|
|
104
118
|
continue;
|
|
@@ -106,19 +120,22 @@ function calculateWorkflowCost(nodes) {
|
|
|
106
120
|
if (type === "llm") {
|
|
107
121
|
const maxTokens = getDataField(data, "maxTokens", 1024);
|
|
108
122
|
const estimatedTokens = maxTokens * 3;
|
|
123
|
+
const subtotal = estimatedTokens * PRICING.llama;
|
|
109
124
|
estimates.push({
|
|
110
125
|
nodeId: node.id,
|
|
111
126
|
nodeLabel: label,
|
|
112
127
|
nodeType: type,
|
|
113
128
|
model: getDataField(data, "model", "llama"),
|
|
114
|
-
|
|
115
|
-
|
|
129
|
+
unitPrice: PRICING.llama,
|
|
130
|
+
quantity: estimatedTokens,
|
|
131
|
+
subtotal,
|
|
132
|
+
unit: `~${estimatedTokens} tokens`
|
|
116
133
|
});
|
|
117
134
|
}
|
|
118
135
|
}
|
|
119
136
|
return {
|
|
120
|
-
total: estimates.reduce((sum, e) => sum + e.
|
|
121
|
-
|
|
137
|
+
total: estimates.reduce((sum, e) => sum + e.subtotal, 0),
|
|
138
|
+
items: estimates
|
|
122
139
|
};
|
|
123
140
|
}
|
|
124
141
|
function formatCost(amount) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { nodeTypes, NodeDetailModal } from './chunk-
|
|
2
|
-
import { calculateWorkflowCost, formatCost } from './chunk-
|
|
1
|
+
import { nodeTypes, NodeDetailModal } from './chunk-WBR34V4L.mjs';
|
|
2
|
+
import { calculateWorkflowCost, formatCost } from './chunk-2JQSKIWR.mjs';
|
|
3
3
|
import { useContextMenu, useCanvasKeyboardShortcuts, ContextMenu } from './chunk-ZD2BADZO.mjs';
|
|
4
4
|
import { useUIStore, useSettingsStore, useExecutionStore } from './chunk-LT3ZJJL6.mjs';
|
|
5
5
|
import { useWorkflowStore, getHandleType } from './chunk-R727OFBR.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { calculateWorkflowCost, formatCost } from './chunk-
|
|
1
|
+
import { calculateWorkflowCost, formatCost } from './chunk-2JQSKIWR.mjs';
|
|
2
2
|
import { useSettingsStore, useExecutionStore, useUIStore } from './chunk-LT3ZJJL6.mjs';
|
|
3
3
|
import { useWorkflowStore } from './chunk-R727OFBR.mjs';
|
|
4
4
|
import { X, CloudOff, Loader2, Cloud, Check, ChevronDown, SaveAll, Save, FolderOpen, Bug, LayoutGrid, Undo2, Redo2, Settings, AlertCircle, Minus, Plus, Square, Play, ChevronUp, PlayCircle, RotateCcw, DollarSign, MoreVertical } from 'lucide-react';
|
|
@@ -690,7 +690,7 @@ function CostIndicator() {
|
|
|
690
690
|
const { openModal } = useUIStore();
|
|
691
691
|
const breakdown = useMemo(() => calculateWorkflowCost(nodes), [nodes]);
|
|
692
692
|
const displayCost = isRunning && actualCost > 0 ? actualCost : breakdown.total;
|
|
693
|
-
if (breakdown.
|
|
693
|
+
if (breakdown.items.length === 0) return null;
|
|
694
694
|
return /* @__PURE__ */ jsxs(
|
|
695
695
|
"button",
|
|
696
696
|
{
|
|
@@ -13,7 +13,7 @@ import { NODE_DEFINITIONS, NodeStatusEnum } from '@genfeedai/types';
|
|
|
13
13
|
import { useUpdateNodeInternals, NodeResizer, Handle, Position } from '@xyflow/react';
|
|
14
14
|
import { clsx } from 'clsx';
|
|
15
15
|
import { GitBranch, ArrowLeftFromLine, ArrowRightToLine, Subtitles, Pencil, Columns2, LayoutGrid, Grid3X3, Puzzle, Navigation, Volume2, AudioLines, Mic, Maximize, Crop, RefreshCw, AtSign, Download, Eye, CheckCircle, Share2, Scissors, Layers, Wand2, Maximize2, Brain, Video, Sparkles, Film, FileVideo, FileText, MessageSquare, Image as Image$1, Square, Lock, Unlock, Copy, RotateCcw, Loader2, ChevronDown, ChevronRight, AlertCircle, ImageIcon, Expand, Play, AlertTriangle, CheckCircle2, Upload, Link, X, Music, Save, Clock, Shapes, ChevronLeft, SplitSquareHorizontal, Zap, ZoomOut, ZoomIn } from 'lucide-react';
|
|
16
|
-
import { memo, forwardRef, useRef, useState, useCallback, useEffect, useImperativeHandle, useMemo,
|
|
16
|
+
import { memo, forwardRef, useRef, useState, useCallback, useEffect, useImperativeHandle, useMemo, Component, useLayoutEffect } from 'react';
|
|
17
17
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
18
18
|
import Image4 from 'next/image';
|
|
19
19
|
import { createPortal } from 'react-dom';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CommentNavigation,
|
|
1
|
+
export { C as CommentNavigation, u as useAIGenNode, a as useAIGenNodeHeader, b as useAutoLoadModelSchema, c as useCanGenerate, d as useCanvasKeyboardShortcuts, e as useCommentNavigation, f as useMediaUpload, g as useModelSelection, h as useNodeExecution, i as usePromptAutocomplete, j as useRequiredInputs } from './useCommentNavigation-BakbiiIc.js';
|
|
2
2
|
import { WorkflowNode, WorkflowEdge } from '@genfeedai/types';
|
|
3
|
-
import { a as ContextMenuPosition, C as ContextMenuType } from './contextMenuStore-DMg0hJQ1.
|
|
3
|
+
import { a as ContextMenuPosition, C as ContextMenuType } from './contextMenuStore-DMg0hJQ1.js';
|
|
4
4
|
import '@xyflow/react';
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'zustand';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { ConnectionDropMenu, EdgeToolbar, EditableEdge, GroupOverlay, HelperLines, NodeSearch, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './canvas.
|
|
2
|
-
export { BaseNode, nodeTypes } from './nodes.
|
|
3
|
-
export { DebugPanel, NodePalette, PanelContainer } from './panels.
|
|
4
|
-
export { BottomBar, CostIndicator, DropdownItem, OverflowMenu, OverflowMenuProps, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown, ToolbarDropdownProps } from './toolbar.
|
|
5
|
-
export { C as CommentNavigation,
|
|
1
|
+
export { ConnectionDropMenu, EdgeToolbar, EditableEdge, GroupOverlay, HelperLines, NodeSearch, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './canvas.js';
|
|
2
|
+
export { BaseNode, nodeTypes } from './nodes.js';
|
|
3
|
+
export { DebugPanel, NodePalette, PanelContainer } from './panels.js';
|
|
4
|
+
export { BottomBar, CostIndicator, DropdownItem, OverflowMenu, OverflowMenuProps, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown, ToolbarDropdownProps } from './toolbar.js';
|
|
5
|
+
export { C as CommentNavigation, u as useAIGenNode, a as useAIGenNodeHeader, b as useAutoLoadModelSchema, c as useCanGenerate, d as useCanvasKeyboardShortcuts, e as useCommentNavigation, f as useMediaUpload, g as useModelSelection, h as useNodeExecution, i as usePromptAutocomplete, j as useRequiredInputs } from './useCommentNavigation-BakbiiIc.js';
|
|
6
6
|
import { GroupColor } from '@genfeedai/types';
|
|
7
7
|
export { GroupColor, NodeGroup } from '@genfeedai/types';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
|
-
export { I as ImageHistoryItem,
|
|
10
|
-
export { WorkflowUIProvider, useWorkflowUIConfig } from './provider.
|
|
11
|
-
export { M as ModelBrowserModalProps, P as PromptLibraryService, a as PromptPickerProps, W as WorkflowUIConfig } from './types-
|
|
9
|
+
export { I as ImageHistoryItem, j as configurePromptLibrary, u as useAnnotationStore, k as useExecutionStore, l as usePromptEditorStore, m as usePromptLibraryStore, n as useSettingsStore, o as useUIStore, p as useWorkflowStore } from './promptLibraryStore-Dl3Q3cP6.js';
|
|
10
|
+
export { WorkflowUIProvider, useWorkflowUIConfig } from './provider.js';
|
|
11
|
+
export { M as ModelBrowserModalProps, P as PromptLibraryService, a as PromptPickerProps, W as WorkflowUIConfig } from './types-IEKYuYhu.js';
|
|
12
12
|
import '@xyflow/react';
|
|
13
13
|
import 'react';
|
|
14
14
|
import 'zustand';
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ConnectionDropMenu, DEFAULT_GROUP_COLORS, EdgeToolbar, EditableEdge, GROUP_COLORS, GlobalImageHistory, GroupOverlay, HelperLines, NodeSearch, NotificationToast, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './chunk-
|
|
2
|
-
export { BaseNode, nodeTypes } from './chunk-
|
|
1
|
+
export { ConnectionDropMenu, DEFAULT_GROUP_COLORS, EdgeToolbar, EditableEdge, GROUP_COLORS, GlobalImageHistory, GroupOverlay, HelperLines, NodeSearch, NotificationToast, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './chunk-4VEN4UN7.mjs';
|
|
2
|
+
export { BaseNode, nodeTypes } from './chunk-WBR34V4L.mjs';
|
|
3
3
|
import './chunk-ZJD5WMR3.mjs';
|
|
4
4
|
import './chunk-6PSJTBNV.mjs';
|
|
5
5
|
export { DebugPanel, NodePalette, PanelContainer } from './chunk-OQREHJXK.mjs';
|
|
6
|
-
export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-JT4Y5H3U.mjs';
|
|
7
|
+
import './chunk-2JQSKIWR.mjs';
|
|
8
8
|
import './chunk-OY7BRSGG.mjs';
|
|
9
9
|
export { useCommentNavigation } from './chunk-7H3WJJYS.mjs';
|
|
10
10
|
export { useCanvasKeyboardShortcuts } from './chunk-ZD2BADZO.mjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { HandleDefinition, NodeType, WorkflowNodeData,
|
|
1
|
+
import { HandleDefinition, NodeType, WorkflowNodeData, CubicBezier, EasingPreset, WorkflowNode, CostBreakdown, ImageModel, LipSyncModel, TextModel, VideoModel } from '@genfeedai/types';
|
|
2
|
+
export { CostBreakdown, NodeCostEstimate } from '@genfeedai/types';
|
|
2
3
|
import * as react from 'react';
|
|
3
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
|
|
@@ -324,18 +325,6 @@ declare function deduplicatedFetch(url: string, options?: RequestInit): Promise<
|
|
|
324
325
|
*/
|
|
325
326
|
declare function clearFetchCache(): void;
|
|
326
327
|
|
|
327
|
-
interface NodeCostEstimate {
|
|
328
|
-
nodeId: string;
|
|
329
|
-
nodeLabel: string;
|
|
330
|
-
nodeType: string;
|
|
331
|
-
model: string;
|
|
332
|
-
unit: string;
|
|
333
|
-
cost: number;
|
|
334
|
-
}
|
|
335
|
-
interface CostBreakdown {
|
|
336
|
-
total: number;
|
|
337
|
-
nodes: NodeCostEstimate[];
|
|
338
|
-
}
|
|
339
328
|
declare function calculateWorkflowCost(nodes: WorkflowNode[]): CostBreakdown;
|
|
340
329
|
declare function formatCost(amount: number): string;
|
|
341
330
|
|
|
@@ -407,4 +396,4 @@ declare function getLipSyncModelLabel(model: LipSyncModel): string;
|
|
|
407
396
|
declare function getLLMModelLabel(model: TextModel): string;
|
|
408
397
|
declare function lipSyncModelSupportsImage(model: LipSyncModel): boolean;
|
|
409
398
|
|
|
410
|
-
export { CONNECTION_FIELDS,
|
|
399
|
+
export { CONNECTION_FIELDS, CubicBezierEditor, DEFAULT_CUSTOM_BEZIER, DEFAULT_IMAGE_MODEL, DEFAULT_LIPSYNC_MODEL, DEFAULT_LLM_MODEL, DEFAULT_VIDEO_MODEL, EASING_BEZIER_MAP, EASING_PRESETS, type EasingFunction, type EasingPresetName, type GridCandidate, type GridCell, type GridDetectionResult, IMAGE_MODELS, IMAGE_MODEL_ID_MAP, IMAGE_MODEL_MAP, type ImageModelConfig, LIPSYNC_MODELS, LIPSYNC_SYNC_MODES, LLM_MODELS, LLM_MODEL_ID_MAP, LLM_MODEL_MAP, type LipSyncModelConfig, type MediaInfo, PRESET_BEZIERS, type TextModelConfig, VIDEO_MODELS, VIDEO_MODEL_ID_MAP, VIDEO_MODEL_MAP, type VideoModelConfig, analyzeWarpCurve, applySpeedCurve, calculateNodeSize, calculateNodeSizePreservingHeight, calculateWarpedDuration, calculateWorkflowCost, clearFetchCache, createAsymmetricEase, createBezierEasing, createGridForDimensions, deduplicatedFetch, detectAndSplitGrid, detectGrid, detectGridWithDimensions, easing, evaluateBezier, extractEnumValues, formatCost, generateHandlesFromSchema, getAllEasingNames, getEasingBezier, getEasingDisplayName, getEasingFunction, getGridCandidates, getImageDimensions$1 as getImageDimensions, getImageDimensions as getImageDimensionsFromDataUrl, getImageModelLabel, getLLMModelLabel, getLipSyncModelLabel, getMediaFromNode, getPresetBezier, getSchemaDefaults, getVideoDimensions as getVideoDimensionsFromUrl, getVideoMetadata, getVideoModelLabel, isSchemaHandle, lipSyncModelSupportsImage, splitImage, splitWithDimensions, supportsImageInput, validateRequiredSchemaFields, validateWarpFunction, warpTime };
|
package/dist/lib.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { easing, getEasingFunction } from './chunk-6PSJTBNV.mjs';
|
|
2
2
|
export { CubicBezierEditor, DEFAULT_CUSTOM_BEZIER, DEFAULT_IMAGE_MODEL, DEFAULT_LIPSYNC_MODEL, DEFAULT_LLM_MODEL, DEFAULT_VIDEO_MODEL, EASING_BEZIER_MAP, 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, PRESET_BEZIERS, VIDEO_MODELS, VIDEO_MODEL_ID_MAP, VIDEO_MODEL_MAP, applySpeedCurve, createAsymmetricEase, createBezierEasing, easing, evaluateBezier, generateHandlesFromSchema, getAllEasingNames, getEasingBezier, getEasingDisplayName, getEasingFunction, getImageModelLabel, getLLMModelLabel, getLipSyncModelLabel, getMediaFromNode, getPresetBezier, getVideoModelLabel, isSchemaHandle, lipSyncModelSupportsImage } from './chunk-6PSJTBNV.mjs';
|
|
3
|
-
export { calculateWorkflowCost, formatCost } from './chunk-
|
|
3
|
+
export { calculateWorkflowCost, formatCost } from './chunk-2JQSKIWR.mjs';
|
|
4
4
|
import './chunk-OY7BRSGG.mjs';
|
|
5
5
|
export { CONNECTION_FIELDS, extractEnumValues, getImageDimensions, getSchemaDefaults, getVideoMetadata, supportsImageInput, validateRequiredSchemaFields } from './chunk-EFXQT23N.mjs';
|
|
6
6
|
|
package/dist/nodes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AnimationNode, AnnotationNode, AudioInputNode, BaseNode, DownloadNode, ImageCompareNode, ImageGenNode, ImageGridSplitNode, ImageInputNode, LLMNode, LipSyncNode, MotionControlNode, NodeDetailModal, OutputGalleryNode, OutputNode, PromptConstructorNode, PromptNode, ReframeNode, ResizeNode, SubtitleNode, TextToSpeechNode, TranscribeNode, UpscaleNode, VideoFrameExtractNode, VideoGenNode, VideoInputNode, VideoStitchNode, VideoTrimNode, VoiceChangeNode, WorkflowInputNode, WorkflowOutputNode, WorkflowRefNode, nodeTypes, setWorkflowRefApi } from './chunk-
|
|
1
|
+
export { AnimationNode, AnnotationNode, AudioInputNode, BaseNode, DownloadNode, ImageCompareNode, ImageGenNode, ImageGridSplitNode, ImageInputNode, LLMNode, LipSyncNode, MotionControlNode, NodeDetailModal, OutputGalleryNode, OutputNode, PromptConstructorNode, PromptNode, ReframeNode, ResizeNode, SubtitleNode, TextToSpeechNode, TranscribeNode, UpscaleNode, VideoFrameExtractNode, VideoGenNode, VideoInputNode, VideoStitchNode, VideoTrimNode, VoiceChangeNode, WorkflowInputNode, WorkflowOutputNode, WorkflowRefNode, nodeTypes, setWorkflowRefApi } from './chunk-WBR34V4L.mjs';
|
|
2
2
|
import './chunk-ZJD5WMR3.mjs';
|
|
3
3
|
import './chunk-6PSJTBNV.mjs';
|
|
4
4
|
import './chunk-OY7BRSGG.mjs';
|
|
@@ -3,7 +3,7 @@ import * as _genfeedai_types from '@genfeedai/types';
|
|
|
3
3
|
import { HandleType, WorkflowNode, WorkflowEdge, NodeGroup, EdgeStyle, NodeType, WorkflowNodeData, GroupColor, WorkflowFile, ValidationResult, ProviderType, IPrompt, PromptCategory, IQueryPrompts, ICreatePrompt } from '@genfeedai/types';
|
|
4
4
|
import * as zundo from 'zundo';
|
|
5
5
|
import { XYPosition, NodeChange, EdgeChange, Connection } from '@xyflow/react';
|
|
6
|
-
import { P as PromptLibraryService } from './types-
|
|
6
|
+
import { P as PromptLibraryService } from './types-IEKYuYhu.js';
|
|
7
7
|
|
|
8
8
|
type ModalType = 'templates' | 'cost' | 'welcome' | 'settings' | 'promptLibrary' | 'modelBrowser' | 'nodeDetail' | 'shortcutHelp' | 'nodeSearch' | null;
|
|
9
9
|
type NodeDetailTab = 'preview' | 'history';
|
|
@@ -489,4 +489,4 @@ interface PromptLibraryStore {
|
|
|
489
489
|
}
|
|
490
490
|
declare const usePromptLibraryStore: zustand.UseBoundStore<zustand.StoreApi<PromptLibraryStore>>;
|
|
491
491
|
|
|
492
|
-
export { type
|
|
492
|
+
export { type AnnotationShape as A, type BaseShape as B, type CircleShape as C, type DebugPayload as D, type ExecutionStore as E, type FreehandShape as F, type ImageHistoryItem as I, type Job as J, type ModalType as M, type NodeDetailTab as N, PROVIDER_INFO as P, type RecentModel as R, type TextShape as T, type WorkflowStore as W, type AnnotationTool as a, type ArrowShape as b, type DefaultModelSettings as c, type ProviderConfig as d, type ProviderSettings as e, type RectangleShape as f, type ToolOptions as g, type WorkflowData as h, type WorkflowState as i, configurePromptLibrary as j, useExecutionStore as k, usePromptEditorStore as l, usePromptLibraryStore as m, useSettingsStore as n, useUIStore as o, useWorkflowStore as p, useAnnotationStore as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { W as WorkflowUIConfig } from './types-
|
|
4
|
-
export { F as FileUploadService, M as ModelBrowserModalProps, b as ModelSchemaService, P as PromptLibraryService, a as PromptPickerProps, c as WorkflowsApiService } from './types-
|
|
3
|
+
import { W as WorkflowUIConfig } from './types-IEKYuYhu.js';
|
|
4
|
+
export { F as FileUploadService, M as ModelBrowserModalProps, b as ModelSchemaService, P as PromptLibraryService, a as PromptPickerProps, c as WorkflowsApiService } from './types-IEKYuYhu.js';
|
|
5
5
|
import '@genfeedai/types';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { W as WorkflowStore } from './promptLibraryStore-
|
|
2
|
-
export {
|
|
1
|
+
import { W as WorkflowStore } from './promptLibraryStore-Dl3Q3cP6.js';
|
|
2
|
+
export { A as AnnotationShape, a as AnnotationTool, b as ArrowShape, B as BaseShape, C as CircleShape, D as DebugPayload, c as DefaultModelSettings, E as ExecutionStore, F as FreehandShape, J as Job, M as ModalType, N as NodeDetailTab, P as PROVIDER_INFO, d as ProviderConfig, e as ProviderSettings, R as RecentModel, f as RectangleShape, T as TextShape, g as ToolOptions, h as WorkflowData, i as WorkflowState, j as configurePromptLibrary, u as useAnnotationStore, k as useExecutionStore, l as usePromptEditorStore, m as usePromptLibraryStore, n as useSettingsStore, o as useUIStore, p as useWorkflowStore } from './promptLibraryStore-Dl3Q3cP6.js';
|
|
3
3
|
import * as _xyflow_react from '@xyflow/react';
|
|
4
4
|
import * as _genfeedai_types from '@genfeedai/types';
|
|
5
|
-
export { C as ContextMenuType, u as useContextMenuStore } from './contextMenuStore-DMg0hJQ1.
|
|
5
|
+
export { C as ContextMenuType, u as useContextMenuStore } from './contextMenuStore-DMg0hJQ1.js';
|
|
6
6
|
import 'zustand';
|
|
7
7
|
import 'zundo';
|
|
8
|
-
import './types-
|
|
8
|
+
import './types-IEKYuYhu.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/toolbar.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-JT4Y5H3U.mjs';
|
|
2
|
+
import './chunk-2JQSKIWR.mjs';
|
|
3
3
|
import './chunk-OY7BRSGG.mjs';
|
|
4
4
|
import './chunk-LDN7IX4Y.mjs';
|
|
5
5
|
import './chunk-LT3ZJJL6.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ProviderModel, ModelCapability, IQueryPrompts, IPrompt, ICreatePrompt } from '@genfeedai/types';
|
|
3
3
|
|
|
4
4
|
interface FileUploadService {
|
|
5
5
|
uploadFile: (path: string, file: File) => Promise<{
|
|
@@ -265,4 +265,4 @@ interface CommentNavigation {
|
|
|
265
265
|
*/
|
|
266
266
|
declare function useCommentNavigation(nodeId: string): CommentNavigation | null;
|
|
267
267
|
|
|
268
|
-
export { type CommentNavigation as C,
|
|
268
|
+
export { type CommentNavigation as C, useAIGenNodeHeader as a, useAutoLoadModelSchema as b, useCanGenerate as c, useCanvasKeyboardShortcuts as d, useCommentNavigation as e, useMediaUpload as f, useModelSelection as g, useNodeExecution as h, usePromptAutocomplete as i, useRequiredInputs as j, useAIGenNode as u };
|
package/package.json
CHANGED
|
@@ -1,70 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genfeedai/workflow-ui",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"license": "AGPL-3.0",
|
|
5
6
|
"description": "Shared UI components for Genfeed workflow editor",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/genfeedai/
|
|
9
|
-
"directory": "
|
|
9
|
+
"url": "git+https://github.com/genfeedai/packages.git",
|
|
10
|
+
"directory": "workflow-ui"
|
|
10
11
|
},
|
|
11
12
|
"publishConfig": {
|
|
12
13
|
"access": "public",
|
|
13
14
|
"registry": "https://registry.npmjs.org/"
|
|
14
15
|
},
|
|
15
|
-
"main": "./dist/index.js",
|
|
16
16
|
"module": "./dist/index.mjs",
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
20
|
"types": "./dist/index.d.ts",
|
|
21
|
-
"import": "./dist/index.mjs"
|
|
22
|
-
"require": "./dist/index.js"
|
|
21
|
+
"import": "./dist/index.mjs"
|
|
23
22
|
},
|
|
24
23
|
"./canvas": {
|
|
25
24
|
"types": "./dist/canvas.d.ts",
|
|
26
|
-
"import": "./dist/canvas.mjs"
|
|
27
|
-
"require": "./dist/canvas.js"
|
|
25
|
+
"import": "./dist/canvas.mjs"
|
|
28
26
|
},
|
|
29
27
|
"./nodes": {
|
|
30
28
|
"types": "./dist/nodes.d.ts",
|
|
31
|
-
"import": "./dist/nodes.mjs"
|
|
32
|
-
"require": "./dist/nodes.js"
|
|
29
|
+
"import": "./dist/nodes.mjs"
|
|
33
30
|
},
|
|
34
31
|
"./panels": {
|
|
35
32
|
"types": "./dist/panels.d.ts",
|
|
36
|
-
"import": "./dist/panels.mjs"
|
|
37
|
-
"require": "./dist/panels.js"
|
|
33
|
+
"import": "./dist/panels.mjs"
|
|
38
34
|
},
|
|
39
35
|
"./toolbar": {
|
|
40
36
|
"types": "./dist/toolbar.d.ts",
|
|
41
|
-
"import": "./dist/toolbar.mjs"
|
|
42
|
-
"require": "./dist/toolbar.js"
|
|
37
|
+
"import": "./dist/toolbar.mjs"
|
|
43
38
|
},
|
|
44
39
|
"./hooks": {
|
|
45
40
|
"types": "./dist/hooks.d.ts",
|
|
46
|
-
"import": "./dist/hooks.mjs"
|
|
47
|
-
"require": "./dist/hooks.js"
|
|
41
|
+
"import": "./dist/hooks.mjs"
|
|
48
42
|
},
|
|
49
43
|
"./stores": {
|
|
50
44
|
"types": "./dist/stores.d.ts",
|
|
51
|
-
"import": "./dist/stores.mjs"
|
|
52
|
-
"require": "./dist/stores.js"
|
|
45
|
+
"import": "./dist/stores.mjs"
|
|
53
46
|
},
|
|
54
47
|
"./provider": {
|
|
55
48
|
"types": "./dist/provider.d.ts",
|
|
56
|
-
"import": "./dist/provider.mjs"
|
|
57
|
-
"require": "./dist/provider.js"
|
|
49
|
+
"import": "./dist/provider.mjs"
|
|
58
50
|
},
|
|
59
51
|
"./ui": {
|
|
60
52
|
"types": "./dist/ui.d.ts",
|
|
61
|
-
"import": "./dist/ui.mjs"
|
|
62
|
-
"require": "./dist/ui.js"
|
|
53
|
+
"import": "./dist/ui.mjs"
|
|
63
54
|
},
|
|
64
55
|
"./lib": {
|
|
65
56
|
"types": "./dist/lib.d.ts",
|
|
66
|
-
"import": "./dist/lib.mjs"
|
|
67
|
-
"require": "./dist/lib.js"
|
|
57
|
+
"import": "./dist/lib.mjs"
|
|
68
58
|
},
|
|
69
59
|
"./styles": "./src/styles/workflow-ui.css"
|
|
70
60
|
},
|
|
@@ -85,7 +75,7 @@
|
|
|
85
75
|
},
|
|
86
76
|
"dependencies": {
|
|
87
77
|
"@dagrejs/dagre": "^2.0.4",
|
|
88
|
-
"@genfeedai/types": "
|
|
78
|
+
"@genfeedai/types": "workspace:*",
|
|
89
79
|
"@radix-ui/react-checkbox": "^1.1.4",
|
|
90
80
|
"@radix-ui/react-label": "^2.1.2",
|
|
91
81
|
"@radix-ui/react-select": "^2.1.6",
|
|
@@ -98,21 +88,22 @@
|
|
|
98
88
|
"tailwind-merge": "^3.4.0"
|
|
99
89
|
},
|
|
100
90
|
"devDependencies": {
|
|
91
|
+
"@genfeedai/core": "workspace:*",
|
|
101
92
|
"@testing-library/jest-dom": "6.6.3",
|
|
102
93
|
"@testing-library/react": "16.2.0",
|
|
103
|
-
"@
|
|
104
|
-
"jsdom": "26.0.0",
|
|
105
|
-
"react-compare-slider": "^3.1.0",
|
|
94
|
+
"@types/node": "^25.2.3",
|
|
106
95
|
"@types/react": "19.2.4",
|
|
107
|
-
"@types/react-dom": "19.2.
|
|
96
|
+
"@types/react-dom": "19.2.3",
|
|
108
97
|
"@xyflow/react": "12.10.0",
|
|
98
|
+
"jsdom": "26.0.0",
|
|
109
99
|
"react": "19.2.4",
|
|
100
|
+
"react-compare-slider": "^3.1.0",
|
|
110
101
|
"react-dom": "19.2.4",
|
|
111
102
|
"tsup": "8.4.0",
|
|
112
103
|
"typescript": "5.9.3",
|
|
113
104
|
"vitest": "3.0.4",
|
|
114
|
-
"
|
|
115
|
-
"
|
|
105
|
+
"zundo": "2.3.0",
|
|
106
|
+
"zustand": "5.0.3"
|
|
116
107
|
},
|
|
117
108
|
"scripts": {
|
|
118
109
|
"build": "tsup",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|