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,7 +1,7 @@
|
||||
import { getHostForElement } from '~/utils'
|
||||
import { Connection, ConnectionMode, ElementId, HandleType, ValidConnectionFunc } from '~/types'
|
||||
import useStore from '~/composables/useStore'
|
||||
import useHooks from '~/composables/useHooks'
|
||||
import { getHostForElement } from '../utils'
|
||||
import { Connection, ConnectionMode, ElementId, HandleType, ValidConnectionFunc } from '../types'
|
||||
import useStore from './useStore'
|
||||
import useHooks from './useHooks'
|
||||
|
||||
type Result = {
|
||||
elementBelow: Element | null
|
||||
@@ -157,6 +157,7 @@ export default () => {
|
||||
hooks.connectEnd.trigger(event)
|
||||
|
||||
if (elementEdgeUpdaterType) {
|
||||
// todo fix missing edge
|
||||
hooks.edgeUpdateEnd.trigger({ event } as any)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
import { Connection, Edge, Elements, EmitFunc, FlowHooks, FlowTransform, Node, OnConnectStartParams, FlowInstance } from '~/types'
|
||||
import { Hooks } from '~/context'
|
||||
import {
|
||||
Connection,
|
||||
Edge,
|
||||
Elements,
|
||||
EmitFunc,
|
||||
FlowHooks,
|
||||
FlowTransform,
|
||||
Node,
|
||||
OnConnectStartParams,
|
||||
FlowInstance,
|
||||
} from '../types'
|
||||
import { Hooks } from '../context'
|
||||
|
||||
// flow event hooks
|
||||
const hooks = (): FlowHooks => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Ref } from 'vue'
|
||||
import { onKeyDown, onKeyPressed, onKeyUp } from '@vueuse/core'
|
||||
import { KeyCode } from '~/types'
|
||||
import { KeyCode } from '../types'
|
||||
|
||||
// todo cancel keypress for input dom nodes
|
||||
export default (keyCode: KeyCode, onChange?: (keyPressed: boolean) => void): Ref<boolean> => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { FlowOptions } from '~/types'
|
||||
import useFlowStore from '~/store/useFlowStore'
|
||||
import { initialState } from '~/store'
|
||||
import { Store } from '~/context'
|
||||
import { FlowOptions } from '../types'
|
||||
import { useFlowStore, initialState } from '../store'
|
||||
import { Store } from '../context'
|
||||
|
||||
export default (options?: Partial<FlowOptions>) => {
|
||||
let store = inject(Store)!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ElementId, UpdateNodeInternals } from '~/types'
|
||||
import useStore from '~/composables/useStore'
|
||||
import { ElementId, UpdateNodeInternals } from '../types'
|
||||
import useStore from './useStore'
|
||||
|
||||
export default (store = useStore()): UpdateNodeInternals =>
|
||||
(id: ElementId) => {
|
||||
|
||||
@@ -2,9 +2,11 @@ import { D3ZoomEvent, zoom, zoomIdentity, ZoomTransform } from 'd3-zoom'
|
||||
import { pointer, select } from 'd3-selection'
|
||||
import { Ref } from 'vue'
|
||||
import { get } from '@vueuse/core'
|
||||
import { FlowTransform, PanOnScrollMode, UseZoom, UseZoomOptions } from '~/types'
|
||||
import { clamp } from '~/utils'
|
||||
import { useKeyPress, useHooks, useStore } from '~/composables'
|
||||
import { FlowTransform, PanOnScrollMode, UseZoom, UseZoomOptions } from '../types'
|
||||
import { clamp } from '../utils'
|
||||
import useKeyPress from './useKeyPress'
|
||||
import useHooks from './useHooks'
|
||||
import useStore from './useStore'
|
||||
|
||||
const viewChanged = (prevTransform: FlowTransform, eventTransform: ZoomTransform): boolean =>
|
||||
prevTransform.x !== eventTransform.x || prevTransform.y !== eventTransform.y || prevTransform.zoom !== eventTransform.k
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// @ts-nocheck
|
||||
import { zoomIdentity } from 'd3-zoom'
|
||||
import { getRectOfNodes, pointToRendererPoint, getTransformForBounds } from '~/utils/graph'
|
||||
import { FitViewParams, FlowTransform, Node, Rect, UseZoomPanHelper, XYPosition } from '~/types'
|
||||
import useStore from '~/composables/useStore'
|
||||
import { getRectOfNodes, pointToRendererPoint, getTransformForBounds } from '../utils'
|
||||
import { FitViewParams, FlowTransform, Node, Rect, UseZoomPanHelper, XYPosition } from '../types'
|
||||
import useStore from './useStore'
|
||||
|
||||
const DEFAULT_PADDING = 0.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user