state sync
This commit is contained in:
1
app/basepak/static/js/mermaid/diagrams/git/gitGraph.spec.d.ts
vendored
Normal file
1
app/basepak/static/js/mermaid/diagrams/git/gitGraph.spec.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
21
app/basepak/static/js/mermaid/diagrams/git/gitGraphAst.d.ts
vendored
Normal file
21
app/basepak/static/js/mermaid/diagrams/git/gitGraphAst.d.ts
vendored
Normal 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;
|
||||
3
app/basepak/static/js/mermaid/diagrams/git/gitGraphDetector.d.ts
vendored
Normal file
3
app/basepak/static/js/mermaid/diagrams/git/gitGraphDetector.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
|
||||
declare const plugin: ExternalDiagramDefinition;
|
||||
export default plugin;
|
||||
2
app/basepak/static/js/mermaid/diagrams/git/gitGraphDiagram.d.ts
vendored
Normal file
2
app/basepak/static/js/mermaid/diagrams/git/gitGraphDiagram.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDefinition } from '../../diagram-api/types.js';
|
||||
export declare const diagram: DiagramDefinition;
|
||||
2
app/basepak/static/js/mermaid/diagrams/git/gitGraphParser.d.ts
vendored
Normal file
2
app/basepak/static/js/mermaid/diagrams/git/gitGraphParser.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { ParserDefinition } from '../../diagram-api/types.js';
|
||||
export declare const parser: ParserDefinition;
|
||||
6
app/basepak/static/js/mermaid/diagrams/git/gitGraphRenderer.d.ts
vendored
Normal file
6
app/basepak/static/js/mermaid/diagrams/git/gitGraphRenderer.d.ts
vendored
Normal 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;
|
||||
121
app/basepak/static/js/mermaid/diagrams/git/gitGraphTypes.d.ts
vendored
Normal file
121
app/basepak/static/js/mermaid/diagrams/git/gitGraphTypes.d.ts
vendored
Normal 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
app/basepak/static/js/mermaid/diagrams/git/styles.d.ts
vendored
Normal file
2
app/basepak/static/js/mermaid/diagrams/git/styles.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
Reference in New Issue
Block a user