完成世界书、骰子、apiconfig页面处理

This commit is contained in:
2026-04-30 01:35:10 +08:00
parent a3e3711b2b
commit ba9b925c32
4602 changed files with 785225 additions and 23 deletions

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,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;
};

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>;