refactor(packages) support react 17 and 18
This commit is contained in:
@@ -10,6 +10,5 @@ stats.html
|
|||||||
.eslintcache
|
.eslintcache
|
||||||
.idea
|
.idea
|
||||||
.log
|
.log
|
||||||
|
|
||||||
.turbo
|
.turbo
|
||||||
.rollup.cache
|
.rollup.cache
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
registry = "https://registry.npmjs.com/"
|
registry="https://registry.npmjs.com/"
|
||||||
legacy-peer-deps = true
|
legacy-peer-deps=true
|
||||||
strict-peer-dependencies=false
|
strict-peer-dependencies=false
|
||||||
@@ -37,7 +37,6 @@
|
|||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.79.0",
|
"rollup": "^2.79.0",
|
||||||
"start-server-and-test": "^1.14.0",
|
|
||||||
"turbo": "^1.4.6",
|
"turbo": "^1.4.6",
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.7.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,20 +37,28 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.18.9",
|
||||||
"@reactflow/core": "workspace:*",
|
"@reactflow/core": "workspace:*",
|
||||||
"classcat": "^5.0.3"
|
"classcat": "^5.0.3",
|
||||||
|
"zustand": "^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@reactflow/eslint-config": "workspace:^0.0.0",
|
"@reactflow/eslint-config": "workspace:^0.0.0",
|
||||||
"@reactflow/rollup-config": "workspace:*",
|
"@reactflow/rollup-config": "workspace:*",
|
||||||
"@reactflow/tsconfig": "workspace:*",
|
"@reactflow/tsconfig": "workspace:*",
|
||||||
"@types/node": "^18.7.16",
|
"@types/node": "^18.7.16",
|
||||||
"@types/react": "^18.0.19"
|
"@types/react": "^18.0.19",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=18",
|
"react": ">=17",
|
||||||
"react-dom": ">=18"
|
"react-dom": ">=17"
|
||||||
},
|
},
|
||||||
"rollup": {
|
"rollup": {
|
||||||
|
"globals": {
|
||||||
|
"zustand": "Zustand",
|
||||||
|
"zustand/shallow": "zustandShallow",
|
||||||
|
"classcat": "cc"
|
||||||
|
},
|
||||||
"name": "ReactFlowBackground"
|
"name": "ReactFlowBackground"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { memo, useRef, useId } from 'react';
|
import { memo, useRef } from 'react';
|
||||||
import cc from 'classcat';
|
import cc from 'classcat';
|
||||||
import { useStore, ReactFlowState } from '@reactflow/core';
|
import { useStore, ReactFlowState } from '@reactflow/core';
|
||||||
|
import shallow from 'zustand/shallow';
|
||||||
|
|
||||||
import { BackgroundProps, BackgroundVariant } from './types';
|
import { BackgroundProps, BackgroundVariant } from './types';
|
||||||
import { DotPattern, LinePattern } from './Patterns';
|
import { DotPattern, LinePattern } from './Patterns';
|
||||||
@@ -17,7 +18,7 @@ const defaultSize = {
|
|||||||
[BackgroundVariant.Cross]: 6,
|
[BackgroundVariant.Cross]: 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
const transformSelector = (s: ReactFlowState) => s.transform;
|
const selector = (s: ReactFlowState) => ({ transform: s.transform, rfId: s.rfId });
|
||||||
|
|
||||||
function Background({
|
function Background({
|
||||||
variant = BackgroundVariant.Dots,
|
variant = BackgroundVariant.Dots,
|
||||||
@@ -31,16 +32,14 @@ function Background({
|
|||||||
className,
|
className,
|
||||||
}: BackgroundProps) {
|
}: BackgroundProps) {
|
||||||
const ref = useRef<SVGSVGElement>(null);
|
const ref = useRef<SVGSVGElement>(null);
|
||||||
const patternId = useId();
|
const { transform, rfId } = useStore(selector, shallow);
|
||||||
const [tX, tY, tScale] = useStore(transformSelector);
|
|
||||||
|
|
||||||
const patternColor = color || defaultColor[variant];
|
const patternColor = color || defaultColor[variant];
|
||||||
const patternSize = size || defaultSize[variant];
|
const patternSize = size || defaultSize[variant];
|
||||||
const isDots = variant === BackgroundVariant.Dots;
|
const isDots = variant === BackgroundVariant.Dots;
|
||||||
const isCross = variant === BackgroundVariant.Cross;
|
const isCross = variant === BackgroundVariant.Cross;
|
||||||
const gapXY: [number, number] = Array.isArray(gap) ? gap : [gap, gap];
|
const gapXY: [number, number] = Array.isArray(gap) ? gap : [gap, gap];
|
||||||
const scaledGap: [number, number] = [gapXY[0] * tScale || 1, gapXY[1] * tScale || 1];
|
const scaledGap: [number, number] = [gapXY[0] * transform[2] || 1, gapXY[1] * transform[2] || 1];
|
||||||
const scaledSize = patternSize * tScale;
|
const scaledSize = patternSize * transform[2];
|
||||||
|
|
||||||
const patternDimensions: [number, number] = isCross ? [scaledSize, scaledSize] : scaledGap;
|
const patternDimensions: [number, number] = isCross ? [scaledSize, scaledSize] : scaledGap;
|
||||||
|
|
||||||
@@ -62,9 +61,9 @@ function Background({
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
>
|
>
|
||||||
<pattern
|
<pattern
|
||||||
id={patternId}
|
id={rfId}
|
||||||
x={tX % scaledGap[0]}
|
x={transform[0] % scaledGap[0]}
|
||||||
y={tY % scaledGap[1]}
|
y={transform[1] % scaledGap[1]}
|
||||||
width={scaledGap[0]}
|
width={scaledGap[0]}
|
||||||
height={scaledGap[1]}
|
height={scaledGap[1]}
|
||||||
patternUnits="userSpaceOnUse"
|
patternUnits="userSpaceOnUse"
|
||||||
@@ -76,7 +75,7 @@ function Background({
|
|||||||
<LinePattern dimensions={patternDimensions} color={patternColor} lineWidth={lineWidth} />
|
<LinePattern dimensions={patternDimensions} color={patternColor} lineWidth={lineWidth} />
|
||||||
)}
|
)}
|
||||||
</pattern>
|
</pattern>
|
||||||
<rect x="0" y="0" width="100%" height="100%" fill={`url(#${patternId})`} />
|
<rect x="0" y="0" width="100%" height="100%" fill={`url(#${rfId})`} />
|
||||||
</svg>
|
</svg>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,15 +41,16 @@
|
|||||||
"classcat": "^5.0.3"
|
"classcat": "^5.0.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=18",
|
"react": ">=17",
|
||||||
"react-dom": ">=18"
|
"react-dom": ">=17"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@reactflow/eslint-config": "workspace:^0.0.0",
|
"@reactflow/eslint-config": "workspace:^0.0.0",
|
||||||
"@reactflow/rollup-config": "workspace:*",
|
"@reactflow/rollup-config": "workspace:*",
|
||||||
"@reactflow/tsconfig": "workspace:*",
|
"@reactflow/tsconfig": "workspace:*",
|
||||||
"@types/node": "^18.7.16",
|
"@types/node": "^18.7.16",
|
||||||
"@types/react": "^18.0.19"
|
"@types/react": "^18.0.19",
|
||||||
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
"rollup": {
|
"rollup": {
|
||||||
"globals": {
|
"globals": {
|
||||||
|
|||||||
@@ -36,7 +36,9 @@
|
|||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/d3": "^7.4.0",
|
"@types/d3-drag": "^3.0.1",
|
||||||
|
"@types/d3-selection": "^3.0.3",
|
||||||
|
"@types/d3-zoom": "^3.0.1",
|
||||||
"classcat": "^5.0.3",
|
"classcat": "^5.0.3",
|
||||||
"d3-drag": "^3.0.0",
|
"d3-drag": "^3.0.0",
|
||||||
"d3-selection": "^3.0.0",
|
"d3-selection": "^3.0.0",
|
||||||
@@ -44,16 +46,13 @@
|
|||||||
"zustand": "^4.0.0"
|
"zustand": "^4.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=18",
|
"react": ">=17",
|
||||||
"react-dom": ">=18"
|
"react-dom": ">=17"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@reactflow/eslint-config": "workspace:^0.0.0",
|
"@reactflow/eslint-config": "workspace:^0.0.0",
|
||||||
"@reactflow/rollup-config": "workspace:*",
|
"@reactflow/rollup-config": "workspace:*",
|
||||||
"@reactflow/tsconfig": "workspace:*",
|
"@reactflow/tsconfig": "workspace:*",
|
||||||
"@types/d3-drag": "^3.0.1",
|
|
||||||
"@types/d3-selection": "^3.0.3",
|
|
||||||
"@types/d3-zoom": "^3.0.1",
|
|
||||||
"@types/node": "^18.7.16",
|
"@types/node": "^18.7.16",
|
||||||
"@types/react": "^18.0.17",
|
"@types/react": "^18.0.17",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ type StoreUpdaterProps = Pick<
|
|||||||
| 'onSelectionDragStop'
|
| 'onSelectionDragStop'
|
||||||
| 'noPanClassName'
|
| 'noPanClassName'
|
||||||
| 'nodeOrigin'
|
| 'nodeOrigin'
|
||||||
|
| 'id'
|
||||||
>;
|
>;
|
||||||
|
|
||||||
const selector = (s: ReactFlowState) => ({
|
const selector = (s: ReactFlowState) => ({
|
||||||
@@ -112,6 +113,7 @@ const StoreUpdater = ({
|
|||||||
onSelectionDragStop,
|
onSelectionDragStop,
|
||||||
noPanClassName,
|
noPanClassName,
|
||||||
nodeOrigin,
|
nodeOrigin,
|
||||||
|
id,
|
||||||
}: StoreUpdaterProps) => {
|
}: StoreUpdaterProps) => {
|
||||||
const {
|
const {
|
||||||
setNodes,
|
setNodes,
|
||||||
@@ -161,6 +163,7 @@ const StoreUpdater = ({
|
|||||||
useDirectStoreUpdater('onSelectionDragStop', onSelectionDragStop, store.setState);
|
useDirectStoreUpdater('onSelectionDragStop', onSelectionDragStop, store.setState);
|
||||||
useDirectStoreUpdater('noPanClassName', noPanClassName, store.setState);
|
useDirectStoreUpdater('noPanClassName', noPanClassName, store.setState);
|
||||||
useDirectStoreUpdater('nodeOrigin', nodeOrigin, store.setState);
|
useDirectStoreUpdater('nodeOrigin', nodeOrigin, store.setState);
|
||||||
|
useDirectStoreUpdater('rfId', id, store.setState);
|
||||||
|
|
||||||
useStoreUpdater<Node[]>(nodes, setNodes);
|
useStoreUpdater<Node[]>(nodes, setNodes);
|
||||||
useStoreUpdater<Edge[]>(edges, setEdges);
|
useStoreUpdater<Edge[]>(edges, setEdges);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { CSSProperties, forwardRef, useId } from 'react';
|
import { CSSProperties, forwardRef } from 'react';
|
||||||
import cc from 'classcat';
|
import cc from 'classcat';
|
||||||
|
|
||||||
import Attribution from '../../components/Attribution';
|
import Attribution from '../../components/Attribution';
|
||||||
@@ -154,13 +154,13 @@ const ReactFlow = forwardRef<ReactFlowRefType, ReactFlowProps>(
|
|||||||
elevateEdgesOnSelect = false,
|
elevateEdgesOnSelect = false,
|
||||||
disableKeyboardA11y = false,
|
disableKeyboardA11y = false,
|
||||||
style,
|
style,
|
||||||
|
id = '1',
|
||||||
...rest
|
...rest
|
||||||
},
|
},
|
||||||
ref
|
ref
|
||||||
) => {
|
) => {
|
||||||
const nodeTypesWrapped = useNodeOrEdgeTypes(nodeTypes, createNodeTypes) as NodeTypesWrapped;
|
const nodeTypesWrapped = useNodeOrEdgeTypes(nodeTypes, createNodeTypes) as NodeTypesWrapped;
|
||||||
const edgeTypesWrapped = useNodeOrEdgeTypes(edgeTypes, createEdgeTypes) as EdgeTypesWrapped;
|
const edgeTypesWrapped = useNodeOrEdgeTypes(edgeTypes, createEdgeTypes) as EdgeTypesWrapped;
|
||||||
const rfId = useId();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -228,7 +228,7 @@ const ReactFlow = forwardRef<ReactFlowRefType, ReactFlowProps>(
|
|||||||
noWheelClassName={noWheelClassName}
|
noWheelClassName={noWheelClassName}
|
||||||
noPanClassName={noPanClassName}
|
noPanClassName={noPanClassName}
|
||||||
elevateEdgesOnSelect={elevateEdgesOnSelect}
|
elevateEdgesOnSelect={elevateEdgesOnSelect}
|
||||||
rfId={rfId}
|
rfId={id}
|
||||||
disableKeyboardA11y={disableKeyboardA11y}
|
disableKeyboardA11y={disableKeyboardA11y}
|
||||||
nodeOrigin={nodeOrigin}
|
nodeOrigin={nodeOrigin}
|
||||||
nodeExtent={nodeExtent}
|
nodeExtent={nodeExtent}
|
||||||
@@ -269,11 +269,12 @@ const ReactFlow = forwardRef<ReactFlowRefType, ReactFlowProps>(
|
|||||||
onSelectionDragStop={onSelectionDragStop}
|
onSelectionDragStop={onSelectionDragStop}
|
||||||
noPanClassName={noPanClassName}
|
noPanClassName={noPanClassName}
|
||||||
nodeOrigin={nodeOrigin}
|
nodeOrigin={nodeOrigin}
|
||||||
|
id={id}
|
||||||
/>
|
/>
|
||||||
{onSelectionChange && <SelectionListener onSelectionChange={onSelectionChange} />}
|
{onSelectionChange && <SelectionListener onSelectionChange={onSelectionChange} />}
|
||||||
{children}
|
{children}
|
||||||
<Attribution proOptions={proOptions} position={attributionPosition} />
|
<Attribution proOptions={proOptions} position={attributionPosition} />
|
||||||
{!disableKeyboardA11y && <A11yDescriptions rfId={rfId} />}
|
{!disableKeyboardA11y && <A11yDescriptions rfId={id} />}
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export const infiniteExtent: CoordinateExtent = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const initialState: ReactFlowStore = {
|
const initialState: ReactFlowStore = {
|
||||||
|
rfId: '1',
|
||||||
width: 0,
|
width: 0,
|
||||||
height: 0,
|
height: 0,
|
||||||
transform: [0, 0, 1],
|
transform: [0, 0, 1],
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { MouseEvent as ReactMouseEvent, ComponentType, MemoExoticComponent } from 'react';
|
import { MouseEvent as ReactMouseEvent, ComponentType, MemoExoticComponent } from 'react';
|
||||||
import { Selection as D3Selection, ZoomBehavior } from 'd3';
|
import { Selection as D3Selection } from 'd3-selection';
|
||||||
|
import { ZoomBehavior } from 'd3-zoom';
|
||||||
|
|
||||||
import { XYPosition, Rect, Transform, CoordinateExtent } from './utils';
|
import { XYPosition, Rect, Transform, CoordinateExtent } from './utils';
|
||||||
import { NodeChange, EdgeChange } from './changes';
|
import { NodeChange, EdgeChange } from './changes';
|
||||||
@@ -130,6 +131,7 @@ export interface ViewportHelperFunctions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type ReactFlowStore = {
|
export type ReactFlowStore = {
|
||||||
|
rfId: string;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
transform: Transform;
|
transform: Transform;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { Selection as D3Selection } from 'd3';
|
import { Selection as D3Selection } from 'd3-selection';
|
||||||
|
|
||||||
import { boxToRect, clamp, devWarn, getBoundsOfBoxes, rectToBox } from '../utils';
|
import { boxToRect, clamp, devWarn, getBoundsOfBoxes, rectToBox } from '../utils';
|
||||||
import { Node, Edge, Connection, EdgeMarkerType, Transform, XYPosition, Rect, NodeInternals } from '../types';
|
import { Node, Edge, Connection, EdgeMarkerType, Transform, XYPosition, Rect, NodeInternals } from '../types';
|
||||||
|
|||||||
@@ -42,8 +42,8 @@
|
|||||||
"zustand": "^4.0.0"
|
"zustand": "^4.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=18",
|
"react": ">=17",
|
||||||
"react-dom": ">=18"
|
"react-dom": ">=17"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@reactflow/eslint-config": "workspace:^0.0.0",
|
"@reactflow/eslint-config": "workspace:^0.0.0",
|
||||||
@@ -51,7 +51,8 @@
|
|||||||
"@reactflow/tsconfig": "workspace:*",
|
"@reactflow/tsconfig": "workspace:*",
|
||||||
"@types/node": "^18.7.16",
|
"@types/node": "^18.7.16",
|
||||||
"@types/react": "^18.0.19",
|
"@types/react": "^18.0.19",
|
||||||
"react": "^18.2.0"
|
"react": "^18.2.0",
|
||||||
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
"rollup": {
|
"rollup": {
|
||||||
"globals": {
|
"globals": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { memo, useId } from 'react';
|
import { memo } from 'react';
|
||||||
import cc from 'classcat';
|
import cc from 'classcat';
|
||||||
import shallow from 'zustand/shallow';
|
import shallow from 'zustand/shallow';
|
||||||
import { useStore, getRectOfNodes, ReactFlowState, Rect, Panel, getBoundsOfRects } from '@reactflow/core';
|
import { useStore, getRectOfNodes, ReactFlowState, Rect, Panel, getBoundsOfRects } from '@reactflow/core';
|
||||||
@@ -25,6 +25,7 @@ const selector = (s: ReactFlowState) => {
|
|||||||
nodes: nodes.filter((node) => !node.hidden && node.width && node.height),
|
nodes: nodes.filter((node) => !node.hidden && node.width && node.height),
|
||||||
viewBB,
|
viewBB,
|
||||||
boundingRect: nodes.length > 0 ? getBoundsOfRects(getRectOfNodes(nodes), viewBB) : viewBB,
|
boundingRect: nodes.length > 0 ? getBoundsOfRects(getRectOfNodes(nodes), viewBB) : viewBB,
|
||||||
|
rfId: s.rfId,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -43,8 +44,7 @@ function MiniMap({
|
|||||||
maskColor = 'rgb(240, 242, 243, 0.7)',
|
maskColor = 'rgb(240, 242, 243, 0.7)',
|
||||||
position = 'bottom-right',
|
position = 'bottom-right',
|
||||||
}: MiniMapProps) {
|
}: MiniMapProps) {
|
||||||
const minimapId = useId();
|
const { boundingRect, viewBB, nodes, rfId } = useStore(selector, shallow);
|
||||||
const { boundingRect, viewBB, nodes } = useStore(selector, shallow);
|
|
||||||
const elementWidth = (style?.width as number) ?? defaultWidth;
|
const elementWidth = (style?.width as number) ?? defaultWidth;
|
||||||
const elementHeight = (style?.height as number) ?? defaultHeight;
|
const elementHeight = (style?.height as number) ?? defaultHeight;
|
||||||
const nodeColorFunc = getAttrFunction(nodeColor);
|
const nodeColorFunc = getAttrFunction(nodeColor);
|
||||||
@@ -61,7 +61,7 @@ function MiniMap({
|
|||||||
const width = viewWidth + offset * 2;
|
const width = viewWidth + offset * 2;
|
||||||
const height = viewHeight + offset * 2;
|
const height = viewHeight + offset * 2;
|
||||||
const shapeRendering = typeof window === 'undefined' || !!window.chrome ? 'crispEdges' : 'geometricPrecision';
|
const shapeRendering = typeof window === 'undefined' || !!window.chrome ? 'crispEdges' : 'geometricPrecision';
|
||||||
const labelledBy = `${ARIA_LABEL_KEY}-${minimapId}`;
|
const labelledBy = `${ARIA_LABEL_KEY}-${rfId}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Panel position={position} style={style} className={cc(['react-flow__minimap', className])}>
|
<Panel position={position} style={style} className={cc(['react-flow__minimap', className])}>
|
||||||
|
|||||||
@@ -39,15 +39,17 @@
|
|||||||
"@reactflow/minimap": "workspace:*"
|
"@reactflow/minimap": "workspace:*"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": ">=18",
|
"react": ">=17",
|
||||||
"react-dom": ">=18"
|
"react-dom": ">=17"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@reactflow/eslint-config": "workspace:^0.0.0",
|
"@reactflow/eslint-config": "workspace:^0.0.0",
|
||||||
"@reactflow/rollup-config": "workspace:*",
|
"@reactflow/rollup-config": "workspace:*",
|
||||||
"@reactflow/tsconfig": "workspace:*",
|
"@reactflow/tsconfig": "workspace:*",
|
||||||
"@types/node": "^18.7.16",
|
"@types/node": "^18.7.16",
|
||||||
"@types/react": "^18.0.19"
|
"@types/react": "^18.0.19",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"typescript": "^4.7.4"
|
||||||
},
|
},
|
||||||
"rollup": {
|
"rollup": {
|
||||||
"globals": {
|
"globals": {
|
||||||
|
|||||||
Generated
+27
-2
@@ -26,7 +26,6 @@ importers:
|
|||||||
react-dom: ^18.2.0
|
react-dom: ^18.2.0
|
||||||
rimraf: ^3.0.2
|
rimraf: ^3.0.2
|
||||||
rollup: ^2.79.0
|
rollup: ^2.79.0
|
||||||
start-server-and-test: ^1.14.0
|
|
||||||
turbo: ^1.4.6
|
turbo: ^1.4.6
|
||||||
typescript: ^4.7.4
|
typescript: ^4.7.4
|
||||||
devDependencies:
|
devDependencies:
|
||||||
@@ -52,7 +51,6 @@ importers:
|
|||||||
react-dom: registry.npmjs.org/react-dom/18.2.0_react@18.2.0
|
react-dom: registry.npmjs.org/react-dom/18.2.0_react@18.2.0
|
||||||
rimraf: registry.npmjs.org/rimraf/3.0.2
|
rimraf: registry.npmjs.org/rimraf/3.0.2
|
||||||
rollup: registry.npmjs.org/rollup/2.79.0
|
rollup: registry.npmjs.org/rollup/2.79.0
|
||||||
start-server-and-test: registry.npmjs.org/start-server-and-test/1.14.0
|
|
||||||
turbo: registry.npmjs.org/turbo/1.4.6
|
turbo: registry.npmjs.org/turbo/1.4.6
|
||||||
typescript: registry.npmjs.org/typescript/4.8.3
|
typescript: registry.npmjs.org/typescript/4.8.3
|
||||||
|
|
||||||
@@ -101,10 +99,12 @@ importers:
|
|||||||
'@types/node': ^18.7.16
|
'@types/node': ^18.7.16
|
||||||
'@types/react': ^18.0.19
|
'@types/react': ^18.0.19
|
||||||
classcat: ^5.0.3
|
classcat: ^5.0.3
|
||||||
|
zustand: ^4.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime': registry.npmjs.org/@babel/runtime/7.19.0
|
'@babel/runtime': registry.npmjs.org/@babel/runtime/7.19.0
|
||||||
'@reactflow/core': link:../core
|
'@reactflow/core': link:../core
|
||||||
classcat: registry.npmjs.org/classcat/5.0.4
|
classcat: registry.npmjs.org/classcat/5.0.4
|
||||||
|
zustand: registry.npmjs.org/zustand/4.1.1
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@reactflow/eslint-config': link:../../tooling/eslint-config
|
'@reactflow/eslint-config': link:../../tooling/eslint-config
|
||||||
'@reactflow/rollup-config': link:../../tooling/rollup-config
|
'@reactflow/rollup-config': link:../../tooling/rollup-config
|
||||||
@@ -6984,6 +6984,14 @@ packages:
|
|||||||
punycode: registry.npmjs.org/punycode/2.1.1
|
punycode: registry.npmjs.org/punycode/2.1.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
registry.npmjs.org/use-sync-external-store/1.2.0:
|
||||||
|
resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz}
|
||||||
|
name: use-sync-external-store
|
||||||
|
version: 1.2.0
|
||||||
|
peerDependencies:
|
||||||
|
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
registry.npmjs.org/use-sync-external-store/1.2.0_react@18.2.0:
|
registry.npmjs.org/use-sync-external-store/1.2.0_react@18.2.0:
|
||||||
resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz}
|
resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz}
|
||||||
id: registry.npmjs.org/use-sync-external-store/1.2.0
|
id: registry.npmjs.org/use-sync-external-store/1.2.0
|
||||||
@@ -7284,6 +7292,23 @@ packages:
|
|||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
registry.npmjs.org/zustand/4.1.1:
|
||||||
|
resolution: {integrity: sha512-h4F3WMqsZgvvaE0n3lThx4MM81Ls9xebjvrABNzf5+jb3/03YjNTSgZXeyrvXDArMeV9untvWXRw1tY+ntPYbA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/zustand/-/zustand-4.1.1.tgz}
|
||||||
|
name: zustand
|
||||||
|
version: 4.1.1
|
||||||
|
engines: {node: '>=12.7.0'}
|
||||||
|
peerDependencies:
|
||||||
|
immer: '>=9.0'
|
||||||
|
react: '>=16.8'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
immer:
|
||||||
|
optional: true
|
||||||
|
react:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
use-sync-external-store: registry.npmjs.org/use-sync-external-store/1.2.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
registry.npmjs.org/zustand/4.1.1_react@18.2.0:
|
registry.npmjs.org/zustand/4.1.1_react@18.2.0:
|
||||||
resolution: {integrity: sha512-h4F3WMqsZgvvaE0n3lThx4MM81Ls9xebjvrABNzf5+jb3/03YjNTSgZXeyrvXDArMeV9untvWXRw1tY+ntPYbA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/zustand/-/zustand-4.1.1.tgz}
|
resolution: {integrity: sha512-h4F3WMqsZgvvaE0n3lThx4MM81Ls9xebjvrABNzf5+jb3/03YjNTSgZXeyrvXDArMeV9untvWXRw1tY+ntPYbA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/zustand/-/zustand-4.1.1.tgz}
|
||||||
id: registry.npmjs.org/zustand/4.1.1
|
id: registry.npmjs.org/zustand/4.1.1
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
"outputs": []
|
"outputs": []
|
||||||
},
|
},
|
||||||
"typecheck": {
|
"typecheck": {
|
||||||
"dependsOn": ["^build"],
|
|
||||||
"outputs": []
|
"outputs": []
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
|
|||||||
Reference in New Issue
Block a user