@atlaskit/adf-schema 44.7.0 → 45.1.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 +20 -0
- package/dist/cjs/next-schema/full-schema.adf.js +2 -2
- package/dist/cjs/next-schema/generated/nodeTypes.js +4 -4
- package/dist/cjs/next-schema/groups/blockContentGroup.js +2 -2
- package/dist/cjs/next-schema/groups/blockGroup.js +2 -2
- package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/cjs/next-schema/nodes/blockquote.js +1 -1
- package/dist/cjs/next-schema/nodes/codeBlock.js +8 -18
- package/dist/cjs/next-schema/nodes/extensionFrame.js +1 -1
- package/dist/cjs/next-schema/nodes/list.js +2 -2
- package/dist/cjs/next-schema/nodes/mediaInline.js +0 -8
- package/dist/cjs/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/cjs/next-schema/nodes/panel.js +2 -2
- package/dist/cjs/schema/nodes/code-block.js +1 -5
- package/dist/cjs/validator-schema/generated/validatorSpec.js +23 -30
- package/dist/es2019/next-schema/full-schema.adf.js +2 -2
- package/dist/es2019/next-schema/generated/nodeTypes.js +3 -3
- package/dist/es2019/next-schema/groups/blockContentGroup.js +2 -2
- package/dist/es2019/next-schema/groups/blockGroup.js +2 -2
- package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/es2019/next-schema/nodes/blockquote.js +1 -1
- package/dist/es2019/next-schema/nodes/codeBlock.js +7 -17
- package/dist/es2019/next-schema/nodes/extensionFrame.js +1 -1
- package/dist/es2019/next-schema/nodes/list.js +2 -2
- package/dist/es2019/next-schema/nodes/mediaInline.js +0 -8
- package/dist/es2019/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/es2019/next-schema/nodes/panel.js +2 -2
- package/dist/es2019/schema/nodes/code-block.js +1 -5
- package/dist/es2019/validator-schema/generated/validatorSpec.js +22 -29
- package/dist/esm/next-schema/full-schema.adf.js +2 -2
- package/dist/esm/next-schema/generated/nodeTypes.js +3 -3
- package/dist/esm/next-schema/groups/blockContentGroup.js +2 -2
- package/dist/esm/next-schema/groups/blockGroup.js +2 -2
- package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/esm/next-schema/nodes/blockquote.js +1 -1
- package/dist/esm/next-schema/nodes/codeBlock.js +7 -17
- package/dist/esm/next-schema/nodes/extensionFrame.js +1 -1
- package/dist/esm/next-schema/nodes/list.js +2 -2
- package/dist/esm/next-schema/nodes/mediaInline.js +0 -8
- package/dist/esm/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/esm/next-schema/nodes/panel.js +2 -2
- package/dist/esm/schema/nodes/code-block.js +1 -5
- package/dist/esm/validator-schema/generated/validatorSpec.js +22 -29
- package/dist/json-schema/v1/full.json +76 -60
- package/dist/json-schema/v1/stage-0.json +81 -65
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types/next-schema/generated/nodeTypes.d.ts +20 -19
- package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +5 -1
- package/dist/types/next-schema/groups/tableCellContentPseudoGroup.d.ts +5 -1
- package/dist/types/next-schema/nodes/codeBlock.d.ts +3 -16
- package/dist/types/schema/nodes/code-block.d.ts +1 -4
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +9 -16
- package/json-schema/v1/full.json +76 -60
- package/json-schema/v1/stage-0.json +81 -65
- package/package.json +2 -2
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 45.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- aab5f4d: Validator will now correctly validate media inline nodes with the URL attribute
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- 162fff6: Remove exception for uniqueId on codeBlock and allow property on validator and json schema.
|
12
|
+
|
13
|
+
## 45.0.0
|
14
|
+
|
15
|
+
### Major Changes
|
16
|
+
|
17
|
+
- a3ce608: Remove code block with marks and merge with standard code block definition to resolve adf inconsistencies.
|
18
|
+
|
19
|
+
Major change:
|
20
|
+
|
21
|
+
- Entry-point `@atlaskit/adf-schema/schema-validator` no longer has `codeBlock_with_marks` it has been replaced with `codeBlock`.
|
22
|
+
|
3
23
|
## 44.7.0
|
4
24
|
|
5
25
|
### Minor Changes
|
@@ -9,12 +9,12 @@ var _blockGroup = require("./groups/blockGroup");
|
|
9
9
|
var _layoutSection = require("./nodes/layoutSection");
|
10
10
|
var _blockRootOnlyGroup = require("./groups/blockRootOnlyGroup");
|
11
11
|
var _blockContentGroup = require("./groups/blockContentGroup");
|
12
|
-
var _codeBlock = require("./nodes/codeBlock");
|
13
12
|
var _expand = require("./nodes/expand");
|
13
|
+
var _codeBlock = require("./nodes/codeBlock");
|
14
14
|
var doc = (0, _adfSchemaGenerator.adfNode)('doc').define({
|
15
15
|
root: true,
|
16
16
|
version: 1,
|
17
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _blockContentGroup.blockContentGroup, _codeBlock.codeBlock.use('
|
17
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _blockContentGroup.blockContentGroup, _codeBlock.codeBlock.use('root_only'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup, _expand.expand.use('with_breakout_mark')))],
|
18
18
|
DANGEROUS_MANUAL_OVERRIDE: {
|
19
19
|
'validator-spec': {
|
20
20
|
'props.content.minItems': {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelWithNestedBlockquoteStage0 = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemWithNestedDecisionStage0 = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandWithoutNestedExpand = exports.expandWithNoMark = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelWithNestedBlockquoteStage0 = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemWithNestedDecisionStage0 = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandWithoutNestedExpand = exports.expandWithNoMark = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteWithoutNestedCodeblockOrMedia = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
|
7
7
|
var _createPMSpecFactory = require("../../schema/createPMSpecFactory");
|
8
8
|
/**
|
9
9
|
* This file was automatically generated by @atlaskit/adf-schema-generator
|
@@ -136,9 +136,9 @@ var codeBlock = exports.codeBlock = (0, _createPMSpecFactory.createPMNodeSpecFac
|
|
136
136
|
code: true,
|
137
137
|
defining: true
|
138
138
|
});
|
139
|
-
var
|
139
|
+
var codeBlockRootOnly = exports.codeBlockRootOnly = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
140
|
+
content: '(text | unsupportedInline)*',
|
140
141
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
141
|
-
group: 'block',
|
142
142
|
attrs: {
|
143
143
|
language: {
|
144
144
|
default: null
|
@@ -236,7 +236,7 @@ var decisionList = exports.decisionList = (0, _createPMSpecFactory.createPMNodeS
|
|
236
236
|
defining: true
|
237
237
|
});
|
238
238
|
var doc = exports.doc = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
239
|
-
content: '(block | layoutSection | blockRootOnly)+',
|
239
|
+
content: '(block | codeBlock | layoutSection | blockRootOnly)+',
|
240
240
|
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation dataConsumer fragment breakout'
|
241
241
|
});
|
242
242
|
var embedCard = exports.embedCard = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
@@ -37,8 +37,8 @@ var _unsupportedBlock = require("../nodes/unsupportedBlock");
|
|
37
37
|
* - no base heading
|
38
38
|
* - no base expand
|
39
39
|
*/
|
40
|
-
var blockContentGroup = exports.blockContentGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block_content', [_blockCard.blockCard, _paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock
|
40
|
+
var blockContentGroup = exports.blockContentGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block_content', [_blockCard.blockCard, _paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _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, _panel.panel.use('with_nested_blockquote'), _blockquote.blockquote, _blockquote.blockquote.use('without_nested_codeblock_or_media'), _extension.extension.use('with_marks'), _embedCard.embedCard, _tableNodes.table,
|
41
41
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
42
42
|
_tableNodes.table.use('with_nested_table'), _expand.expand.use('without_nested_expand'), _expand.expand.use('with_no_mark'), _bodiedExtension.bodiedExtension.use('with_marks'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
|
43
|
-
ignore: ['pm-spec'
|
43
|
+
ignore: ['pm-spec']
|
44
44
|
});
|
@@ -24,10 +24,10 @@ var _rule = require("../nodes/rule");
|
|
24
24
|
var _tableNodes = require("../nodes/tableNodes");
|
25
25
|
var _task = require("../nodes/task");
|
26
26
|
var _unsupportedBlock = require("../nodes/unsupportedBlock");
|
27
|
-
var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock,
|
27
|
+
var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _blockquote.blockquote.use('without_nested_codeblock_or_media'), _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _extension.extension.use('with_marks'), _heading.heading, _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _panel.panel.use('with_nested_blockquote'), _tableNodes.table,
|
28
28
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
29
29
|
_tableNodes.table.use('with_nested_table'), _bodiedExtension.bodiedExtension, _bodiedExtension.bodiedExtension.use('with_marks'), _expand.expand, _expand.expand.use('with_no_mark'), _expand.expand.use('with_breakout_mark'), _expand.expand.use('without_nested_expand'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
|
30
30
|
// @DSLCompatibilityException
|
31
31
|
// Block group in PM doesn't match ADF
|
32
|
-
ignore: ['validator-spec']
|
32
|
+
ignore: ['validator-spec', 'json-schema']
|
33
33
|
});
|
@@ -23,7 +23,7 @@ var _task = require("../nodes/task");
|
|
23
23
|
var _unsupportedBlock = require("../nodes/unsupportedBlock");
|
24
24
|
// Not an actual group, but a collection of nodes that can't be nested inside each other
|
25
25
|
// TODO: make it an actual group
|
26
|
-
var nonNestableBlockContent = exports.nonNestableBlockContent = [_paragraph.paragraph.use('with_no_marks'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _codeBlock.codeBlock
|
26
|
+
var nonNestableBlockContent = exports.nonNestableBlockContent = [_paragraph.paragraph.use('with_no_marks'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _codeBlock.codeBlock, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _decisionList.decisionList, _task.taskList, _tableNodes.table,
|
27
27
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
28
28
|
_tableNodes.table.use('with_nested_table'), _blockCard.blockCard, _embedCard.embedCard, _extension.extension.use('with_marks'), _unsupportedBlock.unsupportedBlock];
|
29
29
|
|
@@ -21,7 +21,7 @@ var _paragraph = require("../nodes/paragraph");
|
|
21
21
|
var _rule = require("../nodes/rule");
|
22
22
|
var _task = require("../nodes/task");
|
23
23
|
var _unsupportedBlock = require("../nodes/unsupportedBlock");
|
24
|
-
var tableCellContentNodes = exports.tableCellContentNodes = [_paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock
|
24
|
+
var tableCellContentNodes = exports.tableCellContentNodes = [_paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup, _decisionList.decisionList, _task.taskList, _blockCard.blockCard, _embedCard.embedCard, _extension.extension.use('with_marks'), _nestedExpand.nestedExpand.use('content'), _nestedExpand.nestedExpand.use('with_no_marks')];
|
25
25
|
|
26
26
|
// This is not an actual group, but a collection of nodes
|
27
27
|
// @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
|
@@ -19,7 +19,7 @@ var blockquote = exports.blockquote = (0, _adfSchemaGenerator.adfNode)('blockquo
|
|
19
19
|
// Marks don't make it into the PM node spec, as they get overridden by the marks in
|
20
20
|
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
21
21
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
22
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _list.orderedList, _list.bulletList, _unsupportedBlock.unsupportedBlock, _codeBlock.codeBlock
|
22
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _list.orderedList, _list.bulletList, _unsupportedBlock.unsupportedBlock, _codeBlock.codeBlock, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup))]
|
23
23
|
}).variant('legacy', {
|
24
24
|
ignore: ['json-schema', 'validator-spec'],
|
25
25
|
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _unsupportedBlock.unsupportedBlock))]
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.codeBlock = void 0;
|
7
7
|
var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
|
8
8
|
var _breakout = require("../marks/breakout");
|
9
9
|
var _unsupportedMark = require("../marks/unsupportedMark");
|
@@ -13,10 +13,6 @@ var _unsupportedInline = require("./unsupportedInline");
|
|
13
13
|
var codeBlock = exports.codeBlock = (0, _adfSchemaGenerator.adfNode)('codeBlock').define({
|
14
14
|
code: true,
|
15
15
|
defining: true,
|
16
|
-
// Marks don't make it into the PM node spec, as they get overridden by the marks in
|
17
|
-
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
18
|
-
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
19
|
-
hasEmptyMarks: true,
|
20
16
|
attrs: {
|
21
17
|
language: {
|
22
18
|
type: 'string',
|
@@ -29,13 +25,10 @@ var codeBlock = exports.codeBlock = (0, _adfSchemaGenerator.adfNode)('codeBlock'
|
|
29
25
|
optional: true
|
30
26
|
}
|
31
27
|
},
|
28
|
+
noMarks: true,
|
32
29
|
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_text.text, _unsupportedInline.unsupportedInline))],
|
33
30
|
DANGEROUS_MANUAL_OVERRIDE: {
|
34
31
|
'validator-spec': {
|
35
|
-
'props.attrs.props.uniqueId': {
|
36
|
-
remove: true,
|
37
|
-
reason: '@DSLCompatibilityException - uniqueId is missing in the existing validator spec'
|
38
|
-
},
|
39
32
|
'props.content.items': {
|
40
33
|
value: [['text', {
|
41
34
|
props: {
|
@@ -51,13 +44,10 @@ var codeBlock = exports.codeBlock = (0, _adfSchemaGenerator.adfNode)('codeBlock'
|
|
51
44
|
}
|
52
45
|
}
|
53
46
|
}
|
54
|
-
})
|
47
|
+
})
|
48
|
+
// Variant used root scenario where we have breakout
|
49
|
+
.variant('root_only', {
|
55
50
|
marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
marks: [],
|
60
|
-
noMarks: true,
|
61
|
-
ignore: []
|
62
|
-
});
|
63
|
-
var codeBlockWithNoMarks = exports.codeBlockWithNoMarks = codeBlock;
|
51
|
+
noMarks: false,
|
52
|
+
noExtend: true
|
53
|
+
});
|
@@ -36,7 +36,7 @@ var extensionFrame = exports.extensionFrame = (0, _adfSchemaGenerator.adfNode)('
|
|
36
36
|
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
37
37
|
marks: [_dataConsumer.dataConsumer, _fragment.fragment, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
38
38
|
attrs: {},
|
39
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _codeBlock.codeBlock
|
39
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _codeBlock.codeBlock, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('caption'), _decisionList.decisionList, _task.taskList, _tableNodes.table,
|
40
40
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
41
41
|
_tableNodes.table.use('with_nested_table'), _extension.extension.use('with_marks'), _bodiedExtension.bodiedExtension.use('with_marks'), _unsupportedBlock.unsupportedBlock, _blockCard.blockCard, _embedCard.embedCard))],
|
42
42
|
DANGEROUS_MANUAL_OVERRIDE: {
|
@@ -20,9 +20,9 @@ var listItem = (0, _adfSchemaGenerator.adfNode)('listItem').define({
|
|
20
20
|
selectable: false,
|
21
21
|
marks: [_unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
22
22
|
contentMinItems: 1,
|
23
|
-
content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock
|
23
|
+
content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), bulletList, orderedList, _task.taskList, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock))]
|
24
24
|
}).variant('with_nested_decision', {
|
25
|
-
content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock
|
25
|
+
content: [(0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock, _decisionList.decisionList), (0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), bulletList, orderedList, _task.taskList, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _unsupportedBlock.unsupportedBlock, _decisionList.decisionList))],
|
26
26
|
noExtend: true,
|
27
27
|
stage0: true
|
28
28
|
});
|
@@ -97,13 +97,5 @@ var mediaInline = exports.mediaInline = (0, _adfSchemaGenerator.adfNode)('mediaI
|
|
97
97
|
type: 'object',
|
98
98
|
optional: true
|
99
99
|
}
|
100
|
-
},
|
101
|
-
DANGEROUS_MANUAL_OVERRIDE: {
|
102
|
-
'validator-spec': {
|
103
|
-
'props.attrs.props.url': {
|
104
|
-
remove: true,
|
105
|
-
reason: '@DSLCompatibilityException - url is not specified on the validator spec (but it probably should be)'
|
106
|
-
}
|
107
|
-
}
|
108
100
|
}
|
109
101
|
});
|
@@ -35,7 +35,7 @@ var nestedExpand = exports.nestedExpand = (0, _adfSchemaGenerator.adfNode)('nest
|
|
35
35
|
optional: true
|
36
36
|
}
|
37
37
|
},
|
38
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup, _codeBlock.codeBlock
|
38
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup, _codeBlock.codeBlock, _list.bulletList, _list.orderedList, _task.taskList, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _unsupportedBlock.unsupportedBlock))],
|
39
39
|
DANGEROUS_MANUAL_OVERRIDE: {
|
40
40
|
'validator-spec': {
|
41
41
|
'props.attrs.optional': {
|
@@ -49,9 +49,9 @@ var panel = exports.panel = (0, _adfSchemaGenerator.adfNode)('panel').define({
|
|
49
49
|
optional: true
|
50
50
|
}
|
51
51
|
},
|
52
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock
|
52
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _task.taskList, _rule.rule, _decisionList.decisionList, _unsupportedBlock.unsupportedBlock))]
|
53
53
|
}).variant('with_nested_blockquote', {
|
54
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock
|
54
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _list.bulletList, _list.orderedList, _blockCard.blockCard, _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _codeBlock.codeBlock, _task.taskList, _rule.rule, _decisionList.decisionList, _unsupportedBlock.unsupportedBlock, _blockquote.blockquote))],
|
55
55
|
noExtend: true,
|
56
56
|
stage0: true
|
57
57
|
});
|
@@ -6,16 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.toJSON = exports.codeBlock = void 0;
|
7
7
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
8
8
|
var _nodeTypes = require("../../next-schema/generated/nodeTypes");
|
9
|
-
/**
|
10
|
-
* @name codeBlock_node
|
11
|
-
*/
|
12
|
-
|
13
9
|
/**
|
14
10
|
* @name codeBlock_with_no_marks_node
|
15
11
|
*/
|
16
12
|
|
17
13
|
/**
|
18
|
-
* @name
|
14
|
+
* @name codeBlock_node
|
19
15
|
*/
|
20
16
|
|
21
17
|
var getLanguageFromEditorStyle = function getLanguageFromEditorStyle(dom) {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.underline = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel_with_nested_blockquote = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_nested_decision = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_with_no_mark = exports.expand_with_breakout_mark = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.
|
6
|
+
exports.underline = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel_with_nested_blockquote = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_nested_decision = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_with_no_mark = exports.expand_with_breakout_mark = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
|
7
7
|
var alignment = exports.alignment = {
|
8
8
|
props: {
|
9
9
|
type: {
|
@@ -55,7 +55,7 @@ var backgroundColor = exports.backgroundColor = {
|
|
55
55
|
}
|
56
56
|
}
|
57
57
|
};
|
58
|
-
var block_content = exports.block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', '
|
58
|
+
var block_content = exports.block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'panel_with_nested_blockquote', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks'];
|
59
59
|
var blockCard = exports.blockCard = {
|
60
60
|
props: {
|
61
61
|
type: {
|
@@ -129,7 +129,7 @@ var blockquote = exports.blockquote = {
|
|
129
129
|
},
|
130
130
|
content: {
|
131
131
|
type: 'array',
|
132
|
-
items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', '
|
132
|
+
items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup']],
|
133
133
|
minItems: 1,
|
134
134
|
allowUnsupportedBlock: true
|
135
135
|
}
|
@@ -281,6 +281,10 @@ var codeBlock = exports.codeBlock = {
|
|
281
281
|
language: {
|
282
282
|
type: 'string',
|
283
283
|
optional: true
|
284
|
+
},
|
285
|
+
uniqueId: {
|
286
|
+
type: 'string',
|
287
|
+
optional: true
|
284
288
|
}
|
285
289
|
},
|
286
290
|
optional: true
|
@@ -299,15 +303,10 @@ var codeBlock = exports.codeBlock = {
|
|
299
303
|
}]],
|
300
304
|
optional: true,
|
301
305
|
allowUnsupportedInline: true
|
302
|
-
},
|
303
|
-
marks: {
|
304
|
-
type: 'array',
|
305
|
-
items: [],
|
306
|
-
optional: true
|
307
306
|
}
|
308
307
|
}
|
309
308
|
};
|
310
|
-
var
|
309
|
+
var codeBlock_root_only = exports.codeBlock_root_only = ['codeBlock', {
|
311
310
|
props: {
|
312
311
|
marks: {
|
313
312
|
type: 'array',
|
@@ -316,16 +315,6 @@ var codeBlock_with_marks = exports.codeBlock_with_marks = ['codeBlock', {
|
|
316
315
|
}
|
317
316
|
}
|
318
317
|
}];
|
319
|
-
var codeBlock_with_no_marks = exports.codeBlock_with_no_marks = ['codeBlock', {
|
320
|
-
props: {
|
321
|
-
marks: {
|
322
|
-
type: 'array',
|
323
|
-
maxItems: 0,
|
324
|
-
items: [],
|
325
|
-
optional: true
|
326
|
-
}
|
327
|
-
}
|
328
|
-
}];
|
329
318
|
var confluenceInlineComment = exports.confluenceInlineComment = {
|
330
319
|
props: {
|
331
320
|
type: {
|
@@ -438,7 +427,7 @@ var doc = exports.doc = {
|
|
438
427
|
},
|
439
428
|
content: {
|
440
429
|
type: 'array',
|
441
|
-
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', '
|
430
|
+
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'panel_with_nested_blockquote', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand_with_no_mark', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_with_breakout_mark']],
|
442
431
|
allowUnsupportedBlock: true
|
443
432
|
}
|
444
433
|
}
|
@@ -529,7 +518,7 @@ var expand = exports.expand = {
|
|
529
518
|
},
|
530
519
|
content: {
|
531
520
|
type: 'array',
|
532
|
-
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', '
|
521
|
+
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
533
522
|
minItems: 1,
|
534
523
|
allowUnsupportedBlock: true
|
535
524
|
},
|
@@ -619,7 +608,7 @@ var extensionFrame = exports.extensionFrame = {
|
|
619
608
|
},
|
620
609
|
content: {
|
621
610
|
type: 'array',
|
622
|
-
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', '
|
611
|
+
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_full', 'mediaSingle_caption', 'decisionList', 'taskList', 'table', 'extension_with_marks', 'bodiedExtension_with_marks', 'blockCard', 'embedCard']],
|
623
612
|
minItems: 1
|
624
613
|
},
|
625
614
|
marks: {
|
@@ -946,7 +935,7 @@ var listItem = exports.listItem = {
|
|
946
935
|
content: {
|
947
936
|
type: 'array',
|
948
937
|
isTupleLike: true,
|
949
|
-
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', '
|
938
|
+
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock'], ['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock']],
|
950
939
|
minItems: 1,
|
951
940
|
allowUnsupportedBlock: true
|
952
941
|
}
|
@@ -957,7 +946,7 @@ var listItem_with_nested_decision = exports.listItem_with_nested_decision = ['li
|
|
957
946
|
content: {
|
958
947
|
type: 'array',
|
959
948
|
isTupleLike: true,
|
960
|
-
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', '
|
949
|
+
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'decisionList'], ['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'decisionList']],
|
961
950
|
minItems: 1,
|
962
951
|
allowUnsupportedBlock: true
|
963
952
|
}
|
@@ -1058,6 +1047,10 @@ var mediaInline = exports.mediaInline = {
|
|
1058
1047
|
values: ['link', 'file', 'image'],
|
1059
1048
|
optional: true
|
1060
1049
|
},
|
1050
|
+
url: {
|
1051
|
+
type: 'string',
|
1052
|
+
optional: true
|
1053
|
+
},
|
1061
1054
|
id: {
|
1062
1055
|
minLength: 1,
|
1063
1056
|
type: 'string'
|
@@ -1280,7 +1273,7 @@ var nestedExpand = exports.nestedExpand = {
|
|
1280
1273
|
};
|
1281
1274
|
var nestedExpand_content = exports.nestedExpand_content = {
|
1282
1275
|
type: 'array',
|
1283
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', '
|
1276
|
+
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote']],
|
1284
1277
|
minItems: 1,
|
1285
1278
|
allowUnsupportedBlock: true
|
1286
1279
|
};
|
@@ -1294,7 +1287,7 @@ var nestedExpand_with_no_marks = exports.nestedExpand_with_no_marks = ['nestedEx
|
|
1294
1287
|
}
|
1295
1288
|
}
|
1296
1289
|
}];
|
1297
|
-
var non_nestable_block_content = exports.non_nestable_block_content = ['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', '
|
1290
|
+
var non_nestable_block_content = exports.non_nestable_block_content = ['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks'];
|
1298
1291
|
var orderedList = exports.orderedList = {
|
1299
1292
|
props: {
|
1300
1293
|
type: {
|
@@ -1350,7 +1343,7 @@ var panel = exports.panel = {
|
|
1350
1343
|
},
|
1351
1344
|
content: {
|
1352
1345
|
type: 'array',
|
1353
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', '
|
1346
|
+
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList']],
|
1354
1347
|
minItems: 1,
|
1355
1348
|
allowUnsupportedBlock: true
|
1356
1349
|
}
|
@@ -1360,7 +1353,7 @@ var panel_with_nested_blockquote = exports.panel_with_nested_blockquote = ['pane
|
|
1360
1353
|
props: {
|
1361
1354
|
content: {
|
1362
1355
|
type: 'array',
|
1363
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', '
|
1356
|
+
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList', 'blockquote']],
|
1364
1357
|
minItems: 1,
|
1365
1358
|
allowUnsupportedBlock: true
|
1366
1359
|
}
|
@@ -1588,7 +1581,7 @@ var tableCell = exports.tableCell = {
|
|
1588
1581
|
},
|
1589
1582
|
content: {
|
1590
1583
|
type: 'array',
|
1591
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', '
|
1584
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
1592
1585
|
minItems: 1,
|
1593
1586
|
allowUnsupportedBlock: true
|
1594
1587
|
}
|
@@ -1627,7 +1620,7 @@ var tableHeader = exports.tableHeader = {
|
|
1627
1620
|
},
|
1628
1621
|
content: {
|
1629
1622
|
type: 'array',
|
1630
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', '
|
1623
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
|
1631
1624
|
minItems: 1
|
1632
1625
|
}
|
1633
1626
|
},
|
@@ -3,12 +3,12 @@ import { blockGroup } from './groups/blockGroup';
|
|
3
3
|
import { layoutSection } from './nodes/layoutSection';
|
4
4
|
import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
|
5
5
|
import { blockContentGroup } from './groups/blockContentGroup';
|
6
|
-
import { codeBlock } from './nodes/codeBlock';
|
7
6
|
import { expand } from './nodes/expand';
|
7
|
+
import { codeBlock } from './nodes/codeBlock';
|
8
8
|
const doc = adfNode('doc').define({
|
9
9
|
root: true,
|
10
10
|
version: 1,
|
11
|
-
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('
|
11
|
+
content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('with_breakout_mark')))],
|
12
12
|
DANGEROUS_MANUAL_OVERRIDE: {
|
13
13
|
'validator-spec': {
|
14
14
|
'props.content.minItems': {
|
@@ -130,9 +130,9 @@ export const codeBlock = createPMNodeSpecFactory({
|
|
130
130
|
code: true,
|
131
131
|
defining: true
|
132
132
|
});
|
133
|
-
export const
|
133
|
+
export const codeBlockRootOnly = createPMNodeSpecFactory({
|
134
|
+
content: '(text | unsupportedInline)*',
|
134
135
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
135
|
-
group: 'block',
|
136
136
|
attrs: {
|
137
137
|
language: {
|
138
138
|
default: null
|
@@ -230,7 +230,7 @@ export const decisionList = createPMNodeSpecFactory({
|
|
230
230
|
defining: true
|
231
231
|
});
|
232
232
|
export const doc = createPMNodeSpecFactory({
|
233
|
-
content: '(block | layoutSection | blockRootOnly)+',
|
233
|
+
content: '(block | codeBlock | layoutSection | blockRootOnly)+',
|
234
234
|
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation dataConsumer fragment breakout'
|
235
235
|
});
|
236
236
|
export const embedCard = createPMNodeSpecFactory({
|
@@ -32,8 +32,8 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
32
32
|
* - no base heading
|
33
33
|
* - no base expand
|
34
34
|
*/
|
35
|
-
export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock
|
35
|
+
export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, panel.use('with_nested_blockquote'), blockquote, blockquote.use('without_nested_codeblock_or_media'), extension.use('with_marks'), embedCard, table,
|
36
36
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
37
37
|
table.use('with_nested_table'), expand.use('without_nested_expand'), expand.use('with_no_mark'), bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
|
38
|
-
ignore: ['pm-spec'
|
38
|
+
ignore: ['pm-spec']
|
39
39
|
});
|
@@ -18,10 +18,10 @@ import { rule } from '../nodes/rule';
|
|
18
18
|
import { table } from '../nodes/tableNodes';
|
19
19
|
import { taskList } from '../nodes/task';
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
21
|
-
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock,
|
21
|
+
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), blockquote.use('without_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('with_nested_blockquote'), table,
|
22
22
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
23
23
|
table.use('with_nested_table'), bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_no_mark'), expand.use('with_breakout_mark'), expand.use('without_nested_expand'), confluenceUnsupportedBlock, unsupportedBlock], {
|
24
24
|
// @DSLCompatibilityException
|
25
25
|
// Block group in PM doesn't match ADF
|
26
|
-
ignore: ['validator-spec']
|
26
|
+
ignore: ['validator-spec', 'json-schema']
|
27
27
|
});
|
@@ -18,7 +18,7 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
18
18
|
|
19
19
|
// Not an actual group, but a collection of nodes that can't be nested inside each other
|
20
20
|
// TODO: make it an actual group
|
21
|
-
export const nonNestableBlockContent = [paragraph.use('with_no_marks'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock
|
21
|
+
export const nonNestableBlockContent = [paragraph.use('with_no_marks'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), decisionList, taskList, table,
|
22
22
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
23
23
|
table.use('with_nested_table'), blockCard, embedCard, extension.use('with_marks'), unsupportedBlock];
|
24
24
|
|
@@ -15,7 +15,7 @@ import { paragraph } from '../nodes/paragraph';
|
|
15
15
|
import { rule } from '../nodes/rule';
|
16
16
|
import { taskList } from '../nodes/task';
|
17
17
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
18
|
-
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock
|
18
|
+
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks')];
|
19
19
|
|
20
20
|
// This is not an actual group, but a collection of nodes
|
21
21
|
// @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
|
@@ -13,7 +13,7 @@ export const blockquote = adfNode('blockquote').define({
|
|
13
13
|
// Marks don't make it into the PM node spec, as they get overridden by the marks in
|
14
14
|
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
15
15
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
16
|
-
content: [$onePlus($or(paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock, codeBlock
|
16
|
+
content: [$onePlus($or(paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock, codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup))]
|
17
17
|
}).variant('legacy', {
|
18
18
|
ignore: ['json-schema', 'validator-spec'],
|
19
19
|
content: [$onePlus($or(paragraph, unsupportedBlock))]
|