@vue-flow/core
Advanced tools
Comparing version 1.20.0 to 1.20.1
@@ -17,3 +17,3 @@ declare const _default: __VLS_WithTemplateSlots< | ||
{ | ||
default: (_: {}) => any | ||
default?(_: {}): any | ||
} | ||
@@ -20,0 +20,0 @@ > |
@@ -19,3 +19,3 @@ import type { EdgeTextProps } from '../../types/components' | ||
{ | ||
default: (_: {}) => any | ||
default?(_: {}): any | ||
} | ||
@@ -22,0 +22,0 @@ > |
@@ -5,6 +5,6 @@ declare const EdgeWrapper: import('vue').DefineComponent< | ||
type?: any | ||
name?: any | ||
updatable?: any | ||
selectable?: any | ||
focusable?: any | ||
updatable?: any | ||
name?: any | ||
edge?: any | ||
@@ -34,6 +34,6 @@ }>, | ||
type?: any | ||
name?: any | ||
updatable?: any | ||
selectable?: any | ||
focusable?: any | ||
updatable?: any | ||
name?: any | ||
edge?: any | ||
@@ -46,6 +46,6 @@ }> | ||
readonly type?: any | ||
readonly name?: any | ||
readonly updatable?: any | ||
readonly selectable?: any | ||
readonly focusable?: any | ||
readonly updatable?: any | ||
readonly name?: any | ||
readonly edge?: any | ||
@@ -52,0 +52,0 @@ } |
@@ -19,3 +19,3 @@ import type { HandleProps } from '../../types/handle' | ||
{ | ||
default: (_: { id: string | undefined }) => any | ||
default?(_: { id: string | undefined }): any | ||
} | ||
@@ -22,0 +22,0 @@ > |
@@ -6,6 +6,6 @@ declare const NodeWrapper: import('vue').DefineComponent< | ||
type?: any | ||
name?: any | ||
draggable?: any | ||
selectable?: any | ||
focusable?: any | ||
name?: any | ||
node?: any | ||
@@ -35,6 +35,6 @@ resizeObserver?: any | ||
type?: any | ||
name?: any | ||
draggable?: any | ||
selectable?: any | ||
focusable?: any | ||
name?: any | ||
node?: any | ||
@@ -49,6 +49,6 @@ resizeObserver?: any | ||
readonly type?: any | ||
readonly name?: any | ||
readonly draggable?: any | ||
readonly selectable?: any | ||
readonly focusable?: any | ||
readonly name?: any | ||
readonly node?: any | ||
@@ -55,0 +55,0 @@ readonly resizeObserver?: any |
@@ -19,3 +19,3 @@ import type { PanelProps } from '../../types/panel' | ||
{ | ||
default: (_: {}) => any | ||
default?(_: {}): any | ||
} | ||
@@ -22,0 +22,0 @@ > |
import type { D3DragEvent, SubjectPosition } from 'd3-drag' | ||
import type { Ref } from 'vue' | ||
import type { MaybeComputedRef } from '@vueuse/core' | ||
import type { MaybeRefOrGetter } from '@vueuse/core' | ||
import type { NodeDragEvent } from '../types' | ||
@@ -12,7 +12,8 @@ | ||
el: Ref<Element | undefined> | ||
disabled?: MaybeComputedRef<boolean> | ||
selectable?: MaybeComputedRef<boolean> | ||
disabled?: MaybeRefOrGetter<boolean> | ||
selectable?: MaybeRefOrGetter<boolean> | ||
dragHandle?: MaybeRefOrGetter<string | undefined> | ||
id?: string | ||
} | ||
declare function useDrag(params: UseDragParams): Ref<boolean> | ||
export default useDrag | ||
export declare function useDrag(params: UseDragParams): Ref<boolean> | ||
export {} |
@@ -10,3 +10,3 @@ import type { CustomEvent, ElementData } from '../types' | ||
*/ | ||
export default function useEdge<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>( | ||
export declare function useEdge<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>( | ||
id?: string, | ||
@@ -13,0 +13,0 @@ ): { |
import type { EdgeEventsEmit, EdgeEventsOn, GraphEdge, VueFlowStore } from '../types' | ||
export default function useEdgeHooks( | ||
export declare function useEdgeHooks( | ||
edge: GraphEdge, | ||
@@ -5,0 +5,0 @@ emits: VueFlowStore['emits'], |
import type { UseDragEvent } from './useDrag' | ||
/** | ||
* This composable is for *internal* use only. | ||
*/ | ||
export declare function useGetPointerPosition(): ({ sourceEvent }: UseDragEvent) => { | ||
@@ -4,0 +7,0 @@ x: number |
@@ -1,14 +0,14 @@ | ||
import type { MaybeComputedRef } from '@vueuse/core' | ||
import type { MaybeRefOrGetter } from '@vueuse/core' | ||
import type { Connection, HandleType, MouseTouchEvent, ValidConnectionFunc } from '../types' | ||
interface UseHandleProps { | ||
handleId: MaybeComputedRef<string | null> | ||
nodeId: MaybeComputedRef<string> | ||
type: MaybeComputedRef<HandleType> | ||
isValidConnection?: ValidConnectionFunc | null | ||
edgeUpdaterType?: MaybeComputedRef<HandleType> | ||
handleId: MaybeRefOrGetter<string | null> | ||
nodeId: MaybeRefOrGetter<string> | ||
type: MaybeRefOrGetter<HandleType> | ||
isValidConnection?: MaybeRefOrGetter<ValidConnectionFunc | null> | ||
edgeUpdaterType?: MaybeRefOrGetter<HandleType> | ||
onEdgeUpdate?: (event: MouseTouchEvent, connection: Connection) => void | ||
onEdgeUpdateEnd?: (event: MouseTouchEvent) => void | ||
} | ||
export default function useHandle({ | ||
export declare function useHandle({ | ||
handleId, | ||
@@ -15,0 +15,0 @@ nodeId, |
@@ -1,3 +0,2 @@ | ||
import type { Ref } from 'vue' | ||
import type { KeyFilter, MaybeComputedRef } from '@vueuse/core' | ||
import type { KeyFilter, MaybeRefOrGetter } from '@vueuse/core' | ||
@@ -11,6 +10,5 @@ export declare function isInputDOMNode(event: KeyboardEvent): boolean | ||
*/ | ||
declare const _default: ( | ||
keyFilter: MaybeComputedRef<KeyFilter | null>, | ||
onChange?: ((keyPressed: boolean) => void) | undefined, | ||
) => Ref<boolean> | ||
export default _default | ||
export declare function useKeyPress( | ||
keyFilter: MaybeRefOrGetter<KeyFilter | null>, | ||
onChange?: (keyPressed: boolean) => void, | ||
): import('vue').Ref<boolean> |
@@ -10,3 +10,3 @@ import type { CustomEvent, ElementData } from '../types' | ||
*/ | ||
export default function useNode<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>( | ||
export declare function useNode<Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>( | ||
id?: string, | ||
@@ -13,0 +13,0 @@ ): { |
import type { GraphNode, NodeEventsEmit, NodeEventsOn, VueFlowStore } from '../types' | ||
export default function useNodeHooks( | ||
export declare function useNodeHooks( | ||
node: GraphNode, | ||
@@ -5,0 +5,0 @@ emits: VueFlowStore['emits'], |
import type { XYPosition } from '../types' | ||
declare function useUpdateNodePositions(): (positionDiff: XYPosition, isShiftPressed?: boolean) => void | ||
export default useUpdateNodePositions | ||
export declare function useUpdateNodePositions(): (positionDiff: XYPosition, isShiftPressed?: boolean) => void |
@@ -6,3 +6,3 @@ import type { ComputedGetters, State, ViewportFunctions } from '../types' | ||
} | ||
declare const _default: (state: State, getters: ComputedGetters) => import('vue').ComputedRef<ExtendedViewport> | ||
export default _default | ||
export declare function useViewport(state: State, getters: ComputedGetters): import('vue').ComputedRef<ExtendedViewport> | ||
export {} |
@@ -17,3 +17,2 @@ import type { FlowOptions, FlowProps, VueFlowStore } from '../types' | ||
} | ||
declare const _default: (options?: FlowProps) => VueFlowStore | ||
export default _default | ||
export declare function useVueFlow(options?: FlowProps): VueFlowStore |
@@ -5,3 +5,3 @@ type UseWindow = Window & | ||
} | ||
declare const _default: () => UseWindow | ||
export default _default | ||
export declare function useWindow(): UseWindow | ||
export {} |
@@ -6,3 +6,2 @@ import type { ViewportFunctions } from '../types' | ||
*/ | ||
declare const _default: (vueFlowId?: string) => ViewportFunctions | ||
export default _default | ||
export declare function useZoomPanHelper(vueFlowId?: string): ViewportFunctions |
@@ -25,3 +25,3 @@ declare const _default: __VLS_WithTemplateSlots< | ||
{ | ||
default: (_: {}) => any | ||
default?(_: {}): any | ||
} | ||
@@ -28,0 +28,0 @@ > |
@@ -17,3 +17,3 @@ declare const _default: __VLS_WithTemplateSlots< | ||
{ | ||
default: (_: {}) => any | ||
default?(_: {}): any | ||
} | ||
@@ -20,0 +20,0 @@ > |
@@ -17,4 +17,4 @@ declare const _default: __VLS_WithTemplateSlots< | ||
{ | ||
'zoom-pane': (_: {}) => any | ||
'default': (_: {}) => any | ||
'zoom-pane'?(_: {}): any | ||
default?(_: {}): any | ||
} | ||
@@ -21,0 +21,0 @@ > |
@@ -54,2 +54,7 @@ import type { D3ZoomEvent } from 'd3-zoom' | ||
isValidConnection: undefined | ||
deleteKeyCode: undefined | ||
selectionKeyCode: undefined | ||
multiSelectionKeyCode: undefined | ||
panActivationKeyCode: undefined | ||
zoomActivationKeyCode: undefined | ||
} | ||
@@ -206,80 +211,3 @@ >, | ||
onError: import('@vueuse/shared').EventHookOn<VueFlowError<import('../../utils/errors').ErrorCode>> | ||
vueFlowRef: import('vue').Ref<HTMLDivElement | null> | ||
viewportRef: import('vue').Ref<HTMLDivElement | null> | ||
hooks: import('vue').Ref< | ||
Readonly<{ | ||
nodesChange: import('@vueuse/shared').EventHook<NodeChange[]> | ||
edgesChange: import('@vueuse/shared').EventHook<EdgeChange[]> | ||
nodeDoubleClick: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeClick: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeMouseEnter: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeMouseMove: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeMouseLeave: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeContextMenu: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeDragStart: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
nodeDrag: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
nodeDragStop: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
nodesInitialized: import('@vueuse/shared').EventHook<GraphNode<any, any, string>[]> | ||
updateNodeInternals: import('@vueuse/shared').EventHook<string[]> | ||
miniMapNodeClick: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
miniMapNodeDoubleClick: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
miniMapNodeMouseEnter: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
miniMapNodeMouseMove: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
miniMapNodeMouseLeave: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
connect: import('@vueuse/shared').EventHook<Connection> | ||
connectStart: import('@vueuse/shared').EventHook< | ||
{ | ||
event?: MouseEvent | TouchEvent | undefined | ||
} & OnConnectStartParams | ||
> | ||
connectEnd: import('@vueuse/shared').EventHook<MouseEvent | TouchEvent | undefined> | ||
clickConnectStart: import('@vueuse/shared').EventHook< | ||
{ | ||
event?: MouseEvent | TouchEvent | undefined | ||
} & OnConnectStartParams | ||
> | ||
clickConnectEnd: import('@vueuse/shared').EventHook<MouseEvent | TouchEvent | undefined> | ||
paneReady: import('@vueuse/shared').EventHook<VueFlowStore> | ||
move: import('@vueuse/shared').EventHook<{ | ||
event: D3ZoomEvent<HTMLDivElement, any> | ||
flowTransform: ViewportTransform | ||
}> | ||
moveStart: import('@vueuse/shared').EventHook<{ | ||
event: D3ZoomEvent<HTMLDivElement, any> | ||
flowTransform: ViewportTransform | ||
}> | ||
moveEnd: import('@vueuse/shared').EventHook<{ | ||
event: D3ZoomEvent<HTMLDivElement, any> | ||
flowTransform: ViewportTransform | ||
}> | ||
selectionDragStart: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
selectionDrag: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
selectionDragStop: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
selectionContextMenu: import('@vueuse/shared').EventHook<{ | ||
event: MouseEvent | ||
nodes: GraphNode<any, any, string>[] | ||
}> | ||
selectionStart: import('@vueuse/shared').EventHook<MouseEvent> | ||
selectionEnd: import('@vueuse/shared').EventHook<MouseEvent> | ||
viewportChangeStart: import('@vueuse/shared').EventHook<ViewportTransform> | ||
viewportChange: import('@vueuse/shared').EventHook<ViewportTransform> | ||
viewportChangeEnd: import('@vueuse/shared').EventHook<ViewportTransform> | ||
paneScroll: import('@vueuse/shared').EventHook<WheelEvent | undefined> | ||
paneClick: import('@vueuse/shared').EventHook<MouseEvent> | ||
paneContextMenu: import('@vueuse/shared').EventHook<MouseEvent> | ||
paneMouseEnter: import('@vueuse/shared').EventHook<MouseEvent> | ||
paneMouseMove: import('@vueuse/shared').EventHook<MouseEvent> | ||
paneMouseLeave: import('@vueuse/shared').EventHook<MouseEvent> | ||
edgeContextMenu: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeMouseEnter: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeMouseMove: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeMouseLeave: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeDoubleClick: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeClick: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeUpdateStart: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeUpdate: import('@vueuse/shared').EventHook<EdgeUpdateEvent> | ||
edgeUpdateEnd: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
error: import('@vueuse/shared').EventHook<VueFlowError<import('../../utils/errors').ErrorCode>> | ||
}> | ||
> | ||
nodes: import('vue').Ref<GraphNode<any, any, string>[]> | ||
@@ -292,3 +220,3 @@ edges: import('vue').Ref<GraphEdge<any, any, string>[]> | ||
maxZoom: import('vue').Ref<number> | ||
defaultViewport: import('vue').Ref<ViewportTransform> | ||
defaultViewport: import('vue').Ref<Partial<ViewportTransform>> | ||
translateExtent: import('vue').Ref<import('../../types').CoordinateExtent> | ||
@@ -365,4 +293,2 @@ nodeExtent: import('vue').Ref<import('../../types').CoordinateExtent | import('../../types').CoordinateExtentRange> | ||
| undefined | ||
getEdgeTypes: import('vue').ComputedRef<Record<string, import('../../types').EdgeComponent>> | ||
getNodeTypes: import('vue').ComputedRef<Record<string, import('../../types').NodeComponent>> | ||
getElements: import('vue').ComputedRef<FlowElements<any, any, any, any>> | ||
@@ -432,2 +358,81 @@ getNodes: import('vue').ComputedRef<GraphNode<any, any, string>[]> | ||
project: import('../../types').Project | ||
vueFlowRef: import('vue').Ref<HTMLDivElement | null> | ||
hooks: import('vue').Ref< | ||
Readonly<{ | ||
nodesChange: import('@vueuse/shared').EventHook<NodeChange[]> | ||
edgesChange: import('@vueuse/shared').EventHook<EdgeChange[]> | ||
nodeDoubleClick: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeClick: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeMouseEnter: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeMouseMove: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeMouseLeave: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeContextMenu: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
nodeDragStart: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
nodeDrag: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
nodeDragStop: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
nodesInitialized: import('@vueuse/shared').EventHook<GraphNode<any, any, string>[]> | ||
updateNodeInternals: import('@vueuse/shared').EventHook<string[]> | ||
miniMapNodeClick: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
miniMapNodeDoubleClick: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
miniMapNodeMouseEnter: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
miniMapNodeMouseMove: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
miniMapNodeMouseLeave: import('@vueuse/shared').EventHook<NodeMouseEvent> | ||
connect: import('@vueuse/shared').EventHook<Connection> | ||
connectStart: import('@vueuse/shared').EventHook< | ||
{ | ||
event?: MouseEvent | TouchEvent | undefined | ||
} & OnConnectStartParams | ||
> | ||
connectEnd: import('@vueuse/shared').EventHook<MouseEvent | TouchEvent | undefined> | ||
clickConnectStart: import('@vueuse/shared').EventHook< | ||
{ | ||
event?: MouseEvent | TouchEvent | undefined | ||
} & OnConnectStartParams | ||
> | ||
clickConnectEnd: import('@vueuse/shared').EventHook<MouseEvent | TouchEvent | undefined> | ||
paneReady: import('@vueuse/shared').EventHook<VueFlowStore> | ||
move: import('@vueuse/shared').EventHook<{ | ||
event: D3ZoomEvent<HTMLDivElement, any> | ||
flowTransform: ViewportTransform | ||
}> | ||
moveStart: import('@vueuse/shared').EventHook<{ | ||
event: D3ZoomEvent<HTMLDivElement, any> | ||
flowTransform: ViewportTransform | ||
}> | ||
moveEnd: import('@vueuse/shared').EventHook<{ | ||
event: D3ZoomEvent<HTMLDivElement, any> | ||
flowTransform: ViewportTransform | ||
}> | ||
selectionDragStart: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
selectionDrag: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
selectionDragStop: import('@vueuse/shared').EventHook<NodeDragEvent> | ||
selectionContextMenu: import('@vueuse/shared').EventHook<{ | ||
event: MouseEvent | ||
nodes: GraphNode<any, any, string>[] | ||
}> | ||
selectionStart: import('@vueuse/shared').EventHook<MouseEvent> | ||
selectionEnd: import('@vueuse/shared').EventHook<MouseEvent> | ||
viewportChangeStart: import('@vueuse/shared').EventHook<ViewportTransform> | ||
viewportChange: import('@vueuse/shared').EventHook<ViewportTransform> | ||
viewportChangeEnd: import('@vueuse/shared').EventHook<ViewportTransform> | ||
paneScroll: import('@vueuse/shared').EventHook<WheelEvent | undefined> | ||
paneClick: import('@vueuse/shared').EventHook<MouseEvent> | ||
paneContextMenu: import('@vueuse/shared').EventHook<MouseEvent> | ||
paneMouseEnter: import('@vueuse/shared').EventHook<MouseEvent> | ||
paneMouseMove: import('@vueuse/shared').EventHook<MouseEvent> | ||
paneMouseLeave: import('@vueuse/shared').EventHook<MouseEvent> | ||
edgeContextMenu: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeMouseEnter: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeMouseMove: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeMouseLeave: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeDoubleClick: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeClick: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeUpdateStart: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
edgeUpdate: import('@vueuse/shared').EventHook<EdgeUpdateEvent> | ||
edgeUpdateEnd: import('@vueuse/shared').EventHook<EdgeMouseEvent> | ||
error: import('@vueuse/shared').EventHook<VueFlowError<import('../../utils/errors').ErrorCode>> | ||
}> | ||
> | ||
getNodeTypes: import('vue').ComputedRef<Record<string, import('../../types').NodeComponent>> | ||
getEdgeTypes: import('vue').ComputedRef<Record<string, import('../../types').EdgeComponent>> | ||
}, | ||
@@ -440,39 +445,21 @@ unknown, | ||
{ | ||
nodesChange: (changes: NodeChange[]) => void | ||
} & { | ||
edgesChange: (changes: EdgeChange[]) => void | ||
} & { | ||
nodeDoubleClick: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
nodeClick: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
nodeMouseEnter: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
nodeMouseMove: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
nodeMouseLeave: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
nodeContextMenu: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
nodeDragStart: (nodeDragEvent: NodeDragEvent) => void | ||
} & { | ||
nodeDrag: (nodeDragEvent: NodeDragEvent) => void | ||
} & { | ||
nodeDragStop: (nodeDragEvent: NodeDragEvent) => void | ||
} & { | ||
nodesInitialized: () => void | ||
} & { | ||
miniMapNodeClick: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
miniMapNodeDoubleClick: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
miniMapNodeMouseEnter: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
miniMapNodeMouseMove: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
miniMapNodeMouseLeave: (nodeMouseEvent: NodeMouseEvent) => void | ||
} & { | ||
connect: (connectionEvent: Connection) => void | ||
} & { | ||
connectStart: ( | ||
'nodesChange': (changes: NodeChange[]) => void | ||
'edgesChange': (changes: EdgeChange[]) => void | ||
'nodeDoubleClick': (nodeMouseEvent: NodeMouseEvent) => void | ||
'nodeClick': (nodeMouseEvent: NodeMouseEvent) => void | ||
'nodeMouseEnter': (nodeMouseEvent: NodeMouseEvent) => void | ||
'nodeMouseMove': (nodeMouseEvent: NodeMouseEvent) => void | ||
'nodeMouseLeave': (nodeMouseEvent: NodeMouseEvent) => void | ||
'nodeContextMenu': (nodeMouseEvent: NodeMouseEvent) => void | ||
'nodeDragStart': (nodeDragEvent: NodeDragEvent) => void | ||
'nodeDrag': (nodeDragEvent: NodeDragEvent) => void | ||
'nodeDragStop': (nodeDragEvent: NodeDragEvent) => void | ||
'nodesInitialized': () => void | ||
'miniMapNodeClick': (nodeMouseEvent: NodeMouseEvent) => void | ||
'miniMapNodeDoubleClick': (nodeMouseEvent: NodeMouseEvent) => void | ||
'miniMapNodeMouseEnter': (nodeMouseEvent: NodeMouseEvent) => void | ||
'miniMapNodeMouseMove': (nodeMouseEvent: NodeMouseEvent) => void | ||
'miniMapNodeMouseLeave': (nodeMouseEvent: NodeMouseEvent) => void | ||
'connect': (connectionEvent: Connection) => void | ||
'connectStart': ( | ||
connectionEvent: { | ||
@@ -482,6 +469,4 @@ event?: MouseEvent | undefined | ||
) => void | ||
} & { | ||
connectEnd: (connectionEvent?: MouseEvent | undefined) => void | ||
} & { | ||
clickConnectStart: ( | ||
'connectEnd': (connectionEvent?: MouseEvent | undefined) => void | ||
'clickConnectStart': ( | ||
connectionEvent: { | ||
@@ -491,69 +476,35 @@ event?: MouseEvent | undefined | ||
) => void | ||
} & { | ||
clickConnectEnd: (connectionEvent?: MouseEvent | undefined) => void | ||
} & { | ||
moveStart: (moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => void | ||
} & { | ||
move: (moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => void | ||
} & { | ||
moveEnd: (moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => void | ||
} & { | ||
selectionDragStart: (selectionEvent: NodeDragEvent) => void | ||
} & { | ||
selectionDrag: (selectionEvent: NodeDragEvent) => void | ||
} & { | ||
selectionDragStop: (selectionEvent: NodeDragEvent) => void | ||
} & { | ||
selectionContextMenu: (selectionEvent: { event: MouseEvent; nodes: GraphNode[] }) => void | ||
} & { | ||
selectionStart: (selectionEvent: MouseEvent) => void | ||
} & { | ||
selectionEnd: (selectionEvent: MouseEvent) => void | ||
} & { | ||
viewportChangeStart: (viewport: ViewportTransform) => void | ||
} & { | ||
viewportChange: (viewport: ViewportTransform) => void | ||
} & { | ||
viewportChangeEnd: (viewport: ViewportTransform) => void | ||
} & { | ||
paneReady: (paneEvent: VueFlowStore) => void | ||
} & { | ||
paneScroll: (paneEvent: WheelEvent | undefined) => void | ||
} & { | ||
paneClick: (paneEvent: MouseEvent) => void | ||
} & { | ||
paneContextMenu: (paneEvent: MouseEvent) => void | ||
} & { | ||
paneMouseEnter: (paneEvent: MouseEvent) => void | ||
} & { | ||
paneMouseMove: (paneEvent: MouseEvent) => void | ||
} & { | ||
paneMouseLeave: (paneEvent: MouseEvent) => void | ||
} & { | ||
edgeContextMenu: (edgeMouseEvent: EdgeMouseEvent) => void | ||
} & { | ||
edgeMouseEnter: (edgeMouseEvent: EdgeMouseEvent) => void | ||
} & { | ||
edgeMouseMove: (edgeMouseEvent: EdgeMouseEvent) => void | ||
} & { | ||
edgeMouseLeave: (edgeMouseEvent: EdgeMouseEvent) => void | ||
} & { | ||
edgeDoubleClick: (edgeMouseEvent: EdgeMouseEvent) => void | ||
} & { | ||
edgeClick: (edgeMouseEvent: EdgeMouseEvent) => void | ||
} & { | ||
edgeUpdateStart: (edgeMouseEvent: EdgeMouseEvent) => void | ||
} & { | ||
edgeUpdate: (edgeUpdateEvent: EdgeUpdateEvent) => void | ||
} & { | ||
edgeUpdateEnd: (edgeMouseEvent: EdgeMouseEvent) => void | ||
} & { | ||
updateNodeInternals: () => void | ||
} & { | ||
error: (error: VueFlowError<import('../../utils/errors').ErrorCode>) => void | ||
} & { | ||
'clickConnectEnd': (connectionEvent?: MouseEvent | undefined) => void | ||
'moveStart': (moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => void | ||
'move': (moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => void | ||
'moveEnd': (moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => void | ||
'selectionDragStart': (selectionEvent: NodeDragEvent) => void | ||
'selectionDrag': (selectionEvent: NodeDragEvent) => void | ||
'selectionDragStop': (selectionEvent: NodeDragEvent) => void | ||
'selectionContextMenu': (selectionEvent: { event: MouseEvent; nodes: GraphNode[] }) => void | ||
'selectionStart': (selectionEvent: MouseEvent) => void | ||
'selectionEnd': (selectionEvent: MouseEvent) => void | ||
'viewportChangeStart': (viewport: ViewportTransform) => void | ||
'viewportChange': (viewport: ViewportTransform) => void | ||
'viewportChangeEnd': (viewport: ViewportTransform) => void | ||
'paneReady': (paneEvent: VueFlowStore) => void | ||
'paneScroll': (paneEvent: WheelEvent | undefined) => void | ||
'paneClick': (paneEvent: MouseEvent) => void | ||
'paneContextMenu': (paneEvent: MouseEvent) => void | ||
'paneMouseEnter': (paneEvent: MouseEvent) => void | ||
'paneMouseMove': (paneEvent: MouseEvent) => void | ||
'paneMouseLeave': (paneEvent: MouseEvent) => void | ||
'edgeContextMenu': (edgeMouseEvent: EdgeMouseEvent) => void | ||
'edgeMouseEnter': (edgeMouseEvent: EdgeMouseEvent) => void | ||
'edgeMouseMove': (edgeMouseEvent: EdgeMouseEvent) => void | ||
'edgeMouseLeave': (edgeMouseEvent: EdgeMouseEvent) => void | ||
'edgeDoubleClick': (edgeMouseEvent: EdgeMouseEvent) => void | ||
'edgeClick': (edgeMouseEvent: EdgeMouseEvent) => void | ||
'edgeUpdateStart': (edgeMouseEvent: EdgeMouseEvent) => void | ||
'edgeUpdate': (edgeUpdateEvent: EdgeUpdateEvent) => void | ||
'edgeUpdateEnd': (edgeMouseEvent: EdgeMouseEvent) => void | ||
'updateNodeInternals': () => void | ||
'error': (error: VueFlowError<import('../../utils/errors').ErrorCode>) => void | ||
'update:modelValue': (value: FlowElements<any, any, any, any>) => void | ||
} & { | ||
'update:nodes': (value: GraphNode<any, any, string>[]) => void | ||
} & { | ||
'update:edges': (value: GraphEdge<any, any, string>[]) => void | ||
@@ -595,2 +546,7 @@ }, | ||
isValidConnection: undefined | ||
deleteKeyCode: undefined | ||
selectionKeyCode: undefined | ||
multiSelectionKeyCode: undefined | ||
panActivationKeyCode: undefined | ||
zoomActivationKeyCode: undefined | ||
} | ||
@@ -600,4 +556,2 @@ > | ||
> & { | ||
'onError'?: ((error: VueFlowError<import('../../utils/errors').ErrorCode>) => any) | undefined | ||
'onMove'?: ((moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => any) | undefined | ||
'onNodesChange'?: ((changes: NodeChange[]) => any) | undefined | ||
@@ -639,2 +593,3 @@ 'onEdgesChange'?: ((changes: EdgeChange[]) => any) | undefined | ||
'onPaneReady'?: ((paneEvent: VueFlowStore) => any) | undefined | ||
'onMove'?: ((moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => any) | undefined | ||
'onMoveStart'?: | ||
@@ -670,2 +625,3 @@ | ((moveEvent: { event: D3ZoomEvent<HTMLDivElement, any>; flowTransform: ViewportTransform }) => any) | ||
'onEdgeUpdateEnd'?: ((edgeMouseEvent: EdgeMouseEvent) => any) | undefined | ||
'onError'?: ((error: VueFlowError<import('../../utils/errors').ErrorCode>) => any) | undefined | ||
'onUpdate:modelValue'?: ((value: FlowElements<any, any, any, any>) => any) | undefined | ||
@@ -676,5 +632,10 @@ 'onUpdate:nodes'?: ((value: GraphNode<any, any, string>[]) => any) | undefined | ||
{ | ||
isValidConnection: import('../../types').ValidConnectionFunc | null | ||
connectionLineStyle: import('vue').CSSProperties | null | ||
connectionLineOptions: import('../../types').ConnectionLineOptions | ||
isValidConnection: import('../../types').ValidConnectionFunc | null | ||
deleteKeyCode: import('@vueuse/core').KeyFilter | null | ||
selectionKeyCode: import('@vueuse/core').KeyFilter | null | ||
multiSelectionKeyCode: import('@vueuse/core').KeyFilter | null | ||
zoomActivationKeyCode: import('@vueuse/core').KeyFilter | null | ||
panActivationKeyCode: import('@vueuse/core').KeyFilter | null | ||
snapToGrid: boolean | ||
@@ -706,3 +667,3 @@ onlyRenderVisibleElements: boolean | ||
>, | ||
Record<string, (_: any) => any> & { | ||
Partial<Record<string, (_: any) => any>> & { | ||
'connection-line': (connectionLineProps: ConnectionLineProps) => any | ||
@@ -731,5 +692,7 @@ 'zoom-pane': () => any | ||
[K in keyof Pick<P, keyof P>]: K extends keyof D | ||
? P[K] & { | ||
default: D[K] | ||
} | ||
? __VLS_Prettify< | ||
P[K] & { | ||
default: D[K] | ||
} | ||
> | ||
: P[K] | ||
@@ -742,1 +705,4 @@ } | ||
} | ||
type __VLS_Prettify<T> = { | ||
[K in keyof T]: T[K] | ||
} & {} |
@@ -55,9 +55,12 @@ /** | ||
export { VueFlow as VueFlowInjection, NodeId as NodeIdInjection } from './context' | ||
export { default as useZoomPanHelper } from './composables/useZoomPanHelper' | ||
export { default as useVueFlow, Storage as GlobalVueFlowStorage } from './composables/useVueFlow' | ||
export { default as useHandle } from './composables/useHandle' | ||
export { default as useNode } from './composables/useNode' | ||
export { default as useEdge } from './composables/useEdge' | ||
export { useGetPointerPosition } from './composables/useGetPointerPosition' | ||
export { | ||
useZoomPanHelper, | ||
useVueFlow, | ||
Storage as GlobalVueFlowStorage, | ||
useHandle, | ||
useNode, | ||
useEdge, | ||
useGetPointerPosition, | ||
} from './composables' | ||
export { VueFlowError, ErrorCode } from './utils/errors' | ||
export * from './types' |
@@ -129,3 +129,3 @@ import type { CSSProperties } from 'vue' | ||
maxZoom?: number | ||
defaultViewport?: ViewportTransform | ||
defaultViewport?: Partial<ViewportTransform> | ||
translateExtent?: CoordinateExtent | ||
@@ -132,0 +132,0 @@ nodeExtent?: CoordinateExtent | CoordinateExtentRange |
@@ -0,1 +1,4 @@ | ||
/** | ||
* @deprecated; todo: remove this and use `PanelPositionType` instead | ||
*/ | ||
export declare enum PanelPosition { | ||
@@ -9,4 +12,6 @@ TopLeft = 'top-left', | ||
} | ||
type PanelPositionType = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | ||
export interface PanelProps { | ||
position: PanelPosition | ||
position: PanelPosition | PanelPositionType | ||
} | ||
export {} |
@@ -55,3 +55,3 @@ import type { CSSProperties, ComputedRef, ToRefs } from 'vue' | ||
maxZoom: number | ||
defaultViewport: ViewportTransform | ||
defaultViewport: Partial<ViewportTransform> | ||
/** use setTranslateExtent action to change translateExtent */ | ||
@@ -152,6 +152,6 @@ translateExtent: CoordinateExtent | ||
export type FindNode = <Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>( | ||
id: string | undefined, | ||
id: string | undefined | null, | ||
) => GraphNode<Data, CustomEvents> | undefined | ||
export type FindEdge = <Data = ElementData, CustomEvents extends Record<string, CustomEvent> = any>( | ||
id: string | undefined, | ||
id: string | undefined | null, | ||
) => GraphEdge<Data, CustomEvents> | undefined | ||
@@ -158,0 +158,0 @@ export type GetIntersectingNodes = ( |
export declare enum ErrorCode { | ||
MISSING_VIEWPORT_DIMENSIONS = 'MISSING_VIEWPORT_DIMENSIONS', | ||
NODE_INVALID = 'NODE_INVALID', | ||
NODE_NOT_FOUND = 'NODE_NOT_FOUND', | ||
@@ -18,2 +19,3 @@ NODE_MISSING_PARENT = 'NODE_MISSING_PARENT', | ||
readonly MISSING_VIEWPORT_DIMENSIONS: () => string | ||
readonly NODE_INVALID: (id?: string) => string | ||
readonly NODE_NOT_FOUND: (id: string) => string | ||
@@ -20,0 +22,0 @@ readonly NODE_MISSING_PARENT: (id: string, parentId: string) => string |
@@ -9,1 +9,5 @@ export declare function isMouseEvent(event: MouseEvent | TouchEvent): event is MouseEvent | ||
} | ||
export declare function isString(val: any): val is string | ||
export declare function isFunction(val: any): val is Function | ||
export declare function isBoolean(val: any): val is boolean | ||
export declare function isNumber(val: any): val is number |
import type { ConnectionMode } from '../types' | ||
import type { | ||
Actions, | ||
Connection, | ||
ConnectionStatus, | ||
@@ -32,3 +33,12 @@ GraphEdge, | ||
handles: ConnectionHandle[], | ||
): ConnectionHandle | null | ||
validator: (handle: ConnectionHandle) => ValidHandleResult, | ||
): | ||
| { | ||
handle: ConnectionHandle | ||
validHandleResult: ValidHandleResult | ||
} | ||
| { | ||
handle: null | ||
validHandleResult: ValidHandleResult | ||
} | ||
export declare function isValidHandle( | ||
@@ -45,3 +55,8 @@ event: MouseEvent | TouchEvent, | ||
findNode: Actions['findNode'], | ||
): ValidHandleResult | ||
): { | ||
handleDomNode: Element | null | ||
endHandle: import('../types').ConnectingHandle | null | ||
isValid: boolean | ||
connection: Connection | ||
} | ||
interface GetHandleLookupParams { | ||
@@ -48,0 +63,0 @@ nodes: GraphNode[] |
{ | ||
"name": "@vue-flow/core", | ||
"version": "1.20.0", | ||
"version": "1.20.1", | ||
"private": false, | ||
@@ -56,3 +56,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@vueuse/core": "^9.13.0", | ||
"@vueuse/core": "^10.1.2", | ||
"d3-drag": "^3.0.0", | ||
@@ -65,5 +65,5 @@ "d3-selection": "^3.0.0", | ||
"@types/d3": "^7.4.0", | ||
"@vitejs/plugin-vue": "^4.0.0", | ||
"autoprefixer": "^10.4.13", | ||
"postcss": "^8.4.21", | ||
"@vitejs/plugin-vue": "^4.2.3", | ||
"autoprefixer": "^10.4.14", | ||
"postcss": "^8.4.23", | ||
"postcss-cli": "^10.1.0", | ||
@@ -73,7 +73,6 @@ "postcss-nested": "^6.0.1", | ||
"typescript-transform-paths": "^3.4.6", | ||
"unplugin-auto-import": "^0.12.2", | ||
"unplugin-vue-macros": "1.8.2", | ||
"vite": "^4.1.4", | ||
"unplugin-vue-macros": "^2.1.7", | ||
"vite": "^4.3.7", | ||
"vue": "^3.2.25", | ||
"vue-tsc": "^1.2.0", | ||
"vue-tsc": "^1.6.5", | ||
"@tooling/eslint-config": "0.0.0", | ||
@@ -80,0 +79,0 @@ "@tooling/tsconfig": "0.0.0" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
857027
15
96
12939
+ Added@types/web-bluetooth@0.0.20(transitive)
+ Added@vueuse/core@10.11.1(transitive)
+ Added@vueuse/metadata@10.11.1(transitive)
+ Added@vueuse/shared@10.11.1(transitive)
- Removed@types/web-bluetooth@0.0.16(transitive)
- Removed@vueuse/core@9.13.0(transitive)
- Removed@vueuse/metadata@9.13.0(transitive)
- Removed@vueuse/shared@9.13.0(transitive)
Updated@vueuse/core@^10.1.2