UNPKG

@selenite/graph-editor

Version:

A graph editor for visual programming, based on rete and svelte.

42 lines (41 loc) 1.47 kB
import type { Database, MacroBlock, Datasource as DataSource, Graph } from './types'; import { type Writable } from 'svelte/store'; export declare const userStore: Writable<string>; export declare class NodeStorage { #private; static pullDataSourcesInterval: number; static mainStorage: Database; static sources: DataSource[]; static get instance(): NodeStorage; numGraphs: number; graphs: MacroBlock[]; static get macroblocks(): MacroBlock[]; data: { tags: string[]; favorites: MacroBlock[]; paths: string[][]; userBlocks: MacroBlock[]; }; updateData: import("lodash-es").DebouncedFunc<() => void>; static get favorites(): MacroBlock[]; static get tags(): string[]; static get userBlocks(): MacroBlock[]; static get paths(): string[][]; static get data(): { tags: string[]; favorites: MacroBlock[]; paths: string[][]; userBlocks: MacroBlock[]; }; private constructor(); static updateTimeout: NodeJS.Timeout | undefined; static updateLoop(): Promise<void>; static get numGraphs(): number; static get graphs(): MacroBlock[]; static getGraphs(): Promise<Graph[]>; static getGraph(id: string): Promise<Graph | undefined>; static saveGraph(graph: Graph): Promise<string>; static clearGraphs(): Promise<void>; static deleteMacro(id: string): Promise<void>; static pullSources(): Promise<void>; }