state sync
This commit is contained in:
1
app/basepak/static/js/mermaid/utils/base64.d.ts
vendored
Normal file
1
app/basepak/static/js/mermaid/utils/base64.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function toBase64(str: string): string;
|
||||
32
app/basepak/static/js/mermaid/utils/imperativeState.d.ts
vendored
Normal file
32
app/basepak/static/js/mermaid/utils/imperativeState.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Resettable state storage.
|
||||
* @example
|
||||
* ```
|
||||
* const state = new ImperativeState(() => ({
|
||||
* foo: undefined as string | undefined,
|
||||
* bar: [] as number[],
|
||||
* baz: 1 as number | undefined,
|
||||
* }));
|
||||
*
|
||||
* state.records.foo = "hi";
|
||||
* console.log(state.records.foo); // prints "hi";
|
||||
* state.reset();
|
||||
* console.log(state.records.foo); // prints "default";
|
||||
*
|
||||
* // typeof state.records:
|
||||
* // {
|
||||
* // foo: string | undefined, // actual: undefined
|
||||
* // bar: number[], // actual: []
|
||||
* // baz: number | undefined, // actual: 1
|
||||
* // }
|
||||
* ```
|
||||
*/
|
||||
export declare class ImperativeState<S> {
|
||||
private init;
|
||||
records: S;
|
||||
/**
|
||||
* @param init - Function that creates the default state.
|
||||
*/
|
||||
constructor(init: () => S);
|
||||
reset(): void;
|
||||
}
|
||||
1
app/basepak/static/js/mermaid/utils/imperativeState.spec.d.ts
vendored
Normal file
1
app/basepak/static/js/mermaid/utils/imperativeState.spec.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
18
app/basepak/static/js/mermaid/utils/lineWithOffset.d.ts
vendored
Normal file
18
app/basepak/static/js/mermaid/utils/lineWithOffset.d.ts
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import type { EdgeData, Point } from '../types.js';
|
||||
export declare const markerOffsets: {
|
||||
readonly aggregation: 17.25;
|
||||
readonly extension: 17.25;
|
||||
readonly composition: 17.25;
|
||||
readonly dependency: 6;
|
||||
readonly lollipop: 13.5;
|
||||
readonly arrow_point: 4;
|
||||
};
|
||||
export declare const markerOffsets2: {
|
||||
readonly arrow_point: 9;
|
||||
readonly arrow_cross: 12.5;
|
||||
readonly arrow_circle: 12.5;
|
||||
};
|
||||
export declare const getLineFunctionsWithOffset: (edge: Pick<EdgeData, "arrowTypeStart" | "arrowTypeEnd">) => {
|
||||
x: (this: void, d: Point | [number, number], i: number, data: (Point | [number, number])[]) => number;
|
||||
y: (this: void, d: Point | [number, number], i: number, data: (Point | [number, number])[]) => number;
|
||||
};
|
||||
7
app/basepak/static/js/mermaid/utils/sanitizeDirective.d.ts
vendored
Normal file
7
app/basepak/static/js/mermaid/utils/sanitizeDirective.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Sanitizes directive objects
|
||||
*
|
||||
* @param args - Directive's JSON
|
||||
*/
|
||||
export declare const sanitizeDirective: (args: any) => void;
|
||||
export declare const sanitizeCss: (str: string) => string;
|
||||
8
app/basepak/static/js/mermaid/utils/subGraphTitleMargins.d.ts
vendored
Normal file
8
app/basepak/static/js/mermaid/utils/subGraphTitleMargins.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { FlowchartDiagramConfig } from '../config.type.js';
|
||||
export declare const getSubGraphTitleMargins: ({ flowchart, }: {
|
||||
flowchart: FlowchartDiagramConfig;
|
||||
}) => {
|
||||
subGraphTitleTopMargin: number;
|
||||
subGraphTitleBottomMargin: number;
|
||||
subGraphTitleTotalMargin: number;
|
||||
};
|
||||
1
app/basepak/static/js/mermaid/utils/subGraphTitleMargins.spec.d.ts
vendored
Normal file
1
app/basepak/static/js/mermaid/utils/subGraphTitleMargins.spec.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Reference in New Issue
Block a user