@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/CHANGELOG.md +27 -0
- package/README.md +30 -5
- package/SKILL.md +9 -0
- package/dist/core.d.ts +14 -0
- package/dist/index.cjs +387 -124
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +387 -124
- package/dist/index.js.map +3 -3
- package/dist/meta.json +10 -10
- package/dist/vue.d.ts +9 -0
- package/package.json +5 -2
- package/recipes/editor.vue +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@vanduo-oss/vd3-flowchart` are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.5.0 — 2026-10-25
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Opt-in `minScale` and `maxScale` (default `0.35` and `3`) and `minNodeSize`
|
|
10
|
+
and `maxNodeSize` (default `56` and `420`). Junctions stay fixed-size.
|
|
11
|
+
Hosts that need a closer and wider view, including Oolaflow, can pass
|
|
12
|
+
`0.05`–`20` and `6`–`4800`.
|
|
13
|
+
- Viewport scale is stored to four decimal places, so a zoom step still moves
|
|
14
|
+
near 5%. Other geometry stays at two decimal places.
|
|
15
|
+
- Nodes smaller than their default size scale text, wrapping, radius, stroke,
|
|
16
|
+
markers, curve arms, orthogonal routes, labels, and inline editors in
|
|
17
|
+
proportion. Larger nodes do not grow that chrome.
|
|
18
|
+
- A wider camera range uses a 240,000-unit grid with spacing that stays
|
|
19
|
+
readable at 5% and 2000%. The default range keeps the 12,000-unit grid.
|
|
20
|
+
- `fitNode(nodeId, padding?)` frames one visible node. Unknown and hidden
|
|
21
|
+
nodes do nothing.
|
|
22
|
+
|
|
23
|
+
### Compatibility
|
|
24
|
+
|
|
25
|
+
- No methods were removed. Omitting the new options keeps 1.4.0 camera and
|
|
26
|
+
node limits.
|
|
27
|
+
- `FLOWCHART_DOCUMENT_VERSION` stays `1.3.0`. Older 1.x documents still load.
|
|
28
|
+
A 1.5.0 document still loads in 1.4.0, where the old clamps apply.
|
|
29
|
+
- This release does not add nested containers, suggestion overlays, floating
|
|
30
|
+
panels, or an export API.
|
|
31
|
+
|
|
5
32
|
## 1.4.0 — 2026-10-03
|
|
6
33
|
|
|
7
34
|
### Changed
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Vanduo **flowchart** for Vue 3: a node/edge editor with undo/redo, layout
|
|
|
6
6
|
modes, and a framework-agnostic core. Extracted 1-to-1 from
|
|
7
7
|
`@vanduo-oss/vd3-cbun` flowchart **1.2.0**.
|
|
8
8
|
|
|
9
|
-
**Status: 1.
|
|
9
|
+
**Status: 1.5.0.** `VD_FLOWCHART_VERSION` tracks the package release.
|
|
10
10
|
`FLOWCHART_DOCUMENT_VERSION` (currently `1.3.0`) is the value `toJSON()`
|
|
11
11
|
writes. Do not reset either independently without a compatibility plan.
|
|
12
12
|
|
|
@@ -50,7 +50,7 @@ if anything but `vue` is externalized. The package declares
|
|
|
50
50
|
|
|
51
51
|
## Version policy
|
|
52
52
|
|
|
53
|
-
`package.json` version **is** `VD_FLOWCHART_VERSION` (`1.
|
|
53
|
+
`package.json` version **is** `VD_FLOWCHART_VERSION` (`1.5.0`). Bump those
|
|
54
54
|
together for a package release. Keep `FLOWCHART_DOCUMENT_VERSION` unchanged
|
|
55
55
|
unless the serialized schema changes; add fixtures and explicit compatibility
|
|
56
56
|
rules for a format change. Unversioned 1.x documents through 1.3.0 still load;
|
|
@@ -100,6 +100,29 @@ follows mind-map tools such as XMind and MindNode:
|
|
|
100
100
|
Ctrl/Cmd+Enter saves. A node plus its edge is one undo step, and naming a
|
|
101
101
|
just-inserted node joins that step.
|
|
102
102
|
|
|
103
|
+
## Camera and node bounds
|
|
104
|
+
|
|
105
|
+
`minScale` / `maxScale` default to `0.35` / `3`, and `minNodeSize` /
|
|
106
|
+
`maxNodeSize` default to `56` / `420`. Pass a finite pair to widen either
|
|
107
|
+
range; an invalid pair falls back to those defaults. Junctions stay 28×28.
|
|
108
|
+
`fitNode(id, padding)` frames one visible node. Padding is screen pixels.
|
|
109
|
+
Scale is stored to four decimal places. Nodes smaller than their default size
|
|
110
|
+
scale their text, markers, and routes down with them. The default grid stays
|
|
111
|
+
12,000 units; a wider camera uses a 240,000-unit grid.
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
new VdFlowchartCore({
|
|
115
|
+
element: '#editor',
|
|
116
|
+
minScale: 0.05,
|
|
117
|
+
maxScale: 20,
|
|
118
|
+
minNodeSize: 6,
|
|
119
|
+
maxNodeSize: 4800,
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The same four names are Vue props. The document format is unchanged: scale and
|
|
124
|
+
size remain plain numbers.
|
|
125
|
+
|
|
103
126
|
## Theming
|
|
104
127
|
|
|
105
128
|
Flowchart chrome renders against Vanduo `--vd-*` design tokens — the same
|
|
@@ -169,9 +192,11 @@ pnpm test:e2e # Playwright Chromium (needs dist/)
|
|
|
169
192
|
`pnpm build` first**. Chromium must be installed once:
|
|
170
193
|
`pnpm exec playwright install chromium`.
|
|
171
194
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
195
|
+
Node 24 LTS is the supported development and CI runtime; run `nvm use` to select
|
|
196
|
+
it for this repository from `.nvmrc`. The existing `engines.node >=20.19.0`
|
|
197
|
+
range remains a temporary consumer compatibility floor, tested on a best-effort
|
|
198
|
+
basis until the next major release; it is not the recommended development
|
|
199
|
+
runtime.
|
|
175
200
|
|
|
176
201
|
## Documentation
|
|
177
202
|
|
package/SKILL.md
CHANGED
|
@@ -47,6 +47,15 @@ label. Shift+click, Shift+drag, and Cmd/Ctrl+A select several nodes (the
|
|
|
47
47
|
current tree or radial layout after insertions. Saved JSON uses document
|
|
48
48
|
format 1.3.0, which adds `collapsed: true` on collapsed nodes only.
|
|
49
49
|
|
|
50
|
+
## Deep zoom
|
|
51
|
+
|
|
52
|
+
`minScale` and `maxScale` default to `0.35` and `3`. `minNodeSize` and
|
|
53
|
+
`maxNodeSize` default to `56` and `420`. Pass both ends of a pair to opt into
|
|
54
|
+
a wider camera or smaller and larger nodes. Junctions stay fixed-size.
|
|
55
|
+
`getInstance().fitNode(id, padding)` frames one visible node. A node smaller
|
|
56
|
+
than its default size scales its text, markers, and connectors with it. Saved
|
|
57
|
+
JSON stays document format 1.3.0.
|
|
58
|
+
|
|
50
59
|
## Verification
|
|
51
60
|
|
|
52
61
|
Add a node, toggle read-only, and confirm the edit remains. Undo/redo, save/reload,
|
package/dist/core.d.ts
CHANGED
|
@@ -237,6 +237,14 @@ export interface VdFlowchartOptions {
|
|
|
237
237
|
minimap?: boolean;
|
|
238
238
|
/** Re-run the current tree or radial layout after insertions, in the same undo step (default false). */
|
|
239
239
|
autoLayout?: boolean;
|
|
240
|
+
/** Lowest camera scale. Default `0.35`. Pair with `maxScale`. */
|
|
241
|
+
minScale?: number;
|
|
242
|
+
/** Highest camera scale. Default `3`. Pair with `minScale`. */
|
|
243
|
+
maxScale?: number;
|
|
244
|
+
/** Smallest resizable-node side. Default `56`. Junctions stay fixed. Pair with `maxNodeSize`. */
|
|
245
|
+
minNodeSize?: number;
|
|
246
|
+
/** Largest resizable-node side. Default `420`. Pair with `minNodeSize`. */
|
|
247
|
+
maxNodeSize?: number;
|
|
240
248
|
}
|
|
241
249
|
|
|
242
250
|
export class VdFlowchart {
|
|
@@ -330,6 +338,8 @@ export class VdFlowchart {
|
|
|
330
338
|
zoomTo(scale: number): this;
|
|
331
339
|
/** Pan just enough to bring a node into view. */
|
|
332
340
|
revealNode(nodeId: string): void;
|
|
341
|
+
/** Centre and frame one visible node. Padding is screen pixels. */
|
|
342
|
+
fitNode(nodeId: string, padding?: number): this;
|
|
333
343
|
/** Show or hide the minimap. */
|
|
334
344
|
setMinimapEnabled(enabled: boolean): this;
|
|
335
345
|
/** Pan so a world point is at the centre of the view. */
|
|
@@ -364,6 +374,10 @@ export class VdFlowchart {
|
|
|
364
374
|
| 'snapGuides'
|
|
365
375
|
| 'minimap'
|
|
366
376
|
| 'autoLayout'
|
|
377
|
+
| 'minScale'
|
|
378
|
+
| 'maxScale'
|
|
379
|
+
| 'minNodeSize'
|
|
380
|
+
| 'maxNodeSize'
|
|
367
381
|
>,
|
|
368
382
|
): this;
|
|
369
383
|
destroy(): void;
|