@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.
Files changed (46) hide show
  1. package/README.md +34 -47
  2. package/dist/api/enhanced-client.d.ts +2 -2
  3. package/dist/api/enhanced-client.js +5 -5
  4. package/dist/components/NotesNode.svelte +3 -3
  5. package/dist/components/NotesNode.svelte.d.ts +3 -3
  6. package/dist/components/SimpleNode.svelte +3 -3
  7. package/dist/components/SimpleNode.svelte.d.ts +3 -3
  8. package/dist/components/SquareNode.svelte +3 -3
  9. package/dist/components/SquareNode.svelte.d.ts +3 -3
  10. package/dist/components/TerminalNode.svelte +583 -0
  11. package/dist/components/TerminalNode.svelte.d.ts +24 -0
  12. package/dist/components/UniversalNode.svelte +7 -33
  13. package/dist/components/WorkflowEditor.svelte +1 -9
  14. package/dist/helpers/workflowEditorHelper.d.ts +3 -3
  15. package/dist/helpers/workflowEditorHelper.js +5 -7
  16. package/dist/index.d.ts +4 -7
  17. package/dist/index.js +2 -5
  18. package/dist/registry/builtinNodes.d.ts +3 -3
  19. package/dist/registry/builtinNodes.js +16 -3
  20. package/dist/services/api.d.ts +0 -5
  21. package/dist/services/api.js +0 -20
  22. package/dist/svelte-app.d.ts +0 -6
  23. package/dist/svelte-app.js +0 -8
  24. package/dist/types/auth.d.ts +0 -15
  25. package/dist/types/auth.js +0 -15
  26. package/dist/types/config.d.ts +11 -151
  27. package/dist/types/config.js +3 -0
  28. package/dist/types/index.d.ts +2 -8
  29. package/dist/utils/colors.d.ts +0 -5
  30. package/dist/utils/colors.js +3 -4
  31. package/dist/utils/config.d.ts +0 -8
  32. package/dist/utils/config.js +0 -14
  33. package/dist/utils/connections.d.ts +0 -5
  34. package/dist/utils/connections.js +10 -16
  35. package/dist/utils/icons.js +1 -1
  36. package/dist/utils/nodeTypes.d.ts +1 -1
  37. package/dist/utils/nodeTypes.js +4 -19
  38. package/package.json +144 -138
  39. package/dist/clients/ApiClient.d.ts +0 -199
  40. package/dist/clients/ApiClient.js +0 -214
  41. package/dist/config/apiConfig.d.ts +0 -34
  42. package/dist/config/apiConfig.js +0 -40
  43. package/dist/examples/adapter-usage.d.ts +0 -66
  44. package/dist/examples/adapter-usage.js +0 -133
  45. package/dist/examples/api-client-usage.d.ts +0 -32
  46. 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
- Define custom node types:
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
- const customNode: NodeMetadata = {
279
- id: 'custom_processor',
280
- name: 'Custom Processor',
281
- category: 'data_processing',
282
- description: 'Process data with custom logic',
283
- icon: 'mdi:cog',
284
- color: '#3b82f6',
285
- inputs: [
286
- {
287
- id: 'input',
288
- name: 'Input',
289
- type: 'input',
290
- dataType: 'mixed'
291
- }
292
- ],
293
- outputs: [
294
- {
295
- id: 'output',
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
- * // Backward compatible (uses config.auth)
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 (if not provided, uses config.auth)
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 { createAuthProviderFromLegacyConfig } from '../types/auth.js';
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
- * // Backward compatible (uses config.auth)
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 (if not provided, uses config.auth)
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 create one from legacy config
54
- this.authProvider = authProvider ?? createAuthProviderFromLegacyConfig(config.auth);
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 { NodeConfig, NodeMetadata } from '../types/index.js';
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: NodeConfig;
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: NodeConfig; metadata: NodeMetadata };
18
+ data: { label: string; config: ConfigValues; metadata: NodeMetadata };
19
19
  }) => void;
20
20
  };
21
21
  selected?: boolean;
@@ -1,8 +1,8 @@
1
- import type { NodeConfig, NodeMetadata } from '../types/index.js';
1
+ import type { ConfigValues, NodeMetadata } from '../types/index.js';
2
2
  type $$ComponentProps = {
3
3
  data: {
4
4
  label: string;
5
- config: NodeConfig;
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: NodeConfig;
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 { NodeConfig, NodeMetadata } from '../types/index.js';
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: NodeConfig;
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: NodeConfig; metadata: NodeMetadata };
22
+ data: { label: string; config: ConfigValues; metadata: NodeMetadata };
23
23
  }) => void;
24
24
  };
25
25
  selected?: boolean;
@@ -1,8 +1,8 @@
1
- import type { NodeConfig, NodeMetadata } from '../types/index.js';
1
+ import type { ConfigValues, NodeMetadata } from '../types/index.js';
2
2
  type $$ComponentProps = {
3
3
  data: {
4
4
  label: string;
5
- config: NodeConfig;
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: NodeConfig;
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 { NodeConfig, NodeMetadata } from '../types/index.js';
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: NodeConfig;
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: NodeConfig; metadata: NodeMetadata };
22
+ data: { label: string; config: ConfigValues; metadata: NodeMetadata };
23
23
  }) => void;
24
24
  };
25
25
  selected?: boolean;
@@ -1,8 +1,8 @@
1
- import type { NodeConfig, NodeMetadata } from '../types/index.js';
1
+ import type { ConfigValues, NodeMetadata } from '../types/index.js';
2
2
  type $$ComponentProps = {
3
3
  data: {
4
4
  label: string;
5
- config: NodeConfig;
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: NodeConfig;
13
+ config: ConfigValues;
14
14
  metadata: NodeMetadata;
15
15
  };
16
16
  }) => void;