@atlaskit/adf-schema 52.8.0 → 52.9.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 +13 -0
- package/dist/cjs/next-schema/generated/nodeTypes.js +9 -27
- package/dist/cjs/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
- package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/cjs/next-schema/marks/fontSize.js +1 -2
- package/dist/cjs/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/cjs/next-schema/nodes/paragraph.js +3 -14
- package/dist/cjs/schema/default-schema.js +1 -5
- package/dist/cjs/validator-schema/generated/validatorSpec.js +8 -26
- package/dist/es2019/next-schema/generated/nodeTypes.js +8 -26
- package/dist/es2019/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
- package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/es2019/next-schema/marks/fontSize.js +1 -2
- package/dist/es2019/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/es2019/next-schema/nodes/paragraph.js +3 -14
- package/dist/es2019/schema/default-schema.js +1 -5
- package/dist/es2019/validator-schema/generated/validatorSpec.js +7 -25
- package/dist/esm/next-schema/generated/nodeTypes.js +8 -26
- package/dist/esm/next-schema/groups/blockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/blockGroup.js +1 -1
- package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/esm/next-schema/marks/fontSize.js +1 -2
- package/dist/esm/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/esm/next-schema/nodes/paragraph.js +3 -14
- package/dist/esm/schema/default-schema.js +1 -5
- package/dist/esm/validator-schema/generated/validatorSpec.js +7 -25
- package/dist/json-schema/v1/full.json +73 -2
- package/dist/json-schema/v1/stage-0.json +8 -67
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types/next-schema/generated/nodeTypes.d.ts +18 -36
- package/dist/types/next-schema/nodes/paragraph.d.ts +1 -14
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +2 -20
- package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +18 -36
- package/dist/types-ts4.5/next-schema/nodes/paragraph.d.ts +1 -14
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +2 -20
- package/json-schema/v1/full.json +73 -2
- package/json-schema/v1/stage-0.json +8 -67
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/adf-schema
|
|
2
2
|
|
|
3
|
+
## 52.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 52.9.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`d0c2a171a3796`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d0c2a171a3796) -
|
|
14
|
+
Promote fontSize mark to full-schema
|
|
15
|
+
|
|
3
16
|
## 52.8.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = 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.syncBlock = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.
|
|
6
|
+
exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = 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.syncBlock = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithFontSize = exports.paragraphWithAlignment = exports.paragraph = 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.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.expandRootOnly = 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.codeBlockWithExtendedAttributesStage0 = exports.codeBlockRootOnlyWithExtendedAttributesStage0 = exports.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedSyncBlock = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = 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
|
|
@@ -131,7 +131,7 @@ var bodiedExtensionWithMarks = exports.bodiedExtensionWithMarks = (0, _createPMS
|
|
|
131
131
|
});
|
|
132
132
|
var bodiedSyncBlock = exports.bodiedSyncBlock = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
133
133
|
content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | rule | table | taskList | unsupportedBlock)+',
|
|
134
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation
|
|
134
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation breakout link fragment',
|
|
135
135
|
attrs: {
|
|
136
136
|
resourceId: {
|
|
137
137
|
default: ''
|
|
@@ -340,7 +340,7 @@ var decisionList = exports.decisionList = (0, _createPMSpecFactory.createPMNodeS
|
|
|
340
340
|
});
|
|
341
341
|
var doc = exports.doc = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
342
342
|
content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
343
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation
|
|
343
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment breakout'
|
|
344
344
|
});
|
|
345
345
|
var embedCard = exports.embedCard = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
346
346
|
group: 'block',
|
|
@@ -662,7 +662,7 @@ var inlineExtensionWithMarks = exports.inlineExtensionWithMarks = (0, _createPMS
|
|
|
662
662
|
});
|
|
663
663
|
var layoutColumn = exports.layoutColumn = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
664
664
|
content: '(block | unsupportedBlock)+',
|
|
665
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation
|
|
665
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment',
|
|
666
666
|
attrs: {
|
|
667
667
|
width: {
|
|
668
668
|
default: undefined
|
|
@@ -1068,25 +1068,7 @@ var paragraphWithAlignment = exports.paragraphWithAlignment = (0, _createPMSpecF
|
|
|
1068
1068
|
},
|
|
1069
1069
|
selectable: false
|
|
1070
1070
|
});
|
|
1071
|
-
var
|
|
1072
|
-
group: 'block',
|
|
1073
|
-
attrs: {
|
|
1074
|
-
localId: {
|
|
1075
|
-
default: null
|
|
1076
|
-
}
|
|
1077
|
-
},
|
|
1078
|
-
selectable: false
|
|
1079
|
-
});
|
|
1080
|
-
var paragraphWithFontSizeAndIndentationStage0 = exports.paragraphWithFontSizeAndIndentationStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1081
|
-
group: 'block',
|
|
1082
|
-
attrs: {
|
|
1083
|
-
localId: {
|
|
1084
|
-
default: null
|
|
1085
|
-
}
|
|
1086
|
-
},
|
|
1087
|
-
selectable: false
|
|
1088
|
-
});
|
|
1089
|
-
var paragraphWithFontSizeStage0 = exports.paragraphWithFontSizeStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1071
|
+
var paragraphWithFontSize = exports.paragraphWithFontSize = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1090
1072
|
attrs: {
|
|
1091
1073
|
localId: {
|
|
1092
1074
|
default: null
|
|
@@ -1241,7 +1223,7 @@ var tableWithNestedTable = exports.tableWithNestedTable = (0, _createPMSpecFacto
|
|
|
1241
1223
|
});
|
|
1242
1224
|
var tableCell = exports.tableCell = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1243
1225
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
|
|
1244
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute
|
|
1226
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1245
1227
|
attrs: {
|
|
1246
1228
|
colspan: {
|
|
1247
1229
|
default: 1
|
|
@@ -1265,7 +1247,7 @@ var tableCell = exports.tableCell = (0, _createPMSpecFactory.createPMNodeSpecFac
|
|
|
1265
1247
|
});
|
|
1266
1248
|
var tableCellWithNestedTable = exports.tableCellWithNestedTable = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1267
1249
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock | table)+',
|
|
1268
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute
|
|
1250
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1269
1251
|
attrs: {
|
|
1270
1252
|
colspan: {
|
|
1271
1253
|
default: 1
|
|
@@ -1289,7 +1271,7 @@ var tableCellWithNestedTable = exports.tableCellWithNestedTable = (0, _createPMS
|
|
|
1289
1271
|
});
|
|
1290
1272
|
var tableHeader = exports.tableHeader = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1291
1273
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand)+',
|
|
1292
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute
|
|
1274
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1293
1275
|
attrs: {
|
|
1294
1276
|
colspan: {
|
|
1295
1277
|
default: 1
|
|
@@ -1313,7 +1295,7 @@ var tableHeader = exports.tableHeader = (0, _createPMSpecFactory.createPMNodeSpe
|
|
|
1313
1295
|
});
|
|
1314
1296
|
var tableHeaderWithNestedTable = exports.tableHeaderWithNestedTable = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
|
|
1315
1297
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | table)+',
|
|
1316
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute
|
|
1298
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1317
1299
|
attrs: {
|
|
1318
1300
|
colspan: {
|
|
1319
1301
|
default: 1
|
|
@@ -36,7 +36,7 @@ var _unsupportedBlock = require("../nodes/unsupportedBlock");
|
|
|
36
36
|
* - no base mediaSingle
|
|
37
37
|
* - no base heading
|
|
38
38
|
*/
|
|
39
|
-
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'),
|
|
39
|
+
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, _codeBlock.codeBlock.use('with_extended_attributes'), _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, _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'), _expand.expand, _bodiedExtension.bodiedExtension.use('with_marks'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
|
|
42
42
|
ignore: ['pm-spec']
|
|
@@ -24,7 +24,7 @@ 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, _codeBlock.codeBlock.use('with_extended_attributes'), _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('
|
|
27
|
+
var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_extended_attributes'), _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'), _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, _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, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
|
|
30
30
|
// @DSLCompatibilityException
|
|
@@ -22,7 +22,7 @@ var _rule = require("../nodes/rule");
|
|
|
22
22
|
var _task = require("../nodes/task");
|
|
23
23
|
var _unsupportedBlock = require("../nodes/unsupportedBlock");
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
-
var tableCellContentNodes = exports.tableCellContentNodes = [_paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'),
|
|
25
|
+
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, _codeBlock.codeBlock.use('with_extended_attributes'), _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')];
|
|
26
26
|
|
|
27
27
|
// This is not an actual group, but a collection of nodes
|
|
28
28
|
// @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
|
|
@@ -40,7 +40,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = (0, _adfSchemaGenerator.adfNode)
|
|
|
40
40
|
default: ''
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('
|
|
43
|
+
content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _blockCard.blockCard, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _list.bulletList, _codeBlock.codeBlock, _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _decisionList.decisionList, _embedCard.embedCard, _expand.expand, _heading.heading, _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _mediaGroup.mediaGroup, _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _list.orderedList, _panel.panel, _rule.rule, _tableNodes.table,
|
|
44
44
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
45
45
|
_tableNodes.table.use('with_nested_table'), _task.taskList, _unsupportedBlock.unsupportedBlock))]
|
|
46
46
|
});
|
|
@@ -24,11 +24,11 @@ var paragraph = exports.paragraph = (0, _adfSchemaGenerator.adfNode)('paragraph'
|
|
|
24
24
|
hasEmptyMarks: true,
|
|
25
25
|
content: [(0, _adfSchemaGenerator.$zeroPlus)((0, _adfSchemaGenerator.$or)(_inlineGroup.inlineGroup, _inlineContentGroup.inlineContentGroup))]
|
|
26
26
|
}).variant('with_alignment', {
|
|
27
|
-
marks: [_alignmentAndIndentation.alignment, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
27
|
+
marks: [_fontSize.fontSize, _alignmentAndIndentation.alignment, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
28
28
|
content: [],
|
|
29
29
|
ignore: []
|
|
30
30
|
}).variant('with_indentation', {
|
|
31
|
-
marks: [_alignmentAndIndentation.indentation, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
31
|
+
marks: [_fontSize.fontSize, _alignmentAndIndentation.indentation, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
32
32
|
content: [],
|
|
33
33
|
ignore: []
|
|
34
34
|
}).variant('with_marks', {
|
|
@@ -43,16 +43,5 @@ var paragraph = exports.paragraph = (0, _adfSchemaGenerator.adfNode)('paragraph'
|
|
|
43
43
|
}).variant('with_font_size', {
|
|
44
44
|
marks: [_fontSize.fontSize, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
45
45
|
content: [],
|
|
46
|
-
ignore: []
|
|
47
|
-
stage0: true
|
|
48
|
-
}).variant('with_font_size_and_alignment', {
|
|
49
|
-
marks: [_fontSize.fontSize, _alignmentAndIndentation.alignment, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
50
|
-
content: [],
|
|
51
|
-
ignore: [],
|
|
52
|
-
stage0: true
|
|
53
|
-
}).variant('with_font_size_and_indentation', {
|
|
54
|
-
marks: [_fontSize.fontSize, _alignmentAndIndentation.indentation, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
|
|
55
|
-
content: [],
|
|
56
|
-
ignore: [],
|
|
57
|
-
stage0: true
|
|
46
|
+
ignore: []
|
|
58
47
|
});
|
|
@@ -8,11 +8,10 @@ exports.getSchemaBasedOnStage = exports.defaultSchemaConfig = exports.defaultSch
|
|
|
8
8
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
9
9
|
var _nodes = require("./nodes");
|
|
10
10
|
var _createSchema = require("./create-schema");
|
|
11
|
-
var _fontSize = require("./marks/font-size");
|
|
12
11
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
13
12
|
var defaultSchemaConfig = {
|
|
14
13
|
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
15
|
-
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
|
14
|
+
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'fontSize', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
|
16
15
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
|
17
16
|
'fragment']
|
|
18
17
|
};
|
|
@@ -38,9 +37,6 @@ function () {
|
|
|
38
37
|
tableHeader: _nodes.tableHeaderWithNestedTable,
|
|
39
38
|
codeBlock: _nodes.codeBlockWithExtendedAttributes
|
|
40
39
|
};
|
|
41
|
-
defaultSchemaConfig.customMarkSpecs = {
|
|
42
|
-
fontSize: _fontSize.fontSize
|
|
43
|
-
};
|
|
44
40
|
}
|
|
45
41
|
return (0, _createSchema.createSchema)(defaultSchemaConfig);
|
|
46
42
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.underline = exports.text_with_no_marks = 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.syncBlock = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.
|
|
6
|
+
exports.underline = exports.text_with_no_marks = 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.syncBlock = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_font_size = exports.paragraph_with_alignment = exports.paragraph = 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 = 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.fontSize = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_root_only = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_with_extended_attributes = exports.codeBlock_root_only_with_extended_attributes = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedSyncBlock = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockTaskItem = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
|
|
7
7
|
var alignment = exports.alignment = {
|
|
8
8
|
props: {
|
|
9
9
|
attrs: {
|
|
@@ -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', '
|
|
58
|
+
var block_content = exports.block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'codeBlock_with_extended_attributes', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks'];
|
|
59
59
|
var blockCard = exports.blockCard = {
|
|
60
60
|
props: {
|
|
61
61
|
attrs: [{
|
|
@@ -254,7 +254,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = {
|
|
|
254
254
|
},
|
|
255
255
|
content: {
|
|
256
256
|
allowUnsupportedBlock: true,
|
|
257
|
-
items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', '
|
|
257
|
+
items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'layoutSection_with_single_column', 'layoutSection_full', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'rule', 'table', 'taskList']],
|
|
258
258
|
minItems: 1,
|
|
259
259
|
type: 'array'
|
|
260
260
|
},
|
|
@@ -574,7 +574,7 @@ var doc = exports.doc = {
|
|
|
574
574
|
props: {
|
|
575
575
|
content: {
|
|
576
576
|
allowUnsupportedBlock: true,
|
|
577
|
-
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', '
|
|
577
|
+
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'codeBlock_with_extended_attributes', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'codeBlock_root_only_with_extended_attributes', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
578
578
|
type: 'array'
|
|
579
579
|
},
|
|
580
580
|
type: {
|
|
@@ -1607,7 +1607,7 @@ var paragraph = exports.paragraph = {
|
|
|
1607
1607
|
var paragraph_with_alignment = exports.paragraph_with_alignment = ['paragraph', {
|
|
1608
1608
|
props: {
|
|
1609
1609
|
marks: {
|
|
1610
|
-
items: ['alignment'],
|
|
1610
|
+
items: [['fontSize', 'alignment']],
|
|
1611
1611
|
optional: true,
|
|
1612
1612
|
type: 'array'
|
|
1613
1613
|
}
|
|
@@ -1622,28 +1622,10 @@ var paragraph_with_font_size = exports.paragraph_with_font_size = ['paragraph',
|
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
1624
|
}];
|
|
1625
|
-
var paragraph_with_font_size_and_alignment = exports.paragraph_with_font_size_and_alignment = ['paragraph', {
|
|
1626
|
-
props: {
|
|
1627
|
-
marks: {
|
|
1628
|
-
items: [['fontSize', 'alignment']],
|
|
1629
|
-
optional: true,
|
|
1630
|
-
type: 'array'
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
}];
|
|
1634
|
-
var paragraph_with_font_size_and_indentation = exports.paragraph_with_font_size_and_indentation = ['paragraph', {
|
|
1635
|
-
props: {
|
|
1636
|
-
marks: {
|
|
1637
|
-
items: [['fontSize', 'indentation']],
|
|
1638
|
-
optional: true,
|
|
1639
|
-
type: 'array'
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
}];
|
|
1643
1625
|
var paragraph_with_indentation = exports.paragraph_with_indentation = ['paragraph', {
|
|
1644
1626
|
props: {
|
|
1645
1627
|
marks: {
|
|
1646
|
-
items: ['indentation'],
|
|
1628
|
+
items: [['fontSize', 'indentation']],
|
|
1647
1629
|
optional: true,
|
|
1648
1630
|
type: 'array'
|
|
1649
1631
|
}
|
|
@@ -1861,7 +1843,7 @@ var tableCell = exports.tableCell = {
|
|
|
1861
1843
|
},
|
|
1862
1844
|
content: {
|
|
1863
1845
|
allowUnsupportedBlock: true,
|
|
1864
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', '
|
|
1846
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'codeBlock_with_extended_attributes', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
|
1865
1847
|
minItems: 1,
|
|
1866
1848
|
type: 'array'
|
|
1867
1849
|
},
|
|
@@ -1903,7 +1885,7 @@ var tableHeader = exports.tableHeader = {
|
|
|
1903
1885
|
}
|
|
1904
1886
|
},
|
|
1905
1887
|
content: {
|
|
1906
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', '
|
|
1888
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'codeBlock_with_extended_attributes', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
|
|
1907
1889
|
minItems: 1,
|
|
1908
1890
|
type: 'array'
|
|
1909
1891
|
},
|
|
@@ -125,7 +125,7 @@ export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
125
125
|
});
|
|
126
126
|
export const bodiedSyncBlock = createPMNodeSpecFactory({
|
|
127
127
|
content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | rule | table | taskList | unsupportedBlock)+',
|
|
128
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation
|
|
128
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation breakout link fragment',
|
|
129
129
|
attrs: {
|
|
130
130
|
resourceId: {
|
|
131
131
|
default: ''
|
|
@@ -334,7 +334,7 @@ export const decisionList = createPMNodeSpecFactory({
|
|
|
334
334
|
});
|
|
335
335
|
export const doc = createPMNodeSpecFactory({
|
|
336
336
|
content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
337
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation
|
|
337
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment breakout'
|
|
338
338
|
});
|
|
339
339
|
export const embedCard = createPMNodeSpecFactory({
|
|
340
340
|
group: 'block',
|
|
@@ -656,7 +656,7 @@ export const inlineExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
656
656
|
});
|
|
657
657
|
export const layoutColumn = createPMNodeSpecFactory({
|
|
658
658
|
content: '(block | unsupportedBlock)+',
|
|
659
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation
|
|
659
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment',
|
|
660
660
|
attrs: {
|
|
661
661
|
width: {
|
|
662
662
|
default: undefined
|
|
@@ -1062,25 +1062,7 @@ export const paragraphWithAlignment = createPMNodeSpecFactory({
|
|
|
1062
1062
|
},
|
|
1063
1063
|
selectable: false
|
|
1064
1064
|
});
|
|
1065
|
-
export const
|
|
1066
|
-
group: 'block',
|
|
1067
|
-
attrs: {
|
|
1068
|
-
localId: {
|
|
1069
|
-
default: null
|
|
1070
|
-
}
|
|
1071
|
-
},
|
|
1072
|
-
selectable: false
|
|
1073
|
-
});
|
|
1074
|
-
export const paragraphWithFontSizeAndIndentationStage0 = createPMNodeSpecFactory({
|
|
1075
|
-
group: 'block',
|
|
1076
|
-
attrs: {
|
|
1077
|
-
localId: {
|
|
1078
|
-
default: null
|
|
1079
|
-
}
|
|
1080
|
-
},
|
|
1081
|
-
selectable: false
|
|
1082
|
-
});
|
|
1083
|
-
export const paragraphWithFontSizeStage0 = createPMNodeSpecFactory({
|
|
1065
|
+
export const paragraphWithFontSize = createPMNodeSpecFactory({
|
|
1084
1066
|
attrs: {
|
|
1085
1067
|
localId: {
|
|
1086
1068
|
default: null
|
|
@@ -1235,7 +1217,7 @@ export const tableWithNestedTable = createPMNodeSpecFactory({
|
|
|
1235
1217
|
});
|
|
1236
1218
|
export const tableCell = createPMNodeSpecFactory({
|
|
1237
1219
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
|
|
1238
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute
|
|
1220
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1239
1221
|
attrs: {
|
|
1240
1222
|
colspan: {
|
|
1241
1223
|
default: 1
|
|
@@ -1259,7 +1241,7 @@ export const tableCell = createPMNodeSpecFactory({
|
|
|
1259
1241
|
});
|
|
1260
1242
|
export const tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
1261
1243
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock | table)+',
|
|
1262
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute
|
|
1244
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1263
1245
|
attrs: {
|
|
1264
1246
|
colspan: {
|
|
1265
1247
|
default: 1
|
|
@@ -1283,7 +1265,7 @@ export const tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
|
1283
1265
|
});
|
|
1284
1266
|
export const tableHeader = createPMNodeSpecFactory({
|
|
1285
1267
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand)+',
|
|
1286
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute
|
|
1268
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1287
1269
|
attrs: {
|
|
1288
1270
|
colspan: {
|
|
1289
1271
|
default: 1
|
|
@@ -1307,7 +1289,7 @@ export const tableHeader = createPMNodeSpecFactory({
|
|
|
1307
1289
|
});
|
|
1308
1290
|
export const tableHeaderWithNestedTable = createPMNodeSpecFactory({
|
|
1309
1291
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | table)+',
|
|
1310
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute
|
|
1292
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1311
1293
|
attrs: {
|
|
1312
1294
|
colspan: {
|
|
1313
1295
|
default: 1
|
|
@@ -31,7 +31,7 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
|
31
31
|
* - no base mediaSingle
|
|
32
32
|
* - no base heading
|
|
33
33
|
*/
|
|
34
|
-
export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'),
|
|
34
|
+
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, codeBlock.use('with_extended_attributes'), 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, table,
|
|
35
35
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
36
36
|
table.use('with_nested_table'), expand, bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
|
|
37
37
|
ignore: ['pm-spec']
|
|
@@ -18,7 +18,7 @@ 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, codeBlock.use('with_extended_attributes'), mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('
|
|
21
|
+
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_extended_attributes'), 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'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, 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, confluenceUnsupportedBlock, unsupportedBlock], {
|
|
24
24
|
// @DSLCompatibilityException
|
|
@@ -17,7 +17,7 @@ import { taskList } from '../nodes/task';
|
|
|
17
17
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
18
18
|
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'),
|
|
20
|
+
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, codeBlock.use('with_extended_attributes'), mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks')];
|
|
21
21
|
|
|
22
22
|
// This is not an actual group, but a collection of nodes
|
|
23
23
|
// @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
|
|
@@ -34,7 +34,7 @@ export const bodiedSyncBlock = adfNode('bodiedSyncBlock').define({
|
|
|
34
34
|
default: ''
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('
|
|
37
|
+
content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, rule, table,
|
|
38
38
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
39
39
|
table.use('with_nested_table'), taskList, unsupportedBlock))]
|
|
40
40
|
});
|
|
@@ -18,11 +18,11 @@ export const paragraph = adfNode('paragraph').define({
|
|
|
18
18
|
hasEmptyMarks: true,
|
|
19
19
|
content: [$zeroPlus($or(inlineGroup, inlineContentGroup))]
|
|
20
20
|
}).variant('with_alignment', {
|
|
21
|
-
marks: [alignment, unsupportedMark, unsupportedNodeAttribute],
|
|
21
|
+
marks: [fontSize, alignment, unsupportedMark, unsupportedNodeAttribute],
|
|
22
22
|
content: [],
|
|
23
23
|
ignore: []
|
|
24
24
|
}).variant('with_indentation', {
|
|
25
|
-
marks: [indentation, unsupportedMark, unsupportedNodeAttribute],
|
|
25
|
+
marks: [fontSize, indentation, unsupportedMark, unsupportedNodeAttribute],
|
|
26
26
|
content: [],
|
|
27
27
|
ignore: []
|
|
28
28
|
}).variant('with_marks', {
|
|
@@ -37,16 +37,5 @@ export const paragraph = adfNode('paragraph').define({
|
|
|
37
37
|
}).variant('with_font_size', {
|
|
38
38
|
marks: [fontSize, unsupportedMark, unsupportedNodeAttribute],
|
|
39
39
|
content: [],
|
|
40
|
-
ignore: []
|
|
41
|
-
stage0: true
|
|
42
|
-
}).variant('with_font_size_and_alignment', {
|
|
43
|
-
marks: [fontSize, alignment, unsupportedMark, unsupportedNodeAttribute],
|
|
44
|
-
content: [],
|
|
45
|
-
ignore: [],
|
|
46
|
-
stage0: true
|
|
47
|
-
}).variant('with_font_size_and_indentation', {
|
|
48
|
-
marks: [fontSize, indentation, unsupportedMark, unsupportedNodeAttribute],
|
|
49
|
-
content: [],
|
|
50
|
-
ignore: [],
|
|
51
|
-
stage0: true
|
|
40
|
+
ignore: []
|
|
52
41
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
2
|
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, codeBlockWithExtendedAttributes } from './nodes';
|
|
3
3
|
import { createSchema } from './create-schema';
|
|
4
|
-
import { fontSize } from './marks/font-size';
|
|
5
4
|
const getDefaultSchemaConfig = () => {
|
|
6
5
|
const defaultSchemaConfig = {
|
|
7
6
|
nodes: ['doc', 'paragraph', 'text', 'bulletList', 'orderedList', 'listItem', 'heading', 'blockquote', 'codeBlock', 'panel', 'rule', 'image', 'caption', 'mention', 'media', 'mediaGroup', 'mediaSingle', 'mediaInline', 'confluenceUnsupportedBlock', 'confluenceUnsupportedInline', 'confluenceJiraIssue', 'expand', 'nestedExpand', 'extension', 'inlineExtension', 'bodiedExtension', 'hardBreak', 'emoji', 'table', 'tableCell', 'tableHeader', 'tableRow', 'decisionList', 'decisionItem', 'taskList', 'taskItem', 'blockTaskItem', 'unknownBlock', 'date', 'status', 'placeholder', 'layoutSection', 'layoutColumn', 'inlineCard', 'blockCard', 'embedCard', 'syncBlock', 'bodiedSyncBlock', 'unsupportedBlock', 'unsupportedInline'],
|
|
8
|
-
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
|
7
|
+
marks: ['link', 'em', 'strong', 'strike', 'subsup', 'underline', 'code', 'textColor', 'backgroundColor', 'confluenceInlineComment', 'breakout', 'alignment', 'indentation', 'annotation', 'fontSize', 'dataConsumer', 'border', 'unsupportedMark', 'unsupportedNodeAttribute', 'typeAheadQuery',
|
|
9
8
|
// https://product-fabric.atlassian.net/browse/ED-10214,
|
|
10
9
|
'fragment']
|
|
11
10
|
};
|
|
@@ -30,9 +29,6 @@ export const getSchemaBasedOnStage = memoizeOne(
|
|
|
30
29
|
tableHeader: tableHeaderWithNestedTable,
|
|
31
30
|
codeBlock: codeBlockWithExtendedAttributes
|
|
32
31
|
};
|
|
33
|
-
defaultSchemaConfig.customMarkSpecs = {
|
|
34
|
-
fontSize: fontSize
|
|
35
|
-
};
|
|
36
32
|
}
|
|
37
33
|
return createSchema(defaultSchemaConfig);
|
|
38
34
|
});
|