@statelyai/flow 0.7.0 → 0.9.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/README.md CHANGED
@@ -105,10 +105,21 @@ await flow.layout.run(
105
105
 
106
106
  <!-- adapter contracts from src/layout/elk.ts src/layout/dagre.ts and src/layout/shared.ts -->
107
107
 
108
- `elkLayout()` supports compound nodes, ports, edge labels, direction, measured
109
- bounds via `getBounds`, and scoped incremental layout with `scope: { ids }`.
110
- Results include computed node sizes and bounds, actual ELK label bounds, routed
111
- interior waypoints, source metadata, and diagnostics. Scoped passes send only
108
+ `elkLayout()` supports compound nodes, ports, edge labels, graph direction,
109
+ per-group child direction, measured bounds via `getBounds`, and scoped
110
+ incremental layout with `scope: { ids }`.
111
+ Results include computed node sizes and bounds, label bounds, routed interior
112
+ waypoints, source metadata, and diagnostics. Hierarchical ELK runs repair
113
+ invalid nested label positions by choosing the nearest node-free position, keep
114
+ intra-compound labels inside their owning group, reserve 24px of rank clearance
115
+ around native labels at both root and child levels, favor straight child edges, and
116
+ reserve sibling space for the final label-expanded derived bounds. Cross-level
117
+ ancestor/descendant edges force integrated hierarchy handling even when a caller's
118
+ general ELK options request separate child passes; their labels reserve a clear
119
+ lane between the group's content block and the descendant instead of being
120
+ pushed outside the compound. When integrated hierarchy would override a
121
+ conflicting per-group direction, a focused layered pass restores that group's
122
+ child ranks without changing the root direction. Scoped passes send only
112
123
  the induced graph to ELK; fixed and pinned entities remain in the input but are
113
124
  omitted from returned geometry.
114
125
 
@@ -136,8 +147,8 @@ The canonical data model is `VisualGraph` from `@statelyai/graph`. Flow extends
136
147
 
137
148
  <!-- flow entity types from src/types.ts -->
138
149
 
139
- - **`FlowNode`** — `VisualNode` + `{ kind, dx, dy, style, ports, autoSize, autoSizeAnchor, resize, hidden, selectable, draggable, connectable, deletable, resizable }` for application-defined rendering kinds, drag offsets, DOM-owned sizing, anchor policy, style overrides, resize constraints, and per-entity behavior. Keep the structural `type` equal to `"node"`; use `kind` for variants such as `state` or `annotation`.
140
- - **`FlowEdge`** — `VisualEdge` + `{ label, waypoints, sourcePort, targetPort, kind, style, labelAnchor }` for edge labels, editable route points, port binding, and edge styling; `label.autoSize` makes rendered DOM own transient label dimensions without overwriting authored fallback `width`/`height`; inherited edge `x/y/width/height` are reserved, while positioned edge content belongs on `label`
150
+ - **`FlowNode`** — `VisualNode` + `{ kind, dx, dy, style, ports, autoSize, autoSizeAnchor, selectionBounds, resize, hidden, selectable, draggable, connectable, deletable, resizable }` for application-defined rendering kinds, drag offsets, DOM-owned sizing, anchor policy, optional marquee hit geometry, style overrides, resize constraints, and per-entity behavior. Keep the structural `type` equal to `"node"`; use `kind` for variants such as `state` or `annotation`.
151
+ - **`FlowEdge`** — `VisualEdge` + `{ label, waypoints, svgPath, sourcePort, targetPort, kind, style, labelAnchor }` for edge labels, editable router via-points, exact SVG geometry, port binding, and edge styling. Canonical `VisualEdge.points` plus `routing` are an authoritative precomputed route and bypass Flow routers; an optional `svgPath` controls exact SVG paint while points remain authoritative for interaction geometry. Reconnects, node geometry updates, committed drags, and layout application clear stale precomputed routes; layout-provided edge routes replace them with router waypoints. `label.autoSize` makes rendered DOM own transient label dimensions without overwriting authored fallback `width`/`height`; inherited edge `x/y/width/height` are reserved, while positioned edge content belongs on `label`.
141
152
  - **`FlowGraph`** — `VisualGraph` with `FlowNode[]` and `FlowEdge[]`
142
153
  - **`FlowEntityRef`** — descriptor for a node, edge, port, or block resolved by id. `FlowAddressable` is a deprecated alias.
143
154
 
@@ -208,6 +219,8 @@ projections remain controller-owned and independent of the structural view.
208
219
  Register the unobscured screen-space rectangle when persistent UI overlays
209
220
  cover part of the canvas. Fit, center, and zoom commands with no explicit pivot
210
221
  then target that frame. The default remains the full, current viewport.
222
+ Derived groups fit by their current family bounds, including visible descendants,
223
+ rather than by the stored content-block anchor.
211
224
 
212
225
  ```ts
213
226
  flow.viewport.setFitFrame({ x: 320, y: 0, width: 880, height: 800 });
@@ -272,7 +285,7 @@ At runtime, flow expects port rectangles to be available for routing and hit geo
272
285
 
273
286
  Connection gestures snap to the nearest valid port inside `engine.connection.radius` (default `24` canvas pixels). In the default `loose` mode, node body targets remain valid fallback targets; `strict` mode requires port targets.
274
287
 
275
- For controlled graphs, `reconnectMode({ commit: false, dragThreshold: true, preview: false })` keeps pointer capture, thresholding, auto-pan, target resolution, and lifecycle events in Flow while leaving domain mutation and temporary geometry to the controller. `connectionEnded.reconnectedEdgeId` identifies connected, invalid, and cancelled observer-owned reconnects.
288
+ For controlled graphs, `reconnectMode({ commit: false, dragThreshold: true, preview: false })` keeps pointer capture, thresholding, auto-pan, target resolution, and lifecycle events in Flow while leaving domain mutation and temporary geometry to the controller. Exact DOM node/port targets take priority, then reconnection falls back to Flow's spatial candidate. Groups are fully targetable by default; `group.connectionBoundaryWidth` limits spatial body targeting to the content block and an inset child-surface boundary, leaving its interior as canvas. `connectionEnded.reconnectedEdgeId` identifies connected, invalid, and cancelled observer-owned reconnects.
276
289
 
277
290
  ```ts
278
291
  const graph = {
@@ -361,9 +374,9 @@ durable final layout.
361
374
 
362
375
  <!-- serialization API from src/serialize.ts and src/createFlow.ts -->
363
376
 
364
- `flow.toJSON()` returns `{ version: 1, graph, viewport, collapsedNodeIds }`. The graph is plain persisted intent: pending node and label drag offsets are folded into `x/y`, `dx/dy` and DOM `measured` sizes are stripped, and `style.customWidth/customHeight` are kept. Selection, hover, connection state, highlights, measurements, and undo history are session state and are not serialized.
377
+ `flow.toJSON()` returns `{ version: 1, graph, viewport, collapsedNodeIds }`. The graph is plain persisted intent: pending node and label drag offsets are folded into `x/y`, pending edge drag offsets are folded into route waypoints, `dx/dy` and DOM `measured` sizes are stripped, and `style.customWidth/customHeight` are kept. Selection, hover, connection state, highlights, measurements, and undo history are session state and are not serialized.
365
378
 
366
- Use `fromJSON(data, options?)` to create a new controller from saved data, or `flow.load(data)` to validate and replace an existing document atomically. `load()` returns `{ ok: true, value }` or `{ ok: false, error }`. User data is deep-cloned and must be JSON-safe; optional Standard Schema-compatible contracts can validate and migrate it.
379
+ Use `fromJSON(data, options?)` to create a new controller from saved data, or `flow.load(data)` to validate and replace an existing document atomically. `load()` returns `{ ok: true, value }` or `{ ok: false, error }`. User data is deep-cloned and must be JSON-safe; edge route points must be finite, routing must be `polyline`, `orthogonal`, or `splines`, and SVG paths accept only path commands with finite numeric parameters. Optional Standard Schema-compatible contracts can validate and migrate application data.
367
380
 
368
381
  Use `flow.replaceGraph(graph, options?)` when another model is authoritative and
369
382
  continuously projects its graph into Flow. It validates atomically, returns the
@@ -402,13 +415,13 @@ events.
402
415
 
403
416
  ### Drag lifecycle
404
417
 
405
- | Event | Payload | Description |
406
- | ------------ | ------------------------------- | ------------------------------------- |
407
- | `dragStart` | `{ id }` | Begin dragging the selected entity |
408
- | `dragMove` | `{ dx, dy }` | Apply in-progress drag delta |
409
- | `dragEnd` | — | End drag gesture |
410
- | `commitDrag` | — | Bake `dx/dy` into committed positions |
411
- | `moveNodes` | `{ direction: Point, factor? }` | Move selected nodes by arrow key |
418
+ | Event | Payload | Description |
419
+ | ------------ | ------------------------------- | --------------------------------------------------- |
420
+ | `dragStart` | `{ id }` | Begin dragging the selected entity |
421
+ | `dragMove` | `{ dx, dy }` | Apply in-progress drag delta |
422
+ | `dragEnd` | — | End drag gesture |
423
+ | `commitDrag` | `{ snapOffset?: Point }` | Bake `dx/dy` and the visual snap into positions |
424
+ | `moveNodes` | `{ direction: Point, factor? }` | Move selected nodes by arrow key |
412
425
 
413
426
  ### Selection & focus
414
427
 
@@ -602,7 +615,12 @@ await animation.done;
602
615
 
603
616
  <!-- edge routers from src/routing/index.ts -->
604
617
 
605
- Four built-in routers. All return `PathData` (points + source/target direction). A custom router may also return `svgPath` to preserve rounded or otherwise custom SVG geometry; `points` remain required for bounds and endpoint handles, and exported `pathToSVG` safely prefers a finite, non-empty override. Edge `waypoints` are ordered interior canvas points passed through `EdgeRouterContext`; built-in routers honor them. Custom `EdgeRouter`s receive the full typed edge plus the exact canonical or projection `graph` currently being routed and a detached, read-only `getEntityBounds(id)` lookup for live node/edge-label geometry. The lookup never routes another edge. Use `configureBezierRouter(options)`, `configureStepRouter(options)`, and `configureAvoidRouter(options)` for customized built-in router variants. `avoidRouter` is opt-in and routes orthogonal polylines around sibling node obstacles.
618
+ Four built-in routers. All return `PathData` (points + source/target direction). A custom router may also return `svgPath` to preserve rounded or otherwise custom SVG geometry; `points` remain required for bounds and endpoint handles, and exported `pathToSVG` safely prefers a finite override containing only SVG path commands and numeric parameters. Canonical graph `edge.points` are different from `waypoints`: they are a complete authoritative endpoint-to-endpoint route, interpreted by `edge.routing` (`polyline`, `orthogonal`, or chained `splines`) and never sent through a Flow router or split around a label. An optional edge `svgPath` preserves exact SVG paint while the authoritative points drive endpoints, bounds, hit testing, culling, transient DOM updates, and export. Core endpoint-geometry mutations invalidate precomputed route fields; layout-provided edge routes replace them with router waypoints, while consumers can apply a fresh authoritative graph to restore exact geometry. Edge `waypoints` remain ordered interior router inputs passed through `EdgeRouterContext`; built-in routers honor them. Custom `EdgeRouter`s receive the full typed edge plus the exact canonical or projection `graph` currently being routed and a detached, read-only `getEntityBounds(id)` lookup for live node/edge-label geometry. The lookup never routes another edge. Use `configureBezierRouter(options)`, `configureStepRouter(options)`, and `configureAvoidRouter(options)` for customized built-in router variants. `avoidRouter` is opt-in and routes orthogonal polylines around sibling node obstacles. Set `engine.edgeRouterDependencies: 'endpoints'` only when a custom router does not inspect unrelated graph entities, bounds, or obstacles; Flow can then retain unaffected routes after local geometry changes. The safe default is `'graph'`.
619
+
620
+ Router obstacles exclude the source, target, and their ancestor groups, so an
621
+ edge crossing a hierarchy boundary can pass through its endpoint container.
622
+
623
+ Routers must be deterministic from their supplied inputs. Flow reuses paths while routing geometry and router identity are unchanged.
606
624
 
607
625
  ```ts
608
626
  import { configureStepRouter, type EdgeRouter } from '@statelyai/flow';
@@ -740,6 +758,11 @@ const store = createFlowStore(graph, {
740
758
 
741
759
  Box selection tests node bounds and rendered edge-label bounds only. Crossing
742
760
  an edge path does not select it, and edges without labels are not box-selected.
761
+ Set a node's `selectionBounds` when its selectable surface differs from its
762
+ visual bounds, such as a compound node whose header selects the parent while
763
+ its child area remains available for box selection.
764
+ Groups use their configured content block as the default marquee hit rectangle,
765
+ leaving their child area available for selecting descendants.
743
766
  As a growing box captures entities, selection order records when each entity
744
767
  first enters the box.
745
768
 
@@ -1,5 +1,5 @@
1
1
  import { ExtractEvents } from "@xstate/store";
2
- import { EntityRect, Graph, GraphEdge, GraphNode, GraphPort, PortDirection, VisualEdge, VisualEdge as VisualEdge$1, VisualGraph, VisualGraphConfig, VisualNode, VisualNode as VisualNode$1, VisualPort, VisualPort as VisualPort$1 } from "@statelyai/graph";
2
+ import { EdgeRouting, EdgeRouting as EdgeRouting$1, EntityRect, Graph, GraphEdge, GraphNode, GraphPort, PortDirection, VisualEdge, VisualEdge as VisualEdge$1, VisualGraph, VisualGraphConfig, VisualNode, VisualNode as VisualNode$1, VisualPort, VisualPort as VisualPort$1 } from "@statelyai/graph";
3
3
  //#region src/hierarchy.d.ts
4
4
  type GroupContentSide = 'top' | 'left' | 'bottom' | 'right';
5
5
  type GroupInsets = {
@@ -16,6 +16,15 @@ type GroupLayout = {
16
16
  padding?: number | Partial<GroupInsets>;
17
17
  /** Minimum child-area size when the group is empty or tiny. */
18
18
  minChildArea?: Size;
19
+ /**
20
+ * Width of the connectable boundary inside the child surface. When set,
21
+ * the content block and this boundary are connectable, while the child
22
+ * surface interior remains canvas. Omit to keep the full group body
23
+ * connectable.
24
+ */
25
+ connectionBoundaryWidth?: number;
26
+ /** Rank direction for this group's children during hierarchical layout. */
27
+ direction?: EdgeDirection;
19
28
  } | {
20
29
  type: 'fixed';
21
30
  content?: GroupContentSide;
@@ -29,6 +38,15 @@ type GroupLayout = {
29
38
  contentSize?: Size;
30
39
  /** Clamp child drags to the child area (default 'none'). */
31
40
  clampChildren?: 'x' | 'y' | 'both' | 'none';
41
+ /**
42
+ * Width of the connectable boundary inside the child surface. When set,
43
+ * the content block and this boundary are connectable, while the child
44
+ * surface interior remains canvas. Omit to keep the full group body
45
+ * connectable.
46
+ */
47
+ connectionBoundaryWidth?: number;
48
+ /** Rank direction for this group's children during hierarchical layout. */
49
+ direction?: EdgeDirection;
32
50
  };
33
51
  type GroupGeometry = {
34
52
  /** Overall group bounds. */
@@ -144,6 +162,12 @@ type FlowNodeAttributes = {
144
162
  * authoritative and children can be clamped inside. See `GroupLayout`.
145
163
  */
146
164
  group?: GroupLayout;
165
+ /**
166
+ * Optional authored hit rectangle for marquee selection. Useful when a
167
+ * node's visual family is larger than the surface that selects the node
168
+ * (for example, a compound state's header).
169
+ */
170
+ selectionBounds?: Rect;
147
171
  /** Entity flag wins over global `FlowConfig.visible`; default true. */
148
172
  hidden?: boolean;
149
173
  /** Entity flag wins over global `FlowConfig.selectable`; default true. */
@@ -202,6 +226,11 @@ type FlowEdgeAttributes<TLabelData = unknown> = {
202
226
  label?: FlowEdgeLabel<TLabelData> | null;
203
227
  labelAnchor?: LabelAnchor;
204
228
  waypoints?: Point[];
229
+ /**
230
+ * Exact SVG rendering for authoritative `points`. Points remain the source
231
+ * of truth for bounds, endpoints, hit testing, and non-SVG renderers.
232
+ */
233
+ svgPath?: string;
205
234
  sourcePort?: string | null;
206
235
  targetPort?: string | null;
207
236
  kind?: string;
@@ -251,8 +280,9 @@ type FlowNode<TData = any> = VisualNode$1<TData> & FlowNodeAttributes;
251
280
  * A flow edge: VisualEdge + flow attributes.
252
281
  *
253
282
  * `x`/`y`/`width`/`height` are inherited from the graph visual model and
254
- * reserved for compatibility. Flow renderers route edges from endpoints;
255
- * positioned edge content belongs on `label`.
283
+ * reserved for compatibility. Flow renderers route edges from endpoints unless
284
+ * canonical `points` provide an authoritative route; positioned edge content
285
+ * belongs on `label`.
256
286
  */
257
287
  type FlowEdge<TEdgeData = any, TLabelData = any> = Omit<VisualEdge$1<TEdgeData>, 'label'> & FlowEdgeAttributes<TLabelData>;
258
288
  /** A flow graph: VisualGraph with FlowNode/FlowEdge */
@@ -319,6 +349,8 @@ type EntityVisualState = {
319
349
  type Direction = 'top' | 'bottom' | 'left' | 'right';
320
350
  type PathData = {
321
351
  points: Point[];
352
+ /** Explicit interpretation for authoritative graph-owned points. */
353
+ routing?: EdgeRouting$1;
322
354
  sourceDirection: Direction;
323
355
  targetDirection: Direction;
324
356
  /**
@@ -395,6 +427,10 @@ type FitViewOptions = ViewportAnimationOptions & {
395
427
  frame?: Rect;
396
428
  };
397
429
  //#endregion
430
+ //#region src/marker.d.ts
431
+ /** Convert a marker contract value to a safe local SVG marker reference. */
432
+ declare function markerToSVG(marker: MarkerType | undefined, builtInPrefix: string): string | undefined;
433
+ //#endregion
398
434
  //#region src/projections.d.ts
399
435
  type GraphDecoration<TDecoration = unknown> = TDecoration | readonly TDecoration[];
400
436
  type GraphNodeAttrs<TStyle extends object = object, TDecoration = unknown> = {
@@ -528,6 +564,13 @@ type EdgeRouterContext<TEdgeData = any, TLabelData = any, TNodeData = any> = {
528
564
  */
529
565
  obstacles: Rect[];
530
566
  };
567
+ /**
568
+ * Deterministic edge-routing function.
569
+ *
570
+ * Routers should depend only on the edge and supplied routing context. Do not
571
+ * read viewport or external mutable state; Flow may reuse a path while graph
572
+ * geometry and the router identity are unchanged.
573
+ */
531
574
  type EdgeRouter<TEdgeData = any, TLabelData = any, TNodeData = any> = (edge: Readonly<FlowEdge<TEdgeData, TLabelData>>, context: EdgeRouterContext<TEdgeData, TLabelData, TNodeData>) => PathData;
532
575
  type BezierRouterOptions = {
533
576
  curvature?: number;
@@ -572,6 +615,8 @@ interface SpacingGuide {
572
615
  }
573
616
  interface SnapResult {
574
617
  snapLines: SnapLine[];
618
+ /** Exact input rect from which the snap delta was calculated */
619
+ sourceRect: Rect;
575
620
  /** Adjusted rect position (size unchanged) */
576
621
  snapRect: Rect;
577
622
  spacingGuides?: SpacingGuide[];
@@ -600,6 +645,7 @@ type ProposedConnection = {
600
645
  targetPort?: string | null;
601
646
  };
602
647
  type FlowConnectionMode = 'strict' | 'loose';
648
+ type EdgeRouterDependencies = 'graph' | 'endpoints';
603
649
  type FlowConnectionOptions = {
604
650
  /** Magnet radius in canvas pixels. Default 24. */
605
651
  radius?: number;
@@ -638,6 +684,14 @@ type ConnectionValidationResult = boolean | {
638
684
  type FlowEngineOptions = {
639
685
  /** Default edge router (default: bezierRouter) */
640
686
  edgeRouter?: EdgeRouter;
687
+ /**
688
+ * Geometry read by a custom edge router. Defaults to `graph`, which safely
689
+ * reroutes every edge after any graph geometry change. Use `endpoints` only
690
+ * when the router depends on the edge and its endpoint/label inputs—not
691
+ * arbitrary `graph`, `getEntityBounds`, or `obstacles` reads. That contract
692
+ * lets Flow retain unaffected custom routes by identity.
693
+ */
694
+ edgeRouterDependencies?: EdgeRouterDependencies;
641
695
  /** Default label anchor (default: 'fixed' — labels use their own x/y) */
642
696
  labelAnchor?: LabelAnchor;
643
697
  /**
@@ -681,9 +735,20 @@ type RenderableEntitiesOptions = {
681
735
  cull?: 'none' | 'viewport';
682
736
  overscan?: number;
683
737
  };
738
+ type EntityOrderOptions = {
739
+ /** Include configured selection elevation. Defaults to true. */
740
+ elevateSelected?: boolean;
741
+ };
684
742
  type EdgePathOptions = {
685
743
  graph?: FlowStoreContext['graph'];
686
744
  };
745
+ /**
746
+ * Create the framework-agnostic derived-geometry and query layer for a store.
747
+ *
748
+ * The engine owns memoized graph indices, paint order, bounds, routing, and
749
+ * hit-testing. Returned collections are read-only views and may retain identity
750
+ * while their semantic inputs are unchanged.
751
+ */
687
752
  declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineOptions): {
688
753
  store: import("@xstate/store").Store<FlowStoreContext, {
689
754
  createNode: {
@@ -795,10 +860,12 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
795
860
  };
796
861
  dragEnd: undefined;
797
862
  dragCancel: undefined;
798
- commitDrag: {
863
+ commitDrag: ({
799
864
  transactionId?: string;
800
865
  origin?: string;
801
- } | undefined;
866
+ } & {
867
+ snapOffset?: Point;
868
+ }) | undefined;
802
869
  select: {
803
870
  ids: string[];
804
871
  mode?: "single" | "multi";
@@ -1136,10 +1203,12 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
1136
1203
  };
1137
1204
  dragEnd: undefined;
1138
1205
  dragCancel: undefined;
1139
- commitDrag: {
1206
+ commitDrag: ({
1140
1207
  transactionId?: string;
1141
1208
  origin?: string;
1142
- } | undefined;
1209
+ } & {
1210
+ snapOffset?: Point;
1211
+ }) | undefined;
1143
1212
  select: {
1144
1213
  ids: string[];
1145
1214
  mode?: "single" | "multi";
@@ -1435,12 +1504,12 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
1435
1504
  deletable: boolean;
1436
1505
  resizable: boolean;
1437
1506
  };
1438
- getVisibleEntities: () => {
1507
+ getVisibleEntities: (options?: EntityOrderOptions) => {
1439
1508
  nodes: FlowNode[];
1440
1509
  edges: FlowEdge[];
1441
1510
  };
1442
1511
  /** Deterministic paint order. Later items should paint above earlier ones. */
1443
- getEntityOrder: () => {
1512
+ getEntityOrder: (options?: EntityOrderOptions) => {
1444
1513
  nodes: FlowNode[];
1445
1514
  edges: FlowEdge[];
1446
1515
  };
@@ -1516,7 +1585,6 @@ declare function keyboardNavMode(options?: {
1516
1585
  declare function wheelMode(): FlowInputMode;
1517
1586
  declare function panMode(): FlowInputMode;
1518
1587
  declare function pinchMode(): FlowInputMode;
1519
- declare function resizeMode(): FlowInputMode;
1520
1588
  type ReparentDropContext = {
1521
1589
  /** Top-level dragged nodes (descendants of dragged nodes excluded). */
1522
1590
  nodes: FlowNode[];
@@ -1585,6 +1653,10 @@ type ConnectModeOptions = {
1585
1653
  }, ctx: FlowInputModeContext) => boolean;
1586
1654
  };
1587
1655
  declare function connectMode(options?: ConnectModeOptions): FlowInputMode;
1656
+ /** Select/focus graph-owned ports explicitly rendered for readonly inspection. */
1657
+ declare function portPressMode(options?: {
1658
+ keymap?: Partial<FlowKeymap>;
1659
+ }): FlowInputMode;
1588
1660
  type ReconnectModeOptions = {
1589
1661
  /**
1590
1662
  * Mutate the Flow graph after a valid drop. Disable for controlled graphs
@@ -1654,6 +1726,9 @@ type FlowInputTarget = {
1654
1726
  kind: 'port';
1655
1727
  nodeId: string;
1656
1728
  portName: string;
1729
+ portId?: string;
1730
+ /** `inspect` addresses the port without starting a connection gesture. */
1731
+ interaction?: 'connect' | 'inspect';
1657
1732
  } | {
1658
1733
  kind: 'none';
1659
1734
  };
@@ -1963,6 +2038,8 @@ type FlowStoreContext = {
1963
2038
  measurements: Map<string, Rect>;
1964
2039
  canvasState: CanvasState;
1965
2040
  draggedEntityId: string | null;
2041
+ /** Monotonic signal for exact per-entity drag-frame notification. */
2042
+ dragRevision: number;
1966
2043
  dragThreshold: number;
1967
2044
  /**
1968
2045
  * Constrains where a node may move during drags/keyboard nudges. Receives
@@ -2256,7 +2333,9 @@ type FlowEventPayloadMap = {
2256
2333
  };
2257
2334
  dragEnd: undefined;
2258
2335
  dragCancel: undefined;
2259
- commitDrag: TransactionMetadata | undefined;
2336
+ commitDrag: (TransactionMetadata & {
2337
+ snapOffset?: Point;
2338
+ }) | undefined;
2260
2339
  select: {
2261
2340
  ids: string[];
2262
2341
  mode?: 'single' | 'multi';
@@ -2623,7 +2702,21 @@ type FlowSerialized<TNodeData = any, TEdgeData = any, TLabelData = any> = {
2623
2702
  collapsedNodeIds?: string[];
2624
2703
  dataVersions?: FlowDataVersions;
2625
2704
  };
2705
+ /**
2706
+ * Parse, migrate, and validate a persisted Flow document.
2707
+ *
2708
+ * Versionless documents are treated as version 0. Data migrations must be
2709
+ * synchronous. The returned graph is detached from `input`; invalid documents
2710
+ * throw `FlowGraphValidationError` with stable issue paths.
2711
+ */
2626
2712
  declare function parseFlowSerialized<TNodeData = any, TEdgeData = any, TLabelData = any>(input: unknown, schemas?: FlowDataSchemas<TNodeData, TEdgeData, TLabelData>): FlowSerialized<TNodeData, TEdgeData, TLabelData>;
2713
+ /**
2714
+ * Create a persistence-safe graph snapshot.
2715
+ *
2716
+ * Transient drag and measurement state is folded into authored coordinates or
2717
+ * removed. Nested geometry objects are copied so callers can mutate the result
2718
+ * without changing the live graph.
2719
+ */
2627
2720
  declare function serializeFlowGraph<TNodeData = any, TEdgeData = any, TLabelData = any>(graph: FlowGraph<TNodeData, TEdgeData, TLabelData>): FlowGraph<TNodeData, TEdgeData, TLabelData>;
2628
2721
  //#endregion
2629
2722
  //#region src/changeSet.d.ts
@@ -2979,6 +3072,7 @@ type FlowTransactionDraft<TNodeData = any, TEdgeData = any, TLabelData = any> =
2979
3072
  nodes: Omit<FlowNodesApi<TNodeData>, 'collapse' | 'expand'>;
2980
3073
  edges: FlowEdgesApi<TEdgeData, TLabelData>;
2981
3074
  };
3075
+ /** Options for creating an owning Flow controller. */
2982
3076
  interface CreateFlowOptions<TNodeData = any, TEdgeData = any, TLabelData = any> {
2983
3077
  /** Initial graph owned by the controller. */
2984
3078
  graph?: FlowGraph<TNodeData, TEdgeData, TLabelData>;
@@ -3008,6 +3102,13 @@ interface CreateFlowOptions<TNodeData = any, TEdgeData = any, TLabelData = any>
3008
3102
  /** Optional Standard Schema-compatible contracts for application data. */
3009
3103
  dataSchemas?: FlowDataSchemas<TNodeData, TEdgeData, TLabelData>;
3010
3104
  }
3105
+ /**
3106
+ * Framework-neutral owner of a Flow graph and its interaction session.
3107
+ *
3108
+ * Mutations go through the domain APIs (`nodes`, `edges`, `selection`,
3109
+ * `viewport`) so validation, history, commit events, and cleanup stay coherent.
3110
+ * Call `destroy()` when the controller is no longer used.
3111
+ */
3011
3112
  interface FlowController<TNodeData = any, TEdgeData = any, TLabelData = any> {
3012
3113
  internals: {
3013
3114
  store: FlowStore;
@@ -3062,7 +3163,7 @@ interface FlowController<TNodeData = any, TEdgeData = any, TLabelData = any> {
3062
3163
  nodes: FlowNode[];
3063
3164
  edges: FlowEdge[];
3064
3165
  };
3065
- getEntityOrder: () => {
3166
+ getEntityOrder: (options?: EntityOrderOptions) => {
3066
3167
  nodes: FlowNode[];
3067
3168
  edges: FlowEdge[];
3068
3169
  };
@@ -3088,7 +3189,20 @@ interface FlowController<TNodeData = any, TEdgeData = any, TLabelData = any> {
3088
3189
  connections: FlowConnectionsApi;
3089
3190
  content: FlowContentApi<TNodeData, TEdgeData, TLabelData>;
3090
3191
  }
3192
+ /**
3193
+ * Create an owning Flow controller from an optional initial graph.
3194
+ *
3195
+ * The input graph is validated and cloned. Adapters should subscribe to this
3196
+ * controller and delegate behavior to its APIs instead of reimplementing graph
3197
+ * or viewport policy.
3198
+ */
3091
3199
  declare function createFlow<TNodeData = any, TEdgeData = any, TLabelData = any>(options?: CreateFlowOptions<TNodeData, TEdgeData, TLabelData>): FlowController<TNodeData, TEdgeData, TLabelData>;
3200
+ /**
3201
+ * Parse a persisted Flow document and create a controller from it.
3202
+ *
3203
+ * Restores graph, collapsed nodes, and viewport after applying configured data
3204
+ * migrations. Throws `FlowGraphValidationError` for invalid documents.
3205
+ */
3092
3206
  declare function fromJSON<TNodeData = any, TEdgeData = any, TLabelData = any>(data: unknown, options?: Omit<CreateFlowOptions<TNodeData, TEdgeData, TLabelData>, 'graph'>): FlowController<TNodeData, TEdgeData, TLabelData>;
3093
3207
  //#endregion
3094
3208
  //#region src/connectionPreview.d.ts
@@ -3116,6 +3230,8 @@ declare const resolvedPosition: typeof visualPosition;
3116
3230
  declare function visualBounds(node: FlowNode): Rect;
3117
3231
  /** @deprecated Use `visualBounds`. */
3118
3232
  declare const resolvedBounds: typeof visualBounds;
3233
+ /** Bounds used by marquee selection, including transient node movement. */
3234
+ declare function resolvedSelectionBounds(node: FlowNode): Rect;
3119
3235
  /**
3120
3236
  * Size used for edge-label geometry. `autoSize` labels retain authored
3121
3237
  * dimensions as a fallback while a transient DOM measurement owns the live
@@ -3141,7 +3257,9 @@ declare function snapPointToGrid(point: Point, gridSize: number): Point;
3141
3257
  /** Normalize a box (two points) into a Rect with positive width/height */
3142
3258
  declare function boxToRect(p1: Point, p2: Point): Rect;
3143
3259
  /** Get bounding rect of specific entities by id */
3144
- declare function getSelectionBounds(nodes: FlowNode[], edges: FlowEdge[], selection: Set<string>, measurements?: ReadonlyMap<string, Rect>): Rect | null;
3260
+ declare function getSelectionBounds(nodes: FlowNode[], edges: FlowEdge[], selection: Set<string>, measurements?: ReadonlyMap<string, Rect>, options?: {
3261
+ includeEdgePoints?: boolean;
3262
+ }): Rect | null;
3145
3263
  /** Determine select mode from a pointer/keyboard event */
3146
3264
  declare function selectMode(e: {
3147
3265
  shiftKey?: boolean;
@@ -3338,7 +3456,7 @@ type FlowEntityChangeNotifierOptions = {
3338
3456
  declare function createEntityChangeNotifier(store: FlowStore, options?: FlowEntityChangeNotifierOptions): FlowEntityChangeNotifier;
3339
3457
  //#endregion
3340
3458
  //#region src/config.d.ts
3341
- /** Default config: everything enabled */
3459
+ /** Default config: supported editing behaviors enabled */
3342
3460
  declare const defaultConfig: FlowConfig;
3343
3461
  /** Readonly preset: can select and view, cannot modify */
3344
3462
  declare const readonlyConfig: Partial<FlowConfig>;
@@ -3348,4 +3466,4 @@ declare const readonlyConfig: Partial<FlowConfig>;
3348
3466
  */
3349
3467
  declare function resolveBehavior<TEntity, TState>(predicate: ((entity: TEntity, state: TState) => boolean) | false | undefined, entity: TEntity, state: TState, defaultValue?: boolean): boolean;
3350
3468
  //#endregion
3351
- export { type ActiveGraphProjection, type AnchorSpec, type AnchorTransform, type AnimateViewportOptions, type AutoLayoutState, type AvoidRouterOptions, type BehaviorPredicate, type BezierRouterOptions, type BoxSelectModeOptions, type BoxSelectionTest, CONNECTION_PREVIEW_EDGE_ID, CONNECTION_PREVIEW_NODE_ID, type CanvasState, type ComposedGraphProjectionAttrs, type ConnectEndTarget, type ConnectModeOptions, type ConnectionCandidate, type ConnectionCandidateOptions, type ConnectionCandidateSource, type ConnectionEndedEvent, type ConnectionPreviewData, type ConnectionPreviewGraphOptions, type ConnectionState, type ConnectionValidationContext, type ConnectionValidationResult, type CreateEdgeInput, type CreateFlowOptions, type CreateNodeInput, type Direction, type EdgeAdjacencyIndex, type EdgeDirection, type EdgePathData, type EdgePathOptions, type EdgeRouter, type EdgeRouterContext, type EdgeRouterGraph, type EdgeSourceBoundsContext, type EntityRect, type EntityVisualState, type FitViewExclusion, type FitViewExclusionSide, type FitViewOptions, type FlowAbortSignal, type FlowAddressable, type FlowAutoSizeAnchor, type FlowCapabilityCommand, type FlowCapabilityResult, type FlowChangeSet, type FlowColorMode, type FlowCommand, type FlowCommitEvent, type FlowConfig, type FlowConfiguration, type FlowConfigureOptions, type FlowConnectMovedEvent, type FlowConnectStartedEvent, type FlowConnection, type FlowConnectionMode, type FlowConnectionOptions, type FlowConnectionsApi, type FlowContent, type FlowContentApi, type FlowContentInsertResult, type FlowController, type FlowCreateIdContext, type FlowDataSchema, type FlowDataSchemas, type FlowDataVersions, type FlowDragEndedEvent, type FlowDragMovedEvent, type FlowDragStartedEvent, type FlowEdge, type FlowEdgeAttributes, type FlowEdgeLabel, type FlowEdgePatch, type FlowEdgeStyle, type FlowEdgeUpdater, type FlowEdgesApi, type FlowEngine, type FlowEngineOptions, type FlowEntitiesDeletedEvent, type FlowEntityChangeNotifier, type FlowEntityChangeNotifierOptions, type FlowEntityGestureEvent, type FlowEntityRef, type FlowEntityUpdate, type FlowErrorEvent, type FlowEventObject, type FlowGestureModifiers, type FlowGraph, type FlowGraphChangedEvent, type FlowGraphHistoryPolicy, type FlowGraphRetentionPolicy, FlowGraphValidationError, type FlowHighlightEntry, type FlowHighlights, type FlowHighlightsApi, type FlowHistoryApi, type FlowInputEffects, type FlowInputEvent, type FlowInputMode, type FlowInputModeContext, type FlowInputModifiers, type FlowInputProfile, type FlowInputReaction, type FlowInputRuntime, type FlowInputRuntimeOptions, type FlowInputSessionHandlers, type FlowInputTarget, type FlowKeyBinding, type FlowKeyInputEvent, type FlowKeymap, type FlowLayoutApi, type FlowModeDefinition, type FlowNode, type FlowNodeAttributes, type FlowNodePatch, type FlowNodeUpdater, type FlowNodesApi, type FlowOrigin, type FlowPaneGestureEvent, type FlowPatch, type FlowPinchInputEvent, type FlowPointerInputEvent, type FlowPolicies, type FlowPort, type FlowProfile, type FlowProjectionListener, type FlowProjectionsApi, type FlowReplaceGraphOptions, type FlowResizeEndedEvent, type FlowResizeStartedEvent, type FlowResolvers, type FlowResult, type FlowRules, type FlowRuntimeSettings, type FlowSelectionAlignment, type FlowSelectionApi, type FlowSelectionChangedEvent, type FlowSelectionDistribution, type FlowSelectionDuplicateResult, type FlowSerialized, type FlowSessionResult, type FlowSettings, type FlowStore, type FlowStoreContext, type FlowStoreOptions, type FlowTransactionDraft, type FlowTransactionOptions, type FlowTransition, type FlowTransitions, type FlowTriggerCommand, type FlowTriggerName, type FlowUpdateEdgeEvent, type FlowUpdateNodeEvent, type FlowValidationIssue, type FlowViewApi, type FlowViewBoundaryEndpoints, type FlowViewChangedEvent, type FlowViewEndpoint, type FlowViewEntities, type FlowViewScope, type FlowViewSelectionPolicy, type FlowViewportApi, type FlowViewportChangedEvent, type FlowWheelInputEvent, type Graph, type GraphDecoration, type GraphEdge, type GraphEdgeAttrs, type GraphNode, type GraphNodeAttrs, type GraphPort, type GraphProjection, type GraphProjectionMapper, type GroupContentSide, type GroupGeometry, type GroupInsets, type GroupLayout, type InteractionMode, type LabelAnchor, type LayoutAlgorithm, type LayoutAnimationControls, type LayoutAnimationOptions, type LayoutApplyOptions, type LayoutDiagnostic, type LayoutEdgeRoute, type LayoutPositions, type LayoutRequestedEvent, type LayoutResult, type LayoutRunOptions, type LayoutRunResult, type MarkerType, type MinimapProjection, type MinimapProjectionOptions, type PathData, type Point, type PortDirection, type ProposedConnection, type ReconnectModeOptions, type Rect, type RenderableEntitiesOptions, type ReparentDecision, type ReparentDropContext, type ReparentOptions, type ResizeConstraints, type ResizeHandle, type ResolvedFitViewExclusion, type SelectionMode, type ShapeHandler, type Side, type Size, type SnapLine, type SnapOptions, type SnapResult, type SpacingGuide, type StandardSchemaV1Like, type StepRouterOptions, type StyleOverrides, type ToolbarPlacement, type ToolbarPlacementInput, type Viewport, type ViewportAnimationCancelFrame, type ViewportAnimationControls, type ViewportAnimationFrame, type ViewportAnimationOptions, type VisualEdge, type VisualGraph, type VisualNode, type VisualPort, type WheelInteraction, type WheelInteractionOptions, animateViewport, applyFlowPatches, areNodesMeasured, avoidRouter, bestDirection, bezierRouter, boxSelectMode, boxToRect, calcAutoPan, canvasToScreen, clampZoom, cloneJsonSafe, composeGraphProjectionAttrs, configureAvoidRouter, configureBezierRouter, configureStepRouter, connectMode, constrainViewport, createConnectionPreviewGraph, createEdge, createEntityChangeNotifier, createFlow, createFlowChangeSet, createFlowEngine, createFlowInputRuntime, createFlowStore, createGraph, createNode, createPort, createViewport, defaultConfig, defaultFlowProfile, defaultInputModes, defaultInputModesForKeymap, defaultKeymap, defaultModesForContext, defineFlowProfile, deriveFlowView, deriveGroupGeometry, entityPressMode, extractFlowContent, fitFrameAroundExclusions, fixedGroupGeometry, fromJSON, getAnchorTransform, getAutoPanDelta, getConnectedEdges, getEdgeOwner, getGraphBounds, getIncomers, getMinimapProjection, getNeighbors, getOutgoers, getProjectedEdgeAttrs, getProjectedNodeAttrs, getSelectionBounds, getShape, getShapeOrDefault, getSnapLines, getToolbarPlacement, getVisibleBounds, hoverMode, indexChildren, indexEdgeAdjacency, indexEdges, indexNodes, insertFlowContent, isDerivedGroup, isGroup, isTrackpadPinch, keyboardMode, keyboardNavMode, matchesKeyBinding, mergeGraphEdgeAttrs, mergeGraphNodeAttrs, nodeDepths, normalizeWheelPan, panBy, panMode, panePressMode, parseFlowSerialized, pathToSVG, pinchMode, preventDefault, profileModesForContext, profilePoliciesForContext, readonlyConfig, readonlyInputModes, readonlyInputModesForKeymap, reconnectMode, rectContains, rectsIntersect, registerShape, resizeMode, resolveBehavior, resolveGroupPadding, resolveKeymap, resolvedBounds, resolvedEdgeLabelBounds, resolvedEdgeLabelSize, resolvedPosition, screenToCanvas, selectMode, serializeFlowGraph, snapPointToGrid, snapToGrid, snappedBounds, sortActiveGraphProjections, stepRouter, straightRouter, toSVGTransform, toViewBox, trigger, unionRect, validateAndCloneGraph, validateFitFrame, validateViewport, viewportCenteredOn, viewportForBounds, visualBounds, visualPosition, wheelInteraction, wheelMode, wheelZoomDelta, zoomTo };
3469
+ export { type ActiveGraphProjection, type AnchorSpec, type AnchorTransform, type AnimateViewportOptions, type AutoLayoutState, type AvoidRouterOptions, type BehaviorPredicate, type BezierRouterOptions, type BoxSelectModeOptions, type BoxSelectionTest, CONNECTION_PREVIEW_EDGE_ID, CONNECTION_PREVIEW_NODE_ID, type CanvasState, type ComposedGraphProjectionAttrs, type ConnectEndTarget, type ConnectModeOptions, type ConnectionCandidate, type ConnectionCandidateOptions, type ConnectionCandidateSource, type ConnectionEndedEvent, type ConnectionPreviewData, type ConnectionPreviewGraphOptions, type ConnectionState, type ConnectionValidationContext, type ConnectionValidationResult, type CreateEdgeInput, type CreateFlowOptions, type CreateNodeInput, type Direction, type EdgeAdjacencyIndex, type EdgeDirection, type EdgePathData, type EdgePathOptions, type EdgeRouter, type EdgeRouterContext, type EdgeRouterGraph, type EdgeRouting, type EdgeSourceBoundsContext, type EntityRect, type EntityVisualState, type FitViewExclusion, type FitViewExclusionSide, type FitViewOptions, type FlowAbortSignal, type FlowAddressable, type FlowAutoSizeAnchor, type FlowCapabilityCommand, type FlowCapabilityResult, type FlowChangeSet, type FlowColorMode, type FlowCommand, type FlowCommitEvent, type FlowConfig, type FlowConfiguration, type FlowConfigureOptions, type FlowConnectMovedEvent, type FlowConnectStartedEvent, type FlowConnection, type FlowConnectionMode, type FlowConnectionOptions, type FlowConnectionsApi, type FlowContent, type FlowContentApi, type FlowContentInsertResult, type FlowController, type FlowCreateIdContext, type FlowDataSchema, type FlowDataSchemas, type FlowDataVersions, type FlowDragEndedEvent, type FlowDragMovedEvent, type FlowDragStartedEvent, type FlowEdge, type FlowEdgeAttributes, type FlowEdgeLabel, type FlowEdgePatch, type FlowEdgeStyle, type FlowEdgeUpdater, type FlowEdgesApi, type FlowEngine, type FlowEngineOptions, type FlowEntitiesDeletedEvent, type FlowEntityChangeNotifier, type FlowEntityChangeNotifierOptions, type FlowEntityGestureEvent, type FlowEntityRef, type FlowEntityUpdate, type FlowErrorEvent, type FlowEventObject, type FlowGestureModifiers, type FlowGraph, type FlowGraphChangedEvent, type FlowGraphHistoryPolicy, type FlowGraphRetentionPolicy, FlowGraphValidationError, type FlowHighlightEntry, type FlowHighlights, type FlowHighlightsApi, type FlowHistoryApi, type FlowInputEffects, type FlowInputEvent, type FlowInputMode, type FlowInputModeContext, type FlowInputModifiers, type FlowInputProfile, type FlowInputReaction, type FlowInputRuntime, type FlowInputRuntimeOptions, type FlowInputSessionHandlers, type FlowInputTarget, type FlowKeyBinding, type FlowKeyInputEvent, type FlowKeymap, type FlowLayoutApi, type FlowModeDefinition, type FlowNode, type FlowNodeAttributes, type FlowNodePatch, type FlowNodeUpdater, type FlowNodesApi, type FlowOrigin, type FlowPaneGestureEvent, type FlowPatch, type FlowPinchInputEvent, type FlowPointerInputEvent, type FlowPolicies, type FlowPort, type FlowProfile, type FlowProjectionListener, type FlowProjectionsApi, type FlowReplaceGraphOptions, type FlowResizeEndedEvent, type FlowResizeStartedEvent, type FlowResolvers, type FlowResult, type FlowRules, type FlowRuntimeSettings, type FlowSelectionAlignment, type FlowSelectionApi, type FlowSelectionChangedEvent, type FlowSelectionDistribution, type FlowSelectionDuplicateResult, type FlowSerialized, type FlowSessionResult, type FlowSettings, type FlowStore, type FlowStoreContext, type FlowStoreOptions, type FlowTransactionDraft, type FlowTransactionOptions, type FlowTransition, type FlowTransitions, type FlowTriggerCommand, type FlowTriggerName, type FlowUpdateEdgeEvent, type FlowUpdateNodeEvent, type FlowValidationIssue, type FlowViewApi, type FlowViewBoundaryEndpoints, type FlowViewChangedEvent, type FlowViewEndpoint, type FlowViewEntities, type FlowViewScope, type FlowViewSelectionPolicy, type FlowViewportApi, type FlowViewportChangedEvent, type FlowWheelInputEvent, type Graph, type GraphDecoration, type GraphEdge, type GraphEdgeAttrs, type GraphNode, type GraphNodeAttrs, type GraphPort, type GraphProjection, type GraphProjectionMapper, type GroupContentSide, type GroupGeometry, type GroupInsets, type GroupLayout, type InteractionMode, type LabelAnchor, type LayoutAlgorithm, type LayoutAnimationControls, type LayoutAnimationOptions, type LayoutApplyOptions, type LayoutDiagnostic, type LayoutEdgeRoute, type LayoutPositions, type LayoutRequestedEvent, type LayoutResult, type LayoutRunOptions, type LayoutRunResult, type MarkerType, type MinimapProjection, type MinimapProjectionOptions, type PathData, type Point, type PortDirection, type ProposedConnection, type ReconnectModeOptions, type Rect, type RenderableEntitiesOptions, type ReparentDecision, type ReparentDropContext, type ReparentOptions, type ResizeConstraints, type ResizeHandle, type ResolvedFitViewExclusion, type SelectionMode, type ShapeHandler, type Side, type Size, type SnapLine, type SnapOptions, type SnapResult, type SpacingGuide, type StandardSchemaV1Like, type StepRouterOptions, type StyleOverrides, type ToolbarPlacement, type ToolbarPlacementInput, type Viewport, type ViewportAnimationCancelFrame, type ViewportAnimationControls, type ViewportAnimationFrame, type ViewportAnimationOptions, type VisualEdge, type VisualGraph, type VisualNode, type VisualPort, type WheelInteraction, type WheelInteractionOptions, animateViewport, applyFlowPatches, areNodesMeasured, avoidRouter, bestDirection, bezierRouter, boxSelectMode, boxToRect, calcAutoPan, canvasToScreen, clampZoom, cloneJsonSafe, composeGraphProjectionAttrs, configureAvoidRouter, configureBezierRouter, configureStepRouter, connectMode, constrainViewport, createConnectionPreviewGraph, createEdge, createEntityChangeNotifier, createFlow, createFlowChangeSet, createFlowEngine, createFlowInputRuntime, createFlowStore, createGraph, createNode, createPort, createViewport, defaultConfig, defaultFlowProfile, defaultInputModes, defaultInputModesForKeymap, defaultKeymap, defaultModesForContext, defineFlowProfile, deriveFlowView, deriveGroupGeometry, entityPressMode, extractFlowContent, fitFrameAroundExclusions, fixedGroupGeometry, fromJSON, getAnchorTransform, getAutoPanDelta, getConnectedEdges, getEdgeOwner, getGraphBounds, getIncomers, getMinimapProjection, getNeighbors, getOutgoers, getProjectedEdgeAttrs, getProjectedNodeAttrs, getSelectionBounds, getShape, getShapeOrDefault, getSnapLines, getToolbarPlacement, getVisibleBounds, hoverMode, indexChildren, indexEdgeAdjacency, indexEdges, indexNodes, insertFlowContent, isDerivedGroup, isGroup, isTrackpadPinch, keyboardMode, keyboardNavMode, markerToSVG, matchesKeyBinding, mergeGraphEdgeAttrs, mergeGraphNodeAttrs, nodeDepths, normalizeWheelPan, panBy, panMode, panePressMode, parseFlowSerialized, pathToSVG, pinchMode, portPressMode, preventDefault, profileModesForContext, profilePoliciesForContext, readonlyConfig, readonlyInputModes, readonlyInputModesForKeymap, reconnectMode, rectContains, rectsIntersect, registerShape, resolveBehavior, resolveGroupPadding, resolveKeymap, resolvedBounds, resolvedEdgeLabelBounds, resolvedEdgeLabelSize, resolvedPosition, resolvedSelectionBounds, screenToCanvas, selectMode, serializeFlowGraph, snapPointToGrid, snapToGrid, snappedBounds, sortActiveGraphProjections, stepRouter, straightRouter, toSVGTransform, toViewBox, trigger, unionRect, validateAndCloneGraph, validateFitFrame, validateViewport, viewportCenteredOn, viewportForBounds, visualBounds, visualPosition, wheelInteraction, wheelMode, wheelZoomDelta, zoomTo };