@atlaskit/adf-schema 57.5.4 → 57.6.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 +19 -0
- package/dist/cjs/next-schema/full-schema.adf.js +1 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +66 -17
- 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/nodes/blockquote.js +1 -1
- package/dist/cjs/next-schema/nodes/expand.js +2 -1
- package/dist/cjs/next-schema/nodes/extension.js +8 -0
- package/dist/cjs/next-schema/nodes/list.js +1 -1
- package/dist/cjs/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/cjs/next-schema/nodes/panel.js +3 -3
- package/dist/cjs/next-schema/nodes/task.js +1 -1
- package/dist/cjs/schema/default-schema.js +3 -1
- package/dist/cjs/schema/nodes/extension.js +15 -1
- package/dist/cjs/validator-schema/generated/validatorSpec.js +39 -15
- package/dist/es2019/next-schema/full-schema.adf.js +1 -1
- package/dist/es2019/next-schema/generated/nodeTypes.js +65 -16
- 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/nodes/blockquote.js +1 -1
- package/dist/es2019/next-schema/nodes/expand.js +2 -1
- package/dist/es2019/next-schema/nodes/extension.js +8 -0
- package/dist/es2019/next-schema/nodes/list.js +1 -1
- package/dist/es2019/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/es2019/next-schema/nodes/panel.js +3 -3
- package/dist/es2019/next-schema/nodes/task.js +1 -1
- package/dist/es2019/schema/default-schema.js +3 -1
- package/dist/es2019/schema/nodes/extension.js +16 -0
- package/dist/es2019/validator-schema/generated/validatorSpec.js +37 -13
- package/dist/esm/next-schema/full-schema.adf.js +1 -1
- package/dist/esm/next-schema/generated/nodeTypes.js +65 -16
- 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/nodes/blockquote.js +1 -1
- package/dist/esm/next-schema/nodes/expand.js +2 -1
- package/dist/esm/next-schema/nodes/extension.js +8 -0
- package/dist/esm/next-schema/nodes/list.js +1 -1
- package/dist/esm/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/esm/next-schema/nodes/panel.js +3 -3
- package/dist/esm/next-schema/nodes/task.js +1 -1
- package/dist/esm/schema/default-schema.js +3 -1
- package/dist/esm/schema/nodes/extension.js +14 -0
- package/dist/esm/validator-schema/generated/validatorSpec.js +37 -13
- package/dist/json-schema/v1/stage-0.json +106 -0
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
- package/dist/types/next-schema/generated/nodeTypes.d.ts +43 -15
- package/dist/types/next-schema/nodes/extension.d.ts +3 -1
- package/dist/types/schema/nodes/doc.d.ts +2 -2
- package/dist/types/schema/nodes/extension.d.ts +11 -0
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +24 -0
- package/json-schema/v1/stage-0.json +106 -0
- package/package.json +5 -1
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -0
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.underline = void 0;
|
|
6
|
+
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_with_attrs_root_only = exports.rule_with_attrs = exports.rule_root_only = 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_root_only = exports.panel_c1_root_only = exports.panel_c1 = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension_root_only = 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.extension_with_annotation = exports.extension_root_only_with_annotation = exports.extension_root_only = 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_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedSyncBlock = exports.bodiedRule_root_only = exports.bodiedRule = exports.bodiedExtension_with_marks = exports.bodiedExtension_root_only = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockTaskItem = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
|
|
7
|
+
exports.underline = exports.text_with_no_marks = exports.text_link_inline = void 0;
|
|
8
8
|
var alignment = exports.alignment = {
|
|
9
9
|
props: {
|
|
10
10
|
attrs: {
|
|
@@ -56,7 +56,7 @@ var backgroundColor = exports.backgroundColor = {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
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', 'rule_with_attrs', 'bodiedRule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks'];
|
|
59
|
+
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', 'rule_with_attrs', 'bodiedRule', 'panel', 'blockquote', 'extension_with_marks', 'extension_with_annotation', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks'];
|
|
60
60
|
var blockCard = exports.blockCard = {
|
|
61
61
|
props: {
|
|
62
62
|
attrs: [{
|
|
@@ -147,7 +147,7 @@ var blockquote = exports.blockquote = {
|
|
|
147
147
|
},
|
|
148
148
|
content: {
|
|
149
149
|
allowUnsupportedBlock: true,
|
|
150
|
-
items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'extension_with_marks']],
|
|
150
|
+
items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'extension_with_marks', 'extension_with_annotation']],
|
|
151
151
|
minItems: 1,
|
|
152
152
|
type: 'array'
|
|
153
153
|
},
|
|
@@ -173,7 +173,7 @@ var blockTaskItem = exports.blockTaskItem = {
|
|
|
173
173
|
},
|
|
174
174
|
content: {
|
|
175
175
|
isTupleLike: true,
|
|
176
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks'], ['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks']],
|
|
176
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks', 'extension_with_annotation'], ['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks', 'extension_with_annotation']],
|
|
177
177
|
minItems: 1,
|
|
178
178
|
type: 'array'
|
|
179
179
|
},
|
|
@@ -596,7 +596,7 @@ var doc = exports.doc = {
|
|
|
596
596
|
props: {
|
|
597
597
|
content: {
|
|
598
598
|
allowUnsupportedBlock: true,
|
|
599
|
-
items: [['panel_c1', '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', 'rule_with_attrs', 'bodiedRule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'panel_root_only', 'panel_c1_root_only', 'rule_root_only', 'rule_with_attrs_root_only', 'bodiedRule_root_only', 'extension_root_only', 'bodiedExtension_root_only', 'multiBodiedExtension_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
599
|
+
items: [['panel_c1', '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', 'rule_with_attrs', 'bodiedRule', 'panel', 'blockquote', 'extension_with_marks', 'extension_with_annotation', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'panel_root_only', 'panel_c1_root_only', 'rule_root_only', 'rule_with_attrs_root_only', 'bodiedRule_root_only', 'extension_root_only', 'extension_root_only_with_annotation', 'bodiedExtension_root_only', 'multiBodiedExtension_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
600
600
|
type: 'array'
|
|
601
601
|
},
|
|
602
602
|
type: {
|
|
@@ -704,7 +704,7 @@ var expand = exports.expand = {
|
|
|
704
704
|
},
|
|
705
705
|
content: {
|
|
706
706
|
allowUnsupportedBlock: true,
|
|
707
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'rule_with_attrs', 'bodiedRule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
|
707
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'rule_with_attrs', 'bodiedRule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'extension_with_annotation', 'nestedExpand_with_no_marks']],
|
|
708
708
|
minItems: 1,
|
|
709
709
|
type: 'array'
|
|
710
710
|
},
|
|
@@ -784,6 +784,30 @@ var extension_root_only = exports.extension_root_only = ['extension', {
|
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
}];
|
|
787
|
+
var extension_root_only_with_annotation = exports.extension_root_only_with_annotation = ['extension', {
|
|
788
|
+
meta: {
|
|
789
|
+
stage0: true
|
|
790
|
+
},
|
|
791
|
+
props: {
|
|
792
|
+
marks: {
|
|
793
|
+
items: [['annotation', 'breakout', 'dataConsumer', 'fragment']],
|
|
794
|
+
optional: true,
|
|
795
|
+
type: 'array'
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}];
|
|
799
|
+
var extension_with_annotation = exports.extension_with_annotation = ['extension', {
|
|
800
|
+
meta: {
|
|
801
|
+
stage0: true
|
|
802
|
+
},
|
|
803
|
+
props: {
|
|
804
|
+
marks: {
|
|
805
|
+
items: [['annotation', 'dataConsumer', 'fragment']],
|
|
806
|
+
optional: true,
|
|
807
|
+
type: 'array'
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}];
|
|
787
811
|
var extension_with_marks = exports.extension_with_marks = ['extension', {
|
|
788
812
|
props: {
|
|
789
813
|
marks: {
|
|
@@ -1055,7 +1079,7 @@ var layoutColumn = exports.layoutColumn = {
|
|
|
1055
1079
|
},
|
|
1056
1080
|
content: {
|
|
1057
1081
|
allowUnsupportedBlock: true,
|
|
1058
|
-
items: [['panel_c1', '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', 'rule_with_attrs', 'bodiedRule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks']],
|
|
1082
|
+
items: [['panel_c1', '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', 'rule_with_attrs', 'bodiedRule', 'panel', 'blockquote', 'extension_with_marks', 'extension_with_annotation', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks']],
|
|
1059
1083
|
minItems: 1,
|
|
1060
1084
|
type: 'array'
|
|
1061
1085
|
},
|
|
@@ -1188,7 +1212,7 @@ var listItem = exports.listItem = {
|
|
|
1188
1212
|
},
|
|
1189
1213
|
content: {
|
|
1190
1214
|
allowUnsupportedBlock: true,
|
|
1191
|
-
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1215
|
+
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks', 'extension_with_annotation']],
|
|
1192
1216
|
minItems: 1,
|
|
1193
1217
|
type: 'array'
|
|
1194
1218
|
},
|
|
@@ -1558,7 +1582,7 @@ var nestedExpand = exports.nestedExpand = {
|
|
|
1558
1582
|
};
|
|
1559
1583
|
var nestedExpand_content = exports.nestedExpand_content = {
|
|
1560
1584
|
allowUnsupportedBlock: true,
|
|
1561
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'rule_with_attrs', 'bodiedRule', 'panel', 'blockquote', 'extension_with_marks']],
|
|
1585
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'rule_with_attrs', 'bodiedRule', 'panel', 'blockquote', 'extension_with_marks', 'extension_with_annotation']],
|
|
1562
1586
|
minItems: 1,
|
|
1563
1587
|
type: 'array'
|
|
1564
1588
|
};
|
|
@@ -1632,7 +1656,7 @@ var panel = exports.panel = {
|
|
|
1632
1656
|
},
|
|
1633
1657
|
content: {
|
|
1634
1658
|
allowUnsupportedBlock: true,
|
|
1635
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'rule_with_attrs', 'bodiedRule', 'decisionList', 'extension_with_marks']],
|
|
1659
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'rule_with_attrs', 'bodiedRule', 'decisionList', 'extension_with_marks', 'extension_with_annotation']],
|
|
1636
1660
|
minItems: 1,
|
|
1637
1661
|
type: 'array'
|
|
1638
1662
|
},
|
|
@@ -1649,7 +1673,7 @@ var panel_c1 = exports.panel_c1 = ['panel', {
|
|
|
1649
1673
|
props: {
|
|
1650
1674
|
content: {
|
|
1651
1675
|
allowUnsupportedBlock: true,
|
|
1652
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'rule_with_attrs', 'bodiedRule', 'decisionList', 'extension_with_marks', 'table']],
|
|
1676
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'rule_with_attrs', 'bodiedRule', 'decisionList', 'extension_with_marks', 'extension_with_annotation', 'table']],
|
|
1653
1677
|
minItems: 1,
|
|
1654
1678
|
type: 'array'
|
|
1655
1679
|
}
|
|
@@ -1662,7 +1686,7 @@ var panel_c1_root_only = exports.panel_c1_root_only = ['panel', {
|
|
|
1662
1686
|
props: {
|
|
1663
1687
|
content: {
|
|
1664
1688
|
allowUnsupportedBlock: true,
|
|
1665
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'rule_with_attrs', 'bodiedRule', 'decisionList', 'extension_with_marks', 'table']],
|
|
1689
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'rule_with_attrs', 'bodiedRule', 'decisionList', 'extension_with_marks', 'extension_with_annotation', 'table']],
|
|
1666
1690
|
minItems: 1,
|
|
1667
1691
|
type: 'array'
|
|
1668
1692
|
},
|
|
@@ -2038,7 +2062,7 @@ var tableCell = exports.tableCell = {
|
|
|
2038
2062
|
},
|
|
2039
2063
|
content: {
|
|
2040
2064
|
allowUnsupportedBlock: true,
|
|
2041
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'rule_with_attrs', 'bodiedRule', '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']],
|
|
2065
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'rule_with_attrs', 'bodiedRule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'extension_with_annotation', 'nestedExpand_with_no_marks']],
|
|
2042
2066
|
minItems: 1,
|
|
2043
2067
|
type: 'array'
|
|
2044
2068
|
},
|
|
@@ -2085,7 +2109,7 @@ var tableHeader = exports.tableHeader = {
|
|
|
2085
2109
|
}
|
|
2086
2110
|
},
|
|
2087
2111
|
content: {
|
|
2088
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'rule_with_attrs', 'bodiedRule', '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']],
|
|
2112
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'rule_with_attrs', 'bodiedRule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'extension_with_annotation', 'nestedExpand_with_no_marks', 'nestedExpand']],
|
|
2089
2113
|
minItems: 1,
|
|
2090
2114
|
type: 'array'
|
|
2091
2115
|
},
|
|
@@ -25,7 +25,7 @@ const doc = adfNode('doc').define({
|
|
|
25
25
|
// Deliberately placed AFTER `blockGroup` rather than first: `blockContentGroup` is ignored
|
|
26
26
|
// for `pm-spec`, so this keeps `block` the leading alternative in the PM content
|
|
27
27
|
// expression and leaves ProseMirror's defaultType/fill behaviour untouched.
|
|
28
|
-
panel.use('c1'), blockContentGroup, codeBlock.use('root_only'), panel.use('root_only'), panel.use('c1_root_only'), rule.use('root_only'), rule.use('with_attrs_root_only'), bodiedRule.use('root_only'), extension.use('root_only'), bodiedExtension.use('root_only'), multiBodiedExtension.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
|
|
28
|
+
panel.use('c1'), blockContentGroup, codeBlock.use('root_only'), panel.use('root_only'), panel.use('c1_root_only'), rule.use('root_only'), rule.use('with_attrs_root_only'), bodiedRule.use('root_only'), extension.use('root_only'), extension.use('root_only_with_annotation'), bodiedExtension.use('root_only'), multiBodiedExtension.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock, bodiedSyncBlock))],
|
|
29
29
|
DANGEROUS_MANUAL_OVERRIDE: {
|
|
30
30
|
'validator-spec': {
|
|
31
31
|
'props.content.minItems': {
|
|
@@ -32,7 +32,7 @@ export const blockCard = createPMNodeSpecFactory({
|
|
|
32
32
|
});
|
|
33
33
|
export const blockquote = createPMNodeSpecFactory({
|
|
34
34
|
content: '(paragraph | orderedList | bulletList | unsupportedBlock | codeBlock | mediaSingle | mediaGroup | extension)+',
|
|
35
|
-
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
35
|
+
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
36
36
|
group: 'block',
|
|
37
37
|
attrs: {
|
|
38
38
|
localId: {
|
|
@@ -56,7 +56,7 @@ export const blockquoteLegacy = createPMNodeSpecFactory({
|
|
|
56
56
|
});
|
|
57
57
|
export const blockTaskItem = createPMNodeSpecFactory({
|
|
58
58
|
content: '(paragraph | extension) (paragraph | extension)*',
|
|
59
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
59
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
60
60
|
attrs: {
|
|
61
61
|
localId: {
|
|
62
62
|
default: ''
|
|
@@ -367,7 +367,7 @@ export const decisionList = createPMNodeSpecFactory({
|
|
|
367
367
|
});
|
|
368
368
|
export const doc = createPMNodeSpecFactory({
|
|
369
369
|
content: '(block | panel_c1 | codeBlock | panel | panel_c1_root_only | rule | bodiedRule | extension | bodiedExtension | multiBodiedExtension | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
370
|
-
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment breakout'
|
|
370
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment annotation breakout'
|
|
371
371
|
});
|
|
372
372
|
export const embedCard = createPMNodeSpecFactory({
|
|
373
373
|
group: 'block',
|
|
@@ -433,7 +433,7 @@ export const emojiStage0 = createPMNodeSpecFactory({
|
|
|
433
433
|
});
|
|
434
434
|
export const expand = createPMNodeSpecFactory({
|
|
435
435
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | bodiedRule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock | nestedExpand)+',
|
|
436
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
|
436
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute fragment dataConsumer annotation',
|
|
437
437
|
group: 'block',
|
|
438
438
|
attrs: {
|
|
439
439
|
title: {
|
|
@@ -451,7 +451,7 @@ export const expand = createPMNodeSpecFactory({
|
|
|
451
451
|
});
|
|
452
452
|
export const expandRootOnly = createPMNodeSpecFactory({
|
|
453
453
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | bodiedRule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock | nestedExpand)+',
|
|
454
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
|
454
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute fragment dataConsumer annotation',
|
|
455
455
|
attrs: {
|
|
456
456
|
title: {
|
|
457
457
|
default: ''
|
|
@@ -515,6 +515,55 @@ export const extensionRootOnlyStage0 = createPMNodeSpecFactory({
|
|
|
515
515
|
},
|
|
516
516
|
selectable: true
|
|
517
517
|
});
|
|
518
|
+
export const extensionRootOnlyWithAnnotationStage0 = createPMNodeSpecFactory({
|
|
519
|
+
atom: true,
|
|
520
|
+
attrs: {
|
|
521
|
+
extensionKey: {
|
|
522
|
+
default: ''
|
|
523
|
+
},
|
|
524
|
+
extensionType: {
|
|
525
|
+
default: ''
|
|
526
|
+
},
|
|
527
|
+
parameters: {
|
|
528
|
+
default: null
|
|
529
|
+
},
|
|
530
|
+
text: {
|
|
531
|
+
default: null
|
|
532
|
+
},
|
|
533
|
+
layout: {
|
|
534
|
+
default: 'default'
|
|
535
|
+
},
|
|
536
|
+
localId: {
|
|
537
|
+
default: null
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
selectable: true
|
|
541
|
+
});
|
|
542
|
+
export const extensionWithAnnotationStage0 = createPMNodeSpecFactory({
|
|
543
|
+
group: 'block',
|
|
544
|
+
atom: true,
|
|
545
|
+
attrs: {
|
|
546
|
+
extensionKey: {
|
|
547
|
+
default: ''
|
|
548
|
+
},
|
|
549
|
+
extensionType: {
|
|
550
|
+
default: ''
|
|
551
|
+
},
|
|
552
|
+
parameters: {
|
|
553
|
+
default: null
|
|
554
|
+
},
|
|
555
|
+
text: {
|
|
556
|
+
default: null
|
|
557
|
+
},
|
|
558
|
+
layout: {
|
|
559
|
+
default: 'default'
|
|
560
|
+
},
|
|
561
|
+
localId: {
|
|
562
|
+
default: null
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
selectable: true
|
|
566
|
+
});
|
|
518
567
|
export const extensionWithMarks = createPMNodeSpecFactory({
|
|
519
568
|
group: 'block',
|
|
520
569
|
atom: true,
|
|
@@ -713,7 +762,7 @@ export const inlineExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
713
762
|
});
|
|
714
763
|
export const layoutColumn = createPMNodeSpecFactory({
|
|
715
764
|
content: '(block | panel_c1 | unsupportedBlock)+',
|
|
716
|
-
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment',
|
|
765
|
+
marks: 'unsupportedMark unsupportedNodeAttribute fontSize alignment indentation dataConsumer fragment annotation',
|
|
717
766
|
attrs: {
|
|
718
767
|
width: {
|
|
719
768
|
default: undefined
|
|
@@ -763,7 +812,7 @@ export const layoutSectionWithSingleColumnStage0 = createPMNodeSpecFactory({
|
|
|
763
812
|
});
|
|
764
813
|
export const listItem = createPMNodeSpecFactory({
|
|
765
814
|
content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
|
|
766
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
815
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
767
816
|
attrs: {
|
|
768
817
|
localId: {
|
|
769
818
|
default: null
|
|
@@ -1058,7 +1107,7 @@ export const multiBodiedExtensionStage0 = createPMNodeSpecFactory({
|
|
|
1058
1107
|
});
|
|
1059
1108
|
export const nestedExpand = createPMNodeSpecFactory({
|
|
1060
1109
|
content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | bodiedRule | panel | blockquote | unsupportedBlock | extension)+',
|
|
1061
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1110
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1062
1111
|
attrs: {
|
|
1063
1112
|
title: {
|
|
1064
1113
|
default: ''
|
|
@@ -1104,7 +1153,7 @@ export const orderedList = createPMNodeSpecFactory({
|
|
|
1104
1153
|
});
|
|
1105
1154
|
export const panel = createPMNodeSpecFactory({
|
|
1106
1155
|
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | bodiedRule | decisionList | unsupportedBlock | extension)+',
|
|
1107
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1156
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1108
1157
|
group: 'block',
|
|
1109
1158
|
attrs: {
|
|
1110
1159
|
panelType: {
|
|
@@ -1130,7 +1179,7 @@ export const panel = createPMNodeSpecFactory({
|
|
|
1130
1179
|
});
|
|
1131
1180
|
export const panelC1RootOnlyStage0 = createPMNodeSpecFactory({
|
|
1132
1181
|
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | bodiedRule | decisionList | unsupportedBlock | extension | table)+',
|
|
1133
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1182
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1134
1183
|
attrs: {
|
|
1135
1184
|
panelType: {
|
|
1136
1185
|
default: 'info'
|
|
@@ -1155,7 +1204,7 @@ export const panelC1RootOnlyStage0 = createPMNodeSpecFactory({
|
|
|
1155
1204
|
});
|
|
1156
1205
|
export const panelC1Stage0 = createPMNodeSpecFactory({
|
|
1157
1206
|
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | bodiedRule | decisionList | unsupportedBlock | extension | table)+',
|
|
1158
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1207
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1159
1208
|
group: 'block',
|
|
1160
1209
|
attrs: {
|
|
1161
1210
|
panelType: {
|
|
@@ -1181,7 +1230,7 @@ export const panelC1Stage0 = createPMNodeSpecFactory({
|
|
|
1181
1230
|
});
|
|
1182
1231
|
export const panelRootOnlyStage0 = createPMNodeSpecFactory({
|
|
1183
1232
|
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | bodiedRule | decisionList | unsupportedBlock | extension)+',
|
|
1184
|
-
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1233
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1185
1234
|
attrs: {
|
|
1186
1235
|
panelType: {
|
|
1187
1236
|
default: 'info'
|
|
@@ -1419,7 +1468,7 @@ export const tableWithNestedTable = createPMNodeSpecFactory({
|
|
|
1419
1468
|
});
|
|
1420
1469
|
export const tableCell = createPMNodeSpecFactory({
|
|
1421
1470
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | bodiedRule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
|
|
1422
|
-
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1471
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1423
1472
|
attrs: {
|
|
1424
1473
|
colspan: {
|
|
1425
1474
|
default: 1
|
|
@@ -1446,7 +1495,7 @@ export const tableCell = createPMNodeSpecFactory({
|
|
|
1446
1495
|
});
|
|
1447
1496
|
export const tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
1448
1497
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | bodiedRule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock | table)+',
|
|
1449
|
-
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1498
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1450
1499
|
attrs: {
|
|
1451
1500
|
colspan: {
|
|
1452
1501
|
default: 1
|
|
@@ -1473,7 +1522,7 @@ export const tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
|
1473
1522
|
});
|
|
1474
1523
|
export const tableHeader = createPMNodeSpecFactory({
|
|
1475
1524
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | bodiedRule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand)+',
|
|
1476
|
-
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1525
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1477
1526
|
attrs: {
|
|
1478
1527
|
colspan: {
|
|
1479
1528
|
default: 1
|
|
@@ -1500,7 +1549,7 @@ export const tableHeader = createPMNodeSpecFactory({
|
|
|
1500
1549
|
});
|
|
1501
1550
|
export const tableHeaderWithNestedTable = createPMNodeSpecFactory({
|
|
1502
1551
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | bodiedRule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | table)+',
|
|
1503
|
-
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1552
|
+
marks: 'fontSize alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment annotation',
|
|
1504
1553
|
attrs: {
|
|
1505
1554
|
colspan: {
|
|
1506
1555
|
default: 1
|
|
@@ -32,7 +32,7 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
|
32
32
|
* - no base mediaSingle
|
|
33
33
|
* - no base heading
|
|
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, taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, rule.use('with_attrs'), bodiedRule, panel, blockquote, extension.use('with_marks'), embedCard, table,
|
|
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, rule.use('with_attrs'), bodiedRule, panel, blockquote, extension.use('with_marks'), extension.use('with_annotation'), 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, bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
|
|
38
38
|
ignore: ['pm-spec']
|
|
@@ -19,7 +19,7 @@ import { rule } from '../nodes/rule';
|
|
|
19
19
|
import { table } from '../nodes/tableNodes';
|
|
20
20
|
import { taskList } from '../nodes/task';
|
|
21
21
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
22
|
-
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'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, rule.use('with_attrs'), bodiedRule, panel, panel.use('c1'), table,
|
|
22
|
+
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'), decisionList, embedCard, extension, extension.use('with_marks'), extension.use('with_annotation'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, rule.use('with_attrs'), bodiedRule, panel, panel.use('c1'), table,
|
|
23
23
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
24
24
|
table.use('with_nested_table'), bodiedExtension, bodiedExtension.use('with_marks'), expand, confluenceUnsupportedBlock, unsupportedBlock], {
|
|
25
25
|
// @DSLCompatibilityException
|
|
@@ -18,7 +18,7 @@ import { taskList } from '../nodes/task';
|
|
|
18
18
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
19
19
|
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, rule.use('with_attrs'), bodiedRule, 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')];
|
|
21
|
+
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, rule.use('with_attrs'), bodiedRule, 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'), extension.use('with_annotation'), nestedExpand.use('content'), nestedExpand.use('with_no_marks')];
|
|
22
22
|
|
|
23
23
|
// This is not an actual group, but a collection of nodes
|
|
24
24
|
// @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
|
|
@@ -8,7 +8,7 @@ import { mediaGroup } from './mediaGroup';
|
|
|
8
8
|
import { mediaSingle } from './mediaSingle';
|
|
9
9
|
import { paragraph } from './paragraph';
|
|
10
10
|
import { unsupportedBlock } from './unsupportedBlock';
|
|
11
|
-
const blockQuoteContent = [paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock, codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, extension.use('with_marks')];
|
|
11
|
+
const blockQuoteContent = [paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock, codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, extension.use('with_marks'), extension.use('with_annotation')];
|
|
12
12
|
export const blockquote = adfNode('blockquote').define({
|
|
13
13
|
defining: true,
|
|
14
14
|
selectable: true,
|
|
@@ -3,6 +3,7 @@ import { nonNestableBlockContentGroup } from '../groups/nonNestableBlockContentG
|
|
|
3
3
|
import { breakout } from '../marks/breakout';
|
|
4
4
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
5
5
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
6
|
+
import { extension } from './extension';
|
|
6
7
|
import { nestedExpand } from './nestedExpand';
|
|
7
8
|
export const expand = adfNode('expand').define({
|
|
8
9
|
isolating: true,
|
|
@@ -25,7 +26,7 @@ export const expand = adfNode('expand').define({
|
|
|
25
26
|
optional: true
|
|
26
27
|
}
|
|
27
28
|
},
|
|
28
|
-
content: [$onePlus($or(nonNestableBlockContentGroup, nestedExpand.use('with_no_marks')))]
|
|
29
|
+
content: [$onePlus($or(nonNestableBlockContentGroup, extension.use('with_annotation'), nestedExpand.use('with_no_marks')))]
|
|
29
30
|
}).variant('root_only', {
|
|
30
31
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
|
31
32
|
noMarks: false,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { adfNode } from '@atlaskit/adf-schema-generator';
|
|
2
|
+
import { annotation } from '../marks/annotation';
|
|
2
3
|
import { breakout } from '../marks/breakout';
|
|
3
4
|
import { dataConsumer } from '../marks/dataConsumer';
|
|
4
5
|
import { fragment } from '../marks/fragment';
|
|
@@ -46,9 +47,16 @@ export const extension = adfNode('extension').define({
|
|
|
46
47
|
}).variant('with_marks', {
|
|
47
48
|
marks: [dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute],
|
|
48
49
|
ignore: []
|
|
50
|
+
}).variant('with_annotation', {
|
|
51
|
+
stage0: true,
|
|
52
|
+
marks: [annotation, dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute],
|
|
53
|
+
ignore: []
|
|
49
54
|
})
|
|
50
55
|
// this variant is used to support breakout resizing for extension nodes at the document root
|
|
51
56
|
.variant('root_only', {
|
|
52
57
|
stage0: true,
|
|
53
58
|
marks: [breakout, dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute]
|
|
59
|
+
}).variant('root_only_with_annotation', {
|
|
60
|
+
stage0: true,
|
|
61
|
+
marks: [annotation, breakout, dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute]
|
|
54
62
|
});
|
|
@@ -21,7 +21,7 @@ const listItem = adfNode('listItem').define({
|
|
|
21
21
|
},
|
|
22
22
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
23
23
|
contentMinItems: 1,
|
|
24
|
-
content: [$onePlus($or(paragraph.use('with_font_size'), paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))]
|
|
24
|
+
content: [$onePlus($or(paragraph.use('with_font_size'), paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks'), extension.use('with_annotation')))]
|
|
25
25
|
});
|
|
26
26
|
orderedList.define({
|
|
27
27
|
selectable: false,
|
|
@@ -37,7 +37,7 @@ export const nestedExpand = adfNode('nestedExpand').define({
|
|
|
37
37
|
optional: true
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
content: [$onePlus($or(...nestedExpandContent, extension.use('with_marks')))],
|
|
40
|
+
content: [$onePlus($or(...nestedExpandContent, extension.use('with_marks'), extension.use('with_annotation')))],
|
|
41
41
|
DANGEROUS_MANUAL_OVERRIDE: {
|
|
42
42
|
'validator-spec': {
|
|
43
43
|
'props.attrs.optional': {
|
|
@@ -52,7 +52,7 @@ export const panel = adfNode('panel').define({
|
|
|
52
52
|
optional: true
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
content: [$onePlus($or(...panelContent, extension.use('with_marks')))]
|
|
55
|
+
content: [$onePlus($or(...panelContent, extension.use('with_marks'), extension.use('with_annotation')))]
|
|
56
56
|
}).variant('c1', {
|
|
57
57
|
// panel_c1 allows all standard panel content plus table. `stage0: true` includes it in the
|
|
58
58
|
// stage-0 JSON schema (not full) and the validator spec so table-in-panel validates.
|
|
@@ -61,7 +61,7 @@ export const panel = adfNode('panel').define({
|
|
|
61
61
|
// acceptance is gated in adf-utils behind the patch flag.
|
|
62
62
|
stage0: true,
|
|
63
63
|
noExtend: true,
|
|
64
|
-
content: [$onePlus($or(...panelContent, extension.use('with_marks'), table))],
|
|
64
|
+
content: [$onePlus($or(...panelContent, extension.use('with_marks'), extension.use('with_annotation'), table))],
|
|
65
65
|
preserveVariantNameInPm: true
|
|
66
66
|
})
|
|
67
67
|
// this variant is used to support breakout resizing for panel nodes at the document root
|
|
@@ -75,6 +75,6 @@ export const panel = adfNode('panel').define({
|
|
|
75
75
|
noExtend: true,
|
|
76
76
|
marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
|
|
77
77
|
// panel_c1_root_only allows all standard panel content plus table (see c1 above).
|
|
78
|
-
content: [$onePlus($or(...panelContent, extension.use('with_marks'), table))],
|
|
78
|
+
content: [$onePlus($or(...panelContent, extension.use('with_marks'), extension.use('with_annotation'), table))],
|
|
79
79
|
preserveVariantNameInPm: true
|
|
80
80
|
});
|
|
@@ -36,7 +36,7 @@ blockTaskItem.define({
|
|
|
36
36
|
allowAnyChildMark: false,
|
|
37
37
|
// Override the commonTaskItemProps setting
|
|
38
38
|
contentMinItems: 1,
|
|
39
|
-
content: [$or(paragraph.use('with_no_marks'), paragraph.use('with_font_size'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), paragraph.use('with_font_size'), extension.use('with_marks')))]
|
|
39
|
+
content: [$or(paragraph.use('with_no_marks'), paragraph.use('with_font_size'), extension.use('with_marks'), extension.use('with_annotation')), $zeroPlus($or(paragraph.use('with_no_marks'), paragraph.use('with_font_size'), extension.use('with_marks'), extension.use('with_annotation')))]
|
|
40
40
|
});
|
|
41
41
|
taskList.define({
|
|
42
42
|
defining: true,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
3
|
import { createSchema } from './create-schema';
|
|
3
4
|
import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtensionRootOnlyStage0, bodiedExtensionRootOnlyStage0, extensionRootOnlyStage0, expandWithNestedExpand, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTableStage0, tableHeaderWithNestedTableStage0 } from './nodes';
|
|
4
5
|
import { bodiedRuleRootOnlyStage0 } from './nodes/bodied-rule';
|
|
5
6
|
import { extendedPanelC1RootOnlyStage0 } from './nodes/extended-panel-c1-root-only-stage0';
|
|
6
7
|
import { extendedPanelRootOnlyStage0 } from './nodes/extended-panel-root-only-stage0';
|
|
8
|
+
import { extensionRootOnlyWithAnnotationStage0 } from './nodes/extension';
|
|
7
9
|
import { ruleWithAttrsRootOnlyStage0 } from './nodes/rule';
|
|
8
10
|
const getDefaultSchemaConfig = () => {
|
|
9
11
|
const defaultSchemaConfig = {
|
|
@@ -24,7 +26,7 @@ export const getSchemaBasedOnStage = memoizeOne(
|
|
|
24
26
|
if (stage === 'stage0') {
|
|
25
27
|
defaultSchemaConfig.customNodeSpecs = {
|
|
26
28
|
layoutSection: layoutSectionWithSingleColumn,
|
|
27
|
-
extension: extensionRootOnlyStage0,
|
|
29
|
+
extension: fg('cc_maui_annotations_on_extensions') ? extensionRootOnlyWithAnnotationStage0 : extensionRootOnlyStage0,
|
|
28
30
|
bodiedExtension: bodiedExtensionRootOnlyStage0,
|
|
29
31
|
multiBodiedExtension: multiBodiedExtensionRootOnlyStage0,
|
|
30
32
|
extensionFrame: extensionFrame,
|
|
@@ -13,6 +13,14 @@ import { getExtensionAttrs } from '../../utils/get-extension-attrs';
|
|
|
13
13
|
* @name extension_root_only_node
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @name extension_with_annotation_node
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @name extension_root_only_with_annotation_node
|
|
22
|
+
*/
|
|
23
|
+
|
|
16
24
|
export const extension = extensionFactory({
|
|
17
25
|
parseDOM: [{
|
|
18
26
|
tag: '[data-node-type="extension"]',
|
|
@@ -35,4 +43,12 @@ export const extension = extensionFactory({
|
|
|
35
43
|
export const extensionRootOnlyStage0 = {
|
|
36
44
|
...extension,
|
|
37
45
|
marks: 'breakout dataConsumer fragment unsupportedMark unsupportedNodeAttribute'
|
|
46
|
+
};
|
|
47
|
+
export const extensionWithAnnotationStage0 = {
|
|
48
|
+
...extension,
|
|
49
|
+
marks: 'annotation dataConsumer fragment unsupportedMark unsupportedNodeAttribute'
|
|
50
|
+
};
|
|
51
|
+
export const extensionRootOnlyWithAnnotationStage0 = {
|
|
52
|
+
...extension,
|
|
53
|
+
marks: 'annotation breakout dataConsumer fragment unsupportedMark unsupportedNodeAttribute'
|
|
38
54
|
};
|