feat(ui): add type filter toggles
This commit is contained in:
77
node_modules/@xyflow/system/dist/esm/utils/edges/bezier-edge.d.ts
generated
vendored
Normal file
77
node_modules/@xyflow/system/dist/esm/utils/edges/bezier-edge.d.ts
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
import { Position } from '../../types';
|
||||
export type GetBezierPathParams = {
|
||||
/** The `x` position of the source handle. */
|
||||
sourceX: number;
|
||||
/** The `y` position of the source handle. */
|
||||
sourceY: number;
|
||||
/**
|
||||
* The position of the source handle.
|
||||
* @default Position.Bottom
|
||||
*/
|
||||
sourcePosition?: Position;
|
||||
/** The `x` position of the target handle. */
|
||||
targetX: number;
|
||||
/** The `y` position of the target handle. */
|
||||
targetY: number;
|
||||
/**
|
||||
* The position of the target handle.
|
||||
* @default Position.Top
|
||||
*/
|
||||
targetPosition?: Position;
|
||||
/**
|
||||
* The curvature of the bezier edge.
|
||||
* @default 0.25
|
||||
*/
|
||||
curvature?: number;
|
||||
};
|
||||
export type GetControlWithCurvatureParams = {
|
||||
pos: Position;
|
||||
x1: number;
|
||||
y1: number;
|
||||
x2: number;
|
||||
y2: number;
|
||||
c: number;
|
||||
};
|
||||
export declare function getBezierEdgeCenter({ sourceX, sourceY, targetX, targetY, sourceControlX, sourceControlY, targetControlX, targetControlY, }: {
|
||||
sourceX: number;
|
||||
sourceY: number;
|
||||
targetX: number;
|
||||
targetY: number;
|
||||
sourceControlX: number;
|
||||
sourceControlY: number;
|
||||
targetControlX: number;
|
||||
targetControlY: number;
|
||||
}): [number, number, number, number];
|
||||
/**
|
||||
* The `getBezierPath` util returns everything you need to render a bezier edge
|
||||
*between two nodes.
|
||||
* @public
|
||||
* @returns A path string you can use in an SVG, the `labelX` and `labelY` position (center of path)
|
||||
* and `offsetX`, `offsetY` between source handle and label.
|
||||
* - `path`: the path to use in an SVG `<path>` element.
|
||||
* - `labelX`: the `x` position you can use to render a label for this edge.
|
||||
* - `labelY`: the `y` position you can use to render a label for this edge.
|
||||
* - `offsetX`: the absolute difference between the source `x` position and the `x` position of the
|
||||
* middle of this path.
|
||||
* - `offsetY`: the absolute difference between the source `y` position and the `y` position of the
|
||||
* middle of this path.
|
||||
* @example
|
||||
* ```js
|
||||
* const source = { x: 0, y: 20 };
|
||||
* const target = { x: 150, y: 100 };
|
||||
*
|
||||
* const [path, labelX, labelY, offsetX, offsetY] = getBezierPath({
|
||||
* sourceX: source.x,
|
||||
* sourceY: source.y,
|
||||
* sourcePosition: Position.Right,
|
||||
* targetX: target.x,
|
||||
* targetY: target.y,
|
||||
* targetPosition: Position.Left,
|
||||
*});
|
||||
*```
|
||||
*
|
||||
* @remarks This function returns a tuple (aka a fixed-size array) to make it easier to
|
||||
*work with multiple edge paths at once.
|
||||
*/
|
||||
export declare function getBezierPath({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, curvature, }: GetBezierPathParams): [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number];
|
||||
//# sourceMappingURL=bezier-edge.d.ts.map
|
||||
1
node_modules/@xyflow/system/dist/esm/utils/edges/bezier-edge.d.ts.map
generated
vendored
Normal file
1
node_modules/@xyflow/system/dist/esm/utils/edges/bezier-edge.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bezier-edge.d.ts","sourceRoot":"","sources":["../../../src/utils/edges/bezier-edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,MAAM,mBAAmB,GAAG;IAChC,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,GAAG,EAAE,QAAQ,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,GACf,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAWnC;AAuBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,OAAO,EACP,cAAgC,EAChC,OAAO,EACP,OAAO,EACP,cAA6B,EAC7B,SAAgB,GACjB,EAAE,mBAAmB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAmCxG"}
|
||||
91
node_modules/@xyflow/system/dist/esm/utils/edges/general.d.ts
generated
vendored
Normal file
91
node_modules/@xyflow/system/dist/esm/utils/edges/general.d.ts
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
import { Connection, InternalNodeBase, Transform, EdgeBase, ZIndexMode } from '../..';
|
||||
export declare function getEdgeCenter({ sourceX, sourceY, targetX, targetY, }: {
|
||||
sourceX: number;
|
||||
sourceY: number;
|
||||
targetX: number;
|
||||
targetY: number;
|
||||
}): [number, number, number, number];
|
||||
export type GetEdgeZIndexParams = {
|
||||
sourceNode: InternalNodeBase;
|
||||
targetNode: InternalNodeBase;
|
||||
selected?: boolean;
|
||||
zIndex?: number;
|
||||
elevateOnSelect?: boolean;
|
||||
zIndexMode?: ZIndexMode;
|
||||
};
|
||||
/**
|
||||
* Returns the z-index for an edge based on the node it connects and whether it is selected.
|
||||
* By default, edges are rendered below nodes. This behaviour is different for edges that are
|
||||
* connected to nodes with a parent, as they are rendered above the parent node.
|
||||
*/
|
||||
export declare function getElevatedEdgeZIndex({ sourceNode, targetNode, selected, zIndex, elevateOnSelect, zIndexMode, }: GetEdgeZIndexParams): number;
|
||||
type IsEdgeVisibleParams = {
|
||||
sourceNode: InternalNodeBase;
|
||||
targetNode: InternalNodeBase;
|
||||
width: number;
|
||||
height: number;
|
||||
transform: Transform;
|
||||
};
|
||||
export declare function isEdgeVisible({ sourceNode, targetNode, width, height, transform }: IsEdgeVisibleParams): boolean;
|
||||
/**
|
||||
* Type for a custom edge ID generator function.
|
||||
* @public
|
||||
*/
|
||||
export type GetEdgeId = (params: Connection | EdgeBase) => string;
|
||||
/**
|
||||
* The default edge ID generator function. Generates an ID based on the source, target, and handles.
|
||||
* @public
|
||||
* @param params - The connection or edge to generate an ID for.
|
||||
* @returns The generated edge ID.
|
||||
*/
|
||||
export declare const getEdgeId: ({ source, sourceHandle, target, targetHandle }: Connection | EdgeBase) => string;
|
||||
export type AddEdgeOptions = {
|
||||
/**
|
||||
* Custom function to generate edge IDs. If not provided, the default `getEdgeId` function is used.
|
||||
*/
|
||||
getEdgeId?: GetEdgeId;
|
||||
};
|
||||
/**
|
||||
* This util is a convenience function to add a new Edge to an array of edges. It also performs some validation to make sure you don't add an invalid edge or duplicate an existing one.
|
||||
* @public
|
||||
* @param edgeParams - Either an `Edge` or a `Connection` you want to add.
|
||||
* @param edges - The array of all current edges.
|
||||
* @param options - Optional configuration object.
|
||||
* @returns A new array of edges with the new edge added.
|
||||
*
|
||||
* @remarks If an edge with the same `target` and `source` already exists (and the same
|
||||
*`targetHandle` and `sourceHandle` if those are set), then this util won't add
|
||||
*a new edge even if the `id` property is different.
|
||||
*
|
||||
*/
|
||||
export declare const addEdge: <EdgeType extends EdgeBase>(edgeParams: EdgeType | Connection, edges: EdgeType[], options?: AddEdgeOptions) => EdgeType[];
|
||||
export type ReconnectEdgeOptions = {
|
||||
/**
|
||||
* Should the id of the old edge be replaced with the new connection id.
|
||||
* @default true
|
||||
*/
|
||||
shouldReplaceId?: boolean;
|
||||
/**
|
||||
* Custom function to generate edge IDs. If not provided, the default `getEdgeId` function is used.
|
||||
*/
|
||||
getEdgeId?: GetEdgeId;
|
||||
};
|
||||
/**
|
||||
* A handy utility to update an existing [`Edge`](/api-reference/types/edge) with new properties.
|
||||
*This searches your edge array for an edge with a matching `id` and updates its
|
||||
*properties with the connection you provide.
|
||||
* @public
|
||||
* @param oldEdge - The edge you want to update.
|
||||
* @param newConnection - The new connection you want to update the edge with.
|
||||
* @param edges - The array of all current edges.
|
||||
* @returns The updated edges array.
|
||||
*
|
||||
* @example
|
||||
* ```js
|
||||
*const onReconnect = useCallback(
|
||||
* (oldEdge: Edge, newConnection: Connection) => setEdges((els) => reconnectEdge(oldEdge, newConnection, els)),[]);
|
||||
*```
|
||||
*/
|
||||
export declare const reconnectEdge: <EdgeType extends EdgeBase>(oldEdge: EdgeType, newConnection: Connection, edges: EdgeType[], options?: ReconnectEdgeOptions) => EdgeType[];
|
||||
export {};
|
||||
//# sourceMappingURL=general.d.ts.map
|
||||
1
node_modules/@xyflow/system/dist/esm/utils/edges/general.d.ts.map
generated
vendored
Normal file
1
node_modules/@xyflow/system/dist/esm/utils/edges/general.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../src/utils/edges/general.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,SAAS,EAA6B,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAIjH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,GACR,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAQnC;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,gBAAgB,CAAC;IAC7B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,UAAU,EACV,UAAU,EACV,QAAgB,EAChB,MAAU,EACV,eAAuB,EACvB,UAAoB,GACrB,EAAE,mBAAmB,GAAG,MAAM,CAY9B;AAED,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAmBhH;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,KAAK,MAAM,CAAC;AAElE;;;;;GAKG;AACH,eAAO,MAAM,SAAS,mDAAoD,UAAU,GAAG,QAAQ,KAAG,MACxB,CAAC;AAY3E,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,GAAI,QAAQ,SAAS,QAAQ,cACnC,QAAQ,GAAG,UAAU,SAC1B,QAAQ,EAAE,YACR,cAAc,KACtB,QAAQ,EAgCV,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,GAAI,QAAQ,SAAS,QAAQ,WAC5C,QAAQ,iBACF,UAAU,SAClB,QAAQ,EAAE,YACR,oBAAoB,KAC5B,QAAQ,EA8BV,CAAC"}
|
||||
6
node_modules/@xyflow/system/dist/esm/utils/edges/index.d.ts
generated
vendored
Normal file
6
node_modules/@xyflow/system/dist/esm/utils/edges/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export * from './bezier-edge';
|
||||
export * from './straight-edge';
|
||||
export * from './smoothstep-edge';
|
||||
export * from './general';
|
||||
export * from './positions';
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@xyflow/system/dist/esm/utils/edges/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@xyflow/system/dist/esm/utils/edges/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/edges/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
||||
17
node_modules/@xyflow/system/dist/esm/utils/edges/positions.d.ts
generated
vendored
Normal file
17
node_modules/@xyflow/system/dist/esm/utils/edges/positions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { EdgePosition } from '../../types/edges';
|
||||
import { ConnectionMode, OnError } from '../../types/general';
|
||||
import { InternalNodeBase } from '../../types/nodes';
|
||||
import { Position, XYPosition } from '../../types/utils';
|
||||
import { Handle } from '../../types';
|
||||
export type GetEdgePositionParams = {
|
||||
id: string;
|
||||
sourceNode: InternalNodeBase;
|
||||
sourceHandle: string | null;
|
||||
targetNode: InternalNodeBase;
|
||||
targetHandle: string | null;
|
||||
connectionMode: ConnectionMode;
|
||||
onError?: OnError;
|
||||
};
|
||||
export declare function getEdgePosition(params: GetEdgePositionParams): EdgePosition | null;
|
||||
export declare function getHandlePosition(node: InternalNodeBase, handle: Handle | null, fallbackPosition?: Position, center?: boolean): XYPosition;
|
||||
//# sourceMappingURL=positions.d.ts.map
|
||||
1
node_modules/@xyflow/system/dist/esm/utils/edges/positions.d.ts.map
generated
vendored
Normal file
1
node_modules/@xyflow/system/dist/esm/utils/edges/positions.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"positions.d.ts","sourceRoot":"","sources":["../../../src/utils/edges/positions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAc,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,gBAAgB,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,gBAAgB,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,cAAc,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAUF,wBAAgB,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,YAAY,GAAG,IAAI,CA6ClF;AA2BD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,gBAAgB,GAAE,QAAwB,EAC1C,MAAM,UAAQ,GACb,UAAU,CAqBZ"}
|
||||
66
node_modules/@xyflow/system/dist/esm/utils/edges/smoothstep-edge.d.ts
generated
vendored
Normal file
66
node_modules/@xyflow/system/dist/esm/utils/edges/smoothstep-edge.d.ts
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
import { Position } from '../../types';
|
||||
export interface GetSmoothStepPathParams {
|
||||
/** The `x` position of the source handle. */
|
||||
sourceX: number;
|
||||
/** The `y` position of the source handle. */
|
||||
sourceY: number;
|
||||
/**
|
||||
* The position of the source handle.
|
||||
* @default Position.Bottom
|
||||
*/
|
||||
sourcePosition?: Position;
|
||||
/** The `x` position of the target handle. */
|
||||
targetX: number;
|
||||
/** The `y` position of the target handle. */
|
||||
targetY: number;
|
||||
/**
|
||||
* The position of the target handle.
|
||||
* @default Position.Top
|
||||
*/
|
||||
targetPosition?: Position;
|
||||
/** @default 5 */
|
||||
borderRadius?: number;
|
||||
centerX?: number;
|
||||
centerY?: number;
|
||||
/** @default 20 */
|
||||
offset?: number;
|
||||
/**
|
||||
* Controls where the bend occurs along the path.
|
||||
* 0 = at source, 1 = at target, 0.5 = midpoint
|
||||
* @default 0.5
|
||||
*/
|
||||
stepPosition?: number;
|
||||
}
|
||||
/**
|
||||
* The `getSmoothStepPath` util returns everything you need to render a stepped path
|
||||
* between two nodes. The `borderRadius` property can be used to choose how rounded
|
||||
* the corners of those steps are.
|
||||
* @public
|
||||
* @returns A path string you can use in an SVG, the `labelX` and `labelY` position (center of path)
|
||||
* and `offsetX`, `offsetY` between source handle and label.
|
||||
*
|
||||
* - `path`: the path to use in an SVG `<path>` element.
|
||||
* - `labelX`: the `x` position you can use to render a label for this edge.
|
||||
* - `labelY`: the `y` position you can use to render a label for this edge.
|
||||
* - `offsetX`: the absolute difference between the source `x` position and the `x` position of the
|
||||
* middle of this path.
|
||||
* - `offsetY`: the absolute difference between the source `y` position and the `y` position of the
|
||||
* middle of this path.
|
||||
* @example
|
||||
* ```js
|
||||
* const source = { x: 0, y: 20 };
|
||||
* const target = { x: 150, y: 100 };
|
||||
*
|
||||
* const [path, labelX, labelY, offsetX, offsetY] = getSmoothStepPath({
|
||||
* sourceX: source.x,
|
||||
* sourceY: source.y,
|
||||
* sourcePosition: Position.Right,
|
||||
* targetX: target.x,
|
||||
* targetY: target.y,
|
||||
* targetPosition: Position.Left,
|
||||
* });
|
||||
* ```
|
||||
* @remarks This function returns a tuple (aka a fixed-size array) to make it easier to work with multiple edge paths at once.
|
||||
*/
|
||||
export declare function getSmoothStepPath({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, borderRadius, centerX, centerY, offset, stepPosition, }: GetSmoothStepPathParams): [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number];
|
||||
//# sourceMappingURL=smoothstep-edge.d.ts.map
|
||||
1
node_modules/@xyflow/system/dist/esm/utils/edges/smoothstep-edge.d.ts.map
generated
vendored
Normal file
1
node_modules/@xyflow/system/dist/esm/utils/edges/smoothstep-edge.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"smoothstep-edge.d.ts","sourceRoot":"","sources":["../../../src/utils/edges/smoothstep-edge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAmB,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,uBAAuB;IACtC,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAkMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EACP,cAAgC,EAChC,OAAO,EACP,OAAO,EACP,cAA6B,EAC7B,YAAgB,EAChB,OAAO,EACP,OAAO,EACP,MAAW,EACX,YAAkB,GACnB,EAAE,uBAAuB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CA0B5G"}
|
||||
41
node_modules/@xyflow/system/dist/esm/utils/edges/straight-edge.d.ts
generated
vendored
Normal file
41
node_modules/@xyflow/system/dist/esm/utils/edges/straight-edge.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
export type GetStraightPathParams = {
|
||||
/** The `x` position of the source handle. */
|
||||
sourceX: number;
|
||||
/** The `y` position of the source handle. */
|
||||
sourceY: number;
|
||||
/** The `x` position of the target handle. */
|
||||
targetX: number;
|
||||
/** The `y` position of the target handle. */
|
||||
targetY: number;
|
||||
};
|
||||
/**
|
||||
* Calculates the straight line path between two points.
|
||||
* @public
|
||||
* @returns A path string you can use in an SVG, the `labelX` and `labelY` position (center of path)
|
||||
* and `offsetX`, `offsetY` between source handle and label.
|
||||
*
|
||||
* - `path`: the path to use in an SVG `<path>` element.
|
||||
* - `labelX`: the `x` position you can use to render a label for this edge.
|
||||
* - `labelY`: the `y` position you can use to render a label for this edge.
|
||||
* - `offsetX`: the absolute difference between the source `x` position and the `x` position of the
|
||||
* middle of this path.
|
||||
* - `offsetY`: the absolute difference between the source `y` position and the `y` position of the
|
||||
* middle of this path.
|
||||
* @example
|
||||
* ```js
|
||||
* const source = { x: 0, y: 20 };
|
||||
* const target = { x: 150, y: 100 };
|
||||
*
|
||||
* const [path, labelX, labelY, offsetX, offsetY] = getStraightPath({
|
||||
* sourceX: source.x,
|
||||
* sourceY: source.y,
|
||||
* sourcePosition: Position.Right,
|
||||
* targetX: target.x,
|
||||
* targetY: target.y,
|
||||
* targetPosition: Position.Left,
|
||||
* });
|
||||
* ```
|
||||
* @remarks This function returns a tuple (aka a fixed-size array) to make it easier to work with multiple edge paths at once.
|
||||
*/
|
||||
export declare function getStraightPath({ sourceX, sourceY, targetX, targetY, }: GetStraightPathParams): [path: string, labelX: number, labelY: number, offsetX: number, offsetY: number];
|
||||
//# sourceMappingURL=straight-edge.d.ts.map
|
||||
1
node_modules/@xyflow/system/dist/esm/utils/edges/straight-edge.d.ts.map
generated
vendored
Normal file
1
node_modules/@xyflow/system/dist/esm/utils/edges/straight-edge.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"straight-edge.d.ts","sourceRoot":"","sources":["../../../src/utils/edges/straight-edge.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,qBAAqB,GAAG;IAClC,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,GACR,EAAE,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAS1G"}
|
||||
Reference in New Issue
Block a user