state sync

This commit is contained in:
2025-11-23 14:59:17 -08:00
parent 537bdf1ad7
commit 39f4a8d3fc
812 changed files with 373062 additions and 84 deletions

View File

@@ -0,0 +1,27 @@
import type { LayoutData } from './types.ts';
import type { Selection } from 'd3';
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
type D3Selection<T extends SVGElement = SVGElement> = Selection<T, unknown, Element | null, unknown>;
/**
* Creates a graph by merging the graph construction and DOM element insertion.
*
* This function creates the graph, inserts the SVG groups (clusters, edgePaths, edgeLabels, nodes)
* into the provided element, and uses `insertNode` to add nodes to the diagram. Node dimensions
* are computed using each node's bounding box.
*
* @param element - The D3 selection in which the SVG groups are inserted.
* @param data4Layout - The layout data containing nodes and edges.
* @returns A promise resolving to an object containing the Graphology graph and the inserted groups.
*/
export declare function createGraphWithElements(element: D3Selection, data4Layout: LayoutData): Promise<{
graph: graphlib.Graph;
groups: {
clusters: D3Selection<SVGGElement>;
edgePaths: D3Selection<SVGGElement>;
edgeLabels: D3Selection<SVGGElement>;
nodes: D3Selection<SVGGElement>;
rootGroups: D3Selection<SVGGElement>;
};
nodeElements: Map<string, D3Selection<SVGElement | SVGGElement>>;
}>;
export {};

View File

@@ -0,0 +1,19 @@
import type { MermaidConfig } from '../config.type.js';
import type { SVGGroup } from '../diagram-api/types.js';
export declare function computeDimensionOfText(parentNode: SVGGroup, lineHeight: number, text: string): DOMRect | undefined;
/**
* Convert fontawesome labels into fontawesome icons by using a regex pattern
* @param text - The raw string to convert
* @param config - Mermaid config
* @returns string with fontawesome icons as svg if the icon is registered otherwise as i tags
*/
export declare function replaceIconSubstring(text: string, config?: MermaidConfig): Promise<string>;
export declare const createText: (el: any, text?: string, { style, isTitle, classes, useHtmlLabels, isNode, width, addSvgBackground, }?: {
style?: string | undefined;
isTitle?: boolean | undefined;
classes?: string | undefined;
useHtmlLabels?: boolean | undefined;
isNode?: boolean | undefined;
width?: number | undefined;
addSvgBackground?: boolean | undefined;
}, config?: MermaidConfig) => Promise<any>;

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,7 @@
import type { MarkdownLine } from './types.js';
import type { MermaidConfig } from '../config.type.js';
/**
* @param markdown - markdown to split into lines
*/
export declare function markdownToLines(markdown: string, config?: MermaidConfig): MarkdownLine[];
export declare function markdownToHTML(markdown: string, { markdownAutoWrap }?: MermaidConfig): string;

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,18 @@
import type { IconifyIcon, IconifyJSON } from '@iconify/types';
import type { IconifyIconCustomisations } from '@iconify/utils';
interface AsyncIconLoader {
name: string;
loader: () => Promise<IconifyJSON>;
}
interface SyncIconLoader {
name: string;
icons: IconifyJSON;
}
export type IconLoader = AsyncIconLoader | SyncIconLoader;
export declare const unknownIcon: IconifyIcon;
export declare const registerIconPacks: (iconLoaders: IconLoader[]) => void;
export declare const isIconAvailable: (iconName: string) => Promise<boolean>;
export declare const getIconSVG: (iconName: string, customisations?: IconifyIconCustomisations & {
fallbackPrefix?: string;
}, extraAttributes?: Record<string, string>) => Promise<string>;
export {};

View File

@@ -0,0 +1 @@
export function getDiagramElement(id: any, securityLevel: any): any;

View File

@@ -0,0 +1,53 @@
import cytoscape from 'cytoscape';
import type { LayoutData, Node, Edge } from '../../types.js';
import type { PositionedNode, PositionedEdge } from './types.js';
/**
* Declare module augmentation for cytoscape edge types
*/
declare module 'cytoscape' {
interface EdgeSingular {
_private: {
bodyBounds: unknown;
rscratch: {
startX: number;
startY: number;
midX: number;
midY: number;
endX: number;
endY: number;
};
};
}
}
/**
* Add nodes to cytoscape instance from provided node array
* This function processes only the nodes provided in the data structure
* @param nodes - Array of nodes to add
* @param cy - The cytoscape instance
*/
export declare function addNodes(nodes: Node[], cy: cytoscape.Core): void;
/**
* Add edges to cytoscape instance from provided edge array
* This function processes only the edges provided in the data structure
* @param edges - Array of edges to add
* @param cy - The cytoscape instance
*/
export declare function addEdges(edges: Edge[], cy: cytoscape.Core): void;
/**
* Create and configure cytoscape instance
* @param data - Layout data containing nodes and edges
* @returns Promise resolving to configured cytoscape instance
*/
export declare function createCytoscapeInstance(data: LayoutData): Promise<cytoscape.Core>;
/**
* Extract positioned nodes from cytoscape instance
* @param cy - The cytoscape instance after layout
* @returns Array of positioned nodes
*/
export declare function extractPositionedNodes(cy: cytoscape.Core): PositionedNode[];
/**
* Extract positioned edges from cytoscape instance
* @param cy - The cytoscape instance after layout
* @returns Array of positioned edges
*/
export declare function extractPositionedEdges(cy: cytoscape.Core): PositionedEdge[];

View File

@@ -0,0 +1,22 @@
/**
* Cose-Bilkent Layout Algorithm for Generic Diagrams
*
* This module provides a layout algorithm implementation using Cytoscape
* with the cose-bilkent algorithm for positioning nodes and edges.
*
* The algorithm follows the unified rendering pattern and can be used
* by any diagram type that provides compatible LayoutData.
*/
/**
* Render function for the cose-bilkent layout algorithm
*
* This function follows the unified rendering pattern used by all layout algorithms.
* It takes LayoutData, inserts nodes into DOM, runs the cose-bilkent layout algorithm,
* and renders the positioned elements to the SVG.
*
* @param layoutData - Layout data containing nodes, edges, and configuration
* @param svg - SVG element to render to
* @param helpers - Internal helper functions for rendering
* @param options - Rendering options
*/
export declare const render: (data4Layout: import("../../types.js").LayoutData, svg: import("../../../mermaid.js").SVG, { insertCluster, insertEdge, insertEdgeLabel, insertMarkers, insertNode, log, positionEdgeLabel, }: import("../../../internals.js").InternalHelpers, { algorithm: _algorithm }: import("../../render.js").RenderOptions) => Promise<void>;

View File

@@ -0,0 +1,20 @@
import type { MermaidConfig } from '../../../config.type.js';
import type { LayoutData } from '../../types.js';
import type { LayoutResult } from './types.js';
/**
* Execute the cose-bilkent layout algorithm on generic layout data
*
* This function takes layout data and uses Cytoscape with the cose-bilkent
* algorithm to calculate optimal node positions and edge paths.
*
* @param data - The layout data containing nodes, edges, and configuration
* @param config - Mermaid configuration object
* @returns Promise resolving to layout result with positioned nodes and edges
*/
export declare function executeCoseBilkentLayout(data: LayoutData, _config: MermaidConfig): Promise<LayoutResult>;
/**
* Validate layout data structure
* @param data - The data to validate
* @returns True if data is valid, throws error otherwise
*/
export declare function validateLayoutData(data: LayoutData): boolean;

View File

@@ -0,0 +1,10 @@
import type { InternalHelpers, LayoutData, RenderOptions, SVG } from 'mermaid';
/**
* Render function for cose-bilkent layout algorithm
*
* This follows the same pattern as ELK and dagre renderers:
* 1. Insert nodes into DOM to get their actual dimensions
* 2. Run the layout algorithm to calculate positions
* 3. Position the nodes and edges based on layout results
*/
export declare const render: (data4Layout: LayoutData, svg: SVG, { insertCluster, insertEdge, insertEdgeLabel, insertMarkers, insertNode, log, positionEdgeLabel, }: InternalHelpers, { algorithm: _algorithm }: RenderOptions) => Promise<void>;

View File

@@ -0,0 +1,40 @@
/**
* Positioned node after layout calculation
*/
export interface PositionedNode {
id: string;
x: number;
y: number;
[key: string]: unknown;
}
/**
* Positioned edge after layout calculation
*/
export interface PositionedEdge {
id: string;
source: string;
target: string;
startX: number;
startY: number;
midX: number;
midY: number;
endX: number;
endY: number;
[key: string]: unknown;
}
/**
* Result of layout algorithm execution
*/
export interface LayoutResult {
nodes: PositionedNode[];
edges: PositionedEdge[];
}
/**
* Cytoscape layout configuration
*/
export interface CytoscapeLayoutConfig {
name: 'cose-bilkent';
quality: 'proof';
styleEnabled: boolean;
animate: boolean;
}

View File

@@ -0,0 +1 @@
export function render(data4Layout: any, svg: any): Promise<void>;

View File

@@ -0,0 +1,8 @@
export let clusterDb: Map<any, any>;
export function clear(): void;
export function extractDescendants(id: any, graph: any): any[];
export function validate(graph: any): boolean;
export function findNonClusterChild(id: any, graph: any, clusterId: any): any;
export function adjustClustersAndEdges(graph: any, depth: any): void;
export function extractor(graph: any, depth: any): void;
export function sortNodesByHierarchy(graph: any): any;

View File

@@ -0,0 +1,23 @@
import type { SVG } from '../diagram-api/types.js';
import type { InternalHelpers } from '../internals.js';
import type { LayoutData } from './types.js';
export interface RenderOptions {
algorithm?: string;
}
export interface LayoutAlgorithm {
render(layoutData: LayoutData, svg: SVG, helpers: InternalHelpers, options?: RenderOptions): Promise<void>;
}
export type LayoutLoader = () => Promise<LayoutAlgorithm>;
export interface LayoutLoaderDefinition {
name: string;
loader: LayoutLoader;
algorithm?: string;
}
export declare const registerLayoutLoaders: (loaders: LayoutLoaderDefinition[]) => void;
export declare const render: (data4Layout: LayoutData, svg: SVG) => Promise<void>;
/**
* Get the registered layout algorithm. If the algorithm is not registered, use the fallback algorithm.
*/
export declare const getRegisteredLayoutAlgorithm: (algorithm?: string, { fallback }?: {
fallback?: string | undefined;
}) => string;

View File

@@ -0,0 +1,42 @@
export function insertCluster(elem: any, node: import("../types.js").ClusterNode): Promise<any>;
export function getClusterTitleWidth(elem: any, node: any): any;
export function clear(): void;
export function positionCluster(node: any): void;
export type ClusterShapeID = keyof typeof shapes;
declare namespace shapes {
export { rect };
export { squareRect };
export { roundedWithTitle };
export { noteGroup };
export { divider };
export { kanbanSection };
}
declare function rect(parent: any, node: any): Promise<{
cluster: any;
labelBBox: any;
}>;
declare function squareRect(parent: any, node: any): Promise<{
cluster: any;
labelBBox: any;
}>;
declare function roundedWithTitle(parent: any, node: any): Promise<{
cluster: any;
labelBBox: any;
}>;
/**
* Non visible cluster where the note is group with its
*
* @param {any} parent
* @param {any} node
* @returns {any} ShapeSvg
*/
declare function noteGroup(parent: any, node: any): any;
declare function divider(parent: any, node: any): {
cluster: any;
labelBBox: {};
};
declare function kanbanSection(parent: any, node: any): Promise<{
cluster: any;
labelBBox: any;
}>;
export {};

View File

@@ -0,0 +1,9 @@
export default createLabel;
/**
* @param _vertexText
* @param style
* @param isTitle
* @param isNode
* @deprecated svg-util/createText instead
*/
declare function createLabel(_vertexText: any, style: any, isTitle: any, isNode: any): Promise<SVGTextElement | SVGForeignObjectElement>;

View File

@@ -0,0 +1,12 @@
import type { SVG } from '../../diagram-api/types.js';
import type { EdgeData } from '../../types.js';
/**
* Adds SVG markers to a path element based on the arrow types specified in the edge.
*
* @param svgPath - The SVG path element to add markers to.
* @param edge - The edge data object containing the arrow types.
* @param url - The URL of the SVG marker definitions.
* @param id - The ID prefix for the SVG marker definitions.
* @param diagramType - The type of diagram being rendered.
*/
export declare const addEdgeMarkers: (svgPath: SVG, edge: Pick<EdgeData, "arrowTypeStart" | "arrowTypeEnd">, url: string, id: string, diagramType: string, strokeColor?: string) => void;

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,17 @@
export const edgeLabels: Map<any, any>;
export const terminalLabels: Map<any, any>;
export function clear(): void;
export function getLabelStyles(styleArray: any): any;
export function insertEdgeLabel(elem: any, edge: any): Promise<any>;
export function positionEdgeLabel(edge: any, paths: any): void;
export function intersection(node: any, outsidePoint: any, insidePoint: any): {
x: any;
y: number;
} | {
x: number;
y: any;
};
export function insertEdge(elem: any, edge: any, clusterDb: any, diagramType: any, startNode: any, endNode: any, id: any, skipIntersect?: boolean): {
updatedPath: any;
originalPath: any;
};

View File

@@ -0,0 +1,13 @@
declare namespace _default {
export { node };
export { circle };
export { ellipse };
export { polygon };
export { rect };
}
export default _default;
import node from './intersect-node.js';
import circle from './intersect-circle.js';
import ellipse from './intersect-ellipse.js';
import polygon from './intersect-polygon.js';
import rect from './intersect-rect.js';

View File

@@ -0,0 +1,5 @@
export default intersectCircle;
declare function intersectCircle(node: any, rx: any, point: any): {
x: any;
y: any;
};

View File

@@ -0,0 +1,5 @@
export default intersectEllipse;
declare function intersectEllipse(node: any, rx: any, ry: any, point: any): {
x: any;
y: any;
};

View File

@@ -0,0 +1,8 @@
export default intersectLine;
/**
* Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.
*/
declare function intersectLine(p1: any, p2: any, q1: any, q2: any): {
x: number;
y: number;
} | undefined;

View File

@@ -0,0 +1,2 @@
export default intersectNode;
declare function intersectNode(node: any, point: any): any;

View File

@@ -0,0 +1,6 @@
export default intersectPolygon;
/**
* Returns the point ({x, y}) at which the point argument intersects with the node argument assuming
* that it has the shape specified by polygon.
*/
declare function intersectPolygon(node: any, polyPoints: any, point: any): any;

View File

@@ -0,0 +1,5 @@
export default intersectRect;
declare function intersectRect(node: any, point: any): {
x: any;
y: any;
};

View File

@@ -0,0 +1,2 @@
export default insertMarkers;
declare function insertMarkers(elem: any, markerArray: any, type: any, id: any): void;

View File

@@ -0,0 +1,12 @@
import { shapes } from './shapes.js';
import type { Node, NonClusterNode, ShapeRenderOptions } from '../types.js';
import type { SVGGroup } from '../../mermaid.js';
import type { D3Selection } from '../../types.js';
import type { graphlib } from 'dagre-d3-es';
type ShapeHandler = (typeof shapes)[keyof typeof shapes];
type NodeElement = D3Selection<SVGAElement> | Awaited<ReturnType<ShapeHandler>>;
export declare function insertNode(elem: SVGGroup, node: NonClusterNode, renderOptions: ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown> | D3Selection<SVGAElement>>;
export declare const setNodeElem: (elem: NodeElement, node: Pick<Node, "id">) => void;
export declare const clear: () => void;
export declare const positionNode: (node: ReturnType<graphlib.Graph["node"]>) => any;
export {};

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,422 @@
import type { D3Selection, MaybePromise } from '../../types.js';
import type { Node, ShapeRenderOptions } from '../types.js';
import { anchor } from './shapes/anchor.js';
import { bowTieRect } from './shapes/bowTieRect.js';
import { card } from './shapes/card.js';
import { choice } from './shapes/choice.js';
import { circle } from './shapes/circle.js';
import { crossedCircle } from './shapes/crossedCircle.js';
import { curlyBraceLeft } from './shapes/curlyBraceLeft.js';
import { curlyBraceRight } from './shapes/curlyBraceRight.js';
import { curlyBraces } from './shapes/curlyBraces.js';
import { curvedTrapezoid } from './shapes/curvedTrapezoid.js';
import { cylinder } from './shapes/cylinder.js';
import { dividedRectangle } from './shapes/dividedRect.js';
import { doublecircle } from './shapes/doubleCircle.js';
import { filledCircle } from './shapes/filledCircle.js';
import { flippedTriangle } from './shapes/flippedTriangle.js';
import { forkJoin } from './shapes/forkJoin.js';
import { halfRoundedRectangle } from './shapes/halfRoundedRectangle.js';
import { hexagon } from './shapes/hexagon.js';
import { hourglass } from './shapes/hourglass.js';
import { icon } from './shapes/icon.js';
import { iconCircle } from './shapes/iconCircle.js';
import { iconRounded } from './shapes/iconRounded.js';
import { iconSquare } from './shapes/iconSquare.js';
import { imageSquare } from './shapes/imageSquare.js';
import { inv_trapezoid } from './shapes/invertedTrapezoid.js';
import { labelRect } from './shapes/labelRect.js';
import { lean_left } from './shapes/leanLeft.js';
import { lean_right } from './shapes/leanRight.js';
import { lightningBolt } from './shapes/lightningBolt.js';
import { linedCylinder } from './shapes/linedCylinder.js';
import { linedWaveEdgedRect } from './shapes/linedWaveEdgedRect.js';
import { multiRect } from './shapes/multiRect.js';
import { multiWaveEdgedRectangle } from './shapes/multiWaveEdgedRectangle.js';
import { note } from './shapes/note.js';
import { question } from './shapes/question.js';
import { rect_left_inv_arrow } from './shapes/rectLeftInvArrow.js';
import { rectWithTitle } from './shapes/rectWithTitle.js';
import { roundedRect } from './shapes/roundedRect.js';
import { shadedProcess } from './shapes/shadedProcess.js';
import { slopedRect } from './shapes/slopedRect.js';
import { squareRect } from './shapes/squareRect.js';
import { stadium } from './shapes/stadium.js';
import { state } from './shapes/state.js';
import { stateEnd } from './shapes/stateEnd.js';
import { stateStart } from './shapes/stateStart.js';
import { subroutine } from './shapes/subroutine.js';
import { taggedRect } from './shapes/taggedRect.js';
import { taggedWaveEdgedRectangle } from './shapes/taggedWaveEdgedRectangle.js';
import { text } from './shapes/text.js';
import { tiltedCylinder } from './shapes/tiltedCylinder.js';
import { trapezoid } from './shapes/trapezoid.js';
import { trapezoidalPentagon } from './shapes/trapezoidalPentagon.js';
import { triangle } from './shapes/triangle.js';
import { waveEdgedRectangle } from './shapes/waveEdgedRectangle.js';
import { waveRectangle } from './shapes/waveRectangle.js';
import { windowPane } from './shapes/windowPane.js';
import { erBox } from './shapes/erBox.js';
import { classBox } from './shapes/classBox.js';
import { requirementBox } from './shapes/requirementBox.js';
import { kanbanItem } from './shapes/kanbanItem.js';
import { bang } from './shapes/bang.js';
import { cloud } from './shapes/cloud.js';
import { defaultMindmapNode } from './shapes/defaultMindmapNode.js';
import { mindmapCircle } from './shapes/mindmapCircle.js';
type ShapeHandler = <T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, options: ShapeRenderOptions) => MaybePromise<D3Selection<SVGGElement>>;
export interface ShapeDefinition {
semanticName: string;
name: string;
shortName: string;
description: string;
/**
* Aliases can include descriptive names, other short names, etc.
*/
aliases?: string[];
/**
* These are names used by mermaid before the introduction of new shapes. These will not be in standard formats, and shouldn't be used by the users
*/
internalAliases?: string[];
handler: ShapeHandler;
}
export declare const shapesDefs: [{
readonly semanticName: "Process";
readonly name: "Rectangle";
readonly shortName: "rect";
readonly description: "Standard process shape";
readonly aliases: ["proc", "process", "rectangle"];
readonly internalAliases: ["squareRect"];
readonly handler: typeof squareRect;
}, {
readonly semanticName: "Event";
readonly name: "Rounded Rectangle";
readonly shortName: "rounded";
readonly description: "Represents an event";
readonly aliases: ["event"];
readonly internalAliases: ["roundedRect"];
readonly handler: typeof roundedRect;
}, {
readonly semanticName: "Terminal Point";
readonly name: "Stadium";
readonly shortName: "stadium";
readonly description: "Terminal point";
readonly aliases: ["terminal", "pill"];
readonly handler: typeof stadium;
}, {
readonly semanticName: "Subprocess";
readonly name: "Framed Rectangle";
readonly shortName: "fr-rect";
readonly description: "Subprocess";
readonly aliases: ["subprocess", "subproc", "framed-rectangle", "subroutine"];
readonly handler: typeof subroutine;
}, {
readonly semanticName: "Database";
readonly name: "Cylinder";
readonly shortName: "cyl";
readonly description: "Database storage";
readonly aliases: ["db", "database", "cylinder"];
readonly handler: typeof cylinder;
}, {
readonly semanticName: "Start";
readonly name: "Circle";
readonly shortName: "circle";
readonly description: "Starting point";
readonly aliases: ["circ"];
readonly handler: typeof circle;
}, {
readonly semanticName: "Bang";
readonly name: "Bang";
readonly shortName: "bang";
readonly description: "Bang";
readonly aliases: ["bang"];
readonly handler: typeof bang;
}, {
readonly semanticName: "Cloud";
readonly name: "Cloud";
readonly shortName: "cloud";
readonly description: "cloud";
readonly aliases: ["cloud"];
readonly handler: typeof cloud;
}, {
readonly semanticName: "Decision";
readonly name: "Diamond";
readonly shortName: "diam";
readonly description: "Decision-making step";
readonly aliases: ["decision", "diamond", "question"];
readonly handler: typeof question;
}, {
readonly semanticName: "Prepare Conditional";
readonly name: "Hexagon";
readonly shortName: "hex";
readonly description: "Preparation or condition step";
readonly aliases: ["hexagon", "prepare"];
readonly handler: typeof hexagon;
}, {
readonly semanticName: "Data Input/Output";
readonly name: "Lean Right";
readonly shortName: "lean-r";
readonly description: "Represents input or output";
readonly aliases: ["lean-right", "in-out"];
readonly internalAliases: ["lean_right"];
readonly handler: typeof lean_right;
}, {
readonly semanticName: "Data Input/Output";
readonly name: "Lean Left";
readonly shortName: "lean-l";
readonly description: "Represents output or input";
readonly aliases: ["lean-left", "out-in"];
readonly internalAliases: ["lean_left"];
readonly handler: typeof lean_left;
}, {
readonly semanticName: "Priority Action";
readonly name: "Trapezoid Base Bottom";
readonly shortName: "trap-b";
readonly description: "Priority action";
readonly aliases: ["priority", "trapezoid-bottom", "trapezoid"];
readonly handler: typeof trapezoid;
}, {
readonly semanticName: "Manual Operation";
readonly name: "Trapezoid Base Top";
readonly shortName: "trap-t";
readonly description: "Represents a manual task";
readonly aliases: ["manual", "trapezoid-top", "inv-trapezoid"];
readonly internalAliases: ["inv_trapezoid"];
readonly handler: typeof inv_trapezoid;
}, {
readonly semanticName: "Stop";
readonly name: "Double Circle";
readonly shortName: "dbl-circ";
readonly description: "Represents a stop point";
readonly aliases: ["double-circle"];
readonly internalAliases: ["doublecircle"];
readonly handler: typeof doublecircle;
}, {
readonly semanticName: "Text Block";
readonly name: "Text Block";
readonly shortName: "text";
readonly description: "Text block";
readonly handler: typeof text;
}, {
readonly semanticName: "Card";
readonly name: "Notched Rectangle";
readonly shortName: "notch-rect";
readonly description: "Represents a card";
readonly aliases: ["card", "notched-rectangle"];
readonly handler: typeof card;
}, {
readonly semanticName: "Lined/Shaded Process";
readonly name: "Lined Rectangle";
readonly shortName: "lin-rect";
readonly description: "Lined process shape";
readonly aliases: ["lined-rectangle", "lined-process", "lin-proc", "shaded-process"];
readonly handler: typeof shadedProcess;
}, {
readonly semanticName: "Start";
readonly name: "Small Circle";
readonly shortName: "sm-circ";
readonly description: "Small starting point";
readonly aliases: ["start", "small-circle"];
readonly internalAliases: ["stateStart"];
readonly handler: typeof stateStart;
}, {
readonly semanticName: "Stop";
readonly name: "Framed Circle";
readonly shortName: "fr-circ";
readonly description: "Stop point";
readonly aliases: ["stop", "framed-circle"];
readonly internalAliases: ["stateEnd"];
readonly handler: typeof stateEnd;
}, {
readonly semanticName: "Fork/Join";
readonly name: "Filled Rectangle";
readonly shortName: "fork";
readonly description: "Fork or join in process flow";
readonly aliases: ["join"];
readonly internalAliases: ["forkJoin"];
readonly handler: typeof forkJoin;
}, {
readonly semanticName: "Collate";
readonly name: "Hourglass";
readonly shortName: "hourglass";
readonly description: "Represents a collate operation";
readonly aliases: ["hourglass", "collate"];
readonly handler: typeof hourglass;
}, {
readonly semanticName: "Comment";
readonly name: "Curly Brace";
readonly shortName: "brace";
readonly description: "Adds a comment";
readonly aliases: ["comment", "brace-l"];
readonly handler: typeof curlyBraceLeft;
}, {
readonly semanticName: "Comment Right";
readonly name: "Curly Brace";
readonly shortName: "brace-r";
readonly description: "Adds a comment";
readonly handler: typeof curlyBraceRight;
}, {
readonly semanticName: "Comment with braces on both sides";
readonly name: "Curly Braces";
readonly shortName: "braces";
readonly description: "Adds a comment";
readonly handler: typeof curlyBraces;
}, {
readonly semanticName: "Com Link";
readonly name: "Lightning Bolt";
readonly shortName: "bolt";
readonly description: "Communication link";
readonly aliases: ["com-link", "lightning-bolt"];
readonly handler: typeof lightningBolt;
}, {
readonly semanticName: "Document";
readonly name: "Document";
readonly shortName: "doc";
readonly description: "Represents a document";
readonly aliases: ["doc", "document"];
readonly handler: typeof waveEdgedRectangle;
}, {
readonly semanticName: "Delay";
readonly name: "Half-Rounded Rectangle";
readonly shortName: "delay";
readonly description: "Represents a delay";
readonly aliases: ["half-rounded-rectangle"];
readonly handler: typeof halfRoundedRectangle;
}, {
readonly semanticName: "Direct Access Storage";
readonly name: "Horizontal Cylinder";
readonly shortName: "h-cyl";
readonly description: "Direct access storage";
readonly aliases: ["das", "horizontal-cylinder"];
readonly handler: typeof tiltedCylinder;
}, {
readonly semanticName: "Disk Storage";
readonly name: "Lined Cylinder";
readonly shortName: "lin-cyl";
readonly description: "Disk storage";
readonly aliases: ["disk", "lined-cylinder"];
readonly handler: typeof linedCylinder;
}, {
readonly semanticName: "Display";
readonly name: "Curved Trapezoid";
readonly shortName: "curv-trap";
readonly description: "Represents a display";
readonly aliases: ["curved-trapezoid", "display"];
readonly handler: typeof curvedTrapezoid;
}, {
readonly semanticName: "Divided Process";
readonly name: "Divided Rectangle";
readonly shortName: "div-rect";
readonly description: "Divided process shape";
readonly aliases: ["div-proc", "divided-rectangle", "divided-process"];
readonly handler: typeof dividedRectangle;
}, {
readonly semanticName: "Extract";
readonly name: "Triangle";
readonly shortName: "tri";
readonly description: "Extraction process";
readonly aliases: ["extract", "triangle"];
readonly handler: typeof triangle;
}, {
readonly semanticName: "Internal Storage";
readonly name: "Window Pane";
readonly shortName: "win-pane";
readonly description: "Internal storage";
readonly aliases: ["internal-storage", "window-pane"];
readonly handler: typeof windowPane;
}, {
readonly semanticName: "Junction";
readonly name: "Filled Circle";
readonly shortName: "f-circ";
readonly description: "Junction point";
readonly aliases: ["junction", "filled-circle"];
readonly handler: typeof filledCircle;
}, {
readonly semanticName: "Loop Limit";
readonly name: "Trapezoidal Pentagon";
readonly shortName: "notch-pent";
readonly description: "Loop limit step";
readonly aliases: ["loop-limit", "notched-pentagon"];
readonly handler: typeof trapezoidalPentagon;
}, {
readonly semanticName: "Manual File";
readonly name: "Flipped Triangle";
readonly shortName: "flip-tri";
readonly description: "Manual file operation";
readonly aliases: ["manual-file", "flipped-triangle"];
readonly handler: typeof flippedTriangle;
}, {
readonly semanticName: "Manual Input";
readonly name: "Sloped Rectangle";
readonly shortName: "sl-rect";
readonly description: "Manual input step";
readonly aliases: ["manual-input", "sloped-rectangle"];
readonly handler: typeof slopedRect;
}, {
readonly semanticName: "Multi-Document";
readonly name: "Stacked Document";
readonly shortName: "docs";
readonly description: "Multiple documents";
readonly aliases: ["documents", "st-doc", "stacked-document"];
readonly handler: typeof multiWaveEdgedRectangle;
}, {
readonly semanticName: "Multi-Process";
readonly name: "Stacked Rectangle";
readonly shortName: "st-rect";
readonly description: "Multiple processes";
readonly aliases: ["procs", "processes", "stacked-rectangle"];
readonly handler: typeof multiRect;
}, {
readonly semanticName: "Stored Data";
readonly name: "Bow Tie Rectangle";
readonly shortName: "bow-rect";
readonly description: "Stored data";
readonly aliases: ["stored-data", "bow-tie-rectangle"];
readonly handler: typeof bowTieRect;
}, {
readonly semanticName: "Summary";
readonly name: "Crossed Circle";
readonly shortName: "cross-circ";
readonly description: "Summary";
readonly aliases: ["summary", "crossed-circle"];
readonly handler: typeof crossedCircle;
}, {
readonly semanticName: "Tagged Document";
readonly name: "Tagged Document";
readonly shortName: "tag-doc";
readonly description: "Tagged document";
readonly aliases: ["tag-doc", "tagged-document"];
readonly handler: typeof taggedWaveEdgedRectangle;
}, {
readonly semanticName: "Tagged Process";
readonly name: "Tagged Rectangle";
readonly shortName: "tag-rect";
readonly description: "Tagged process";
readonly aliases: ["tagged-rectangle", "tag-proc", "tagged-process"];
readonly handler: typeof taggedRect;
}, {
readonly semanticName: "Paper Tape";
readonly name: "Flag";
readonly shortName: "flag";
readonly description: "Paper tape";
readonly aliases: ["paper-tape"];
readonly handler: typeof waveRectangle;
}, {
readonly semanticName: "Odd";
readonly name: "Odd";
readonly shortName: "odd";
readonly description: "Odd shape";
readonly internalAliases: ["rect_left_inv_arrow"];
readonly handler: typeof rect_left_inv_arrow;
}, {
readonly semanticName: "Lined Document";
readonly name: "Lined Document";
readonly shortName: "lin-doc";
readonly description: "Lined document";
readonly aliases: ["lined-document"];
readonly handler: typeof linedWaveEdgedRect;
}];
export declare const shapes: Record<"join" | "state" | "anchor" | "db" | "summary" | "database" | "start" | "document" | "event" | "stop" | "process" | "text" | "circle" | "rect" | "display" | "squareRect" | "choice" | "note" | "rectWithTitle" | "labelRect" | "iconSquare" | "iconCircle" | "icon" | "iconRounded" | "imageSquare" | "kanbanItem" | "mindmapCircle" | "defaultMindmapNode" | "classBox" | "erBox" | "requirementBox" | "proc" | "rectangle" | "rounded" | "roundedRect" | "stadium" | "terminal" | "pill" | "fr-rect" | "subprocess" | "subproc" | "framed-rectangle" | "subroutine" | "cyl" | "cylinder" | "circ" | "bang" | "cloud" | "diam" | "decision" | "diamond" | "question" | "hex" | "hexagon" | "prepare" | "lean-r" | "lean-right" | "in-out" | "lean_right" | "lean-l" | "lean-left" | "out-in" | "lean_left" | "trap-b" | "priority" | "trapezoid-bottom" | "trapezoid" | "trap-t" | "manual" | "trapezoid-top" | "inv-trapezoid" | "inv_trapezoid" | "dbl-circ" | "double-circle" | "doublecircle" | "notch-rect" | "card" | "notched-rectangle" | "lin-rect" | "lined-rectangle" | "lined-process" | "lin-proc" | "shaded-process" | "sm-circ" | "small-circle" | "stateStart" | "fr-circ" | "framed-circle" | "stateEnd" | "fork" | "forkJoin" | "hourglass" | "collate" | "brace" | "comment" | "brace-l" | "brace-r" | "braces" | "bolt" | "com-link" | "lightning-bolt" | "doc" | "delay" | "half-rounded-rectangle" | "h-cyl" | "das" | "horizontal-cylinder" | "lin-cyl" | "disk" | "lined-cylinder" | "curv-trap" | "curved-trapezoid" | "div-rect" | "div-proc" | "divided-rectangle" | "divided-process" | "tri" | "extract" | "triangle" | "win-pane" | "internal-storage" | "window-pane" | "f-circ" | "junction" | "filled-circle" | "notch-pent" | "loop-limit" | "notched-pentagon" | "flip-tri" | "manual-file" | "flipped-triangle" | "sl-rect" | "manual-input" | "sloped-rectangle" | "docs" | "documents" | "st-doc" | "stacked-document" | "st-rect" | "procs" | "processes" | "stacked-rectangle" | "bow-rect" | "stored-data" | "bow-tie-rectangle" | "cross-circ" | "crossed-circle" | "tag-doc" | "tagged-document" | "tag-rect" | "tagged-rectangle" | "tag-proc" | "tagged-process" | "flag" | "paper-tape" | "odd" | "rect_left_inv_arrow" | "lin-doc" | "lined-document", typeof state | typeof choice | typeof note | typeof rectWithTitle | typeof labelRect | typeof iconSquare | typeof iconCircle | typeof icon | typeof iconRounded | typeof imageSquare | typeof anchor | typeof kanbanItem | typeof mindmapCircle | typeof defaultMindmapNode | typeof classBox | typeof erBox | typeof requirementBox | typeof squareRect | typeof roundedRect | typeof stadium | typeof subroutine | typeof cylinder | typeof circle | typeof bang | typeof cloud | typeof question | typeof hexagon | typeof lean_right | typeof lean_left | typeof trapezoid | typeof inv_trapezoid | typeof doublecircle | typeof text | typeof card | typeof shadedProcess | typeof stateStart | typeof stateEnd | typeof forkJoin | typeof hourglass | typeof curlyBraceLeft | typeof curlyBraceRight | typeof curlyBraces | typeof lightningBolt | typeof waveEdgedRectangle | typeof halfRoundedRectangle | typeof tiltedCylinder | typeof linedCylinder | typeof curvedTrapezoid | typeof dividedRectangle | typeof triangle | typeof windowPane | typeof filledCircle | typeof trapezoidalPentagon | typeof flippedTriangle | typeof slopedRect | typeof multiWaveEdgedRectangle | typeof multiRect | typeof bowTieRect | typeof crossedCircle | typeof taggedWaveEdgedRectangle | typeof taggedRect | typeof waveRectangle | typeof rect_left_inv_arrow | typeof linedWaveEdgedRect>;
export declare function isValidShape(shape: string): shape is ShapeID;
export type ShapeID = keyof typeof shapes;
export {};

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function anchor<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function bang<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function bowTieRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function card<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function choice<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,3 @@
import type { D3Selection } from '../../../types.js';
import type { MindmapOptions, Node, ShapeRenderOptions } from '../../types.js';
export declare function circle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, options?: MindmapOptions | ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function classBox<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { D3Selection } from '../../../types.js';
import type { Node } from '../../types.js';
export declare function cloud<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function crossedCircle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function curlyBraceLeft<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function curlyBraceRight<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function curlyBraces<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function curvedTrapezoid<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,6 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare const createCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare const createOuterCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare const createInnerCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare function cylinder<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { D3Selection } from '../../../types.js';
import type { Node } from '../../types.js';
export declare function defaultMindmapNode<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function dividedRectangle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,6 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare const createCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare const createOuterCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare const createInnerCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare function cylinder<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function doublecircle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, RectOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function drawRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, options: RectOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function erBox<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function filledCircle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { themeVariables } }: ShapeRenderOptions): import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function flippedTriangle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function forkJoin<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { dir, config: { state, themeVariables } }: ShapeRenderOptions): import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function halfRoundedRectangle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,24 @@
import type { Node } from '../../types.js';
export declare const solidStateFill: (color: string) => {
fill: string;
hachureAngle: number;
hachureGap: number;
fillWeight: number;
roughness: number;
stroke: string;
seed: number | undefined;
};
export declare const compileStyles: (node: Node) => {
stylesMap: Map<string, string>;
stylesArray: [string, string][];
};
export declare const styles2Map: (styles: string[]) => Map<string, string>;
export declare const isLabelStyle: (key: string) => key is "font-family" | "font-size" | "font-weight" | "font-style" | "text-align" | "white-space" | "color" | "text-decoration" | "text-transform" | "line-height" | "letter-spacing" | "word-spacing" | "text-shadow" | "text-overflow" | "word-wrap" | "word-break" | "overflow-wrap" | "hyphens";
export declare const styles2String: (node: Node) => {
labelStyles: string;
nodeStyles: string;
stylesArray: [string, string][];
borderStyles: string[];
backgroundStyles: string[];
};
export declare const userNodeOverrides: (node: Node, options: any) => any;

View File

@@ -0,0 +1,4 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare const createHexagonPathD: (x: number, y: number, width: number, height: number, m: number) => string;
export declare function hexagon<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function hourglass<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function icon<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { themeVariables, flowchart } }: ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function iconCircle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { themeVariables, flowchart } }: ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function iconRounded<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { themeVariables, flowchart } }: ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function iconSquare<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { themeVariables, flowchart } }: ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function imageSquare<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { flowchart } }: ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,5 @@
import type { D3Selection } from '../../../types.js';
export declare function insertPolygonShape<T extends SVGGraphicsElement>(parent: D3Selection<T>, w: number, h: number, points: {
x: number;
y: number;
}[]): import("d3-selection").Selection<SVGPolygonElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function inv_trapezoid<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, KanbanNode, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function kanbanItem<T extends SVGGraphicsElement>(parent: D3Selection<T>, kanbanNode: Omit<Node, 'shape'> | Omit<KanbanNode, 'level' | 'shape'>, { config }: ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,4 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function roundedRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;
export declare function labelRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function lean_left<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function lean_right<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function lightningBolt<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,6 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare const createCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number, outerOffset: number) => string;
export declare const createOuterCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number, outerOffset: number) => string;
export declare const createInnerCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare function linedCylinder<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function linedWaveEdgedRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function mindmapCircle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function multiRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function multiWaveEdgedRectangle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function note<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { themeVariables } }: ShapeRenderOptions): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,4 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare const createDecisionBoxPathD: (x: number, y: number, size: number) => string;
export declare function question<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function rect_left_inv_arrow<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function rectWithTitle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function requirementBox<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, globalThis.Element | null, unknown>>;

View File

@@ -0,0 +1,21 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
/**
* Generates evenly spaced points along an elliptical arc connecting two points.
*
* @param x1 - x-coordinate of the start point of the arc
* @param y1 - y-coordinate of the start point of the arc
* @param x2 - x-coordinate of the end point of the arc
* @param y2 - y-coordinate of the end point of the arc
* @param rx - horizontal radius of the ellipse
* @param ry - vertical radius of the ellipse
* @param clockwise - direction of the arc; true for clockwise, false for counterclockwise
* @returns Array of points `{ x, y }` along the elliptical arc
*
* @throws Error if the given radii are too small to draw an arc between the points
*/
export declare function generateArcPoints(x1: number, y1: number, x2: number, y2: number, rx: number, ry: number, clockwise: boolean): {
x: number;
y: number;
}[];
export declare function roundedRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1 @@
export declare const createRoundedRectPathD: (x: number, y: number, totalWidth: number, totalHeight: number, radius: number) => string;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function shadedProcess<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function slopedRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function squareRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,4 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare const createStadiumPathD: (x: number, y: number, totalWidth: number, totalHeight: number) => string;
export declare function stadium<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function state<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function stateEnd<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { themeVariables } }: ShapeRenderOptions): import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,3 @@
import type { Node, ShapeRenderOptions } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function stateStart<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, { config: { themeVariables } }: ShapeRenderOptions): import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,4 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare const createSubroutinePathD: (x: number, y: number, width: number, height: number) => string;
export declare function subroutine<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function taggedRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function taggedWaveEdgedRectangle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function text<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,6 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare const createCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare const createOuterCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare const createInnerCylinderPathD: (x: number, y: number, width: number, height: number, rx: number, ry: number) => string;
export declare function tiltedCylinder<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function trapezoid<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function trapezoidalPentagon<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,3 @@
import type { Node } from '../../types.js';
import type { D3Selection } from '../../../types.js';
export declare function triangle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node): Promise<import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>>;

View File

@@ -0,0 +1,49 @@
import type { Node } from '../../types.js';
import type { D3Selection, Point } from '../../../types.js';
export declare const labelHelper: <T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node, _classes?: string) => Promise<{
shapeSvg: import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;
bbox: any;
halfPadding: number;
label: import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;
}>;
export declare const insertLabel: <T extends SVGGraphicsElement>(parent: D3Selection<T>, label: string, options: {
labelStyle?: string | undefined;
icon?: boolean | undefined;
img?: string | undefined;
useHtmlLabels?: boolean | undefined;
padding: number;
width?: number | undefined;
centerLabel?: boolean | undefined;
addSvgBackground?: boolean | undefined;
}) => Promise<{
shapeSvg: D3Selection<T>;
bbox: any;
halfPadding: number;
label: import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;
}>;
export declare const updateNodeBounds: <T extends SVGGraphicsElement>(node: Node, element: D3Selection<SVGGElement> | D3Selection<T>) => void;
/**
* @param parent - Parent element to append the polygon to
* @param w - Width of the polygon
* @param h - Height of the polygon
* @param points - Array of points to create the polygon
*/
export declare function insertPolygonShape(parent: D3Selection<SVGGElement>, w: number, h: number, points: Point[]): import("d3-selection").Selection<SVGPolygonElement, unknown, Element | null, unknown>;
export declare const getNodeClasses: (node: Node, extra?: string) => string;
export declare function createPathFromPoints(points: Point[]): string;
export declare function generateFullSineWavePoints(x1: number, y1: number, x2: number, y2: number, amplitude: number, numCycles: number): {
x: number;
y: number;
}[];
/**
* @param centerX - x-coordinate of center of circle
* @param centerY - y-coordinate of center of circle
* @param radius - radius of circle
* @param numPoints - total points required
* @param startAngle - angle where arc will start
* @param endAngle - angle where arc will end
*/
export declare function generateCirclePoints(centerX: number, centerY: number, radius: number, numPoints: number, startAngle: number, endAngle: number): {
x: number;
y: number;
}[];

Some files were not shown because too many files have changed in this diff Show More