fix(core): remove ts-transform-paths and use relative paths
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import type { DefineComponent } from 'vue'
|
||||
import { defineComponent, h, inject } from 'vue'
|
||||
import type { ConnectionLineProps } from '~/types'
|
||||
import { ConnectionLineType, ConnectionMode, Position } from '~/types'
|
||||
import { getHandlePosition, getMarkerId } from '~/utils'
|
||||
import { useVueFlow } from '~/composables'
|
||||
import { Slots } from '~/context'
|
||||
import { getBezierPath, getSimpleBezierPath, getSmoothStepPath } from '~/components/Edges/utils'
|
||||
import type { ConnectionLineProps } from '../../types'
|
||||
import { ConnectionLineType, ConnectionMode, Position } from '../../types'
|
||||
import { getHandlePosition, getMarkerId } from '../../utils'
|
||||
import { useVueFlow } from '../../composables'
|
||||
import { Slots } from '../../context'
|
||||
import { getBezierPath, getSimpleBezierPath, getSmoothStepPath } from '../Edges/utils'
|
||||
|
||||
const oppositePosition = {
|
||||
[Position.Left]: Position.Right,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineComponent, h } from 'vue'
|
||||
import type { BezierEdgeProps } from '../../types'
|
||||
import { Position } from '../../types'
|
||||
import BaseEdge from './BaseEdge.vue'
|
||||
import { getBezierPath } from './utils'
|
||||
import type { BezierEdgeProps } from '~/types'
|
||||
import { Position } from '~/types'
|
||||
|
||||
const BezierEdge = defineComponent<BezierEdgeProps>({
|
||||
name: 'BezierEdge',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { FunctionalComponent, HTMLAttributes } from 'vue'
|
||||
import { h } from 'vue'
|
||||
import { Position } from '~/types'
|
||||
import { Position } from '../../types'
|
||||
|
||||
interface Props extends HTMLAttributes {
|
||||
position: Position
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { computed, defineComponent, h, provide, ref } from 'vue'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import EdgeAnchor from './EdgeAnchor'
|
||||
import type { Connection, EdgeComponent, EdgeUpdatable, GraphEdge, HandleType, MouseTouchEvent } from '~/types'
|
||||
import { ConnectionMode, Position } from '~/types'
|
||||
import { useEdgeHooks, useHandle, useVueFlow } from '~/composables'
|
||||
import { EdgeId, EdgeRef } from '~/context'
|
||||
import type { Connection, EdgeComponent, EdgeUpdatable, GraphEdge, HandleType, MouseTouchEvent } from '../../types'
|
||||
import { ConnectionMode, Position } from '../../types'
|
||||
import { useEdgeHooks, useHandle, useVueFlow } from '../../composables'
|
||||
import { EdgeId, EdgeRef } from '../../context'
|
||||
import {
|
||||
ARIA_EDGE_DESC_KEY,
|
||||
ErrorCode,
|
||||
@@ -13,7 +12,8 @@ import {
|
||||
getEdgePositions,
|
||||
getHandle,
|
||||
getMarkerId,
|
||||
} from '~/utils'
|
||||
} from '../../utils'
|
||||
import EdgeAnchor from './EdgeAnchor'
|
||||
|
||||
interface Props {
|
||||
id: string
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineComponent, h } from 'vue'
|
||||
import type { SimpleBezierEdgeProps } from '../../types'
|
||||
import { Position } from '../../types'
|
||||
import BaseEdge from './BaseEdge.vue'
|
||||
import { getSimpleBezierPath } from './utils'
|
||||
import type { SimpleBezierEdgeProps } from '~/types'
|
||||
import { Position } from '~/types'
|
||||
|
||||
const SimpleBezierEdge = defineComponent<SimpleBezierEdgeProps>({
|
||||
name: 'SimpleBezierEdge',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineComponent, h } from 'vue'
|
||||
import type { SmoothStepEdgeProps } from '../../types'
|
||||
import { Position } from '../../types'
|
||||
import BaseEdge from './BaseEdge.vue'
|
||||
import { getSmoothStepPath } from './utils'
|
||||
import type { SmoothStepEdgeProps } from '~/types'
|
||||
import { Position } from '~/types'
|
||||
|
||||
const SmoothStepEdge = defineComponent<SmoothStepEdgeProps>({
|
||||
name: 'SmoothStepEdge',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineComponent, h } from 'vue'
|
||||
import type { StepEdgeProps } from '../../types'
|
||||
import SmoothStepEdge from './SmoothStepEdge'
|
||||
import type { StepEdgeProps } from '~/types'
|
||||
|
||||
const StepEdge = defineComponent<StepEdgeProps>({
|
||||
name: 'StepEdge',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { defineComponent, h } from 'vue'
|
||||
import type { StraightEdgeProps } from '../../types'
|
||||
import BaseEdge from './BaseEdge.vue'
|
||||
import { getStraightPath } from './utils'
|
||||
import type { StraightEdgeProps } from '~/types'
|
||||
|
||||
const StraightEdge = defineComponent<StraightEdgeProps>({
|
||||
name: 'StraightEdge',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Component, FunctionalComponent } from 'vue'
|
||||
import { h } from 'vue'
|
||||
import Handle from '../Handle/Handle.vue'
|
||||
import type { NodeProps } from '~/types'
|
||||
import { Position } from '~/types'
|
||||
import type { NodeProps } from '../../types'
|
||||
import { Position } from '../../types'
|
||||
|
||||
const DefaultNode: FunctionalComponent<NodeProps> = function ({
|
||||
sourcePosition = Position.Bottom,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Component, FunctionalComponent } from 'vue'
|
||||
import { h } from 'vue'
|
||||
import Handle from '../Handle/Handle.vue'
|
||||
import type { NodeProps } from '~/types'
|
||||
import { Position } from '~/types'
|
||||
import type { NodeProps } from '../../types'
|
||||
import { Position } from '../../types'
|
||||
|
||||
const InputNode: FunctionalComponent<NodeProps> = function ({
|
||||
sourcePosition = Position.Bottom,
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
import { computed, defineComponent, h, onBeforeUnmount, onMounted, provide, ref, watch } from 'vue'
|
||||
import { until, useVModel } from '@vueuse/core'
|
||||
import type { GraphNode, HandleConnectable, NodeComponent } from '~/types'
|
||||
import { NodeId, NodeRef } from '~/context'
|
||||
import { isInputDOMNode, useDrag, useNodeHooks, useUpdateNodePositions, useVueFlow } from '~/composables'
|
||||
import { ARIA_NODE_DESC_KEY, arrowKeyDiffs, calcNextPosition, elementSelectionKeys, getXYZPos, handleNodeClick } from '~/utils'
|
||||
import {
|
||||
ARIA_NODE_DESC_KEY,
|
||||
arrowKeyDiffs,
|
||||
calcNextPosition,
|
||||
elementSelectionKeys,
|
||||
getXYZPos,
|
||||
handleNodeClick,
|
||||
} from '../../utils'
|
||||
import type { GraphNode, HandleConnectable, NodeComponent } from '../../types'
|
||||
import { NodeId, NodeRef } from '../../context'
|
||||
import { isInputDOMNode, useDrag, useNodeHooks, useUpdateNodePositions, useVueFlow } from '../../composables'
|
||||
|
||||
interface Props {
|
||||
id: string
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Component, FunctionalComponent } from 'vue'
|
||||
import { h } from 'vue'
|
||||
import Handle from '../Handle/Handle.vue'
|
||||
import type { NodeProps } from '~/types'
|
||||
import { Position } from '~/types'
|
||||
import type { NodeProps } from '../../types'
|
||||
import { Position } from '../../types'
|
||||
|
||||
const OutputNode: FunctionalComponent<NodeProps> = function ({
|
||||
targetPosition = Position.Top,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { useDrag, useUpdateNodePositions, useVueFlow } from '../../composables'
|
||||
import { arrowKeyDiffs, getRectOfNodes } from '~/utils'
|
||||
import { arrowKeyDiffs, getRectOfNodes } from '../../utils'
|
||||
|
||||
const { emits, viewport, getSelectedNodes, noPanClassName, disableKeyboardA11y, userSelectionActive } = $(useVueFlow())
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { SelectionRect } from '~/types'
|
||||
import type { SelectionRect } from '../../types'
|
||||
|
||||
defineProps<{ userSelectionRect: SelectionRect }>()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user