@aloudata/ink-flow 1.0.6 → 1.0.7

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.
Files changed (242) hide show
  1. package/package.json +2 -3
  2. package/dist/base.css +0 -6
  3. package/dist/components/A11yDescriptions/index.d.ts +0 -8
  4. package/dist/components/A11yDescriptions/index.d.ts.map +0 -1
  5. package/dist/components/BatchProvider/index.d.ts +0 -17
  6. package/dist/components/BatchProvider/index.d.ts.map +0 -1
  7. package/dist/components/BatchProvider/types.d.ts +0 -7
  8. package/dist/components/BatchProvider/types.d.ts.map +0 -1
  9. package/dist/components/BatchProvider/useQueue.d.ts +0 -11
  10. package/dist/components/BatchProvider/useQueue.d.ts.map +0 -1
  11. package/dist/components/EdgeWrapper/EdgeUpdateAnchors.d.ts +0 -17
  12. package/dist/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +0 -1
  13. package/dist/components/EdgeWrapper/index.d.ts +0 -3
  14. package/dist/components/EdgeWrapper/index.d.ts.map +0 -1
  15. package/dist/components/EdgeWrapper/utils.d.ts +0 -11
  16. package/dist/components/EdgeWrapper/utils.d.ts.map +0 -1
  17. package/dist/components/Edges/BaseEdge.d.ts +0 -3
  18. package/dist/components/Edges/BaseEdge.d.ts.map +0 -1
  19. package/dist/components/Edges/BezierEdge.d.ts +0 -5
  20. package/dist/components/Edges/BezierEdge.d.ts.map +0 -1
  21. package/dist/components/Edges/EdgeAnchor.d.ts +0 -14
  22. package/dist/components/Edges/EdgeAnchor.d.ts.map +0 -1
  23. package/dist/components/Edges/EdgeText.d.ts +0 -8
  24. package/dist/components/Edges/EdgeText.d.ts.map +0 -1
  25. package/dist/components/Edges/SimpleBezierEdge.d.ts +0 -21
  26. package/dist/components/Edges/SimpleBezierEdge.d.ts.map +0 -1
  27. package/dist/components/Edges/SmoothStepEdge.d.ts +0 -5
  28. package/dist/components/Edges/SmoothStepEdge.d.ts.map +0 -1
  29. package/dist/components/Edges/StepEdge.d.ts +0 -5
  30. package/dist/components/Edges/StepEdge.d.ts.map +0 -1
  31. package/dist/components/Edges/StraightEdge.d.ts +0 -5
  32. package/dist/components/Edges/StraightEdge.d.ts.map +0 -1
  33. package/dist/components/Edges/index.d.ts +0 -6
  34. package/dist/components/Edges/index.d.ts.map +0 -1
  35. package/dist/components/Handle/index.d.ts +0 -9
  36. package/dist/components/Handle/index.d.ts.map +0 -1
  37. package/dist/components/InkFlowProvider/index.d.ts +0 -14
  38. package/dist/components/InkFlowProvider/index.d.ts.map +0 -1
  39. package/dist/components/NodeWrapper/index.d.ts +0 -3
  40. package/dist/components/NodeWrapper/index.d.ts.map +0 -1
  41. package/dist/components/NodeWrapper/useNodeObserver.d.ts +0 -14
  42. package/dist/components/NodeWrapper/useNodeObserver.d.ts.map +0 -1
  43. package/dist/components/NodeWrapper/utils.d.ts +0 -9
  44. package/dist/components/NodeWrapper/utils.d.ts.map +0 -1
  45. package/dist/components/Nodes/DefaultNode.d.ts +0 -3
  46. package/dist/components/Nodes/DefaultNode.d.ts.map +0 -1
  47. package/dist/components/Nodes/GroupNode.d.ts +0 -2
  48. package/dist/components/Nodes/GroupNode.d.ts.map +0 -1
  49. package/dist/components/Nodes/InputNode.d.ts +0 -4
  50. package/dist/components/Nodes/InputNode.d.ts.map +0 -1
  51. package/dist/components/Nodes/OutputNode.d.ts +0 -3
  52. package/dist/components/Nodes/OutputNode.d.ts.map +0 -1
  53. package/dist/components/Nodes/utils.d.ts +0 -13
  54. package/dist/components/Nodes/utils.d.ts.map +0 -1
  55. package/dist/components/Panel/index.d.ts +0 -11
  56. package/dist/components/Panel/index.d.ts.map +0 -1
  57. package/dist/components/StoreUpdater/index.d.ts +0 -9
  58. package/dist/components/StoreUpdater/index.d.ts.map +0 -1
  59. package/dist/components/UserSelection/index.d.ts +0 -2
  60. package/dist/components/UserSelection/index.d.ts.map +0 -1
  61. package/dist/constants/errorMessages.d.ts +0 -22
  62. package/dist/constants/errorMessages.d.ts.map +0 -1
  63. package/dist/constants/index.d.ts +0 -2
  64. package/dist/constants/index.d.ts.map +0 -1
  65. package/dist/container/EdgeRenderer/MarkerDefinitions.d.ts +0 -10
  66. package/dist/container/EdgeRenderer/MarkerDefinitions.d.ts.map +0 -1
  67. package/dist/container/EdgeRenderer/MarkerSymbols.d.ts +0 -9
  68. package/dist/container/EdgeRenderer/MarkerSymbols.d.ts.map +0 -1
  69. package/dist/container/EdgeRenderer/index.d.ts +0 -13
  70. package/dist/container/EdgeRenderer/index.d.ts.map +0 -1
  71. package/dist/container/FlowRenderer/index.d.ts +0 -14
  72. package/dist/container/FlowRenderer/index.d.ts.map +0 -1
  73. package/dist/container/GraphView/index.d.ts +0 -11
  74. package/dist/container/GraphView/index.d.ts.map +0 -1
  75. package/dist/container/InkFlow/Wrapper.d.ts +0 -13
  76. package/dist/container/InkFlow/Wrapper.d.ts.map +0 -1
  77. package/dist/container/InkFlow/index.d.ts +0 -4
  78. package/dist/container/InkFlow/index.d.ts.map +0 -1
  79. package/dist/container/InkFlow/init-values.d.ts +0 -4
  80. package/dist/container/InkFlow/init-values.d.ts.map +0 -1
  81. package/dist/container/NodeRenderer/index.d.ts +0 -10
  82. package/dist/container/NodeRenderer/index.d.ts.map +0 -1
  83. package/dist/container/NodeRenderer/useResizeObserver.d.ts +0 -2
  84. package/dist/container/NodeRenderer/useResizeObserver.d.ts.map +0 -1
  85. package/dist/container/Pane/index.d.ts +0 -12
  86. package/dist/container/Pane/index.d.ts.map +0 -1
  87. package/dist/container/Viewport/index.d.ts +0 -7
  88. package/dist/container/Viewport/index.d.ts.map +0 -1
  89. package/dist/container/ZoomPane/index.d.ts +0 -7
  90. package/dist/container/ZoomPane/index.d.ts.map +0 -1
  91. package/dist/contexts/NodeIdContext.d.ts +0 -6
  92. package/dist/contexts/NodeIdContext.d.ts.map +0 -1
  93. package/dist/contexts/StoreContext.d.ts +0 -4
  94. package/dist/contexts/StoreContext.d.ts.map +0 -1
  95. package/dist/hooks/index.d.ts +0 -5
  96. package/dist/hooks/index.d.ts.map +0 -1
  97. package/dist/hooks/useDrag.d.ts +0 -12
  98. package/dist/hooks/useDrag.d.ts.map +0 -1
  99. package/dist/hooks/useEdgesState.d.ts +0 -4
  100. package/dist/hooks/useEdgesState.d.ts.map +0 -1
  101. package/dist/hooks/useGlobalKeyHandler.d.ts +0 -11
  102. package/dist/hooks/useGlobalKeyHandler.d.ts.map +0 -1
  103. package/dist/hooks/useInkFlow.d.ts +0 -10
  104. package/dist/hooks/useInkFlow.d.ts.map +0 -1
  105. package/dist/hooks/useIsomorphicLayoutEffect.d.ts +0 -3
  106. package/dist/hooks/useIsomorphicLayoutEffect.d.ts.map +0 -1
  107. package/dist/hooks/useKeyPress.d.ts +0 -15
  108. package/dist/hooks/useKeyPress.d.ts.map +0 -1
  109. package/dist/hooks/useMoveSelectedNodes.d.ts +0 -12
  110. package/dist/hooks/useMoveSelectedNodes.d.ts.map +0 -1
  111. package/dist/hooks/useNodesState.d.ts +0 -4
  112. package/dist/hooks/useNodesState.d.ts.map +0 -1
  113. package/dist/hooks/useResizeHandler.d.ts +0 -8
  114. package/dist/hooks/useResizeHandler.d.ts.map +0 -1
  115. package/dist/hooks/useStore.d.ts +0 -21
  116. package/dist/hooks/useStore.d.ts.map +0 -1
  117. package/dist/hooks/useViewportHelper.d.ts +0 -10
  118. package/dist/hooks/useViewportHelper.d.ts.map +0 -1
  119. package/dist/hooks/useVisibleEdgeIds.d.ts +0 -9
  120. package/dist/hooks/useVisibleEdgeIds.d.ts.map +0 -1
  121. package/dist/hooks/useVisibleNodeIds.d.ts +0 -9
  122. package/dist/hooks/useVisibleNodeIds.d.ts.map +0 -1
  123. package/dist/index.cjs.js +0 -17
  124. package/dist/index.cjs.js.map +0 -1
  125. package/dist/index.d.ts +0 -9
  126. package/dist/index.d.ts.map +0 -1
  127. package/dist/index.esm.js +0 -17
  128. package/dist/index.esm.js.map +0 -1
  129. package/dist/plugins/Controls/ControlButton.d.ts +0 -3
  130. package/dist/plugins/Controls/ControlButton.d.ts.map +0 -1
  131. package/dist/plugins/Controls/Controls.d.ts +0 -8
  132. package/dist/plugins/Controls/Controls.d.ts.map +0 -1
  133. package/dist/plugins/Controls/Icons/FitView.d.ts +0 -2
  134. package/dist/plugins/Controls/Icons/FitView.d.ts.map +0 -1
  135. package/dist/plugins/Controls/Icons/Lock.d.ts +0 -2
  136. package/dist/plugins/Controls/Icons/Lock.d.ts.map +0 -1
  137. package/dist/plugins/Controls/Icons/Minus.d.ts +0 -2
  138. package/dist/plugins/Controls/Icons/Minus.d.ts.map +0 -1
  139. package/dist/plugins/Controls/Icons/Plus.d.ts +0 -2
  140. package/dist/plugins/Controls/Icons/Plus.d.ts.map +0 -1
  141. package/dist/plugins/Controls/Icons/Unlock.d.ts +0 -2
  142. package/dist/plugins/Controls/Icons/Unlock.d.ts.map +0 -1
  143. package/dist/plugins/Controls/index.d.ts +0 -4
  144. package/dist/plugins/Controls/index.d.ts.map +0 -1
  145. package/dist/plugins/Controls/types.d.ts +0 -35
  146. package/dist/plugins/Controls/types.d.ts.map +0 -1
  147. package/dist/plugins/index.d.ts +0 -2
  148. package/dist/plugins/index.d.ts.map +0 -1
  149. package/dist/store/index.d.ts +0 -12
  150. package/dist/store/index.d.ts.map +0 -1
  151. package/dist/store/initialState.d.ts +0 -12
  152. package/dist/store/initialState.d.ts.map +0 -1
  153. package/dist/styles/utils.d.ts +0 -3
  154. package/dist/styles/utils.d.ts.map +0 -1
  155. package/dist/types/edges.d.ts +0 -114
  156. package/dist/types/edges.d.ts.map +0 -1
  157. package/dist/types/general.d.ts +0 -123
  158. package/dist/types/general.d.ts.map +0 -1
  159. package/dist/types/index.d.ts +0 -7
  160. package/dist/types/index.d.ts.map +0 -1
  161. package/dist/types/instance.d.ts +0 -149
  162. package/dist/types/instance.d.ts.map +0 -1
  163. package/dist/types/nodes.d.ts +0 -40
  164. package/dist/types/nodes.d.ts.map +0 -1
  165. package/dist/types/props.d.ts +0 -151
  166. package/dist/types/props.d.ts.map +0 -1
  167. package/dist/types/store.d.ts +0 -105
  168. package/dist/types/store.d.ts.map +0 -1
  169. package/dist/types/system/changes.d.ts +0 -51
  170. package/dist/types/system/changes.d.ts.map +0 -1
  171. package/dist/types/system/edges.d.ts +0 -83
  172. package/dist/types/system/edges.d.ts.map +0 -1
  173. package/dist/types/system/general.d.ts +0 -119
  174. package/dist/types/system/general.d.ts.map +0 -1
  175. package/dist/types/system/handles.d.ts +0 -51
  176. package/dist/types/system/handles.d.ts.map +0 -1
  177. package/dist/types/system/index.d.ts +0 -8
  178. package/dist/types/system/index.d.ts.map +0 -1
  179. package/dist/types/system/nodes.d.ts +0 -126
  180. package/dist/types/system/nodes.d.ts.map +0 -1
  181. package/dist/types/system/panzoom.d.ts +0 -49
  182. package/dist/types/system/panzoom.d.ts.map +0 -1
  183. package/dist/types/system/utils.d.ts +0 -25
  184. package/dist/types/system/utils.d.ts.map +0 -1
  185. package/dist/types/utils/types.d.ts +0 -8
  186. package/dist/types/utils/types.d.ts.map +0 -1
  187. package/dist/utils/bezier-edge.d.ts +0 -59
  188. package/dist/utils/bezier-edge.d.ts.map +0 -1
  189. package/dist/utils/changes.d.ts +0 -16
  190. package/dist/utils/changes.d.ts.map +0 -1
  191. package/dist/utils/dom.d.ts +0 -20
  192. package/dist/utils/dom.d.ts.map +0 -1
  193. package/dist/utils/edges/bezier-edge.d.ts +0 -59
  194. package/dist/utils/edges/bezier-edge.d.ts.map +0 -1
  195. package/dist/utils/edges/general.d.ts +0 -46
  196. package/dist/utils/edges/general.d.ts.map +0 -1
  197. package/dist/utils/edges/index.d.ts +0 -6
  198. package/dist/utils/edges/index.d.ts.map +0 -1
  199. package/dist/utils/edges/positions.d.ts +0 -12
  200. package/dist/utils/edges/positions.d.ts.map +0 -1
  201. package/dist/utils/edges/smoothstep-edge.d.ts +0 -43
  202. package/dist/utils/edges/smoothstep-edge.d.ts.map +0 -1
  203. package/dist/utils/edges/straight-edge.d.ts +0 -28
  204. package/dist/utils/edges/straight-edge.d.ts.map +0 -1
  205. package/dist/utils/edges.d.ts +0 -26
  206. package/dist/utils/edges.d.ts.map +0 -1
  207. package/dist/utils/general.d.ts +0 -61
  208. package/dist/utils/general.d.ts.map +0 -1
  209. package/dist/utils/graph.d.ts +0 -113
  210. package/dist/utils/graph.d.ts.map +0 -1
  211. package/dist/utils/marker.d.ts +0 -9
  212. package/dist/utils/marker.d.ts.map +0 -1
  213. package/dist/utils/positions.d.ts +0 -12
  214. package/dist/utils/positions.d.ts.map +0 -1
  215. package/dist/utils/smoothstep-edge.d.ts +0 -43
  216. package/dist/utils/smoothstep-edge.d.ts.map +0 -1
  217. package/dist/utils/store.d.ts +0 -30
  218. package/dist/utils/store.d.ts.map +0 -1
  219. package/dist/utils/straight-edge.d.ts +0 -34
  220. package/dist/utils/straight-edge.d.ts.map +0 -1
  221. package/dist/utils/xydrag/XYDrag.d.ts +0 -52
  222. package/dist/utils/xydrag/XYDrag.d.ts.map +0 -1
  223. package/dist/utils/xydrag/index.d.ts +0 -2
  224. package/dist/utils/xydrag/index.d.ts.map +0 -1
  225. package/dist/utils/xydrag/utils.d.ts +0 -10
  226. package/dist/utils/xydrag/utils.d.ts.map +0 -1
  227. package/dist/utils/xyhandle/XYHandle.d.ts +0 -49
  228. package/dist/utils/xyhandle/XYHandle.d.ts.map +0 -1
  229. package/dist/utils/xyhandle/index.d.ts +0 -2
  230. package/dist/utils/xyhandle/index.d.ts.map +0 -1
  231. package/dist/utils/xyhandle/utils.d.ts +0 -14
  232. package/dist/utils/xyhandle/utils.d.ts.map +0 -1
  233. package/dist/utils/xypanzoom/XYPanZoom.d.ts +0 -12
  234. package/dist/utils/xypanzoom/XYPanZoom.d.ts.map +0 -1
  235. package/dist/utils/xypanzoom/eventhandler.d.ts +0 -46
  236. package/dist/utils/xypanzoom/eventhandler.d.ts.map +0 -1
  237. package/dist/utils/xypanzoom/filter.d.ts +0 -14
  238. package/dist/utils/xypanzoom/filter.d.ts.map +0 -1
  239. package/dist/utils/xypanzoom/index.d.ts +0 -2
  240. package/dist/utils/xypanzoom/index.d.ts.map +0 -1
  241. package/dist/utils/xypanzoom/utils.d.ts +0 -10
  242. package/dist/utils/xypanzoom/utils.d.ts.map +0 -1
@@ -1,61 +0,0 @@
1
- import { Ref, RefAttributes } from 'react';
2
- import { XYPosition, Transform, SnapGrid, InternalNodeBase, NodeBase, NodeOrigin, Rect, Box, CoordinateExtent, Viewport, Dimensions, NodeLookup } from '../types/system';
3
- import { Node } from '../types';
4
- export declare const clamp: (val: number, min?: number, max?: number) => number;
5
- export declare const clampPosition: (position: XYPosition, extent: CoordinateExtent) => {
6
- x: number;
7
- y: number;
8
- };
9
- export declare function getNodeDimensions(node: {
10
- measured?: {
11
- width?: number;
12
- height?: number;
13
- };
14
- width?: number;
15
- height?: number;
16
- initialWidth?: number;
17
- initialHeight?: number;
18
- }): {
19
- width: number;
20
- height: number;
21
- };
22
- export declare const isNumeric: (n: any) => n is number;
23
- export declare const snapPosition: (position: XYPosition, snapGrid?: SnapGrid) => XYPosition;
24
- export declare const pointToRendererPoint: ({ x, y }: XYPosition, [tx, ty, tScale]: Transform, snapToGrid?: boolean, snapGrid?: SnapGrid) => XYPosition;
25
- export declare const nodeToRect: (node: InternalNodeBase | NodeBase, nodeOrigin?: NodeOrigin) => Rect;
26
- export declare const getBoundsOfBoxes: (box1: Box, box2: Box) => Box;
27
- export declare const rectToBox: ({ x, y, width, height }: Rect) => Box;
28
- export declare const boxToRect: ({ x, y, x2, y2 }: Box) => Rect;
29
- export declare const nodeToBox: (node: InternalNodeBase | NodeBase, nodeOrigin?: NodeOrigin) => Box;
30
- export declare const getBoundsOfRects: (rect1: Rect, rect2: Rect) => Rect;
31
- export declare function fixedForwardRef<T, P = {}>(render: (props: P, ref: Ref<T>) => JSX.Element): (props: P & RefAttributes<T>) => JSX.Element;
32
- export declare const getOverlappingArea: (rectA: Rect, rectB: Rect) => number;
33
- export declare const getViewportForBounds: (bounds: Rect, width: number, height: number, minZoom: number, maxZoom: number, padding: number) => Viewport;
34
- export declare function isCoordinateExtent(extent?: CoordinateExtent | 'parent'): extent is CoordinateExtent;
35
- export declare function nodeHasDimensions<NodeType extends NodeBase = NodeBase>(node: NodeType): boolean;
36
- export declare const calcAutoPan: (pos: XYPosition, bounds: Dimensions) => number[];
37
- export declare const getPositionWithOrigin: ({ x, y, width, height, origin, }: {
38
- x: number;
39
- y: number;
40
- width: number;
41
- height: number;
42
- origin?: NodeOrigin;
43
- }) => XYPosition;
44
- export declare const rendererPointToPoint: ({ x, y }: XYPosition, [tx, ty, tScale]: Transform) => XYPosition;
45
- export declare const isMacOs: () => boolean;
46
- export declare const isNode: <NodeType extends Node = Node>(element: unknown) => element is NodeType;
47
- export declare const isNodeBase: <NodeType extends NodeBase = NodeBase>(element: any) => element is NodeType;
48
- /**
49
- * Convert child position to aboslute position
50
- *
51
- * @internal
52
- * @param position
53
- * @param parentId
54
- * @param nodeLookup
55
- * @param nodeOrigin
56
- * @returns an internal node with an absolute position
57
- */
58
- export declare function evaluateAbsolutePosition(position: XYPosition, parentId: string, nodeLookup: NodeLookup, nodeOrigin?: NodeOrigin): XYPosition;
59
- export declare const isRectObject: (obj: any) => obj is Rect;
60
- export declare const devWarn: (id: string, message: string) => void;
61
- //# sourceMappingURL=general.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../src/utils/general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAa,aAAa,EAAc,MAAM,OAAO,CAAC;AAClE,OAAO,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,GAAG,EACH,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGhC,eAAO,MAAM,KAAK,QAAS,MAAM,iCAAqB,MACnB,CAAC;AAEpC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DragItem, Transform, FitViewParamsBase, FitViewOptionsBase, CoordinateExtent, NodeLookup, OnError, OnBeforeDeleteBase } from '../types/system';
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/utils/graph.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,kDACZ,GAAG,wBAEiD,CAAC;AAEhE;;;;;;GAMG;AACH,e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Q,EAAE,QAAQ,CAAC,CAAC;CACzD,GAAG,OAAO,CAAC;IACV,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC,CAoDD"}
@@ -1,9 +0,0 @@
1
- import { EdgeMarkerType, EdgeBase, MarkerProps } from '../types/system';
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
@@ -1 +0,0 @@
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,iBAAiB,CAAC;AAEzB,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"}
@@ -1,12 +0,0 @@
1
- import { InternalNodeBase, ConnectionMode, OnError, EdgePosition } from '../types/system';
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"positions.d.ts","sourceRoot":"","sources":["../../src/utils/positions.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,OAAO,EACP,YAAY,EAIb,MAAM,iBAAiB,CAAC;AAGzB,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"}
@@ -1,43 +0,0 @@
1
- import { Position } from '../types/system';
2
- export interface GetSmoothStepPathParams {
3
- sourceX: number;
4
- sourceY: number;
5
- sourcePosition?: Position;
6
- targetX: number;
7
- targetY: number;
8
- targetPosition?: Position;
9
- borderRadius?: number;
10
- centerX?: number;
11
- centerY?: number;
12
- offset?: number;
13
- }
14
- /**
15
- * Get a smooth step path from source to target handle
16
- * @param params.sourceX - The x position of the source handle
17
- * @param params.sourceY - The y position of the source handle
18
- * @param params.sourcePosition - The position of the source handle (default: Position.Bottom)
19
- * @param params.targetX - The x position of the target handle
20
- * @param params.targetY - The y position of the target handle
21
- * @param params.targetPosition - The position of the target handle (default: Position.Top)
22
- * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label
23
- * @example
24
- * const source = { x: 0, y: 20 };
25
- const target = { x: 150, y: 100 };
26
-
27
- const [path, labelX, labelY, offsetX, offsetY] = getSmoothStepPath({
28
- sourceX: source.x,
29
- sourceY: source.y,
30
- sourcePosition: Position.Right,
31
- targetX: target.x,
32
- targetY: target.y,
33
- targetPosition: Position.Left,
34
- });
35
- */
36
- export declare function getSmoothStepPath({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, borderRadius, centerX, centerY, offset, }: GetSmoothStepPathParams): [
37
- path: string,
38
- labelX: number,
39
- labelY: number,
40
- offsetX: number,
41
- offsetY: number
42
- ];
43
- //# sourceMappingURL=smoothstep-edge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"smoothstep-edge.d.ts","sourceRoot":"","sources":["../../src/utils/smoothstep-edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,iBAAiB,CAAC;AAGvD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkOD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EACP,cAAgC,EAChC,OAAO,EACP,OAAO,EACP,cAA6B,EAC7B,YAAgB,EAChB,OAAO,EACP,OAAO,EACP,MAAW,GACZ,EAAE,uBAAuB,GAAG;IAC3B,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,MAAM;CAChB,CAyBA"}
@@ -1,30 +0,0 @@
1
- import { ConnectionLookup, CoordinateExtent, EdgeBase, EdgeLookup, InternalNodeBase, InternalNodeUpdate, NodeBase, NodeDimensionChange, NodeLookup, NodeOrigin, NodePositionChange, PanZoomInstance, ParentLookup, Transform, XYPosition } from '../types/system';
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
- //# sourceMappingUR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C;IAAE,QAAQ,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,UAAU,CAAA;CAkBtD,CAAC;AAEF,wBAAgB,sBAAsB,CACpC,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,QAAQ,EAAE,QA+BlB;AAED,wBAAgB,cAAc,CAAC,QAAQ,SAAS,QAAQ,EACtD,KAAK,EAAE,QAAQ,EAAE,EACjB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EACnD,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,EACvD,OAAO,GAAE,kBAAkB,CAAC,QAAQ,CAKnC,QAiDF;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,UAAU,CAAC,EAAE,UAAU,GACtB,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,EAAE,CAqF9C;AAED,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,KAAK,EACL,MAAM,GACP,EAAE;IACD,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,gBAAgB,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,WAyBA"}
@@ -1,34 +0,0 @@
1
- export type GetStraightPathParams = {
2
- sourceX: number;
3
- sourceY: number;
4
- targetX: number;
5
- targetY: number;
6
- };
7
- /**
8
- * Get a straight path from source to target handle
9
- * @param params.sourceX - The x position of the source handle
10
- * @param params.sourceY - The y position of the source handle
11
- * @param params.targetX - The x position of the target handle
12
- * @param params.targetY - The y position of the target handle
13
- * @returns A path string you can use in an SVG, the labelX and labelY position (center of path) and offsetX, offsetY between source handle and label
14
- * @example
15
- * const source = { x: 0, y: 20 };
16
- const target = { x: 150, y: 100 };
17
-
18
- const [path, labelX, labelY, offsetX, offsetY] = getStraightPath({
19
- sourceX: source.x,
20
- sourceY: source.y,
21
- sourcePosition: Position.Right,
22
- targetX: target.x,
23
- targetY: target.y,
24
- targetPosition: Position.Left,
25
- });
26
- */
27
- export declare function getStraightPath({ sourceX, sourceY, targetX, targetY, }: GetStraightPathParams): [
28
- path: string,
29
- labelX: number,
30
- labelY: number,
31
- offsetX: number,
32
- offsetY: number
33
- ];
34
- //# sourceMappingURL=straight-edge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"straight-edge.d.ts","sourceRoot":"","sources":["../../src/utils/straight-edge.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,GACR,EAAE,qBAAqB,GAAG;IACzB,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,MAAM;CAChB,CAeA"}
@@ -1,52 +0,0 @@
1
- import { NodeDragItem, NodeBase, InternalNodeBase, EdgeBase, CoordinateExtent, SnapGrid, NodeOrigin, Transform, PanBy, OnError, OnSelectionDrag, UpdateNodePositions } from '../../types/system';
2
- export type OnDrag = (event: MouseEvent, dragItems: Map<string, NodeDragItem>, node: NodeBase, nodes: NodeBase[]) => void;
3
- type StoreItems<OnNodeDrag> = {
4
- nodes: NodeBase[];
5
- nodeLookup: Map<string, InternalNodeBase>;
6
- edges: EdgeBase[];
7
- nodeExtent: CoordinateExtent;
8
- snapGrid: SnapGrid;
9
- snapToGrid: boolean;
10
- nodeOrigin: NodeOrigin;
11
- multiSelectionActive: boolean;
12
- domNode?: Element | null;
13
- transform: Transform;
14
- autoPanOnNodeDrag: boolean;
15
- nodesDraggable: boolean;
16
- selectNodesOnDrag: boolean;
17
- nodeDragThreshold: number;
18
- panBy: PanBy;
19
- unselectNodesAndEdges: (params?: {
20
- nodes?: NodeBase[];
21
- edges?: EdgeBase[];
22
- }) => void;
23
- onError?: OnError;
24
- onNodeDragStart?: OnNodeDrag;
25
- onNodeDrag?: OnNodeDrag;
26
- onNodeDragStop?: OnNodeDrag;
27
- onSelectionDragStart?: OnSelectionDrag;
28
- onSelectionDrag?: OnSelectionDrag;
29
- onSelectionDragStop?: OnSelectionDrag;
30
- updateNodePositions: UpdateNodePositions;
31
- };
32
- export type XYDragParams<OnNodeDrag> = {
33
- getStoreItems: () => StoreItems<OnNodeDrag>;
34
- onDragStart?: OnDrag;
35
- onDrag?: OnDrag;
36
- onDragStop?: OnDrag;
37
- onNodeMouseDown?: (id: string) => void;
38
- };
39
- export type XYDragInstance = {
40
- update: (params: DragUpdateParams) => void;
41
- destroy: () => void;
42
- };
43
- export type DragUpdateParams = {
44
- noDragClassName?: string;
45
- handleSelector?: string;
46
- isSelectable?: boolean;
47
- nodeId?: string;
48
- domNode: Element;
49
- };
50
- export declare function XYDrag<OnNodeDrag extends (e: any, nodes: any, node: any) => void | undefined>({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragStop, }: XYDragParams<OnNodeDrag>): XYDragInstance;
51
- export {};
52
- //# sourceMappingURL=XYDrag.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"XYDrag.d.ts","sourceRoot":"","sources":["../../../src/utils/xydrag/XYDrag.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,QAAQ,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,mBAAmB,CAAC,EAAE,eAAe,CAAC;IACtC,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,UAAU,IAAI;IACrC,aAAa,EAAE,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAGF,wBAAgB,MAAM,CACpB,UAAU,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,GAAG,SAAS,EACtE,EACA,eAAe,EACf,aAAa,EACb,WAAW,EACX,MAAM,EACN,UAAU,GACX,EAAE,YAAY,CAAC,UAAU,CAAC,GAAG,cAAc,CAyV3C"}
@@ -1,2 +0,0 @@
1
- export * from './XYDrag';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/xydrag/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,10 +0,0 @@
1
- import { NodeBase, NodeLookup, InternalNodeBase, XYPosition, NodeDragItem } from '../../types/system';
2
- export declare function isParentSelected<NodeType extends NodeBase>(node: NodeType, nodeLookup: NodeLookup): boolean;
3
- export declare function hasSelector(target: Element, selector: string, domNode: Element): boolean;
4
- export declare function getDragItems<NodeType extends NodeBase>(nodeLookup: Map<string, InternalNodeBase<NodeType>>, nodesDraggable: boolean, mousePos: XYPosition, nodeId?: string): Map<string, NodeDragItem>;
5
- export declare function getEventHandlerParams<NodeType extends InternalNodeBase>({ nodeId, dragItems, nodeLookup, }: {
6
- nodeId?: string;
7
- dragItems: Map<string, NodeDragItem>;
8
- nodeLookup: Map<string, NodeType>;
9
- }): [NodeBase, NodeBase[]];
10
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/xydrag/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,YAAY,EACb,MAAM,oBAAoB,CAAC;AAE5B,wBAAgB,gBAAgB,CAAC,QAAQ,SAAS,QAAQ,EACxD,IAAI,EAAE,QAAQ,EACd,UAAU,EAAE,UAAU,GACrB,OAAO,CAgBT;AAED,wBAAgB,WAAW,CACzB,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,GACf,OAAO,CAUT;AAGD,wBAAgB,YAAY,CAAC,QAAQ,SAAS,QAAQ,EACpD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC,EACnD,cAAc,EAAE,OAAO,EACvB,QAAQ,EAAE,UAAU,EACpB,MAAM,CAAC,EAAE,MAAM,GACd,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAwC3B;AAKD,wBAAgB,qBAAqB,CAAC,QAAQ,SAAS,gBAAgB,EAAE,EACvE,MAAM,EACN,SAAS,EACT,UAAU,GACX,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACrC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CACnC,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CA2BzB"}
@@ -1,49 +0,0 @@
1
- import { IsValidConnection } from '../../types';
2
- import { ConnectionMode, NodeLookup, HandleType, UpdateConnection, PanBy, OnConnectStart, OnConnect, OnConnectEnd, Transform, ConnectingHandle, ConnectionHandle, Connection } from '../../types/system';
3
- export type OnPointerDownParams = {
4
- autoPanOnConnect: boolean;
5
- connectionMode: ConnectionMode;
6
- connectionRadius: number;
7
- domNode: HTMLDivElement | null;
8
- handleId: string | null;
9
- nodeId: string;
10
- isTarget: boolean;
11
- nodeLookup: NodeLookup;
12
- lib: string;
13
- flowId: string | null;
14
- edgeUpdaterType?: HandleType;
15
- updateConnection: UpdateConnection;
16
- panBy: PanBy;
17
- cancelConnection: () => void;
18
- onConnectStart?: OnConnectStart;
19
- onConnect?: OnConnect;
20
- onConnectEnd?: OnConnectEnd;
21
- isValidConnection?: IsValidConnection;
22
- onEdgeUpdateEnd?: (evt: MouseEvent | TouchEvent) => void;
23
- getTransform: () => Transform;
24
- getConnectionStartHandle: () => ConnectingHandle | null;
25
- };
26
- export type IsValidParams = {
27
- handle: Pick<ConnectionHandle, 'nodeId' | 'id' | 'type'> | null;
28
- connectionMode: ConnectionMode;
29
- fromNodeId: string;
30
- fromHandleId: string | null;
31
- fromType: HandleType;
32
- isValidConnection?: IsValidConnection;
33
- doc: Document | ShadowRoot;
34
- lib: string;
35
- flowId: string | null;
36
- };
37
- export type XYHandleInstance = {
38
- onPointerDown: (event: MouseEvent | TouchEvent, params: OnPointerDownParams) => void;
39
- isValid: (event: MouseEvent | TouchEvent, params: IsValidParams) => Result;
40
- };
41
- type Result = {
42
- handleDomNode: Element | null;
43
- isValid: boolean;
44
- connection: Connection | null;
45
- endHandle: ConnectingHandle | null;
46
- };
47
- export declare const XYHandle: XYHandleInstance;
48
- export {};
49
- //# sourceMappingURL=XYHandle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"XYHandle.d.ts","sourceRoot":"","sources":["../../../src/utils/xyhandle/XYHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,cAAc,EACd,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,SAAS,EACT,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACX,MAAM,oBAAoB,CAAC;AAc5B,MAAM,MAAM,mBAAmB,GAAG;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,cAAc,CAAC;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,CAAC;IACzD,YAAY,EAAE,MAAM,SAAS,CAAC;IAC9B,wBAAwB,EAAE,MAAM,gBAAgB,GAAG,IAAI,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC;IAChE,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,UAAU,CAAC;IACrB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,GAAG,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,aAAa,EAAE,CACb,KAAK,EAAE,UAAU,GAAG,UAAU,EAC9B,MAAM,EAAE,mBAAmB,KACxB,IAAI,CAAC;IACV,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,EAAE,MAAM,EAAE,aAAa,KAAK,MAAM,CAAC;CAC5E,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;CACpC,CAAC;AA6PF,eAAO,MAAM,QAAQ,EAAE,gBAGtB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './XYHandle';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/xyhandle/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,14 +0,0 @@
1
- import { InternalNodeBase, NodeHandleBounds, HandleType, ConnectionHandle, XYPosition, NodeLookup, ConnectionStatus } from '../../types/system';
2
- export declare function getHandles(node: InternalNodeBase, handleBounds: NodeHandleBounds, type: HandleType, currentHandle: string): ConnectionHandle[];
3
- export declare function getClosestHandle(pos: XYPosition, connectionRadius: number, handles: ConnectionHandle[]): ConnectionHandle | null;
4
- type GetHandleLookupParams = {
5
- nodeLookup: NodeLookup;
6
- nodeId: string;
7
- handleId: string | null;
8
- handleType: string;
9
- };
10
- export declare function getHandleLookup({ nodeLookup, nodeId, handleId, handleType, }: GetHandleLookupParams): ConnectionHandle[];
11
- export declare function getHandleType(edgeUpdaterType: HandleType | undefined, handleDomNode: Element | null): HandleType | null;
12
- export declare function getConnectionStatus(isInsideConnectionRadius: boolean, isHandleValid: boolean): ConnectionStatus;
13
- export {};
14
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/xyhandle/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAG5B,wBAAgB,UAAU,CACxB,IAAI,EAAE,gBAAgB,EACtB,YAAY,EAAE,gBAAgB,EAC9B,IAAI,EAAE,UAAU,EAChB,aAAa,EAAE,MAAM,GACpB,gBAAgB,EAAE,CAapB;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,UAAU,EACf,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,gBAAgB,EAAE,GAC1B,gBAAgB,GAAG,IAAI,CA4BzB;AAED,KAAK,qBAAqB,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,MAAM,EACN,QAAQ,EACR,UAAU,GACX,EAAE,qBAAqB,GAAG,gBAAgB,EAAE,CAuB5C;AAED,wBAAgB,aAAa,CAC3B,eAAe,EAAE,UAAU,GAAG,SAAS,EACvC,aAAa,EAAE,OAAO,GAAG,IAAI,GAC5B,UAAU,GAAG,IAAI,CAUnB;AAED,wBAAgB,mBAAmB,CACjC,wBAAwB,EAAE,OAAO,EACjC,aAAa,EAAE,OAAO,oBAWvB"}
@@ -1,12 +0,0 @@
1
- import { Viewport, PanZoomInstance, PanZoomParams } from '../../types/system';
2
- export type ZoomPanValues = {
3
- isZoomingOrPanning: boolean;
4
- usedRightMouseButton: boolean;
5
- prevViewport: Viewport;
6
- mouseButton: number;
7
- timerId: ReturnType<typeof setTimeout> | undefined;
8
- panScrollTimeout: ReturnType<typeof setTimeout> | undefined;
9
- isPanScrolling: boolean;
10
- };
11
- export declare function XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onTransformChange, onDraggingChange, }: PanZoomParams): PanZoomInstance;
12
- //# sourceMappingURL=XYPanZoom.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"XYPanZoom.d.ts","sourceRoot":"","sources":["../../../src/utils/xypanzoom/XYPanZoom.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,QAAQ,EACR,eAAe,EAIf,aAAa,EACd,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,aAAa,GAAG;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,EAAE,QAAQ,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,SAAS,CAAC;IACnD,gBAAgB,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,SAAS,CAAC;IAC5D,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,OAAO,EACP,OAAO,EACP,eAAe,EACf,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,GACjB,EAAE,aAAa,GAAG,eAAe,CAgPjC"}
@@ -1,46 +0,0 @@
1
- import type { D3ZoomEvent } from 'd3-zoom';
2
- import { ZoomPanValues } from './XYPanZoom';
3
- import { D3SelectionInstance, D3ZoomInstance, PanOnScrollMode, OnPanZoom, D3ZoomHandler, OnDraggingChange, OnTransformChange } from '../../types/system';
4
- export type PanOnScrollParams = {
5
- zoomPanValues: ZoomPanValues;
6
- noWheelClassName: string;
7
- d3Selection: D3SelectionInstance;
8
- d3Zoom: D3ZoomInstance;
9
- panOnScrollMode: PanOnScrollMode;
10
- panOnScrollSpeed: number;
11
- zoomOnPinch: boolean;
12
- onPanZoomStart?: OnPanZoom;
13
- onPanZoom?: OnPanZoom;
14
- onPanZoomEnd?: OnPanZoom;
15
- };
16
- export type ZoomOnScrollParams = {
17
- noWheelClassName: string;
18
- preventScrolling: boolean;
19
- d3ZoomHandler: D3ZoomHandler;
20
- };
21
- export type PanZoomStartParams = {
22
- zoomPanValues: ZoomPanValues;
23
- onDraggingChange: OnDraggingChange;
24
- onPanZoomStart?: OnPanZoom;
25
- };
26
- export type PanZoomParams = {
27
- zoomPanValues: ZoomPanValues;
28
- panOnDrag: boolean | number[];
29
- onPaneContextMenu: boolean;
30
- onTransformChange: OnTransformChange;
31
- onPanZoom?: OnPanZoom;
32
- };
33
- export type PanZoomEndParams = {
34
- zoomPanValues: ZoomPanValues;
35
- panOnDrag: boolean | number[];
36
- panOnScroll: boolean;
37
- onDraggingChange: (isDragging: boolean) => void;
38
- onPanZoomEnd?: OnPanZoom;
39
- onPaneContextMenu?: (event: any) => void;
40
- };
41
- export declare function createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection, d3Zoom, panOnScrollMode, panOnScrollSpeed, zoomOnPinch, onPanZoomStart, onPanZoom, onPanZoomEnd, }: PanOnScrollParams): (event: any) => boolean;
42
- export declare function createZoomOnScrollHandler({ noWheelClassName, preventScrolling, d3ZoomHandler, }: ZoomOnScrollParams): (this: Element, event: any, d: unknown) => any;
43
- export declare function createPanZoomStartHandler({ zoomPanValues, onDraggingChange, onPanZoomStart, }: PanZoomStartParams): (event: D3ZoomEvent<HTMLDivElement, any>) => void;
44
- export declare function createPanZoomHandler({ zoomPanValues, panOnDrag, onPaneContextMenu, onTransformChange, onPanZoom, }: PanZoomParams): (event: D3ZoomEvent<HTMLDivElement, any>) => void;
45
- export declare function createPanZoomEndHandler({ zoomPanValues, panOnDrag, panOnScroll, onDraggingChange, onPanZoomEnd, onPaneContextMenu, }: PanZoomEndParams): (event: D3ZoomEvent<HTMLDivElement, any>) => void;
46
- //# sourceMappingURL=eventhandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eventhandler.d.ts","sourceRoot":"","sources":["../../../src/utils/xypanzoom/eventhandler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAU3C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,mBAAmB,CAAC;IACjC,MAAM,EAAE,cAAc,CAAC;IACvB,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,M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J,YAAY,cAAc,EAAE,GAAG,CAAC,UAoBhD;AAED,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,GACV,EAAE,aAAa,WACC,YAAY,cAAc,EAAE,GAAG,CAAC,UAqBhD;AAED,wBAAgB,uBAAuB,CAAC,EACtC,aAAa,EACb,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,GAClB,EAAE,gBAAgB,WACF,YAAY,cAAc,EAAE,GAAG,CAAC,UAuChD"}
@@ -1,14 +0,0 @@
1
- export type FilterParams = {
2
- zoomActivationKeyPressed: boolean;
3
- zoomOnScroll: boolean;
4
- zoomOnPinch: boolean;
5
- panOnDrag: boolean | number[];
6
- panOnScroll: boolean;
7
- zoomOnDoubleClick: boolean;
8
- userSelectionActive: boolean;
9
- noWheelClassName: string;
10
- noPanClassName: string;
11
- lib: string;
12
- };
13
- export declare function createFilter({ zoomActivationKeyPressed, zoomOnScroll, zoomOnPinch, panOnDrag, panOnScroll, zoomOnDoubleClick, userSelectionActive, noWheelClassName, noPanClassName, lib, }: FilterParams): (event: any) => boolean;
14
- //# sourceMappingURL=filter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/utils/xypanzoom/filter.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG;IACzB,wBAAwB,EAAE,OAAO,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,wBAAwB,EACxB,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,GAAG,GACJ,EAAE,YAAY,WACE,GAAG,KAAG,OAAO,CA6D7B"}
@@ -1,2 +0,0 @@
1
- export * from './XYPanZoom';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/xypanzoom/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type ZoomTransform } from 'd3-zoom';
2
- import { Viewport, D3SelectionInstance } from '../../types/system';
3
- export declare const viewChanged: (prevViewport: Viewport, eventViewport: any) => boolean;
4
- export declare const transformToViewport: (transform: ZoomTransform) => Viewport;
5
- export declare const viewportToTransform: ({ x, y, zoom }: Viewport) => ZoomTransform;
6
- export declare const isWrappedWithClass: (event: any, className: string | undefined) => any;
7
- export declare const isRightClickPan: (panOnDrag: boolean | number[], usedButton: number) => boolean;
8
- export declare const getD3Transition: (selection: D3SelectionInstance, duration?: number) => D3SelectionInstance | import("d3-transition").Transition<Element, unknown, null, undefined>;
9
- export declare const wheelDelta: (event: any) => number;
10
- //# sourceMappingURL=utils.d.ts.map