@babsey/code-graph 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/dist/code-graph.umd.cjs +1 -1
  3. package/dist/lib/code.d.ts +128 -0
  4. package/dist/lib/codeNode/codeNode.d.ts +70 -0
  5. package/dist/lib/codeNode/defineCodeNode.d.ts +15 -0
  6. package/dist/lib/codeNode/dynamicCodeNode.d.ts +35 -0
  7. package/dist/lib/codeNode/index.d.ts +3 -0
  8. package/dist/lib/codeNodeInterfaces/baseNumericInterface.d.ts +23 -0
  9. package/dist/lib/codeNodeInterfaces/button/buttonInterface.d.ts +9 -0
  10. package/dist/lib/codeNodeInterfaces/checkbox/checkboxInterface.d.ts +7 -0
  11. package/dist/lib/codeNodeInterfaces/codeInput/codeInputInterface.d.ts +5 -0
  12. package/dist/lib/codeNodeInterfaces/codeNode/codeNodeInterface.d.ts +14 -0
  13. package/dist/lib/codeNodeInterfaces/codeOutput/codeOutputInterface.d.ts +8 -0
  14. package/dist/lib/codeNodeInterfaces/index.d.ts +12 -0
  15. package/dist/lib/codeNodeInterfaces/integer/integerInterface.d.ts +8 -0
  16. package/dist/lib/codeNodeInterfaces/number/numberInterface.d.ts +7 -0
  17. package/dist/lib/codeNodeInterfaces/select/selectInterface.d.ts +14 -0
  18. package/dist/lib/codeNodeInterfaces/slider/sliderInterface.d.ts +10 -0
  19. package/dist/lib/codeNodeInterfaces/text/textInterface.d.ts +6 -0
  20. package/dist/lib/codeNodeInterfaces/textInput/textInputInterface.d.ts +8 -0
  21. package/dist/lib/codeNodeInterfaces/textareaInput/textareaInputInterface.d.ts +7 -0
  22. package/dist/lib/components/index.d.ts +1 -0
  23. package/dist/lib/icons/index.d.ts +9 -0
  24. package/dist/lib/index.d.ts +7 -0
  25. package/dist/lib/settings.d.ts +10 -0
  26. package/dist/lib/viewModel.d.ts +14 -0
  27. package/package.json +2 -1
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar"]
3
+ }
@@ -1,5 +1,5 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("baklavajs"), require("mustache"), require("vue"), require("toposort"), require("uuid"), require("@vueuse/core")) : typeof define === "function" && define.amd ? define(["exports", "baklavajs", "mustache", "vue", "toposort", "uuid", "@vueuse/core"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["code-graph"] = {}, global.baklavajs, global.mustache, global.Vue, global.toposort, global.uuid, global["@vueuse/core"]));
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("baklavajs"), require("mustache"), require("vue"), require("toposort"), require("uuid"), require("@vueuse/core")) : typeof define === "function" && define.amd ? define(["exports", "baklavajs", "mustache", "vue", "toposort", "uuid", "@vueuse/core"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["@code-graph"] = {}, global.baklavajs, global.mustache, global.Vue, global.toposort, global.uuid, global["@vueuse/core"]));
3
3
  })(this, (function(exports2, baklavajs, mustache, vue, toposort, uuid, core) {
4
4
  "use strict";
5
5
  class AbstractCodeNode extends baklavajs.AbstractNode {
@@ -0,0 +1,128 @@
1
+ import { Connection, Graph, IEditorState, INodeState, NodeInterface } from 'baklavajs';
2
+ import { UnwrapRef } from 'vue';
3
+ import { AbstractCodeNode } from './codeNode';
4
+ import { CodeNodeInterface } from './codeNodeInterfaces';
5
+ import { ICodeGraphViewModel } from './viewModel';
6
+ interface IPosition {
7
+ x: number;
8
+ y: number;
9
+ }
10
+ interface ICodeState {
11
+ autosort: boolean;
12
+ modules: Record<string, string>;
13
+ script: string;
14
+ template: string;
15
+ token: symbol | null;
16
+ }
17
+ export declare class Code {
18
+ private _id;
19
+ private _viewModel;
20
+ private _state;
21
+ constructor(viewModel: ICodeGraphViewModel);
22
+ get codeNodes(): AbstractCodeNode[];
23
+ get connections(): Connection[];
24
+ get graph(): Graph;
25
+ get id(): string;
26
+ get modules(): string[];
27
+ get nodeIds(): string[];
28
+ get nodes(): AbstractCodeNode[];
29
+ get scriptedCodeNodes(): AbstractCodeNode[];
30
+ get shortId(): string;
31
+ get state(): UnwrapRef<ICodeState>;
32
+ get viewModel(): ICodeGraphViewModel;
33
+ get visibleNodes(): AbstractCodeNode[];
34
+ /**
35
+ * Add code node to graph.
36
+ * @param node code node
37
+ * @param props optional
38
+ */
39
+ addNode(node: AbstractCodeNode, props?: unknown): AbstractCodeNode | undefined;
40
+ /**
41
+ * Add code node at coordinates.
42
+ * @param node code node
43
+ * @param position position
44
+ * @param props optional
45
+ * @returns code node
46
+ */
47
+ addNodeAtCoordinates: (node: AbstractCodeNode, position?: IPosition, props?: unknown) => AbstractCodeNode;
48
+ /**
49
+ * Add connection of code nodes
50
+ * @param from code node interface
51
+ * @param to code node interface
52
+ */
53
+ addConnection(from: CodeNodeInterface | NodeInterface, to: CodeNodeInterface | NodeInterface): void;
54
+ /**
55
+ * Clear code graph.
56
+ */
57
+ clear(): void;
58
+ findNodeById(id: string): AbstractCodeNode | undefined;
59
+ findNodeByType(nodeType: string): AbstractCodeNode | undefined;
60
+ getNodesBySameType(type: string): AbstractCodeNode[];
61
+ getNodesBySameVariableNames(variableName: string): AbstractCodeNode[];
62
+ /**
63
+ * Check whether the graph has this connection.
64
+ * @param from node interface
65
+ * @param to node interface
66
+ * @returns boolean
67
+ */
68
+ hasConnection(from: NodeInterface, to: NodeInterface): boolean;
69
+ /**
70
+ * Load template from the file.
71
+ */
72
+ loadTemplate(resolve: Promise<any>): void;
73
+ onCodeUpdate(): void;
74
+ /**
75
+ * Remove connection from the graph
76
+ * @param connection connection between code nodes
77
+ */
78
+ removeConnection(connection: Connection): void;
79
+ /**
80
+ * Remove node from the graph.
81
+ * @param codeNode code node
82
+ */
83
+ removeNode(codeNode: AbstractCodeNode): void;
84
+ /**
85
+ * Render node codes.
86
+ */
87
+ renderNodeCodes(): void;
88
+ /**
89
+ * Render code.
90
+ */
91
+ renderCode(): void;
92
+ /**
93
+ * Save code graph.
94
+ * @returns graph state
95
+ */
96
+ save(): IEditorState;
97
+ /**
98
+ * Save node states.
99
+ * @param nodeStates a list of node state.
100
+ */
101
+ saveNodeStates(nodeStates: INodeState<unknown, unknown>[]): void;
102
+ /**
103
+ * Sort code nodes.
104
+ */
105
+ sortNodes(): void;
106
+ updateOutputVariableNames(): void;
107
+ }
108
+ /**
109
+ * Get nodes of current graph.
110
+ * @param graph graph / subgraph
111
+ * @returns list of code nodes
112
+ */
113
+ export declare const getCodeNodes: (graph: Graph) => AbstractCodeNode[];
114
+ /**
115
+ * Get position at specific column.
116
+ * @param col column
117
+ * @param offset number
118
+ * @returns position
119
+ */
120
+ export declare const getPositionAtColumn: (col?: number, offset?: number) => IPosition;
121
+ /**
122
+ * Get position before target node.
123
+ * @param node code node
124
+ * @returns position
125
+ */
126
+ export declare const getPositionBeforeNode: (node: AbstractCodeNode) => IPosition;
127
+ export declare const transferCodeScript: (graph: Graph) => void;
128
+ export {};
@@ -0,0 +1,70 @@
1
+ import { AbstractNode, Graph, NodeInterface, CalculateFunction, INodeState, NodeInterfaceDefinition } from 'baklavajs';
2
+ import { UnwrapRef } from 'vue';
3
+ import { Code } from '../code';
4
+ interface IAbstractCodeNodeState {
5
+ codeTemplate: string;
6
+ hidden: boolean;
7
+ integrated: boolean;
8
+ modules: string[];
9
+ props?: unknown;
10
+ script: string;
11
+ variableName: string;
12
+ }
13
+ export declare abstract class AbstractCodeNode extends AbstractNode {
14
+ state: UnwrapRef<IAbstractCodeNodeState>;
15
+ code: Code | undefined;
16
+ isCodeNode: boolean;
17
+ inputs: Record<string, NodeInterface<unknown>>;
18
+ outputs: Record<string, NodeInterface<unknown>>;
19
+ constructor();
20
+ get codeTemplate(): string;
21
+ get idx(): number;
22
+ get idxByVariableNames(): number;
23
+ get script(): string;
24
+ get shortId(): string;
25
+ get variableName(): string;
26
+ abstract onCodeUpdate(): void;
27
+ /**
28
+ * Get connected nodes to the node.
29
+ * @param type inputs or outputs
30
+ * @returns code node instances
31
+ */
32
+ getConnectedNodes(type?: 'inputs' | 'outputs'): AbstractCodeNode[];
33
+ registerCode(code: Code): void;
34
+ /**
35
+ * Render code of this node.
36
+ */
37
+ renderCode(): void;
38
+ updateOutputVariableName(): void;
39
+ }
40
+ export interface ICodeNodeState<I, O> extends INodeState<I, O>, IAbstractCodeNodeState {
41
+ }
42
+ export declare abstract class CodeNode<I, O> extends AbstractCodeNode {
43
+ abstract inputs: NodeInterfaceDefinition<I>;
44
+ abstract outputs: NodeInterfaceDefinition<O>;
45
+ /**
46
+ * The default implementation does nothing.
47
+ * Overwrite this method to do calculation.
48
+ * @param inputs Values of all input interfaces
49
+ * @param globalValues Set of values passed to every node by the engine plugin
50
+ * @return Values for output interfaces
51
+ */
52
+ calculate?: CalculateFunction<I, O>;
53
+ load(state: ICodeNodeState<I, O>): void;
54
+ save(): ICodeNodeState<I, O>;
55
+ updateModules(modules?: string[]): void;
56
+ }
57
+ export type AbstractCodeNodeConstructor = new () => AbstractCodeNode;
58
+ /**
59
+ * Load node state.
60
+ * @param graph code graph
61
+ * @param nodeState node state
62
+ */
63
+ export declare const loadNodeState: (graph: Graph | undefined, nodeState: ICodeNodeState<unknown, unknown>) => void;
64
+ /**
65
+ * Save state of node.
66
+ * @param graph code graph
67
+ * @param nodeState node state
68
+ */
69
+ export declare const saveNodeState: (graph: Graph | undefined, nodeState: ICodeNodeState<unknown, unknown>) => void;
70
+ export {};
@@ -0,0 +1,15 @@
1
+ import { Node, NodeInterface, INodeDefinition } from 'baklavajs';
2
+ import { AbstractCodeNode, CodeNode } from './codeNode';
3
+ export type NodeConstructor<I, O> = new () => Node<I, O>;
4
+ export type NodeInstanceOf<T> = T extends new () => Node<infer A, infer B> ? Node<A, B> : never;
5
+ export type NodeInterfaceFactory<T> = () => NodeInterface<T>;
6
+ export type InterfaceFactory<T> = {
7
+ [K in keyof T]: NodeInterfaceFactory<T[K]>;
8
+ };
9
+ export interface ICodeNodeDefinition<I, O> extends INodeDefinition<I, O> {
10
+ codeTemplate?: (node?: AbstractCodeNode) => string;
11
+ modules?: string[];
12
+ onCodeUpdate?: (node?: AbstractCodeNode) => void;
13
+ variableName?: string;
14
+ }
15
+ export declare function defineCodeNode<I, O>(definition: ICodeNodeDefinition<I, O>): new () => CodeNode<I, O>;
@@ -0,0 +1,35 @@
1
+ import { CalculateFunction, IDynamicNodeDefinition, INodeState, NodeInterface, NodeInterfaceDefinition } from 'baklavajs';
2
+ import { AbstractCodeNode, CodeNode } from './codeNode';
3
+ type Dynamic<T> = T & Record<string, unknown>;
4
+ /**
5
+ * @internal
6
+ * Abstract base class for every dynamic node
7
+ */
8
+ export declare abstract class DynamicCodeNode<I, O> extends CodeNode<Dynamic<I>, Dynamic<O>> {
9
+ abstract inputs: NodeInterfaceDefinition<Dynamic<I>>;
10
+ abstract outputs: NodeInterfaceDefinition<Dynamic<O>>;
11
+ abstract load(state: INodeState<Dynamic<I>, Dynamic<O>>): void;
12
+ /**
13
+ * The default implementation does nothing.
14
+ * Overwrite this method to do calculation.
15
+ * @param inputs Values of all input interfaces
16
+ * @param globalValues Set of values passed to every node by the engine plugin
17
+ * @return Values for output interfaces
18
+ */
19
+ calculate?: CalculateFunction<Dynamic<I>, Dynamic<O>>;
20
+ }
21
+ export type DynamicNodeDefinition = Record<string, (() => NodeInterface<unknown>) | undefined>;
22
+ export interface DynamicNodeUpdateResult {
23
+ inputs?: DynamicNodeDefinition;
24
+ outputs?: DynamicNodeDefinition;
25
+ forceUpdateInputs?: string[];
26
+ forceUpdateOutputs?: string[];
27
+ }
28
+ export interface IDynamicCodeNodeDefinition<I, O> extends IDynamicNodeDefinition<I, O> {
29
+ codeTemplate?: (node?: AbstractCodeNode) => string;
30
+ modules?: string[];
31
+ onCodeUpdate?: (node?: AbstractCodeNode) => void;
32
+ variableName?: string;
33
+ }
34
+ export declare function defineDynamicCodeNode<I, O>(definition: IDynamicCodeNodeDefinition<I, O>): new () => DynamicCodeNode<I, O>;
35
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './codeNode';
2
+ export * from './defineCodeNode';
3
+ export * from './dynamicCodeNode';
@@ -0,0 +1,23 @@
1
+ import { Ref } from 'vue';
2
+ import { NodeInterface } from 'baklavajs';
3
+ import { CodeNodeInterface } from './codeNode/codeNodeInterface';
4
+ export interface IValidator {
5
+ validate: (v: number) => boolean;
6
+ }
7
+ export declare class BaseNumericInterface extends CodeNodeInterface<number> implements IValidator {
8
+ min?: number;
9
+ max?: number;
10
+ constructor(name: string, value: number, min?: number, max?: number);
11
+ validate(v: number): boolean;
12
+ }
13
+ export declare const useBaseNumericInterface: (intf: Ref<NodeInterface<number>>, precision?: number) => {
14
+ editMode: Ref<boolean, boolean>;
15
+ invalid: Ref<boolean, boolean>;
16
+ tempValue: Ref<string, string>;
17
+ inputEl: Ref<HTMLInputElement | null, HTMLInputElement | null>;
18
+ stringRepresentation: import('vue').ComputedRef<string>;
19
+ validate: (v: number) => boolean;
20
+ setValue: (newValue: number) => void;
21
+ enterEditMode: () => Promise<void>;
22
+ leaveEditMode: () => void;
23
+ };
@@ -0,0 +1,9 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { ButtonInterfaceComponent } from 'baklavajs';
3
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
4
+ export declare class ButtonInterface extends CodeNodeInterface<undefined> {
5
+ component: ComponentOptions;
6
+ callback?: () => void;
7
+ constructor(name: string, callback: () => void);
8
+ }
9
+ export { ButtonInterfaceComponent };
@@ -0,0 +1,7 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { CheckboxInterfaceComponent } from 'baklavajs';
3
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
4
+ export declare class CheckboxInterface extends CodeNodeInterface<boolean> {
5
+ component: ComponentOptions;
6
+ }
7
+ export { CheckboxInterfaceComponent };
@@ -0,0 +1,5 @@
1
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
2
+ export declare class CodeInputInterface<T = unknown> extends CodeNodeInterface<T> {
3
+ isCodeInput: boolean;
4
+ constructor(name?: string, value?: T);
5
+ }
@@ -0,0 +1,14 @@
1
+ import { UnwrapRef } from 'vue';
2
+ import { NodeInterface } from 'baklavajs';
3
+ import { Code } from '../../code';
4
+ interface ICodeNodeInterfaceState {
5
+ script: string;
6
+ }
7
+ export declare class CodeNodeInterface<T = unknown> extends NodeInterface<T> {
8
+ optional: boolean;
9
+ code: Code | undefined;
10
+ state: UnwrapRef<ICodeNodeInterfaceState>;
11
+ constructor(name: string, value: T);
12
+ get shortId(): string;
13
+ }
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
2
+ export declare class CodeOutputInterface extends CodeNodeInterface<unknown> {
3
+ isCodeOutput: boolean;
4
+ constructor(name?: string, value?: string);
5
+ get script(): string;
6
+ get value(): unknown;
7
+ set value(value: unknown);
8
+ }
@@ -0,0 +1,12 @@
1
+ export * from './button/buttonInterface';
2
+ export * from './checkbox/checkboxInterface';
3
+ export * from './codeNode/codeNodeInterface';
4
+ export * from './integer/integerInterface';
5
+ export * from './codeInput/codeInputInterface';
6
+ export * from './codeOutput/codeOutputInterface';
7
+ export * from './number/numberInterface';
8
+ export * from './select/selectInterface';
9
+ export * from './slider/sliderInterface';
10
+ export * from './text/textInterface';
11
+ export * from './textInput/textInputInterface';
12
+ export * from './textareaInput/textareaInputInterface';
@@ -0,0 +1,8 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { IntegerInterfaceComponent } from 'baklavajs';
3
+ import { BaseNumericInterface } from '../baseNumericInterface';
4
+ export declare class IntegerInterface extends BaseNumericInterface {
5
+ component: ComponentOptions;
6
+ validate(v: number): boolean;
7
+ }
8
+ export { IntegerInterfaceComponent };
@@ -0,0 +1,7 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { NumberInterfaceComponent } from 'baklavajs';
3
+ import { BaseNumericInterface } from '../baseNumericInterface';
4
+ export declare class NumberInterface extends BaseNumericInterface {
5
+ component: ComponentOptions;
6
+ }
7
+ export { NumberInterfaceComponent };
@@ -0,0 +1,14 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { SelectInterfaceComponent } from 'baklavajs';
3
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
4
+ export interface IAdvancedSelectInterfaceItem<V> {
5
+ text: string;
6
+ value: V;
7
+ }
8
+ export type SelectInterfaceItem<V> = string | IAdvancedSelectInterfaceItem<V>;
9
+ export declare class SelectInterface<V = string> extends CodeNodeInterface<V> {
10
+ component: ComponentOptions;
11
+ items: SelectInterfaceItem<V>[];
12
+ constructor(name: string, value: V, items: SelectInterfaceItem<V>[]);
13
+ }
14
+ export { SelectInterfaceComponent };
@@ -0,0 +1,10 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { SliderInterfaceComponent } from 'baklavajs';
3
+ import { BaseNumericInterface } from '../baseNumericInterface';
4
+ export declare class SliderInterface extends BaseNumericInterface {
5
+ component: ComponentOptions;
6
+ min: number;
7
+ max: number;
8
+ constructor(name: string, value: number, min: number, max: number);
9
+ }
10
+ export { SliderInterfaceComponent };
@@ -0,0 +1,6 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
3
+ export declare class TextInterface extends CodeNodeInterface<string> {
4
+ component: ComponentOptions;
5
+ constructor(name: string, value: string);
6
+ }
@@ -0,0 +1,8 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { TextInputInterfaceComponent } from 'baklavajs';
3
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
4
+ export declare class TextInputInterface extends CodeNodeInterface<string> {
5
+ isString: boolean;
6
+ component: ComponentOptions;
7
+ }
8
+ export { TextInputInterfaceComponent };
@@ -0,0 +1,7 @@
1
+ import { ComponentOptions } from 'vue';
2
+ import { TextareaInputInterfaceComponent } from 'baklavajs';
3
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
4
+ export declare class TextareaInputInterface extends CodeNodeInterface<string> {
5
+ component: ComponentOptions;
6
+ }
7
+ export { TextareaInputInterfaceComponent };
@@ -0,0 +1 @@
1
+ export { default as CodeGraphEditor } from './CodeGraphEditor.vue';
@@ -0,0 +1,9 @@
1
+ export { default as LayoutSidebarLeftCollapse } from './LayoutSidebarLeftCollapse.vue';
2
+ export { default as LayoutSidebarLeftExpand } from './LayoutSidebarLeftExpand.vue';
3
+ export { default as LayoutSidebarRight } from './LayoutSidebarRight.vue';
4
+ export { default as LayoutSidebarRightCollapse } from './LayoutSidebarRightCollapse.vue';
5
+ export { default as LayoutSidebarRightExpand } from './LayoutSidebarRightExpand.vue';
6
+ export { default as Schema } from './Schema.vue';
7
+ export { default as SchemaOff } from './SchemaOff.vue';
8
+ export { default as TrashOff } from './TrashOff.vue';
9
+ export { default as VerticalDots } from './VerticalDots.vue';
@@ -0,0 +1,7 @@
1
+ export * from './codeNode';
2
+ export * from './codeNodeInterfaces';
3
+ export * from './code';
4
+ export * from './components';
5
+ export * from './viewModel';
6
+ export * from './settings';
7
+ export * from './style.scss';
@@ -0,0 +1,10 @@
1
+ import { IViewSettings } from 'baklavajs';
2
+ import { ICodeGraphViewModel } from './viewModel';
3
+ interface ICodeViewSettings extends Partial<IViewSettings> {
4
+ toolbar?: Partial<IViewSettings['toolbar']>;
5
+ nodes?: Partial<IViewSettings['nodes']>;
6
+ sidebar?: Partial<IViewSettings['sidebar']>;
7
+ }
8
+ export declare const addToolbarCommands: (viewModel: ICodeGraphViewModel) => void;
9
+ export declare const DEFAULT_SETTINGS: ICodeViewSettings;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ import { DependencyEngine, Editor, IBaklavaViewModel } from 'baklavajs';
2
+ import { UnwrapRef } from 'vue';
3
+ import { Code } from './code';
4
+ export interface ICodeGraphViewModel extends IBaklavaViewModel {
5
+ code: Code;
6
+ engine: DependencyEngine;
7
+ state: UnwrapRef<{
8
+ modules: Record<string, string>;
9
+ token: symbol | null;
10
+ }>;
11
+ subscribe: () => void;
12
+ unsubscribe: () => void;
13
+ }
14
+ export declare function useCodeGraph(existingEditor?: Editor): ICodeGraphViewModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babsey/code-graph",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "author": "babsey <spreizer@web.de>",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -57,6 +57,7 @@
57
57
  "rimraf": "~6.0",
58
58
  "sass-embedded": "~1.93",
59
59
  "typescript": "~5.9",
60
+ "unplugin-dts": "^1.0.0-beta.6",
60
61
  "vite": "~7.1",
61
62
  "vite-plugin-dts": "~4.5",
62
63
  "vite-plugin-vue-devtools": "~8.0",