@decaf-ts/ui-decorators 0.16.1 → 0.17.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.
- package/dist/ui-decorators.cjs +1 -1
- package/lib/cjs/graph/decorators.cjs +24 -0
- package/lib/cjs/graph/decorators.cjs.map +1 -1
- package/lib/cjs/graph/index.cjs +1 -0
- package/lib/cjs/graph/index.cjs.map +1 -1
- package/lib/cjs/graph/reader.cjs +96 -5
- package/lib/cjs/graph/reader.cjs.map +1 -1
- package/lib/cjs/graph/snapshot.cjs +289 -0
- package/lib/cjs/graph/snapshot.cjs.map +1 -0
- package/lib/cjs/index.cjs +3 -3
- package/lib/esm/graph/decorators.js +23 -0
- package/lib/esm/graph/decorators.js.map +1 -1
- package/lib/esm/graph/index.js +1 -0
- package/lib/esm/graph/index.js.map +1 -1
- package/lib/esm/graph/reader.js +91 -5
- package/lib/esm/graph/reader.js.map +1 -1
- package/lib/esm/graph/snapshot.js +278 -0
- package/lib/esm/graph/snapshot.js.map +1 -0
- package/lib/esm/index.js +3 -3
- package/lib/types/graph/constants.d.cts +34 -0
- package/lib/types/graph/constants.d.mts +34 -0
- package/lib/types/graph/decorators.d.cts +2 -1
- package/lib/types/graph/decorators.d.mts +2 -1
- package/lib/types/graph/index.d.cts +1 -0
- package/lib/types/graph/index.d.mts +1 -0
- package/lib/types/graph/reader.d.cts +6 -1
- package/lib/types/graph/reader.d.mts +6 -1
- package/lib/types/graph/snapshot.d.cts +106 -0
- package/lib/types/graph/snapshot.d.mts +106 -0
- package/lib/types/graph/types.d.cts +2 -1
- package/lib/types/graph/types.d.mts +2 -1
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/package.json +1 -1
|
@@ -32,15 +32,39 @@ export type GraphNodeMetadata = {
|
|
|
32
32
|
connectionRules?: GraphConnectionRule;
|
|
33
33
|
metadata?: Record<string, unknown>;
|
|
34
34
|
};
|
|
35
|
+
export type GraphWorkflowNodeMetadata = {
|
|
36
|
+
id: string;
|
|
37
|
+
kind?: GraphNodeKind;
|
|
38
|
+
label?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
node?: unknown;
|
|
41
|
+
metadata?: Record<string, unknown>;
|
|
42
|
+
};
|
|
43
|
+
export type GraphWorkflowRelationMetadata = {
|
|
44
|
+
source: string | unknown;
|
|
45
|
+
sourcePort?: string;
|
|
46
|
+
target: string | unknown;
|
|
47
|
+
targetPort?: string;
|
|
48
|
+
label?: string;
|
|
49
|
+
metadata?: Record<string, unknown>;
|
|
50
|
+
};
|
|
51
|
+
export type GraphWorkflowMetadata = GraphNodeMetadata & {
|
|
52
|
+
inputs?: GraphPortDefinition[];
|
|
53
|
+
outputs?: GraphPortDefinition[];
|
|
54
|
+
nodes?: GraphWorkflowNodeMetadata[];
|
|
55
|
+
relations?: GraphWorkflowRelationMetadata[];
|
|
56
|
+
};
|
|
35
57
|
export type GraphPortMetadata = {
|
|
36
58
|
direction: PortDirection;
|
|
37
59
|
connectionRules?: GraphConnectionRule;
|
|
38
60
|
visible?: boolean;
|
|
39
61
|
handle?: string;
|
|
62
|
+
expand?: boolean;
|
|
40
63
|
metadata?: Record<string, unknown>;
|
|
41
64
|
};
|
|
42
65
|
export type GraphPortDefinition = {
|
|
43
66
|
property: string;
|
|
67
|
+
path?: string;
|
|
44
68
|
direction: PortDirection;
|
|
45
69
|
name: string;
|
|
46
70
|
label: string;
|
|
@@ -53,6 +77,9 @@ export type GraphPortDefinition = {
|
|
|
53
77
|
validation?: Record<string, any>;
|
|
54
78
|
graph?: GraphPortMetadata;
|
|
55
79
|
connectionRules?: GraphConnectionRule;
|
|
80
|
+
composite?: boolean;
|
|
81
|
+
children?: GraphPortDefinition[];
|
|
82
|
+
model?: string;
|
|
56
83
|
};
|
|
57
84
|
export type GraphNodeDefinition = {
|
|
58
85
|
name: string;
|
|
@@ -72,3 +99,10 @@ export type GraphNodeDefinition = {
|
|
|
72
99
|
graph?: GraphNodeMetadata;
|
|
73
100
|
ports: GraphPortDefinition[];
|
|
74
101
|
};
|
|
102
|
+
export type GraphWorkflowDefinition = GraphNodeDefinition & {
|
|
103
|
+
inputs: GraphPortDefinition[];
|
|
104
|
+
outputs: GraphPortDefinition[];
|
|
105
|
+
nodes: GraphWorkflowNodeMetadata[];
|
|
106
|
+
relations: GraphWorkflowRelationMetadata[];
|
|
107
|
+
workflow: GraphWorkflowMetadata;
|
|
108
|
+
};
|
|
@@ -32,15 +32,39 @@ export type GraphNodeMetadata = {
|
|
|
32
32
|
connectionRules?: GraphConnectionRule;
|
|
33
33
|
metadata?: Record<string, unknown>;
|
|
34
34
|
};
|
|
35
|
+
export type GraphWorkflowNodeMetadata = {
|
|
36
|
+
id: string;
|
|
37
|
+
kind?: GraphNodeKind;
|
|
38
|
+
label?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
node?: unknown;
|
|
41
|
+
metadata?: Record<string, unknown>;
|
|
42
|
+
};
|
|
43
|
+
export type GraphWorkflowRelationMetadata = {
|
|
44
|
+
source: string | unknown;
|
|
45
|
+
sourcePort?: string;
|
|
46
|
+
target: string | unknown;
|
|
47
|
+
targetPort?: string;
|
|
48
|
+
label?: string;
|
|
49
|
+
metadata?: Record<string, unknown>;
|
|
50
|
+
};
|
|
51
|
+
export type GraphWorkflowMetadata = GraphNodeMetadata & {
|
|
52
|
+
inputs?: GraphPortDefinition[];
|
|
53
|
+
outputs?: GraphPortDefinition[];
|
|
54
|
+
nodes?: GraphWorkflowNodeMetadata[];
|
|
55
|
+
relations?: GraphWorkflowRelationMetadata[];
|
|
56
|
+
};
|
|
35
57
|
export type GraphPortMetadata = {
|
|
36
58
|
direction: PortDirection;
|
|
37
59
|
connectionRules?: GraphConnectionRule;
|
|
38
60
|
visible?: boolean;
|
|
39
61
|
handle?: string;
|
|
62
|
+
expand?: boolean;
|
|
40
63
|
metadata?: Record<string, unknown>;
|
|
41
64
|
};
|
|
42
65
|
export type GraphPortDefinition = {
|
|
43
66
|
property: string;
|
|
67
|
+
path?: string;
|
|
44
68
|
direction: PortDirection;
|
|
45
69
|
name: string;
|
|
46
70
|
label: string;
|
|
@@ -53,6 +77,9 @@ export type GraphPortDefinition = {
|
|
|
53
77
|
validation?: Record<string, any>;
|
|
54
78
|
graph?: GraphPortMetadata;
|
|
55
79
|
connectionRules?: GraphConnectionRule;
|
|
80
|
+
composite?: boolean;
|
|
81
|
+
children?: GraphPortDefinition[];
|
|
82
|
+
model?: string;
|
|
56
83
|
};
|
|
57
84
|
export type GraphNodeDefinition = {
|
|
58
85
|
name: string;
|
|
@@ -72,3 +99,10 @@ export type GraphNodeDefinition = {
|
|
|
72
99
|
graph?: GraphNodeMetadata;
|
|
73
100
|
ports: GraphPortDefinition[];
|
|
74
101
|
};
|
|
102
|
+
export type GraphWorkflowDefinition = GraphNodeDefinition & {
|
|
103
|
+
inputs: GraphPortDefinition[];
|
|
104
|
+
outputs: GraphPortDefinition[];
|
|
105
|
+
nodes: GraphWorkflowNodeMetadata[];
|
|
106
|
+
relations: GraphWorkflowRelationMetadata[];
|
|
107
|
+
workflow: GraphWorkflowMetadata;
|
|
108
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PortDirection } from "./constants.d.cts";
|
|
2
|
-
import type { GraphNodeMetadata, GraphPortMetadata } from "./constants.d.cts";
|
|
2
|
+
import type { GraphNodeMetadata, GraphPortMetadata, GraphWorkflowMetadata } from "./constants.d.cts";
|
|
3
3
|
export declare function node(tag?: string, graph?: GraphNodeMetadata, props?: Record<string, any>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
4
|
+
export declare function graph(tag?: string, graph?: GraphWorkflowMetadata, props?: Record<string, any>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
4
5
|
export declare function port(direction: PortDirection, graph?: Partial<Omit<GraphPortMetadata, "direction">>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
5
6
|
export declare function input(graph?: Partial<Omit<GraphPortMetadata, "direction">>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
6
7
|
export declare function output(graph?: Partial<Omit<GraphPortMetadata, "direction">>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PortDirection } from "./constants.d.mts";
|
|
2
|
-
import type { GraphNodeMetadata, GraphPortMetadata } from "./constants.d.mts";
|
|
2
|
+
import type { GraphNodeMetadata, GraphPortMetadata, GraphWorkflowMetadata } from "./constants.d.mts";
|
|
3
3
|
export declare function node(tag?: string, graph?: GraphNodeMetadata, props?: Record<string, any>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
4
|
+
export declare function graph(tag?: string, graph?: GraphWorkflowMetadata, props?: Record<string, any>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
4
5
|
export declare function port(direction: PortDirection, graph?: Partial<Omit<GraphPortMetadata, "direction">>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
5
6
|
export declare function input(graph?: Partial<Omit<GraphPortMetadata, "direction">>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
6
7
|
export declare function output(graph?: Partial<Omit<GraphPortMetadata, "direction">>): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { Constructor } from "@decaf-ts/decoration";
|
|
2
2
|
import { Model } from "@decaf-ts/decorator-validation";
|
|
3
|
-
import type { GraphNodeDefinition, GraphNodeMetadata, GraphPortDefinition, GraphPortMetadata } from "./constants.d.cts";
|
|
3
|
+
import type { GraphNodeDefinition, GraphNodeMetadata, GraphPortDefinition, GraphPortMetadata, GraphWorkflowDefinition, GraphWorkflowMetadata } from "./constants.d.cts";
|
|
4
4
|
import "../model/overrides";
|
|
5
5
|
type GraphModelLike<M extends Model = Model> = Constructor<M> | M;
|
|
6
6
|
export declare function graphNodeMetadataOf<M extends Model>(model: GraphModelLike<M>): GraphNodeMetadata | undefined;
|
|
7
|
+
export declare function graphWorkflowMetadataOf<M extends Model>(model: GraphModelLike<M>): GraphWorkflowMetadata | undefined;
|
|
7
8
|
export declare function graphPortMetadataOf<M extends Model>(model: GraphModelLike<M>, property: keyof M | string): GraphPortMetadata | undefined;
|
|
8
9
|
export declare function graphPortDefinitionOf<M extends Model>(model: GraphModelLike<M>, property: keyof M | string): GraphPortDefinition | undefined;
|
|
9
10
|
export declare function graphPortsOf<M extends Model>(model: GraphModelLike<M>): GraphPortDefinition[];
|
|
11
|
+
export declare function graphLeafPortsOf(ports: GraphPortDefinition[]): GraphPortDefinition[];
|
|
12
|
+
export declare function graphWorkflowInputLeafPortsOf<M extends Model>(model: GraphModelLike<M>): GraphPortDefinition[];
|
|
13
|
+
export declare function graphWorkflowOutputLeafPortsOf<M extends Model>(model: GraphModelLike<M>): GraphPortDefinition[];
|
|
10
14
|
export declare function graphDefinitionOf<M extends Model>(model: GraphModelLike<M>): GraphNodeDefinition;
|
|
15
|
+
export declare function graphWorkflowDefinitionOf<M extends Model>(model: GraphModelLike<M>): GraphWorkflowDefinition;
|
|
11
16
|
export {};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { Constructor } from "@decaf-ts/decoration";
|
|
2
2
|
import { Model } from "@decaf-ts/decorator-validation";
|
|
3
|
-
import type { GraphNodeDefinition, GraphNodeMetadata, GraphPortDefinition, GraphPortMetadata } from "./constants.d.mts";
|
|
3
|
+
import type { GraphNodeDefinition, GraphNodeMetadata, GraphPortDefinition, GraphPortMetadata, GraphWorkflowDefinition, GraphWorkflowMetadata } from "./constants.d.mts";
|
|
4
4
|
import "../model/overrides";
|
|
5
5
|
type GraphModelLike<M extends Model = Model> = Constructor<M> | M;
|
|
6
6
|
export declare function graphNodeMetadataOf<M extends Model>(model: GraphModelLike<M>): GraphNodeMetadata | undefined;
|
|
7
|
+
export declare function graphWorkflowMetadataOf<M extends Model>(model: GraphModelLike<M>): GraphWorkflowMetadata | undefined;
|
|
7
8
|
export declare function graphPortMetadataOf<M extends Model>(model: GraphModelLike<M>, property: keyof M | string): GraphPortMetadata | undefined;
|
|
8
9
|
export declare function graphPortDefinitionOf<M extends Model>(model: GraphModelLike<M>, property: keyof M | string): GraphPortDefinition | undefined;
|
|
9
10
|
export declare function graphPortsOf<M extends Model>(model: GraphModelLike<M>): GraphPortDefinition[];
|
|
11
|
+
export declare function graphLeafPortsOf(ports: GraphPortDefinition[]): GraphPortDefinition[];
|
|
12
|
+
export declare function graphWorkflowInputLeafPortsOf<M extends Model>(model: GraphModelLike<M>): GraphPortDefinition[];
|
|
13
|
+
export declare function graphWorkflowOutputLeafPortsOf<M extends Model>(model: GraphModelLike<M>): GraphPortDefinition[];
|
|
10
14
|
export declare function graphDefinitionOf<M extends Model>(model: GraphModelLike<M>): GraphNodeDefinition;
|
|
15
|
+
export declare function graphWorkflowDefinitionOf<M extends Model>(model: GraphModelLike<M>): GraphWorkflowDefinition;
|
|
11
16
|
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Constructor } from "@decaf-ts/decoration";
|
|
2
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
3
|
+
import { GraphPortDefinition, GraphWorkflowDefinition, GraphWorkflowMetadata, GraphWorkflowNodeMetadata, GraphWorkflowRelationMetadata } from "./constants.d.cts";
|
|
4
|
+
type GraphModelLike<M extends Model = Model> = Constructor<M> | M;
|
|
5
|
+
export declare const GRAPH_WORKFLOW_SNAPSHOT_VERSION: 1;
|
|
6
|
+
export type GraphWorkflowSnapshotReference = {
|
|
7
|
+
id?: string;
|
|
8
|
+
kind?: string;
|
|
9
|
+
tag?: string;
|
|
10
|
+
path?: string;
|
|
11
|
+
property?: string;
|
|
12
|
+
};
|
|
13
|
+
export type GraphWorkflowSnapshotPosition = {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
export type GraphWorkflowSnapshotSize = {
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
};
|
|
21
|
+
export type GraphWorkflowSnapshotPortState = {
|
|
22
|
+
expanded?: boolean;
|
|
23
|
+
value?: unknown;
|
|
24
|
+
metadata?: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
export type GraphWorkflowSnapshotValue = {
|
|
27
|
+
path: string;
|
|
28
|
+
value?: unknown;
|
|
29
|
+
label?: string;
|
|
30
|
+
type?: string;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
model?: string;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
};
|
|
35
|
+
export type GraphWorkflowSnapshotNode = {
|
|
36
|
+
id: string;
|
|
37
|
+
ref?: GraphWorkflowSnapshotReference;
|
|
38
|
+
label?: string;
|
|
39
|
+
kind?: string;
|
|
40
|
+
position?: GraphWorkflowSnapshotPosition;
|
|
41
|
+
size?: GraphWorkflowSnapshotSize;
|
|
42
|
+
expanded?: boolean;
|
|
43
|
+
ports?: Record<string, GraphWorkflowSnapshotPortState>;
|
|
44
|
+
data?: Record<string, unknown>;
|
|
45
|
+
metadata?: Record<string, unknown>;
|
|
46
|
+
};
|
|
47
|
+
export type GraphWorkflowSnapshotEdge = {
|
|
48
|
+
id: string;
|
|
49
|
+
source: string;
|
|
50
|
+
sourceRef?: string;
|
|
51
|
+
sourcePort?: string;
|
|
52
|
+
target: string;
|
|
53
|
+
targetRef?: string;
|
|
54
|
+
targetPort?: string;
|
|
55
|
+
label?: string;
|
|
56
|
+
metadata?: Record<string, unknown>;
|
|
57
|
+
};
|
|
58
|
+
export type GraphWorkflowSnapshotDefinition = {
|
|
59
|
+
name: string;
|
|
60
|
+
tag: string;
|
|
61
|
+
kind: string;
|
|
62
|
+
category?: string;
|
|
63
|
+
color?: string;
|
|
64
|
+
group?: string;
|
|
65
|
+
height?: number;
|
|
66
|
+
icon?: string;
|
|
67
|
+
labels: string[];
|
|
68
|
+
maxChildren?: number;
|
|
69
|
+
minWidth?: number;
|
|
70
|
+
width?: number;
|
|
71
|
+
metadata?: GraphWorkflowMetadata;
|
|
72
|
+
inputs: GraphPortDefinition[];
|
|
73
|
+
outputs: GraphPortDefinition[];
|
|
74
|
+
nodes: GraphWorkflowNodeMetadata[];
|
|
75
|
+
relations: GraphWorkflowRelationMetadata[];
|
|
76
|
+
};
|
|
77
|
+
export type GraphWorkflowSnapshotState = {
|
|
78
|
+
inputs: GraphWorkflowSnapshotValue[];
|
|
79
|
+
outputs: GraphWorkflowSnapshotValue[];
|
|
80
|
+
nodes: GraphWorkflowSnapshotNode[];
|
|
81
|
+
edges: GraphWorkflowSnapshotEdge[];
|
|
82
|
+
ui: Record<string, unknown>;
|
|
83
|
+
metadata: Record<string, unknown>;
|
|
84
|
+
};
|
|
85
|
+
export type GraphWorkflowSnapshot = {
|
|
86
|
+
version: typeof GRAPH_WORKFLOW_SNAPSHOT_VERSION;
|
|
87
|
+
definition: GraphWorkflowSnapshotDefinition;
|
|
88
|
+
state: GraphWorkflowSnapshotState;
|
|
89
|
+
};
|
|
90
|
+
export type GraphWorkflowSnapshotInput = {
|
|
91
|
+
definition?: Partial<GraphWorkflowSnapshotDefinition>;
|
|
92
|
+
inputs?: GraphWorkflowSnapshotValue[] | Record<string, unknown>;
|
|
93
|
+
outputs?: GraphWorkflowSnapshotValue[] | Record<string, unknown>;
|
|
94
|
+
nodes?: GraphWorkflowSnapshotNode[];
|
|
95
|
+
edges?: GraphWorkflowSnapshotEdge[];
|
|
96
|
+
ui?: Record<string, unknown>;
|
|
97
|
+
metadata?: Record<string, unknown>;
|
|
98
|
+
};
|
|
99
|
+
export declare function graphWorkflowSnapshotDefinitionOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshotDefinition;
|
|
100
|
+
export declare function graphWorkflowSnapshotOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition, input?: GraphWorkflowSnapshotInput): GraphWorkflowSnapshot;
|
|
101
|
+
export declare function graphWorkflowSnapshotRestore<M extends Model>(snapshot: GraphWorkflowSnapshot | GraphWorkflowSnapshotInput, model?: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshot;
|
|
102
|
+
export declare function graphWorkflowSnapshotToJSON(snapshot: GraphWorkflowSnapshot, space?: number): string;
|
|
103
|
+
export declare function graphWorkflowSnapshotFromJSON(input: string | GraphWorkflowSnapshot, model?: GraphModelLike | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshot;
|
|
104
|
+
export declare function graphWorkflowSnapshotInputValuesOf(snapshot: GraphWorkflowSnapshot): Record<string, unknown>;
|
|
105
|
+
export declare function graphWorkflowSnapshotOutputValuesOf(snapshot: GraphWorkflowSnapshot): Record<string, unknown>;
|
|
106
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Constructor } from "@decaf-ts/decoration";
|
|
2
|
+
import { Model } from "@decaf-ts/decorator-validation";
|
|
3
|
+
import { GraphPortDefinition, GraphWorkflowDefinition, GraphWorkflowMetadata, GraphWorkflowNodeMetadata, GraphWorkflowRelationMetadata } from "./constants.d.mts";
|
|
4
|
+
type GraphModelLike<M extends Model = Model> = Constructor<M> | M;
|
|
5
|
+
export declare const GRAPH_WORKFLOW_SNAPSHOT_VERSION: 1;
|
|
6
|
+
export type GraphWorkflowSnapshotReference = {
|
|
7
|
+
id?: string;
|
|
8
|
+
kind?: string;
|
|
9
|
+
tag?: string;
|
|
10
|
+
path?: string;
|
|
11
|
+
property?: string;
|
|
12
|
+
};
|
|
13
|
+
export type GraphWorkflowSnapshotPosition = {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
export type GraphWorkflowSnapshotSize = {
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
};
|
|
21
|
+
export type GraphWorkflowSnapshotPortState = {
|
|
22
|
+
expanded?: boolean;
|
|
23
|
+
value?: unknown;
|
|
24
|
+
metadata?: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
export type GraphWorkflowSnapshotValue = {
|
|
27
|
+
path: string;
|
|
28
|
+
value?: unknown;
|
|
29
|
+
label?: string;
|
|
30
|
+
type?: string;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
model?: string;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
};
|
|
35
|
+
export type GraphWorkflowSnapshotNode = {
|
|
36
|
+
id: string;
|
|
37
|
+
ref?: GraphWorkflowSnapshotReference;
|
|
38
|
+
label?: string;
|
|
39
|
+
kind?: string;
|
|
40
|
+
position?: GraphWorkflowSnapshotPosition;
|
|
41
|
+
size?: GraphWorkflowSnapshotSize;
|
|
42
|
+
expanded?: boolean;
|
|
43
|
+
ports?: Record<string, GraphWorkflowSnapshotPortState>;
|
|
44
|
+
data?: Record<string, unknown>;
|
|
45
|
+
metadata?: Record<string, unknown>;
|
|
46
|
+
};
|
|
47
|
+
export type GraphWorkflowSnapshotEdge = {
|
|
48
|
+
id: string;
|
|
49
|
+
source: string;
|
|
50
|
+
sourceRef?: string;
|
|
51
|
+
sourcePort?: string;
|
|
52
|
+
target: string;
|
|
53
|
+
targetRef?: string;
|
|
54
|
+
targetPort?: string;
|
|
55
|
+
label?: string;
|
|
56
|
+
metadata?: Record<string, unknown>;
|
|
57
|
+
};
|
|
58
|
+
export type GraphWorkflowSnapshotDefinition = {
|
|
59
|
+
name: string;
|
|
60
|
+
tag: string;
|
|
61
|
+
kind: string;
|
|
62
|
+
category?: string;
|
|
63
|
+
color?: string;
|
|
64
|
+
group?: string;
|
|
65
|
+
height?: number;
|
|
66
|
+
icon?: string;
|
|
67
|
+
labels: string[];
|
|
68
|
+
maxChildren?: number;
|
|
69
|
+
minWidth?: number;
|
|
70
|
+
width?: number;
|
|
71
|
+
metadata?: GraphWorkflowMetadata;
|
|
72
|
+
inputs: GraphPortDefinition[];
|
|
73
|
+
outputs: GraphPortDefinition[];
|
|
74
|
+
nodes: GraphWorkflowNodeMetadata[];
|
|
75
|
+
relations: GraphWorkflowRelationMetadata[];
|
|
76
|
+
};
|
|
77
|
+
export type GraphWorkflowSnapshotState = {
|
|
78
|
+
inputs: GraphWorkflowSnapshotValue[];
|
|
79
|
+
outputs: GraphWorkflowSnapshotValue[];
|
|
80
|
+
nodes: GraphWorkflowSnapshotNode[];
|
|
81
|
+
edges: GraphWorkflowSnapshotEdge[];
|
|
82
|
+
ui: Record<string, unknown>;
|
|
83
|
+
metadata: Record<string, unknown>;
|
|
84
|
+
};
|
|
85
|
+
export type GraphWorkflowSnapshot = {
|
|
86
|
+
version: typeof GRAPH_WORKFLOW_SNAPSHOT_VERSION;
|
|
87
|
+
definition: GraphWorkflowSnapshotDefinition;
|
|
88
|
+
state: GraphWorkflowSnapshotState;
|
|
89
|
+
};
|
|
90
|
+
export type GraphWorkflowSnapshotInput = {
|
|
91
|
+
definition?: Partial<GraphWorkflowSnapshotDefinition>;
|
|
92
|
+
inputs?: GraphWorkflowSnapshotValue[] | Record<string, unknown>;
|
|
93
|
+
outputs?: GraphWorkflowSnapshotValue[] | Record<string, unknown>;
|
|
94
|
+
nodes?: GraphWorkflowSnapshotNode[];
|
|
95
|
+
edges?: GraphWorkflowSnapshotEdge[];
|
|
96
|
+
ui?: Record<string, unknown>;
|
|
97
|
+
metadata?: Record<string, unknown>;
|
|
98
|
+
};
|
|
99
|
+
export declare function graphWorkflowSnapshotDefinitionOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshotDefinition;
|
|
100
|
+
export declare function graphWorkflowSnapshotOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition, input?: GraphWorkflowSnapshotInput): GraphWorkflowSnapshot;
|
|
101
|
+
export declare function graphWorkflowSnapshotRestore<M extends Model>(snapshot: GraphWorkflowSnapshot | GraphWorkflowSnapshotInput, model?: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshot;
|
|
102
|
+
export declare function graphWorkflowSnapshotToJSON(snapshot: GraphWorkflowSnapshot, space?: number): string;
|
|
103
|
+
export declare function graphWorkflowSnapshotFromJSON(input: string | GraphWorkflowSnapshot, model?: GraphModelLike | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshot;
|
|
104
|
+
export declare function graphWorkflowSnapshotInputValuesOf(snapshot: GraphWorkflowSnapshot): Record<string, unknown>;
|
|
105
|
+
export declare function graphWorkflowSnapshotOutputValuesOf(snapshot: GraphWorkflowSnapshot): Record<string, unknown>;
|
|
106
|
+
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { PortDirection } from "./constants.d.cts";
|
|
2
|
-
export type { GraphConnectionRule, GraphNodeDefinition, GraphNodeKind, GraphNodeMetadata, GraphPortDefinition, GraphPortMetadata, } from "./constants.d.cts";
|
|
2
|
+
export type { GraphConnectionRule, GraphNodeDefinition, GraphNodeKind, GraphNodeMetadata, GraphPortDefinition, GraphPortMetadata, GraphWorkflowDefinition, GraphWorkflowMetadata, GraphWorkflowNodeMetadata, GraphWorkflowRelationMetadata, } from "./constants.d.cts";
|
|
3
|
+
export type { GraphWorkflowSnapshot, GraphWorkflowSnapshotDefinition, GraphWorkflowSnapshotEdge, GraphWorkflowSnapshotInput, GraphWorkflowSnapshotNode, GraphWorkflowSnapshotPosition, GraphWorkflowSnapshotReference, GraphWorkflowSnapshotSize, GraphWorkflowSnapshotState, GraphWorkflowSnapshotValue, GraphWorkflowSnapshotPortState, } from "./snapshot.d.cts";
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { PortDirection } from "./constants.d.mts";
|
|
2
|
-
export type { GraphConnectionRule, GraphNodeDefinition, GraphNodeKind, GraphNodeMetadata, GraphPortDefinition, GraphPortMetadata, } from "./constants.d.mts";
|
|
2
|
+
export type { GraphConnectionRule, GraphNodeDefinition, GraphNodeKind, GraphNodeMetadata, GraphPortDefinition, GraphPortMetadata, GraphWorkflowDefinition, GraphWorkflowMetadata, GraphWorkflowNodeMetadata, GraphWorkflowRelationMetadata, } from "./constants.d.mts";
|
|
3
|
+
export type { GraphWorkflowSnapshot, GraphWorkflowSnapshotDefinition, GraphWorkflowSnapshotEdge, GraphWorkflowSnapshotInput, GraphWorkflowSnapshotNode, GraphWorkflowSnapshotPosition, GraphWorkflowSnapshotReference, GraphWorkflowSnapshotSize, GraphWorkflowSnapshotState, GraphWorkflowSnapshotValue, GraphWorkflowSnapshotPortState, } from "./snapshot.d.mts";
|
package/lib/types/index.d.cts
CHANGED
|
@@ -15,19 +15,19 @@ export * from "./ui/index.d.cts";
|
|
|
15
15
|
* @const VERSION
|
|
16
16
|
* @memberOf module:ui-decorators
|
|
17
17
|
*/
|
|
18
|
-
export declare const VERSION = "0.16.
|
|
18
|
+
export declare const VERSION = "0.16.2";
|
|
19
19
|
/**
|
|
20
20
|
* @description Represents the current commit hash of the module build.
|
|
21
21
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
22
22
|
* the placeholder with the actual commit hash at publish time.
|
|
23
23
|
* @const COMMIT
|
|
24
24
|
*/
|
|
25
|
-
export declare const COMMIT = "
|
|
25
|
+
export declare const COMMIT = "0f1d008";
|
|
26
26
|
/**
|
|
27
27
|
* @description Represents the full version string of the module.
|
|
28
28
|
* @summary Stores the semver version and commit hash for the package.
|
|
29
29
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
30
30
|
* @const FULL_VERSION
|
|
31
31
|
*/
|
|
32
|
-
export declare const FULL_VERSION = "0.16.
|
|
32
|
+
export declare const FULL_VERSION = "0.16.2-0f1d008";
|
|
33
33
|
export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
|
package/lib/types/index.d.mts
CHANGED
|
@@ -15,19 +15,19 @@ export * from "./ui/index.d.mts";
|
|
|
15
15
|
* @const VERSION
|
|
16
16
|
* @memberOf module:ui-decorators
|
|
17
17
|
*/
|
|
18
|
-
export declare const VERSION = "0.16.
|
|
18
|
+
export declare const VERSION = "0.16.2";
|
|
19
19
|
/**
|
|
20
20
|
* @description Represents the current commit hash of the module build.
|
|
21
21
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
22
22
|
* the placeholder with the actual commit hash at publish time.
|
|
23
23
|
* @const COMMIT
|
|
24
24
|
*/
|
|
25
|
-
export declare const COMMIT = "
|
|
25
|
+
export declare const COMMIT = "0f1d008";
|
|
26
26
|
/**
|
|
27
27
|
* @description Represents the full version string of the module.
|
|
28
28
|
* @summary Stores the semver version and commit hash for the package.
|
|
29
29
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
30
30
|
* @const FULL_VERSION
|
|
31
31
|
*/
|
|
32
|
-
export declare const FULL_VERSION = "0.16.
|
|
32
|
+
export declare const FULL_VERSION = "0.16.2-0f1d008";
|
|
33
33
|
export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
|