@atlaskit/adf-schema 36.10.12 → 36.11.0
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 +12 -0
- package/dist/cjs/next-schema/full-schema.adf.js +3 -1
- package/dist/cjs/next-schema/generated/markTypes.js +126 -0
- package/dist/cjs/next-schema/generated/nodeGroupTypes.js +5 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +798 -0
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/caption.js +1 -1
- package/dist/cjs/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/cjs/next-schema/nodes/panel.js +1 -1
- package/dist/cjs/next-schema/nodes/tableCell.js +1 -1
- package/dist/cjs/next-schema/nodes/tableHeader.js +1 -1
- package/dist/es2019/next-schema/full-schema.adf.js +3 -1
- package/dist/es2019/next-schema/generated/markTypes.js +120 -0
- package/dist/es2019/next-schema/generated/nodeGroupTypes.js +1 -0
- package/dist/es2019/next-schema/generated/nodeTypes.js +792 -0
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/caption.js +1 -1
- package/dist/es2019/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/es2019/next-schema/nodes/panel.js +1 -1
- package/dist/es2019/next-schema/nodes/tableCell.js +1 -1
- package/dist/es2019/next-schema/nodes/tableHeader.js +1 -1
- package/dist/esm/next-schema/full-schema.adf.js +3 -1
- package/dist/esm/next-schema/generated/markTypes.js +120 -0
- package/dist/esm/next-schema/generated/nodeGroupTypes.js +1 -0
- package/dist/esm/next-schema/generated/nodeTypes.js +792 -0
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/esm/next-schema/nodes/caption.js +1 -1
- package/dist/esm/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/esm/next-schema/nodes/panel.js +1 -1
- package/dist/esm/next-schema/nodes/tableCell.js +1 -1
- package/dist/esm/next-schema/nodes/tableHeader.js +1 -1
- package/dist/types/next-schema/generated/markTypes.d.ts +155 -0
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +4 -0
- package/dist/types/next-schema/generated/nodeTypes.d.ts +573 -0
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +2 -65
- package/package.json +3 -3
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +69 -0
- package/schema-generators/__tests__/unit/jqueries.md +13 -0
- package/schema-generators/__tests__/unit/json-full-schema.unit.ts +475 -10
- package/schema-generators/__tests__/unit/validate-pm-schema.unit.ts +2 -2
@@ -16,4 +16,4 @@ import { taskList } from '../nodes/task';
|
|
16
16
|
|
17
17
|
// Not an actual group, but a collection of nodes that can't be nested inside each other
|
18
18
|
// TODO: make it an actual group
|
19
|
-
export const nonNestableBlockContent = [
|
19
|
+
export const nonNestableBlockContent = [codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, table];
|
@@ -12,5 +12,5 @@ import { text } from './text';
|
|
12
12
|
export const caption = adfNode('caption').define({
|
13
13
|
isolating: true,
|
14
14
|
selectable: false,
|
15
|
-
content: [$zeroPlus($or(
|
15
|
+
content: [$zeroPlus($or(hardBreak, mention, emoji, date, placeholder, inlineCard, status, text.use('formatted'), text.use('code_inline')))]
|
16
16
|
});
|
@@ -25,5 +25,5 @@ export const nestedExpand = adfNode('nestedExpand').define({
|
|
25
25
|
optional: true
|
26
26
|
}
|
27
27
|
},
|
28
|
-
content: [$onePlus($or(
|
28
|
+
content: [$onePlus($or(codeBlock.use('with_no_marks'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule, panel, blockquote))]
|
29
29
|
}).variant('with_no_marks', {});
|
@@ -38,5 +38,5 @@ export const panel = adfNode('panel').define({
|
|
38
38
|
optional: true
|
39
39
|
}
|
40
40
|
},
|
41
|
-
content: [$onePlus($or(paragraph,
|
41
|
+
content: [$onePlus($or(codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), mediaGroup, decisionList, rule))]
|
42
42
|
});
|
@@ -40,5 +40,5 @@ export const tableCell = adfNode('tableCell').define({
|
|
40
40
|
optional: true
|
41
41
|
}
|
42
42
|
},
|
43
|
-
content: [$onePlus($or(
|
43
|
+
content: [$onePlus($or(codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, nestedExpand.use('with_no_marks')))]
|
44
44
|
});
|
@@ -40,5 +40,5 @@ export const tableHeader = adfNode('tableHeader').define({
|
|
40
40
|
optional: true
|
41
41
|
}
|
42
42
|
},
|
43
|
-
content: [$onePlus($or(
|
43
|
+
content: [$onePlus($or(codeBlock.use('with_no_marks'), blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), mediaSingle.use('caption'), mediaSingle.use('full'), taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, nestedExpand.use('with_no_marks')))]
|
44
44
|
});
|
@@ -2,9 +2,11 @@ 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
|
+
import { nestedExpand } from './nodes/nestedExpand';
|
6
|
+
import { paragraph } from './nodes/paragraph';
|
5
7
|
var doc = adfNode('doc').define({
|
6
8
|
root: true,
|
7
9
|
version: 1,
|
8
|
-
content: [$zeroPlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup))]
|
10
|
+
content: [$zeroPlus($or(blockGroup, layoutSection, layoutSection.use('full'), blockRootOnlyGroup, nestedExpand, paragraph))]
|
9
11
|
});
|
10
12
|
export default doc;
|
@@ -0,0 +1,120 @@
|
|
1
|
+
import { createPMMarkSpecFactory } from '@atlaskit/adf-schema-generator';
|
2
|
+
export var breakout = createPMMarkSpecFactory({
|
3
|
+
attrs: {
|
4
|
+
mode: {
|
5
|
+
default: 'wide'
|
6
|
+
}
|
7
|
+
},
|
8
|
+
inclusive: false,
|
9
|
+
spanning: false
|
10
|
+
});
|
11
|
+
export var link = createPMMarkSpecFactory({
|
12
|
+
attrs: {
|
13
|
+
href: {},
|
14
|
+
title: {},
|
15
|
+
id: {},
|
16
|
+
collection: {},
|
17
|
+
occurrenceKey: {},
|
18
|
+
__confluenceMetadata: {
|
19
|
+
default: null
|
20
|
+
}
|
21
|
+
},
|
22
|
+
inclusive: false,
|
23
|
+
excludes: 'link',
|
24
|
+
group: 'link'
|
25
|
+
});
|
26
|
+
export var annotation = createPMMarkSpecFactory({
|
27
|
+
attrs: {
|
28
|
+
id: {
|
29
|
+
default: ''
|
30
|
+
},
|
31
|
+
annotationType: {
|
32
|
+
default: 'inlineComment'
|
33
|
+
}
|
34
|
+
},
|
35
|
+
inclusive: true,
|
36
|
+
group: 'annotation'
|
37
|
+
});
|
38
|
+
export var border = createPMMarkSpecFactory({
|
39
|
+
attrs: {
|
40
|
+
size: {},
|
41
|
+
color: {}
|
42
|
+
},
|
43
|
+
inclusive: false
|
44
|
+
});
|
45
|
+
export var em = createPMMarkSpecFactory({
|
46
|
+
inclusive: true,
|
47
|
+
group: 'fontStyle'
|
48
|
+
});
|
49
|
+
export var strong = createPMMarkSpecFactory({
|
50
|
+
inclusive: true,
|
51
|
+
group: 'fontStyle'
|
52
|
+
});
|
53
|
+
export var strike = createPMMarkSpecFactory({
|
54
|
+
inclusive: true,
|
55
|
+
group: 'fontStyle'
|
56
|
+
});
|
57
|
+
export var subsup = createPMMarkSpecFactory({
|
58
|
+
attrs: {
|
59
|
+
type: {
|
60
|
+
default: 'sub'
|
61
|
+
}
|
62
|
+
},
|
63
|
+
inclusive: true,
|
64
|
+
group: 'fontStyle'
|
65
|
+
});
|
66
|
+
export var underline = createPMMarkSpecFactory({
|
67
|
+
inclusive: true,
|
68
|
+
group: 'fontStyle'
|
69
|
+
});
|
70
|
+
export var textColor = createPMMarkSpecFactory({
|
71
|
+
attrs: {
|
72
|
+
color: {}
|
73
|
+
},
|
74
|
+
inclusive: true,
|
75
|
+
group: 'color'
|
76
|
+
});
|
77
|
+
export var backgroundColor = createPMMarkSpecFactory({
|
78
|
+
attrs: {
|
79
|
+
color: {}
|
80
|
+
},
|
81
|
+
inclusive: true,
|
82
|
+
excludes: 'color',
|
83
|
+
group: 'color'
|
84
|
+
});
|
85
|
+
export var code = createPMMarkSpecFactory({
|
86
|
+
inclusive: true,
|
87
|
+
excludes: 'fontStyle link searchQuery color'
|
88
|
+
});
|
89
|
+
export var alignment = createPMMarkSpecFactory({
|
90
|
+
attrs: {
|
91
|
+
align: {}
|
92
|
+
},
|
93
|
+
excludes: 'alignment indentation',
|
94
|
+
group: 'alignment'
|
95
|
+
});
|
96
|
+
export var indentation = createPMMarkSpecFactory({
|
97
|
+
attrs: {
|
98
|
+
level: {}
|
99
|
+
},
|
100
|
+
excludes: 'indentation alignment',
|
101
|
+
group: 'indentation'
|
102
|
+
});
|
103
|
+
export var dataConsumer = createPMMarkSpecFactory({
|
104
|
+
attrs: {
|
105
|
+
sources: {
|
106
|
+
default: []
|
107
|
+
}
|
108
|
+
}
|
109
|
+
});
|
110
|
+
export var fragment = createPMMarkSpecFactory({
|
111
|
+
attrs: {
|
112
|
+
localId: {
|
113
|
+
default: ''
|
114
|
+
},
|
115
|
+
name: {
|
116
|
+
default: null
|
117
|
+
}
|
118
|
+
},
|
119
|
+
inclusive: false
|
120
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|