@atlaskit/adf-schema 40.2.1 → 40.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +6 -0
  3. package/dist/cjs/next-schema/generated/nodeTypes.js +7 -1
  4. package/dist/cjs/next-schema/groups/blockGroup.js +1 -1
  5. package/dist/cjs/next-schema/nodes/blockquote.js +7 -0
  6. package/dist/cjs/schema/default-schema.js +2 -1
  7. package/dist/cjs/schema/index.js +6 -0
  8. package/dist/cjs/schema/nodes/blockquote.js +5 -3
  9. package/dist/cjs/schema/nodes/index.js +6 -0
  10. package/dist/cjs/validator-schema/generated/validatorSpec.js +25 -15
  11. package/dist/es2019/index.js +1 -1
  12. package/dist/es2019/next-schema/generated/nodeTypes.js +6 -0
  13. package/dist/es2019/next-schema/groups/blockGroup.js +1 -1
  14. package/dist/es2019/next-schema/nodes/blockquote.js +7 -0
  15. package/dist/es2019/schema/default-schema.js +3 -2
  16. package/dist/es2019/schema/index.js +1 -1
  17. package/dist/es2019/schema/nodes/blockquote.js +5 -3
  18. package/dist/es2019/schema/nodes/index.js +1 -2
  19. package/dist/es2019/validator-schema/generated/validatorSpec.js +24 -14
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/next-schema/generated/nodeTypes.js +6 -0
  22. package/dist/esm/next-schema/groups/blockGroup.js +1 -1
  23. package/dist/esm/next-schema/nodes/blockquote.js +7 -0
  24. package/dist/esm/schema/default-schema.js +3 -2
  25. package/dist/esm/schema/index.js +1 -1
  26. package/dist/esm/schema/nodes/blockquote.js +5 -3
  27. package/dist/esm/schema/nodes/index.js +1 -2
  28. package/dist/esm/validator-schema/generated/validatorSpec.js +24 -14
  29. package/dist/json-schema/v1/full.json +17 -17
  30. package/dist/json-schema/v1/stage-0.json +62 -17
  31. package/dist/types/index.d.ts +1 -1
  32. package/dist/types/next-schema/generated/nodeGroupTypes.d.ts +2 -2
  33. package/dist/types/next-schema/generated/nodeTypes.d.ts +7 -0
  34. package/dist/types/next-schema/groups/nonNestableBlockContentGroup.d.ts +8 -1
  35. package/dist/types/next-schema/nodes/blockquote.d.ts +5 -1
  36. package/dist/types/schema/index.d.ts +1 -1
  37. package/dist/types/schema/nodes/blockquote.d.ts +5 -1
  38. package/dist/types/schema/nodes/index.d.ts +1 -2
  39. package/dist/types/validator-schema/generated/validatorSpec.d.ts +24 -14
  40. package/json-schema/v1/full.json +17 -17
  41. package/json-schema/v1/stage-0.json +62 -17
  42. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 40.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b34f0b5: [ED-24167] This is a follow up PR as we forgot to export blockquoteWithNestedCodeblockOrMediaStage0
8
+
9
+ ## 40.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - eabfb58: [ED-24167] Allow nesting codeBlock and media nodes in blockquote
14
+
3
15
  ## 40.2.1
4
16
 
5
17
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -351,6 +351,12 @@ Object.defineProperty(exports, "blockquoteWithList", {
351
351
  return _schema.blockquoteWithList;
352
352
  }
353
353
  });
354
+ Object.defineProperty(exports, "blockquoteWithNestedCodeblockOrMediaStage0", {
355
+ enumerable: true,
356
+ get: function get() {
357
+ return _schema.blockquoteWithNestedCodeblockOrMediaStage0;
358
+ }
359
+ });
354
360
  Object.defineProperty(exports, "bodiedExtension", {
355
361
  enumerable: true,
356
362
  get: function get() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelLegacy = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemLegacy = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandWithNoMark = exports.expandWithNestedExpandStage0 = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockWithNoMarks = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
6
+ exports.unsupportedInline = exports.unsupportedBlock = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelLegacy = exports.panel = exports.orderedList = exports.nestedExpandWithNoMarks = exports.nestedExpand = exports.multiBodiedExtensionStage0 = exports.mentionStage0 = exports.mention = exports.mediaSingleWidthType = exports.mediaSingleFull = exports.mediaSingleCaption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItemLegacy = exports.listItem = exports.layoutSectionWithSingleColumnStage0 = exports.layoutSectionFull = exports.layoutSection = exports.layoutColumn = exports.inlineExtensionWithMarks = exports.inlineExtension = exports.inlineCardStage0 = exports.inlineCard = exports.image = exports.headingWithNoMarks = exports.headingWithIndentation = exports.headingWithAlignment = exports.heading = exports.hardBreak = exports.extensionWithMarks = exports.extensionFrameStage0 = exports.extension = exports.expandWithNoMark = exports.expandWithNestedExpandStage0 = exports.expand = exports.emojiStage0 = exports.emoji = exports.embedCard = exports.doc = exports.decisionList = exports.decisionItem = exports.dateStage0 = exports.date = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.codeBlockWithNoMarks = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteWithNestedCodeblockOrMediaStage0 = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
7
7
  var _createPMSpecFactory = require("../../schema/createPMSpecFactory");
8
8
  /**
9
9
  * This file was automatically generated by @atlaskit/adf-schema-generator
@@ -45,6 +45,12 @@ var blockquoteLegacy = exports.blockquoteLegacy = (0, _createPMSpecFactory.creat
45
45
  selectable: false,
46
46
  defining: true
47
47
  });
48
+ var blockquoteWithNestedCodeblockOrMediaStage0 = exports.blockquoteWithNestedCodeblockOrMediaStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
49
+ content: '(paragraph | orderedList | bulletList | unsupportedBlock | codeBlock | mediaGroup | mediaSingle)+',
50
+ group: 'block',
51
+ selectable: false,
52
+ defining: true
53
+ });
48
54
  var bodiedExtension = exports.bodiedExtension = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
49
55
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
50
56
  marks: 'dataConsumer fragment',
@@ -24,7 +24,7 @@ var _rule = require("../nodes/rule");
24
24
  var _table = require("../nodes/table");
25
25
  var _task = require("../nodes/task");
26
26
  var _unsupportedBlock = require("../nodes/unsupportedBlock");
27
- var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_marks'), _codeBlock.codeBlock.use('with_no_marks'), _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _extension.extension.use('with_marks'), _heading.heading, _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _panel.panel.use('legacy'), _table.table, _bodiedExtension.bodiedExtension, _bodiedExtension.bodiedExtension.use('with_marks'), _expand.expand, _expand.expand.use('with_no_mark'), _expand.expand.use('with_breakout_mark'), _expand.expand.use('with_nested_expand'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
27
+ var blockGroup = exports.blockGroup = (0, _adfSchemaGenerator.adfNodeGroup)('block', [_blockCard.blockCard, _codeBlock.codeBlock, _codeBlock.codeBlock.use('with_marks'), _codeBlock.codeBlock.use('with_no_marks'), _mediaSingle.mediaSingle, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaSingle.mediaSingle.use('width_type'), _paragraph.paragraph, _paragraph.paragraph.use('with_alignment'), _paragraph.paragraph.use('with_indentation'), _paragraph.paragraph.use('with_no_marks'), _task.taskList, _list.orderedList, _list.bulletList, _blockquote.blockquote, _blockquote.blockquote.use('legacy'), _blockquote.blockquote.use('with_nested_codeblock_or_media'), _decisionList.decisionList, _embedCard.embedCard, _extension.extension, _extension.extension.use('with_marks'), _heading.heading, _heading.heading.use('with_indentation'), _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _mediaGroup.mediaGroup, _rule.rule, _panel.panel, _panel.panel.use('legacy'), _table.table, _bodiedExtension.bodiedExtension, _bodiedExtension.bodiedExtension.use('with_marks'), _expand.expand, _expand.expand.use('with_no_mark'), _expand.expand.use('with_breakout_mark'), _expand.expand.use('with_nested_expand'), _confluenceUnsupportedBlock.confluenceUnsupportedBlock, _unsupportedBlock.unsupportedBlock], {
28
28
  // @DSLCompatibilityException
29
29
  // Block group in PM doesn't match ADF
30
30
  ignore: ['validator-spec']
@@ -10,6 +10,9 @@ var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
10
10
  var _list = require("./list");
11
11
  var _paragraph = require("./paragraph");
12
12
  var _unsupportedBlock = require("./unsupportedBlock");
13
+ var _codeBlock = require("./codeBlock");
14
+ var _mediaGroup = require("./mediaGroup");
15
+ var _mediaSingle = require("./mediaSingle");
13
16
  var blockquote = exports.blockquote = (0, _adfSchemaGenerator.adfNode)('blockquote').define({
14
17
  defining: true,
15
18
  selectable: false,
@@ -18,4 +21,8 @@ var blockquote = exports.blockquote = (0, _adfSchemaGenerator.adfNode)('blockquo
18
21
  }).variant('legacy', {
19
22
  ignore: ['json-schema', 'validator-spec'],
20
23
  content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph, _unsupportedBlock.unsupportedBlock))]
24
+ }).variant('with_nested_codeblock_or_media', {
25
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _list.orderedList, _list.bulletList, _unsupportedBlock.unsupportedBlock, _codeBlock.codeBlock.use('with_no_marks'), _mediaGroup.mediaGroup, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full')))],
26
+ noExtend: true,
27
+ stage0: true
21
28
  });
@@ -26,7 +26,8 @@ var getSchemaBasedOnStage = exports.getSchemaBasedOnStage = (0, _memoizeOne.defa
26
26
  layoutSection: _nodes.layoutSectionWithSingleColumn,
27
27
  multiBodiedExtension: _nodes.multiBodiedExtension,
28
28
  extensionFrame: _nodes.extensionFrame,
29
- expand: _nodes.expandWithNestedExpandStage0
29
+ expand: _nodes.expandWithNestedExpandStage0,
30
+ blockquote: _nodes.blockquoteWithNestedCodeblockOrMediaStage0
30
31
  };
31
32
  }
32
33
  return (0, _createSchema.createSchema)(defaultSchemaConfig);
@@ -69,6 +69,12 @@ Object.defineProperty(exports, "blockquoteWithList", {
69
69
  return _nodes.blockquoteWithList;
70
70
  }
71
71
  });
72
+ Object.defineProperty(exports, "blockquoteWithNestedCodeblockOrMediaStage0", {
73
+ enumerable: true,
74
+ get: function get() {
75
+ return _nodes.blockquoteWithNestedCodeblockOrMediaStage0;
76
+ }
77
+ });
72
78
  Object.defineProperty(exports, "bodiedExtension", {
73
79
  enumerable: true,
74
80
  get: function get() {
@@ -3,20 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.blockquoteWithList = exports.blockquote = void 0;
6
+ exports.blockquoteWithNestedCodeblockOrMediaStage0 = exports.blockquoteWithList = exports.blockquote = void 0;
7
7
  var _nodeTypes = require("../../next-schema/generated/nodeTypes");
8
8
  /**
9
9
  * @name blockquote_node
10
10
  */
11
11
 
12
- var blockquote = exports.blockquote = (0, _nodeTypes.blockquoteLegacy)({
12
+ var nodeSpecOptions = {
13
13
  parseDOM: [{
14
14
  tag: 'blockquote'
15
15
  }],
16
16
  toDOM: function toDOM() {
17
17
  return ['blockquote', 0];
18
18
  }
19
- });
19
+ };
20
+ var blockquote = exports.blockquote = (0, _nodeTypes.blockquoteLegacy)(nodeSpecOptions);
21
+ var blockquoteWithNestedCodeblockOrMediaStage0 = exports.blockquoteWithNestedCodeblockOrMediaStage0 = (0, _nodeTypes.blockquoteWithNestedCodeblockOrMediaStage0)(nodeSpecOptions);
20
22
 
21
23
  /**
22
24
  * @name blockquote_with_list_node
@@ -28,6 +28,12 @@ Object.defineProperty(exports, "blockquoteWithList", {
28
28
  return _blockquote.blockquoteWithList;
29
29
  }
30
30
  });
31
+ Object.defineProperty(exports, "blockquoteWithNestedCodeblockOrMediaStage0", {
32
+ enumerable: true,
33
+ get: function get() {
34
+ return _blockquote.blockquoteWithNestedCodeblockOrMediaStage0;
35
+ }
36
+ });
31
37
  Object.defineProperty(exports, "bodiedExtension", {
32
38
  enumerable: true,
33
39
  get: function get() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.unsupportedInline = exports.unsupportedBlock = exports.underline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell_content = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel_legacy = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_legacy = exports.listItem = exports.link_text_inline = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_comment_marker = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.inline = exports.indentation = exports.image = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.formatted_text_inline = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_with_no_mark = exports.expand_with_nested_expand = exports.expand_with_breakout_mark = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.code_inline = exports.codeBlock_with_no_marks = exports.codeBlock_with_marks = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote_legacy = exports.blockquote = exports.block_content = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.atomic_inline = exports.annotation = exports.alignment = void 0;
6
+ exports.unsupportedInline = exports.unsupportedBlock = exports.underline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = exports.tableCell_content = exports.tableCell = exports.table = exports.subsup = exports.strong = exports.strike = exports.status = exports.rule = exports.placeholder = exports.paragraph_with_no_marks = exports.paragraph_with_indentation = exports.paragraph_with_alignment = exports.paragraph = exports.panel_legacy = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_legacy = exports.listItem = exports.link_text_inline = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_comment_marker = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.inline = exports.indentation = exports.image = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.formatted_text_inline = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_with_no_mark = exports.expand_with_nested_expand = exports.expand_with_breakout_mark = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceUnsupportedInline = exports.confluenceUnsupportedBlock = exports.confluenceJiraIssue = exports.code_inline = exports.codeBlock_with_no_marks = exports.codeBlock_with_marks = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote_with_nested_codeblock_or_media = exports.blockquote_legacy = exports.blockquote = exports.block_content = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.atomic_inline = exports.annotation = exports.alignment = void 0;
7
7
  var blockCard = exports.blockCard = {
8
8
  props: {
9
9
  type: {
@@ -1074,6 +1074,30 @@ var blockquote_legacy = exports.blockquote_legacy = ['blockquote', {
1074
1074
  }
1075
1075
  }
1076
1076
  }];
1077
+ var mediaGroup = exports.mediaGroup = {
1078
+ props: {
1079
+ type: {
1080
+ type: 'enum',
1081
+ values: ['mediaGroup']
1082
+ },
1083
+ content: {
1084
+ type: 'array',
1085
+ items: ['media'],
1086
+ minItems: 1,
1087
+ allowUnsupportedBlock: true
1088
+ }
1089
+ }
1090
+ };
1091
+ var blockquote_with_nested_codeblock_or_media = exports.blockquote_with_nested_codeblock_or_media = ['blockquote', {
1092
+ props: {
1093
+ content: {
1094
+ type: 'array',
1095
+ items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock_with_no_marks', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full']],
1096
+ minItems: 1,
1097
+ allowUnsupportedBlock: true
1098
+ }
1099
+ }
1100
+ }];
1077
1101
  var decisionItem = exports.decisionItem = {
1078
1102
  props: {
1079
1103
  type: {
@@ -1265,20 +1289,6 @@ var heading_with_alignment = exports.heading_with_alignment = ['heading', {
1265
1289
  }
1266
1290
  }
1267
1291
  }];
1268
- var mediaGroup = exports.mediaGroup = {
1269
- props: {
1270
- type: {
1271
- type: 'enum',
1272
- values: ['mediaGroup']
1273
- },
1274
- content: {
1275
- type: 'array',
1276
- items: ['media'],
1277
- minItems: 1,
1278
- allowUnsupportedBlock: true
1279
- }
1280
- }
1281
- };
1282
1292
  var rule = exports.rule = {
1283
1293
  props: {
1284
1294
  type: {
@@ -1,4 +1,4 @@
1
- export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, 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. */
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
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';
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
 
@@ -39,6 +39,12 @@ export const blockquoteLegacy = createPMNodeSpecFactory({
39
39
  selectable: false,
40
40
  defining: true
41
41
  });
42
+ export const blockquoteWithNestedCodeblockOrMediaStage0 = createPMNodeSpecFactory({
43
+ content: '(paragraph | orderedList | bulletList | unsupportedBlock | codeBlock | mediaGroup | mediaSingle)+',
44
+ group: 'block',
45
+ selectable: false,
46
+ defining: true
47
+ });
42
48
  export const bodiedExtension = createPMNodeSpecFactory({
43
49
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
44
50
  marks: 'dataConsumer fragment',
@@ -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 const 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'), 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 const 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], {
22
22
  // @DSLCompatibilityException
23
23
  // Block group in PM doesn't match ADF
24
24
  ignore: ['validator-spec']
@@ -4,6 +4,9 @@ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
4
4
  import { bulletList, orderedList } from './list';
5
5
  import { paragraph } from './paragraph';
6
6
  import { unsupportedBlock } from './unsupportedBlock';
7
+ import { codeBlock } from './codeBlock';
8
+ import { mediaGroup } from './mediaGroup';
9
+ import { mediaSingle } from './mediaSingle';
7
10
  export const blockquote = adfNode('blockquote').define({
8
11
  defining: true,
9
12
  selectable: false,
@@ -12,4 +15,8 @@ export const blockquote = adfNode('blockquote').define({
12
15
  }).variant('legacy', {
13
16
  ignore: ['json-schema', 'validator-spec'],
14
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
15
22
  });
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpandStage0 } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpandStage0, blockquoteWithNestedCodeblockOrMediaStage0 } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  const getDefaultSchemaConfig = () => {
5
5
  const defaultSchemaConfig = {
@@ -18,7 +18,8 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
18
18
  layoutSection: layoutSectionWithSingleColumn,
19
19
  multiBodiedExtension: multiBodiedExtension,
20
20
  extensionFrame: extensionFrame,
21
- expand: expandWithNestedExpandStage0
21
+ expand: expandWithNestedExpandStage0,
22
+ blockquote: blockquoteWithNestedCodeblockOrMediaStage0
22
23
  };
23
24
  }
24
25
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, 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, 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';
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,18 +1,20 @@
1
1
  import { blockquote as blockquoteFactory } from '../../next-schema/generated/nodeTypes';
2
- import { blockquoteLegacy as blockquoteLegacyFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { blockquoteLegacy as blockquoteLegacyFactory, blockquoteWithNestedCodeblockOrMediaStage0 as blockquoteWithNestedCodeblockOrMediaStage0Factory } from '../../next-schema/generated/nodeTypes';
3
3
 
4
4
  /**
5
5
  * @name blockquote_node
6
6
  */
7
7
 
8
- export const blockquote = blockquoteLegacyFactory({
8
+ const nodeSpecOptions = {
9
9
  parseDOM: [{
10
10
  tag: 'blockquote'
11
11
  }],
12
12
  toDOM() {
13
13
  return ['blockquote', 0];
14
14
  }
15
- });
15
+ };
16
+ export const blockquote = blockquoteLegacyFactory(nodeSpecOptions);
17
+ export const blockquoteWithNestedCodeblockOrMediaStage0 = blockquoteWithNestedCodeblockOrMediaStage0Factory(nodeSpecOptions);
16
18
 
17
19
  /**
18
20
  * @name blockquote_with_list_node
@@ -3,8 +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 } from './blockquote';
7
- export { blockquoteWithList } from './blockquote';
6
+ export { blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0 } from './blockquote';
8
7
  export { bulletList, bulletListSelector } from './bullet-list';
9
8
  export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
10
9
  export { hardBreak } from './hard-break';
@@ -1068,6 +1068,30 @@ export const blockquote_legacy = ['blockquote', {
1068
1068
  }
1069
1069
  }
1070
1070
  }];
1071
+ export const mediaGroup = {
1072
+ props: {
1073
+ type: {
1074
+ type: 'enum',
1075
+ values: ['mediaGroup']
1076
+ },
1077
+ content: {
1078
+ type: 'array',
1079
+ items: ['media'],
1080
+ minItems: 1,
1081
+ allowUnsupportedBlock: true
1082
+ }
1083
+ }
1084
+ };
1085
+ export const blockquote_with_nested_codeblock_or_media = ['blockquote', {
1086
+ props: {
1087
+ content: {
1088
+ type: 'array',
1089
+ items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock_with_no_marks', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full']],
1090
+ minItems: 1,
1091
+ allowUnsupportedBlock: true
1092
+ }
1093
+ }
1094
+ }];
1071
1095
  export const decisionItem = {
1072
1096
  props: {
1073
1097
  type: {
@@ -1259,20 +1283,6 @@ export const heading_with_alignment = ['heading', {
1259
1283
  }
1260
1284
  }
1261
1285
  }];
1262
- export const mediaGroup = {
1263
- props: {
1264
- type: {
1265
- type: 'enum',
1266
- values: ['mediaGroup']
1267
- },
1268
- content: {
1269
- type: 'array',
1270
- items: ['media'],
1271
- minItems: 1,
1272
- allowUnsupportedBlock: true
1273
- }
1274
- }
1275
- };
1276
1286
  export const rule = {
1277
1287
  props: {
1278
1288
  type: {
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, 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. */
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
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';
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
 
@@ -39,6 +39,12 @@ 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)+',
44
+ group: 'block',
45
+ selectable: false,
46
+ defining: true
47
+ });
42
48
  export var bodiedExtension = createPMNodeSpecFactory({
43
49
  content: '(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | codeBlock | mediaGroup | mediaSingle | decisionList | taskList | table | blockCard | embedCard | extension | unsupportedBlock)+',
44
50
  marks: 'dataConsumer fragment',
@@ -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'), 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('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], {
22
22
  // @DSLCompatibilityException
23
23
  // Block group in PM doesn't match ADF
24
24
  ignore: ['validator-spec']
@@ -4,6 +4,9 @@ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
4
4
  import { bulletList, orderedList } from './list';
5
5
  import { paragraph } from './paragraph';
6
6
  import { unsupportedBlock } from './unsupportedBlock';
7
+ import { codeBlock } from './codeBlock';
8
+ import { mediaGroup } from './mediaGroup';
9
+ import { mediaSingle } from './mediaSingle';
7
10
  export var blockquote = adfNode('blockquote').define({
8
11
  defining: true,
9
12
  selectable: false,
@@ -12,4 +15,8 @@ export var blockquote = adfNode('blockquote').define({
12
15
  }).variant('legacy', {
13
16
  ignore: ['json-schema', 'validator-spec'],
14
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
15
22
  });
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpandStage0 } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpandStage0, blockquoteWithNestedCodeblockOrMediaStage0 } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
5
5
  var defaultSchemaConfig = {
@@ -19,7 +19,8 @@ export var getSchemaBasedOnStage = memoizeOne(function () {
19
19
  layoutSection: layoutSectionWithSingleColumn,
20
20
  multiBodiedExtension: multiBodiedExtension,
21
21
  extensionFrame: extensionFrame,
22
- expand: expandWithNestedExpandStage0
22
+ expand: expandWithNestedExpandStage0,
23
+ blockquote: blockquoteWithNestedCodeblockOrMediaStage0
23
24
  };
24
25
  }
25
26
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, 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, 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';
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,18 +1,20 @@
1
1
  import { blockquote as blockquoteFactory } from '../../next-schema/generated/nodeTypes';
2
- import { blockquoteLegacy as blockquoteLegacyFactory } from '../../next-schema/generated/nodeTypes';
2
+ import { blockquoteLegacy as blockquoteLegacyFactory, blockquoteWithNestedCodeblockOrMediaStage0 as blockquoteWithNestedCodeblockOrMediaStage0Factory } from '../../next-schema/generated/nodeTypes';
3
3
 
4
4
  /**
5
5
  * @name blockquote_node
6
6
  */
7
7
 
8
- export var blockquote = blockquoteLegacyFactory({
8
+ var nodeSpecOptions = {
9
9
  parseDOM: [{
10
10
  tag: 'blockquote'
11
11
  }],
12
12
  toDOM: function toDOM() {
13
13
  return ['blockquote', 0];
14
14
  }
15
- });
15
+ };
16
+ export var blockquote = blockquoteLegacyFactory(nodeSpecOptions);
17
+ export var blockquoteWithNestedCodeblockOrMediaStage0 = blockquoteWithNestedCodeblockOrMediaStage0Factory(nodeSpecOptions);
16
18
 
17
19
  /**
18
20
  * @name blockquote_with_list_node
@@ -3,8 +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 } from './blockquote';
7
- export { blockquoteWithList } from './blockquote';
6
+ export { blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0 } from './blockquote';
8
7
  export { bulletList, bulletListSelector } from './bullet-list';
9
8
  export { codeBlock, toJSON as codeBlockToJSON } from './code-block';
10
9
  export { hardBreak } from './hard-break';
@@ -1068,6 +1068,30 @@ export var blockquote_legacy = ['blockquote', {
1068
1068
  }
1069
1069
  }
1070
1070
  }];
1071
+ export var mediaGroup = {
1072
+ props: {
1073
+ type: {
1074
+ type: 'enum',
1075
+ values: ['mediaGroup']
1076
+ },
1077
+ content: {
1078
+ type: 'array',
1079
+ items: ['media'],
1080
+ minItems: 1,
1081
+ allowUnsupportedBlock: true
1082
+ }
1083
+ }
1084
+ };
1085
+ export var blockquote_with_nested_codeblock_or_media = ['blockquote', {
1086
+ props: {
1087
+ content: {
1088
+ type: 'array',
1089
+ items: [['paragraph_with_no_marks', 'orderedList', 'bulletList', 'codeBlock_with_no_marks', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full']],
1090
+ minItems: 1,
1091
+ allowUnsupportedBlock: true
1092
+ }
1093
+ }
1094
+ }];
1071
1095
  export var decisionItem = {
1072
1096
  props: {
1073
1097
  type: {
@@ -1259,20 +1283,6 @@ export var heading_with_alignment = ['heading', {
1259
1283
  }
1260
1284
  }
1261
1285
  }];
1262
- export var mediaGroup = {
1263
- props: {
1264
- type: {
1265
- type: 'enum',
1266
- values: ['mediaGroup']
1267
- },
1268
- content: {
1269
- type: 'array',
1270
- items: ['media'],
1271
- minItems: 1,
1272
- allowUnsupportedBlock: true
1273
- }
1274
- }
1275
- };
1276
1286
  export var rule = {
1277
1287
  props: {
1278
1288
  type: {
@@ -1421,6 +1421,23 @@
1421
1421
  "additionalProperties": false,
1422
1422
  "required": ["type", "content"]
1423
1423
  },
1424
+ "mediaGroup_node": {
1425
+ "type": "object",
1426
+ "properties": {
1427
+ "type": {
1428
+ "enum": ["mediaGroup"]
1429
+ },
1430
+ "content": {
1431
+ "type": "array",
1432
+ "items": {
1433
+ "$ref": "#/definitions/media_node"
1434
+ },
1435
+ "minItems": 1
1436
+ }
1437
+ },
1438
+ "additionalProperties": false,
1439
+ "required": ["type", "content"]
1440
+ },
1424
1441
  "decisionItem_node": {
1425
1442
  "type": "object",
1426
1443
  "properties": {
@@ -1673,23 +1690,6 @@
1673
1690
  }
1674
1691
  ]
1675
1692
  },
1676
- "mediaGroup_node": {
1677
- "type": "object",
1678
- "properties": {
1679
- "type": {
1680
- "enum": ["mediaGroup"]
1681
- },
1682
- "content": {
1683
- "type": "array",
1684
- "items": {
1685
- "$ref": "#/definitions/media_node"
1686
- },
1687
- "minItems": 1
1688
- }
1689
- },
1690
- "additionalProperties": false,
1691
- "required": ["type", "content"]
1692
- },
1693
1693
  "rule_node": {
1694
1694
  "type": "object",
1695
1695
  "properties": {
@@ -1451,6 +1451,62 @@
1451
1451
  "additionalProperties": false,
1452
1452
  "required": ["type", "content"]
1453
1453
  },
1454
+ "mediaGroup_node": {
1455
+ "type": "object",
1456
+ "properties": {
1457
+ "type": {
1458
+ "enum": ["mediaGroup"]
1459
+ },
1460
+ "content": {
1461
+ "type": "array",
1462
+ "items": {
1463
+ "$ref": "#/definitions/media_node"
1464
+ },
1465
+ "minItems": 1
1466
+ }
1467
+ },
1468
+ "additionalProperties": false,
1469
+ "required": ["type", "content"]
1470
+ },
1471
+ "blockquote_with_nested_codeblock_or_media_node": {
1472
+ "type": "object",
1473
+ "properties": {
1474
+ "type": {
1475
+ "enum": ["blockquote"]
1476
+ },
1477
+ "content": {
1478
+ "type": "array",
1479
+ "items": {
1480
+ "anyOf": [
1481
+ {
1482
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
1483
+ },
1484
+ {
1485
+ "$ref": "#/definitions/orderedList_node"
1486
+ },
1487
+ {
1488
+ "$ref": "#/definitions/bulletList_node"
1489
+ },
1490
+ {
1491
+ "$ref": "#/definitions/codeBlock_with_no_marks_node"
1492
+ },
1493
+ {
1494
+ "$ref": "#/definitions/mediaGroup_node"
1495
+ },
1496
+ {
1497
+ "$ref": "#/definitions/mediaSingle_caption_node"
1498
+ },
1499
+ {
1500
+ "$ref": "#/definitions/mediaSingle_full_node"
1501
+ }
1502
+ ]
1503
+ },
1504
+ "minItems": 1
1505
+ }
1506
+ },
1507
+ "additionalProperties": false,
1508
+ "required": ["type", "content"]
1509
+ },
1454
1510
  "decisionItem_node": {
1455
1511
  "type": "object",
1456
1512
  "properties": {
@@ -1703,23 +1759,6 @@
1703
1759
  }
1704
1760
  ]
1705
1761
  },
1706
- "mediaGroup_node": {
1707
- "type": "object",
1708
- "properties": {
1709
- "type": {
1710
- "enum": ["mediaGroup"]
1711
- },
1712
- "content": {
1713
- "type": "array",
1714
- "items": {
1715
- "$ref": "#/definitions/media_node"
1716
- },
1717
- "minItems": 1
1718
- }
1719
- },
1720
- "additionalProperties": false,
1721
- "required": ["type", "content"]
1722
- },
1723
1762
  "rule_node": {
1724
1763
  "type": "object",
1725
1764
  "properties": {
@@ -2371,6 +2410,9 @@
2371
2410
  {
2372
2411
  "$ref": "#/definitions/blockquote_node"
2373
2412
  },
2413
+ {
2414
+ "$ref": "#/definitions/blockquote_with_nested_codeblock_or_media_node"
2415
+ },
2374
2416
  {
2375
2417
  "$ref": "#/definitions/decisionList_node"
2376
2418
  },
@@ -2701,6 +2743,9 @@
2701
2743
  {
2702
2744
  "$ref": "#/definitions/blockquote_node"
2703
2745
  },
2746
+ {
2747
+ "$ref": "#/definitions/blockquote_with_nested_codeblock_or_media_node"
2748
+ },
2704
2749
  {
2705
2750
  "$ref": "#/definitions/decisionList_node"
2706
2751
  },
@@ -1,4 +1,4 @@
1
- export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
1
+ export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
2
2
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
3
  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';
4
4
  export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, MultiBodiedExtensionDefinition, ExtensionFrameDefinition, BackgroundColorDefinition, } from './schema';
@@ -3,8 +3,8 @@
3
3
  * DO NOT MODIFY IT BY HAND. Instead, modify the source files in "packages/adf-schema/src/next-schema" ,
4
4
  * and run "yarn workspace @atlaskit/adf-schema build:schema:all" to regenerate this file.
5
5
  */
6
- import type { BlockCardDefinition, BlockquoteDefinition, BlockquoteLegacyDefinition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CodeBlockDefinition, CodeBlockWithNoMarksDefinition, ConfluenceJiraIssueDefinition, ConfluenceUnsupportedBlockDefinition, ConfluenceUnsupportedInlineDefinition, DateDefinition, DateStage0Definition, DecisionListDefinition, EmbedCardDefinition, EmojiDefinition, EmojiStage0Definition, ExpandDefinition, ExpandWithNestedExpandStage0Definition, ExpandWithNoMarkDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, HardBreakDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithNoMarksDefinition, ImageDefinition, InlineCardDefinition, InlineCardStage0Definition, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, MediaGroupDefinition, MediaInlineDefinition, MediaSingleCaptionDefinition, MediaSingleDefinition, MediaSingleFullDefinition, MediaSingleWidthTypeDefinition, MentionDefinition, MentionStage0Definition, MultiBodiedExtensionStage0Definition, OrderedListDefinition, PanelDefinition, PanelLegacyDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithNoMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StatusStage0Definition, TableDefinition, TaskListDefinition, TextCodeInlineDefinition, TextDefinition, TextFormattedDefinition, UnsupportedBlockDefinition, UnsupportedInlineDefinition } from './nodeTypes';
7
- export type BlockDefinition = Array<BlockCardDefinition | CodeBlockDefinition | CodeBlockWithNoMarksDefinition | MediaSingleDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleWidthTypeDefinition | ParagraphDefinition | ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | OrderedListDefinition | BulletListDefinition | BlockquoteDefinition | BlockquoteLegacyDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | ExtensionWithMarksDefinition | HeadingDefinition | HeadingWithIndentationDefinition | HeadingWithNoMarksDefinition | HeadingWithAlignmentDefinition | MediaGroupDefinition | RuleDefinition | PanelDefinition | PanelLegacyDefinition | TableDefinition | BodiedExtensionDefinition | BodiedExtensionWithMarksDefinition | ExpandDefinition | ExpandWithNoMarkDefinition | ExpandWithNestedExpandStage0Definition | ConfluenceUnsupportedBlockDefinition | UnsupportedBlockDefinition>;
6
+ import type { BlockCardDefinition, BlockquoteDefinition, BlockquoteLegacyDefinition, BlockquoteWithNestedCodeblockOrMediaStage0Definition, BodiedExtensionDefinition, BodiedExtensionWithMarksDefinition, BulletListDefinition, CodeBlockDefinition, CodeBlockWithNoMarksDefinition, ConfluenceJiraIssueDefinition, ConfluenceUnsupportedBlockDefinition, ConfluenceUnsupportedInlineDefinition, DateDefinition, DateStage0Definition, DecisionListDefinition, EmbedCardDefinition, EmojiDefinition, EmojiStage0Definition, ExpandDefinition, ExpandWithNestedExpandStage0Definition, ExpandWithNoMarkDefinition, ExtensionDefinition, ExtensionWithMarksDefinition, HardBreakDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithNoMarksDefinition, ImageDefinition, InlineCardDefinition, InlineCardStage0Definition, InlineExtensionDefinition, InlineExtensionWithMarksDefinition, MediaGroupDefinition, MediaInlineDefinition, MediaSingleCaptionDefinition, MediaSingleDefinition, MediaSingleFullDefinition, MediaSingleWidthTypeDefinition, MentionDefinition, MentionStage0Definition, MultiBodiedExtensionStage0Definition, OrderedListDefinition, PanelDefinition, PanelLegacyDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithNoMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StatusStage0Definition, TableDefinition, TaskListDefinition, TextCodeInlineDefinition, TextDefinition, TextFormattedDefinition, UnsupportedBlockDefinition, UnsupportedInlineDefinition } from './nodeTypes';
7
+ export type BlockDefinition = Array<BlockCardDefinition | CodeBlockDefinition | CodeBlockWithNoMarksDefinition | MediaSingleDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | MediaSingleWidthTypeDefinition | ParagraphDefinition | ParagraphWithAlignmentDefinition | ParagraphWithIndentationDefinition | ParagraphWithNoMarksDefinition | TaskListDefinition | OrderedListDefinition | BulletListDefinition | BlockquoteDefinition | BlockquoteLegacyDefinition | BlockquoteWithNestedCodeblockOrMediaStage0Definition | DecisionListDefinition | EmbedCardDefinition | ExtensionDefinition | ExtensionWithMarksDefinition | HeadingDefinition | HeadingWithIndentationDefinition | HeadingWithNoMarksDefinition | HeadingWithAlignmentDefinition | MediaGroupDefinition | RuleDefinition | PanelDefinition | PanelLegacyDefinition | TableDefinition | BodiedExtensionDefinition | BodiedExtensionWithMarksDefinition | ExpandDefinition | ExpandWithNoMarkDefinition | ExpandWithNestedExpandStage0Definition | ConfluenceUnsupportedBlockDefinition | UnsupportedBlockDefinition>;
8
8
  export type BlockRootOnlyDefinition = Array<MultiBodiedExtensionStage0Definition>;
9
9
  export type InlineDefinition = Array<TextDefinition | TextFormattedDefinition | TextCodeInlineDefinition | DateDefinition | DateStage0Definition | EmojiDefinition | EmojiStage0Definition | HardBreakDefinition | InlineCardDefinition | InlineCardStage0Definition | MentionDefinition | MentionStage0Definition | PlaceholderDefinition | StatusDefinition | StatusStage0Definition | InlineExtensionDefinition | InlineExtensionWithMarksDefinition | MediaInlineDefinition | ImageDefinition | ConfluenceJiraIssueDefinition | ConfluenceUnsupportedInlineDefinition | UnsupportedInlineDefinition>;
10
10
  export type NonNestableBlockContentDefinition = Array<ParagraphWithNoMarksDefinition | PanelDefinition | BlockquoteDefinition | OrderedListDefinition | BulletListDefinition | RuleDefinition | HeadingWithNoMarksDefinition | CodeBlockWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | DecisionListDefinition | TaskListDefinition | TableDefinition | BlockCardDefinition | EmbedCardDefinition | ExtensionWithMarksDefinition | UnsupportedBlockDefinition>;
@@ -39,6 +39,13 @@ export interface BlockquoteLegacyDefinition {
39
39
  }
40
40
  export type BlockquoteLegacyNode = PMNode & BlockquoteLegacyDefinition;
41
41
  export declare const blockquoteLegacy: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<BlockquoteLegacyNode>) => import("prosemirror-model").NodeSpec;
42
+ export interface BlockquoteWithNestedCodeblockOrMediaStage0Definition {
43
+ type: 'blockquote';
44
+ content: Array<BulletListDefinition | CodeBlockWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | ParagraphWithNoMarksDefinition | UnsupportedBlockDefinition>;
45
+ marks: Array<UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
46
+ }
47
+ export type BlockquoteWithNestedCodeblockOrMediaStage0Node = PMNode & BlockquoteWithNestedCodeblockOrMediaStage0Definition;
48
+ export declare const blockquoteWithNestedCodeblockOrMediaStage0: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<BlockquoteWithNestedCodeblockOrMediaStage0Node>) => import("prosemirror-model").NodeSpec;
42
49
  export interface BodiedExtensionDefinition {
43
50
  type: 'bodiedExtension';
44
51
  content: Array<BlockCardDefinition | BlockquoteDefinition | BulletListDefinition | CodeBlockWithNoMarksDefinition | DecisionListDefinition | EmbedCardDefinition | ExtensionWithMarksDefinition | HeadingWithNoMarksDefinition | MediaGroupDefinition | MediaSingleCaptionDefinition | MediaSingleFullDefinition | OrderedListDefinition | PanelDefinition | ParagraphWithNoMarksDefinition | RuleDefinition | TableDefinition | TaskListDefinition | UnsupportedBlockDefinition>;
@@ -49,9 +49,16 @@ export declare const nonNestableBlockContent: (import("@atlaskit/adf-schema-gene
49
49
  };
50
50
  };
51
51
  };
52
- }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "legacy"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
52
+ }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "legacy", "with_nested_codeblock_or_media"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
53
53
  ignore: ("json-schema" | "validator-spec")[];
54
54
  content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
55
+ } & {
56
+ content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
57
+ noExtend: true;
58
+ stage0: true;
59
+ }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "legacy"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
60
+ content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
61
+ ignore: ("json-schema" | "validator-spec")[];
55
62
  }> | import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<any, import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
56
63
  marks: import("@atlaskit/adf-schema-generator/dist/types/adfMark").ADFMark<import("@atlaskit/adf-schema-generator/dist/types/types/ADFMarkSpec").ADFMarkSpec>[];
57
64
  ignore: any[];
@@ -1,4 +1,8 @@
1
- export declare const blockquote: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "legacy"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
1
+ export declare const blockquote: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string, "legacy", "with_nested_codeblock_or_media"], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec & {
2
2
  ignore: ("json-schema" | "validator-spec")[];
3
3
  content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
4
+ } & {
5
+ content: import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFNodeContentOneOrMoreSpec[];
6
+ noExtend: true;
7
+ stage0: true;
4
8
  }>;
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, 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, 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';
2
2
  export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
3
3
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
4
4
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
@@ -1,6 +1,9 @@
1
1
  import { ParagraphDefinition as Paragraph } from './paragraph';
2
2
  import { OrderedListDefinition as OrderedList } from './types/list';
3
3
  import { BulletListDefinition as BulletList } from './types/list';
4
+ import { CodeBlockDefinition as CodeBlock } from './code-block';
5
+ import { MediaGroupDefinition as MediaGroup } from './media-group';
6
+ import { MediaSingleDefinition as MediaSingle } from './media-single';
4
7
  /**
5
8
  * @name blockquote_node
6
9
  */
@@ -10,9 +13,10 @@ export interface BlockQuoteDefinition {
10
13
  * @minItems 1
11
14
  * @allowUnsupportedBlock true
12
15
  */
13
- content: Array<Paragraph | OrderedList | BulletList>;
16
+ content: Array<Paragraph | OrderedList | BulletList | CodeBlock | MediaGroup | MediaSingle>;
14
17
  }
15
18
  export declare const blockquote: import("prosemirror-model").NodeSpec;
19
+ export declare const blockquoteWithNestedCodeblockOrMediaStage0: import("prosemirror-model").NodeSpec;
16
20
  /**
17
21
  * @name blockquote_with_list_node
18
22
  */
@@ -5,8 +5,7 @@ export { confluenceUnsupportedBlock } from './confluence-unsupported-block';
5
5
  export { confluenceUnsupportedInline } from './confluence-unsupported-inline';
6
6
  export { doc } from './doc';
7
7
  export type { DocNode } from './doc';
8
- export { blockquote } from './blockquote';
9
- export { blockquoteWithList } from './blockquote';
8
+ export { blockquote, blockquoteWithList, blockquoteWithNestedCodeblockOrMediaStage0, } from './blockquote';
10
9
  export type { BlockQuoteDefinition } from './blockquote';
11
10
  export { bulletList, bulletListSelector } from './bullet-list';
12
11
  export type { BulletListDefinition } from './types/list';
@@ -1087,6 +1087,30 @@ export declare const blockquote_legacy: (string | {
1087
1087
  };
1088
1088
  };
1089
1089
  })[];
1090
+ export declare const mediaGroup: {
1091
+ props: {
1092
+ type: {
1093
+ type: string;
1094
+ values: string[];
1095
+ };
1096
+ content: {
1097
+ type: string;
1098
+ items: string[];
1099
+ minItems: number;
1100
+ allowUnsupportedBlock: boolean;
1101
+ };
1102
+ };
1103
+ };
1104
+ export declare const blockquote_with_nested_codeblock_or_media: (string | {
1105
+ props: {
1106
+ content: {
1107
+ type: string;
1108
+ items: string[][];
1109
+ minItems: number;
1110
+ allowUnsupportedBlock: boolean;
1111
+ };
1112
+ };
1113
+ })[];
1090
1114
  export declare const decisionItem: {
1091
1115
  props: {
1092
1116
  type: {
@@ -1278,20 +1302,6 @@ export declare const heading_with_alignment: (string | {
1278
1302
  };
1279
1303
  };
1280
1304
  })[];
1281
- export declare const mediaGroup: {
1282
- props: {
1283
- type: {
1284
- type: string;
1285
- values: string[];
1286
- };
1287
- content: {
1288
- type: string;
1289
- items: string[];
1290
- minItems: number;
1291
- allowUnsupportedBlock: boolean;
1292
- };
1293
- };
1294
- };
1295
1305
  export declare const rule: {
1296
1306
  props: {
1297
1307
  type: {
@@ -1421,6 +1421,23 @@
1421
1421
  "additionalProperties": false,
1422
1422
  "required": ["type", "content"]
1423
1423
  },
1424
+ "mediaGroup_node": {
1425
+ "type": "object",
1426
+ "properties": {
1427
+ "type": {
1428
+ "enum": ["mediaGroup"]
1429
+ },
1430
+ "content": {
1431
+ "type": "array",
1432
+ "items": {
1433
+ "$ref": "#/definitions/media_node"
1434
+ },
1435
+ "minItems": 1
1436
+ }
1437
+ },
1438
+ "additionalProperties": false,
1439
+ "required": ["type", "content"]
1440
+ },
1424
1441
  "decisionItem_node": {
1425
1442
  "type": "object",
1426
1443
  "properties": {
@@ -1673,23 +1690,6 @@
1673
1690
  }
1674
1691
  ]
1675
1692
  },
1676
- "mediaGroup_node": {
1677
- "type": "object",
1678
- "properties": {
1679
- "type": {
1680
- "enum": ["mediaGroup"]
1681
- },
1682
- "content": {
1683
- "type": "array",
1684
- "items": {
1685
- "$ref": "#/definitions/media_node"
1686
- },
1687
- "minItems": 1
1688
- }
1689
- },
1690
- "additionalProperties": false,
1691
- "required": ["type", "content"]
1692
- },
1693
1693
  "rule_node": {
1694
1694
  "type": "object",
1695
1695
  "properties": {
@@ -1451,6 +1451,62 @@
1451
1451
  "additionalProperties": false,
1452
1452
  "required": ["type", "content"]
1453
1453
  },
1454
+ "mediaGroup_node": {
1455
+ "type": "object",
1456
+ "properties": {
1457
+ "type": {
1458
+ "enum": ["mediaGroup"]
1459
+ },
1460
+ "content": {
1461
+ "type": "array",
1462
+ "items": {
1463
+ "$ref": "#/definitions/media_node"
1464
+ },
1465
+ "minItems": 1
1466
+ }
1467
+ },
1468
+ "additionalProperties": false,
1469
+ "required": ["type", "content"]
1470
+ },
1471
+ "blockquote_with_nested_codeblock_or_media_node": {
1472
+ "type": "object",
1473
+ "properties": {
1474
+ "type": {
1475
+ "enum": ["blockquote"]
1476
+ },
1477
+ "content": {
1478
+ "type": "array",
1479
+ "items": {
1480
+ "anyOf": [
1481
+ {
1482
+ "$ref": "#/definitions/paragraph_with_no_marks_node"
1483
+ },
1484
+ {
1485
+ "$ref": "#/definitions/orderedList_node"
1486
+ },
1487
+ {
1488
+ "$ref": "#/definitions/bulletList_node"
1489
+ },
1490
+ {
1491
+ "$ref": "#/definitions/codeBlock_with_no_marks_node"
1492
+ },
1493
+ {
1494
+ "$ref": "#/definitions/mediaGroup_node"
1495
+ },
1496
+ {
1497
+ "$ref": "#/definitions/mediaSingle_caption_node"
1498
+ },
1499
+ {
1500
+ "$ref": "#/definitions/mediaSingle_full_node"
1501
+ }
1502
+ ]
1503
+ },
1504
+ "minItems": 1
1505
+ }
1506
+ },
1507
+ "additionalProperties": false,
1508
+ "required": ["type", "content"]
1509
+ },
1454
1510
  "decisionItem_node": {
1455
1511
  "type": "object",
1456
1512
  "properties": {
@@ -1703,23 +1759,6 @@
1703
1759
  }
1704
1760
  ]
1705
1761
  },
1706
- "mediaGroup_node": {
1707
- "type": "object",
1708
- "properties": {
1709
- "type": {
1710
- "enum": ["mediaGroup"]
1711
- },
1712
- "content": {
1713
- "type": "array",
1714
- "items": {
1715
- "$ref": "#/definitions/media_node"
1716
- },
1717
- "minItems": 1
1718
- }
1719
- },
1720
- "additionalProperties": false,
1721
- "required": ["type", "content"]
1722
- },
1723
1762
  "rule_node": {
1724
1763
  "type": "object",
1725
1764
  "properties": {
@@ -2371,6 +2410,9 @@
2371
2410
  {
2372
2411
  "$ref": "#/definitions/blockquote_node"
2373
2412
  },
2413
+ {
2414
+ "$ref": "#/definitions/blockquote_with_nested_codeblock_or_media_node"
2415
+ },
2374
2416
  {
2375
2417
  "$ref": "#/definitions/decisionList_node"
2376
2418
  },
@@ -2701,6 +2743,9 @@
2701
2743
  {
2702
2744
  "$ref": "#/definitions/blockquote_node"
2703
2745
  },
2746
+ {
2747
+ "$ref": "#/definitions/blockquote_with_nested_codeblock_or_media_node"
2748
+ },
2704
2749
  {
2705
2750
  "$ref": "#/definitions/decisionList_node"
2706
2751
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "40.2.1",
3
+ "version": "40.3.1",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,7 +46,7 @@
46
46
  "memoize-one": "^6.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@atlassian/adf-schema-json": "^1.17.0",
49
+ "@atlassian/adf-schema-json": "^1.18.0",
50
50
  "@atlassian/feature-flags-test-utils": "^0.2.0",
51
51
  "@atlaskit/adf-schema-generator": "^1.30.0",
52
52
  "@atlaskit/codemod-utils": "^4.2.4",