@atlaskit/adf-schema 57.5.4 → 57.6.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 +25 -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 +6 -2
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -0
|
@@ -49,7 +49,7 @@ export const backgroundColor = {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
export const 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'];
|
|
52
|
+
export const 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'];
|
|
53
53
|
export const blockCard = {
|
|
54
54
|
props: {
|
|
55
55
|
attrs: [{
|
|
@@ -140,7 +140,7 @@ export const blockquote = {
|
|
|
140
140
|
},
|
|
141
141
|
content: {
|
|
142
142
|
allowUnsupportedBlock: true,
|
|
143
|
-
items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'extension_with_marks']],
|
|
143
|
+
items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'extension_with_marks', 'extension_with_annotation']],
|
|
144
144
|
minItems: 1,
|
|
145
145
|
type: 'array'
|
|
146
146
|
},
|
|
@@ -166,7 +166,7 @@ export const blockTaskItem = {
|
|
|
166
166
|
},
|
|
167
167
|
content: {
|
|
168
168
|
isTupleLike: true,
|
|
169
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks'], ['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks']],
|
|
169
|
+
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']],
|
|
170
170
|
minItems: 1,
|
|
171
171
|
type: 'array'
|
|
172
172
|
},
|
|
@@ -589,7 +589,7 @@ export const doc = {
|
|
|
589
589
|
props: {
|
|
590
590
|
content: {
|
|
591
591
|
allowUnsupportedBlock: true,
|
|
592
|
-
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']],
|
|
592
|
+
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']],
|
|
593
593
|
type: 'array'
|
|
594
594
|
},
|
|
595
595
|
type: {
|
|
@@ -697,7 +697,7 @@ export const expand = {
|
|
|
697
697
|
},
|
|
698
698
|
content: {
|
|
699
699
|
allowUnsupportedBlock: true,
|
|
700
|
-
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']],
|
|
700
|
+
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']],
|
|
701
701
|
minItems: 1,
|
|
702
702
|
type: 'array'
|
|
703
703
|
},
|
|
@@ -777,6 +777,30 @@ export const extension_root_only = ['extension', {
|
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
}];
|
|
780
|
+
export const extension_root_only_with_annotation = ['extension', {
|
|
781
|
+
meta: {
|
|
782
|
+
stage0: true
|
|
783
|
+
},
|
|
784
|
+
props: {
|
|
785
|
+
marks: {
|
|
786
|
+
items: [['annotation', 'breakout', 'dataConsumer', 'fragment']],
|
|
787
|
+
optional: true,
|
|
788
|
+
type: 'array'
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}];
|
|
792
|
+
export const extension_with_annotation = ['extension', {
|
|
793
|
+
meta: {
|
|
794
|
+
stage0: true
|
|
795
|
+
},
|
|
796
|
+
props: {
|
|
797
|
+
marks: {
|
|
798
|
+
items: [['annotation', 'dataConsumer', 'fragment']],
|
|
799
|
+
optional: true,
|
|
800
|
+
type: 'array'
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}];
|
|
780
804
|
export const extension_with_marks = ['extension', {
|
|
781
805
|
props: {
|
|
782
806
|
marks: {
|
|
@@ -1048,7 +1072,7 @@ export const layoutColumn = {
|
|
|
1048
1072
|
},
|
|
1049
1073
|
content: {
|
|
1050
1074
|
allowUnsupportedBlock: true,
|
|
1051
|
-
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']],
|
|
1075
|
+
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']],
|
|
1052
1076
|
minItems: 1,
|
|
1053
1077
|
type: 'array'
|
|
1054
1078
|
},
|
|
@@ -1181,7 +1205,7 @@ export const listItem = {
|
|
|
1181
1205
|
},
|
|
1182
1206
|
content: {
|
|
1183
1207
|
allowUnsupportedBlock: true,
|
|
1184
|
-
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1208
|
+
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks', 'extension_with_annotation']],
|
|
1185
1209
|
minItems: 1,
|
|
1186
1210
|
type: 'array'
|
|
1187
1211
|
},
|
|
@@ -1551,7 +1575,7 @@ export const nestedExpand = {
|
|
|
1551
1575
|
};
|
|
1552
1576
|
export const nestedExpand_content = {
|
|
1553
1577
|
allowUnsupportedBlock: true,
|
|
1554
|
-
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']],
|
|
1578
|
+
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']],
|
|
1555
1579
|
minItems: 1,
|
|
1556
1580
|
type: 'array'
|
|
1557
1581
|
};
|
|
@@ -1625,7 +1649,7 @@ export const panel = {
|
|
|
1625
1649
|
},
|
|
1626
1650
|
content: {
|
|
1627
1651
|
allowUnsupportedBlock: true,
|
|
1628
|
-
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']],
|
|
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', 'extension_with_annotation']],
|
|
1629
1653
|
minItems: 1,
|
|
1630
1654
|
type: 'array'
|
|
1631
1655
|
},
|
|
@@ -1642,7 +1666,7 @@ export const panel_c1 = ['panel', {
|
|
|
1642
1666
|
props: {
|
|
1643
1667
|
content: {
|
|
1644
1668
|
allowUnsupportedBlock: true,
|
|
1645
|
-
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']],
|
|
1669
|
+
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']],
|
|
1646
1670
|
minItems: 1,
|
|
1647
1671
|
type: 'array'
|
|
1648
1672
|
}
|
|
@@ -1655,7 +1679,7 @@ export const panel_c1_root_only = ['panel', {
|
|
|
1655
1679
|
props: {
|
|
1656
1680
|
content: {
|
|
1657
1681
|
allowUnsupportedBlock: true,
|
|
1658
|
-
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']],
|
|
1682
|
+
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']],
|
|
1659
1683
|
minItems: 1,
|
|
1660
1684
|
type: 'array'
|
|
1661
1685
|
},
|
|
@@ -2031,7 +2055,7 @@ export const tableCell = {
|
|
|
2031
2055
|
},
|
|
2032
2056
|
content: {
|
|
2033
2057
|
allowUnsupportedBlock: true,
|
|
2034
|
-
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']],
|
|
2058
|
+
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']],
|
|
2035
2059
|
minItems: 1,
|
|
2036
2060
|
type: 'array'
|
|
2037
2061
|
},
|
|
@@ -2078,7 +2102,7 @@ export const tableHeader = {
|
|
|
2078
2102
|
}
|
|
2079
2103
|
},
|
|
2080
2104
|
content: {
|
|
2081
|
-
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']],
|
|
2105
|
+
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']],
|
|
2082
2106
|
minItems: 1,
|
|
2083
2107
|
type: 'array'
|
|
2084
2108
|
},
|
|
@@ -25,7 +25,7 @@ var 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 var blockCard = createPMNodeSpecFactory({
|
|
|
32
32
|
});
|
|
33
33
|
export var 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 var blockquoteLegacy = createPMNodeSpecFactory({
|
|
|
56
56
|
});
|
|
57
57
|
export var 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 var decisionList = createPMNodeSpecFactory({
|
|
|
367
367
|
});
|
|
368
368
|
export var 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 var embedCard = createPMNodeSpecFactory({
|
|
373
373
|
group: 'block',
|
|
@@ -433,7 +433,7 @@ export var emojiStage0 = createPMNodeSpecFactory({
|
|
|
433
433
|
});
|
|
434
434
|
export var 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 var expand = createPMNodeSpecFactory({
|
|
|
451
451
|
});
|
|
452
452
|
export var 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 var extensionRootOnlyStage0 = createPMNodeSpecFactory({
|
|
|
515
515
|
},
|
|
516
516
|
selectable: true
|
|
517
517
|
});
|
|
518
|
+
export var 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 var 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 var extensionWithMarks = createPMNodeSpecFactory({
|
|
519
568
|
group: 'block',
|
|
520
569
|
atom: true,
|
|
@@ -713,7 +762,7 @@ export var inlineExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
713
762
|
});
|
|
714
763
|
export var 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 var layoutSectionWithSingleColumnStage0 = createPMNodeSpecFactory({
|
|
|
763
812
|
});
|
|
764
813
|
export var 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 var multiBodiedExtensionStage0 = createPMNodeSpecFactory({
|
|
|
1058
1107
|
});
|
|
1059
1108
|
export var 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 var orderedList = createPMNodeSpecFactory({
|
|
|
1104
1153
|
});
|
|
1105
1154
|
export var 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 var panel = createPMNodeSpecFactory({
|
|
|
1130
1179
|
});
|
|
1131
1180
|
export var 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 var panelC1RootOnlyStage0 = createPMNodeSpecFactory({
|
|
|
1155
1204
|
});
|
|
1156
1205
|
export var 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 var panelC1Stage0 = createPMNodeSpecFactory({
|
|
|
1181
1230
|
});
|
|
1182
1231
|
export var 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 var tableWithNestedTable = createPMNodeSpecFactory({
|
|
|
1419
1468
|
});
|
|
1420
1469
|
export var 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 var tableCell = createPMNodeSpecFactory({
|
|
|
1446
1495
|
});
|
|
1447
1496
|
export var 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 var tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
|
1473
1522
|
});
|
|
1474
1523
|
export var 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 var tableHeader = createPMNodeSpecFactory({
|
|
|
1500
1549
|
});
|
|
1501
1550
|
export var 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 var 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 var 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 var 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 var 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 var 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 var 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
|
-
var blockQuoteContent = [paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock, codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, extension.use('with_marks')];
|
|
11
|
+
var 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 var 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 var expand = adfNode('expand').define({
|
|
8
9
|
isolating: true,
|
|
@@ -25,7 +26,7 @@ export var 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 var 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 @@ var 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 var nestedExpand = adfNode('nestedExpand').define({
|
|
|
37
37
|
optional: true
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
content: [$onePlus($or.apply(void 0, nestedExpandContent.concat([extension.use('with_marks')])))],
|
|
40
|
+
content: [$onePlus($or.apply(void 0, nestedExpandContent.concat([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 var panel = adfNode('panel').define({
|
|
|
52
52
|
optional: true
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks')])))]
|
|
55
|
+
content: [$onePlus($or.apply(void 0, panelContent.concat([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 var 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.apply(void 0, panelContent.concat([extension.use('with_marks'), table])))],
|
|
64
|
+
content: [$onePlus($or.apply(void 0, panelContent.concat([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 var 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.apply(void 0, panelContent.concat([extension.use('with_marks'), table])))],
|
|
78
|
+
content: [$onePlus($or.apply(void 0, panelContent.concat([extension.use('with_marks'), extension.use('with_annotation'), table])))],
|
|
79
79
|
preserveVariantNameInPm: true
|
|
80
80
|
});
|
|
@@ -37,7 +37,7 @@ blockTaskItem.define(_objectSpread(_objectSpread({}, commonTaskItemProps), {}, {
|
|
|
37
37
|
allowAnyChildMark: false,
|
|
38
38
|
// Override the commonTaskItemProps setting
|
|
39
39
|
contentMinItems: 1,
|
|
40
|
-
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')))]
|
|
40
|
+
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')))]
|
|
41
41
|
}));
|
|
42
42
|
taskList.define({
|
|
43
43
|
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
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
|
9
11
|
var defaultSchemaConfig = {
|
|
@@ -25,7 +27,7 @@ function () {
|
|
|
25
27
|
if (stage === 'stage0') {
|
|
26
28
|
defaultSchemaConfig.customNodeSpecs = {
|
|
27
29
|
layoutSection: layoutSectionWithSingleColumn,
|
|
28
|
-
extension: extensionRootOnlyStage0,
|
|
30
|
+
extension: fg('cc_maui_annotations_on_extensions') ? extensionRootOnlyWithAnnotationStage0 : extensionRootOnlyStage0,
|
|
29
31
|
bodiedExtension: bodiedExtensionRootOnlyStage0,
|
|
30
32
|
multiBodiedExtension: multiBodiedExtensionRootOnlyStage0,
|
|
31
33
|
extensionFrame: extensionFrame,
|
|
@@ -16,6 +16,14 @@ import { getExtensionAttrs } from '../../utils/get-extension-attrs';
|
|
|
16
16
|
* @name extension_root_only_node
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @name extension_with_annotation_node
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @name extension_root_only_with_annotation_node
|
|
25
|
+
*/
|
|
26
|
+
|
|
19
27
|
export var extension = extensionFactory({
|
|
20
28
|
parseDOM: [{
|
|
21
29
|
tag: '[data-node-type="extension"]',
|
|
@@ -39,4 +47,10 @@ export var extension = extensionFactory({
|
|
|
39
47
|
});
|
|
40
48
|
export var extensionRootOnlyStage0 = _objectSpread(_objectSpread({}, extension), {}, {
|
|
41
49
|
marks: 'breakout dataConsumer fragment unsupportedMark unsupportedNodeAttribute'
|
|
50
|
+
});
|
|
51
|
+
export var extensionWithAnnotationStage0 = _objectSpread(_objectSpread({}, extension), {}, {
|
|
52
|
+
marks: 'annotation dataConsumer fragment unsupportedMark unsupportedNodeAttribute'
|
|
53
|
+
});
|
|
54
|
+
export var extensionRootOnlyWithAnnotationStage0 = _objectSpread(_objectSpread({}, extension), {}, {
|
|
55
|
+
marks: 'annotation breakout dataConsumer fragment unsupportedMark unsupportedNodeAttribute'
|
|
42
56
|
});
|