@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,692 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openplanr.dev/schemas/v1.20.0/design-review-bundle.schema.json",
4
+ "x-openplanr-contract": {
5
+ "id": "design-review-bundle",
6
+ "version": "1.20.0"
7
+ },
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "kind": {
12
+ "const": "openplanr-design-review-bundle"
13
+ },
14
+ "schemaVersion": {
15
+ "enum": [
16
+ "1.1.0",
17
+ "1.2.0"
18
+ ]
19
+ },
20
+ "design": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "id": {
25
+ "$ref": "#/$defs/id"
26
+ },
27
+ "title": {
28
+ "$ref": "#/$defs/text"
29
+ },
30
+ "frames": {
31
+ "type": "array",
32
+ "minItems": 1,
33
+ "items": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": [
37
+ "id",
38
+ "label",
39
+ "width",
40
+ "height"
41
+ ],
42
+ "properties": {
43
+ "id": {
44
+ "$ref": "#/$defs/id"
45
+ },
46
+ "label": {
47
+ "$ref": "#/$defs/text"
48
+ },
49
+ "width": {
50
+ "type": "integer",
51
+ "minimum": 1,
52
+ "maximum": 16384
53
+ },
54
+ "height": {
55
+ "anyOf": [
56
+ {
57
+ "type": "integer",
58
+ "minimum": 1,
59
+ "maximum": 16384
60
+ },
61
+ {
62
+ "const": "auto"
63
+ }
64
+ ]
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "screens": {
70
+ "type": "array",
71
+ "minItems": 1,
72
+ "items": {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "required": [
76
+ "id",
77
+ "title"
78
+ ],
79
+ "properties": {
80
+ "id": {
81
+ "$ref": "#/$defs/id"
82
+ },
83
+ "title": {
84
+ "$ref": "#/$defs/text"
85
+ },
86
+ "description": {
87
+ "$ref": "#/$defs/text"
88
+ },
89
+ "anchors": {
90
+ "$ref": "#/$defs/ids"
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "screenOrder": {
96
+ "type": "array",
97
+ "minItems": 1,
98
+ "items": {
99
+ "$ref": "#/$defs/id"
100
+ },
101
+ "uniqueItems": true
102
+ },
103
+ "flows": {
104
+ "type": "array",
105
+ "items": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": [
109
+ "id",
110
+ "title",
111
+ "screens"
112
+ ],
113
+ "properties": {
114
+ "id": {
115
+ "$ref": "#/$defs/id"
116
+ },
117
+ "title": {
118
+ "$ref": "#/$defs/text"
119
+ },
120
+ "screens": {
121
+ "type": "array",
122
+ "minItems": 1,
123
+ "items": {
124
+ "$ref": "#/$defs/id"
125
+ }
126
+ }
127
+ }
128
+ }
129
+ },
130
+ "variants": {
131
+ "type": "array",
132
+ "minItems": 1,
133
+ "items": {
134
+ "type": "object",
135
+ "additionalProperties": false,
136
+ "required": [
137
+ "id",
138
+ "label",
139
+ "status"
140
+ ],
141
+ "properties": {
142
+ "id": {
143
+ "$ref": "#/$defs/id"
144
+ },
145
+ "label": {
146
+ "$ref": "#/$defs/text"
147
+ },
148
+ "description": {
149
+ "$ref": "#/$defs/text"
150
+ },
151
+ "status": {
152
+ "enum": [
153
+ "ready",
154
+ "failed"
155
+ ]
156
+ },
157
+ "issue": {
158
+ "$ref": "#/$defs/text"
159
+ }
160
+ },
161
+ "if": {
162
+ "properties": {
163
+ "status": {
164
+ "const": "failed"
165
+ }
166
+ }
167
+ },
168
+ "then": {
169
+ "required": [
170
+ "issue"
171
+ ]
172
+ }
173
+ }
174
+ },
175
+ "selectedVariant": {
176
+ "$ref": "#/$defs/id"
177
+ },
178
+ "defaultView": {
179
+ "enum": [
180
+ "canvas",
181
+ "prototype",
182
+ "walkthrough"
183
+ ]
184
+ },
185
+ "layout": {
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "properties": {
189
+ "boards": {
190
+ "type": "object",
191
+ "description": "Keys are screenId, screenId/frameId or screenId/frameId/variantId; each ID must exist in the document.",
192
+ "additionalProperties": {
193
+ "type": "object",
194
+ "additionalProperties": false,
195
+ "required": [
196
+ "x",
197
+ "y"
198
+ ],
199
+ "properties": {
200
+ "x": {
201
+ "$ref": "#/$defs/coordinate"
202
+ },
203
+ "y": {
204
+ "$ref": "#/$defs/coordinate"
205
+ },
206
+ "title": {
207
+ "$ref": "#/$defs/text"
208
+ }
209
+ }
210
+ }
211
+ },
212
+ "sections": {
213
+ "type": "array",
214
+ "items": {
215
+ "type": "object",
216
+ "additionalProperties": false,
217
+ "required": [
218
+ "id",
219
+ "x",
220
+ "y",
221
+ "text"
222
+ ],
223
+ "properties": {
224
+ "id": {
225
+ "$ref": "#/$defs/id"
226
+ },
227
+ "x": {
228
+ "$ref": "#/$defs/coordinate"
229
+ },
230
+ "y": {
231
+ "$ref": "#/$defs/coordinate"
232
+ },
233
+ "text": {
234
+ "$ref": "#/$defs/text"
235
+ },
236
+ "maxW": {
237
+ "type": "integer",
238
+ "minimum": 1,
239
+ "maximum": 16384
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ },
247
+ "required": [
248
+ "id",
249
+ "title",
250
+ "frames",
251
+ "screens",
252
+ "screenOrder",
253
+ "variants",
254
+ "selectedVariant",
255
+ "defaultView"
256
+ ]
257
+ },
258
+ "envelope": {
259
+ "type": "object",
260
+ "required": [
261
+ "schemaVersion",
262
+ "artifacts",
263
+ "viewer"
264
+ ]
265
+ },
266
+ "entries": {
267
+ "type": "array",
268
+ "minItems": 1,
269
+ "maxItems": 4096,
270
+ "items": {
271
+ "type": "object",
272
+ "additionalProperties": false,
273
+ "required": [
274
+ "artifactId",
275
+ "screenId",
276
+ "variantId",
277
+ "frameId"
278
+ ],
279
+ "properties": {
280
+ "artifactId": {
281
+ "type": "string",
282
+ "minLength": 1,
283
+ "maxLength": 128
284
+ },
285
+ "screenId": {
286
+ "type": "string",
287
+ "minLength": 1,
288
+ "maxLength": 128
289
+ },
290
+ "variantId": {
291
+ "type": "string",
292
+ "minLength": 1,
293
+ "maxLength": 128
294
+ },
295
+ "frameId": {
296
+ "type": "string",
297
+ "minLength": 1,
298
+ "maxLength": 128
299
+ },
300
+ "height": {
301
+ "const": "auto"
302
+ }
303
+ }
304
+ }
305
+ },
306
+ "state": {
307
+ "type": [
308
+ "object",
309
+ "null"
310
+ ],
311
+ "additionalProperties": false,
312
+ "properties": {
313
+ "positions": {
314
+ "type": "object",
315
+ "additionalProperties": {
316
+ "type": "object",
317
+ "additionalProperties": false,
318
+ "required": [
319
+ "x",
320
+ "y"
321
+ ],
322
+ "properties": {
323
+ "x": {
324
+ "type": "number",
325
+ "minimum": -10000000,
326
+ "maximum": 10000000
327
+ },
328
+ "y": {
329
+ "type": "number",
330
+ "minimum": -10000000,
331
+ "maximum": 10000000
332
+ }
333
+ }
334
+ }
335
+ }
336
+ }
337
+ },
338
+ "revision": {
339
+ "type": "string",
340
+ "minLength": 1,
341
+ "maxLength": 128
342
+ },
343
+ "verification": {
344
+ "type": [
345
+ "object",
346
+ "null"
347
+ ],
348
+ "additionalProperties": false,
349
+ "properties": {
350
+ "status": {
351
+ "enum": [
352
+ "verified",
353
+ "unverified",
354
+ "failed",
355
+ "pending"
356
+ ]
357
+ }
358
+ }
359
+ },
360
+ "reviewContext": {
361
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
362
+ "$id": "https://openplanr.dev/schemas/v1.10.0/design-review-context.schema.json",
363
+ "x-openplanr-contract": {
364
+ "id": "design-review-context",
365
+ "version": "1.10.0"
366
+ },
367
+ "type": "object",
368
+ "additionalProperties": false,
369
+ "properties": {
370
+ "kind": {
371
+ "const": "openplanr-design-review-context"
372
+ },
373
+ "schemaVersion": {
374
+ "const": "1.0.0"
375
+ },
376
+ "designId": {
377
+ "type": "string",
378
+ "minLength": 1,
379
+ "maxLength": 128
380
+ },
381
+ "brief": {
382
+ "type": "object",
383
+ "additionalProperties": false,
384
+ "properties": {
385
+ "purpose": {
386
+ "type": "string",
387
+ "maxLength": 16384
388
+ },
389
+ "requests": {
390
+ "type": "array",
391
+ "maxItems": 3,
392
+ "items": {
393
+ "type": "string",
394
+ "maxLength": 16384
395
+ }
396
+ },
397
+ "audience": {
398
+ "type": "string",
399
+ "maxLength": 16384
400
+ }
401
+ },
402
+ "required": [
403
+ "purpose",
404
+ "requests"
405
+ ]
406
+ },
407
+ "revisionSummary": {
408
+ "type": "string",
409
+ "maxLength": 16384
410
+ },
411
+ "implementation": {
412
+ "type": "object",
413
+ "additionalProperties": false,
414
+ "properties": {
415
+ "tokens": {
416
+ "type": "array",
417
+ "maxItems": 512,
418
+ "items": {
419
+ "type": "object",
420
+ "additionalProperties": false,
421
+ "properties": {
422
+ "name": {
423
+ "type": "string",
424
+ "minLength": 1,
425
+ "maxLength": 128
426
+ },
427
+ "value": {
428
+ "type": "string",
429
+ "maxLength": 16384
430
+ },
431
+ "description": {
432
+ "type": "string",
433
+ "maxLength": 16384
434
+ }
435
+ },
436
+ "required": [
437
+ "name",
438
+ "value"
439
+ ]
440
+ }
441
+ },
442
+ "components": {
443
+ "type": "array",
444
+ "maxItems": 256,
445
+ "items": {
446
+ "type": "object",
447
+ "additionalProperties": false,
448
+ "properties": {
449
+ "id": {
450
+ "type": "string",
451
+ "minLength": 1,
452
+ "maxLength": 128
453
+ },
454
+ "name": {
455
+ "type": "string",
456
+ "maxLength": 16384
457
+ },
458
+ "screenIds": {
459
+ "type": "array",
460
+ "maxItems": 256,
461
+ "items": {
462
+ "type": "string",
463
+ "minLength": 1,
464
+ "maxLength": 128
465
+ }
466
+ },
467
+ "anchorIds": {
468
+ "type": "array",
469
+ "maxItems": 256,
470
+ "items": {
471
+ "type": "string",
472
+ "minLength": 1,
473
+ "maxLength": 128
474
+ }
475
+ },
476
+ "states": {
477
+ "type": "array",
478
+ "maxItems": 256,
479
+ "items": {
480
+ "type": "object",
481
+ "additionalProperties": false,
482
+ "properties": {
483
+ "name": {
484
+ "type": "string",
485
+ "minLength": 1,
486
+ "maxLength": 128
487
+ },
488
+ "description": {
489
+ "type": "string",
490
+ "maxLength": 16384
491
+ }
492
+ },
493
+ "required": [
494
+ "name",
495
+ "description"
496
+ ]
497
+ }
498
+ },
499
+ "notes": {
500
+ "type": "string",
501
+ "maxLength": 16384
502
+ },
503
+ "responsive": {
504
+ "type": "string",
505
+ "maxLength": 16384
506
+ },
507
+ "accessibility": {
508
+ "type": "string",
509
+ "maxLength": 16384
510
+ }
511
+ },
512
+ "required": [
513
+ "id",
514
+ "name"
515
+ ]
516
+ }
517
+ },
518
+ "responsive": {
519
+ "type": "array",
520
+ "maxItems": 256,
521
+ "items": {
522
+ "type": "string",
523
+ "maxLength": 16384
524
+ }
525
+ },
526
+ "accessibility": {
527
+ "type": "array",
528
+ "maxItems": 256,
529
+ "items": {
530
+ "type": "string",
531
+ "maxLength": 16384
532
+ }
533
+ }
534
+ },
535
+ "required": [
536
+ "tokens",
537
+ "components",
538
+ "responsive",
539
+ "accessibility"
540
+ ]
541
+ }
542
+ },
543
+ "required": [
544
+ "kind",
545
+ "schemaVersion",
546
+ "designId",
547
+ "brief",
548
+ "implementation"
549
+ ]
550
+ },
551
+ "contextDigest": {
552
+ "type": "string",
553
+ "pattern": "^[a-f0-9]{64}$"
554
+ },
555
+ "fingerprints": {
556
+ "type": "array",
557
+ "maxItems": 4096,
558
+ "items": {
559
+ "type": "object",
560
+ "additionalProperties": false,
561
+ "properties": {
562
+ "screenId": {
563
+ "type": "string",
564
+ "minLength": 1,
565
+ "maxLength": 128
566
+ },
567
+ "variantId": {
568
+ "type": "string",
569
+ "minLength": 1,
570
+ "maxLength": 128
571
+ },
572
+ "frameId": {
573
+ "type": "string",
574
+ "minLength": 1,
575
+ "maxLength": 128
576
+ },
577
+ "contentDigest": {
578
+ "type": "string",
579
+ "pattern": "^[a-f0-9]{64}$"
580
+ },
581
+ "guidanceDigest": {
582
+ "type": "string",
583
+ "pattern": "^[a-f0-9]{64}$"
584
+ }
585
+ },
586
+ "required": [
587
+ "screenId",
588
+ "variantId",
589
+ "frameId",
590
+ "contentDigest",
591
+ "guidanceDigest"
592
+ ]
593
+ }
594
+ }
595
+ },
596
+ "required": [
597
+ "kind",
598
+ "schemaVersion",
599
+ "design",
600
+ "envelope",
601
+ "entries",
602
+ "revision",
603
+ "reviewContext",
604
+ "contextDigest",
605
+ "fingerprints"
606
+ ],
607
+ "$defs": {
608
+ "id": {
609
+ "type": "string",
610
+ "minLength": 1,
611
+ "maxLength": 128,
612
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]*$"
613
+ },
614
+ "text": {
615
+ "type": "string",
616
+ "minLength": 1,
617
+ "pattern": "\\S"
618
+ },
619
+ "ids": {
620
+ "type": "array",
621
+ "items": {
622
+ "$ref": "#/$defs/id"
623
+ },
624
+ "uniqueItems": true
625
+ },
626
+ "localPath": {
627
+ "type": "string",
628
+ "minLength": 1,
629
+ "description": "Path relative to the authored document directory. No URL, traversal, encoded path, query or fragment.",
630
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)(?!.*[/ ]$)[^\\\\:\\u0000-\\u001F%?#]+$"
631
+ },
632
+ "paths": {
633
+ "type": "array",
634
+ "items": {
635
+ "$ref": "#/$defs/localPath"
636
+ },
637
+ "uniqueItems": true
638
+ },
639
+ "source": {
640
+ "type": "object",
641
+ "additionalProperties": false,
642
+ "required": [
643
+ "html"
644
+ ],
645
+ "properties": {
646
+ "html": {
647
+ "$ref": "#/$defs/localPath"
648
+ },
649
+ "styles": {
650
+ "$ref": "#/$defs/paths"
651
+ },
652
+ "scripts": {
653
+ "$ref": "#/$defs/paths"
654
+ }
655
+ }
656
+ },
657
+ "coordinate": {
658
+ "type": "number",
659
+ "minimum": -10000000,
660
+ "maximum": 10000000
661
+ }
662
+ },
663
+ "allOf": [
664
+ {
665
+ "if": {
666
+ "properties": {
667
+ "schemaVersion": {
668
+ "const": "1.2.0"
669
+ }
670
+ }
671
+ },
672
+ "then": {
673
+ "properties": {
674
+ "envelope": {
675
+ "type": "object",
676
+ "required": [
677
+ "schemaVersion",
678
+ "sources",
679
+ "artifacts",
680
+ "viewer"
681
+ ],
682
+ "properties": {
683
+ "schemaVersion": {
684
+ "const": "1.1.0"
685
+ }
686
+ }
687
+ }
688
+ }
689
+ }
690
+ }
691
+ ]
692
+ }