@babsey/code-graph 0.10.0 → 0.10.2

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 (26) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/dist/code-graph.js +1948 -1819
  3. package/dist/code-graph.umd.cjs +8 -8
  4. package/dist/codeNode/dynamicCodeNode.d.ts +1 -0
  5. package/dist/codeNodeInterfaces/checkbox/checkboxInterface.d.ts +3 -0
  6. package/dist/codeNodeInterfaces/codeNode/codeNodeInterface.d.ts +3 -4
  7. package/dist/codeNodeInterfaces/codeNodeInput/codeNodeInputInterface.d.ts +3 -1
  8. package/dist/codeNodeInterfaces/codeNodeOutput/codeNodeOutputInterface.d.ts +5 -3
  9. package/dist/codeNodeInterfaces/{codeNode → components}/CodeNodeInterface.vue.d.ts +1 -1
  10. package/dist/codeNodeInterfaces/components/SelectInterface.vue.d.ts +22 -0
  11. package/dist/codeNodeInterfaces/{textInput → components}/TextInputInterface.vue.d.ts +1 -1
  12. package/dist/codeNodeInterfaces/components/TextareaInputInterface.vue.d.ts +26 -0
  13. package/dist/codeNodeInterfaces/components/index.d.ts +4 -0
  14. package/dist/codeNodeInterfaces/createInterface.d.ts +4 -3
  15. package/dist/codeNodeInterfaces/integer/integerInterface.d.ts +1 -0
  16. package/dist/codeNodeInterfaces/listInput/listInputInterface.d.ts +4 -1
  17. package/dist/codeNodeInterfaces/number/numberInterface.d.ts +1 -0
  18. package/dist/codeNodeInterfaces/select/selectInterface.d.ts +2 -1
  19. package/dist/codeNodeInterfaces/slider/sliderInterface.d.ts +1 -1
  20. package/dist/codeNodeInterfaces/textInput/textInputInterface.d.ts +0 -2
  21. package/dist/codeNodeInterfaces/tupleInput/tupleInputInterface.d.ts +5 -2
  22. package/dist/components.d.ts +1 -1
  23. package/dist/icons/ChevronDown.vue.d.ts +3 -0
  24. package/dist/icons/index.d.ts +1 -0
  25. package/package.json +1 -1
  26. package/dist/codeNodeInterfaces/codeNode/index.d.ts +0 -2
@@ -27,6 +27,7 @@ export interface IDynamicCodeNodeDefinition<I, O> extends IDynamicNodeDefinition
27
27
  modules?: string[];
28
28
  onConnected?: () => void;
29
29
  onUnconnected?: () => void;
30
+ onUpdate?: (this: DynamicCodeNode<I, O>, inputs: I, outputs: O) => DynamicNodeUpdateResult;
30
31
  update?: (node?: AbstractCodeNode) => void;
31
32
  variableName?: string;
32
33
  }
@@ -1,5 +1,8 @@
1
+ import { ComponentOptions } from 'vue';
1
2
  import { CodeNodeInputInterface } from '../codeNodeInput/codeNodeInputInterface';
2
3
  export declare class CheckboxInterface extends CodeNodeInputInterface<boolean> {
4
+ component: ComponentOptions;
5
+ componentName: string;
3
6
  constructor(name: string, value: boolean);
4
7
  getValue: () => string;
5
8
  }
@@ -1,16 +1,16 @@
1
1
  import { NodeInterface, INodeInterfaceState } from '@baklavajs/core';
2
- import { UnwrapRef } from 'vue';
3
- import { default as CodeNodeInterfaceComponent } from './CodeNodeInterface.vue';
2
+ import { ComponentOptions, UnwrapRef } from 'vue';
4
3
  import { Code } from '../../code';
5
4
  export interface ICodeNodeInterfaceRefState {
6
5
  optional: boolean;
7
6
  }
8
7
  export declare class CodeNodeInterface<T = unknown> extends NodeInterface<T> {
8
+ component: ComponentOptions;
9
9
  isCodeNode: boolean;
10
10
  code: Code | undefined;
11
+ componentName: string;
11
12
  state: UnwrapRef<ICodeNodeInterfaceRefState>;
12
13
  type: string | null;
13
- constructor(name: string, value: T);
14
14
  get optional(): boolean;
15
15
  get shortId(): string;
16
16
  getValue: () => string;
@@ -18,4 +18,3 @@ export declare class CodeNodeInterface<T = unknown> extends NodeInterface<T> {
18
18
  save(): INodeInterfaceState<T>;
19
19
  setOptional(value: boolean): this;
20
20
  }
21
- export { CodeNodeInterfaceComponent };
@@ -1,5 +1,7 @@
1
- import { CodeNodeInterface } from '../codeNode';
1
+ import { ComponentOptions } from 'vue';
2
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
2
3
  export declare class CodeNodeInputInterface<T = unknown> extends CodeNodeInterface<T> {
4
+ component: ComponentOptions;
3
5
  constructor(name?: string, value?: T);
4
6
  get value(): T;
5
7
  set value(value: T);
@@ -1,9 +1,11 @@
1
+ import { ComponentOptions } from 'vue';
1
2
  import { AbstractCodeNode } from '../../codeNode';
2
- import { CodeNodeInterface } from '../codeNode';
3
- export declare class CodeNodeOutputInterface extends CodeNodeInterface<string> {
3
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
4
+ export declare class CodeNodeOutputInterface extends CodeNodeInterface<unknown> {
5
+ component: ComponentOptions;
4
6
  isCodeNodeOutput: boolean;
5
7
  suffix: string;
6
- constructor(name?: string, value?: string);
8
+ constructor(name?: string, suffix?: string);
7
9
  get codeValue(): string;
8
10
  get node(): AbstractCodeNode | undefined;
9
11
  }
@@ -1,4 +1,4 @@
1
- import { CodeNodeInterface } from './codeNodeInterface';
1
+ import { CodeNodeInterface } from '../codeNode/codeNodeInterface';
2
2
  type __VLS_Props = {
3
3
  intf: CodeNodeInterface;
4
4
  };
@@ -0,0 +1,22 @@
1
+ import { SelectInterface, SelectInterfaceItem } from '../select/selectInterface';
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ intf: {
6
+ type: () => SelectInterface<unknown>;
7
+ required: true;
8
+ };
9
+ }>, {
10
+ el: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
11
+ open: import('vue').Ref<boolean, boolean>;
12
+ selectedItem: import('vue').ComputedRef<SelectInterfaceItem<unknown> | undefined>;
13
+ selectedText: import('vue').ComputedRef<string>;
14
+ setSelected: (item: SelectInterfaceItem<unknown>) => void;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
+ intf: {
17
+ type: () => SelectInterface<unknown>;
18
+ required: true;
19
+ };
20
+ }>> & Readonly<{}>, {}, {}, {
21
+ "i-arrow": import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
22
+ }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { TextInputInterface } from './textInputInterface';
1
+ import { TextInputInterface } from '../textInput/textInputInterface';
2
2
  declare const _default: typeof __VLS_export;
3
3
  export default _default;
4
4
  declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -0,0 +1,26 @@
1
+ import { TextareaInputInterface } from '../textareaInput/textareaInputInterface';
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
+ intf: {
6
+ type: () => TextareaInputInterface;
7
+ required: true;
8
+ };
9
+ modelValue: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ }>, {
14
+ v: import('vue').WritableComputedRef<string, string>;
15
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
+ intf: {
17
+ type: () => TextareaInputInterface;
18
+ required: true;
19
+ };
20
+ modelValue: {
21
+ type: StringConstructor;
22
+ required: true;
23
+ };
24
+ }>> & Readonly<{
25
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,4 @@
1
+ export { default as CodeNodeInterface } from './CodeNodeInterface.vue';
2
+ export { default as TextInputInterface } from './TextInputInterface.vue';
3
+ export { default as SelectInterface } from './SelectInterface.vue';
4
+ export { default as TextareaInputInterface } from './TextareaInputInterface.vue';
@@ -1,12 +1,13 @@
1
- import { CodeNodeInputInterface } from '.';
1
+ import { SelectInterfaceItem } from '@baklavajs/renderer-vue';
2
+ import { CheckboxInterface, IntegerInterface, ListInputInterface, NumberInterface, SelectInterface, SliderInterface, TextInputInterface, TupleInputInterface } from '.';
2
3
  export interface IInterfaceProps {
3
4
  forceUpdate?: boolean;
4
5
  hidden?: boolean;
5
6
  id: string;
6
- items?: string[];
7
+ items?: SelectInterfaceItem<unknown>[];
7
8
  max?: number;
8
9
  min?: number;
9
10
  name?: string;
10
11
  value: unknown;
11
12
  }
12
- export declare const createInterface: (name: string, interfaceProps: IInterfaceProps) => CodeNodeInputInterface;
13
+ export declare const createInterface: (name: string, interfaceProps: IInterfaceProps) => CheckboxInterface | IntegerInterface | ListInputInterface | NumberInterface | SelectInterface<unknown> | SliderInterface | TupleInputInterface | TextInputInterface;
@@ -2,5 +2,6 @@ import { ComponentOptions } from 'vue';
2
2
  import { BaseNumericInterface } from '../baseNumericInterface';
3
3
  export declare class IntegerInterface extends BaseNumericInterface {
4
4
  component: ComponentOptions;
5
+ componentName: string;
5
6
  validate(v: number): boolean;
6
7
  }
@@ -1,5 +1,8 @@
1
+ import { ComponentOptions } from 'vue';
1
2
  import { CodeNodeInputInterface } from '../codeNodeInput/codeNodeInputInterface';
2
3
  export declare class ListInputInterface extends CodeNodeInputInterface {
3
- constructor(name?: string, value?: string);
4
+ component: ComponentOptions;
5
+ componentName: string;
6
+ constructor(name: string, value?: string);
4
7
  getValue: () => string;
5
8
  }
@@ -2,4 +2,5 @@ import { ComponentOptions } from 'vue';
2
2
  import { BaseNumericInterface } from '../baseNumericInterface';
3
3
  export declare class NumberInterface extends BaseNumericInterface {
4
4
  component: ComponentOptions;
5
+ componentName: string;
5
6
  }
@@ -7,6 +7,7 @@ export interface IAdvancedSelectInterfaceItem<V> {
7
7
  export type SelectInterfaceItem<V> = string | IAdvancedSelectInterfaceItem<V>;
8
8
  export declare class SelectInterface<V = string> extends BaseStringInterface {
9
9
  component: ComponentOptions;
10
+ componentName: string;
10
11
  items: SelectInterfaceItem<V>[];
11
- constructor(name: string, value: V, items: SelectInterfaceItem<V>[]);
12
+ constructor(name: string, value: V, items: SelectInterfaceItem<V>[] | undefined);
12
13
  }
@@ -2,8 +2,8 @@ import { ComponentOptions } from 'vue';
2
2
  import { BaseNumericInterface } from '../baseNumericInterface';
3
3
  export declare class SliderInterface extends BaseNumericInterface {
4
4
  component: ComponentOptions;
5
+ componentName: string;
5
6
  min: number;
6
7
  max: number;
7
- constructor(name: string, value: number, min: number, max: number);
8
8
  getValue: () => string;
9
9
  }
@@ -1,7 +1,5 @@
1
1
  import { ComponentOptions } from 'vue';
2
- import { default as TextInputInterfaceComponent } from './TextInputInterface.vue';
3
2
  import { BaseStringInterface } from '../baseStringInterface';
4
3
  export declare class TextInputInterface extends BaseStringInterface {
5
4
  component: ComponentOptions;
6
5
  }
7
- export { TextInputInterfaceComponent };
@@ -1,5 +1,8 @@
1
- import { CodeNodeInputInterface } from '../../main';
1
+ import { ComponentOptions } from 'vue';
2
+ import { CodeNodeInputInterface } from '../codeNodeInput/codeNodeInputInterface';
2
3
  export declare class TupleInputInterface extends CodeNodeInputInterface {
3
- constructor(name?: string, value?: string);
4
+ component: ComponentOptions;
5
+ componentName: string;
6
+ constructor(name: string, value?: string);
4
7
  getValue: () => string;
5
8
  }
@@ -1,2 +1,2 @@
1
1
  export * from './components/index';
2
- export { default as TextInputInterface } from './codeNodeInterfaces/textInput/TextInputInterface.vue';
2
+ export * from './codeNodeInterfaces/components/index';
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  export { default as Check } from './Check.vue';
2
+ export { default as ChevronDown } from './ChevronDown.vue';
2
3
  export { default as CodeVariable } from './CodeVariable.vue';
3
4
  export { default as Copy } from './Copy.vue';
4
5
  export { default as DotsVertical } from './DotsVertical.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babsey/code-graph",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "author": "babsey <spreizer@web.de>",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,2 +0,0 @@
1
- export * from './codeNodeInterface';
2
- export { default as CodeNodeInterfaceComponent } from './CodeNodeInterface.vue';