@statelyai/flow 0.12.1 → 0.13.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 +135 -3
- package/dist/esm/index.d.ts +244 -118
- package/dist/esm/index.js +755 -156
- package/package.json +1 -1
package/dist/esm/index.d.ts
CHANGED
|
@@ -52,6 +52,9 @@ declare function appearanceAllowsPort(node: FlowNode, portName: string, appearan
|
|
|
52
52
|
/** Preserve the usual facing side; otherwise choose the closest permitted side anchor. */
|
|
53
53
|
declare function appearanceDirection(bounds: Rect, other: Rect, preferred: Direction, sides: readonly Direction[]): Direction;
|
|
54
54
|
//#endregion
|
|
55
|
+
//#region src/connection-lifetime.d.ts
|
|
56
|
+
declare const connectionLifetime: unique symbol;
|
|
57
|
+
//#endregion
|
|
55
58
|
//#region src/hierarchy.d.ts
|
|
56
59
|
type GroupContentSide = 'top' | 'left' | 'bottom' | 'right';
|
|
57
60
|
type GroupInsets = {
|
|
@@ -164,6 +167,7 @@ type Viewport = {
|
|
|
164
167
|
type Side = 'top' | 'bottom' | 'left' | 'right';
|
|
165
168
|
/** Port on a node — positioned by renderer, measured via observer */
|
|
166
169
|
type FlowPort<TPortData = unknown> = VisualPort$1<TPortData> & {
|
|
170
|
+
id?: string;
|
|
167
171
|
side: Side;
|
|
168
172
|
};
|
|
169
173
|
/**
|
|
@@ -332,7 +336,7 @@ type FlowEntityRef = {
|
|
|
332
336
|
/** @deprecated Use `FlowEntityRef`. */
|
|
333
337
|
type FlowAddressable = FlowEntityRef;
|
|
334
338
|
/** A flow node: VisualNode + flow attributes */
|
|
335
|
-
type FlowNode<TData = any> = VisualNode$1<TData> & FlowNodeAttributes;
|
|
339
|
+
type FlowNode<TData = any> = Omit<VisualNode$1<TData>, 'ports'> & FlowNodeAttributes;
|
|
336
340
|
/**
|
|
337
341
|
* A flow edge: VisualEdge + flow attributes.
|
|
338
342
|
*
|
|
@@ -359,6 +363,7 @@ type InteractionMode = 'default' | 'pan' | 'connect' | 'select';
|
|
|
359
363
|
type SelectionMode = 'partial' | 'full';
|
|
360
364
|
type CanvasState = 'idle' | 'panning' | 'dragging' | 'connecting' | 'resizing' | 'selecting';
|
|
361
365
|
type ConnectionState = {
|
|
366
|
+
[connectionLifetime]?: object;
|
|
362
367
|
sourceId: string;
|
|
363
368
|
sourcePort: string | null;
|
|
364
369
|
/** null while dragging over empty space */
|
|
@@ -867,6 +872,7 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
|
|
|
867
872
|
replaceGraph: {
|
|
868
873
|
graph: FlowGraph;
|
|
869
874
|
graphChanged?: boolean;
|
|
875
|
+
resetMeasurementIds?: readonly string[];
|
|
870
876
|
layoutAnimationOffsets?: Map<string, Point>;
|
|
871
877
|
} & ({
|
|
872
878
|
transactionId?: string;
|
|
@@ -1118,10 +1124,13 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
|
|
|
1118
1124
|
measurements: Array<{
|
|
1119
1125
|
id: string;
|
|
1120
1126
|
rect: Rect;
|
|
1127
|
+
origin?: Point;
|
|
1121
1128
|
}>;
|
|
1129
|
+
derivedOnly?: boolean;
|
|
1122
1130
|
};
|
|
1123
1131
|
removeMeasurements: {
|
|
1124
1132
|
ids: string[];
|
|
1133
|
+
derivedOnly?: boolean;
|
|
1125
1134
|
};
|
|
1126
1135
|
bakeLabelPositions: {
|
|
1127
1136
|
positions: Map<string, Point>;
|
|
@@ -1210,6 +1219,7 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
|
|
|
1210
1219
|
replaceGraph: {
|
|
1211
1220
|
graph: FlowGraph;
|
|
1212
1221
|
graphChanged?: boolean;
|
|
1222
|
+
resetMeasurementIds?: readonly string[];
|
|
1213
1223
|
layoutAnimationOffsets?: Map<string, Point>;
|
|
1214
1224
|
} & ({
|
|
1215
1225
|
transactionId?: string;
|
|
@@ -1461,10 +1471,13 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
|
|
|
1461
1471
|
measurements: Array<{
|
|
1462
1472
|
id: string;
|
|
1463
1473
|
rect: Rect;
|
|
1474
|
+
origin?: Point;
|
|
1464
1475
|
}>;
|
|
1476
|
+
derivedOnly?: boolean;
|
|
1465
1477
|
};
|
|
1466
1478
|
removeMeasurements: {
|
|
1467
1479
|
ids: string[];
|
|
1480
|
+
derivedOnly?: boolean;
|
|
1468
1481
|
};
|
|
1469
1482
|
bakeLabelPositions: {
|
|
1470
1483
|
positions: Map<string, Point>;
|
|
@@ -1555,7 +1568,7 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
|
|
|
1555
1568
|
target: Point;
|
|
1556
1569
|
} | null;
|
|
1557
1570
|
validateConnection: (proposed: ProposedConnection) => boolean;
|
|
1558
|
-
validateConnectionDetailed: (proposed: ProposedConnection) => {
|
|
1571
|
+
validateConnectionDetailed: (proposed: ProposedConnection, context?: FlowStoreContext) => {
|
|
1559
1572
|
valid: boolean;
|
|
1560
1573
|
reason?: string;
|
|
1561
1574
|
};
|
|
@@ -1650,12 +1663,18 @@ declare function keyboardMode(options?: {
|
|
|
1650
1663
|
/** @deprecated Use `keymap.undo = null` and `keymap.redo = null`. */
|
|
1651
1664
|
allowUndo?: boolean;
|
|
1652
1665
|
keymap?: Partial<FlowKeymap>;
|
|
1666
|
+
escapeSelection?: 'all' | 'focused' | 'none';
|
|
1653
1667
|
}): FlowInputMode;
|
|
1654
1668
|
declare function keyboardNavMode(options?: {
|
|
1655
1669
|
allowMove?: boolean;
|
|
1656
1670
|
step?: number;
|
|
1657
1671
|
shiftStep?: number;
|
|
1658
1672
|
keymap?: Partial<FlowKeymap>;
|
|
1673
|
+
/** Literal KeyboardEvent.key names; null disables focused activation. */
|
|
1674
|
+
activationKeys?: readonly string[] | null;
|
|
1675
|
+
preventDefault?: boolean;
|
|
1676
|
+
selectionBehavior?: 'replace' | 'preserve';
|
|
1677
|
+
nudge?: 'selection' | 'focused-selection';
|
|
1659
1678
|
}): FlowInputMode;
|
|
1660
1679
|
declare function wheelMode(): FlowInputMode;
|
|
1661
1680
|
declare function panMode(): FlowInputMode;
|
|
@@ -1933,6 +1952,8 @@ type FlowInputRuntimeOptions = {
|
|
|
1933
1952
|
type FlowInputRuntime = {
|
|
1934
1953
|
/** Feed one normalized event; apply resulting commands to the store. */
|
|
1935
1954
|
send: (event: FlowInputEvent) => FlowInputEffects;
|
|
1955
|
+
/** Reconcile pending input after an adapter changes its mode set. */
|
|
1956
|
+
reconcileModes: () => void;
|
|
1936
1957
|
/** Cancel the active session, if any (applies its cancel commands). */
|
|
1937
1958
|
cancelSession: () => void;
|
|
1938
1959
|
/** Id of the mode owning the active session, or null. */
|
|
@@ -2112,6 +2133,8 @@ type FlowStoreContext = {
|
|
|
2112
2133
|
highlights: FlowHighlights;
|
|
2113
2134
|
focusedEntityId: string | null;
|
|
2114
2135
|
measurements: Map<string, Rect>;
|
|
2136
|
+
/** Renderer port rectangles in owner-local coordinates. */
|
|
2137
|
+
derivedPortMeasurements: Map<string, Rect>;
|
|
2115
2138
|
canvasState: CanvasState;
|
|
2116
2139
|
draggedEntityId: string | null;
|
|
2117
2140
|
/** Monotonic signal for exact per-entity drag-frame notification. */
|
|
@@ -2380,6 +2403,7 @@ type FlowEventPayloadMap = {
|
|
|
2380
2403
|
replaceGraph: {
|
|
2381
2404
|
graph: FlowGraph;
|
|
2382
2405
|
graphChanged?: boolean;
|
|
2406
|
+
resetMeasurementIds?: readonly string[];
|
|
2383
2407
|
layoutAnimationOffsets?: Map<string, Point>;
|
|
2384
2408
|
} & ReplaceGraphMetadata;
|
|
2385
2409
|
setLayoutAnimationOffsets: {
|
|
@@ -2596,10 +2620,13 @@ type FlowEventPayloadMap = {
|
|
|
2596
2620
|
measurements: Array<{
|
|
2597
2621
|
id: string;
|
|
2598
2622
|
rect: Rect;
|
|
2623
|
+
origin?: Point;
|
|
2599
2624
|
}>;
|
|
2625
|
+
derivedOnly?: boolean;
|
|
2600
2626
|
};
|
|
2601
2627
|
removeMeasurements: {
|
|
2602
2628
|
ids: string[];
|
|
2629
|
+
derivedOnly?: boolean;
|
|
2603
2630
|
};
|
|
2604
2631
|
bakeLabelPositions: {
|
|
2605
2632
|
positions: Map<string, Point>;
|
|
@@ -2637,91 +2664,6 @@ declare function createFlowStore(initialGraph?: FlowGraph, options?: FlowStoreOp
|
|
|
2637
2664
|
type FlowStore = ReturnType<typeof createFlowStore>;
|
|
2638
2665
|
declare function areNodesMeasured(context: FlowStoreContext): boolean;
|
|
2639
2666
|
//#endregion
|
|
2640
|
-
//#region src/factories.d.ts
|
|
2641
|
-
declare function createNode<TData = any>(opts: Partial<FlowNode<TData>> & {
|
|
2642
|
-
id: string;
|
|
2643
|
-
}): FlowNode<TData>;
|
|
2644
|
-
declare function createEdge<TEdgeData = any, TLabelData = any>(opts: Omit<Partial<FlowEdge<TEdgeData, TLabelData>>, 'label'> & Pick<FlowEdge<TEdgeData, TLabelData>, 'id' | 'sourceId' | 'targetId'> & {
|
|
2645
|
-
label?: Partial<FlowEdgeLabel<TLabelData>> & {
|
|
2646
|
-
width: number;
|
|
2647
|
-
height: number;
|
|
2648
|
-
};
|
|
2649
|
-
}): FlowEdge<TEdgeData, TLabelData>;
|
|
2650
|
-
declare function createGraph<TNodeData = any, TEdgeData = any>(opts: Partial<FlowGraph<TNodeData, TEdgeData>> & {
|
|
2651
|
-
nodes: FlowNode<TNodeData>[];
|
|
2652
|
-
edges: FlowEdge<TEdgeData>[];
|
|
2653
|
-
}): FlowGraph<TNodeData, TEdgeData>;
|
|
2654
|
-
declare function createPort<TData = any>(opts: Partial<FlowPort<TData>> & Pick<FlowPort<TData>, 'name' | 'side' | 'direction'>): FlowPort<TData>;
|
|
2655
|
-
//#endregion
|
|
2656
|
-
//#region src/viewport/animate.d.ts
|
|
2657
|
-
type ViewportAnimationFrame = (callback: (time: number) => void) => number;
|
|
2658
|
-
type ViewportAnimationCancelFrame = (id: number) => void;
|
|
2659
|
-
type ViewportAnimationControls = {
|
|
2660
|
-
cancel: () => void;
|
|
2661
|
-
done: Promise<void>;
|
|
2662
|
-
};
|
|
2663
|
-
type AnimateViewportOptions = ViewportAnimationOptions & {
|
|
2664
|
-
raf?: ViewportAnimationFrame;
|
|
2665
|
-
cancelRaf?: ViewportAnimationCancelFrame;
|
|
2666
|
-
};
|
|
2667
|
-
declare function animateViewport(store: FlowStore, target: Viewport, options?: AnimateViewportOptions): ViewportAnimationControls;
|
|
2668
|
-
//#endregion
|
|
2669
|
-
//#region src/viewport/index.d.ts
|
|
2670
|
-
type FitViewExclusionSide = 'top' | 'right' | 'bottom' | 'left' | 'nearest';
|
|
2671
|
-
type FitViewExclusion = {
|
|
2672
|
-
/** Read the current exclusion in viewport-local screen pixels. */
|
|
2673
|
-
getRect: () => Rect | null;
|
|
2674
|
-
/** Edge whose band this overlay occupies. Defaults to the nearest edge. */
|
|
2675
|
-
side?: FitViewExclusionSide;
|
|
2676
|
-
/** Additional screen-pixel clearance beyond the measured overlay. */
|
|
2677
|
-
gap?: number;
|
|
2678
|
-
};
|
|
2679
|
-
type ResolvedFitViewExclusion = Omit<FitViewExclusion, 'getRect'> & {
|
|
2680
|
-
rect: Rect;
|
|
2681
|
-
};
|
|
2682
|
-
/** Create a default viewport (origin, no zoom) */
|
|
2683
|
-
declare function createViewport(x?: number, y?: number, zoom?: number): Viewport;
|
|
2684
|
-
/**
|
|
2685
|
-
* Convert viewport to SVG transform string.
|
|
2686
|
-
* Use on the root <g> wrapping all entities.
|
|
2687
|
-
*
|
|
2688
|
-
* @example
|
|
2689
|
-
* <g transform={toSVGTransform(viewport)}>...</g>
|
|
2690
|
-
*/
|
|
2691
|
-
declare function toSVGTransform(viewport: Viewport): string;
|
|
2692
|
-
/**
|
|
2693
|
-
* Convert viewport + container size to an SVG viewBox string.
|
|
2694
|
-
*
|
|
2695
|
-
* @example
|
|
2696
|
-
* <svg viewBox={toViewBox(viewport, { width: 800, height: 600 })}>...</svg>
|
|
2697
|
-
*/
|
|
2698
|
-
declare function toViewBox(viewport: Viewport, size: Size): string;
|
|
2699
|
-
/** Convert a screen-space point to canvas-space */
|
|
2700
|
-
declare function screenToCanvas(point: Point, viewport: Viewport): Point;
|
|
2701
|
-
/** Convert a canvas-space point to screen-space */
|
|
2702
|
-
declare function canvasToScreen(point: Point, viewport: Viewport): Point;
|
|
2703
|
-
/** Get the canvas-space bounding rect of what's visible on screen */
|
|
2704
|
-
declare function getVisibleBounds(viewport: Viewport, size: Size): Rect;
|
|
2705
|
-
/**
|
|
2706
|
-
* Compute a viewport that fits the given bounds into the given screen size.
|
|
2707
|
-
*/
|
|
2708
|
-
declare function viewportForBounds(bounds: Rect, size: Size, options?: FitViewOptions): Viewport;
|
|
2709
|
-
/** Pan viewport by a delta */
|
|
2710
|
-
declare function panBy(viewport: Viewport, delta: Point): Viewport;
|
|
2711
|
-
/** Zoom to a specific level, keeping a screen-space point fixed */
|
|
2712
|
-
declare function zoomTo(viewport: Viewport, zoom: number, center: Point): Viewport;
|
|
2713
|
-
/** Clamp zoom to min/max bounds */
|
|
2714
|
-
declare function clampZoom(zoom: number, minZoom: number, maxZoom: number): number;
|
|
2715
|
-
/** Viewport that places the given canvas point at the center of the screen. */
|
|
2716
|
-
declare function viewportCenteredOn(center: Point, size: Size, zoom: number, frame?: Rect): Viewport;
|
|
2717
|
-
/** Validate and clone a positive finite screen-space fit frame. */
|
|
2718
|
-
declare function validateFitFrame(frame: Rect): Rect;
|
|
2719
|
-
/**
|
|
2720
|
-
* Reduce a fit frame by measured floating overlays. Each overlay reserves the
|
|
2721
|
-
* band between itself and its assigned (or nearest) frame edge.
|
|
2722
|
-
*/
|
|
2723
|
-
declare function fitFrameAroundExclusions(frame: Rect, exclusions: Iterable<ResolvedFitViewExclusion>): Rect;
|
|
2724
|
-
//#endregion
|
|
2725
2667
|
//#region src/validation.d.ts
|
|
2726
2668
|
type FlowResult<T, TError = FlowGraphValidationError> = {
|
|
2727
2669
|
ok: true;
|
|
@@ -2775,31 +2717,6 @@ declare function cloneJsonSafe<T>(value: T, path?: string): T;
|
|
|
2775
2717
|
declare function validateAndCloneGraph<TNodeData = unknown, TEdgeData = unknown, TLabelData = unknown>(input: unknown, schemas?: FlowDataSchemas<TNodeData, TEdgeData, TLabelData>): FlowGraph<TNodeData, TEdgeData, TLabelData>;
|
|
2776
2718
|
declare function validateViewport(input: unknown, path?: string): Viewport;
|
|
2777
2719
|
//#endregion
|
|
2778
|
-
//#region src/serialize.d.ts
|
|
2779
|
-
type FlowSerialized<TNodeData = any, TEdgeData = any, TLabelData = any> = {
|
|
2780
|
-
version: 1;
|
|
2781
|
-
graph: FlowGraph<TNodeData, TEdgeData, TLabelData>;
|
|
2782
|
-
viewport: Viewport;
|
|
2783
|
-
collapsedNodeIds?: string[];
|
|
2784
|
-
dataVersions?: FlowDataVersions;
|
|
2785
|
-
};
|
|
2786
|
-
/**
|
|
2787
|
-
* Parse, migrate, and validate a persisted Flow document.
|
|
2788
|
-
*
|
|
2789
|
-
* Versionless documents are treated as version 0. Data migrations must be
|
|
2790
|
-
* synchronous. The returned graph is detached from `input`; invalid documents
|
|
2791
|
-
* throw `FlowGraphValidationError` with stable issue paths.
|
|
2792
|
-
*/
|
|
2793
|
-
declare function parseFlowSerialized<TNodeData = any, TEdgeData = any, TLabelData = any>(input: unknown, schemas?: FlowDataSchemas<TNodeData, TEdgeData, TLabelData>): FlowSerialized<TNodeData, TEdgeData, TLabelData>;
|
|
2794
|
-
/**
|
|
2795
|
-
* Create a persistence-safe graph snapshot.
|
|
2796
|
-
*
|
|
2797
|
-
* Transient drag and measurement state is folded into authored coordinates or
|
|
2798
|
-
* removed. Nested geometry objects are copied so callers can mutate the result
|
|
2799
|
-
* without changing the live graph.
|
|
2800
|
-
*/
|
|
2801
|
-
declare function serializeFlowGraph<TNodeData = any, TEdgeData = any, TLabelData = any>(graph: FlowGraph<TNodeData, TEdgeData, TLabelData>): FlowGraph<TNodeData, TEdgeData, TLabelData>;
|
|
2802
|
-
//#endregion
|
|
2803
2720
|
//#region src/changeSet.d.ts
|
|
2804
2721
|
type FlowPatch<TNodeData = any, TEdgeData = any, TLabelData = any> = {
|
|
2805
2722
|
op: 'addNode';
|
|
@@ -2861,6 +2778,185 @@ declare function applyFlowPatches<TNodeData = any, TEdgeData = any, TLabelData =
|
|
|
2861
2778
|
schemas?: FlowDataSchemas<TNodeData, TEdgeData, TLabelData>;
|
|
2862
2779
|
}): FlowResult<FlowGraph<TNodeData, TEdgeData, TLabelData>>;
|
|
2863
2780
|
//#endregion
|
|
2781
|
+
//#region src/external-edit.d.ts
|
|
2782
|
+
type FlowExternalEditOperation<TNodeData = unknown, TEdgeData = unknown, TLabelData = unknown> = {
|
|
2783
|
+
kind: 'node.create';
|
|
2784
|
+
node: CreateNodeInput<TNodeData> & {
|
|
2785
|
+
id: string;
|
|
2786
|
+
};
|
|
2787
|
+
} | {
|
|
2788
|
+
kind: 'node.delete';
|
|
2789
|
+
id: string;
|
|
2790
|
+
} | {
|
|
2791
|
+
kind: 'node.move';
|
|
2792
|
+
id: string;
|
|
2793
|
+
position: Partial<Point>;
|
|
2794
|
+
options?: FlowGeometryOptions;
|
|
2795
|
+
} | {
|
|
2796
|
+
kind: 'node.resize';
|
|
2797
|
+
id: string;
|
|
2798
|
+
bounds: Partial<Rect>;
|
|
2799
|
+
options?: FlowGeometryOptions;
|
|
2800
|
+
} | {
|
|
2801
|
+
kind: 'node.contentSize';
|
|
2802
|
+
id: string;
|
|
2803
|
+
size: Partial<Size>;
|
|
2804
|
+
position?: Partial<Point>;
|
|
2805
|
+
options?: FlowGeometryOptions;
|
|
2806
|
+
} | {
|
|
2807
|
+
kind: 'node.data';
|
|
2808
|
+
id: string;
|
|
2809
|
+
update: (data: TNodeData, node: FlowNode<TNodeData>) => TNodeData;
|
|
2810
|
+
} | {
|
|
2811
|
+
kind: 'edge.create';
|
|
2812
|
+
edge: CreateEdgeInput<TEdgeData, TLabelData> & {
|
|
2813
|
+
id: string;
|
|
2814
|
+
};
|
|
2815
|
+
} | {
|
|
2816
|
+
kind: 'edge.delete';
|
|
2817
|
+
id: string;
|
|
2818
|
+
} | {
|
|
2819
|
+
kind: 'edge.reconnect';
|
|
2820
|
+
id: string;
|
|
2821
|
+
endpoints: {
|
|
2822
|
+
sourceId?: string;
|
|
2823
|
+
targetId?: string;
|
|
2824
|
+
sourcePort?: string | null;
|
|
2825
|
+
targetPort?: string | null;
|
|
2826
|
+
};
|
|
2827
|
+
} | {
|
|
2828
|
+
kind: 'edge.data';
|
|
2829
|
+
id: string;
|
|
2830
|
+
update: (data: TEdgeData, edge: FlowEdge<TEdgeData, TLabelData>) => TEdgeData;
|
|
2831
|
+
};
|
|
2832
|
+
type FlowExternalEdit<TNodeData = unknown, TEdgeData = unknown, TLabelData = unknown> = {
|
|
2833
|
+
commit: (operations: readonly FlowExternalEditOperation<TNodeData, TEdgeData, TLabelData>[], options?: FlowTransactionOptions) => FlowResult<FlowChangeSet<TNodeData, TEdgeData, TLabelData> | null>;
|
|
2834
|
+
cancel: () => void;
|
|
2835
|
+
dispose: () => void;
|
|
2836
|
+
};
|
|
2837
|
+
//#endregion
|
|
2838
|
+
//#region src/render-invalidation.d.ts
|
|
2839
|
+
type FlowRenderInvalidation = {
|
|
2840
|
+
revision: number;
|
|
2841
|
+
reason: 'context' | 'projection' | 'commit';
|
|
2842
|
+
/** Notifications conservatively invalidate every rendered entity. */
|
|
2843
|
+
all: true;
|
|
2844
|
+
};
|
|
2845
|
+
type FlowRenderApi = {
|
|
2846
|
+
subscribe: (listener: (invalidation: FlowRenderInvalidation) => void) => () => void;
|
|
2847
|
+
dispose: () => void;
|
|
2848
|
+
};
|
|
2849
|
+
//#endregion
|
|
2850
|
+
//#region src/factories.d.ts
|
|
2851
|
+
declare function createNode<TData = any>(opts: Partial<FlowNode<TData>> & {
|
|
2852
|
+
id: string;
|
|
2853
|
+
}): FlowNode<TData>;
|
|
2854
|
+
declare function createEdge<TEdgeData = any, TLabelData = any>(opts: Omit<Partial<FlowEdge<TEdgeData, TLabelData>>, 'label'> & Pick<FlowEdge<TEdgeData, TLabelData>, 'id' | 'sourceId' | 'targetId'> & {
|
|
2855
|
+
label?: Partial<FlowEdgeLabel<TLabelData>> & {
|
|
2856
|
+
width: number;
|
|
2857
|
+
height: number;
|
|
2858
|
+
};
|
|
2859
|
+
}): FlowEdge<TEdgeData, TLabelData>;
|
|
2860
|
+
declare function createGraph<TNodeData = any, TEdgeData = any>(opts: Partial<FlowGraph<TNodeData, TEdgeData>> & {
|
|
2861
|
+
nodes: FlowNode<TNodeData>[];
|
|
2862
|
+
edges: FlowEdge<TEdgeData>[];
|
|
2863
|
+
}): FlowGraph<TNodeData, TEdgeData>;
|
|
2864
|
+
declare function createPort<TData = any>(opts: Partial<FlowPort<TData>> & Pick<FlowPort<TData>, 'name' | 'side' | 'direction'>): FlowPort<TData>;
|
|
2865
|
+
//#endregion
|
|
2866
|
+
//#region src/viewport/animate.d.ts
|
|
2867
|
+
type ViewportAnimationFrame = (callback: (time: number) => void) => number;
|
|
2868
|
+
type ViewportAnimationCancelFrame = (id: number) => void;
|
|
2869
|
+
type ViewportAnimationControls = {
|
|
2870
|
+
cancel: () => void;
|
|
2871
|
+
done: Promise<void>;
|
|
2872
|
+
};
|
|
2873
|
+
type AnimateViewportOptions = ViewportAnimationOptions & {
|
|
2874
|
+
raf?: ViewportAnimationFrame;
|
|
2875
|
+
cancelRaf?: ViewportAnimationCancelFrame;
|
|
2876
|
+
};
|
|
2877
|
+
declare function animateViewport(store: FlowStore, target: Viewport, options?: AnimateViewportOptions): ViewportAnimationControls;
|
|
2878
|
+
//#endregion
|
|
2879
|
+
//#region src/viewport/index.d.ts
|
|
2880
|
+
type FitViewExclusionSide = 'top' | 'right' | 'bottom' | 'left' | 'nearest';
|
|
2881
|
+
type FitViewExclusion = {
|
|
2882
|
+
/** Read the current exclusion in viewport-local screen pixels. */
|
|
2883
|
+
getRect: () => Rect | null;
|
|
2884
|
+
/** Edge whose band this overlay occupies. Defaults to the nearest edge. */
|
|
2885
|
+
side?: FitViewExclusionSide;
|
|
2886
|
+
/** Additional screen-pixel clearance beyond the measured overlay. */
|
|
2887
|
+
gap?: number;
|
|
2888
|
+
};
|
|
2889
|
+
type ResolvedFitViewExclusion = Omit<FitViewExclusion, 'getRect'> & {
|
|
2890
|
+
rect: Rect;
|
|
2891
|
+
};
|
|
2892
|
+
/** Create a default viewport (origin, no zoom) */
|
|
2893
|
+
declare function createViewport(x?: number, y?: number, zoom?: number): Viewport;
|
|
2894
|
+
/**
|
|
2895
|
+
* Convert viewport to SVG transform string.
|
|
2896
|
+
* Use on the root <g> wrapping all entities.
|
|
2897
|
+
*
|
|
2898
|
+
* @example
|
|
2899
|
+
* <g transform={toSVGTransform(viewport)}>...</g>
|
|
2900
|
+
*/
|
|
2901
|
+
declare function toSVGTransform(viewport: Viewport): string;
|
|
2902
|
+
/**
|
|
2903
|
+
* Convert viewport + container size to an SVG viewBox string.
|
|
2904
|
+
*
|
|
2905
|
+
* @example
|
|
2906
|
+
* <svg viewBox={toViewBox(viewport, { width: 800, height: 600 })}>...</svg>
|
|
2907
|
+
*/
|
|
2908
|
+
declare function toViewBox(viewport: Viewport, size: Size): string;
|
|
2909
|
+
/** Convert a screen-space point to canvas-space */
|
|
2910
|
+
declare function screenToCanvas(point: Point, viewport: Viewport): Point;
|
|
2911
|
+
/** Convert a canvas-space point to screen-space */
|
|
2912
|
+
declare function canvasToScreen(point: Point, viewport: Viewport): Point;
|
|
2913
|
+
/** Get the canvas-space bounding rect of what's visible on screen */
|
|
2914
|
+
declare function getVisibleBounds(viewport: Viewport, size: Size): Rect;
|
|
2915
|
+
/**
|
|
2916
|
+
* Compute a viewport that fits the given bounds into the given screen size.
|
|
2917
|
+
*/
|
|
2918
|
+
declare function viewportForBounds(bounds: Rect, size: Size, options?: FitViewOptions): Viewport;
|
|
2919
|
+
/** Pan viewport by a delta */
|
|
2920
|
+
declare function panBy(viewport: Viewport, delta: Point): Viewport;
|
|
2921
|
+
/** Zoom to a specific level, keeping a screen-space point fixed */
|
|
2922
|
+
declare function zoomTo(viewport: Viewport, zoom: number, center: Point): Viewport;
|
|
2923
|
+
/** Clamp zoom to min/max bounds */
|
|
2924
|
+
declare function clampZoom(zoom: number, minZoom: number, maxZoom: number): number;
|
|
2925
|
+
/** Viewport that places the given canvas point at the center of the screen. */
|
|
2926
|
+
declare function viewportCenteredOn(center: Point, size: Size, zoom: number, frame?: Rect): Viewport;
|
|
2927
|
+
/** Validate and clone a positive finite screen-space fit frame. */
|
|
2928
|
+
declare function validateFitFrame(frame: Rect): Rect;
|
|
2929
|
+
/**
|
|
2930
|
+
* Reduce a fit frame by measured floating overlays. Each overlay reserves the
|
|
2931
|
+
* band between itself and its assigned (or nearest) frame edge.
|
|
2932
|
+
*/
|
|
2933
|
+
declare function fitFrameAroundExclusions(frame: Rect, exclusions: Iterable<ResolvedFitViewExclusion>): Rect;
|
|
2934
|
+
//#endregion
|
|
2935
|
+
//#region src/serialize.d.ts
|
|
2936
|
+
type FlowSerialized<TNodeData = any, TEdgeData = any, TLabelData = any> = {
|
|
2937
|
+
version: 1;
|
|
2938
|
+
graph: FlowGraph<TNodeData, TEdgeData, TLabelData>;
|
|
2939
|
+
viewport: Viewport;
|
|
2940
|
+
collapsedNodeIds?: string[];
|
|
2941
|
+
dataVersions?: FlowDataVersions;
|
|
2942
|
+
};
|
|
2943
|
+
/**
|
|
2944
|
+
* Parse, migrate, and validate a persisted Flow document.
|
|
2945
|
+
*
|
|
2946
|
+
* Versionless documents are treated as version 0. Data migrations must be
|
|
2947
|
+
* synchronous. The returned graph is detached from `input`; invalid documents
|
|
2948
|
+
* throw `FlowGraphValidationError` with stable issue paths.
|
|
2949
|
+
*/
|
|
2950
|
+
declare function parseFlowSerialized<TNodeData = any, TEdgeData = any, TLabelData = any>(input: unknown, schemas?: FlowDataSchemas<TNodeData, TEdgeData, TLabelData>): FlowSerialized<TNodeData, TEdgeData, TLabelData>;
|
|
2951
|
+
/**
|
|
2952
|
+
* Create a persistence-safe graph snapshot.
|
|
2953
|
+
*
|
|
2954
|
+
* Transient drag and measurement state is folded into authored coordinates or
|
|
2955
|
+
* removed. Nested geometry objects are copied so callers can mutate the result
|
|
2956
|
+
* without changing the live graph.
|
|
2957
|
+
*/
|
|
2958
|
+
declare function serializeFlowGraph<TNodeData = any, TEdgeData = any, TLabelData = any>(graph: FlowGraph<TNodeData, TEdgeData, TLabelData>): FlowGraph<TNodeData, TEdgeData, TLabelData>;
|
|
2959
|
+
//#endregion
|
|
2864
2960
|
//#region src/content.d.ts
|
|
2865
2961
|
type FlowContent<TNodeData = any, TEdgeData = any, TLabelData = any> = {
|
|
2866
2962
|
type: 'stately-flow-content';
|
|
@@ -2960,8 +3056,26 @@ type FlowProjectionListener = (projections: readonly ActiveGraphProjection[]) =>
|
|
|
2960
3056
|
type FlowTransactionOptions = {
|
|
2961
3057
|
transactionId?: string;
|
|
2962
3058
|
origin?: string;
|
|
3059
|
+
history?: 'record' | 'ignore';
|
|
3060
|
+
};
|
|
3061
|
+
type FlowMeasurement = {
|
|
3062
|
+
id: string;
|
|
3063
|
+
rect: Rect;
|
|
3064
|
+
};
|
|
3065
|
+
type FlowMeasurementsApi = {
|
|
3066
|
+
update: (batch: readonly FlowMeasurement[]) => void;
|
|
3067
|
+
remove: (ids: readonly string[]) => void;
|
|
3068
|
+
get: (id: string) => Rect | undefined;
|
|
3069
|
+
};
|
|
3070
|
+
type FlowGeometryOptions = FlowTransactionOptions & {
|
|
3071
|
+
/** Decimal places for settled positions. Defaults to whole CSS pixels; null preserves exact coordinates. Sizes stay precise. */
|
|
3072
|
+
positionPrecision?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | null;
|
|
2963
3073
|
};
|
|
2964
|
-
type
|
|
3074
|
+
type FlowContentSizeOptions = FlowGeometryOptions & {
|
|
3075
|
+
/** Settled visual origin when native content growth also shifts the box. */
|
|
3076
|
+
position?: Point;
|
|
3077
|
+
};
|
|
3078
|
+
type FlowReplaceGraphOptions = Omit<FlowTransactionOptions, 'history'> & {
|
|
2965
3079
|
/**
|
|
2966
3080
|
* `preserve` keeps state addressed to surviving entity ids and prunes stale
|
|
2967
3081
|
* references. `reset` clears selection and other session-scoped graph state.
|
|
@@ -2988,6 +3102,9 @@ type CreateEdgeInput<TEdgeData = any, TLabelData = any> = Omit<Parameters<typeof
|
|
|
2988
3102
|
id?: string;
|
|
2989
3103
|
};
|
|
2990
3104
|
type FlowNodesApi<TNodeData = any> = {
|
|
3105
|
+
move: (id: string, position: Point, options?: FlowGeometryOptions) => FlowNode<TNodeData>;
|
|
3106
|
+
resize: (id: string, bounds: Rect, options?: FlowGeometryOptions) => FlowNode<TNodeData>;
|
|
3107
|
+
setContentSize: (id: string, size: Size, options?: FlowContentSizeOptions) => FlowNode<TNodeData>;
|
|
2991
3108
|
create: (input: CreateNodeInput<TNodeData>, options?: FlowTransactionOptions) => FlowNode<TNodeData>;
|
|
2992
3109
|
delete: (id: string, options?: FlowTransactionOptions) => boolean;
|
|
2993
3110
|
update: (id: string, patchOrUpdater: FlowNodePatch | FlowNodeUpdater, options?: FlowTransactionOptions) => FlowNode<TNodeData>;
|
|
@@ -3102,7 +3219,7 @@ type FlowContentApi<TNodeData = any, TEdgeData = any, TLabelData = any> = {
|
|
|
3102
3219
|
changeSet: FlowChangeSet<TNodeData, TEdgeData, TLabelData>;
|
|
3103
3220
|
}>;
|
|
3104
3221
|
};
|
|
3105
|
-
type FlowCapabilityCommand = 'create' | 'move' | 'resize' | 'connect' | 'reconnect' | 'reparent' | 'delete' | 'cut' | 'paste' | 'undo' | 'redo' | 'copy' | 'export' | 'select' | 'pan' | 'zoom';
|
|
3222
|
+
type FlowCapabilityCommand = 'edit' | 'create' | 'move' | 'resize' | 'connect' | 'reconnect' | 'reparent' | 'delete' | 'cut' | 'paste' | 'undo' | 'redo' | 'copy' | 'export' | 'select' | 'pan' | 'zoom';
|
|
3106
3223
|
type FlowCapabilityResult = {
|
|
3107
3224
|
allowed: true;
|
|
3108
3225
|
} | {
|
|
@@ -3155,6 +3272,10 @@ type FlowCommitEvent<TNodeData = any, TEdgeData = any, TLabelData = any> = {
|
|
|
3155
3272
|
revision: number;
|
|
3156
3273
|
};
|
|
3157
3274
|
type FlowTransactionDraft<TNodeData = any, TEdgeData = any, TLabelData = any> = {
|
|
3275
|
+
getNode: (id: string) => FlowNode<TNodeData> | undefined;
|
|
3276
|
+
getEdge: (id: string) => FlowEdge<TEdgeData, TLabelData> | undefined;
|
|
3277
|
+
/** Intrinsic staged geometry, excluding derived group bounds. */
|
|
3278
|
+
getNodeBounds: (id: string) => Rect | undefined;
|
|
3158
3279
|
nodes: Omit<FlowNodesApi<TNodeData>, 'collapse' | 'expand'>;
|
|
3159
3280
|
edges: FlowEdgesApi<TEdgeData, TLabelData>;
|
|
3160
3281
|
};
|
|
@@ -3196,14 +3317,21 @@ interface CreateFlowOptions<TNodeData = any, TEdgeData = any, TLabelData = any>
|
|
|
3196
3317
|
* Call `destroy()` when the controller is no longer used.
|
|
3197
3318
|
*/
|
|
3198
3319
|
interface FlowController<TNodeData = any, TEdgeData = any, TLabelData = any> {
|
|
3320
|
+
measurements: FlowMeasurementsApi;
|
|
3199
3321
|
internals: {
|
|
3200
3322
|
store: FlowStore;
|
|
3201
3323
|
engine: FlowEngine;
|
|
3202
3324
|
};
|
|
3203
3325
|
on: FlowStore['on'] & ((type: 'commit', listener: (event: FlowCommitEvent<TNodeData, TEdgeData, TLabelData>) => void) => {
|
|
3204
3326
|
unsubscribe: () => void;
|
|
3327
|
+
}) & ((type: 'destroy', listener: (event: {
|
|
3328
|
+
type: 'destroy';
|
|
3329
|
+
}) => void) => {
|
|
3330
|
+
unsubscribe: () => void;
|
|
3205
3331
|
});
|
|
3206
3332
|
destroy: () => void;
|
|
3333
|
+
beginExternalEdit: (options?: FlowTransactionOptions) => FlowExternalEdit<TNodeData, TEdgeData, TLabelData>;
|
|
3334
|
+
subscribeRender: (listener: (event: FlowRenderInvalidation) => void) => () => void;
|
|
3207
3335
|
getContext: () => FlowStoreContext;
|
|
3208
3336
|
getSnapshot: () => FlowStoreContext;
|
|
3209
3337
|
subscribe: {
|
|
@@ -3222,10 +3350,8 @@ interface FlowController<TNodeData = any, TEdgeData = any, TLabelData = any> {
|
|
|
3222
3350
|
value: TValue;
|
|
3223
3351
|
changeSet: FlowChangeSet<TNodeData, TEdgeData, TLabelData> | null;
|
|
3224
3352
|
};
|
|
3225
|
-
applyChangeSet: (changeSet: FlowChangeSet<TNodeData, TEdgeData, TLabelData>, options?: {
|
|
3353
|
+
applyChangeSet: (changeSet: FlowChangeSet<TNodeData, TEdgeData, TLabelData>, options?: FlowTransactionOptions & {
|
|
3226
3354
|
strict?: boolean;
|
|
3227
|
-
origin?: string;
|
|
3228
|
-
transactionId?: string;
|
|
3229
3355
|
}) => FlowResult<FlowChangeSet<TNodeData, TEdgeData, TLabelData> | null>;
|
|
3230
3356
|
getNode: (id: string) => FlowNode<TNodeData> | undefined;
|
|
3231
3357
|
getEdge: (id: string) => FlowEdge<TEdgeData, TLabelData> | undefined;
|
|
@@ -3569,4 +3695,4 @@ declare const readonlyConfig: Partial<FlowConfig>;
|
|
|
3569
3695
|
*/
|
|
3570
3696
|
declare function resolveBehavior<TEntity, TState>(predicate: ((entity: TEntity, state: TState) => boolean) | false | undefined, entity: TEntity, state: TState, defaultValue?: boolean): boolean;
|
|
3571
3697
|
//#endregion
|
|
3572
|
-
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, FlowAppearance, FlowAppearanceConnection, FlowAppearanceDefinition, FlowAppearancePolicy, FlowAppearances, 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 MinimapViewportCenterOptions, 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, ResolvedFlowAppearance, 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, appearanceAllowsPort, appearanceDirection, appearanceMeasurementId, appearanceSides, 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, getMinimapViewportCenter, 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, resolveAppearance, 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 };
|
|
3698
|
+
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, FlowAppearance, FlowAppearanceConnection, FlowAppearanceDefinition, FlowAppearancePolicy, FlowAppearances, 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 FlowContentSizeOptions, 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 FlowExternalEdit, type FlowExternalEditOperation, type FlowGeometryOptions, 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 FlowMeasurement, type FlowMeasurementsApi, 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 FlowRenderApi, type FlowRenderInvalidation, 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 MinimapViewportCenterOptions, 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, ResolvedFlowAppearance, 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, appearanceAllowsPort, appearanceDirection, appearanceMeasurementId, appearanceSides, 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, getMinimapViewportCenter, 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, resolveAppearance, 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 };
|