@atlaskit/adf-schema 52.1.0 → 52.2.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 +11 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/next-schema/generated/markTypes.js +8 -1
- package/dist/cjs/next-schema/generated/nodeTypes.js +41 -15
- 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/nonNestableBlockContentGroup.js +1 -1
- package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/cjs/next-schema/marks/fontSize.js +32 -0
- package/dist/cjs/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/cjs/next-schema/nodes/extensionFrame.js +1 -1
- package/dist/cjs/next-schema/nodes/list.js +2 -2
- package/dist/cjs/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/cjs/next-schema/nodes/panel.js +1 -1
- package/dist/cjs/next-schema/nodes/paragraph.js +16 -0
- package/dist/cjs/next-schema/nodes/task.js +1 -1
- package/dist/cjs/schema/create-schema.js +3 -0
- package/dist/cjs/schema/index.js +6 -0
- package/dist/cjs/schema/marks/font-size.js +31 -0
- package/dist/cjs/schema/marks/index.js +7 -0
- package/dist/cjs/validator-schema/generated/validatorSpec.js +57 -14
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/next-schema/generated/markTypes.js +7 -0
- package/dist/es2019/next-schema/generated/nodeTypes.js +40 -14
- 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/nonNestableBlockContentGroup.js +1 -1
- package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/es2019/next-schema/marks/fontSize.js +27 -0
- package/dist/es2019/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/es2019/next-schema/nodes/extensionFrame.js +1 -1
- package/dist/es2019/next-schema/nodes/list.js +2 -2
- package/dist/es2019/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/es2019/next-schema/nodes/panel.js +1 -1
- package/dist/es2019/next-schema/nodes/paragraph.js +16 -0
- package/dist/es2019/next-schema/nodes/task.js +1 -1
- package/dist/es2019/schema/create-schema.js +4 -1
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/marks/font-size.js +25 -0
- package/dist/es2019/schema/marks/index.js +1 -0
- package/dist/es2019/validator-schema/generated/validatorSpec.js +56 -13
- package/dist/esm/index.js +1 -1
- package/dist/esm/next-schema/generated/markTypes.js +7 -0
- package/dist/esm/next-schema/generated/nodeTypes.js +40 -14
- 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/nonNestableBlockContentGroup.js +1 -1
- package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
- package/dist/esm/next-schema/marks/fontSize.js +27 -0
- package/dist/esm/next-schema/nodes/bodiedSyncBlock.js +1 -1
- package/dist/esm/next-schema/nodes/extensionFrame.js +1 -1
- package/dist/esm/next-schema/nodes/list.js +2 -2
- package/dist/esm/next-schema/nodes/nestedExpand.js +1 -1
- package/dist/esm/next-schema/nodes/panel.js +1 -1
- package/dist/esm/next-schema/nodes/paragraph.js +16 -0
- package/dist/esm/next-schema/nodes/task.js +1 -1
- package/dist/esm/schema/create-schema.js +4 -1
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/marks/font-size.js +25 -0
- package/dist/esm/schema/marks/index.js +1 -0
- package/dist/esm/validator-schema/generated/validatorSpec.js +56 -13
- package/dist/json-schema/v1/stage-0.json +139 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/next-schema/generated/markTypes.d.ts +11 -0
- package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types/next-schema/generated/nodeTypes.d.ts +42 -15
- package/dist/types/next-schema/marks/fontSize.d.ts +16 -0
- package/dist/types/next-schema/nodes/paragraph.d.ts +19 -1
- package/dist/types/next-schema/nodes/task.d.ts +6 -3
- package/dist/types/schema/index.d.ts +2 -2
- package/dist/types/schema/marks/font-size.d.ts +12 -0
- package/dist/types/schema/marks/index.d.ts +2 -0
- package/dist/types/schema/nodes/index.d.ts +1 -1
- package/dist/types/validator-schema/generated/validatorSpec.d.ts +43 -0
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/next-schema/generated/markTypes.d.ts +11 -0
- package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +3 -3
- package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +42 -15
- package/dist/types-ts4.5/next-schema/marks/fontSize.d.ts +16 -0
- package/dist/types-ts4.5/next-schema/nodes/paragraph.d.ts +19 -1
- package/dist/types-ts4.5/next-schema/nodes/task.d.ts +3 -3
- package/dist/types-ts4.5/schema/index.d.ts +2 -2
- package/dist/types-ts4.5/schema/marks/font-size.d.ts +12 -0
- package/dist/types-ts4.5/schema/marks/index.d.ts +2 -0
- package/dist/types-ts4.5/schema/nodes/index.d.ts +1 -1
- package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +43 -0
- package/json-schema/v1/stage-0.json +139 -0
- package/package.json +2 -2
- package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.underline = exports.text_with_no_marks = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList_with_flexible_first_child = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.syncBlock = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_flexible_first_child = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_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.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockTaskItem = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
|
|
6
|
+
exports.underline = exports.text_with_no_marks = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList_with_flexible_first_child = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.syncBlock = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_font_size_and_indentation = exports.paragraph_with_font_size_and_alignment = exports.paragraph_with_font_size = exports.paragraph_with_alignment = exports.paragraph = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_flexible_first_child = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.fontSize = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_root_only = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedSyncBlock = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockTaskItem = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
|
|
7
7
|
var alignment = exports.alignment = {
|
|
8
8
|
props: {
|
|
9
9
|
type: {
|
|
@@ -55,7 +55,7 @@ var backgroundColor = exports.backgroundColor = {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
-
var block_content = exports.block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks'];
|
|
58
|
+
var block_content = exports.block_content = ['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_font_size_and_alignment', 'paragraph_with_font_size_and_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks'];
|
|
59
59
|
var blockCard = exports.blockCard = {
|
|
60
60
|
props: {
|
|
61
61
|
type: {
|
|
@@ -177,7 +177,7 @@ var blockTaskItem = exports.blockTaskItem = {
|
|
|
177
177
|
content: {
|
|
178
178
|
type: 'array',
|
|
179
179
|
isTupleLike: true,
|
|
180
|
-
items: [['paragraph_with_no_marks', 'extension_with_marks'], ['paragraph_with_no_marks', 'extension_with_marks']],
|
|
180
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks'], ['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks']],
|
|
181
181
|
minItems: 1
|
|
182
182
|
}
|
|
183
183
|
}
|
|
@@ -258,7 +258,7 @@ var bodiedSyncBlock = exports.bodiedSyncBlock = {
|
|
|
258
258
|
},
|
|
259
259
|
content: {
|
|
260
260
|
type: 'array',
|
|
261
|
-
items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_no_marks', 'blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'layoutSection_with_single_column', 'layoutSection_full', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'rule', 'table', 'taskList']],
|
|
261
|
+
items: [['paragraph', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_font_size_and_alignment', 'paragraph_with_font_size_and_indentation', 'paragraph_with_no_marks', 'blockCard', 'blockquote', 'bulletList', 'codeBlock', 'decisionList', 'embedCard', 'expand', 'heading', 'heading_with_alignment', 'heading_with_indentation', 'heading_with_no_marks', 'layoutSection', 'layoutSection_with_single_column', 'layoutSection_full', 'mediaGroup', 'mediaSingle', 'mediaSingle_caption', 'mediaSingle_full', 'mediaSingle_width_type', 'orderedList', 'panel', 'rule', 'table', 'taskList']],
|
|
262
262
|
minItems: 1,
|
|
263
263
|
allowUnsupportedBlock: true
|
|
264
264
|
},
|
|
@@ -519,7 +519,7 @@ var doc = exports.doc = {
|
|
|
519
519
|
},
|
|
520
520
|
content: {
|
|
521
521
|
type: 'array',
|
|
522
|
-
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
522
|
+
items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'paragraph_with_font_size_and_alignment', 'paragraph_with_font_size_and_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock', 'bodiedSyncBlock']],
|
|
523
523
|
allowUnsupportedBlock: true
|
|
524
524
|
}
|
|
525
525
|
}
|
|
@@ -623,7 +623,7 @@ var expand = exports.expand = {
|
|
|
623
623
|
},
|
|
624
624
|
content: {
|
|
625
625
|
type: 'array',
|
|
626
|
-
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
|
626
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
|
627
627
|
minItems: 1,
|
|
628
628
|
allowUnsupportedBlock: true
|
|
629
629
|
}
|
|
@@ -698,7 +698,7 @@ var extensionFrame = exports.extensionFrame = {
|
|
|
698
698
|
},
|
|
699
699
|
content: {
|
|
700
700
|
type: 'array',
|
|
701
|
-
items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_full', 'mediaSingle_caption', 'decisionList', 'taskList', 'table', 'extension_with_marks', 'bodiedExtension_with_marks', 'blockCard', 'embedCard']],
|
|
701
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_full', 'mediaSingle_caption', 'decisionList', 'taskList', 'table', 'extension_with_marks', 'bodiedExtension_with_marks', 'blockCard', 'embedCard']],
|
|
702
702
|
minItems: 1
|
|
703
703
|
},
|
|
704
704
|
marks: {
|
|
@@ -708,6 +708,22 @@ var extensionFrame = exports.extensionFrame = {
|
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
|
+
var fontSize = exports.fontSize = {
|
|
712
|
+
props: {
|
|
713
|
+
type: {
|
|
714
|
+
type: 'enum',
|
|
715
|
+
values: ['fontSize']
|
|
716
|
+
},
|
|
717
|
+
attrs: {
|
|
718
|
+
props: {
|
|
719
|
+
fontSize: {
|
|
720
|
+
type: 'enum',
|
|
721
|
+
values: ['small']
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
};
|
|
711
727
|
var fragment = exports.fragment = {
|
|
712
728
|
props: {
|
|
713
729
|
type: {
|
|
@@ -1063,7 +1079,7 @@ var listItem = exports.listItem = {
|
|
|
1063
1079
|
content: {
|
|
1064
1080
|
type: 'array',
|
|
1065
1081
|
isTupleLike: true,
|
|
1066
|
-
items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks'], ['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1082
|
+
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks'], ['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1067
1083
|
minItems: 1,
|
|
1068
1084
|
allowUnsupportedBlock: true
|
|
1069
1085
|
}
|
|
@@ -1073,7 +1089,7 @@ var listItem_with_flexible_first_child = exports.listItem_with_flexible_first_ch
|
|
|
1073
1089
|
props: {
|
|
1074
1090
|
content: {
|
|
1075
1091
|
type: 'array',
|
|
1076
|
-
items: [['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'taskList_with_flexible_first_child', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1092
|
+
items: [['paragraph_with_font_size', 'paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'taskList_with_flexible_first_child', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1077
1093
|
minItems: 1,
|
|
1078
1094
|
allowUnsupportedBlock: true
|
|
1079
1095
|
}
|
|
@@ -1424,7 +1440,7 @@ var nestedExpand = exports.nestedExpand = {
|
|
|
1424
1440
|
};
|
|
1425
1441
|
var nestedExpand_content = exports.nestedExpand_content = {
|
|
1426
1442
|
type: 'array',
|
|
1427
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
|
|
1443
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
|
|
1428
1444
|
minItems: 1,
|
|
1429
1445
|
allowUnsupportedBlock: true
|
|
1430
1446
|
};
|
|
@@ -1438,7 +1454,7 @@ var nestedExpand_with_no_marks = exports.nestedExpand_with_no_marks = ['nestedEx
|
|
|
1438
1454
|
}
|
|
1439
1455
|
}
|
|
1440
1456
|
}];
|
|
1441
|
-
var non_nestable_block_content = exports.non_nestable_block_content = ['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks'];
|
|
1457
|
+
var non_nestable_block_content = exports.non_nestable_block_content = ['paragraph_with_no_marks', 'paragraph_with_font_size', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks'];
|
|
1442
1458
|
var orderedList = exports.orderedList = {
|
|
1443
1459
|
props: {
|
|
1444
1460
|
type: {
|
|
@@ -1502,7 +1518,7 @@ var panel = exports.panel = {
|
|
|
1502
1518
|
},
|
|
1503
1519
|
content: {
|
|
1504
1520
|
type: 'array',
|
|
1505
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList', 'extension_with_marks']],
|
|
1521
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList', 'extension_with_marks']],
|
|
1506
1522
|
minItems: 1,
|
|
1507
1523
|
allowUnsupportedBlock: true
|
|
1508
1524
|
}
|
|
@@ -1545,6 +1561,33 @@ var paragraph_with_alignment = exports.paragraph_with_alignment = ['paragraph',
|
|
|
1545
1561
|
}
|
|
1546
1562
|
}
|
|
1547
1563
|
}];
|
|
1564
|
+
var paragraph_with_font_size = exports.paragraph_with_font_size = ['paragraph', {
|
|
1565
|
+
props: {
|
|
1566
|
+
marks: {
|
|
1567
|
+
type: 'array',
|
|
1568
|
+
optional: true,
|
|
1569
|
+
items: ['fontSize']
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}];
|
|
1573
|
+
var paragraph_with_font_size_and_alignment = exports.paragraph_with_font_size_and_alignment = ['paragraph', {
|
|
1574
|
+
props: {
|
|
1575
|
+
marks: {
|
|
1576
|
+
type: 'array',
|
|
1577
|
+
optional: true,
|
|
1578
|
+
items: [['fontSize', 'alignment']]
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
}];
|
|
1582
|
+
var paragraph_with_font_size_and_indentation = exports.paragraph_with_font_size_and_indentation = ['paragraph', {
|
|
1583
|
+
props: {
|
|
1584
|
+
marks: {
|
|
1585
|
+
type: 'array',
|
|
1586
|
+
optional: true,
|
|
1587
|
+
items: [['fontSize', 'indentation']]
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}];
|
|
1548
1591
|
var paragraph_with_indentation = exports.paragraph_with_indentation = ['paragraph', {
|
|
1549
1592
|
props: {
|
|
1550
1593
|
marks: {
|
|
@@ -1770,7 +1813,7 @@ var tableCell = exports.tableCell = {
|
|
|
1770
1813
|
},
|
|
1771
1814
|
content: {
|
|
1772
1815
|
type: 'array',
|
|
1773
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
|
1816
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_font_size_and_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
|
|
1774
1817
|
minItems: 1,
|
|
1775
1818
|
allowUnsupportedBlock: true
|
|
1776
1819
|
}
|
|
@@ -1813,7 +1856,7 @@ var tableHeader = exports.tableHeader = {
|
|
|
1813
1856
|
},
|
|
1814
1857
|
content: {
|
|
1815
1858
|
type: 'array',
|
|
1816
|
-
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
|
|
1859
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_font_size_and_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
|
|
1817
1860
|
minItems: 1
|
|
1818
1861
|
}
|
|
1819
1862
|
},
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
|
|
2
|
+
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, fontSize, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
|
|
3
3
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
5
5
|
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithFlexibleFirstChildStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, taskListWithFlexibleFirstChildStage0, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
|
|
@@ -76,6 +76,13 @@ export const em = createPMMarkSpecFactory({
|
|
|
76
76
|
inclusive: true,
|
|
77
77
|
group: 'fontStyle'
|
|
78
78
|
});
|
|
79
|
+
export const fontSize = createPMMarkSpecFactory({
|
|
80
|
+
attrs: {
|
|
81
|
+
fontSize: {}
|
|
82
|
+
},
|
|
83
|
+
inclusive: false,
|
|
84
|
+
spanning: false
|
|
85
|
+
});
|
|
79
86
|
export const fragment = createPMMarkSpecFactory({
|
|
80
87
|
attrs: {
|
|
81
88
|
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: '
|
|
59
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
60
60
|
attrs: {
|
|
61
61
|
localId: {
|
|
62
62
|
default: ''
|
|
@@ -125,7 +125,7 @@ export const bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
125
125
|
});
|
|
126
126
|
export const bodiedSyncBlock = createPMNodeSpecFactory({
|
|
127
127
|
content: '(paragraph | blockCard | blockquote | bulletList | codeBlock | confluenceUnsupportedBlock | decisionList | embedCard | expand | heading | layoutSection | mediaGroup | mediaSingle | orderedList | panel | rule | table | taskList | unsupportedBlock)+',
|
|
128
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation breakout link fragment',
|
|
128
|
+
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation fontSize breakout link fragment',
|
|
129
129
|
attrs: {
|
|
130
130
|
resourceId: {
|
|
131
131
|
default: ''
|
|
@@ -287,7 +287,7 @@ export const decisionList = createPMNodeSpecFactory({
|
|
|
287
287
|
});
|
|
288
288
|
export const doc = createPMNodeSpecFactory({
|
|
289
289
|
content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock | bodiedSyncBlock)+',
|
|
290
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation dataConsumer fragment breakout'
|
|
290
|
+
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation fontSize dataConsumer fragment breakout'
|
|
291
291
|
});
|
|
292
292
|
export const embedCard = createPMNodeSpecFactory({
|
|
293
293
|
group: 'block',
|
|
@@ -353,7 +353,7 @@ export const emojiStage0 = createPMNodeSpecFactory({
|
|
|
353
353
|
});
|
|
354
354
|
export const expand = createPMNodeSpecFactory({
|
|
355
355
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock | nestedExpand)+',
|
|
356
|
-
marks: 'unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
|
356
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
|
357
357
|
group: 'block',
|
|
358
358
|
attrs: {
|
|
359
359
|
title: {
|
|
@@ -371,7 +371,7 @@ export const expand = createPMNodeSpecFactory({
|
|
|
371
371
|
});
|
|
372
372
|
export const expandRootOnly = createPMNodeSpecFactory({
|
|
373
373
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock | nestedExpand)+',
|
|
374
|
-
marks: 'unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
|
374
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute fragment dataConsumer',
|
|
375
375
|
attrs: {
|
|
376
376
|
title: {
|
|
377
377
|
default: ''
|
|
@@ -609,7 +609,7 @@ export const inlineExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
609
609
|
});
|
|
610
610
|
export const layoutColumn = createPMNodeSpecFactory({
|
|
611
611
|
content: '(block | unsupportedBlock)+',
|
|
612
|
-
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation dataConsumer fragment',
|
|
612
|
+
marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation fontSize dataConsumer fragment',
|
|
613
613
|
attrs: {
|
|
614
614
|
width: {
|
|
615
615
|
default: undefined
|
|
@@ -656,7 +656,7 @@ export const layoutSectionWithSingleColumnStage0 = createPMNodeSpecFactory({
|
|
|
656
656
|
});
|
|
657
657
|
export const listItem = createPMNodeSpecFactory({
|
|
658
658
|
content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | extension) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)*',
|
|
659
|
-
marks: '
|
|
659
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
660
660
|
attrs: {
|
|
661
661
|
localId: {
|
|
662
662
|
default: null
|
|
@@ -667,7 +667,7 @@ export const listItem = createPMNodeSpecFactory({
|
|
|
667
667
|
});
|
|
668
668
|
export const listItemWithFlexibleFirstChildStage0 = createPMNodeSpecFactory({
|
|
669
669
|
content: '(paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | extension)+',
|
|
670
|
-
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
670
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
671
671
|
attrs: {
|
|
672
672
|
localId: {
|
|
673
673
|
default: null
|
|
@@ -936,7 +936,7 @@ export const multiBodiedExtensionStage0 = createPMNodeSpecFactory({
|
|
|
936
936
|
});
|
|
937
937
|
export const nestedExpand = createPMNodeSpecFactory({
|
|
938
938
|
content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock | extension)+',
|
|
939
|
-
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
939
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
940
940
|
attrs: {
|
|
941
941
|
title: {
|
|
942
942
|
default: ''
|
|
@@ -982,7 +982,7 @@ export const orderedList = createPMNodeSpecFactory({
|
|
|
982
982
|
});
|
|
983
983
|
export const panel = createPMNodeSpecFactory({
|
|
984
984
|
content: '(paragraph | heading | bulletList | orderedList | blockCard | mediaGroup | mediaSingle | codeBlock | taskList | rule | decisionList | unsupportedBlock | extension)+',
|
|
985
|
-
marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
985
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
986
986
|
group: 'block',
|
|
987
987
|
attrs: {
|
|
988
988
|
panelType: {
|
|
@@ -1026,6 +1026,32 @@ export const paragraphWithAlignment = createPMNodeSpecFactory({
|
|
|
1026
1026
|
},
|
|
1027
1027
|
selectable: false
|
|
1028
1028
|
});
|
|
1029
|
+
export const paragraphWithFontSizeAndAlignmentStage0 = createPMNodeSpecFactory({
|
|
1030
|
+
group: 'block',
|
|
1031
|
+
attrs: {
|
|
1032
|
+
localId: {
|
|
1033
|
+
default: null
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
selectable: false
|
|
1037
|
+
});
|
|
1038
|
+
export const paragraphWithFontSizeAndIndentationStage0 = createPMNodeSpecFactory({
|
|
1039
|
+
group: 'block',
|
|
1040
|
+
attrs: {
|
|
1041
|
+
localId: {
|
|
1042
|
+
default: null
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
selectable: false
|
|
1046
|
+
});
|
|
1047
|
+
export const paragraphWithFontSizeStage0 = createPMNodeSpecFactory({
|
|
1048
|
+
attrs: {
|
|
1049
|
+
localId: {
|
|
1050
|
+
default: null
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
selectable: false
|
|
1054
|
+
});
|
|
1029
1055
|
export const paragraphWithIndentation = createPMNodeSpecFactory({
|
|
1030
1056
|
group: 'block',
|
|
1031
1057
|
attrs: {
|
|
@@ -1173,7 +1199,7 @@ export const tableWithNestedTable = createPMNodeSpecFactory({
|
|
|
1173
1199
|
});
|
|
1174
1200
|
export const tableCell = createPMNodeSpecFactory({
|
|
1175
1201
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock)+',
|
|
1176
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1202
|
+
marks: 'alignment unsupportedMark unsupportedNodeAttribute fontSize dataConsumer fragment',
|
|
1177
1203
|
attrs: {
|
|
1178
1204
|
colspan: {
|
|
1179
1205
|
default: 1
|
|
@@ -1197,7 +1223,7 @@ export const tableCell = createPMNodeSpecFactory({
|
|
|
1197
1223
|
});
|
|
1198
1224
|
export const tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
1199
1225
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | unsupportedBlock | table)+',
|
|
1200
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1226
|
+
marks: 'alignment unsupportedMark unsupportedNodeAttribute fontSize dataConsumer fragment',
|
|
1201
1227
|
attrs: {
|
|
1202
1228
|
colspan: {
|
|
1203
1229
|
default: 1
|
|
@@ -1221,7 +1247,7 @@ export const tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
|
1221
1247
|
});
|
|
1222
1248
|
export const tableHeader = createPMNodeSpecFactory({
|
|
1223
1249
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand)+',
|
|
1224
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1250
|
+
marks: 'alignment unsupportedMark unsupportedNodeAttribute fontSize dataConsumer fragment',
|
|
1225
1251
|
attrs: {
|
|
1226
1252
|
colspan: {
|
|
1227
1253
|
default: 1
|
|
@@ -1245,7 +1271,7 @@ export const tableHeader = createPMNodeSpecFactory({
|
|
|
1245
1271
|
});
|
|
1246
1272
|
export const tableHeaderWithNestedTable = createPMNodeSpecFactory({
|
|
1247
1273
|
content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaSingle | mediaGroup | decisionList | taskList | blockCard | embedCard | extension | nestedExpand | table)+',
|
|
1248
|
-
marks: 'alignment unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
1274
|
+
marks: 'alignment unsupportedMark unsupportedNodeAttribute fontSize dataConsumer fragment',
|
|
1249
1275
|
attrs: {
|
|
1250
1276
|
colspan: {
|
|
1251
1277
|
default: 1
|
|
@@ -31,7 +31,7 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
|
31
31
|
* - no base mediaSingle
|
|
32
32
|
* - no base heading
|
|
33
33
|
*/
|
|
34
|
-
export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, table,
|
|
34
|
+
export const blockContentGroup = adfNodeGroup('block_content', [blockCard, paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_font_size_and_alignment'), paragraph.use('with_font_size_and_indentation'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, taskList, bulletList, orderedList, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), mediaGroup, decisionList, rule, panel, blockquote, extension.use('with_marks'), embedCard, table,
|
|
35
35
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
36
36
|
table.use('with_nested_table'), expand, bodiedExtension.use('with_marks'), confluenceUnsupportedBlock, unsupportedBlock], {
|
|
37
37
|
ignore: ['pm-spec']
|
|
@@ -18,7 +18,7 @@ import { rule } from '../nodes/rule';
|
|
|
18
18
|
import { table } from '../nodes/tableNodes';
|
|
19
19
|
import { taskList } from '../nodes/task';
|
|
20
20
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
21
|
-
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, table,
|
|
21
|
+
export const blockGroup = adfNodeGroup('block', [blockCard, codeBlock, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_font_size_and_alignment'), paragraph.use('with_font_size_and_indentation'), paragraph.use('with_no_marks'), taskList, orderedList, bulletList, blockquote, blockquote.use('legacy'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, table,
|
|
22
22
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
23
23
|
table.use('with_nested_table'), bodiedExtension, bodiedExtension.use('with_marks'), expand, confluenceUnsupportedBlock, unsupportedBlock], {
|
|
24
24
|
// @DSLCompatibilityException
|
|
@@ -19,7 +19,7 @@ import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
|
19
19
|
// Not an actual group, but a collection of nodes that can't be nested inside each other
|
|
20
20
|
// TODO: ED-29537 - make it an actual group
|
|
21
21
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
-
export const nonNestableBlockContent = [paragraph.use('with_no_marks'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), decisionList, taskList, table,
|
|
22
|
+
export const nonNestableBlockContent = [paragraph.use('with_no_marks'), paragraph.use('with_font_size'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), decisionList, taskList, table,
|
|
23
23
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
24
24
|
table.use('with_nested_table'), blockCard, embedCard, extension.use('with_marks'), unsupportedBlock];
|
|
25
25
|
|
|
@@ -17,7 +17,7 @@ import { taskList } from '../nodes/task';
|
|
|
17
17
|
import { unsupportedBlock } from '../nodes/unsupportedBlock';
|
|
18
18
|
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
20
|
-
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks')];
|
|
20
|
+
export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), paragraph.use('with_font_size_and_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks')];
|
|
21
21
|
|
|
22
22
|
// This is not an actual group, but a collection of nodes
|
|
23
23
|
// @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { adfMark } from '@atlaskit/adf-schema-generator';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* fontSize mark - applies size styling to block-level content
|
|
5
|
+
*
|
|
6
|
+
* This mark is used to apply size styling to entire paragraph nodes,
|
|
7
|
+
* enabling features like "small text" in the full-page editor.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```json
|
|
11
|
+
* {
|
|
12
|
+
* "type": "paragraph",
|
|
13
|
+
* "marks": [{ "type": "fontSize", "attrs": { "fontSize": "small" }}],
|
|
14
|
+
* "content": [...]
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export const fontSize = adfMark('fontSize').define({
|
|
19
|
+
spanning: false,
|
|
20
|
+
inclusive: false,
|
|
21
|
+
attrs: {
|
|
22
|
+
fontSize: {
|
|
23
|
+
type: 'enum',
|
|
24
|
+
values: ['small']
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -34,7 +34,7 @@ export const bodiedSyncBlock = adfNode('bodiedSyncBlock').define({
|
|
|
34
34
|
default: ''
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, rule, table,
|
|
37
|
+
content: [$onePlus($or(paragraph, paragraph.use('with_alignment'), paragraph.use('with_indentation'), paragraph.use('with_font_size_and_alignment'), paragraph.use('with_font_size_and_indentation'), paragraph.use('with_no_marks'), blockCard, blockquote, blockquote.use('legacy'), bulletList, codeBlock, confluenceUnsupportedBlock, decisionList, embedCard, expand, heading, heading.use('with_alignment'), heading.use('with_indentation'), heading.use('with_no_marks'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), mediaGroup, mediaSingle, mediaSingle.use('caption'), mediaSingle.use('full'), mediaSingle.use('width_type'), orderedList, panel, rule, table,
|
|
38
38
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
39
39
|
table.use('with_nested_table'), taskList, unsupportedBlock))]
|
|
40
40
|
});
|
|
@@ -30,7 +30,7 @@ export const extensionFrame = adfNode('extensionFrame').define({
|
|
|
30
30
|
// packages/adf-schema-generator/src/transforms/adfToPm/buildPmSpec.ts
|
|
31
31
|
marks: [dataConsumer, fragment, unsupportedMark, unsupportedNodeAttribute],
|
|
32
32
|
attrs: {},
|
|
33
|
-
content: [$onePlus($or(paragraph.use('with_no_marks'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock, mediaGroup, mediaSingle.use('full'), mediaSingle.use('caption'), decisionList, taskList, table,
|
|
33
|
+
content: [$onePlus($or(paragraph.use('with_no_marks'), paragraph.use('with_font_size'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), codeBlock, mediaGroup, mediaSingle.use('full'), mediaSingle.use('caption'), decisionList, taskList, table,
|
|
34
34
|
// @ts-expect-error - types don't deal well with circular references for the variant
|
|
35
35
|
table.use('with_nested_table'), extension.use('with_marks'), bodiedExtension.use('with_marks'), unsupportedBlock, blockCard, embedCard))],
|
|
36
36
|
DANGEROUS_MANUAL_OVERRIDE: {
|
|
@@ -21,9 +21,9 @@ const listItem = adfNode('listItem').define({
|
|
|
21
21
|
},
|
|
22
22
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
23
23
|
contentMinItems: 1,
|
|
24
|
-
content: [$or(paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))]
|
|
24
|
+
content: [$or(paragraph.use('with_font_size'), paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')), $zeroPlus($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')))]
|
|
25
25
|
}).variant('with_flexible_first_child', {
|
|
26
|
-
content: [$onePlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, taskListWithFlexibleFirstChild.use('with_flexible_first_child'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))],
|
|
26
|
+
content: [$onePlus($or(paragraph.use('with_font_size'), paragraph.use('with_no_marks'), bulletList, orderedList, taskList, taskListWithFlexibleFirstChild.use('with_flexible_first_child'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, unsupportedBlock, extension.use('with_marks')))],
|
|
27
27
|
noExtend: true,
|
|
28
28
|
stage0: true
|
|
29
29
|
});
|
|
@@ -14,7 +14,7 @@ import { paragraph } from './paragraph';
|
|
|
14
14
|
import { rule } from './rule';
|
|
15
15
|
import { taskList } from './task';
|
|
16
16
|
import { unsupportedBlock } from './unsupportedBlock';
|
|
17
|
-
const nestedExpandContent = [paragraph.use('with_no_marks'), heading.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote, unsupportedBlock];
|
|
17
|
+
const nestedExpandContent = [paragraph.use('with_no_marks'), paragraph.use('with_font_size'), heading.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote, unsupportedBlock];
|
|
18
18
|
export const nestedExpand = adfNode('nestedExpand').define({
|
|
19
19
|
isolating: true,
|
|
20
20
|
selectable: true,
|
|
@@ -13,7 +13,7 @@ import { rule } from './rule';
|
|
|
13
13
|
import { taskList } from './task';
|
|
14
14
|
import { unsupportedBlock } from './unsupportedBlock';
|
|
15
15
|
import { extension } from './extension';
|
|
16
|
-
const panelContent = [paragraph.use('with_no_marks'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, taskList, rule, decisionList, unsupportedBlock];
|
|
16
|
+
const panelContent = [paragraph.use('with_no_marks'), paragraph.use('with_font_size'), heading.use('with_no_marks'), bulletList, orderedList, blockCard, mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock, taskList, rule, decisionList, unsupportedBlock];
|
|
17
17
|
export const panel = adfNode('panel').define({
|
|
18
18
|
selectable: true,
|
|
19
19
|
marks: [unsupportedMark, unsupportedNodeAttribute],
|
|
@@ -2,6 +2,7 @@ import { $or, $zeroPlus, adfNode } from '@atlaskit/adf-schema-generator';
|
|
|
2
2
|
import { inlineContentGroup } from '../groups/inlineContentGroup';
|
|
3
3
|
import { inlineGroup } from '../groups/inlineGroup';
|
|
4
4
|
import { alignment, indentation } from '../marks/alignmentAndIndentation';
|
|
5
|
+
import { fontSize } from '../marks/fontSize';
|
|
5
6
|
import { unsupportedMark } from '../marks/unsupportedMark';
|
|
6
7
|
import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
|
|
7
8
|
export const paragraph = adfNode('paragraph').define({
|
|
@@ -33,4 +34,19 @@ export const paragraph = adfNode('paragraph').define({
|
|
|
33
34
|
marks: [],
|
|
34
35
|
noMarks: true,
|
|
35
36
|
ignore: []
|
|
37
|
+
}).variant('with_font_size', {
|
|
38
|
+
marks: [fontSize, unsupportedMark, unsupportedNodeAttribute],
|
|
39
|
+
content: [],
|
|
40
|
+
ignore: [],
|
|
41
|
+
stage0: true
|
|
42
|
+
}).variant('with_font_size_and_alignment', {
|
|
43
|
+
marks: [fontSize, alignment, unsupportedMark, unsupportedNodeAttribute],
|
|
44
|
+
content: [],
|
|
45
|
+
ignore: [],
|
|
46
|
+
stage0: true
|
|
47
|
+
}).variant('with_font_size_and_indentation', {
|
|
48
|
+
marks: [fontSize, indentation, unsupportedMark, unsupportedNodeAttribute],
|
|
49
|
+
content: [],
|
|
50
|
+
ignore: [],
|
|
51
|
+
stage0: true
|
|
36
52
|
});
|
|
@@ -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'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), extension.use('with_marks')))]
|
|
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')))]
|
|
40
40
|
});
|
|
41
41
|
taskList.define({
|
|
42
42
|
defining: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
|
|
3
3
|
import { sanitizeNodes } from './sanitizeNodes';
|
|
4
|
-
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
|
|
4
|
+
import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, fontSize, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
|
|
5
5
|
import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote, syncBlock, bodiedSyncBlock } from './nodes';
|
|
6
6
|
function addItems(builtInItems, config, customSpecs = {}) {
|
|
7
7
|
if (!config) {
|
|
@@ -247,6 +247,9 @@ const marksInOrder = [{
|
|
|
247
247
|
name: 'confluenceInlineComment',
|
|
248
248
|
spec: confluenceInlineComment
|
|
249
249
|
}, ...markGroupDeclarations, {
|
|
250
|
+
name: 'fontSize',
|
|
251
|
+
spec: fontSize
|
|
252
|
+
}, {
|
|
250
253
|
name: 'breakout',
|
|
251
254
|
spec: breakout
|
|
252
255
|
}, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
2
|
export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithFlexibleFirstChildStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, taskListWithFlexibleFirstChildStage0, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, syncBlock, bodiedSyncBlock, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './nodes';
|
|
3
|
-
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
|
3
|
+
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, fontSize, breakout, code, colorPalette,
|
|
4
4
|
// eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
|
|
5
5
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
|
6
6
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette } from './marks';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { fontSize as fontSizeFactory } from '../../next-schema/generated/markTypes';
|
|
2
|
+
const allowedSizes = ['small'];
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @name fontSize_mark
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const fontSize = fontSizeFactory({
|
|
9
|
+
parseDOM: [{
|
|
10
|
+
tag: 'div.fabric-editor-font-size',
|
|
11
|
+
getAttrs(dom) {
|
|
12
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
|
+
const fontSize = dom.getAttribute('data-font-size');
|
|
14
|
+
return {
|
|
15
|
+
fontSize: allowedSizes.indexOf(fontSize || '') === -1 ? 'small' : fontSize
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}],
|
|
19
|
+
toDOM(mark) {
|
|
20
|
+
return ['div', {
|
|
21
|
+
class: 'fabric-editor-block-mark fabric-editor-font-size',
|
|
22
|
+
'data-font-size': mark.attrs.fontSize
|
|
23
|
+
}, 0];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
@@ -10,6 +10,7 @@ export { subsup } from './subsup';
|
|
|
10
10
|
export { textColor, colorPalette, colorPaletteExtended } from './text-color';
|
|
11
11
|
export { confluenceInlineComment } from './confluence-inline-comment';
|
|
12
12
|
export { breakout } from './breakout';
|
|
13
|
+
export { fontSize } from './font-size';
|
|
13
14
|
export { alignment, alignmentPositionMap } from './alignment';
|
|
14
15
|
export { indentation } from './indentation';
|
|
15
16
|
export { annotation, AnnotationMarkStates, buildDataAttributes as buildAnnotationMarkDataAttributes, AnnotationTypes } from './annotation';
|