This commit is contained in:
nik
2025-10-03 22:27:28 +03:00
parent 829fad0e17
commit 871cf7e792
16520 changed files with 2967597 additions and 3 deletions

View File

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

View File

@@ -0,0 +1,45 @@
import type { ArchitectureDiagramConfig } from '../../config.type.js';
import type { DiagramDB } from '../../diagram-api/types.js';
import type { D3Element } from '../../types.js';
import type { ArchitectureEdge, ArchitectureGroup, ArchitectureJunction, ArchitectureNode, ArchitectureService } from './architectureTypes.js';
export declare class ArchitectureDB implements DiagramDB {
private nodes;
private groups;
private edges;
private registeredIds;
private dataStructures?;
private elements;
constructor();
clear(): void;
addService({ id, icon, in: parent, title, iconText, }: Omit<ArchitectureService, 'edges'>): void;
getServices(): ArchitectureService[];
addJunction({ id, in: parent }: Omit<ArchitectureJunction, 'edges'>): void;
getJunctions(): ArchitectureJunction[];
getNodes(): ArchitectureNode[];
getNode(id: string): ArchitectureNode | null;
addGroup({ id, icon, in: parent, title }: ArchitectureGroup): void;
getGroups(): ArchitectureGroup[];
addEdge({ lhsId, rhsId, lhsDir, rhsDir, lhsInto, rhsInto, lhsGroup, rhsGroup, title, }: ArchitectureEdge): void;
getEdges(): ArchitectureEdge[];
/**
* Returns the current diagram's adjacency list, spatial map, & group alignments.
* If they have not been created, run the algorithms to generate them.
* @returns
*/
getDataStructures(): import("./architectureTypes.js").ArchitectureDataStructures;
setElementForId(id: string, element: D3Element): void;
getElementById(id: string): D3Element;
getConfig(): Required<ArchitectureDiagramConfig>;
getConfigField<T extends keyof ArchitectureDiagramConfig>(field: T): Required<ArchitectureDiagramConfig>[T];
setAccTitle: (txt: string) => void;
getAccTitle: () => string;
setDiagramTitle: (txt: string) => void;
getDiagramTitle: () => string;
getAccDescription: () => string;
setAccDescription: (txt: string) => void;
}
/**
* Typed wrapper for resolving an architecture diagram's config fields. Returns the default value if undefined
* @param field - the config field to access
* @returns
*/

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const architecture: ExternalDiagramDefinition;
export default architecture;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View File

@@ -0,0 +1,2 @@
import type { IconifyJSON } from '@iconify/types';
export declare const architectureIcons: IconifyJSON;

View File

@@ -0,0 +1,2 @@
import type { ParserDefinition } from '../../diagram-api/types.js';
export declare const parser: ParserDefinition;

View File

@@ -0,0 +1,5 @@
import type { DrawDefinition } from '../../diagram-api/types.js';
export declare const draw: DrawDefinition;
export declare const renderer: {
draw: DrawDefinition;
};

View File

@@ -0,0 +1,3 @@
import type { DiagramStylesProvider } from '../../diagram-api/types.js';
declare const getStyles: DiagramStylesProvider;
export default getStyles;

View File

@@ -0,0 +1,227 @@
import type { DiagramDBBase } from '../../diagram-api/types.js';
import type { ArchitectureDiagramConfig } from '../../config.type.js';
import type { D3Element } from '../../types.js';
import type cytoscape from 'cytoscape';
export type ArchitectureAlignment = 'vertical' | 'horizontal' | 'bend';
export type ArchitectureDirection = 'L' | 'R' | 'T' | 'B';
export type ArchitectureDirectionX = Extract<ArchitectureDirection, 'L' | 'R'>;
export type ArchitectureDirectionY = Extract<ArchitectureDirection, 'T' | 'B'>;
/**
* Contains LL, RR, TT, BB which are impossible connections
*/
export type InvalidArchitectureDirectionPair = `${ArchitectureDirection}${ArchitectureDirection}`;
export type ArchitectureDirectionPair = Exclude<InvalidArchitectureDirectionPair, 'LL' | 'RR' | 'TT' | 'BB'>;
export type ArchitectureDirectionPairXY = Exclude<InvalidArchitectureDirectionPair, 'LL' | 'RR' | 'TT' | 'BB' | 'LR' | 'RL' | 'TB' | 'BT'>;
export declare const ArchitectureDirectionName: {
readonly L: "left";
readonly R: "right";
readonly T: "top";
readonly B: "bottom";
};
export declare const ArchitectureDirectionArrow: {
readonly L: (scale: number) => string;
readonly R: (scale: number) => string;
readonly T: (scale: number) => string;
readonly B: (scale: number) => string;
};
export declare const ArchitectureDirectionArrowShift: {
readonly L: (orig: number, arrowSize: number) => number;
readonly R: (orig: number, _arrowSize: number) => number;
readonly T: (orig: number, arrowSize: number) => number;
readonly B: (orig: number, _arrowSize: number) => number;
};
export declare const getOppositeArchitectureDirection: (x: ArchitectureDirection) => ArchitectureDirection;
export declare const isArchitectureDirection: (x: unknown) => x is ArchitectureDirection;
export declare const isArchitectureDirectionX: (x: ArchitectureDirection) => x is ArchitectureDirectionX;
export declare const isArchitectureDirectionY: (x: ArchitectureDirection) => x is ArchitectureDirectionY;
export declare const isArchitectureDirectionXY: (a: ArchitectureDirection, b: ArchitectureDirection) => boolean;
export declare const isArchitecturePairXY: (pair: ArchitectureDirectionPair) => pair is ArchitectureDirectionPairXY;
/**
* Verifies that the architecture direction pair does not contain an invalid match (LL, RR, TT, BB)
* @param x - architecture direction pair which could potentially be invalid
* @returns true if the pair is not LL, RR, TT, or BB
*/
export declare const isValidArchitectureDirectionPair: (x: InvalidArchitectureDirectionPair) => x is ArchitectureDirectionPair;
export type ArchitectureDirectionPairMap = Partial<Record<ArchitectureDirectionPair, string>>;
/**
* Creates a pair of the directions of each side of an edge. This function should be used instead of manually creating it to ensure that the source is always the first character.
*
* Note: Undefined is returned when sourceDir and targetDir are the same. In theory this should never happen since the diagram parser throws an error if a user defines it as such.
* @param sourceDir - source direction
* @param targetDir - target direction
* @returns
*/
export declare const getArchitectureDirectionPair: (sourceDir: ArchitectureDirection, targetDir: ArchitectureDirection) => ArchitectureDirectionPair | undefined;
/**
* Given an x,y position for an arrow and the direction of the edge it belongs to, return a factor for slightly shifting the edge
* @param param0 - [x, y] coordinate pair
* @param pair - architecture direction pair
* @returns a new [x, y] coordinate pair
*/
export declare const shiftPositionByArchitectureDirectionPair: ([x, y]: number[], pair: ArchitectureDirectionPair) => number[];
/**
* Given the directional pair of an XY edge, get the scale factors necessary to shift the coordinates inwards towards the edge
* @param pair - XY pair of an edge
* @returns - number[] containing [+/- 1, +/- 1]
*/
export declare const getArchitectureDirectionXYFactors: (pair: ArchitectureDirectionPairXY) => number[];
export declare const getArchitectureDirectionAlignment: (a: ArchitectureDirection, b: ArchitectureDirection) => ArchitectureAlignment;
export interface ArchitectureStyleOptions {
archEdgeColor: string;
archEdgeArrowColor: string;
archEdgeWidth: string;
archGroupBorderColor: string;
archGroupBorderWidth: string;
}
export interface ArchitectureService {
id: string;
type: 'service';
edges: ArchitectureEdge[];
icon?: string;
iconText?: string;
title?: string;
in?: string;
width?: number;
height?: number;
}
export interface ArchitectureJunction {
id: string;
type: 'junction';
edges: ArchitectureEdge[];
in?: string;
width?: number;
height?: number;
}
export type ArchitectureNode = ArchitectureService | ArchitectureJunction;
export declare const isArchitectureService: (x: ArchitectureNode) => x is ArchitectureService;
export declare const isArchitectureJunction: (x: ArchitectureNode) => x is ArchitectureJunction;
export interface ArchitectureGroup {
id: string;
icon?: string;
title?: string;
in?: string;
}
export interface ArchitectureEdge<DT = ArchitectureDirection> {
lhsId: string;
lhsDir: DT;
lhsInto?: boolean;
lhsGroup?: boolean;
rhsId: string;
rhsDir: DT;
rhsInto?: boolean;
rhsGroup?: boolean;
title?: string;
}
export interface ArchitectureDB extends DiagramDBBase<ArchitectureDiagramConfig> {
clear: () => void;
addService: (service: Omit<ArchitectureService, 'edges'>) => void;
getServices: () => ArchitectureService[];
addJunction: (service: Omit<ArchitectureJunction, 'edges'>) => void;
getJunctions: () => ArchitectureJunction[];
getNodes: () => ArchitectureNode[];
getNode: (id: string) => ArchitectureNode | null;
addGroup: (group: ArchitectureGroup) => void;
getGroups: () => ArchitectureGroup[];
addEdge: (edge: ArchitectureEdge) => void;
getEdges: () => ArchitectureEdge[];
setElementForId: (id: string, element: D3Element) => void;
getElementById: (id: string) => D3Element;
getDataStructures: () => ArchitectureDataStructures;
}
export type ArchitectureAdjacencyList = Record<string, ArchitectureDirectionPairMap>;
export type ArchitectureSpatialMap = Record<string, number[]>;
/**
* Maps the direction that groups connect from.
*
* **Outer key**: ID of group A
*
* **Inner key**: ID of group B
*
* **Value**: 'vertical' or 'horizontal'
*
* Note: tmp[groupA][groupB] == tmp[groupB][groupA]
*/
export type ArchitectureGroupAlignments = Record<string, Record<string, Exclude<ArchitectureAlignment, 'bend'>>>;
export interface ArchitectureDataStructures {
adjList: ArchitectureAdjacencyList;
spatialMaps: ArchitectureSpatialMap[];
groupAlignments: ArchitectureGroupAlignments;
}
export interface ArchitectureState extends Record<string, unknown> {
nodes: Record<string, ArchitectureNode>;
groups: Record<string, ArchitectureGroup>;
edges: ArchitectureEdge[];
registeredIds: Record<string, 'node' | 'group'>;
dataStructures?: ArchitectureDataStructures;
elements: Record<string, D3Element>;
config: ArchitectureDiagramConfig;
}
export interface EdgeSingularData {
id: string;
label?: string;
source: string;
sourceDir: ArchitectureDirection;
sourceArrow?: boolean;
sourceGroup?: boolean;
target: string;
targetDir: ArchitectureDirection;
targetArrow?: boolean;
targetGroup?: boolean;
[key: string]: any;
}
export declare const edgeData: (edge: cytoscape.EdgeSingular) => EdgeSingularData;
export interface EdgeSingular extends cytoscape.EdgeSingular {
_private: {
bodyBounds: unknown;
rscratch: {
startX: number;
startY: number;
midX: number;
midY: number;
endX: number;
endY: number;
};
};
data(): EdgeSingularData;
data<T extends keyof EdgeSingularData>(key: T): EdgeSingularData[T];
}
export type NodeSingularData = {
type: 'service';
id: string;
icon?: string;
label?: string;
parent?: string;
width: number;
height: number;
[key: string]: any;
} | {
type: 'junction';
id: string;
parent?: string;
width: number;
height: number;
[key: string]: any;
} | {
type: 'group';
id: string;
icon?: string;
label?: string;
parent?: string;
[key: string]: any;
};
export declare const nodeData: (node: cytoscape.NodeSingular) => NodeSingularData;
export interface NodeSingular extends cytoscape.NodeSingular {
_private: {
bodyBounds: {
h: number;
w: number;
x1: number;
x2: number;
y1: number;
y2: number;
};
children: cytoscape.NodeSingular[];
};
data(): NodeSingularData;
data<T extends keyof NodeSingularData>(key: T): NodeSingularData[T];
}

View File

@@ -0,0 +1,8 @@
import type cytoscape from 'cytoscape';
import type { D3Element } from '../../types.js';
import type { ArchitectureDB } from './architectureDb.js';
import { type ArchitectureJunction, type ArchitectureService } from './architectureTypes.js';
export declare const drawEdges: (edgesEl: D3Element, cy: cytoscape.Core, db: ArchitectureDB) => Promise<void>;
export declare const drawGroups: (groupsEl: D3Element, cy: cytoscape.Core, db: ArchitectureDB) => Promise<void>;
export declare const drawServices: (db: ArchitectureDB, elem: D3Element, services: ArchitectureService[]) => Promise<number>;
export declare const drawJunctions: (db: ArchitectureDB, elem: D3Element, junctions: ArchitectureJunction[]) => void;

View File

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

57
node_modules/mermaid/dist/diagrams/block/blockDB.d.ts generated vendored Normal file
View File

@@ -0,0 +1,57 @@
import type { DiagramDB } from '../../diagram-api/types.js';
import type { Block, ClassDef } from './blockTypes.js';
/**
* Called when the parser comes across a (style) class definition
* @example classDef my-style fill:#f96;
*
* @param id - the id of this (style) class
* @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
*/
export declare const addStyleClass: (id: string, styleAttributes?: string) => void;
/**
* Called when the parser comes across a style definition
* @example style my-block-id fill:#f96;
*
* @param id - the id of the block to style
* @param styles - the string with 1 or more style attributes (each separated by a comma)
*/
export declare const addStyle2Node: (id: string, styles?: string) => void;
/**
* Add a CSS/style class to the block with the given id.
* If the block isn't already in the list of known blocks, add it.
* Might be called by parser when a CSS/style class should be applied to a block
*
* @param itemIds - The id or a list of ids of the item(s) to apply the css class to
* @param cssClassName - CSS class name
*/
export declare const setCssClass: (itemIds: string, cssClassName: string) => void;
export declare function typeStr2Type(typeStr: string): "circle" | "stadium" | "subroutine" | "cylinder" | "diamond" | "hexagon" | "lean_right" | "lean_left" | "trapezoid" | "inv_trapezoid" | "doublecircle" | "rect_left_inv_arrow" | "square" | "round" | "na" | "block_arrow";
export declare function edgeTypeStr2Type(typeStr: string): string;
export declare function edgeStrToEdgeData(typeStr: string): string;
export declare const generateId: () => string;
/**
* Return all of the style classes
*/
export declare const getClasses: () => Map<string, ClassDef>;
declare const db: {
readonly getConfig: () => import("./blockTypes.js").BlockConfig | undefined;
readonly typeStr2Type: typeof typeStr2Type;
readonly edgeTypeStr2Type: typeof edgeTypeStr2Type;
readonly edgeStrToEdgeData: typeof edgeStrToEdgeData;
readonly getLogger: () => Record<import("../../logger.js").LogLevel, {
(...data: any[]): void;
(message?: any, ...optionalParams: any[]): void;
}>;
readonly getBlocksFlat: () => Block[];
readonly getBlocks: () => Block[];
readonly getEdges: () => Block[];
readonly setHierarchy: (block: Block[]) => void;
readonly getBlock: (id: string) => Block | undefined;
readonly setBlock: (block: Block) => void;
readonly getColumns: (blockId: string) => number;
readonly getClasses: () => Map<string, ClassDef>;
readonly clear: () => void;
readonly generateId: () => string;
};
export type BlockDB = typeof db & DiagramDB;
export default db;

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View File

@@ -0,0 +1,8 @@
import type { Diagram } from '../../Diagram.js';
export declare const getClasses: (text: any, diagObj: any) => any;
export declare const draw: (text: string, id: string, _version: string, diagObj: Diagram) => Promise<void>;
declare const _default: {
draw: (text: string, id: string, _version: string, diagObj: Diagram) => Promise<void>;
getClasses: (text: any, diagObj: any) => any;
};
export default _default;

View File

@@ -0,0 +1,36 @@
export type { BlockDiagramConfig as BlockConfig } from '../../config.type.js';
export type BlockType = 'na' | 'column-setting' | 'edge' | 'round' | 'block_arrow' | 'space' | 'square' | 'diamond' | 'hexagon' | 'odd' | 'lean_right' | 'lean_left' | 'trapezoid' | 'inv_trapezoid' | 'rect_left_inv_arrow' | 'odd_right' | 'circle' | 'ellipse' | 'stadium' | 'subroutine' | 'cylinder' | 'group' | 'doublecircle' | 'classDef' | 'applyClass' | 'applyStyles' | 'composite';
export interface Block {
start?: string;
end?: string;
arrowTypeEnd?: string;
arrowTypeStart?: string;
width?: number;
id: string;
label?: string;
intersect?: any;
parent?: Block;
type?: BlockType;
children: Block[];
size?: {
width: number;
height: number;
x: number;
y: number;
};
node?: any;
columns?: number;
classes?: string[];
directions?: string[];
css?: string;
styleClass?: string;
styles?: string[];
stylesStr?: string;
widthInColumns?: number;
}
export interface ClassDef {
id: string;
textStyles: string[];
styles: string[];
}
export type Direction = 'up' | 'down' | 'left' | 'right' | 'x' | 'y';

View File

@@ -0,0 +1 @@
export declare const prepareTextForParsing: (text: string) => string;

13
node_modules/mermaid/dist/diagrams/block/layout.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
import type { BlockDB } from './blockDB.js';
interface BlockPosition {
px: number;
py: number;
}
export declare function calculateBlockPosition(columns: number, position: number): BlockPosition;
export declare function layout(db: BlockDB): {
x: number;
y: number;
width: number;
height: number;
} | undefined;
export {};

View File

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

View File

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

View File

@@ -0,0 +1,10 @@
import type { BlockDB } from './blockDB.js';
import type { Block } from './blockTypes.js';
declare function calculateBlockSize(elem: d3.Selection<SVGGElement, unknown, HTMLElement, any>, block: any, db: any): Promise<void>;
type ActionFun = typeof calculateBlockSize;
export declare function insertBlockPositioned(elem: any, block: Block, db: any): Promise<void>;
export declare function performOperations(elem: d3.Selection<SVGGElement, unknown, HTMLElement, any>, blocks: Block[], db: BlockDB, operation: ActionFun): Promise<void>;
export declare function calculateBlockSizes(elem: any, blocks: Block[], db: BlockDB): Promise<void>;
export declare function insertBlocks(elem: d3.Selection<SVGGElement, unknown, HTMLElement, any>, blocks: Block[], db: BlockDB): Promise<void>;
export declare function insertEdges(elem: any, edges: Block[], blocks: Block[], db: BlockDB, id: string): Promise<void>;
export {};

18
node_modules/mermaid/dist/diagrams/block/styles.d.ts generated vendored Normal file
View File

@@ -0,0 +1,18 @@
/** Returns the styles given options */
export interface BlockChartStyleOptions {
arrowheadColor: string;
border2: string;
clusterBkg: string;
clusterBorder: string;
edgeLabelBackground: string;
fontFamily: string;
lineColor: string;
mainBkg: string;
nodeBorder: string;
nodeTextColor: string;
tertiaryColor: string;
textColor: string;
titleColor: string;
}
declare const getStyles: (options: BlockChartStyleOptions) => string;
export default getStyles;

127
node_modules/mermaid/dist/diagrams/c4/c4Db.d.ts generated vendored Normal file
View File

@@ -0,0 +1,127 @@
export function getC4Type(): any;
export function setC4Type(c4TypeParam: any): void;
export function addRel(type: any, from: any, to: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void;
export function addPersonOrSystem(typeC4Shape: any, alias: any, label: any, descr: any, sprite: any, tags: any, link: any): void;
export function addContainer(typeC4Shape: any, alias: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void;
export function addComponent(typeC4Shape: any, alias: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void;
export function addPersonOrSystemBoundary(alias: any, label: any, type: any, tags: any, link: any): void;
export function addContainerBoundary(alias: any, label: any, type: any, tags: any, link: any): void;
export function addDeploymentNode(nodeType: any, alias: any, label: any, type: any, descr: any, sprite: any, tags: any, link: any): void;
export function popBoundaryParseStack(): void;
export function updateElStyle(typeC4Shape: any, elementName: any, bgColor: any, fontColor: any, borderColor: any, shadowing: any, shape: any, sprite: any, techn: any, legendText: any, legendSprite: any): void;
export function updateRelStyle(typeC4Shape: any, from: any, to: any, textColor: any, lineColor: any, offsetX: any, offsetY: any): void;
export function updateLayoutConfig(typeC4Shape: any, c4ShapeInRowParam: any, c4BoundaryInRowParam: any): void;
export function getC4ShapeInRow(): number;
export function getC4BoundaryInRow(): number;
export function getCurrentBoundaryParse(): string;
export function getParentBoundaryParse(): string;
export function getC4ShapeArray(parentBoundary: any): any[];
export function getC4Shape(alias: any): any;
export function getC4ShapeKeys(parentBoundary: any): string[];
export function getBoundaries(parentBoundary: any): {
alias: string;
label: {
text: string;
};
type: {
text: string;
};
tags: null;
link: null;
parentBoundary: string;
}[];
export function getBoundarys(parentBoundary: any): {
alias: string;
label: {
text: string;
};
type: {
text: string;
};
tags: null;
link: null;
parentBoundary: string;
}[];
export function getRels(): any[];
export function getTitle(): string;
export function setWrap(wrapSetting: any): void;
export function autoWrap(): boolean;
export function clear(): void;
export namespace LINETYPE {
let SOLID: number;
let DOTTED: number;
let NOTE: number;
let SOLID_CROSS: number;
let DOTTED_CROSS: number;
let SOLID_OPEN: number;
let DOTTED_OPEN: number;
let LOOP_START: number;
let LOOP_END: number;
let ALT_START: number;
let ALT_ELSE: number;
let ALT_END: number;
let OPT_START: number;
let OPT_END: number;
let ACTIVE_START: number;
let ACTIVE_END: number;
let PAR_START: number;
let PAR_AND: number;
let PAR_END: number;
let RECT_START: number;
let RECT_END: number;
let SOLID_POINT: number;
let DOTTED_POINT: number;
}
export namespace ARROWTYPE {
let FILLED: number;
let OPEN: number;
}
export namespace PLACEMENT {
let LEFTOF: number;
let RIGHTOF: number;
let OVER: number;
}
export function setTitle(txt: any): void;
declare namespace _default {
export { addPersonOrSystem };
export { addPersonOrSystemBoundary };
export { addContainer };
export { addContainerBoundary };
export { addComponent };
export { addDeploymentNode };
export { popBoundaryParseStack };
export { addRel };
export { updateElStyle };
export { updateRelStyle };
export { updateLayoutConfig };
export { autoWrap };
export { setWrap };
export { getC4ShapeArray };
export { getC4Shape };
export { getC4ShapeKeys };
export { getBoundaries };
export { getBoundarys };
export { getCurrentBoundaryParse };
export { getParentBoundaryParse };
export { getRels };
export { getTitle };
export { getC4Type };
export { getC4ShapeInRow };
export { getC4BoundaryInRow };
export { setAccTitle };
export { getAccTitle };
export { getAccDescription };
export { setAccDescription };
export function getConfig(): import("../../config.type.js").C4DiagramConfig | undefined;
export { clear };
export { LINETYPE };
export { ARROWTYPE };
export { PLACEMENT };
export { setTitle };
export { setC4Type };
}
export default _default;
import { setAccTitle } from '../common/commonDb.js';
import { getAccTitle } from '../common/commonDb.js';
import { getAccDescription } from '../common/commonDb.js';
import { setAccDescription } from '../common/commonDb.js';

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

2
node_modules/mermaid/dist/diagrams/c4/c4Diagram.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

12
node_modules/mermaid/dist/diagrams/c4/c4Renderer.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
export function setConf(cnf: any): void;
export function drawBoundary(diagram: any, boundary: any, bounds: any): void;
export function drawC4ShapeArray(currentBounds: any, diagram: any, c4ShapeArray: any, c4ShapeKeys: any): void;
export function drawRels(diagram: any, rels: any, getC4ShapeObj: any, diagObj: any): void;
export function draw(_text: any, id: any, _version: any, diagObj: any): void;
declare namespace _default {
export { drawC4ShapeArray as drawPersonOrSystemArray };
export { drawBoundary };
export { setConf };
export { draw };
}
export default _default;

2
node_modules/mermaid/dist/diagrams/c4/styles.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export default getStyles;
declare function getStyles(options: any): string;

36
node_modules/mermaid/dist/diagrams/c4/svgDraw.d.ts generated vendored Normal file
View File

@@ -0,0 +1,36 @@
export function drawRect(elem: any, rectData: any): import("../common/commonTypes.js").D3RectElement;
export function drawImage(elem: any, width: any, height: any, x: any, y: any, link: any): void;
export function drawRels(elem: any, rels: any, conf: any): void;
export function drawC4Shape(elem: any, c4Shape: any, conf: any): any;
export function insertDatabaseIcon(elem: any): void;
export function insertComputerIcon(elem: any): void;
export function insertClockIcon(elem: any): void;
export function insertArrowHead(elem: any): void;
export function insertArrowEnd(elem: any): void;
export function insertArrowFilledHead(elem: any): void;
export function insertDynamicNumber(elem: any): void;
export function insertArrowCrossHead(elem: any): void;
declare namespace _default {
export { drawRect };
export { drawBoundary };
export { drawC4Shape };
export { drawRels };
export { drawImage };
export { insertArrowHead };
export { insertArrowEnd };
export { insertArrowFilledHead };
export { insertDynamicNumber };
export { insertArrowCrossHead };
export { insertDatabaseIcon };
export { insertComputerIcon };
export { insertClockIcon };
}
export default _default;
/**
* Draws a boundary in the diagram
*
* @param {any} elem - The diagram we'll draw to.
* @param {any} boundary - The boundary to draw.
* @param {any} conf - DrawText implementation discriminator object
*/
declare function drawBoundary(elem: any, boundary: any, conf: any): void;

147
node_modules/mermaid/dist/diagrams/class/classDb.d.ts generated vendored Normal file
View File

@@ -0,0 +1,147 @@
import type { ClassRelation, ClassNode, ClassNote, ClassMap, NamespaceMap, NamespaceNode } from './classTypes.js';
import type { Node, Edge } from '../../rendering-util/types.js';
import type { DiagramDB } from '../../diagram-api/types.js';
export declare class ClassDB implements DiagramDB {
private relations;
private classes;
private readonly styleClasses;
private notes;
private interfaces;
private namespaces;
private namespaceCounter;
private functions;
constructor();
private splitClassNameAndType;
setClassLabel(_id: string, label: string): void;
/**
* Function called by parser when a node definition has been found.
*
* @param id - ID of the class to add
* @public
*/
addClass(_id: string): void;
private addInterface;
/**
* Function to lookup domId from id in the graph definition.
*
* @param id - class ID to lookup
* @public
*/
lookUpDomId(_id: string): string;
clear(): void;
getClass(id: string): ClassNode;
getClasses(): ClassMap;
getRelations(): ClassRelation[];
getNotes(): ClassNote[];
addRelation(classRelation: ClassRelation): void;
/**
* Adds an annotation to the specified class Annotations mark special properties of the given type
* (like 'interface' or 'service')
*
* @param className - The class name
* @param annotation - The name of the annotation without any brackets
* @public
*/
addAnnotation(className: string, annotation: string): void;
/**
* Adds a member to the specified class
*
* @param className - The class name
* @param member - The full name of the member. If the member is enclosed in `<<brackets>>` it is
* treated as an annotation If the member is ending with a closing bracket ) it is treated as a
* method Otherwise the member will be treated as a normal property
* @public
*/
addMember(className: string, member: string): void;
addMembers(className: string, members: string[]): void;
addNote(text: string, className: string): void;
cleanupLabel(label: string): string;
/**
* Called by parser when assigning cssClass to a class
*
* @param ids - Comma separated list of ids
* @param className - Class to add
*/
setCssClass(ids: string, className: string): void;
defineClass(ids: string[], style: string[]): void;
/**
* Called by parser when a tooltip is found, e.g. a clickable element.
*
* @param ids - Comma separated list of ids
* @param tooltip - Tooltip to add
*/
setTooltip(ids: string, tooltip?: string): void;
getTooltip(id: string, namespace?: string): string | undefined;
/**
* Called by parser when a link is found. Adds the URL to the vertex data.
*
* @param ids - Comma separated list of ids
* @param linkStr - URL to create a link for
* @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
*/
setLink(ids: string, linkStr: string, target: string): void;
/**
* Called by parser when a click definition is found. Registers an event handler.
*
* @param ids - Comma separated list of ids
* @param functionName - Function to be called on click
* @param functionArgs - Function args the function should be called with
*/
setClickEvent(ids: string, functionName: string, functionArgs: string): void;
private setClickFunc;
bindFunctions(element: Element): void;
readonly lineType: {
LINE: number;
DOTTED_LINE: number;
};
readonly relationType: {
AGGREGATION: number;
EXTENSION: number;
COMPOSITION: number;
DEPENDENCY: number;
LOLLIPOP: number;
};
private readonly setupToolTips;
private direction;
getDirection(): string;
setDirection(dir: string): void;
/**
* Function called by parser when a namespace definition has been found.
*
* @param id - ID of the namespace to add
* @public
*/
addNamespace(id: string): void;
getNamespace(name: string): NamespaceNode;
getNamespaces(): NamespaceMap;
/**
* Function called by parser when a namespace definition has been found.
*
* @param id - ID of the namespace to add
* @param classNames - IDs of the class to add
* @public
*/
addClassesToNamespace(id: string, classNames: string[]): void;
setCssStyle(id: string, styles: string[]): void;
/**
* Gets the arrow marker for a type index
*
* @param type - The type to look for
* @returns The arrow marker
*/
private getArrowMarker;
getData(): {
nodes: Node[];
edges: Edge[];
other: {};
config: import("../../config.type.js").MermaidConfig;
direction: string;
};
setAccTitle: (txt: string) => void;
getAccTitle: () => string;
setAccDescription: (txt: string) => void;
getAccDescription: () => string;
setDiagramTitle: (txt: string) => void;
getDiagramTitle: () => string;
getConfig: () => import("../../config.type.js").ClassDiagramConfig | undefined;
}

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View File

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

View File

@@ -0,0 +1,57 @@
import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';
import type { ClassRelation, ClassNote, ClassMap, NamespaceMap } from './classTypes.js';
/**
* Function that adds the vertices found during parsing to the graph to be rendered.
*
* @param namespaces - Object containing the vertices.
* @param g - The graph that is to be drawn.
* @param _id - id of the graph
* @param diagObj - The diagram object
*/
export declare const addNamespaces: (namespaces: NamespaceMap, g: graphlib.Graph, _id: string, diagObj: any) => void;
/**
* Function that adds the vertices found during parsing to the graph to be rendered.
*
* @param classes - Object containing the vertices.
* @param g - The graph that is to be drawn.
* @param _id - id of the graph
* @param diagObj - The diagram object
* @param parent - id of the parent namespace, if it exists
*/
export declare const addClasses: (classes: ClassMap, g: graphlib.Graph, _id: string, diagObj: any, parent?: string) => void;
/**
* Function that adds the additional vertices (notes) found during parsing to the graph to be rendered.
*
* @param notes - Object containing the additional vertices (notes).
* @param g - The graph that is to be drawn.
* @param startEdgeId - starting index for note edge
* @param classes - Classes
*/
export declare const addNotes: (notes: ClassNote[], g: graphlib.Graph, startEdgeId: number, classes: ClassMap) => void;
/**
* Add edges to graph based on parsed graph definition
*
* @param relations -
* @param g - The graph object
*/
export declare const addRelations: (relations: ClassRelation[], g: graphlib.Graph) => void;
/**
* Merges the value of `conf` with the passed `cnf`
*
* @param cnf - Config to merge
*/
export declare const setConf: (cnf: any) => void;
/**
* Draws a class diagram in the tag with id: id based on the definition in text.
*
* @param text -
* @param id -
* @param _version -
* @param diagObj -
*/
export declare const draw: (text: string, id: string, _version: string, diagObj: any) => Promise<void>;
declare const _default: {
setConf: (cnf: any) => void;
draw: (text: string, id: string, _version: string, diagObj: any) => Promise<void>;
};
export default _default;

View File

@@ -0,0 +1,18 @@
import type { DiagramStyleClassDef } from '../../diagram-api/types.js';
/**
* Get the direction from the statement items.
* Look through all of the documents (docs) in the parsedItems
* Because is a _document_ direction, the default direction is not necessarily the same as the overall default _diagram_ direction.
* @param parsedItem - the parsed statement item to look through
* @param defaultDir - the direction to use if none is found
* @returns The direction to use
*/
export declare const getDir: (parsedItem: any, defaultDir?: string) => string;
export declare const getClasses: (text: string, diagramObj: any) => Map<string, DiagramStyleClassDef>;
export declare const draw: (text: string, id: string, _version: string, diag: any) => Promise<void>;
declare const _default: {
getClasses: (text: string, diagramObj: any) => Map<string, DiagramStyleClassDef>;
draw: (text: string, id: string, _version: string, diag: any) => Promise<void>;
getDir: (parsedItem: any, defaultDir?: string) => string;
};
export default _default;

View File

@@ -0,0 +1,5 @@
export function draw(text: string, id: string, _version: any, diagObj: any): void;
declare namespace _default {
export { draw };
}
export default _default;

View File

@@ -0,0 +1,92 @@
export interface ClassNode {
id: string;
type: string;
label: string;
shape: string;
text: string;
cssClasses: string;
methods: ClassMember[];
members: ClassMember[];
annotations: string[];
domId: string;
styles: string[];
parent?: string;
link?: string;
linkTarget?: string;
haveCallback?: boolean;
tooltip?: string;
look?: string;
}
export type Visibility = '#' | '+' | '~' | '-' | '';
export declare const visibilityValues: string[];
/**
* Parses and stores class diagram member variables/methods.
*
*/
export declare class ClassMember {
id: string;
cssStyle: string;
memberType: 'method' | 'attribute';
visibility: Visibility;
text: string;
/**
* denote if static or to determine which css class to apply to the node
* @defaultValue ''
*/
classifier: string;
/**
* parameters for method
* @defaultValue ''
*/
parameters: string;
/**
* return type for method
* @defaultValue ''
*/
returnType: string;
constructor(input: string, memberType: 'method' | 'attribute');
getDisplayDetails(): {
displayText: string;
cssStyle: string;
};
parseMember(input: string): void;
parseClassifier(): "" | "font-style:italic;" | "text-decoration:underline;";
}
export interface ClassNote {
id: string;
class: string;
text: string;
}
export interface ClassRelation {
id1: string;
id2: string;
relationTitle1: string;
relationTitle2: string;
type: string;
title: string;
text: string;
style: string[];
relation: {
type1: number;
type2: number;
lineType: number;
};
}
export interface Interface {
id: string;
label: string;
classId: string;
}
export interface NamespaceNode {
id: string;
domId: string;
classes: ClassMap;
children: NamespaceMap;
}
export interface StyleClass {
id: string;
styles: string[];
textStyles: string[];
}
export type ClassMap = Map<string, ClassNode>;
export type NamespaceMap = Map<string, NamespaceNode>;

View File

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

View File

@@ -0,0 +1,6 @@
import type { MermaidConfig } from '../../config.type.js';
import type { D3Selection } from '../../types.js';
export declare function textHelper<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: any, config: MermaidConfig, useHtmlLabels: boolean, GAP?: number): Promise<{
shapeSvg: import("d3-selection").Selection<SVGGElement, unknown, Element | null, unknown>;
bbox: DOMRect;
}>;

2
node_modules/mermaid/dist/diagrams/class/styles.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export default getStyles;
declare function getStyles(options: any): string;

25
node_modules/mermaid/dist/diagrams/class/svgDraw.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
export function drawEdge(elem: any, path: any, relation: any, conf: any, diagObj: any): void;
export function drawClass(elem: SVGSVGElement, classDef: any, conf: any, diagObj: any): {
id: any;
label: any;
width: number;
height: number;
};
export function getClassTitleString(classDef: any): any;
export function drawNote(elem: SVGSVGElement, note: {
id: string;
text: string;
class: string;
}, conf: any, _diagObj: any): {
id: string;
text: string;
width: number;
height: number;
};
declare namespace _default {
export { getClassTitleString };
export { drawClass };
export { drawEdge };
export { drawNote };
}
export default _default;

117
node_modules/mermaid/dist/diagrams/common/common.d.ts generated vendored Normal file
View File

@@ -0,0 +1,117 @@
import type { MermaidConfig } from '../../config.type.js';
export declare const lineBreakRegex: RegExp;
/**
* Gets the rows of lines in a string
*
* @param s - The string to check the lines for
* @returns The rows in that string
*/
export declare const getRows: (s?: string) => string[];
/**
* Removes script tags from a text
*
* @param txt - The text to sanitize
* @returns The safer text
*/
export declare const removeScript: (txt: string) => string;
export declare const sanitizeText: (text: string, config: MermaidConfig) => string;
export declare const sanitizeTextOrArray: (a: string | string[] | string[][], config: MermaidConfig) => string | string[];
/**
* Whether or not a text has any line breaks
*
* @param text - The text to test
* @returns Whether or not the text has breaks
*/
export declare const hasBreaks: (text: string) => boolean;
/**
* Splits on <br> tags
*
* @param text - Text to split
* @returns List of lines as strings
*/
export declare const splitBreaks: (text: string) => string[];
/**
* Gets the current URL
*
* @param useAbsolute - Whether to return the absolute URL or not
* @returns The current URL
*/
export declare const getUrl: (useAbsolute: boolean) => string;
/**
* Converts a string/boolean into a boolean
*
* @param val - String or boolean to convert
* @returns The result from the input
*/
export declare const evaluate: (val?: string | boolean) => boolean;
/**
* Wrapper around Math.max which removes non-numeric values
* Returns the larger of a set of supplied numeric expressions.
* @param values - Numeric expressions to be evaluated
* @returns The smaller value
*/
export declare const getMax: (...values: number[]) => number;
/**
* Wrapper around Math.min which removes non-numeric values
* Returns the smaller of a set of supplied numeric expressions.
* @param values - Numeric expressions to be evaluated
* @returns The smaller value
*/
export declare const getMin: (...values: number[]) => number;
/**
* Makes generics in typescript syntax
*
* @example
* Array of array of strings in typescript syntax
*
* ```js
* // returns "Array<Array<string>>"
* parseGenericTypes('Array~Array~string~~');
* ```
* @param text - The text to convert
* @returns The converted string
*/
export declare const parseGenericTypes: (input: string) => string;
export declare const countOccurrence: (string: string, substring: string) => number;
export declare const isMathMLSupported: () => boolean;
export declare const katexRegex: RegExp;
/**
* Whether or not a text has KaTeX delimiters
*
* @param text - The text to test
* @returns Whether or not the text has KaTeX delimiters
*/
export declare const hasKatex: (text: string) => boolean;
/**
* Computes the minimum dimensions needed to display a div containing MathML
*
* @param text - The text to test
* @param config - Configuration for Mermaid
* @returns Object containing \{width, height\}
*/
export declare const calculateMathMLDimensions: (text: string, config: MermaidConfig) => Promise<{
width: number;
height: number;
}>;
/**
* Attempts to render and return the KaTeX portion of a string with MathML
*
* @param text - The text to test
* @param config - Configuration for Mermaid
* @returns String containing MathML if KaTeX is supported, or an error message if it is not and stylesheets aren't present
*/
export declare const renderKatexSanitized: (text: string, config: MermaidConfig) => Promise<string>;
declare const _default: {
getRows: (s?: string) => string[];
sanitizeText: (text: string, config: MermaidConfig) => string;
sanitizeTextOrArray: (a: string | string[] | string[][], config: MermaidConfig) => string | string[];
hasBreaks: (text: string) => boolean;
splitBreaks: (text: string) => string[];
lineBreakRegex: RegExp;
removeScript: (txt: string) => string;
getUrl: (useAbsolute: boolean) => string;
evaluate: (val?: string | boolean) => boolean;
getMax: (...values: number[]) => number;
getMin: (...values: number[]) => number;
};
export default _default;

View File

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

View File

@@ -0,0 +1,7 @@
export declare const clear: () => void;
export declare const setAccTitle: (txt: string) => void;
export declare const getAccTitle: () => string;
export declare const setAccDescription: (txt: string) => void;
export declare const getAccDescription: () => string;
export declare const setDiagramTitle: (txt: string) => void;
export declare const getDiagramTitle: () => string;

View File

@@ -0,0 +1,51 @@
export interface RectData {
x: number;
y: number;
fill: string;
width: number;
height: number;
stroke: string;
class?: string;
color?: string;
rx?: number;
ry?: number;
attrs?: Record<string, string | number>;
anchor?: string;
name?: string;
}
export interface Bound {
startx: number;
stopx: number;
starty: number;
stopy: number;
fill: string;
stroke: string;
}
export interface TextData {
x: number;
y: number;
anchor: string;
text: string;
textMargin: number;
class?: string;
}
export interface TextObject {
x: number;
y: number;
width: number;
height: number;
fill?: string;
anchor?: string;
'text-anchor': string;
style: string;
textMargin: number;
rx: number;
ry: number;
tspan: boolean;
valign?: string;
}
export type D3RectElement = d3.Selection<SVGRectElement, unknown, Element | null, unknown>;
export type D3UseElement = d3.Selection<SVGUseElement, unknown, Element | null, unknown>;
export type D3ImageElement = d3.Selection<SVGImageElement, unknown, Element | null, unknown>;
export type D3TextElement = d3.Selection<SVGTextElement, unknown, Element | null, unknown>;
export type D3TSpanElement = d3.Selection<SVGTSpanElement, unknown, Element | null, unknown>;

View File

@@ -0,0 +1,3 @@
import type { DiagramAST } from '@mermaid-js/parser';
import type { DiagramDB } from '../../diagram-api/types.js';
export declare function populateCommonDb(ast: DiagramAST, db: DiagramDB): void;

View File

@@ -0,0 +1,15 @@
import type { SVG, SVGGroup } from '../../diagram-api/types.js';
import type { Bound, D3RectElement, D3TextElement, RectData, TextData, TextObject } from './commonTypes.js';
export declare const drawRect: (element: SVG | SVGGroup, rectData: RectData) => D3RectElement;
/**
* Draws a background rectangle
*
* @param element - Diagram (reference for bounds)
* @param bounds - Shape of the rectangle
*/
export declare const drawBackgroundRect: (element: SVG | SVGGroup, bounds: Bound) => void;
export declare const drawText: (element: SVG | SVGGroup, textData: TextData) => D3TextElement;
export declare const drawImage: (elem: SVG | SVGGroup, x: number, y: number, link: string) => void;
export declare const drawEmbeddedImage: (element: SVG | SVGGroup, x: number, y: number, link: string) => void;
export declare const getNoteRect: () => RectData;
export declare const getTextObj: () => TextObject;

53
node_modules/mermaid/dist/diagrams/er/erDb.d.ts generated vendored Normal file
View File

@@ -0,0 +1,53 @@
import type { Edge, Node } from '../../rendering-util/types.js';
import type { EntityNode, Attribute, Relationship, EntityClass, RelSpec } from './erTypes.js';
import type { DiagramDB } from '../../diagram-api/types.js';
export declare class ErDB implements DiagramDB {
private entities;
private relationships;
private classes;
private direction;
private Cardinality;
private Identification;
constructor();
/**
* Add entity
* @param name - The name of the entity
* @param alias - The alias of the entity
*/
addEntity(name: string, alias?: string): EntityNode;
getEntity(name: string): EntityNode | undefined;
getEntities(): Map<string, EntityNode>;
getClasses(): Map<string, EntityClass>;
addAttributes(entityName: string, attribs: Attribute[]): void;
/**
* Add a relationship
*
* @param entA - The first entity in the relationship
* @param rolA - The role played by the first entity in relation to the second
* @param entB - The second entity in the relationship
* @param rSpec - The details of the relationship between the two entities
*/
addRelationship(entA: string, rolA: string, entB: string, rSpec: RelSpec): void;
getRelationships(): Relationship[];
getDirection(): string;
setDirection(dir: string): void;
private getCompiledStyles;
addCssStyles(ids: string[], styles: string[]): void;
addClass(ids: string[], style: string[]): void;
setClass(ids: string[], classNames: string[]): void;
clear(): void;
getData(): {
nodes: Node[];
edges: Edge[];
other: {};
config: import("../../config.type.js").MermaidConfig;
direction: string;
};
setAccTitle: (txt: string) => void;
getAccTitle: () => string;
setAccDescription: (txt: string) => void;
getAccDescription: () => string;
setDiagramTitle: (txt: string) => void;
getDiagramTitle: () => string;
getConfig: () => import("../../config.type.js").ErDiagramConfig | undefined;
}

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

8
node_modules/mermaid/dist/diagrams/er/erDiagram.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { ErDB } from './erDb.js';
import * as renderer from './erRenderer-unified.js';
export declare const diagram: {
parser: any;
readonly db: ErDB;
renderer: typeof renderer;
styles: (options: import("../flowchart/styles.js").FlowChartStyleOptions) => string;
};

24
node_modules/mermaid/dist/diagrams/er/erMarkers.d.ts generated vendored Normal file
View File

@@ -0,0 +1,24 @@
declare namespace _default {
export { ERMarkers };
export { insertMarkers };
}
export default _default;
declare namespace ERMarkers {
let ONLY_ONE_START: string;
let ONLY_ONE_END: string;
let ZERO_OR_ONE_START: string;
let ZERO_OR_ONE_END: string;
let ONE_OR_MORE_START: string;
let ONE_OR_MORE_END: string;
let ZERO_OR_MORE_START: string;
let ZERO_OR_MORE_END: string;
let MD_PARENT_END: string;
let MD_PARENT_START: string;
}
/**
* Put the markers into the svg DOM for later use with edge paths
*
* @param elem
* @param conf
*/
declare function insertMarkers(elem: any, conf: any): void;

View File

@@ -0,0 +1 @@
export declare const draw: (text: string, id: string, _version: string, diag: any) => Promise<void>;

19
node_modules/mermaid/dist/diagrams/er/erRenderer.d.ts generated vendored Normal file
View File

@@ -0,0 +1,19 @@
/**
* Return a unique id based on the given string. Start with the prefix, then a hyphen, then the
* simplified str, then a hyphen, then a unique uuid based on the str. (Hyphens are only included if needed.)
* Although the official XML standard for ids says that many more characters are valid in the id,
* this keeps things simple by accepting only A-Za-z0-9.
*
* @param {string} str Given string to use as the basis for the id. Default is `''`
* @param {string} prefix String to put at the start, followed by '-'. Default is `''`
* @returns {string}
* @see https://www.w3.org/TR/xml/#NT-Name
*/
export function generateId(str?: string, prefix?: string): string;
export function setConf(cnf: any): void;
export function draw(text: any, id: any, _version: any, diagObj: any): void;
declare namespace _default {
export { setConf };
export { draw };
}
export default _default;

View File

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

33
node_modules/mermaid/dist/diagrams/er/erTypes.d.ts generated vendored Normal file
View File

@@ -0,0 +1,33 @@
export interface EntityNode {
id: string;
label: string;
attributes: Attribute[];
alias: string;
shape: string;
look?: string;
cssClasses?: string;
cssStyles?: string[];
cssCompiledStyles?: string[];
}
export interface Attribute {
type: string;
name: string;
keys: ('PK' | 'FK' | 'UK')[];
comment: string;
}
export interface Relationship {
entityA: string;
roleA: string;
entityB: string;
relSpec: RelSpec;
}
export interface RelSpec {
cardA: string;
cardB: string;
relType: string;
}
export interface EntityClass {
id: string;
styles: string[];
textStyles: string[];
}

3
node_modules/mermaid/dist/diagrams/er/styles.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { FlowChartStyleOptions } from '../flowchart/styles.js';
declare const getStyles: (options: FlowChartStyleOptions) => string;
export default getStyles;

View File

@@ -0,0 +1,3 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
declare const diagram: DiagramDefinition;
export default diagram;

View File

@@ -0,0 +1,12 @@
/**
* Draws an info picture in the tag with id: id based on the graph definition in text.
*
* @param _text - Mermaid graph definition.
* @param id - The text for the error
* @param version - The version
*/
export declare const draw: (_text: string, id: string, version: string) => void;
export declare const renderer: {
draw: (_text: string, id: string, version: string) => void;
};
export default renderer;

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,157 @@
import type { DiagramDB } from '../../diagram-api/types.js';
import type { Edge, Node } from '../../rendering-util/types.js';
import type { FlowClass, FlowEdge, FlowLink, FlowSubGraph, FlowText, FlowVertex, FlowVertexTypeParam } from './types.js';
export declare class FlowDB implements DiagramDB {
private vertexCounter;
private config;
private vertices;
private edges;
private classes;
private subGraphs;
private subGraphLookup;
private tooltips;
private subCount;
private firstGraphFlag;
private direction;
private version;
private secCount;
private posCrossRef;
private funs;
constructor();
private sanitizeText;
/**
* Function to lookup domId from id in the graph definition.
*
* @param id - id of the node
*/
lookUpDomId(id: string): string;
/**
* Function called by parser when a node definition has been found
*/
addVertex(id: string, textObj: FlowText, type: FlowVertexTypeParam, style: string[], classes: string[], dir: string, props: {} | undefined, metadata: any): void;
/**
* Function called by parser when a link/edge definition has been found
*
*/
addSingleLink(_start: string, _end: string, type: any, id?: string): void;
private isLinkData;
addLink(_start: string[], _end: string[], linkData: unknown): void;
/**
* Updates a link's line interpolation algorithm
*/
updateLinkInterpolate(positions: ('default' | number)[], interpolate: string): void;
/**
* Updates a link with a style
*
*/
updateLink(positions: ('default' | number)[], style: string[]): void;
addClass(ids: string, _style: string[]): void;
/**
* Called by parser when a graph definition is found, stores the direction of the chart.
*
*/
setDirection(dir: string): void;
/**
* Called by parser when a special node is found, e.g. a clickable element.
*
* @param ids - Comma separated list of ids
* @param className - Class to add
*/
setClass(ids: string, className: string): void;
setTooltip(ids: string, tooltip: string): void;
private setClickFun;
/**
* Called by parser when a link is found. Adds the URL to the vertex data.
*
* @param ids - Comma separated list of ids
* @param linkStr - URL to create a link for
* @param target - Target attribute for the link
*/
setLink(ids: string, linkStr: string, target: string): void;
getTooltip(id: string): string | undefined;
/**
* Called by parser when a click definition is found. Registers an event handler.
*
* @param ids - Comma separated list of ids
* @param functionName - Function to be called on click
* @param functionArgs - Arguments to be passed to the function
*/
setClickEvent(ids: string, functionName: string, functionArgs: string): void;
bindFunctions(element: Element): void;
getDirection(): string | undefined;
/**
* Retrieval function for fetching the found nodes after parsing has completed.
*
*/
getVertices(): Map<string, FlowVertex>;
/**
* Retrieval function for fetching the found links after parsing has completed.
*
*/
getEdges(): FlowEdge[] & {
defaultInterpolate?: string;
defaultStyle?: string[];
};
/**
* Retrieval function for fetching the found class definitions after parsing has completed.
*
*/
getClasses(): Map<string, FlowClass>;
private setupToolTips;
/**
* Clears the internal graph db so that a new graph can be parsed.
*
*/
clear(ver?: string): void;
setGen(ver: string): void;
defaultStyle(): string;
addSubGraph(_id: {
text: string;
}, list: string[], _title: {
text: string;
type: string;
}): string;
private getPosForId;
private indexNodes2;
getDepthFirstPos(pos: number): number;
indexNodes(): void;
getSubGraphs(): FlowSubGraph[];
firstGraph(): boolean;
private destructStartLink;
private countChar;
private destructEndLink;
destructLink(_str: string, _startStr: string): FlowLink | {
type: string;
stroke: string;
length: number;
};
exists(allSgs: FlowSubGraph[], _id: string): boolean;
/**
* Deletes an id from all subgraphs
*
*/
makeUniq(sg: FlowSubGraph, allSubgraphs: FlowSubGraph[]): {
nodes: string[];
};
lex: {
firstGraph: typeof FlowDB.prototype.firstGraph;
};
private getTypeFromVertex;
private findNode;
private destructEdgeType;
private addNodeFromVertex;
private getCompiledStyles;
getData(): {
nodes: Node[];
edges: Edge[];
other: {};
config: import("../../config.type.js").MermaidConfig;
};
defaultConfig(): import("../../config.type.js").FlowchartDiagramConfig | undefined;
setAccTitle: (txt: string) => void;
setAccDescription: (txt: string) => void;
setDiagramTitle: (txt: string) => void;
getAccTitle: () => string;
getAccDescription: () => string;
getDiagramTitle: () => string;
}

View File

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

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,12 @@
import type { MermaidConfig } from '../../config.type.js';
import { FlowDB } from './flowDb.js';
export declare const diagram: {
parser: any;
readonly db: FlowDB;
renderer: {
getClasses: (text: string, diagramObj: any) => Map<string, import("../../diagram-api/types.js").DiagramStyleClassDef>;
draw: (text: string, id: string, _version: string, diag: any) => Promise<void>;
};
styles: (options: import("./styles.js").FlowChartStyleOptions) => string;
init: (cnf: MermaidConfig) => void;
};

View File

@@ -0,0 +1,8 @@
import type { DiagramStyleClassDef } from '../../diagram-api/types.js';
export declare const getClasses: (text: string, diagramObj: any) => Map<string, DiagramStyleClassDef>;
export declare const draw: (text: string, id: string, _version: string, diag: any) => Promise<void>;
declare const _default: {
getClasses: (text: string, diagramObj: any) => Map<string, DiagramStyleClassDef>;
draw: (text: string, id: string, _version: string, diag: any) => Promise<void>;
};
export default _default;

View File

@@ -0,0 +1,2 @@
declare const newParser: any;
export default newParser;

View File

@@ -0,0 +1,18 @@
/** Returns the styles given options */
export interface FlowChartStyleOptions {
arrowheadColor: string;
border2: string;
clusterBkg: string;
clusterBorder: string;
edgeLabelBackground: string;
fontFamily: string;
lineColor: string;
mainBkg: string;
nodeBorder: string;
nodeTextColor: string;
tertiaryColor: string;
textColor: string;
titleColor: string;
}
declare const getStyles: (options: FlowChartStyleOptions) => string;
export default getStyles;

View File

@@ -0,0 +1,68 @@
import type { ShapeID } from '../../rendering-util/rendering-elements/shapes.js';
/**
* Valid `type` args to `yy.addVertex` taken from
* `packages/mermaid/src/diagrams/flowchart/parser/flow.jison`
*/
export type FlowVertexTypeParam = undefined | 'square' | 'doublecircle' | 'circle' | 'ellipse' | 'stadium' | 'subroutine' | 'rect' | 'cylinder' | 'round' | 'diamond' | 'hexagon' | 'odd' | 'trapezoid' | 'inv_trapezoid' | 'lean_right' | 'lean_left';
export interface FlowVertex {
classes: string[];
dir?: string;
domId: string;
haveCallback?: boolean;
id: string;
labelType: 'text';
link?: string;
linkTarget?: string;
props?: any;
styles: string[];
text?: string;
type?: ShapeID | FlowVertexTypeParam;
icon?: string;
form?: string;
pos?: 't' | 'b';
img?: string;
assetWidth?: number;
assetHeight?: number;
defaultWidth?: number;
imageAspectRatio?: number;
constraint?: 'on' | 'off';
}
export interface FlowText {
text: string;
type: 'text';
}
export interface FlowEdge {
isUserDefinedId: boolean;
start: string;
end: string;
interpolate?: string;
type?: string;
stroke?: 'normal' | 'thick' | 'invisible' | 'dotted';
style?: string[];
length?: number;
text: string;
labelType: 'text';
classes: string[];
id?: string;
animation?: 'fast' | 'slow';
animate?: boolean;
}
export interface FlowClass {
id: string;
styles: string[];
textStyles: string[];
}
export interface FlowSubGraph {
classes: string[];
dir?: string;
id: string;
labelType: string;
nodes: string[];
title: string;
}
export interface FlowLink {
length?: number;
stroke: string;
type: string;
text?: string;
}

108
node_modules/mermaid/dist/diagrams/gantt/ganttDb.d.ts generated vendored Normal file
View File

@@ -0,0 +1,108 @@
export function clear(): void;
export function setAxisFormat(txt: any): void;
export function getAxisFormat(): string;
export function setTickInterval(txt: any): void;
export function getTickInterval(): any;
export function setTodayMarker(txt: any): void;
export function getTodayMarker(): string;
export function setDateFormat(txt: any): void;
export function enableInclusiveEndDates(): void;
export function endDatesAreInclusive(): boolean;
export function enableTopAxis(): void;
export function topAxisEnabled(): boolean;
export function setDisplayMode(txt: any): void;
export function getDisplayMode(): string;
export function getDateFormat(): string;
export function setIncludes(txt: any): void;
export function getIncludes(): any[];
export function setExcludes(txt: any): void;
export function getExcludes(): any[];
export function getLinks(): Map<any, any>;
export function addSection(txt: any): void;
export function getSections(): any[];
export function getTasks(): any[];
export function isInvalidDate(date: any, dateFormat: any, excludes: any, includes: any): any;
export function setWeekday(txt: any): void;
export function getWeekday(): string;
export function setWeekend(startDay: any): void;
export function addTask(descr: any, data: any): void;
export function findTaskById(id: any): any;
export function addTaskOrg(descr: any, data: any): void;
export function setLink(ids: any, _linkStr: any): void;
export function setClass(ids: any, className: any): void;
export function setClickEvent(ids: any, functionName: any, functionArgs: any): void;
export function bindFunctions(element: any): void;
declare namespace _default {
export function getConfig(): import("../../config.type.js").GanttDiagramConfig | undefined;
export { clear };
export { setDateFormat };
export { getDateFormat };
export { enableInclusiveEndDates };
export { endDatesAreInclusive };
export { enableTopAxis };
export { topAxisEnabled };
export { setAxisFormat };
export { getAxisFormat };
export { setTickInterval };
export { getTickInterval };
export { setTodayMarker };
export { getTodayMarker };
export { setAccTitle };
export { getAccTitle };
export { setDiagramTitle };
export { getDiagramTitle };
export { setDisplayMode };
export { getDisplayMode };
export { setAccDescription };
export { getAccDescription };
export { addSection };
export { getSections };
export { getTasks };
export { addTask };
export { findTaskById };
export { addTaskOrg };
export { setIncludes };
export { getIncludes };
export { setExcludes };
export { getExcludes };
export { setClickEvent };
export { setLink };
export { getLinks };
export { bindFunctions };
export { parseDuration };
export { isInvalidDate };
export { setWeekday };
export { getWeekday };
export { setWeekend };
}
export default _default;
import { setAccTitle } from '../common/commonDb.js';
import { getAccTitle } from '../common/commonDb.js';
import { setDiagramTitle } from '../common/commonDb.js';
import { getDiagramTitle } from '../common/commonDb.js';
import { setAccDescription } from '../common/commonDb.js';
import { getAccDescription } from '../common/commonDb.js';
/**
* Parse a string into the args for `dayjs.add()`.
*
* The string have to be compound by a value and a shorthand duration unit. For example `5d`
* represents 5 days.
*
* Please be aware that 1 day may be 23 or 25 hours, if the user lives in an area
* that has daylight savings time (or even 23.5/24.5 hours in Lord Howe Island!)
*
* Shorthand unit supported are:
*
* - `y` for years
* - `M` for months
* - `w` for weeks
* - `d` for days
* - `h` for hours
* - `s` for seconds
* - `ms` for milliseconds
*
* @param {string} str - A string representing the duration.
* @returns {[value: number, unit: dayjs.ManipulateType]} Arguments to pass to `dayjs.add()`
*/
declare function parseDuration(str: string): [value: number, unit: dayjs.ManipulateType];
import dayjs from 'dayjs';

View File

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

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View File

@@ -0,0 +1,7 @@
export function setConf(): void;
export function draw(text: any, id: any, version: any, diagObj: any): void;
declare namespace _default {
export { setConf };
export { draw };
}
export default _default;

2
node_modules/mermaid/dist/diagrams/gantt/styles.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export default getStyles;
declare function getStyles(options: any): string;

View File

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

View File

@@ -0,0 +1,21 @@
import type { DiagramOrientation, Commit, GitGraphDB, CommitDB, MergeDB, BranchDB, CherryPickDB } from './gitGraphTypes.js';
export declare const setDirection: (dir: DiagramOrientation) => void;
export declare const setOptions: (rawOptString: string) => void;
export declare const getOptions: () => any;
export declare const commit: (commitDB: CommitDB) => void;
export declare const branch: (branchDB: BranchDB) => void;
export declare const merge: (mergeDB: MergeDB) => void;
export declare const cherryPick: (cherryPickDB: CherryPickDB) => void;
export declare const checkout: (branch: string) => void;
export declare const prettyPrint: () => void;
export declare const clear: () => void;
export declare const getBranchesAsObjArray: () => {
name: string;
}[];
export declare const getBranches: () => Map<string, string | null>;
export declare const getCommits: () => Map<string, Commit>;
export declare const getCommitsArray: () => Commit[];
export declare const getCurrentBranch: () => string;
export declare const getDirection: () => DiagramOrientation;
export declare const getHead: () => Commit | null;
export declare const db: GitGraphDB;

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View File

@@ -0,0 +1,2 @@
import type { ParserDefinition } from '../../diagram-api/types.js';
export declare const parser: ParserDefinition;

View File

@@ -0,0 +1,6 @@
import type { DrawDefinition } from '../../diagram-api/types.js';
export declare const draw: DrawDefinition;
declare const _default: {
draw: DrawDefinition;
};
export default _default;

View File

@@ -0,0 +1,121 @@
import type { GitGraphDiagramConfig } from '../../config.type.js';
import type { DiagramDBBase } from '../../diagram-api/types.js';
export declare const commitType: {
readonly NORMAL: 0;
readonly REVERSE: 1;
readonly HIGHLIGHT: 2;
readonly MERGE: 3;
readonly CHERRY_PICK: 4;
};
export interface CommitDB {
msg: string;
id: string;
type: number;
tags?: string[];
}
export interface BranchDB {
name: string;
order: number;
}
export interface MergeDB {
branch: string;
id: string;
type?: number;
tags?: string[];
}
export interface CherryPickDB {
id: string;
targetId: string;
parent: string;
tags?: string[];
}
export interface Commit {
id: string;
message: string;
seq: number;
type: number;
tags: string[];
parents: string[];
branch: string;
customType?: number;
customId?: boolean;
}
export interface GitGraph {
statements: Statement[];
}
export type Statement = CommitAst | BranchAst | MergeAst | CheckoutAst | CherryPickingAst;
export interface CommitAst {
$type: 'Commit';
id: string;
message?: string;
tags?: string[];
type?: 'NORMAL' | 'REVERSE' | 'HIGHLIGHT';
}
export interface BranchAst {
$type: 'Branch';
name: string;
order?: number;
}
export interface MergeAst {
$type: 'Merge';
branch: string;
id?: string;
tags?: string[];
type?: 'NORMAL' | 'REVERSE' | 'HIGHLIGHT';
}
export interface CheckoutAst {
$type: 'Checkout';
branch: string;
}
export interface CherryPickingAst {
$type: 'CherryPicking';
id: string;
parent: string;
tags?: string[];
}
export interface GitGraphDB extends DiagramDBBase<GitGraphDiagramConfig> {
commitType: typeof commitType;
setDirection: (dir: DiagramOrientation) => void;
setOptions: (rawOptString: string) => void;
getOptions: () => any;
commit: (commitDB: CommitDB) => void;
branch: (branchDB: BranchDB) => void;
merge: (mergeDB: MergeDB) => void;
cherryPick: (cherryPickDB: CherryPickDB) => void;
checkout: (branch: string) => void;
prettyPrint: () => void;
clear: () => void;
getBranchesAsObjArray: () => {
name: string;
}[];
getBranches: () => Map<string, string | null>;
getCommits: () => Map<string, Commit>;
getCommitsArray: () => Commit[];
getCurrentBranch: () => string;
getDirection: () => DiagramOrientation;
getHead: () => Commit | null;
}
export interface GitGraphDBParseProvider extends Partial<GitGraphDB> {
commitType: typeof commitType;
setDirection: (dir: DiagramOrientation) => void;
commit: (commitDB: CommitDB) => void;
branch: (branchDB: BranchDB) => void;
merge: (mergeDB: MergeDB) => void;
cherryPick: (cherryPickDB: CherryPickDB) => void;
checkout: (branch: string) => void;
}
export interface GitGraphDBRenderProvider extends Partial<GitGraphDB> {
prettyPrint: () => void;
clear: () => void;
getBranchesAsObjArray: () => {
name: string;
}[];
getBranches: () => Map<string, string | null>;
getCommits: () => Map<string, Commit>;
getCommitsArray: () => Commit[];
getCurrentBranch: () => string;
getDirection: () => DiagramOrientation;
getHead: () => Commit | null;
getDiagramTitle: () => string;
}
export type DiagramOrientation = 'LR' | 'TB' | 'BT';

2
node_modules/mermaid/dist/diagrams/git/styles.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export default getStyles;
declare function getStyles(options: any): string;

1
node_modules/mermaid/dist/diagrams/globalStyles.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare const getIconStyles: () => string;

View File

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

4
node_modules/mermaid/dist/diagrams/info/infoDb.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import type { InfoFields, InfoDB } from './infoTypes.js';
export declare const DEFAULT_INFO_DB: InfoFields;
export declare const getVersion: () => string;
export declare const db: InfoDB;

View File

@@ -0,0 +1,2 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
export declare const info: ExternalDiagramDefinition;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View File

@@ -0,0 +1,2 @@
import type { ParserDefinition } from '../../diagram-api/types.js';
export declare const parser: ParserDefinition;

View File

@@ -0,0 +1,4 @@
import type { DrawDefinition } from '../../diagram-api/types.js';
export declare const renderer: {
draw: DrawDefinition;
};

View File

@@ -0,0 +1,7 @@
import type { DiagramDB } from '../../diagram-api/types.js';
export interface InfoFields {
version: string;
}
export interface InfoDB extends DiagramDB {
getVersion: () => string;
}

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

View File

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

View File

@@ -0,0 +1,36 @@
import type { D3Element } from '../../types.js';
import type { Edge, KanbanNode } from '../../rendering-util/types.js';
declare const db: {
readonly clear: () => void;
readonly addNode: (level: number, id: string, descr: string, type: number, shapeData: string) => void;
readonly getSections: () => KanbanNode[];
readonly getData: () => {
nodes: KanbanNode[];
edges: Edge[];
other: {};
config: import("../../config.type.js").MermaidConfig;
};
readonly nodeType: {
DEFAULT: number;
NO_BORDER: number;
ROUNDED_RECT: number;
RECT: number;
CIRCLE: number;
CLOUD: number;
BANG: number;
HEXAGON: number;
};
readonly getType: (startStr: string, endStr: string) => number;
readonly setElementForId: (id: number, element: D3Element) => void;
readonly decorateNode: (decoration?: {
class?: string;
icon?: string;
}) => void;
readonly type2Str: (type: number) => "rect" | "circle" | "bang" | "cloud" | "no-border" | "rounded-rect" | "hexgon";
readonly getLogger: () => Record<import("../../logger.js").LogLevel, {
(...data: any[]): void;
(message?: any, ...optionalParams: any[]): void;
}>;
readonly getElementById: (id: number) => any;
};
export default db;

View File

@@ -0,0 +1,6 @@
import type { DrawDefinition } from '../../diagram-api/types.js';
export declare const draw: DrawDefinition;
declare const _default: {
draw: DrawDefinition;
};
export default _default;

View File

@@ -0,0 +1,2 @@
import type kanbanDb from './kanbanDb.js';
export type KanbanDB = typeof kanbanDb;

View File

@@ -0,0 +1,3 @@
import type { DiagramStylesProvider } from '../../diagram-api/types.js';
declare const getStyles: DiagramStylesProvider;
export default getStyles;

View File

@@ -0,0 +1,3 @@
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
declare const plugin: ExternalDiagramDefinition;
export default plugin;

View File

@@ -0,0 +1,2 @@
import type { DiagramDefinition } from '../../diagram-api/types.js';
export declare const diagram: DiagramDefinition;

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