@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.
Files changed (236) hide show
  1. package/dist/ui-decorators.cjs +1 -1
  2. package/lib/cjs/graph/catalog/GraphConnectionPolicy.cjs +20 -0
  3. package/lib/cjs/graph/catalog/GraphConnectionPolicy.cjs.map +1 -0
  4. package/lib/cjs/graph/catalog/GraphCredentialReference.cjs +15 -0
  5. package/lib/cjs/graph/catalog/GraphCredentialReference.cjs.map +1 -0
  6. package/lib/cjs/graph/catalog/GraphCredentialRequirement.cjs +16 -0
  7. package/lib/cjs/graph/catalog/GraphCredentialRequirement.cjs.map +1 -0
  8. package/lib/cjs/graph/catalog/GraphDynamicPortRule.cjs +31 -0
  9. package/lib/cjs/graph/catalog/GraphDynamicPortRule.cjs.map +1 -0
  10. package/lib/cjs/graph/catalog/GraphIconReference.cjs +22 -0
  11. package/lib/cjs/graph/catalog/GraphIconReference.cjs.map +1 -0
  12. package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs +298 -0
  13. package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs.map +1 -0
  14. package/lib/cjs/graph/catalog/GraphNodeCapability.cjs +23 -0
  15. package/lib/cjs/graph/catalog/GraphNodeCapability.cjs.map +1 -0
  16. package/lib/cjs/graph/catalog/GraphNodeDisplayManifest.cjs +11 -0
  17. package/lib/cjs/graph/catalog/GraphNodeDisplayManifest.cjs.map +1 -0
  18. package/lib/cjs/graph/catalog/GraphNodeManifest.cjs +23 -0
  19. package/lib/cjs/graph/catalog/GraphNodeManifest.cjs.map +1 -0
  20. package/lib/cjs/graph/catalog/GraphNodeManifestSerialization.cjs +50 -0
  21. package/lib/cjs/graph/catalog/GraphNodeManifestSerialization.cjs.map +1 -0
  22. package/lib/cjs/graph/catalog/GraphNodeMethodManifest.cjs +29 -0
  23. package/lib/cjs/graph/catalog/GraphNodeMethodManifest.cjs.map +1 -0
  24. package/lib/cjs/graph/catalog/GraphNodePolicyManifest.cjs +11 -0
  25. package/lib/cjs/graph/catalog/GraphNodePolicyManifest.cjs.map +1 -0
  26. package/lib/cjs/graph/catalog/GraphParameterBase.cjs +4 -0
  27. package/lib/cjs/graph/catalog/GraphParameterBase.cjs.map +1 -0
  28. package/lib/cjs/graph/catalog/GraphParameterDefinition.cjs +29 -0
  29. package/lib/cjs/graph/catalog/GraphParameterDefinition.cjs.map +1 -0
  30. package/lib/cjs/graph/catalog/GraphParameterOption.cjs +18 -0
  31. package/lib/cjs/graph/catalog/GraphParameterOption.cjs.map +1 -0
  32. package/lib/cjs/graph/catalog/GraphParameterValidation.cjs +57 -0
  33. package/lib/cjs/graph/catalog/GraphParameterValidation.cjs.map +1 -0
  34. package/lib/cjs/graph/catalog/GraphPortManifest.cjs +19 -0
  35. package/lib/cjs/graph/catalog/GraphPortManifest.cjs.map +1 -0
  36. package/lib/cjs/graph/catalog/GraphResourceLocatorMode.cjs +19 -0
  37. package/lib/cjs/graph/catalog/GraphResourceLocatorMode.cjs.map +1 -0
  38. package/lib/cjs/graph/catalog/GraphValueSchema.cjs +25 -0
  39. package/lib/cjs/graph/catalog/GraphValueSchema.cjs.map +1 -0
  40. package/lib/cjs/graph/catalog/GraphValueSchemaDerivation.cjs +164 -0
  41. package/lib/cjs/graph/catalog/GraphValueSchemaDerivation.cjs.map +1 -0
  42. package/lib/cjs/graph/catalog/GraphVisibilityExpression.cjs +63 -0
  43. package/lib/cjs/graph/catalog/GraphVisibilityExpression.cjs.map +1 -0
  44. package/lib/cjs/graph/catalog/index.cjs +39 -0
  45. package/lib/cjs/graph/catalog/index.cjs.map +1 -0
  46. package/lib/cjs/graph/constants.cjs +15 -1
  47. package/lib/cjs/graph/constants.cjs.map +1 -1
  48. package/lib/cjs/graph/document/GraphDecoratedWorkflowCompiler.cjs +296 -0
  49. package/lib/cjs/graph/document/GraphDecoratedWorkflowCompiler.cjs.map +1 -0
  50. package/lib/cjs/graph/document/GraphEdgeInstance.cjs +4 -0
  51. package/lib/cjs/graph/document/GraphEdgeInstance.cjs.map +1 -0
  52. package/lib/cjs/graph/document/GraphEndpoint.cjs +27 -0
  53. package/lib/cjs/graph/document/GraphEndpoint.cjs.map +1 -0
  54. package/lib/cjs/graph/document/GraphJsonValue.cjs +82 -0
  55. package/lib/cjs/graph/document/GraphJsonValue.cjs.map +1 -0
  56. package/lib/cjs/graph/document/GraphLoopConfiguration.cjs +4 -0
  57. package/lib/cjs/graph/document/GraphLoopConfiguration.cjs.map +1 -0
  58. package/lib/cjs/graph/document/GraphNodeBinding.cjs +27 -0
  59. package/lib/cjs/graph/document/GraphNodeBinding.cjs.map +1 -0
  60. package/lib/cjs/graph/document/GraphNodeInstance.cjs +4 -0
  61. package/lib/cjs/graph/document/GraphNodeInstance.cjs.map +1 -0
  62. package/lib/cjs/graph/document/GraphWorkflowDocument.cjs +16 -0
  63. package/lib/cjs/graph/document/GraphWorkflowDocument.cjs.map +1 -0
  64. package/lib/cjs/graph/document/GraphWorkflowDocumentBuilder.cjs +267 -0
  65. package/lib/cjs/graph/document/GraphWorkflowDocumentBuilder.cjs.map +1 -0
  66. package/lib/cjs/graph/document/GraphWorkflowDocumentReader.cjs +78 -0
  67. package/lib/cjs/graph/document/GraphWorkflowDocumentReader.cjs.map +1 -0
  68. package/lib/cjs/graph/document/GraphWorkflowDocumentSerializer.cjs +70 -0
  69. package/lib/cjs/graph/document/GraphWorkflowDocumentSerializer.cjs.map +1 -0
  70. package/lib/cjs/graph/document/GraphWorkflowUiState.cjs +4 -0
  71. package/lib/cjs/graph/document/GraphWorkflowUiState.cjs.map +1 -0
  72. package/lib/cjs/graph/document/index.cjs +30 -0
  73. package/lib/cjs/graph/document/index.cjs.map +1 -0
  74. package/lib/cjs/graph/index.cjs +2 -0
  75. package/lib/cjs/graph/index.cjs.map +1 -1
  76. package/lib/cjs/graph/snapshot.cjs +337 -0
  77. package/lib/cjs/graph/snapshot.cjs.map +1 -1
  78. package/lib/cjs/index.cjs +3 -3
  79. package/lib/esm/graph/catalog/GraphConnectionPolicy.js +16 -0
  80. package/lib/esm/graph/catalog/GraphConnectionPolicy.js.map +1 -0
  81. package/lib/esm/graph/catalog/GraphCredentialReference.js +9 -0
  82. package/lib/esm/graph/catalog/GraphCredentialReference.js.map +1 -0
  83. package/lib/esm/graph/catalog/GraphCredentialRequirement.js +12 -0
  84. package/lib/esm/graph/catalog/GraphCredentialRequirement.js.map +1 -0
  85. package/lib/esm/graph/catalog/GraphDynamicPortRule.js +25 -0
  86. package/lib/esm/graph/catalog/GraphDynamicPortRule.js.map +1 -0
  87. package/lib/esm/graph/catalog/GraphIconReference.js +18 -0
  88. package/lib/esm/graph/catalog/GraphIconReference.js.map +1 -0
  89. package/lib/esm/graph/catalog/GraphManifestCompiler.js +294 -0
  90. package/lib/esm/graph/catalog/GraphManifestCompiler.js.map +1 -0
  91. package/lib/esm/graph/catalog/GraphNodeCapability.js +17 -0
  92. package/lib/esm/graph/catalog/GraphNodeCapability.js.map +1 -0
  93. package/lib/esm/graph/catalog/GraphNodeDisplayManifest.js +7 -0
  94. package/lib/esm/graph/catalog/GraphNodeDisplayManifest.js.map +1 -0
  95. package/lib/esm/graph/catalog/GraphNodeManifest.js +17 -0
  96. package/lib/esm/graph/catalog/GraphNodeManifest.js.map +1 -0
  97. package/lib/esm/graph/catalog/GraphNodeManifestSerialization.js +42 -0
  98. package/lib/esm/graph/catalog/GraphNodeManifestSerialization.js.map +1 -0
  99. package/lib/esm/graph/catalog/GraphNodeMethodManifest.js +23 -0
  100. package/lib/esm/graph/catalog/GraphNodeMethodManifest.js.map +1 -0
  101. package/lib/esm/graph/catalog/GraphNodePolicyManifest.js +7 -0
  102. package/lib/esm/graph/catalog/GraphNodePolicyManifest.js.map +1 -0
  103. package/lib/esm/graph/catalog/GraphParameterBase.js +2 -0
  104. package/lib/esm/graph/catalog/GraphParameterBase.js.map +1 -0
  105. package/lib/esm/graph/catalog/GraphParameterDefinition.js +23 -0
  106. package/lib/esm/graph/catalog/GraphParameterDefinition.js.map +1 -0
  107. package/lib/esm/graph/catalog/GraphParameterOption.js +13 -0
  108. package/lib/esm/graph/catalog/GraphParameterOption.js.map +1 -0
  109. package/lib/esm/graph/catalog/GraphParameterValidation.js +50 -0
  110. package/lib/esm/graph/catalog/GraphParameterValidation.js.map +1 -0
  111. package/lib/esm/graph/catalog/GraphPortManifest.js +13 -0
  112. package/lib/esm/graph/catalog/GraphPortManifest.js.map +1 -0
  113. package/lib/esm/graph/catalog/GraphResourceLocatorMode.js +13 -0
  114. package/lib/esm/graph/catalog/GraphResourceLocatorMode.js.map +1 -0
  115. package/lib/esm/graph/catalog/GraphValueSchema.js +19 -0
  116. package/lib/esm/graph/catalog/GraphValueSchema.js.map +1 -0
  117. package/lib/esm/graph/catalog/GraphValueSchemaDerivation.js +156 -0
  118. package/lib/esm/graph/catalog/GraphValueSchemaDerivation.js.map +1 -0
  119. package/lib/esm/graph/catalog/GraphVisibilityExpression.js +58 -0
  120. package/lib/esm/graph/catalog/GraphVisibilityExpression.js.map +1 -0
  121. package/lib/esm/graph/catalog/index.js +22 -0
  122. package/lib/esm/graph/catalog/index.js.map +1 -0
  123. package/lib/esm/graph/constants.js +13 -0
  124. package/lib/esm/graph/constants.js.map +1 -1
  125. package/lib/esm/graph/document/GraphDecoratedWorkflowCompiler.js +290 -0
  126. package/lib/esm/graph/document/GraphDecoratedWorkflowCompiler.js.map +1 -0
  127. package/lib/esm/graph/document/GraphEdgeInstance.js +2 -0
  128. package/lib/esm/graph/document/GraphEdgeInstance.js.map +1 -0
  129. package/lib/esm/graph/document/GraphEndpoint.js +21 -0
  130. package/lib/esm/graph/document/GraphEndpoint.js.map +1 -0
  131. package/lib/esm/graph/document/GraphJsonValue.js +73 -0
  132. package/lib/esm/graph/document/GraphJsonValue.js.map +1 -0
  133. package/lib/esm/graph/document/GraphLoopConfiguration.js +2 -0
  134. package/lib/esm/graph/document/GraphLoopConfiguration.js.map +1 -0
  135. package/lib/esm/graph/document/GraphNodeBinding.js +22 -0
  136. package/lib/esm/graph/document/GraphNodeBinding.js.map +1 -0
  137. package/lib/esm/graph/document/GraphNodeInstance.js +2 -0
  138. package/lib/esm/graph/document/GraphNodeInstance.js.map +1 -0
  139. package/lib/esm/graph/document/GraphWorkflowDocument.js +12 -0
  140. package/lib/esm/graph/document/GraphWorkflowDocument.js.map +1 -0
  141. package/lib/esm/graph/document/GraphWorkflowDocumentBuilder.js +261 -0
  142. package/lib/esm/graph/document/GraphWorkflowDocumentBuilder.js.map +1 -0
  143. package/lib/esm/graph/document/GraphWorkflowDocumentReader.js +62 -0
  144. package/lib/esm/graph/document/GraphWorkflowDocumentReader.js.map +1 -0
  145. package/lib/esm/graph/document/GraphWorkflowDocumentSerializer.js +63 -0
  146. package/lib/esm/graph/document/GraphWorkflowDocumentSerializer.js.map +1 -0
  147. package/lib/esm/graph/document/GraphWorkflowUiState.js +2 -0
  148. package/lib/esm/graph/document/GraphWorkflowUiState.js.map +1 -0
  149. package/lib/esm/graph/document/index.js +13 -0
  150. package/lib/esm/graph/document/index.js.map +1 -0
  151. package/lib/esm/graph/index.js +2 -0
  152. package/lib/esm/graph/index.js.map +1 -1
  153. package/lib/esm/graph/snapshot.js +333 -0
  154. package/lib/esm/graph/snapshot.js.map +1 -1
  155. package/lib/esm/index.js +3 -3
  156. package/lib/types/graph/catalog/GraphConnectionPolicy.d.cts +9 -0
  157. package/lib/types/graph/catalog/GraphConnectionPolicy.d.mts +9 -0
  158. package/lib/types/graph/catalog/GraphCredentialReference.d.cts +6 -0
  159. package/lib/types/graph/catalog/GraphCredentialReference.d.mts +6 -0
  160. package/lib/types/graph/catalog/GraphCredentialRequirement.d.cts +7 -0
  161. package/lib/types/graph/catalog/GraphCredentialRequirement.d.mts +7 -0
  162. package/lib/types/graph/catalog/GraphDynamicPortRule.d.cts +22 -0
  163. package/lib/types/graph/catalog/GraphDynamicPortRule.d.mts +22 -0
  164. package/lib/types/graph/catalog/GraphIconReference.d.cts +12 -0
  165. package/lib/types/graph/catalog/GraphIconReference.d.mts +12 -0
  166. package/lib/types/graph/catalog/GraphManifestCompiler.d.cts +14 -0
  167. package/lib/types/graph/catalog/GraphManifestCompiler.d.mts +14 -0
  168. package/lib/types/graph/catalog/GraphNodeCapability.d.cts +4 -0
  169. package/lib/types/graph/catalog/GraphNodeCapability.d.mts +4 -0
  170. package/lib/types/graph/catalog/GraphNodeDisplayManifest.d.cts +16 -0
  171. package/lib/types/graph/catalog/GraphNodeDisplayManifest.d.mts +16 -0
  172. package/lib/types/graph/catalog/GraphNodeManifest.d.cts +26 -0
  173. package/lib/types/graph/catalog/GraphNodeManifest.d.mts +26 -0
  174. package/lib/types/graph/catalog/GraphNodeManifestSerialization.d.cts +7 -0
  175. package/lib/types/graph/catalog/GraphNodeManifestSerialization.d.mts +7 -0
  176. package/lib/types/graph/catalog/GraphNodeMethodManifest.d.cts +10 -0
  177. package/lib/types/graph/catalog/GraphNodeMethodManifest.d.mts +10 -0
  178. package/lib/types/graph/catalog/GraphNodePolicyManifest.d.cts +11 -0
  179. package/lib/types/graph/catalog/GraphNodePolicyManifest.d.mts +11 -0
  180. package/lib/types/graph/catalog/GraphParameterBase.d.cts +14 -0
  181. package/lib/types/graph/catalog/GraphParameterBase.d.mts +14 -0
  182. package/lib/types/graph/catalog/GraphParameterDefinition.d.cts +66 -0
  183. package/lib/types/graph/catalog/GraphParameterDefinition.d.mts +66 -0
  184. package/lib/types/graph/catalog/GraphParameterOption.d.cts +8 -0
  185. package/lib/types/graph/catalog/GraphParameterOption.d.mts +8 -0
  186. package/lib/types/graph/catalog/GraphParameterValidation.d.cts +25 -0
  187. package/lib/types/graph/catalog/GraphParameterValidation.d.mts +25 -0
  188. package/lib/types/graph/catalog/GraphPortManifest.d.cts +21 -0
  189. package/lib/types/graph/catalog/GraphPortManifest.d.mts +21 -0
  190. package/lib/types/graph/catalog/GraphResourceLocatorMode.d.cts +10 -0
  191. package/lib/types/graph/catalog/GraphResourceLocatorMode.d.mts +10 -0
  192. package/lib/types/graph/catalog/GraphValueSchema.d.cts +44 -0
  193. package/lib/types/graph/catalog/GraphValueSchema.d.mts +44 -0
  194. package/lib/types/graph/catalog/GraphValueSchemaDerivation.d.cts +9 -0
  195. package/lib/types/graph/catalog/GraphValueSchemaDerivation.d.mts +9 -0
  196. package/lib/types/graph/catalog/GraphVisibilityExpression.d.cts +22 -0
  197. package/lib/types/graph/catalog/GraphVisibilityExpression.d.mts +22 -0
  198. package/lib/types/graph/catalog/index.d.cts +21 -0
  199. package/lib/types/graph/catalog/index.d.mts +21 -0
  200. package/lib/types/graph/constants.d.cts +8 -0
  201. package/lib/types/graph/constants.d.mts +8 -0
  202. package/lib/types/graph/document/GraphDecoratedWorkflowCompiler.d.cts +26 -0
  203. package/lib/types/graph/document/GraphDecoratedWorkflowCompiler.d.mts +26 -0
  204. package/lib/types/graph/document/GraphEdgeInstance.d.cts +12 -0
  205. package/lib/types/graph/document/GraphEdgeInstance.d.mts +12 -0
  206. package/lib/types/graph/document/GraphEndpoint.d.cts +13 -0
  207. package/lib/types/graph/document/GraphEndpoint.d.mts +13 -0
  208. package/lib/types/graph/document/GraphJsonValue.d.cts +11 -0
  209. package/lib/types/graph/document/GraphJsonValue.d.mts +11 -0
  210. package/lib/types/graph/document/GraphLoopConfiguration.d.cts +24 -0
  211. package/lib/types/graph/document/GraphLoopConfiguration.d.mts +24 -0
  212. package/lib/types/graph/document/GraphNodeBinding.d.cts +21 -0
  213. package/lib/types/graph/document/GraphNodeBinding.d.mts +21 -0
  214. package/lib/types/graph/document/GraphNodeInstance.d.cts +16 -0
  215. package/lib/types/graph/document/GraphNodeInstance.d.mts +16 -0
  216. package/lib/types/graph/document/GraphWorkflowDocument.d.cts +33 -0
  217. package/lib/types/graph/document/GraphWorkflowDocument.d.mts +33 -0
  218. package/lib/types/graph/document/GraphWorkflowDocumentBuilder.d.cts +28 -0
  219. package/lib/types/graph/document/GraphWorkflowDocumentBuilder.d.mts +28 -0
  220. package/lib/types/graph/document/GraphWorkflowDocumentReader.d.cts +21 -0
  221. package/lib/types/graph/document/GraphWorkflowDocumentReader.d.mts +21 -0
  222. package/lib/types/graph/document/GraphWorkflowDocumentSerializer.d.cts +5 -0
  223. package/lib/types/graph/document/GraphWorkflowDocumentSerializer.d.mts +5 -0
  224. package/lib/types/graph/document/GraphWorkflowUiState.d.cts +29 -0
  225. package/lib/types/graph/document/GraphWorkflowUiState.d.mts +29 -0
  226. package/lib/types/graph/document/index.d.cts +12 -0
  227. package/lib/types/graph/document/index.d.mts +12 -0
  228. package/lib/types/graph/index.d.cts +2 -0
  229. package/lib/types/graph/index.d.mts +2 -0
  230. package/lib/types/graph/snapshot.d.cts +67 -7
  231. package/lib/types/graph/snapshot.d.mts +67 -7
  232. package/lib/types/graph/types.d.cts +1 -1
  233. package/lib/types/graph/types.d.mts +1 -1
  234. package/lib/types/index.d.cts +3 -3
  235. package/lib/types/index.d.mts +3 -3
  236. 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
- export type GraphWorkflowSnapshot = {
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): GraphWorkflowSnapshot;
102
- export declare function graphWorkflowSnapshotRestore<M extends Model>(snapshot: GraphWorkflowSnapshot | GraphWorkflowSnapshotInput, model?: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshot;
103
- export declare function graphWorkflowSnapshotToJSON(snapshot: GraphWorkflowSnapshot, space?: number): string;
104
- export declare function graphWorkflowSnapshotFromJSON(input: string | GraphWorkflowSnapshot, model?: GraphModelLike | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshot;
105
- export declare function graphWorkflowSnapshotInputValuesOf(snapshot: GraphWorkflowSnapshot): Record<string, unknown>;
106
- export declare function graphWorkflowSnapshotOutputValuesOf(snapshot: GraphWorkflowSnapshot): Record<string, unknown>;
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
- export type GraphWorkflowSnapshot = {
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): GraphWorkflowSnapshot;
102
- export declare function graphWorkflowSnapshotRestore<M extends Model>(snapshot: GraphWorkflowSnapshot | GraphWorkflowSnapshotInput, model?: GraphModelLike<M> | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshot;
103
- export declare function graphWorkflowSnapshotToJSON(snapshot: GraphWorkflowSnapshot, space?: number): string;
104
- export declare function graphWorkflowSnapshotFromJSON(input: string | GraphWorkflowSnapshot, model?: GraphModelLike | GraphWorkflowDefinition | GraphWorkflowSnapshotDefinition): GraphWorkflowSnapshot;
105
- export declare function graphWorkflowSnapshotInputValuesOf(snapshot: GraphWorkflowSnapshot): Record<string, unknown>;
106
- export declare function graphWorkflowSnapshotOutputValuesOf(snapshot: GraphWorkflowSnapshot): Record<string, unknown>;
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";
@@ -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.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 = "23dcb33";
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.18.0-23dcb33";
32
+ export declare const FULL_VERSION = "0.19.1-e9c549d";
33
33
  export declare const PACKAGE_NAME = "@decaf-ts/ui-decorators";
@@ -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.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 = "23dcb33";
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.18.0-23dcb33";
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.19.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",