Releases: w57x/anode
Release list
@w57x/anode@0.3.0
Minor Changes
- c0b0d99: - External Layout Integration: Added the
applyLayout()capability to the core Context , allowing developers to integrate external layout engines (like Dagre)
to automatically arrange nodes. Layout calculations are recorded as a single batch operation in the undo/redo history stack.- Optimized Culling and Rendering: Massively reduced unnecessary re-renders for viewport culling and the minimap, and decoupled link path recalculations so they
only occur for edges connected to the node actively being dragged. - Manhattan Link Path Routing: Fixed a routing bug where STEP links would overlap or draw awkwardly when the target socket was positioned to the left of the
source socket. It now properly generates a 5-segment non-overlapping path.- Node Alignment Animations: Ensured that nodes align instantly to their new positions during layout changes, bypassing unwanted transition animations.
- Namespace Migration: Renamed the core organization scope throughout the package from
@stulyto@w57x.
- Optimized Culling and Rendering: Massively reduced unnecessary re-renders for viewport culling and the minimap, and decoupled link path recalculations so they
@w57x/anode-react@1.1.0
Minor Changes
-
ea6b46b: Instead of forcing React to compute the bounding box of the entire node graph on every frame (which was causing massive GC jitter),
the diff introduces a useGraphBounds hook.- It uses useSyncExternalStore under the hood.
- It attaches listeners to engine-level events ( registerEntityMoveListener , etc.).
- It caches the bounds. It only forces a React render if the overall dimensions (x, y, w, h) of the graph change by more than 0.01px.
This drastically reduces the overhead for the MiniMap.
There is a new boolean prop on the
<World />component called renderLinksViaCanvas .- When false : Links render as traditional SVG
<path>elements (the old standard). - When true : The system renders an HTML5
<canvas>element and draws the links natively onto it, bypassing the DOM entirely for the
visual lines.
One of the coolest additions in the test suite shows that even when using Canvas rendering, you preserve interactivity via a clever trick:
- It maintains an invisible, transparent SVG directly over the canvas line.
- Clicking the transparent path selects the link.
- Double-clicking the path adds a new routing waypoint ( link.waypoints.push(...) ) at the exact mouse coordinates, enabling advanced
multi-segment routing dynamically.
The tests explicitly verify that dragging a node (via entity.move(x,y) ) triggers an immediate reflow of the connected SVG/Canvas paths
without needing to wait for a state flush or a React reconciliation cycle.
@stuly/anode-react@1.0.1
Patch Changes
- facf6b7: Integrated ResizeObserver into the Socket component to ensure link anchors stay synchronized when nodes change dimensions
@stuly/anode@0.2.0
Minor Changes
-
581f70f: Consistency and performance: A cleaner engine with refined link routing.
Core Engine (@stuly/anode)
- Atomic Patching System: Introduced
ctx.apply(actions) - Dynamic QuadTree: The spatial index now auto-expands.
- Reactivity Cycle Protection: Added automated safeguards to
setSocketValue
to prevent infinite loops and stack overflows in circular node topologies. - Ergonomic API:
ctx.newLinknow uses a single configuration object.
Visuals and Routing
- New
LinkStylingproperty supportingSOLID,DASHED, andDOTTEDpaths
andselectionColor. - Flow Animations: Added a flowing property to indicate data movement
visually with customizable speed.
ctx.newLink({ from, to, styling: { color: '#181818', flowing: true, style: LinkStyle.DASHED } });
React Bindings (@stuly/anode-react)
- Architecture: Decomposed the monolithic World component into focused hooks
(useSyncManager,useInteractionHandler,useViewportManager). - Stable Reference Context:
AnodeProvidernow hosts a stableworldRef
misc
- Strict Type Safety: Full compliance with
exactOptionalPropertyTypesand
noUnusedLocals.
- Atomic Patching System: Introduced
@stuly/anode-react@1.0.0
Minor Changes
-
581f70f: Consistency and performance: A cleaner engine with refined link routing.
Core Engine (@stuly/anode)
- Atomic Patching System: Introduced
ctx.apply(actions) - Dynamic QuadTree: The spatial index now auto-expands.
- Reactivity Cycle Protection: Added automated safeguards to
setSocketValue
to prevent infinite loops and stack overflows in circular node topologies. - Ergonomic API:
ctx.newLinknow uses a single configuration object.
Visuals and Routing
- New
LinkStylingproperty supportingSOLID,DASHED, andDOTTEDpaths
andselectionColor. - Flow Animations: Added a flowing property to indicate data movement
visually with customizable speed.
ctx.newLink({ from, to, styling: { color: '#181818', flowing: true, style: LinkStyle.DASHED } });
React Bindings (@stuly/anode-react)
- Architecture: Decomposed the monolithic World component into focused hooks
(useSyncManager,useInteractionHandler,useViewportManager). - Stable Reference Context:
AnodeProvidernow hosts a stableworldRef
misc
- Strict Type Safety: Full compliance with
exactOptionalPropertyTypesand
noUnusedLocals.
- Atomic Patching System: Introduced
Patch Changes
- Updated dependencies [581f70f]
- @stuly/anode@0.2.0
@stuly/anode@0.1.2
@stuly/anode@0.1.2
@stuly/anode-react@0.1.2
Patch Changes
- f244767: fix: avoid
setStateduring state update inWorldselection
docs: improved docs- @stuly/anode@0.1.2
@stuly/anode@0.1.1
Patch Changes
- ef2096a: docs: Enhanced library documentation
- including comprehensive TSDoc for all core engine methods, elements, and React hooks.
- simplified package READMEs with quick-start examples and added missing repository
metadata to package.json.