@vanduo-oss/vd3-flowchart 1.4.0 → 1.5.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/dist/meta.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "format": "esm"
12
12
  },
13
13
  "src/core.js": {
14
- "bytes": 196396,
14
+ "bytes": 207176,
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": 3981,
35
+ "bytes": 4995,
36
36
  "imports": [
37
37
  {
38
38
  "path": "vue",
@@ -69,7 +69,7 @@
69
69
  "imports": [],
70
70
  "exports": [],
71
71
  "inputs": {},
72
- "bytes": 360394
72
+ "bytes": 379973
73
73
  },
74
74
  "dist/index.js": {
75
75
  "imports": [
@@ -95,7 +95,7 @@
95
95
  "entryPoint": "src/index.js",
96
96
  "inputs": {
97
97
  "src/vue.js": {
98
- "bytesInOutput": 3238
98
+ "bytesInOutput": 4145
99
99
  },
100
100
  "src/layout.js": {
101
101
  "bytesInOutput": 6422
@@ -104,19 +104,19 @@
104
104
  "bytesInOutput": 4886
105
105
  },
106
106
  "src/core.js": {
107
- "bytesInOutput": 186928
107
+ "bytesInOutput": 197291
108
108
  },
109
109
  "src/index.js": {
110
110
  "bytesInOutput": 0
111
111
  }
112
112
  },
113
- "bytes": 201879
113
+ "bytes": 213149
114
114
  },
115
115
  "dist/index.cjs.map": {
116
116
  "imports": [],
117
117
  "exports": [],
118
118
  "inputs": {},
119
- "bytes": 361074
119
+ "bytes": 380653
120
120
  },
121
121
  "dist/index.cjs": {
122
122
  "imports": [
@@ -133,7 +133,7 @@
133
133
  "bytesInOutput": 634
134
134
  },
135
135
  "src/vue.js": {
136
- "bytesInOutput": 3301
136
+ "bytesInOutput": 4208
137
137
  },
138
138
  "src/layout.js": {
139
139
  "bytesInOutput": 6422
@@ -142,10 +142,10 @@
142
142
  "bytesInOutput": 4886
143
143
  },
144
144
  "src/core.js": {
145
- "bytesInOutput": 186928
145
+ "bytesInOutput": 197291
146
146
  }
147
147
  },
148
- "bytes": 203105
148
+ "bytes": 214375
149
149
  }
150
150
  }
151
151
  }
package/dist/vue.d.ts CHANGED
@@ -41,6 +41,14 @@ export interface VdFlowchartProps {
41
41
  minimap?: boolean;
42
42
  /** Re-run the current layout after keyboard or handle insertions (default false). */
43
43
  autoLayout?: boolean;
44
+ /** Lowest camera scale. Defaults to 0.35. Set it together with `maxScale`. */
45
+ minScale?: number;
46
+ /** Highest camera scale. Defaults to 3. Set it together with `minScale`. */
47
+ maxScale?: number;
48
+ /** Smallest resizable-node side. Defaults to 56. Set it together with `maxNodeSize`. */
49
+ minNodeSize?: number;
50
+ /** Largest resizable-node side. Defaults to 420. Set it together with `minNodeSize`. */
51
+ maxNodeSize?: number;
44
52
  }
45
53
 
46
54
  export interface VdFlowchartEmits {
@@ -59,6 +67,7 @@ export interface VdFlowchartExposed {
59
67
  canUndo(): boolean;
60
68
  canRedo(): boolean;
61
69
  layout(mode?: LayoutMode, options?: LayoutOptions): void;
70
+ fitNode(nodeId: string, padding?: number): void;
62
71
  }
63
72
 
64
73
  /* eslint-disable @typescript-eslint/no-empty-object-type -- DefineComponent filler params */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vanduo-oss/vd3-flowchart",
3
- "version": "1.4.0",
3
+ "version": "1.5.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",
@@ -56,6 +56,7 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@eslint/js": "10.0.1",
59
+ "@fission-ai/openspec": "1.14.3",
59
60
  "@playwright/test": "1.63.0",
60
61
  "@typescript-eslint/parser": "8.69.0",
61
62
  "@vue/test-utils": "2.5.0",
@@ -67,7 +68,8 @@
67
68
  "stylelint-config-standard": "40.0.0",
68
69
  "typescript": "6.0.3",
69
70
  "typescript-eslint": "8.69.0",
70
- "vitest": "4.1.11",
71
+ "vite": "8.3.4",
72
+ "vitest": "4.1.12",
71
73
  "vue": "3.5.42"
72
74
  },
73
75
  "engines": {
@@ -84,6 +86,7 @@
84
86
  "test": "vitest run",
85
87
  "test:types": "tsc --noEmit -p tests/types/tsconfig.json",
86
88
  "test:e2e": "playwright test",
89
+ "release:check": "node scripts/release-check.mjs",
87
90
  "release": "pnpm run build && pnpm publish",
88
91
  "test:skills": "node scripts/check-skills.mjs"
89
92
  }
@@ -12,6 +12,8 @@ const document = ref<VdFlowchartDocument>({
12
12
  <template>
13
13
  <button type="button" @click="readonly = !readonly">Toggle read-only</button>
14
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" />
15
+ <button type="button" @click="editor?.fitNode('start')">Frame start</button>
16
+ <VdFlowchart ref="editor" :data="document" :readonly="readonly"
17
+ :min-scale="0.05" :max-scale="20" :min-node-size="6" :max-node-size="4800"
18
+ auto-fit style="height: 560px" @change="document = $event.document" />
17
19
  </template>