@atlaskit/adf-schema 36.8.3 → 36.8.4
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/nodes/extension.js +3 -2
- package/dist/cjs/next-schema/nodes/paragraph.js +0 -1
- package/dist/es2019/next-schema/nodes/extension.js +3 -2
- package/dist/es2019/next-schema/nodes/paragraph.js +0 -1
- package/dist/esm/next-schema/nodes/extension.js +3 -2
- package/dist/esm/next-schema/nodes/paragraph.js +0 -1
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +11 -9
- package/dist/types/next-schema/nodes/extension.d.ts +2 -0
- package/package.json +2 -2
- package/schema-generators/__tests__/unit/jqueries.md +11 -0
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +11 -7
package/CHANGELOG.md
CHANGED
@@ -10,7 +10,6 @@ var _fragment = require("../marks/fragment");
|
|
10
10
|
var extension = exports.extension = (0, _adfSchemaGenerator.adfNode)('extension').define({
|
11
11
|
atom: true,
|
12
12
|
selectable: true,
|
13
|
-
marks: [_dataConsumer.dataConsumer, _fragment.fragment],
|
14
13
|
attrs: {
|
15
14
|
extensionType: {
|
16
15
|
type: 'string',
|
@@ -42,4 +41,6 @@ var extension = exports.extension = (0, _adfSchemaGenerator.adfNode)('extension'
|
|
42
41
|
default: null
|
43
42
|
}
|
44
43
|
}
|
45
|
-
}).variant('with_marks', {
|
44
|
+
}).variant('with_marks', {
|
45
|
+
marks: [_dataConsumer.dataConsumer, _fragment.fragment]
|
46
|
+
});
|
@@ -9,7 +9,6 @@ var _inlineGroup = require("../groups/inlineGroup");
|
|
9
9
|
var _alignmentAndIndentation = require("../marks/alignmentAndIndentation");
|
10
10
|
var paragraph = exports.paragraph = (0, _adfSchemaGenerator.adfNode)('paragraph').define({
|
11
11
|
selectable: false,
|
12
|
-
marks: [_alignmentAndIndentation.alignment],
|
13
12
|
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup))]
|
14
13
|
}).variant('with_alignment', {
|
15
14
|
marks: [_alignmentAndIndentation.alignment]
|
@@ -4,7 +4,6 @@ import { fragment } from '../marks/fragment';
|
|
4
4
|
export const extension = adfNode('extension').define({
|
5
5
|
atom: true,
|
6
6
|
selectable: true,
|
7
|
-
marks: [dataConsumer, fragment],
|
8
7
|
attrs: {
|
9
8
|
extensionType: {
|
10
9
|
type: 'string',
|
@@ -36,4 +35,6 @@ export const extension = adfNode('extension').define({
|
|
36
35
|
default: null
|
37
36
|
}
|
38
37
|
}
|
39
|
-
}).variant('with_marks', {
|
38
|
+
}).variant('with_marks', {
|
39
|
+
marks: [dataConsumer, fragment]
|
40
|
+
});
|
@@ -3,7 +3,6 @@ import { inlineGroup } from '../groups/inlineGroup';
|
|
3
3
|
import { alignment, indentation } from '../marks/alignmentAndIndentation';
|
4
4
|
export const paragraph = adfNode('paragraph').define({
|
5
5
|
selectable: false,
|
6
|
-
marks: [alignment],
|
7
6
|
content: [$zeroPlus($or(inlineGroup))]
|
8
7
|
}).variant('with_alignment', {
|
9
8
|
marks: [alignment]
|
@@ -4,7 +4,6 @@ import { fragment } from '../marks/fragment';
|
|
4
4
|
export var extension = adfNode('extension').define({
|
5
5
|
atom: true,
|
6
6
|
selectable: true,
|
7
|
-
marks: [dataConsumer, fragment],
|
8
7
|
attrs: {
|
9
8
|
extensionType: {
|
10
9
|
type: 'string',
|
@@ -36,4 +35,6 @@ export var extension = adfNode('extension').define({
|
|
36
35
|
default: null
|
37
36
|
}
|
38
37
|
}
|
39
|
-
}).variant('with_marks', {
|
38
|
+
}).variant('with_marks', {
|
39
|
+
marks: [dataConsumer, fragment]
|
40
|
+
});
|
@@ -3,7 +3,6 @@ import { inlineGroup } from '../groups/inlineGroup';
|
|
3
3
|
import { alignment, indentation } from '../marks/alignmentAndIndentation';
|
4
4
|
export var paragraph = adfNode('paragraph').define({
|
5
5
|
selectable: false,
|
6
|
-
marks: [alignment],
|
7
6
|
content: [$zeroPlus($or(inlineGroup))]
|
8
7
|
}).variant('with_alignment', {
|
9
8
|
marks: [alignment]
|
@@ -51,7 +51,7 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
|
|
51
51
|
} & {
|
52
52
|
atom: false;
|
53
53
|
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOrSpec[];
|
54
|
-
}> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks"], {
|
54
|
+
}> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_marks", "with_no_marks"], {
|
55
55
|
root?: boolean;
|
56
56
|
atom?: boolean;
|
57
57
|
attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
|
@@ -67,7 +67,13 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
|
|
67
67
|
marks?: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<unknown>[];
|
68
68
|
selectable?: boolean;
|
69
69
|
whitespace?: "pre" | "normal";
|
70
|
-
}
|
70
|
+
} & {
|
71
|
+
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
72
|
+
} & {
|
73
|
+
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
74
|
+
} & {
|
75
|
+
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
76
|
+
}> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_list"], {
|
71
77
|
root?: boolean;
|
72
78
|
atom?: boolean;
|
73
79
|
attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
|
@@ -84,12 +90,8 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
|
|
84
90
|
selectable?: boolean;
|
85
91
|
whitespace?: "pre" | "normal";
|
86
92
|
} & {
|
87
|
-
|
88
|
-
}
|
89
|
-
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
90
|
-
} & {
|
91
|
-
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
92
|
-
}> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_list"], {
|
93
|
+
content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
|
94
|
+
}> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_marks"], {
|
93
95
|
root?: boolean;
|
94
96
|
atom?: boolean;
|
95
97
|
attrs?: import("@atlaskit/adf-schema-generator/dist/types/types/ADFAttribute").ADFAttributes;
|
@@ -106,7 +108,7 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
|
|
106
108
|
selectable?: boolean;
|
107
109
|
whitespace?: "pre" | "normal";
|
108
110
|
} & {
|
109
|
-
|
111
|
+
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
110
112
|
}> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "with_alignment", "with_indentation", "with_no_marks"], {
|
111
113
|
root?: boolean;
|
112
114
|
atom?: boolean;
|
@@ -14,4 +14,6 @@ export declare const extension: import("@atlaskit/adf-schema-generator/dist/type
|
|
14
14
|
marks?: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<unknown>[];
|
15
15
|
selectable?: boolean;
|
16
16
|
whitespace?: "pre" | "normal";
|
17
|
+
} & {
|
18
|
+
marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
|
17
19
|
}>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "36.8.
|
3
|
+
"version": "36.8.4",
|
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/"
|
@@ -44,7 +44,7 @@
|
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
46
|
"@atlassian/adf-schema-json": "^1.15.0",
|
47
|
-
"@atlaskit/adf-schema-generator": "^1.7.
|
47
|
+
"@atlaskit/adf-schema-generator": "^1.7.3",
|
48
48
|
"@babel/cli": "^7.22.9",
|
49
49
|
"@babel/core": "^7.22.9",
|
50
50
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
@@ -42,3 +42,14 @@ A number of nodes have `marks` defined, yet the array is empty. Assuming this is
|
|
42
42
|
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
43
43
|
.bodiedExtension_node.properties.marks, .codeBlock_node.properties.marks, .expand_node.properties.marks, .heading_node.properties.marks, .inlineExtension_node.properties.marks, .text_node.properties.marks) else . end)'
|
44
44
|
```
|
45
|
+
|
46
|
+
Delete all subfields except for marks, items, type and properties. Content objects are also deleted. Inline is also deleted, as it is a content object for paragraph.
|
47
|
+
|
48
|
+
A number of nodes have `marks` defined, yet the array is empty. Assuming this is redundant, I've removed them.
|
49
|
+
|
50
|
+
```sh
|
51
|
+
cat packages/adf-schema/json-schema/v1/full.json | jq 'walk(if type == "object" then del(
|
52
|
+
.content, .text, .attrs, .version, .required, .additionalProperties, .allOf, .anyOf, .minItems,
|
53
|
+
.block_content, .nestedExpand_content, .non_nestable_block_content, .table_cell_content, .inline_node,
|
54
|
+
.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)'
|
55
|
+
```
|
@@ -4,7 +4,6 @@ import adfNode from '@atlaskit/adf-schema/src/next-schema/full-schema.adf';
|
|
4
4
|
test('It should match the existing schema', () => {
|
5
5
|
const result = adfToJSON(adfNode);
|
6
6
|
|
7
|
-
// TODO Compare this to the real ADF Schema as it becomes ready
|
8
7
|
expect(result).toEqual(jsonWithTypes);
|
9
8
|
});
|
10
9
|
|
@@ -240,6 +239,7 @@ const jsonWithTypes = {
|
|
240
239
|
},
|
241
240
|
marks: {
|
242
241
|
type: 'array',
|
242
|
+
items: {},
|
243
243
|
},
|
244
244
|
},
|
245
245
|
},
|
@@ -251,6 +251,7 @@ const jsonWithTypes = {
|
|
251
251
|
},
|
252
252
|
marks: {
|
253
253
|
type: 'array',
|
254
|
+
items: {},
|
254
255
|
},
|
255
256
|
},
|
256
257
|
},
|
@@ -262,9 +263,6 @@ const jsonWithTypes = {
|
|
262
263
|
type: {
|
263
264
|
enum: ['paragraph'],
|
264
265
|
},
|
265
|
-
marks: {
|
266
|
-
type: 'array',
|
267
|
-
},
|
268
266
|
},
|
269
267
|
},
|
270
268
|
paragraph_with_no_marks_node: {},
|
@@ -286,6 +284,9 @@ const jsonWithTypes = {
|
|
286
284
|
},
|
287
285
|
marks: {
|
288
286
|
type: 'array',
|
287
|
+
items: {
|
288
|
+
$ref: '#/definitions/link_mark',
|
289
|
+
},
|
289
290
|
},
|
290
291
|
},
|
291
292
|
},
|
@@ -396,9 +397,6 @@ const jsonWithTypes = {
|
|
396
397
|
type: {
|
397
398
|
enum: ['extension'],
|
398
399
|
},
|
399
|
-
marks: {
|
400
|
-
type: 'array',
|
401
|
-
},
|
402
400
|
},
|
403
401
|
},
|
404
402
|
extension_with_marks_node: {},
|
@@ -427,6 +425,9 @@ const jsonWithTypes = {
|
|
427
425
|
},
|
428
426
|
marks: {
|
429
427
|
type: 'array',
|
428
|
+
items: {
|
429
|
+
$ref: '#/definitions/fragment_mark',
|
430
|
+
},
|
430
431
|
},
|
431
432
|
},
|
432
433
|
},
|
@@ -489,6 +490,9 @@ const jsonWithTypes = {
|
|
489
490
|
},
|
490
491
|
marks: {
|
491
492
|
type: 'array',
|
493
|
+
items: {
|
494
|
+
$ref: '#/definitions/breakout_mark',
|
495
|
+
},
|
492
496
|
},
|
493
497
|
},
|
494
498
|
},
|