@vanduo-oss/vd3-flowchart 1.4.0 → 1.5.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 +45 -0
- package/README.md +35 -5
- package/SKILL.md +9 -0
- package/dist/core.d.ts +14 -0
- package/dist/index.cjs +667 -156
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +667 -156
- package/dist/index.js.map +3 -3
- package/dist/meta.json +13 -13
- package/dist/vd3-flowchart.css +50 -4
- 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,51 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@vanduo-oss/vd3-flowchart` are documented here.
|
|
4
4
|
|
|
5
|
+
## 1.5.1 — 2026-11-01
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Inline text editors for shapes use transparent chrome so circles and diamonds
|
|
10
|
+
keep their SVG silhouette while typing. Textbox, edge, and label editors keep
|
|
11
|
+
an opaque panel.
|
|
12
|
+
- Dark theme idle node strokes lean on the accent color so outlines stay visible
|
|
13
|
+
without hover or selection. Hosts may still override `--vd-flowchart-node-stroke`.
|
|
14
|
+
- The diagram canvas no longer draws a full-viewport focus ring. Mindmap Tab that
|
|
15
|
+
opens a new branch editor skips the intermediate canvas focus flash.
|
|
16
|
+
- Tree layout measures node size. Rank and sibling gaps stay clear of the boxes,
|
|
17
|
+
and a decision with one deep branch keeps that branch on the main spine.
|
|
18
|
+
- Facing orthogonal connectors shorten their stubs when two shapes sit closer
|
|
19
|
+
than two full stubs, so the route does not loop around the pair.
|
|
20
|
+
- Tree layout re-picks ports from the flow: diamond side branches leave the side
|
|
21
|
+
ports, and a reverse loop uses the quieter side of the spine.
|
|
22
|
+
|
|
23
|
+
## 1.5.0 — 2026-10-25
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Opt-in `minScale` and `maxScale` (default `0.35` and `3`) and `minNodeSize`
|
|
28
|
+
and `maxNodeSize` (default `56` and `420`). Junctions stay fixed-size.
|
|
29
|
+
Hosts that need a closer and wider view, including Oolaflow, can pass
|
|
30
|
+
`0.05`–`20` and `6`–`4800`.
|
|
31
|
+
- Viewport scale is stored to four decimal places, so a zoom step still moves
|
|
32
|
+
near 5%. Other geometry stays at two decimal places.
|
|
33
|
+
- Nodes smaller than their default size scale text, wrapping, radius, stroke,
|
|
34
|
+
markers, curve arms, orthogonal routes, labels, and inline editors in
|
|
35
|
+
proportion. Larger nodes do not grow that chrome.
|
|
36
|
+
- A wider camera range uses a 240,000-unit grid with spacing that stays
|
|
37
|
+
readable at 5% and 2000%. The default range keeps the 12,000-unit grid.
|
|
38
|
+
- `fitNode(nodeId, padding?)` frames one visible node. Unknown and hidden
|
|
39
|
+
nodes do nothing.
|
|
40
|
+
|
|
41
|
+
### Compatibility
|
|
42
|
+
|
|
43
|
+
- No methods were removed. Omitting the new options keeps 1.4.0 camera and
|
|
44
|
+
node limits.
|
|
45
|
+
- `FLOWCHART_DOCUMENT_VERSION` stays `1.3.0`. Older 1.x documents still load.
|
|
46
|
+
A 1.5.0 document still loads in 1.4.0, where the old clamps apply.
|
|
47
|
+
- This release does not add nested containers, suggestion overlays, floating
|
|
48
|
+
panels, or an export API.
|
|
49
|
+
|
|
5
50
|
## 1.4.0 — 2026-10-03
|
|
6
51
|
|
|
7
52
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# @vanduo-oss/vd3-flowchart
|
|
2
2
|
|
|
3
|
+
<a href="https://snyk.io/?utm_source=open-source&utm_medium=pg-ptr&utm_campaign=ref-2501-osp&utm_content=pg-cta"><img src="https://raw.githubusercontent.com/vanduo-oss/vd3-flowchart/main/assets/scanned-by-snyk.png" alt="Scanned by Snyk" width="206" height="141"></a>
|
|
4
|
+
|
|
3
5
|
[](./LICENSE)
|
|
4
6
|
|
|
5
7
|
Vanduo **flowchart** for Vue 3: a node/edge editor with undo/redo, layout
|
|
6
8
|
modes, and a framework-agnostic core. Extracted 1-to-1 from
|
|
7
9
|
`@vanduo-oss/vd3-cbun` flowchart **1.2.0**.
|
|
8
10
|
|
|
9
|
-
**Status: 1.
|
|
11
|
+
**Status: 1.5.1.** `VD_FLOWCHART_VERSION` tracks the package release.
|
|
10
12
|
`FLOWCHART_DOCUMENT_VERSION` (currently `1.3.0`) is the value `toJSON()`
|
|
11
13
|
writes. Do not reset either independently without a compatibility plan.
|
|
12
14
|
|
|
@@ -50,7 +52,7 @@ if anything but `vue` is externalized. The package declares
|
|
|
50
52
|
|
|
51
53
|
## Version policy
|
|
52
54
|
|
|
53
|
-
`package.json` version **is** `VD_FLOWCHART_VERSION` (`1.
|
|
55
|
+
`package.json` version **is** `VD_FLOWCHART_VERSION` (`1.5.1`). Bump those
|
|
54
56
|
together for a package release. Keep `FLOWCHART_DOCUMENT_VERSION` unchanged
|
|
55
57
|
unless the serialized schema changes; add fixtures and explicit compatibility
|
|
56
58
|
rules for a format change. Unversioned 1.x documents through 1.3.0 still load;
|
|
@@ -100,6 +102,29 @@ follows mind-map tools such as XMind and MindNode:
|
|
|
100
102
|
Ctrl/Cmd+Enter saves. A node plus its edge is one undo step, and naming a
|
|
101
103
|
just-inserted node joins that step.
|
|
102
104
|
|
|
105
|
+
## Camera and node bounds
|
|
106
|
+
|
|
107
|
+
`minScale` / `maxScale` default to `0.35` / `3`, and `minNodeSize` /
|
|
108
|
+
`maxNodeSize` default to `56` / `420`. Pass a finite pair to widen either
|
|
109
|
+
range; an invalid pair falls back to those defaults. Junctions stay 28×28.
|
|
110
|
+
`fitNode(id, padding)` frames one visible node. Padding is screen pixels.
|
|
111
|
+
Scale is stored to four decimal places. Nodes smaller than their default size
|
|
112
|
+
scale their text, markers, and routes down with them. The default grid stays
|
|
113
|
+
12,000 units; a wider camera uses a 240,000-unit grid.
|
|
114
|
+
|
|
115
|
+
```js
|
|
116
|
+
new VdFlowchartCore({
|
|
117
|
+
element: '#editor',
|
|
118
|
+
minScale: 0.05,
|
|
119
|
+
maxScale: 20,
|
|
120
|
+
minNodeSize: 6,
|
|
121
|
+
maxNodeSize: 4800,
|
|
122
|
+
});
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The same four names are Vue props. The document format is unchanged: scale and
|
|
126
|
+
size remain plain numbers.
|
|
127
|
+
|
|
103
128
|
## Theming
|
|
104
129
|
|
|
105
130
|
Flowchart chrome renders against Vanduo `--vd-*` design tokens — the same
|
|
@@ -121,6 +146,9 @@ Tokens consumed include `--vd-bg-primary`, `--vd-bg-secondary`,
|
|
|
121
146
|
|
|
122
147
|
## Security
|
|
123
148
|
|
|
149
|
+
- **Open-source scanning** — this repo is monitored with
|
|
150
|
+
[Snyk](https://snyk.io/?utm_source=open-source&utm_medium=pg-ptr&utm_campaign=ref-2501-osp&utm_content=pg-cta)
|
|
151
|
+
(thanks for their support of open source).
|
|
124
152
|
- **No bundled dependencies** — beyond the `vue` peer, nothing is bundled; the
|
|
125
153
|
build fails if any other module is externalized or any `node_modules` input
|
|
126
154
|
is bundled.
|
|
@@ -169,9 +197,11 @@ pnpm test:e2e # Playwright Chromium (needs dist/)
|
|
|
169
197
|
`pnpm build` first**. Chromium must be installed once:
|
|
170
198
|
`pnpm exec playwright install chromium`.
|
|
171
199
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
200
|
+
Node 24 LTS is the supported development and CI runtime; run `nvm use` to select
|
|
201
|
+
it for this repository from `.nvmrc`. The existing `engines.node >=20.19.0`
|
|
202
|
+
range remains a temporary consumer compatibility floor, tested on a best-effort
|
|
203
|
+
basis until the next major release; it is not the recommended development
|
|
204
|
+
runtime.
|
|
175
205
|
|
|
176
206
|
## Documentation
|
|
177
207
|
|
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;
|