diff --git a/.changeset/fifty-rockets-report.md b/.changeset/fifty-rockets-report.md new file mode 100644 index 000000000..7ab72fa33 --- /dev/null +++ b/.changeset/fifty-rockets-report.md @@ -0,0 +1,5 @@ +--- +"@vue-flow/minimap": patch +--- + +Update import of `getBoundsOfRects` diff --git a/.changeset/fluffy-tables-wash.md b/.changeset/fluffy-tables-wash.md new file mode 100644 index 000000000..df7f5a246 --- /dev/null +++ b/.changeset/fluffy-tables-wash.md @@ -0,0 +1,26 @@ +--- +"@vue-flow/core": minor +--- + +Replace existing graph utils exports with those already provided by `@xyflow/system`: + +- Replace utils + - `clamp` + - `clampPosition` + - `getDimensions` + - `getHostForElement` + - `getOverlappingArea` + - `rectToBox` + - `boxToRect` + - `getBoundsofRects` + - `getBoundsOfBoxes` + - `rendererPointToPoint` + - `getMarkerId` + - `isRect` + - `isNumeric` + - `calcAutoPan` + - `isMouseEvent` + - `getEventPosition` + +-Remove utils +- `isMacOS` diff --git a/packages/core/src/components/ConnectionLine/index.ts b/packages/core/src/components/ConnectionLine/index.ts index 70101ac8d..fe5ac7fb5 100644 --- a/packages/core/src/components/ConnectionLine/index.ts +++ b/packages/core/src/components/ConnectionLine/index.ts @@ -1,8 +1,8 @@ import { computed, defineComponent, h, inject } from 'vue' -import { getBezierPath, getSmoothStepPath } from '@xyflow/system' +import { getBezierPath, getMarkerId, getSmoothStepPath } from '@xyflow/system' import type { HandleElement } from '../../types' import { ConnectionLineType, ConnectionMode, Position } from '../../types' -import { getHandlePosition, getMarkerId } from '../../utils' +import { getHandlePosition } from '../../utils' import { useVueFlow } from '../../composables' import { Slots } from '../../context' import { getSimpleBezierPath } from '../Edges/SimpleBezierEdge' diff --git a/packages/core/src/components/Edges/EdgeWrapper.ts b/packages/core/src/components/Edges/EdgeWrapper.ts index d8c61e9a5..4d2bc0826 100644 --- a/packages/core/src/components/Edges/EdgeWrapper.ts +++ b/packages/core/src/components/Edges/EdgeWrapper.ts @@ -1,17 +1,10 @@ import { computed, defineComponent, getCurrentInstance, h, inject, provide, ref, resolveComponent, toRef } from 'vue' +import { getMarkerId } from '@xyflow/system' import type { Connection, EdgeComponent, HandleType, MouseTouchEvent } from '../../types' import { ConnectionMode, Position } from '../../types' import { useEdgeHooks, useHandle, useVueFlow } from '../../composables' import { EdgeId, EdgeRef, Slots } from '../../context' -import { - ARIA_EDGE_DESC_KEY, - ErrorCode, - VueFlowError, - elementSelectionKeys, - getHandle, - getHandlePosition, - getMarkerId, -} from '../../utils' +import { ARIA_EDGE_DESC_KEY, ErrorCode, VueFlowError, elementSelectionKeys, getHandle, getHandlePosition } from '../../utils' import EdgeAnchor from './EdgeAnchor' interface Props { diff --git a/packages/core/src/components/Handle/Handle.vue b/packages/core/src/components/Handle/Handle.vue index aa67fac0e..62d59f46c 100644 --- a/packages/core/src/components/Handle/Handle.vue +++ b/packages/core/src/components/Handle/Handle.vue @@ -1,9 +1,10 @@