@vanduo-oss/vd3-flowchart 1.2.0 → 1.3.0
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/CHANGELOG.md +21 -0
- package/README.md +32 -8
- package/SKILL.md +28 -35
- package/dist/core.d.ts +11 -0
- package/dist/index.cjs +279 -15
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +279 -15
- package/dist/index.js.map +2 -2
- package/dist/meta.json +13 -12
- package/dist/vd3-flowchart.css +44 -3
- package/package.json +12 -6
- package/recipes/editor.vue +17 -0
- package/styles.d.ts +2 -0
package/dist/meta.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"format": "esm"
|
|
7
7
|
},
|
|
8
8
|
"src/core.js": {
|
|
9
|
-
"bytes":
|
|
9
|
+
"bytes": 139173,
|
|
10
10
|
"imports": [
|
|
11
11
|
{
|
|
12
12
|
"path": "src/layout.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"format": "esm"
|
|
23
23
|
},
|
|
24
24
|
"src/vue.js": {
|
|
25
|
-
"bytes":
|
|
25
|
+
"bytes": 3476,
|
|
26
26
|
"imports": [
|
|
27
27
|
{
|
|
28
28
|
"path": "vue",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"format": "esm"
|
|
39
39
|
},
|
|
40
40
|
"src/index.js": {
|
|
41
|
-
"bytes":
|
|
41
|
+
"bytes": 509,
|
|
42
42
|
"imports": [
|
|
43
43
|
{
|
|
44
44
|
"path": "src/vue.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"imports": [],
|
|
60
60
|
"exports": [],
|
|
61
61
|
"inputs": {},
|
|
62
|
-
"bytes":
|
|
62
|
+
"bytes": 253577
|
|
63
63
|
},
|
|
64
64
|
"dist/index.js": {
|
|
65
65
|
"imports": [
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
],
|
|
72
72
|
"exports": [
|
|
73
|
+
"FLOWCHART_DOCUMENT_VERSION",
|
|
73
74
|
"FLOWCHART_EDGE_MARKERS",
|
|
74
75
|
"FLOWCHART_EDGE_ROUTES",
|
|
75
76
|
"FLOWCHART_NODE_TYPES",
|
|
@@ -83,25 +84,25 @@
|
|
|
83
84
|
"entryPoint": "src/index.js",
|
|
84
85
|
"inputs": {
|
|
85
86
|
"src/vue.js": {
|
|
86
|
-
"bytesInOutput":
|
|
87
|
+
"bytesInOutput": 2817
|
|
87
88
|
},
|
|
88
89
|
"src/layout.js": {
|
|
89
90
|
"bytesInOutput": 6422
|
|
90
91
|
},
|
|
91
92
|
"src/core.js": {
|
|
92
|
-
"bytesInOutput":
|
|
93
|
+
"bytesInOutput": 132719
|
|
93
94
|
},
|
|
94
95
|
"src/index.js": {
|
|
95
96
|
"bytesInOutput": 0
|
|
96
97
|
}
|
|
97
98
|
},
|
|
98
|
-
"bytes":
|
|
99
|
+
"bytes": 142312
|
|
99
100
|
},
|
|
100
101
|
"dist/index.cjs.map": {
|
|
101
102
|
"imports": [],
|
|
102
103
|
"exports": [],
|
|
103
104
|
"inputs": {},
|
|
104
|
-
"bytes":
|
|
105
|
+
"bytes": 254219
|
|
105
106
|
},
|
|
106
107
|
"dist/index.cjs": {
|
|
107
108
|
"imports": [
|
|
@@ -115,19 +116,19 @@
|
|
|
115
116
|
"entryPoint": "src/index.js",
|
|
116
117
|
"inputs": {
|
|
117
118
|
"src/index.js": {
|
|
118
|
-
"bytesInOutput":
|
|
119
|
+
"bytesInOutput": 566
|
|
119
120
|
},
|
|
120
121
|
"src/vue.js": {
|
|
121
|
-
"bytesInOutput":
|
|
122
|
+
"bytesInOutput": 2880
|
|
122
123
|
},
|
|
123
124
|
"src/layout.js": {
|
|
124
125
|
"bytesInOutput": 6422
|
|
125
126
|
},
|
|
126
127
|
"src/core.js": {
|
|
127
|
-
"bytesInOutput":
|
|
128
|
+
"bytesInOutput": 132719
|
|
128
129
|
}
|
|
129
130
|
},
|
|
130
|
-
"bytes":
|
|
131
|
+
"bytes": 143502
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
}
|
package/dist/vd3-flowchart.css
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
.vd-flowchart-shell {
|
|
45
45
|
box-sizing: border-box;
|
|
46
46
|
display: grid;
|
|
47
|
-
grid-template-rows: auto minmax(0, 1fr);
|
|
47
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
48
48
|
height: 100%;
|
|
49
49
|
/* Fill the host only — a fixed min-height here overflowed short containers
|
|
50
50
|
and clipped the bottom outline off-screen. */
|
|
@@ -352,8 +352,7 @@
|
|
|
352
352
|
.vd-flowchart-field input:focus-visible,
|
|
353
353
|
.vd-flowchart-field select:focus-visible,
|
|
354
354
|
.vd-flowchart-field textarea:focus-visible,
|
|
355
|
-
.vd-flowchart-json textarea:focus-visible
|
|
356
|
-
.vd-flowchart-canvas:focus-visible {
|
|
355
|
+
.vd-flowchart-json textarea:focus-visible {
|
|
357
356
|
outline: 2px solid color-mix(in srgb, var(--vd-flowchart-accent) 72%, transparent);
|
|
358
357
|
outline-offset: 2px;
|
|
359
358
|
}
|
|
@@ -727,3 +726,45 @@
|
|
|
727
726
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
728
727
|
}
|
|
729
728
|
}
|
|
729
|
+
|
|
730
|
+
.vd-flowchart-outline {
|
|
731
|
+
max-height: 220px;
|
|
732
|
+
overflow: auto;
|
|
733
|
+
padding: 0.5rem 0.9rem;
|
|
734
|
+
border-top: 1px solid var(--vd-flowchart-border);
|
|
735
|
+
background: var(--vd-flowchart-panel);
|
|
736
|
+
font-size: 0.875rem;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
.vd-flowchart-outline summary {
|
|
740
|
+
cursor: pointer;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.vd-flowchart-outline-controls {
|
|
744
|
+
display: flex;
|
|
745
|
+
flex-wrap: wrap;
|
|
746
|
+
gap: 0.5rem;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.vd-flowchart-host .vd-flowchart-outline select,
|
|
750
|
+
.vd-flowchart-shell .vd-flowchart-outline select {
|
|
751
|
+
max-width: 16rem;
|
|
752
|
+
color: var(--vd-flowchart-text);
|
|
753
|
+
background: var(--vd-flowchart-surface);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.vd-flowchart-outline :focus-visible,
|
|
757
|
+
.vd-flowchart-canvas:focus-visible {
|
|
758
|
+
outline: 2px solid var(--vd-flowchart-accent);
|
|
759
|
+
outline-offset: -2px;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.vd-flowchart-sr-only {
|
|
763
|
+
position: absolute;
|
|
764
|
+
width: 1px;
|
|
765
|
+
height: 1px;
|
|
766
|
+
padding: 0;
|
|
767
|
+
overflow: hidden;
|
|
768
|
+
clip-path: inset(50%);
|
|
769
|
+
white-space: nowrap;
|
|
770
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vanduo-oss/vd3-flowchart",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Vanduo Vue 3 flowchart editor — nodes, edges, layout, undo/redo, and a framework-agnostic core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
"import": "./dist/index.js",
|
|
29
29
|
"require": "./dist/index.cjs"
|
|
30
30
|
},
|
|
31
|
-
"./css":
|
|
31
|
+
"./css": {
|
|
32
|
+
"types": "./styles.d.ts",
|
|
33
|
+
"default": "./dist/vd3-flowchart.css"
|
|
34
|
+
},
|
|
32
35
|
"./package.json": "./package.json"
|
|
33
36
|
},
|
|
34
37
|
"files": [
|
|
@@ -36,7 +39,9 @@
|
|
|
36
39
|
"README.md",
|
|
37
40
|
"SKILL.md",
|
|
38
41
|
"CHANGELOG.md",
|
|
39
|
-
"LICENSE"
|
|
42
|
+
"LICENSE",
|
|
43
|
+
"recipes",
|
|
44
|
+
"styles.d.ts"
|
|
40
45
|
],
|
|
41
46
|
"keywords": [
|
|
42
47
|
"vanduo",
|
|
@@ -73,12 +78,13 @@
|
|
|
73
78
|
"build": "node scripts/build.js",
|
|
74
79
|
"clean": "rm -rf dist",
|
|
75
80
|
"lint": "eslint .",
|
|
76
|
-
"format": "prettier --write \"src/**/*.{js,ts}\" \"scripts/**/*.js\" \"tests/**/*.{js,ts}\"",
|
|
77
|
-
"format:check": "prettier --check \"src/**/*.{js,ts}\" \"scripts/**/*.js\" \"tests/**/*.{js,ts}\"",
|
|
81
|
+
"format": "prettier --write \"src/**/*.{js,ts}\" \"scripts/**/*.{js,mjs}\" \"tests/**/*.{js,ts}\"",
|
|
82
|
+
"format:check": "prettier --check \"src/**/*.{js,ts}\" \"scripts/**/*.{js,mjs}\" \"tests/**/*.{js,ts}\"",
|
|
78
83
|
"stylelint": "stylelint \"src/**/*.css\"",
|
|
79
84
|
"test": "vitest run",
|
|
80
85
|
"test:types": "tsc --noEmit -p tests/types/tsconfig.json",
|
|
81
86
|
"test:e2e": "playwright test",
|
|
82
|
-
"release": "pnpm run build && pnpm publish"
|
|
87
|
+
"release": "pnpm run build && pnpm publish",
|
|
88
|
+
"test:skills": "node scripts/check-skills.mjs"
|
|
83
89
|
}
|
|
84
90
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import { VdFlowchart, type VdFlowchartDocument, type VdFlowchartExposed } from '@vanduo-oss/vd3-flowchart';
|
|
4
|
+
import '@vanduo-oss/vd3-flowchart/css';
|
|
5
|
+
const editor = ref<VdFlowchartExposed | null>(null);
|
|
6
|
+
const readonly = ref(false);
|
|
7
|
+
const document = ref<VdFlowchartDocument>({
|
|
8
|
+
nodes: [{ id: 'start', text: 'Start', x: 40, y: 100 }, { id: 'end', text: 'End', x: 300, y: 100 }],
|
|
9
|
+
edges: [{ id: 'next', from: { nodeId: 'start', port: 'right' }, to: { nodeId: 'end', port: 'left' } }],
|
|
10
|
+
});
|
|
11
|
+
</script>
|
|
12
|
+
<template>
|
|
13
|
+
<button type="button" @click="readonly = !readonly">Toggle read-only</button>
|
|
14
|
+
<button type="button" :disabled="readonly" @click="editor?.undo()">Undo</button>
|
|
15
|
+
<VdFlowchart ref="editor" :data="document" :readonly="readonly" auto-fit
|
|
16
|
+
style="height: 560px" @change="document = $event.document" />
|
|
17
|
+
</template>
|
package/styles.d.ts
ADDED