index.d.ts
1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { Edge } from '@xyflow/svelte';
import { Node as Node_2 } from '@xyflow/svelte';
import { useSvelteFlow } from '@xyflow/svelte';
import { Viewport } from '@xyflow/svelte';
export declare type Item = {
value: number | string;
label: string;
children?: Item[];
};
export declare class Tinyflow {
private options;
private rootEl;
private svelteFlowInstance;
constructor(options: TinyflowOptions);
private _init;
private _setOptions;
getOptions(): TinyflowOptions;
getData(): {
nodes: Node_2[];
edges: Edge[];
viewport: Viewport;
};
setData(data: TinyflowData): void;
destroy(): void;
}
export declare type TinyflowData = Partial<ReturnType<ReturnType<typeof useSvelteFlow>['toObject']>>;
export declare type TinyflowOptions = {
element: string | Element;
data?: TinyflowData;
provider?: {
llm?: () => Item[] | Promise<Item[]>;
knowledge?: () => Item[] | Promise<Item[]>;
internal?: () => Item[] | Promise<Item[]>;
};
};
export { }