@teamflojo/floimg-studio-ui 0.3.4 → 0.4.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/dist/api/sse.d.ts +21 -0
- package/dist/components/OutputInspector.d.ts +14 -0
- package/dist/index.d.ts +1 -8
- package/dist/index.js +2027 -1503
- package/dist/index.js.map +1 -1
- package/dist/stores/workflowStore.d.ts +5 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-Sent Events (SSE) client utility
|
|
3
|
+
*
|
|
4
|
+
* Handles POST-based SSE connections for streaming execution and generation updates.
|
|
5
|
+
* Uses fetch with streaming response body parsing.
|
|
6
|
+
*/
|
|
7
|
+
export interface SSEConnectionHandlers<T> {
|
|
8
|
+
onMessage: (event: T) => void;
|
|
9
|
+
onError: (error: Error) => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface SSEConnection {
|
|
13
|
+
abort: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create an SSE connection using POST request with JSON body.
|
|
17
|
+
*
|
|
18
|
+
* SSE typically uses GET, but we need POST to send workflow data.
|
|
19
|
+
* This implements manual SSE parsing over a fetch streaming response.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createSSEConnection<T>(url: string, body: unknown, handlers: SSEConnectionHandlers<T>): SSEConnection;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface DataOutput {
|
|
2
|
+
dataType: "text" | "json";
|
|
3
|
+
content: string;
|
|
4
|
+
parsed?: Record<string, unknown>;
|
|
5
|
+
}
|
|
6
|
+
interface OutputInspectorProps {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
nodeId: string;
|
|
10
|
+
nodeLabel: string;
|
|
11
|
+
output: DataOutput;
|
|
12
|
+
}
|
|
13
|
+
export declare function OutputInspector({ isOpen, onClose, nodeLabel, output }: OutputInspectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @teamflojo/floimg-studio-ui
|
|
3
|
-
*
|
|
4
|
-
* FloImg Studio React components for building visual workflow editors.
|
|
5
|
-
* This is the UI library used by FloImg Studio Cloud.
|
|
6
|
-
*
|
|
7
|
-
* For self-hosting, use the Docker image instead.
|
|
8
|
-
*/
|
|
1
|
+
|
|
9
2
|
export { default as App } from './App';
|
|
10
3
|
export { WorkflowEditor } from './editor/WorkflowEditor';
|
|
11
4
|
export { NodePalette } from './components/NodePalette';
|