react-cosmos-diagram 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/components/Background/LinePath.d.ts +8 -0
- package/dist/esm/components/Background/LinePath.d.ts.map +1 -0
- package/dist/esm/components/Background/index.d.ts +9 -0
- package/dist/esm/components/Background/index.d.ts.map +1 -0
- package/dist/esm/components/Background/type.d.ts +6 -0
- package/dist/esm/components/Background/type.d.ts.map +1 -0
- package/dist/esm/components/Edges/Anchor.d.ts +2 -2
- package/dist/esm/components/Edges/Anchor.d.ts.map +1 -1
- package/dist/esm/components/Edges/EdgeWrapper/index.d.ts.map +1 -1
- package/dist/esm/components/Edges/EdgeWrapper/type.d.ts +3 -1
- package/dist/esm/components/Edges/EdgeWrapper/type.d.ts.map +1 -1
- package/dist/esm/components/Port/utils.d.ts +9 -1
- package/dist/esm/components/Port/utils.d.ts.map +1 -1
- package/dist/esm/components/ReactDiagramProvider/type.d.ts +5 -2
- package/dist/esm/components/ReactDiagramProvider/type.d.ts.map +1 -1
- package/dist/esm/components/SelectionBox/index.d.ts.map +1 -1
- package/dist/esm/components/StoreUpdater/index.d.ts +2 -2
- package/dist/esm/components/StoreUpdater/index.d.ts.map +1 -1
- package/dist/esm/container/ConnectionLineRenderer/ConnectionPath.d.ts +17 -0
- package/dist/esm/container/ConnectionLineRenderer/ConnectionPath.d.ts.map +1 -0
- package/dist/esm/container/ConnectionLineRenderer/index.d.ts +11 -0
- package/dist/esm/container/ConnectionLineRenderer/index.d.ts.map +1 -0
- package/dist/esm/container/ConnectionLineRenderer/type.d.ts +15 -0
- package/dist/esm/container/ConnectionLineRenderer/type.d.ts.map +1 -0
- package/dist/esm/container/DragSelection/index.d.ts +0 -3
- package/dist/esm/container/DragSelection/index.d.ts.map +1 -1
- package/dist/esm/container/EdgeRenderer/index.d.ts +2 -2
- package/dist/esm/container/EdgeRenderer/index.d.ts.map +1 -1
- package/dist/esm/container/EdgeRenderer/type.d.ts +3 -3
- package/dist/esm/container/EdgeRenderer/type.d.ts.map +1 -1
- package/dist/esm/container/NodeRenderer/index.d.ts.map +1 -1
- package/dist/esm/container/Pane/index.d.ts.map +1 -1
- package/dist/esm/container/ReactDiagram/DiagramView.d.ts +1 -1
- package/dist/esm/container/ReactDiagram/DiagramView.d.ts.map +1 -1
- package/dist/esm/container/ReactDiagram/index.d.ts +6 -4
- package/dist/esm/container/ReactDiagram/index.d.ts.map +1 -1
- package/dist/esm/hooks/useDrag/index.d.ts.map +1 -1
- package/dist/esm/hooks/useDrag/type.d.ts +3 -10
- package/dist/esm/hooks/useDrag/type.d.ts.map +1 -1
- package/dist/esm/hooks/useDrag/utils.d.ts +7 -6
- package/dist/esm/hooks/useDrag/utils.d.ts.map +1 -1
- package/dist/esm/hooks/useGetPointerPosition.d.ts +14 -2
- package/dist/esm/hooks/useGetPointerPosition.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1597 -1548
- package/dist/esm/store/index.d.ts.map +1 -1
- package/dist/esm/store/initialState.d.ts.map +1 -1
- package/dist/esm/types/core.d.ts +7 -5
- package/dist/esm/types/core.d.ts.map +1 -1
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/style.css +12 -6
- package/dist/umd/components/Background/LinePath.d.ts +8 -0
- package/dist/umd/components/Background/LinePath.d.ts.map +1 -0
- package/dist/umd/components/Background/index.d.ts +9 -0
- package/dist/umd/components/Background/index.d.ts.map +1 -0
- package/dist/umd/components/Background/type.d.ts +6 -0
- package/dist/umd/components/Background/type.d.ts.map +1 -0
- package/dist/umd/components/Edges/Anchor.d.ts +2 -2
- package/dist/umd/components/Edges/Anchor.d.ts.map +1 -1
- package/dist/umd/components/Edges/EdgeWrapper/index.d.ts.map +1 -1
- package/dist/umd/components/Edges/EdgeWrapper/type.d.ts +3 -1
- package/dist/umd/components/Edges/EdgeWrapper/type.d.ts.map +1 -1
- package/dist/umd/components/Port/utils.d.ts +9 -1
- package/dist/umd/components/Port/utils.d.ts.map +1 -1
- package/dist/umd/components/ReactDiagramProvider/type.d.ts +5 -2
- package/dist/umd/components/ReactDiagramProvider/type.d.ts.map +1 -1
- package/dist/umd/components/SelectionBox/index.d.ts.map +1 -1
- package/dist/umd/components/StoreUpdater/index.d.ts +2 -2
- package/dist/umd/components/StoreUpdater/index.d.ts.map +1 -1
- package/dist/umd/container/ConnectionLineRenderer/ConnectionPath.d.ts +17 -0
- package/dist/umd/container/ConnectionLineRenderer/ConnectionPath.d.ts.map +1 -0
- package/dist/umd/container/ConnectionLineRenderer/index.d.ts +11 -0
- package/dist/umd/container/ConnectionLineRenderer/index.d.ts.map +1 -0
- package/dist/umd/container/ConnectionLineRenderer/type.d.ts +15 -0
- package/dist/umd/container/ConnectionLineRenderer/type.d.ts.map +1 -0
- package/dist/umd/container/DragSelection/index.d.ts +0 -3
- package/dist/umd/container/DragSelection/index.d.ts.map +1 -1
- package/dist/umd/container/EdgeRenderer/index.d.ts +2 -2
- package/dist/umd/container/EdgeRenderer/index.d.ts.map +1 -1
- package/dist/umd/container/EdgeRenderer/type.d.ts +3 -3
- package/dist/umd/container/EdgeRenderer/type.d.ts.map +1 -1
- package/dist/umd/container/NodeRenderer/index.d.ts.map +1 -1
- package/dist/umd/container/Pane/index.d.ts.map +1 -1
- package/dist/umd/container/ReactDiagram/DiagramView.d.ts +1 -1
- package/dist/umd/container/ReactDiagram/DiagramView.d.ts.map +1 -1
- package/dist/umd/container/ReactDiagram/index.d.ts +6 -4
- package/dist/umd/container/ReactDiagram/index.d.ts.map +1 -1
- package/dist/umd/hooks/useDrag/index.d.ts.map +1 -1
- package/dist/umd/hooks/useDrag/type.d.ts +3 -10
- package/dist/umd/hooks/useDrag/type.d.ts.map +1 -1
- package/dist/umd/hooks/useDrag/utils.d.ts +7 -6
- package/dist/umd/hooks/useDrag/utils.d.ts.map +1 -1
- package/dist/umd/hooks/useGetPointerPosition.d.ts +14 -2
- package/dist/umd/hooks/useGetPointerPosition.d.ts.map +1 -1
- package/dist/umd/index.d.ts +1 -0
- package/dist/umd/index.d.ts.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/store/index.d.ts.map +1 -1
- package/dist/umd/store/initialState.d.ts.map +1 -1
- package/dist/umd/types/core.d.ts +7 -5
- package/dist/umd/types/core.d.ts.map +1 -1
- package/dist/umd/types/index.d.ts +2 -1
- package/dist/umd/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/esm/components/ConnectionEdge/ConnectionPath.d.ts +0 -16
- package/dist/esm/components/ConnectionEdge/ConnectionPath.d.ts.map +0 -1
- package/dist/esm/components/ConnectionEdge/index.d.ts +0 -11
- package/dist/esm/components/ConnectionEdge/index.d.ts.map +0 -1
- package/dist/esm/components/ConnectionEdge/type.d.ts +0 -22
- package/dist/esm/components/ConnectionEdge/type.d.ts.map +0 -1
- package/dist/umd/components/ConnectionEdge/ConnectionPath.d.ts +0 -16
- package/dist/umd/components/ConnectionEdge/ConnectionPath.d.ts.map +0 -1
- package/dist/umd/components/ConnectionEdge/index.d.ts +0 -11
- package/dist/umd/components/ConnectionEdge/index.d.ts.map +0 -1
- package/dist/umd/components/ConnectionEdge/type.d.ts +0 -22
- package/dist/umd/components/ConnectionEdge/type.d.ts.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type LinePathProps = {
|
|
2
|
+
scaledGap: [number, number];
|
|
3
|
+
lineWidth?: number;
|
|
4
|
+
color: string;
|
|
5
|
+
};
|
|
6
|
+
declare function LinePath({ color, scaledGap, lineWidth }: LinePathProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default LinePath;
|
|
8
|
+
//# sourceMappingURL=LinePath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinePath.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/Background/LinePath.tsx"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG;IAClB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,iBAAS,QAAQ,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,aAAa,2CAQ/D;AAED,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BackgroundProps } from './type';
|
|
3
|
+
declare function Background({ gap, lineWidth, color, }: BackgroundProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare namespace Background {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("react").MemoExoticComponent<typeof Background>;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/Background/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AASzC,iBAAS,UAAU,CAAC,EACjB,GAAG,EACH,SAAa,EACb,KAAiB,GACnB,EAAE,eAAe,2CA6CjB;kBAjDQ,UAAU;;;;AAqDnB,wBAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/Background/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MouseEvent as ReactMouseEvent, SVGAttributes } from 'react';
|
|
2
2
|
import { Position } from '../../types';
|
|
3
|
-
type EventNames = 'onMouseDown'
|
|
3
|
+
type EventNames = 'onMouseDown';
|
|
4
4
|
type AnchorEvents = {
|
|
5
5
|
[H in EventNames]?: (event: ReactMouseEvent<SVGGElement, MouseEvent>) => void;
|
|
6
6
|
};
|
|
@@ -11,6 +11,6 @@ interface AnchorProps extends SVGAttributes<SVGGElement>, AnchorEvents {
|
|
|
11
11
|
radius?: number;
|
|
12
12
|
type: string;
|
|
13
13
|
}
|
|
14
|
-
declare function Anchor({ position, centerX, centerY, radius, onMouseDown,
|
|
14
|
+
declare function Anchor({ position, centerX, centerY, radius, onMouseDown, type, }: AnchorProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export default Anchor;
|
|
16
16
|
//# sourceMappingURL=Anchor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/Edges/Anchor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,KAAK,UAAU,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"Anchor.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/Edges/Anchor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,eAAe,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,KAAK,UAAU,GAAG,aAAa,CAAC;AAGhC,KAAK,YAAY,GAAG;KAChB,CAAC,IAAI,UAAU,CAAC,CAAC,EAAE,CACjB,KAAK,EAAE,eAAe,CAAC,WAAW,EAAE,UAAU,CAAC,KAC7C,IAAI;CACX,CAAC;AAEF,UAAU,WAAY,SAAQ,aAAa,CAAC,WAAW,CAAC,EAAE,YAAY;IACnE,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACf;AAwBD,iBAAS,MAAM,CAAC,EACb,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAW,EACX,WAAW,EAGX,IAAI,GACN,EAAE,WAAW,2CAiBb;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../react-diagram/packages/src/components/Edges/EdgeWrapper/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKpE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,wBAAgB,eAAe,CAC5B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,EACjD,OAAO,CAAC,EAAE,CACP,KAAK,EAAE,eAAe,CAAC,WAAW,EAAE,UAAU,CAAC,EAC/C,IAAI,EAAE,IAAI,KACR,IAAI,YAII,gBAAgB,WAAW,EAAE,UAAU,CAAC,uBAOvD;AAED,QAAA,MAAM,QAAQ,kBAAmB,cAAc,SAAS,CAAC;YAC1B,aAAa,GAAG,WAAW,GAAG,IAAI;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../react-diagram/packages/src/components/Edges/EdgeWrapper/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKpE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,wBAAgB,eAAe,CAC5B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,EACjD,OAAO,CAAC,EAAE,CACP,KAAK,EAAE,eAAe,CAAC,WAAW,EAAE,UAAU,CAAC,EAC/C,IAAI,EAAE,IAAI,KACR,IAAI,YAII,gBAAgB,WAAW,EAAE,UAAU,CAAC,uBAOvD;AAED,QAAA,MAAM,QAAQ,kBAAmB,cAAc,SAAS,CAAC;YAC1B,aAAa,GAAG,WAAW,GAAG,IAAI;;EA6QhE,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
1
|
+
import { ComponentType, MemoExoticComponent, MouseEvent as ReactMouseEvent } from 'react';
|
|
2
2
|
import { Position, Connection } from '../../../types';
|
|
3
3
|
import { PortType } from '../../Port/type';
|
|
4
4
|
import { Edge } from '../type';
|
|
@@ -14,6 +14,7 @@ export type WrapEdgeProps<T = any> = Edge<T> & {
|
|
|
14
14
|
elementsSelectable?: boolean;
|
|
15
15
|
rfId?: string;
|
|
16
16
|
isFocusable: boolean;
|
|
17
|
+
edgeUpdaterRadius?: number;
|
|
17
18
|
onClick?: EdgeMouseHandler;
|
|
18
19
|
onDoubleClick?: EdgeMouseHandler;
|
|
19
20
|
onContextMenu?: EdgeMouseHandler;
|
|
@@ -24,4 +25,5 @@ export type WrapEdgeProps<T = any> = Edge<T> & {
|
|
|
24
25
|
onEdgeUpdateStart?: (event: ReactMouseEvent, edge: Edge, portType: PortType) => void;
|
|
25
26
|
onEdgeUpdateEnd?: (event: MouseEvent | TouchEvent, edge: Edge, portType: PortType) => void;
|
|
26
27
|
};
|
|
28
|
+
export type EdgeWrapperComponent = MemoExoticComponent<ComponentType<WrapEdgeProps>>;
|
|
27
29
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../react-diagram/packages/src/components/Edges/EdgeWrapper/type.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../react-diagram/packages/src/components/Edges/EdgeWrapper/type.ts"],"names":[],"mappings":"AAAA,OAAO,EACJ,aAAa,EACb,mBAAmB,EACnB,UAAU,IAAI,eAAe,EAC/B,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;AAE5E,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,GAAG,IAAI,CACrC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,EACnB,aAAa,EAAE,UAAU,KACvB,IAAI,CAAC;AAEV,MAAM,MAAM,aAAa,CAAC,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG;IAC5C,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;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IAErB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,iBAAiB,CAAC,EAAE,CACjB,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,KAChB,IAAI,CAAC;IACV,eAAe,CAAC,EAAE,CACf,KAAK,EAAE,UAAU,GAAG,UAAU,EAC9B,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,KAChB,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CACnD,aAAa,CAAC,aAAa,CAAC,CAC9B,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { MouseEvent as ReactMouseEvent, TouchEvent as ReactTouchEvent } from 'react';
|
|
2
2
|
import { StoreApi } from 'zustand';
|
|
3
|
-
import { OnConnect } from '../../types';
|
|
3
|
+
import { OnConnect, XYPosition } from '../../types';
|
|
4
4
|
import { ReactDiagramState } from '../ReactDiagramProvider/type';
|
|
5
5
|
import { PortType } from './type';
|
|
6
|
+
type ConnectionPort = {
|
|
7
|
+
type: PortType;
|
|
8
|
+
nodeId: string;
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
6
12
|
export declare const getHostForElement: (element: HTMLElement) => Document | ShadowRoot;
|
|
13
|
+
export declare const getClosestPort: (pos: XYPosition, connectionRadius: number, ports: ConnectionPort[]) => ConnectionPort | null;
|
|
7
14
|
export declare const handlePointerDown: ({ isAnchor, event, nodeId, portType, getState, setState, onConnect, onEdgeUpdateEnd, }: {
|
|
8
15
|
isAnchor?: boolean | undefined;
|
|
9
16
|
event: ReactMouseEvent | ReactTouchEvent;
|
|
@@ -14,4 +21,5 @@ export declare const handlePointerDown: ({ isAnchor, event, nodeId, portType, ge
|
|
|
14
21
|
onConnect: OnConnect;
|
|
15
22
|
onEdgeUpdateEnd?: ((evt: MouseEvent | TouchEvent) => void) | undefined;
|
|
16
23
|
}) => void;
|
|
24
|
+
export {};
|
|
17
25
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/Port/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACJ,UAAU,IAAI,eAAe,EAC7B,UAAU,IAAI,eAAe,EAC/B,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQnC,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/Port/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACJ,UAAU,IAAI,eAAe,EAC7B,UAAU,IAAI,eAAe,EAC/B,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQnC,OAAO,EAGJ,SAAS,EAET,UAAU,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAc,MAAM,QAAQ,CAAC;AAa9C,KAAK,cAAc,GAAG;IAEnB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAClB,WAAW,KACpB,QAAQ,GAAG,UAC2D,CAAC;AA2G1E,eAAO,MAAM,cAAc,QACnB,UAAU,oBACG,MAAM,SACjB,cAAc,EAAE,KACvB,cAAc,GAAG,IAenB,CAAC;AAwBF,eAAO,MAAM,iBAAiB;;WAWpB,eAAe,GAAG,eAAe;YAChC,MAAM;cACJ,QAAQ;cACR,SAAS,iBAAiB,CAAC,CAAC,UAAU,CAAC;cACvC,SAAS,iBAAiB,CAAC,CAAC,UAAU,CAAC;eACtC,SAAS;6BACI,UAAU,GAAG,UAAU,KAAK,IAAI;MACvD,IAoHH,CAAC"}
|
|
@@ -18,12 +18,14 @@ export type ReactDiagramStore = {
|
|
|
18
18
|
defaultEdgeOptions?: DefaultEdgeOptions;
|
|
19
19
|
domNode: HTMLDivElement | null;
|
|
20
20
|
nodeOrigin: NodeOrigin;
|
|
21
|
+
smoothStep: boolean;
|
|
22
|
+
centerStep: boolean;
|
|
21
23
|
gridStep?: GridStep;
|
|
22
|
-
nodesSelectionActive: boolean;
|
|
23
24
|
elevateNodesOnSelect: boolean;
|
|
24
25
|
nodesDraggable: boolean;
|
|
25
26
|
multiSelectionActive: boolean;
|
|
26
27
|
elementsSelectable: boolean;
|
|
28
|
+
selectionBoxActive: boolean;
|
|
27
29
|
d3Zoom: ZoomBehavior<Element, unknown> | null;
|
|
28
30
|
d3Selection: D3Selection<Element, unknown, null, undefined> | null;
|
|
29
31
|
minZoom: number;
|
|
@@ -44,6 +46,7 @@ export type ReactDiagramStore = {
|
|
|
44
46
|
autoPanOnConnect: boolean;
|
|
45
47
|
nodeExtent: CoordinateExtent;
|
|
46
48
|
translateExtent: CoordinateExtent;
|
|
49
|
+
connectionRadius: number;
|
|
47
50
|
};
|
|
48
51
|
export type ReactDiagramActions = {
|
|
49
52
|
setNodes: (nodes: Node[]) => void;
|
|
@@ -53,7 +56,7 @@ export type ReactDiagramActions = {
|
|
|
53
56
|
resetSelectedElements: () => void;
|
|
54
57
|
setEdges: (edges: Edge[]) => void;
|
|
55
58
|
updateNodeDimensions: (updates: NodeDimensionUpdate[]) => void;
|
|
56
|
-
|
|
59
|
+
updateNodesPosition: (nodeDragItems: NodeDragItem[] | Node[], dragging: boolean, updateFunc?: (node: NodeDragItem | Node) => void) => void;
|
|
57
60
|
triggerNodeChanges: (changes: NodeChange[]) => void;
|
|
58
61
|
cancelConnection: () => void;
|
|
59
62
|
panBy: (delta: XYPosition) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/ReactDiagramProvider/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,IAAI,CAAC;AAE5D,OAAO,EACJ,IAAI,EACJ,IAAI,EACJ,kBAAkB,EAClB,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,SAAS,EACT,cAAc,EACd,YAAY,EACd,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EACJ,UAAU,EACV,aAAa,EACb,aAAa,EACf,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,MAAM,mBAAmB,GAAG;IAC/B,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/ReactDiagramProvider/type.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/SelectionBox/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/SelectionBox/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,iBAAS,YAAY,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,2CA8B3E;;AAED,wBAAkC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactDiagramProps } from '../../types';
|
|
2
|
-
export type StoreUpdaterProps = Pick<ReactDiagramProps, 'nodes' | 'onNodesChange' | 'onNodeDrag' | 'onNodeDragStart' | 'onNodeDragEnd' | 'edges' | 'onEdgesChange' | 'gridStep' | 'elevateNodesOnSelect' | 'nodesDraggable' | 'autoPanOnNodeDrag' | 'autoPanOnConnect' | 'onConnect' | 'onConnectStart' | 'onConnectEnd' | 'onError' | 'nodeExtent' | 'translateExtent' | 'minZoom' | 'maxZoom'> & {
|
|
2
|
+
export type StoreUpdaterProps = Pick<ReactDiagramProps, 'nodes' | 'onNodesChange' | 'onNodeDrag' | 'onNodeDragStart' | 'onNodeDragEnd' | 'edges' | 'onEdgesChange' | 'smoothStep' | 'centerStep' | 'gridStep' | 'elevateNodesOnSelect' | 'nodesDraggable' | 'autoPanOnNodeDrag' | 'autoPanOnConnect' | 'onConnect' | 'onConnectStart' | 'onConnectEnd' | 'connectionRadius' | 'onError' | 'nodeExtent' | 'translateExtent' | 'minZoom' | 'maxZoom'> & {
|
|
3
3
|
rfId: string;
|
|
4
4
|
};
|
|
5
|
-
declare const StoreUpdater: ({ nodes, onNodesChange, onNodeDrag, onNodeDragStart, onNodeDragEnd, edges, onEdgesChange, gridStep, elevateNodesOnSelect, nodesDraggable, autoPanOnNodeDrag, autoPanOnConnect, onConnect, onConnectStart, onConnectEnd, onError, nodeExtent, translateExtent, minZoom, maxZoom, }: StoreUpdaterProps) => null;
|
|
5
|
+
declare const StoreUpdater: ({ nodes, onNodesChange, onNodeDrag, onNodeDragStart, onNodeDragEnd, edges, onEdgesChange, smoothStep, centerStep, gridStep, elevateNodesOnSelect, nodesDraggable, autoPanOnNodeDrag, autoPanOnConnect, connectionRadius, onConnect, onConnectStart, onConnectEnd, onError, nodeExtent, translateExtent, minZoom, maxZoom, }: StoreUpdaterProps) => null;
|
|
6
6
|
export default StoreUpdater;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/StoreUpdater/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQlE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACjC,iBAAiB,EACf,OAAO,GACP,eAAe,GACf,YAAY,GACZ,iBAAiB,GACjB,eAAe,GACf,OAAO,GACP,eAAe,GACf,UAAU,GACV,sBAAsB,GACtB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,WAAW,GACX,gBAAgB,GAChB,cAAc,GACd,SAAS,GACT,YAAY,GACZ,iBAAiB,GACjB,SAAS,GACT,SAAS,CACb,GAAG;IACD,IAAI,EAAE,MAAM,CAAC;CACf,CAAC;AA6CF,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/components/StoreUpdater/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAoB,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQlE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACjC,iBAAiB,EACf,OAAO,GACP,eAAe,GACf,YAAY,GACZ,iBAAiB,GACjB,eAAe,GACf,OAAO,GACP,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,sBAAsB,GACtB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,WAAW,GACX,gBAAgB,GAChB,cAAc,GACd,kBAAkB,GAClB,SAAS,GACT,YAAY,GACZ,iBAAiB,GACjB,SAAS,GACT,SAAS,CACb,GAAG;IACD,IAAI,EAAE,MAAM,CAAC;CACf,CAAC;AA6CF,QAAA,MAAM,YAAY,gUAwBf,iBAAiB,SAmDnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Edge } from '../../types';
|
|
2
|
+
import { PortType } from '../../components/Port/type';
|
|
3
|
+
import { EdgeWrapperComponent } from '../../components/Edges/EdgeWrapper/type';
|
|
4
|
+
import { ConnectionLineComponent } from './type';
|
|
5
|
+
type ConnectionPathProps = {
|
|
6
|
+
nodeId: string;
|
|
7
|
+
portType: PortType;
|
|
8
|
+
edge: Edge;
|
|
9
|
+
Component?: ConnectionLineComponent;
|
|
10
|
+
EdgeWrapper: EdgeWrapperComponent;
|
|
11
|
+
};
|
|
12
|
+
declare function ConnectionPath({ nodeId, portType, edge, Component, EdgeWrapper, }: ConnectionPathProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
declare namespace ConnectionPath {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
export default ConnectionPath;
|
|
17
|
+
//# sourceMappingURL=ConnectionPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectionPath.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/ConnectionLineRenderer/ConnectionPath.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,IAAI,EAAY,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEjD,KAAK,mBAAmB,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,oBAAoB,CAAC;CACpC,CAAC;AASF,iBAAS,cAAc,CAAC,EACrB,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,WAAW,GACb,EAAE,mBAAmB,kDAoErB;kBA1EQ,cAAc;;;AA8EvB,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { ConnectionLineComponent } from './type';
|
|
3
|
+
import { EdgeTypesWrapped } from '../EdgeRenderer/type';
|
|
4
|
+
type ConnectionLineRendererProps = {
|
|
5
|
+
containerStyle?: CSSProperties;
|
|
6
|
+
edgeTypes: EdgeTypesWrapped;
|
|
7
|
+
component?: ConnectionLineComponent;
|
|
8
|
+
};
|
|
9
|
+
declare function ConnectionLineRenderer({ containerStyle, edgeTypes, component, }: ConnectionLineRendererProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export default ConnectionLineRenderer;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/ConnectionLineRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,KAAK,2BAA2B,GAAG;IAChC,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACtC,CAAC;AAQF,iBAAS,sBAAsB,CAAC,EAC7B,cAAc,EACd,SAAS,EACT,SAAS,GACX,EAAE,2BAA2B,kDAgC7B;AAED,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { Node, Position } from '../../types';
|
|
3
|
+
import { PortElement } from '../../components/Port/type';
|
|
4
|
+
export type ConnectionLineComponentProps = {
|
|
5
|
+
fromNode?: Node;
|
|
6
|
+
fromPort?: PortElement;
|
|
7
|
+
fromX: number;
|
|
8
|
+
fromY: number;
|
|
9
|
+
toX: number;
|
|
10
|
+
toY: number;
|
|
11
|
+
fromPosition: Position;
|
|
12
|
+
toPosition: Position;
|
|
13
|
+
};
|
|
14
|
+
export type ConnectionLineComponent = ComponentType<ConnectionLineComponentProps>;
|
|
15
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/ConnectionLineRenderer/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,MAAM,4BAA4B,GAAG;IACxC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,QAAQ,CAAC;IACvB,UAAU,EAAE,QAAQ,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAChC,aAAa,CAAC,4BAA4B,CAAC,CAAC"}
|
|
@@ -4,8 +4,5 @@ type DragSelectionProps = {
|
|
|
4
4
|
dragSelectionKeyPressed?: boolean;
|
|
5
5
|
};
|
|
6
6
|
declare function DragSelection({ children, dragSelectionKeyPressed, }: DragSelectionProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
declare namespace DragSelection {
|
|
8
|
-
var displayName: string;
|
|
9
|
-
}
|
|
10
7
|
export default DragSelection;
|
|
11
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/DragSelection/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAC;AAiBtE,KAAK,kBAAkB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/DragSelection/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAC;AAiBtE,KAAK,kBAAkB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAcF,iBAAS,aAAa,CAAC,EACpB,QAAQ,EACR,uBAAuB,GACzB,EAAE,kBAAkB,2CA0LpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { ReactDiagramState } from '../../components/ReactDiagramProvider/type';
|
|
3
3
|
import { ReactDiagramProps } from '../../types';
|
|
4
4
|
import { EdgeTypesWrapped } from './type';
|
|
5
|
-
type GraphViewEdgeProps = Pick<ReactDiagramState, 'rfId'> & Pick<ReactDiagramProps, 'onEdgeClick' | 'onEdgeDoubleClick' | 'onEdgeContextMenu' | 'onEdgeMouseEnter' | 'onEdgeMouseMove' | 'onEdgeMouseLeave' | 'onEdgeUpdate' | 'onEdgeUpdateStart' | 'onEdgeUpdateEnd'>;
|
|
5
|
+
type GraphViewEdgeProps = Pick<ReactDiagramState, 'rfId'> & Pick<ReactDiagramProps, 'edgeUpdaterRadius' | 'onEdgeClick' | 'onEdgeDoubleClick' | 'onEdgeContextMenu' | 'onEdgeMouseEnter' | 'onEdgeMouseMove' | 'onEdgeMouseLeave' | 'onEdgeUpdate' | 'onEdgeUpdateStart' | 'onEdgeUpdateEnd'>;
|
|
6
6
|
type RequiredProps = Required<Pick<ReactDiagramProps, 'noPanClassName'>>;
|
|
7
7
|
type EdgeRendererProps = GraphViewEdgeProps & RequiredProps & {
|
|
8
8
|
edgeTypes: EdgeTypesWrapped;
|
|
9
9
|
};
|
|
10
|
-
declare function EdgeRenderer({ rfId, edgeTypes, noPanClassName, onEdgeClick, onEdgeDoubleClick, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeUpdate, onEdgeUpdateStart, onEdgeUpdateEnd, }: EdgeRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function EdgeRenderer({ rfId, edgeTypes, noPanClassName, edgeUpdaterRadius, onEdgeClick, onEdgeDoubleClick, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeUpdate, onEdgeUpdateStart, onEdgeUpdateEnd, }: EdgeRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
declare namespace EdgeRenderer {
|
|
12
12
|
var displayName: string;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/EdgeRenderer/index.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAY,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,KAAK,kBAAkB,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,GACtD,IAAI,CACD,iBAAiB,EACf,aAAa,GACb,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,iBAAiB,CACrB,CAAC;AAEL,KAAK,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzE,KAAK,iBAAiB,GAAG,kBAAkB,GACxC,aAAa,GAAG;IACb,SAAS,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAUL,iBAAS,YAAY,CAAC,EACnB,IAAI,EACJ,SAAS,EACT,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,GACjB,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/EdgeRenderer/index.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAY,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,KAAK,kBAAkB,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,GACtD,IAAI,CACD,iBAAiB,EACf,mBAAmB,GACnB,aAAa,GACb,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,iBAAiB,CACrB,CAAC;AAEL,KAAK,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAEzE,KAAK,iBAAiB,GAAG,kBAAkB,GACxC,aAAa,GAAG;IACb,SAAS,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAUL,iBAAS,YAAY,CAAC,EACnB,IAAI,EACJ,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,GACjB,EAAE,iBAAiB,2CA8InB;kBA5JQ,YAAY;;;;AAgKrB,wBAAkC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ComponentType
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
2
|
import { EdgeProps } from '../../components/Edges/type';
|
|
3
|
-
import {
|
|
3
|
+
import { EdgeWrapperComponent } from '../../components/Edges/EdgeWrapper/type';
|
|
4
4
|
export type EdgeTypes = {
|
|
5
5
|
[key: string]: ComponentType<EdgeProps>;
|
|
6
6
|
};
|
|
7
7
|
export type EdgeTypesWrapped = {
|
|
8
|
-
[key: string]:
|
|
8
|
+
[key: string]: EdgeWrapperComponent;
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/EdgeRenderer/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/EdgeRenderer/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E,MAAM,MAAM,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAAC;CACtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/NodeRenderer/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAY,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,KAAK,aAAa,GAAG,QAAQ,CAC1B,IAAI,CACD,iBAAiB,EACf,2BAA2B,GAC3B,qBAAqB,GACrB,YAAY,GACZ,iBAAiB,GACjB,gBAAgB,CACpB,CACH,CAAC;AAEF,KAAK,iBAAiB,GAAG,IAAI,CAC1B,iBAAiB,EACf,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,mBAAmB,CACvB,GACE,aAAa,GAAG;IACb,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACf,CAAC;AASL,iBAAS,YAAY,CAAC,EACnB,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/NodeRenderer/index.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAY,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,KAAK,aAAa,GAAG,QAAQ,CAC1B,IAAI,CACD,iBAAiB,EACf,2BAA2B,GAC3B,qBAAqB,GACrB,YAAY,GACZ,iBAAiB,GACjB,gBAAgB,CACpB,CACH,CAAC;AAEF,KAAK,iBAAiB,GAAG,IAAI,CAC1B,iBAAiB,EACf,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,mBAAmB,CACvB,GACE,aAAa,GAAG;IACb,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACf,CAAC;AASL,iBAAS,YAAY,CAAC,EACnB,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,GAAG,KAAK,EACV,EAAE,iBAAiB,2CA+HnB;kBAxIQ,YAAY;;;;AA4IrB,wBAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/Pane/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC,OAAO,EAAE,iBAAiB,EAA8B,MAAM,aAAa,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG,QAAQ,CAC7B,IAAI,CACD,iBAAiB,EACf,gBAAgB,GAChB,SAAS,GACT,SAAS,GACT,SAAS,GACT,iBAAiB,GACjB,iBAAiB,CACrB,GAAG;IACD,QAAQ,EAAE,SAAS,CAAC;CACtB,CACH,GACE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,aAAa,GAAG,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/Pane/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAavC,OAAO,EAAE,iBAAiB,EAA8B,MAAM,aAAa,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG,QAAQ,CAC7B,IAAI,CACD,iBAAiB,EACf,gBAAgB,GAChB,SAAS,GACT,SAAS,GACT,SAAS,GACT,iBAAiB,GACjB,iBAAiB,CACrB,GAAG;IACD,QAAQ,EAAE,SAAS,CAAC;CACtB,CACH,GACE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,GAAG,aAAa,GAAG,WAAW,CAAC,CAAC;AA4BnE,iBAAS,IAAI,CAAC,EACX,cAAc,EACd,OAAO,EACP,OAAO,EACP,OAAO,EACP,eAAe,EACf,eAAe,EACf,QAAQ,EAER,MAAM,EACN,WAAW,EACX,SAAS,GACX,EAAE,SAAS,2CA4JX;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -8,7 +8,7 @@ export type DiagramViewProps = ReactDiagramCommonProps & Required<Pick<ReactDiag
|
|
|
8
8
|
edgeTypes: EdgeTypesWrapped;
|
|
9
9
|
rfId: string;
|
|
10
10
|
};
|
|
11
|
-
declare function DiagramView({ rfId, noPanClassName, panning, defaultViewport, multiSelectionKeyCode, onMove, onMoveStart, onMoveEnd, onlyRenderVisibleElements, disableKeyboardA11y, noDragClassName, nodeOrigin, nodeTypes, onNodeClick, onNodeDoubleClick, onNodeContextMenu, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, edgeTypes, onEdgeClick, onEdgeDoubleClick, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeUpdate, onEdgeUpdateStart, onEdgeUpdateEnd,
|
|
11
|
+
declare function DiagramView({ rfId, noPanClassName, panning, defaultViewport, multiSelectionKeyCode, onMove, onMoveStart, onMoveEnd, onlyRenderVisibleElements, disableKeyboardA11y, noDragClassName, nodeOrigin, nodeTypes, onNodeClick, onNodeDoubleClick, onNodeContextMenu, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, edgeTypes, edgeUpdaterRadius, onEdgeClick, onEdgeDoubleClick, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeUpdate, onEdgeUpdateStart, onEdgeUpdateEnd, ConnectionLineContainerStyle, ConnectionLineComponent, }: DiagramViewProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
declare namespace DiagramView {
|
|
13
13
|
var displayName: string;
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DiagramView.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/ReactDiagram/DiagramView.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACvC,iBAAiB,EACjB,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,CAC/C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,GACnD,QAAQ,CACL,IAAI,CACD,iBAAiB,EACf,SAAS,GACT,iBAAiB,GACjB,2BAA2B,GAC3B,qBAAqB,GACrB,iBAAiB,GACjB,gBAAgB,GAChB,YAAY,CAChB,CACH,GAAG;IACD,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACf,CAAC;AAEL,iBAAS,WAAW,CAAC,EAClB,IAAI,EAIJ,cAAc,EACd,OAAO,EAEP,eAAe,EAEf,qBAAqB,EAErB,MAAM,EACN,WAAW,EACX,SAAS,EAGT,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAGhB,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAGf,4BAA4B,EAC5B,
|
|
1
|
+
{"version":3,"file":"DiagramView.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/ReactDiagram/DiagramView.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACvC,iBAAiB,EACjB,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,CAC/C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,GACnD,QAAQ,CACL,IAAI,CACD,iBAAiB,EACf,SAAS,GACT,iBAAiB,GACjB,2BAA2B,GAC3B,qBAAqB,GACrB,iBAAiB,GACjB,gBAAgB,GAChB,YAAY,CAChB,CACH,GAAG;IACD,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACf,CAAC;AAEL,iBAAS,WAAW,CAAC,EAClB,IAAI,EAIJ,cAAc,EACd,OAAO,EAEP,eAAe,EAEf,qBAAqB,EAErB,MAAM,EACN,WAAW,EACX,SAAS,EAGT,yBAAyB,EACzB,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAGhB,SAAS,EACT,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAGf,4BAA4B,EAC5B,uBAAuB,GACzB,EAAE,gBAAgB,2CAgDlB;kBA7FQ,WAAW;;;;AAiGpB,wBAAiC"}
|
|
@@ -8,16 +8,18 @@ declare const ReactDiagram: import("react").ForwardRefExoticComponent<import("re
|
|
|
8
8
|
disableKeyboardA11y?: boolean | undefined;
|
|
9
9
|
nodeExtent?: import("../../types").CoordinateExtent | undefined;
|
|
10
10
|
nodeOrigin?: NodeOrigin | undefined;
|
|
11
|
+
smoothStep?: boolean | undefined;
|
|
12
|
+
centerStep?: boolean | undefined;
|
|
11
13
|
gridStep?: import("../../types").GridStep | undefined;
|
|
12
14
|
elevateNodesOnSelect?: boolean | undefined;
|
|
13
15
|
nodes?: import("../../types").Node<any, string | undefined>[] | undefined;
|
|
14
16
|
nodeTypes?: NodeTypes | undefined;
|
|
15
17
|
edges?: import("../../types").Edge<any>[] | undefined;
|
|
16
18
|
edgeTypes?: EdgeTypes | undefined;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
edgeUpdaterRadius?: number | undefined;
|
|
20
|
+
ConnectionLineContainerStyle?: import("react").CSSProperties | undefined;
|
|
21
|
+
ConnectionLineComponent?: import("../ConnectionLineRenderer/type").ConnectionLineComponent | undefined;
|
|
22
|
+
connectionRadius?: number | undefined;
|
|
21
23
|
onNodesChange?: import("../../types").OnNodesChange | undefined;
|
|
22
24
|
onNodeClick?: import("../../components/Node/NodeWrapper/type").NodeMouseHandler | undefined;
|
|
23
25
|
onNodeDoubleClick?: import("../../components/Node/NodeWrapper/type").NodeMouseHandler | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/ReactDiagram/index.tsx"],"names":[],"mappings":";AAeA,OAAO,EAA0C,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAazD,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/container/ReactDiagram/index.tsx"],"names":[],"mappings":";AAeA,OAAO,EAA0C,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAazD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAiJjB,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/hooks/useDrag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/hooks/useDrag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAyB/D,KAAK,aAAa,GAAG;IAClB,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAKF,iBAAS,OAAO,CAAC,EACd,OAAO,EACP,MAAM,EACN,YAAY,EACZ,eAAe,GACjB,EAAE,aAAa,WAwQf;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
2
2
|
import { D3DragEvent, SubjectPosition } from 'd3';
|
|
3
|
-
import { XYPosition
|
|
3
|
+
import { XYPosition } from '../../types';
|
|
4
4
|
import { Node } from '../../types';
|
|
5
5
|
export type UseDragEvent = D3DragEvent<HTMLDivElement, null, SubjectPosition>;
|
|
6
|
-
export type
|
|
7
|
-
|
|
8
|
-
position: XYPosition;
|
|
9
|
-
positionAbsolute: XYPosition;
|
|
6
|
+
export type FilteredNode = Required<Pick<Node, 'id' | 'position' | 'positionAbsolute' | 'width' | 'height'>> & Pick<Node, 'extent' | 'parentNode' | 'dragging'>;
|
|
7
|
+
export type NodeDragItem = FilteredNode & {
|
|
10
8
|
distance: XYPosition;
|
|
11
|
-
width?: number | null;
|
|
12
|
-
height?: number | null;
|
|
13
|
-
extent?: 'parent' | CoordinateExtent;
|
|
14
|
-
parentNode?: string;
|
|
15
|
-
dragging?: boolean;
|
|
16
9
|
};
|
|
17
10
|
export type NodeDragHandler = (event: ReactMouseEvent, node: Node, nodes: Node[]) => void;
|
|
18
11
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/hooks/useDrag/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/hooks/useDrag/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,cAAc,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;AAE9E,MAAM,MAAM,YAAY,GAAG,QAAQ,CAChC,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,GAAG,kBAAkB,GAAG,OAAO,GAAG,QAAQ,CAAC,CACzE,GACE,IAAI,CAAC,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,UAAU,CAAC,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG;IACvC,QAAQ,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAC3B,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,IAAI,EAAE,KACX,IAAI,CAAC"}
|
|
@@ -5,15 +5,16 @@ import { Node } from '../../components/Node/type';
|
|
|
5
5
|
import { NodeOrigin } from '../../components/Node/utils';
|
|
6
6
|
import { NodeDragItem } from './type';
|
|
7
7
|
export declare function isParentSelected(node: Node, nodeInternals: NodeInternals): boolean;
|
|
8
|
-
export declare
|
|
9
|
-
export declare
|
|
8
|
+
export declare const getDragItems: (nodeInternals: NodeInternals, nodesDraggable: boolean, mousePosition: XYPosition, nodeId?: string) => NodeDragItem[];
|
|
9
|
+
export declare const calcNextPosition: (node: NodeDragItem | Node, nextPosition: XYPosition, nodeInternals: NodeInternals, nodeExtent?: CoordinateExtent, nodeOrigin?: NodeOrigin, onError?: OnError) => {
|
|
10
10
|
position: XYPosition;
|
|
11
11
|
positionAbsolute: XYPosition;
|
|
12
12
|
};
|
|
13
|
-
export declare
|
|
14
|
-
nodeId?: string;
|
|
13
|
+
export declare const getEventHandlerParams: ({ nodeId, dragItems, nodeInternals, }: {
|
|
14
|
+
nodeId?: string | undefined;
|
|
15
15
|
dragItems: NodeDragItem[];
|
|
16
16
|
nodeInternals: NodeInternals;
|
|
17
|
-
})
|
|
18
|
-
export declare
|
|
17
|
+
}) => [Node, Node[]];
|
|
18
|
+
export declare const hasSelector: (target: Element, selector: string, nodeRef: RefObject<Element>) => boolean;
|
|
19
|
+
export declare const hasChangedPosition: (beforePositions: XYPosition, currentPosition: XYPosition) => boolean;
|
|
19
20
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/hooks/useDrag/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../react-diagram/packages/src/hooks/useDrag/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAgB,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEpD,wBAAgB,gBAAgB,CAC7B,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,GAC5B,OAAO,CAgBT;AAED,eAAO,MAAM,YAAY,iDAEN,OAAO,iBACR,UAAU,WAChB,MAAM,KACf,YAAY,EAwBd,CAAC;AAEF,eAAO,MAAM,gBAAgB,SACpB,YAAY,GAAG,IAAI,gBACX,UAAU,6CAEX,gBAAgB,qCAEnB,OAAO;cACL,UAAU;sBAAoB,UAAU;CAuEtD,CAAC;AAEF,eAAO,MAAM,qBAAqB;;eAMpB,YAAY,EAAE;;MAExB,CAAC,IAAI,EAAE,IAAI,EAAE,CAiBhB,CAAC;AAEF,eAAO,MAAM,WAAW,WACb,OAAO,YACL,MAAM,WACP,UAAU,OAAO,CAAC,KAC3B,OAUF,CAAC;AAEF,eAAO,MAAM,kBAAkB,oBACX,UAAU,mBACV,UAAU,KAC3B,OAEuC,CAAC"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { UseDragEvent } from './useDrag/type';
|
|
2
|
+
import { XYPosition } from '../types';
|
|
3
|
+
type NodeSize = {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
};
|
|
7
|
+
type StepPositionParams = {
|
|
8
|
+
position: XYPosition;
|
|
9
|
+
nodeSize?: NodeSize;
|
|
10
|
+
};
|
|
11
|
+
type GetStepPosition = (params?: StepPositionParams) => XYPosition;
|
|
12
|
+
export type PointerPosition = XYPosition & {
|
|
13
|
+
getStepPosition?: GetStepPosition;
|
|
14
|
+
};
|
|
2
15
|
declare function useGetPointerPosition(): ({ sourceEvent }: UseDragEvent) => {
|
|
3
16
|
x: number;
|
|
4
17
|
y: number;
|
|
5
|
-
|
|
6
|
-
ySnapped: number;
|
|
18
|
+
getStepPosition: GetStepPosition;
|
|
7
19
|
};
|
|
8
20
|
export default useGetPointerPosition;
|
|
9
21
|
//# sourceMappingURL=useGetPointerPosition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetPointerPosition.d.ts","sourceRoot":"","sources":["../react-diagram/packages/src/hooks/useGetPointerPosition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGetPointerPosition.d.ts","sourceRoot":"","sources":["../react-diagram/packages/src/hooks/useGetPointerPosition.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,KAAK,QAAQ,GAAG;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACvB,QAAQ,EAAE,UAAU,CAAC;IAErB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACtB,CAAC;AAEF,KAAK,eAAe,GAAG,CAAC,MAAM,CAAC,EAAE,kBAAkB,KAAK,UAAU,CAAC;AAEnE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IACxC,eAAe,CAAC,EAAE,eAAe,CAAC;CACpC,CAAC;AAEF,iBAAS,qBAAqB;;;;EAsD7B;AAED,eAAe,qBAAqB,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export { internalsSymbol, rectToBox, boxToRect, clamp } from './utils';
|
|
|
9
9
|
export { isNode, isEdge, addEdge, updateEdge, } from './utils/graph';
|
|
10
10
|
export * from './types';
|
|
11
11
|
export default ReactDiagram;
|
|
12
|
+
export { default as Background } from './components/Background';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["react-diagram/packages/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EACJ,OAAO,IAAI,UAAU,EACrB,aAAa,GACf,MAAM,+BAA+B,CAAC;AAEvC,cAAc,4BAA4B,CAAC;AAK3C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EACP,UAAU,GAEZ,MAAM,eAAe,CAAC;AAGvB,cAAc,SAAS,CAAC;AACxB,eAAe,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["react-diagram/packages/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EACJ,OAAO,IAAI,UAAU,EACrB,aAAa,GACf,MAAM,+BAA+B,CAAC;AAEvC,cAAc,4BAA4B,CAAC;AAK3C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EACP,UAAU,GAEZ,MAAM,eAAe,CAAC;AAGvB,cAAc,SAAS,CAAC;AACxB,eAAe,YAAY,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC"}
|