@vanduo-oss/vd3-flowchart 1.6.0 → 1.6.1
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 +12 -0
- package/README.md +2 -2
- package/dist/index.cjs +173 -31
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +173 -31
- package/dist/index.js.map +2 -2
- package/dist/meta.json +11 -11
- package/dist/vue.d.ts +1 -0
- package/package.json +1 -1
- package/recipes/editor.vue +7 -0
package/dist/meta.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"format": "esm"
|
|
12
12
|
},
|
|
13
13
|
"src/core.js": {
|
|
14
|
-
"bytes":
|
|
14
|
+
"bytes": 267424,
|
|
15
15
|
"imports": [
|
|
16
16
|
{
|
|
17
17
|
"path": "src/layout.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"format": "esm"
|
|
33
33
|
},
|
|
34
34
|
"src/vue.js": {
|
|
35
|
-
"bytes":
|
|
35
|
+
"bytes": 6338,
|
|
36
36
|
"imports": [
|
|
37
37
|
{
|
|
38
38
|
"path": "vue",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"format": "esm"
|
|
49
49
|
},
|
|
50
50
|
"src/index.js": {
|
|
51
|
-
"bytes":
|
|
51
|
+
"bytes": 639,
|
|
52
52
|
"imports": [
|
|
53
53
|
{
|
|
54
54
|
"path": "src/vue.js",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"imports": [],
|
|
70
70
|
"exports": [],
|
|
71
71
|
"inputs": {},
|
|
72
|
-
"bytes":
|
|
72
|
+
"bytes": 489729
|
|
73
73
|
},
|
|
74
74
|
"dist/index.js": {
|
|
75
75
|
"imports": [
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"entryPoint": "src/index.js",
|
|
100
100
|
"inputs": {
|
|
101
101
|
"src/vue.js": {
|
|
102
|
-
"bytesInOutput":
|
|
102
|
+
"bytesInOutput": 5493
|
|
103
103
|
},
|
|
104
104
|
"src/layout.js": {
|
|
105
105
|
"bytesInOutput": 11220
|
|
@@ -108,19 +108,19 @@
|
|
|
108
108
|
"bytesInOutput": 4886
|
|
109
109
|
},
|
|
110
110
|
"src/core.js": {
|
|
111
|
-
"bytesInOutput":
|
|
111
|
+
"bytesInOutput": 256322
|
|
112
112
|
},
|
|
113
113
|
"src/index.js": {
|
|
114
114
|
"bytesInOutput": 0
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
|
-
"bytes":
|
|
117
|
+
"bytes": 278443
|
|
118
118
|
},
|
|
119
119
|
"dist/index.cjs.map": {
|
|
120
120
|
"imports": [],
|
|
121
121
|
"exports": [],
|
|
122
122
|
"inputs": {},
|
|
123
|
-
"bytes":
|
|
123
|
+
"bytes": 490530
|
|
124
124
|
},
|
|
125
125
|
"dist/index.cjs": {
|
|
126
126
|
"imports": [
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"bytesInOutput": 884
|
|
138
138
|
},
|
|
139
139
|
"src/vue.js": {
|
|
140
|
-
"bytesInOutput":
|
|
140
|
+
"bytesInOutput": 5556
|
|
141
141
|
},
|
|
142
142
|
"src/layout.js": {
|
|
143
143
|
"bytesInOutput": 11220
|
|
@@ -146,10 +146,10 @@
|
|
|
146
146
|
"bytesInOutput": 4886
|
|
147
147
|
},
|
|
148
148
|
"src/core.js": {
|
|
149
|
-
"bytesInOutput":
|
|
149
|
+
"bytesInOutput": 256322
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
|
-
"bytes":
|
|
152
|
+
"bytes": 279802
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
package/dist/vue.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export interface VdFlowchartEmits {
|
|
|
64
64
|
(event: 'viewport', payload: FlowchartViewportEvent): void;
|
|
65
65
|
(event: 'connect', payload: FlowchartConnectEvent): void;
|
|
66
66
|
(event: 'ready', instance: VdFlowchartCore): void;
|
|
67
|
+
(event: 'history', payload: { canUndo: boolean; canRedo: boolean }): void;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/** Methods exposed via a template ref. */
|
package/package.json
CHANGED
package/recipes/editor.vue
CHANGED
|
@@ -8,11 +8,18 @@ const document = ref<VdFlowchartDocument>({
|
|
|
8
8
|
nodes: [{ id: 'start', text: 'Start', x: 40, y: 100 }, { id: 'end', text: 'End', x: 300, y: 100 }],
|
|
9
9
|
edges: [{ id: 'next', from: { nodeId: 'start', port: 'right' }, to: { nodeId: 'end', port: 'left' } }],
|
|
10
10
|
});
|
|
11
|
+
function exportDiagram(): string {
|
|
12
|
+
return editor.value?.exportSvg({ background: 'theme', padding: 24 }) ?? '';
|
|
13
|
+
}
|
|
11
14
|
</script>
|
|
12
15
|
<template>
|
|
13
16
|
<button type="button" @click="readonly = !readonly">Toggle read-only</button>
|
|
14
17
|
<button type="button" :disabled="readonly" @click="editor?.undo()">Undo</button>
|
|
15
18
|
<button type="button" @click="editor?.fitNode('start')">Frame start</button>
|
|
19
|
+
<button type="button" :disabled="readonly" @click="editor?.setNodeColor('start', 'primary')">Color start</button>
|
|
20
|
+
<button type="button" :disabled="readonly" @click="editor?.setNodeLocked('start', true)">Lock start</button>
|
|
21
|
+
<button type="button" :disabled="readonly" @click="editor?.alignNodes('middle', ['start', 'end'])">Align</button>
|
|
22
|
+
<button type="button" @click="exportDiagram()">Export SVG</button>
|
|
16
23
|
<VdFlowchart ref="editor" :data="document" :readonly="readonly"
|
|
17
24
|
:min-scale="0.05" :max-scale="20" :min-node-size="6" :max-node-size="4800"
|
|
18
25
|
auto-fit style="height: 560px" @change="document = $event.document" />
|