@atlaskit/adf-schema 36.10.3 → 36.10.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 36.10.5
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 1b75a44: Add items field to JSON Schema transformer from ADF DSL
|
8
|
+
|
9
|
+
## 36.10.4
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- ec6b9e2: Add type field to content in JSON transformer for ADF DSL
|
14
|
+
|
3
15
|
## 36.10.3
|
4
16
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.10.
|
3
|
+
"version": "36.10.5",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -45,7 +45,7 @@
|
|
45
45
|
},
|
46
46
|
"devDependencies": {
|
47
47
|
"@atlassian/adf-schema-json": "^1.15.0",
|
48
|
-
"@atlaskit/adf-schema-generator": "^1.7.
|
48
|
+
"@atlaskit/adf-schema-generator": "^1.7.10",
|
49
49
|
"@babel/cli": "^7.22.9",
|
50
50
|
"@babel/core": "^7.22.9",
|
51
51
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
@@ -88,3 +88,29 @@ A number of nodes have `marks` defined, yet the array is empty. Assuming this is
|
|
88
88
|
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
89
89
|
.bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
|
90
90
|
```
|
91
|
+
|
92
|
+
Delete all subfields except for content, text, marks, attrs, anyOf, items, type and properties. Base level content objects (not nodes) are also deleted. `inline` is also deleted, as it is a content object for paragraph.
|
93
|
+
|
94
|
+
All fields of content except for type have been deleted as well.
|
95
|
+
|
96
|
+
A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
|
97
|
+
|
98
|
+
```sh
|
99
|
+
cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
|
100
|
+
.version, .required, .additionalProperties, .allOf, .minItems, .content.items, .content."$ref",
|
101
|
+
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
102
|
+
.bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
|
103
|
+
```
|
104
|
+
|
105
|
+
Delete all subfields except for content, text, marks, attrs, anyOf, items, type and properties. Base level content objects (not nodes) are also deleted. `inline` is also deleted, as it is a content object for paragraph.
|
106
|
+
|
107
|
+
All fields of content except for type and items have been deleted as well.
|
108
|
+
|
109
|
+
A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
|
110
|
+
|
111
|
+
```sh
|
112
|
+
cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
|
113
|
+
.version, .required, .additionalProperties, .allOf, .minItems, .content.items.anyOf?, .content.items."$ref"?, .content.items[]?, .content."$ref",
|
114
|
+
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
115
|
+
.bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks, .extension_node.properties.marks, .paragraph_node.properties.marks) else . end)' | pbcopy
|
116
|
+
```
|
@@ -46,7 +46,10 @@ const jsonWithTypes = {
|
|
46
46
|
type: {
|
47
47
|
enum: ['codeBlock'],
|
48
48
|
},
|
49
|
-
content: {
|
49
|
+
content: {
|
50
|
+
type: 'array',
|
51
|
+
items: {},
|
52
|
+
},
|
50
53
|
attrs: {
|
51
54
|
type: 'object',
|
52
55
|
properties: {
|
@@ -678,7 +681,10 @@ const jsonWithTypes = {
|
|
678
681
|
type: {
|
679
682
|
enum: ['paragraph'],
|
680
683
|
},
|
681
|
-
content: {
|
684
|
+
content: {
|
685
|
+
type: 'array',
|
686
|
+
items: {},
|
687
|
+
},
|
682
688
|
},
|
683
689
|
},
|
684
690
|
paragraph_with_no_marks_node: {},
|
@@ -690,7 +696,10 @@ const jsonWithTypes = {
|
|
690
696
|
type: {
|
691
697
|
enum: ['caption'],
|
692
698
|
},
|
693
|
-
content: {
|
699
|
+
content: {
|
700
|
+
type: 'array',
|
701
|
+
items: {},
|
702
|
+
},
|
694
703
|
},
|
695
704
|
},
|
696
705
|
mediaSingle_node: {
|
@@ -766,7 +775,10 @@ const jsonWithTypes = {
|
|
766
775
|
type: {
|
767
776
|
enum: ['taskItem'],
|
768
777
|
},
|
769
|
-
content: {
|
778
|
+
content: {
|
779
|
+
type: 'array',
|
780
|
+
items: {},
|
781
|
+
},
|
770
782
|
attrs: {
|
771
783
|
type: 'object',
|
772
784
|
properties: {
|
@@ -786,7 +798,10 @@ const jsonWithTypes = {
|
|
786
798
|
type: {
|
787
799
|
enum: ['taskList'],
|
788
800
|
},
|
789
|
-
content: {
|
801
|
+
content: {
|
802
|
+
type: 'array',
|
803
|
+
items: [],
|
804
|
+
},
|
790
805
|
attrs: {
|
791
806
|
type: 'object',
|
792
807
|
properties: {
|
@@ -803,7 +818,10 @@ const jsonWithTypes = {
|
|
803
818
|
type: {
|
804
819
|
enum: ['listItem'],
|
805
820
|
},
|
806
|
-
content: {
|
821
|
+
content: {
|
822
|
+
type: 'array',
|
823
|
+
items: [],
|
824
|
+
},
|
807
825
|
},
|
808
826
|
},
|
809
827
|
bulletList_node: {
|
@@ -812,7 +830,10 @@ const jsonWithTypes = {
|
|
812
830
|
type: {
|
813
831
|
enum: ['bulletList'],
|
814
832
|
},
|
815
|
-
content: {
|
833
|
+
content: {
|
834
|
+
type: 'array',
|
835
|
+
items: {},
|
836
|
+
},
|
816
837
|
},
|
817
838
|
},
|
818
839
|
orderedList_node: {
|
@@ -821,7 +842,10 @@ const jsonWithTypes = {
|
|
821
842
|
type: {
|
822
843
|
enum: ['orderedList'],
|
823
844
|
},
|
824
|
-
content: {
|
845
|
+
content: {
|
846
|
+
type: 'array',
|
847
|
+
items: {},
|
848
|
+
},
|
825
849
|
attrs: {
|
826
850
|
type: 'object',
|
827
851
|
properties: {
|
@@ -839,7 +863,10 @@ const jsonWithTypes = {
|
|
839
863
|
type: {
|
840
864
|
enum: ['heading'],
|
841
865
|
},
|
842
|
-
content: {
|
866
|
+
content: {
|
867
|
+
type: 'array',
|
868
|
+
items: {},
|
869
|
+
},
|
843
870
|
attrs: {
|
844
871
|
type: 'object',
|
845
872
|
properties: {
|
@@ -861,7 +888,10 @@ const jsonWithTypes = {
|
|
861
888
|
type: {
|
862
889
|
enum: ['mediaGroup'],
|
863
890
|
},
|
864
|
-
content: {
|
891
|
+
content: {
|
892
|
+
type: 'array',
|
893
|
+
items: {},
|
894
|
+
},
|
865
895
|
},
|
866
896
|
},
|
867
897
|
decisionItem_node: {
|
@@ -870,7 +900,10 @@ const jsonWithTypes = {
|
|
870
900
|
type: {
|
871
901
|
enum: ['decisionItem'],
|
872
902
|
},
|
873
|
-
content: {
|
903
|
+
content: {
|
904
|
+
type: 'array',
|
905
|
+
items: {},
|
906
|
+
},
|
874
907
|
attrs: {
|
875
908
|
type: 'object',
|
876
909
|
properties: {
|
@@ -890,7 +923,10 @@ const jsonWithTypes = {
|
|
890
923
|
type: {
|
891
924
|
enum: ['decisionList'],
|
892
925
|
},
|
893
|
-
content: {
|
926
|
+
content: {
|
927
|
+
type: 'array',
|
928
|
+
items: {},
|
929
|
+
},
|
894
930
|
attrs: {
|
895
931
|
type: 'object',
|
896
932
|
properties: {
|
@@ -943,7 +979,10 @@ const jsonWithTypes = {
|
|
943
979
|
},
|
944
980
|
},
|
945
981
|
},
|
946
|
-
content: {
|
982
|
+
content: {
|
983
|
+
type: 'array',
|
984
|
+
items: {},
|
985
|
+
},
|
947
986
|
},
|
948
987
|
},
|
949
988
|
blockquote_node: {
|
@@ -952,7 +991,10 @@ const jsonWithTypes = {
|
|
952
991
|
type: {
|
953
992
|
enum: ['blockquote'],
|
954
993
|
},
|
955
|
-
content: {
|
994
|
+
content: {
|
995
|
+
type: 'array',
|
996
|
+
items: {},
|
997
|
+
},
|
956
998
|
},
|
957
999
|
},
|
958
1000
|
extension_node: {
|
@@ -1078,7 +1120,10 @@ const jsonWithTypes = {
|
|
1078
1120
|
},
|
1079
1121
|
},
|
1080
1122
|
},
|
1081
|
-
content: {
|
1123
|
+
content: {
|
1124
|
+
type: 'array',
|
1125
|
+
items: {},
|
1126
|
+
},
|
1082
1127
|
marks: {
|
1083
1128
|
type: 'array',
|
1084
1129
|
items: {
|
@@ -1093,7 +1138,10 @@ const jsonWithTypes = {
|
|
1093
1138
|
type: {
|
1094
1139
|
enum: ['tableRow'],
|
1095
1140
|
},
|
1096
|
-
content: {
|
1141
|
+
content: {
|
1142
|
+
type: 'array',
|
1143
|
+
items: {},
|
1144
|
+
},
|
1097
1145
|
},
|
1098
1146
|
},
|
1099
1147
|
table_cell_node: {
|
@@ -1168,7 +1216,10 @@ const jsonWithTypes = {
|
|
1168
1216
|
},
|
1169
1217
|
},
|
1170
1218
|
},
|
1171
|
-
content: {
|
1219
|
+
content: {
|
1220
|
+
type: 'array',
|
1221
|
+
items: {},
|
1222
|
+
},
|
1172
1223
|
},
|
1173
1224
|
},
|
1174
1225
|
expand_with_no_mark_node: {},
|
@@ -1203,7 +1254,10 @@ const jsonWithTypes = {
|
|
1203
1254
|
},
|
1204
1255
|
},
|
1205
1256
|
},
|
1206
|
-
content: {
|
1257
|
+
content: {
|
1258
|
+
type: 'array',
|
1259
|
+
items: {},
|
1260
|
+
},
|
1207
1261
|
},
|
1208
1262
|
},
|
1209
1263
|
bodiedExtension_with_marks_node: {},
|
@@ -1223,7 +1277,10 @@ const jsonWithTypes = {
|
|
1223
1277
|
},
|
1224
1278
|
},
|
1225
1279
|
},
|
1226
|
-
content: {
|
1280
|
+
content: {
|
1281
|
+
type: 'array',
|
1282
|
+
items: {},
|
1283
|
+
},
|
1227
1284
|
},
|
1228
1285
|
},
|
1229
1286
|
layoutSection_node: {
|
@@ -1238,7 +1295,10 @@ const jsonWithTypes = {
|
|
1238
1295
|
$ref: '#/definitions/breakout_mark',
|
1239
1296
|
},
|
1240
1297
|
},
|
1241
|
-
content: {
|
1298
|
+
content: {
|
1299
|
+
type: 'array',
|
1300
|
+
items: {},
|
1301
|
+
},
|
1242
1302
|
},
|
1243
1303
|
},
|
1244
1304
|
layoutSection_full_node: {},
|
@@ -1248,8 +1308,29 @@ const jsonWithTypes = {
|
|
1248
1308
|
type: {
|
1249
1309
|
enum: ['doc'],
|
1250
1310
|
},
|
1251
|
-
content: {
|
1311
|
+
content: {
|
1312
|
+
type: 'array',
|
1313
|
+
items: {},
|
1314
|
+
},
|
1252
1315
|
},
|
1253
1316
|
},
|
1254
1317
|
},
|
1255
1318
|
};
|
1319
|
+
|
1320
|
+
// New JSON, different to the old JSON schema
|
1321
|
+
jsonWithTypes.definitions.heading_node.properties.content = {
|
1322
|
+
type: 'array',
|
1323
|
+
items: {},
|
1324
|
+
};
|
1325
|
+
jsonWithTypes.definitions.nestedExpand_node.properties.content = {
|
1326
|
+
type: 'array',
|
1327
|
+
items: {},
|
1328
|
+
};
|
1329
|
+
jsonWithTypes.definitions.table_cell_node.properties.content = {
|
1330
|
+
type: 'array',
|
1331
|
+
items: {},
|
1332
|
+
};
|
1333
|
+
jsonWithTypes.definitions.table_header_node.properties.content = {
|
1334
|
+
type: 'array',
|
1335
|
+
items: {},
|
1336
|
+
};
|