refactor(core): add explicit imports and remove auto-imports
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { zoomIdentity } from 'd3-zoom'
|
||||
import type { ComputedRef } from 'vue'
|
||||
import { until } from '@vueuse/core'
|
||||
import { useState } from './state'
|
||||
import type {
|
||||
Actions,
|
||||
ComputedGetters,
|
||||
@@ -20,6 +22,29 @@ import type {
|
||||
Rect,
|
||||
State,
|
||||
} from '~/types'
|
||||
import { useViewport } from '~/composables'
|
||||
import {
|
||||
ErrorCode,
|
||||
VueFlowError,
|
||||
addEdgeToStore,
|
||||
applyChanges,
|
||||
createAdditionChange,
|
||||
createGraphNodes,
|
||||
createRemoveChange,
|
||||
createSelectionChange,
|
||||
getConnectedEdges,
|
||||
getDimensions,
|
||||
getHandleBounds,
|
||||
getOverlappingArea,
|
||||
getSelectionChanges,
|
||||
isDef,
|
||||
isEdge,
|
||||
isNode,
|
||||
isRect,
|
||||
nodeToRect,
|
||||
parseEdge,
|
||||
updateEdgeAction,
|
||||
} from '~/utils'
|
||||
|
||||
export function useActions(
|
||||
state: State,
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import type { ComputedRef } from 'vue'
|
||||
import { computed } from 'vue'
|
||||
import { defaultEdgeTypes, defaultNodeTypes } from './state'
|
||||
import type { ComputedGetters, GraphEdge, GraphNode, State } from '~/types'
|
||||
import { ErrorCode, VueFlowError, getNodesInside, isEdgeVisible } from '~/utils'
|
||||
|
||||
export function useGetters(state: State, nodeIds: ComputedRef<string[]>, edgeIds: ComputedRef<string[]>): ComputedGetters {
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { tryOnScopeDispose } from '@vueuse/core'
|
||||
import type { Ref } from 'vue'
|
||||
import { onBeforeMount } from 'vue'
|
||||
import type { FlowHooks } from '~/types'
|
||||
import { createExtendedEventHook, warn } from '~/utils'
|
||||
|
||||
// flow event hooks
|
||||
export function createHooks(): FlowHooks {
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
export * from './actions'
|
||||
export * from './getters'
|
||||
export * from './hooks'
|
||||
export * from './state'
|
||||
@@ -1,3 +1,4 @@
|
||||
import { createHooks } from './hooks'
|
||||
import type { DefaultEdgeTypes, DefaultNodeTypes, FlowOptions, State } from '~/types'
|
||||
import { ConnectionLineType, ConnectionMode, PanOnScrollMode, SelectionMode } from '~/types'
|
||||
import {
|
||||
@@ -10,6 +11,7 @@ import {
|
||||
StepEdge,
|
||||
StraightEdge,
|
||||
} from '~/components'
|
||||
import { isDef } from '~/utils'
|
||||
|
||||
export const defaultNodeTypes: DefaultNodeTypes = {
|
||||
input: InputNode,
|
||||
|
||||
Reference in New Issue
Block a user