@genfeedai/workflow-ui 0.1.4 → 0.2.0
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.js +18 -0
- package/dist/{chunk-ZJD5WMR3.mjs → chunk-3SPPKCWR.js} +1 -1
- package/dist/{chunk-PANZDSP6.mjs → chunk-4K2EIMYN.js} +12 -12
- package/dist/{chunk-OQREHJXK.mjs → chunk-6VGAWQYY.js} +1 -1
- package/dist/{chunk-ZD2BADZO.mjs → chunk-CNVZKMOW.js} +4 -4
- package/dist/{chunk-7H3WJJYS.mjs → chunk-LAMWSW6I.js} +1 -1
- package/dist/{chunk-O5II6BOJ.mjs → chunk-O7RUCZZL.js} +5 -5
- package/dist/{chunk-JTPADIUO.mjs → chunk-QY4UD2Y5.js} +33 -16
- package/dist/{chunk-AUQGOJOQ.mjs → chunk-R5MPTHV4.js} +4 -4
- package/dist/{chunk-FT33LFII.mjs → chunk-RJ262NXS.js} +1 -1
- package/dist/{chunk-LT3ZJJL6.mjs → chunk-V5WWAXJ4.js} +2 -2
- package/dist/{chunk-GWBGK3KL.mjs → chunk-YFWPE5NP.js} +5 -5
- package/dist/{hooks.d.mts → hooks.d.ts} +2 -2
- package/dist/hooks.js +11 -0
- package/dist/{index.d.mts → index.d.ts} +8 -8
- package/dist/{index.mjs → index.js} +21 -21
- package/dist/{lib.d.mts → lib.d.ts} +3 -14
- package/dist/{lib.mjs → lib.js} +5 -5
- package/dist/{nodes.mjs → nodes.js} +14 -14
- package/dist/panels.js +3 -0
- package/dist/{promptLibraryStore-Bgw5LzvD.d.mts → promptLibraryStore-Dl3Q3cP6.d.ts} +2 -2
- package/dist/{provider.d.mts → provider.d.ts} +2 -2
- package/dist/provider.js +3 -0
- package/dist/{stores.d.mts → stores.d.ts} +4 -4
- package/dist/{stores.mjs → stores.js} +6 -6
- package/dist/toolbar.js +6 -0
- package/dist/{types-CF6DPx0P.d.mts → types-IEKYuYhu.d.ts} +1 -1
- package/dist/{ui.mjs → ui.js} +2 -2
- package/dist/{useCommentNavigation-NzJjkaj2.d.mts → useCommentNavigation-BakbiiIc.d.ts} +1 -1
- package/dist/workflowStore-G2ABNRTV.js +2 -0
- package/package.json +22 -31
- package/dist/canvas.mjs +0 -18
- package/dist/hooks.mjs +0 -11
- package/dist/panels.mjs +0 -3
- package/dist/provider.mjs +0 -3
- package/dist/toolbar.mjs +0 -6
- package/dist/workflowStore-UAAKOOIK.mjs +0 -2
- /package/dist/{canvas.d.mts → canvas.d.ts} +0 -0
- /package/dist/{chunk-OY7BRSGG.mjs → chunk-32VY4FCH.js} +0 -0
- /package/dist/{chunk-7SKSRSS7.mjs → chunk-5HJFQVUR.js} +0 -0
- /package/dist/{chunk-LDN7IX4Y.mjs → chunk-5LQ4QBR5.js} +0 -0
- /package/dist/{chunk-CV4M7CNU.mjs → chunk-6DOEUDD5.js} +0 -0
- /package/dist/{chunk-R727OFBR.mjs → chunk-6HRQDJJD.js} +0 -0
- /package/dist/{chunk-EFXQT23N.mjs → chunk-EMUMKW5C.js} +0 -0
- /package/dist/{chunk-MLJJBBTB.mjs → chunk-JLWKW3G5.js} +0 -0
- /package/dist/{chunk-VRN3UWE5.mjs → chunk-RXNEDWK2.js} +0 -0
- /package/dist/{chunk-6PSJTBNV.mjs → chunk-STNQUXPK.js} +0 -0
- /package/dist/{chunk-PCIWWD37.mjs → chunk-SZM7UXKW.js} +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.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { ConnectionDropMenu, EdgeToolbar, EditableEdge, GroupOverlay, HelperLines, NodeSearch, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './chunk-O7RUCZZL.js';
|
|
2
|
+
import './chunk-4K2EIMYN.js';
|
|
3
|
+
import './chunk-3SPPKCWR.js';
|
|
4
|
+
import './chunk-STNQUXPK.js';
|
|
5
|
+
import './chunk-QY4UD2Y5.js';
|
|
6
|
+
import './chunk-32VY4FCH.js';
|
|
7
|
+
import './chunk-CNVZKMOW.js';
|
|
8
|
+
import './chunk-YFWPE5NP.js';
|
|
9
|
+
import './chunk-5HJFQVUR.js';
|
|
10
|
+
import './chunk-EMUMKW5C.js';
|
|
11
|
+
import './chunk-6DOEUDD5.js';
|
|
12
|
+
import './chunk-SZM7UXKW.js';
|
|
13
|
+
import './chunk-JLWKW3G5.js';
|
|
14
|
+
import './chunk-V5WWAXJ4.js';
|
|
15
|
+
import './chunk-6HRQDJJD.js';
|
|
16
|
+
import './chunk-5LQ4QBR5.js';
|
|
17
|
+
import './chunk-RJ262NXS.js';
|
|
18
|
+
import './chunk-RXNEDWK2.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cn } from './chunk-
|
|
1
|
+
import { cn } from './chunk-5HJFQVUR.js';
|
|
2
2
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
3
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
4
4
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Checkbox, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Slider, Label, Input, GridPositionSelector, ComparisonSlider } from './chunk-
|
|
2
|
-
import { generateHandlesFromSchema, DEFAULT_IMAGE_MODEL, IMAGE_MODEL_MAP, IMAGE_MODEL_ID_MAP, IMAGE_MODELS, LIPSYNC_MODELS, LIPSYNC_SYNC_MODES, DEFAULT_LLM_MODEL, LLM_MODEL_MAP, LLM_MODEL_ID_MAP, LLM_MODELS, DEFAULT_VIDEO_MODEL, VIDEO_MODEL_MAP, VIDEO_MODEL_ID_MAP, VIDEO_MODELS, EASING_PRESETS, CubicBezierEditor, getMediaFromNode } from './chunk-
|
|
3
|
-
import { LUMA_ASPECT_RATIOS } from './chunk-
|
|
4
|
-
import { useNodeExecution, useCanGenerate, useModelSelection, useAutoLoadModelSchema, useAIGenNode, useAIGenNodeHeader, useMediaUpload, usePromptAutocomplete, useRequiredInputs } from './chunk-
|
|
5
|
-
import { Button } from './chunk-
|
|
6
|
-
import { getImageDimensions, getVideoMetadata } from './chunk-
|
|
7
|
-
import { usePromptEditorStore, useAnnotationStore } from './chunk-
|
|
8
|
-
import { useUIStore, useExecutionStore } from './chunk-
|
|
9
|
-
import { useWorkflowStore } from './chunk-
|
|
10
|
-
import { useWorkflowUIConfig } from './chunk-
|
|
11
|
-
import { usePromptLibraryStore } from './chunk-
|
|
1
|
+
import { Checkbox, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Slider, Label, Input, GridPositionSelector, ComparisonSlider } from './chunk-3SPPKCWR.js';
|
|
2
|
+
import { generateHandlesFromSchema, DEFAULT_IMAGE_MODEL, IMAGE_MODEL_MAP, IMAGE_MODEL_ID_MAP, IMAGE_MODELS, LIPSYNC_MODELS, LIPSYNC_SYNC_MODES, DEFAULT_LLM_MODEL, LLM_MODEL_MAP, LLM_MODEL_ID_MAP, LLM_MODELS, DEFAULT_VIDEO_MODEL, VIDEO_MODEL_MAP, VIDEO_MODEL_ID_MAP, VIDEO_MODELS, EASING_PRESETS, CubicBezierEditor, getMediaFromNode } from './chunk-STNQUXPK.js';
|
|
3
|
+
import { LUMA_ASPECT_RATIOS } from './chunk-32VY4FCH.js';
|
|
4
|
+
import { useNodeExecution, useCanGenerate, useModelSelection, useAutoLoadModelSchema, useAIGenNode, useAIGenNodeHeader, useMediaUpload, usePromptAutocomplete, useRequiredInputs } from './chunk-YFWPE5NP.js';
|
|
5
|
+
import { Button } from './chunk-5HJFQVUR.js';
|
|
6
|
+
import { getImageDimensions, getVideoMetadata } from './chunk-EMUMKW5C.js';
|
|
7
|
+
import { usePromptEditorStore, useAnnotationStore } from './chunk-6DOEUDD5.js';
|
|
8
|
+
import { useUIStore, useExecutionStore } from './chunk-V5WWAXJ4.js';
|
|
9
|
+
import { useWorkflowStore } from './chunk-6HRQDJJD.js';
|
|
10
|
+
import { useWorkflowUIConfig } from './chunk-RJ262NXS.js';
|
|
11
|
+
import { usePromptLibraryStore } from './chunk-RXNEDWK2.js';
|
|
12
12
|
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,4 +1,4 @@
|
|
|
1
|
-
import { useExecutionStore, useUIStore } from './chunk-
|
|
1
|
+
import { useExecutionStore, useUIStore } from './chunk-V5WWAXJ4.js';
|
|
2
2
|
import { getNodesByCategory } from '@genfeedai/types';
|
|
3
3
|
import { Bug, Trash2, X, ChevronDown, ChevronRight, Copy, PanelLeftClose, Search, GitBranch, ArrowLeftFromLine, ArrowRightToLine, Download, Eye, CheckCircle, Columns2, LayoutGrid, Subtitles, Pencil, Grid3X3, Maximize, Crop, Film, Scissors, Layers, Wand2, Maximize2, Navigation, AudioLines, Mic, Brain, Video, Sparkles, Puzzle, Volume2, FileVideo, FileText, MessageSquare, Image } from 'lucide-react';
|
|
4
4
|
import { forwardRef, memo, useCallback, useState, useMemo } from 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { selectNodes, selectEdges, selectRemoveNode, selectDuplicateNode, selectAddNode, useContextMenuStore, selectToggleNodeLock, selectCreateGroup, selectWorkflowId, selectSetSelectedNodeIds, selectUpdateNodeData } from './chunk-
|
|
2
|
-
import { useSettingsStore } from './chunk-
|
|
3
|
-
import { useWorkflowStore } from './chunk-
|
|
4
|
-
import { useWorkflowUIConfig } from './chunk-
|
|
1
|
+
import { selectNodes, selectEdges, selectRemoveNode, selectDuplicateNode, selectAddNode, useContextMenuStore, selectToggleNodeLock, selectCreateGroup, selectWorkflowId, selectSetSelectedNodeIds, selectUpdateNodeData } from './chunk-SZM7UXKW.js';
|
|
2
|
+
import { useSettingsStore } from './chunk-V5WWAXJ4.js';
|
|
3
|
+
import { useWorkflowStore } from './chunk-6HRQDJJD.js';
|
|
4
|
+
import { useWorkflowUIConfig } from './chunk-RJ262NXS.js';
|
|
5
5
|
import { useEffect, useState, useCallback, useRef, useMemo } from 'react';
|
|
6
6
|
import { nanoid } from 'nanoid';
|
|
7
7
|
import { useReactFlow } from '@xyflow/react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { nodeTypes, NodeDetailModal } from './chunk-
|
|
2
|
-
import { calculateWorkflowCost, formatCost } from './chunk-
|
|
3
|
-
import { useContextMenu, useCanvasKeyboardShortcuts, ContextMenu } from './chunk-
|
|
4
|
-
import { useUIStore, useSettingsStore, useExecutionStore } from './chunk-
|
|
5
|
-
import { useWorkflowStore, getHandleType } from './chunk-
|
|
1
|
+
import { nodeTypes, NodeDetailModal } from './chunk-4K2EIMYN.js';
|
|
2
|
+
import { calculateWorkflowCost, formatCost } from './chunk-QY4UD2Y5.js';
|
|
3
|
+
import { useContextMenu, useCanvasKeyboardShortcuts, ContextMenu } from './chunk-CNVZKMOW.js';
|
|
4
|
+
import { useUIStore, useSettingsStore, useExecutionStore } from './chunk-V5WWAXJ4.js';
|
|
5
|
+
import { useWorkflowStore, getHandleType } from './chunk-6HRQDJJD.js';
|
|
6
6
|
import { useReactFlow, getBezierPath, BaseEdge, useNodes, ViewportPortal, useViewport, useStore, ReactFlow, SelectionMode, ConnectionMode, Background, BackgroundVariant, Controls, MiniMap } from '@xyflow/react';
|
|
7
7
|
import { Plus, Search, Pause, Play, Trash2, AlignHorizontalSpaceAround, AlignVerticalSpaceAround, Grid3X3, Ungroup, Group, Palette, Lock, Unlock, X, Keyboard, PanelLeft, XCircle, AlertTriangle, CheckCircle, Info, Check, Copy, DollarSign } from 'lucide-react';
|
|
8
8
|
import { memo, useState, useRef, useMemo, useEffect, useCallback } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PRICING, DEFAULT_VIDEO_DURATION, IMAGE_NODE_TYPES, VIDEO_NODE_TYPES, LUMA_NODE_TYPES, TOPAZ_NODE_TYPES } from './chunk-
|
|
1
|
+
import { PRICING, DEFAULT_VIDEO_DURATION, IMAGE_NODE_TYPES, VIDEO_NODE_TYPES, LUMA_NODE_TYPES, TOPAZ_NODE_TYPES } from './chunk-32VY4FCH.js';
|
|
2
2
|
|
|
3
3
|
// src/lib/costCalculator.ts
|
|
4
4
|
function isNodeType(type, list) {
|
|
@@ -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,6 +1,6 @@
|
|
|
1
|
-
import { calculateWorkflowCost, formatCost } from './chunk-
|
|
2
|
-
import { useSettingsStore, useExecutionStore, useUIStore } from './chunk-
|
|
3
|
-
import { useWorkflowStore } from './chunk-
|
|
1
|
+
import { calculateWorkflowCost, formatCost } from './chunk-QY4UD2Y5.js';
|
|
2
|
+
import { useSettingsStore, useExecutionStore, useUIStore } from './chunk-V5WWAXJ4.js';
|
|
3
|
+
import { useWorkflowStore } from './chunk-6HRQDJJD.js';
|
|
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';
|
|
5
5
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -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
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useWorkflowStore } from './chunk-
|
|
1
|
+
import { useWorkflowStore } from './chunk-6HRQDJJD.js';
|
|
2
2
|
import { create } from 'zustand';
|
|
3
3
|
import { ProviderTypeEnum, NodeStatusEnum } from '@genfeedai/types';
|
|
4
4
|
|
|
@@ -218,7 +218,7 @@ var useSettingsStore = create((set, get) => {
|
|
|
218
218
|
},
|
|
219
219
|
setEdgeStyle: (style) => {
|
|
220
220
|
setAndPersist(() => ({ edgeStyle: style }));
|
|
221
|
-
import('./workflowStore-
|
|
221
|
+
import('./workflowStore-G2ABNRTV.js').then(({ useWorkflowStore: useWorkflowStore2 }) => {
|
|
222
222
|
useWorkflowStore2.getState().setEdgeStyle(style);
|
|
223
223
|
});
|
|
224
224
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button } from './chunk-
|
|
2
|
-
import { extractEnumValues, supportsImageInput, validateRequiredSchemaFields, CONNECTION_FIELDS, getSchemaDefaults, getImageDimensions, getVideoMetadata } from './chunk-
|
|
3
|
-
import { useExecutionStore } from './chunk-
|
|
4
|
-
import { useWorkflowStore } from './chunk-
|
|
5
|
-
import { useWorkflowUIConfig } from './chunk-
|
|
1
|
+
import { Button } from './chunk-5HJFQVUR.js';
|
|
2
|
+
import { extractEnumValues, supportsImageInput, validateRequiredSchemaFields, CONNECTION_FIELDS, getSchemaDefaults, getImageDimensions, getVideoMetadata } from './chunk-EMUMKW5C.js';
|
|
3
|
+
import { useExecutionStore } from './chunk-V5WWAXJ4.js';
|
|
4
|
+
import { useWorkflowStore } from './chunk-6HRQDJJD.js';
|
|
5
|
+
import { useWorkflowUIConfig } from './chunk-RJ262NXS.js';
|
|
6
6
|
import { useMemo, useCallback, useRef, useEffect, useState } from 'react';
|
|
7
7
|
import { ChevronDown, Expand, Square, Play } from 'lucide-react';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -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';
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { useCommentNavigation } from './chunk-LAMWSW6I.js';
|
|
2
|
+
export { useCanvasKeyboardShortcuts, useContextMenu, useNodeActions, usePaneActions } from './chunk-CNVZKMOW.js';
|
|
3
|
+
export { useAIGenNode, useAIGenNodeHeader, useAutoLoadModelSchema, useCanGenerate, useMediaUpload, useModelSelection, useNodeExecution, usePromptAutocomplete, useRequiredInputs } from './chunk-YFWPE5NP.js';
|
|
4
|
+
import './chunk-5HJFQVUR.js';
|
|
5
|
+
import './chunk-EMUMKW5C.js';
|
|
6
|
+
import './chunk-SZM7UXKW.js';
|
|
7
|
+
import './chunk-JLWKW3G5.js';
|
|
8
|
+
import './chunk-V5WWAXJ4.js';
|
|
9
|
+
import './chunk-6HRQDJJD.js';
|
|
10
|
+
import './chunk-RJ262NXS.js';
|
|
11
|
+
import './chunk-RXNEDWK2.js';
|
|
@@ -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';
|
|
@@ -1,21 +1,21 @@
|
|
|
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-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
export { DebugPanel, NodePalette, PanelContainer } from './chunk-
|
|
6
|
-
export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
export { useCommentNavigation } from './chunk-
|
|
10
|
-
export { useCanvasKeyboardShortcuts } from './chunk-
|
|
11
|
-
export { useAIGenNode, useAIGenNodeHeader, useAutoLoadModelSchema, useCanGenerate, useMediaUpload, useModelSelection, useNodeExecution, usePromptAutocomplete, useRequiredInputs } from './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
export { useAnnotationStore, usePromptEditorStore } from './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
export { useExecutionStore, useSettingsStore, useUIStore } from './chunk-
|
|
18
|
-
export { useWorkflowStore } from './chunk-
|
|
19
|
-
import './chunk-
|
|
20
|
-
export { WorkflowUIProvider, useWorkflowUIConfig } from './chunk-
|
|
21
|
-
export { configurePromptLibrary, usePromptLibraryStore } from './chunk-
|
|
1
|
+
export { ConnectionDropMenu, DEFAULT_GROUP_COLORS, EdgeToolbar, EditableEdge, GROUP_COLORS, GlobalImageHistory, GroupOverlay, HelperLines, NodeSearch, NotificationToast, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './chunk-O7RUCZZL.js';
|
|
2
|
+
export { BaseNode, nodeTypes } from './chunk-4K2EIMYN.js';
|
|
3
|
+
import './chunk-3SPPKCWR.js';
|
|
4
|
+
import './chunk-STNQUXPK.js';
|
|
5
|
+
export { DebugPanel, NodePalette, PanelContainer } from './chunk-6VGAWQYY.js';
|
|
6
|
+
export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-R5MPTHV4.js';
|
|
7
|
+
import './chunk-QY4UD2Y5.js';
|
|
8
|
+
import './chunk-32VY4FCH.js';
|
|
9
|
+
export { useCommentNavigation } from './chunk-LAMWSW6I.js';
|
|
10
|
+
export { useCanvasKeyboardShortcuts } from './chunk-CNVZKMOW.js';
|
|
11
|
+
export { useAIGenNode, useAIGenNodeHeader, useAutoLoadModelSchema, useCanGenerate, useMediaUpload, useModelSelection, useNodeExecution, usePromptAutocomplete, useRequiredInputs } from './chunk-YFWPE5NP.js';
|
|
12
|
+
import './chunk-5HJFQVUR.js';
|
|
13
|
+
import './chunk-EMUMKW5C.js';
|
|
14
|
+
export { useAnnotationStore, usePromptEditorStore } from './chunk-6DOEUDD5.js';
|
|
15
|
+
import './chunk-SZM7UXKW.js';
|
|
16
|
+
import './chunk-JLWKW3G5.js';
|
|
17
|
+
export { useExecutionStore, useSettingsStore, useUIStore } from './chunk-V5WWAXJ4.js';
|
|
18
|
+
export { useWorkflowStore } from './chunk-6HRQDJJD.js';
|
|
19
|
+
import './chunk-5LQ4QBR5.js';
|
|
20
|
+
export { WorkflowUIProvider, useWorkflowUIConfig } from './chunk-RJ262NXS.js';
|
|
21
|
+
export { configurePromptLibrary, usePromptLibraryStore } from './chunk-RXNEDWK2.js';
|
|
@@ -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 → lib.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { easing, getEasingFunction } from './chunk-
|
|
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-
|
|
3
|
-
export { calculateWorkflowCost, formatCost } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
export { CONNECTION_FIELDS, extractEnumValues, getImageDimensions, getSchemaDefaults, getVideoMetadata, supportsImageInput, validateRequiredSchemaFields } from './chunk-
|
|
1
|
+
import { easing, getEasingFunction } from './chunk-STNQUXPK.js';
|
|
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-STNQUXPK.js';
|
|
3
|
+
export { calculateWorkflowCost, formatCost } from './chunk-QY4UD2Y5.js';
|
|
4
|
+
import './chunk-32VY4FCH.js';
|
|
5
|
+
export { CONNECTION_FIELDS, extractEnumValues, getImageDimensions, getSchemaDefaults, getVideoMetadata, supportsImageInput, validateRequiredSchemaFields } from './chunk-EMUMKW5C.js';
|
|
6
6
|
|
|
7
7
|
// src/lib/speedCurve.ts
|
|
8
8
|
var INVERSE_TOLERANCE = 1e-6;
|
|
@@ -1,14 +1,14 @@
|
|
|
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-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './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-4K2EIMYN.js';
|
|
2
|
+
import './chunk-3SPPKCWR.js';
|
|
3
|
+
import './chunk-STNQUXPK.js';
|
|
4
|
+
import './chunk-32VY4FCH.js';
|
|
5
|
+
import './chunk-YFWPE5NP.js';
|
|
6
|
+
import './chunk-5HJFQVUR.js';
|
|
7
|
+
import './chunk-EMUMKW5C.js';
|
|
8
|
+
import './chunk-6DOEUDD5.js';
|
|
9
|
+
import './chunk-JLWKW3G5.js';
|
|
10
|
+
import './chunk-V5WWAXJ4.js';
|
|
11
|
+
import './chunk-6HRQDJJD.js';
|
|
12
|
+
import './chunk-5LQ4QBR5.js';
|
|
13
|
+
import './chunk-RJ262NXS.js';
|
|
14
|
+
import './chunk-RXNEDWK2.js';
|
package/dist/panels.js
ADDED
|
@@ -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
|
/**
|
package/dist/provider.js
ADDED
|
@@ -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
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { useAnnotationStore, usePromptEditorStore } from './chunk-
|
|
2
|
-
export { createSelectGroupByNodeId, createSelectIsNodeSelected, createSelectNodeById, selectAddNode, selectAddNodesAndEdges, selectCreateGroup, selectDeleteGroup, selectDuplicateNode, selectEdgeStyle, selectEdges, selectFindCompatibleHandle, selectGetConnectedNodeIds, selectGetNodeById, selectGroups, selectIsDirty, selectIsLoading, selectIsSaving, selectIsValidConnection, selectNavigationTargetId, selectNodes, selectOnConnect, selectOnEdgesChange, selectOnNodesChange, selectRemoveEdge, selectRemoveNode, selectSelectedNodeIds, selectSetDirty, selectSetSelectedNodeIds, selectToggleNodeLock, selectUnlockAllNodes, selectUpdateNodeData, selectWorkflowId, selectWorkflowName, useContextMenuStore } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
export { PROVIDER_INFO, useExecutionStore, useSettingsStore, useUIStore } from './chunk-
|
|
5
|
-
export { useWorkflowStore } from './chunk-
|
|
6
|
-
export { configurePromptLibrary, usePromptLibraryStore } from './chunk-
|
|
1
|
+
export { useAnnotationStore, usePromptEditorStore } from './chunk-6DOEUDD5.js';
|
|
2
|
+
export { createSelectGroupByNodeId, createSelectIsNodeSelected, createSelectNodeById, selectAddNode, selectAddNodesAndEdges, selectCreateGroup, selectDeleteGroup, selectDuplicateNode, selectEdgeStyle, selectEdges, selectFindCompatibleHandle, selectGetConnectedNodeIds, selectGetNodeById, selectGroups, selectIsDirty, selectIsLoading, selectIsSaving, selectIsValidConnection, selectNavigationTargetId, selectNodes, selectOnConnect, selectOnEdgesChange, selectOnNodesChange, selectRemoveEdge, selectRemoveNode, selectSelectedNodeIds, selectSetDirty, selectSetSelectedNodeIds, selectToggleNodeLock, selectUnlockAllNodes, selectUpdateNodeData, selectWorkflowId, selectWorkflowName, useContextMenuStore } from './chunk-SZM7UXKW.js';
|
|
3
|
+
import './chunk-JLWKW3G5.js';
|
|
4
|
+
export { PROVIDER_INFO, useExecutionStore, useSettingsStore, useUIStore } from './chunk-V5WWAXJ4.js';
|
|
5
|
+
export { useWorkflowStore } from './chunk-6HRQDJJD.js';
|
|
6
|
+
export { configurePromptLibrary, usePromptLibraryStore } from './chunk-RXNEDWK2.js';
|
package/dist/toolbar.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-R5MPTHV4.js';
|
|
2
|
+
import './chunk-QY4UD2Y5.js';
|
|
3
|
+
import './chunk-32VY4FCH.js';
|
|
4
|
+
import './chunk-JLWKW3G5.js';
|
|
5
|
+
import './chunk-V5WWAXJ4.js';
|
|
6
|
+
import './chunk-6HRQDJJD.js';
|
|
@@ -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<{
|
package/dist/{ui.mjs → ui.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Checkbox, ComparisonSlider, GridPositionSelector, Input, Label, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Slider } from './chunk-
|
|
2
|
-
export { Button, buttonVariants, cn } from './chunk-
|
|
1
|
+
export { Checkbox, ComparisonSlider, GridPositionSelector, Input, Label, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Slider } from './chunk-3SPPKCWR.js';
|
|
2
|
+
export { Button, buttonVariants, cn } from './chunk-5HJFQVUR.js';
|
|
@@ -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.
|
|
3
|
+
"version": "0.2.0",
|
|
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": "^0.2.0",
|
|
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": "^0.2.0",
|
|
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",
|
package/dist/canvas.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { ConnectionDropMenu, EdgeToolbar, EditableEdge, GroupOverlay, HelperLines, NodeSearch, PauseEdge, ReferenceEdge, ShortcutHelpModal, WorkflowCanvas } from './chunk-O5II6BOJ.mjs';
|
|
2
|
-
import './chunk-PANZDSP6.mjs';
|
|
3
|
-
import './chunk-ZJD5WMR3.mjs';
|
|
4
|
-
import './chunk-6PSJTBNV.mjs';
|
|
5
|
-
import './chunk-JTPADIUO.mjs';
|
|
6
|
-
import './chunk-OY7BRSGG.mjs';
|
|
7
|
-
import './chunk-ZD2BADZO.mjs';
|
|
8
|
-
import './chunk-GWBGK3KL.mjs';
|
|
9
|
-
import './chunk-7SKSRSS7.mjs';
|
|
10
|
-
import './chunk-EFXQT23N.mjs';
|
|
11
|
-
import './chunk-CV4M7CNU.mjs';
|
|
12
|
-
import './chunk-PCIWWD37.mjs';
|
|
13
|
-
import './chunk-LDN7IX4Y.mjs';
|
|
14
|
-
import './chunk-LT3ZJJL6.mjs';
|
|
15
|
-
import './chunk-R727OFBR.mjs';
|
|
16
|
-
import './chunk-MLJJBBTB.mjs';
|
|
17
|
-
import './chunk-FT33LFII.mjs';
|
|
18
|
-
import './chunk-VRN3UWE5.mjs';
|
package/dist/hooks.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { useCommentNavigation } from './chunk-7H3WJJYS.mjs';
|
|
2
|
-
export { useCanvasKeyboardShortcuts, useContextMenu, useNodeActions, usePaneActions } from './chunk-ZD2BADZO.mjs';
|
|
3
|
-
export { useAIGenNode, useAIGenNodeHeader, useAutoLoadModelSchema, useCanGenerate, useMediaUpload, useModelSelection, useNodeExecution, usePromptAutocomplete, useRequiredInputs } from './chunk-GWBGK3KL.mjs';
|
|
4
|
-
import './chunk-7SKSRSS7.mjs';
|
|
5
|
-
import './chunk-EFXQT23N.mjs';
|
|
6
|
-
import './chunk-PCIWWD37.mjs';
|
|
7
|
-
import './chunk-LDN7IX4Y.mjs';
|
|
8
|
-
import './chunk-LT3ZJJL6.mjs';
|
|
9
|
-
import './chunk-R727OFBR.mjs';
|
|
10
|
-
import './chunk-FT33LFII.mjs';
|
|
11
|
-
import './chunk-VRN3UWE5.mjs';
|
package/dist/panels.mjs
DELETED
package/dist/provider.mjs
DELETED
package/dist/toolbar.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-AUQGOJOQ.mjs';
|
|
2
|
-
import './chunk-JTPADIUO.mjs';
|
|
3
|
-
import './chunk-OY7BRSGG.mjs';
|
|
4
|
-
import './chunk-LDN7IX4Y.mjs';
|
|
5
|
-
import './chunk-LT3ZJJL6.mjs';
|
|
6
|
-
import './chunk-R727OFBR.mjs';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|