@decaf-ts/ui-decorators 0.16.2 → 0.17.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.
- package/dist/ui-decorators.cjs +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 +62 -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/index.js +1 -0
- package/lib/esm/graph/index.js.map +1 -1
- package/lib/esm/graph/reader.js +59 -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 +5 -0
- package/lib/types/graph/constants.d.mts +5 -0
- 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 +3 -0
- package/lib/types/graph/reader.d.mts +3 -0
- 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 +1 -0
- package/lib/types/graph/types.d.mts +1 -0
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/package.json +1 -1
|
@@ -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
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
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.
|
|
18
|
+
export declare const VERSION = "0.17.0";
|
|
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 = "1c6464a";
|
|
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.
|
|
32
|
+
export declare const FULL_VERSION = "0.17.0-1c6464a";
|
|
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.
|
|
18
|
+
export declare const VERSION = "0.17.0";
|
|
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 = "1c6464a";
|
|
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.
|
|
32
|
+
export declare const FULL_VERSION = "0.17.0-1c6464a";
|
|
33
33
|
export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
|