state sync

This commit is contained in:
2025-11-23 14:59:17 -08:00
parent 537bdf1ad7
commit 39f4a8d3fc
812 changed files with 373062 additions and 84 deletions

View File

@@ -0,0 +1 @@
export declare function toBase64(str: string): string;

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

View File

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

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

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

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

View File

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