update(dist): Remove rollup and use vite to build lib
* Remove custom tsconfig paths to avoid resolving issues on published package
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties } from 'vue'
|
||||
import { ConnectionLineType, HandleElement, Node, Position } from '~/types'
|
||||
import { getBezierPath, getSmoothStepPath } from '~/components/Edges/utils'
|
||||
import { useStore } from '~/composables'
|
||||
import { ConnectionLineType, HandleElement, Node, Position } from '../../types'
|
||||
import { getBezierPath, getSmoothStepPath } from '../Edges/utils'
|
||||
import { useStore } from '../../composables'
|
||||
|
||||
interface ConnectionLineProps {
|
||||
sourceNode: Node
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { CSSProperties, VNode } from 'vue'
|
||||
import { CSSProperties } from 'vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '../../types'
|
||||
import { getCenter, getMarkerEnd, getBezierPath } from './utils'
|
||||
import EdgeText from './EdgeText.vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '~/types'
|
||||
import { getCenter, getMarkerEnd, getBezierPath } from '~/components/Edges/utils'
|
||||
|
||||
interface BezierEdgeProps<T = any> {
|
||||
interface BezierEdgeProps {
|
||||
id: ElementId
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
@@ -30,7 +30,7 @@ interface BezierEdgeProps<T = any> {
|
||||
style?: CSSProperties
|
||||
arrowHeadType?: ArrowHeadType
|
||||
markerEndId?: string
|
||||
data?: T
|
||||
data?: any
|
||||
sourceHandleId?: ElementId
|
||||
targetHandleId?: ElementId
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { getEdgePositions, getHandle, getSourceTargetNodes, isEdgeVisible } from '../../container/EdgeRenderer/utils'
|
||||
import { isEdge } from '../../utils'
|
||||
import { ConnectionMode, Edge, EdgeType, Position } from '../../types'
|
||||
import { useHandle, useHooks, useStore } from '../../composables'
|
||||
import EdgeAnchor from './EdgeAnchor.vue'
|
||||
import { getEdgePositions, getHandle, getSourceTargetNodes, isEdgeVisible } from '~/container/EdgeRenderer/utils'
|
||||
import { isEdge } from '~/utils/graph'
|
||||
import { ConnectionMode, Edge, EdgeType, Position } from '~/types'
|
||||
import { useHandle, useHooks, useStore } from '~/composables'
|
||||
|
||||
interface EdgeProps {
|
||||
type: EdgeType
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { HTMLAttributes } from 'vue'
|
||||
import { Position } from '~/types'
|
||||
import { Position } from '../../types'
|
||||
|
||||
const shiftX = (x: number, shift: number, position: Position): number => {
|
||||
if (position === Position.Left) return x - shift
|
||||
|
||||
@@ -4,13 +4,7 @@ import { CSSProperties, HTMLAttributes } from 'vue'
|
||||
interface EdgeTextProps extends HTMLAttributes {
|
||||
x: number
|
||||
y: number
|
||||
label?:
|
||||
| string
|
||||
| {
|
||||
component: any
|
||||
props?: any
|
||||
}
|
||||
| any
|
||||
label?: any
|
||||
labelStyle?: CSSProperties
|
||||
labelShowBg?: boolean
|
||||
labelBgStyle?: any
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { VNode } from 'vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '../../types'
|
||||
import EdgeText from './EdgeText.vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '~/types'
|
||||
import { getCenter, getMarkerEnd, getSmoothStepPath } from '~/components/Edges/utils'
|
||||
import { getCenter, getMarkerEnd, getSmoothStepPath } from './utils'
|
||||
|
||||
export interface EdgeSmoothStepProps<T = any> {
|
||||
export interface EdgeSmoothStepProps {
|
||||
id: ElementId
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
@@ -30,7 +29,7 @@ export interface EdgeSmoothStepProps<T = any> {
|
||||
style?: any
|
||||
arrowHeadType?: ArrowHeadType
|
||||
markerEndId?: string
|
||||
data?: T
|
||||
data?: any
|
||||
borderRadius?: number
|
||||
sourceHandleId?: ElementId | null
|
||||
targetHandleId?: ElementId | null
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { VNode } from 'vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '../../types'
|
||||
import SmoothStepEdge from './SmoothStepEdge.vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '~/types'
|
||||
|
||||
export interface EdgeStepProps<T = any> {
|
||||
export interface EdgeStepProps {
|
||||
id: ElementId
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
@@ -29,7 +28,7 @@ export interface EdgeStepProps<T = any> {
|
||||
style?: any
|
||||
arrowHeadType?: ArrowHeadType
|
||||
markerEndId?: string
|
||||
data?: T
|
||||
data?: any
|
||||
sourceHandleId?: ElementId | null
|
||||
targetHandleId?: ElementId | null
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { VNode } from 'vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '../../types'
|
||||
import EdgeText from './EdgeText.vue'
|
||||
import { ArrowHeadType, ElementId, Position } from '~/types'
|
||||
import { getMarkerEnd, getBezierPath } from '~/components/Edges/utils'
|
||||
import { getMarkerEnd, getBezierPath } from './utils'
|
||||
|
||||
interface StraightEdgeProps<T = any> {
|
||||
interface StraightEdgeProps {
|
||||
id: ElementId
|
||||
source: ElementId
|
||||
target: ElementId
|
||||
@@ -30,7 +29,7 @@ interface StraightEdgeProps<T = any> {
|
||||
style?: any
|
||||
arrowHeadType?: ArrowHeadType
|
||||
markerEndId?: string
|
||||
data?: T
|
||||
data?: any
|
||||
sourceHandleId?: ElementId | null
|
||||
targetHandleId?: ElementId | null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ArrowHeadType, Position } from '~/types'
|
||||
import { ArrowHeadType, Position } from '../../types'
|
||||
|
||||
export const getMarkerEnd = (arrowHeadType?: ArrowHeadType, markerEndId?: string): string => {
|
||||
if (typeof markerEndId !== 'undefined' && markerEndId) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { Position, ValidConnectionFunc } from '~/types'
|
||||
import { NodeIdContextKey } from '~/context'
|
||||
import { useHandle, useHooks, useStore } from '~/composables'
|
||||
import { Position, ValidConnectionFunc } from '../../types'
|
||||
import { NodeIdContextKey } from '../../context'
|
||||
import { useHandle, useHooks, useStore } from '../../composables'
|
||||
|
||||
interface HandleProps {
|
||||
id?: string
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Handle from '~/components/Handle/Handle.vue'
|
||||
import { NodeProps, Position } from '~/types'
|
||||
import Handle from '../Handle/Handle.vue'
|
||||
import { NodeProps, Position } from '../../types'
|
||||
|
||||
interface DefaultNodeProps extends NodeProps {
|
||||
data?: NodeProps['data']
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Handle from '~/components/Handle/Handle.vue'
|
||||
import { NodeProps, Position } from '~/types'
|
||||
import Handle from '../Handle/Handle.vue'
|
||||
import { NodeProps, Position } from '../../types'
|
||||
|
||||
interface InputNodeProps extends NodeProps {
|
||||
data?: NodeProps['data']
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { DraggableEventListener, DraggableCore } from '@braks/revue-draggable'
|
||||
import { Node, NodeType, SnapGrid } from '~/types'
|
||||
import { NodeIdContextKey } from '~/context'
|
||||
import { useHooks, useStore } from '~/composables'
|
||||
import { Node, NodeType, SnapGrid } from '../../types'
|
||||
import { NodeIdContextKey } from '../../context'
|
||||
import { useHooks, useStore } from '../../composables'
|
||||
|
||||
interface NodeProps {
|
||||
node: Node
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import Handle from '~/components/Handle/Handle.vue'
|
||||
import { NodeProps, Position } from '~/types'
|
||||
import Handle from '../Handle/Handle.vue'
|
||||
import { NodeProps, Position } from '../../types'
|
||||
|
||||
interface OutputNodeProps extends NodeProps {
|
||||
data?: NodeProps['data']
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { HandleElement, Position } from '~/types'
|
||||
import { getDimensions } from '~/utils'
|
||||
import { HandleElement, Position } from '../../types'
|
||||
import { getDimensions } from '../../utils'
|
||||
|
||||
export const getHandleBoundsByHandleType = (
|
||||
selector: string,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { DraggableEventListener } from '@braks/revue-draggable'
|
||||
import { Node } from '~/types'
|
||||
import { getRectOfNodes, isNode } from '~/utils/graph'
|
||||
import { useHooks, useStore } from '~/composables'
|
||||
import { Draggable, DraggableEventListener } from '@braks/revue-draggable'
|
||||
import { Node } from '../../types'
|
||||
import { getRectOfNodes, isNode } from '../../utils'
|
||||
import { useHooks, useStore } from '../../composables'
|
||||
|
||||
const store = useStore()
|
||||
const hooks = useHooks()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useStore } from '../../composables'
|
||||
import SelectionRect from './SelectionRect.vue'
|
||||
import { getMousePosition } from '~/components/UserSelection/utils'
|
||||
import { useStore } from '~/composables'
|
||||
import { getMousePosition } from './utils'
|
||||
|
||||
const store = useStore()
|
||||
const el = templateRef('user-selection', null)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { XYPosition } from '~/types'
|
||||
import { XYPosition } from '../../types'
|
||||
|
||||
export function getMousePosition(event: MouseEvent): XYPosition | void {
|
||||
const flowNode = (event.target as Element).closest('.vue-flow')
|
||||
|
||||
Reference in New Issue
Block a user