@atlaskit/adf-schema 46.0.0 → 46.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) 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 +15 -1
  4. package/dist/cjs/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  5. package/dist/cjs/next-schema/nodes/expand.js +1 -9
  6. package/dist/cjs/next-schema/nodes/nestedExpand.js +16 -3
  7. package/dist/cjs/schema/default-schema.js +2 -1
  8. package/dist/cjs/schema/index.js +6 -0
  9. package/dist/cjs/schema/nodes/index.js +6 -0
  10. package/dist/cjs/schema/nodes/nested-expand.js +15 -8
  11. package/dist/cjs/schema/nodes/tableNodes.js +1 -1
  12. package/dist/cjs/validator-schema/generated/validatorSpec.js +28 -6
  13. package/dist/es2019/index.js +1 -1
  14. package/dist/es2019/next-schema/generated/nodeTypes.js +14 -0
  15. package/dist/es2019/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  16. package/dist/es2019/next-schema/nodes/expand.js +1 -9
  17. package/dist/es2019/next-schema/nodes/nestedExpand.js +16 -3
  18. package/dist/es2019/schema/default-schema.js +3 -2
  19. package/dist/es2019/schema/index.js +1 -1
  20. package/dist/es2019/schema/nodes/index.js +1 -1
  21. package/dist/es2019/schema/nodes/nested-expand.js +15 -8
  22. package/dist/es2019/schema/nodes/tableNodes.js +1 -1
  23. package/dist/es2019/validator-schema/generated/validatorSpec.js +27 -5
  24. package/dist/esm/index.js +1 -1
  25. package/dist/esm/next-schema/generated/nodeTypes.js +14 -0
  26. package/dist/esm/next-schema/groups/tableCellContentPseudoGroup.js +1 -1
  27. package/dist/esm/next-schema/nodes/expand.js +1 -9
  28. package/dist/esm/next-schema/nodes/nestedExpand.js +16 -3
  29. package/dist/esm/schema/default-schema.js +3 -2
  30. package/dist/esm/schema/index.js +1 -1
  31. package/dist/esm/schema/nodes/index.js +1 -1
  32. package/dist/esm/schema/nodes/nested-expand.js +15 -8
  33. package/dist/esm/schema/nodes/tableNodes.js +1 -1
  34. package/dist/esm/validator-schema/generated/validatorSpec.js +27 -5
  35. package/dist/json-schema/v1/full.json +3 -6
  36. package/dist/json-schema/v1/stage-0.json +85 -6
  37. package/dist/types/index.d.ts +1 -1
  38. package/dist/types/next-schema/generated/nodeTypes.d.ts +16 -6
  39. package/dist/types/next-schema/groups/tableCellContentPseudoGroup.d.ts +6 -0
  40. package/dist/types/next-schema/nodes/nestedExpand.d.ts +7 -1
  41. package/dist/types/schema/index.d.ts +1 -1
  42. package/dist/types/schema/nodes/index.d.ts +1 -1
  43. package/dist/types/schema/nodes/nested-expand.d.ts +5 -0
  44. package/dist/types/validator-schema/generated/validatorSpec.d.ts +23 -1
  45. package/json-schema/v1/full.json +3 -6
  46. package/json-schema/v1/stage-0.json +85 -6
  47. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 46.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6bc9490: Stage 0 - non-bodied-macros-in-nested-expand
8
+
9
+ ## 46.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 2eee4d8: Make attrs optional for expand, remove type from layoutSectionFull
14
+
3
15
  ## 46.0.0
4
16
 
5
17
  ### Major Changes
package/dist/cjs/index.js CHANGED
@@ -843,6 +843,12 @@ Object.defineProperty(exports, "nestedExpand", {
843
843
  return _schema.nestedExpand;
844
844
  }
845
845
  });
846
+ Object.defineProperty(exports, "nestedExpandWithNonBodiedMacrosStage0", {
847
+ enumerable: true,
848
+ get: function get() {
849
+ return _schema.nestedExpandWithNonBodiedMacrosStage0;
850
+ }
851
+ });
846
852
  Object.defineProperty(exports, "normalizeHexColor", {
847
853
  enumerable: true,
848
854
  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.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelWithNestedBlockquoteStage0 = 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.listItemWithNestedDecisionStage0 = 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.expandWithoutNestedExpand = exports.expandRootOnly = 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.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteWithoutNestedCodeblockOrMedia = exports.blockquoteLegacy = exports.blockquote = exports.blockCard = void 0;
6
+ exports.unsupportedInline = exports.unsupportedBlock = exports.textWithNoMarks = exports.textFormatted = exports.textCodeInline = exports.text = exports.taskList = exports.taskItem = exports.tableWithNestedTable = exports.tableRowWithNestedTable = exports.tableRow = exports.tableHeaderWithNestedTable = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCell = exports.table = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = exports.panelWithNestedBlockquoteStage0 = exports.panel = exports.orderedList = exports.nestedExpandWithNonBodiedMacrosStage0 = 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.listItemWithNestedDecisionStage0 = 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.expandWithoutNestedExpand = exports.expandRootOnly = 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.codeBlockRootOnly = exports.codeBlock = exports.caption = exports.bulletList = exports.bodiedExtensionWithMarks = exports.bodiedExtension = exports.blockquoteWithoutNestedCodeblockOrMedia = 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
@@ -863,6 +863,20 @@ var nestedExpandWithNoMarks = exports.nestedExpandWithNoMarks = (0, _createPMSpe
863
863
  selectable: true,
864
864
  isolating: true
865
865
  });
866
+ var nestedExpandWithNonBodiedMacrosStage0 = exports.nestedExpandWithNonBodiedMacrosStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
867
+ content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock | extension)+',
868
+ marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
869
+ attrs: {
870
+ title: {
871
+ default: ''
872
+ },
873
+ __expanded: {
874
+ default: true
875
+ }
876
+ },
877
+ selectable: true,
878
+ isolating: true
879
+ });
866
880
  var orderedList = exports.orderedList = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
867
881
  content: 'listItem+',
868
882
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -21,7 +21,7 @@ var _paragraph = require("../nodes/paragraph");
21
21
  var _rule = require("../nodes/rule");
22
22
  var _task = require("../nodes/task");
23
23
  var _unsupportedBlock = require("../nodes/unsupportedBlock");
24
- var tableCellContentNodes = exports.tableCellContentNodes = [_paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup, _decisionList.decisionList, _task.taskList, _blockCard.blockCard, _embedCard.embedCard, _extension.extension.use('with_marks'), _nestedExpand.nestedExpand.use('content'), _nestedExpand.nestedExpand.use('with_no_marks')];
24
+ var tableCellContentNodes = exports.tableCellContentNodes = [_paragraph.paragraph.use('with_no_marks'), _paragraph.paragraph.use('with_alignment'), _panel.panel, _blockquote.blockquote, _list.orderedList, _list.bulletList, _rule.rule, _heading.heading.use('with_no_marks'), _heading.heading.use('with_alignment'), _heading.heading.use('with_indentation'), _codeBlock.codeBlock, _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup, _decisionList.decisionList, _task.taskList, _blockCard.blockCard, _embedCard.embedCard, _extension.extension.use('with_marks'), _nestedExpand.nestedExpand.use('content'), _nestedExpand.nestedExpand.use('with_no_marks'), _nestedExpand.nestedExpand.use('with_non_bodied_macros')];
25
25
 
26
26
  // This is not an actual group, but a collection of nodes
27
27
  // @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
@@ -26,15 +26,7 @@ var expand = exports.expand = (0, _adfSchemaGenerator.adfNode)('expand').define(
26
26
  optional: true
27
27
  }
28
28
  },
29
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_nonNestableBlockContentGroup.nonNestableBlockContentGroup, _nestedExpand.nestedExpand.use('with_no_marks')))],
30
- DANGEROUS_MANUAL_OVERRIDE: {
31
- 'validator-spec': {
32
- 'props.attrs.optional': {
33
- reason: '@DSLCompatibilityException - required for expand validator spec',
34
- remove: true
35
- }
36
- }
37
- }
29
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_nonNestableBlockContentGroup.nonNestableBlockContentGroup, _nestedExpand.nestedExpand.use('with_no_marks'), _nestedExpand.nestedExpand.use('with_non_bodied_macros')))]
38
30
  }).variant('without_nested_expand', {
39
31
  content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_nonNestableBlockContentGroup.nonNestableBlockContentGroup))],
40
32
  ignore: ['json-schema', 'validator-spec']
@@ -10,6 +10,7 @@ var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
10
10
  var _blockquote = require("./blockquote");
11
11
  var _codeBlock = require("./codeBlock");
12
12
  var _decisionList = require("./decisionList");
13
+ var _extension = require("./extension");
13
14
  var _heading = require("./heading");
14
15
  var _list = require("./list");
15
16
  var _mediaGroup = require("./mediaGroup");
@@ -19,6 +20,7 @@ var _paragraph = require("./paragraph");
19
20
  var _rule = require("./rule");
20
21
  var _task = require("./task");
21
22
  var _unsupportedBlock = require("./unsupportedBlock");
23
+ var nestedExpandContent = [_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup, _codeBlock.codeBlock, _list.bulletList, _list.orderedList, _task.taskList, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _unsupportedBlock.unsupportedBlock];
22
24
  var nestedExpand = exports.nestedExpand = (0, _adfSchemaGenerator.adfNode)('nestedExpand').define({
23
25
  isolating: true,
24
26
  selectable: true,
@@ -35,7 +37,7 @@ var nestedExpand = exports.nestedExpand = (0, _adfSchemaGenerator.adfNode)('nest
35
37
  optional: true
36
38
  }
37
39
  },
38
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_paragraph.paragraph.use('with_no_marks'), _heading.heading.use('with_no_marks'), _mediaSingle.mediaSingle.use('caption'), _mediaSingle.mediaSingle.use('full'), _mediaGroup.mediaGroup, _codeBlock.codeBlock, _list.bulletList, _list.orderedList, _task.taskList, _decisionList.decisionList, _rule.rule, _panel.panel, _blockquote.blockquote, _unsupportedBlock.unsupportedBlock))],
40
+ content: [(0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, nestedExpandContent))],
39
41
  DANGEROUS_MANUAL_OVERRIDE: {
40
42
  'validator-spec': {
41
43
  'props.attrs.optional': {
@@ -43,8 +45,13 @@ var nestedExpand = exports.nestedExpand = (0, _adfSchemaGenerator.adfNode)('nest
43
45
  reason: '@DSLCompatibilityException - mismatch with DSL'
44
46
  },
45
47
  'props.content': {
46
- value: 'nestedExpand_content',
47
- reason: '@DSLCompatibilityException - mismatch with DSL'
48
+ value: {
49
+ type: 'array',
50
+ items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
51
+ minItems: 1,
52
+ allowUnsupportedBlock: true
53
+ },
54
+ reason: '@DSLCompatibilityException - this is to loose the validator ristriction to allow extension to be nested inside nestedExpand'
48
55
  },
49
56
  required: {
50
57
  reason: '@DSLCompatibilityException - required for nestedExpand validator spec',
@@ -58,4 +65,10 @@ var nestedExpand = exports.nestedExpand = (0, _adfSchemaGenerator.adfNode)('nest
58
65
  marks: [],
59
66
  content: [],
60
67
  noMarks: true
68
+ }).variant('with_non_bodied_macros', {
69
+ marks: [],
70
+ content: [(0, _adfSchemaGenerator.$onePlus)(_adfSchemaGenerator.$or.apply(void 0, nestedExpandContent.concat([_extension.extension.use('with_marks')])))],
71
+ stage0: true,
72
+ noMarks: true,
73
+ noExtend: true
61
74
  });
@@ -33,7 +33,8 @@ var getSchemaBasedOnStage = exports.getSchemaBasedOnStage = (0, _memoizeOne.defa
33
33
  table: _nodes.tableWithNestedTable,
34
34
  tableRow: _nodes.tableRowWithNestedTable,
35
35
  tableCell: _nodes.tableCellWithNestedTable,
36
- tableHeader: _nodes.tableHeaderWithNestedTable
36
+ tableHeader: _nodes.tableHeaderWithNestedTable,
37
+ nestedExpand: _nodes.nestedExpandWithNonBodiedMacrosStage0
37
38
  };
38
39
  }
39
40
  return (0, _createSchema.createSchema)(defaultSchemaConfig);
@@ -495,6 +495,12 @@ Object.defineProperty(exports, "nestedExpand", {
495
495
  return _nodes.nestedExpand;
496
496
  }
497
497
  });
498
+ Object.defineProperty(exports, "nestedExpandWithNonBodiedMacrosStage0", {
499
+ enumerable: true,
500
+ get: function get() {
501
+ return _nodes.nestedExpandWithNonBodiedMacrosStage0;
502
+ }
503
+ });
498
504
  Object.defineProperty(exports, "orderedList", {
499
505
  enumerable: true,
500
506
  get: function get() {
@@ -334,6 +334,12 @@ Object.defineProperty(exports, "nestedExpand", {
334
334
  return _nestedExpand.nestedExpand;
335
335
  }
336
336
  });
337
+ Object.defineProperty(exports, "nestedExpandWithNonBodiedMacrosStage0", {
338
+ enumerable: true,
339
+ get: function get() {
340
+ return _nestedExpand.nestedExpandWithNonBodiedMacrosStage0;
341
+ }
342
+ });
337
343
  Object.defineProperty(exports, "orderedList", {
338
344
  enumerable: true,
339
345
  get: function get() {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.nestedExpand = void 0;
6
+ exports.nestedExpandWithNonBodiedMacrosStage0 = exports.nestedExpand = void 0;
7
7
  var _nodeTypes = require("../../next-schema/generated/nodeTypes");
8
8
  /**
9
9
  * @name nestedExpand_content
@@ -26,12 +26,7 @@ function getExpandAttrs(domNode) {
26
26
  __expanded: true
27
27
  };
28
28
  }
29
-
30
- /**
31
- * @name nestedExpand
32
- * @description an expand that can be nested (eg. inside table, layout).
33
- */
34
- var nestedExpand = exports.nestedExpand = (0, _nodeTypes.nestedExpand)({
29
+ var nestedExpandFactoryOptions = {
35
30
  parseDOM: [{
36
31
  context: 'nestedExpand//',
37
32
  tag: '[data-node-type="nestedExpand"]',
@@ -54,4 +49,16 @@ var nestedExpand = exports.nestedExpand = (0, _nodeTypes.nestedExpand)({
54
49
  };
55
50
  return ['div', attrs, 0];
56
51
  }
57
- });
52
+ };
53
+
54
+ /**
55
+ * @name nestedExpand
56
+ * @description an expand that can be nested (eg. inside table, layout).
57
+ */
58
+ var nestedExpand = exports.nestedExpand = (0, _nodeTypes.nestedExpand)(nestedExpandFactoryOptions);
59
+
60
+ /**
61
+ * @name nestedExpandWithNonBodiedMacrosStage0
62
+ * @description an expand that can be nested (eg. inside table, layout).
63
+ */
64
+ var nestedExpandWithNonBodiedMacrosStage0 = exports.nestedExpandWithNonBodiedMacrosStage0 = (0, _nodeTypes.nestedExpandWithNonBodiedMacrosStage0)(nestedExpandFactoryOptions);
@@ -224,7 +224,7 @@ var tableNodeSpecOptions = {
224
224
  isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true',
225
225
  layout:
226
226
  // copying from editor
227
- dom.getAttribute('data-layout') || ( // copying from renderer
227
+ dom.getAttribute('data-layout') || (// copying from renderer
228
228
  breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
229
229
  __autoSize: dom.getAttribute('data-autosize') === 'true',
230
230
  localId: dom.getAttribute('data-table-local-id') || _uuid.uuid.generate(),
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.underline = exports.text_with_no_marks = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = 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_with_nested_blockquote = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_nested_decision = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_root_only = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
6
+ exports.underline = exports.text_with_no_marks = exports.text_link_inline = exports.text_formatted = exports.text_code_inline = exports.textColor = exports.text = exports.taskList = exports.taskItem = exports.tableRow = exports.tableHeader = 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_with_nested_blockquote = exports.panel = exports.orderedList = exports.non_nestable_block_content = exports.nestedExpand_with_non_bodied_macros = exports.nestedExpand_with_no_marks = exports.nestedExpand_content = exports.nestedExpand = exports.multiBodiedExtension = exports.mention = exports.mediaSingle_width_type = exports.mediaSingle_full = exports.mediaSingle_caption = exports.mediaSingle = exports.mediaInline = exports.mediaGroup = exports.media = exports.listItem_with_nested_decision = exports.listItem = exports.link = exports.layoutSection_with_single_column = exports.layoutSection_full = exports.layoutSection = exports.layoutColumn = exports.inline_content = exports.inlineExtension_with_marks = exports.inlineExtension = exports.inlineCard = exports.indentation = exports.heading_with_no_marks = exports.heading_with_indentation = exports.heading_with_alignment = exports.heading = exports.hardBreak = exports.fragment = exports.extension_with_marks = exports.extensionFrame = exports.extension = exports.expand_root_only = exports.expand = exports.emoji = exports.embedCard = exports.em = exports.doc = exports.decisionList = exports.decisionItem = exports.date = exports.dataConsumer = exports.confluenceInlineComment = exports.codeBlock_root_only = exports.codeBlock = exports.code = exports.caption = exports.bulletList = exports.breakout = exports.border = exports.bodiedExtension_with_marks = exports.bodiedExtension = exports.blockquote = exports.block_content = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
7
7
  var alignment = exports.alignment = {
8
8
  props: {
9
9
  type: {
@@ -505,11 +505,12 @@ var expand = exports.expand = {
505
505
  type: 'string',
506
506
  optional: true
507
507
  }
508
- }
508
+ },
509
+ optional: true
509
510
  },
510
511
  content: {
511
512
  type: 'array',
512
- items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
513
+ items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand_with_non_bodied_macros']],
513
514
  minItems: 1,
514
515
  allowUnsupportedBlock: true
515
516
  }
@@ -1243,7 +1244,12 @@ var nestedExpand = exports.nestedExpand = {
1243
1244
  }
1244
1245
  }
1245
1246
  },
1246
- content: 'nestedExpand_content'
1247
+ content: {
1248
+ type: 'array',
1249
+ items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
1250
+ minItems: 1,
1251
+ allowUnsupportedBlock: true
1252
+ }
1247
1253
  },
1248
1254
  required: ['content']
1249
1255
  };
@@ -1263,6 +1269,22 @@ var nestedExpand_with_no_marks = exports.nestedExpand_with_no_marks = ['nestedEx
1263
1269
  }
1264
1270
  }
1265
1271
  }];
1272
+ var nestedExpand_with_non_bodied_macros = exports.nestedExpand_with_non_bodied_macros = ['nestedExpand', {
1273
+ props: {
1274
+ content: {
1275
+ type: 'array',
1276
+ items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
1277
+ minItems: 1,
1278
+ allowUnsupportedBlock: true
1279
+ },
1280
+ marks: {
1281
+ type: 'array',
1282
+ maxItems: 0,
1283
+ items: [],
1284
+ optional: true
1285
+ }
1286
+ }
1287
+ }];
1266
1288
  var non_nestable_block_content = exports.non_nestable_block_content = ['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks'];
1267
1289
  var orderedList = exports.orderedList = {
1268
1290
  props: {
@@ -1557,7 +1579,7 @@ var tableCell = exports.tableCell = {
1557
1579
  },
1558
1580
  content: {
1559
1581
  type: 'array',
1560
- items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
1582
+ items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand_with_non_bodied_macros']],
1561
1583
  minItems: 1,
1562
1584
  allowUnsupportedBlock: true
1563
1585
  }
@@ -1596,7 +1618,7 @@ var tableHeader = exports.tableHeader = {
1596
1618
  },
1597
1619
  content: {
1598
1620
  type: 'array',
1599
- items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
1621
+ items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand_with_non_bodied_macros', 'nestedExpand']],
1600
1622
  minItems: 1
1601
1623
  }
1602
1624
  },
@@ -1,5 +1,5 @@
1
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, expandWithNestedExpand, 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, panelWithBlockquoteStage0, 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, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandWithNestedExpand, 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, nestedExpandWithNonBodiedMacrosStage0, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, panelWithBlockquoteStage0, 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, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } 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
@@ -857,6 +857,20 @@ export const nestedExpandWithNoMarks = createPMNodeSpecFactory({
857
857
  selectable: true,
858
858
  isolating: true
859
859
  });
860
+ export const nestedExpandWithNonBodiedMacrosStage0 = createPMNodeSpecFactory({
861
+ content: '(paragraph | heading | mediaSingle | mediaGroup | codeBlock | bulletList | orderedList | taskList | decisionList | rule | panel | blockquote | unsupportedBlock | extension)+',
862
+ marks: 'unsupportedMark unsupportedNodeAttribute dataConsumer fragment',
863
+ attrs: {
864
+ title: {
865
+ default: ''
866
+ },
867
+ __expanded: {
868
+ default: true
869
+ }
870
+ },
871
+ selectable: true,
872
+ isolating: true
873
+ });
860
874
  export const orderedList = createPMNodeSpecFactory({
861
875
  content: 'listItem+',
862
876
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -15,7 +15,7 @@ import { paragraph } from '../nodes/paragraph';
15
15
  import { rule } from '../nodes/rule';
16
16
  import { taskList } from '../nodes/task';
17
17
  import { unsupportedBlock } from '../nodes/unsupportedBlock';
18
- export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks')];
18
+ export const tableCellContentNodes = [paragraph.use('with_no_marks'), paragraph.use('with_alignment'), panel, blockquote, orderedList, bulletList, rule, heading.use('with_no_marks'), heading.use('with_alignment'), heading.use('with_indentation'), codeBlock, mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, decisionList, taskList, blockCard, embedCard, extension.use('with_marks'), nestedExpand.use('content'), nestedExpand.use('with_no_marks'), nestedExpand.use('with_non_bodied_macros')];
19
19
 
20
20
  // This is not an actual group, but a collection of nodes
21
21
  // @DSLCompatibilityException JSON Schema and PM Spec are not in sync. We need to fix it
@@ -20,15 +20,7 @@ export const expand = adfNode('expand').define({
20
20
  optional: true
21
21
  }
22
22
  },
23
- content: [$onePlus($or(nonNestableBlockContentGroup, nestedExpand.use('with_no_marks')))],
24
- DANGEROUS_MANUAL_OVERRIDE: {
25
- 'validator-spec': {
26
- 'props.attrs.optional': {
27
- reason: '@DSLCompatibilityException - required for expand validator spec',
28
- remove: true
29
- }
30
- }
31
- }
23
+ content: [$onePlus($or(nonNestableBlockContentGroup, nestedExpand.use('with_no_marks'), nestedExpand.use('with_non_bodied_macros')))]
32
24
  }).variant('without_nested_expand', {
33
25
  content: [$onePlus($or(nonNestableBlockContentGroup))],
34
26
  ignore: ['json-schema', 'validator-spec']
@@ -4,6 +4,7 @@ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
4
4
  import { blockquote } from './blockquote';
5
5
  import { codeBlock } from './codeBlock';
6
6
  import { decisionList } from './decisionList';
7
+ import { extension } from './extension';
7
8
  import { heading } from './heading';
8
9
  import { bulletList, orderedList } from './list';
9
10
  import { mediaGroup } from './mediaGroup';
@@ -13,6 +14,7 @@ import { paragraph } from './paragraph';
13
14
  import { rule } from './rule';
14
15
  import { taskList } from './task';
15
16
  import { unsupportedBlock } from './unsupportedBlock';
17
+ const nestedExpandContent = [paragraph.use('with_no_marks'), heading.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote, unsupportedBlock];
16
18
  export const nestedExpand = adfNode('nestedExpand').define({
17
19
  isolating: true,
18
20
  selectable: true,
@@ -29,7 +31,7 @@ export const nestedExpand = adfNode('nestedExpand').define({
29
31
  optional: true
30
32
  }
31
33
  },
32
- content: [$onePlus($or(paragraph.use('with_no_marks'), heading.use('with_no_marks'), mediaSingle.use('caption'), mediaSingle.use('full'), mediaGroup, codeBlock, bulletList, orderedList, taskList, decisionList, rule, panel, blockquote, unsupportedBlock))],
34
+ content: [$onePlus($or(...nestedExpandContent))],
33
35
  DANGEROUS_MANUAL_OVERRIDE: {
34
36
  'validator-spec': {
35
37
  'props.attrs.optional': {
@@ -37,8 +39,13 @@ export const nestedExpand = adfNode('nestedExpand').define({
37
39
  reason: '@DSLCompatibilityException - mismatch with DSL'
38
40
  },
39
41
  'props.content': {
40
- value: 'nestedExpand_content',
41
- reason: '@DSLCompatibilityException - mismatch with DSL'
42
+ value: {
43
+ type: 'array',
44
+ items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
45
+ minItems: 1,
46
+ allowUnsupportedBlock: true
47
+ },
48
+ reason: '@DSLCompatibilityException - this is to loose the validator ristriction to allow extension to be nested inside nestedExpand'
42
49
  },
43
50
  required: {
44
51
  reason: '@DSLCompatibilityException - required for nestedExpand validator spec',
@@ -52,4 +59,10 @@ export const nestedExpand = adfNode('nestedExpand').define({
52
59
  marks: [],
53
60
  content: [],
54
61
  noMarks: true
62
+ }).variant('with_non_bodied_macros', {
63
+ marks: [],
64
+ content: [$onePlus($or(...nestedExpandContent, extension.use('with_marks')))],
65
+ stage0: true,
66
+ noMarks: true,
67
+ noExtend: true
55
68
  });
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, blockquoteWithNestedCodeblockOrMedia, listItemWithDecisionStage0, panelWithBlockquoteStage0, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, expandWithNestedExpand, blockquoteWithNestedCodeblockOrMedia, listItemWithDecisionStage0, panelWithBlockquoteStage0, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, nestedExpandWithNonBodiedMacrosStage0 } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  const getDefaultSchemaConfig = () => {
5
5
  const defaultSchemaConfig = {
@@ -25,7 +25,8 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
25
25
  table: tableWithNestedTable,
26
26
  tableRow: tableRowWithNestedTable,
27
27
  tableCell: tableCellWithNestedTable,
28
- tableHeader: tableHeaderWithNestedTable
28
+ tableHeader: tableHeaderWithNestedTable,
29
+ nestedExpand: nestedExpandWithNonBodiedMacrosStage0
29
30
  };
30
31
  }
31
32
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
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, expandWithNestedExpand, 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, panelWithBlockquoteStage0, 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, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } 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, expandWithNestedExpand, 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, nestedExpandWithNonBodiedMacrosStage0, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, panelWithBlockquoteStage0, 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, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } 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';
@@ -37,7 +37,7 @@ export { blockCard } from './block-card';
37
37
  export { unsupportedBlock } from './unsupported-block';
38
38
  export { unsupportedInline } from './unsupported-inline';
39
39
  export { status } from './status';
40
- export { nestedExpand } from './nested-expand';
40
+ export { nestedExpand, nestedExpandWithNonBodiedMacrosStage0 } from './nested-expand';
41
41
  export { embedCard } from './embed-card';
42
42
  // Extensions
43
43
  export { extension } from './extension';
@@ -1,4 +1,4 @@
1
- import { nestedExpand as nestedExpandFactory } from '../../next-schema/generated/nodeTypes';
1
+ import { nestedExpand as nestedExpandFactory, nestedExpandWithNonBodiedMacrosStage0 as nestedExpandWithNonBodiedMacrosStage0Factory } from '../../next-schema/generated/nodeTypes';
2
2
 
3
3
  /**
4
4
  * @name nestedExpand_content
@@ -21,12 +21,7 @@ function getExpandAttrs(domNode) {
21
21
  __expanded: true
22
22
  };
23
23
  }
24
-
25
- /**
26
- * @name nestedExpand
27
- * @description an expand that can be nested (eg. inside table, layout).
28
- */
29
- export const nestedExpand = nestedExpandFactory({
24
+ const nestedExpandFactoryOptions = {
30
25
  parseDOM: [{
31
26
  context: 'nestedExpand//',
32
27
  tag: '[data-node-type="nestedExpand"]',
@@ -49,4 +44,16 @@ export const nestedExpand = nestedExpandFactory({
49
44
  };
50
45
  return ['div', attrs, 0];
51
46
  }
52
- });
47
+ };
48
+
49
+ /**
50
+ * @name nestedExpand
51
+ * @description an expand that can be nested (eg. inside table, layout).
52
+ */
53
+ export const nestedExpand = nestedExpandFactory(nestedExpandFactoryOptions);
54
+
55
+ /**
56
+ * @name nestedExpandWithNonBodiedMacrosStage0
57
+ * @description an expand that can be nested (eg. inside table, layout).
58
+ */
59
+ export const nestedExpandWithNonBodiedMacrosStage0 = nestedExpandWithNonBodiedMacrosStage0Factory(nestedExpandFactoryOptions);
@@ -211,7 +211,7 @@ const tableNodeSpecOptions = {
211
211
  isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true',
212
212
  layout:
213
213
  // copying from editor
214
- dom.getAttribute('data-layout') || ( // copying from renderer
214
+ dom.getAttribute('data-layout') || (// copying from renderer
215
215
  breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
216
216
  __autoSize: dom.getAttribute('data-autosize') === 'true',
217
217
  localId: dom.getAttribute('data-table-local-id') || uuid.generate(),
@@ -499,11 +499,12 @@ export const expand = {
499
499
  type: 'string',
500
500
  optional: true
501
501
  }
502
- }
502
+ },
503
+ optional: true
503
504
  },
504
505
  content: {
505
506
  type: 'array',
506
- items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
507
+ items: [['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand_with_non_bodied_macros']],
507
508
  minItems: 1,
508
509
  allowUnsupportedBlock: true
509
510
  }
@@ -1237,7 +1238,12 @@ export const nestedExpand = {
1237
1238
  }
1238
1239
  }
1239
1240
  },
1240
- content: 'nestedExpand_content'
1241
+ content: {
1242
+ type: 'array',
1243
+ items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
1244
+ minItems: 1,
1245
+ allowUnsupportedBlock: true
1246
+ }
1241
1247
  },
1242
1248
  required: ['content']
1243
1249
  };
@@ -1257,6 +1263,22 @@ export const nestedExpand_with_no_marks = ['nestedExpand', {
1257
1263
  }
1258
1264
  }
1259
1265
  }];
1266
+ export const nestedExpand_with_non_bodied_macros = ['nestedExpand', {
1267
+ props: {
1268
+ content: {
1269
+ type: 'array',
1270
+ items: [['paragraph_with_no_marks', 'heading_with_no_marks', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'codeBlock', 'bulletList', 'orderedList', 'taskList', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks']],
1271
+ minItems: 1,
1272
+ allowUnsupportedBlock: true
1273
+ },
1274
+ marks: {
1275
+ type: 'array',
1276
+ maxItems: 0,
1277
+ items: [],
1278
+ optional: true
1279
+ }
1280
+ }
1281
+ }];
1260
1282
  export const non_nestable_block_content = ['paragraph_with_no_marks', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'codeBlock', 'mediaGroup', 'mediaSingle_caption', 'mediaSingle_full', 'decisionList', 'taskList', 'table', 'blockCard', 'embedCard', 'extension_with_marks'];
1261
1283
  export const orderedList = {
1262
1284
  props: {
@@ -1551,7 +1573,7 @@ export const tableCell = {
1551
1573
  },
1552
1574
  content: {
1553
1575
  type: 'array',
1554
- items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks']],
1576
+ items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand_with_non_bodied_macros']],
1555
1577
  minItems: 1,
1556
1578
  allowUnsupportedBlock: true
1557
1579
  }
@@ -1590,7 +1612,7 @@ export const tableHeader = {
1590
1612
  },
1591
1613
  content: {
1592
1614
  type: 'array',
1593
- items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand']],
1615
+ items: [['paragraph_with_no_marks', 'paragraph_with_alignment', 'panel', 'blockquote', 'orderedList', 'bulletList', 'rule', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'codeBlock', 'mediaSingle_caption', 'mediaSingle_full', 'mediaGroup', 'decisionList', 'taskList', 'blockCard', 'embedCard', 'extension_with_marks', 'nestedExpand_with_no_marks', 'nestedExpand_with_non_bodied_macros', 'nestedExpand']],
1594
1616
  minItems: 1
1595
1617
  }
1596
1618
  },
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
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, expandWithNestedExpand, 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, panelWithBlockquoteStage0, 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, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandWithNestedExpand, 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, nestedExpandWithNonBodiedMacrosStage0, orderedList, orderedListSelector, orderedListWithOrder, extendedPanel, panelWithBlockquoteStage0, 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, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable } 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