@realflow/core 0.1.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/dist/algorithms.d.ts +25 -0
- package/dist/algorithms.d.ts.map +1 -0
- package/dist/algorithms.js +158 -0
- package/dist/algorithms.js.map +1 -0
- package/dist/collab.d.ts +105 -0
- package/dist/collab.d.ts.map +1 -0
- package/dist/collab.js +182 -0
- package/dist/collab.js.map +1 -0
- package/dist/geometry.d.ts +33 -0
- package/dist/geometry.d.ts.map +1 -0
- package/dist/geometry.js +113 -0
- package/dist/geometry.js.map +1 -0
- package/dist/guides.d.ts +14 -0
- package/dist/guides.d.ts.map +1 -0
- package/dist/guides.js +52 -0
- package/dist/guides.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/layout-worker.d.ts +53 -0
- package/dist/layout-worker.d.ts.map +1 -0
- package/dist/layout-worker.js +65 -0
- package/dist/layout-worker.js.map +1 -0
- package/dist/layout.d.ts +97 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +644 -0
- package/dist/layout.js.map +1 -0
- package/dist/ops.d.ts +142 -0
- package/dist/ops.d.ts.map +1 -0
- package/dist/ops.js +351 -0
- package/dist/ops.js.map +1 -0
- package/dist/paths.d.ts +41 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +179 -0
- package/dist/paths.js.map +1 -0
- package/dist/routing.d.ts +36 -0
- package/dist/routing.d.ts.map +1 -0
- package/dist/routing.js +185 -0
- package/dist/routing.js.map +1 -0
- package/dist/spatial.d.ts +43 -0
- package/dist/spatial.d.ts.map +1 -0
- package/dist/spatial.js +175 -0
- package/dist/spatial.js.map +1 -0
- package/dist/store.d.ts +274 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +1610 -0
- package/dist/store.js.map +1 -0
- package/dist/types.d.ts +207 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +6 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +25 -0
- package/dist/utils.js.map +1 -0
- package/package.json +40 -0
package/dist/spatial.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { rectsIntersect } from './geometry.js';
|
|
2
|
+
/**
|
|
3
|
+
* A uniform-grid spatial hash for fast viewport culling and hit testing.
|
|
4
|
+
*
|
|
5
|
+
* Nodes are bucketed by the grid cells their bounds overlap. Queries visit
|
|
6
|
+
* only the cells intersecting the query rect, so lookups stay O(result)
|
|
7
|
+
* instead of O(total nodes) — the key to keeping 10k+ node flows smooth.
|
|
8
|
+
*/
|
|
9
|
+
export class SpatialIndex {
|
|
10
|
+
cellSize;
|
|
11
|
+
cells = new Map();
|
|
12
|
+
bounds = new Map();
|
|
13
|
+
/**
|
|
14
|
+
* Rects too large (or non-finite) to bucket sanely. Iterating the grid
|
|
15
|
+
* cells of, say, a 1e308-wide rect would loop ~1e305 times and hang — a
|
|
16
|
+
* real DoS vector when an agent/LLM emits a degenerate node size. Such
|
|
17
|
+
* rects are kept here and always considered by queries/hits instead.
|
|
18
|
+
*/
|
|
19
|
+
oversized = new Set();
|
|
20
|
+
/** Max grid cells a single rect may span before it's treated as oversized. */
|
|
21
|
+
static MAX_CELLS = 4096;
|
|
22
|
+
constructor(cellSize = 512) {
|
|
23
|
+
this.cellSize = cellSize;
|
|
24
|
+
}
|
|
25
|
+
get size() {
|
|
26
|
+
return this.bounds.size;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Largest cell index magnitude we bucket. Beyond ~2^40, floating-point
|
|
30
|
+
* `index++` stops advancing (1 is lost past 2^53), so a `for` loop over
|
|
31
|
+
* cell keys would never terminate. Cap well below that.
|
|
32
|
+
*/
|
|
33
|
+
static MAX_CELL_INDEX = 2 ** 40;
|
|
34
|
+
/** True when a rect can't be bucketed sanely (too big, too far out, or non-finite). */
|
|
35
|
+
isOversized(r) {
|
|
36
|
+
if (!Number.isFinite(r.x) ||
|
|
37
|
+
!Number.isFinite(r.y) ||
|
|
38
|
+
!Number.isFinite(r.width) ||
|
|
39
|
+
!Number.isFinite(r.height)) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
const s = this.cellSize;
|
|
43
|
+
const x0 = Math.floor(r.x / s);
|
|
44
|
+
const y0 = Math.floor(r.y / s);
|
|
45
|
+
const x1 = Math.floor((r.x + Math.max(0, r.width)) / s);
|
|
46
|
+
const y1 = Math.floor((r.y + Math.max(0, r.height)) / s);
|
|
47
|
+
// Coordinates so large the cell-index loop counter can't increment.
|
|
48
|
+
const lim = SpatialIndex.MAX_CELL_INDEX;
|
|
49
|
+
if (Math.abs(x0) > lim ||
|
|
50
|
+
Math.abs(y0) > lim ||
|
|
51
|
+
Math.abs(x1) > lim ||
|
|
52
|
+
Math.abs(y1) > lim) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
return (x1 - x0 + 1) * (y1 - y0 + 1) > SpatialIndex.MAX_CELLS;
|
|
56
|
+
}
|
|
57
|
+
*cellKeys(r) {
|
|
58
|
+
const s = this.cellSize;
|
|
59
|
+
const x0 = Math.floor(r.x / s);
|
|
60
|
+
const y0 = Math.floor(r.y / s);
|
|
61
|
+
const x1 = Math.floor((r.x + r.width) / s);
|
|
62
|
+
const y1 = Math.floor((r.y + r.height) / s);
|
|
63
|
+
for (let cx = x0; cx <= x1; cx++) {
|
|
64
|
+
for (let cy = y0; cy <= y1; cy++) {
|
|
65
|
+
yield `${cx}:${cy}`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
set(id, rect) {
|
|
70
|
+
const prev = this.bounds.get(id);
|
|
71
|
+
if (prev &&
|
|
72
|
+
prev.x === rect.x &&
|
|
73
|
+
prev.y === rect.y &&
|
|
74
|
+
prev.width === rect.width &&
|
|
75
|
+
prev.height === rect.height) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (prev)
|
|
79
|
+
this.removeFromCells(id, prev);
|
|
80
|
+
this.bounds.set(id, { ...rect });
|
|
81
|
+
if (this.isOversized(rect)) {
|
|
82
|
+
this.oversized.add(id);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.oversized.delete(id);
|
|
86
|
+
for (const key of this.cellKeys(rect)) {
|
|
87
|
+
let cell = this.cells.get(key);
|
|
88
|
+
if (!cell) {
|
|
89
|
+
cell = new Set();
|
|
90
|
+
this.cells.set(key, cell);
|
|
91
|
+
}
|
|
92
|
+
cell.add(id);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
delete(id) {
|
|
96
|
+
const prev = this.bounds.get(id);
|
|
97
|
+
if (!prev)
|
|
98
|
+
return;
|
|
99
|
+
this.removeFromCells(id, prev);
|
|
100
|
+
this.oversized.delete(id);
|
|
101
|
+
this.bounds.delete(id);
|
|
102
|
+
}
|
|
103
|
+
removeFromCells(id, rect) {
|
|
104
|
+
// Oversized rects were never bucketed, so there are no cells to clean.
|
|
105
|
+
if (this.oversized.has(id) || this.isOversized(rect))
|
|
106
|
+
return;
|
|
107
|
+
for (const key of this.cellKeys(rect)) {
|
|
108
|
+
const cell = this.cells.get(key);
|
|
109
|
+
if (cell) {
|
|
110
|
+
cell.delete(id);
|
|
111
|
+
if (cell.size === 0)
|
|
112
|
+
this.cells.delete(key);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
getBounds(id) {
|
|
117
|
+
return this.bounds.get(id);
|
|
118
|
+
}
|
|
119
|
+
/** Ids whose bounds intersect the query rect. */
|
|
120
|
+
query(rect) {
|
|
121
|
+
const out = new Set();
|
|
122
|
+
if (!this.isOversized(rect)) {
|
|
123
|
+
for (const key of this.cellKeys(rect)) {
|
|
124
|
+
const cell = this.cells.get(key);
|
|
125
|
+
if (!cell)
|
|
126
|
+
continue;
|
|
127
|
+
for (const id of cell) {
|
|
128
|
+
if (out.has(id))
|
|
129
|
+
continue;
|
|
130
|
+
const b = this.bounds.get(id);
|
|
131
|
+
if (rectsIntersect(b, rect))
|
|
132
|
+
out.add(id);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
// Degenerate query rect: fall back to a linear scan (rare).
|
|
138
|
+
for (const [id, b] of this.bounds)
|
|
139
|
+
if (rectsIntersect(b, rect))
|
|
140
|
+
out.add(id);
|
|
141
|
+
return out;
|
|
142
|
+
}
|
|
143
|
+
// Oversized nodes live outside the grid; test each against the query.
|
|
144
|
+
for (const id of this.oversized) {
|
|
145
|
+
if (rectsIntersect(this.bounds.get(id), rect))
|
|
146
|
+
out.add(id);
|
|
147
|
+
}
|
|
148
|
+
return out;
|
|
149
|
+
}
|
|
150
|
+
/** Ids whose bounds contain the point. */
|
|
151
|
+
hit(x, y) {
|
|
152
|
+
const out = [];
|
|
153
|
+
const key = `${Math.floor(x / this.cellSize)}:${Math.floor(y / this.cellSize)}`;
|
|
154
|
+
const cell = this.cells.get(key);
|
|
155
|
+
if (cell) {
|
|
156
|
+
for (const id of cell) {
|
|
157
|
+
const b = this.bounds.get(id);
|
|
158
|
+
if (x >= b.x && x <= b.x + b.width && y >= b.y && y <= b.y + b.height)
|
|
159
|
+
out.push(id);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
for (const id of this.oversized) {
|
|
163
|
+
const b = this.bounds.get(id);
|
|
164
|
+
if (x >= b.x && x <= b.x + b.width && y >= b.y && y <= b.y + b.height)
|
|
165
|
+
out.push(id);
|
|
166
|
+
}
|
|
167
|
+
return out;
|
|
168
|
+
}
|
|
169
|
+
clear() {
|
|
170
|
+
this.cells.clear();
|
|
171
|
+
this.bounds.clear();
|
|
172
|
+
this.oversized.clear();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=spatial.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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package/dist/store.d.ts
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import type { ConnectionCandidate, ConnectionState, Edge, FitViewOptions, FlowSnapshot, Guide, HandleInfo, HandleKind, Node, Rect, StoreOptions, Viewport, XY } from './types.js';
|
|
2
|
+
import { SpatialIndex } from './spatial.js';
|
|
3
|
+
export declare const DEFAULT_NODE_WIDTH = 172;
|
|
4
|
+
export declare const DEFAULT_NODE_HEIGHT = 44;
|
|
5
|
+
type Listener = () => void;
|
|
6
|
+
/**
|
|
7
|
+
* FlowStore is ReFlow's reactive heart: a Map-backed graph store with
|
|
8
|
+
* fine-grained topic subscriptions.
|
|
9
|
+
*
|
|
10
|
+
* Every mutation notifies only the topics it touches (`node:<id>`,
|
|
11
|
+
* `edge:<id>`, `viewport`, ...), so a renderer can subscribe each component
|
|
12
|
+
* to exactly the state it draws — dragging one node re-renders one node,
|
|
13
|
+
* not the whole flow.
|
|
14
|
+
*/
|
|
15
|
+
export declare class FlowStore {
|
|
16
|
+
readonly nodes: Map<string, Node<Record<string, unknown>>>;
|
|
17
|
+
readonly edges: Map<string, Edge<Record<string, unknown>>>;
|
|
18
|
+
nodeOrder: string[];
|
|
19
|
+
edgeOrder: string[];
|
|
20
|
+
viewport: Viewport;
|
|
21
|
+
readonly selectedNodes: Set<string>;
|
|
22
|
+
readonly selectedEdges: Set<string>;
|
|
23
|
+
connection: ConnectionState | null;
|
|
24
|
+
/** Set while dragging an existing edge's endpoint to a new handle. */
|
|
25
|
+
reconnecting: {
|
|
26
|
+
edgeId: string;
|
|
27
|
+
end: 'source' | 'target';
|
|
28
|
+
} | null;
|
|
29
|
+
guides: Guide[];
|
|
30
|
+
/** Node ids inside the culling viewport (all depths). */
|
|
31
|
+
visibleNodes: Set<string>;
|
|
32
|
+
/** Root node ids that should be mounted by a renderer. */
|
|
33
|
+
visibleRoots: Set<string>;
|
|
34
|
+
visibleEdges: Set<string>;
|
|
35
|
+
/** When false (small graphs / no screen yet), everything renders. */
|
|
36
|
+
cullingActive: boolean;
|
|
37
|
+
/** Bumped whenever node membership/order changes ('nodes' topic). */
|
|
38
|
+
nodesVersion: number;
|
|
39
|
+
/** Bumped whenever edge membership/order changes ('edges' topic). */
|
|
40
|
+
edgesVersion: number;
|
|
41
|
+
/** Bumped on every committed mutation boundary ('commit' topic). */
|
|
42
|
+
commitVersion: number;
|
|
43
|
+
/** Bumped whenever any node geometry changes ('graph' topic) — lets
|
|
44
|
+
* obstacle-dependent renderers (orthogonal edges) re-route live. */
|
|
45
|
+
graphVersion: number;
|
|
46
|
+
screen: {
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
};
|
|
50
|
+
options: StoreOptions;
|
|
51
|
+
readonly spatial: SpatialIndex;
|
|
52
|
+
/** Renderer-measured sizes, kept apart from node objects so measuring
|
|
53
|
+
* never re-creates (and re-renders) a node. node.width/height wins. */
|
|
54
|
+
private measured;
|
|
55
|
+
private nodeEdges;
|
|
56
|
+
private children;
|
|
57
|
+
private handles;
|
|
58
|
+
/** Per-edge render versions: bumped when the edge object OR the
|
|
59
|
+
* geometry it depends on (endpoint nodes, handles) changes. */
|
|
60
|
+
private edgeVer;
|
|
61
|
+
private listeners;
|
|
62
|
+
private pending;
|
|
63
|
+
private batchDepth;
|
|
64
|
+
private undoStack;
|
|
65
|
+
private redoStack;
|
|
66
|
+
private txn;
|
|
67
|
+
private recording;
|
|
68
|
+
private drag;
|
|
69
|
+
private cullScheduled;
|
|
70
|
+
private cullForced;
|
|
71
|
+
/** Hysteresis: skip viewport-only re-culls while the raw view stays
|
|
72
|
+
* inside the last culled region (minus a half-margin buffer). */
|
|
73
|
+
private lastCullRect;
|
|
74
|
+
/** Zoom at the last cull. Containment hysteresis only applies while zoom
|
|
75
|
+
* is unchanged — zooming IN from an overview shrinks the view inside the
|
|
76
|
+
* old region, which must still re-cull or nothing gets culled. */
|
|
77
|
+
private lastCullZoom;
|
|
78
|
+
private vpAnim;
|
|
79
|
+
constructor(options?: StoreOptions);
|
|
80
|
+
subscribe(topic: string, fn: Listener): () => void;
|
|
81
|
+
/** Monotonic version for an edge's rendered output. */
|
|
82
|
+
edgeVersion(id: string): number;
|
|
83
|
+
private bumpEdge;
|
|
84
|
+
private bumpNodes;
|
|
85
|
+
private bumpEdges;
|
|
86
|
+
private emit;
|
|
87
|
+
/** Group mutations; duplicate notifications are coalesced. */
|
|
88
|
+
batch(fn: () => void): void;
|
|
89
|
+
private commit;
|
|
90
|
+
private record;
|
|
91
|
+
/** Group several mutations into a single undo entry. */
|
|
92
|
+
transact(label: string, fn: () => void): void;
|
|
93
|
+
get canUndo(): boolean;
|
|
94
|
+
get canRedo(): boolean;
|
|
95
|
+
undo(): void;
|
|
96
|
+
redo(): void;
|
|
97
|
+
clearHistory(): void;
|
|
98
|
+
private _insertNode;
|
|
99
|
+
private _removeNode;
|
|
100
|
+
private _replaceNode;
|
|
101
|
+
private _insertEdge;
|
|
102
|
+
private _removeEdge;
|
|
103
|
+
private _replaceEdge;
|
|
104
|
+
/** Re-index a node and notify it plus every edge touching it. */
|
|
105
|
+
private touchNode;
|
|
106
|
+
getNode(id: string): Node | undefined;
|
|
107
|
+
getEdge(id: string): Edge | undefined;
|
|
108
|
+
getNodes(): Node[];
|
|
109
|
+
/** All edges connected to a node. */
|
|
110
|
+
edgesOf(id: string): Edge[];
|
|
111
|
+
/** Direct children ids of a node (subflow members). */
|
|
112
|
+
childrenOf(id: string): string[];
|
|
113
|
+
getEdges(): Edge[];
|
|
114
|
+
addNodes(nodes: Node[]): void;
|
|
115
|
+
addNode(node: Node): void;
|
|
116
|
+
/**
|
|
117
|
+
* Remove nodes plus their connected edges. Children of removed nodes are
|
|
118
|
+
* re-parented to the flow root (keeping their absolute position) instead
|
|
119
|
+
* of being orphaned.
|
|
120
|
+
*/
|
|
121
|
+
removeNodes(ids: string[]): void;
|
|
122
|
+
updateNode(id: string, patch: Partial<Node>): void;
|
|
123
|
+
updateNodeData(id: string, dataPatch: Record<string, unknown>): void;
|
|
124
|
+
setNodePosition(id: string, position: XY): void;
|
|
125
|
+
/** Measured size update from the renderer — not recorded in history. */
|
|
126
|
+
setNodeSize(id: string, width: number, height: number): void;
|
|
127
|
+
addEdges(edges: Edge[]): void;
|
|
128
|
+
addEdge(edge: Edge): void;
|
|
129
|
+
removeEdges(ids: string[]): void;
|
|
130
|
+
updateEdge(id: string, patch: Partial<Edge>): void;
|
|
131
|
+
/**
|
|
132
|
+
* Diff-sync the whole graph (used by controlled mode and loadSnapshot).
|
|
133
|
+
* Unchanged elements are left untouched, so selection, measured sizes and
|
|
134
|
+
* fine-grained subscriptions survive a controlled-props round trip.
|
|
135
|
+
*/
|
|
136
|
+
setGraph(nodes: Node[], edges: Edge[]): void;
|
|
137
|
+
/**
|
|
138
|
+
* Apply a remote collaborative change: upsert/remove specific nodes and
|
|
139
|
+
* edges WITHOUT recording history and WITHOUT emitting 'commit' (so it
|
|
140
|
+
* never echoes back through the local broadcast diff). Remote edits aren't
|
|
141
|
+
* part of your local undo stack — you don't undo a teammate's change.
|
|
142
|
+
*/
|
|
143
|
+
applyRemotePatch(patch: {
|
|
144
|
+
nodes?: {
|
|
145
|
+
upsert?: Node[];
|
|
146
|
+
remove?: string[];
|
|
147
|
+
};
|
|
148
|
+
edges?: {
|
|
149
|
+
upsert?: Edge[];
|
|
150
|
+
remove?: string[];
|
|
151
|
+
};
|
|
152
|
+
}): void;
|
|
153
|
+
absolutePosition(id: string): XY;
|
|
154
|
+
nodeSize(id: string): {
|
|
155
|
+
width: number;
|
|
156
|
+
height: number;
|
|
157
|
+
};
|
|
158
|
+
/** Absolute rect of a node in flow coordinates. */
|
|
159
|
+
nodeRect(id: string): Rect;
|
|
160
|
+
/** Union of all node rects (or the given subset). */
|
|
161
|
+
nodesBounds(ids?: string[]): Rect;
|
|
162
|
+
/**
|
|
163
|
+
* The nearest visible node to `fromId` in a cardinal direction — for
|
|
164
|
+
* keyboard/screen-reader spatial navigation. Uses a cone test so
|
|
165
|
+
* "right" prefers nodes actually to the right, breaking ties by distance.
|
|
166
|
+
*/
|
|
167
|
+
nearestNodeInDirection(fromId: string, dir: 'left' | 'right' | 'up' | 'down'): string | null;
|
|
168
|
+
/** Nodes whose rects intersect (or are fully inside) the given rect. */
|
|
169
|
+
nodesInRect(rect: Rect, partially?: boolean): string[];
|
|
170
|
+
registerHandle(info: HandleInfo): void;
|
|
171
|
+
unregisterHandle(nodeId: string, handleId: string): void;
|
|
172
|
+
getHandles(nodeId: string): HandleInfo[];
|
|
173
|
+
/**
|
|
174
|
+
* Resolve the handle an edge endpoint attaches to. Falls back to a
|
|
175
|
+
* synthetic border-midpoint handle when nothing is registered (headless
|
|
176
|
+
* usage, or nodes without <Handle> children).
|
|
177
|
+
*/
|
|
178
|
+
resolveHandle(nodeId: string, kind: HandleKind, handleId?: string): HandleInfo;
|
|
179
|
+
/** Absolute anchor point of a handle. */
|
|
180
|
+
handleAnchor(h: HandleInfo): XY;
|
|
181
|
+
/**
|
|
182
|
+
* Node rectangles an orthogonal edge should route around: nodes near the
|
|
183
|
+
* edge's bounding box, excluding the two endpoint nodes. Uses the spatial
|
|
184
|
+
* index so this stays cheap even with thousands of nodes.
|
|
185
|
+
*/
|
|
186
|
+
edgeObstacles(edge: Edge, margin?: number): Rect[];
|
|
187
|
+
/** Endpoint geometry for rendering an edge. */
|
|
188
|
+
edgeGeometry(edge: Edge): {
|
|
189
|
+
source: XY;
|
|
190
|
+
sourceSide: HandleInfo['side'];
|
|
191
|
+
target: XY;
|
|
192
|
+
targetSide: HandleInfo['side'];
|
|
193
|
+
} | null;
|
|
194
|
+
setSelection(nodeIds: Iterable<string>, edgeIds?: Iterable<string>): void;
|
|
195
|
+
addToSelection(nodeIds: Iterable<string>, edgeIds?: Iterable<string>): void;
|
|
196
|
+
toggleSelection(nodeId?: string, edgeId?: string): void;
|
|
197
|
+
clearSelection(): void;
|
|
198
|
+
selectAll(): void;
|
|
199
|
+
deleteSelection(): void;
|
|
200
|
+
/**
|
|
201
|
+
* Serialize a set of nodes (default: the selection) plus the edges wholly
|
|
202
|
+
* between them. The result is JSON-serializable — stash it in app state or
|
|
203
|
+
* the system clipboard.
|
|
204
|
+
*/
|
|
205
|
+
copy(nodeIds?: string[]): {
|
|
206
|
+
nodes: Node[];
|
|
207
|
+
edges: Edge[];
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Insert a copied payload with fresh ids, offset so pasted nodes don't sit
|
|
211
|
+
* exactly on the originals, and select the result. Returns the new ids.
|
|
212
|
+
* One undo entry.
|
|
213
|
+
*/
|
|
214
|
+
paste(payload: {
|
|
215
|
+
nodes: Node[];
|
|
216
|
+
edges: Edge[];
|
|
217
|
+
}, offset?: XY): {
|
|
218
|
+
nodeIds: string[];
|
|
219
|
+
edgeIds: string[];
|
|
220
|
+
};
|
|
221
|
+
/** Copy + paste the selection in one step (⌘D-style). */
|
|
222
|
+
duplicateSelection(offset?: XY): {
|
|
223
|
+
nodeIds: string[];
|
|
224
|
+
edgeIds: string[];
|
|
225
|
+
};
|
|
226
|
+
startDrag(ids: string[]): void;
|
|
227
|
+
/** Move the dragged nodes by a flow-space delta from the drag origin. */
|
|
228
|
+
dragBy(delta: XY): void;
|
|
229
|
+
endDrag(): void;
|
|
230
|
+
get dragging(): boolean;
|
|
231
|
+
private setGuides;
|
|
232
|
+
startConnection(nodeId: string, handleId?: string, kind?: HandleKind): void;
|
|
233
|
+
/**
|
|
234
|
+
* Begin reconnecting one end of an existing edge. The opposite (anchored)
|
|
235
|
+
* end becomes the connection origin; dropping on a new handle moves this
|
|
236
|
+
* edge's endpoint. Dropping on nothing deletes the edge (React Flow's
|
|
237
|
+
* default reconnect-to-void behavior).
|
|
238
|
+
*/
|
|
239
|
+
startReconnect(edgeId: string, end: 'source' | 'target'): void;
|
|
240
|
+
get isReconnecting(): boolean;
|
|
241
|
+
moveConnection(to: XY): void;
|
|
242
|
+
/** Complete the pending connection; returns the new/updated edge. */
|
|
243
|
+
endConnection(): Edge | null;
|
|
244
|
+
cancelConnection(): void;
|
|
245
|
+
/** Validate and create an edge (respecting defaultEdgeOptions). */
|
|
246
|
+
connect(candidate: ConnectionCandidate, props?: Partial<Edge>): Edge | null;
|
|
247
|
+
/** Returns true, or a string describing why the connection is invalid. */
|
|
248
|
+
validateCandidate(c: ConnectionCandidate): true | string;
|
|
249
|
+
handleConnectionCount(h: HandleInfo): number;
|
|
250
|
+
/** Would adding source→target create a directed cycle? */
|
|
251
|
+
wouldCreateCycle(source: string, target: string): boolean;
|
|
252
|
+
/** Nearest compatible opposite-kind handle within `radius` flow px. */
|
|
253
|
+
findCompatibleHandle(p: XY, radius: number): {
|
|
254
|
+
handle: HandleInfo;
|
|
255
|
+
valid: boolean;
|
|
256
|
+
} | null;
|
|
257
|
+
setScreenSize(width: number, height: number): void;
|
|
258
|
+
setViewport(v: Viewport): void;
|
|
259
|
+
panBy(dx: number, dy: number): void;
|
|
260
|
+
/** Zoom by factor around a screen-space pivot (defaults to center). */
|
|
261
|
+
zoomBy(factor: number, pivot?: XY): void;
|
|
262
|
+
zoomTo(zoom: number, duration?: number): void;
|
|
263
|
+
fitView(opts?: FitViewOptions): void;
|
|
264
|
+
/** Center the view on a node (nice for search/jump UX). */
|
|
265
|
+
centerNode(id: string, duration?: number): void;
|
|
266
|
+
animateViewport(target: Viewport, duration?: number): void;
|
|
267
|
+
private scheduleCull;
|
|
268
|
+
/** Recompute the visible node/edge sets; emits 'visible' on change. */
|
|
269
|
+
cull(force?: boolean): void;
|
|
270
|
+
toSnapshot(): FlowSnapshot;
|
|
271
|
+
loadSnapshot(snap: FlowSnapshot): void;
|
|
272
|
+
}
|
|
273
|
+
export {};
|
|
274
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,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