fix(core): remove ts-transform-paths and use relative paths

This commit is contained in:
braks
2023-12-12 23:36:33 +01:00
committed by Braks
parent 0506f6ff93
commit 458b5d42ba
48 changed files with 112 additions and 151 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import type { XYPosition } from '~/types'
import type { XYPosition } from '../types'
export const ARIA_NODE_DESC_KEY = 'vue-flow__node-desc'
export const ARIA_EDGE_DESC_KEY = 'vue-flow__edge-desc'
+1 -1
View File
@@ -1,5 +1,5 @@
import type { Dimensions, XYPosition } from '../types'
import { clamp } from './graph'
import type { Dimensions, XYPosition } from '~/types'
// returns a number between 0 and 1 that represents the velocity of the movement
// when the mouse is close to the edge of the canvas
+2 -2
View File
@@ -1,5 +1,4 @@
import { nextTick } from 'vue'
import { isDef, isGraphNode } from '.'
import type {
EdgeAddChange,
EdgeChange,
@@ -16,7 +15,8 @@ import type {
NodeSelectionChange,
StyleFunc,
Styles,
} from '~/types'
} from '../types'
import { isDef, isGraphNode } from '.'
function handleParentExpand(updateItem: GraphNode, parent: GraphNode) {
if (parent) {
+2 -2
View File
@@ -1,5 +1,4 @@
import { markRaw } from 'vue'
import { ErrorCode, VueFlowError, clampPosition, isParentSelected } from '.'
import type {
Actions,
CoordinateExtent,
@@ -9,7 +8,8 @@ import type {
NodeDragItem,
State,
XYPosition,
} from '~/types'
} from '../types'
import { ErrorCode, VueFlowError, clampPosition, isParentSelected } from '.'
export function hasSelector(target: Element, selector: string, node: Element): boolean {
let current = target
+2 -2
View File
@@ -1,6 +1,6 @@
import type { Actions, EdgePositions, GraphEdge, GraphNode, HandleElement, Rect, ViewportTransform, XYPosition } from '../types'
import { Position } from '../types'
import { rectToBox } from '.'
import type { Actions, EdgePositions, GraphEdge, GraphNode, HandleElement, Rect, ViewportTransform, XYPosition } from '~/types'
import { Position } from '~/types'
export function getHandlePosition(position: Position, rect: Rect, handle: HandleElement | null): XYPosition {
const x = (handle?.x ?? 0) + rect.x
+2 -2
View File
@@ -1,5 +1,4 @@
import { markRaw } from 'vue'
import { isDef, warn } from '.'
import type {
Actions,
Box,
@@ -21,7 +20,8 @@ import type {
ViewportTransform,
XYPosition,
XYZPosition,
} from '~/types'
} from '../types'
import { isDef, warn } from '.'
import { useWindow } from '~/composables'
export function nodeToRect(node: GraphNode): Rect {
+3 -3
View File
@@ -1,5 +1,4 @@
import { getEventPosition } from '.'
import { ConnectionMode } from '~/types'
import { ConnectionMode } from '../types'
import type {
Actions,
Connection,
@@ -12,7 +11,8 @@ import type {
ValidConnectionFunc,
ValidHandleResult,
XYPosition,
} from '~/types'
} from '../types'
import { getEventPosition } from '.'
export interface ConnectionHandle extends XYPosition, Dimensions {
id: string | null
+1 -1
View File
@@ -1,7 +1,7 @@
import type { Ref } from 'vue'
import { nextTick } from 'vue'
import type { Actions, GraphNode, HandleElement, Position } from '../types'
import { getDimensions } from '.'
import type { Actions, GraphNode, HandleElement, Position } from '~/types'
export function getHandleBounds(selector: string, nodeElement: HTMLDivElement, zoom: number): HandleElement[] | undefined {
const handles = nodeElement.querySelectorAll(`.vue-flow__handle${selector}`)
+1 -1
View File
@@ -1,6 +1,6 @@
import { unref } from 'vue'
import type { Actions, Connection, Edge, GraphEdge, GraphNode, Node, State } from '../types'
import { ErrorCode, VueFlowError, connectionExists, getEdgeId, isEdge, isNode, parseEdge, parseNode } from '.'
import type { Actions, Connection, Edge, GraphEdge, GraphNode, Node, State } from '~/types'
type NonUndefined<T> = T extends undefined ? never : T