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

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;