@nodish/core 0.1.3 → 0.2.0

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 (61) hide show
  1. package/dist/index.d.ts +519 -0
  2. package/dist/{vue.js → index.js} +76 -174
  3. package/package.json +9 -12
  4. package/dist/pack.d.ts +0 -326
  5. package/dist/pack.js +0 -43
  6. package/dist/src/components/AddNodePanel.vue.d.ts +0 -20
  7. package/dist/src/components/GraphInterfacePanel.vue.d.ts +0 -13
  8. package/dist/src/components/GraphNode.vue.d.ts +0 -26
  9. package/dist/src/components/GroupPanel.vue.d.ts +0 -13
  10. package/dist/src/components/InspectorPanel.vue.d.ts +0 -43
  11. package/dist/src/components/NodePanel.vue.d.ts +0 -18
  12. package/dist/src/components/NodePort.vue.d.ts +0 -21
  13. package/dist/src/components/NodeViewer.vue.d.ts +0 -14
  14. package/dist/src/components/WireLayer.vue.d.ts +0 -8
  15. package/dist/src/components/inspector/InspectorCheckboxField.vue.d.ts +0 -10
  16. package/dist/src/components/inspector/InspectorColorField.vue.d.ts +0 -12
  17. package/dist/src/components/inspector/InspectorError.vue.d.ts +0 -5
  18. package/dist/src/components/inspector/InspectorPositionField.vue.d.ts +0 -12
  19. package/dist/src/components/inspector/InspectorSection.vue.d.ts +0 -24
  20. package/dist/src/components/inspector/InspectorWidthField.vue.d.ts +0 -12
  21. package/dist/src/components/layout.d.ts +0 -26
  22. package/dist/src/components/types/NumberWidget.vue.d.ts +0 -15
  23. package/dist/src/components/types/PortValueWidget.vue.d.ts +0 -17
  24. package/dist/src/components/types/ReadonlyWidget.vue.d.ts +0 -9
  25. package/dist/src/components/types/TextWidget.vue.d.ts +0 -15
  26. package/dist/src/components/types/registerDefaultTypeWidgets.d.ts +0 -6
  27. package/dist/src/components/types/registry.d.ts +0 -13
  28. package/dist/src/pack/index.d.ts +0 -5
  29. package/dist/src/store/composite/editContext.d.ts +0 -14
  30. package/dist/src/store/composite/guards.d.ts +0 -7
  31. package/dist/src/store/composite/index.d.ts +0 -12
  32. package/dist/src/store/graph/connect.d.ts +0 -8
  33. package/dist/src/store/graph/createNodeMap.d.ts +0 -22
  34. package/dist/src/store/graph/document.d.ts +0 -25
  35. package/dist/src/store/graph/dynamicPorts.d.ts +0 -9
  36. package/dist/src/store/graph/evaluate.d.ts +0 -18
  37. package/dist/src/store/graph/expandIO.d.ts +0 -2
  38. package/dist/src/store/graph/instance.d.ts +0 -7
  39. package/dist/src/store/graph/pruneConnections.d.ts +0 -2
  40. package/dist/src/store/graph/removeNode.d.ts +0 -3
  41. package/dist/src/store/graph/stacking.d.ts +0 -5
  42. package/dist/src/store/graph/validateGraphTypes.d.ts +0 -2
  43. package/dist/src/store/interface/editor.d.ts +0 -5
  44. package/dist/src/store/interface/graphInterface.d.ts +0 -20
  45. package/dist/src/store/model.d.ts +0 -241
  46. package/dist/src/store/nodes/index.d.ts +0 -2
  47. package/dist/src/store/nodes/io.d.ts +0 -46
  48. package/dist/src/store/nodes/math.d.ts +0 -4
  49. package/dist/src/store/packs/core.d.ts +0 -3
  50. package/dist/src/store/packs/installPack.d.ts +0 -4
  51. package/dist/src/store/registry/defineNode.d.ts +0 -50
  52. package/dist/src/store/registry/defineType.d.ts +0 -31
  53. package/dist/src/store/registry/groups.d.ts +0 -9
  54. package/dist/src/store/registry/index.d.ts +0 -39
  55. package/dist/src/store/types/effectiveWidget.d.ts +0 -4
  56. package/dist/src/store/types/index.d.ts +0 -4
  57. package/dist/src/store/utils/clonePlain.d.ts +0 -1
  58. package/dist/src/vue/attachLoadPack.d.ts +0 -2
  59. package/dist/src/vue/createNodeMap.d.ts +0 -11
  60. package/dist/src/vue/index.d.ts +0 -10
  61. /package/dist/{vue.css → index.css} +0 -0
package/dist/pack.js DELETED
@@ -1,43 +0,0 @@
1
- //#region src/store/registry/defineType.ts
2
- function e(e) {
3
- let n = e.widget, i = r(n);
4
- return {
5
- id: e.id,
6
- label: e.label ?? t(e.id),
7
- color: e.color ?? "#888",
8
- validate: e.validate,
9
- accepts: e.accepts,
10
- defaultValue: e.defaultValue,
11
- widget: n,
12
- parse: e.parse ?? i.parse,
13
- format: e.format ?? i.format,
14
- coerce: e.coerce ?? i.coerce
15
- };
16
- }
17
- function t(e) {
18
- return e.charAt(0).toUpperCase() + e.slice(1);
19
- }
20
- function n(e, t, n) {
21
- let r = Number(e);
22
- return Number.isNaN(r) && (r = 0), t !== void 0 && (r = Math.max(t, r)), n !== void 0 && (r = Math.min(n, r)), r;
23
- }
24
- function r(e) {
25
- if (!e) return {
26
- parse: (e) => e,
27
- format: (e) => e == null ? "" : String(e)
28
- };
29
- switch (e.kind) {
30
- case "number": return {
31
- parse: (e) => Number(e),
32
- format: (e) => e == null ? "" : String(e),
33
- coerce: (t) => n(t, e.min, e.max)
34
- };
35
- case "text": return {
36
- parse: (e) => e,
37
- format: (e) => e == null ? "" : String(e)
38
- };
39
- case "custom": return { format: (e) => e == null ? "" : String(e) };
40
- }
41
- }
42
- //#endregion
43
- export { e as defineType };
@@ -1,20 +0,0 @@
1
- import { NodeMap } from '../store/model';
2
- type __VLS_Props = {
3
- map: NodeMap;
4
- screen: {
5
- x: number;
6
- y: number;
7
- };
8
- };
9
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
- select: (typeId: string) => any;
11
- close: () => any;
12
- addComposite: () => any;
13
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- onSelect?: ((typeId: string) => any) | undefined;
15
- onClose?: (() => any) | undefined;
16
- onAddComposite?: (() => any) | undefined;
17
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
18
- searchEl: HTMLInputElement;
19
- }, HTMLDivElement>;
20
- export default _default;
@@ -1,13 +0,0 @@
1
- import { GraphInterface, TypeRegistry } from '../store/model';
2
- import { InterfaceMutator } from '../store/interface/editor';
3
- type __VLS_Props = {
4
- graphInterface: GraphInterface;
5
- mode: "parameters" | "returns";
6
- revision: number;
7
- typeIds: string[];
8
- types: TypeRegistry;
9
- commitError?: string;
10
- applyMutation: (mutate: InterfaceMutator) => string[];
11
- };
12
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
13
- export default _default;
@@ -1,26 +0,0 @@
1
- import { DefiniteNode, NodeMap, Port, PortRef } from '../store/model';
2
- import { Values } from '../store/graph/evaluate';
3
- type __VLS_Props = {
4
- node: DefiniteNode;
5
- map: NodeMap;
6
- zoom?: number;
7
- ioWidgets?: boolean;
8
- ioResults?: Values;
9
- selected?: boolean;
10
- selectedIds?: ReadonlySet<string>;
11
- error?: string;
12
- };
13
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
- select: (id: string, shiftKey: boolean) => any;
15
- connectStart: (ref: PortRef, port: Port, ev: PointerEvent) => any;
16
- drillIn: (id: string) => any;
17
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
18
- onSelect?: ((id: string, shiftKey: boolean) => any) | undefined;
19
- onConnectStart?: ((ref: PortRef, port: Port, ev: PointerEvent) => any) | undefined;
20
- onDrillIn?: ((id: string) => any) | undefined;
21
- }>, {
22
- zoom: number;
23
- ioWidgets: boolean;
24
- selected: boolean;
25
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
26
- export default _default;
@@ -1,13 +0,0 @@
1
- import { DefiniteNode } from '../store/model';
2
- type __VLS_Props = {
3
- composite: DefiniteNode | null;
4
- ioWidgets: boolean;
5
- };
6
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
- up: () => any;
8
- "update:ioWidgets": (value: boolean) => any;
9
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- onUp?: (() => any) | undefined;
11
- "onUpdate:ioWidgets"?: ((value: boolean) => any) | undefined;
12
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
- export default _default;
@@ -1,43 +0,0 @@
1
- type __VLS_Props = {
2
- title: string;
3
- titlePlaceholder?: string;
4
- headerColor?: string;
5
- showUp?: boolean;
6
- staticTitle?: boolean;
7
- /** Remove body padding (e.g. scrollable lists). */
8
- flush?: boolean;
9
- /** Constrain height and let the body scroll internally. */
10
- fill?: boolean;
11
- };
12
- declare function __VLS_template(): {
13
- attrs: Partial<{}>;
14
- slots: {
15
- title?(_: {}): any;
16
- 'header-actions'?(_: {}): any;
17
- default?(_: {}): any;
18
- };
19
- refs: {};
20
- rootEl: HTMLDivElement;
21
- };
22
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
- "update:title": (value: string) => any;
25
- up: () => any;
26
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
27
- "onUpdate:title"?: ((value: string) => any) | undefined;
28
- onUp?: (() => any) | undefined;
29
- }>, {
30
- fill: boolean;
31
- headerColor: string;
32
- titlePlaceholder: string;
33
- showUp: boolean;
34
- staticTitle: boolean;
35
- flush: boolean;
36
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
37
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
38
- export default _default;
39
- type __VLS_WithTemplateSlots<T, S> = T & {
40
- new (): {
41
- $slots: S;
42
- };
43
- };
@@ -1,18 +0,0 @@
1
- import { DefiniteNode, GraphInterface, IndefiniteNode, NodeMap } from '../store/model';
2
- import { InterfaceMutator } from '../store/interface/editor';
3
- type __VLS_Props = {
4
- map: NodeMap;
5
- nodes: DefiniteNode[];
6
- def: IndefiniteNode | null;
7
- error?: string;
8
- graphInterface: GraphInterface;
9
- interfaceRevision: number;
10
- interfaceCommitError?: string;
11
- applyInterfaceMutation: (mutate: InterfaceMutator) => string[];
12
- };
13
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
- "update:label": (value: string) => any;
15
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
16
- "onUpdate:label"?: ((value: string) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
- export default _default;
@@ -1,21 +0,0 @@
1
- import { Port, PortTypeDefinition } from '../store/model';
2
- type __VLS_Props = {
3
- port: Port;
4
- typeDef?: PortTypeDefinition;
5
- color: string;
6
- side: "in" | "out";
7
- connected?: boolean;
8
- widgetMode?: "auto" | "editable" | "readonly";
9
- displayValue?: unknown;
10
- };
11
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- connectStart: (port: Port, ev: PointerEvent) => any;
13
- valueChange: (port: Port) => any;
14
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
15
- onConnectStart?: ((port: Port, ev: PointerEvent) => any) | undefined;
16
- onValueChange?: ((port: Port) => any) | undefined;
17
- }>, {
18
- connected: boolean;
19
- widgetMode: "auto" | "editable" | "readonly";
20
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
21
- export default _default;
@@ -1,14 +0,0 @@
1
- import { NodeMap } from '../store/model';
2
- type __VLS_Props = {
3
- map: NodeMap;
4
- ioWidgets?: boolean;
5
- };
6
- declare function resetView(): void;
7
- declare const _default: import('vue').DefineComponent<__VLS_Props, {
8
- resetView: typeof resetView;
9
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
- ioWidgets: boolean;
11
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
12
- viewerEl: HTMLDivElement;
13
- }, HTMLDivElement>;
14
- export default _default;
@@ -1,8 +0,0 @@
1
- import { NodeMap } from '../store/model';
2
- type __VLS_Props = {
3
- map: NodeMap;
4
- pendingPath?: string | null;
5
- slicePath?: string | null;
6
- };
7
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, SVGSVGElement>;
8
- export default _default;
@@ -1,10 +0,0 @@
1
- type __VLS_Props = {
2
- modelValue: boolean;
3
- label: string;
4
- };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
- "update:modelValue": (value: boolean) => any;
7
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
9
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
10
- export default _default;
@@ -1,12 +0,0 @@
1
- type __VLS_Props = {
2
- modelValue: string;
3
- label?: string;
4
- };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
- "update:modelValue": (value: string) => any;
7
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
9
- }>, {
10
- label: string;
11
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
12
- export default _default;
@@ -1,5 +0,0 @@
1
- type __VLS_Props = {
2
- message: string;
3
- };
4
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLParagraphElement>;
5
- export default _default;
@@ -1,12 +0,0 @@
1
- type __VLS_Props = {
2
- x: number;
3
- y: number;
4
- };
5
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
6
- "update:x": (value: number) => any;
7
- "update:y": (value: number) => any;
8
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
- "onUpdate:x"?: ((value: number) => any) | undefined;
10
- "onUpdate:y"?: ((value: number) => any) | undefined;
11
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
12
- export default _default;
@@ -1,24 +0,0 @@
1
- type __VLS_Props = {
2
- title: string;
3
- divided?: boolean;
4
- };
5
- declare function __VLS_template(): {
6
- attrs: Partial<{}>;
7
- slots: {
8
- actions?(_: {}): any;
9
- default?(_: {}): any;
10
- };
11
- refs: {};
12
- rootEl: HTMLDivElement;
13
- };
14
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
- divided: boolean;
17
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
18
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
19
- export default _default;
20
- type __VLS_WithTemplateSlots<T, S> = T & {
21
- new (): {
22
- $slots: S;
23
- };
24
- };
@@ -1,12 +0,0 @@
1
- type __VLS_Props = {
2
- modelValue: number;
3
- min: number;
4
- max: number;
5
- accentColor: string;
6
- };
7
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
- "update:modelValue": (value: number) => any;
9
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
10
- "onUpdate:modelValue"?: ((value: number) => any) | undefined;
11
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
12
- export default _default;
@@ -1,26 +0,0 @@
1
- import { DefiniteNode, Port, PortTypeDefinition } from '../store/model';
2
- export declare const NODE_WIDTH = 100;
3
- export declare const NODE_MIN_WIDTH = 60;
4
- export declare const NODE_MAX_WIDTH = 320;
5
- export declare const HEADER_H = 20;
6
- export declare const ROW_H = 20;
7
- export declare const ROW_MIN_H = 20;
8
- export declare const ROW_MAX_H = 240;
9
- export declare const NODE_FONT_SIZE = 11;
10
- export declare const NODE_PADDING_X = 6;
11
- export type PortTypeLookup = (port: Port) => PortTypeDefinition | undefined;
12
- /** Per-port row height in px (customProps.rowHeight wins over widget defaults). */
13
- export declare function portRowHeight(port: Port, typeDef?: PortTypeDefinition): number;
14
- export declare function nodeWidth(node: DefiniteNode): number;
15
- export declare function rowCount(node: DefiniteNode): number;
16
- export declare function nodeHeight(node: DefiniteNode, lookup?: PortTypeLookup): number;
17
- export declare function rowY(index: number): number;
18
- export type Point = {
19
- x: number;
20
- y: number;
21
- };
22
- export declare function portPosition(node: DefiniteNode, portId: string, lookup?: PortTypeLookup): Point | null;
23
- export declare function wireControls(a: Point, b: Point): [Point, Point];
24
- export declare function wirePath(a: Point, b: Point): string;
25
- export declare function sampleWire(a: Point, b: Point, segments?: number): Point[];
26
- export declare function segmentsIntersect(p1: Point, p2: Point, p3: Point, p4: Point): boolean;
@@ -1,15 +0,0 @@
1
- import { Port, PortTypeDefinition, TypeWidgetSpec } from '../../store/model';
2
- type __VLS_Props = {
3
- port: Port;
4
- typeDef?: PortTypeDefinition;
5
- effectiveWidget?: TypeWidgetSpec;
6
- placeholder: string;
7
- };
8
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
- "update:value": (value: unknown) => any;
10
- commit: () => any;
11
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
- "onUpdate:value"?: ((value: unknown) => any) | undefined;
13
- onCommit?: (() => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
15
- export default _default;
@@ -1,17 +0,0 @@
1
- import { Port, PortTypeDefinition, TypeWidgetSpec } from '../../store/model';
2
- type __VLS_Props = {
3
- port: Port;
4
- typeDef?: PortTypeDefinition;
5
- effectiveWidget?: TypeWidgetSpec;
6
- mode: "editable" | "readonly";
7
- displayValue?: unknown;
8
- placeholder: string;
9
- };
10
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
11
- "update:value": (value: unknown) => any;
12
- commit: () => any;
13
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
14
- "onUpdate:value"?: ((value: unknown) => any) | undefined;
15
- onCommit?: (() => any) | undefined;
16
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
- export default _default;
@@ -1,9 +0,0 @@
1
- import { Port, PortTypeDefinition, TypeWidgetSpec } from '../../store/model';
2
- type __VLS_Props = {
3
- port: Port;
4
- typeDef?: PortTypeDefinition;
5
- effectiveWidget?: TypeWidgetSpec;
6
- displayValue?: unknown;
7
- };
8
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
9
- export default _default;
@@ -1,15 +0,0 @@
1
- import { Port, PortTypeDefinition, TypeWidgetSpec } from '../../store/model';
2
- type __VLS_Props = {
3
- port: Port;
4
- typeDef?: PortTypeDefinition;
5
- effectiveWidget?: TypeWidgetSpec;
6
- placeholder: string;
7
- };
8
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
- "update:value": (value: unknown) => any;
10
- commit: () => any;
11
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
- "onUpdate:value"?: ((value: unknown) => any) | undefined;
13
- onCommit?: (() => any) | undefined;
14
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
- export default _default;
@@ -1,6 +0,0 @@
1
- /**
2
- * Register built-in Vue widgets for the core `number` and `string` types.
3
- * Call once at app startup before loading packs that rely on those widgets.
4
- */
5
- export declare function registerDefaultTypeWidgets(): void;
6
- export { registerComponentWidget, registerTypeWidget } from './registry';
@@ -1,13 +0,0 @@
1
- import { Component } from 'vue';
2
- import { PortTypeDefinition, TypeWidgetSpec } from '../../store/model';
3
- /**
4
- * Bind a Vue component to all editable ports of a type id.
5
- * Overrides the generic widget for that type.
6
- */
7
- export declare function registerTypeWidget(typeId: string, component: Component): void;
8
- /**
9
- * Bind a Vue component to a custom widget id
10
- * ({@link TypeWidgetSpec} `kind: "custom"`).
11
- */
12
- export declare function registerComponentWidget(componentId: string, component: Component): void;
13
- export declare function resolveTypeWidget(typeDef: PortTypeDefinition | undefined, effectiveWidget: TypeWidgetSpec | undefined, mode: "editable" | "readonly"): Component;
@@ -1,5 +0,0 @@
1
- export type { DynamicPortsSpec, IOSpec, NodeSpec, NodeSpecRegistry, PortSpec, } from '../store/registry/defineNode';
2
- export { defineType } from '../store/registry/defineType';
3
- export type { TypeSpec } from '../store/registry/defineType';
4
- export type { NodePack, PackSetupContext } from '../store/registry';
5
- export type { GraphPortSpec, IndefiniteNode, NodeLocation, PortDefinition, PortTypeDefinition, TypeWidgetSpec, } from '../store/model';
@@ -1,14 +0,0 @@
1
- import { DefiniteNode, NodeMap } from '../model';
2
- import { UpdateGraphInterfaceOptions } from '../interface/graphInterface';
3
- export interface EditFrame {
4
- compositeNodeId: string;
5
- }
6
- export interface EditContext {
7
- activeMap: NodeMap;
8
- interfaceOptions?: UpdateGraphInterfaceOptions;
9
- }
10
- export declare function compositeAtDepth(root: NodeMap, stack: EditFrame[], depth: number): DefiniteNode | null;
11
- export declare function currentComposite(root: NodeMap, stack: EditFrame[]): DefiniteNode | null;
12
- export declare function resolveEditContext(root: NodeMap, stack: EditFrame[]): EditContext;
13
- export declare function compositeLabel(node: DefiniteNode): string;
14
- export declare function breadcrumbPath(root: NodeMap, stack: EditFrame[]): string[];
@@ -1,7 +0,0 @@
1
- import { DefiniteNode, NodeGraph, NodeMap } from '../model';
2
- import { EditFrame } from './editContext';
3
- export declare function graphContainsNodeId(graph: NodeGraph, id: string, deep: boolean): boolean;
4
- export declare function ancestorCompositeIds(stack: EditFrame[]): string[];
5
- export declare function validateCompositePlacement(root: NodeMap, stack: EditFrame[], targetGraph: NodeGraph): string | null;
6
- export declare function validateCompositeDrillIn(root: NodeMap, stack: EditFrame[], target: DefiniteNode): string | null;
7
- export declare function wouldCreateCompositeCycle(root: NodeMap, stack: EditFrame[], node: DefiniteNode, hostGraph: NodeGraph): string | null;
@@ -1,12 +0,0 @@
1
- import { NodeSpec } from '../registry/defineNode';
2
- import { UpdateGraphInterfaceOptions } from '../interface/graphInterface';
3
- import { DefiniteNode, GraphInterface, NodeLocation, NodeMap } from '../model';
4
- export declare const COMPOSITE_TYPE = "composite/group";
5
- export type { UpdateGraphInterfaceOptions };
6
- export declare const compositeNode: NodeSpec;
7
- export declare function buildNestedMap(parent: NodeMap, composite: DefiniteNode): NodeMap;
8
- export declare function persistNestedMap(parent: NodeMap, composite: DefiniteNode, nested: NodeMap): void;
9
- export declare function reconcileCompositePorts(map: NodeMap, composite: DefiniteNode): void;
10
- export declare function applyGraphInterfaceUpdate(map: NodeMap, iface: GraphInterface, options?: UpdateGraphInterfaceOptions): string[];
11
- export declare function instantiateComposite(parent: NodeMap, location: NodeLocation): DefiniteNode;
12
- export declare function isCompositeNode(node: DefiniteNode): boolean;
@@ -1,8 +0,0 @@
1
- import { Connection, NodeId, NodeMap, PortRef, PortTypeId } from '../model';
2
- export declare function assignable(map: NodeMap, from: PortTypeId, to: PortTypeId): boolean;
3
- export declare function ancestorNodeIds(map: NodeMap, nodeId: NodeId): NodeId[];
4
- export declare function descendantNodeIds(map: NodeMap, nodeId: NodeId): NodeId[];
5
- export declare function wouldCreateCycle(map: NodeMap, from: PortRef, to: PortRef): boolean;
6
- export declare function canConnect(map: NodeMap, from: PortRef, to: PortRef): boolean;
7
- export declare function addConnection(map: NodeMap, from: PortRef, to: PortRef): Connection | null;
8
- export declare function removeConnection(map: NodeMap, id: string): void;
@@ -1,22 +0,0 @@
1
- import { GraphDocument, GraphInterface, NodeGraph, NodeMap, TypeRegistry } from '../model';
2
- import { NodePack } from '../registry';
3
- import { NodeSpecRegistry } from '../registry/defineNode';
4
- /** Options for the vue entry `createNodeMap()`. */
5
- export interface CreateNodeMapInit {
6
- /** Initial graph contents. Defaults to empty nodes and connections. */
7
- graph?: NodeGraph;
8
- /** Pre-loaded pack ids (usually leave empty and use {@link NodeMap.loadPack}). */
9
- extensions?: string[];
10
- /** Graph boundary ports; defaults to `a`/`b` in, `result` out. */
11
- graphInterface?: GraphInterface;
12
- /** Register the built-in `@local/core` pack. Default: `true`. */
13
- defaultPack?: boolean;
14
- /** Extra types to merge into the registry at creation time. */
15
- types?: TypeRegistry;
16
- /** Extra node types to merge into the registry at creation time (authoring form). */
17
- nodeTypes?: NodeSpecRegistry;
18
- /** Packs to load immediately after creation (via {@link NodeMap.loadPack}). */
19
- packs?: NodePack[];
20
- }
21
- export declare function createNodeMapBase(init?: CreateNodeMapInit): NodeMap;
22
- export type { GraphDocument };
@@ -1,25 +0,0 @@
1
- import { GraphDocument, NodeMap } from '../model';
2
- /**
3
- * Serialize the current workspace to a {@link GraphDocument}.
4
- * Alias of {@link exportGraph}.
5
- */
6
- export declare function serializeDocument(map: NodeMap): GraphDocument;
7
- /** Serialize the current workspace to a {@link GraphDocument}. */
8
- export declare function exportGraph(map: NodeMap): GraphDocument;
9
- /**
10
- * Parse a JSON string into a {@link GraphDocument}.
11
- * @throws When JSON is invalid or required fields are missing.
12
- */
13
- export declare function parseGraphDocument(json: string): GraphDocument;
14
- /**
15
- * Validate a document against the current map without applying it.
16
- * @returns Human-readable error messages (empty when valid).
17
- */
18
- export declare function validateDocument(map: NodeMap, doc: GraphDocument): string[];
19
- /**
20
- * Replace the map's graph and interface from a document.
21
- * @returns Errors from extension checks before apply, then validation errors after apply.
22
- */
23
- export declare function applyDocument(map: NodeMap, doc: GraphDocument): string[];
24
- /** Replace the map's graph from a document. Alias of {@link applyDocument}. */
25
- export declare function importGraph(map: NodeMap, doc: GraphDocument): string[];
@@ -1,9 +0,0 @@
1
- import { DefiniteNode, IndefiniteNode, NodeIO, NodeIODefinition, NodeMap, PortDirection } from '../model';
2
- export declare function resolveNodePorts(def: IndefiniteNode, params: Record<string, unknown>): {
3
- inputs: NodeIODefinition;
4
- outputs: NodeIODefinition;
5
- };
6
- export declare function nodeParams(node: DefiniteNode): Record<string, unknown>;
7
- export declare function defaultParams(def: IndefiniteNode): Record<string, unknown>;
8
- export declare function reconcileSide(old: NodeIO, defs: NodeIODefinition, direction: PortDirection): NodeIO;
9
- export declare function reconcilePorts(map: NodeMap, node: DefiniteNode): void;
@@ -1,18 +0,0 @@
1
- import { NodeId, NodeMap } from '../model';
2
- /** Port values keyed by port name. */
3
- export type Values = Record<string, unknown>;
4
- /** Evaluation errors keyed by {@link NodeId}. */
5
- export type NodeErrors = Record<NodeId, string>;
6
- export interface GraphRunResult {
7
- /** Output port values from the graph's Output node, keyed by port name. */
8
- values: Values;
9
- /** First error per node encountered during evaluation. */
10
- errors: NodeErrors;
11
- }
12
- /**
13
- * Evaluate the graph as a function: supply values for the Input node's output
14
- * ports (keyed by port name) and receive the Output node's input port values.
15
- *
16
- * Uses pull-based recursive evaluation with per-node memoization and cycle detection.
17
- */
18
- export declare function runGraph(map: NodeMap, inputs?: Values): GraphRunResult;
@@ -1,2 +0,0 @@
1
- import { GraphPortSpec, NodeIODefinition } from '../model';
2
- export declare function expandIO(spec: Record<string, GraphPortSpec> | undefined): NodeIODefinition;
@@ -1,7 +0,0 @@
1
- import { DefiniteNode, IndefiniteNode, NodeLocation } from '../model';
2
- /**
3
- * Create a placed {@link DefiniteNode} from a node type, generating fresh port ids.
4
- * For dynamic nodes, the initial port set comes from {@link IndefiniteNode.resolvePorts}
5
- * seeded with the definition's default parameter values.
6
- */
7
- export declare function instantiate(def: IndefiniteNode, location: NodeLocation): DefiniteNode;
@@ -1,2 +0,0 @@
1
- import { DefiniteNode, NodeMap } from '../model';
2
- export declare function pruneConnectionsForNode(map: NodeMap, node: DefiniteNode): void;
@@ -1,3 +0,0 @@
1
- import { NodeId, NodeMap } from '../model';
2
- export declare function canRemoveNode(map: NodeMap, id: NodeId): boolean;
3
- export declare function removeNode(map: NodeMap, id: NodeId): void;
@@ -1,5 +0,0 @@
1
- import { NodeId, NodeMap } from '../model';
2
- export declare function topZ(map: NodeMap): number;
3
- export declare function normalizeStackingOrder(map: NodeMap): void;
4
- export declare function ensureStackingOrder(map: NodeMap): void;
5
- export declare function bringToFront(map: NodeMap, id: NodeId): void;
@@ -1,2 +0,0 @@
1
- import { NodeGraph, NodeMap } from '../model';
2
- export declare function validateGraphTypes(map: NodeMap, graph: NodeGraph, errors?: string[]): string[];
@@ -1,5 +0,0 @@
1
- import { GraphInterface, NodeMap } from '../model';
2
- import { EditFrame } from '../composite/editContext';
3
- export type InterfaceMutator = (iface: GraphInterface) => void;
4
- export declare function canonicalGraphInterface(root: NodeMap, stack: EditFrame[]): GraphInterface;
5
- export declare function applyInterfaceMutation(root: NodeMap, stack: EditFrame[], mutate: InterfaceMutator): string[];
@@ -1,20 +0,0 @@
1
- import { DefiniteNode, GraphInterface, GraphPortSpec, NodeMap } from '../model';
2
- import { expandIO } from '../graph/expandIO';
3
- export declare const PORT_NAME_RE: RegExp;
4
- export declare function validateGraphInterface(map: NodeMap, iface: GraphInterface): string[];
5
- export declare function cloneGraphInterface(iface: GraphInterface): GraphInterface;
6
- export declare function uniquePortName(existing: Record<string, GraphPortSpec> | undefined, base?: string): string;
7
- export declare function addParameter(iface: GraphInterface, name?: string): GraphInterface;
8
- export declare function addReturn(iface: GraphInterface, name?: string): GraphInterface;
9
- export declare function removeParameter(iface: GraphInterface, name: string): GraphInterface;
10
- export declare function removeReturn(iface: GraphInterface, name: string): GraphInterface;
11
- export declare function renameParameter(iface: GraphInterface, oldName: string, newName: string): GraphInterface;
12
- export declare function renameReturn(iface: GraphInterface, oldName: string, newName: string): GraphInterface;
13
- export declare function setParameterSpec(iface: GraphInterface, name: string, spec: GraphPortSpec): GraphInterface;
14
- export declare function setReturnSpec(iface: GraphInterface, name: string, spec: GraphPortSpec): GraphInterface;
15
- export interface UpdateGraphInterfaceOptions {
16
- /** When editing a nested graph, sync ports on the parent composite instance. */
17
- ownerComposite?: DefiniteNode;
18
- parentMap?: NodeMap;
19
- }
20
- export { expandIO };