@aloudata/ink-flow 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/A11yDescriptions/index.d.ts +8 -0
- package/dist/components/A11yDescriptions/index.d.ts.map +1 -0
- package/dist/components/BatchProvider/index.d.ts +17 -0
- package/dist/components/BatchProvider/index.d.ts.map +1 -0
- package/dist/components/BatchProvider/types.d.ts +7 -0
- package/dist/components/BatchProvider/types.d.ts.map +1 -0
- package/dist/components/BatchProvider/useQueue.d.ts +11 -0
- package/dist/components/BatchProvider/useQueue.d.ts.map +1 -0
- package/dist/components/EdgeWrapper/EdgeUpdateAnchors.d.ts +17 -0
- package/dist/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +1 -0
- package/dist/components/EdgeWrapper/index.d.ts +3 -0
- package/dist/components/EdgeWrapper/index.d.ts.map +1 -0
- package/dist/components/EdgeWrapper/utils.d.ts +11 -0
- package/dist/components/EdgeWrapper/utils.d.ts.map +1 -0
- package/dist/components/Edges/BaseEdge.d.ts +3 -0
- package/dist/components/Edges/BaseEdge.d.ts.map +1 -0
- package/dist/components/Edges/BezierEdge.d.ts +5 -0
- package/dist/components/Edges/BezierEdge.d.ts.map +1 -0
- package/dist/components/Edges/EdgeAnchor.d.ts +14 -0
- package/dist/components/Edges/EdgeAnchor.d.ts.map +1 -0
- package/dist/components/Edges/EdgeText.d.ts +8 -0
- package/dist/components/Edges/EdgeText.d.ts.map +1 -0
- package/dist/components/Edges/SimpleBezierEdge.d.ts +21 -0
- package/dist/components/Edges/SimpleBezierEdge.d.ts.map +1 -0
- package/dist/components/Edges/SmoothStepEdge.d.ts +5 -0
- package/dist/components/Edges/SmoothStepEdge.d.ts.map +1 -0
- package/dist/components/Edges/StepEdge.d.ts +5 -0
- package/dist/components/Edges/StepEdge.d.ts.map +1 -0
- package/dist/components/Edges/StraightEdge.d.ts +5 -0
- package/dist/components/Edges/StraightEdge.d.ts.map +1 -0
- package/dist/components/Edges/index.d.ts +6 -0
- package/dist/components/Edges/index.d.ts.map +1 -0
- package/dist/components/Handle/index.d.ts +11 -0
- package/dist/components/Handle/index.d.ts.map +1 -0
- package/dist/components/InkFlowProvider/index.d.ts +14 -0
- package/dist/components/InkFlowProvider/index.d.ts.map +1 -0
- package/dist/components/NodeWrapper/index.d.ts +3 -0
- package/dist/components/NodeWrapper/index.d.ts.map +1 -0
- package/dist/components/NodeWrapper/useNodeObserver.d.ts +14 -0
- package/dist/components/NodeWrapper/useNodeObserver.d.ts.map +1 -0
- package/dist/components/NodeWrapper/utils.d.ts +9 -0
- package/dist/components/NodeWrapper/utils.d.ts.map +1 -0
- package/dist/components/Nodes/DefaultNode.d.ts +3 -0
- package/dist/components/Nodes/DefaultNode.d.ts.map +1 -0
- package/dist/components/Nodes/GroupNode.d.ts +2 -0
- package/dist/components/Nodes/GroupNode.d.ts.map +1 -0
- package/dist/components/Nodes/InputNode.d.ts +3 -0
- package/dist/components/Nodes/InputNode.d.ts.map +1 -0
- package/dist/components/Nodes/OutputNode.d.ts +3 -0
- package/dist/components/Nodes/OutputNode.d.ts.map +1 -0
- package/dist/components/Nodes/utils.d.ts +13 -0
- package/dist/components/Nodes/utils.d.ts.map +1 -0
- package/dist/components/Panel/index.d.ts +11 -0
- package/dist/components/Panel/index.d.ts.map +1 -0
- package/dist/components/StoreUpdater/index.d.ts +9 -0
- package/dist/components/StoreUpdater/index.d.ts.map +1 -0
- package/dist/components/UserSelection/index.d.ts +2 -0
- package/dist/components/UserSelection/index.d.ts.map +1 -0
- package/dist/container/EdgeRenderer/MarkerDefinitions.d.ts +10 -0
- package/dist/container/EdgeRenderer/MarkerDefinitions.d.ts.map +1 -0
- package/dist/container/EdgeRenderer/MarkerSymbols.d.ts +9 -0
- package/dist/container/EdgeRenderer/MarkerSymbols.d.ts.map +1 -0
- package/dist/container/EdgeRenderer/index.d.ts +13 -0
- package/dist/container/EdgeRenderer/index.d.ts.map +1 -0
- package/dist/container/FlowRenderer/index.d.ts +14 -0
- package/dist/container/FlowRenderer/index.d.ts.map +1 -0
- package/dist/container/GraphView/index.d.ts +11 -0
- package/dist/container/GraphView/index.d.ts.map +1 -0
- package/dist/container/InkFlow/Wrapper.d.ts +13 -0
- package/dist/container/InkFlow/Wrapper.d.ts.map +1 -0
- package/dist/container/InkFlow/index.d.ts +4 -0
- package/dist/container/InkFlow/index.d.ts.map +1 -0
- package/dist/container/InkFlow/init-values.d.ts +4 -0
- package/dist/container/InkFlow/init-values.d.ts.map +1 -0
- package/dist/container/NodeRenderer/index.d.ts +10 -0
- package/dist/container/NodeRenderer/index.d.ts.map +1 -0
- package/dist/container/NodeRenderer/useResizeObserver.d.ts +2 -0
- package/dist/container/NodeRenderer/useResizeObserver.d.ts.map +1 -0
- package/dist/container/Pane/index.d.ts +12 -0
- package/dist/container/Pane/index.d.ts.map +1 -0
- package/dist/container/Viewport/index.d.ts +7 -0
- package/dist/container/Viewport/index.d.ts.map +1 -0
- package/dist/container/ZoomPane/index.d.ts +7 -0
- package/dist/container/ZoomPane/index.d.ts.map +1 -0
- package/dist/contexts/NodeIdContext.d.ts +6 -0
- package/dist/contexts/NodeIdContext.d.ts.map +1 -0
- package/dist/contexts/StoreContext.d.ts +4 -0
- package/dist/contexts/StoreContext.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useDrag.d.ts +12 -0
- package/dist/hooks/useDrag.d.ts.map +1 -0
- package/dist/hooks/useEdgesState.d.ts +4 -0
- package/dist/hooks/useEdgesState.d.ts.map +1 -0
- package/dist/hooks/useGlobalKeyHandler.d.ts +11 -0
- package/dist/hooks/useGlobalKeyHandler.d.ts.map +1 -0
- package/dist/hooks/useInkFlow.d.ts +10 -0
- package/dist/hooks/useInkFlow.d.ts.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/hooks/useKeyPress.d.ts +15 -0
- package/dist/hooks/useKeyPress.d.ts.map +1 -0
- package/dist/hooks/useMoveSelectedNodes.d.ts +12 -0
- package/dist/hooks/useMoveSelectedNodes.d.ts.map +1 -0
- package/dist/hooks/useNodesState.d.ts +4 -0
- package/dist/hooks/useNodesState.d.ts.map +1 -0
- package/dist/hooks/useResizeHandler.d.ts +8 -0
- package/dist/hooks/useResizeHandler.d.ts.map +1 -0
- package/dist/hooks/useStore.d.ts +21 -0
- package/dist/hooks/useStore.d.ts.map +1 -0
- package/dist/hooks/useViewportHelper.d.ts +10 -0
- package/dist/hooks/useViewportHelper.d.ts.map +1 -0
- package/dist/hooks/useVisibleEdgeIds.d.ts +9 -0
- package/dist/hooks/useVisibleEdgeIds.d.ts.map +1 -0
- package/dist/hooks/useVisibleNodeIds.d.ts +9 -0
- package/dist/hooks/useVisibleNodeIds.d.ts.map +1 -0
- package/dist/index.cjs.js +17 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +17 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/plugins/Controls/ControlButton.d.ts +3 -0
- package/dist/plugins/Controls/ControlButton.d.ts.map +1 -0
- package/dist/plugins/Controls/Controls.d.ts +8 -0
- package/dist/plugins/Controls/Controls.d.ts.map +1 -0
- package/dist/plugins/Controls/Icons/FitView.d.ts +2 -0
- package/dist/plugins/Controls/Icons/FitView.d.ts.map +1 -0
- package/dist/plugins/Controls/Icons/Lock.d.ts +2 -0
- package/dist/plugins/Controls/Icons/Lock.d.ts.map +1 -0
- package/dist/plugins/Controls/Icons/Minus.d.ts +2 -0
- package/dist/plugins/Controls/Icons/Minus.d.ts.map +1 -0
- package/dist/plugins/Controls/Icons/Plus.d.ts +2 -0
- package/dist/plugins/Controls/Icons/Plus.d.ts.map +1 -0
- package/dist/plugins/Controls/Icons/Unlock.d.ts +2 -0
- package/dist/plugins/Controls/Icons/Unlock.d.ts.map +1 -0
- package/dist/plugins/Controls/index.d.ts +4 -0
- package/dist/plugins/Controls/index.d.ts.map +1 -0
- package/dist/plugins/Controls/types.d.ts +35 -0
- package/dist/plugins/Controls/types.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/store/index.d.ts +12 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/initialState.d.ts +12 -0
- package/dist/store/initialState.d.ts.map +1 -0
- package/dist/styles/utils.d.ts +3 -0
- package/dist/styles/utils.d.ts.map +1 -0
- package/dist/types/edges.d.ts +114 -0
- package/dist/types/edges.d.ts.map +1 -0
- package/dist/types/general.d.ts +123 -0
- package/dist/types/general.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/instance.d.ts +149 -0
- package/dist/types/instance.d.ts.map +1 -0
- package/dist/types/nodes.d.ts +40 -0
- package/dist/types/nodes.d.ts.map +1 -0
- package/dist/types/props.d.ts +151 -0
- package/dist/types/props.d.ts.map +1 -0
- package/dist/types/store.d.ts +105 -0
- package/dist/types/store.d.ts.map +1 -0
- package/dist/types/utils/types.d.ts +8 -0
- package/dist/types/utils/types.d.ts.map +1 -0
- package/dist/utils/changes.d.ts +16 -0
- package/dist/utils/changes.d.ts.map +1 -0
- package/dist/utils/dom.d.ts +20 -0
- package/dist/utils/dom.d.ts.map +1 -0
- package/dist/utils/edges/bezier-edge.d.ts +59 -0
- package/dist/utils/edges/bezier-edge.d.ts.map +1 -0
- package/dist/utils/edges/general.d.ts +46 -0
- package/dist/utils/edges/general.d.ts.map +1 -0
- package/dist/utils/edges/index.d.ts +6 -0
- package/dist/utils/edges/index.d.ts.map +1 -0
- package/dist/utils/edges/positions.d.ts +12 -0
- package/dist/utils/edges/positions.d.ts.map +1 -0
- package/dist/utils/edges/smoothstep-edge.d.ts +43 -0
- package/dist/utils/edges/smoothstep-edge.d.ts.map +1 -0
- package/dist/utils/edges/straight-edge.d.ts +28 -0
- package/dist/utils/edges/straight-edge.d.ts.map +1 -0
- package/dist/utils/general.d.ts +61 -0
- package/dist/utils/general.d.ts.map +1 -0
- package/dist/utils/graph.d.ts +113 -0
- package/dist/utils/graph.d.ts.map +1 -0
- package/dist/utils/marker.d.ts +9 -0
- package/dist/utils/marker.d.ts.map +1 -0
- package/dist/utils/positions.d.ts +12 -0
- package/dist/utils/positions.d.ts.map +1 -0
- package/dist/utils/store.d.ts +30 -0
- package/dist/utils/store.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { EdgeBase, NodeBase, InternalNodeBase, NodeOrigin, XYPosition, Rect, NodeDragItem, Transform, FitViewParamsBase, FitViewOptionsBase, CoordinateExtent, NodeLookup, OnError, OnBeforeDeleteBase } from '@aloudata/ink-core';
|
|
2
|
+
/**
|
|
3
|
+
* Test whether an object is useable as an Edge
|
|
4
|
+
* @public
|
|
5
|
+
* @remarks In TypeScript this is a type guard that will narrow the type of whatever you pass in to Edge if it returns true
|
|
6
|
+
* @param element - The element to test
|
|
7
|
+
* @returns A boolean indicating whether the element is an Edge
|
|
8
|
+
*/
|
|
9
|
+
export declare const isEdgeBase: <EdgeType extends EdgeBase = EdgeBase>(element: any) => element is EdgeType;
|
|
10
|
+
/**
|
|
11
|
+
* Test whether an object is useable as a Node
|
|
12
|
+
* @public
|
|
13
|
+
* @remarks In TypeScript this is a type guard that will narrow the type of whatever you pass in to Node if it returns true
|
|
14
|
+
* @param element - The element to test
|
|
15
|
+
* @returns A boolean indicating whether the element is an Node
|
|
16
|
+
*/
|
|
17
|
+
export declare const isNodeBase: <NodeType extends NodeBase = NodeBase>(element: any) => element is NodeType;
|
|
18
|
+
export declare const isInternalNodeBase: <NodeType extends InternalNodeBase = InternalNodeBase>(element: any) => element is NodeType;
|
|
19
|
+
/**
|
|
20
|
+
* Pass in a node, and get connected nodes where edge.source === node.id
|
|
21
|
+
* @public
|
|
22
|
+
* @param node - The node to get the connected nodes from
|
|
23
|
+
* @param nodes - The array of all nodes
|
|
24
|
+
* @param edges - The array of all edges
|
|
25
|
+
* @returns An array of nodes that are connected over eges where the source is the given node
|
|
26
|
+
*/
|
|
27
|
+
export declare const getOutgoers: <NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase>(node: NodeType | {
|
|
28
|
+
id: string;
|
|
29
|
+
}, nodes: NodeType[], edges: EdgeType[]) => NodeType[];
|
|
30
|
+
/**
|
|
31
|
+
* Pass in a node, and get connected nodes where edge.target === node.id
|
|
32
|
+
* @public
|
|
33
|
+
* @param node - The node to get the connected nodes from
|
|
34
|
+
* @param nodes - The array of all nodes
|
|
35
|
+
* @param edges - The array of all edges
|
|
36
|
+
* @returns An array of nodes that are connected over eges where the target is the given node
|
|
37
|
+
*/
|
|
38
|
+
export declare const getIncomers: <NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase>(node: NodeType | {
|
|
39
|
+
id: string;
|
|
40
|
+
}, nodes: NodeType[], edges: EdgeType[]) => NodeType[];
|
|
41
|
+
export declare const getNodePositionWithOrigin: (node: InternalNodeBase | NodeBase, nodeOrigin?: NodeOrigin) => {
|
|
42
|
+
position: XYPosition;
|
|
43
|
+
positionAbsolute: XYPosition;
|
|
44
|
+
};
|
|
45
|
+
export type GetNodesBoundsParams = {
|
|
46
|
+
nodeOrigin?: NodeOrigin;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Determines a bounding box that contains all given nodes in an array
|
|
50
|
+
* @public
|
|
51
|
+
* @remarks Useful when combined with {@link getViewportForBounds} to calculate the correct transform to fit the given nodes in a viewport.
|
|
52
|
+
* @param nodes - Nodes to calculate the bounds for
|
|
53
|
+
* @param params.nodeOrigin - Origin of the nodes: [0, 0] - top left, [0.5, 0.5] - center
|
|
54
|
+
* @returns Bounding box enclosing all nodes
|
|
55
|
+
*/
|
|
56
|
+
export declare const getNodesBounds: (nodes: NodeBase[], params?: GetNodesBoundsParams) => Rect;
|
|
57
|
+
export type GetInternalNodesBoundsParams<NodeType> = {
|
|
58
|
+
nodeOrigin?: NodeOrigin;
|
|
59
|
+
useRelativePosition?: boolean;
|
|
60
|
+
filter?: (node: NodeType) => boolean;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Determines a bounding box that contains all given nodes in an array
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export declare const getInternalNodesBounds: <NodeType extends InternalNodeBase | NodeDragItem>(nodeLookup: Map<string, NodeType>, params?: GetInternalNodesBoundsParams<NodeType>) => Rect;
|
|
67
|
+
export declare const getNodesInside: <NodeType extends NodeBase = NodeBase>(nodes: Map<string, InternalNodeBase<NodeType>>, rect: Rect, [tx, ty, tScale]?: Transform, partially?: boolean, excludeNonSelectableNodes?: boolean, nodeOrigin?: NodeOrigin) => InternalNodeBase<NodeType>[];
|
|
68
|
+
/**
|
|
69
|
+
* Get all connecting edges for a given set of nodes
|
|
70
|
+
* @param nodes - Nodes you want to get the connected edges for
|
|
71
|
+
* @param edges - All edges
|
|
72
|
+
* @returns Array of edges that connect any of the given nodes with each other
|
|
73
|
+
*/
|
|
74
|
+
export declare const getConnectedEdges: <NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase>(nodes: NodeType[], edges: EdgeType[]) => EdgeType[];
|
|
75
|
+
export declare function fitView<Params extends FitViewParamsBase<NodeBase>, Options extends FitViewOptionsBase<NodeBase>>({ nodeLookup, width, height, panZoom, minZoom, maxZoom, nodeOrigin, }: Params, options?: Options): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* This function calculates the next position of a node, taking into account the node's extent, parent node, and origin.
|
|
78
|
+
*
|
|
79
|
+
* @internal
|
|
80
|
+
* @returns position, positionAbsolute
|
|
81
|
+
*/
|
|
82
|
+
export declare function calculateNodePosition<NodeType extends NodeBase>({ nodeId, nextPosition, nodeLookup, nodeOrigin, nodeExtent, onError, }: {
|
|
83
|
+
nodeId: string;
|
|
84
|
+
nextPosition: XYPosition;
|
|
85
|
+
nodeLookup: NodeLookup<InternalNodeBase<NodeType>>;
|
|
86
|
+
nodeOrigin?: NodeOrigin;
|
|
87
|
+
nodeExtent?: CoordinateExtent;
|
|
88
|
+
onError?: OnError;
|
|
89
|
+
}): {
|
|
90
|
+
position: XYPosition;
|
|
91
|
+
positionAbsolute: XYPosition;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Pass in nodes & edges to delete, get arrays of nodes and edges that actually can be deleted
|
|
95
|
+
* @internal
|
|
96
|
+
* @param param.nodesToRemove - The nodes to remove
|
|
97
|
+
* @param param.edgesToRemove - The edges to remove
|
|
98
|
+
* @param param.nodes - All nodes
|
|
99
|
+
* @param param.edges - All edges
|
|
100
|
+
* @param param.onBeforeDelete - Callback to check which nodes and edges can be deleted
|
|
101
|
+
* @returns nodes: nodes that can be deleted, edges: edges that can be deleted
|
|
102
|
+
*/
|
|
103
|
+
export declare function getElementsToRemove<NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase>({ nodesToRemove, edgesToRemove, nodes, edges, onBeforeDelete, }: {
|
|
104
|
+
nodesToRemove: Partial<NodeType>[];
|
|
105
|
+
edgesToRemove: Partial<EdgeType>[];
|
|
106
|
+
nodes: NodeType[];
|
|
107
|
+
edges: EdgeType[];
|
|
108
|
+
onBeforeDelete?: OnBeforeDeleteBase<NodeType, EdgeType>;
|
|
109
|
+
}): Promise<{
|
|
110
|
+
nodes: NodeType[];
|
|
111
|
+
edges: EdgeType[];
|
|
112
|
+
}>;
|
|
113
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/utils/graph.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,iBAAiB,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AC,EAAE,CAAC;IACnC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;CACzD,GAAG,OAAO,CAAC;IACV,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC,CAoDD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EdgeMarkerType, EdgeBase, MarkerProps } from '@aloudata/ink-core';
|
|
2
|
+
export declare function getMarkerId(marker: EdgeMarkerType | undefined, id?: string | null): string;
|
|
3
|
+
export declare function createMarkerIds(edges: EdgeBase[], { id, defaultColor, defaultMarkerStart, defaultMarkerEnd, }: {
|
|
4
|
+
id?: string | null;
|
|
5
|
+
defaultColor?: string;
|
|
6
|
+
defaultMarkerStart?: EdgeMarkerType;
|
|
7
|
+
defaultMarkerEnd?: EdgeMarkerType;
|
|
8
|
+
}): MarkerProps[];
|
|
9
|
+
//# sourceMappingURL=marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../src/utils/marker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,QAAQ,EACR,WAAW,EACZ,MAAM,oBAAoB,CAAC;AAE5B,wBAAgB,WAAW,CACzB,MAAM,EAAE,cAAc,GAAG,SAAS,EAClC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,GACjB,MAAM,CAeR;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,QAAQ,EAAE,EACjB,EACE,EAAE,EACF,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,GACjB,EAAE;IACD,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,cAAc,CAAC;IACpC,gBAAgB,CAAC,EAAE,cAAc,CAAC;CACnC,iBA0BF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InternalNodeBase, ConnectionMode, OnError, EdgePosition } from '@aloudata/ink-core';
|
|
2
|
+
export type GetEdgePositionParams = {
|
|
3
|
+
id: string;
|
|
4
|
+
sourceNode: InternalNodeBase;
|
|
5
|
+
sourceHandle: string | null;
|
|
6
|
+
targetNode: InternalNodeBase;
|
|
7
|
+
targetHandle: string | null;
|
|
8
|
+
connectionMode: ConnectionMode;
|
|
9
|
+
onError?: OnError;
|
|
10
|
+
};
|
|
11
|
+
export declare function getEdgePosition(params: GetEdgePositionParams): EdgePosition | null;
|
|
12
|
+
//# sourceMappingURL=positions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"positions.d.ts","sourceRoot":"","sources":["../../src/utils/positions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,YAAY,EAKb,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,gBAAgB,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,cAAc,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAUF,wBAAgB,eAAe,CAC7B,MAAM,EAAE,qBAAqB,GAC5B,YAAY,GAAG,IAAI,CA4DrB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { NodeBase, NodeOrigin, InternalNodeBase, InternalNodeUpdate, NodeLookup, ParentLookup, NodeDimensionChange, NodePositionChange, XYPosition, ConnectionLookup, EdgeLookup, EdgeBase, PanZoomInstance, Transform, CoordinateExtent } from '@aloudata/ink-core';
|
|
2
|
+
import { ParentExpandChild } from '../types/utils/types';
|
|
3
|
+
type UpdateNodesOptions<NodeType extends NodeBase> = {
|
|
4
|
+
nodeOrigin?: NodeOrigin;
|
|
5
|
+
elevateNodesOnSelect?: boolean;
|
|
6
|
+
defaults?: Partial<NodeType>;
|
|
7
|
+
checkEquality?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function updateAbsolutePositions<NodeType extends NodeBase>(nodeLookup: Map<string, InternalNodeBase<NodeType>>, options?: UpdateNodesOptions<NodeType>): void;
|
|
10
|
+
export declare function updateNodeInternals<NodeType extends InternalNodeBase>(updates: Map<string, InternalNodeUpdate>, nodeLookup: NodeLookup<NodeType>, parentLookup: ParentLookup<NodeType>, domNode: HTMLElement | null, nodeOrigin?: NodeOrigin): {
|
|
11
|
+
changes: (NodeDimensionChange | NodePositionChange)[];
|
|
12
|
+
updatedInternals: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const getNodePositionWithOrigin: (node: InternalNodeBase | NodeBase, nodeOrigin?: NodeOrigin) => {
|
|
15
|
+
position: XYPosition;
|
|
16
|
+
positionAbsolute: XYPosition;
|
|
17
|
+
};
|
|
18
|
+
export declare function updateConnectionLookup(connectionLookup: ConnectionLookup, edgeLookup: EdgeLookup, edges: EdgeBase[]): void;
|
|
19
|
+
export declare function adoptUserNodes<NodeType extends NodeBase>(nodes: NodeType[], nodeLookup: Map<string, InternalNodeBase<NodeType>>, parentLookup: Map<string, InternalNodeBase<NodeType>[]>, options?: UpdateNodesOptions<NodeType>): void;
|
|
20
|
+
export declare function handleExpandParent(children: ParentExpandChild[], nodeLookup: NodeLookup, parentLookup: ParentLookup, nodeOrigin?: NodeOrigin): (NodeDimensionChange | NodePositionChange)[];
|
|
21
|
+
export declare function panBy({ delta, panZoom, transform, translateExtent, width, height, }: {
|
|
22
|
+
delta: XYPosition;
|
|
23
|
+
panZoom: PanZoomInstance | null;
|
|
24
|
+
transform: Transform;
|
|
25
|
+
translateExtent: CoordinateExtent;
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
}): boolean;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/utils/store.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EAElB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,QAAQ,EAER,eAAe,EACf,SAAS,EACT,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AASzD,KAAK,kBAAkB,CAAC,QAAQ,SAAS,QAAQ,IAAI;IACnD,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,QAAQ,SAAS,QAAQ,EAC/D,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EACnD,OAAO,GAAE,kBAAkB,CAAC,QAAQ,CAInC,QAuCF;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,gBAAgB,EACnE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,EACxC,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,EAChC,YAAY,EAAE,YAAY,CAAC,QAAQ,CAAC,EACpC,OAAO,EAAE,WAAW,GAAG,IAAI,EAC3B,UAAU,CAAC,EAAE,UAAU,GACtB;IACD,O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