@atlaskit/adf-schema 52.0.1 → 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.
Files changed (100) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/index.js +12 -0
  3. package/dist/cjs/next-schema/generated/markTypes.js +8 -1
  4. package/dist/cjs/next-schema/generated/nodeTypes.js +52 -15
  5. package/dist/cjs/next-schema/groups/blockContentGroup.js +1 -1
  6. package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
  7. package/dist/cjs/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  8. package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  9. package/dist/cjs/next-schema/marks/fontSize.js +32 -0
  10. package/dist/cjs/next-schema/nodes/bodiedSyncBlock.js +1 -1
  11. package/dist/cjs/next-schema/nodes/extensionFrame.js +1 -1
  12. package/dist/cjs/next-schema/nodes/list.js +2 -2
  13. package/dist/cjs/next-schema/nodes/nestedExpand.js +1 -1
  14. package/dist/cjs/next-schema/nodes/panel.js +1 -1
  15. package/dist/cjs/next-schema/nodes/paragraph.js +16 -0
  16. package/dist/cjs/next-schema/nodes/task.js +5 -5
  17. package/dist/cjs/schema/create-schema.js +3 -0
  18. package/dist/cjs/schema/default-schema.js +1 -0
  19. package/dist/cjs/schema/index.js +12 -0
  20. package/dist/cjs/schema/marks/font-size.js +31 -0
  21. package/dist/cjs/schema/marks/index.js +7 -0
  22. package/dist/cjs/schema/nodes/index.js +6 -0
  23. package/dist/cjs/schema/nodes/task-list.js +18 -3
  24. package/dist/cjs/validator-schema/generated/validatorSpec.js +67 -14
  25. package/dist/es2019/index.js +2 -2
  26. package/dist/es2019/next-schema/generated/markTypes.js +7 -0
  27. package/dist/es2019/next-schema/generated/nodeTypes.js +51 -14
  28. package/dist/es2019/next-schema/groups/blockContentGroup.js +1 -1
  29. package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
  30. package/dist/es2019/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  31. package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  32. package/dist/es2019/next-schema/marks/fontSize.js +27 -0
  33. package/dist/es2019/next-schema/nodes/bodiedSyncBlock.js +1 -1
  34. package/dist/es2019/next-schema/nodes/extensionFrame.js +1 -1
  35. package/dist/es2019/next-schema/nodes/list.js +3 -3
  36. package/dist/es2019/next-schema/nodes/nestedExpand.js +1 -1
  37. package/dist/es2019/next-schema/nodes/panel.js +1 -1
  38. package/dist/es2019/next-schema/nodes/paragraph.js +16 -0
  39. package/dist/es2019/next-schema/nodes/task.js +4 -4
  40. package/dist/es2019/schema/create-schema.js +4 -1
  41. package/dist/es2019/schema/default-schema.js +2 -1
  42. package/dist/es2019/schema/index.js +2 -2
  43. package/dist/es2019/schema/marks/font-size.js +25 -0
  44. package/dist/es2019/schema/marks/index.js +1 -0
  45. package/dist/es2019/schema/nodes/index.js +1 -1
  46. package/dist/es2019/schema/nodes/task-list.js +15 -3
  47. package/dist/es2019/validator-schema/generated/validatorSpec.js +66 -13
  48. package/dist/esm/index.js +2 -2
  49. package/dist/esm/next-schema/generated/markTypes.js +7 -0
  50. package/dist/esm/next-schema/generated/nodeTypes.js +51 -14
  51. package/dist/esm/next-schema/groups/blockContentGroup.js +1 -1
  52. package/dist/esm/next-schema/groups/blockGroup.js +1 -1
  53. package/dist/esm/next-schema/groups/nonNestableBlockContentGroup.js +1 -1
  54. package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  55. package/dist/esm/next-schema/marks/fontSize.js +27 -0
  56. package/dist/esm/next-schema/nodes/bodiedSyncBlock.js +1 -1
  57. package/dist/esm/next-schema/nodes/extensionFrame.js +1 -1
  58. package/dist/esm/next-schema/nodes/list.js +3 -3
  59. package/dist/esm/next-schema/nodes/nestedExpand.js +1 -1
  60. package/dist/esm/next-schema/nodes/panel.js +1 -1
  61. package/dist/esm/next-schema/nodes/paragraph.js +16 -0
  62. package/dist/esm/next-schema/nodes/task.js +4 -4
  63. package/dist/esm/schema/create-schema.js +4 -1
  64. package/dist/esm/schema/default-schema.js +2 -1
  65. package/dist/esm/schema/index.js +2 -2
  66. package/dist/esm/schema/marks/font-size.js +25 -0
  67. package/dist/esm/schema/marks/index.js +1 -0
  68. package/dist/esm/schema/nodes/index.js +1 -1
  69. package/dist/esm/schema/nodes/task-list.js +16 -2
  70. package/dist/esm/validator-schema/generated/validatorSpec.js +66 -13
  71. package/dist/json-schema/v1/stage-0.json +173 -0
  72. package/dist/types/index.d.ts +3 -3
  73. package/dist/types/next-schema/generated/markTypes.d.ts +11 -0
  74. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +3 -3
  75. package/dist/types/next-schema/generated/nodeTypes.d.ts +52 -15
  76. package/dist/types/next-schema/marks/fontSize.d.ts +16 -0
  77. package/dist/types/next-schema/nodes/paragraph.d.ts +19 -1
  78. package/dist/types/next-schema/nodes/task.d.ts +9 -1
  79. package/dist/types/schema/index.d.ts +3 -3
  80. package/dist/types/schema/marks/font-size.d.ts +12 -0
  81. package/dist/types/schema/marks/index.d.ts +2 -0
  82. package/dist/types/schema/nodes/index.d.ts +2 -2
  83. package/dist/types/schema/nodes/task-list.d.ts +6 -1
  84. package/dist/types/validator-schema/generated/validatorSpec.d.ts +53 -0
  85. package/dist/types-ts4.5/index.d.ts +3 -3
  86. package/dist/types-ts4.5/next-schema/generated/markTypes.d.ts +11 -0
  87. package/dist/types-ts4.5/next-schema/generated/nodeGroupTypes.d.ts +3 -3
  88. package/dist/types-ts4.5/next-schema/generated/nodeTypes.d.ts +52 -15
  89. package/dist/types-ts4.5/next-schema/marks/fontSize.d.ts +16 -0
  90. package/dist/types-ts4.5/next-schema/nodes/paragraph.d.ts +19 -1
  91. package/dist/types-ts4.5/next-schema/nodes/task.d.ts +9 -1
  92. package/dist/types-ts4.5/schema/index.d.ts +3 -3
  93. package/dist/types-ts4.5/schema/marks/font-size.d.ts +12 -0
  94. package/dist/types-ts4.5/schema/marks/index.d.ts +2 -0
  95. package/dist/types-ts4.5/schema/nodes/index.d.ts +2 -2
  96. package/dist/types-ts4.5/schema/nodes/task-list.d.ts +6 -1
  97. package/dist/types-ts4.5/validator-schema/generated/validatorSpec.d.ts +53 -0
  98. package/json-schema/v1/stage-0.json +173 -0
  99. package/package.json +2 -2
  100. package/schema-generators/__tests__/unit/adfToValidatorSpec.unit.ts +1 -0
@@ -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
  });
@@ -3,9 +3,9 @@ import { inlineContentGroup } from '../groups/inlineContentGroup';
3
3
  import { inlineGroup } from '../groups/inlineGroup';
4
4
  import { unsupportedMark } from '../marks/unsupportedMark';
5
5
  import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
6
- import { unsupportedBlock } from './unsupportedBlock';
7
- import { paragraph } from './paragraph';
8
6
  import { extension } from './extension';
7
+ import { paragraph } from './paragraph';
8
+ import { unsupportedBlock } from './unsupportedBlock';
9
9
  export const taskItem = adfNode('taskItem');
10
10
  export const taskList = adfNode('taskList');
11
11
  export const blockTaskItem = adfNode('blockTaskItem');
@@ -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,
@@ -51,7 +51,7 @@ taskList.define({
51
51
  contentMinItems: 1,
52
52
  content: [$onePlus($or(taskItem, unsupportedBlock, blockTaskItem)), $zeroPlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))]
53
53
  });
54
- taskList.variant('flexible_first_child', {
54
+ export const taskListWithFlexibleFirstChild = taskList.variant('with_flexible_first_child', {
55
55
  contentMinItems: 1,
56
56
  content: [$onePlus($or(taskItem, taskList, unsupportedBlock, blockTaskItem))],
57
57
  stage0: 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,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithFlexibleFirstChildStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, tableWithNestedTable, listItemWithFlexibleFirstChildStage0, taskListWithFlexibleFirstChildStage0, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  const getDefaultSchemaConfig = () => {
5
5
  const defaultSchemaConfig = {
@@ -24,6 +24,7 @@ export const getSchemaBasedOnStage = memoizeOne(
24
24
  extensionFrame: extensionFrame,
25
25
  expand: expandWithNestedExpand,
26
26
  listItem: listItemWithFlexibleFirstChildStage0,
27
+ taskList: taskListWithFlexibleFirstChildStage0,
27
28
  table: tableWithNestedTable,
28
29
  tableRow: tableRowWithNestedTable,
29
30
  tableCell: tableCellWithNestedTable,
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @atlaskit/editor/no-re-export */
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, 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,
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, 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';
@@ -27,7 +27,7 @@ export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWi
27
27
  export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
28
28
  export { decisionList, decisionListSelector } from './decision-list';
29
29
  export { decisionItem } from './decision-item';
30
- export { taskList, taskListSelector } from './task-list';
30
+ export { taskList, taskListSelector, taskListWithFlexibleFirstChildStage0 } from './task-list';
31
31
  export { taskItem, blockTaskItem } from './task-item';
32
32
  export { date, dateWithLocalId } from './date';
33
33
  export { placeholder, placeholderWithLocalId } from './placeholder';
@@ -1,5 +1,5 @@
1
+ import { taskList as taskListFactory, taskListWithFlexibleFirstChildStage0 as taskListWithFlexibleFirstChildStage0Factory } from '../../next-schema/generated/nodeTypes';
1
2
  import { uuid } from '../../utils/uuid';
2
- import { taskList as taskListFactory } from '../../next-schema/generated/nodeTypes';
3
3
 
4
4
  /**
5
5
  * @name taskList_node
@@ -7,7 +7,7 @@ import { taskList as taskListFactory } from '../../next-schema/generated/nodeTyp
7
7
 
8
8
  const name = 'actionList';
9
9
  export const taskListSelector = `[data-node-type="${name}"]`;
10
- export const taskList = taskListFactory({
10
+ const taskListParseDOMAndToDOM = {
11
11
  parseDOM: [{
12
12
  tag: `div${taskListSelector}`,
13
13
  // Default priority is 50. We normally don't change this but since this node type is
@@ -28,4 +28,16 @@ export const taskList = taskListFactory({
28
28
  };
29
29
  return ['div', attrs, 0];
30
30
  }
31
- });
31
+ };
32
+ export const taskList = taskListFactory(taskListParseDOMAndToDOM);
33
+ const taskListWithFlexibleFirstChild = taskListWithFlexibleFirstChildStage0Factory(taskListParseDOMAndToDOM);
34
+
35
+ /**
36
+ * @name task_list_with_flexible_first_child_stage0
37
+ * @description stage0 taskList with flexible first child content (see EDITOR-5417)
38
+ */
39
+ export const taskListWithFlexibleFirstChildStage0 = {
40
+ ...taskListWithFlexibleFirstChild,
41
+ // Generated spec omits PM group; keep taskList in block content for doc validation.
42
+ group: 'block'
43
+ };
@@ -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', '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
  },
@@ -1881,6 +1924,16 @@ export const taskList = {
1881
1924
  }
1882
1925
  }
1883
1926
  };
1927
+ export const taskList_with_flexible_first_child = ['taskList', {
1928
+ props: {
1929
+ content: {
1930
+ type: 'array',
1931
+ items: [['taskItem', 'taskList', 'blockTaskItem']],
1932
+ minItems: 1,
1933
+ allowUnsupportedBlock: true
1934
+ }
1935
+ }
1936
+ }];
1884
1937
  export const text = {
1885
1938
  props: {
1886
1939
  type: {
package/dist/esm/index.js CHANGED
@@ -1,8 +1,8 @@
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
- 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, 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';
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';
6
6
  export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, getDarkModeLCHColor } from './utils';
7
7
 
8
8
  // ADF createPMSpecFactory
@@ -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: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
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: 'dataConsumer fragment unsupportedMark unsupportedNodeAttribute',
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
@@ -1315,6 +1341,17 @@ export var taskList = createPMNodeSpecFactory({
1315
1341
  selectable: false,
1316
1342
  defining: true
1317
1343
  });
1344
+ export var taskListWithFlexibleFirstChildStage0 = createPMNodeSpecFactory({
1345
+ content: '(taskItem | taskList | unsupportedBlock | blockTaskItem)+',
1346
+ marks: 'unsupportedMark unsupportedNodeAttribute',
1347
+ attrs: {
1348
+ localId: {
1349
+ default: ''
1350
+ }
1351
+ },
1352
+ selectable: false,
1353
+ defining: true
1354
+ });
1318
1355
  export var text = createPMNodeSpecFactory({
1319
1356
  group: 'inline'
1320
1357
  });
@@ -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