@atlaskit/adf-schema 36.10.8 → 36.10.9
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 +6 -0
- package/dist/cjs/next-schema/full-schema.adf.js +1 -1
- package/dist/cjs/next-schema/marks/dataConsumer.js +2 -1
- package/dist/cjs/next-schema/nodes/blockCard.js +1 -0
- package/dist/cjs/next-schema/nodes/tableRow.js +1 -1
- package/dist/es2019/next-schema/full-schema.adf.js +2 -2
- package/dist/es2019/next-schema/marks/dataConsumer.js +2 -1
- package/dist/es2019/next-schema/nodes/blockCard.js +1 -0
- package/dist/es2019/next-schema/nodes/tableRow.js +2 -2
- package/dist/esm/next-schema/full-schema.adf.js +2 -2
- package/dist/esm/next-schema/marks/dataConsumer.js +2 -1
- package/dist/esm/next-schema/nodes/blockCard.js +1 -0
- package/dist/esm/next-schema/nodes/tableRow.js +2 -2
- package/package.json +2 -2
- package/schema-generators/__tests__/unit/jqueries.md +13 -0
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +18 -0
package/CHANGELOG.md
CHANGED
@@ -10,6 +10,6 @@ var _layoutSection = require("./nodes/layoutSection");
|
|
10
10
|
var _blockRootOnlyGroup = require("./groups/blockRootOnlyGroup");
|
11
11
|
var doc = (0, _adfSchemaGenerator.adfNode)('doc').define({
|
12
12
|
root: true,
|
13
|
-
content: [(0, _adfSchemaGenerator.$
|
13
|
+
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _layoutSection.layoutSection, _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup))]
|
14
14
|
});
|
15
15
|
var _default = exports.default = doc;
|
@@ -9,5 +9,5 @@ var _tableCell = require("./tableCell");
|
|
9
9
|
var _tableHeader = require("./tableHeader");
|
10
10
|
var tableRow = exports.tableRow = (0, _adfSchemaGenerator.adfNode)('tableRow').define({
|
11
11
|
selectable: false,
|
12
|
-
content: [(0, _adfSchemaGenerator.$
|
12
|
+
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_tableCell.tableCell, _tableHeader.tableHeader))]
|
13
13
|
});
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { $
|
1
|
+
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { blockGroup } from './groups/blockGroup';
|
3
3
|
import { layoutSection } from './nodes/layoutSection';
|
4
4
|
import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
|
5
5
|
const doc = adfNode('doc').define({
|
6
6
|
root: true,
|
7
|
-
content: [$
|
7
|
+
content: [$zeroPlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup))]
|
8
8
|
});
|
9
9
|
export default doc;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { $
|
1
|
+
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { tableCell } from './tableCell';
|
3
3
|
import { tableHeader } from './tableHeader';
|
4
4
|
export const tableRow = adfNode('tableRow').define({
|
5
5
|
selectable: false,
|
6
|
-
content: [$
|
6
|
+
content: [$zeroPlus($or(tableCell, tableHeader))]
|
7
7
|
});
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { $
|
1
|
+
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { blockGroup } from './groups/blockGroup';
|
3
3
|
import { layoutSection } from './nodes/layoutSection';
|
4
4
|
import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
|
5
5
|
var doc = adfNode('doc').define({
|
6
6
|
root: true,
|
7
|
-
content: [$
|
7
|
+
content: [$zeroPlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup))]
|
8
8
|
});
|
9
9
|
export default doc;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { $
|
1
|
+
import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
2
2
|
import { tableCell } from './tableCell';
|
3
3
|
import { tableHeader } from './tableHeader';
|
4
4
|
export var tableRow = adfNode('tableRow').define({
|
5
5
|
selectable: false,
|
6
|
-
content: [$
|
6
|
+
content: [$zeroPlus($or(tableCell, tableHeader))]
|
7
7
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.10.
|
3
|
+
"version": "36.10.9",
|
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.8.
|
48
|
+
"@atlaskit/adf-schema-generator": "^1.8.2",
|
49
49
|
"@babel/cli": "^7.22.9",
|
50
50
|
"@babel/core": "^7.22.9",
|
51
51
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
@@ -114,3 +114,16 @@ A number of nodes have `marks` defined, yet the array is empty. Assuming this is
|
|
114
114
|
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
115
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
116
|
```
|
117
|
+
|
118
|
+
Base level content objects (not nodes) are deleted. `inline` is also deleted, as it is a content object for paragraph.
|
119
|
+
|
120
|
+
All fields of content except for type and items have been deleted as well.
|
121
|
+
|
122
|
+
A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
|
123
|
+
|
124
|
+
```sh
|
125
|
+
cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
|
126
|
+
.version, .required, .additionalProperties, .allOf, .content.items.anyOf?, .content.items."$ref"?, .content.items[]?, .content."$ref",
|
127
|
+
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
128
|
+
.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
|
129
|
+
```
|
@@ -230,6 +230,7 @@ const jsonWithTypes = {
|
|
230
230
|
items: {
|
231
231
|
type: 'string',
|
232
232
|
},
|
233
|
+
minItems: 1,
|
233
234
|
},
|
234
235
|
},
|
235
236
|
},
|
@@ -455,6 +456,7 @@ const jsonWithTypes = {
|
|
455
456
|
properties: {},
|
456
457
|
},
|
457
458
|
},
|
459
|
+
minItems: 1,
|
458
460
|
},
|
459
461
|
},
|
460
462
|
},
|
@@ -699,6 +701,7 @@ const jsonWithTypes = {
|
|
699
701
|
content: {
|
700
702
|
type: 'array',
|
701
703
|
items: {},
|
704
|
+
minItems: 0,
|
702
705
|
},
|
703
706
|
},
|
704
707
|
},
|
@@ -801,6 +804,7 @@ const jsonWithTypes = {
|
|
801
804
|
content: {
|
802
805
|
type: 'array',
|
803
806
|
items: [],
|
807
|
+
minItems: 1,
|
804
808
|
},
|
805
809
|
attrs: {
|
806
810
|
type: 'object',
|
@@ -821,6 +825,7 @@ const jsonWithTypes = {
|
|
821
825
|
content: {
|
822
826
|
type: 'array',
|
823
827
|
items: [],
|
828
|
+
minItems: 1,
|
824
829
|
},
|
825
830
|
},
|
826
831
|
},
|
@@ -833,6 +838,7 @@ const jsonWithTypes = {
|
|
833
838
|
content: {
|
834
839
|
type: 'array',
|
835
840
|
items: {},
|
841
|
+
minItems: 1,
|
836
842
|
},
|
837
843
|
},
|
838
844
|
},
|
@@ -845,6 +851,7 @@ const jsonWithTypes = {
|
|
845
851
|
content: {
|
846
852
|
type: 'array',
|
847
853
|
items: {},
|
854
|
+
minItems: 1,
|
848
855
|
},
|
849
856
|
attrs: {
|
850
857
|
type: 'object',
|
@@ -891,6 +898,7 @@ const jsonWithTypes = {
|
|
891
898
|
content: {
|
892
899
|
type: 'array',
|
893
900
|
items: {},
|
901
|
+
minItems: 1,
|
894
902
|
},
|
895
903
|
},
|
896
904
|
},
|
@@ -926,6 +934,7 @@ const jsonWithTypes = {
|
|
926
934
|
content: {
|
927
935
|
type: 'array',
|
928
936
|
items: {},
|
937
|
+
minItems: 1,
|
929
938
|
},
|
930
939
|
attrs: {
|
931
940
|
type: 'object',
|
@@ -982,6 +991,7 @@ const jsonWithTypes = {
|
|
982
991
|
content: {
|
983
992
|
type: 'array',
|
984
993
|
items: {},
|
994
|
+
minItems: 1,
|
985
995
|
},
|
986
996
|
},
|
987
997
|
},
|
@@ -994,6 +1004,7 @@ const jsonWithTypes = {
|
|
994
1004
|
content: {
|
995
1005
|
type: 'array',
|
996
1006
|
items: {},
|
1007
|
+
minItems: 1,
|
997
1008
|
},
|
998
1009
|
},
|
999
1010
|
},
|
@@ -1123,6 +1134,7 @@ const jsonWithTypes = {
|
|
1123
1134
|
content: {
|
1124
1135
|
type: 'array',
|
1125
1136
|
items: {},
|
1137
|
+
minItems: 1,
|
1126
1138
|
},
|
1127
1139
|
marks: {
|
1128
1140
|
type: 'array',
|
@@ -1219,6 +1231,7 @@ const jsonWithTypes = {
|
|
1219
1231
|
content: {
|
1220
1232
|
type: 'array',
|
1221
1233
|
items: {},
|
1234
|
+
minItems: 1,
|
1222
1235
|
},
|
1223
1236
|
},
|
1224
1237
|
},
|
@@ -1257,6 +1270,7 @@ const jsonWithTypes = {
|
|
1257
1270
|
content: {
|
1258
1271
|
type: 'array',
|
1259
1272
|
items: {},
|
1273
|
+
minItems: 1,
|
1260
1274
|
},
|
1261
1275
|
},
|
1262
1276
|
},
|
@@ -1280,6 +1294,7 @@ const jsonWithTypes = {
|
|
1280
1294
|
content: {
|
1281
1295
|
type: 'array',
|
1282
1296
|
items: {},
|
1297
|
+
minItems: 1,
|
1283
1298
|
},
|
1284
1299
|
},
|
1285
1300
|
},
|
@@ -1325,12 +1340,15 @@ jsonWithTypes.definitions.heading_node.properties.content = {
|
|
1325
1340
|
jsonWithTypes.definitions.nestedExpand_node.properties.content = {
|
1326
1341
|
type: 'array',
|
1327
1342
|
items: {},
|
1343
|
+
minItems: 1,
|
1328
1344
|
};
|
1329
1345
|
jsonWithTypes.definitions.table_cell_node.properties.content = {
|
1330
1346
|
type: 'array',
|
1331
1347
|
items: {},
|
1348
|
+
minItems: 1,
|
1332
1349
|
};
|
1333
1350
|
jsonWithTypes.definitions.table_header_node.properties.content = {
|
1334
1351
|
type: 'array',
|
1335
1352
|
items: {},
|
1353
|
+
minItems: 1,
|
1336
1354
|
};
|