@atlaskit/adf-schema 40.3.1 → 40.5.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 (52) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +8 -2
  3. package/dist/cjs/next-schema/generated/nodeTypes.js +10 -4
  4. package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
  5. package/dist/cjs/next-schema/nodes/blockquote.js +4 -5
  6. package/dist/cjs/next-schema/nodes/list.js +7 -2
  7. package/dist/cjs/schema/create-schema.js +1 -1
  8. package/dist/cjs/schema/default-schema.js +2 -1
  9. package/dist/cjs/schema/index.js +8 -2
  10. package/dist/cjs/schema/nodes/blockquote.js +3 -3
  11. package/dist/cjs/schema/nodes/index.js +8 -2
  12. package/dist/cjs/schema/nodes/list-item.js +14 -1
  13. package/dist/cjs/validator-schema/generated/validatorSpec.js +70 -59
  14. package/dist/es2019/index.js +2 -2
  15. package/dist/es2019/next-schema/generated/nodeTypes.js +9 -3
  16. package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
  17. package/dist/es2019/next-schema/nodes/blockquote.js +4 -5
  18. package/dist/es2019/next-schema/nodes/list.js +7 -2
  19. package/dist/es2019/schema/create-schema.js +2 -2
  20. package/dist/es2019/schema/default-schema.js +3 -2
  21. package/dist/es2019/schema/index.js +1 -1
  22. package/dist/es2019/schema/nodes/blockquote.js +3 -3
  23. package/dist/es2019/schema/nodes/index.js +2 -2
  24. package/dist/es2019/schema/nodes/list-item.js +14 -0
  25. package/dist/es2019/validator-schema/generated/validatorSpec.js +69 -58
  26. package/dist/esm/index.js +2 -2
  27. package/dist/esm/next-schema/generated/nodeTypes.js +9 -3
  28. package/dist/esm/next-schema/groups/blockGroup.js +1 -1
  29. package/dist/esm/next-schema/nodes/blockquote.js +4 -5
  30. package/dist/esm/next-schema/nodes/list.js +7 -2
  31. package/dist/esm/schema/create-schema.js +2 -2
  32. package/dist/esm/schema/default-schema.js +3 -2
  33. package/dist/esm/schema/index.js +1 -1
  34. package/dist/esm/schema/nodes/blockquote.js +3 -3
  35. package/dist/esm/schema/nodes/index.js +2 -2
  36. package/dist/esm/schema/nodes/list-item.js +14 -0
  37. package/dist/esm/validator-schema/generated/validatorSpec.js +69 -58
  38. package/dist/json-schema/v1/full.json +82 -70
  39. package/dist/json-schema/v1/stage-0.json +130 -86
  40. package/dist/types/index.d.ts +2 -2
  41. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
  42. package/dist/types/next-schema/generated/nodeTypes.d.ts +14 -7
  43. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +7 -3
  44. package/dist/types/next-schema/nodes/blockquote.d.ts +2 -3
  45. package/dist/types/schema/index.d.ts +1 -1
  46. package/dist/types/schema/nodes/blockquote.d.ts +1 -1
  47. package/dist/types/schema/nodes/index.d.ts +2 -2
  48. package/dist/types/schema/nodes/list-item.d.ts +5 -0
  49. package/dist/types/validator-schema/generated/validatorSpec.d.ts +66 -55
  50. package/json-schema/v1/full.json +82 -70
  51. package/json-schema/v1/stage-0.json +130 -86
  52. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpandStage0, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
1
+ export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpandStage0, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
2
2
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
3
  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';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -1,5 +1,5 @@
1
1
  import { blockquote as blockquoteFactory } from '../../next-schema/generated/nodeTypes';
2
- import { blockquoteLegacy as blockquoteLegacyFactory, blockquoteWithNestedCodeblockOrMediaStage0 as blockquoteWithNestedCodeblockOrMediaStage0Factory } from '../../next-schema/generated/nodeTypes';
2
+ import { blockquoteLegacy as blockquoteLegacyFactory, blockquoteWithoutNestedCodeblockOrMedia as blockquoteWithoutNestedCodeblockOrMediaFactory } from '../../next-schema/generated/nodeTypes';
3
3
 
4
4
  /**
5
5
  * @name blockquote_node
@@ -14,12 +14,12 @@ const nodeSpecOptions = {
14
14
  }
15
15
  };
16
16
  export const blockquote = blockquoteLegacyFactory(nodeSpecOptions);
17
- export const blockquoteWithNestedCodeblockOrMediaStage0 = blockquoteWithNestedCodeblockOrMediaStage0Factory(nodeSpecOptions);
17
+ export const blockquoteWithNestedCodeblockOrMedia = blockquoteFactory(nodeSpecOptions);
18
18
 
19
19
  /**
20
20
  * @name blockquote_with_list_node
21
21
  */
22
- export const blockquoteWithList = blockquoteFactory({
22
+ export const blockquoteWithList = blockquoteWithoutNestedCodeblockOrMediaFactory({
23
23
  parseDOM: [{
24
24
  tag: 'blockquote'
25
25
  }],
@@ -3,7 +3,7 @@ export { confluenceJiraIssue } from './confluence-jira-issue';
3
3
  export { confluenceUnsupportedBlock } from './confluence-unsupported-block';
4
4
  export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
5
5
  export { doc } from './doc';
6
- export { blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0 } from './blockquote';
6
+ export { blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia } from './blockquote';
7
7
  export { bulletList, bulletListSelector } from './bullet-list';
8
8
  export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
9
9
  export { hardBreak } from './hard-break';
@@ -14,7 +14,7 @@ export { paragraph } from './paragraph';
14
14
  export { emoji } from './emoji';
15
15
  export { image } from './image';
16
16
  export { mention, toJSON as mentionToJSON } from './mention';
17
- export { listItem, listItemWithTask } from './list-item';
17
+ export { listItem, listItemWithTask, listItemWithDecisionStage0 } from './list-item';
18
18
  export { extendedPanel, PanelType } from './panel';
19
19
  export { text } from './text';
20
20
  export { default as unknownBlock } from './unknown-block';
@@ -1,5 +1,6 @@
1
1
  import { listItem as listItemFactory } from '../../next-schema/generated/nodeTypes';
2
2
  import { listItemLegacy as listItemLegacyFactory } from '../../next-schema/generated/nodeTypes';
3
+ import { listItemWithNestedDecisionStage0 as listItemWithNestedDecisionStage0Factory } from '../../next-schema/generated/nodeTypes';
3
4
  export const listItem = listItemLegacyFactory({
4
5
  parseDOM: [{
5
6
  tag: 'li'
@@ -20,4 +21,17 @@ export const listItemWithTask = listItemFactory({
20
21
  toDOM() {
21
22
  return ['li', 0];
22
23
  }
24
+ });
25
+
26
+ /**
27
+ * @name list_item_with_decision_stage0
28
+ * @description this node allows decisions to be nested inside list-item
29
+ */
30
+ export const listItemWithDecisionStage0 = listItemWithNestedDecisionStage0Factory({
31
+ parseDOM: [{
32
+ tag: 'li'
33
+ }],
34
+ toDOM() {
35
+ return ['li', 0];
36
+ }
23
37
  });
@@ -993,6 +993,62 @@ export const listItem_legacy = ['listItem', {
993
993
  }
994
994
  }
995
995
  }];
996
+ export const decisionItem = {
997
+ props: {
998
+ type: {
999
+ type: 'enum',
1000
+ values: ['decisionItem']
1001
+ },
1002
+ attrs: {
1003
+ props: {
1004
+ localId: {
1005
+ type: 'string'
1006
+ },
1007
+ state: {
1008
+ type: 'string'
1009
+ }
1010
+ }
1011
+ },
1012
+ content: {
1013
+ type: 'array',
1014
+ items: ['inline'],
1015
+ optional: true,
1016
+ allowUnsupportedInline: true
1017
+ }
1018
+ }
1019
+ };
1020
+ export const decisionList = {
1021
+ props: {
1022
+ type: {
1023
+ type: 'enum',
1024
+ values: ['decisionList']
1025
+ },
1026
+ attrs: {
1027
+ props: {
1028
+ localId: {
1029
+ type: 'string'
1030
+ }
1031
+ }
1032
+ },
1033
+ content: {
1034
+ type: 'array',
1035
+ items: ['decisionItem'],
1036
+ minItems: 1,
1037
+ allowUnsupportedBlock: true
1038
+ }
1039
+ }
1040
+ };
1041
+ export const listItem_with_nested_decision = ['listItem', {
1042
+ props: {
1043
+ content: {
1044
+ type: 'array',
1045
+ isTupleLike: true,
1046
+ items: [['paragraph_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'decisionList'], ['paragraph_with_no_marks', 'bulletList', 'orderedList', 'taskList', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock_with_no_marks', 'decisionList']],
1047
+ minItems: 1,
1048
+ allowUnsupportedBlock: true
1049
+ }
1050
+ }
1051
+ }];
996
1052
  export const bulletList = {
997
1053
  props: {
998
1054
  type: {
@@ -1001,7 +1057,7 @@ export const bulletList = {
1001
1057
  },
1002
1058
  content: {
1003
1059
  type: 'array',
1004
- items: ['listItem'],
1060
+ items: [['listItem', 'listItem_with_nested_decision']],
1005
1061
  minItems: 1
1006
1062
  }
1007
1063
  }
@@ -1039,104 +1095,59 @@ export const orderedList = {
1039
1095
  },
1040
1096
  content: {
1041
1097
  type: 'array',
1042
- items: ['listItem'],
1098
+ items: [['listItem', 'listItem_with_nested_decision']],
1043
1099
  minItems: 1
1044
1100
  }
1045
1101
  }
1046
1102
  };
1047
- export const blockquote = {
1103
+ export const mediaGroup = {
1048
1104
  props: {
1049
1105
  type: {
1050
1106
  type: 'enum',
1051
- values: ['blockquote']
1107
+ values: ['mediaGroup']
1052
1108
  },
1053
1109
  content: {
1054
1110
  type: 'array',
1055
- items: [['paragraph_with_no_marks', 'orderedList', 'bulletList']],
1111
+ items: ['media'],
1056
1112
  minItems: 1,
1057
1113
  allowUnsupportedBlock: true
1058
1114
  }
1059
1115
  }
1060
1116
  };
1061
- export const blockquote_legacy = ['blockquote', {
1062
- props: {
1063
- content: {
1064
- type: 'array',
1065
- items: ['paragraph'],
1066
- minItems: 1,
1067
- allowUnsupportedBlock: true
1068
- }
1069
- }
1070
- }];
1071
- export const mediaGroup = {
1117
+ export const blockquote = {
1072
1118
  props: {
1073
1119
  type: {
1074
1120
  type: 'enum',
1075
- values: ['mediaGroup']
1121
+ values: ['blockquote']
1076
1122
  },
1077
1123
  content: {
1078
1124
  type: 'array',
1079
- items: ['media'],
1125
+ items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock_with_no_marks', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full']],
1080
1126
  minItems: 1,
1081
1127
  allowUnsupportedBlock: true
1082
1128
  }
1083
1129
  }
1084
1130
  };
1085
- export const blockquote_with_nested_codeblock_or_media = ['blockquote', {
1131
+ export const blockquote_legacy = ['blockquote', {
1086
1132
  props: {
1087
1133
  content: {
1088
1134
  type: 'array',
1089
- items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock_with_no_marks', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full']],
1135
+ items: ['paragraph'],
1090
1136
  minItems: 1,
1091
1137
  allowUnsupportedBlock: true
1092
1138
  }
1093
1139
  }
1094
1140
  }];
1095
- export const decisionItem = {
1141
+ export const blockquote_without_nested_codeblock_or_media = ['blockquote', {
1096
1142
  props: {
1097
- type: {
1098
- type: 'enum',
1099
- values: ['decisionItem']
1100
- },
1101
- attrs: {
1102
- props: {
1103
- localId: {
1104
- type: 'string'
1105
- },
1106
- state: {
1107
- type: 'string'
1108
- }
1109
- }
1110
- },
1111
1143
  content: {
1112
1144
  type: 'array',
1113
- items: ['inline'],
1114
- optional: true,
1115
- allowUnsupportedInline: true
1116
- }
1117
- }
1118
- };
1119
- export const decisionList = {
1120
- props: {
1121
- type: {
1122
- type: 'enum',
1123
- values: ['decisionList']
1124
- },
1125
- attrs: {
1126
- props: {
1127
- localId: {
1128
- type: 'string'
1129
- }
1130
- }
1131
- },
1132
- content: {
1133
- type: 'array',
1134
- items: ['decisionItem'],
1145
+ items: [['paragraph_with_no_marks', 'orderedList', 'bulletList']],
1135
1146
  minItems: 1,
1136
1147
  allowUnsupportedBlock: true
1137
1148
  }
1138
1149
  }
1139
- };
1150
+ }];
1140
1151
  export const embedCard = {
1141
1152
  props: {
1142
1153
  type: {
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandWithNestedExpandStage0, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette } from './schema';
1
+ export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandWithNestedExpandStage0, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette } from './schema';
3
3
  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';
4
4
 
5
5
  // ADF createPMSpecFactory
@@ -28,7 +28,7 @@ export var blockCard = createPMNodeSpecFactory({
28
28
  draggable: true
29
29
  });
30
30
  export var blockquote = createPMNodeSpecFactory({
31
- content: '(paragraph | orderedList | bulletList | unsupportedBlock)+',
31
+ content: '(paragraph | orderedList | bulletList | unsupportedBlock | codeBlock | mediaGroup | mediaSingle)+',
32
32
  group: 'block',
33
33
  selectable: false,
34
34
  defining: true
@@ -39,8 +39,8 @@ export var blockquoteLegacy = createPMNodeSpecFactory({
39
39
  selectable: false,
40
40
  defining: true
41
41
  });
42
- export var blockquoteWithNestedCodeblockOrMediaStage0 = createPMNodeSpecFactory({
43
- content: '(paragraph | orderedList | bulletList | unsupportedBlock | codeBlock | mediaGroup | mediaSingle)+',
42
+ export var blockquoteWithoutNestedCodeblockOrMedia = createPMNodeSpecFactory({
43
+ content: '(paragraph | orderedList | bulletList | unsupportedBlock)+',
44
44
  group: 'block',
45
45
  selectable: false,
46
46
  defining: true
@@ -569,6 +569,12 @@ export var listItemLegacy = createPMNodeSpecFactory({
569
569
  selectable: false,
570
570
  defining: true
571
571
  });
572
+ export var listItemWithNestedDecisionStage0 = createPMNodeSpecFactory({
573
+ content: '(paragraph | mediaSingle | codeBlock | unsupportedBlock | decisionList) (paragraph | bulletList | orderedList | taskList | mediaSingle | codeBlock | unsupportedBlock | decisionList)*',
574
+ marks: 'unsupportedMark unsupportedNodeAttribute',
575
+ selectable: false,
576
+ defining: true
577
+ });
572
578
  export var media = createPMNodeSpecFactory({
573
579
  attrs: {
574
580
  type: {
@@ -18,7 +18,7 @@ import { rule } from '../nodes/rule';
18
18
  import { table } from '../nodes/table';
19
19
  import { taskList } from '../nodes/task';
20
20
  import { unsupportedBlock } from '../nodes/unsupportedBlock';
21
- export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), 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'), blockquote.use('with_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('legacy'), table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_no_mark'), expand.use('with_breakout_mark'), expand.use('with_nested_expand'), confluenceUnsupportedBlock, unsupportedBlock], {
21
+ export var blockGroup = adfNodeGroup('block', [blockCard, codeBlock, codeBlock.use('with_marks'), codeBlock.use('with_no_marks'), 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'), blockquote.use('without_nested_codeblock_or_media'), decisionList, embedCard, extension, extension.use('with_marks'), heading, heading.use('with_indentation'), heading.use('with_no_marks'), heading.use('with_alignment'), mediaGroup, rule, panel, panel.use('legacy'), table, bodiedExtension, bodiedExtension.use('with_marks'), expand, expand.use('with_no_mark'), expand.use('with_breakout_mark'), expand.use('with_nested_expand'), confluenceUnsupportedBlock, unsupportedBlock], {
22
22
  // @DSLCompatibilityException
23
23
  // Block group in PM doesn't match ADF
24
24
  ignore: ['validator-spec']
@@ -11,12 +11,11 @@ export var blockquote = adfNode('blockquote').define({
11
11
  defining: true,
12
12
  selectable: false,
13
13
  marks: [unsupportedMark, unsupportedNodeAttribute],
14
- content: [$onePlus($or(paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock))]
14
+ content: [$onePlus($or(paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock, codeBlock.use('with_no_marks'), mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full')))]
15
15
  }).variant('legacy', {
16
16
  ignore: ['json-schema', 'validator-spec'],
17
17
  content: [$onePlus($or(paragraph, unsupportedBlock))]
18
- }).variant('with_nested_codeblock_or_media', {
19
- content: [$onePlus($or(paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock, codeBlock.use('with_no_marks'), mediaGroup, mediaSingle.use('caption'), mediaSingle.use('full')))],
20
- noExtend: true,
21
- stage0: true
18
+ }).variant('without_nested_codeblock_or_media', {
19
+ content: [$onePlus($or(paragraph.use('with_no_marks'), orderedList, bulletList, unsupportedBlock))],
20
+ ignore: ['json-schema', 'validator-spec']
22
21
  });
@@ -6,6 +6,7 @@ import { mediaSingle } from './mediaSingle';
6
6
  import { paragraph } from './paragraph';
7
7
  import { taskList } from './task';
8
8
  import { unsupportedBlock } from './unsupportedBlock';
9
+ import { decisionList } from './decisionList';
9
10
  export var orderedList = adfNode('orderedList');
10
11
  export var bulletList = adfNode('bulletList');
11
12
  var listItem = adfNode('listItem').define({
@@ -17,6 +18,10 @@ var listItem = adfNode('listItem').define({
17
18
  }).variant('legacy', {
18
19
  content: [$or(paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), unsupportedBlock), $zeroPlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), unsupportedBlock))],
19
20
  ignore: ['json-schema', 'validator-spec']
21
+ }).variant('with_nested_decision', {
22
+ content: [$or(paragraph.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), unsupportedBlock, decisionList), $zeroPlus($or(paragraph.use('with_no_marks'), bulletList, orderedList, taskList, mediaSingle.use('caption'), mediaSingle.use('full'), codeBlock.use('with_no_marks'), unsupportedBlock, decisionList))],
23
+ noExtend: true,
24
+ stage0: true
20
25
  });
21
26
  orderedList.define({
22
27
  selectable: false,
@@ -29,10 +34,10 @@ orderedList.define({
29
34
  optional: true
30
35
  }
31
36
  },
32
- content: [$onePlus($or(listItem, listItem.use('legacy')))]
37
+ content: [$onePlus($or(listItem, listItem.use('legacy'), listItem.use('with_nested_decision')))]
33
38
  });
34
39
  bulletList.define({
35
40
  selectable: false,
36
41
  marks: [unsupportedMark, unsupportedNodeAttribute],
37
- content: [$onePlus($or(listItem, listItem.use('legacy')))]
42
+ content: [$onePlus($or(listItem, listItem.use('legacy'), listItem.use('with_nested_decision')))]
38
43
  });
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { Schema } from '@atlaskit/editor-prosemirror/model';
5
5
  import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
6
6
  import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
7
- import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItemWithTask, heading, blockquoteWithList, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
7
+ import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItemWithTask, heading, blockquoteWithNestedCodeblockOrMedia, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expand, nestedExpand, embedCard, caption } from './nodes';
8
8
  function addItems(builtInItems, config) {
9
9
  var customSpecs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
10
10
  if (!config) {
@@ -77,7 +77,7 @@ var nodesInOrder = [{
77
77
  spec: heading
78
78
  }, {
79
79
  name: 'blockquote',
80
- spec: blockquoteWithList
80
+ spec: blockquoteWithNestedCodeblockOrMedia
81
81
  }, {
82
82
  name: 'codeBlock',
83
83
  spec: codeBlock
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpandStage0, blockquoteWithNestedCodeblockOrMediaStage0 } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpandStage0, blockquoteWithNestedCodeblockOrMedia, listItemWithDecisionStage0 } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
5
5
  var defaultSchemaConfig = {
@@ -20,7 +20,8 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
20
20
  multiBodiedExtension: multiBodiedExtension,
21
21
  extensionFrame: extensionFrame,
22
22
  expand: expandWithNestedExpandStage0,
23
- blockquote: blockquoteWithNestedCodeblockOrMediaStage0
23
+ blockquote: blockquoteWithNestedCodeblockOrMedia,
24
+ listItem: listItemWithDecisionStage0
24
25
  };
25
26
  }
26
27
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpandStage0, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
1
+ export { PanelType, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandWithNestedExpandStage0, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
2
2
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
3
  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';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -1,5 +1,5 @@
1
1
  import { blockquote as blockquoteFactory } from '../../next-schema/generated/nodeTypes';
2
- import { blockquoteLegacy as blockquoteLegacyFactory, blockquoteWithNestedCodeblockOrMediaStage0 as blockquoteWithNestedCodeblockOrMediaStage0Factory } from '../../next-schema/generated/nodeTypes';
2
+ import { blockquoteLegacy as blockquoteLegacyFactory, blockquoteWithoutNestedCodeblockOrMedia as blockquoteWithoutNestedCodeblockOrMediaFactory } from '../../next-schema/generated/nodeTypes';
3
3
 
4
4
  /**
5
5
  * @name blockquote_node
@@ -14,12 +14,12 @@ var nodeSpecOptions = {
14
14
  }
15
15
  };
16
16
  export var blockquote = blockquoteLegacyFactory(nodeSpecOptions);
17
- export var blockquoteWithNestedCodeblockOrMediaStage0 = blockquoteWithNestedCodeblockOrMediaStage0Factory(nodeSpecOptions);
17
+ export var blockquoteWithNestedCodeblockOrMedia = blockquoteFactory(nodeSpecOptions);
18
18
 
19
19
  /**
20
20
  * @name blockquote_with_list_node
21
21
  */
22
- export var blockquoteWithList = blockquoteFactory({
22
+ export var blockquoteWithList = blockquoteWithoutNestedCodeblockOrMediaFactory({
23
23
  parseDOM: [{
24
24
  tag: 'blockquote'
25
25
  }],
@@ -3,7 +3,7 @@ export { confluenceJiraIssue } from './confluence-jira-issue';
3
3
  export { confluenceUnsupportedBlock } from './confluence-unsupported-block';
4
4
  export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
5
5
  export { doc } from './doc';
6
- export { blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0 } from './blockquote';
6
+ export { blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMedia } from './blockquote';
7
7
  export { bulletList, bulletListSelector } from './bullet-list';
8
8
  export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
9
9
  export { hardBreak } from './hard-break';
@@ -14,7 +14,7 @@ export { paragraph } from './paragraph';
14
14
  export { emoji } from './emoji';
15
15
  export { image } from './image';
16
16
  export { mention, toJSON as mentionToJSON } from './mention';
17
- export { listItem, listItemWithTask } from './list-item';
17
+ export { listItem, listItemWithTask, listItemWithDecisionStage0 } from './list-item';
18
18
  export { extendedPanel, PanelType } from './panel';
19
19
  export { text } from './text';
20
20
  export { default as unknownBlock } from './unknown-block';
@@ -1,5 +1,6 @@
1
1
  import { listItem as listItemFactory } from '../../next-schema/generated/nodeTypes';
2
2
  import { listItemLegacy as listItemLegacyFactory } from '../../next-schema/generated/nodeTypes';
3
+ import { listItemWithNestedDecisionStage0 as listItemWithNestedDecisionStage0Factory } from '../../next-schema/generated/nodeTypes';
3
4
  export var listItem = listItemLegacyFactory({
4
5
  parseDOM: [{
5
6
  tag: 'li'
@@ -20,4 +21,17 @@ export var listItemWithTask = listItemFactory({
20
21
  toDOM: function toDOM() {
21
22
  return ['li', 0];
22
23
  }
24
+ });
25
+
26
+ /**
27
+ * @name list_item_with_decision_stage0
28
+ * @description this node allows decisions to be nested inside list-item
29
+ */
30
+ export var listItemWithDecisionStage0 = listItemWithNestedDecisionStage0Factory({
31
+ parseDOM: [{
32
+ tag: 'li'
33
+ }],
34
+ toDOM: function toDOM() {
35
+ return ['li', 0];
36
+ }
23
37
  });