@genfeedai/workflow-ui 0.1.3 → 0.1.5

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 +31 -25
  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,12 +1,25 @@
1
1
  import * as zustand from 'zustand';
2
- import * as zundo from 'zundo';
3
2
  import * as _genfeedai_types from '@genfeedai/types';
4
- import { WorkflowNode, WorkflowEdge, NodeGroup, EdgeStyle, NodeType, WorkflowNodeData, GroupColor, WorkflowFile, ValidationResult, ProviderType, IPrompt, PromptCategory, IQueryPrompts, ICreatePrompt } from '@genfeedai/types';
3
+ import { HandleType, WorkflowNode, WorkflowEdge, NodeGroup, EdgeStyle, NodeType, WorkflowNodeData, GroupColor, WorkflowFile, ValidationResult, ProviderType, IPrompt, PromptCategory, IQueryPrompts, ICreatePrompt } from '@genfeedai/types';
4
+ import * as zundo from 'zundo';
5
5
  import { XYPosition, NodeChange, EdgeChange, Connection } from '@xyflow/react';
6
- import { P as PromptLibraryService } from './types-ipAnBzAJ.mjs';
6
+ import { P as PromptLibraryService } from './types-CF6DPx0P.mjs';
7
7
 
8
8
  type ModalType = 'templates' | 'cost' | 'welcome' | 'settings' | 'promptLibrary' | 'modelBrowser' | 'nodeDetail' | 'shortcutHelp' | 'nodeSearch' | null;
9
9
  type NodeDetailTab = 'preview' | 'history';
10
+ interface ConnectionDropMenuState {
11
+ position: {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ screenPosition: {
16
+ x: number;
17
+ y: number;
18
+ };
19
+ sourceNodeId: string;
20
+ sourceHandleId: string;
21
+ sourceHandleType: HandleType;
22
+ }
10
23
  interface UIStore {
11
24
  showPalette: boolean;
12
25
  showMinimap: boolean;
@@ -16,6 +29,7 @@ interface UIStore {
16
29
  selectedEdgeId: string | null;
17
30
  highlightedNodeIds: string[];
18
31
  activeModal: ModalType;
32
+ connectionDropMenu: ConnectionDropMenuState | null;
19
33
  nodeDetailNodeId: string | null;
20
34
  nodeDetailActiveTab: NodeDetailTab;
21
35
  nodeDetailStartIndex: number;
@@ -30,6 +44,8 @@ interface UIStore {
30
44
  setHighlightedNodeIds: (ids: string[]) => void;
31
45
  openModal: (modal: ModalType) => void;
32
46
  closeModal: () => void;
47
+ openConnectionDropMenu: (params: ConnectionDropMenuState) => void;
48
+ closeConnectionDropMenu: () => void;
33
49
  openNodeDetailModal: (nodeId: string, tab?: NodeDetailTab, startIndex?: number) => void;
34
50
  closeNodeDetailModal: () => void;
35
51
  setNodeDetailTab: (tab: NodeDetailTab) => void;
@@ -91,6 +107,13 @@ interface ChatSlice {
91
107
  };
92
108
  }
93
109
 
110
+ interface ImageHistoryItem {
111
+ id: string;
112
+ image: string;
113
+ prompt?: string;
114
+ model?: string;
115
+ timestamp: number;
116
+ }
94
117
  interface WorkflowData {
95
118
  _id: string;
96
119
  name: string;
@@ -114,6 +137,7 @@ interface WorkflowState {
114
137
  selectedNodeIds: string[];
115
138
  viewedCommentIds: Set<string>;
116
139
  navigationTargetId: string | null;
140
+ globalImageHistory: ImageHistoryItem[];
117
141
  }
118
142
  interface NodeActions {
119
143
  addNode: (type: NodeType, position: XYPosition) => string;
@@ -189,7 +213,11 @@ interface CommentNavigationActions {
189
213
  setNavigationTarget: (nodeId: string | null) => void;
190
214
  getUnviewedCommentCount: () => number;
191
215
  }
192
- interface WorkflowStore extends WorkflowState, NodeActions, ReactFlowActions, EdgeActions, LockingActions, GroupActions, SelectionActions, LocalWorkflowActions, ApiActions, HelperActions$1, CommentNavigationActions, SnapshotSlice, ChatSlice {
216
+ interface ImageHistoryActions {
217
+ addToGlobalHistory: (item: Omit<ImageHistoryItem, 'id'>) => void;
218
+ clearGlobalHistory: () => void;
219
+ }
220
+ interface WorkflowStore extends WorkflowState, NodeActions, ReactFlowActions, EdgeActions, LockingActions, GroupActions, SelectionActions, LocalWorkflowActions, ApiActions, HelperActions$1, CommentNavigationActions, ImageHistoryActions, SnapshotSlice, ChatSlice {
193
221
  }
194
222
 
195
223
  declare const useWorkflowStore: zustand.UseBoundStore<Omit<zustand.StoreApi<WorkflowStore>, "temporal"> & {
@@ -461,4 +489,4 @@ interface PromptLibraryStore {
461
489
  }
462
490
  declare const usePromptLibraryStore: zustand.UseBoundStore<zustand.StoreApi<PromptLibraryStore>>;
463
491
 
464
- export { type AnnotationTool as A, type BaseShape as B, type CircleShape as C, type DebugPayload as D, type ExecutionStore as E, type FreehandShape as F, type Job as J, type ModalType as M, type NodeDetailTab as N, type ProviderConfig as P, type RecentModel as R, type ToolOptions as T, type WorkflowStore as W, useWorkflowStore as a, useExecutionStore as b, useSettingsStore as c, usePromptEditorStore as d, useAnnotationStore as e, usePromptLibraryStore as f, configurePromptLibrary as g, type WorkflowData as h, type WorkflowState as i, type ProviderSettings as j, type DefaultModelSettings as k, PROVIDER_INFO as l, type RectangleShape as m, type ArrowShape as n, type TextShape as o, type AnnotationShape as p, useUIStore as u };
492
+ export { type AnnotationTool 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, type ProviderConfig as P, type RecentModel as R, type ToolOptions as T, type WorkflowStore as W, useUIStore as a, useExecutionStore as b, useSettingsStore as c, type WorkflowData as d, type WorkflowState as e, type ProviderSettings as f, type DefaultModelSettings as g, PROVIDER_INFO as h, usePromptEditorStore as i, useAnnotationStore as j, type RectangleShape as k, type ArrowShape as l, type TextShape as m, type AnnotationShape as n, usePromptLibraryStore as o, configurePromptLibrary as p, useWorkflowStore 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-ipAnBzAJ.mjs';
4
- export { F as FileUploadService, M as ModelBrowserModalProps, b as ModelSchemaService, P as PromptLibraryService, a as PromptPickerProps } from './types-ipAnBzAJ.mjs';
3
+ import { W as WorkflowUIConfig } from './types-CF6DPx0P.mjs';
4
+ export { F as FileUploadService, M as ModelBrowserModalProps, b as ModelSchemaService, P as PromptLibraryService, a as PromptPickerProps, c as WorkflowsApiService } from './types-CF6DPx0P.mjs';
5
5
  import '@genfeedai/types';
6
6
 
7
7
  /**
package/dist/provider.mjs CHANGED
@@ -1,4 +1,3 @@
1
1
  import './chunk-MLJJBBTB.mjs';
2
2
  export { WorkflowUIProvider, useWorkflowUIConfig } from './chunk-FT33LFII.mjs';
3
3
  import './chunk-VRN3UWE5.mjs';
4
- import './chunk-ZJWP5KGZ.mjs';
package/dist/stores.d.mts CHANGED
@@ -1,10 +1,11 @@
1
- import { W as WorkflowStore } from './promptLibraryStore-zqb59nsu.mjs';
2
- export { p as AnnotationShape, A as AnnotationTool, n as ArrowShape, B as BaseShape, C as CircleShape, D as DebugPayload, k as DefaultModelSettings, E as ExecutionStore, F as FreehandShape, J as Job, M as ModalType, N as NodeDetailTab, l as PROVIDER_INFO, P as ProviderConfig, j as ProviderSettings, R as RecentModel, m as RectangleShape, o as TextShape, T as ToolOptions, h as WorkflowData, i as WorkflowState, g as configurePromptLibrary, e as useAnnotationStore, b as useExecutionStore, d as usePromptEditorStore, f as usePromptLibraryStore, c as useSettingsStore, u as useUIStore, a as useWorkflowStore } from './promptLibraryStore-zqb59nsu.mjs';
1
+ import { W as WorkflowStore } from './promptLibraryStore-Bgw5LzvD.mjs';
2
+ export { n as AnnotationShape, A as AnnotationTool, l as ArrowShape, B as BaseShape, C as CircleShape, D as DebugPayload, g as DefaultModelSettings, E as ExecutionStore, F as FreehandShape, J as Job, M as ModalType, N as NodeDetailTab, h as PROVIDER_INFO, P as ProviderConfig, f as ProviderSettings, R as RecentModel, k as RectangleShape, m as TextShape, T as ToolOptions, d as WorkflowData, e as WorkflowState, p as configurePromptLibrary, j as useAnnotationStore, b as useExecutionStore, i as usePromptEditorStore, o as usePromptLibraryStore, c as useSettingsStore, a as useUIStore, u as useWorkflowStore } from './promptLibraryStore-Bgw5LzvD.mjs';
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.mjs';
5
6
  import 'zustand';
6
7
  import 'zundo';
7
- import './types-ipAnBzAJ.mjs';
8
+ import './types-CF6DPx0P.mjs';
8
9
  import 'react';
9
10
 
10
11
  /**
package/dist/stores.mjs CHANGED
@@ -1,43 +1,6 @@
1
1
  export { useAnnotationStore, usePromptEditorStore } from './chunk-CV4M7CNU.mjs';
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-PCIWWD37.mjs';
2
3
  import './chunk-LDN7IX4Y.mjs';
3
- export { PROVIDER_INFO, useExecutionStore, useSettingsStore, useUIStore } from './chunk-SQK4JDYY.mjs';
4
- export { useWorkflowStore } from './chunk-RIGVIEYB.mjs';
4
+ export { PROVIDER_INFO, useExecutionStore, useSettingsStore, useUIStore } from './chunk-LT3ZJJL6.mjs';
5
+ export { useWorkflowStore } from './chunk-R727OFBR.mjs';
5
6
  export { configurePromptLibrary, usePromptLibraryStore } from './chunk-VRN3UWE5.mjs';
6
- import './chunk-ZJWP5KGZ.mjs';
7
-
8
- // src/stores/workflow/selectors.ts
9
- var selectNodes = (state) => state.nodes;
10
- var selectEdges = (state) => state.edges;
11
- var selectGroups = (state) => state.groups;
12
- var selectSelectedNodeIds = (state) => state.selectedNodeIds;
13
- var selectWorkflowName = (state) => state.workflowName;
14
- var selectWorkflowId = (state) => state.workflowId;
15
- var selectIsDirty = (state) => state.isDirty;
16
- var selectIsSaving = (state) => state.isSaving;
17
- var selectIsLoading = (state) => state.isLoading;
18
- var selectEdgeStyle = (state) => state.edgeStyle;
19
- var selectNavigationTargetId = (state) => state.navigationTargetId;
20
- var selectUpdateNodeData = (state) => state.updateNodeData;
21
- var selectAddNode = (state) => state.addNode;
22
- var selectRemoveNode = (state) => state.removeNode;
23
- var selectDuplicateNode = (state) => state.duplicateNode;
24
- var selectOnNodesChange = (state) => state.onNodesChange;
25
- var selectOnEdgesChange = (state) => state.onEdgesChange;
26
- var selectOnConnect = (state) => state.onConnect;
27
- var selectSetSelectedNodeIds = (state) => state.setSelectedNodeIds;
28
- var selectToggleNodeLock = (state) => state.toggleNodeLock;
29
- var selectCreateGroup = (state) => state.createGroup;
30
- var selectDeleteGroup = (state) => state.deleteGroup;
31
- var selectUnlockAllNodes = (state) => state.unlockAllNodes;
32
- var selectSetDirty = (state) => state.setDirty;
33
- var selectRemoveEdge = (state) => state.removeEdge;
34
- var selectAddNodesAndEdges = (state) => state.addNodesAndEdges;
35
- var selectGetNodeById = (state) => state.getNodeById;
36
- var selectGetConnectedNodeIds = (state) => state.getConnectedNodeIds;
37
- var selectIsValidConnection = (state) => state.isValidConnection;
38
- var selectFindCompatibleHandle = (state) => state.findCompatibleHandle;
39
- var createSelectNodeById = (id) => (state) => state.nodes.find((n) => n.id === id);
40
- var createSelectIsNodeSelected = (id) => (state) => state.selectedNodeIds.includes(id);
41
- var createSelectGroupByNodeId = (nodeId) => (state) => state.groups.find((g) => g.nodeIds.includes(nodeId));
42
-
43
- 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 };
@@ -47,6 +47,8 @@ declare function Toolbar({ onAutoLayout, onSaveAs, fileMenuItemsPrepend, fileMen
47
47
 
48
48
  declare function BottomBar(): react_jsx_runtime.JSX.Element;
49
49
 
50
+ declare function CostIndicator(): react_jsx_runtime.JSX.Element | null;
51
+
50
52
  /**
51
53
  * Auto-save status indicator
52
54
  */
@@ -70,4 +72,4 @@ declare function SaveAsDialog({ isOpen, currentName, onSave, onClose }: SaveAsDi
70
72
  */
71
73
  declare function OverflowMenu({ items }: OverflowMenuProps): react_jsx_runtime.JSX.Element;
72
74
 
73
- export { BottomBar, type DropdownItem, OverflowMenu, type OverflowMenuProps, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown, type ToolbarDropdownProps };
75
+ export { BottomBar, CostIndicator, type DropdownItem, OverflowMenu, type OverflowMenuProps, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown, type ToolbarDropdownProps };
package/dist/toolbar.mjs CHANGED
@@ -1,5 +1,6 @@
1
- export { BottomBar, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-HCXI63ME.mjs';
1
+ export { BottomBar, CostIndicator, OverflowMenu, SaveAsDialog, SaveIndicator, Toolbar, ToolbarDropdown } from './chunk-AUQGOJOQ.mjs';
2
+ import './chunk-JTPADIUO.mjs';
3
+ import './chunk-OY7BRSGG.mjs';
2
4
  import './chunk-LDN7IX4Y.mjs';
3
- import './chunk-SQK4JDYY.mjs';
4
- import './chunk-RIGVIEYB.mjs';
5
- import './chunk-ZJWP5KGZ.mjs';
5
+ import './chunk-LT3ZJJL6.mjs';
6
+ import './chunk-R727OFBR.mjs';
@@ -1,5 +1,5 @@
1
1
  import { ComponentType } from 'react';
2
- import { IQueryPrompts, IPrompt, ICreatePrompt, ProviderModel } from '@genfeedai/types';
2
+ import { IQueryPrompts, IPrompt, ICreatePrompt, ProviderModel, ModelCapability } from '@genfeedai/types';
3
3
 
4
4
  interface FileUploadService {
5
5
  uploadFile: (path: string, file: File) => Promise<{
@@ -23,13 +23,16 @@ interface ModelBrowserModalProps {
23
23
  isOpen: boolean;
24
24
  onClose: () => void;
25
25
  onSelect: (model: ProviderModel) => void;
26
- capabilities?: string[];
26
+ capabilities?: ModelCapability[];
27
27
  title?: string;
28
28
  }
29
29
  interface PromptPickerProps {
30
30
  onSelect: (item: IPrompt) => void;
31
31
  label?: string;
32
32
  }
33
+ interface WorkflowsApiService {
34
+ setThumbnail: (workflowId: string, thumbnailUrl: string, nodeId: string, signal?: AbortSignal) => Promise<void>;
35
+ }
33
36
  interface WorkflowUIConfig {
34
37
  /** For ImageInputNode, VideoInputNode — file upload */
35
38
  fileUpload?: FileUploadService;
@@ -37,10 +40,12 @@ interface WorkflowUIConfig {
37
40
  modelSchema?: ModelSchemaService;
38
41
  /** For PromptNode — prompt library CRUD */
39
42
  promptLibrary?: PromptLibraryService;
43
+ /** For context menu — set workflow thumbnail */
44
+ workflowsApi?: WorkflowsApiService;
40
45
  /** Injected ModelBrowserModal component (complex, app-specific) */
41
46
  ModelBrowserModal?: ComponentType<ModelBrowserModalProps> | null;
42
47
  /** Injected PromptPicker component (complex, app-specific) */
43
48
  PromptPicker?: ComponentType<PromptPickerProps> | null;
44
49
  }
45
50
 
46
- export type { FileUploadService as F, ModelBrowserModalProps as M, PromptLibraryService as P, WorkflowUIConfig as W, PromptPickerProps as a, ModelSchemaService as b };
51
+ export type { FileUploadService as F, ModelBrowserModalProps as M, PromptLibraryService as P, WorkflowUIConfig as W, PromptPickerProps as a, ModelSchemaService as b, WorkflowsApiService as c };
package/dist/ui.d.mts CHANGED
@@ -10,7 +10,7 @@ import { ClassValue } from 'clsx';
10
10
 
11
11
  declare const buttonVariants: (props?: ({
12
12
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
13
- size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
13
+ size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
14
14
  } & class_variance_authority_types.ClassProp) | undefined) => string;
15
15
  declare function Button({ className, variant, size, asChild, ...props }: react.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
16
16
  asChild?: boolean;
package/dist/ui.mjs CHANGED
@@ -1,3 +1,2 @@
1
1
  export { Checkbox, ComparisonSlider, GridPositionSelector, Input, Label, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Slider } from './chunk-ZJD5WMR3.mjs';
2
2
  export { Button, buttonVariants, cn } from './chunk-7SKSRSS7.mjs';
3
- import './chunk-ZJWP5KGZ.mjs';
@@ -19,6 +19,7 @@ interface UseCanvasKeyboardShortcutsParams {
19
19
  fitView: (options?: FitViewOptions) => void;
20
20
  openShortcutHelp: () => void;
21
21
  openNodeSearch: () => void;
22
+ deleteSelectedElements: () => void;
22
23
  }
23
24
  /**
24
25
  * Hook that handles keyboard shortcuts for the workflow canvas
@@ -39,7 +40,7 @@ interface UseCanvasKeyboardShortcutsParams {
39
40
  * - Ctrl/Cmd+Z: Undo
40
41
  * - Ctrl/Cmd+Shift+Z: Redo
41
42
  */
42
- declare function useCanvasKeyboardShortcuts({ selectedNodeIds, groups, nodes, toggleNodeLock, createGroup, deleteGroup, unlockAllNodes, addNode, togglePalette, fitView, openShortcutHelp, openNodeSearch, }: UseCanvasKeyboardShortcutsParams): void;
43
+ declare function useCanvasKeyboardShortcuts({ selectedNodeIds, groups, nodes, toggleNodeLock, createGroup, deleteGroup, unlockAllNodes, addNode, togglePalette, fitView, openShortcutHelp, openNodeSearch, deleteSelectedElements, }: UseCanvasKeyboardShortcutsParams): void;
43
44
 
44
45
  interface RequiredInputsResult {
45
46
  /** Whether all required inputs have connections */
@@ -252,4 +253,16 @@ interface UseAutoLoadModelSchemaOptions<TModel extends string> {
252
253
  */
253
254
  declare function useAutoLoadModelSchema<TModel extends string>({ currentModel, selectedModel, modelIdMap, onModelSelect, }: UseAutoLoadModelSchemaOptions<TModel>): void;
254
255
 
255
- export { useAIGenNode, useAIGenNodeHeader, useAutoLoadModelSchema, useCanGenerate, useCanvasKeyboardShortcuts, useMediaUpload, useModelSelection, useNodeExecution, usePromptAutocomplete, useRequiredInputs };
256
+ interface CommentNavigation {
257
+ currentIndex: number;
258
+ totalCount: number;
259
+ onPrevious: () => void;
260
+ onNext: () => void;
261
+ }
262
+ /**
263
+ * Hook that provides navigation props for nodes with comments.
264
+ * Returns null if the node has no comment.
265
+ */
266
+ declare function useCommentNavigation(nodeId: string): CommentNavigation | null;
267
+
268
+ export { type CommentNavigation as C, useRequiredInputs as a, useCanGenerate as b, useNodeExecution as c, useModelSelection as d, useAIGenNode as e, useAIGenNodeHeader as f, usePromptAutocomplete as g, useMediaUpload as h, useAutoLoadModelSchema as i, useCommentNavigation as j, useCanvasKeyboardShortcuts as u };
@@ -0,0 +1,2 @@
1
+ import './chunk-LDN7IX4Y.mjs';
2
+ export { useWorkflowStore } from './chunk-R727OFBR.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genfeedai/workflow-ui",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "AGPL-3.0",
5
5
  "description": "Shared UI components for Genfeed workflow editor",
6
6
  "repository": {
@@ -13,58 +13,58 @@
13
13
  "registry": "https://registry.npmjs.org/"
14
14
  },
15
15
  "main": "./dist/index.js",
16
- "module": "./dist/index.js",
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.js",
22
- "require": "./dist/index.cjs"
21
+ "import": "./dist/index.mjs",
22
+ "require": "./dist/index.js"
23
23
  },
24
24
  "./canvas": {
25
25
  "types": "./dist/canvas.d.ts",
26
- "import": "./dist/canvas.js",
27
- "require": "./dist/canvas.cjs"
26
+ "import": "./dist/canvas.mjs",
27
+ "require": "./dist/canvas.js"
28
28
  },
29
29
  "./nodes": {
30
30
  "types": "./dist/nodes.d.ts",
31
- "import": "./dist/nodes.js",
32
- "require": "./dist/nodes.cjs"
31
+ "import": "./dist/nodes.mjs",
32
+ "require": "./dist/nodes.js"
33
33
  },
34
34
  "./panels": {
35
35
  "types": "./dist/panels.d.ts",
36
- "import": "./dist/panels.js",
37
- "require": "./dist/panels.cjs"
36
+ "import": "./dist/panels.mjs",
37
+ "require": "./dist/panels.js"
38
38
  },
39
39
  "./toolbar": {
40
40
  "types": "./dist/toolbar.d.ts",
41
- "import": "./dist/toolbar.js",
42
- "require": "./dist/toolbar.cjs"
41
+ "import": "./dist/toolbar.mjs",
42
+ "require": "./dist/toolbar.js"
43
43
  },
44
44
  "./hooks": {
45
45
  "types": "./dist/hooks.d.ts",
46
- "import": "./dist/hooks.js",
47
- "require": "./dist/hooks.cjs"
46
+ "import": "./dist/hooks.mjs",
47
+ "require": "./dist/hooks.js"
48
48
  },
49
49
  "./stores": {
50
50
  "types": "./dist/stores.d.ts",
51
- "import": "./dist/stores.js",
52
- "require": "./dist/stores.cjs"
51
+ "import": "./dist/stores.mjs",
52
+ "require": "./dist/stores.js"
53
53
  },
54
54
  "./provider": {
55
55
  "types": "./dist/provider.d.ts",
56
- "import": "./dist/provider.js",
57
- "require": "./dist/provider.cjs"
56
+ "import": "./dist/provider.mjs",
57
+ "require": "./dist/provider.js"
58
58
  },
59
59
  "./ui": {
60
60
  "types": "./dist/ui.d.ts",
61
- "import": "./dist/ui.js",
62
- "require": "./dist/ui.cjs"
61
+ "import": "./dist/ui.mjs",
62
+ "require": "./dist/ui.js"
63
63
  },
64
64
  "./lib": {
65
65
  "types": "./dist/lib.d.ts",
66
- "import": "./dist/lib.js",
67
- "require": "./dist/lib.cjs"
66
+ "import": "./dist/lib.mjs",
67
+ "require": "./dist/lib.js"
68
68
  },
69
69
  "./styles": "./src/styles/workflow-ui.css"
70
70
  },
@@ -84,6 +84,8 @@
84
84
  "zundo": ">=2.0.0"
85
85
  },
86
86
  "dependencies": {
87
+ "@dagrejs/dagre": "^2.0.4",
88
+ "@genfeedai/types": "0.1.1",
87
89
  "@radix-ui/react-checkbox": "^1.1.4",
88
90
  "@radix-ui/react-label": "^2.1.2",
89
91
  "@radix-ui/react-select": "^2.1.6",
@@ -96,8 +98,10 @@
96
98
  "tailwind-merge": "^3.4.0"
97
99
  },
98
100
  "devDependencies": {
99
- "@genfeedai/core": "workspace:*",
100
- "@genfeedai/types": "workspace:*",
101
+ "@testing-library/jest-dom": "6.6.3",
102
+ "@testing-library/react": "16.2.0",
103
+ "@genfeedai/core": "0.1.1",
104
+ "jsdom": "26.0.0",
101
105
  "react-compare-slider": "^3.1.0",
102
106
  "@types/react": "19.2.4",
103
107
  "@types/react-dom": "19.2.4",
@@ -106,12 +110,14 @@
106
110
  "react-dom": "19.2.4",
107
111
  "tsup": "8.4.0",
108
112
  "typescript": "5.9.3",
113
+ "vitest": "3.0.4",
109
114
  "zustand": "5.0.3",
110
115
  "zundo": "2.3.0"
111
116
  },
112
117
  "scripts": {
113
118
  "build": "tsup",
114
119
  "dev": "tsup --watch",
115
- "prepublishOnly": "bun run build"
120
+ "prepublishOnly": "bun run build",
121
+ "test": "vitest run"
116
122
  }
117
123
  }
package/dist/canvas.d.ts DELETED
@@ -1,27 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { NodeTypes, EdgeProps } from '@xyflow/react';
3
- import * as react from 'react';
4
-
5
- interface WorkflowCanvasProps {
6
- /** Override default node types. Pass merged core + cloud nodeTypes here. */
7
- nodeTypes?: NodeTypes;
8
- }
9
- declare function WorkflowCanvas({ nodeTypes: nodeTypesProp }?: WorkflowCanvasProps): react_jsx_runtime.JSX.Element;
10
-
11
- interface HelperLinesProps {
12
- draggingNodeId: string | null;
13
- }
14
- declare function HelperLinesComponent({ draggingNodeId }: HelperLinesProps): react_jsx_runtime.JSX.Element | null;
15
- declare const HelperLines: react.MemoExoticComponent<typeof HelperLinesComponent>;
16
-
17
- declare function GroupOverlayComponent(): react_jsx_runtime.JSX.Element;
18
- declare const GroupOverlay: react.MemoExoticComponent<typeof GroupOverlayComponent>;
19
-
20
- declare function NodeSearch(): react_jsx_runtime.JSX.Element | null;
21
-
22
- declare function ShortcutHelpModal(): react_jsx_runtime.JSX.Element | null;
23
-
24
- declare function PauseEdgeComponent({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style, markerEnd, data, }: EdgeProps): react_jsx_runtime.JSX.Element;
25
- declare const PauseEdge: react.MemoExoticComponent<typeof PauseEdgeComponent>;
26
-
27
- export { GroupOverlay, HelperLines, NodeSearch, PauseEdge, ShortcutHelpModal, WorkflowCanvas };
package/dist/canvas.js DELETED
@@ -1,45 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkBMFRA6GK_js = require('./chunk-BMFRA6GK.js');
4
- require('./chunk-ECD5J2BA.js');
5
- require('./chunk-3SPPKCWR.js');
6
- require('./chunk-3YFFDHC5.js');
7
- require('./chunk-EMGXUNBL.js');
8
- require('./chunk-3TMV3K34.js');
9
- require('./chunk-5HJFQVUR.js');
10
- require('./chunk-EMUMKW5C.js');
11
- require('./chunk-6DOEUDD5.js');
12
- require('./chunk-JLWKW3G5.js');
13
- require('./chunk-AXFOCPPP.js');
14
- require('./chunk-IHF35QZD.js');
15
- require('./chunk-5LQ4QBR5.js');
16
- require('./chunk-RJ262NXS.js');
17
- require('./chunk-RXNEDWK2.js');
18
- require('./chunk-4MZ62VMF.js');
19
-
20
-
21
-
22
- Object.defineProperty(exports, "GroupOverlay", {
23
- enumerable: true,
24
- get: function () { return chunkBMFRA6GK_js.GroupOverlay; }
25
- });
26
- Object.defineProperty(exports, "HelperLines", {
27
- enumerable: true,
28
- get: function () { return chunkBMFRA6GK_js.HelperLines; }
29
- });
30
- Object.defineProperty(exports, "NodeSearch", {
31
- enumerable: true,
32
- get: function () { return chunkBMFRA6GK_js.NodeSearch; }
33
- });
34
- Object.defineProperty(exports, "PauseEdge", {
35
- enumerable: true,
36
- get: function () { return chunkBMFRA6GK_js.PauseEdge; }
37
- });
38
- Object.defineProperty(exports, "ShortcutHelpModal", {
39
- enumerable: true,
40
- get: function () { return chunkBMFRA6GK_js.ShortcutHelpModal; }
41
- });
42
- Object.defineProperty(exports, "WorkflowCanvas", {
43
- enumerable: true,
44
- get: function () { return chunkBMFRA6GK_js.WorkflowCanvas; }
45
- });