@aloudata/ink-flow 1.0.5 → 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,151 +0,0 @@
1
- import type { HTMLAttributes, MouseEvent as ReactMouseEvent, WheelEvent } from 'react';
2
- import { DefaultEdgeOptions, Edge, FitViewOptions, Node, NodeTypes, OnEdgeUpdateFunc, OnEdgesChange, OnNodesChange, SelectionDragHandler } from '.';
3
- import { CoordinateExtent, KeyCode, NodeOrigin, PanOnScrollMode, Viewport } from './system';
4
- export interface InkFlowProps<NodeType extends Node = Node, EdgeType extends Edge = Edge> extends Omit<HTMLAttributes<HTMLDivElement>, 'onError'> {
5
- /** An array of nodes to render in a controlled flow.
6
- * @example
7
- * const nodes = [
8
- * {
9
- * id: 'node-1',
10
- * type: 'input',
11
- * data: { label: 'Node 1' },
12
- * position: { x: 250, y: 50 }
13
- * }
14
- * ];
15
- */
16
- nodes?: NodeType[];
17
- /** An array of edges to render in a controlled flow.
18
- * @example
19
- * const edges = [
20
- * {
21
- * id: 'edge-1-2',
22
- * source: 'node-1',
23
- * target: 'node-2',
24
- * }
25
- * ];
26
- */
27
- edges?: EdgeType[];
28
- /** The initial nodes to render in an uncontrolled flow. */
29
- defaultNodes?: NodeType[];
30
- /** The initial edges to render in an uncontrolled flow. */
31
- defaultEdges?: EdgeType[];
32
- /** Defaults to be applied to all new edges that are added to the flow.
33
- *
34
- * Properties on a new edge will override these defaults if they exist.
35
- * @example
36
- * const defaultEdgeOptions = {
37
- * type: 'customEdgeType',
38
- * animated: true,
39
- * interactionWidth: 10,
40
- * data: { label: 'custom label' },
41
- * hidden: false,
42
- * deletable: true,
43
- * selected: false,
44
- * focusable: true,
45
- * markerStart: EdgeMarker.ArrowClosed,
46
- * markerEnd: EdgeMarker.ArrowClosed,
47
- * zIndex: 12,
48
- * ariaLabel: 'custom aria label'
49
- * }
50
- */
51
- defaultEdgeOptions?: DefaultEdgeOptions;
52
- onEdgeUpdate?: OnEdgeUpdateFunc<EdgeType>;
53
- onNodesChange?: OnNodesChange<NodeType>;
54
- onEdgesChange?: OnEdgesChange<EdgeType>;
55
- /** This event handler gets called when a Node is deleted */
56
- /** This event handler gets called when a Edge is deleted */
57
- /** This event handler gets called when a Node or Edge is deleted */
58
- /** This event handler gets called when a user starts to drag a selection box */
59
- onSelectionDragStart?: SelectionDragHandler<NodeType>;
60
- /** This event handler gets called when a user drags a selection box */
61
- onSelectionDrag?: SelectionDragHandler<NodeType>;
62
- /** This event handler gets called when a user stops dragging a selection box */
63
- onSelectionDragStop?: SelectionDragHandler<NodeType>;
64
- onSelectionStart?: (event: ReactMouseEvent) => void;
65
- onSelectionEnd?: (event: ReactMouseEvent) => void;
66
- onSelectionContextMenu?: (event: ReactMouseEvent, nodes: NodeType[]) => void;
67
- /** This event handler gets called when user scroll inside the pane */
68
- onPaneScroll?: (event?: WheelEvent) => void;
69
- /** This event handler gets called when user clicks inside the pane */
70
- onPaneClick?: (event: ReactMouseEvent) => void;
71
- /** This event handler gets called when user right clicks inside the pane */
72
- onPaneContextMenu?: (event: ReactMouseEvent | MouseEvent) => void;
73
- /** This event handler gets called when mouse enters the pane */
74
- onPaneMouseEnter?: (event: ReactMouseEvent) => void;
75
- /** This event handler gets called when mouse moves over the pane */
76
- onPaneMouseMove?: (event: ReactMouseEvent) => void;
77
- /** This event handler gets called when mouse leaves the pane */
78
- onPaneMouseLeave?: (event: ReactMouseEvent) => void;
79
- nodeTypes?: NodeTypes;
80
- deleteKeyCode?: KeyCode | null;
81
- selectionKeyCode?: KeyCode | null;
82
- selectionOnDrag?: boolean;
83
- selectionMode?: SelectionMode;
84
- panActivationKeyCode?: KeyCode | null;
85
- multiSelectionKeyCode?: KeyCode | null;
86
- zoomActivationKeyCode?: KeyCode | null;
87
- /** Controls if all nodes should be draggable
88
- * @default true
89
- */
90
- nodesDraggable?: boolean;
91
- nodeOrigin?: NodeOrigin;
92
- elementsSelectable?: boolean;
93
- panOnDrag?: boolean | number[];
94
- minZoom?: number;
95
- maxZoom?: number;
96
- viewport?: Viewport;
97
- /** Sets the initial position and zoom of the viewport.
98
- *
99
- * If a default viewport is provided but fitView is enabled, the default viewport will be ignored.
100
- * @example
101
- * const initialViewport = {
102
- * zoom: 0.5,
103
- * position: { x: 0, y: 0 }
104
- * };
105
- */
106
- defaultViewport?: Viewport;
107
- onViewportChange?: (viewport: Viewport) => void;
108
- translateExtent?: CoordinateExtent;
109
- preventScrolling?: boolean;
110
- /** By default nodes can be placed on an infinite flow. You can use this prop to set a boundary.
111
- *
112
- * The first pair of coordinates is the top left boundary and the second pair is the bottom right.
113
- * @example [[-1000, -10000], [1000, 1000]]
114
- */
115
- nodeExtent?: CoordinateExtent;
116
- zoomOnScroll?: boolean;
117
- zoomOnPinch?: boolean;
118
- panOnScroll?: boolean;
119
- panOnScrollSpeed?: number;
120
- panOnScrollMode?: PanOnScrollMode;
121
- zoomOnDoubleClick?: boolean;
122
- noDragClassName?: string;
123
- noWheelClassName?: string;
124
- noPanClassName?: string;
125
- /** If set, initial viewport will show all nodes & edges */
126
- fitView?: boolean;
127
- /** Options to be used in combination with fitView
128
- * @example
129
- * const fitViewOptions = {
130
- * padding: 0.1,
131
- * includeHiddenNodes: false,
132
- * minZoom: 0.1,
133
- * maxZoom: 1,
134
- * duration: 200,
135
- * nodes: [{id: 'node-1'}, {id: 'node-2'}], // nodes to fit
136
- * };
137
- */
138
- fitViewOptions?: FitViewOptions;
139
- /**The connectOnClick option lets you click or tap on a source handle to start a connection
140
- * and then click on a target handle to complete the connection.
141
- *
142
- * If you set this option to false, users will need to drag the connection line to the target
143
- * handle to create a connection.
144
- */
145
- disableKeyboardA11y?: boolean;
146
- /** Sets a fixed width for the flow */
147
- width?: number;
148
- /** Sets a fixed height for the flow */
149
- height?: number;
150
- }
151
- //# sourceMappingURL=props.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../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ultEdgeOptions, OnDelete, OnEdgesDelete, OnNodesDelete, OnBeforeDelete } from '.';
2
- import { ConnectingHandle, ConnectionLookup, ConnectionMode, ConnectionStatus, CoordinateExtent, EdgeChange, EdgeLookup, InternalNodeUpdate, NodeChange, NodeLookup, NodeOrigin, OnConnect, OnConnectEnd, OnConnectStart, OnError, OnMove, OnMoveEnd, OnMoveStart, OnSelectionDrag, OnViewportChange, PanBy, PanZoomInstance, SelectionRect, SnapGrid, Transform, UpdateConnection, UpdateNodePositions, XYPosition } from './system';
3
- export type InkFlowStore<NodeType extends Node = Node, EdgeType extends Edge = Edge> = {
4
- rfId: string;
5
- width: number;
6
- height: number;
7
- transform: Transform;
8
- nodes: NodeType[];
9
- nodeLookup: NodeLookup<InternalNode<NodeType>>;
10
- parentLookup: Map<string, InternalNode<NodeType>[]>;
11
- edges: Edge[];
12
- edgeLookup: EdgeLookup<EdgeType>;
13
- connectionLookup: ConnectionLookup;
14
- onNodesChange: OnNodesChange<NodeType> | null;
15
- onEdgesChange: OnEdgesChange<EdgeType> | null;
16
- hasDefaultNodes: boolean;
17
- hasDefaultEdges: boolean;
18
- domNode: HTMLDivElement | null;
19
- paneDragging: boolean;
20
- noPanClassName: string;
21
- panZoom: PanZoomInstance | null;
22
- minZoom: number;
23
- maxZoom: number;
24
- translateExtent: CoordinateExtent;
25
- nodeExtent: CoordinateExtent;
26
- nodeOrigin: NodeOrigin;
27
- nodeDragThreshold: number;
28
- nodesSelectionActive: boolean;
29
- userSelectionActive: boolean;
30
- userSelectionRect: SelectionRect | null;
31
- connectionPosition: XYPosition;
32
- connectionStatus: ConnectionStatus | null;
33
- connectionMode: ConnectionMode;
34
- snapToGrid: boolean;
35
- snapGrid: SnapGrid;
36
- nodesDraggable: boolean;
37
- nodesConnectable: boolean;
38
- nodesFocusable: boolean;
39
- edgesFocusable: boolean;
40
- edgesUpdatable: boolean;
41
- elementsSelectable: boolean;
42
- elevateNodesOnSelect: boolean;
43
- elevateEdgesOnSelect: boolean;
44
- selectNodesOnDrag: boolean;
45
- multiSelectionActive: boolean;
46
- connectionStartHandle: ConnectingHandle | null;
47
- connectionEndHandle: ConnectingHandle | null;
48
- connectionClickStartHandle: ConnectingHandle | null;
49
- onSelectionDragStart?: OnSelectionDrag;
50
- onSelectionDrag?: OnSelectionDrag;
51
- onSelectionDragStop?: OnSelectionDrag;
52
- onMoveStart?: OnMoveStart;
53
- onMove?: OnMove;
54
- onMoveEnd?: OnMoveEnd;
55
- onConnect?: OnConnect;
56
- onConnectStart?: OnConnectStart;
57
- onConnectEnd?: OnConnectEnd;
58
- onClickConnectStart?: OnConnectStart;
59
- onClickConnectEnd?: OnConnectEnd;
60
- connectOnClick: boolean;
61
- defaultEdgeOptions?: DefaultEdgeOptions;
62
- fitViewOnInit: boolean;
63
- fitViewDone: boolean;
64
- fitViewOnInitOptions: FitViewOptions | undefined;
65
- onNodesDelete?: OnNodesDelete<NodeType>;
66
- onEdgesDelete?: OnEdgesDelete<EdgeType>;
67
- onDelete?: OnDelete;
68
- onError?: OnError;
69
- onViewportChangeStart?: OnViewportChange;
70
- onViewportChange?: OnViewportChange;
71
- onViewportChangeEnd?: OnViewportChange;
72
- onBeforeDelete?: OnBeforeDelete<NodeType, EdgeType>;
73
- onSelectionChangeHandlers: OnSelectionChangeFunc[];
74
- ariaLiveMessage: string;
75
- autoPanOnConnect: boolean;
76
- autoPanOnNodeDrag: boolean;
77
- connectionRadius: number;
78
- isValidConnection?: IsValidConnection<EdgeType>;
79
- lib: string;
80
- debug: boolean;
81
- };
82
- export type InkFlowActions<NodeType extends Node, EdgeType extends Edge> = {
83
- setNodes: (nodes: NodeType[]) => void;
84
- setEdges: (edges: EdgeType[]) => void;
85
- setDefaultNodesAndEdges: (nodes?: NodeType[], edges?: EdgeType[]) => void;
86
- updateNodeInternals: (updates: Map<string, InternalNodeUpdate>) => void;
87
- updateNodePositions: UpdateNodePositions;
88
- resetSelectedElements: () => void;
89
- unselectNodesAndEdges: (params?: UnselectNodesAndEdgesParams) => void;
90
- addSelectedNodes: (nodeIds: string[]) => void;
91
- addSelectedEdges: (edgeIds: string[]) => void;
92
- setMinZoom: (minZoom: number) => void;
93
- setMaxZoom: (maxZoom: number) => void;
94
- setTranslateExtent: (translateExtent: CoordinateExtent) => void;
95
- setNodeExtent: (nodeExtent: CoordinateExtent) => void;
96
- cancelConnection: () => void;
97
- updateConnection: UpdateConnection;
98
- reset: () => void;
99
- triggerNodeChanges: (changes: NodeChange<NodeType>[]) => void;
100
- triggerEdgeChanges: (changes: EdgeChange<EdgeType>[]) => void;
101
- panBy: PanBy;
102
- fitView: (options?: FitViewOptions) => boolean;
103
- };
104
- export type InkFlowState<NodeType extends Node = Node, EdgeType extends Edge = Edge> = InkFlowStore<NodeType, EdgeType> & InkFlowActions<NodeType, EdgeType>;
105
- //# sourceMappingURL=store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/types/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,aAAa,EAWb,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,qBAAqB,EACrB,2BAA2B,EAC3B,kBAAkB,EAClB,QAAQ,EACR,aAAa,EACb,aAAa,EACb,cAAc,EACf,MAAM,GAAG,CAAC;AAEX,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,YAAY,EACZ,cAAc,EACd,OAAO,EACP,MAAM,EACN,SAAS,EACT,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,KAAK,EACL,eAAe,EACf,aAAa,EACb,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACX,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,YAAY,CACtB,QAAQ,S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BAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC9C,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kBAAkB,EAAE,CAAC,eAAe,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAChE,aAAa,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACtD,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,kBAAkB,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC;IAC9D,kBAAkB,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,KAAK,IAAI,CAAC;IAC9D,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,cAAc,KAAK,OAAO,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,YAAY,CACtB,QAAQ,SAAS,IAAI,GAAG,IAAI,EAC5B,QAAQ,SAAS,IAAI,GAAG,IAAI,IAC1B,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC"}
@@ -1,51 +0,0 @@
1
- import type { XYPosition, Dimensions, NodeBase, EdgeBase } from '.';
2
- export type NodeDimensionChange = {
3
- id: string;
4
- type: 'dimensions';
5
- dimensions?: Dimensions;
6
- resizing?: boolean;
7
- setAttributes?: boolean;
8
- };
9
- export type NodePositionChange = {
10
- id: string;
11
- type: 'position';
12
- position?: XYPosition;
13
- positionAbsolute?: XYPosition;
14
- dragging?: boolean;
15
- };
16
- export type NodeSelectionChange = {
17
- id: string;
18
- type: 'select';
19
- selected: boolean;
20
- };
21
- export type NodeRemoveChange = {
22
- id: string;
23
- type: 'remove';
24
- };
25
- export type NodeAddChange<NodeType extends NodeBase = NodeBase> = {
26
- item: NodeType;
27
- type: 'add';
28
- };
29
- export type NodeReplaceChange<NodeType extends NodeBase = NodeBase> = {
30
- id: string;
31
- item: NodeType;
32
- type: 'replace';
33
- };
34
- /**
35
- * Union type of all possible node changes.
36
- * @public
37
- */
38
- export type NodeChange<NodeType extends NodeBase = NodeBase> = NodeDimensionChange | NodePositionChange | NodeSelectionChange | NodeRemoveChange | NodeAddChange<NodeType> | NodeReplaceChange<NodeType>;
39
- export type EdgeSelectionChange = NodeSelectionChange;
40
- export type EdgeRemoveChange = NodeRemoveChange;
41
- export type EdgeAddChange<EdgeType extends EdgeBase = EdgeBase> = {
42
- item: EdgeType;
43
- type: 'add';
44
- };
45
- export type EdgeReplaceChange<EdgeType extends EdgeBase = EdgeBase> = {
46
- id: string;
47
- item: EdgeType;
48
- type: 'replace';
49
- };
50
- export type EdgeChange<EdgeType extends EdgeBase = EdgeBase> = EdgeSelectionChange | EdgeRemoveChange | EdgeAddChange<EdgeType> | EdgeReplaceChange<EdgeType>;
51
- //# sourceMappingURL=changes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../../src/types/system/changes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;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AI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,QAAQ,SAAS,QAAQ,GAAG,QAAQ,IACvD,mBAAmB,GACnB,gBAAgB,GAChB,aAAa,CAAC,QAAQ,CAAC,GACvB,iBAAiB,CAAC,QAAQ,CAAC,CAAC"}
@@ -1,83 +0,0 @@
1
- import { Position } from './utils';
2
- export type EdgeBase<EdgeData extends Record<string, unknown> = Record<string, unknown>, EdgeType extends string | undefined = string | undefined> = {
3
- /** Unique id of an edge */
4
- id: string;
5
- /** Type of an edge defined in edgeTypes */
6
- type?: EdgeType;
7
- /** Id of source node */
8
- source: string;
9
- /** Id of target node */
10
- target: string;
11
- /** Id of source handle
12
- * only needed if there are multiple handles per node
13
- */
14
- sourceHandle?: string | null;
15
- /** Id of target handle
16
- * only needed if there are multiple handles per node
17
- */
18
- targetHandle?: string | null;
19
- animated?: boolean;
20
- hidden?: boolean;
21
- deletable?: boolean;
22
- selectable?: boolean;
23
- /** Arbitrary data passed to an edge */
24
- data?: EdgeData;
25
- selected?: boolean;
26
- /** Set the marker on the beginning of an edge
27
- * @example 'arrow', 'arrowclosed' or custom marker
28
- */
29
- markerStart?: EdgeMarkerType;
30
- /** Set the marker on the end of an edge
31
- * @example 'arrow', 'arrowclosed' or custom marker
32
- */
33
- markerEnd?: EdgeMarkerType;
34
- zIndex?: number;
35
- ariaLabel?: string;
36
- /** Padding around the edge where interaction is still possible */
37
- interactionWidth?: number;
38
- };
39
- export type SmoothStepPathOptions = {
40
- offset?: number;
41
- borderRadius?: number;
42
- };
43
- export type StepPathOptions = {
44
- offset?: number;
45
- };
46
- export type BezierPathOptions = {
47
- curvature?: number;
48
- };
49
- export type DefaultEdgeOptionsBase<EdgeType extends EdgeBase> = Omit<EdgeType, 'id' | 'source' | 'target' | 'sourceHandle' | 'targetHandle' | 'selected'>;
50
- export declare enum ConnectionLineType {
51
- Bezier = "default",
52
- Straight = "straight",
53
- Step = "step",
54
- SmoothStep = "smoothstep",
55
- SimpleBezier = "simplebezier"
56
- }
57
- export type EdgeMarker = {
58
- type: MarkerType;
59
- color?: string;
60
- width?: number;
61
- height?: number;
62
- markerUnits?: string;
63
- orient?: string;
64
- strokeWidth?: number;
65
- };
66
- export type EdgeMarkerType = string | EdgeMarker;
67
- export declare enum MarkerType {
68
- Arrow = "arrow",
69
- ArrowClosed = "arrowclosed"
70
- }
71
- export type MarkerProps = EdgeMarker & {
72
- id: string;
73
- };
74
- export type EdgePosition = {
75
- sourceX: number;
76
- sourceY: number;
77
- targetX: number;
78
- targetY: number;
79
- sourcePosition: Position;
80
- targetPosition: Position;
81
- };
82
- export type EdgeLookup<EdgeType extends EdgeBase = EdgeBase> = Map<string, EdgeType>;
83
- //# sourceMappingURL=edges.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"edges.d.ts","sourceRoot":"","sources":["../../../src/types/system/edges.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,MAAM,MAAM,QAAQ,CAClB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,QAAQ,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,IACtD;IACF,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,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AAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,CAAC;AAEjD,oBAAY,UAAU;IACpB,KAAK,UAAU;IACf,WAAW,gBAAgB;CAC5B;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IACrC,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,QAAQ,CAAC;IACzB,cAAc,EAAE,QAAQ,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,QAAQ,SAAS,QAAQ,GAAG,QAAQ,IAAI,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC"}
@@ -1,119 +0,0 @@
1
- import type { D3DragEvent, Selection as D3Selection, SubjectPosition, ZoomBehavior } from 'd3';
2
- import type { XYPosition, Rect } from './utils';
3
- import type { InternalNodeBase, NodeBase, NodeDragItem, NodeOrigin } from './nodes';
4
- import type { ConnectingHandle, HandleType } from './handles';
5
- import { PanZoomInstance } from './panzoom';
6
- import { EdgeBase } from '.';
7
- export type Project = (position: XYPosition) => XYPosition;
8
- export type OnMove = (event: MouseEvent | TouchEvent | null, viewport: Viewport) => void;
9
- export type OnMoveStart = OnMove;
10
- export type OnMoveEnd = OnMove;
11
- export type ZoomInOut = (options?: ViewportHelperFunctionOptions) => void;
12
- export type ZoomTo = (zoomLevel: number, options?: ViewportHelperFunctionOptions) => void;
13
- export type GetZoom = () => number;
14
- export type GetViewport = () => Viewport;
15
- export type SetViewport = (viewport: Viewport, options?: ViewportHelperFunctionOptions) => void;
16
- export type SetCenter = (x: number, y: number, options?: SetCenterOptions) => void;
17
- export type FitBounds = (bounds: Rect, options?: FitBoundsOptions) => void;
18
- export type Connection = {
19
- source: string;
20
- target: string;
21
- sourceHandle: string | null;
22
- targetHandle: string | null;
23
- };
24
- export type HandleConnection = Connection & {
25
- edgeId: string;
26
- };
27
- export type ConnectionStatus = 'valid' | 'invalid';
28
- export declare enum ConnectionMode {
29
- Strict = "strict",
30
- Loose = "loose"
31
- }
32
- export type OnConnectStartParams = {
33
- nodeId: string | null;
34
- handleId: string | null;
35
- handleType: HandleType | null;
36
- };
37
- export type OnConnectStart = (event: MouseEvent | TouchEvent, params: OnConnectStartParams) => void;
38
- export type OnConnect = (connection: Connection) => void;
39
- export type OnConnectEnd = (event: MouseEvent | TouchEvent) => void;
40
- export type IsValidConnection = (edge: EdgeBase | Connection) => boolean;
41
- export type FitViewParamsBase<NodeType extends NodeBase> = {
42
- nodeLookup: Map<string, InternalNodeBase<NodeType>>;
43
- width: number;
44
- height: number;
45
- panZoom: PanZoomInstance;
46
- minZoom: number;
47
- maxZoom: number;
48
- nodeOrigin?: NodeOrigin;
49
- };
50
- export type FitViewOptionsBase<NodeType extends NodeBase = NodeBase> = {
51
- padding?: number;
52
- includeHiddenNodes?: boolean;
53
- minZoom?: number;
54
- maxZoom?: number;
55
- duration?: number;
56
- nodes?: (NodeType | {
57
- id: string;
58
- })[];
59
- };
60
- export type Viewport = {
61
- x: number;
62
- y: number;
63
- zoom: number;
64
- };
65
- export type KeyCode = string | Array<string>;
66
- export type SnapGrid = [number, number];
67
- export declare enum PanOnScrollMode {
68
- Free = "free",
69
- Vertical = "vertical",
70
- Horizontal = "horizontal"
71
- }
72
- export type ViewportHelperFunctionOptions = {
73
- duration?: number;
74
- };
75
- export type SetCenterOptions = ViewportHelperFunctionOptions & {
76
- zoom?: number;
77
- };
78
- export type FitBoundsOptions = ViewportHelperFunctionOptions & {
79
- padding?: number;
80
- };
81
- export type OnViewportChange = (viewport: Viewport) => void;
82
- export type D3ZoomInstance = ZoomBehavior<Element, unknown>;
83
- export type D3SelectionInstance = D3Selection<Element, unknown, null, undefined>;
84
- export type D3ZoomHandler = (this: Element, event: any, d: unknown) => void;
85
- export type UpdateNodeInternals = (nodeId: string | string[]) => void;
86
- export type PanelPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
87
- export type ProOptions = {
88
- account?: string;
89
- hideAttribution: boolean;
90
- };
91
- export type UseDragEvent = D3DragEvent<HTMLDivElement, null, SubjectPosition>;
92
- export declare enum SelectionMode {
93
- Partial = "partial",
94
- Full = "full"
95
- }
96
- export type SelectionRect = Rect & {
97
- startX: number;
98
- startY: number;
99
- };
100
- export type OnError = (id: string, message: string) => void;
101
- export type UpdateNodePositions = (dragItems: Map<string, NodeDragItem | InternalNodeBase>, dragging?: boolean) => void;
102
- export type PanBy = (delta: XYPosition) => boolean;
103
- export type UpdateConnection = (params: {
104
- connectionPosition: XYPosition | null;
105
- connectionStatus: ConnectionStatus | null;
106
- connectionStartHandle: ConnectingHandle | null;
107
- connectionEndHandle: ConnectingHandle | null;
108
- }) => void;
109
- export type ColorModeClass = 'light' | 'dark';
110
- export type ColorMode = ColorModeClass | 'system';
111
- export type ConnectionLookup = Map<string, Map<string, HandleConnection>>;
112
- export type OnBeforeDeleteBase<NodeType extends NodeBase = NodeBase, EdgeType extends EdgeBase = EdgeBase> = ({ nodes, edges, }: {
113
- nodes: NodeType[];
114
- edges: EdgeType[];
115
- }) => Promise<boolean | {
116
- nodes: NodeType[];
117
- edges: EdgeType[];
118
- }>;
119
- //# sourceMappingURL=general.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../src/types/system/general.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,IAAI,WAAW,EACxB,eAAe,EACf,YAAY,EACb,MAAM,IAAI,CAAC;AAEZ,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,UAAU,EACX,MAAM,SAAS,CAAC;AACjB,O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,CAAC;AAElD,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAE1E,MAAM,MAAM,kBAAkB,CAC5B,QAAQ,SAAS,QAAQ,GAAG,QAAQ,EACpC,QAAQ,SAAS,QAAQ,GAAG,QAAQ,IAClC,CAAC,EACH,KAAK,EACL,KAAK,GACN,EAAE;IACD,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,KAAK,OAAO,CAAC,OAAO,GAAG;IAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAAC,KAAK,EAAE,QAAQ,EAAE,CAAA;CAAE,CAAC,CAAC"}
@@ -1,51 +0,0 @@
1
- import type { Position, OnConnect, IsValidConnection } from '.';
2
- export type HandleType = 'source' | 'target';
3
- export type HandleElement = {
4
- id?: string | null;
5
- x: number;
6
- y: number;
7
- width: number;
8
- height: number;
9
- position: Position;
10
- type?: HandleType;
11
- };
12
- export type ConnectingHandle = {
13
- nodeId: string;
14
- type: HandleType;
15
- handleId?: string | null;
16
- };
17
- export type ConnectionHandle = {
18
- id: string | null;
19
- type: HandleType;
20
- nodeId: string;
21
- x: number;
22
- y: number;
23
- };
24
- export type HandleProps = {
25
- /** Type of the handle
26
- * @example HandleType.Source, HandleType.Target
27
- */
28
- type: HandleType;
29
- /** Position of the handle
30
- * @example Position.TopLeft, Position.TopRight,
31
- * Position.BottomLeft, Position.BottomRight
32
- */
33
- position: Position;
34
- /** Should you be able to connect to/from this handle */
35
- isConnectable?: boolean;
36
- /** Should you be able to connect from this handle */
37
- isConnectableStart?: boolean;
38
- /** Should you be able to connect to this handle */
39
- isConnectableEnd?: boolean;
40
- /** Callback called when connection is made */
41
- onConnect?: OnConnect;
42
- /** Callback if connection is valid
43
- * @remarks connection becomes an edge if isValidConnection returns true
44
- */
45
- isValidConnection?: IsValidConnection;
46
- /** Id of the handle
47
- * @remarks optional if there is only one handle of this type
48
- */
49
- id?: string;
50
- };
51
- //# sourceMappingURL=handles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"handles.d.ts","sourceRoot":"","sources":["../../../src/types/system/handles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAC;AAEhE,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE7C,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB;;;OAGG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB,wDAAwD;IACxD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,8CAA8C;IAC9C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC"}
@@ -1,8 +0,0 @@
1
- export * from './changes';
2
- export * from './general';
3
- export * from './nodes';
4
- export * from './edges';
5
- export * from './handles';
6
- export * from './utils';
7
- export * from './panzoom';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/system/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}