@d34dman/flowdrop 0.0.17 → 0.0.19
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 +34 -47
- package/dist/api/enhanced-client.d.ts +2 -2
- package/dist/api/enhanced-client.js +5 -5
- package/dist/components/NotesNode.svelte +3 -3
- package/dist/components/NotesNode.svelte.d.ts +3 -3
- package/dist/components/SimpleNode.svelte +3 -3
- package/dist/components/SimpleNode.svelte.d.ts +3 -3
- package/dist/components/SquareNode.svelte +3 -3
- package/dist/components/SquareNode.svelte.d.ts +3 -3
- package/dist/components/TerminalNode.svelte +583 -0
- package/dist/components/TerminalNode.svelte.d.ts +24 -0
- package/dist/components/UniversalNode.svelte +7 -33
- package/dist/components/WorkflowEditor.svelte +1 -9
- package/dist/helpers/workflowEditorHelper.d.ts +3 -3
- package/dist/helpers/workflowEditorHelper.js +5 -7
- package/dist/index.d.ts +4 -7
- package/dist/index.js +2 -5
- package/dist/registry/builtinNodes.d.ts +3 -3
- package/dist/registry/builtinNodes.js +16 -3
- package/dist/services/api.d.ts +0 -5
- package/dist/services/api.js +0 -20
- package/dist/svelte-app.d.ts +0 -6
- package/dist/svelte-app.js +0 -8
- package/dist/types/auth.d.ts +0 -15
- package/dist/types/auth.js +0 -15
- package/dist/types/config.d.ts +11 -151
- package/dist/types/config.js +3 -0
- package/dist/types/index.d.ts +2 -8
- package/dist/utils/colors.d.ts +0 -5
- package/dist/utils/colors.js +3 -4
- package/dist/utils/config.d.ts +0 -8
- package/dist/utils/config.js +0 -14
- package/dist/utils/connections.d.ts +0 -5
- package/dist/utils/connections.js +10 -16
- package/dist/utils/icons.js +1 -1
- package/dist/utils/nodeTypes.d.ts +1 -1
- package/dist/utils/nodeTypes.js +4 -19
- package/package.json +144 -138
- package/dist/clients/ApiClient.d.ts +0 -199
- package/dist/clients/ApiClient.js +0 -214
- package/dist/config/apiConfig.d.ts +0 -34
- package/dist/config/apiConfig.js +0 -40
- package/dist/examples/adapter-usage.d.ts +0 -66
- package/dist/examples/adapter-usage.js +0 -133
- package/dist/examples/api-client-usage.d.ts +0 -32
- package/dist/examples/api-client-usage.js +0 -243
package/README.md
CHANGED
|
@@ -169,8 +169,6 @@ const workflow = app.getWorkflow();
|
|
|
169
169
|
app.destroy();
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
See the [Enterprise Integration Guide](./docs/enterprise-integration.md) for React, Vue, Angular, and Drupal examples.
|
|
173
|
-
|
|
174
172
|
#### 3. Integration with Backend Frameworks
|
|
175
173
|
|
|
176
174
|
##### Drupal Example
|
|
@@ -272,44 +270,45 @@ Override CSS custom properties:
|
|
|
272
270
|
|
|
273
271
|
### Node Types
|
|
274
272
|
|
|
275
|
-
|
|
273
|
+
FlowDrop includes 7 built-in visual node types that control how nodes are rendered:
|
|
274
|
+
|
|
275
|
+
| Type | Description | Use Case |
|
|
276
|
+
| ---------- | ------------------------------------------------------- | ------------------------ |
|
|
277
|
+
| `default` | Full-featured workflow node with inputs/outputs display | Standard nodes |
|
|
278
|
+
| `simple` | Compact layout with header, icon, and description | Space-efficient nodes |
|
|
279
|
+
| `square` | Minimal square node showing only an icon | Icon-only representation |
|
|
280
|
+
| `tool` | Specialized node for agent tools with tool metadata | AI agent tools |
|
|
281
|
+
| `gateway` | Branching control flow with multiple output branches | Conditional logic |
|
|
282
|
+
| `terminal` | Circular node for workflow start/end/exit points | Workflow boundaries |
|
|
283
|
+
| `note` | Documentation note with markdown support | Comments/documentation |
|
|
284
|
+
|
|
285
|
+
#### Terminal Nodes
|
|
286
|
+
|
|
287
|
+
Terminal nodes are special circular nodes for workflow boundaries:
|
|
276
288
|
|
|
277
289
|
```typescript
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
name: 'Output',
|
|
297
|
-
type: 'output',
|
|
298
|
-
dataType: 'mixed'
|
|
299
|
-
}
|
|
300
|
-
],
|
|
301
|
-
configSchema: {
|
|
302
|
-
type: 'object',
|
|
303
|
-
properties: {
|
|
304
|
-
operation: {
|
|
305
|
-
type: 'string',
|
|
306
|
-
title: 'Operation'
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
290
|
+
// Start node - output only
|
|
291
|
+
const startNode: NodeMetadata = {
|
|
292
|
+
id: 'workflow-start',
|
|
293
|
+
name: 'Start',
|
|
294
|
+
type: 'terminal',
|
|
295
|
+
tags: ['start'],
|
|
296
|
+
inputs: [],
|
|
297
|
+
outputs: [{ id: 'trigger', name: 'Go', type: 'output', dataType: 'trigger' }]
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
// End node - input only
|
|
301
|
+
const endNode: NodeMetadata = {
|
|
302
|
+
id: 'workflow-end',
|
|
303
|
+
name: 'End',
|
|
304
|
+
type: 'terminal',
|
|
305
|
+
tags: ['end'],
|
|
306
|
+
inputs: [{ id: 'done', name: 'Done', type: 'input', dataType: 'trigger' }],
|
|
307
|
+
outputs: []
|
|
310
308
|
};
|
|
311
309
|
```
|
|
312
310
|
|
|
311
|
+
|
|
313
312
|
## 🔌 Backend Integration
|
|
314
313
|
|
|
315
314
|
FlowDrop is backend-agnostic. Implement the API endpoints expected by the client:
|
|
@@ -365,14 +364,6 @@ npm run format
|
|
|
365
364
|
|
|
366
365
|
- **API.md** - REST API specification
|
|
367
366
|
- **CHANGELOG.md** - Version history
|
|
368
|
-
- **Storybook** - Component documentation (run `npm run storybook`)
|
|
369
|
-
|
|
370
|
-
### Enterprise Features (v0.0.16+)
|
|
371
|
-
|
|
372
|
-
- **[Enterprise Integration Guide](./docs/enterprise-integration.md)** - Complete integration patterns for React, Vue, Angular, Drupal
|
|
373
|
-
- **[Authentication Guide](./docs/authentication-guide.md)** - OAuth, JWT, SSO, and custom auth providers
|
|
374
|
-
- **[Event Handlers](./docs/event-handlers.md)** - Workflow lifecycle events and hooks
|
|
375
|
-
- **[Features Configuration](./docs/features-configuration.md)** - Feature flags, draft auto-save, and customization
|
|
376
367
|
|
|
377
368
|
## 🤝 Contributing
|
|
378
369
|
|
|
@@ -415,10 +406,6 @@ docker-compose up -d
|
|
|
415
406
|
- `FLOWDROP_AUTH_TYPE` - Authentication type (none/bearer/api_key/custom)
|
|
416
407
|
- `FLOWDROP_AUTH_TOKEN` - Authentication token
|
|
417
408
|
|
|
418
|
-
**Development (Build-time):**
|
|
419
|
-
|
|
420
|
-
- `VITE_API_BASE_URL` - Dev API URL (used only during `npm run dev`)
|
|
421
|
-
|
|
422
409
|
### Build for Production
|
|
423
410
|
|
|
424
411
|
```bash
|
|
@@ -30,7 +30,7 @@ export declare class ApiError extends Error {
|
|
|
30
30
|
* // With AuthProvider
|
|
31
31
|
* const client = new EnhancedFlowDropApiClient(config, authProvider);
|
|
32
32
|
*
|
|
33
|
-
* //
|
|
33
|
+
* // Without authentication
|
|
34
34
|
* const client = new EnhancedFlowDropApiClient(config);
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
@@ -41,7 +41,7 @@ export declare class EnhancedFlowDropApiClient {
|
|
|
41
41
|
* Create a new EnhancedFlowDropApiClient
|
|
42
42
|
*
|
|
43
43
|
* @param config - Endpoint configuration
|
|
44
|
-
* @param authProvider - Optional authentication provider (
|
|
44
|
+
* @param authProvider - Optional authentication provider (defaults to NoAuthProvider)
|
|
45
45
|
*/
|
|
46
46
|
constructor(config: EndpointConfig, authProvider?: AuthProvider);
|
|
47
47
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @module api/enhanced-client
|
|
7
7
|
*/
|
|
8
8
|
import { buildEndpointUrl, getEndpointMethod, getEndpointHeaders } from '../config/endpoints.js';
|
|
9
|
-
import {
|
|
9
|
+
import { NoAuthProvider } from '../types/auth.js';
|
|
10
10
|
/**
|
|
11
11
|
* API error with additional context
|
|
12
12
|
*/
|
|
@@ -35,7 +35,7 @@ export class ApiError extends Error {
|
|
|
35
35
|
* // With AuthProvider
|
|
36
36
|
* const client = new EnhancedFlowDropApiClient(config, authProvider);
|
|
37
37
|
*
|
|
38
|
-
* //
|
|
38
|
+
* // Without authentication
|
|
39
39
|
* const client = new EnhancedFlowDropApiClient(config);
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
@@ -46,12 +46,12 @@ export class EnhancedFlowDropApiClient {
|
|
|
46
46
|
* Create a new EnhancedFlowDropApiClient
|
|
47
47
|
*
|
|
48
48
|
* @param config - Endpoint configuration
|
|
49
|
-
* @param authProvider - Optional authentication provider (
|
|
49
|
+
* @param authProvider - Optional authentication provider (defaults to NoAuthProvider)
|
|
50
50
|
*/
|
|
51
51
|
constructor(config, authProvider) {
|
|
52
52
|
this.config = config;
|
|
53
|
-
// Use provided AuthProvider or
|
|
54
|
-
this.authProvider = authProvider ??
|
|
53
|
+
// Use provided AuthProvider or default to no authentication
|
|
54
|
+
this.authProvider = authProvider ?? new NoAuthProvider();
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Make HTTP request with error handling, retry logic, and auth support
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { ConfigValues, NodeMetadata } from '../types/index.js';
|
|
3
3
|
import Icon from '@iconify/svelte';
|
|
4
4
|
import { createEventDispatcher } from 'svelte';
|
|
5
5
|
import MarkdownDisplay from './MarkdownDisplay.svelte';
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
const props = $props<{
|
|
10
10
|
data: {
|
|
11
11
|
label: string;
|
|
12
|
-
config:
|
|
12
|
+
config: ConfigValues;
|
|
13
13
|
metadata: NodeMetadata;
|
|
14
14
|
nodeId?: string;
|
|
15
15
|
onConfigOpen?: (node: {
|
|
16
16
|
id: string;
|
|
17
17
|
type: string;
|
|
18
|
-
data: { label: string; config:
|
|
18
|
+
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
19
19
|
}) => void;
|
|
20
20
|
};
|
|
21
21
|
selected?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ConfigValues, NodeMetadata } from '../types/index.js';
|
|
2
2
|
type $$ComponentProps = {
|
|
3
3
|
data: {
|
|
4
4
|
label: string;
|
|
5
|
-
config:
|
|
5
|
+
config: ConfigValues;
|
|
6
6
|
metadata: NodeMetadata;
|
|
7
7
|
nodeId?: string;
|
|
8
8
|
onConfigOpen?: (node: {
|
|
@@ -10,7 +10,7 @@ type $$ComponentProps = {
|
|
|
10
10
|
type: string;
|
|
11
11
|
data: {
|
|
12
12
|
label: string;
|
|
13
|
-
config:
|
|
13
|
+
config: ConfigValues;
|
|
14
14
|
metadata: NodeMetadata;
|
|
15
15
|
};
|
|
16
16
|
}) => void;
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import { Position, Handle } from '@xyflow/svelte';
|
|
9
|
-
import type {
|
|
9
|
+
import type { ConfigValues, NodeMetadata } from '../types/index.js';
|
|
10
10
|
import Icon from '@iconify/svelte';
|
|
11
11
|
import { getDataTypeColor } from '../utils/colors.js';
|
|
12
12
|
|
|
13
13
|
const props = $props<{
|
|
14
14
|
data: {
|
|
15
15
|
label: string;
|
|
16
|
-
config:
|
|
16
|
+
config: ConfigValues;
|
|
17
17
|
metadata: NodeMetadata;
|
|
18
18
|
nodeId?: string;
|
|
19
19
|
onConfigOpen?: (node: {
|
|
20
20
|
id: string;
|
|
21
21
|
type: string;
|
|
22
|
-
data: { label: string; config:
|
|
22
|
+
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
23
23
|
}) => void;
|
|
24
24
|
};
|
|
25
25
|
selected?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ConfigValues, NodeMetadata } from '../types/index.js';
|
|
2
2
|
type $$ComponentProps = {
|
|
3
3
|
data: {
|
|
4
4
|
label: string;
|
|
5
|
-
config:
|
|
5
|
+
config: ConfigValues;
|
|
6
6
|
metadata: NodeMetadata;
|
|
7
7
|
nodeId?: string;
|
|
8
8
|
onConfigOpen?: (node: {
|
|
@@ -10,7 +10,7 @@ type $$ComponentProps = {
|
|
|
10
10
|
type: string;
|
|
11
11
|
data: {
|
|
12
12
|
label: string;
|
|
13
|
-
config:
|
|
13
|
+
config: ConfigValues;
|
|
14
14
|
metadata: NodeMetadata;
|
|
15
15
|
};
|
|
16
16
|
}) => void;
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import { Position, Handle } from '@xyflow/svelte';
|
|
9
|
-
import type {
|
|
9
|
+
import type { ConfigValues, NodeMetadata } from '../types/index.js';
|
|
10
10
|
import Icon from '@iconify/svelte';
|
|
11
11
|
import { getDataTypeColor } from '../utils/colors.js';
|
|
12
12
|
|
|
13
13
|
const props = $props<{
|
|
14
14
|
data: {
|
|
15
15
|
label: string;
|
|
16
|
-
config:
|
|
16
|
+
config: ConfigValues;
|
|
17
17
|
metadata: NodeMetadata;
|
|
18
18
|
nodeId?: string;
|
|
19
19
|
onConfigOpen?: (node: {
|
|
20
20
|
id: string;
|
|
21
21
|
type: string;
|
|
22
|
-
data: { label: string; config:
|
|
22
|
+
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
23
23
|
}) => void;
|
|
24
24
|
};
|
|
25
25
|
selected?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ConfigValues, NodeMetadata } from '../types/index.js';
|
|
2
2
|
type $$ComponentProps = {
|
|
3
3
|
data: {
|
|
4
4
|
label: string;
|
|
5
|
-
config:
|
|
5
|
+
config: ConfigValues;
|
|
6
6
|
metadata: NodeMetadata;
|
|
7
7
|
nodeId?: string;
|
|
8
8
|
onConfigOpen?: (node: {
|
|
@@ -10,7 +10,7 @@ type $$ComponentProps = {
|
|
|
10
10
|
type: string;
|
|
11
11
|
data: {
|
|
12
12
|
label: string;
|
|
13
|
-
config:
|
|
13
|
+
config: ConfigValues;
|
|
14
14
|
metadata: NodeMetadata;
|
|
15
15
|
};
|
|
16
16
|
}) => void;
|