@openplanr/protocol 0.12.0 → 0.14.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.
@@ -0,0 +1,4047 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.21.0/diagram-review-bundle.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "diagram-review-bundle",
6
+ "version": "1.21.0"
7
+ },
8
+ "type": "object",
9
+ "properties": {
10
+ "kind": {
11
+ "const": "openplanr-diagram-review-bundle"
12
+ },
13
+ "schemaVersion": {
14
+ "const": "1.2.0"
15
+ },
16
+ "diagramId": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 160
20
+ },
21
+ "title": {
22
+ "type": "string",
23
+ "maxLength": 8192
24
+ },
25
+ "source": {
26
+ "type": "object",
27
+ "properties": {
28
+ "kind": {
29
+ "enum": [
30
+ "manifest",
31
+ "authoring"
32
+ ]
33
+ },
34
+ "digest": {
35
+ "type": "string",
36
+ "pattern": "^sha256:[a-f0-9]{64}$"
37
+ }
38
+ },
39
+ "required": [
40
+ "kind",
41
+ "digest"
42
+ ],
43
+ "additionalProperties": false
44
+ },
45
+ "rendering": {
46
+ "type": "object",
47
+ "properties": {
48
+ "id": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "maxLength": 160
52
+ },
53
+ "version": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "maxLength": 160
57
+ },
58
+ "fontFamily": {
59
+ "const": "Inter"
60
+ }
61
+ },
62
+ "required": [
63
+ "id",
64
+ "version",
65
+ "fontFamily"
66
+ ],
67
+ "additionalProperties": false
68
+ },
69
+ "summary": {
70
+ "type": "string",
71
+ "maxLength": 8192
72
+ },
73
+ "grammar": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 160
77
+ },
78
+ "colorScheme": {
79
+ "enum": [
80
+ "light",
81
+ "dark"
82
+ ]
83
+ },
84
+ "scene": {
85
+ "type": "object",
86
+ "properties": {
87
+ "svg": {
88
+ "type": "string",
89
+ "minLength": 1,
90
+ "maxLength": 5242880
91
+ },
92
+ "width": {
93
+ "type": "number",
94
+ "exclusiveMinimum": 0,
95
+ "maximum": 16384
96
+ },
97
+ "height": {
98
+ "type": "number",
99
+ "exclusiveMinimum": 0,
100
+ "maximum": 16384
101
+ },
102
+ "items": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "object",
106
+ "properties": {
107
+ "id": {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "maxLength": 160
111
+ },
112
+ "label": {
113
+ "type": "string",
114
+ "maxLength": 8192
115
+ },
116
+ "kind": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "maxLength": 160
120
+ },
121
+ "x": {
122
+ "type": "number"
123
+ },
124
+ "y": {
125
+ "type": "number"
126
+ }
127
+ },
128
+ "required": [
129
+ "id",
130
+ "label",
131
+ "kind",
132
+ "x",
133
+ "y"
134
+ ],
135
+ "additionalProperties": false
136
+ },
137
+ "maxItems": 10000
138
+ },
139
+ "relations": {
140
+ "type": "array",
141
+ "items": {
142
+ "type": "object",
143
+ "properties": {
144
+ "id": {
145
+ "type": "string",
146
+ "minLength": 1,
147
+ "maxLength": 160
148
+ },
149
+ "from": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "maxLength": 160
153
+ },
154
+ "to": {
155
+ "type": "string",
156
+ "minLength": 1,
157
+ "maxLength": 160
158
+ },
159
+ "label": {
160
+ "type": "string",
161
+ "maxLength": 8192
162
+ },
163
+ "kind": {
164
+ "type": "string",
165
+ "minLength": 1,
166
+ "maxLength": 160
167
+ }
168
+ },
169
+ "required": [
170
+ "id",
171
+ "from",
172
+ "to",
173
+ "label",
174
+ "kind"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ "maxItems": 10000
179
+ }
180
+ },
181
+ "required": [
182
+ "svg",
183
+ "width",
184
+ "height",
185
+ "items",
186
+ "relations"
187
+ ],
188
+ "additionalProperties": false
189
+ },
190
+ "authored": {
191
+ "oneOf": [
192
+ {
193
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
194
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-authoring-bundle.schema.json",
195
+ "x-openplanr-contract": {
196
+ "id": "diagram-authoring-bundle",
197
+ "version": "1.13.0"
198
+ },
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "properties": {
202
+ "kind": {
203
+ "const": "diagram-authoring-bundle"
204
+ },
205
+ "schemaVersion": {
206
+ "const": "1.0.0"
207
+ },
208
+ "protocolVersion": {
209
+ "const": "1.13.0"
210
+ },
211
+ "diagramId": {
212
+ "type": "string",
213
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
214
+ "minLength": 1,
215
+ "maxLength": 128
216
+ },
217
+ "document": {
218
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
219
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-document.schema.json",
220
+ "x-openplanr-contract": {
221
+ "id": "diagram-document",
222
+ "version": "1.13.0"
223
+ },
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "properties": {
227
+ "kind": {
228
+ "const": "planr-diagram"
229
+ },
230
+ "schemaVersion": {
231
+ "const": "1.0.0"
232
+ },
233
+ "protocolVersion": {
234
+ "const": "1.13.0"
235
+ },
236
+ "diagramId": {
237
+ "type": "string",
238
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
239
+ "minLength": 1,
240
+ "maxLength": 128
241
+ },
242
+ "title": {
243
+ "type": "string",
244
+ "minLength": 0,
245
+ "maxLength": 4096
246
+ },
247
+ "summary": {
248
+ "type": "string",
249
+ "minLength": 0,
250
+ "maxLength": 4096
251
+ },
252
+ "audience": {
253
+ "enum": [
254
+ "engineer",
255
+ "executive",
256
+ "mixed"
257
+ ]
258
+ },
259
+ "grammar": {
260
+ "type": "object",
261
+ "additionalProperties": false,
262
+ "properties": {
263
+ "id": {
264
+ "enum": [
265
+ "flowchart",
266
+ "process",
267
+ "swimlane",
268
+ "architecture"
269
+ ]
270
+ },
271
+ "version": {
272
+ "const": "1.0.0"
273
+ }
274
+ },
275
+ "required": [
276
+ "id",
277
+ "version"
278
+ ]
279
+ },
280
+ "nodes": {
281
+ "type": "array",
282
+ "items": {
283
+ "type": "object",
284
+ "additionalProperties": false,
285
+ "properties": {
286
+ "id": {
287
+ "type": "string",
288
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
289
+ "minLength": 1,
290
+ "maxLength": 128
291
+ },
292
+ "label": {
293
+ "type": "string",
294
+ "minLength": 0,
295
+ "maxLength": 4096
296
+ },
297
+ "kind": {
298
+ "enum": [
299
+ "process",
300
+ "start",
301
+ "end",
302
+ "decision",
303
+ "data-store",
304
+ "component"
305
+ ]
306
+ },
307
+ "description": {
308
+ "anyOf": [
309
+ {
310
+ "type": "null"
311
+ },
312
+ {
313
+ "type": "string",
314
+ "minLength": 0,
315
+ "maxLength": 4096
316
+ }
317
+ ]
318
+ }
319
+ },
320
+ "required": [
321
+ "id",
322
+ "label",
323
+ "kind",
324
+ "description"
325
+ ]
326
+ },
327
+ "minItems": 0,
328
+ "maxItems": 4096
329
+ },
330
+ "relations": {
331
+ "type": "array",
332
+ "items": {
333
+ "type": "object",
334
+ "additionalProperties": false,
335
+ "properties": {
336
+ "id": {
337
+ "type": "string",
338
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
339
+ "minLength": 1,
340
+ "maxLength": 128
341
+ },
342
+ "from": {
343
+ "type": "string",
344
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
345
+ "minLength": 1,
346
+ "maxLength": 128
347
+ },
348
+ "to": {
349
+ "type": "string",
350
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
351
+ "minLength": 1,
352
+ "maxLength": 128
353
+ },
354
+ "kind": {
355
+ "enum": [
356
+ "association",
357
+ "dependency",
358
+ "flow",
359
+ "message",
360
+ "transition"
361
+ ]
362
+ },
363
+ "direction": {
364
+ "enum": [
365
+ "forward",
366
+ "both",
367
+ "none"
368
+ ]
369
+ },
370
+ "label": {
371
+ "anyOf": [
372
+ {
373
+ "type": "null"
374
+ },
375
+ {
376
+ "type": "string",
377
+ "minLength": 0,
378
+ "maxLength": 4096
379
+ }
380
+ ]
381
+ },
382
+ "weight": {
383
+ "anyOf": [
384
+ {
385
+ "type": "null"
386
+ },
387
+ {
388
+ "type": "number",
389
+ "minimum": 0,
390
+ "maximum": 1000000
391
+ }
392
+ ]
393
+ }
394
+ },
395
+ "required": [
396
+ "id",
397
+ "from",
398
+ "to",
399
+ "kind",
400
+ "direction",
401
+ "label",
402
+ "weight"
403
+ ]
404
+ },
405
+ "minItems": 0,
406
+ "maxItems": 8192
407
+ },
408
+ "groups": {
409
+ "type": "array",
410
+ "items": {
411
+ "type": "object",
412
+ "additionalProperties": false,
413
+ "properties": {
414
+ "id": {
415
+ "type": "string",
416
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
417
+ "minLength": 1,
418
+ "maxLength": 128
419
+ },
420
+ "label": {
421
+ "type": "string",
422
+ "minLength": 0,
423
+ "maxLength": 4096
424
+ },
425
+ "members": {
426
+ "type": "array",
427
+ "items": {
428
+ "type": "string",
429
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
430
+ "minLength": 1,
431
+ "maxLength": 128
432
+ },
433
+ "minItems": 0,
434
+ "maxItems": 10000,
435
+ "uniqueItems": true
436
+ }
437
+ },
438
+ "required": [
439
+ "id",
440
+ "label",
441
+ "members"
442
+ ]
443
+ },
444
+ "minItems": 0,
445
+ "maxItems": 1024
446
+ },
447
+ "lanes": {
448
+ "type": "array",
449
+ "items": {
450
+ "type": "object",
451
+ "additionalProperties": false,
452
+ "properties": {
453
+ "id": {
454
+ "type": "string",
455
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
456
+ "minLength": 1,
457
+ "maxLength": 128
458
+ },
459
+ "label": {
460
+ "type": "string",
461
+ "minLength": 0,
462
+ "maxLength": 4096
463
+ },
464
+ "members": {
465
+ "type": "array",
466
+ "items": {
467
+ "type": "string",
468
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
469
+ "minLength": 1,
470
+ "maxLength": 128
471
+ },
472
+ "minItems": 0,
473
+ "maxItems": 10000,
474
+ "uniqueItems": true
475
+ }
476
+ },
477
+ "required": [
478
+ "id",
479
+ "label",
480
+ "members"
481
+ ]
482
+ },
483
+ "minItems": 0,
484
+ "maxItems": 256
485
+ },
486
+ "events": {
487
+ "type": "array",
488
+ "items": false,
489
+ "minItems": 0,
490
+ "maxItems": 0
491
+ },
492
+ "series": {
493
+ "type": "array",
494
+ "items": false,
495
+ "minItems": 0,
496
+ "maxItems": 0
497
+ },
498
+ "axes": {
499
+ "type": "array",
500
+ "items": false,
501
+ "minItems": 0,
502
+ "maxItems": 0
503
+ },
504
+ "sets": {
505
+ "type": "array",
506
+ "items": false,
507
+ "minItems": 0,
508
+ "maxItems": 0
509
+ },
510
+ "annotations": {
511
+ "type": "array",
512
+ "items": {
513
+ "type": "object",
514
+ "additionalProperties": false,
515
+ "properties": {
516
+ "id": {
517
+ "type": "string",
518
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
519
+ "minLength": 1,
520
+ "maxLength": 128
521
+ },
522
+ "text": {
523
+ "type": "string",
524
+ "minLength": 0,
525
+ "maxLength": 4096
526
+ },
527
+ "targetId": {
528
+ "anyOf": [
529
+ {
530
+ "type": "null"
531
+ },
532
+ {
533
+ "type": "string",
534
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
535
+ "minLength": 1,
536
+ "maxLength": 128
537
+ }
538
+ ]
539
+ }
540
+ },
541
+ "required": [
542
+ "id",
543
+ "text",
544
+ "targetId"
545
+ ]
546
+ },
547
+ "minItems": 0,
548
+ "maxItems": 1024
549
+ },
550
+ "emphasis": {
551
+ "type": "array",
552
+ "items": {
553
+ "type": "object",
554
+ "additionalProperties": false,
555
+ "properties": {
556
+ "targetId": {
557
+ "type": "string",
558
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
559
+ "minLength": 1,
560
+ "maxLength": 128
561
+ },
562
+ "level": {
563
+ "enum": [
564
+ "primary",
565
+ "secondary",
566
+ "muted"
567
+ ]
568
+ }
569
+ },
570
+ "required": [
571
+ "targetId",
572
+ "level"
573
+ ]
574
+ },
575
+ "minItems": 0,
576
+ "maxItems": 1024
577
+ },
578
+ "laneOrder": {
579
+ "type": "array",
580
+ "items": {
581
+ "type": "string",
582
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
583
+ "minLength": 1,
584
+ "maxLength": 128
585
+ },
586
+ "minItems": 0,
587
+ "maxItems": 10000,
588
+ "uniqueItems": true
589
+ },
590
+ "accessibility": {
591
+ "type": "object",
592
+ "additionalProperties": false,
593
+ "properties": {
594
+ "title": {
595
+ "type": "string",
596
+ "minLength": 0,
597
+ "maxLength": 4096
598
+ },
599
+ "description": {
600
+ "type": "string",
601
+ "minLength": 0,
602
+ "maxLength": 4096
603
+ },
604
+ "readingOrder": {
605
+ "type": "array",
606
+ "items": {
607
+ "type": "string",
608
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
609
+ "minLength": 1,
610
+ "maxLength": 128
611
+ },
612
+ "minItems": 0,
613
+ "maxItems": 10000,
614
+ "uniqueItems": true
615
+ }
616
+ },
617
+ "required": [
618
+ "title",
619
+ "description",
620
+ "readingOrder"
621
+ ]
622
+ },
623
+ "documentDigest": {
624
+ "type": "string",
625
+ "pattern": "^sha256:[a-f0-9]{64}$"
626
+ }
627
+ },
628
+ "required": [
629
+ "kind",
630
+ "schemaVersion",
631
+ "protocolVersion",
632
+ "diagramId",
633
+ "title",
634
+ "summary",
635
+ "audience",
636
+ "grammar",
637
+ "nodes",
638
+ "relations",
639
+ "groups",
640
+ "lanes",
641
+ "events",
642
+ "series",
643
+ "axes",
644
+ "sets",
645
+ "annotations",
646
+ "emphasis",
647
+ "laneOrder",
648
+ "accessibility",
649
+ "documentDigest"
650
+ ]
651
+ },
652
+ "presentation": {
653
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
654
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-presentation.schema.json",
655
+ "x-openplanr-contract": {
656
+ "id": "diagram-presentation",
657
+ "version": "1.13.0"
658
+ },
659
+ "type": "object",
660
+ "additionalProperties": false,
661
+ "properties": {
662
+ "kind": {
663
+ "const": "diagram-presentation"
664
+ },
665
+ "schemaVersion": {
666
+ "const": "1.0.0"
667
+ },
668
+ "protocolVersion": {
669
+ "const": "1.13.0"
670
+ },
671
+ "diagramId": {
672
+ "type": "string",
673
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
674
+ "minLength": 1,
675
+ "maxLength": 128
676
+ },
677
+ "semanticDigest": {
678
+ "type": "string",
679
+ "pattern": "^sha256:[a-f0-9]{64}$"
680
+ },
681
+ "coordinateSystem": {
682
+ "const": "global-canvas"
683
+ },
684
+ "layout": {
685
+ "type": "object",
686
+ "additionalProperties": false,
687
+ "properties": {
688
+ "direction": {
689
+ "enum": [
690
+ "top-down",
691
+ "left-right",
692
+ "right-left",
693
+ "bottom-up"
694
+ ]
695
+ },
696
+ "detailTier": {
697
+ "enum": [
698
+ "simplified",
699
+ "balanced",
700
+ "faithful"
701
+ ]
702
+ }
703
+ },
704
+ "required": [
705
+ "direction",
706
+ "detailTier"
707
+ ]
708
+ },
709
+ "theme": {
710
+ "type": "object",
711
+ "additionalProperties": false,
712
+ "properties": {
713
+ "themeId": {
714
+ "enum": [
715
+ "paper",
716
+ "slate",
717
+ "midnight"
718
+ ]
719
+ },
720
+ "mode": {
721
+ "enum": [
722
+ "light",
723
+ "dark",
724
+ "auto"
725
+ ]
726
+ }
727
+ },
728
+ "required": [
729
+ "themeId",
730
+ "mode"
731
+ ]
732
+ },
733
+ "elements": {
734
+ "type": "array",
735
+ "items": {
736
+ "type": "object",
737
+ "additionalProperties": false,
738
+ "properties": {
739
+ "elementId": {
740
+ "type": "string",
741
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
742
+ "minLength": 1,
743
+ "maxLength": 128
744
+ },
745
+ "bounds": {
746
+ "anyOf": [
747
+ {
748
+ "type": "null"
749
+ },
750
+ {
751
+ "type": "object",
752
+ "additionalProperties": false,
753
+ "properties": {
754
+ "x": {
755
+ "type": "number",
756
+ "minimum": -1000000,
757
+ "maximum": 1000000
758
+ },
759
+ "y": {
760
+ "type": "number",
761
+ "minimum": -1000000,
762
+ "maximum": 1000000
763
+ },
764
+ "width": {
765
+ "type": "number",
766
+ "minimum": 0.01,
767
+ "maximum": 1000000
768
+ },
769
+ "height": {
770
+ "type": "number",
771
+ "minimum": 0.01,
772
+ "maximum": 1000000
773
+ }
774
+ },
775
+ "required": [
776
+ "x",
777
+ "y",
778
+ "width",
779
+ "height"
780
+ ]
781
+ }
782
+ ]
783
+ },
784
+ "route": {
785
+ "anyOf": [
786
+ {
787
+ "type": "null"
788
+ },
789
+ {
790
+ "type": "object",
791
+ "additionalProperties": false,
792
+ "properties": {
793
+ "mode": {
794
+ "enum": [
795
+ "automatic",
796
+ "manual"
797
+ ]
798
+ },
799
+ "strategy": {
800
+ "enum": [
801
+ "straight",
802
+ "orthogonal"
803
+ ]
804
+ },
805
+ "from": {
806
+ "type": "object",
807
+ "additionalProperties": false,
808
+ "properties": {
809
+ "side": {
810
+ "enum": [
811
+ "top",
812
+ "right",
813
+ "bottom",
814
+ "left"
815
+ ]
816
+ },
817
+ "offset": {
818
+ "type": "number",
819
+ "minimum": 0,
820
+ "maximum": 1
821
+ }
822
+ },
823
+ "required": [
824
+ "side",
825
+ "offset"
826
+ ]
827
+ },
828
+ "to": {
829
+ "type": "object",
830
+ "additionalProperties": false,
831
+ "properties": {
832
+ "side": {
833
+ "enum": [
834
+ "top",
835
+ "right",
836
+ "bottom",
837
+ "left"
838
+ ]
839
+ },
840
+ "offset": {
841
+ "type": "number",
842
+ "minimum": 0,
843
+ "maximum": 1
844
+ }
845
+ },
846
+ "required": [
847
+ "side",
848
+ "offset"
849
+ ]
850
+ },
851
+ "points": {
852
+ "type": "array",
853
+ "items": {
854
+ "type": "object",
855
+ "additionalProperties": false,
856
+ "properties": {
857
+ "x": {
858
+ "type": "number",
859
+ "minimum": -1000000,
860
+ "maximum": 1000000
861
+ },
862
+ "y": {
863
+ "type": "number",
864
+ "minimum": -1000000,
865
+ "maximum": 1000000
866
+ }
867
+ },
868
+ "required": [
869
+ "x",
870
+ "y"
871
+ ]
872
+ },
873
+ "minItems": 0,
874
+ "maxItems": 256
875
+ }
876
+ },
877
+ "required": [
878
+ "mode",
879
+ "strategy",
880
+ "from",
881
+ "to",
882
+ "points"
883
+ ]
884
+ }
885
+ ]
886
+ },
887
+ "label": {
888
+ "anyOf": [
889
+ {
890
+ "type": "null"
891
+ },
892
+ {
893
+ "type": "object",
894
+ "additionalProperties": false,
895
+ "properties": {
896
+ "x": {
897
+ "type": "number",
898
+ "minimum": -1000000,
899
+ "maximum": 1000000
900
+ },
901
+ "y": {
902
+ "type": "number",
903
+ "minimum": -1000000,
904
+ "maximum": 1000000
905
+ },
906
+ "width": {
907
+ "type": "number",
908
+ "minimum": 0.01,
909
+ "maximum": 1000000
910
+ }
911
+ },
912
+ "required": [
913
+ "x",
914
+ "y",
915
+ "width"
916
+ ]
917
+ }
918
+ ]
919
+ },
920
+ "zIndex": {
921
+ "type": "integer",
922
+ "minimum": 0,
923
+ "maximum": 10000
924
+ },
925
+ "appearance": {
926
+ "type": "object",
927
+ "additionalProperties": false,
928
+ "properties": {
929
+ "shape": {
930
+ "enum": [
931
+ "rectangle",
932
+ "rounded-rectangle",
933
+ "ellipse",
934
+ "diamond",
935
+ "cylinder",
936
+ "text",
937
+ "container",
938
+ "connector"
939
+ ]
940
+ },
941
+ "fill": {
942
+ "enum": [
943
+ "surface",
944
+ "accent",
945
+ "success",
946
+ "warning",
947
+ "danger",
948
+ "transparent"
949
+ ]
950
+ },
951
+ "stroke": {
952
+ "enum": [
953
+ "default",
954
+ "accent",
955
+ "muted",
956
+ "danger",
957
+ "none"
958
+ ]
959
+ },
960
+ "strokeWidth": {
961
+ "type": "number",
962
+ "minimum": 0,
963
+ "maximum": 16
964
+ },
965
+ "strokeStyle": {
966
+ "enum": [
967
+ "solid",
968
+ "dashed",
969
+ "dotted"
970
+ ]
971
+ },
972
+ "fontSize": {
973
+ "type": "integer",
974
+ "minimum": 8,
975
+ "maximum": 72
976
+ },
977
+ "textAlign": {
978
+ "enum": [
979
+ "left",
980
+ "center",
981
+ "right"
982
+ ]
983
+ }
984
+ },
985
+ "required": [
986
+ "shape",
987
+ "fill",
988
+ "stroke",
989
+ "strokeWidth",
990
+ "strokeStyle",
991
+ "fontSize",
992
+ "textAlign"
993
+ ]
994
+ },
995
+ "locks": {
996
+ "type": "object",
997
+ "additionalProperties": false,
998
+ "properties": {
999
+ "position": {
1000
+ "type": "boolean"
1001
+ },
1002
+ "size": {
1003
+ "type": "boolean"
1004
+ },
1005
+ "route": {
1006
+ "type": "boolean"
1007
+ }
1008
+ },
1009
+ "required": [
1010
+ "position",
1011
+ "size",
1012
+ "route"
1013
+ ]
1014
+ }
1015
+ },
1016
+ "required": [
1017
+ "elementId",
1018
+ "bounds",
1019
+ "route",
1020
+ "label",
1021
+ "zIndex",
1022
+ "appearance",
1023
+ "locks"
1024
+ ]
1025
+ },
1026
+ "minItems": 0,
1027
+ "maxItems": 10000
1028
+ },
1029
+ "presentationDigest": {
1030
+ "type": "string",
1031
+ "pattern": "^sha256:[a-f0-9]{64}$"
1032
+ }
1033
+ },
1034
+ "required": [
1035
+ "kind",
1036
+ "schemaVersion",
1037
+ "protocolVersion",
1038
+ "diagramId",
1039
+ "semanticDigest",
1040
+ "coordinateSystem",
1041
+ "layout",
1042
+ "theme",
1043
+ "elements",
1044
+ "presentationDigest"
1045
+ ]
1046
+ },
1047
+ "originalSource": {
1048
+ "anyOf": [
1049
+ {
1050
+ "type": "null"
1051
+ },
1052
+ {
1053
+ "type": "object",
1054
+ "additionalProperties": false,
1055
+ "properties": {
1056
+ "format": {
1057
+ "const": "mermaid"
1058
+ },
1059
+ "text": {
1060
+ "type": "string",
1061
+ "minLength": 0,
1062
+ "maxLength": 1048576
1063
+ },
1064
+ "sourceDigest": {
1065
+ "type": "string",
1066
+ "pattern": "^sha256:[a-f0-9]{64}$"
1067
+ }
1068
+ },
1069
+ "required": [
1070
+ "format",
1071
+ "text",
1072
+ "sourceDigest"
1073
+ ]
1074
+ }
1075
+ ]
1076
+ },
1077
+ "sourceMap": {
1078
+ "anyOf": [
1079
+ {
1080
+ "type": "null"
1081
+ },
1082
+ {
1083
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1084
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-source-map.schema.json",
1085
+ "x-openplanr-contract": {
1086
+ "id": "diagram-source-map",
1087
+ "version": "1.13.0"
1088
+ },
1089
+ "type": "object",
1090
+ "additionalProperties": false,
1091
+ "properties": {
1092
+ "kind": {
1093
+ "const": "diagram-source-map"
1094
+ },
1095
+ "schemaVersion": {
1096
+ "const": "1.0.0"
1097
+ },
1098
+ "protocolVersion": {
1099
+ "const": "1.13.0"
1100
+ },
1101
+ "diagramId": {
1102
+ "type": "string",
1103
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1104
+ "minLength": 1,
1105
+ "maxLength": 128
1106
+ },
1107
+ "semanticDigest": {
1108
+ "type": "string",
1109
+ "pattern": "^sha256:[a-f0-9]{64}$"
1110
+ },
1111
+ "sourceDigest": {
1112
+ "type": "string",
1113
+ "pattern": "^sha256:[a-f0-9]{64}$"
1114
+ },
1115
+ "sourceByteLength": {
1116
+ "type": "integer",
1117
+ "minimum": 0,
1118
+ "maximum": 1048576
1119
+ },
1120
+ "encoding": {
1121
+ "const": "utf-8"
1122
+ },
1123
+ "parser": {
1124
+ "type": "object",
1125
+ "additionalProperties": false,
1126
+ "properties": {
1127
+ "id": {
1128
+ "type": "string",
1129
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1130
+ "maxLength": 64
1131
+ },
1132
+ "version": {
1133
+ "type": "string",
1134
+ "minLength": 1,
1135
+ "maxLength": 64
1136
+ }
1137
+ },
1138
+ "required": [
1139
+ "id",
1140
+ "version"
1141
+ ]
1142
+ },
1143
+ "certificationVersion": {
1144
+ "const": "flowchart-copy-v1"
1145
+ },
1146
+ "entries": {
1147
+ "type": "array",
1148
+ "items": {
1149
+ "type": "object",
1150
+ "additionalProperties": false,
1151
+ "properties": {
1152
+ "sourceId": {
1153
+ "anyOf": [
1154
+ {
1155
+ "type": "null"
1156
+ },
1157
+ {
1158
+ "type": "string",
1159
+ "minLength": 1,
1160
+ "maxLength": 128
1161
+ }
1162
+ ]
1163
+ },
1164
+ "elementIds": {
1165
+ "type": "array",
1166
+ "items": {
1167
+ "type": "string",
1168
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1169
+ "minLength": 1,
1170
+ "maxLength": 128
1171
+ },
1172
+ "minItems": 0,
1173
+ "maxItems": 10000,
1174
+ "uniqueItems": true
1175
+ },
1176
+ "range": {
1177
+ "anyOf": [
1178
+ {
1179
+ "type": "null"
1180
+ },
1181
+ {
1182
+ "type": "object",
1183
+ "additionalProperties": false,
1184
+ "properties": {
1185
+ "startByte": {
1186
+ "type": "integer",
1187
+ "minimum": 0,
1188
+ "maximum": 1048576
1189
+ },
1190
+ "endByte": {
1191
+ "type": "integer",
1192
+ "minimum": 0,
1193
+ "maximum": 1048576
1194
+ }
1195
+ },
1196
+ "required": [
1197
+ "startByte",
1198
+ "endByte"
1199
+ ]
1200
+ }
1201
+ ]
1202
+ },
1203
+ "construct": {
1204
+ "type": "string",
1205
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1206
+ "maxLength": 64
1207
+ },
1208
+ "confidence": {
1209
+ "enum": [
1210
+ "exact",
1211
+ "ambiguous"
1212
+ ]
1213
+ },
1214
+ "losses": {
1215
+ "type": "array",
1216
+ "items": {
1217
+ "type": "string",
1218
+ "minLength": 1,
1219
+ "maxLength": 512
1220
+ },
1221
+ "minItems": 0,
1222
+ "maxItems": 64
1223
+ }
1224
+ },
1225
+ "required": [
1226
+ "sourceId",
1227
+ "elementIds",
1228
+ "range",
1229
+ "construct",
1230
+ "confidence",
1231
+ "losses"
1232
+ ]
1233
+ },
1234
+ "minItems": 0,
1235
+ "maxItems": 10000
1236
+ }
1237
+ },
1238
+ "required": [
1239
+ "kind",
1240
+ "schemaVersion",
1241
+ "protocolVersion",
1242
+ "diagramId",
1243
+ "semanticDigest",
1244
+ "sourceDigest",
1245
+ "sourceByteLength",
1246
+ "encoding",
1247
+ "parser",
1248
+ "certificationVersion",
1249
+ "entries"
1250
+ ]
1251
+ }
1252
+ ]
1253
+ },
1254
+ "bundleDigest": {
1255
+ "type": "string",
1256
+ "pattern": "^sha256:[a-f0-9]{64}$"
1257
+ }
1258
+ },
1259
+ "required": [
1260
+ "kind",
1261
+ "schemaVersion",
1262
+ "protocolVersion",
1263
+ "diagramId",
1264
+ "document",
1265
+ "presentation",
1266
+ "originalSource",
1267
+ "sourceMap",
1268
+ "bundleDigest"
1269
+ ]
1270
+ },
1271
+ {
1272
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1273
+ "$id": "https://openplanr.dev/schemas/v1.17.0/diagram-authoring-bundle.schema.json",
1274
+ "x-openplanr-contract": {
1275
+ "id": "diagram-authoring-bundle",
1276
+ "version": "1.17.0"
1277
+ },
1278
+ "type": "object",
1279
+ "additionalProperties": false,
1280
+ "properties": {
1281
+ "kind": {
1282
+ "const": "diagram-authoring-bundle"
1283
+ },
1284
+ "schemaVersion": {
1285
+ "const": "1.1.0"
1286
+ },
1287
+ "protocolVersion": {
1288
+ "const": "1.17.0"
1289
+ },
1290
+ "diagramId": {
1291
+ "type": "string",
1292
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1293
+ "minLength": 1,
1294
+ "maxLength": 128
1295
+ },
1296
+ "document": {
1297
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1298
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-document.schema.json",
1299
+ "x-openplanr-contract": {
1300
+ "id": "diagram-document",
1301
+ "version": "1.13.0"
1302
+ },
1303
+ "type": "object",
1304
+ "additionalProperties": false,
1305
+ "properties": {
1306
+ "kind": {
1307
+ "const": "planr-diagram"
1308
+ },
1309
+ "schemaVersion": {
1310
+ "const": "1.0.0"
1311
+ },
1312
+ "protocolVersion": {
1313
+ "const": "1.13.0"
1314
+ },
1315
+ "diagramId": {
1316
+ "type": "string",
1317
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1318
+ "minLength": 1,
1319
+ "maxLength": 128
1320
+ },
1321
+ "title": {
1322
+ "type": "string",
1323
+ "minLength": 0,
1324
+ "maxLength": 4096
1325
+ },
1326
+ "summary": {
1327
+ "type": "string",
1328
+ "minLength": 0,
1329
+ "maxLength": 4096
1330
+ },
1331
+ "audience": {
1332
+ "enum": [
1333
+ "engineer",
1334
+ "executive",
1335
+ "mixed"
1336
+ ]
1337
+ },
1338
+ "grammar": {
1339
+ "type": "object",
1340
+ "additionalProperties": false,
1341
+ "properties": {
1342
+ "id": {
1343
+ "enum": [
1344
+ "flowchart",
1345
+ "process",
1346
+ "swimlane",
1347
+ "architecture"
1348
+ ]
1349
+ },
1350
+ "version": {
1351
+ "const": "1.0.0"
1352
+ }
1353
+ },
1354
+ "required": [
1355
+ "id",
1356
+ "version"
1357
+ ]
1358
+ },
1359
+ "nodes": {
1360
+ "type": "array",
1361
+ "items": {
1362
+ "type": "object",
1363
+ "additionalProperties": false,
1364
+ "properties": {
1365
+ "id": {
1366
+ "type": "string",
1367
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1368
+ "minLength": 1,
1369
+ "maxLength": 128
1370
+ },
1371
+ "label": {
1372
+ "type": "string",
1373
+ "minLength": 0,
1374
+ "maxLength": 4096
1375
+ },
1376
+ "kind": {
1377
+ "enum": [
1378
+ "process",
1379
+ "start",
1380
+ "end",
1381
+ "decision",
1382
+ "data-store",
1383
+ "component"
1384
+ ]
1385
+ },
1386
+ "description": {
1387
+ "anyOf": [
1388
+ {
1389
+ "type": "null"
1390
+ },
1391
+ {
1392
+ "type": "string",
1393
+ "minLength": 0,
1394
+ "maxLength": 4096
1395
+ }
1396
+ ]
1397
+ }
1398
+ },
1399
+ "required": [
1400
+ "id",
1401
+ "label",
1402
+ "kind",
1403
+ "description"
1404
+ ]
1405
+ },
1406
+ "minItems": 0,
1407
+ "maxItems": 4096
1408
+ },
1409
+ "relations": {
1410
+ "type": "array",
1411
+ "items": {
1412
+ "type": "object",
1413
+ "additionalProperties": false,
1414
+ "properties": {
1415
+ "id": {
1416
+ "type": "string",
1417
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1418
+ "minLength": 1,
1419
+ "maxLength": 128
1420
+ },
1421
+ "from": {
1422
+ "type": "string",
1423
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1424
+ "minLength": 1,
1425
+ "maxLength": 128
1426
+ },
1427
+ "to": {
1428
+ "type": "string",
1429
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1430
+ "minLength": 1,
1431
+ "maxLength": 128
1432
+ },
1433
+ "kind": {
1434
+ "enum": [
1435
+ "association",
1436
+ "dependency",
1437
+ "flow",
1438
+ "message",
1439
+ "transition"
1440
+ ]
1441
+ },
1442
+ "direction": {
1443
+ "enum": [
1444
+ "forward",
1445
+ "both",
1446
+ "none"
1447
+ ]
1448
+ },
1449
+ "label": {
1450
+ "anyOf": [
1451
+ {
1452
+ "type": "null"
1453
+ },
1454
+ {
1455
+ "type": "string",
1456
+ "minLength": 0,
1457
+ "maxLength": 4096
1458
+ }
1459
+ ]
1460
+ },
1461
+ "weight": {
1462
+ "anyOf": [
1463
+ {
1464
+ "type": "null"
1465
+ },
1466
+ {
1467
+ "type": "number",
1468
+ "minimum": 0,
1469
+ "maximum": 1000000
1470
+ }
1471
+ ]
1472
+ }
1473
+ },
1474
+ "required": [
1475
+ "id",
1476
+ "from",
1477
+ "to",
1478
+ "kind",
1479
+ "direction",
1480
+ "label",
1481
+ "weight"
1482
+ ]
1483
+ },
1484
+ "minItems": 0,
1485
+ "maxItems": 8192
1486
+ },
1487
+ "groups": {
1488
+ "type": "array",
1489
+ "items": {
1490
+ "type": "object",
1491
+ "additionalProperties": false,
1492
+ "properties": {
1493
+ "id": {
1494
+ "type": "string",
1495
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1496
+ "minLength": 1,
1497
+ "maxLength": 128
1498
+ },
1499
+ "label": {
1500
+ "type": "string",
1501
+ "minLength": 0,
1502
+ "maxLength": 4096
1503
+ },
1504
+ "members": {
1505
+ "type": "array",
1506
+ "items": {
1507
+ "type": "string",
1508
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1509
+ "minLength": 1,
1510
+ "maxLength": 128
1511
+ },
1512
+ "minItems": 0,
1513
+ "maxItems": 10000,
1514
+ "uniqueItems": true
1515
+ }
1516
+ },
1517
+ "required": [
1518
+ "id",
1519
+ "label",
1520
+ "members"
1521
+ ]
1522
+ },
1523
+ "minItems": 0,
1524
+ "maxItems": 1024
1525
+ },
1526
+ "lanes": {
1527
+ "type": "array",
1528
+ "items": {
1529
+ "type": "object",
1530
+ "additionalProperties": false,
1531
+ "properties": {
1532
+ "id": {
1533
+ "type": "string",
1534
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1535
+ "minLength": 1,
1536
+ "maxLength": 128
1537
+ },
1538
+ "label": {
1539
+ "type": "string",
1540
+ "minLength": 0,
1541
+ "maxLength": 4096
1542
+ },
1543
+ "members": {
1544
+ "type": "array",
1545
+ "items": {
1546
+ "type": "string",
1547
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1548
+ "minLength": 1,
1549
+ "maxLength": 128
1550
+ },
1551
+ "minItems": 0,
1552
+ "maxItems": 10000,
1553
+ "uniqueItems": true
1554
+ }
1555
+ },
1556
+ "required": [
1557
+ "id",
1558
+ "label",
1559
+ "members"
1560
+ ]
1561
+ },
1562
+ "minItems": 0,
1563
+ "maxItems": 256
1564
+ },
1565
+ "events": {
1566
+ "type": "array",
1567
+ "items": false,
1568
+ "minItems": 0,
1569
+ "maxItems": 0
1570
+ },
1571
+ "series": {
1572
+ "type": "array",
1573
+ "items": false,
1574
+ "minItems": 0,
1575
+ "maxItems": 0
1576
+ },
1577
+ "axes": {
1578
+ "type": "array",
1579
+ "items": false,
1580
+ "minItems": 0,
1581
+ "maxItems": 0
1582
+ },
1583
+ "sets": {
1584
+ "type": "array",
1585
+ "items": false,
1586
+ "minItems": 0,
1587
+ "maxItems": 0
1588
+ },
1589
+ "annotations": {
1590
+ "type": "array",
1591
+ "items": {
1592
+ "type": "object",
1593
+ "additionalProperties": false,
1594
+ "properties": {
1595
+ "id": {
1596
+ "type": "string",
1597
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1598
+ "minLength": 1,
1599
+ "maxLength": 128
1600
+ },
1601
+ "text": {
1602
+ "type": "string",
1603
+ "minLength": 0,
1604
+ "maxLength": 4096
1605
+ },
1606
+ "targetId": {
1607
+ "anyOf": [
1608
+ {
1609
+ "type": "null"
1610
+ },
1611
+ {
1612
+ "type": "string",
1613
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1614
+ "minLength": 1,
1615
+ "maxLength": 128
1616
+ }
1617
+ ]
1618
+ }
1619
+ },
1620
+ "required": [
1621
+ "id",
1622
+ "text",
1623
+ "targetId"
1624
+ ]
1625
+ },
1626
+ "minItems": 0,
1627
+ "maxItems": 1024
1628
+ },
1629
+ "emphasis": {
1630
+ "type": "array",
1631
+ "items": {
1632
+ "type": "object",
1633
+ "additionalProperties": false,
1634
+ "properties": {
1635
+ "targetId": {
1636
+ "type": "string",
1637
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1638
+ "minLength": 1,
1639
+ "maxLength": 128
1640
+ },
1641
+ "level": {
1642
+ "enum": [
1643
+ "primary",
1644
+ "secondary",
1645
+ "muted"
1646
+ ]
1647
+ }
1648
+ },
1649
+ "required": [
1650
+ "targetId",
1651
+ "level"
1652
+ ]
1653
+ },
1654
+ "minItems": 0,
1655
+ "maxItems": 1024
1656
+ },
1657
+ "laneOrder": {
1658
+ "type": "array",
1659
+ "items": {
1660
+ "type": "string",
1661
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1662
+ "minLength": 1,
1663
+ "maxLength": 128
1664
+ },
1665
+ "minItems": 0,
1666
+ "maxItems": 10000,
1667
+ "uniqueItems": true
1668
+ },
1669
+ "accessibility": {
1670
+ "type": "object",
1671
+ "additionalProperties": false,
1672
+ "properties": {
1673
+ "title": {
1674
+ "type": "string",
1675
+ "minLength": 0,
1676
+ "maxLength": 4096
1677
+ },
1678
+ "description": {
1679
+ "type": "string",
1680
+ "minLength": 0,
1681
+ "maxLength": 4096
1682
+ },
1683
+ "readingOrder": {
1684
+ "type": "array",
1685
+ "items": {
1686
+ "type": "string",
1687
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1688
+ "minLength": 1,
1689
+ "maxLength": 128
1690
+ },
1691
+ "minItems": 0,
1692
+ "maxItems": 10000,
1693
+ "uniqueItems": true
1694
+ }
1695
+ },
1696
+ "required": [
1697
+ "title",
1698
+ "description",
1699
+ "readingOrder"
1700
+ ]
1701
+ },
1702
+ "documentDigest": {
1703
+ "type": "string",
1704
+ "pattern": "^sha256:[a-f0-9]{64}$"
1705
+ }
1706
+ },
1707
+ "required": [
1708
+ "kind",
1709
+ "schemaVersion",
1710
+ "protocolVersion",
1711
+ "diagramId",
1712
+ "title",
1713
+ "summary",
1714
+ "audience",
1715
+ "grammar",
1716
+ "nodes",
1717
+ "relations",
1718
+ "groups",
1719
+ "lanes",
1720
+ "events",
1721
+ "series",
1722
+ "axes",
1723
+ "sets",
1724
+ "annotations",
1725
+ "emphasis",
1726
+ "laneOrder",
1727
+ "accessibility",
1728
+ "documentDigest"
1729
+ ]
1730
+ },
1731
+ "presentation": {
1732
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1733
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-presentation.schema.json",
1734
+ "x-openplanr-contract": {
1735
+ "id": "diagram-presentation",
1736
+ "version": "1.13.0"
1737
+ },
1738
+ "type": "object",
1739
+ "additionalProperties": false,
1740
+ "properties": {
1741
+ "kind": {
1742
+ "const": "diagram-presentation"
1743
+ },
1744
+ "schemaVersion": {
1745
+ "const": "1.0.0"
1746
+ },
1747
+ "protocolVersion": {
1748
+ "const": "1.13.0"
1749
+ },
1750
+ "diagramId": {
1751
+ "type": "string",
1752
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1753
+ "minLength": 1,
1754
+ "maxLength": 128
1755
+ },
1756
+ "semanticDigest": {
1757
+ "type": "string",
1758
+ "pattern": "^sha256:[a-f0-9]{64}$"
1759
+ },
1760
+ "coordinateSystem": {
1761
+ "const": "global-canvas"
1762
+ },
1763
+ "layout": {
1764
+ "type": "object",
1765
+ "additionalProperties": false,
1766
+ "properties": {
1767
+ "direction": {
1768
+ "enum": [
1769
+ "top-down",
1770
+ "left-right",
1771
+ "right-left",
1772
+ "bottom-up"
1773
+ ]
1774
+ },
1775
+ "detailTier": {
1776
+ "enum": [
1777
+ "simplified",
1778
+ "balanced",
1779
+ "faithful"
1780
+ ]
1781
+ }
1782
+ },
1783
+ "required": [
1784
+ "direction",
1785
+ "detailTier"
1786
+ ]
1787
+ },
1788
+ "theme": {
1789
+ "type": "object",
1790
+ "additionalProperties": false,
1791
+ "properties": {
1792
+ "themeId": {
1793
+ "enum": [
1794
+ "paper",
1795
+ "slate",
1796
+ "midnight"
1797
+ ]
1798
+ },
1799
+ "mode": {
1800
+ "enum": [
1801
+ "light",
1802
+ "dark",
1803
+ "auto"
1804
+ ]
1805
+ }
1806
+ },
1807
+ "required": [
1808
+ "themeId",
1809
+ "mode"
1810
+ ]
1811
+ },
1812
+ "elements": {
1813
+ "type": "array",
1814
+ "items": {
1815
+ "type": "object",
1816
+ "additionalProperties": false,
1817
+ "properties": {
1818
+ "elementId": {
1819
+ "type": "string",
1820
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
1821
+ "minLength": 1,
1822
+ "maxLength": 128
1823
+ },
1824
+ "bounds": {
1825
+ "anyOf": [
1826
+ {
1827
+ "type": "null"
1828
+ },
1829
+ {
1830
+ "type": "object",
1831
+ "additionalProperties": false,
1832
+ "properties": {
1833
+ "x": {
1834
+ "type": "number",
1835
+ "minimum": -1000000,
1836
+ "maximum": 1000000
1837
+ },
1838
+ "y": {
1839
+ "type": "number",
1840
+ "minimum": -1000000,
1841
+ "maximum": 1000000
1842
+ },
1843
+ "width": {
1844
+ "type": "number",
1845
+ "minimum": 0.01,
1846
+ "maximum": 1000000
1847
+ },
1848
+ "height": {
1849
+ "type": "number",
1850
+ "minimum": 0.01,
1851
+ "maximum": 1000000
1852
+ }
1853
+ },
1854
+ "required": [
1855
+ "x",
1856
+ "y",
1857
+ "width",
1858
+ "height"
1859
+ ]
1860
+ }
1861
+ ]
1862
+ },
1863
+ "route": {
1864
+ "anyOf": [
1865
+ {
1866
+ "type": "null"
1867
+ },
1868
+ {
1869
+ "type": "object",
1870
+ "additionalProperties": false,
1871
+ "properties": {
1872
+ "mode": {
1873
+ "enum": [
1874
+ "automatic",
1875
+ "manual"
1876
+ ]
1877
+ },
1878
+ "strategy": {
1879
+ "enum": [
1880
+ "straight",
1881
+ "orthogonal"
1882
+ ]
1883
+ },
1884
+ "from": {
1885
+ "type": "object",
1886
+ "additionalProperties": false,
1887
+ "properties": {
1888
+ "side": {
1889
+ "enum": [
1890
+ "top",
1891
+ "right",
1892
+ "bottom",
1893
+ "left"
1894
+ ]
1895
+ },
1896
+ "offset": {
1897
+ "type": "number",
1898
+ "minimum": 0,
1899
+ "maximum": 1
1900
+ }
1901
+ },
1902
+ "required": [
1903
+ "side",
1904
+ "offset"
1905
+ ]
1906
+ },
1907
+ "to": {
1908
+ "type": "object",
1909
+ "additionalProperties": false,
1910
+ "properties": {
1911
+ "side": {
1912
+ "enum": [
1913
+ "top",
1914
+ "right",
1915
+ "bottom",
1916
+ "left"
1917
+ ]
1918
+ },
1919
+ "offset": {
1920
+ "type": "number",
1921
+ "minimum": 0,
1922
+ "maximum": 1
1923
+ }
1924
+ },
1925
+ "required": [
1926
+ "side",
1927
+ "offset"
1928
+ ]
1929
+ },
1930
+ "points": {
1931
+ "type": "array",
1932
+ "items": {
1933
+ "type": "object",
1934
+ "additionalProperties": false,
1935
+ "properties": {
1936
+ "x": {
1937
+ "type": "number",
1938
+ "minimum": -1000000,
1939
+ "maximum": 1000000
1940
+ },
1941
+ "y": {
1942
+ "type": "number",
1943
+ "minimum": -1000000,
1944
+ "maximum": 1000000
1945
+ }
1946
+ },
1947
+ "required": [
1948
+ "x",
1949
+ "y"
1950
+ ]
1951
+ },
1952
+ "minItems": 0,
1953
+ "maxItems": 256
1954
+ }
1955
+ },
1956
+ "required": [
1957
+ "mode",
1958
+ "strategy",
1959
+ "from",
1960
+ "to",
1961
+ "points"
1962
+ ]
1963
+ }
1964
+ ]
1965
+ },
1966
+ "label": {
1967
+ "anyOf": [
1968
+ {
1969
+ "type": "null"
1970
+ },
1971
+ {
1972
+ "type": "object",
1973
+ "additionalProperties": false,
1974
+ "properties": {
1975
+ "x": {
1976
+ "type": "number",
1977
+ "minimum": -1000000,
1978
+ "maximum": 1000000
1979
+ },
1980
+ "y": {
1981
+ "type": "number",
1982
+ "minimum": -1000000,
1983
+ "maximum": 1000000
1984
+ },
1985
+ "width": {
1986
+ "type": "number",
1987
+ "minimum": 0.01,
1988
+ "maximum": 1000000
1989
+ }
1990
+ },
1991
+ "required": [
1992
+ "x",
1993
+ "y",
1994
+ "width"
1995
+ ]
1996
+ }
1997
+ ]
1998
+ },
1999
+ "zIndex": {
2000
+ "type": "integer",
2001
+ "minimum": 0,
2002
+ "maximum": 10000
2003
+ },
2004
+ "appearance": {
2005
+ "type": "object",
2006
+ "additionalProperties": false,
2007
+ "properties": {
2008
+ "shape": {
2009
+ "enum": [
2010
+ "rectangle",
2011
+ "rounded-rectangle",
2012
+ "ellipse",
2013
+ "diamond",
2014
+ "cylinder",
2015
+ "text",
2016
+ "container",
2017
+ "connector"
2018
+ ]
2019
+ },
2020
+ "fill": {
2021
+ "enum": [
2022
+ "surface",
2023
+ "accent",
2024
+ "success",
2025
+ "warning",
2026
+ "danger",
2027
+ "transparent"
2028
+ ]
2029
+ },
2030
+ "stroke": {
2031
+ "enum": [
2032
+ "default",
2033
+ "accent",
2034
+ "muted",
2035
+ "danger",
2036
+ "none"
2037
+ ]
2038
+ },
2039
+ "strokeWidth": {
2040
+ "type": "number",
2041
+ "minimum": 0,
2042
+ "maximum": 16
2043
+ },
2044
+ "strokeStyle": {
2045
+ "enum": [
2046
+ "solid",
2047
+ "dashed",
2048
+ "dotted"
2049
+ ]
2050
+ },
2051
+ "fontSize": {
2052
+ "type": "integer",
2053
+ "minimum": 8,
2054
+ "maximum": 72
2055
+ },
2056
+ "textAlign": {
2057
+ "enum": [
2058
+ "left",
2059
+ "center",
2060
+ "right"
2061
+ ]
2062
+ }
2063
+ },
2064
+ "required": [
2065
+ "shape",
2066
+ "fill",
2067
+ "stroke",
2068
+ "strokeWidth",
2069
+ "strokeStyle",
2070
+ "fontSize",
2071
+ "textAlign"
2072
+ ]
2073
+ },
2074
+ "locks": {
2075
+ "type": "object",
2076
+ "additionalProperties": false,
2077
+ "properties": {
2078
+ "position": {
2079
+ "type": "boolean"
2080
+ },
2081
+ "size": {
2082
+ "type": "boolean"
2083
+ },
2084
+ "route": {
2085
+ "type": "boolean"
2086
+ }
2087
+ },
2088
+ "required": [
2089
+ "position",
2090
+ "size",
2091
+ "route"
2092
+ ]
2093
+ }
2094
+ },
2095
+ "required": [
2096
+ "elementId",
2097
+ "bounds",
2098
+ "route",
2099
+ "label",
2100
+ "zIndex",
2101
+ "appearance",
2102
+ "locks"
2103
+ ]
2104
+ },
2105
+ "minItems": 0,
2106
+ "maxItems": 10000
2107
+ },
2108
+ "presentationDigest": {
2109
+ "type": "string",
2110
+ "pattern": "^sha256:[a-f0-9]{64}$"
2111
+ }
2112
+ },
2113
+ "required": [
2114
+ "kind",
2115
+ "schemaVersion",
2116
+ "protocolVersion",
2117
+ "diagramId",
2118
+ "semanticDigest",
2119
+ "coordinateSystem",
2120
+ "layout",
2121
+ "theme",
2122
+ "elements",
2123
+ "presentationDigest"
2124
+ ]
2125
+ },
2126
+ "originalSource": {
2127
+ "anyOf": [
2128
+ {
2129
+ "type": "null"
2130
+ },
2131
+ {
2132
+ "type": "object",
2133
+ "additionalProperties": false,
2134
+ "properties": {
2135
+ "format": {
2136
+ "const": "mermaid"
2137
+ },
2138
+ "text": {
2139
+ "type": "string",
2140
+ "minLength": 0,
2141
+ "maxLength": 1048576
2142
+ },
2143
+ "sourceDigest": {
2144
+ "type": "string",
2145
+ "pattern": "^sha256:[a-f0-9]{64}$"
2146
+ }
2147
+ },
2148
+ "required": [
2149
+ "format",
2150
+ "text",
2151
+ "sourceDigest"
2152
+ ]
2153
+ }
2154
+ ]
2155
+ },
2156
+ "sourceMap": {
2157
+ "anyOf": [
2158
+ {
2159
+ "type": "null"
2160
+ },
2161
+ {
2162
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2163
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-source-map.schema.json",
2164
+ "x-openplanr-contract": {
2165
+ "id": "diagram-source-map",
2166
+ "version": "1.13.0"
2167
+ },
2168
+ "type": "object",
2169
+ "additionalProperties": false,
2170
+ "properties": {
2171
+ "kind": {
2172
+ "const": "diagram-source-map"
2173
+ },
2174
+ "schemaVersion": {
2175
+ "const": "1.0.0"
2176
+ },
2177
+ "protocolVersion": {
2178
+ "const": "1.13.0"
2179
+ },
2180
+ "diagramId": {
2181
+ "type": "string",
2182
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2183
+ "minLength": 1,
2184
+ "maxLength": 128
2185
+ },
2186
+ "semanticDigest": {
2187
+ "type": "string",
2188
+ "pattern": "^sha256:[a-f0-9]{64}$"
2189
+ },
2190
+ "sourceDigest": {
2191
+ "type": "string",
2192
+ "pattern": "^sha256:[a-f0-9]{64}$"
2193
+ },
2194
+ "sourceByteLength": {
2195
+ "type": "integer",
2196
+ "minimum": 0,
2197
+ "maximum": 1048576
2198
+ },
2199
+ "encoding": {
2200
+ "const": "utf-8"
2201
+ },
2202
+ "parser": {
2203
+ "type": "object",
2204
+ "additionalProperties": false,
2205
+ "properties": {
2206
+ "id": {
2207
+ "type": "string",
2208
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2209
+ "maxLength": 64
2210
+ },
2211
+ "version": {
2212
+ "type": "string",
2213
+ "minLength": 1,
2214
+ "maxLength": 64
2215
+ }
2216
+ },
2217
+ "required": [
2218
+ "id",
2219
+ "version"
2220
+ ]
2221
+ },
2222
+ "certificationVersion": {
2223
+ "const": "flowchart-copy-v1"
2224
+ },
2225
+ "entries": {
2226
+ "type": "array",
2227
+ "items": {
2228
+ "type": "object",
2229
+ "additionalProperties": false,
2230
+ "properties": {
2231
+ "sourceId": {
2232
+ "anyOf": [
2233
+ {
2234
+ "type": "null"
2235
+ },
2236
+ {
2237
+ "type": "string",
2238
+ "minLength": 1,
2239
+ "maxLength": 128
2240
+ }
2241
+ ]
2242
+ },
2243
+ "elementIds": {
2244
+ "type": "array",
2245
+ "items": {
2246
+ "type": "string",
2247
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2248
+ "minLength": 1,
2249
+ "maxLength": 128
2250
+ },
2251
+ "minItems": 0,
2252
+ "maxItems": 10000,
2253
+ "uniqueItems": true
2254
+ },
2255
+ "range": {
2256
+ "anyOf": [
2257
+ {
2258
+ "type": "null"
2259
+ },
2260
+ {
2261
+ "type": "object",
2262
+ "additionalProperties": false,
2263
+ "properties": {
2264
+ "startByte": {
2265
+ "type": "integer",
2266
+ "minimum": 0,
2267
+ "maximum": 1048576
2268
+ },
2269
+ "endByte": {
2270
+ "type": "integer",
2271
+ "minimum": 0,
2272
+ "maximum": 1048576
2273
+ }
2274
+ },
2275
+ "required": [
2276
+ "startByte",
2277
+ "endByte"
2278
+ ]
2279
+ }
2280
+ ]
2281
+ },
2282
+ "construct": {
2283
+ "type": "string",
2284
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2285
+ "maxLength": 64
2286
+ },
2287
+ "confidence": {
2288
+ "enum": [
2289
+ "exact",
2290
+ "ambiguous"
2291
+ ]
2292
+ },
2293
+ "losses": {
2294
+ "type": "array",
2295
+ "items": {
2296
+ "type": "string",
2297
+ "minLength": 1,
2298
+ "maxLength": 512
2299
+ },
2300
+ "minItems": 0,
2301
+ "maxItems": 64
2302
+ }
2303
+ },
2304
+ "required": [
2305
+ "sourceId",
2306
+ "elementIds",
2307
+ "range",
2308
+ "construct",
2309
+ "confidence",
2310
+ "losses"
2311
+ ]
2312
+ },
2313
+ "minItems": 0,
2314
+ "maxItems": 10000
2315
+ }
2316
+ },
2317
+ "required": [
2318
+ "kind",
2319
+ "schemaVersion",
2320
+ "protocolVersion",
2321
+ "diagramId",
2322
+ "semanticDigest",
2323
+ "sourceDigest",
2324
+ "sourceByteLength",
2325
+ "encoding",
2326
+ "parser",
2327
+ "certificationVersion",
2328
+ "entries"
2329
+ ]
2330
+ }
2331
+ ]
2332
+ },
2333
+ "bundleDigest": {
2334
+ "type": "string",
2335
+ "pattern": "^sha256:[a-f0-9]{64}$"
2336
+ },
2337
+ "studioPresentation": {
2338
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2339
+ "$id": "https://openplanr.dev/schemas/v1.17.0/diagram-presentation.schema.json",
2340
+ "x-openplanr-contract": {
2341
+ "id": "diagram-presentation",
2342
+ "version": "1.17.0"
2343
+ },
2344
+ "type": "object",
2345
+ "additionalProperties": false,
2346
+ "required": [
2347
+ "kind",
2348
+ "schemaVersion",
2349
+ "palette",
2350
+ "theme",
2351
+ "fontFamily"
2352
+ ],
2353
+ "properties": {
2354
+ "kind": {
2355
+ "const": "openplanr-diagram-presentation"
2356
+ },
2357
+ "schemaVersion": {
2358
+ "const": "2.0.0"
2359
+ },
2360
+ "palette": {
2361
+ "const": "openplanr-brand-v2"
2362
+ },
2363
+ "theme": {
2364
+ "enum": [
2365
+ "light",
2366
+ "dark"
2367
+ ]
2368
+ },
2369
+ "fontFamily": {
2370
+ "const": "Inter"
2371
+ }
2372
+ }
2373
+ }
2374
+ },
2375
+ "required": [
2376
+ "kind",
2377
+ "schemaVersion",
2378
+ "protocolVersion",
2379
+ "diagramId",
2380
+ "document",
2381
+ "presentation",
2382
+ "originalSource",
2383
+ "sourceMap",
2384
+ "bundleDigest",
2385
+ "studioPresentation"
2386
+ ]
2387
+ },
2388
+ {
2389
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2390
+ "$id": "https://openplanr.dev/schemas/v1.21.0/diagram-authoring-bundle.schema.json",
2391
+ "x-openplanr-contract": {
2392
+ "id": "diagram-authoring-bundle",
2393
+ "version": "1.21.0"
2394
+ },
2395
+ "type": "object",
2396
+ "additionalProperties": false,
2397
+ "properties": {
2398
+ "kind": {
2399
+ "const": "diagram-authoring-bundle"
2400
+ },
2401
+ "schemaVersion": {
2402
+ "const": "1.2.0"
2403
+ },
2404
+ "protocolVersion": {
2405
+ "const": "1.21.0"
2406
+ },
2407
+ "diagramId": {
2408
+ "type": "string",
2409
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2410
+ "minLength": 1,
2411
+ "maxLength": 128
2412
+ },
2413
+ "document": {
2414
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2415
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-document.schema.json",
2416
+ "x-openplanr-contract": {
2417
+ "id": "diagram-document",
2418
+ "version": "1.13.0"
2419
+ },
2420
+ "type": "object",
2421
+ "additionalProperties": false,
2422
+ "properties": {
2423
+ "kind": {
2424
+ "const": "planr-diagram"
2425
+ },
2426
+ "schemaVersion": {
2427
+ "const": "1.0.0"
2428
+ },
2429
+ "protocolVersion": {
2430
+ "const": "1.13.0"
2431
+ },
2432
+ "diagramId": {
2433
+ "type": "string",
2434
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2435
+ "minLength": 1,
2436
+ "maxLength": 128
2437
+ },
2438
+ "title": {
2439
+ "type": "string",
2440
+ "minLength": 0,
2441
+ "maxLength": 4096
2442
+ },
2443
+ "summary": {
2444
+ "type": "string",
2445
+ "minLength": 0,
2446
+ "maxLength": 4096
2447
+ },
2448
+ "audience": {
2449
+ "enum": [
2450
+ "engineer",
2451
+ "executive",
2452
+ "mixed"
2453
+ ]
2454
+ },
2455
+ "grammar": {
2456
+ "type": "object",
2457
+ "additionalProperties": false,
2458
+ "properties": {
2459
+ "id": {
2460
+ "enum": [
2461
+ "flowchart",
2462
+ "process",
2463
+ "swimlane",
2464
+ "architecture"
2465
+ ]
2466
+ },
2467
+ "version": {
2468
+ "const": "1.0.0"
2469
+ }
2470
+ },
2471
+ "required": [
2472
+ "id",
2473
+ "version"
2474
+ ]
2475
+ },
2476
+ "nodes": {
2477
+ "type": "array",
2478
+ "items": {
2479
+ "type": "object",
2480
+ "additionalProperties": false,
2481
+ "properties": {
2482
+ "id": {
2483
+ "type": "string",
2484
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2485
+ "minLength": 1,
2486
+ "maxLength": 128
2487
+ },
2488
+ "label": {
2489
+ "type": "string",
2490
+ "minLength": 0,
2491
+ "maxLength": 4096
2492
+ },
2493
+ "kind": {
2494
+ "enum": [
2495
+ "process",
2496
+ "start",
2497
+ "end",
2498
+ "decision",
2499
+ "data-store",
2500
+ "component"
2501
+ ]
2502
+ },
2503
+ "description": {
2504
+ "anyOf": [
2505
+ {
2506
+ "type": "null"
2507
+ },
2508
+ {
2509
+ "type": "string",
2510
+ "minLength": 0,
2511
+ "maxLength": 4096
2512
+ }
2513
+ ]
2514
+ }
2515
+ },
2516
+ "required": [
2517
+ "id",
2518
+ "label",
2519
+ "kind",
2520
+ "description"
2521
+ ]
2522
+ },
2523
+ "minItems": 0,
2524
+ "maxItems": 4096
2525
+ },
2526
+ "relations": {
2527
+ "type": "array",
2528
+ "items": {
2529
+ "type": "object",
2530
+ "additionalProperties": false,
2531
+ "properties": {
2532
+ "id": {
2533
+ "type": "string",
2534
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2535
+ "minLength": 1,
2536
+ "maxLength": 128
2537
+ },
2538
+ "from": {
2539
+ "type": "string",
2540
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2541
+ "minLength": 1,
2542
+ "maxLength": 128
2543
+ },
2544
+ "to": {
2545
+ "type": "string",
2546
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2547
+ "minLength": 1,
2548
+ "maxLength": 128
2549
+ },
2550
+ "kind": {
2551
+ "enum": [
2552
+ "association",
2553
+ "dependency",
2554
+ "flow",
2555
+ "message",
2556
+ "transition"
2557
+ ]
2558
+ },
2559
+ "direction": {
2560
+ "enum": [
2561
+ "forward",
2562
+ "both",
2563
+ "none"
2564
+ ]
2565
+ },
2566
+ "label": {
2567
+ "anyOf": [
2568
+ {
2569
+ "type": "null"
2570
+ },
2571
+ {
2572
+ "type": "string",
2573
+ "minLength": 0,
2574
+ "maxLength": 4096
2575
+ }
2576
+ ]
2577
+ },
2578
+ "weight": {
2579
+ "anyOf": [
2580
+ {
2581
+ "type": "null"
2582
+ },
2583
+ {
2584
+ "type": "number",
2585
+ "minimum": 0,
2586
+ "maximum": 1000000
2587
+ }
2588
+ ]
2589
+ }
2590
+ },
2591
+ "required": [
2592
+ "id",
2593
+ "from",
2594
+ "to",
2595
+ "kind",
2596
+ "direction",
2597
+ "label",
2598
+ "weight"
2599
+ ]
2600
+ },
2601
+ "minItems": 0,
2602
+ "maxItems": 8192
2603
+ },
2604
+ "groups": {
2605
+ "type": "array",
2606
+ "items": {
2607
+ "type": "object",
2608
+ "additionalProperties": false,
2609
+ "properties": {
2610
+ "id": {
2611
+ "type": "string",
2612
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2613
+ "minLength": 1,
2614
+ "maxLength": 128
2615
+ },
2616
+ "label": {
2617
+ "type": "string",
2618
+ "minLength": 0,
2619
+ "maxLength": 4096
2620
+ },
2621
+ "members": {
2622
+ "type": "array",
2623
+ "items": {
2624
+ "type": "string",
2625
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2626
+ "minLength": 1,
2627
+ "maxLength": 128
2628
+ },
2629
+ "minItems": 0,
2630
+ "maxItems": 10000,
2631
+ "uniqueItems": true
2632
+ }
2633
+ },
2634
+ "required": [
2635
+ "id",
2636
+ "label",
2637
+ "members"
2638
+ ]
2639
+ },
2640
+ "minItems": 0,
2641
+ "maxItems": 1024
2642
+ },
2643
+ "lanes": {
2644
+ "type": "array",
2645
+ "items": {
2646
+ "type": "object",
2647
+ "additionalProperties": false,
2648
+ "properties": {
2649
+ "id": {
2650
+ "type": "string",
2651
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2652
+ "minLength": 1,
2653
+ "maxLength": 128
2654
+ },
2655
+ "label": {
2656
+ "type": "string",
2657
+ "minLength": 0,
2658
+ "maxLength": 4096
2659
+ },
2660
+ "members": {
2661
+ "type": "array",
2662
+ "items": {
2663
+ "type": "string",
2664
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2665
+ "minLength": 1,
2666
+ "maxLength": 128
2667
+ },
2668
+ "minItems": 0,
2669
+ "maxItems": 10000,
2670
+ "uniqueItems": true
2671
+ }
2672
+ },
2673
+ "required": [
2674
+ "id",
2675
+ "label",
2676
+ "members"
2677
+ ]
2678
+ },
2679
+ "minItems": 0,
2680
+ "maxItems": 256
2681
+ },
2682
+ "events": {
2683
+ "type": "array",
2684
+ "items": false,
2685
+ "minItems": 0,
2686
+ "maxItems": 0
2687
+ },
2688
+ "series": {
2689
+ "type": "array",
2690
+ "items": false,
2691
+ "minItems": 0,
2692
+ "maxItems": 0
2693
+ },
2694
+ "axes": {
2695
+ "type": "array",
2696
+ "items": false,
2697
+ "minItems": 0,
2698
+ "maxItems": 0
2699
+ },
2700
+ "sets": {
2701
+ "type": "array",
2702
+ "items": false,
2703
+ "minItems": 0,
2704
+ "maxItems": 0
2705
+ },
2706
+ "annotations": {
2707
+ "type": "array",
2708
+ "items": {
2709
+ "type": "object",
2710
+ "additionalProperties": false,
2711
+ "properties": {
2712
+ "id": {
2713
+ "type": "string",
2714
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2715
+ "minLength": 1,
2716
+ "maxLength": 128
2717
+ },
2718
+ "text": {
2719
+ "type": "string",
2720
+ "minLength": 0,
2721
+ "maxLength": 4096
2722
+ },
2723
+ "targetId": {
2724
+ "anyOf": [
2725
+ {
2726
+ "type": "null"
2727
+ },
2728
+ {
2729
+ "type": "string",
2730
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2731
+ "minLength": 1,
2732
+ "maxLength": 128
2733
+ }
2734
+ ]
2735
+ }
2736
+ },
2737
+ "required": [
2738
+ "id",
2739
+ "text",
2740
+ "targetId"
2741
+ ]
2742
+ },
2743
+ "minItems": 0,
2744
+ "maxItems": 1024
2745
+ },
2746
+ "emphasis": {
2747
+ "type": "array",
2748
+ "items": {
2749
+ "type": "object",
2750
+ "additionalProperties": false,
2751
+ "properties": {
2752
+ "targetId": {
2753
+ "type": "string",
2754
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2755
+ "minLength": 1,
2756
+ "maxLength": 128
2757
+ },
2758
+ "level": {
2759
+ "enum": [
2760
+ "primary",
2761
+ "secondary",
2762
+ "muted"
2763
+ ]
2764
+ }
2765
+ },
2766
+ "required": [
2767
+ "targetId",
2768
+ "level"
2769
+ ]
2770
+ },
2771
+ "minItems": 0,
2772
+ "maxItems": 1024
2773
+ },
2774
+ "laneOrder": {
2775
+ "type": "array",
2776
+ "items": {
2777
+ "type": "string",
2778
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2779
+ "minLength": 1,
2780
+ "maxLength": 128
2781
+ },
2782
+ "minItems": 0,
2783
+ "maxItems": 10000,
2784
+ "uniqueItems": true
2785
+ },
2786
+ "accessibility": {
2787
+ "type": "object",
2788
+ "additionalProperties": false,
2789
+ "properties": {
2790
+ "title": {
2791
+ "type": "string",
2792
+ "minLength": 0,
2793
+ "maxLength": 4096
2794
+ },
2795
+ "description": {
2796
+ "type": "string",
2797
+ "minLength": 0,
2798
+ "maxLength": 4096
2799
+ },
2800
+ "readingOrder": {
2801
+ "type": "array",
2802
+ "items": {
2803
+ "type": "string",
2804
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2805
+ "minLength": 1,
2806
+ "maxLength": 128
2807
+ },
2808
+ "minItems": 0,
2809
+ "maxItems": 10000,
2810
+ "uniqueItems": true
2811
+ }
2812
+ },
2813
+ "required": [
2814
+ "title",
2815
+ "description",
2816
+ "readingOrder"
2817
+ ]
2818
+ },
2819
+ "documentDigest": {
2820
+ "type": "string",
2821
+ "pattern": "^sha256:[a-f0-9]{64}$"
2822
+ }
2823
+ },
2824
+ "required": [
2825
+ "kind",
2826
+ "schemaVersion",
2827
+ "protocolVersion",
2828
+ "diagramId",
2829
+ "title",
2830
+ "summary",
2831
+ "audience",
2832
+ "grammar",
2833
+ "nodes",
2834
+ "relations",
2835
+ "groups",
2836
+ "lanes",
2837
+ "events",
2838
+ "series",
2839
+ "axes",
2840
+ "sets",
2841
+ "annotations",
2842
+ "emphasis",
2843
+ "laneOrder",
2844
+ "accessibility",
2845
+ "documentDigest"
2846
+ ]
2847
+ },
2848
+ "presentation": {
2849
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2850
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-presentation.schema.json",
2851
+ "x-openplanr-contract": {
2852
+ "id": "diagram-presentation",
2853
+ "version": "1.13.0"
2854
+ },
2855
+ "type": "object",
2856
+ "additionalProperties": false,
2857
+ "properties": {
2858
+ "kind": {
2859
+ "const": "diagram-presentation"
2860
+ },
2861
+ "schemaVersion": {
2862
+ "const": "1.0.0"
2863
+ },
2864
+ "protocolVersion": {
2865
+ "const": "1.13.0"
2866
+ },
2867
+ "diagramId": {
2868
+ "type": "string",
2869
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2870
+ "minLength": 1,
2871
+ "maxLength": 128
2872
+ },
2873
+ "semanticDigest": {
2874
+ "type": "string",
2875
+ "pattern": "^sha256:[a-f0-9]{64}$"
2876
+ },
2877
+ "coordinateSystem": {
2878
+ "const": "global-canvas"
2879
+ },
2880
+ "layout": {
2881
+ "type": "object",
2882
+ "additionalProperties": false,
2883
+ "properties": {
2884
+ "direction": {
2885
+ "enum": [
2886
+ "top-down",
2887
+ "left-right",
2888
+ "right-left",
2889
+ "bottom-up"
2890
+ ]
2891
+ },
2892
+ "detailTier": {
2893
+ "enum": [
2894
+ "simplified",
2895
+ "balanced",
2896
+ "faithful"
2897
+ ]
2898
+ }
2899
+ },
2900
+ "required": [
2901
+ "direction",
2902
+ "detailTier"
2903
+ ]
2904
+ },
2905
+ "theme": {
2906
+ "type": "object",
2907
+ "additionalProperties": false,
2908
+ "properties": {
2909
+ "themeId": {
2910
+ "enum": [
2911
+ "paper",
2912
+ "slate",
2913
+ "midnight"
2914
+ ]
2915
+ },
2916
+ "mode": {
2917
+ "enum": [
2918
+ "light",
2919
+ "dark",
2920
+ "auto"
2921
+ ]
2922
+ }
2923
+ },
2924
+ "required": [
2925
+ "themeId",
2926
+ "mode"
2927
+ ]
2928
+ },
2929
+ "elements": {
2930
+ "type": "array",
2931
+ "items": {
2932
+ "type": "object",
2933
+ "additionalProperties": false,
2934
+ "properties": {
2935
+ "elementId": {
2936
+ "type": "string",
2937
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
2938
+ "minLength": 1,
2939
+ "maxLength": 128
2940
+ },
2941
+ "bounds": {
2942
+ "anyOf": [
2943
+ {
2944
+ "type": "null"
2945
+ },
2946
+ {
2947
+ "type": "object",
2948
+ "additionalProperties": false,
2949
+ "properties": {
2950
+ "x": {
2951
+ "type": "number",
2952
+ "minimum": -1000000,
2953
+ "maximum": 1000000
2954
+ },
2955
+ "y": {
2956
+ "type": "number",
2957
+ "minimum": -1000000,
2958
+ "maximum": 1000000
2959
+ },
2960
+ "width": {
2961
+ "type": "number",
2962
+ "minimum": 0.01,
2963
+ "maximum": 1000000
2964
+ },
2965
+ "height": {
2966
+ "type": "number",
2967
+ "minimum": 0.01,
2968
+ "maximum": 1000000
2969
+ }
2970
+ },
2971
+ "required": [
2972
+ "x",
2973
+ "y",
2974
+ "width",
2975
+ "height"
2976
+ ]
2977
+ }
2978
+ ]
2979
+ },
2980
+ "route": {
2981
+ "anyOf": [
2982
+ {
2983
+ "type": "null"
2984
+ },
2985
+ {
2986
+ "type": "object",
2987
+ "additionalProperties": false,
2988
+ "properties": {
2989
+ "mode": {
2990
+ "enum": [
2991
+ "automatic",
2992
+ "manual"
2993
+ ]
2994
+ },
2995
+ "strategy": {
2996
+ "enum": [
2997
+ "straight",
2998
+ "orthogonal"
2999
+ ]
3000
+ },
3001
+ "from": {
3002
+ "type": "object",
3003
+ "additionalProperties": false,
3004
+ "properties": {
3005
+ "side": {
3006
+ "enum": [
3007
+ "top",
3008
+ "right",
3009
+ "bottom",
3010
+ "left"
3011
+ ]
3012
+ },
3013
+ "offset": {
3014
+ "type": "number",
3015
+ "minimum": 0,
3016
+ "maximum": 1
3017
+ }
3018
+ },
3019
+ "required": [
3020
+ "side",
3021
+ "offset"
3022
+ ]
3023
+ },
3024
+ "to": {
3025
+ "type": "object",
3026
+ "additionalProperties": false,
3027
+ "properties": {
3028
+ "side": {
3029
+ "enum": [
3030
+ "top",
3031
+ "right",
3032
+ "bottom",
3033
+ "left"
3034
+ ]
3035
+ },
3036
+ "offset": {
3037
+ "type": "number",
3038
+ "minimum": 0,
3039
+ "maximum": 1
3040
+ }
3041
+ },
3042
+ "required": [
3043
+ "side",
3044
+ "offset"
3045
+ ]
3046
+ },
3047
+ "points": {
3048
+ "type": "array",
3049
+ "items": {
3050
+ "type": "object",
3051
+ "additionalProperties": false,
3052
+ "properties": {
3053
+ "x": {
3054
+ "type": "number",
3055
+ "minimum": -1000000,
3056
+ "maximum": 1000000
3057
+ },
3058
+ "y": {
3059
+ "type": "number",
3060
+ "minimum": -1000000,
3061
+ "maximum": 1000000
3062
+ }
3063
+ },
3064
+ "required": [
3065
+ "x",
3066
+ "y"
3067
+ ]
3068
+ },
3069
+ "minItems": 0,
3070
+ "maxItems": 256
3071
+ }
3072
+ },
3073
+ "required": [
3074
+ "mode",
3075
+ "strategy",
3076
+ "from",
3077
+ "to",
3078
+ "points"
3079
+ ]
3080
+ }
3081
+ ]
3082
+ },
3083
+ "label": {
3084
+ "anyOf": [
3085
+ {
3086
+ "type": "null"
3087
+ },
3088
+ {
3089
+ "type": "object",
3090
+ "additionalProperties": false,
3091
+ "properties": {
3092
+ "x": {
3093
+ "type": "number",
3094
+ "minimum": -1000000,
3095
+ "maximum": 1000000
3096
+ },
3097
+ "y": {
3098
+ "type": "number",
3099
+ "minimum": -1000000,
3100
+ "maximum": 1000000
3101
+ },
3102
+ "width": {
3103
+ "type": "number",
3104
+ "minimum": 0.01,
3105
+ "maximum": 1000000
3106
+ }
3107
+ },
3108
+ "required": [
3109
+ "x",
3110
+ "y",
3111
+ "width"
3112
+ ]
3113
+ }
3114
+ ]
3115
+ },
3116
+ "zIndex": {
3117
+ "type": "integer",
3118
+ "minimum": 0,
3119
+ "maximum": 10000
3120
+ },
3121
+ "appearance": {
3122
+ "type": "object",
3123
+ "additionalProperties": false,
3124
+ "properties": {
3125
+ "shape": {
3126
+ "enum": [
3127
+ "rectangle",
3128
+ "rounded-rectangle",
3129
+ "ellipse",
3130
+ "diamond",
3131
+ "cylinder",
3132
+ "text",
3133
+ "container",
3134
+ "connector"
3135
+ ]
3136
+ },
3137
+ "fill": {
3138
+ "enum": [
3139
+ "surface",
3140
+ "accent",
3141
+ "success",
3142
+ "warning",
3143
+ "danger",
3144
+ "transparent"
3145
+ ]
3146
+ },
3147
+ "stroke": {
3148
+ "enum": [
3149
+ "default",
3150
+ "accent",
3151
+ "muted",
3152
+ "danger",
3153
+ "none"
3154
+ ]
3155
+ },
3156
+ "strokeWidth": {
3157
+ "type": "number",
3158
+ "minimum": 0,
3159
+ "maximum": 16
3160
+ },
3161
+ "strokeStyle": {
3162
+ "enum": [
3163
+ "solid",
3164
+ "dashed",
3165
+ "dotted"
3166
+ ]
3167
+ },
3168
+ "fontSize": {
3169
+ "type": "integer",
3170
+ "minimum": 8,
3171
+ "maximum": 72
3172
+ },
3173
+ "textAlign": {
3174
+ "enum": [
3175
+ "left",
3176
+ "center",
3177
+ "right"
3178
+ ]
3179
+ },
3180
+ "shapeRef": {
3181
+ "type": "object",
3182
+ "additionalProperties": false,
3183
+ "required": [
3184
+ "packId",
3185
+ "packVersion",
3186
+ "shapeId",
3187
+ "definitionDigest"
3188
+ ],
3189
+ "properties": {
3190
+ "packId": {
3191
+ "type": "string",
3192
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
3193
+ "maxLength": 128
3194
+ },
3195
+ "packVersion": {
3196
+ "type": "string",
3197
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
3198
+ "maxLength": 32
3199
+ },
3200
+ "shapeId": {
3201
+ "type": "string",
3202
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
3203
+ "maxLength": 128
3204
+ },
3205
+ "definitionDigest": {
3206
+ "type": "string",
3207
+ "pattern": "^sha256:[a-f0-9]{64}$"
3208
+ }
3209
+ }
3210
+ }
3211
+ },
3212
+ "required": [
3213
+ "shape",
3214
+ "fill",
3215
+ "stroke",
3216
+ "strokeWidth",
3217
+ "strokeStyle",
3218
+ "fontSize",
3219
+ "textAlign"
3220
+ ]
3221
+ },
3222
+ "locks": {
3223
+ "type": "object",
3224
+ "additionalProperties": false,
3225
+ "properties": {
3226
+ "position": {
3227
+ "type": "boolean"
3228
+ },
3229
+ "size": {
3230
+ "type": "boolean"
3231
+ },
3232
+ "route": {
3233
+ "type": "boolean"
3234
+ }
3235
+ },
3236
+ "required": [
3237
+ "position",
3238
+ "size",
3239
+ "route"
3240
+ ]
3241
+ }
3242
+ },
3243
+ "required": [
3244
+ "elementId",
3245
+ "bounds",
3246
+ "route",
3247
+ "label",
3248
+ "zIndex",
3249
+ "appearance",
3250
+ "locks"
3251
+ ]
3252
+ },
3253
+ "minItems": 0,
3254
+ "maxItems": 10000
3255
+ },
3256
+ "presentationDigest": {
3257
+ "type": "string",
3258
+ "pattern": "^sha256:[a-f0-9]{64}$"
3259
+ }
3260
+ },
3261
+ "required": [
3262
+ "kind",
3263
+ "schemaVersion",
3264
+ "protocolVersion",
3265
+ "diagramId",
3266
+ "semanticDigest",
3267
+ "coordinateSystem",
3268
+ "layout",
3269
+ "theme",
3270
+ "elements",
3271
+ "presentationDigest"
3272
+ ]
3273
+ },
3274
+ "originalSource": {
3275
+ "anyOf": [
3276
+ {
3277
+ "type": "null"
3278
+ },
3279
+ {
3280
+ "type": "object",
3281
+ "additionalProperties": false,
3282
+ "properties": {
3283
+ "format": {
3284
+ "const": "mermaid"
3285
+ },
3286
+ "text": {
3287
+ "type": "string",
3288
+ "minLength": 0,
3289
+ "maxLength": 1048576
3290
+ },
3291
+ "sourceDigest": {
3292
+ "type": "string",
3293
+ "pattern": "^sha256:[a-f0-9]{64}$"
3294
+ }
3295
+ },
3296
+ "required": [
3297
+ "format",
3298
+ "text",
3299
+ "sourceDigest"
3300
+ ]
3301
+ }
3302
+ ]
3303
+ },
3304
+ "sourceMap": {
3305
+ "anyOf": [
3306
+ {
3307
+ "type": "null"
3308
+ },
3309
+ {
3310
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3311
+ "$id": "https://openplanr.dev/schemas/v1.13.0/diagram-source-map.schema.json",
3312
+ "x-openplanr-contract": {
3313
+ "id": "diagram-source-map",
3314
+ "version": "1.13.0"
3315
+ },
3316
+ "type": "object",
3317
+ "additionalProperties": false,
3318
+ "properties": {
3319
+ "kind": {
3320
+ "const": "diagram-source-map"
3321
+ },
3322
+ "schemaVersion": {
3323
+ "const": "1.0.0"
3324
+ },
3325
+ "protocolVersion": {
3326
+ "const": "1.13.0"
3327
+ },
3328
+ "diagramId": {
3329
+ "type": "string",
3330
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
3331
+ "minLength": 1,
3332
+ "maxLength": 128
3333
+ },
3334
+ "semanticDigest": {
3335
+ "type": "string",
3336
+ "pattern": "^sha256:[a-f0-9]{64}$"
3337
+ },
3338
+ "sourceDigest": {
3339
+ "type": "string",
3340
+ "pattern": "^sha256:[a-f0-9]{64}$"
3341
+ },
3342
+ "sourceByteLength": {
3343
+ "type": "integer",
3344
+ "minimum": 0,
3345
+ "maximum": 1048576
3346
+ },
3347
+ "encoding": {
3348
+ "const": "utf-8"
3349
+ },
3350
+ "parser": {
3351
+ "type": "object",
3352
+ "additionalProperties": false,
3353
+ "properties": {
3354
+ "id": {
3355
+ "type": "string",
3356
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
3357
+ "maxLength": 64
3358
+ },
3359
+ "version": {
3360
+ "type": "string",
3361
+ "minLength": 1,
3362
+ "maxLength": 64
3363
+ }
3364
+ },
3365
+ "required": [
3366
+ "id",
3367
+ "version"
3368
+ ]
3369
+ },
3370
+ "certificationVersion": {
3371
+ "const": "flowchart-copy-v1"
3372
+ },
3373
+ "entries": {
3374
+ "type": "array",
3375
+ "items": {
3376
+ "type": "object",
3377
+ "additionalProperties": false,
3378
+ "properties": {
3379
+ "sourceId": {
3380
+ "anyOf": [
3381
+ {
3382
+ "type": "null"
3383
+ },
3384
+ {
3385
+ "type": "string",
3386
+ "minLength": 1,
3387
+ "maxLength": 128
3388
+ }
3389
+ ]
3390
+ },
3391
+ "elementIds": {
3392
+ "type": "array",
3393
+ "items": {
3394
+ "type": "string",
3395
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
3396
+ "minLength": 1,
3397
+ "maxLength": 128
3398
+ },
3399
+ "minItems": 0,
3400
+ "maxItems": 10000,
3401
+ "uniqueItems": true
3402
+ },
3403
+ "range": {
3404
+ "anyOf": [
3405
+ {
3406
+ "type": "null"
3407
+ },
3408
+ {
3409
+ "type": "object",
3410
+ "additionalProperties": false,
3411
+ "properties": {
3412
+ "startByte": {
3413
+ "type": "integer",
3414
+ "minimum": 0,
3415
+ "maximum": 1048576
3416
+ },
3417
+ "endByte": {
3418
+ "type": "integer",
3419
+ "minimum": 0,
3420
+ "maximum": 1048576
3421
+ }
3422
+ },
3423
+ "required": [
3424
+ "startByte",
3425
+ "endByte"
3426
+ ]
3427
+ }
3428
+ ]
3429
+ },
3430
+ "construct": {
3431
+ "type": "string",
3432
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
3433
+ "maxLength": 64
3434
+ },
3435
+ "confidence": {
3436
+ "enum": [
3437
+ "exact",
3438
+ "ambiguous"
3439
+ ]
3440
+ },
3441
+ "losses": {
3442
+ "type": "array",
3443
+ "items": {
3444
+ "type": "string",
3445
+ "minLength": 1,
3446
+ "maxLength": 512
3447
+ },
3448
+ "minItems": 0,
3449
+ "maxItems": 64
3450
+ }
3451
+ },
3452
+ "required": [
3453
+ "sourceId",
3454
+ "elementIds",
3455
+ "range",
3456
+ "construct",
3457
+ "confidence",
3458
+ "losses"
3459
+ ]
3460
+ },
3461
+ "minItems": 0,
3462
+ "maxItems": 10000
3463
+ }
3464
+ },
3465
+ "required": [
3466
+ "kind",
3467
+ "schemaVersion",
3468
+ "protocolVersion",
3469
+ "diagramId",
3470
+ "semanticDigest",
3471
+ "sourceDigest",
3472
+ "sourceByteLength",
3473
+ "encoding",
3474
+ "parser",
3475
+ "certificationVersion",
3476
+ "entries"
3477
+ ]
3478
+ }
3479
+ ]
3480
+ },
3481
+ "bundleDigest": {
3482
+ "type": "string",
3483
+ "pattern": "^sha256:[a-f0-9]{64}$"
3484
+ },
3485
+ "studioPresentation": {
3486
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3487
+ "$id": "https://openplanr.dev/schemas/v1.17.0/diagram-presentation.schema.json",
3488
+ "x-openplanr-contract": {
3489
+ "id": "diagram-presentation",
3490
+ "version": "1.17.0"
3491
+ },
3492
+ "type": "object",
3493
+ "additionalProperties": false,
3494
+ "required": [
3495
+ "kind",
3496
+ "schemaVersion",
3497
+ "palette",
3498
+ "theme",
3499
+ "fontFamily"
3500
+ ],
3501
+ "properties": {
3502
+ "kind": {
3503
+ "const": "openplanr-diagram-presentation"
3504
+ },
3505
+ "schemaVersion": {
3506
+ "const": "2.0.0"
3507
+ },
3508
+ "palette": {
3509
+ "const": "openplanr-brand-v2"
3510
+ },
3511
+ "theme": {
3512
+ "enum": [
3513
+ "light",
3514
+ "dark"
3515
+ ]
3516
+ },
3517
+ "fontFamily": {
3518
+ "const": "Inter"
3519
+ }
3520
+ }
3521
+ },
3522
+ "shapeLibrary": {
3523
+ "type": "array",
3524
+ "maxItems": 512,
3525
+ "items": {
3526
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3527
+ "$id": "https://openplanr.dev/schemas/v1.21.0/diagram-shape-definition.schema.json",
3528
+ "x-openplanr-contract": {
3529
+ "id": "diagram-shape-definition",
3530
+ "version": "1.21.0"
3531
+ },
3532
+ "type": "object",
3533
+ "additionalProperties": false,
3534
+ "required": [
3535
+ "packId",
3536
+ "packVersion",
3537
+ "shapeId",
3538
+ "definitionDigest",
3539
+ "name",
3540
+ "description",
3541
+ "tags",
3542
+ "primitives",
3543
+ "attachment",
3544
+ "textRegion",
3545
+ "sizing"
3546
+ ],
3547
+ "properties": {
3548
+ "packId": {
3549
+ "type": "string",
3550
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
3551
+ "maxLength": 128
3552
+ },
3553
+ "packVersion": {
3554
+ "type": "string",
3555
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$",
3556
+ "maxLength": 32
3557
+ },
3558
+ "shapeId": {
3559
+ "type": "string",
3560
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
3561
+ "maxLength": 128
3562
+ },
3563
+ "definitionDigest": {
3564
+ "type": "string",
3565
+ "pattern": "^sha256:[a-f0-9]{64}$"
3566
+ },
3567
+ "name": {
3568
+ "type": "string",
3569
+ "minLength": 1,
3570
+ "maxLength": 128
3571
+ },
3572
+ "description": {
3573
+ "type": "string",
3574
+ "maxLength": 1024
3575
+ },
3576
+ "tags": {
3577
+ "type": "array",
3578
+ "maxItems": 16,
3579
+ "uniqueItems": true,
3580
+ "items": {
3581
+ "type": "string",
3582
+ "minLength": 1,
3583
+ "maxLength": 64
3584
+ }
3585
+ },
3586
+ "primitives": {
3587
+ "type": "array",
3588
+ "minItems": 1,
3589
+ "maxItems": 32,
3590
+ "items": {
3591
+ "oneOf": [
3592
+ {
3593
+ "type": "object",
3594
+ "additionalProperties": false,
3595
+ "required": [
3596
+ "type",
3597
+ "x",
3598
+ "y",
3599
+ "width",
3600
+ "height",
3601
+ "radius",
3602
+ "fill",
3603
+ "stroke"
3604
+ ],
3605
+ "properties": {
3606
+ "type": {
3607
+ "const": "rect"
3608
+ },
3609
+ "x": {
3610
+ "type": "number",
3611
+ "minimum": 0,
3612
+ "maximum": 1
3613
+ },
3614
+ "y": {
3615
+ "type": "number",
3616
+ "minimum": 0,
3617
+ "maximum": 1
3618
+ },
3619
+ "width": {
3620
+ "type": "number",
3621
+ "exclusiveMinimum": 0,
3622
+ "maximum": 1
3623
+ },
3624
+ "height": {
3625
+ "type": "number",
3626
+ "exclusiveMinimum": 0,
3627
+ "maximum": 1
3628
+ },
3629
+ "radius": {
3630
+ "type": "number",
3631
+ "minimum": 0,
3632
+ "maximum": 1
3633
+ },
3634
+ "fill": {
3635
+ "enum": [
3636
+ "fill",
3637
+ "none"
3638
+ ]
3639
+ },
3640
+ "stroke": {
3641
+ "enum": [
3642
+ "stroke",
3643
+ "none"
3644
+ ]
3645
+ }
3646
+ }
3647
+ },
3648
+ {
3649
+ "type": "object",
3650
+ "additionalProperties": false,
3651
+ "required": [
3652
+ "type",
3653
+ "cx",
3654
+ "cy",
3655
+ "rx",
3656
+ "ry",
3657
+ "fill",
3658
+ "stroke"
3659
+ ],
3660
+ "properties": {
3661
+ "type": {
3662
+ "const": "ellipse"
3663
+ },
3664
+ "cx": {
3665
+ "type": "number",
3666
+ "minimum": 0,
3667
+ "maximum": 1
3668
+ },
3669
+ "cy": {
3670
+ "type": "number",
3671
+ "minimum": 0,
3672
+ "maximum": 1
3673
+ },
3674
+ "rx": {
3675
+ "type": "number",
3676
+ "exclusiveMinimum": 0,
3677
+ "maximum": 1
3678
+ },
3679
+ "ry": {
3680
+ "type": "number",
3681
+ "exclusiveMinimum": 0,
3682
+ "maximum": 1
3683
+ },
3684
+ "fill": {
3685
+ "enum": [
3686
+ "fill",
3687
+ "none"
3688
+ ]
3689
+ },
3690
+ "stroke": {
3691
+ "enum": [
3692
+ "stroke",
3693
+ "none"
3694
+ ]
3695
+ }
3696
+ }
3697
+ },
3698
+ {
3699
+ "type": "object",
3700
+ "additionalProperties": false,
3701
+ "required": [
3702
+ "type",
3703
+ "points",
3704
+ "fill",
3705
+ "stroke"
3706
+ ],
3707
+ "properties": {
3708
+ "type": {
3709
+ "const": "polygon"
3710
+ },
3711
+ "points": {
3712
+ "type": "array",
3713
+ "minItems": 3,
3714
+ "maxItems": 32,
3715
+ "items": {
3716
+ "type": "object",
3717
+ "additionalProperties": false,
3718
+ "required": [
3719
+ "x",
3720
+ "y"
3721
+ ],
3722
+ "properties": {
3723
+ "x": {
3724
+ "type": "number",
3725
+ "minimum": 0,
3726
+ "maximum": 1
3727
+ },
3728
+ "y": {
3729
+ "type": "number",
3730
+ "minimum": 0,
3731
+ "maximum": 1
3732
+ }
3733
+ }
3734
+ }
3735
+ },
3736
+ "fill": {
3737
+ "enum": [
3738
+ "fill",
3739
+ "none"
3740
+ ]
3741
+ },
3742
+ "stroke": {
3743
+ "enum": [
3744
+ "stroke",
3745
+ "none"
3746
+ ]
3747
+ }
3748
+ }
3749
+ },
3750
+ {
3751
+ "type": "object",
3752
+ "additionalProperties": false,
3753
+ "required": [
3754
+ "type",
3755
+ "x1",
3756
+ "y1",
3757
+ "x2",
3758
+ "y2",
3759
+ "stroke"
3760
+ ],
3761
+ "properties": {
3762
+ "type": {
3763
+ "const": "line"
3764
+ },
3765
+ "x1": {
3766
+ "type": "number",
3767
+ "minimum": 0,
3768
+ "maximum": 1
3769
+ },
3770
+ "y1": {
3771
+ "type": "number",
3772
+ "minimum": 0,
3773
+ "maximum": 1
3774
+ },
3775
+ "x2": {
3776
+ "type": "number",
3777
+ "minimum": 0,
3778
+ "maximum": 1
3779
+ },
3780
+ "y2": {
3781
+ "type": "number",
3782
+ "minimum": 0,
3783
+ "maximum": 1
3784
+ },
3785
+ "stroke": {
3786
+ "enum": [
3787
+ "stroke",
3788
+ "none"
3789
+ ]
3790
+ }
3791
+ }
3792
+ }
3793
+ ]
3794
+ }
3795
+ },
3796
+ "attachment": {
3797
+ "oneOf": [
3798
+ {
3799
+ "type": "object",
3800
+ "additionalProperties": false,
3801
+ "required": [
3802
+ "type",
3803
+ "x",
3804
+ "y",
3805
+ "width",
3806
+ "height",
3807
+ "radius"
3808
+ ],
3809
+ "properties": {
3810
+ "type": {
3811
+ "const": "rect"
3812
+ },
3813
+ "x": {
3814
+ "type": "number",
3815
+ "minimum": 0,
3816
+ "maximum": 1
3817
+ },
3818
+ "y": {
3819
+ "type": "number",
3820
+ "minimum": 0,
3821
+ "maximum": 1
3822
+ },
3823
+ "width": {
3824
+ "type": "number",
3825
+ "exclusiveMinimum": 0,
3826
+ "maximum": 1
3827
+ },
3828
+ "height": {
3829
+ "type": "number",
3830
+ "exclusiveMinimum": 0,
3831
+ "maximum": 1
3832
+ },
3833
+ "radius": {
3834
+ "type": "number",
3835
+ "minimum": 0,
3836
+ "maximum": 1
3837
+ }
3838
+ }
3839
+ },
3840
+ {
3841
+ "type": "object",
3842
+ "additionalProperties": false,
3843
+ "required": [
3844
+ "type",
3845
+ "cx",
3846
+ "cy",
3847
+ "rx",
3848
+ "ry"
3849
+ ],
3850
+ "properties": {
3851
+ "type": {
3852
+ "const": "ellipse"
3853
+ },
3854
+ "cx": {
3855
+ "type": "number",
3856
+ "minimum": 0,
3857
+ "maximum": 1
3858
+ },
3859
+ "cy": {
3860
+ "type": "number",
3861
+ "minimum": 0,
3862
+ "maximum": 1
3863
+ },
3864
+ "rx": {
3865
+ "type": "number",
3866
+ "exclusiveMinimum": 0,
3867
+ "maximum": 1
3868
+ },
3869
+ "ry": {
3870
+ "type": "number",
3871
+ "exclusiveMinimum": 0,
3872
+ "maximum": 1
3873
+ }
3874
+ }
3875
+ },
3876
+ {
3877
+ "type": "object",
3878
+ "additionalProperties": false,
3879
+ "required": [
3880
+ "type",
3881
+ "points"
3882
+ ],
3883
+ "properties": {
3884
+ "type": {
3885
+ "const": "polygon"
3886
+ },
3887
+ "points": {
3888
+ "type": "array",
3889
+ "minItems": 3,
3890
+ "maxItems": 32,
3891
+ "items": {
3892
+ "type": "object",
3893
+ "additionalProperties": false,
3894
+ "required": [
3895
+ "x",
3896
+ "y"
3897
+ ],
3898
+ "properties": {
3899
+ "x": {
3900
+ "type": "number",
3901
+ "minimum": 0,
3902
+ "maximum": 1
3903
+ },
3904
+ "y": {
3905
+ "type": "number",
3906
+ "minimum": 0,
3907
+ "maximum": 1
3908
+ }
3909
+ }
3910
+ }
3911
+ }
3912
+ }
3913
+ }
3914
+ ]
3915
+ },
3916
+ "textRegion": {
3917
+ "type": "object",
3918
+ "additionalProperties": false,
3919
+ "required": [
3920
+ "x",
3921
+ "y",
3922
+ "width",
3923
+ "height"
3924
+ ],
3925
+ "properties": {
3926
+ "x": {
3927
+ "type": "number",
3928
+ "minimum": 0,
3929
+ "maximum": 1
3930
+ },
3931
+ "y": {
3932
+ "type": "number",
3933
+ "minimum": 0,
3934
+ "maximum": 1
3935
+ },
3936
+ "width": {
3937
+ "type": "number",
3938
+ "exclusiveMinimum": 0,
3939
+ "maximum": 1
3940
+ },
3941
+ "height": {
3942
+ "type": "number",
3943
+ "exclusiveMinimum": 0,
3944
+ "maximum": 1
3945
+ }
3946
+ }
3947
+ },
3948
+ "sizing": {
3949
+ "type": "object",
3950
+ "additionalProperties": false,
3951
+ "required": [
3952
+ "width",
3953
+ "height",
3954
+ "minWidth",
3955
+ "minHeight"
3956
+ ],
3957
+ "properties": {
3958
+ "width": {
3959
+ "type": "number",
3960
+ "minimum": 1,
3961
+ "maximum": 10000
3962
+ },
3963
+ "height": {
3964
+ "type": "number",
3965
+ "minimum": 1,
3966
+ "maximum": 10000
3967
+ },
3968
+ "minWidth": {
3969
+ "type": "number",
3970
+ "minimum": 1,
3971
+ "maximum": 10000
3972
+ },
3973
+ "minHeight": {
3974
+ "type": "number",
3975
+ "minimum": 1,
3976
+ "maximum": 10000
3977
+ }
3978
+ }
3979
+ }
3980
+ }
3981
+ }
3982
+ }
3983
+ },
3984
+ "required": [
3985
+ "kind",
3986
+ "schemaVersion",
3987
+ "protocolVersion",
3988
+ "diagramId",
3989
+ "document",
3990
+ "presentation",
3991
+ "originalSource",
3992
+ "sourceMap",
3993
+ "bundleDigest",
3994
+ "shapeLibrary"
3995
+ ]
3996
+ }
3997
+ ]
3998
+ },
3999
+ "presentation": {
4000
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4001
+ "$id": "https://openplanr.dev/schemas/v1.17.0/diagram-presentation.schema.json",
4002
+ "x-openplanr-contract": {
4003
+ "id": "diagram-presentation",
4004
+ "version": "1.17.0"
4005
+ },
4006
+ "type": "object",
4007
+ "additionalProperties": false,
4008
+ "required": [
4009
+ "kind",
4010
+ "schemaVersion",
4011
+ "palette",
4012
+ "theme",
4013
+ "fontFamily"
4014
+ ],
4015
+ "properties": {
4016
+ "kind": {
4017
+ "const": "openplanr-diagram-presentation"
4018
+ },
4019
+ "schemaVersion": {
4020
+ "const": "2.0.0"
4021
+ },
4022
+ "palette": {
4023
+ "const": "openplanr-brand-v2"
4024
+ },
4025
+ "theme": {
4026
+ "enum": [
4027
+ "light",
4028
+ "dark"
4029
+ ]
4030
+ },
4031
+ "fontFamily": {
4032
+ "const": "Inter"
4033
+ }
4034
+ }
4035
+ }
4036
+ },
4037
+ "required": [
4038
+ "kind",
4039
+ "schemaVersion",
4040
+ "diagramId",
4041
+ "title",
4042
+ "source",
4043
+ "rendering",
4044
+ "scene"
4045
+ ],
4046
+ "additionalProperties": false
4047
+ }