@d34dman/flowdrop 0.0.24 → 0.0.26

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 (38) hide show
  1. package/README.md +52 -62
  2. package/dist/components/App.svelte +15 -2
  3. package/dist/components/ConfigForm.svelte +4 -1
  4. package/dist/components/ConfigModal.svelte +4 -70
  5. package/dist/components/ConfigPanel.svelte +4 -9
  6. package/dist/components/EdgeRefresher.svelte +42 -0
  7. package/dist/components/EdgeRefresher.svelte.d.ts +9 -0
  8. package/dist/components/ReadOnlyDetails.svelte +3 -1
  9. package/dist/components/UniversalNode.svelte +6 -3
  10. package/dist/components/WorkflowEditor.svelte +33 -0
  11. package/dist/components/WorkflowEditor.svelte.d.ts +3 -1
  12. package/dist/components/form/FormCheckboxGroup.svelte +2 -9
  13. package/dist/components/form/FormCodeEditor.svelte +416 -0
  14. package/dist/components/form/FormCodeEditor.svelte.d.ts +23 -0
  15. package/dist/components/form/FormField.svelte +125 -85
  16. package/dist/components/form/FormField.svelte.d.ts +1 -1
  17. package/dist/components/form/FormFieldWrapper.svelte +2 -10
  18. package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
  19. package/dist/components/form/FormMarkdownEditor.svelte +553 -0
  20. package/dist/components/form/FormMarkdownEditor.svelte.d.ts +29 -0
  21. package/dist/components/form/FormNumberField.svelte +5 -6
  22. package/dist/components/form/FormRangeField.svelte +3 -13
  23. package/dist/components/form/FormSelect.svelte +4 -5
  24. package/dist/components/form/FormSelect.svelte.d.ts +1 -1
  25. package/dist/components/form/FormTemplateEditor.svelte +463 -0
  26. package/dist/components/form/FormTemplateEditor.svelte.d.ts +25 -0
  27. package/dist/components/form/FormTextField.svelte +3 -4
  28. package/dist/components/form/FormTextarea.svelte +3 -4
  29. package/dist/components/form/FormToggle.svelte +2 -3
  30. package/dist/components/form/index.d.ts +14 -11
  31. package/dist/components/form/index.js +14 -11
  32. package/dist/components/form/types.d.ts +55 -2
  33. package/dist/components/form/types.js +1 -1
  34. package/dist/components/nodes/NotesNode.svelte +39 -45
  35. package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
  36. package/dist/components/nodes/WorkflowNode.svelte +1 -3
  37. package/dist/styles/base.css +1 -1
  38. package/package.json +162 -148
@@ -9,7 +9,7 @@
9
9
  * Type guard to check if options are FieldOption objects
10
10
  */
11
11
  export function isFieldOptionArray(options) {
12
- return options.length > 0 && typeof options[0] === "object" && "value" in options[0];
12
+ return options.length > 0 && typeof options[0] === 'object' && 'value' in options[0];
13
13
  }
14
14
  /**
15
15
  * Normalize options to FieldOption format
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
- import type { ConfigValues, NodeMetadata } from "../../types/index.js";
3
- import Icon from "@iconify/svelte";
4
- import MarkdownDisplay from "../MarkdownDisplay.svelte";
2
+ import type { ConfigValues, NodeMetadata } from '../../types/index.js';
3
+ import Icon from '@iconify/svelte';
4
+ import MarkdownDisplay from '../MarkdownDisplay.svelte';
5
5
 
6
6
  /**
7
7
  * NotesNode component props
@@ -25,63 +25,57 @@
25
25
  }>();
26
26
 
27
27
  /** Note content derived from config */
28
- const noteContent = $derived(
29
- (props.data.config?.content as string) || "Add your notes here..."
30
- );
28
+ const noteContent = $derived((props.data.config?.content as string) || 'Add your notes here...');
31
29
 
32
30
  /** Note type derived from config */
33
- const noteType = $derived(
34
- (props.data.config?.noteType as string) || "info"
35
- );
31
+ const noteType = $derived((props.data.config?.noteType as string) || 'info');
36
32
 
37
33
  /** Note type configuration with styling for each type */
38
34
  const noteTypes = {
39
35
  info: {
40
- name: "Info",
41
- bgColor: "bg-blue-50",
42
- borderColor: "border-blue-200",
43
- textColor: "text-blue-800",
44
- iconColor: "text-blue-500",
45
- icon: "mdi:information"
36
+ name: 'Info',
37
+ bgColor: 'bg-blue-50',
38
+ borderColor: 'border-blue-200',
39
+ textColor: 'text-blue-800',
40
+ iconColor: 'text-blue-500',
41
+ icon: 'mdi:information'
46
42
  },
47
43
  warning: {
48
- name: "Warning",
49
- bgColor: "bg-yellow-50",
50
- borderColor: "border-yellow-200",
51
- textColor: "text-yellow-800",
52
- iconColor: "text-yellow-500",
53
- icon: "mdi:alert"
44
+ name: 'Warning',
45
+ bgColor: 'bg-yellow-50',
46
+ borderColor: 'border-yellow-200',
47
+ textColor: 'text-yellow-800',
48
+ iconColor: 'text-yellow-500',
49
+ icon: 'mdi:alert'
54
50
  },
55
51
  success: {
56
- name: "Success",
57
- bgColor: "bg-green-50",
58
- borderColor: "border-green-200",
59
- textColor: "text-green-800",
60
- iconColor: "text-green-500",
61
- icon: "mdi:check-circle"
52
+ name: 'Success',
53
+ bgColor: 'bg-green-50',
54
+ borderColor: 'border-green-200',
55
+ textColor: 'text-green-800',
56
+ iconColor: 'text-green-500',
57
+ icon: 'mdi:check-circle'
62
58
  },
63
59
  error: {
64
- name: "Error",
65
- bgColor: "bg-red-50",
66
- borderColor: "border-red-200",
67
- textColor: "text-red-800",
68
- iconColor: "text-red-500",
69
- icon: "mdi:close-circle"
60
+ name: 'Error',
61
+ bgColor: 'bg-red-50',
62
+ borderColor: 'border-red-200',
63
+ textColor: 'text-red-800',
64
+ iconColor: 'text-red-500',
65
+ icon: 'mdi:close-circle'
70
66
  },
71
67
  note: {
72
- name: "Note",
73
- bgColor: "bg-gray-50",
74
- borderColor: "border-gray-200",
75
- textColor: "text-gray-800",
76
- iconColor: "text-gray-500",
77
- icon: "mdi:note-text"
68
+ name: 'Note',
69
+ bgColor: 'bg-gray-50',
70
+ borderColor: 'border-gray-200',
71
+ textColor: 'text-gray-800',
72
+ iconColor: 'text-gray-500',
73
+ icon: 'mdi:note-text'
78
74
  }
79
75
  };
80
76
 
81
77
  /** Current note type configuration based on selected type */
82
- const currentType = $derived(
83
- noteTypes[noteType as keyof typeof noteTypes] || noteTypes.info
84
- );
78
+ const currentType = $derived(noteTypes[noteType as keyof typeof noteTypes] || noteTypes.info);
85
79
 
86
80
  /**
87
81
  * Opens the configuration sidebar for editing note properties
@@ -89,8 +83,8 @@
89
83
  function openConfigSidebar(): void {
90
84
  if (props.data.onConfigOpen) {
91
85
  const nodeForConfig = {
92
- id: props.data.nodeId || "unknown",
93
- type: "note",
86
+ id: props.data.nodeId || 'unknown',
87
+ type: 'note',
94
88
  data: props.data
95
89
  };
96
90
  props.data.onConfigOpen(nodeForConfig);
@@ -109,7 +103,7 @@
109
103
  * @param event - The keyboard event
110
104
  */
111
105
  function handleKeydown(event: KeyboardEvent): void {
112
- if (event.key === "Enter" || event.key === " ") {
106
+ if (event.key === 'Enter' || event.key === ' ') {
113
107
  event.preventDefault();
114
108
  handleDoubleClick();
115
109
  }
@@ -1,4 +1,4 @@
1
- import type { ConfigValues, 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;
@@ -94,9 +94,7 @@
94
94
  * Derived list of visible input ports based on hideUnconnectedHandles setting
95
95
  * Now includes both static and dynamic inputs
96
96
  */
97
- const visibleInputPorts = $derived(
98
- allInputPorts.filter((port) => isPortVisible(port, 'input'))
99
- );
97
+ const visibleInputPorts = $derived(allInputPorts.filter((port) => isPortVisible(port, 'input')));
100
98
 
101
99
  /**
102
100
  * Derived list of visible output ports based on hideUnconnectedHandles setting
@@ -1396,4 +1396,4 @@
1396
1396
 
1397
1397
  .markdown-display--large h3 {
1398
1398
  font-size: 1.25rem;
1399
- }
1399
+ }
package/package.json CHANGED
@@ -1,150 +1,164 @@
1
1
  {
2
- "name": "@d34dman/flowdrop",
3
- "license": "MIT",
4
- "private": false,
5
- "version": "0.0.24",
6
- "scripts": {
7
- "dev": "vite dev",
8
- "build": "vite build && npm run prepack",
9
- "build:drupal": "vite build --config vite.config.drupal.ts",
10
- "build:production": "vite build --config vite.config.production.ts",
11
- "watch:build:drupal": "npm-watch build:drupal",
12
- "watch:build:production": "npm-watch build:production",
13
- "watch:build": "npm-watch build",
14
- "preview": "vite preview",
15
- "prepare": "svelte-kit sync || echo ''",
16
- "prepack": "svelte-kit sync && svelte-package && publint",
17
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
18
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
19
- "lint": "eslint . && prettier --check .",
20
- "test:unit": "vitest",
21
- "test": "npm run test:unit -- --run && npm run test:e2e",
22
- "test:e2e": "playwright test",
23
- "format": "prettier --write .",
24
- "storybook": "storybook dev -p 6006",
25
- "build-storybook": "storybook build"
26
- },
27
- "watch": {
28
- "build": {
29
- "ignore": "build",
30
- "patterns": [
31
- "src"
32
- ],
33
- "extensions": "js,ts,svelte,html,css,svg",
34
- "quiet": true,
35
- "legacyWatch": true,
36
- "delay": 2500,
37
- "runOnChangeOnly": false
38
- },
39
- "build:drupal": {
40
- "ignore": "build",
41
- "patterns": [
42
- "src"
43
- ],
44
- "extensions": "js,ts,svelte,html,css,svg",
45
- "quiet": true,
46
- "legacyWatch": true,
47
- "delay": 2500,
48
- "runOnChangeOnly": false
49
- },
50
- "build:production": {
51
- "ignore": "build",
52
- "patterns": [
53
- "src"
54
- ],
55
- "extensions": "js,ts,svelte,html,css,svg",
56
- "quiet": true,
57
- "legacyWatch": true,
58
- "delay": 2500,
59
- "runOnChangeOnly": false
60
- }
61
- },
62
- "files": [
63
- "dist",
64
- "!dist/**/*.test.*",
65
- "!dist/**/*.spec.*"
66
- ],
67
- "sideEffects": [
68
- "**/*.css",
69
- "./dist/styles/base.css"
70
- ],
71
- "svelte": "./dist/index.js",
72
- "types": "./dist/index.d.ts",
73
- "type": "module",
74
- "exports": {
75
- ".": {
76
- "types": "./dist/index.d.ts",
77
- "svelte": "./dist/index.js",
78
- "default": "./dist/index.js"
79
- },
80
- "./styles/base.css": "./dist/styles/base.css"
81
- },
82
- "peerDependencies": {
83
- "@sveltejs/kit": "^2.0.0",
84
- "svelte": "^5.0.0"
85
- },
86
- "repository": {
87
- "type": "git",
88
- "url": "git+https://github.com/d34dman/flowdrop.git"
89
- },
90
- "devDependencies": {
91
- "@chromatic-com/storybook": "^4.0.1",
92
- "@eslint/compat": "^1.2.5",
93
- "@eslint/js": "^9.18.0",
94
- "@iconify/svelte": "^5.0.0",
95
- "@playwright/test": "^1.49.1",
96
- "@storybook/addon-docs": "^9.0.15",
97
- "@storybook/addon-svelte-csf": "^5.0.4",
98
- "@storybook/addon-vitest": "^9.0.15",
99
- "@storybook/sveltekit": "^9.0.15",
100
- "@sveltejs/adapter-auto": "^6.0.0",
101
- "@sveltejs/adapter-node": "^5.4.0",
102
- "@sveltejs/kit": "^2.49.2",
103
- "@sveltejs/package": "^2.0.0",
104
- "@sveltejs/vite-plugin-svelte": "^5.0.0",
105
- "@types/marked": "^6.0.0",
106
- "@types/node": "^20",
107
- "@vitest/browser": "^3.2.3",
108
- "eslint": "^9.18.0",
109
- "eslint-config-prettier": "^10.0.1",
110
- "eslint-plugin-storybook": "^9.0.15",
111
- "eslint-plugin-svelte": "^3.0.0",
112
- "globals": "^16.0.0",
113
- "msw": "^2.12.7",
114
- "npm-watch": "^0.13.0",
115
- "playwright": "^1.53.0",
116
- "prettier": "^3.4.2",
117
- "prettier-plugin-svelte": "^3.3.3",
118
- "publint": "^0.3.2",
119
- "storybook": "^9.0.15",
120
- "svelte": "^5.0.0",
121
- "svelte-check": "^4.0.0",
122
- "terser": "^5.43.1",
123
- "typescript": "^5.0.0",
124
- "typescript-eslint": "^8.20.0",
125
- "vite": "^6.2.6",
126
- "vite-plugin-devtools-json": "^0.2.1",
127
- "vitest": "^3.2.3",
128
- "vitest-browser-svelte": "^0.1.0",
129
- "@types/uuid": "^10.0.0"
130
- },
131
- "overrides": {
132
- "@sveltejs/kit": {
133
- "cookie": "0.7.2"
134
- }
135
- },
136
- "keywords": [
137
- "svelte"
138
- ],
139
- "dependencies": {
140
- "@xyflow/svelte": "~1.2",
141
- "marked": "^16.1.1",
142
- "svelte-5-french-toast": "^2.0.6",
143
- "uuid": "^11.1.0"
144
- },
145
- "msw": {
146
- "workerDirectory": [
147
- "static"
148
- ]
149
- }
2
+ "name": "@d34dman/flowdrop",
3
+ "license": "MIT",
4
+ "private": false,
5
+ "version": "0.0.26",
6
+ "scripts": {
7
+ "dev": "vite dev",
8
+ "build": "vite build && npm run prepack",
9
+ "build:drupal": "vite build --config vite.config.drupal.ts",
10
+ "build:production": "vite build --config vite.config.production.ts",
11
+ "watch:build:drupal": "npm-watch build:drupal",
12
+ "watch:build:production": "npm-watch build:production",
13
+ "watch:build": "npm-watch build",
14
+ "preview": "vite preview",
15
+ "prepare": "svelte-kit sync || echo ''",
16
+ "prepack": "svelte-kit sync && svelte-package && publint",
17
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
18
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
19
+ "lint": "eslint . && prettier --check .",
20
+ "test": "vitest run",
21
+ "test:watch": "vitest",
22
+ "test:ui": "vitest --ui",
23
+ "test:coverage": "vitest run --coverage",
24
+ "test:e2e": "playwright test",
25
+ "test:e2e:ui": "playwright test --ui",
26
+ "test:e2e:debug": "playwright test --debug",
27
+ "test:all": "npm run test && npm run test:e2e",
28
+ "format": "prettier --write .",
29
+ "storybook": "storybook dev -p 6006",
30
+ "build-storybook": "storybook build"
31
+ },
32
+ "watch": {
33
+ "build": {
34
+ "ignore": "build",
35
+ "patterns": [
36
+ "src"
37
+ ],
38
+ "extensions": "js,ts,svelte,html,css,svg",
39
+ "quiet": true,
40
+ "legacyWatch": true,
41
+ "delay": 2500,
42
+ "runOnChangeOnly": false
43
+ },
44
+ "build:drupal": {
45
+ "ignore": "build",
46
+ "patterns": [
47
+ "src"
48
+ ],
49
+ "extensions": "js,ts,svelte,html,css,svg",
50
+ "quiet": true,
51
+ "legacyWatch": true,
52
+ "delay": 2500,
53
+ "runOnChangeOnly": false
54
+ },
55
+ "build:production": {
56
+ "ignore": "build",
57
+ "patterns": [
58
+ "src"
59
+ ],
60
+ "extensions": "js,ts,svelte,html,css,svg",
61
+ "quiet": true,
62
+ "legacyWatch": true,
63
+ "delay": 2500,
64
+ "runOnChangeOnly": false
65
+ }
66
+ },
67
+ "files": [
68
+ "dist",
69
+ "!dist/**/*.test.*",
70
+ "!dist/**/*.spec.*"
71
+ ],
72
+ "sideEffects": [
73
+ "**/*.css",
74
+ "./dist/styles/base.css"
75
+ ],
76
+ "svelte": "./dist/index.js",
77
+ "types": "./dist/index.d.ts",
78
+ "type": "module",
79
+ "exports": {
80
+ ".": {
81
+ "types": "./dist/index.d.ts",
82
+ "svelte": "./dist/index.js",
83
+ "default": "./dist/index.js"
84
+ },
85
+ "./styles/base.css": "./dist/styles/base.css"
86
+ },
87
+ "peerDependencies": {
88
+ "@sveltejs/kit": "^2.0.0",
89
+ "svelte": "^5.0.0"
90
+ },
91
+ "repository": {
92
+ "type": "git",
93
+ "url": "git+https://github.com/d34dman/flowdrop.git"
94
+ },
95
+ "devDependencies": {
96
+ "@chromatic-com/storybook": "^4.0.1",
97
+ "@eslint/compat": "^1.2.5",
98
+ "@eslint/js": "^9.18.0",
99
+ "@iconify/svelte": "^5.0.0",
100
+ "@playwright/test": "^1.49.1",
101
+ "@storybook/addon-docs": "^9.0.15",
102
+ "@storybook/addon-svelte-csf": "^5.0.4",
103
+ "@storybook/addon-vitest": "^9.0.15",
104
+ "@storybook/sveltekit": "^9.0.15",
105
+ "@sveltejs/adapter-auto": "^6.0.0",
106
+ "@sveltejs/adapter-node": "^5.4.0",
107
+ "@sveltejs/kit": "^2.49.2",
108
+ "@sveltejs/package": "^2.0.0",
109
+ "@sveltejs/vite-plugin-svelte": "^5.0.0",
110
+ "@types/marked": "^6.0.0",
111
+ "@types/node": "^20",
112
+ "@types/uuid": "^10.0.0",
113
+ "@vitest/browser": "^3.2.3",
114
+ "@vitest/coverage-v8": "^3.2.4",
115
+ "@vitest/ui": "^3.2.4",
116
+ "eslint": "^9.18.0",
117
+ "eslint-config-prettier": "^10.0.1",
118
+ "eslint-plugin-storybook": "^9.0.15",
119
+ "eslint-plugin-svelte": "^3.0.0",
120
+ "globals": "^16.0.0",
121
+ "happy-dom": "^20.0.11",
122
+ "msw": "^2.12.7",
123
+ "npm-watch": "^0.13.0",
124
+ "playwright": "^1.53.0",
125
+ "prettier": "^3.4.2",
126
+ "prettier-plugin-svelte": "^3.3.3",
127
+ "publint": "^0.3.2",
128
+ "storybook": "^9.0.15",
129
+ "svelte": "^5.0.0",
130
+ "svelte-check": "^4.0.0",
131
+ "terser": "^5.43.1",
132
+ "typescript": "^5.0.0",
133
+ "typescript-eslint": "^8.20.0",
134
+ "vite": "^6.2.6",
135
+ "vite-plugin-devtools-json": "^0.2.1",
136
+ "vitest": "^3.2.3",
137
+ "vitest-browser-svelte": "^0.1.0"
138
+ },
139
+ "overrides": {
140
+ "@sveltejs/kit": {
141
+ "cookie": "0.7.2"
142
+ }
143
+ },
144
+ "keywords": [
145
+ "svelte"
146
+ ],
147
+ "dependencies": {
148
+ "@codemirror/autocomplete": "^6.20.0",
149
+ "@codemirror/lang-json": "^6.0.2",
150
+ "@codemirror/lint": "^6.9.2",
151
+ "@codemirror/theme-one-dark": "^6.1.3",
152
+ "@xyflow/svelte": "~1.2",
153
+ "codemirror": "^6.0.2",
154
+ "easymde": "^2.20.0",
155
+ "marked": "^16.1.1",
156
+ "svelte-5-french-toast": "^2.0.6",
157
+ "uuid": "^11.1.0"
158
+ },
159
+ "msw": {
160
+ "workerDirectory": [
161
+ "static"
162
+ ]
163
+ }
150
164
  }