@atlaskit/adf-schema 36.12.0 → 36.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/next-schema/full-schema.adf.js +1 -1
  3. package/dist/cjs/next-schema/nodes/blockCard.js +5 -5
  4. package/dist/cjs/next-schema/nodes/bodiedExtension.js +2 -2
  5. package/dist/cjs/next-schema/nodes/codeBlock.js +2 -1
  6. package/dist/cjs/next-schema/nodes/extension.js +2 -2
  7. package/dist/cjs/next-schema/nodes/inlineCard.js +0 -2
  8. package/dist/cjs/next-schema/nodes/inlineExtension.js +2 -2
  9. package/dist/cjs/next-schema/nodes/list.js +2 -1
  10. package/dist/cjs/next-schema/nodes/media.js +11 -11
  11. package/dist/cjs/next-schema/nodes/mediaInline.js +2 -1
  12. package/dist/cjs/next-schema/nodes/mediaSingle.js +8 -9
  13. package/dist/cjs/next-schema/nodes/table.js +3 -1
  14. package/dist/cjs/next-schema/nodes/tableRow.js +1 -1
  15. package/dist/es2019/next-schema/full-schema.adf.js +2 -2
  16. package/dist/es2019/next-schema/nodes/blockCard.js +5 -5
  17. package/dist/es2019/next-schema/nodes/bodiedExtension.js +2 -2
  18. package/dist/es2019/next-schema/nodes/codeBlock.js +2 -1
  19. package/dist/es2019/next-schema/nodes/extension.js +2 -2
  20. package/dist/es2019/next-schema/nodes/inlineCard.js +0 -2
  21. package/dist/es2019/next-schema/nodes/inlineExtension.js +2 -2
  22. package/dist/es2019/next-schema/nodes/list.js +2 -1
  23. package/dist/es2019/next-schema/nodes/media.js +11 -11
  24. package/dist/es2019/next-schema/nodes/mediaInline.js +2 -1
  25. package/dist/es2019/next-schema/nodes/mediaSingle.js +8 -9
  26. package/dist/es2019/next-schema/nodes/table.js +3 -1
  27. package/dist/es2019/next-schema/nodes/tableRow.js +2 -2
  28. package/dist/esm/next-schema/full-schema.adf.js +2 -2
  29. package/dist/esm/next-schema/nodes/blockCard.js +5 -5
  30. package/dist/esm/next-schema/nodes/bodiedExtension.js +2 -2
  31. package/dist/esm/next-schema/nodes/codeBlock.js +2 -1
  32. package/dist/esm/next-schema/nodes/extension.js +2 -2
  33. package/dist/esm/next-schema/nodes/inlineCard.js +0 -2
  34. package/dist/esm/next-schema/nodes/inlineExtension.js +2 -2
  35. package/dist/esm/next-schema/nodes/list.js +2 -1
  36. package/dist/esm/next-schema/nodes/media.js +11 -11
  37. package/dist/esm/next-schema/nodes/mediaInline.js +2 -1
  38. package/dist/esm/next-schema/nodes/mediaSingle.js +8 -9
  39. package/dist/esm/next-schema/nodes/table.js +3 -1
  40. package/dist/esm/next-schema/nodes/tableRow.js +2 -2
  41. package/package.json +3 -2
  42. package/schema-generators/__tests__/unit/jqueries.md +13 -0
  43. package/schema-generators/__tests__/unit/json-full-schema.unit.ts +103 -0
@@ -23,6 +23,7 @@ const jsonWithTypes = {
23
23
  minLength: 1,
24
24
  },
25
25
  },
26
+ required: ['type', 'text'],
26
27
  },
27
28
  breakout_mark: {
28
29
  type: 'object',
@@ -37,8 +38,10 @@ const jsonWithTypes = {
37
38
  enum: ['wide', 'full-width'],
38
39
  },
39
40
  },
41
+ required: ['mode'],
40
42
  },
41
43
  },
44
+ required: ['type', 'attrs'],
42
45
  },
43
46
  codeBlock_node: {
44
47
  type: 'object',
@@ -59,6 +62,7 @@ const jsonWithTypes = {
59
62
  },
60
63
  },
61
64
  },
65
+ required: ['type'],
62
66
  },
63
67
  codeBlock_with_no_marks_node: {},
64
68
  codeBlock_with_marks_node: {},
@@ -69,6 +73,7 @@ const jsonWithTypes = {
69
73
  enum: ['em'],
70
74
  },
71
75
  },
76
+ required: ['type'],
72
77
  },
73
78
  code_mark: {
74
79
  type: 'object',
@@ -77,6 +82,7 @@ const jsonWithTypes = {
77
82
  enum: ['code'],
78
83
  },
79
84
  },
85
+ required: ['type'],
80
86
  },
81
87
  strike_mark: {
82
88
  type: 'object',
@@ -85,6 +91,7 @@ const jsonWithTypes = {
85
91
  enum: ['strike'],
86
92
  },
87
93
  },
94
+ required: ['type'],
88
95
  },
89
96
  strong_mark: {
90
97
  type: 'object',
@@ -93,6 +100,7 @@ const jsonWithTypes = {
93
100
  enum: ['strong'],
94
101
  },
95
102
  },
103
+ required: ['type'],
96
104
  },
97
105
  underline_mark: {
98
106
  type: 'object',
@@ -101,6 +109,7 @@ const jsonWithTypes = {
101
109
  enum: ['underline'],
102
110
  },
103
111
  },
112
+ required: ['type'],
104
113
  },
105
114
  link_mark: {
106
115
  type: 'object',
@@ -127,8 +136,10 @@ const jsonWithTypes = {
127
136
  type: 'string',
128
137
  },
129
138
  },
139
+ required: ['href'],
130
140
  },
131
141
  },
142
+ required: ['type', 'attrs'],
132
143
  },
133
144
  subsup_mark: {
134
145
  type: 'object',
@@ -143,8 +154,10 @@ const jsonWithTypes = {
143
154
  enum: ['sub', 'sup'],
144
155
  },
145
156
  },
157
+ required: ['type'],
146
158
  },
147
159
  },
160
+ required: ['type', 'attrs'],
148
161
  },
149
162
  textColor_mark: {
150
163
  type: 'object',
@@ -160,8 +173,10 @@ const jsonWithTypes = {
160
173
  pattern: '^#[0-9a-fA-F]{6}$',
161
174
  },
162
175
  },
176
+ required: ['color'],
163
177
  },
164
178
  },
179
+ required: ['type', 'attrs'],
165
180
  },
166
181
  alignment_mark: {
167
182
  type: 'object',
@@ -176,8 +191,10 @@ const jsonWithTypes = {
176
191
  enum: ['center', 'end'],
177
192
  },
178
193
  },
194
+ required: ['align'],
179
195
  },
180
196
  },
197
+ required: ['type', 'attrs'],
181
198
  },
182
199
  indentation_mark: {
183
200
  type: 'object',
@@ -194,8 +211,10 @@ const jsonWithTypes = {
194
211
  maximum: 6,
195
212
  },
196
213
  },
214
+ required: ['level'],
197
215
  },
198
216
  },
217
+ required: ['type', 'attrs'],
199
218
  },
200
219
  annotation_mark: {
201
220
  type: 'object',
@@ -213,8 +232,10 @@ const jsonWithTypes = {
213
232
  enum: ['inlineComment'],
214
233
  },
215
234
  },
235
+ required: ['id', 'annotationType'],
216
236
  },
217
237
  },
238
+ required: ['type', 'attrs'],
218
239
  },
219
240
  dataConsumer_mark: {
220
241
  type: 'object',
@@ -233,8 +254,10 @@ const jsonWithTypes = {
233
254
  minItems: 1,
234
255
  },
235
256
  },
257
+ required: ['sources'],
236
258
  },
237
259
  },
260
+ required: ['type', 'attrs'],
238
261
  },
239
262
  fragment_mark: {
240
263
  type: 'object',
@@ -253,8 +276,10 @@ const jsonWithTypes = {
253
276
  type: 'string',
254
277
  },
255
278
  },
279
+ required: ['localId'],
256
280
  },
257
281
  },
282
+ required: ['type', 'attrs'],
258
283
  },
259
284
  border_mark: {
260
285
  type: 'object',
@@ -275,8 +300,10 @@ const jsonWithTypes = {
275
300
  pattern: '^#[0-9a-fA-F]{8}$|^#[0-9a-fA-F]{6}$',
276
301
  },
277
302
  },
303
+ required: ['size', 'color'],
278
304
  },
279
305
  },
306
+ required: ['type', 'attrs'],
280
307
  },
281
308
  backgroundColor_mark: {
282
309
  type: 'object',
@@ -292,8 +319,10 @@ const jsonWithTypes = {
292
319
  pattern: '^#[0-9a-fA-F]{6}$',
293
320
  },
294
321
  },
322
+ required: ['color'],
295
323
  },
296
324
  },
325
+ required: ['type', 'attrs'],
297
326
  },
298
327
  hardBreak_node: {
299
328
  type: 'object',
@@ -310,6 +339,7 @@ const jsonWithTypes = {
310
339
  },
311
340
  },
312
341
  },
342
+ required: ['type'],
313
343
  },
314
344
  mention_node: {
315
345
  type: 'object',
@@ -336,8 +366,10 @@ const jsonWithTypes = {
336
366
  type: 'string',
337
367
  },
338
368
  },
369
+ required: ['id'],
339
370
  },
340
371
  },
372
+ required: ['type', 'attrs'],
341
373
  },
342
374
  emoji_node: {
343
375
  type: 'object',
@@ -358,8 +390,10 @@ const jsonWithTypes = {
358
390
  type: 'string',
359
391
  },
360
392
  },
393
+ required: ['shortName'],
361
394
  },
362
395
  },
396
+ required: ['type', 'attrs'],
363
397
  },
364
398
  inlineExtension_node: {
365
399
  type: 'object',
@@ -387,8 +421,10 @@ const jsonWithTypes = {
387
421
  minLength: 1,
388
422
  },
389
423
  },
424
+ required: ['extensionKey', 'extensionType'],
390
425
  },
391
426
  },
427
+ required: ['type', 'attrs'],
392
428
  },
393
429
  inlineExtension_with_marks_node: {},
394
430
  date_node: {
@@ -405,8 +441,10 @@ const jsonWithTypes = {
405
441
  minLength: 1,
406
442
  },
407
443
  },
444
+ required: ['timestamp'],
408
445
  },
409
446
  },
447
+ required: ['type', 'attrs'],
410
448
  },
411
449
  placeholder_node: {
412
450
  type: 'object',
@@ -421,8 +459,10 @@ const jsonWithTypes = {
421
459
  type: 'string',
422
460
  },
423
461
  },
462
+ required: ['text'],
424
463
  },
425
464
  },
465
+ required: ['type', 'attrs'],
426
466
  },
427
467
  blockCard_node: {
428
468
  type: 'object',
@@ -455,10 +495,12 @@ const jsonWithTypes = {
455
495
  },
456
496
  properties: {},
457
497
  },
498
+ required: ['type'],
458
499
  },
459
500
  minItems: 1,
460
501
  },
461
502
  },
503
+ required: ['id', 'parameters', 'views'],
462
504
  },
463
505
  width: {
464
506
  type: 'number',
@@ -475,6 +517,7 @@ const jsonWithTypes = {
475
517
  ],
476
518
  },
477
519
  },
520
+ required: ['datasource'],
478
521
  },
479
522
  {
480
523
  type: 'object',
@@ -483,16 +526,19 @@ const jsonWithTypes = {
483
526
  type: 'string',
484
527
  },
485
528
  },
529
+ required: ['url'],
486
530
  },
487
531
  {
488
532
  type: 'object',
489
533
  properties: {
490
534
  data: {},
491
535
  },
536
+ required: ['data'],
492
537
  },
493
538
  ],
494
539
  },
495
540
  },
541
+ required: ['type', 'attrs'],
496
542
  },
497
543
  inlineCard_node: {
498
544
  type: 'object',
@@ -509,16 +555,19 @@ const jsonWithTypes = {
509
555
  type: 'string',
510
556
  },
511
557
  },
558
+ required: ['url'],
512
559
  },
513
560
  {
514
561
  type: 'object',
515
562
  properties: {
516
563
  data: {},
517
564
  },
565
+ required: ['data'],
518
566
  },
519
567
  ],
520
568
  },
521
569
  },
570
+ required: ['type', 'attrs'],
522
571
  },
523
572
  status_node: {
524
573
  type: 'object',
@@ -543,8 +592,10 @@ const jsonWithTypes = {
543
592
  type: 'string',
544
593
  },
545
594
  },
595
+ required: ['text', 'color'],
546
596
  },
547
597
  },
598
+ required: ['type', 'attrs'],
548
599
  },
549
600
  media_node: {
550
601
  type: 'object',
@@ -581,6 +632,7 @@ const jsonWithTypes = {
581
632
  type: 'string',
582
633
  },
583
634
  },
635
+ required: ['type', 'id', 'collection'],
584
636
  },
585
637
  {
586
638
  type: 'object',
@@ -601,6 +653,7 @@ const jsonWithTypes = {
601
653
  type: 'number',
602
654
  },
603
655
  },
656
+ required: ['type', 'url'],
604
657
  },
605
658
  ],
606
659
  },
@@ -621,6 +674,7 @@ const jsonWithTypes = {
621
674
  },
622
675
  },
623
676
  },
677
+ required: ['type', 'attrs'],
624
678
  },
625
679
  mediaInline_node: {
626
680
  type: 'object',
@@ -656,6 +710,7 @@ const jsonWithTypes = {
656
710
  type: 'string',
657
711
  },
658
712
  },
713
+ required: ['id', 'collection'],
659
714
  },
660
715
  marks: {
661
716
  type: 'array',
@@ -674,6 +729,7 @@ const jsonWithTypes = {
674
729
  },
675
730
  },
676
731
  },
732
+ required: ['type', 'attrs'],
677
733
  },
678
734
  formatted_text_inline_node: {},
679
735
  code_inline_node: {},
@@ -690,6 +746,7 @@ const jsonWithTypes = {
690
746
  },
691
747
  },
692
748
  },
749
+ required: ['type'],
693
750
  },
694
751
  paragraph_with_no_marks_node: {},
695
752
  paragraph_with_alignment_node: {},
@@ -736,6 +793,7 @@ const jsonWithTypes = {
736
793
  minItems: 0,
737
794
  },
738
795
  },
796
+ required: ['type', 'content'],
739
797
  },
740
798
  mediaSingle_node: {
741
799
  type: 'object',
@@ -768,6 +826,7 @@ const jsonWithTypes = {
768
826
  ],
769
827
  },
770
828
  },
829
+ required: ['layout'],
771
830
  },
772
831
  {
773
832
  type: 'object',
@@ -791,6 +850,7 @@ const jsonWithTypes = {
791
850
  ],
792
851
  },
793
852
  },
853
+ required: ['width', 'widthType', 'layout'],
794
854
  },
795
855
  ],
796
856
  },
@@ -801,6 +861,7 @@ const jsonWithTypes = {
801
861
  },
802
862
  },
803
863
  },
864
+ required: ['type'],
804
865
  },
805
866
  mediaSingle_caption_node: {},
806
867
  mediaSingle_full_node: {},
@@ -826,8 +887,10 @@ const jsonWithTypes = {
826
887
  enum: ['TODO', 'DONE'],
827
888
  },
828
889
  },
890
+ required: ['localId', 'state'],
829
891
  },
830
892
  },
893
+ required: ['type', 'attrs'],
831
894
  },
832
895
  taskList_node: {
833
896
  type: 'object',
@@ -861,8 +924,10 @@ const jsonWithTypes = {
861
924
  type: 'string',
862
925
  },
863
926
  },
927
+ required: ['localId'],
864
928
  },
865
929
  },
930
+ required: ['type', 'content', 'attrs'],
866
931
  },
867
932
  listItem_node: {
868
933
  type: 'object',
@@ -918,6 +983,7 @@ const jsonWithTypes = {
918
983
  minItems: 1,
919
984
  },
920
985
  },
986
+ required: ['type', 'content'],
921
987
  },
922
988
  bulletList_node: {
923
989
  type: 'object',
@@ -933,6 +999,7 @@ const jsonWithTypes = {
933
999
  minItems: 1,
934
1000
  },
935
1001
  },
1002
+ required: ['type', 'content'],
936
1003
  },
937
1004
  orderedList_node: {
938
1005
  type: 'object',
@@ -957,6 +1024,7 @@ const jsonWithTypes = {
957
1024
  },
958
1025
  },
959
1026
  },
1027
+ required: ['type', 'content'],
960
1028
  },
961
1029
  heading_node: {
962
1030
  type: 'object',
@@ -979,8 +1047,10 @@ const jsonWithTypes = {
979
1047
  maximum: 6,
980
1048
  },
981
1049
  },
1050
+ required: ['level'],
982
1051
  },
983
1052
  },
1053
+ required: ['type', 'attrs'],
984
1054
  },
985
1055
  heading_with_no_marks_node: {},
986
1056
  heading_with_alignment_node: {},
@@ -999,6 +1069,7 @@ const jsonWithTypes = {
999
1069
  minItems: 1,
1000
1070
  },
1001
1071
  },
1072
+ required: ['type', 'content'],
1002
1073
  },
1003
1074
  decisionItem_node: {
1004
1075
  type: 'object',
@@ -1022,8 +1093,10 @@ const jsonWithTypes = {
1022
1093
  type: 'string',
1023
1094
  },
1024
1095
  },
1096
+ required: ['localId', 'state'],
1025
1097
  },
1026
1098
  },
1099
+ required: ['type', 'attrs'],
1027
1100
  },
1028
1101
  decisionList_node: {
1029
1102
  type: 'object',
@@ -1045,8 +1118,10 @@ const jsonWithTypes = {
1045
1118
  type: 'string',
1046
1119
  },
1047
1120
  },
1121
+ required: ['localId'],
1048
1122
  },
1049
1123
  },
1124
+ required: ['type', 'content', 'attrs'],
1050
1125
  },
1051
1126
  rule_node: {
1052
1127
  type: 'object',
@@ -1055,6 +1130,7 @@ const jsonWithTypes = {
1055
1130
  enum: ['rule'],
1056
1131
  },
1057
1132
  },
1133
+ required: ['type'],
1058
1134
  },
1059
1135
  panel_node: {
1060
1136
  type: 'object',
@@ -1089,6 +1165,7 @@ const jsonWithTypes = {
1089
1165
  type: 'string',
1090
1166
  },
1091
1167
  },
1168
+ required: ['panelType'],
1092
1169
  },
1093
1170
  content: {
1094
1171
  type: 'array',
@@ -1135,6 +1212,7 @@ const jsonWithTypes = {
1135
1212
  minItems: 1,
1136
1213
  },
1137
1214
  },
1215
+ required: ['type', 'attrs', 'content'],
1138
1216
  },
1139
1217
  blockquote_node: {
1140
1218
  type: 'object',
@@ -1160,6 +1238,7 @@ const jsonWithTypes = {
1160
1238
  minItems: 1,
1161
1239
  },
1162
1240
  },
1241
+ required: ['type', 'content'],
1163
1242
  },
1164
1243
  extension_node: {
1165
1244
  type: 'object',
@@ -1190,8 +1269,10 @@ const jsonWithTypes = {
1190
1269
  minLength: 1,
1191
1270
  },
1192
1271
  },
1272
+ required: ['extensionKey', 'extensionType'],
1193
1273
  },
1194
1274
  },
1275
+ required: ['type', 'attrs'],
1195
1276
  },
1196
1277
  extension_with_marks_node: {},
1197
1278
  embedCard_node: {
@@ -1229,8 +1310,10 @@ const jsonWithTypes = {
1229
1310
  ],
1230
1311
  },
1231
1312
  },
1313
+ required: ['url', 'layout'],
1232
1314
  },
1233
1315
  },
1316
+ required: ['type', 'attrs'],
1234
1317
  },
1235
1318
  nestedExpand_node: {
1236
1319
  type: 'object',
@@ -1250,6 +1333,7 @@ const jsonWithTypes = {
1250
1333
  $ref: '#/definitions/nestedExpand_content',
1251
1334
  },
1252
1335
  },
1336
+ required: ['type', 'attrs', 'content'],
1253
1337
  },
1254
1338
  nestedExpand_with_no_marks_node: {},
1255
1339
  table_node: {
@@ -1300,6 +1384,7 @@ const jsonWithTypes = {
1300
1384
  },
1301
1385
  },
1302
1386
  },
1387
+ required: ['type', 'content'],
1303
1388
  },
1304
1389
  table_row_node: {
1305
1390
  type: 'object',
@@ -1321,6 +1406,7 @@ const jsonWithTypes = {
1321
1406
  },
1322
1407
  },
1323
1408
  },
1409
+ required: ['type', 'content'],
1324
1410
  },
1325
1411
  table_cell_node: {
1326
1412
  type: 'object',
@@ -1352,6 +1438,7 @@ const jsonWithTypes = {
1352
1438
  $ref: '#/definitions/table_cell_content',
1353
1439
  },
1354
1440
  },
1441
+ required: ['type', 'content'],
1355
1442
  },
1356
1443
  table_header_node: {
1357
1444
  type: 'object',
@@ -1383,6 +1470,7 @@ const jsonWithTypes = {
1383
1470
  $ref: '#/definitions/table_cell_content',
1384
1471
  },
1385
1472
  },
1473
+ required: ['type', 'content'],
1386
1474
  },
1387
1475
  expand_node: {
1388
1476
  type: 'object',
@@ -1406,6 +1494,7 @@ const jsonWithTypes = {
1406
1494
  minItems: 1,
1407
1495
  },
1408
1496
  },
1497
+ required: ['type', 'attrs', 'content'],
1409
1498
  },
1410
1499
  expand_with_no_mark_node: {},
1411
1500
  expand_with_breakout_mark_node: {},
@@ -1438,6 +1527,7 @@ const jsonWithTypes = {
1438
1527
  minLength: 1,
1439
1528
  },
1440
1529
  },
1530
+ required: ['extensionKey', 'extensionType'],
1441
1531
  },
1442
1532
  content: {
1443
1533
  type: 'array',
@@ -1447,6 +1537,7 @@ const jsonWithTypes = {
1447
1537
  minItems: 1,
1448
1538
  },
1449
1539
  },
1540
+ required: ['type', 'attrs', 'content'],
1450
1541
  },
1451
1542
  bodiedExtension_with_marks_node: {},
1452
1543
  layoutColumn_node: {
@@ -1464,6 +1555,7 @@ const jsonWithTypes = {
1464
1555
  maximum: 100,
1465
1556
  },
1466
1557
  },
1558
+ required: ['width'],
1467
1559
  },
1468
1560
  content: {
1469
1561
  type: 'array',
@@ -1473,6 +1565,7 @@ const jsonWithTypes = {
1473
1565
  minItems: 1,
1474
1566
  },
1475
1567
  },
1568
+ required: ['type', 'attrs', 'content'],
1476
1569
  },
1477
1570
  layoutSection_node: {
1478
1571
  type: 'object',
@@ -1493,6 +1586,7 @@ const jsonWithTypes = {
1493
1586
  },
1494
1587
  },
1495
1588
  },
1589
+ required: ['type', 'content'],
1496
1590
  },
1497
1591
  layoutSection_full_node: {},
1498
1592
  doc_node: {
@@ -1590,6 +1684,7 @@ const jsonWithTypes = {
1590
1684
  },
1591
1685
  },
1592
1686
  },
1687
+ required: ['version', 'type', 'content'],
1593
1688
  },
1594
1689
  },
1595
1690
  };
@@ -1906,3 +2001,11 @@ jsonWithTypes.definitions.doc_node.properties.content.items.anyOf = [
1906
2001
  $ref: '#/definitions/paragraph_node',
1907
2002
  },
1908
2003
  ];
2004
+
2005
+ // Reorder the required list for diffing purposes
2006
+ jsonWithTypes.definitions.taskList_node.required = ['type', 'attrs', 'content'];
2007
+ jsonWithTypes.definitions.decisionList_node.required = [
2008
+ 'type',
2009
+ 'attrs',
2010
+ 'content',
2011
+ ];