@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.
- package/README.md +52 -62
- package/dist/components/App.svelte +15 -2
- package/dist/components/ConfigForm.svelte +4 -1
- package/dist/components/ConfigModal.svelte +4 -70
- package/dist/components/ConfigPanel.svelte +4 -9
- package/dist/components/EdgeRefresher.svelte +42 -0
- package/dist/components/EdgeRefresher.svelte.d.ts +9 -0
- package/dist/components/ReadOnlyDetails.svelte +3 -1
- package/dist/components/UniversalNode.svelte +6 -3
- package/dist/components/WorkflowEditor.svelte +33 -0
- package/dist/components/WorkflowEditor.svelte.d.ts +3 -1
- package/dist/components/form/FormCheckboxGroup.svelte +2 -9
- package/dist/components/form/FormCodeEditor.svelte +416 -0
- package/dist/components/form/FormCodeEditor.svelte.d.ts +23 -0
- package/dist/components/form/FormField.svelte +125 -85
- package/dist/components/form/FormField.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.svelte +2 -10
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
- package/dist/components/form/FormMarkdownEditor.svelte +553 -0
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +29 -0
- package/dist/components/form/FormNumberField.svelte +5 -6
- package/dist/components/form/FormRangeField.svelte +3 -13
- package/dist/components/form/FormSelect.svelte +4 -5
- package/dist/components/form/FormSelect.svelte.d.ts +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +463 -0
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +25 -0
- package/dist/components/form/FormTextField.svelte +3 -4
- package/dist/components/form/FormTextarea.svelte +3 -4
- package/dist/components/form/FormToggle.svelte +2 -3
- package/dist/components/form/index.d.ts +14 -11
- package/dist/components/form/index.js +14 -11
- package/dist/components/form/types.d.ts +55 -2
- package/dist/components/form/types.js +1 -1
- package/dist/components/nodes/NotesNode.svelte +39 -45
- package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
- package/dist/components/nodes/WorkflowNode.svelte +1 -3
- package/dist/styles/base.css +1 -1
- 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] ===
|
|
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
|
|
3
|
-
import Icon from
|
|
4
|
-
import MarkdownDisplay from
|
|
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:
|
|
41
|
-
bgColor:
|
|
42
|
-
borderColor:
|
|
43
|
-
textColor:
|
|
44
|
-
iconColor:
|
|
45
|
-
icon:
|
|
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:
|
|
49
|
-
bgColor:
|
|
50
|
-
borderColor:
|
|
51
|
-
textColor:
|
|
52
|
-
iconColor:
|
|
53
|
-
icon:
|
|
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:
|
|
57
|
-
bgColor:
|
|
58
|
-
borderColor:
|
|
59
|
-
textColor:
|
|
60
|
-
iconColor:
|
|
61
|
-
icon:
|
|
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:
|
|
65
|
-
bgColor:
|
|
66
|
-
borderColor:
|
|
67
|
-
textColor:
|
|
68
|
-
iconColor:
|
|
69
|
-
icon:
|
|
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:
|
|
73
|
-
bgColor:
|
|
74
|
-
borderColor:
|
|
75
|
-
textColor:
|
|
76
|
-
iconColor:
|
|
77
|
-
icon:
|
|
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 ||
|
|
93
|
-
type:
|
|
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 ===
|
|
106
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
113
107
|
event.preventDefault();
|
|
114
108
|
handleDoubleClick();
|
|
115
109
|
}
|
|
@@ -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
|
package/dist/styles/base.css
CHANGED
package/package.json
CHANGED
|
@@ -1,150 +1,164 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
}
|