@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
@@ -21,4 +21,4 @@ var _table = require("../nodes/table");
|
|
21
21
|
var _task = require("../nodes/task");
|
22
22
|
// Not an actual group, but a collection of nodes that can't be nested inside each other
|
23
23
|
// TODO: make it an actual group
|
24
|
-
var nonNestableBlockContent = exports.nonNestableBlockContent = [
|
24
|
+
var nonNestableBlockContent = exports.nonNestableBlockContent = [_codeBlock.codeBlock.use('with_no_marks'), _blockCard.blockCard, _paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _extension.extension.use('with_marks'), _embedCard.embedCard, _table.table];
|
@@ -17,5 +17,5 @@ var _text = require("./text");
|
|
17
17
|
var caption = exports.caption = (0, _adfSchemaGenerator.adfNode)('caption').define({
|
18
18
|
isolating: true,
|
19
19
|
selectable: false,
|
20
|
-
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(
|
20
|
+
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_hardBreak.hardBreak, _mention.mention, _emoji.emoji, _date.date, _placeholder.placeholder, _inlineCard.inlineCard, _status.status, _text.text.use('formatted'), _text.text.use('code_inline')))]
|
21
21
|
});
|
@@ -31,5 +31,5 @@ var nestedExpand = exports.nestedExpand = (0, _adfSchemaGenerator.adfNode)('nest
|
|
31
31
|
optional: true
|
32
32
|
}
|
33
33
|
},
|
34
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(
|
34
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_codeBlock.codeBlock.use('with_no_marks'), _paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote))]
|
35
35
|
}).variant('with_no_marks', {});
|
@@ -44,5 +44,5 @@ var panel = exports.panel = (0, _adfSchemaGenerator.adfNode)('panel').define({
|
|
44
44
|
optional: true
|
45
45
|
}
|
46
46
|
},
|
47
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph,
|
47
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_codeBlock.codeBlock.use('with_no_marks'), _blockCard.blockCard, _paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule))]
|
48
48
|
});
|
@@ -46,5 +46,5 @@ var tableCell = exports.tableCell = (0, _adfSchemaGenerator.adfNode)('tableCell'
|
|
46
46
|
optional: true
|
47
47
|
}
|
48
48
|
},
|
49
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(
|
49
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_codeBlock.codeBlock.use('with_no_marks'), _blockCard.blockCard, _paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _extension.extension.use('with_marks'), _embedCard.embedCard, _nestedExpand.nestedExpand.use('with_no_marks')))]
|
50
50
|
});
|
@@ -46,5 +46,5 @@ var tableHeader = exports.tableHeader = (0, _adfSchemaGenerator.adfNode)('tableH
|
|
46
46
|
optional: true
|
47
47
|
}
|
48
48
|
},
|
49
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(
|
49
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_codeBlock.codeBlock.use('with_no_marks'), _blockCard.blockCard, _paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _task.taskList, _list.bulletList, _list.orderedList, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _mediaGroup.mediaGroup, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _extension.extension.use('with_marks'), _embedCard.embedCard, _nestedExpand.nestedExpand.use('with_no_marks')))]
|
50
50
|
});
|
@@ -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
|
const 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 const breakout = createPMMarkSpecFactory({
|
3
|
+
attrs: {
|
4
|
+
mode: {
|
5
|
+
default: 'wide'
|
6
|
+
}
|
7
|
+
},
|
8
|
+
inclusive: false,
|
9
|
+
spanning: false
|
10
|
+
});
|
11
|
+
export const 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 const 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 const border = createPMMarkSpecFactory({
|
39
|
+
attrs: {
|
40
|
+
size: {},
|
41
|
+
color: {}
|
42
|
+
},
|
43
|
+
inclusive: false
|
44
|
+
});
|
45
|
+
export const em = createPMMarkSpecFactory({
|
46
|
+
inclusive: true,
|
47
|
+
group: 'fontStyle'
|
48
|
+
});
|
49
|
+
export const strong = createPMMarkSpecFactory({
|
50
|
+
inclusive: true,
|
51
|
+
group: 'fontStyle'
|
52
|
+
});
|
53
|
+
export const strike = createPMMarkSpecFactory({
|
54
|
+
inclusive: true,
|
55
|
+
group: 'fontStyle'
|
56
|
+
});
|
57
|
+
export const subsup = createPMMarkSpecFactory({
|
58
|
+
attrs: {
|
59
|
+
type: {
|
60
|
+
default: 'sub'
|
61
|
+
}
|
62
|
+
},
|
63
|
+
inclusive: true,
|
64
|
+
group: 'fontStyle'
|
65
|
+
});
|
66
|
+
export const underline = createPMMarkSpecFactory({
|
67
|
+
inclusive: true,
|
68
|
+
group: 'fontStyle'
|
69
|
+
});
|
70
|
+
export const textColor = createPMMarkSpecFactory({
|
71
|
+
attrs: {
|
72
|
+
color: {}
|
73
|
+
},
|
74
|
+
inclusive: true,
|
75
|
+
group: 'color'
|
76
|
+
});
|
77
|
+
export const backgroundColor = createPMMarkSpecFactory({
|
78
|
+
attrs: {
|
79
|
+
color: {}
|
80
|
+
},
|
81
|
+
inclusive: true,
|
82
|
+
excludes: 'color',
|
83
|
+
group: 'color'
|
84
|
+
});
|
85
|
+
export const code = createPMMarkSpecFactory({
|
86
|
+
inclusive: true,
|
87
|
+
excludes: 'fontStyle link searchQuery color'
|
88
|
+
});
|
89
|
+
export const alignment = createPMMarkSpecFactory({
|
90
|
+
attrs: {
|
91
|
+
align: {}
|
92
|
+
},
|
93
|
+
excludes: 'alignment indentation',
|
94
|
+
group: 'alignment'
|
95
|
+
});
|
96
|
+
export const indentation = createPMMarkSpecFactory({
|
97
|
+
attrs: {
|
98
|
+
level: {}
|
99
|
+
},
|
100
|
+
excludes: 'indentation alignment',
|
101
|
+
group: 'indentation'
|
102
|
+
});
|
103
|
+
export const dataConsumer = createPMMarkSpecFactory({
|
104
|
+
attrs: {
|
105
|
+
sources: {
|
106
|
+
default: []
|
107
|
+
}
|
108
|
+
}
|
109
|
+
});
|
110
|
+
export const 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 {};
|