Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
03f9603
Cleanup baseline: carry in-flight WIP into the re-architecture branch
Jul 26, 2026
b44d85c
docs: reconcile planned re-architecture with approved design decisions
Jul 26, 2026
a2c804f
snapline: Phase 0 renames — core runtime types adopt the Mirror suffix
Jul 26, 2026
2eb2d19
docs: Phase 1 — settle the remaining API details
Jul 26, 2026
50d5ac6
snapline: Phase 2a — GraphMirror registry with domain identity
Jul 26, 2026
a439eae
snapline: Phase 2b — engine-scope selection, groups, and resize state
Jul 26, 2026
a6a98eb
snapline: Phase 2c — registry-backed discovery, snapshot topology, Gr…
Jul 26, 2026
a29ee13
snapline: Phase 3a — symmetric connector rules with line-aware admission
Jul 26, 2026
82f9561
snapline: Phase 3b — explicit line lifecycle operations and hardened …
Jul 26, 2026
48b7d72
snapline: Phase 3c — authority declaration, coalescing scheduler, bat…
Jul 26, 2026
4e0bf1e
snapline: Phase 3d — LineReconciler and the push-based canonical channel
Jul 26, 2026
c95d6ed
snapline: Phase 3e — the controlled gesture request path
Jul 26, 2026
8c844df
snapline: Phase 3f — cutover to the controlled line protocol
Jul 26, 2026
029f158
snapline: Phase 4a+4d — topology is always controlled
Jul 26, 2026
4299a4b
snapline: Phase 4b — one batched geometry observation (D8 as amended)
Jul 26, 2026
519b36c
snapline: Phase 4c — typed identity props, stable line keying, export…
Jul 26, 2026
a5432d4
snapline: Phase 5a — remaining verification matrix
Jul 26, 2026
64329c1
docs: Phase 5b — migration notes for the controlled-graph re-architec…
Jul 26, 2026
0a21deb
docs: Phase 5c — full accuracy pass onto the final architecture
Jul 26, 2026
2863f3e
snapline: Phase 6 — simplification review
Jul 26, 2026
87b08a0
Snapshot SnapEngineJS line reconciliation state
Jul 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
263 changes: 164 additions & 99 deletions assets/snapline/AGENTS.md

Large diffs are not rendered by default.

30 changes: 20 additions & 10 deletions assets/snapline/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,33 @@ npm install @snap-engine/core @snap-engine/snapline

```ts
import {
GroupNodeComponent,
NodeComponent,
GroupNodeMirror,
NodeMirror,
getParentGroup,
setGroupMembershipResolver,
} from "@snap-engine/snapline";
```

After assigning a Vanilla-rendered element, call `syncDomGeometry()`. Svelte
After assigning a Vanilla-rendered element, call `remeasureDomGeometry()`. Svelte
and React adapters perform that synchronization automatically.

Live gesture geometry stays outside framework state. Nodes and groups write
their retained element transforms and resize dimensions directly. Line,
selection, and placement renderers register one imperative
`bindGeometryWriter(...)`; semantic observers and commit callbacks remain
separate. A custom line renderer should mount its SVG/Canvas structure once,
bind a writer, and call the returned cleanup function when it unmounts.

When another interaction system applies transient transforms inside a node,
call `connector.requestDomGeometrySync()` for each affected connector. The
request is coalesced into the next read/write cycle and updates every connected
line without coupling SnapLine to the external system.

Surface strategies decouple connection hit testing from visible connector
elements. They can activate from a node border, rank shape-specific target
hits, and resolve preview and settled anchors from cached geometry. Independent
connector capabilities allow the same logical surface to start and accept
connections. `onPointerDown` runs when a connector claims the primary pointer,
hits, and resolve preview and settled anchors from cached geometry. Symmetric
connector rules (`maxOutgoing`/`maxIncoming`, `"unlimited"` explicit) let the
same logical surface start and accept connections. `onPointerDown` runs when a connector claims the primary pointer,
before the drag threshold, so consumers can preserve click selection or other
gesture-start UI for headless surfaces.

Expand All @@ -54,10 +61,13 @@ surface strategies, collider radius, edge-pan behavior, or the line class
without replacing the connector or its existing lines. `name` is
construction-only because it is the connector's key in its parent node.

For a framework-owned graph, use `onConnectionRequest` to create the domain
edge and return its stable ID as an opaque line payload. Pass that payload
directly when hydrating with `connectToConnector`; programmatic connections do
not invoke the creation request.
Topology is always controlled: attach the graph owner with
`attachControlledGraph(engine, { onLineChangeRequest })` (or mount the
adapter `ControlledGraph` component), push your `LineRecord`s through
`setCanonicalGraph`, and apply each gesture's atomic proposal to your
records — adopting the proposed line id settles the dragged line in place.
Hydration never invokes your request handler, so restoring a saved graph
cannot duplicate application edges.

Groups maintain an exclusive direct parent. Ordinary nodes use center
containment, nested groups use full-bounds containment, and the smallest safe
Expand Down
5 changes: 4 additions & 1 deletion assets/snapline/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"./select": "./src/select.ts",
"./group": "./src/group.ts",
"./placement": "./src/placement.ts",
"./query": "./src/query.ts"
"./query": "./src/query.ts",
"./graph-mirror": "./src/graph-mirror.ts",
"./line-reconciler": "./src/line-reconciler.ts",
"./geometry": "./src/geometry.ts"
},
"files": [
"src",
Expand Down
Loading
Loading