Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vue-flow/core

Package Overview
Dependencies
Maintainers
0
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue-flow/core - npm Package Compare versions

Comparing version 1.41.6 to 1.41.7

5

dist/composables/useWindow.d.ts

@@ -5,3 +5,8 @@ type UseWindow = Window &

}
/**
* Returns the window object
*
* @internal
*/
export declare function useWindow(): UseWindow
export {}

45

dist/types/handle.d.ts
import type { Dimensions, Position, XYPosition } from './flow'
import type { Connection } from './connection'
import type { Connection, ConnectionMode } from './connection'
import type { GraphEdge } from './edge'
import type { GraphNode } from './node'
import type { NodeLookup } from './store'

@@ -10,2 +11,4 @@ export type HandleType = 'source' | 'target'

position: Position
type: HandleType
nodeId: string
}

@@ -17,13 +20,7 @@ export interface ConnectionHandle extends XYPosition {

}
export interface ValidHandleResult {
endHandle: ConnectingHandle | null
handleDomNode: Element | null
isValid: boolean
connection: Connection
}
export interface ConnectingHandle {
nodeId: string
type: HandleType
handleId?: string | null
position?: Position | null
id?: string | null
position: Position
}

@@ -65,1 +62,31 @@ /** A valid connection function can determine if an attempted connection is valid or not, i.e. abort creating a new edge */

}
export interface IsValidParams {
handle: ConnectingHandle | null
connectionMode: ConnectionMode
fromNodeId: string
fromHandleId: string | null
fromType: HandleType
isValidConnection?: ValidConnectionFunc
doc: Document | ShadowRoot
lib: string
flowId: string | null
nodeLookup: NodeLookup
}
export interface Result {
handleDomNode: Element | null
isValid: boolean
connection: Connection | null
toHandle: ConnectingHandle | null
}
export interface ConnectionInProgress<NodeType extends GraphNode = GraphNode> {
inProgress: true
isValid: boolean | null
from: XYPosition
fromHandle: HandleElement
fromPosition: Position
fromNode: NodeType
to: XYPosition
toHandle: ConnectingHandle | null
toPosition: Position
toNode: NodeType | null
}

9

dist/utils/edge.d.ts
import type { Actions, GraphEdge, GraphNode, HandleElement, ViewportTransform, XYPosition } from '../types'
import type { Position } from '../types'
export declare function getHandlePosition(node: GraphNode, handle: HandleElement | null, fallbackPosition?: Position): XYPosition
export declare function getHandle(bounds?: HandleElement[], handleId?: string | null): HandleElement | null
export declare function getHandlePosition(
node: GraphNode,
handle: HandleElement | null,
fallbackPosition?: Position,
center?: boolean,
): XYPosition
export declare function getEdgeHandle(bounds: HandleElement[] | undefined, handleId?: string | null): HandleElement | null
interface IsEdgeVisibleParams {

@@ -7,0 +12,0 @@ sourcePos: XYPosition

@@ -1,2 +0,2 @@

import type { ConnectionMode } from '../types'
import type { ConnectionMode, Position } from '../types'
import type {

@@ -8,6 +8,8 @@ Actions,

GraphNode,
HandleElement,
HandleType,
IsValidParams,
NodeHandleBounds,
ValidConnectionFunc,
ValidHandleResult,
NodeLookup,
Result,
XYPosition,

@@ -24,45 +26,37 @@ } from '../types'

export declare function getClosestHandle(
event: MouseEvent | TouchEvent,
doc: Document | ShadowRoot,
pos: XYPosition,
position: XYPosition,
connectionRadius: number,
handles: ConnectionHandle[],
validator: (handle: Pick<ConnectionHandle, 'nodeId' | 'id' | 'type'>) => ValidHandleResult,
):
| {
handle: {
id: string | null
type: HandleType | null
nodeId: string
x: number
y: number
}
validHandleResult: ValidHandleResult
}
| {
handle: null
validHandleResult: ValidHandleResult
}
nodeLookup: NodeLookup,
fromHandle: {
nodeId: string
type: HandleType
id?: string | null
},
): HandleElement | null
export declare function isValidHandle(
event: MouseEvent | TouchEvent,
handle: Pick<ConnectionHandle, 'nodeId' | 'id' | 'type'> | null,
connectionMode: ConnectionMode,
fromNodeId: string,
fromHandleId: string | null,
fromType: HandleType,
isValidConnection: ValidConnectionFunc,
doc: Document | ShadowRoot,
{ handle, connectionMode, fromNodeId, fromHandleId, fromType, doc, lib, flowId, isValidConnection }: IsValidParams,
edges: GraphEdge[],
nodes: GraphNode[],
findNode: Actions['findNode'],
): ValidHandleResult
interface GetHandleLookupParams {
nodes: GraphNode[]
nodeId: string
handleId: string | null
handleType: string
): Result
export declare function getHandleType(edgeUpdaterType: HandleType | undefined, handleDomNode: Element | null): HandleType | null
export declare function getConnectionStatus(
isInsideConnectionRadius: boolean,
isHandleValid: boolean | null,
): ConnectionStatus | null
export declare function isConnectionValid(isInsideConnectionRadius: boolean, isHandleValid: boolean): boolean | null
export declare function getHandle(
nodeId: string,
handleType: HandleType,
handleId: string | null,
nodeLookup: NodeLookup,
connectionMode: ConnectionMode,
withAbsolutePosition?: boolean,
): HandleElement | null
export declare const oppositePosition: {
left: Position
right: Position
top: Position
bottom: Position
}
export declare function getHandleLookup({ nodes, nodeId, handleId, handleType }: GetHandleLookupParams): ConnectionHandle[]
export declare function getHandleType(edgeUpdaterType: HandleType | undefined, handleDomNode: Element | null): HandleType | null
export declare function getConnectionStatus(isInsideConnectionRadius: boolean, isHandleValid: boolean): ConnectionStatus | null
export {}
import type { Ref } from 'vue'
import type { Actions, GraphNode, HandleElement } from '../types'
import type { Actions, GraphNode, HandleElement, HandleType } from '../types'
export declare function getHandleBounds(
selector: string,
type: HandleType,
nodeElement: HTMLDivElement,

@@ -7,0 +7,0 @@ nodeBounds: DOMRect,

{
"name": "@vue-flow/core",
"version": "1.41.6",
"version": "1.41.7",
"private": false,

@@ -5,0 +5,0 @@ "license": "MIT",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc