import { AudioOptionsData } from '@jlalmes/share'; import { DBRecordData } from '@jlalmes/share'; import { RecordData } from '@jlalmes/share'; import { VNode } from '@jlalmes/share'; import { VSNode } from '@jlalmes/share'; export declare function base64ToFloat32Array(str: string): Float32Array; export declare const canvasContext2DAttrs: (keyof CanvasRenderingContext2D)[]; export declare const canvasContext2DKeys: (keyof CanvasRenderingContext2D)[]; export declare const canvasContext2DMethods: (keyof CanvasRenderingContext2D)[]; export declare const canvasContextWebGLAttrs: (keyof WebGLRenderingContext)[]; export declare const canvasContextWebGLKeys: (keyof WebGLRenderingContext)[]; export declare const canvasContextWebGLMethods: (keyof WebGLRenderingContext)[]; export declare function completeAttrHref(str: string, node?: Element): string; export declare function completeCssHref(str: string, baseUrl?: string, setHref?: (url: string) => string): string; export declare function createURL(url: string, base?: string): URL | { href: string; pathname: string; }; declare class Database { db: IDBDatabase | undefined; DBName: string; version: number; storeName: string; dbResolve: Promise | undefined; constructor(DBName: string, version: number, storeName: string); private init; private initDB; protected getIDBObjectStore(type: IDBTransactionMode): IDBObjectStore; } export declare function debounce(func: F, waitMilliseconds: number, options?: Options): (this: ThisParameterType, ...args: Parameters) => void; export declare function delay(t?: number): Promise; declare type DeleteOptions = { lowerBound: number; upperBound: number; }; declare const ENCODE_TYPE: { BASE: string; BASE_URL: string; }; export declare function encodeWAV(data: Float32Array[], opts: AudioOptionsData): Blob; export declare function filteringScriptTag(str: string): string; export declare function float32ArrayToBase64(data: Float32Array): string; export declare function getDateTime(timestamp: number): string; export declare function getRadix64TimeStr(): string; export declare function getRandomCode(len?: 6 | 7 | 8): string; export declare function getRawScriptContent(src: string): Promise; export declare function getScript(src: string): Promise; export declare function getStrDiffPatches(oldStr: string, newStr: string): { index: number; type: "add" | "rm"; value?: string | undefined; len?: number | undefined; }[]; export declare function getTime(): number; export declare class IDB extends Database { tasks: Task[]; constructor(DBName: string, version: number, storeName: string); add(data: RecordData): void; delete(options: DeleteOptions): void; clear(): void; count(): Promise; last(): Promise; readAll(options?: { limit: number; }): Promise; private execTask; private addTask; private execAddTask; private execDeleteTask; execClearTask(): Promise; private triggerTask; } export declare const idb: IDB; export declare function isCommentNode(node: Node): boolean; export declare const isDev: boolean; export declare function isElementNode(node: Node): boolean; export declare function isExistingNode(node: Node): boolean | null; export declare function isHideComment(node: Node | null): boolean; export declare function isNativeFunction(fn: Function): boolean; export declare function isNumeric(n: string): boolean; export declare function isSnapshot(frame: RecordData): boolean; export declare function isTextNode(node: Node): boolean; export declare function isVNode(n: VNode | VSNode): boolean; export declare function logAdvice(msg: string): string; export declare function logAsciiLogo(): void; export declare function logBadge(opts: { title: string; content: string; titleColor?: string; backgroundColor?: string; }): void; export declare function logError(e: Error | string): string; export declare function logInfo(): void; export declare function logWarn(e: Error | string): string; declare class NodeStore { private static nodeId; private nodeMap; private idMap; constructor(); private init; reset(): void; createNodeId: () => number; getNode(id: number): Node | null; addNode(node: Node, id?: number): number; removeNode(id: number): void; getNodeId(node: Node): number | undefined; updateNode(id: number, node: Node): void; } export declare const nodeStore: NodeStore; declare type Options = { isImmediate?: boolean; }; declare type Procedure = (...args: any[]) => void; declare class Radix64 { atob(str: string, type?: keyof typeof ENCODE_TYPE): number; btoa(num: number, type?: keyof typeof ENCODE_TYPE): string; private decode; private encode; } export declare const radix64: Radix64; export declare function removeGlobalVariables(): void; export declare function revertStrByPatches(str: string, changes: ReturnType): string; export declare function secondToTime(second: number): string; export declare function stateDebounce(stateHandle: (setState: (state: T) => void) => void, delay: ((state: T) => number) | number, initState?: T): (cb: (state: T) => void) => void; declare type Task = { type: TaskTypes; data?: RecordData | DeleteOptions; }; declare enum TaskTypes { 'ADD' = 0, 'DELETE' = 1, 'CLEAR' = 2 } export declare const tempEmptyFn: () => void; export declare const tempEmptyPromise: () => Promise; export declare function throttle(func: Function, wait: number, options?: { leading?: boolean; trailing?: boolean; }): any; export declare function toTimeStamp(timeStr: string): number; export declare const version = "__VERSION__"; export { }