@jentic/arazzo-ui 1.0.0-alpha.13

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/package.json ADDED
@@ -0,0 +1,92 @@
1
+ {
2
+ "name": "@jentic/arazzo-ui",
3
+ "version": "1.0.0-alpha.13",
4
+ "description": "UI for Arazzo Workflows.",
5
+ "keywords": [
6
+ "arazzo",
7
+ "arazzo-specification",
8
+ "ui",
9
+ "renderer",
10
+ "workflow",
11
+ "workflows"
12
+ ],
13
+ "publishConfig": {
14
+ "access": "public",
15
+ "registry": "https://registry.npmjs.org",
16
+ "tag": "latest"
17
+ },
18
+ "type": "module",
19
+ "sideEffects": [
20
+ "*.css"
21
+ ],
22
+ "unpkg": "./dist/arazzo-ui.js",
23
+ "main": "./dist/arazzo-ui.js",
24
+ "module": "./dist/arazzo-ui.mjs",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./types/arazzo-ui.d.ts",
28
+ "import": "./dist/arazzo-ui.mjs",
29
+ "require": "./dist/arazzo-ui.js"
30
+ },
31
+ "./standalone": {
32
+ "types": "./types/arazzo-ui-standalone.d.ts",
33
+ "import": "./dist/arazzo-ui-standalone.mjs",
34
+ "require": "./dist/arazzo-ui-standalone.js"
35
+ },
36
+ "./styles.css": "./dist/arazzo-ui.css"
37
+ },
38
+ "types": "./types/arazzo-ui.d.ts",
39
+ "scripts": {
40
+ "dev": "vite serve --config config/vite/vite.dev.config.ts",
41
+ "build": "npm run clean && run-p --max-parallel ${CPU_CORES:-2} typescript:declaration build:umd:ui build:umd:standalone build:esm:ui build:esm:standalone && npm run build:app",
42
+ "build:umd:ui": "cross-env BUILD_ENTRY=ArazzoUI vite build --config config/vite/vite.config.ts",
43
+ "build:umd:standalone": "cross-env BUILD_ENTRY=ArazzoUIStandalone vite build --config config/vite/vite.config.ts",
44
+ "build:esm:ui": "cross-env BUILD_FORMAT=esm BUILD_ENTRY=ArazzoUI vite build --config config/vite/vite.config.ts",
45
+ "build:esm:standalone": "cross-env BUILD_FORMAT=esm BUILD_ENTRY=ArazzoUIStandalone vite build --config config/vite/vite.config.ts",
46
+ "build:app": "npm run build:umd:standalone && rimraf ./build && mkdir -p ./build && cp ./dist/arazzo-ui-standalone.js ./dist/arazzo-ui.css ./build/ && cp ./public/app.html ./build/index.html && cp ./public/petstore-order-workflow.arazzo.yaml ./build/",
47
+ "lint": "eslint ./",
48
+ "lint:fix": "eslint ./ --fix",
49
+ "clean": "rimraf ./dist ./types ./build",
50
+ "typescript:check-types": "tsc --noEmit",
51
+ "typescript:declaration": "tsc -p tsconfig.declaration.json && api-extractor run -l -c ./config/api-extractor/api-extractor.ArazzoUI.json && api-extractor run -l -c ./config/api-extractor/api-extractor.ArazzoUIStandalone.json",
52
+ "test": "echo 'no tests yet'",
53
+ "prepack": "copyfiles -u 2 ../../LICENSE . && copyfiles -u 2 ../../NOTICE .",
54
+ "postpack": "rimraf NOTICE LICENSE"
55
+ },
56
+ "repository": {
57
+ "type": "git",
58
+ "url": "git+https://github.com/jentic/jentic-arazzo-tools.git"
59
+ },
60
+ "author": "Jentic <hello@jentic.com>",
61
+ "license": "Apache-2.0",
62
+ "dependencies": {
63
+ "@jentic/arazzo-parser": "^1.0.0-alpha.13",
64
+ "@jentic/arazzo-resolver": "^1.0.0-alpha.13",
65
+ "@speclynx/apidom-core": "2.11.0",
66
+ "mermaid": "^11.12.2",
67
+ "react-markdown": "^10.1.0",
68
+ "reactflow": "^11.10.4",
69
+ "rehype-highlight": "^7.0.2",
70
+ "rehype-raw": "^7.0.0",
71
+ "remark-gfm": "^4.0.1"
72
+ },
73
+ "peerDependencies": {
74
+ "react": "^18.0.0 || ^19.0.0",
75
+ "react-dom": "^18.0.0 || ^19.0.0"
76
+ },
77
+ "devDependencies": {
78
+ "@types/react": "^18.2.43",
79
+ "@types/react-dom": "^18.2.17",
80
+ "@vitejs/plugin-react": "^4.2.1",
81
+ "vite": "^6.3.5"
82
+ },
83
+ "files": [
84
+ "dist/",
85
+ "types/arazzo-ui.d.ts",
86
+ "types/arazzo-ui-standalone.d.ts",
87
+ "LICENSE",
88
+ "NOTICE",
89
+ "README.md",
90
+ "CHANGELOG.md"
91
+ ]
92
+ }
@@ -0,0 +1,337 @@
1
+ import { Edge } from 'reactflow';
2
+ import { Node as Node_2 } from 'reactflow';
3
+ import { default as React_2 } from 'react';
4
+
5
+ /**
6
+ * Arazzo Specification v1.0.1 Type Definitions
7
+ * Based on: https://spec.openapis.org/arazzo/latest.html
8
+ */
9
+ /** @public */
10
+ export declare interface ArazzoDocument {
11
+ arazzo: string;
12
+ info: InfoObject;
13
+ sourceDescriptions: SourceDescription[];
14
+ workflows: Workflow[];
15
+ components?: ComponentsObject;
16
+ }
17
+
18
+ /** @public */
19
+ export declare type ArazzoEdge = Edge<ArazzoEdgeData>;
20
+
21
+ /** @public */
22
+ export declare type ArazzoEdgeData = SequentialEdgeData | SuccessEdgeData | FailureEdgeData | RetryEdgeData | BundledSuccessEdgeData | BundledFailureEdgeData | BundledRetryEdgeData;
23
+
24
+ /** @public */
25
+ export declare type ArazzoNode = Node_2<ArazzoNodeData>;
26
+
27
+ /** @public */
28
+ export declare type ArazzoNodeData = StepNodeData | WorkflowRefNodeData | StartNodeData | EndNodeData | WorkflowNodeData | ExternalWorkflowNodeData;
29
+
30
+ /** @public */
31
+ export declare interface ArazzoUIProps {
32
+ document: ArazzoDocument | string;
33
+ view?: ViewerMode;
34
+ activeWorkflowId?: string | null;
35
+ selectedNodeId?: string | null;
36
+ diagramType?: DiagramType | 'none';
37
+ className?: string;
38
+ style?: React.CSSProperties;
39
+ onNodeSelect?: (nodeId: string, node: ArazzoNode) => void;
40
+ onEdgeSelect?: (edgeId: string, edge: ArazzoEdge) => void;
41
+ onWorkflowSelect?: (workflowId: string) => void;
42
+ onViewChange?: (view: ViewerMode) => void;
43
+ }
44
+
45
+ /** @public */
46
+ export declare interface ArazzoUIRef {
47
+ fitView(): void;
48
+ setZoom(level: number): void;
49
+ getDocument(): ArazzoDocument;
50
+ setActiveWorkflow(workflowId: string | null): void;
51
+ selectStep(stepId: string): void;
52
+ clearSelection(): void;
53
+ getActiveWorkflowId(): string | null;
54
+ getSelectedStepId(): string | null;
55
+ }
56
+
57
+ /**
58
+ * ArazzoUIStandalone - Self-contained Arazzo viewer with built-in header
59
+ *
60
+ * Includes Jentic logo, URL input for loading documents, and view mode toggle.
61
+ * Use this when you want a complete, ready-to-use viewer widget.
62
+ * For custom layouts without the header, use ArazzoUI directly.
63
+ *
64
+ * @public
65
+ */
66
+ export declare const ArazzoUIStandalone: React_2.ForwardRefExoticComponent<Omit<ArazzoUIProps, "view"> & {
67
+ initialView?: ViewerMode;
68
+ } & React_2.RefAttributes<ArazzoUIRef>>;
69
+
70
+ /** @public */
71
+ export declare type ArazzoUIStandaloneProps = Omit<ArazzoUIProps, 'view'> & {
72
+ initialView?: ViewerMode;
73
+ };
74
+
75
+ /** @public */
76
+ export declare interface BundledFailureEdgeData {
77
+ type: 'bundled-failure';
78
+ action: FailureAction;
79
+ criteria?: Criterion[];
80
+ sources: Array<{
81
+ nodeId: string;
82
+ handleId: string;
83
+ }>;
84
+ actionIdx: number;
85
+ }
86
+
87
+ /** @public */
88
+ export declare interface BundledRetryEdgeData {
89
+ type: 'bundled-retry';
90
+ action: FailureAction;
91
+ retryAfter?: number;
92
+ retryLimit?: number;
93
+ criteria?: Criterion[];
94
+ sources: Array<{
95
+ nodeId: string;
96
+ handleId: string;
97
+ }>;
98
+ actionIdx: number;
99
+ }
100
+
101
+ /** @public */
102
+ export declare interface BundledSuccessEdgeData {
103
+ type: 'bundled-success';
104
+ action: SuccessAction;
105
+ criteria?: Criterion[];
106
+ sources: Array<{
107
+ nodeId: string;
108
+ handleId: string;
109
+ }>;
110
+ actionIdx: number;
111
+ }
112
+
113
+ /** @public */
114
+ export declare interface ComponentsObject {
115
+ inputs?: Record<string, JSONSchema>;
116
+ parameters?: Record<string, Parameter>;
117
+ successActions?: Record<string, SuccessAction>;
118
+ failureActions?: Record<string, FailureAction>;
119
+ }
120
+
121
+ /** @public */
122
+ export declare interface Criterion {
123
+ context?: string;
124
+ condition: string;
125
+ type?: 'simple' | 'regex' | 'jsonpath' | 'xpath' | CriterionExpressionType;
126
+ }
127
+
128
+ /** @public */
129
+ export declare interface CriterionExpressionType {
130
+ type: 'jsonpath' | 'xpath';
131
+ version: string;
132
+ }
133
+
134
+ /** @public */
135
+ export declare type DiagramType = 'sequence' | 'flowchart';
136
+
137
+ /** @public */
138
+ export declare interface EndNodeData {
139
+ type: 'end';
140
+ workflowId: string;
141
+ outputs?: Record<string, string>;
142
+ }
143
+
144
+ /** @public */
145
+ export declare interface ExternalWorkflowNodeData {
146
+ type: 'externalWorkflow';
147
+ workflowId: string;
148
+ workflow?: Workflow;
149
+ onClick?: (workflowId: string) => void;
150
+ }
151
+
152
+ /** @public */
153
+ export declare interface FailureAction {
154
+ name: string;
155
+ type: 'end' | 'retry' | 'goto';
156
+ workflowId?: string;
157
+ stepId?: string;
158
+ retryAfter?: number;
159
+ retryLimit?: number;
160
+ criteria?: Criterion[];
161
+ }
162
+
163
+ /** @public */
164
+ export declare interface FailureEdgeData {
165
+ type: 'failure';
166
+ action: FailureAction;
167
+ criteria?: Criterion[];
168
+ isInherited?: boolean;
169
+ }
170
+
171
+ /** @public */
172
+ export declare interface InfoObject {
173
+ title: string;
174
+ version: string;
175
+ summary?: string;
176
+ description?: string;
177
+ }
178
+
179
+ /** @public */
180
+ export declare type JSONSchema = Record<string, any>;
181
+
182
+ /** @public */
183
+ export declare interface Parameter {
184
+ name: string;
185
+ in?: 'path' | 'query' | 'header' | 'cookie';
186
+ value: any;
187
+ }
188
+
189
+ /** @public */
190
+ export declare interface PayloadReplacement {
191
+ target: string;
192
+ value: any;
193
+ }
194
+
195
+ /** @public */
196
+ export declare interface RequestBody {
197
+ contentType?: string;
198
+ payload?: any;
199
+ replacements?: PayloadReplacement[];
200
+ }
201
+
202
+ /** @public */
203
+ export declare interface RetryEdgeData {
204
+ type: 'retry';
205
+ action: FailureAction;
206
+ retryAfter?: number;
207
+ retryLimit?: number;
208
+ criteria?: Criterion[];
209
+ isInherited?: boolean;
210
+ }
211
+
212
+ /** @public */
213
+ export declare interface ReusableObject {
214
+ reference: string;
215
+ value?: string;
216
+ }
217
+
218
+ /** @public */
219
+ export declare interface SequentialEdgeData {
220
+ type: 'sequential';
221
+ }
222
+
223
+ /** @public */
224
+ export declare interface SourceDescription {
225
+ name: string;
226
+ url: string;
227
+ type?: 'openapi' | 'arazzo';
228
+ /** Internal tracking ID - not part of Arazzo spec, stripped on export */
229
+ _internalId?: string;
230
+ }
231
+
232
+ /** @public */
233
+ export declare interface StartNodeData {
234
+ type: 'start';
235
+ workflowId: string;
236
+ inputs?: JSONSchema;
237
+ description?: string;
238
+ }
239
+
240
+ /** @public */
241
+ export declare interface Step {
242
+ stepId: string;
243
+ description?: string;
244
+ operationId?: string;
245
+ operationPath?: string;
246
+ workflowId?: string;
247
+ parameters?: (Parameter | ReusableObject)[];
248
+ requestBody?: RequestBody;
249
+ successCriteria?: Criterion[];
250
+ onSuccess?: (SuccessAction | ReusableObject)[];
251
+ onFailure?: (FailureAction | ReusableObject)[];
252
+ outputs?: Record<string, string>;
253
+ /** Internal tracking ID - not part of Arazzo spec, stripped on export */
254
+ _internalId?: string;
255
+ }
256
+
257
+ /** @public */
258
+ export declare interface StepNodeData {
259
+ type: 'step';
260
+ step: Step;
261
+ workflowId: string;
262
+ workflowSuccessActions?: (SuccessAction | {
263
+ $ref: string;
264
+ })[];
265
+ workflowFailureActions?: (FailureAction | {
266
+ $ref: string;
267
+ })[];
268
+ isValid: boolean;
269
+ errors?: ValidationError[];
270
+ isSelected?: boolean;
271
+ isHighlighted?: boolean;
272
+ }
273
+
274
+ /** @public */
275
+ export declare interface SuccessAction {
276
+ name: string;
277
+ type: 'end' | 'goto';
278
+ workflowId?: string;
279
+ stepId?: string;
280
+ criteria?: Criterion[];
281
+ }
282
+
283
+ /** @public */
284
+ export declare interface SuccessEdgeData {
285
+ type: 'success';
286
+ action: SuccessAction;
287
+ criteria?: Criterion[];
288
+ isInherited?: boolean;
289
+ }
290
+
291
+ /** @public */
292
+ export declare interface ValidationError {
293
+ path: string;
294
+ message: string;
295
+ severity: 'error' | 'warning';
296
+ nodeId?: string;
297
+ edgeId?: string;
298
+ specRef?: string;
299
+ }
300
+
301
+ /** @public */
302
+ export declare type ViewerMode = 'diagram' | 'docs' | 'split';
303
+
304
+ /** @public */
305
+ export declare interface Workflow {
306
+ workflowId: string;
307
+ summary?: string;
308
+ description?: string;
309
+ inputs?: JSONSchema;
310
+ dependsOn?: string[];
311
+ steps: Step[];
312
+ successActions?: (SuccessAction | ReusableObject)[];
313
+ failureActions?: (FailureAction | ReusableObject)[];
314
+ outputs?: Record<string, string>;
315
+ parameters?: (Parameter | ReusableObject)[];
316
+ /** Internal tracking ID - not part of Arazzo spec, stripped on export */
317
+ _internalId?: string;
318
+ }
319
+
320
+ /** @public */
321
+ export declare interface WorkflowNodeData {
322
+ type: 'workflow';
323
+ workflow: Workflow;
324
+ onClick?: (workflowId: string) => void;
325
+ }
326
+
327
+ /** @public */
328
+ export declare interface WorkflowRefNodeData {
329
+ type: 'workflowRef';
330
+ step: Step;
331
+ targetWorkflowId: string;
332
+ workflowSuccessActions?: (SuccessAction | ReusableObject)[];
333
+ workflowFailureActions?: (FailureAction | ReusableObject)[];
334
+ isValid: boolean;
335
+ }
336
+
337
+ export { }