@octanejs/xyflow 0.1.7 → 0.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/xyflow",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -60,7 +60,7 @@
60
60
  "react-dom": "19.2.7",
61
61
  "vitest": "^4.1.10",
62
62
  "@octanejs/zustand": "0.1.54",
63
- "octane": "0.3.0"
63
+ "octane": "0.3.1"
64
64
  },
65
65
  "scripts": {
66
66
  "test": "vitest run --root ../.. --project xyflow --project xyflow-differential",
@@ -5,7 +5,7 @@ import { getEdgeToolbarTransform } from '@xyflow/system';
5
5
 
6
6
  import { EdgeLabelRenderer } from '../../components/EdgeLabelRenderer/index.tsrx';
7
7
  import { useStore } from '../../hooks/useStore';
8
- import { Edge, ReactFlowState } from '../../types';
8
+ import type { Edge, ReactFlowState } from '../../types';
9
9
  import type { EdgeToolbarProps } from './types';
10
10
 
11
11
  const zoomSelector = (state: ReactFlowState) => state.transform[2];
@@ -12,15 +12,15 @@ import {
12
12
  type NodePositionChange,
13
13
  handleExpandParent,
14
14
  evaluateAbsolutePosition,
15
- ParentExpandChild,
16
- XYPosition,
17
- ControlPosition,
15
+ type ParentExpandChild,
16
+ type XYPosition,
17
+ type ControlPosition,
18
18
  } from '@xyflow/system';
19
19
 
20
20
  import { useStoreApi, useStore } from '../../hooks/useStore';
21
21
  import { useNodeId } from '../../contexts/NodeIdContext';
22
22
  import type { ResizeControlProps, ResizeControlLineProps } from './types';
23
- import { ReactFlowState } from '../../types';
23
+ import type { ReactFlowState } from '../../types';
24
24
 
25
25
  const scaleSelector = (calculateScale: boolean) => (store: ReactFlowState) => calculateScale
26
26
  ? `${Math.max(1 / store.transform[2], 1)}`
@@ -6,10 +6,10 @@ import {
6
6
  Position,
7
7
  getNodeToolbarTransform,
8
8
  getInternalNodesBounds,
9
- NodeLookup,
9
+ type NodeLookup,
10
10
  } from '@xyflow/system';
11
11
 
12
- import { InternalNode, ReactFlowState } from '../../types';
12
+ import type { InternalNode, ReactFlowState } from '../../types';
13
13
  import { useStore } from '../../hooks/useStore';
14
14
  import { useNodeId } from '../../contexts/NodeIdContext';
15
15
  import { NodeToolbarPortal } from './NodeToolbarPortal.tsrx';
@@ -1,4 +1,4 @@
1
- import { OctaneNode } from 'octane';
1
+ import type { OctaneNode } from 'octane';
2
2
  import { createPortal } from 'octane';
3
3
 
4
4
  import type { ReactFlowState } from '../../types';
@@ -1,9 +1,9 @@
1
- import { createContext, OctaneNode, useCallback, useContext, useMemo } from 'octane';
2
- import { EdgeChange, NodeChange } from '@xyflow/system';
1
+ import { createContext, type OctaneNode, useCallback, useContext, useMemo } from 'octane';
2
+ import type { EdgeChange, NodeChange } from '@xyflow/system';
3
3
 
4
4
  import { useStoreApi } from '../../hooks/useStore';
5
5
  import { getElementsDiffChanges } from '../../utils';
6
- import { Queue, QueueItem } from './types';
6
+ import type { Queue, QueueItem } from './types';
7
7
  import type { Edge, Node } from '../../types';
8
8
  import { useQueue } from './useQueue';
9
9
 
@@ -17,10 +17,10 @@ import {
17
17
  type Connection,
18
18
  type HandleType,
19
19
  ConnectionMode,
20
- OnConnect,
21
- ConnectionState,
22
- FinalConnectionState,
23
- Optional,
20
+ type OnConnect,
21
+ type ConnectionState,
22
+ type FinalConnectionState,
23
+ type Optional,
24
24
  } from '@xyflow/system';
25
25
 
26
26
  import { useStore, useStoreApi } from '../../hooks/useStore';
@@ -5,7 +5,7 @@ import { createStore } from '../../store';
5
5
  import { BatchProvider } from '../BatchProvider/index.tsrx';
6
6
  import { HandleConfigProvider } from '../../contexts/HandleConfigContext.tsrx';
7
7
  import type { Node, Edge, FitViewOptions } from '../../types';
8
- import { CoordinateExtent, NodeOrigin, ZIndexMode } from '@xyflow/system';
8
+ import type { CoordinateExtent, NodeOrigin, ZIndexMode } from '@xyflow/system';
9
9
 
10
10
  export type ReactFlowProviderProps = {
11
11
  /** These nodes are used to initialize the flow. They are not dynamic. */
@@ -9,7 +9,7 @@ import {
9
9
  infiniteExtent,
10
10
  type CoordinateExtent,
11
11
  mergeAriaLabelConfig,
12
- AriaLabelConfig,
12
+ type AriaLabelConfig,
13
13
  } from '@xyflow/system';
14
14
 
15
15
  import { useStore, useStoreApi } from '../../hooks/useStore';
@@ -1,10 +1,10 @@
1
- import { memo, OctaneNode } from 'octane';
1
+ import { memo, type OctaneNode } from 'octane';
2
2
  import { shallow } from '@octanejs/zustand/shallow';
3
3
 
4
4
  import { useStore } from '../../hooks/useStore';
5
5
  import { useVisibleEdgeIds } from '../../hooks/useVisibleEdgeIds';
6
6
  import MarkerDefinitions from './MarkerDefinitions.tsrx';
7
- import { GraphViewProps } from '../GraphView/index.tsrx';
7
+ import type { GraphViewProps } from '../GraphView/index.tsrx';
8
8
  import EdgeWrapper from '../../components/EdgeWrapper/index.tsrx';
9
9
  import type { Edge, ReactFlowState, Node } from '../../types';
10
10
 
@@ -4,7 +4,7 @@ import { shallow } from '@octanejs/zustand/shallow';
4
4
  import { useStore } from '../../hooks/useStore';
5
5
  import { useGlobalKeyHandler } from '../../hooks/useGlobalKeyHandler';
6
6
  import { useKeyPress } from '../../hooks/useKeyPress';
7
- import { GraphViewProps } from '../GraphView/index.tsrx';
7
+ import type { GraphViewProps } from '../GraphView/index.tsrx';
8
8
  import { ZoomPane } from '../ZoomPane/index.tsrx';
9
9
  import { Pane } from '../Pane/index.tsrx';
10
10
  import { NodesSelection } from '../../components/NodesSelection/index.tsrx';
@@ -4,7 +4,7 @@ import { shallow } from '@octanejs/zustand/shallow';
4
4
  import { useVisibleNodeIds } from '../../hooks/useVisibleNodeIds';
5
5
  import { useStore } from '../../hooks/useStore';
6
6
  import { containerStyle } from '../../styles/utils';
7
- import { GraphViewProps } from '../GraphView/index.tsrx';
7
+ import type { GraphViewProps } from '../GraphView/index.tsrx';
8
8
  import { useResizeObserver } from './useResizeObserver';
9
9
  import NodeWrapper from '../../components/NodeWrapper/index.tsrx';
10
10
  import type { Node, ReactFlowState } from '../../types';
@@ -16,7 +16,7 @@ import {
16
16
  calcAutoPan,
17
17
  pointToRendererPoint,
18
18
  rendererPointToPoint,
19
- XYPosition,
19
+ type XYPosition,
20
20
  } from '@xyflow/system';
21
21
 
22
22
  import { UserSelection } from '../../components/UserSelection/index.tsrx';
@@ -3,7 +3,7 @@ import { useContext, type OctaneNode } from 'octane';
3
3
  import StoreContext from '../../contexts/StoreContext';
4
4
  import { ReactFlowProvider } from '../../components/ReactFlowProvider/index.tsrx';
5
5
  import type { Node, Edge, FitViewOptions } from '../../types';
6
- import { CoordinateExtent, NodeOrigin, ZIndexMode } from '@xyflow/system';
6
+ import type { CoordinateExtent, NodeOrigin, ZIndexMode } from '@xyflow/system';
7
7
 
8
8
  export function Wrapper({
9
9
  children,