fix(core): remove ts-transform-paths and use relative paths
This commit is contained in:
@@ -5,7 +5,7 @@ import type { Ref } from 'vue'
|
||||
import { ref, watch } from 'vue'
|
||||
import type { MaybeRefOrGetter } from '@vueuse/core'
|
||||
import { toValue } from '@vueuse/core'
|
||||
import { useGetPointerPosition, useVueFlow } from '.'
|
||||
import type { NodeDragEvent, NodeDragItem, XYPosition } from '../types'
|
||||
import {
|
||||
calcAutoPan,
|
||||
calcNextPosition,
|
||||
@@ -14,8 +14,8 @@ import {
|
||||
getEventPosition,
|
||||
handleNodeClick,
|
||||
hasSelector,
|
||||
} from '~/utils'
|
||||
import type { NodeDragEvent, NodeDragItem, XYPosition } from '~/types'
|
||||
} from '../utils'
|
||||
import { useGetPointerPosition, useVueFlow } from '.'
|
||||
|
||||
export type UseDragEvent = D3DragEvent<HTMLDivElement, null, SubjectPosition>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { inject, ref } from 'vue'
|
||||
import type { CustomEvent, ElementData } from '../types'
|
||||
import { ErrorCode, VueFlowError } from '../utils'
|
||||
import { EdgeId, EdgeRef } from '../context'
|
||||
import { useVueFlow } from './useVueFlow'
|
||||
import type { CustomEvent, ElementData } from '~/types'
|
||||
import { ErrorCode, VueFlowError } from '~/utils'
|
||||
import { EdgeId, EdgeRef } from '~/context'
|
||||
|
||||
/**
|
||||
* Access an edge
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { EdgeEventsEmit, EdgeEventsOn, GraphEdge, VueFlowStore } from '~/types'
|
||||
import { createExtendedEventHook } from '~/utils'
|
||||
import type { EdgeEventsEmit, EdgeEventsOn, GraphEdge, VueFlowStore } from '../types'
|
||||
import { createExtendedEventHook } from '../utils'
|
||||
|
||||
function createEdgeHooks() {
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { MaybeRefOrGetter } from '@vueuse/core'
|
||||
import { toValue } from '@vueuse/core'
|
||||
import { useVueFlow } from './useVueFlow'
|
||||
import type { Connection, ConnectionHandle, HandleType, MouseTouchEvent, ValidConnectionFunc } from '~/types'
|
||||
import type { Connection, ConnectionHandle, HandleType, MouseTouchEvent, ValidConnectionFunc } from '../types'
|
||||
import {
|
||||
calcAutoPan,
|
||||
getClosestHandle,
|
||||
@@ -15,7 +14,8 @@ import {
|
||||
pointToRendererPoint,
|
||||
rendererPointToPoint,
|
||||
resetRecentHandle,
|
||||
} from '~/utils'
|
||||
} from '../utils'
|
||||
import { useVueFlow } from './useVueFlow'
|
||||
|
||||
interface UseHandleProps {
|
||||
handleId: MaybeRefOrGetter<string | null>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { computed, inject, ref } from 'vue'
|
||||
import type { CustomEvent, ElementData } from '../types'
|
||||
import { ErrorCode, VueFlowError, getConnectedEdges } from '../utils'
|
||||
import { NodeId, NodeRef } from '../context'
|
||||
import { useVueFlow } from './useVueFlow'
|
||||
import type { CustomEvent, ElementData } from '~/types'
|
||||
import { NodeId, NodeRef } from '~/context'
|
||||
import { ErrorCode, VueFlowError, getConnectedEdges } from '~/utils'
|
||||
|
||||
/**
|
||||
* Access a node, it's parent (if one exists) and connected edges
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { GraphNode, NodeEventsEmit, NodeEventsOn, VueFlowStore } from '~/types'
|
||||
import { createExtendedEventHook } from '~/utils'
|
||||
import type { GraphNode, NodeEventsEmit, NodeEventsOn, VueFlowStore } from '../types'
|
||||
import { createExtendedEventHook } from '../utils'
|
||||
|
||||
function createNodeHooks() {
|
||||
return {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { NodeDragItem, XYPosition } from '../types'
|
||||
import { calcNextPosition } from '../utils'
|
||||
import { useVueFlow } from './useVueFlow'
|
||||
import type { NodeDragItem, XYPosition } from '~/types'
|
||||
import { calcNextPosition } from '~/utils'
|
||||
|
||||
export function useUpdateNodePositions() {
|
||||
const { getSelectedNodes, nodeExtent, updateNodePositions, findNode, snapGrid, snapToGrid, nodesDraggable, emits } =
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { until } from '@vueuse/core'
|
||||
import { zoomIdentity } from 'd3-zoom'
|
||||
import { computed, ref } from 'vue'
|
||||
import type { ComputedGetters, D3Selection, GraphNode, Project, State, ViewportFunctions } from '~/types'
|
||||
import { clampPosition, getRectOfNodes, getTransformForBounds, pointToRendererPoint, rendererPointToPoint, warn } from '~/utils'
|
||||
import type { ComputedGetters, D3Selection, GraphNode, Project, State, ViewportFunctions } from '../types'
|
||||
import { clampPosition, getRectOfNodes, getTransformForBounds, pointToRendererPoint, rendererPointToPoint, warn } from '../utils'
|
||||
|
||||
interface ExtendedViewport extends ViewportFunctions {
|
||||
initialized: boolean
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { toRefs, tryOnScopeDispose } from '@vueuse/core'
|
||||
import type { EffectScope } from 'vue'
|
||||
import { computed, effectScope, getCurrentScope, inject, provide, reactive, watch } from 'vue'
|
||||
import { useActions, useGetters, useState } from '~/store'
|
||||
import type { EdgeChange, FlowOptions, FlowProps, NodeChange, State, VueFlowStore } from '~/types'
|
||||
import { VueFlow } from '~/context'
|
||||
import { warn } from '~/utils'
|
||||
import type { EdgeChange, FlowOptions, FlowProps, NodeChange, State, VueFlowStore } from '../types'
|
||||
import { warn } from '../utils'
|
||||
import { useActions, useGetters, useState } from '../store'
|
||||
import { VueFlow } from '../context'
|
||||
|
||||
/**
|
||||
* Stores all currently created store instances
|
||||
|
||||
@@ -2,8 +2,8 @@ import type { ToRefs } from 'vue'
|
||||
import { effectScope, isRef, nextTick, onScopeDispose, watch } from 'vue'
|
||||
import type { WatchPausableReturn } from '@vueuse/core'
|
||||
import { toRef, watchPausable } from '@vueuse/core'
|
||||
import type { Connection, FlowProps, VueFlowStore } from '~/types'
|
||||
import { isDef } from '~/utils'
|
||||
import type { Connection, FlowProps, VueFlowStore } from '../types'
|
||||
import { isDef } from '../utils'
|
||||
|
||||
export function useWatchProps(
|
||||
models: ToRefs<Pick<FlowProps, 'nodes' | 'edges' | 'modelValue'>>,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ComputedGetters, State, ViewportFunctions } from '../types'
|
||||
import { useVueFlow } from './useVueFlow'
|
||||
import { useViewport } from './useViewport'
|
||||
import type { ComputedGetters, State, ViewportFunctions } from '~/types'
|
||||
|
||||
/**
|
||||
* @deprecated use {@link useVueFlow} instead (all viewport functions are also available in {@link useVueFlow})
|
||||
|
||||
Reference in New Issue
Block a user