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'
|
import { getBezierEdgeCenter } from './general'
|
||||||
|
|
||||||
export interface GetBezierPathParams {
|
export interface GetBezierPathParams {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Position } from '../../..//types'
|
import { Position } from '../../../types'
|
||||||
import { getBezierEdgeCenter } from './general'
|
import { getBezierEdgeCenter } from './general'
|
||||||
|
|
||||||
export interface GetSimpleBezierPathParams {
|
export interface GetSimpleBezierPathParams {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { XYPosition } from '../../..//types'
|
import type { XYPosition } from '../../../types'
|
||||||
import { Position } from '../../..//types'
|
import { Position } from '../../../types'
|
||||||
import { getSimpleEdgeCenter } from './general'
|
import { getSimpleEdgeCenter } from './general'
|
||||||
|
|
||||||
export interface GetSmoothStepPathParams {
|
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 { default as Panel } from './components/Panel/Panel.vue'
|
||||||
|
|
||||||
export {
|
export { default as StraightEdge } from './components/Edges/StraightEdge'
|
||||||
StraightEdge,
|
export { default as StepEdge } from './components/Edges/StepEdge'
|
||||||
StepEdge,
|
export { default as BezierEdge } from './components/Edges/BezierEdge'
|
||||||
BezierEdge,
|
export { default as SimpleBezierEdge } from './components/Edges/SimpleBezierEdge'
|
||||||
SimpleBezierEdge,
|
export { default as SmoothStepEdge } from './components/Edges/SmoothStepEdge'
|
||||||
SmoothStepEdge,
|
export { default as BaseEdge } from './components/Edges/BaseEdge.vue'
|
||||||
BaseEdge,
|
export { default as EdgeText } from './components/Edges/EdgeText.vue'
|
||||||
EdgeText,
|
export { default as EdgeLabelRenderer } from './components/Edges/EdgeLabelRenderer.vue'
|
||||||
EdgeLabelRenderer,
|
|
||||||
} from './components/Edges'
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getBezierPath,
|
getBezierPath,
|
||||||
@@ -43,7 +41,7 @@ export {
|
|||||||
getRectOfNodes,
|
getRectOfNodes,
|
||||||
pointToRendererPoint,
|
pointToRendererPoint,
|
||||||
rendererPointToPoint,
|
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,
|
rendererPointToPoint as graphPosToZoomedPos,
|
||||||
getNodesInside,
|
getNodesInside,
|
||||||
getMarkerId,
|
getMarkerId,
|
||||||
@@ -53,12 +51,13 @@ export {
|
|||||||
} from './utils/graph'
|
} from './utils/graph'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated - Use store instance and call `applyChanges` with template-ref or the one received by `onPaneReady` instead
|
||||||
* Intended for options API
|
* Intended for options API
|
||||||
* In composition API you can access apply utilities from `useVueFlow`
|
* In composition API you can access apply utilities from `useVueFlow`
|
||||||
*/
|
*/
|
||||||
export { applyChanges, applyEdgeChanges, applyNodeChanges } from './utils/changes'
|
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'
|
export { VueFlow as VueFlowInjection, NodeId as NodeIdInjection } from './context'
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { ComputedRef } from 'vue'
|
|||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import type { ComputedGetters, GraphEdge, GraphNode, State } from '../types'
|
import type { ComputedGetters, GraphEdge, GraphNode, State } from '../types'
|
||||||
import { ErrorCode, VueFlowError, getNodesInside, isEdgeVisible } from '../utils'
|
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 {
|
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 { ConnectionLineType, ConnectionMode, PanOnScrollMode, SelectionMode } from '../types'
|
||||||
import {
|
|
||||||
BezierEdge,
|
|
||||||
DefaultNode,
|
|
||||||
InputNode,
|
|
||||||
OutputNode,
|
|
||||||
SimpleBezierEdge,
|
|
||||||
SmoothStepEdge,
|
|
||||||
StepEdge,
|
|
||||||
StraightEdge,
|
|
||||||
} from '../components'
|
|
||||||
import { isMacOs } from '../utils'
|
import { isMacOs } from '../utils'
|
||||||
import { createHooks } from './hooks'
|
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 {
|
export function useState(): State {
|
||||||
return {
|
return {
|
||||||
vueFlowRef: null,
|
vueFlowRef: null,
|
||||||
|
|||||||
@@ -203,9 +203,12 @@ export function applyChanges<
|
|||||||
return elements
|
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[]) {
|
export function applyEdgeChanges(changes: EdgeChange[], edges: GraphEdge[]) {
|
||||||
return applyChanges(changes, edges)
|
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[]) {
|
export function applyNodeChanges(changes: NodeChange[], nodes: GraphNode[]) {
|
||||||
return applyChanges(changes, nodes)
|
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