Skip to content

Commit 69be0de

Browse files
committed
chore(release): v1.6.0
One release rather than two. 1.6 and 1.7 were separate lines on the roadmap, but the code for both is on main and cannot be split without reverting — and a 1.6 tarball containing an editing API that only 1.7's changelog described would be worse than merged numbering. So 1.6 is both, and the roadmap says so. Also fixes something the code panel never did: the VIEW knobs were not in it. Turn the connector to Straight, drag the indent, tick Colour by branch — the snippet described the EXAMPLE rather than the chart in front of you. It reads the live layout settings now, which is how edgeStyle became visible there at all. Verified in the browser: `edgeStyle: 'spoke'` appears in the snippet the moment the control moves. That gap was the same one reported for drag-and-drop a few releases ago, in a different corner.
1 parent b76debc commit 69be0de

18 files changed

Lines changed: 764 additions & 304 deletions

.changeset/a-rule-of-your-own.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

.changeset/a-way-back.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

.changeset/data-that-keeps-arriving.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

.changeset/the-connector-is-a-setting.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

.changeset/two-stale-indices.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

.changeset/where-a-node-sits.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

packages/core/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# @klad/engine
22

3+
## 1.6.0
4+
5+
### Patch Changes
6+
7+
- 57142dd: Two bugs where a source index outlived the tree it meant something in.
8+
9+
**Isolating a branch, then changing the data, isolated the wrong branch.**
10+
`isolate` held a source index, and a source index means nothing once the tree
11+
is rebuilt — so a drag-and-drop, a lazily-loaded branch, a cap change or an
12+
edit left the chart framing whichever node inherited the old slot, and
13+
reporting that node's id back through `getState().isolated`. It is held by id
14+
now and resolved on every rebuild, alongside the filter and cap masks that were
15+
already re-derived for exactly this reason. If the isolated node leaves the
16+
tree, the chart shows the whole tree rather than an arbitrary branch.
17+
18+
**A rebuild that both reordered the data and took nodes out of view could crash
19+
the relayout.** The engine's transition builder reads the previous tree in the
20+
old index space and the maps it looks things up in are keyed by the new one.
21+
Mixing them is invisible until both happen at once — a drop reorders but
22+
nothing leaves the view, a collapse has things leave but does not reorder —
23+
and then a fading node is looked up under another node's key: usually it fades
24+
from the wrong place, and when the key is missing entirely the box comes back
25+
`undefined` and reading it took the whole frame down. Isolating and then
26+
reconciling does both.
27+
328
## 1.5.1
429

530
### Patch Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@klad/engine",
3-
"version": "1.5.1",
3+
"version": "1.6.0",
44
"description": "Klad — a canvas tree engine for tens of thousands of nodes. Tiered, file, radial and sunburst layouts, with a DOM overlay for your own node content. Frameworkless.",
55
"keywords": [
66
"tree",

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* asserts the two agree, in the release path, where a mismatch can still be
1010
* fixed without another publish.
1111
*/
12-
export const VERSION = '1.5.1'
12+
export const VERSION = '1.6.0'
1313

1414
export type { NodeData, Warning, WarningCode, Size, Bounds } from './types.js'
1515
export type { Tree, SubtreeStats } from './tree.js'

0 commit comments

Comments
 (0)