refactor(core): remove exports from barrel files
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Position } from '../../..//types'
|
||||
import { Position } from '../../../types'
|
||||
import { getBezierEdgeCenter } from './general'
|
||||
|
||||
export interface GetBezierPathParams {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Position } from '../../..//types'
|
||||
import { Position } from '../../../types'
|
||||
import { getBezierEdgeCenter } from './general'
|
||||
|
||||
export interface GetSimpleBezierPathParams {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { XYPosition } from '../../..//types'
|
||||
import { Position } from '../../..//types'
|
||||
import type { XYPosition } from '../../../types'
|
||||
import { Position } from '../../../types'
|
||||
import { getSimpleEdgeCenter } from './general'
|
||||
|
||||
export interface GetSmoothStepPathParams {
|
||||
|
||||
+11
-12
@@ -9,16 +9,14 @@ export { default as Handle } from './components/Handle/Handle.vue'
|
||||
|
||||
export { default as Panel } from './components/Panel/Panel.vue'
|
||||
|
||||
export {
|
||||
StraightEdge,
|
||||
StepEdge,
|
||||
BezierEdge,
|
||||
SimpleBezierEdge,
|
||||
SmoothStepEdge,
|
||||
BaseEdge,
|
||||
EdgeText,
|
||||
EdgeLabelRenderer,
|
||||
} from './components/Edges'
|
||||
export { default as StraightEdge } from './components/Edges/StraightEdge'
|
||||
export { default as StepEdge } from './components/Edges/StepEdge'
|
||||
export { default as BezierEdge } from './components/Edges/BezierEdge'
|
||||
export { default as SimpleBezierEdge } from './components/Edges/SimpleBezierEdge'
|
||||
export { default as SmoothStepEdge } from './components/Edges/SmoothStepEdge'
|
||||
export { default as BaseEdge } from './components/Edges/BaseEdge.vue'
|
||||
export { default as EdgeText } from './components/Edges/EdgeText.vue'
|
||||
export { default as EdgeLabelRenderer } from './components/Edges/EdgeLabelRenderer.vue'
|
||||
|
||||
export {
|
||||
getBezierPath,
|
||||
@@ -43,7 +41,7 @@ export {
|
||||
getRectOfNodes,
|
||||
pointToRendererPoint,
|
||||
rendererPointToPoint,
|
||||
/** @deprecated will be removed in the next major version, use `rendererPointToPoint` instead */
|
||||
/** @deprecated - will be removed in the next major version, use `rendererPointToPoint` instead */
|
||||
rendererPointToPoint as graphPosToZoomedPos,
|
||||
getNodesInside,
|
||||
getMarkerId,
|
||||
@@ -53,12 +51,13 @@ export {
|
||||
} from './utils/graph'
|
||||
|
||||
/**
|
||||
* @deprecated - Use store instance and call `applyChanges` with template-ref or the one received by `onPaneReady` instead
|
||||
* Intended for options API
|
||||
* In composition API you can access apply utilities from `useVueFlow`
|
||||
*/
|
||||
export { applyChanges, applyEdgeChanges, applyNodeChanges } from './utils/changes'
|
||||
|
||||
export { defaultEdgeTypes, defaultNodeTypes } from './store/state'
|
||||
export { defaultEdgeTypes, defaultNodeTypes } from './utils/defaultNodesEdges'
|
||||
|
||||
export { VueFlow as VueFlowInjection, NodeId as NodeIdInjection } from './context'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { ComputedRef } from 'vue'
|
||||
import { computed } from 'vue'
|
||||
import type { ComputedGetters, GraphEdge, GraphNode, State } from '../types'
|
||||
import { ErrorCode, VueFlowError, getNodesInside, isEdgeVisible } from '../utils'
|
||||
import { defaultEdgeTypes, defaultNodeTypes } from './state'
|
||||
import { defaultEdgeTypes, defaultNodeTypes } from '../utils/defaultNodesEdges'
|
||||
|
||||
export function useGetters(state: State, nodeIds: ComputedRef<string[]>, edgeIds: ComputedRef<string[]>): ComputedGetters {
|
||||
/**
|
||||
|
||||
@@ -1,32 +1,9 @@
|
||||
import type { DefaultEdgeTypes, DefaultNodeTypes, FlowOptions, State } from '../types'
|
||||
import type { FlowOptions, State } from '../types'
|
||||
import { ConnectionLineType, ConnectionMode, PanOnScrollMode, SelectionMode } from '../types'
|
||||
import {
|
||||
BezierEdge,
|
||||
DefaultNode,
|
||||
InputNode,
|
||||
OutputNode,
|
||||
SimpleBezierEdge,
|
||||
SmoothStepEdge,
|
||||
StepEdge,
|
||||
StraightEdge,
|
||||
} from '../components'
|
||||
|
||||
import { isMacOs } from '../utils'
|
||||
import { createHooks } from './hooks'
|
||||
|
||||
export const defaultNodeTypes: DefaultNodeTypes = {
|
||||
input: InputNode,
|
||||
default: DefaultNode,
|
||||
output: OutputNode,
|
||||
}
|
||||
|
||||
export const defaultEdgeTypes: DefaultEdgeTypes = {
|
||||
default: BezierEdge,
|
||||
straight: StraightEdge,
|
||||
step: StepEdge,
|
||||
smoothstep: SmoothStepEdge,
|
||||
simplebezier: SimpleBezierEdge,
|
||||
}
|
||||
|
||||
export function useState(): State {
|
||||
return {
|
||||
vueFlowRef: null,
|
||||
|
||||
@@ -203,9 +203,12 @@ export function applyChanges<
|
||||
return elements
|
||||
}
|
||||
|
||||
/** @deprecated Use store instance and call `applyChanges` with template-ref or the one received by `onPaneReady` instead */
|
||||
export function applyEdgeChanges(changes: EdgeChange[], edges: GraphEdge[]) {
|
||||
return applyChanges(changes, edges)
|
||||
}
|
||||
|
||||
/** @deprecated Use store instance and call `applyChanges` with template-ref or the one received by `onPaneReady` instead */
|
||||
export function applyNodeChanges(changes: NodeChange[], nodes: GraphNode[]) {
|
||||
return applyChanges(changes, nodes)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { DefaultEdgeTypes, DefaultNodeTypes } from '../types'
|
||||
|
||||
import DefaultNode from '../components/Nodes/DefaultNode'
|
||||
import OutputNode from '../components/Nodes/OutputNode'
|
||||
import InputNode from '../components/Nodes/InputNode'
|
||||
import StraightEdge from '../components/Edges/StraightEdge'
|
||||
import StepEdge from '../components/Edges/StepEdge'
|
||||
import BezierEdge from '../components/Edges/BezierEdge'
|
||||
import SimpleBezierEdge from '../components/Edges/SimpleBezierEdge'
|
||||
import SmoothStepEdge from '../components/Edges/SmoothStepEdge'
|
||||
|
||||
export const defaultNodeTypes: DefaultNodeTypes = {
|
||||
input: InputNode,
|
||||
default: DefaultNode,
|
||||
output: OutputNode,
|
||||
}
|
||||
|
||||
export const defaultEdgeTypes: DefaultEdgeTypes = {
|
||||
default: BezierEdge,
|
||||
straight: StraightEdge,
|
||||
step: StepEdge,
|
||||
smoothstep: SmoothStepEdge,
|
||||
simplebezier: SimpleBezierEdge,
|
||||
}
|
||||
Reference in New Issue
Block a user