@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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/next-schema/full-schema.adf.js +1 -1
- package/dist/cjs/next-schema/nodes/blockCard.js +5 -5
- package/dist/cjs/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/cjs/next-schema/nodes/codeBlock.js +2 -1
- package/dist/cjs/next-schema/nodes/extension.js +2 -2
- package/dist/cjs/next-schema/nodes/inlineCard.js +0 -2
- package/dist/cjs/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/cjs/next-schema/nodes/list.js +2 -1
- package/dist/cjs/next-schema/nodes/media.js +11 -11
- package/dist/cjs/next-schema/nodes/mediaInline.js +2 -1
- package/dist/cjs/next-schema/nodes/mediaSingle.js +8 -9
- package/dist/cjs/next-schema/nodes/table.js +3 -1
- 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/nodes/blockCard.js +5 -5
- package/dist/es2019/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/es2019/next-schema/nodes/codeBlock.js +2 -1
- package/dist/es2019/next-schema/nodes/extension.js +2 -2
- package/dist/es2019/next-schema/nodes/inlineCard.js +0 -2
- package/dist/es2019/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/es2019/next-schema/nodes/list.js +2 -1
- package/dist/es2019/next-schema/nodes/media.js +11 -11
- package/dist/es2019/next-schema/nodes/mediaInline.js +2 -1
- package/dist/es2019/next-schema/nodes/mediaSingle.js +8 -9
- package/dist/es2019/next-schema/nodes/table.js +3 -1
- 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/nodes/blockCard.js +5 -5
- package/dist/esm/next-schema/nodes/bodiedExtension.js +2 -2
- package/dist/esm/next-schema/nodes/codeBlock.js +2 -1
- package/dist/esm/next-schema/nodes/extension.js +2 -2
- package/dist/esm/next-schema/nodes/inlineCard.js +0 -2
- package/dist/esm/next-schema/nodes/inlineExtension.js +2 -2
- package/dist/esm/next-schema/nodes/list.js +2 -1
- package/dist/esm/next-schema/nodes/media.js +11 -11
- package/dist/esm/next-schema/nodes/mediaInline.js +2 -1
- package/dist/esm/next-schema/nodes/mediaSingle.js +8 -9
- package/dist/esm/next-schema/nodes/table.js +3 -1
- package/dist/esm/next-schema/nodes/tableRow.js +2 -2
- package/package.json +3 -2
- package/schema-generators/__tests__/unit/jqueries.md +13 -0
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +103 -0
@@ -12,6 +12,11 @@ export var media = adfNode('media').define({
|
|
12
12
|
values: ['link', 'file'],
|
13
13
|
default: 'file'
|
14
14
|
},
|
15
|
+
id: {
|
16
|
+
minLength: 1,
|
17
|
+
type: 'string',
|
18
|
+
default: ''
|
19
|
+
},
|
15
20
|
alt: {
|
16
21
|
type: 'string',
|
17
22
|
default: '',
|
@@ -21,11 +26,6 @@ export var media = adfNode('media').define({
|
|
21
26
|
type: 'string',
|
22
27
|
default: ''
|
23
28
|
},
|
24
|
-
id: {
|
25
|
-
minLength: 1,
|
26
|
-
type: 'string',
|
27
|
-
default: ''
|
28
|
-
},
|
29
29
|
height: {
|
30
30
|
type: 'number',
|
31
31
|
default: null,
|
@@ -78,6 +78,11 @@ export var media = adfNode('media').define({
|
|
78
78
|
optional: true
|
79
79
|
}
|
80
80
|
}, {
|
81
|
+
type: {
|
82
|
+
type: 'enum',
|
83
|
+
values: ['external'],
|
84
|
+
default: 'file'
|
85
|
+
},
|
81
86
|
alt: {
|
82
87
|
type: 'string',
|
83
88
|
default: '',
|
@@ -96,12 +101,7 @@ export var media = adfNode('media').define({
|
|
96
101
|
url: {
|
97
102
|
type: 'string',
|
98
103
|
default: null,
|
99
|
-
optional:
|
100
|
-
},
|
101
|
-
type: {
|
102
|
-
type: 'enum',
|
103
|
-
values: ['external'],
|
104
|
-
default: 'file'
|
104
|
+
optional: false
|
105
105
|
}
|
106
106
|
}]
|
107
107
|
}
|
@@ -17,7 +17,8 @@ export var mediaSingle = adfNode('mediaSingle').define({
|
|
17
17
|
},
|
18
18
|
layout: {
|
19
19
|
type: 'enum',
|
20
|
-
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start']
|
20
|
+
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
|
21
|
+
default: 'center'
|
21
22
|
},
|
22
23
|
widthType: {
|
23
24
|
type: 'enum',
|
@@ -29,19 +30,17 @@ export var mediaSingle = adfNode('mediaSingle').define({
|
|
29
30
|
width: {
|
30
31
|
type: 'number',
|
31
32
|
minimum: 0,
|
32
|
-
default: null
|
33
|
-
|
33
|
+
default: null
|
34
|
+
},
|
35
|
+
widthType: {
|
36
|
+
type: 'enum',
|
37
|
+
values: ['pixel'],
|
38
|
+
default: 'pixel'
|
34
39
|
},
|
35
40
|
layout: {
|
36
41
|
type: 'enum',
|
37
42
|
values: ['wide', 'full-width', 'center', 'wrap-right', 'wrap-left', 'align-end', 'align-start'],
|
38
43
|
default: 'center'
|
39
|
-
},
|
40
|
-
widthType: {
|
41
|
-
type: 'enum',
|
42
|
-
values: ['pixel'],
|
43
|
-
default: 'pixel',
|
44
|
-
optional: true
|
45
44
|
}
|
46
45
|
}]
|
47
46
|
}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { $
|
1
|
+
import { $onePlus, $or, 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: [$onePlus($or(tableCell, tableHeader))]
|
7
7
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.12.
|
3
|
+
"version": "36.12.1",
|
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/"
|
@@ -22,6 +22,7 @@
|
|
22
22
|
"ak-postbuild": "yarn build:json-schema",
|
23
23
|
"test": "yarn test:unit",
|
24
24
|
"test:unit": "yarn workspace @atlaskit/editor-prosemirror build && jest --testPathPattern=packages/adf-schema/ --config=../../jest.config.js",
|
25
|
+
"test:json-schema": "yarn run jest --expand --testPathPattern=packages/adf-schema/schema-generators/__tests__/unit/json-full-schema.unit.ts --config=../../jest.config.js",
|
25
26
|
"build:cjs": "NODE_ENV=production BABEL_ENV=production:node-cjs babel --config-file ../../babel.config.js src --out-dir dist/cjs -x .ts,.tsx",
|
26
27
|
"build:esm": "NODE_ENV=production BABEL_ENV=production:esm babel --config-file ../../babel.config.js src -d dist/esm -x .ts,.tsx",
|
27
28
|
"build:es2019": "NODE_ENV=production BABEL_ENV=production:es2019 babel --config-file ../../babel.config.js src -d dist/es2019 -x .ts,.tsx",
|
@@ -45,7 +46,7 @@
|
|
45
46
|
},
|
46
47
|
"devDependencies": {
|
47
48
|
"@atlassian/adf-schema-json": "^1.15.0",
|
48
|
-
"@atlaskit/adf-schema-generator": "^1.10.
|
49
|
+
"@atlaskit/adf-schema-generator": "^1.10.1",
|
49
50
|
"@babel/cli": "^7.22.9",
|
50
51
|
"@babel/core": "^7.22.9",
|
51
52
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
@@ -166,3 +166,16 @@ A number of nodes have `marks` defined, yet the array is empty. Assuming this is
|
|
166
166
|
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
167
167
|
.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
|
168
168
|
```
|
169
|
+
|
170
|
+
Base level content objects (not nodes) are deleted. `inline` is also deleted, as it is a content object for paragraph.
|
171
|
+
|
172
|
+
`additionalProperties` and `allOf` are deleted as well.
|
173
|
+
|
174
|
+
A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
|
175
|
+
|
176
|
+
```sh
|
177
|
+
cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
|
178
|
+
.additionalProperties, .allOf, .properties.required,
|
179
|
+
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
180
|
+
.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
|
181
|
+
```
|