@decaf-ts/ui-decorators 0.19.0 → 0.20.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/catalog/GraphConnectionPolicy.cjs +20 -0
- package/lib/cjs/graph/catalog/GraphConnectionPolicy.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphCredentialReference.cjs +15 -0
- package/lib/cjs/graph/catalog/GraphCredentialReference.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphCredentialRequirement.cjs +16 -0
- package/lib/cjs/graph/catalog/GraphCredentialRequirement.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphDynamicPortRule.cjs +31 -0
- package/lib/cjs/graph/catalog/GraphDynamicPortRule.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphIconReference.cjs +22 -0
- package/lib/cjs/graph/catalog/GraphIconReference.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs +298 -0
- package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphNodeCapability.cjs +23 -0
- package/lib/cjs/graph/catalog/GraphNodeCapability.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphNodeDisplayManifest.cjs +11 -0
- package/lib/cjs/graph/catalog/GraphNodeDisplayManifest.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphNodeManifest.cjs +23 -0
- package/lib/cjs/graph/catalog/GraphNodeManifest.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphNodeManifestSerialization.cjs +50 -0
- package/lib/cjs/graph/catalog/GraphNodeManifestSerialization.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphNodeMethodManifest.cjs +29 -0
- package/lib/cjs/graph/catalog/GraphNodeMethodManifest.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphNodePolicyManifest.cjs +11 -0
- package/lib/cjs/graph/catalog/GraphNodePolicyManifest.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphParameterBase.cjs +4 -0
- package/lib/cjs/graph/catalog/GraphParameterBase.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphParameterDefinition.cjs +29 -0
- package/lib/cjs/graph/catalog/GraphParameterDefinition.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphParameterOption.cjs +18 -0
- package/lib/cjs/graph/catalog/GraphParameterOption.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphParameterValidation.cjs +57 -0
- package/lib/cjs/graph/catalog/GraphParameterValidation.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphPortManifest.cjs +19 -0
- package/lib/cjs/graph/catalog/GraphPortManifest.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphResourceLocatorMode.cjs +19 -0
- package/lib/cjs/graph/catalog/GraphResourceLocatorMode.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphValueSchema.cjs +25 -0
- package/lib/cjs/graph/catalog/GraphValueSchema.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphValueSchemaDerivation.cjs +164 -0
- package/lib/cjs/graph/catalog/GraphValueSchemaDerivation.cjs.map +1 -0
- package/lib/cjs/graph/catalog/GraphVisibilityExpression.cjs +63 -0
- package/lib/cjs/graph/catalog/GraphVisibilityExpression.cjs.map +1 -0
- package/lib/cjs/graph/catalog/index.cjs +39 -0
- package/lib/cjs/graph/catalog/index.cjs.map +1 -0
- package/lib/cjs/graph/constants.cjs +15 -1
- package/lib/cjs/graph/constants.cjs.map +1 -1
- package/lib/cjs/graph/document/GraphDecoratedWorkflowCompiler.cjs +296 -0
- package/lib/cjs/graph/document/GraphDecoratedWorkflowCompiler.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphEdgeInstance.cjs +4 -0
- package/lib/cjs/graph/document/GraphEdgeInstance.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphEndpoint.cjs +27 -0
- package/lib/cjs/graph/document/GraphEndpoint.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphJsonValue.cjs +82 -0
- package/lib/cjs/graph/document/GraphJsonValue.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphLoopConfiguration.cjs +4 -0
- package/lib/cjs/graph/document/GraphLoopConfiguration.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphNodeBinding.cjs +27 -0
- package/lib/cjs/graph/document/GraphNodeBinding.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphNodeInstance.cjs +4 -0
- package/lib/cjs/graph/document/GraphNodeInstance.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphWorkflowDocument.cjs +16 -0
- package/lib/cjs/graph/document/GraphWorkflowDocument.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphWorkflowDocumentBuilder.cjs +267 -0
- package/lib/cjs/graph/document/GraphWorkflowDocumentBuilder.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphWorkflowDocumentReader.cjs +78 -0
- package/lib/cjs/graph/document/GraphWorkflowDocumentReader.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphWorkflowDocumentSerializer.cjs +70 -0
- package/lib/cjs/graph/document/GraphWorkflowDocumentSerializer.cjs.map +1 -0
- package/lib/cjs/graph/document/GraphWorkflowUiState.cjs +4 -0
- package/lib/cjs/graph/document/GraphWorkflowUiState.cjs.map +1 -0
- package/lib/cjs/graph/document/index.cjs +30 -0
- package/lib/cjs/graph/document/index.cjs.map +1 -0
- package/lib/cjs/graph/index.cjs +2 -0
- package/lib/cjs/graph/index.cjs.map +1 -1
- package/lib/cjs/graph/snapshot.cjs +337 -0
- package/lib/cjs/graph/snapshot.cjs.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/esm/graph/catalog/GraphConnectionPolicy.js +16 -0
- package/lib/esm/graph/catalog/GraphConnectionPolicy.js.map +1 -0
- package/lib/esm/graph/catalog/GraphCredentialReference.js +9 -0
- package/lib/esm/graph/catalog/GraphCredentialReference.js.map +1 -0
- package/lib/esm/graph/catalog/GraphCredentialRequirement.js +12 -0
- package/lib/esm/graph/catalog/GraphCredentialRequirement.js.map +1 -0
- package/lib/esm/graph/catalog/GraphDynamicPortRule.js +25 -0
- package/lib/esm/graph/catalog/GraphDynamicPortRule.js.map +1 -0
- package/lib/esm/graph/catalog/GraphIconReference.js +18 -0
- package/lib/esm/graph/catalog/GraphIconReference.js.map +1 -0
- package/lib/esm/graph/catalog/GraphManifestCompiler.js +294 -0
- package/lib/esm/graph/catalog/GraphManifestCompiler.js.map +1 -0
- package/lib/esm/graph/catalog/GraphNodeCapability.js +17 -0
- package/lib/esm/graph/catalog/GraphNodeCapability.js.map +1 -0
- package/lib/esm/graph/catalog/GraphNodeDisplayManifest.js +7 -0
- package/lib/esm/graph/catalog/GraphNodeDisplayManifest.js.map +1 -0
- package/lib/esm/graph/catalog/GraphNodeManifest.js +17 -0
- package/lib/esm/graph/catalog/GraphNodeManifest.js.map +1 -0
- package/lib/esm/graph/catalog/GraphNodeManifestSerialization.js +42 -0
- package/lib/esm/graph/catalog/GraphNodeManifestSerialization.js.map +1 -0
- package/lib/esm/graph/catalog/GraphNodeMethodManifest.js +23 -0
- package/lib/esm/graph/catalog/GraphNodeMethodManifest.js.map +1 -0
- package/lib/esm/graph/catalog/GraphNodePolicyManifest.js +7 -0
- package/lib/esm/graph/catalog/GraphNodePolicyManifest.js.map +1 -0
- package/lib/esm/graph/catalog/GraphParameterBase.js +2 -0
- package/lib/esm/graph/catalog/GraphParameterBase.js.map +1 -0
- package/lib/esm/graph/catalog/GraphParameterDefinition.js +23 -0
- package/lib/esm/graph/catalog/GraphParameterDefinition.js.map +1 -0
- package/lib/esm/graph/catalog/GraphParameterOption.js +13 -0
- package/lib/esm/graph/catalog/GraphParameterOption.js.map +1 -0
- package/lib/esm/graph/catalog/GraphParameterValidation.js +50 -0
- package/lib/esm/graph/catalog/GraphParameterValidation.js.map +1 -0
- package/lib/esm/graph/catalog/GraphPortManifest.js +13 -0
- package/lib/esm/graph/catalog/GraphPortManifest.js.map +1 -0
- package/lib/esm/graph/catalog/GraphResourceLocatorMode.js +13 -0
- package/lib/esm/graph/catalog/GraphResourceLocatorMode.js.map +1 -0
- package/lib/esm/graph/catalog/GraphValueSchema.js +19 -0
- package/lib/esm/graph/catalog/GraphValueSchema.js.map +1 -0
- package/lib/esm/graph/catalog/GraphValueSchemaDerivation.js +156 -0
- package/lib/esm/graph/catalog/GraphValueSchemaDerivation.js.map +1 -0
- package/lib/esm/graph/catalog/GraphVisibilityExpression.js +58 -0
- package/lib/esm/graph/catalog/GraphVisibilityExpression.js.map +1 -0
- package/lib/esm/graph/catalog/index.js +22 -0
- package/lib/esm/graph/catalog/index.js.map +1 -0
- package/lib/esm/graph/constants.js +13 -0
- package/lib/esm/graph/constants.js.map +1 -1
- package/lib/esm/graph/document/GraphDecoratedWorkflowCompiler.js +290 -0
- package/lib/esm/graph/document/GraphDecoratedWorkflowCompiler.js.map +1 -0
- package/lib/esm/graph/document/GraphEdgeInstance.js +2 -0
- package/lib/esm/graph/document/GraphEdgeInstance.js.map +1 -0
- package/lib/esm/graph/document/GraphEndpoint.js +21 -0
- package/lib/esm/graph/document/GraphEndpoint.js.map +1 -0
- package/lib/esm/graph/document/GraphJsonValue.js +73 -0
- package/lib/esm/graph/document/GraphJsonValue.js.map +1 -0
- package/lib/esm/graph/document/GraphLoopConfiguration.js +2 -0
- package/lib/esm/graph/document/GraphLoopConfiguration.js.map +1 -0
- package/lib/esm/graph/document/GraphNodeBinding.js +22 -0
- package/lib/esm/graph/document/GraphNodeBinding.js.map +1 -0
- package/lib/esm/graph/document/GraphNodeInstance.js +2 -0
- package/lib/esm/graph/document/GraphNodeInstance.js.map +1 -0
- package/lib/esm/graph/document/GraphWorkflowDocument.js +12 -0
- package/lib/esm/graph/document/GraphWorkflowDocument.js.map +1 -0
- package/lib/esm/graph/document/GraphWorkflowDocumentBuilder.js +261 -0
- package/lib/esm/graph/document/GraphWorkflowDocumentBuilder.js.map +1 -0
- package/lib/esm/graph/document/GraphWorkflowDocumentReader.js +62 -0
- package/lib/esm/graph/document/GraphWorkflowDocumentReader.js.map +1 -0
- package/lib/esm/graph/document/GraphWorkflowDocumentSerializer.js +63 -0
- package/lib/esm/graph/document/GraphWorkflowDocumentSerializer.js.map +1 -0
- package/lib/esm/graph/document/GraphWorkflowUiState.js +2 -0
- package/lib/esm/graph/document/GraphWorkflowUiState.js.map +1 -0
- package/lib/esm/graph/document/index.js +13 -0
- package/lib/esm/graph/document/index.js.map +1 -0
- package/lib/esm/graph/index.js +2 -0
- package/lib/esm/graph/index.js.map +1 -1
- package/lib/esm/graph/snapshot.js +333 -0
- package/lib/esm/graph/snapshot.js.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/types/graph/catalog/GraphConnectionPolicy.d.cts +9 -0
- package/lib/types/graph/catalog/GraphConnectionPolicy.d.mts +9 -0
- package/lib/types/graph/catalog/GraphCredentialReference.d.cts +6 -0
- package/lib/types/graph/catalog/GraphCredentialReference.d.mts +6 -0
- package/lib/types/graph/catalog/GraphCredentialRequirement.d.cts +7 -0
- package/lib/types/graph/catalog/GraphCredentialRequirement.d.mts +7 -0
- package/lib/types/graph/catalog/GraphDynamicPortRule.d.cts +22 -0
- package/lib/types/graph/catalog/GraphDynamicPortRule.d.mts +22 -0
- package/lib/types/graph/catalog/GraphIconReference.d.cts +12 -0
- package/lib/types/graph/catalog/GraphIconReference.d.mts +12 -0
- package/lib/types/graph/catalog/GraphManifestCompiler.d.cts +14 -0
- package/lib/types/graph/catalog/GraphManifestCompiler.d.mts +14 -0
- package/lib/types/graph/catalog/GraphNodeCapability.d.cts +4 -0
- package/lib/types/graph/catalog/GraphNodeCapability.d.mts +4 -0
- package/lib/types/graph/catalog/GraphNodeDisplayManifest.d.cts +16 -0
- package/lib/types/graph/catalog/GraphNodeDisplayManifest.d.mts +16 -0
- package/lib/types/graph/catalog/GraphNodeManifest.d.cts +26 -0
- package/lib/types/graph/catalog/GraphNodeManifest.d.mts +26 -0
- package/lib/types/graph/catalog/GraphNodeManifestSerialization.d.cts +7 -0
- package/lib/types/graph/catalog/GraphNodeManifestSerialization.d.mts +7 -0
- package/lib/types/graph/catalog/GraphNodeMethodManifest.d.cts +10 -0
- package/lib/types/graph/catalog/GraphNodeMethodManifest.d.mts +10 -0
- package/lib/types/graph/catalog/GraphNodePolicyManifest.d.cts +11 -0
- package/lib/types/graph/catalog/GraphNodePolicyManifest.d.mts +11 -0
- package/lib/types/graph/catalog/GraphParameterBase.d.cts +14 -0
- package/lib/types/graph/catalog/GraphParameterBase.d.mts +14 -0
- package/lib/types/graph/catalog/GraphParameterDefinition.d.cts +66 -0
- package/lib/types/graph/catalog/GraphParameterDefinition.d.mts +66 -0
- package/lib/types/graph/catalog/GraphParameterOption.d.cts +8 -0
- package/lib/types/graph/catalog/GraphParameterOption.d.mts +8 -0
- package/lib/types/graph/catalog/GraphParameterValidation.d.cts +25 -0
- package/lib/types/graph/catalog/GraphParameterValidation.d.mts +25 -0
- package/lib/types/graph/catalog/GraphPortManifest.d.cts +21 -0
- package/lib/types/graph/catalog/GraphPortManifest.d.mts +21 -0
- package/lib/types/graph/catalog/GraphResourceLocatorMode.d.cts +10 -0
- package/lib/types/graph/catalog/GraphResourceLocatorMode.d.mts +10 -0
- package/lib/types/graph/catalog/GraphValueSchema.d.cts +44 -0
- package/lib/types/graph/catalog/GraphValueSchema.d.mts +44 -0
- package/lib/types/graph/catalog/GraphValueSchemaDerivation.d.cts +9 -0
- package/lib/types/graph/catalog/GraphValueSchemaDerivation.d.mts +9 -0
- package/lib/types/graph/catalog/GraphVisibilityExpression.d.cts +22 -0
- package/lib/types/graph/catalog/GraphVisibilityExpression.d.mts +22 -0
- package/lib/types/graph/catalog/index.d.cts +21 -0
- package/lib/types/graph/catalog/index.d.mts +21 -0
- package/lib/types/graph/constants.d.cts +8 -0
- package/lib/types/graph/constants.d.mts +8 -0
- package/lib/types/graph/document/GraphDecoratedWorkflowCompiler.d.cts +26 -0
- package/lib/types/graph/document/GraphDecoratedWorkflowCompiler.d.mts +26 -0
- package/lib/types/graph/document/GraphEdgeInstance.d.cts +12 -0
- package/lib/types/graph/document/GraphEdgeInstance.d.mts +12 -0
- package/lib/types/graph/document/GraphEndpoint.d.cts +13 -0
- package/lib/types/graph/document/GraphEndpoint.d.mts +13 -0
- package/lib/types/graph/document/GraphJsonValue.d.cts +11 -0
- package/lib/types/graph/document/GraphJsonValue.d.mts +11 -0
- package/lib/types/graph/document/GraphLoopConfiguration.d.cts +24 -0
- package/lib/types/graph/document/GraphLoopConfiguration.d.mts +24 -0
- package/lib/types/graph/document/GraphNodeBinding.d.cts +21 -0
- package/lib/types/graph/document/GraphNodeBinding.d.mts +21 -0
- package/lib/types/graph/document/GraphNodeInstance.d.cts +16 -0
- package/lib/types/graph/document/GraphNodeInstance.d.mts +16 -0
- package/lib/types/graph/document/GraphWorkflowDocument.d.cts +33 -0
- package/lib/types/graph/document/GraphWorkflowDocument.d.mts +33 -0
- package/lib/types/graph/document/GraphWorkflowDocumentBuilder.d.cts +28 -0
- package/lib/types/graph/document/GraphWorkflowDocumentBuilder.d.mts +28 -0
- package/lib/types/graph/document/GraphWorkflowDocumentReader.d.cts +21 -0
- package/lib/types/graph/document/GraphWorkflowDocumentReader.d.mts +21 -0
- package/lib/types/graph/document/GraphWorkflowDocumentSerializer.d.cts +5 -0
- package/lib/types/graph/document/GraphWorkflowDocumentSerializer.d.mts +5 -0
- package/lib/types/graph/document/GraphWorkflowUiState.d.cts +29 -0
- package/lib/types/graph/document/GraphWorkflowUiState.d.mts +29 -0
- package/lib/types/graph/document/index.d.cts +12 -0
- package/lib/types/graph/document/index.d.mts +12 -0
- package/lib/types/graph/index.d.cts +2 -0
- package/lib/types/graph/index.d.mts +2 -0
- package/lib/types/graph/snapshot.d.cts +67 -7
- package/lib/types/graph/snapshot.d.mts +67 -7
- package/lib/types/graph/types.d.cts +1 -1
- package/lib/types/graph/types.d.mts +1 -1
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/package.json +5 -5
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Constructor } from "@decaf-ts/decoration";
|
|
2
2
|
import { Model } from "@decaf-ts/decorator-validation";
|
|
3
3
|
import { GraphPortDefinition, GraphWorkflowDefinition, GraphWorkflowMetadata, GraphWorkflowNodeMetadata, GraphWorkflowRelationMetadata } from "./constants.d.cts";
|
|
4
|
+
import type { GraphWorkflowDocument } from "./document/GraphWorkflowDocument.d.cts";
|
|
5
|
+
import type { GraphJsonValue } from "./document/GraphJsonValue.d.cts";
|
|
4
6
|
type GraphModelLike<M extends Model = Model> = Constructor<M> | M;
|
|
5
7
|
export declare const GRAPH_WORKFLOW_SNAPSHOT_VERSION: 1;
|
|
6
8
|
export type GraphWorkflowSnapshotReference = {
|
|
@@ -83,7 +85,14 @@ export type GraphWorkflowSnapshotState = {
|
|
|
83
85
|
ui: Record<string, unknown>;
|
|
84
86
|
metadata: Record<string, unknown>;
|
|
85
87
|
};
|
|
86
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Legacy persisted snapshot (`{ version, definition, state }`). Kept only for
|
|
90
|
+
* loading/compatibility of persisted data; the canonical snapshot is
|
|
91
|
+
* {@link GraphWorkflowSnapshot} (`{ document, editor?, metadata? }`).
|
|
92
|
+
* Convert with {@link graphWorkflowSnapshotFromLegacy} /
|
|
93
|
+
* {@link graphWorkflowSnapshotToLegacy}.
|
|
94
|
+
*/
|
|
95
|
+
export type LegacyGraphWorkflowSnapshot = {
|
|
87
96
|
version: typeof GRAPH_WORKFLOW_SNAPSHOT_VERSION;
|
|
88
97
|
definition: GraphWorkflowSnapshotDefinition;
|
|
89
98
|
state: GraphWorkflowSnapshotState;
|
|
@@ -98,10 +107,61 @@ export type GraphWorkflowSnapshotInput = {
|
|
|
98
107
|
metadata?: Record<string, unknown>;
|
|
99
108
|
};
|
|
100
109
|
export declare function graphWorkflowSnapshotDefinitionOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshotDefinition;
|
|
101
|
-
export declare function graphWorkflowSnapshotOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition, input?: GraphWorkflowSnapshotInput):
|
|
102
|
-
export declare function graphWorkflowSnapshotRestore<M extends Model>(snapshot:
|
|
103
|
-
export declare function graphWorkflowSnapshotToJSON(snapshot:
|
|
104
|
-
export declare function graphWorkflowSnapshotFromJSON(input: string |
|
|
105
|
-
export declare function graphWorkflowSnapshotInputValuesOf(snapshot:
|
|
106
|
-
export declare function graphWorkflowSnapshotOutputValuesOf(snapshot:
|
|
110
|
+
export declare function graphWorkflowSnapshotOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition, input?: GraphWorkflowSnapshotInput): LegacyGraphWorkflowSnapshot;
|
|
111
|
+
export declare function graphWorkflowSnapshotRestore<M extends Model>(snapshot: LegacyGraphWorkflowSnapshot | GraphWorkflowSnapshotInput, model?: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): LegacyGraphWorkflowSnapshot;
|
|
112
|
+
export declare function graphWorkflowSnapshotToJSON(snapshot: LegacyGraphWorkflowSnapshot, space?: number): string;
|
|
113
|
+
export declare function graphWorkflowSnapshotFromJSON(input: string | LegacyGraphWorkflowSnapshot, model?: GraphModelLike | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): LegacyGraphWorkflowSnapshot;
|
|
114
|
+
export declare function graphWorkflowSnapshotInputValuesOf(snapshot: LegacyGraphWorkflowSnapshot): Record<string, unknown>;
|
|
115
|
+
export declare function graphWorkflowSnapshotOutputValuesOf(snapshot: LegacyGraphWorkflowSnapshot): Record<string, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* Editor-only state that the canonical {@link GraphWorkflowDocument} cannot
|
|
118
|
+
* express (layout beyond node positions, config-store values, per-port modes,
|
|
119
|
+
* workflow boundary values, and duplicate counts). Stored as JSON-safe values
|
|
120
|
+
* only; constructors and `modelClass`/`sourceClass` references are dropped.
|
|
121
|
+
*/
|
|
122
|
+
export type GraphSnapshotEditorState = {
|
|
123
|
+
viewport?: {
|
|
124
|
+
x: number;
|
|
125
|
+
y: number;
|
|
126
|
+
scale: number;
|
|
127
|
+
};
|
|
128
|
+
duplicateCounts?: Record<string, number>;
|
|
129
|
+
boundaryInputValues?: Record<string, GraphJsonValue>;
|
|
130
|
+
boundaryOutputValues?: Record<string, GraphJsonValue>;
|
|
131
|
+
nodePorts?: Record<string, Record<string, GraphJsonValue>>;
|
|
132
|
+
nodeConfigs?: Record<string, GraphJsonValue>;
|
|
133
|
+
diagramMetadata?: Record<string, GraphJsonValue>;
|
|
134
|
+
definitionDisplay?: Record<string, GraphJsonValue>;
|
|
135
|
+
legacy?: GraphJsonValue;
|
|
136
|
+
} & {
|
|
137
|
+
[key: string]: GraphJsonValue | undefined;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Canonical document-first snapshot. `document` is the executable semantic
|
|
141
|
+
* truth; `editor` preserves legacy editor-only state for lossless round trips.
|
|
142
|
+
*/
|
|
143
|
+
export type GraphWorkflowSnapshot = {
|
|
144
|
+
document: GraphWorkflowDocument;
|
|
145
|
+
editor?: GraphSnapshotEditorState;
|
|
146
|
+
metadata?: Record<string, GraphJsonValue>;
|
|
147
|
+
};
|
|
148
|
+
export type GraphWorkflowSnapshotLike = LegacyGraphWorkflowSnapshot | GraphWorkflowSnapshot;
|
|
149
|
+
/** Maps a legacy snapshot to the canonical {@link GraphWorkflowDocument}. */
|
|
150
|
+
export declare function graphWorkflowDocumentFromLegacySnapshot(snapshot: LegacyGraphWorkflowSnapshot): GraphWorkflowDocument;
|
|
151
|
+
/**
|
|
152
|
+
* Converts a legacy persisted snapshot into the canonical wrapper. The canonical
|
|
153
|
+
* `document` carries executable semantics; `editor.legacy` keeps the sanitized
|
|
154
|
+
* (constructor-free) legacy payload so a canonical→legacy round trip is lossless
|
|
155
|
+
* for persisted data.
|
|
156
|
+
*/
|
|
157
|
+
export declare function graphWorkflowSnapshotFromLegacy(snapshot: LegacyGraphWorkflowSnapshot): GraphWorkflowSnapshot;
|
|
158
|
+
/**
|
|
159
|
+
* Reconstructs a legacy snapshot from a canonical wrapper. Uses the
|
|
160
|
+
* `editor.legacy` payload when present for exact round trips; otherwise it
|
|
161
|
+
* rebuilds a best-effort legacy snapshot from the document + editor state
|
|
162
|
+
* (constructors are never restored).
|
|
163
|
+
*/
|
|
164
|
+
export declare function graphWorkflowSnapshotToLegacy(snapshot: GraphWorkflowSnapshot): LegacyGraphWorkflowSnapshot;
|
|
165
|
+
/** Normalizes any accepted snapshot/document form to a canonical wrapper. */
|
|
166
|
+
export declare function graphWorkflowSnapshotLikeToCanonical(value: GraphWorkflowSnapshotLike | GraphWorkflowDocument): GraphWorkflowSnapshot;
|
|
107
167
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Constructor } from "@decaf-ts/decoration";
|
|
2
2
|
import { Model } from "@decaf-ts/decorator-validation";
|
|
3
3
|
import { GraphPortDefinition, GraphWorkflowDefinition, GraphWorkflowMetadata, GraphWorkflowNodeMetadata, GraphWorkflowRelationMetadata } from "./constants.d.mts";
|
|
4
|
+
import type { GraphWorkflowDocument } from "./document/GraphWorkflowDocument.d.mts";
|
|
5
|
+
import type { GraphJsonValue } from "./document/GraphJsonValue.d.mts";
|
|
4
6
|
type GraphModelLike<M extends Model = Model> = Constructor<M> | M;
|
|
5
7
|
export declare const GRAPH_WORKFLOW_SNAPSHOT_VERSION: 1;
|
|
6
8
|
export type GraphWorkflowSnapshotReference = {
|
|
@@ -83,7 +85,14 @@ export type GraphWorkflowSnapshotState = {
|
|
|
83
85
|
ui: Record<string, unknown>;
|
|
84
86
|
metadata: Record<string, unknown>;
|
|
85
87
|
};
|
|
86
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Legacy persisted snapshot (`{ version, definition, state }`). Kept only for
|
|
90
|
+
* loading/compatibility of persisted data; the canonical snapshot is
|
|
91
|
+
* {@link GraphWorkflowSnapshot} (`{ document, editor?, metadata? }`).
|
|
92
|
+
* Convert with {@link graphWorkflowSnapshotFromLegacy} /
|
|
93
|
+
* {@link graphWorkflowSnapshotToLegacy}.
|
|
94
|
+
*/
|
|
95
|
+
export type LegacyGraphWorkflowSnapshot = {
|
|
87
96
|
version: typeof GRAPH_WORKFLOW_SNAPSHOT_VERSION;
|
|
88
97
|
definition: GraphWorkflowSnapshotDefinition;
|
|
89
98
|
state: GraphWorkflowSnapshotState;
|
|
@@ -98,10 +107,61 @@ export type GraphWorkflowSnapshotInput = {
|
|
|
98
107
|
metadata?: Record<string, unknown>;
|
|
99
108
|
};
|
|
100
109
|
export declare function graphWorkflowSnapshotDefinitionOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshotDefinition;
|
|
101
|
-
export declare function graphWorkflowSnapshotOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition, input?: GraphWorkflowSnapshotInput):
|
|
102
|
-
export declare function graphWorkflowSnapshotRestore<M extends Model>(snapshot:
|
|
103
|
-
export declare function graphWorkflowSnapshotToJSON(snapshot:
|
|
104
|
-
export declare function graphWorkflowSnapshotFromJSON(input: string |
|
|
105
|
-
export declare function graphWorkflowSnapshotInputValuesOf(snapshot:
|
|
106
|
-
export declare function graphWorkflowSnapshotOutputValuesOf(snapshot:
|
|
110
|
+
export declare function graphWorkflowSnapshotOf<M extends Model>(model: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition, input?: GraphWorkflowSnapshotInput): LegacyGraphWorkflowSnapshot;
|
|
111
|
+
export declare function graphWorkflowSnapshotRestore<M extends Model>(snapshot: LegacyGraphWorkflowSnapshot | GraphWorkflowSnapshotInput, model?: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): LegacyGraphWorkflowSnapshot;
|
|
112
|
+
export declare function graphWorkflowSnapshotToJSON(snapshot: LegacyGraphWorkflowSnapshot, space?: number): string;
|
|
113
|
+
export declare function graphWorkflowSnapshotFromJSON(input: string | LegacyGraphWorkflowSnapshot, model?: GraphModelLike | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): LegacyGraphWorkflowSnapshot;
|
|
114
|
+
export declare function graphWorkflowSnapshotInputValuesOf(snapshot: LegacyGraphWorkflowSnapshot): Record<string, unknown>;
|
|
115
|
+
export declare function graphWorkflowSnapshotOutputValuesOf(snapshot: LegacyGraphWorkflowSnapshot): Record<string, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* Editor-only state that the canonical {@link GraphWorkflowDocument} cannot
|
|
118
|
+
* express (layout beyond node positions, config-store values, per-port modes,
|
|
119
|
+
* workflow boundary values, and duplicate counts). Stored as JSON-safe values
|
|
120
|
+
* only; constructors and `modelClass`/`sourceClass` references are dropped.
|
|
121
|
+
*/
|
|
122
|
+
export type GraphSnapshotEditorState = {
|
|
123
|
+
viewport?: {
|
|
124
|
+
x: number;
|
|
125
|
+
y: number;
|
|
126
|
+
scale: number;
|
|
127
|
+
};
|
|
128
|
+
duplicateCounts?: Record<string, number>;
|
|
129
|
+
boundaryInputValues?: Record<string, GraphJsonValue>;
|
|
130
|
+
boundaryOutputValues?: Record<string, GraphJsonValue>;
|
|
131
|
+
nodePorts?: Record<string, Record<string, GraphJsonValue>>;
|
|
132
|
+
nodeConfigs?: Record<string, GraphJsonValue>;
|
|
133
|
+
diagramMetadata?: Record<string, GraphJsonValue>;
|
|
134
|
+
definitionDisplay?: Record<string, GraphJsonValue>;
|
|
135
|
+
legacy?: GraphJsonValue;
|
|
136
|
+
} & {
|
|
137
|
+
[key: string]: GraphJsonValue | undefined;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Canonical document-first snapshot. `document` is the executable semantic
|
|
141
|
+
* truth; `editor` preserves legacy editor-only state for lossless round trips.
|
|
142
|
+
*/
|
|
143
|
+
export type GraphWorkflowSnapshot = {
|
|
144
|
+
document: GraphWorkflowDocument;
|
|
145
|
+
editor?: GraphSnapshotEditorState;
|
|
146
|
+
metadata?: Record<string, GraphJsonValue>;
|
|
147
|
+
};
|
|
148
|
+
export type GraphWorkflowSnapshotLike = LegacyGraphWorkflowSnapshot | GraphWorkflowSnapshot;
|
|
149
|
+
/** Maps a legacy snapshot to the canonical {@link GraphWorkflowDocument}. */
|
|
150
|
+
export declare function graphWorkflowDocumentFromLegacySnapshot(snapshot: LegacyGraphWorkflowSnapshot): GraphWorkflowDocument;
|
|
151
|
+
/**
|
|
152
|
+
* Converts a legacy persisted snapshot into the canonical wrapper. The canonical
|
|
153
|
+
* `document` carries executable semantics; `editor.legacy` keeps the sanitized
|
|
154
|
+
* (constructor-free) legacy payload so a canonical→legacy round trip is lossless
|
|
155
|
+
* for persisted data.
|
|
156
|
+
*/
|
|
157
|
+
export declare function graphWorkflowSnapshotFromLegacy(snapshot: LegacyGraphWorkflowSnapshot): GraphWorkflowSnapshot;
|
|
158
|
+
/**
|
|
159
|
+
* Reconstructs a legacy snapshot from a canonical wrapper. Uses the
|
|
160
|
+
* `editor.legacy` payload when present for exact round trips; otherwise it
|
|
161
|
+
* rebuilds a best-effort legacy snapshot from the document + editor state
|
|
162
|
+
* (constructors are never restored).
|
|
163
|
+
*/
|
|
164
|
+
export declare function graphWorkflowSnapshotToLegacy(snapshot: GraphWorkflowSnapshot): LegacyGraphWorkflowSnapshot;
|
|
165
|
+
/** Normalizes any accepted snapshot/document form to a canonical wrapper. */
|
|
166
|
+
export declare function graphWorkflowSnapshotLikeToCanonical(value: GraphWorkflowSnapshotLike | GraphWorkflowDocument): GraphWorkflowSnapshot;
|
|
107
167
|
export {};
|
|
@@ -1,3 +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";
|
|
3
|
+
export type { GraphWorkflowSnapshot, LegacyGraphWorkflowSnapshot, GraphWorkflowSnapshotDefinition, GraphWorkflowSnapshotEdge, GraphWorkflowSnapshotInput, GraphWorkflowSnapshotNode, GraphWorkflowSnapshotPosition, GraphWorkflowSnapshotReference, GraphWorkflowSnapshotSize, GraphWorkflowSnapshotState, GraphWorkflowSnapshotValue, GraphWorkflowSnapshotPortState, GraphWorkflowSnapshotLike, GraphSnapshotEditorState, } from "./snapshot.d.cts";
|
|
@@ -1,3 +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";
|
|
3
|
+
export type { GraphWorkflowSnapshot, LegacyGraphWorkflowSnapshot, GraphWorkflowSnapshotDefinition, GraphWorkflowSnapshotEdge, GraphWorkflowSnapshotInput, GraphWorkflowSnapshotNode, GraphWorkflowSnapshotPosition, GraphWorkflowSnapshotReference, GraphWorkflowSnapshotSize, GraphWorkflowSnapshotState, GraphWorkflowSnapshotValue, GraphWorkflowSnapshotPortState, GraphWorkflowSnapshotLike, GraphSnapshotEditorState, } 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.19.1";
|
|
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 = "e9c549d";
|
|
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.19.1-e9c549d";
|
|
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.19.1";
|
|
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 = "e9c549d";
|
|
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.19.1-e9c549d";
|
|
33
33
|
export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decaf-ts/ui-decorators",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Extension of decorator validation to ui elements to allow for web integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -122,9 +122,7 @@
|
|
|
122
122
|
"@decaf-ts/core": "latest",
|
|
123
123
|
"@decaf-ts/db-decorators": "latest",
|
|
124
124
|
"@decaf-ts/decoration": "latest",
|
|
125
|
-
"@decaf-ts/decorator-validation": "latest"
|
|
126
|
-
"better-docs": "^2.7.3",
|
|
127
|
-
"taffydb": "^2.7.3"
|
|
125
|
+
"@decaf-ts/decorator-validation": "latest"
|
|
128
126
|
},
|
|
129
127
|
"main": "./lib/cjs/index.cjs",
|
|
130
128
|
"module": "./lib/esm/index.js",
|
|
@@ -136,7 +134,9 @@
|
|
|
136
134
|
"./lib/cjs/overrides/index.cjs",
|
|
137
135
|
"./lib/cjs/graph/overrides/index.cjs",
|
|
138
136
|
"./lib/cjs/graph/overrides/overrides.cjs",
|
|
139
|
-
"./lib/cjs/model/overrides.cjs"
|
|
137
|
+
"./lib/cjs/model/overrides.cjs",
|
|
138
|
+
"./lib/cjs/user-requests/index.cjs",
|
|
139
|
+
"./lib/cjs/user-requests/index.mjs"
|
|
140
140
|
],
|
|
141
141
|
"overrides": {
|
|
142
142
|
"test-exclude": "^7.0.2",
|