@xyflow/react 12.0.0-next.14 → 12.0.0-next.15
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/additional-components/NodeResizer/NodeResizeControl.d.ts.map +1 -1
- package/dist/esm/components/NodeWrapper/index.d.ts.map +1 -1
- package/dist/esm/components/NodeWrapper/useNodeObservation.d.ts +9 -0
- package/dist/esm/components/NodeWrapper/useNodeObservation.d.ts.map +1 -0
- package/dist/esm/components/NodeWrapper/useNodeObserver.d.ts +15 -0
- package/dist/esm/components/NodeWrapper/useNodeObserver.d.ts.map +1 -0
- package/dist/esm/components/NodesSelection/index.d.ts.map +1 -1
- package/dist/esm/components/ReactFlowProvider/index.d.ts +4 -3
- package/dist/esm/components/ReactFlowProvider/index.d.ts.map +1 -1
- package/dist/esm/components/SelectionListener/index.d.ts.map +1 -1
- package/dist/esm/container/NodeRenderer/useResizeObserver.d.ts.map +1 -1
- package/dist/esm/container/Pane/index.d.ts.map +1 -1
- package/dist/esm/contexts/RFStoreContext.d.ts +2 -2
- package/dist/esm/contexts/RFStoreContext.d.ts.map +1 -1
- package/dist/esm/contexts/StoreContext.d.ts +5 -0
- package/dist/esm/contexts/StoreContext.d.ts.map +1 -0
- package/dist/esm/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/esm/hooks/useStore.d.ts +0 -1
- package/dist/esm/hooks/useStore.d.ts.map +1 -1
- package/dist/esm/index.js +206 -156
- package/dist/esm/index.mjs +206 -156
- package/dist/esm/store/index.d.ts +2 -2
- package/dist/esm/store/index.d.ts.map +1 -1
- package/dist/esm/store/initialState.d.ts.map +1 -1
- package/dist/esm/types/store.d.ts +1 -0
- package/dist/esm/types/store.d.ts.map +1 -1
- package/dist/umd/additional-components/NodeResizer/NodeResizeControl.d.ts.map +1 -1
- package/dist/umd/components/NodeWrapper/index.d.ts.map +1 -1
- package/dist/umd/components/NodeWrapper/useNodeObserver.d.ts +15 -0
- package/dist/umd/components/NodeWrapper/useNodeObserver.d.ts.map +1 -0
- package/dist/umd/components/NodesSelection/index.d.ts.map +1 -1
- package/dist/umd/components/ReactFlowProvider/index.d.ts +4 -3
- package/dist/umd/components/ReactFlowProvider/index.d.ts.map +1 -1
- package/dist/umd/components/SelectionListener/index.d.ts.map +1 -1
- package/dist/umd/container/NodeRenderer/useResizeObserver.d.ts.map +1 -1
- package/dist/umd/container/Pane/index.d.ts.map +1 -1
- package/dist/umd/contexts/StoreContext.d.ts +5 -0
- package/dist/umd/contexts/StoreContext.d.ts.map +1 -0
- package/dist/umd/hooks/useReactFlow.d.ts.map +1 -1
- package/dist/umd/hooks/useStore.d.ts +0 -1
- package/dist/umd/hooks/useStore.d.ts.map +1 -1
- package/dist/umd/index.js +2 -2
- package/dist/umd/store/index.d.ts +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/store.d.ts +1 -0
- package/dist/umd/types/store.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeResizeControl.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/additional-components/NodeResizer/NodeResizeControl.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"NodeResizeControl.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/additional-components/NodeResizer/NodeResizeControl.tsx"],"names":[],"mappings":";AAmBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAE1E,iBAAS,aAAa,CAAC,EACrB,MAAM,EACN,QAAQ,EACR,OAAqC,EACrC,SAAS,EACT,KAAU,EACV,QAAQ,EACR,KAAK,EACL,QAAa,EACb,SAAc,EACd,QAA2B,EAC3B,SAA4B,EAC5B,eAAuB,EACvB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,WAAW,GACZ,EAAE,kBAAkB,2CAyJpB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAE9D;AAED,eAAO,MAAM,iBAAiB,2DAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/NodeWrapper/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/NodeWrapper/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAgB,IAAI,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAExE,wBAAgB,WAAW,CAAC,QAAQ,SAAS,IAAI,EAAE,EACjD,EAAE,EACF,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,IAAI,EACJ,SAAS,EACT,UAAU,EACV,UAAU,EACV,OAAO,GACR,EAAE,gBAAgB,CAAC,QAAQ,CAAC,kDAwK5B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { InternalNode } from '../../types';
|
|
3
|
+
export declare function useNodeObservation({ node, nodeType, initialized, resizeObserver, }: {
|
|
4
|
+
node: InternalNode;
|
|
5
|
+
nodeType: string;
|
|
6
|
+
initialized: boolean;
|
|
7
|
+
resizeObserver: ResizeObserver | null;
|
|
8
|
+
}): import("react").RefObject<HTMLDivElement>;
|
|
9
|
+
//# sourceMappingURL=useNodeObservation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodeObservation.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/NodeWrapper/useNodeObservation.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,cAAc,GACf,EAAE;IACD,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC,6CAsDA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { InternalNode } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to handle the resize observation + internal updates for the passed node.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
* @returns nodeRef - reference to the node element
|
|
8
|
+
*/
|
|
9
|
+
export declare function useNodeObserver({ node, nodeType, hasDimensions, resizeObserver, }: {
|
|
10
|
+
node: InternalNode;
|
|
11
|
+
nodeType: string;
|
|
12
|
+
hasDimensions: boolean;
|
|
13
|
+
resizeObserver: ResizeObserver | null;
|
|
14
|
+
}): import("react").MutableRefObject<HTMLDivElement | null>;
|
|
15
|
+
//# sourceMappingURL=useNodeObserver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodeObserver.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/NodeWrapper/useNodeObserver.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,cAAc,GACf,EAAE;IACD,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC,2DAiDA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/NodesSelection/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAqB,KAAK,UAAU,EAAsB,MAAM,OAAO,CAAC;AAS/E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/NodesSelection/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAqB,KAAK,UAAU,EAAsB,MAAM,OAAO,CAAC;AAS/E,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,aAAa,CAAC;AAExD,MAAM,MAAM,mBAAmB,CAAC,QAAQ,IAAI;IAC1C,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACxE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,OAAO,CAAC;CAC9B,CAAC;AAgBF,wBAAgB,cAAc,CAAC,QAAQ,SAAS,IAAI,EAAE,EACpD,sBAAsB,EACtB,cAAc,EACd,mBAAmB,GACpB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,kDA2D/B"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import type { Node, Edge } from '../../types';
|
|
3
|
-
export
|
|
4
|
-
children: ReactNode;
|
|
3
|
+
export type ReactFlowProviderProps = {
|
|
5
4
|
initialNodes?: Node[];
|
|
6
5
|
initialEdges?: Edge[];
|
|
7
6
|
defaultNodes?: Node[];
|
|
@@ -9,5 +8,7 @@ export declare function ReactFlowProvider({ children, initialNodes, initialEdges
|
|
|
9
8
|
initialWidth?: number;
|
|
10
9
|
initialHeight?: number;
|
|
11
10
|
fitView?: boolean;
|
|
12
|
-
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
export declare function ReactFlowProvider({ initialNodes: nodes, initialEdges: edges, defaultNodes, defaultEdges, initialWidth: width, initialHeight: height, fitView, children, }: ReactFlowProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/ReactFlowProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/ReactFlowProvider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,EAChC,YAAY,EAAE,KAAK,EACnB,YAAY,EAAE,KAAK,EACnB,YAAY,EACZ,YAAY,EACZ,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE,MAAM,EACrB,OAAO,EACP,QAAQ,GACT,EAAE,sBAAsB,2CAcxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/SelectionListener/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAkB,qBAAqB,EAAc,MAAM,aAAa,CAAC;AAErF,KAAK,sBAAsB,GAAG;IAC5B,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;CAC3C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/components/SelectionListener/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAkB,qBAAqB,EAAc,MAAM,aAAa,CAAC;AAErF,KAAK,sBAAsB,GAAG;IAC5B,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;CAC3C,CAAC;AAgDF,wBAAgB,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,EAAE,sBAAsB,kDAQ9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/container/NodeRenderer/useResizeObserver.ts"],"names":[],"mappings":"AAQA,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/container/NodeRenderer/useResizeObserver.ts"],"names":[],"mappings":"AAQA,wBAAgB,iBAAiB,0BA4BhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/container/Pane/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAA8C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASnF,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AAElE,KAAK,SAAS,GAAG;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CACT,IAAI,CACF,cAAc,EACZ,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,CACrB,CACF,CAAC;AAoBF,wBAAgB,IAAI,CAAC,EACnB,WAAW,EACX,aAAkC,EAClC,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,GACT,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/react/src/container/Pane/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAA8C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASnF,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AAElE,KAAK,SAAS,GAAG;IACf,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CACT,IAAI,CACF,cAAc,EACZ,eAAe,GACf,WAAW,GACX,kBAAkB,GAClB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,CACrB,CACF,CAAC;AAoBF,wBAAgB,IAAI,CAAC,EACnB,WAAW,EACX,aAAkC,EAClC,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,QAAQ,GACT,EAAE,SAAS,2CAsLX"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
declare const StoreContext: import("react").Context<
|
|
3
|
-
export declare const Provider: import("react").Provider<
|
|
2
|
+
declare const StoreContext: import("react").Context<any>;
|
|
3
|
+
export declare const Provider: import("react").Provider<any>;
|
|
4
4
|
export default StoreContext;
|
|
5
5
|
//# sourceMappingURL=RFStoreContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RFStoreContext.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/contexts/RFStoreContext.ts"],"names":[],"mappings":";AAIA,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"RFStoreContext.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/contexts/RFStoreContext.ts"],"names":[],"mappings":";AAIA,QAAA,MAAM,YAAY,8BAA+D,CAAC;AAElF,eAAO,MAAM,QAAQ,+BAAwB,CAAC;AAC9C,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const StoreContext: import("react").Context<import("zustand/traditional").UseBoundStoreWithEqualityFn<import("zustand").StoreApi<import("..").ReactFlowState>> | null>;
|
|
3
|
+
export declare const Provider: import("react").Provider<import("zustand/traditional").UseBoundStoreWithEqualityFn<import("zustand").StoreApi<import("..").ReactFlowState>> | null>;
|
|
4
|
+
export default StoreContext;
|
|
5
|
+
//# sourceMappingURL=StoreContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoreContext.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/contexts/StoreContext.ts"],"names":[],"mappings":";AAIA,QAAA,MAAM,YAAY,oJAA6D,CAAC;AAEhF,eAAO,MAAM,QAAQ,qJAAwB,CAAC;AAC9C,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReactFlow.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/hooks/useReactFlow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useReactFlow.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/hooks/useReactFlow.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAY,IAAI,EAAE,IAAI,EAAgB,MAAM,UAAU,CAAC;AAItF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI,KAAK,iBAAiB,CAC3G,QAAQ,EACR,QAAQ,CACT,CA8UA"}
|
|
@@ -16,7 +16,6 @@ declare function useStoreApi<NodeType extends Node = Node, EdgeType extends Edge
|
|
|
16
16
|
getState: () => ReactFlowState<NodeType, EdgeType>;
|
|
17
17
|
setState: (partial: ReactFlowState<NodeType, EdgeType> | Partial<ReactFlowState<NodeType, EdgeType>> | ((state: ReactFlowState<NodeType, EdgeType>) => ReactFlowState<NodeType, EdgeType> | Partial<ReactFlowState<NodeType, EdgeType>>), replace?: boolean | undefined) => void;
|
|
18
18
|
subscribe: (listener: (state: ReactFlowState<NodeType, EdgeType>, prevState: ReactFlowState<NodeType, EdgeType>) => void) => () => void;
|
|
19
|
-
destroy: () => void;
|
|
20
19
|
};
|
|
21
20
|
export { useStore, useStoreApi };
|
|
22
21
|
//# sourceMappingURL=useStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/hooks/useStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useStore.d.ts","sourceRoot":"","sources":["../../../../packages/react/src/hooks/useStore.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI3D;;;;;;;;;;;GAWG;AACH,iBAAS,QAAQ,CAAC,UAAU,GAAG,OAAO,EACpC,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,UAAU,EAC/C,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,UAAU,KAAK,OAAO,cASvD;AAED,iBAAS,WAAW,CAAC,QAAQ,SAAS,IAAI,GAAG,IAAI,EAAE,QAAQ,SAAS,IAAI,GAAG,IAAI;;;;EAiB9E;AAED,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC"}
|