@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
|
@@ -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', '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', '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'];
|
|
53
53
|
export const blockCard = {
|
|
54
54
|
props: {
|
|
55
55
|
type: {
|
|
@@ -171,7 +171,7 @@ export const blockTaskItem = {
|
|
|
171
171
|
content: {
|
|
172
172
|
type: 'array',
|
|
173
173
|
isTupleLike: true,
|
|
174
|
-
items: [['paragraph_with_no_marks', 'extension_with_marks'], ['paragraph_with_no_marks', 'extension_with_marks']],
|
|
174
|
+
items: [['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks'], ['paragraph_with_no_marks', 'paragraph_with_font_size', 'extension_with_marks']],
|
|
175
175
|
minItems: 1
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -252,7 +252,7 @@ export const bodiedSyncBlock = {
|
|
|
252
252
|
},
|
|
253
253
|
content: {
|
|
254
254
|
type: 'array',
|
|
255
|
-
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']],
|
|
255
|
+
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']],
|
|
256
256
|
minItems: 1,
|
|
257
257
|
allowUnsupportedBlock: true
|
|
258
258
|
},
|
|
@@ -513,7 +513,7 @@ export const doc = {
|
|
|
513
513
|
},
|
|
514
514
|
content: {
|
|
515
515
|
type: 'array',
|
|
516
|
-
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']],
|
|
516
|
+
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']],
|
|
517
517
|
allowUnsupportedBlock: true
|
|
518
518
|
}
|
|
519
519
|
}
|
|
@@ -617,7 +617,7 @@ export const expand = {
|
|
|
617
617
|
},
|
|
618
618
|
content: {
|
|
619
619
|
type: 'array',
|
|
620
|
-
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']],
|
|
620
|
+
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']],
|
|
621
621
|
minItems: 1,
|
|
622
622
|
allowUnsupportedBlock: true
|
|
623
623
|
}
|
|
@@ -692,7 +692,7 @@ export const extensionFrame = {
|
|
|
692
692
|
},
|
|
693
693
|
content: {
|
|
694
694
|
type: 'array',
|
|
695
|
-
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']],
|
|
695
|
+
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']],
|
|
696
696
|
minItems: 1
|
|
697
697
|
},
|
|
698
698
|
marks: {
|
|
@@ -702,6 +702,22 @@ export const extensionFrame = {
|
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
};
|
|
705
|
+
export const fontSize = {
|
|
706
|
+
props: {
|
|
707
|
+
type: {
|
|
708
|
+
type: 'enum',
|
|
709
|
+
values: ['fontSize']
|
|
710
|
+
},
|
|
711
|
+
attrs: {
|
|
712
|
+
props: {
|
|
713
|
+
fontSize: {
|
|
714
|
+
type: 'enum',
|
|
715
|
+
values: ['small']
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
};
|
|
705
721
|
export const fragment = {
|
|
706
722
|
props: {
|
|
707
723
|
type: {
|
|
@@ -1057,7 +1073,7 @@ export const listItem = {
|
|
|
1057
1073
|
content: {
|
|
1058
1074
|
type: 'array',
|
|
1059
1075
|
isTupleLike: true,
|
|
1060
|
-
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']],
|
|
1076
|
+
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']],
|
|
1061
1077
|
minItems: 1,
|
|
1062
1078
|
allowUnsupportedBlock: true
|
|
1063
1079
|
}
|
|
@@ -1067,7 +1083,7 @@ export const listItem_with_flexible_first_child = ['listItem', {
|
|
|
1067
1083
|
props: {
|
|
1068
1084
|
content: {
|
|
1069
1085
|
type: 'array',
|
|
1070
|
-
items: [['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'taskList_with_flexible_first_child', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'extension_with_marks']],
|
|
1086
|
+
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']],
|
|
1071
1087
|
minItems: 1,
|
|
1072
1088
|
allowUnsupportedBlock: true
|
|
1073
1089
|
}
|
|
@@ -1418,7 +1434,7 @@ export const nestedExpand = {
|
|
|
1418
1434
|
};
|
|
1419
1435
|
export const nestedExpand_content = {
|
|
1420
1436
|
type: 'array',
|
|
1421
|
-
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']],
|
|
1437
|
+
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']],
|
|
1422
1438
|
minItems: 1,
|
|
1423
1439
|
allowUnsupportedBlock: true
|
|
1424
1440
|
};
|
|
@@ -1432,7 +1448,7 @@ export const nestedExpand_with_no_marks = ['nestedExpand', {
|
|
|
1432
1448
|
}
|
|
1433
1449
|
}
|
|
1434
1450
|
}];
|
|
1435
|
-
export const 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'];
|
|
1451
|
+
export const 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'];
|
|
1436
1452
|
export const orderedList = {
|
|
1437
1453
|
props: {
|
|
1438
1454
|
type: {
|
|
@@ -1496,7 +1512,7 @@ export const panel = {
|
|
|
1496
1512
|
},
|
|
1497
1513
|
content: {
|
|
1498
1514
|
type: 'array',
|
|
1499
|
-
items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'bulletList', 'orderedList', 'blockCard', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'rule', 'decisionList', 'extension_with_marks']],
|
|
1515
|
+
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']],
|
|
1500
1516
|
minItems: 1,
|
|
1501
1517
|
allowUnsupportedBlock: true
|
|
1502
1518
|
}
|
|
@@ -1539,6 +1555,33 @@ export const paragraph_with_alignment = ['paragraph', {
|
|
|
1539
1555
|
}
|
|
1540
1556
|
}
|
|
1541
1557
|
}];
|
|
1558
|
+
export const paragraph_with_font_size = ['paragraph', {
|
|
1559
|
+
props: {
|
|
1560
|
+
marks: {
|
|
1561
|
+
type: 'array',
|
|
1562
|
+
optional: true,
|
|
1563
|
+
items: ['fontSize']
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
}];
|
|
1567
|
+
export const paragraph_with_font_size_and_alignment = ['paragraph', {
|
|
1568
|
+
props: {
|
|
1569
|
+
marks: {
|
|
1570
|
+
type: 'array',
|
|
1571
|
+
optional: true,
|
|
1572
|
+
items: [['fontSize', 'alignment']]
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}];
|
|
1576
|
+
export const paragraph_with_font_size_and_indentation = ['paragraph', {
|
|
1577
|
+
props: {
|
|
1578
|
+
marks: {
|
|
1579
|
+
type: 'array',
|
|
1580
|
+
optional: true,
|
|
1581
|
+
items: [['fontSize', 'indentation']]
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
}];
|
|
1542
1585
|
export const paragraph_with_indentation = ['paragraph', {
|
|
1543
1586
|
props: {
|
|
1544
1587
|
marks: {
|
|
@@ -1764,7 +1807,7 @@ export const tableCell = {
|
|
|
1764
1807
|
},
|
|
1765
1808
|
content: {
|
|
1766
1809
|
type: 'array',
|
|
1767
|
-
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']],
|
|
1810
|
+
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']],
|
|
1768
1811
|
minItems: 1,
|
|
1769
1812
|
allowUnsupportedBlock: true
|
|
1770
1813
|
}
|
|
@@ -1807,7 +1850,7 @@ export const tableHeader = {
|
|
|
1807
1850
|
},
|
|
1808
1851
|
content: {
|
|
1809
1852
|
type: 'array',
|
|
1810
|
-
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']],
|
|
1853
|
+
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']],
|
|
1811
1854
|
minItems: 1
|
|
1812
1855
|
}
|
|
1813
1856
|
},
|
package/dist/esm/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 var em = createPMMarkSpecFactory({
|
|
|
76
76
|
inclusive: true,
|
|
77
77
|
group: 'fontStyle'
|
|
78
78
|
});
|
|
79
|
+
export var fontSize = createPMMarkSpecFactory({
|
|
80
|
+
attrs: {
|
|
81
|
+
fontSize: {}
|
|
82
|
+
},
|
|
83
|
+
inclusive: false,
|
|
84
|
+
spanning: false
|
|
85
|
+
});
|
|
79
86
|
export var fragment = createPMMarkSpecFactory({
|
|
80
87
|
attrs: {
|
|
81
88
|
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: '
|
|
59
|
+
marks: 'fontSize unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
|
|
60
60
|
attrs: {
|
|
61
61
|
localId: {
|
|
62
62
|
default: ''
|
|
@@ -125,7 +125,7 @@ export var bodiedExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
125
125
|
});
|
|
126
126
|
export var 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 var decisionList = createPMNodeSpecFactory({
|
|
|
287
287
|
});
|
|
288
288
|
export var 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 var embedCard = createPMNodeSpecFactory({
|
|
293
293
|
group: 'block',
|
|
@@ -353,7 +353,7 @@ export var emojiStage0 = createPMNodeSpecFactory({
|
|
|
353
353
|
});
|
|
354
354
|
export var 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 var expand = createPMNodeSpecFactory({
|
|
|
371
371
|
});
|
|
372
372
|
export var 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 var inlineExtensionWithMarks = createPMNodeSpecFactory({
|
|
|
609
609
|
});
|
|
610
610
|
export var 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 var layoutSectionWithSingleColumnStage0 = createPMNodeSpecFactory({
|
|
|
656
656
|
});
|
|
657
657
|
export var 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 var listItem = createPMNodeSpecFactory({
|
|
|
667
667
|
});
|
|
668
668
|
export var 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 var multiBodiedExtensionStage0 = createPMNodeSpecFactory({
|
|
|
936
936
|
});
|
|
937
937
|
export var 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 var orderedList = createPMNodeSpecFactory({
|
|
|
982
982
|
});
|
|
983
983
|
export var 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 var paragraphWithAlignment = createPMNodeSpecFactory({
|
|
|
1026
1026
|
},
|
|
1027
1027
|
selectable: false
|
|
1028
1028
|
});
|
|
1029
|
+
export var paragraphWithFontSizeAndAlignmentStage0 = createPMNodeSpecFactory({
|
|
1030
|
+
group: 'block',
|
|
1031
|
+
attrs: {
|
|
1032
|
+
localId: {
|
|
1033
|
+
default: null
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
selectable: false
|
|
1037
|
+
});
|
|
1038
|
+
export var paragraphWithFontSizeAndIndentationStage0 = createPMNodeSpecFactory({
|
|
1039
|
+
group: 'block',
|
|
1040
|
+
attrs: {
|
|
1041
|
+
localId: {
|
|
1042
|
+
default: null
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
selectable: false
|
|
1046
|
+
});
|
|
1047
|
+
export var paragraphWithFontSizeStage0 = createPMNodeSpecFactory({
|
|
1048
|
+
attrs: {
|
|
1049
|
+
localId: {
|
|
1050
|
+
default: null
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
selectable: false
|
|
1054
|
+
});
|
|
1029
1055
|
export var paragraphWithIndentation = createPMNodeSpecFactory({
|
|
1030
1056
|
group: 'block',
|
|
1031
1057
|
attrs: {
|
|
@@ -1173,7 +1199,7 @@ export var tableWithNestedTable = createPMNodeSpecFactory({
|
|
|
1173
1199
|
});
|
|
1174
1200
|
export var 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 var tableCell = createPMNodeSpecFactory({
|
|
|
1197
1223
|
});
|
|
1198
1224
|
export var 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 var tableCellWithNestedTable = createPMNodeSpecFactory({
|
|
|
1221
1247
|
});
|
|
1222
1248
|
export var 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 var tableHeader = createPMNodeSpecFactory({
|
|
|
1245
1271
|
});
|
|
1246
1272
|
export var 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 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, panel, blockquote, extension.use('with_marks'), embedCard, table,
|
|
34
|
+
export var 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 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, panel, table,
|
|
21
|
+
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_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 var 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 var 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 var 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 var 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 var 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 var 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 var 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 @@ var 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
|
-
var 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
|
+
var 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 var 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
|
-
var 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
|
+
var 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 var 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 var paragraph = adfNode('paragraph').define({
|
|
@@ -33,4 +34,19 @@ export var 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
|
});
|
|
@@ -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'), extension.use('with_marks')), $zeroPlus($or(paragraph.use('with_no_marks'), extension.use('with_marks')))]
|
|
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')))]
|
|
41
41
|
}));
|
|
42
42
|
taskList.define({
|
|
43
43
|
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) {
|
|
7
7
|
var customSpecs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -249,6 +249,9 @@ var marksInOrder = [{
|
|
|
249
249
|
name: 'confluenceInlineComment',
|
|
250
250
|
spec: confluenceInlineComment
|
|
251
251
|
}].concat(markGroupDeclarations, [{
|
|
252
|
+
name: 'fontSize',
|
|
253
|
+
spec: fontSize
|
|
254
|
+
}, {
|
|
252
255
|
name: 'breakout',
|
|
253
256
|
spec: breakout
|
|
254
257
|
}, {
|
package/dist/esm/schema/index.js
CHANGED
|
@@ -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
|
+
var allowedSizes = ['small'];
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @name fontSize_mark
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export var fontSize = fontSizeFactory({
|
|
9
|
+
parseDOM: [{
|
|
10
|
+
tag: 'div.fabric-editor-font-size',
|
|
11
|
+
getAttrs: function getAttrs(dom) {
|
|
12
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
13
|
+
var fontSize = dom.getAttribute('data-font-size');
|
|
14
|
+
return {
|
|
15
|
+
fontSize: allowedSizes.indexOf(fontSize || '') === -1 ? 'small' : fontSize
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}],
|
|
19
|
+
toDOM: function 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';
|