@statelyai/flow 0.10.0 → 0.12.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 +111 -24
- package/dist/esm/index.d.ts +70 -1
- package/dist/esm/index.js +378 -96
- package/dist/esm/layout/elk.js +3 -0
- package/dist/esm/layout/index.d.ts +2 -1
- package/dist/esm/layout/index.js +2 -1
- package/dist/esm/layout/stately.d.ts +8 -0
- package/dist/esm/layout/stately.js +425 -0
- package/package.json +12 -1
package/README.md
CHANGED
|
@@ -83,31 +83,61 @@ const selectedBounds = flow.getSelectionBounds();
|
|
|
83
83
|
Install only the engine you use:
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
npm install @statelyai/flow
|
|
86
|
+
npm install @statelyai/flow @statelyai/layout
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
`@statelyai/layout` is the first-class engine: both packages operate on
|
|
90
|
+
`@statelyai/graph`, so the adapter preserves graph-native nodes, ports, labels,
|
|
91
|
+
and complete edge routes. Layout engines are optional peer dependencies; use
|
|
92
|
+
`elkjs` or `@dagrejs/dagre` only for their compatibility adapters.
|
|
91
93
|
|
|
92
94
|
```ts
|
|
93
95
|
import { createFlow } from '@statelyai/flow';
|
|
94
|
-
import {
|
|
96
|
+
import { statelyLayout } from '@statelyai/flow/layout';
|
|
95
97
|
|
|
96
|
-
const flow = createFlow({
|
|
98
|
+
const flow = createFlow({
|
|
99
|
+
graph,
|
|
100
|
+
layout: statelyLayout({
|
|
101
|
+
direction: 'right',
|
|
102
|
+
spacing: { node: 80, layer: 120 },
|
|
103
|
+
}),
|
|
104
|
+
});
|
|
97
105
|
|
|
98
|
-
await flow.layout.run(
|
|
99
|
-
elkLayout({
|
|
100
|
-
nodeSpacing: 80,
|
|
101
|
-
rankSpacing: 120,
|
|
102
|
-
})
|
|
103
|
-
);
|
|
106
|
+
await flow.layout.run();
|
|
104
107
|
```
|
|
105
108
|
|
|
106
|
-
<!-- adapter contracts from src/layout/elk.ts src/layout/dagre.ts and src/layout/shared.ts -->
|
|
109
|
+
<!-- adapter contracts from src/layout/stately.ts src/layout/elk.ts src/layout/dagre.ts and src/layout/shared.ts -->
|
|
110
|
+
|
|
111
|
+
`statelyLayout()` uses `@statelyai/layout`'s native layered algorithm. It
|
|
112
|
+
supports flat and compound graphs, ports, labels, cycles, four directions,
|
|
113
|
+
constraints, advanced layered settings, and replaceable layout phases. Flow
|
|
114
|
+
resolves measured node bounds before the run, converts parent-relative compound
|
|
115
|
+
geometry back to its absolute coordinate model, and applies complete routed
|
|
116
|
+
`points` as authoritative graph geometry. Factory and run scopes induce a
|
|
117
|
+
smaller graph before layout; fixed and pinned entities stay in the input but are
|
|
118
|
+
omitted from returned geometry.
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
await flow.layout.run(statelyLayout({ scope: { ids: candidateIds } }), {
|
|
122
|
+
scope: { parentId: 'group', depth: 1 },
|
|
123
|
+
fixedEntityIds: new Set(['pinned-node']),
|
|
124
|
+
source: 'editor',
|
|
125
|
+
});
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The ELK adapter remains available for migration and comparison:
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
import { elkLayout } from '@statelyai/flow/layout/elk';
|
|
132
|
+
|
|
133
|
+
await flow.layout.run(elkLayout({ nodeSpacing: 80, rankSpacing: 120 }));
|
|
134
|
+
```
|
|
107
135
|
|
|
108
136
|
`elkLayout()` supports compound nodes, ports, edge labels, graph direction,
|
|
109
137
|
per-group child direction, measured bounds via `getBounds`, and scoped
|
|
110
|
-
incremental layout with `scope: { ids }`.
|
|
138
|
+
incremental layout with `scope: { ids }`. If an explicit group direction needs a
|
|
139
|
+
local repair pass, it retains `elk.layered.cycleBreaking.strategy`: direct `node`
|
|
140
|
+
options take precedence over `node.layoutOptions`, then `graph` options.
|
|
111
141
|
Results include computed node sizes and bounds, label bounds, routed interior
|
|
112
142
|
waypoints, source metadata, and diagnostics. Hierarchical ELK runs repair
|
|
113
143
|
invalid nested label positions by choosing the nearest node-free position, keep
|
|
@@ -123,14 +153,6 @@ child ranks without changing the root direction. Scoped passes send only
|
|
|
123
153
|
the induced graph to ELK; fixed and pinned entities remain in the input but are
|
|
124
154
|
omitted from returned geometry.
|
|
125
155
|
|
|
126
|
-
```ts
|
|
127
|
-
await flow.layout.run(elkLayout({ scope: { ids: candidateIds } }), {
|
|
128
|
-
scope: { parentId: 'group', depth: 1 },
|
|
129
|
-
fixedEntityIds: new Set(['pinned-node']),
|
|
130
|
-
source: 'editor',
|
|
131
|
-
});
|
|
132
|
-
```
|
|
133
|
-
|
|
134
156
|
`dagreLayout()` flattens hierarchy and rejects scoped layout. It returns node
|
|
135
157
|
sizes, node bounds, and edge-label bounds without fabricating unsupported route
|
|
136
158
|
waypoints.
|
|
@@ -147,8 +169,8 @@ The canonical data model is `VisualGraph` from `@statelyai/graph`. Flow extends
|
|
|
147
169
|
|
|
148
170
|
<!-- flow entity types from src/types.ts -->
|
|
149
171
|
|
|
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
|
|
172
|
+
- **`FlowNode`** — `VisualNode` + `{ kind, appearance, 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`.
|
|
173
|
+
- **`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 results may provide either interior router waypoints or a complete authoritative route. `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`.
|
|
152
174
|
- **`FlowGraph`** — `VisualGraph` with `FlowNode[]` and `FlowEdge[]`
|
|
153
175
|
- **`FlowEntityRef`** — descriptor for a node, edge, port, or block resolved by id. `FlowAddressable` is a deprecated alias.
|
|
154
176
|
|
|
@@ -166,6 +188,71 @@ culling, and toolbar anchors; surviving measurements remain stable across
|
|
|
166
188
|
positions, so stale DOM measurements cannot move bounds or toolbar anchors back
|
|
167
189
|
to a pre-drag location.
|
|
168
190
|
|
|
191
|
+
## Entity appearances
|
|
192
|
+
|
|
193
|
+
<!-- appearance references and resolution policy from src/appearances.ts, src/types.ts, src/engine.ts -->
|
|
194
|
+
|
|
195
|
+
`kind` describes domain meaning; `type` remains `node`/`edge`. Use `appearance`
|
|
196
|
+
for reusable presentation, and projections for temporary selection, execution,
|
|
197
|
+
or search styling. Nodes and edge labels accept authored references:
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
node.appearance = { name: 'asset', options: { contentPosition: 'above' } };
|
|
201
|
+
edge.label.appearance = { name: 'asset', options: { contentPosition: 'below' } };
|
|
202
|
+
|
|
203
|
+
const flow = createFlow({
|
|
204
|
+
graph,
|
|
205
|
+
engine: {
|
|
206
|
+
appearances: {
|
|
207
|
+
defaults: { node: { name: 'asset', options: { contentPosition: 'above' } } },
|
|
208
|
+
definitions: {
|
|
209
|
+
asset: ({ options }) => ({
|
|
210
|
+
renderer: 'asset', // defaults to the registered name
|
|
211
|
+
sizing: 'content', // 'fixed' uses authored dimensions
|
|
212
|
+
connection: {
|
|
213
|
+
bounds: { selector: '[data-asset-body]' },
|
|
214
|
+
sides: (options.sides as Direction[] | undefined) ?? (options.contentPosition === 'below'
|
|
215
|
+
? ['left', 'right', 'top'] : ['left', 'right', 'bottom']),
|
|
216
|
+
},
|
|
217
|
+
}),
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Definitions are static policies or pure functions of `{ entity, options }`.
|
|
225
|
+
Defaults support `node` and `edgeLabel`; an entity reference replaces its host
|
|
226
|
+
default. Explicit `autoSize` and resize overrides retain precedence. Functions,
|
|
227
|
+
renderer registrations, defaults, and measurements stay outside serialized
|
|
228
|
+
graph data. Unknown names retain their saved references and fall back to legacy
|
|
229
|
+
sizing, renderers, and unrestricted connections.
|
|
230
|
+
|
|
231
|
+
`connection.bounds` accepts a node-local/label-local rectangle or `{ selector }`
|
|
232
|
+
for a DOM-measured border. Selectors are scoped to each entity wrapper and must
|
|
233
|
+
match exactly one descendant; missing, ambiguous, or invalid selectors fall back
|
|
234
|
+
to visual bounds. DOM adapters follow resizing, image loads, subtree changes (including caption
|
|
235
|
+
text edits), and layout-changing wrapper styles. Drag translations do not trigger
|
|
236
|
+
border remeasurement.
|
|
237
|
+
`connection.sides` limits attachment sides; `connection.ports` limits port names.
|
|
238
|
+
The nested fields take precedence over legacy `connectionBounds`, `sides`, and
|
|
239
|
+
`ports`. Without a selector, renderers can still use `data-flow-connection-bounds`.
|
|
240
|
+
Full visual bounds still own selection, culling, groups, and fit geometry;
|
|
241
|
+
connections use the separate border. `sides` limits body attachments and authored
|
|
242
|
+
ports; `ports` optionally limits permitted port names. Core applies this policy
|
|
243
|
+
to routing, previews, candidate selection, validation, and reconnection. Existing
|
|
244
|
+
edges referencing newly forbidden ports retain their saved identities and route
|
|
245
|
+
from a permitted body side. Empty `sides` disables new connections; saved edges
|
|
246
|
+
retain a fallback route. Edge labels apply bounds/sides to their existing
|
|
247
|
+
source→label→target route; they do not become independent connection targets.
|
|
248
|
+
|
|
249
|
+
Change host policies through `flow.configure({ engine: { appearances } })`.
|
|
250
|
+
Appearance switches and new DOM measurements invalidate affected routes, including
|
|
251
|
+
precomputed routes. Connection-constrained appearances route through the resolved policy even when
|
|
252
|
+
saved precomputed points exist; unconstrained appearances retain authoritative
|
|
253
|
+
route semantics. Custom routers receive resolved
|
|
254
|
+
bounds, directions, and endpoint points and must honor them.
|
|
255
|
+
|
|
169
256
|
## Graph projections
|
|
170
257
|
|
|
171
258
|
<!-- graph projection types from src/projections.ts -->
|
|
@@ -626,7 +713,7 @@ await animation.done;
|
|
|
626
713
|
|
|
627
714
|
<!-- edge routers from src/routing/index.ts -->
|
|
628
715
|
|
|
629
|
-
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
|
|
716
|
+
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 results may atomically replace them with either interior router waypoints or complete `points` plus `routing`. 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'`.
|
|
630
717
|
|
|
631
718
|
Router obstacles exclude the source, target, and their ancestor groups, so an
|
|
632
719
|
edge crossing a hierarchy boundary can pass through its endpoint container.
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,57 @@
|
|
|
1
1
|
import { ExtractEvents } from "@xstate/store";
|
|
2
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
|
+
//#region src/appearances.d.ts
|
|
4
|
+
/** Authored, serializable reference to a reusable presentation. */
|
|
5
|
+
type FlowAppearance = {
|
|
6
|
+
name: string;
|
|
7
|
+
options?: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
type FlowAppearanceConnection = {
|
|
10
|
+
/** Local rectangle, or a single descendant selected within the rendered entity. */
|
|
11
|
+
bounds?: Rect | {
|
|
12
|
+
selector: string;
|
|
13
|
+
};
|
|
14
|
+
sides?: readonly Direction[];
|
|
15
|
+
ports?: readonly string[];
|
|
16
|
+
};
|
|
17
|
+
type FlowAppearancePolicy = {
|
|
18
|
+
connection?: FlowAppearanceConnection;
|
|
19
|
+
/** Renderer registry key; defaults to the appearance name. */
|
|
20
|
+
renderer?: string;
|
|
21
|
+
sizing?: "content" | "fixed";
|
|
22
|
+
/** Node-local / label-local connection rectangle, independent of visual bounds. */
|
|
23
|
+
connectionBounds?: Rect;
|
|
24
|
+
/** Restricts body attachment and ports, including gestures and routing. */
|
|
25
|
+
sides?: readonly Direction[];
|
|
26
|
+
/** Optional permitted authored port names. Port identities are never replaced. */
|
|
27
|
+
ports?: readonly string[];
|
|
28
|
+
};
|
|
29
|
+
type FlowAppearanceDefinition = FlowAppearancePolicy | ((args: {
|
|
30
|
+
entity: FlowNode | FlowEdgeLabel;
|
|
31
|
+
options: Readonly<Record<string, unknown>>;
|
|
32
|
+
}) => FlowAppearancePolicy);
|
|
33
|
+
type FlowAppearances = {
|
|
34
|
+
definitions?: Readonly<Record<string, FlowAppearanceDefinition>>;
|
|
35
|
+
defaults?: {
|
|
36
|
+
node?: FlowAppearance;
|
|
37
|
+
edgeLabel?: FlowAppearance;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
type ResolvedFlowAppearance = FlowAppearancePolicy & {
|
|
41
|
+
reference: FlowAppearance | undefined;
|
|
42
|
+
registered: boolean;
|
|
43
|
+
autoSize: boolean;
|
|
44
|
+
connectionSelector?: string;
|
|
45
|
+
sides: readonly Direction[];
|
|
46
|
+
};
|
|
47
|
+
declare const appearanceSides: readonly Direction[];
|
|
48
|
+
declare function resolveAppearance(entity: FlowNode | FlowEdgeLabel, appearances?: FlowAppearances): ResolvedFlowAppearance;
|
|
49
|
+
/** Keyed by authored reference, so stale local measurements cannot follow appearance switches. */
|
|
50
|
+
declare function appearanceMeasurementId(id: string, appearance: ResolvedFlowAppearance): string;
|
|
51
|
+
declare function appearanceAllowsPort(node: FlowNode, portName: string, appearance: ResolvedFlowAppearance): boolean;
|
|
52
|
+
/** Preserve the usual facing side; otherwise choose the closest permitted side anchor. */
|
|
53
|
+
declare function appearanceDirection(bounds: Rect, other: Rect, preferred: Direction, sides: readonly Direction[]): Direction;
|
|
54
|
+
//#endregion
|
|
3
55
|
//#region src/hierarchy.d.ts
|
|
4
56
|
type GroupContentSide = 'top' | 'left' | 'bottom' | 'right';
|
|
5
57
|
type GroupInsets = {
|
|
@@ -119,6 +171,7 @@ type FlowPort<TPortData = unknown> = VisualPort$1<TPortData> & {
|
|
|
119
171
|
* Visual position = { x + dx, y + dy }
|
|
120
172
|
*/
|
|
121
173
|
type FlowNodeAttributes = {
|
|
174
|
+
appearance?: FlowAppearance;
|
|
122
175
|
/** Application-defined node/rendering kind. `type` remains the structural `node` discriminant. */
|
|
123
176
|
kind?: string;
|
|
124
177
|
dx?: number;
|
|
@@ -153,6 +206,9 @@ type FlowNodeAttributes = {
|
|
|
153
206
|
height: number;
|
|
154
207
|
/** Derived position correction excluded from serialization. */
|
|
155
208
|
anchorOffset?: Point;
|
|
209
|
+
/** Derived sizing state; excluded from serialization. */
|
|
210
|
+
appearanceAutoSize?: boolean;
|
|
211
|
+
appearanceKey?: string;
|
|
156
212
|
};
|
|
157
213
|
/**
|
|
158
214
|
* Marks this node as a group and configures how its bounds relate to its
|
|
@@ -188,6 +244,7 @@ type FlowNodeAttributes = {
|
|
|
188
244
|
};
|
|
189
245
|
/** Flow edge label — positioned like a node, lives on edge */
|
|
190
246
|
type FlowEdgeLabel<TData = unknown> = {
|
|
247
|
+
appearance?: FlowAppearance;
|
|
191
248
|
x: number;
|
|
192
249
|
y: number;
|
|
193
250
|
dx?: number;
|
|
@@ -682,6 +739,7 @@ type ConnectionValidationResult = boolean | {
|
|
|
682
739
|
reason?: string;
|
|
683
740
|
};
|
|
684
741
|
type FlowEngineOptions = {
|
|
742
|
+
appearances?: FlowAppearances;
|
|
685
743
|
/** Default edge router (default: bezierRouter) */
|
|
686
744
|
edgeRouter?: EdgeRouter;
|
|
687
745
|
/**
|
|
@@ -1421,6 +1479,9 @@ declare function createFlowEngine(store: FlowStore, initialOptions?: FlowEngineO
|
|
|
1421
1479
|
} & Record<never, never>>;
|
|
1422
1480
|
getContext: () => FlowStoreContext;
|
|
1423
1481
|
setOptions: (partial: Partial<FlowEngineOptions>, replace?: boolean) => void;
|
|
1482
|
+
resolveAppearance: (entity: FlowNode | FlowEdgeLabel) => ResolvedFlowAppearance;
|
|
1483
|
+
isPortAllowed: (nodeOrId: FlowNode | string, portName: string) => boolean;
|
|
1484
|
+
getConnectionBounds: (id: string) => Rect | null;
|
|
1424
1485
|
getNode: (id: string) => FlowNode | undefined;
|
|
1425
1486
|
getEdge: (id: string) => FlowEdge | undefined;
|
|
1426
1487
|
getEntity: (id: string) => FlowNode | FlowEdge | undefined;
|
|
@@ -2014,6 +2075,8 @@ declare const defaultFlowProfile: {
|
|
|
2014
2075
|
*/
|
|
2015
2076
|
type BoxSelectionTest = (box: Rect, bounds: Rect) => boolean;
|
|
2016
2077
|
type FlowStoreContext = {
|
|
2078
|
+
/** Host presentation policies; never serialized with authored graph data. */
|
|
2079
|
+
appearances?: FlowAppearances;
|
|
2017
2080
|
graph: FlowGraph;
|
|
2018
2081
|
parentNodeId: string | null;
|
|
2019
2082
|
depth: number | null;
|
|
@@ -2127,6 +2190,7 @@ type FlowHighlightEntry = {
|
|
|
2127
2190
|
* construct-only or have dedicated runtime events.
|
|
2128
2191
|
*/
|
|
2129
2192
|
type FlowStoreOptions = {
|
|
2193
|
+
appearances?: FlowAppearances;
|
|
2130
2194
|
minZoom?: number;
|
|
2131
2195
|
maxZoom?: number;
|
|
2132
2196
|
translateExtent?: [Point, Point] | null;
|
|
@@ -2825,9 +2889,14 @@ type LayoutDiagnostic = {
|
|
|
2825
2889
|
severity?: 'info' | 'warning' | 'error';
|
|
2826
2890
|
code?: string;
|
|
2827
2891
|
entityId?: string;
|
|
2892
|
+
entityIds?: readonly string[];
|
|
2893
|
+
phase?: string;
|
|
2828
2894
|
};
|
|
2829
2895
|
type LayoutEdgeRoute = {
|
|
2830
2896
|
waypoints: readonly Point[];
|
|
2897
|
+
} | {
|
|
2898
|
+
points: readonly Point[];
|
|
2899
|
+
routing?: EdgeRouting;
|
|
2831
2900
|
};
|
|
2832
2901
|
type LayoutResult = {
|
|
2833
2902
|
positions: ReadonlyMap<string, Point>;
|
|
@@ -3500,4 +3569,4 @@ declare const readonlyConfig: Partial<FlowConfig>;
|
|
|
3500
3569
|
*/
|
|
3501
3570
|
declare function resolveBehavior<TEntity, TState>(predicate: ((entity: TEntity, state: TState) => boolean) | false | undefined, entity: TEntity, state: TState, defaultValue?: boolean): boolean;
|
|
3502
3571
|
//#endregion
|
|
3503
|
-
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 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, 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, 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, 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 };
|
|
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 };
|