forma-diagrams 0.5.2

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 (109) hide show
  1. package/Dockerfile +16 -0
  2. package/LICENSE +21 -0
  3. package/README.md +113 -0
  4. package/THIRD_PARTY_NOTICES.md +20 -0
  5. package/bin/forma +3 -0
  6. package/deploy/.env.example +11 -0
  7. package/deploy/Caddyfile +4 -0
  8. package/deploy/compose.yml +38 -0
  9. package/dist/assets/IBMPlexSans-Regular-Bl2SjS7V.ttf +0 -0
  10. package/dist/assets/IBMPlexSans-SemiBold-B9auKknr.ttf +0 -0
  11. package/dist/assets/elk.bundled-Y7ymokgr.js +24 -0
  12. package/dist/assets/index-_kg9cdik.css +1 -0
  13. package/dist/assets/index-al0xDdTG.js +452 -0
  14. package/dist/fonts/IBMPlexSans-Regular.ttf +0 -0
  15. package/dist/fonts/IBMPlexSans-SemiBold.ttf +0 -0
  16. package/dist/fonts/OFL.txt +93 -0
  17. package/dist/index.html +14 -0
  18. package/dist/licenses/FORMA_LICENSE.txt +21 -0
  19. package/dist/licenses/THIRD_PARTY_LICENSES.txt +11601 -0
  20. package/docs/api.md +41 -0
  21. package/docs/decisions/001-foundation.md +57 -0
  22. package/docs/decisions/002-composition-and-human-edits.md +47 -0
  23. package/docs/decisions/003-general-composition.md +30 -0
  24. package/docs/decisions/004-library-and-distribution.md +33 -0
  25. package/docs/decisions/005-organizational-hosting.md +33 -0
  26. package/docs/decisions/006-hosted-agent-access.md +25 -0
  27. package/docs/format.md +132 -0
  28. package/docs/gallery.md +73 -0
  29. package/docs/images/architecture.png +0 -0
  30. package/docs/images/editor.png +0 -0
  31. package/docs/images/gallery/architecture.png +0 -0
  32. package/docs/images/gallery/decision.png +0 -0
  33. package/docs/images/gallery/development-signal.png +0 -0
  34. package/docs/images/gallery/development.png +0 -0
  35. package/docs/images/gallery/editor-roundtrip.png +0 -0
  36. package/docs/images/gallery/entities.png +0 -0
  37. package/docs/images/gallery/mindmap.png +0 -0
  38. package/docs/images/gallery/organization.png +0 -0
  39. package/docs/images/gallery/timeline.png +0 -0
  40. package/docs/images/release.png +0 -0
  41. package/docs/install.md +50 -0
  42. package/docs/plans/mvp.md +24 -0
  43. package/docs/self-hosting.md +167 -0
  44. package/docs/verification-v2.md +41 -0
  45. package/docs/verification-v3.md +16 -0
  46. package/docs/verification-v4.1.md +35 -0
  47. package/docs/verification-v4.2.md +20 -0
  48. package/docs/verification-v4.3.md +5 -0
  49. package/docs/verification-v4.md +31 -0
  50. package/docs/verification-v5.1.md +7 -0
  51. package/docs/verification-v5.2.md +7 -0
  52. package/docs/verification-v5.md +7 -0
  53. package/docs/verification.md +91 -0
  54. package/examples/design-systems/atelier.json +53 -0
  55. package/examples/design-systems/signal.json +53 -0
  56. package/examples/gallery/architecture.forma.json +178 -0
  57. package/examples/gallery/decision.forma.json +182 -0
  58. package/examples/gallery/development-signal.forma.json +299 -0
  59. package/examples/gallery/development.forma.json +299 -0
  60. package/examples/gallery/entities.forma.json +123 -0
  61. package/examples/gallery/mindmap.forma.json +158 -0
  62. package/examples/gallery/organization.forma.json +151 -0
  63. package/examples/gallery/timeline.forma.json +138 -0
  64. package/examples/platform.forma.json +116 -0
  65. package/examples/release.forma.json +58 -0
  66. package/examples/roundtrip/agent-continued.forma.json +310 -0
  67. package/examples/roundtrip/agent-patch.json +7 -0
  68. package/examples/roundtrip/human-edited.forma.json +309 -0
  69. package/package.json +81 -0
  70. package/packages/cli/bin.mjs +3 -0
  71. package/packages/cli/src/agent-access.ts +232 -0
  72. package/packages/cli/src/blob-store.ts +241 -0
  73. package/packages/cli/src/file-library.ts +179 -0
  74. package/packages/cli/src/google.ts +51 -0
  75. package/packages/cli/src/hosted.ts +498 -0
  76. package/packages/cli/src/http.ts +67 -0
  77. package/packages/cli/src/index.ts +397 -0
  78. package/packages/cli/src/mcp.ts +114 -0
  79. package/packages/cli/src/remote.ts +228 -0
  80. package/packages/cli/src/server.ts +69 -0
  81. package/packages/cli/src/signed-cookie.ts +42 -0
  82. package/packages/core/src/align.ts +237 -0
  83. package/packages/core/src/document.ts +408 -0
  84. package/packages/core/src/font-metrics.json +1 -0
  85. package/packages/core/src/geometry.ts +463 -0
  86. package/packages/core/src/index.ts +12 -0
  87. package/packages/core/src/inspect.ts +230 -0
  88. package/packages/core/src/layout.ts +450 -0
  89. package/packages/core/src/render.ts +182 -0
  90. package/packages/core/src/resolve-style.ts +29 -0
  91. package/packages/core/src/scene.ts +40 -0
  92. package/packages/core/src/styles.ts +122 -0
  93. package/packages/core/src/text.ts +81 -0
  94. package/packages/core/src/theme.ts +33 -0
  95. package/public/fonts/IBMPlexSans-Regular.ttf +0 -0
  96. package/public/fonts/IBMPlexSans-SemiBold.ttf +0 -0
  97. package/public/fonts/OFL.txt +93 -0
  98. package/schema/design-system.v1.schema.json +734 -0
  99. package/schema/forma.v1.schema.json +273 -0
  100. package/schema/forma.v2.schema.json +1756 -0
  101. package/skills/forma/SKILL.md +20 -0
  102. package/skills/forma/references/composition.md +11 -0
  103. package/skills/forma/references/hosted.md +28 -0
  104. package/skills/forma-architecture/SKILL.md +14 -0
  105. package/skills/forma-entities/SKILL.md +14 -0
  106. package/skills/forma-flow/SKILL.md +14 -0
  107. package/skills/forma-mindmap/SKILL.md +14 -0
  108. package/skills/forma-organization/SKILL.md +14 -0
  109. package/skills/forma-timeline/SKILL.md +14 -0
@@ -0,0 +1,1756 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "version": {
6
+ "type": "number",
7
+ "const": 2
8
+ },
9
+ "title": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "maxLength": 200
13
+ },
14
+ "description": {
15
+ "type": "string",
16
+ "maxLength": 2000
17
+ },
18
+ "type": {
19
+ "default": "diagram",
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 80
23
+ },
24
+ "nodes": {
25
+ "maxItems": 200,
26
+ "type": "array",
27
+ "items": {
28
+ "type": "object",
29
+ "properties": {
30
+ "id": {
31
+ "type": "string",
32
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
33
+ },
34
+ "label": {
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 240
38
+ },
39
+ "description": {
40
+ "type": "string",
41
+ "maxLength": 2000
42
+ },
43
+ "kind": {
44
+ "default": "service",
45
+ "type": "string",
46
+ "minLength": 1,
47
+ "maxLength": 80
48
+ },
49
+ "role": {
50
+ "type": "string",
51
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
52
+ },
53
+ "style": {
54
+ "type": "object",
55
+ "properties": {
56
+ "fill": {
57
+ "type": "string",
58
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
59
+ },
60
+ "stroke": {
61
+ "type": "string",
62
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
63
+ },
64
+ "text": {
65
+ "type": "string",
66
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
67
+ },
68
+ "secondary": {
69
+ "type": "string",
70
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
71
+ },
72
+ "strokeWidth": {
73
+ "type": "number",
74
+ "minimum": 0,
75
+ "maximum": 12
76
+ },
77
+ "dash": {
78
+ "type": "string",
79
+ "enum": [
80
+ "solid",
81
+ "dashed",
82
+ "dotted"
83
+ ]
84
+ },
85
+ "radius": {
86
+ "type": "number",
87
+ "minimum": 0,
88
+ "maximum": 100
89
+ },
90
+ "opacity": {
91
+ "type": "number",
92
+ "minimum": 0.1,
93
+ "maximum": 1
94
+ },
95
+ "fontFamily": {
96
+ "type": "string",
97
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
98
+ },
99
+ "fontSize": {
100
+ "type": "number",
101
+ "minimum": 10,
102
+ "maximum": 40
103
+ },
104
+ "fontWeight": {
105
+ "anyOf": [
106
+ {
107
+ "type": "number",
108
+ "const": 400
109
+ },
110
+ {
111
+ "type": "number",
112
+ "const": 600
113
+ }
114
+ ]
115
+ },
116
+ "padding": {
117
+ "type": "number",
118
+ "minimum": 12,
119
+ "maximum": 64
120
+ },
121
+ "width": {
122
+ "type": "number",
123
+ "minimum": 80,
124
+ "maximum": 1200
125
+ },
126
+ "height": {
127
+ "type": "number",
128
+ "minimum": 40,
129
+ "maximum": 1600
130
+ },
131
+ "shape": {
132
+ "type": "string",
133
+ "enum": [
134
+ "rect",
135
+ "pill",
136
+ "diamond",
137
+ "ellipse",
138
+ "cylinder",
139
+ "text"
140
+ ]
141
+ },
142
+ "align": {
143
+ "type": "string",
144
+ "enum": [
145
+ "left",
146
+ "center",
147
+ "right"
148
+ ]
149
+ },
150
+ "verticalAlign": {
151
+ "type": "string",
152
+ "enum": [
153
+ "top",
154
+ "middle",
155
+ "bottom"
156
+ ]
157
+ },
158
+ "arrowStart": {
159
+ "type": "string",
160
+ "enum": [
161
+ "none",
162
+ "open",
163
+ "filled",
164
+ "diamond",
165
+ "circle"
166
+ ]
167
+ },
168
+ "arrowEnd": {
169
+ "type": "string",
170
+ "enum": [
171
+ "none",
172
+ "open",
173
+ "filled",
174
+ "diamond",
175
+ "circle"
176
+ ]
177
+ },
178
+ "sourcePort": {
179
+ "type": "string",
180
+ "enum": [
181
+ "top",
182
+ "right",
183
+ "bottom",
184
+ "left"
185
+ ]
186
+ },
187
+ "targetPort": {
188
+ "type": "string",
189
+ "enum": [
190
+ "top",
191
+ "right",
192
+ "bottom",
193
+ "left"
194
+ ]
195
+ },
196
+ "sourceIndex": {
197
+ "type": "integer",
198
+ "minimum": 0,
199
+ "maximum": 11
200
+ },
201
+ "targetIndex": {
202
+ "type": "integer",
203
+ "minimum": 0,
204
+ "maximum": 11
205
+ },
206
+ "routing": {
207
+ "type": "string",
208
+ "enum": [
209
+ "orthogonal",
210
+ "straight"
211
+ ]
212
+ }
213
+ },
214
+ "additionalProperties": false
215
+ },
216
+ "placement": {
217
+ "type": "object",
218
+ "properties": {
219
+ "column": {
220
+ "type": "integer",
221
+ "minimum": 0,
222
+ "maximum": 50
223
+ },
224
+ "row": {
225
+ "type": "integer",
226
+ "minimum": 0,
227
+ "maximum": 50
228
+ }
229
+ },
230
+ "required": [
231
+ "column",
232
+ "row"
233
+ ],
234
+ "additionalProperties": false
235
+ },
236
+ "group": {
237
+ "type": "string",
238
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
239
+ },
240
+ "emphasis": {
241
+ "default": "normal",
242
+ "type": "string",
243
+ "enum": [
244
+ "normal",
245
+ "primary",
246
+ "muted"
247
+ ]
248
+ },
249
+ "ports": {
250
+ "type": "object",
251
+ "properties": {
252
+ "top": {
253
+ "type": "integer",
254
+ "minimum": 1,
255
+ "maximum": 12
256
+ },
257
+ "right": {
258
+ "type": "integer",
259
+ "minimum": 1,
260
+ "maximum": 12
261
+ },
262
+ "bottom": {
263
+ "type": "integer",
264
+ "minimum": 1,
265
+ "maximum": 12
266
+ },
267
+ "left": {
268
+ "type": "integer",
269
+ "minimum": 1,
270
+ "maximum": 12
271
+ }
272
+ },
273
+ "additionalProperties": false
274
+ }
275
+ },
276
+ "required": [
277
+ "id",
278
+ "label",
279
+ "kind",
280
+ "emphasis"
281
+ ],
282
+ "additionalProperties": false
283
+ }
284
+ },
285
+ "edges": {
286
+ "maxItems": 600,
287
+ "type": "array",
288
+ "items": {
289
+ "type": "object",
290
+ "properties": {
291
+ "id": {
292
+ "type": "string",
293
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
294
+ },
295
+ "source": {
296
+ "type": "string",
297
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
298
+ },
299
+ "target": {
300
+ "type": "string",
301
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
302
+ },
303
+ "label": {
304
+ "type": "string",
305
+ "maxLength": 120
306
+ },
307
+ "style": {
308
+ "default": "solid",
309
+ "type": "string",
310
+ "enum": [
311
+ "solid",
312
+ "dashed"
313
+ ]
314
+ },
315
+ "role": {
316
+ "type": "string",
317
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
318
+ },
319
+ "appearance": {
320
+ "type": "object",
321
+ "properties": {
322
+ "fill": {
323
+ "type": "string",
324
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
325
+ },
326
+ "stroke": {
327
+ "type": "string",
328
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
329
+ },
330
+ "text": {
331
+ "type": "string",
332
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
333
+ },
334
+ "secondary": {
335
+ "type": "string",
336
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
337
+ },
338
+ "strokeWidth": {
339
+ "type": "number",
340
+ "minimum": 0,
341
+ "maximum": 12
342
+ },
343
+ "dash": {
344
+ "type": "string",
345
+ "enum": [
346
+ "solid",
347
+ "dashed",
348
+ "dotted"
349
+ ]
350
+ },
351
+ "radius": {
352
+ "type": "number",
353
+ "minimum": 0,
354
+ "maximum": 100
355
+ },
356
+ "opacity": {
357
+ "type": "number",
358
+ "minimum": 0.1,
359
+ "maximum": 1
360
+ },
361
+ "fontFamily": {
362
+ "type": "string",
363
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
364
+ },
365
+ "fontSize": {
366
+ "type": "number",
367
+ "minimum": 10,
368
+ "maximum": 40
369
+ },
370
+ "fontWeight": {
371
+ "anyOf": [
372
+ {
373
+ "type": "number",
374
+ "const": 400
375
+ },
376
+ {
377
+ "type": "number",
378
+ "const": 600
379
+ }
380
+ ]
381
+ },
382
+ "padding": {
383
+ "type": "number",
384
+ "minimum": 12,
385
+ "maximum": 64
386
+ },
387
+ "width": {
388
+ "type": "number",
389
+ "minimum": 80,
390
+ "maximum": 1200
391
+ },
392
+ "height": {
393
+ "type": "number",
394
+ "minimum": 40,
395
+ "maximum": 1600
396
+ },
397
+ "shape": {
398
+ "type": "string",
399
+ "enum": [
400
+ "rect",
401
+ "pill",
402
+ "diamond",
403
+ "ellipse",
404
+ "cylinder",
405
+ "text"
406
+ ]
407
+ },
408
+ "align": {
409
+ "type": "string",
410
+ "enum": [
411
+ "left",
412
+ "center",
413
+ "right"
414
+ ]
415
+ },
416
+ "verticalAlign": {
417
+ "type": "string",
418
+ "enum": [
419
+ "top",
420
+ "middle",
421
+ "bottom"
422
+ ]
423
+ },
424
+ "arrowStart": {
425
+ "type": "string",
426
+ "enum": [
427
+ "none",
428
+ "open",
429
+ "filled",
430
+ "diamond",
431
+ "circle"
432
+ ]
433
+ },
434
+ "arrowEnd": {
435
+ "type": "string",
436
+ "enum": [
437
+ "none",
438
+ "open",
439
+ "filled",
440
+ "diamond",
441
+ "circle"
442
+ ]
443
+ },
444
+ "sourcePort": {
445
+ "type": "string",
446
+ "enum": [
447
+ "top",
448
+ "right",
449
+ "bottom",
450
+ "left"
451
+ ]
452
+ },
453
+ "targetPort": {
454
+ "type": "string",
455
+ "enum": [
456
+ "top",
457
+ "right",
458
+ "bottom",
459
+ "left"
460
+ ]
461
+ },
462
+ "sourceIndex": {
463
+ "type": "integer",
464
+ "minimum": 0,
465
+ "maximum": 11
466
+ },
467
+ "targetIndex": {
468
+ "type": "integer",
469
+ "minimum": 0,
470
+ "maximum": 11
471
+ },
472
+ "routing": {
473
+ "type": "string",
474
+ "enum": [
475
+ "orthogonal",
476
+ "straight"
477
+ ]
478
+ }
479
+ },
480
+ "additionalProperties": false
481
+ },
482
+ "path": {
483
+ "minItems": 1,
484
+ "maxItems": 24,
485
+ "type": "array",
486
+ "items": {
487
+ "type": "object",
488
+ "properties": {
489
+ "x": {
490
+ "type": "number",
491
+ "minimum": -10000,
492
+ "maximum": 10000
493
+ },
494
+ "y": {
495
+ "type": "number",
496
+ "minimum": -10000,
497
+ "maximum": 10000
498
+ }
499
+ },
500
+ "required": [
501
+ "x",
502
+ "y"
503
+ ],
504
+ "additionalProperties": false
505
+ }
506
+ }
507
+ },
508
+ "required": [
509
+ "id",
510
+ "source",
511
+ "target",
512
+ "style"
513
+ ],
514
+ "additionalProperties": false
515
+ }
516
+ },
517
+ "groups": {
518
+ "default": [],
519
+ "maxItems": 40,
520
+ "type": "array",
521
+ "items": {
522
+ "type": "object",
523
+ "properties": {
524
+ "id": {
525
+ "type": "string",
526
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
527
+ },
528
+ "label": {
529
+ "type": "string",
530
+ "minLength": 1,
531
+ "maxLength": 120
532
+ },
533
+ "parent": {
534
+ "type": "string",
535
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
536
+ },
537
+ "role": {
538
+ "type": "string",
539
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
540
+ },
541
+ "style": {
542
+ "type": "object",
543
+ "properties": {
544
+ "fill": {
545
+ "type": "string",
546
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
547
+ },
548
+ "stroke": {
549
+ "type": "string",
550
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
551
+ },
552
+ "text": {
553
+ "type": "string",
554
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
555
+ },
556
+ "secondary": {
557
+ "type": "string",
558
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
559
+ },
560
+ "strokeWidth": {
561
+ "type": "number",
562
+ "minimum": 0,
563
+ "maximum": 12
564
+ },
565
+ "dash": {
566
+ "type": "string",
567
+ "enum": [
568
+ "solid",
569
+ "dashed",
570
+ "dotted"
571
+ ]
572
+ },
573
+ "radius": {
574
+ "type": "number",
575
+ "minimum": 0,
576
+ "maximum": 100
577
+ },
578
+ "opacity": {
579
+ "type": "number",
580
+ "minimum": 0.1,
581
+ "maximum": 1
582
+ },
583
+ "fontFamily": {
584
+ "type": "string",
585
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
586
+ },
587
+ "fontSize": {
588
+ "type": "number",
589
+ "minimum": 10,
590
+ "maximum": 40
591
+ },
592
+ "fontWeight": {
593
+ "anyOf": [
594
+ {
595
+ "type": "number",
596
+ "const": 400
597
+ },
598
+ {
599
+ "type": "number",
600
+ "const": 600
601
+ }
602
+ ]
603
+ },
604
+ "padding": {
605
+ "type": "number",
606
+ "minimum": 12,
607
+ "maximum": 64
608
+ },
609
+ "width": {
610
+ "type": "number",
611
+ "minimum": 80,
612
+ "maximum": 1200
613
+ },
614
+ "height": {
615
+ "type": "number",
616
+ "minimum": 40,
617
+ "maximum": 1600
618
+ },
619
+ "shape": {
620
+ "type": "string",
621
+ "enum": [
622
+ "rect",
623
+ "pill",
624
+ "diamond",
625
+ "ellipse",
626
+ "cylinder",
627
+ "text"
628
+ ]
629
+ },
630
+ "align": {
631
+ "type": "string",
632
+ "enum": [
633
+ "left",
634
+ "center",
635
+ "right"
636
+ ]
637
+ },
638
+ "verticalAlign": {
639
+ "type": "string",
640
+ "enum": [
641
+ "top",
642
+ "middle",
643
+ "bottom"
644
+ ]
645
+ },
646
+ "arrowStart": {
647
+ "type": "string",
648
+ "enum": [
649
+ "none",
650
+ "open",
651
+ "filled",
652
+ "diamond",
653
+ "circle"
654
+ ]
655
+ },
656
+ "arrowEnd": {
657
+ "type": "string",
658
+ "enum": [
659
+ "none",
660
+ "open",
661
+ "filled",
662
+ "diamond",
663
+ "circle"
664
+ ]
665
+ },
666
+ "sourcePort": {
667
+ "type": "string",
668
+ "enum": [
669
+ "top",
670
+ "right",
671
+ "bottom",
672
+ "left"
673
+ ]
674
+ },
675
+ "targetPort": {
676
+ "type": "string",
677
+ "enum": [
678
+ "top",
679
+ "right",
680
+ "bottom",
681
+ "left"
682
+ ]
683
+ },
684
+ "sourceIndex": {
685
+ "type": "integer",
686
+ "minimum": 0,
687
+ "maximum": 11
688
+ },
689
+ "targetIndex": {
690
+ "type": "integer",
691
+ "minimum": 0,
692
+ "maximum": 11
693
+ },
694
+ "routing": {
695
+ "type": "string",
696
+ "enum": [
697
+ "orthogonal",
698
+ "straight"
699
+ ]
700
+ }
701
+ },
702
+ "additionalProperties": false
703
+ },
704
+ "description": {
705
+ "type": "string",
706
+ "maxLength": 2000
707
+ },
708
+ "color": {
709
+ "default": "slate",
710
+ "type": "string",
711
+ "enum": [
712
+ "slate",
713
+ "blue",
714
+ "teal",
715
+ "amber",
716
+ "violet"
717
+ ]
718
+ }
719
+ },
720
+ "required": [
721
+ "id",
722
+ "label",
723
+ "color"
724
+ ],
725
+ "additionalProperties": false
726
+ }
727
+ },
728
+ "layout": {
729
+ "default": {
730
+ "direction": "RIGHT",
731
+ "spacing": "comfortable"
732
+ },
733
+ "type": "object",
734
+ "properties": {
735
+ "mode": {
736
+ "type": "string",
737
+ "enum": [
738
+ "layered",
739
+ "grid"
740
+ ]
741
+ },
742
+ "direction": {
743
+ "default": "RIGHT",
744
+ "type": "string",
745
+ "enum": [
746
+ "RIGHT",
747
+ "DOWN"
748
+ ]
749
+ },
750
+ "spacing": {
751
+ "default": "comfortable",
752
+ "type": "string",
753
+ "enum": [
754
+ "comfortable",
755
+ "compact"
756
+ ]
757
+ }
758
+ },
759
+ "required": [
760
+ "direction",
761
+ "spacing"
762
+ ],
763
+ "additionalProperties": false
764
+ },
765
+ "presentation": {
766
+ "default": {
767
+ "theme": "paper",
768
+ "nodes": {}
769
+ },
770
+ "type": "object",
771
+ "properties": {
772
+ "theme": {
773
+ "default": "paper",
774
+ "type": "string",
775
+ "enum": [
776
+ "paper",
777
+ "midnight"
778
+ ]
779
+ },
780
+ "designSystem": {
781
+ "type": "object",
782
+ "properties": {
783
+ "version": {
784
+ "type": "number",
785
+ "const": 1
786
+ },
787
+ "id": {
788
+ "type": "string",
789
+ "minLength": 1,
790
+ "maxLength": 80
791
+ },
792
+ "name": {
793
+ "type": "string",
794
+ "minLength": 1,
795
+ "maxLength": 120
796
+ },
797
+ "revision": {
798
+ "type": "string",
799
+ "minLength": 1,
800
+ "maxLength": 40
801
+ },
802
+ "canvas": {
803
+ "type": "object",
804
+ "properties": {
805
+ "background": {
806
+ "type": "string",
807
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
808
+ },
809
+ "text": {
810
+ "type": "string",
811
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
812
+ },
813
+ "secondary": {
814
+ "type": "string",
815
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
816
+ },
817
+ "border": {
818
+ "type": "string",
819
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
820
+ },
821
+ "fontFamily": {
822
+ "type": "string",
823
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
824
+ }
825
+ },
826
+ "additionalProperties": false
827
+ },
828
+ "spacing": {
829
+ "type": "object",
830
+ "properties": {
831
+ "node": {
832
+ "type": "number",
833
+ "minimum": 20,
834
+ "maximum": 240
835
+ },
836
+ "layer": {
837
+ "type": "number",
838
+ "minimum": 32,
839
+ "maximum": 320
840
+ }
841
+ },
842
+ "additionalProperties": false
843
+ },
844
+ "node": {
845
+ "type": "object",
846
+ "properties": {
847
+ "fill": {
848
+ "type": "string",
849
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
850
+ },
851
+ "stroke": {
852
+ "type": "string",
853
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
854
+ },
855
+ "text": {
856
+ "type": "string",
857
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
858
+ },
859
+ "secondary": {
860
+ "type": "string",
861
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
862
+ },
863
+ "strokeWidth": {
864
+ "type": "number",
865
+ "minimum": 0,
866
+ "maximum": 12
867
+ },
868
+ "dash": {
869
+ "type": "string",
870
+ "enum": [
871
+ "solid",
872
+ "dashed",
873
+ "dotted"
874
+ ]
875
+ },
876
+ "radius": {
877
+ "type": "number",
878
+ "minimum": 0,
879
+ "maximum": 100
880
+ },
881
+ "opacity": {
882
+ "type": "number",
883
+ "minimum": 0.1,
884
+ "maximum": 1
885
+ },
886
+ "fontFamily": {
887
+ "type": "string",
888
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
889
+ },
890
+ "fontSize": {
891
+ "type": "number",
892
+ "minimum": 10,
893
+ "maximum": 40
894
+ },
895
+ "fontWeight": {
896
+ "anyOf": [
897
+ {
898
+ "type": "number",
899
+ "const": 400
900
+ },
901
+ {
902
+ "type": "number",
903
+ "const": 600
904
+ }
905
+ ]
906
+ },
907
+ "padding": {
908
+ "type": "number",
909
+ "minimum": 12,
910
+ "maximum": 64
911
+ },
912
+ "width": {
913
+ "type": "number",
914
+ "minimum": 80,
915
+ "maximum": 1200
916
+ },
917
+ "height": {
918
+ "type": "number",
919
+ "minimum": 40,
920
+ "maximum": 1600
921
+ },
922
+ "shape": {
923
+ "type": "string",
924
+ "enum": [
925
+ "rect",
926
+ "pill",
927
+ "diamond",
928
+ "ellipse",
929
+ "cylinder",
930
+ "text"
931
+ ]
932
+ },
933
+ "align": {
934
+ "type": "string",
935
+ "enum": [
936
+ "left",
937
+ "center",
938
+ "right"
939
+ ]
940
+ },
941
+ "verticalAlign": {
942
+ "type": "string",
943
+ "enum": [
944
+ "top",
945
+ "middle",
946
+ "bottom"
947
+ ]
948
+ },
949
+ "arrowStart": {
950
+ "type": "string",
951
+ "enum": [
952
+ "none",
953
+ "open",
954
+ "filled",
955
+ "diamond",
956
+ "circle"
957
+ ]
958
+ },
959
+ "arrowEnd": {
960
+ "type": "string",
961
+ "enum": [
962
+ "none",
963
+ "open",
964
+ "filled",
965
+ "diamond",
966
+ "circle"
967
+ ]
968
+ },
969
+ "sourcePort": {
970
+ "type": "string",
971
+ "enum": [
972
+ "top",
973
+ "right",
974
+ "bottom",
975
+ "left"
976
+ ]
977
+ },
978
+ "targetPort": {
979
+ "type": "string",
980
+ "enum": [
981
+ "top",
982
+ "right",
983
+ "bottom",
984
+ "left"
985
+ ]
986
+ },
987
+ "sourceIndex": {
988
+ "type": "integer",
989
+ "minimum": 0,
990
+ "maximum": 11
991
+ },
992
+ "targetIndex": {
993
+ "type": "integer",
994
+ "minimum": 0,
995
+ "maximum": 11
996
+ },
997
+ "routing": {
998
+ "type": "string",
999
+ "enum": [
1000
+ "orthogonal",
1001
+ "straight"
1002
+ ]
1003
+ }
1004
+ },
1005
+ "additionalProperties": false
1006
+ },
1007
+ "edge": {
1008
+ "type": "object",
1009
+ "properties": {
1010
+ "fill": {
1011
+ "type": "string",
1012
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1013
+ },
1014
+ "stroke": {
1015
+ "type": "string",
1016
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1017
+ },
1018
+ "text": {
1019
+ "type": "string",
1020
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1021
+ },
1022
+ "secondary": {
1023
+ "type": "string",
1024
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1025
+ },
1026
+ "strokeWidth": {
1027
+ "type": "number",
1028
+ "minimum": 0,
1029
+ "maximum": 12
1030
+ },
1031
+ "dash": {
1032
+ "type": "string",
1033
+ "enum": [
1034
+ "solid",
1035
+ "dashed",
1036
+ "dotted"
1037
+ ]
1038
+ },
1039
+ "radius": {
1040
+ "type": "number",
1041
+ "minimum": 0,
1042
+ "maximum": 100
1043
+ },
1044
+ "opacity": {
1045
+ "type": "number",
1046
+ "minimum": 0.1,
1047
+ "maximum": 1
1048
+ },
1049
+ "fontFamily": {
1050
+ "type": "string",
1051
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
1052
+ },
1053
+ "fontSize": {
1054
+ "type": "number",
1055
+ "minimum": 10,
1056
+ "maximum": 40
1057
+ },
1058
+ "fontWeight": {
1059
+ "anyOf": [
1060
+ {
1061
+ "type": "number",
1062
+ "const": 400
1063
+ },
1064
+ {
1065
+ "type": "number",
1066
+ "const": 600
1067
+ }
1068
+ ]
1069
+ },
1070
+ "padding": {
1071
+ "type": "number",
1072
+ "minimum": 12,
1073
+ "maximum": 64
1074
+ },
1075
+ "width": {
1076
+ "type": "number",
1077
+ "minimum": 80,
1078
+ "maximum": 1200
1079
+ },
1080
+ "height": {
1081
+ "type": "number",
1082
+ "minimum": 40,
1083
+ "maximum": 1600
1084
+ },
1085
+ "shape": {
1086
+ "type": "string",
1087
+ "enum": [
1088
+ "rect",
1089
+ "pill",
1090
+ "diamond",
1091
+ "ellipse",
1092
+ "cylinder",
1093
+ "text"
1094
+ ]
1095
+ },
1096
+ "align": {
1097
+ "type": "string",
1098
+ "enum": [
1099
+ "left",
1100
+ "center",
1101
+ "right"
1102
+ ]
1103
+ },
1104
+ "verticalAlign": {
1105
+ "type": "string",
1106
+ "enum": [
1107
+ "top",
1108
+ "middle",
1109
+ "bottom"
1110
+ ]
1111
+ },
1112
+ "arrowStart": {
1113
+ "type": "string",
1114
+ "enum": [
1115
+ "none",
1116
+ "open",
1117
+ "filled",
1118
+ "diamond",
1119
+ "circle"
1120
+ ]
1121
+ },
1122
+ "arrowEnd": {
1123
+ "type": "string",
1124
+ "enum": [
1125
+ "none",
1126
+ "open",
1127
+ "filled",
1128
+ "diamond",
1129
+ "circle"
1130
+ ]
1131
+ },
1132
+ "sourcePort": {
1133
+ "type": "string",
1134
+ "enum": [
1135
+ "top",
1136
+ "right",
1137
+ "bottom",
1138
+ "left"
1139
+ ]
1140
+ },
1141
+ "targetPort": {
1142
+ "type": "string",
1143
+ "enum": [
1144
+ "top",
1145
+ "right",
1146
+ "bottom",
1147
+ "left"
1148
+ ]
1149
+ },
1150
+ "sourceIndex": {
1151
+ "type": "integer",
1152
+ "minimum": 0,
1153
+ "maximum": 11
1154
+ },
1155
+ "targetIndex": {
1156
+ "type": "integer",
1157
+ "minimum": 0,
1158
+ "maximum": 11
1159
+ },
1160
+ "routing": {
1161
+ "type": "string",
1162
+ "enum": [
1163
+ "orthogonal",
1164
+ "straight"
1165
+ ]
1166
+ }
1167
+ },
1168
+ "additionalProperties": false
1169
+ },
1170
+ "group": {
1171
+ "type": "object",
1172
+ "properties": {
1173
+ "fill": {
1174
+ "type": "string",
1175
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1176
+ },
1177
+ "stroke": {
1178
+ "type": "string",
1179
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1180
+ },
1181
+ "text": {
1182
+ "type": "string",
1183
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1184
+ },
1185
+ "secondary": {
1186
+ "type": "string",
1187
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1188
+ },
1189
+ "strokeWidth": {
1190
+ "type": "number",
1191
+ "minimum": 0,
1192
+ "maximum": 12
1193
+ },
1194
+ "dash": {
1195
+ "type": "string",
1196
+ "enum": [
1197
+ "solid",
1198
+ "dashed",
1199
+ "dotted"
1200
+ ]
1201
+ },
1202
+ "radius": {
1203
+ "type": "number",
1204
+ "minimum": 0,
1205
+ "maximum": 100
1206
+ },
1207
+ "opacity": {
1208
+ "type": "number",
1209
+ "minimum": 0.1,
1210
+ "maximum": 1
1211
+ },
1212
+ "fontFamily": {
1213
+ "type": "string",
1214
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
1215
+ },
1216
+ "fontSize": {
1217
+ "type": "number",
1218
+ "minimum": 10,
1219
+ "maximum": 40
1220
+ },
1221
+ "fontWeight": {
1222
+ "anyOf": [
1223
+ {
1224
+ "type": "number",
1225
+ "const": 400
1226
+ },
1227
+ {
1228
+ "type": "number",
1229
+ "const": 600
1230
+ }
1231
+ ]
1232
+ },
1233
+ "padding": {
1234
+ "type": "number",
1235
+ "minimum": 12,
1236
+ "maximum": 64
1237
+ },
1238
+ "width": {
1239
+ "type": "number",
1240
+ "minimum": 80,
1241
+ "maximum": 1200
1242
+ },
1243
+ "height": {
1244
+ "type": "number",
1245
+ "minimum": 40,
1246
+ "maximum": 1600
1247
+ },
1248
+ "shape": {
1249
+ "type": "string",
1250
+ "enum": [
1251
+ "rect",
1252
+ "pill",
1253
+ "diamond",
1254
+ "ellipse",
1255
+ "cylinder",
1256
+ "text"
1257
+ ]
1258
+ },
1259
+ "align": {
1260
+ "type": "string",
1261
+ "enum": [
1262
+ "left",
1263
+ "center",
1264
+ "right"
1265
+ ]
1266
+ },
1267
+ "verticalAlign": {
1268
+ "type": "string",
1269
+ "enum": [
1270
+ "top",
1271
+ "middle",
1272
+ "bottom"
1273
+ ]
1274
+ },
1275
+ "arrowStart": {
1276
+ "type": "string",
1277
+ "enum": [
1278
+ "none",
1279
+ "open",
1280
+ "filled",
1281
+ "diamond",
1282
+ "circle"
1283
+ ]
1284
+ },
1285
+ "arrowEnd": {
1286
+ "type": "string",
1287
+ "enum": [
1288
+ "none",
1289
+ "open",
1290
+ "filled",
1291
+ "diamond",
1292
+ "circle"
1293
+ ]
1294
+ },
1295
+ "sourcePort": {
1296
+ "type": "string",
1297
+ "enum": [
1298
+ "top",
1299
+ "right",
1300
+ "bottom",
1301
+ "left"
1302
+ ]
1303
+ },
1304
+ "targetPort": {
1305
+ "type": "string",
1306
+ "enum": [
1307
+ "top",
1308
+ "right",
1309
+ "bottom",
1310
+ "left"
1311
+ ]
1312
+ },
1313
+ "sourceIndex": {
1314
+ "type": "integer",
1315
+ "minimum": 0,
1316
+ "maximum": 11
1317
+ },
1318
+ "targetIndex": {
1319
+ "type": "integer",
1320
+ "minimum": 0,
1321
+ "maximum": 11
1322
+ },
1323
+ "routing": {
1324
+ "type": "string",
1325
+ "enum": [
1326
+ "orthogonal",
1327
+ "straight"
1328
+ ]
1329
+ }
1330
+ },
1331
+ "additionalProperties": false
1332
+ },
1333
+ "roles": {
1334
+ "type": "object",
1335
+ "propertyNames": {
1336
+ "type": "string",
1337
+ "minLength": 1,
1338
+ "maxLength": 80
1339
+ },
1340
+ "additionalProperties": {
1341
+ "type": "object",
1342
+ "properties": {
1343
+ "fill": {
1344
+ "type": "string",
1345
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1346
+ },
1347
+ "stroke": {
1348
+ "type": "string",
1349
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1350
+ },
1351
+ "text": {
1352
+ "type": "string",
1353
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1354
+ },
1355
+ "secondary": {
1356
+ "type": "string",
1357
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1358
+ },
1359
+ "strokeWidth": {
1360
+ "type": "number",
1361
+ "minimum": 0,
1362
+ "maximum": 12
1363
+ },
1364
+ "dash": {
1365
+ "type": "string",
1366
+ "enum": [
1367
+ "solid",
1368
+ "dashed",
1369
+ "dotted"
1370
+ ]
1371
+ },
1372
+ "radius": {
1373
+ "type": "number",
1374
+ "minimum": 0,
1375
+ "maximum": 100
1376
+ },
1377
+ "opacity": {
1378
+ "type": "number",
1379
+ "minimum": 0.1,
1380
+ "maximum": 1
1381
+ },
1382
+ "fontFamily": {
1383
+ "type": "string",
1384
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
1385
+ },
1386
+ "fontSize": {
1387
+ "type": "number",
1388
+ "minimum": 10,
1389
+ "maximum": 40
1390
+ },
1391
+ "fontWeight": {
1392
+ "anyOf": [
1393
+ {
1394
+ "type": "number",
1395
+ "const": 400
1396
+ },
1397
+ {
1398
+ "type": "number",
1399
+ "const": 600
1400
+ }
1401
+ ]
1402
+ },
1403
+ "padding": {
1404
+ "type": "number",
1405
+ "minimum": 12,
1406
+ "maximum": 64
1407
+ },
1408
+ "width": {
1409
+ "type": "number",
1410
+ "minimum": 80,
1411
+ "maximum": 1200
1412
+ },
1413
+ "height": {
1414
+ "type": "number",
1415
+ "minimum": 40,
1416
+ "maximum": 1600
1417
+ },
1418
+ "shape": {
1419
+ "type": "string",
1420
+ "enum": [
1421
+ "rect",
1422
+ "pill",
1423
+ "diamond",
1424
+ "ellipse",
1425
+ "cylinder",
1426
+ "text"
1427
+ ]
1428
+ },
1429
+ "align": {
1430
+ "type": "string",
1431
+ "enum": [
1432
+ "left",
1433
+ "center",
1434
+ "right"
1435
+ ]
1436
+ },
1437
+ "verticalAlign": {
1438
+ "type": "string",
1439
+ "enum": [
1440
+ "top",
1441
+ "middle",
1442
+ "bottom"
1443
+ ]
1444
+ },
1445
+ "arrowStart": {
1446
+ "type": "string",
1447
+ "enum": [
1448
+ "none",
1449
+ "open",
1450
+ "filled",
1451
+ "diamond",
1452
+ "circle"
1453
+ ]
1454
+ },
1455
+ "arrowEnd": {
1456
+ "type": "string",
1457
+ "enum": [
1458
+ "none",
1459
+ "open",
1460
+ "filled",
1461
+ "diamond",
1462
+ "circle"
1463
+ ]
1464
+ },
1465
+ "sourcePort": {
1466
+ "type": "string",
1467
+ "enum": [
1468
+ "top",
1469
+ "right",
1470
+ "bottom",
1471
+ "left"
1472
+ ]
1473
+ },
1474
+ "targetPort": {
1475
+ "type": "string",
1476
+ "enum": [
1477
+ "top",
1478
+ "right",
1479
+ "bottom",
1480
+ "left"
1481
+ ]
1482
+ },
1483
+ "sourceIndex": {
1484
+ "type": "integer",
1485
+ "minimum": 0,
1486
+ "maximum": 11
1487
+ },
1488
+ "targetIndex": {
1489
+ "type": "integer",
1490
+ "minimum": 0,
1491
+ "maximum": 11
1492
+ },
1493
+ "routing": {
1494
+ "type": "string",
1495
+ "enum": [
1496
+ "orthogonal",
1497
+ "straight"
1498
+ ]
1499
+ }
1500
+ },
1501
+ "additionalProperties": false
1502
+ }
1503
+ }
1504
+ },
1505
+ "required": [
1506
+ "version",
1507
+ "id",
1508
+ "name",
1509
+ "revision"
1510
+ ],
1511
+ "additionalProperties": false
1512
+ },
1513
+ "nodes": {
1514
+ "default": {},
1515
+ "type": "object",
1516
+ "propertyNames": {
1517
+ "type": "string",
1518
+ "pattern": "^[a-zA-Z][a-zA-Z0-9_-]{0,79}$"
1519
+ },
1520
+ "additionalProperties": {
1521
+ "type": "object",
1522
+ "properties": {
1523
+ "position": {
1524
+ "type": "object",
1525
+ "properties": {
1526
+ "x": {
1527
+ "type": "number",
1528
+ "minimum": -10000,
1529
+ "maximum": 10000
1530
+ },
1531
+ "y": {
1532
+ "type": "number",
1533
+ "minimum": -10000,
1534
+ "maximum": 10000
1535
+ }
1536
+ },
1537
+ "required": [
1538
+ "x",
1539
+ "y"
1540
+ ],
1541
+ "additionalProperties": false
1542
+ },
1543
+ "color": {
1544
+ "type": "string",
1545
+ "enum": [
1546
+ "slate",
1547
+ "blue",
1548
+ "teal",
1549
+ "amber",
1550
+ "violet"
1551
+ ]
1552
+ },
1553
+ "style": {
1554
+ "type": "object",
1555
+ "properties": {
1556
+ "fill": {
1557
+ "type": "string",
1558
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1559
+ },
1560
+ "stroke": {
1561
+ "type": "string",
1562
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1563
+ },
1564
+ "text": {
1565
+ "type": "string",
1566
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1567
+ },
1568
+ "secondary": {
1569
+ "type": "string",
1570
+ "pattern": "^(#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|none|transparent)$"
1571
+ },
1572
+ "strokeWidth": {
1573
+ "type": "number",
1574
+ "minimum": 0,
1575
+ "maximum": 12
1576
+ },
1577
+ "dash": {
1578
+ "type": "string",
1579
+ "enum": [
1580
+ "solid",
1581
+ "dashed",
1582
+ "dotted"
1583
+ ]
1584
+ },
1585
+ "radius": {
1586
+ "type": "number",
1587
+ "minimum": 0,
1588
+ "maximum": 100
1589
+ },
1590
+ "opacity": {
1591
+ "type": "number",
1592
+ "minimum": 0.1,
1593
+ "maximum": 1
1594
+ },
1595
+ "fontFamily": {
1596
+ "type": "string",
1597
+ "pattern": "^[a-zA-Z0-9 ,'-]{1,100}$"
1598
+ },
1599
+ "fontSize": {
1600
+ "type": "number",
1601
+ "minimum": 10,
1602
+ "maximum": 40
1603
+ },
1604
+ "fontWeight": {
1605
+ "anyOf": [
1606
+ {
1607
+ "type": "number",
1608
+ "const": 400
1609
+ },
1610
+ {
1611
+ "type": "number",
1612
+ "const": 600
1613
+ }
1614
+ ]
1615
+ },
1616
+ "padding": {
1617
+ "type": "number",
1618
+ "minimum": 12,
1619
+ "maximum": 64
1620
+ },
1621
+ "width": {
1622
+ "type": "number",
1623
+ "minimum": 80,
1624
+ "maximum": 1200
1625
+ },
1626
+ "height": {
1627
+ "type": "number",
1628
+ "minimum": 40,
1629
+ "maximum": 1600
1630
+ },
1631
+ "shape": {
1632
+ "type": "string",
1633
+ "enum": [
1634
+ "rect",
1635
+ "pill",
1636
+ "diamond",
1637
+ "ellipse",
1638
+ "cylinder",
1639
+ "text"
1640
+ ]
1641
+ },
1642
+ "align": {
1643
+ "type": "string",
1644
+ "enum": [
1645
+ "left",
1646
+ "center",
1647
+ "right"
1648
+ ]
1649
+ },
1650
+ "verticalAlign": {
1651
+ "type": "string",
1652
+ "enum": [
1653
+ "top",
1654
+ "middle",
1655
+ "bottom"
1656
+ ]
1657
+ },
1658
+ "arrowStart": {
1659
+ "type": "string",
1660
+ "enum": [
1661
+ "none",
1662
+ "open",
1663
+ "filled",
1664
+ "diamond",
1665
+ "circle"
1666
+ ]
1667
+ },
1668
+ "arrowEnd": {
1669
+ "type": "string",
1670
+ "enum": [
1671
+ "none",
1672
+ "open",
1673
+ "filled",
1674
+ "diamond",
1675
+ "circle"
1676
+ ]
1677
+ },
1678
+ "sourcePort": {
1679
+ "type": "string",
1680
+ "enum": [
1681
+ "top",
1682
+ "right",
1683
+ "bottom",
1684
+ "left"
1685
+ ]
1686
+ },
1687
+ "targetPort": {
1688
+ "type": "string",
1689
+ "enum": [
1690
+ "top",
1691
+ "right",
1692
+ "bottom",
1693
+ "left"
1694
+ ]
1695
+ },
1696
+ "sourceIndex": {
1697
+ "type": "integer",
1698
+ "minimum": 0,
1699
+ "maximum": 11
1700
+ },
1701
+ "targetIndex": {
1702
+ "type": "integer",
1703
+ "minimum": 0,
1704
+ "maximum": 11
1705
+ },
1706
+ "routing": {
1707
+ "type": "string",
1708
+ "enum": [
1709
+ "orthogonal",
1710
+ "straight"
1711
+ ]
1712
+ }
1713
+ },
1714
+ "additionalProperties": false
1715
+ }
1716
+ },
1717
+ "additionalProperties": false
1718
+ }
1719
+ },
1720
+ "footer": {
1721
+ "type": "object",
1722
+ "properties": {
1723
+ "hidden": {
1724
+ "type": "boolean"
1725
+ },
1726
+ "label": {
1727
+ "type": "string",
1728
+ "maxLength": 80
1729
+ },
1730
+ "detail": {
1731
+ "type": "string",
1732
+ "maxLength": 80
1733
+ }
1734
+ },
1735
+ "additionalProperties": false
1736
+ }
1737
+ },
1738
+ "required": [
1739
+ "theme",
1740
+ "nodes"
1741
+ ],
1742
+ "additionalProperties": false
1743
+ }
1744
+ },
1745
+ "required": [
1746
+ "version",
1747
+ "title",
1748
+ "type",
1749
+ "nodes",
1750
+ "edges",
1751
+ "groups",
1752
+ "layout",
1753
+ "presentation"
1754
+ ],
1755
+ "additionalProperties": false
1756
+ }