@atlaskit/adf-schema 50.4.0 → 51.1.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 (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +0 -6
  3. package/dist/cjs/next-schema/full-schema.adf.js +2 -1
  4. package/dist/cjs/next-schema/generated/nodeTypes.js +13 -2
  5. package/dist/cjs/next-schema/nodes/syncBlock.js +25 -0
  6. package/dist/cjs/schema/create-schema.js +3 -0
  7. package/dist/cjs/schema/nodes/index.js +8 -1
  8. package/dist/cjs/schema/nodes/sync-block.js +38 -0
  9. package/dist/cjs/validator-schema/generated/validatorSpec.js +25 -2
  10. package/dist/es2019/index.js +1 -4
  11. package/dist/es2019/next-schema/full-schema.adf.js +2 -1
  12. package/dist/es2019/next-schema/generated/nodeTypes.js +12 -1
  13. package/dist/es2019/next-schema/nodes/syncBlock.js +19 -0
  14. package/dist/es2019/schema/create-schema.js +4 -1
  15. package/dist/es2019/schema/nodes/index.js +2 -1
  16. package/dist/es2019/schema/nodes/sync-block.js +34 -0
  17. package/dist/es2019/validator-schema/generated/validatorSpec.js +24 -1
  18. package/dist/esm/index.js +1 -4
  19. package/dist/esm/next-schema/full-schema.adf.js +2 -1
  20. package/dist/esm/next-schema/generated/nodeTypes.js +12 -1
  21. package/dist/esm/next-schema/nodes/syncBlock.js +19 -0
  22. package/dist/esm/schema/create-schema.js +4 -1
  23. package/dist/esm/schema/nodes/index.js +2 -1
  24. package/dist/esm/schema/nodes/sync-block.js +33 -0
  25. package/dist/esm/validator-schema/generated/validatorSpec.js +24 -1
  26. package/dist/json-schema/v1/stage-0.json +32 -0
  27. package/dist/types/index.d.ts +2 -2
  28. package/dist/types/next-schema/generated/nodeTypes.d.ts +11 -1
  29. package/dist/types/next-schema/nodes/syncBlock.d.ts +1 -0
  30. package/dist/types/schema/index.d.ts +1 -1
  31. package/dist/types/schema/nodes/doc.d.ts +2 -1
  32. package/dist/types/schema/nodes/index.d.ts +2 -0
  33. package/dist/types/schema/nodes/sync-block.d.ts +22 -0
  34. package/dist/types/validator-schema/generated/validatorSpec.d.ts +23 -0
  35. package/json-schema/v1/stage-0.json +32 -0
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 51.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8556bce: EDITOR-1526 implement sync block node type
8
+
9
+ ## 51.0.0
10
+
11
+ ### Major Changes
12
+
13
+ - 81923c7: EDITOR-1534 Removes blockTaskItemStage0 ProseMirror node spec, replacing it with blockTaskItem
14
+
3
15
  ## 50.4.0
4
16
 
5
17
  ### Minor Changes
package/dist/cjs/index.js CHANGED
@@ -357,12 +357,6 @@ Object.defineProperty(exports, "blockTaskItem", {
357
357
  return _schema.blockTaskItem;
358
358
  }
359
359
  });
360
- Object.defineProperty(exports, "blockTaskItemStage0", {
361
- enumerable: true,
362
- get: function get() {
363
- return _schema.blockTaskItem;
364
- }
365
- });
366
360
  Object.defineProperty(exports, "blockquote", {
367
361
  enumerable: true,
368
362
  get: function get() {
@@ -11,10 +11,11 @@ var _blockRootOnlyGroup = require("./groups/blockRootOnlyGroup");
11
11
  var _blockContentGroup = require("./groups/blockContentGroup");
12
12
  var _expand = require("./nodes/expand");
13
13
  var _codeBlock = require("./nodes/codeBlock");
14
+ var _syncBlock = require("./nodes/syncBlock");
14
15
  var doc = (0, _adfSchemaGenerator.adfNode)('doc').define({
15
16
  root: true,
16
17
  version: 1,
17
- content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _blockContentGroup.blockContentGroup, _codeBlock.codeBlock.use('root_only'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup, _expand.expand.use('root_only')))],
18
+ content: [(0, _adfSchemaGenerator.$onePlus)((0, _adfSchemaGenerator.$or)(_blockGroup.blockGroup, _blockContentGroup.blockContentGroup, _codeBlock.codeBlock.use('root_only'), _layoutSection.layoutSection, _layoutSection.layoutSection.use('with_single_column'), _layoutSection.layoutSection.use('full'), _blockRootOnlyGroup.blockRootOnlyGroup, _expand.expand.use('root_only'), _syncBlock.syncBlock))],
18
19
  DANGEROUS_MANUAL_OVERRIDE: {
19
20
  'validator-spec': {
20
21
  'props.content.minItems': {
@@ -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.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.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.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = 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.syncBlockStage0 = exports.statusStage0 = exports.status = exports.rule = exports.placeholder = exports.paragraphWithNoMarks = exports.paragraphWithIndentation = exports.paragraphWithAlignment = exports.paragraph = 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.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.blockquoteLegacy = exports.blockquote = exports.blockTaskItem = 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
@@ -278,7 +278,7 @@ var decisionList = exports.decisionList = (0, _createPMSpecFactory.createPMNodeS
278
278
  defining: true
279
279
  });
280
280
  var doc = exports.doc = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
281
- content: '(block | codeBlock | layoutSection | blockRootOnly | expand)+',
281
+ content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock)+',
282
282
  marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation dataConsumer fragment breakout'
283
283
  });
284
284
  var embedCard = exports.embedCard = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
@@ -1096,6 +1096,17 @@ var statusStage0 = exports.statusStage0 = (0, _createPMSpecFactory.createPMNodeS
1096
1096
  },
1097
1097
  selectable: true
1098
1098
  });
1099
+ var syncBlockStage0 = exports.syncBlockStage0 = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
1100
+ attrs: {
1101
+ resourceId: {
1102
+ default: ''
1103
+ },
1104
+ localId: {
1105
+ default: ''
1106
+ }
1107
+ },
1108
+ selectable: true
1109
+ });
1099
1110
  var table = exports.table = (0, _createPMSpecFactory.createPMNodeSpecFactory)({
1100
1111
  content: 'tableRow+',
1101
1112
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.syncBlock = void 0;
7
+ var _adfSchemaGenerator = require("@atlaskit/adf-schema-generator");
8
+ var _breakout = require("../marks/breakout");
9
+ var _unsupportedMark = require("../marks/unsupportedMark");
10
+ var _unsupportedNodeAttribute = require("../marks/unsupportedNodeAttribute");
11
+ var syncBlock = exports.syncBlock = (0, _adfSchemaGenerator.adfNode)('syncBlock').define({
12
+ stage0: true,
13
+ selectable: true,
14
+ marks: [_breakout.breakout, _unsupportedMark.unsupportedMark, _unsupportedNodeAttribute.unsupportedNodeAttribute],
15
+ attrs: {
16
+ resourceId: {
17
+ type: 'string',
18
+ default: ''
19
+ },
20
+ localId: {
21
+ type: 'string',
22
+ default: ''
23
+ }
24
+ }
25
+ });
@@ -201,6 +201,9 @@ var nodesInOrder = [{
201
201
  }, {
202
202
  name: 'embedCard',
203
203
  spec: _nodes.embedCard
204
+ }, {
205
+ name: 'syncBlock',
206
+ spec: _nodes.syncBlock
204
207
  }, {
205
208
  name: 'unknownBlock',
206
209
  spec: _nodes.unknownBlock
@@ -490,6 +490,12 @@ Object.defineProperty(exports, "status", {
490
490
  return _status.status;
491
491
  }
492
492
  });
493
+ Object.defineProperty(exports, "syncBlock", {
494
+ enumerable: true,
495
+ get: function get() {
496
+ return _syncBlock.syncBlock;
497
+ }
498
+ });
493
499
  Object.defineProperty(exports, "table", {
494
500
  enumerable: true,
495
501
  get: function get() {
@@ -738,4 +744,5 @@ var _embedCard = require("./embed-card");
738
744
  var _extension = require("./extension");
739
745
  var _inlineExtension = require("./inline-extension");
740
746
  var _bodiedExtension = require("./bodied-extension");
741
- var _multiBodiedExtension = require("./multi-bodied-extension");
747
+ var _multiBodiedExtension = require("./multi-bodied-extension");
748
+ var _syncBlock = require("./sync-block");
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.syncBlock = void 0;
7
+ var _nodeTypes = require("../../next-schema/generated/nodeTypes");
8
+ /**
9
+ * Represents a block node that is designed to be synchronized
10
+ * with an external resource across different products.
11
+ * @name syncBlock_node
12
+ */
13
+
14
+ var syncBlock = exports.syncBlock = (0, _nodeTypes.syncBlockStage0)({
15
+ parseDOM: [{
16
+ tag: 'div[data-sync-block]',
17
+ getAttrs: function getAttrs(domNode) {
18
+ var dom = domNode;
19
+ var attrs = {
20
+ localId: dom.getAttribute('data-local-id') || '',
21
+ resourceId: dom.getAttribute('data-resource-id') || ''
22
+ };
23
+ return attrs;
24
+ }
25
+ }],
26
+ toDOM: function toDOM(node) {
27
+ var _node$attrs = node.attrs,
28
+ localId = _node$attrs.localId,
29
+ resourceId = _node$attrs.resourceId;
30
+ var name = 'div';
31
+ var attrs = {
32
+ 'data-sync-block': '',
33
+ 'data-local-id': localId,
34
+ 'data-resource-id': resourceId
35
+ };
36
+ return [name, attrs];
37
+ }
38
+ });
@@ -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 = 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.blockTaskItem = 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.syncBlock = 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 = 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.blockTaskItem = exports.blockRootOnly = exports.blockCard = exports.backgroundColor = exports.annotation = exports.alignment = void 0;
7
7
  var alignment = exports.alignment = {
8
8
  props: {
9
9
  type: {
@@ -490,7 +490,7 @@ var doc = exports.doc = {
490
490
  },
491
491
  content: {
492
492
  type: 'array',
493
- items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only']],
493
+ items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock']],
494
494
  allowUnsupportedBlock: true
495
495
  }
496
496
  }
@@ -1637,6 +1637,29 @@ var subsup = exports.subsup = {
1637
1637
  }
1638
1638
  }
1639
1639
  };
1640
+ var syncBlock = exports.syncBlock = {
1641
+ props: {
1642
+ type: {
1643
+ type: 'enum',
1644
+ values: ['syncBlock']
1645
+ },
1646
+ attrs: {
1647
+ props: {
1648
+ resourceId: {
1649
+ type: 'string'
1650
+ },
1651
+ localId: {
1652
+ type: 'string'
1653
+ }
1654
+ }
1655
+ },
1656
+ marks: {
1657
+ type: 'array',
1658
+ optional: true,
1659
+ items: ['breakout']
1660
+ }
1661
+ }
1662
+ };
1640
1663
  var table = exports.table = {
1641
1664
  props: {
1642
1665
  type: {
@@ -1,8 +1,5 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, 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, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem,
3
- // TODO: EDITOR-1534 - Remove this blockTaskItem alias of blockTaskItemStage0 - blockTaskItemStage0 was removed without a major version when blockTaskItem was promoted to full schema
4
- // this broke backwards compatibility of minor versions so was restored - will be removed in next major version
5
- blockTaskItem as blockTaskItemStage0, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
6
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';
7
4
 
8
5
  // ADF createPMSpecFactory
@@ -5,10 +5,11 @@ import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
5
5
  import { blockContentGroup } from './groups/blockContentGroup';
6
6
  import { expand } from './nodes/expand';
7
7
  import { codeBlock } from './nodes/codeBlock';
8
+ import { syncBlock } from './nodes/syncBlock';
8
9
  const doc = adfNode('doc').define({
9
10
  root: true,
10
11
  version: 1,
11
- content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only')))],
12
+ content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock))],
12
13
  DANGEROUS_MANUAL_OVERRIDE: {
13
14
  'validator-spec': {
14
15
  'props.content.minItems': {
@@ -272,7 +272,7 @@ export const decisionList = createPMNodeSpecFactory({
272
272
  defining: true
273
273
  });
274
274
  export const doc = createPMNodeSpecFactory({
275
- content: '(block | codeBlock | layoutSection | blockRootOnly | expand)+',
275
+ content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock)+',
276
276
  marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation dataConsumer fragment breakout'
277
277
  });
278
278
  export const embedCard = createPMNodeSpecFactory({
@@ -1090,6 +1090,17 @@ export const statusStage0 = createPMNodeSpecFactory({
1090
1090
  },
1091
1091
  selectable: true
1092
1092
  });
1093
+ export const syncBlockStage0 = createPMNodeSpecFactory({
1094
+ attrs: {
1095
+ resourceId: {
1096
+ default: ''
1097
+ },
1098
+ localId: {
1099
+ default: ''
1100
+ }
1101
+ },
1102
+ selectable: true
1103
+ });
1093
1104
  export const table = createPMNodeSpecFactory({
1094
1105
  content: 'tableRow+',
1095
1106
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -0,0 +1,19 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { breakout } from '../marks/breakout';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
5
+ export const syncBlock = adfNode('syncBlock').define({
6
+ stage0: true,
7
+ selectable: true,
8
+ marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
9
+ attrs: {
10
+ resourceId: {
11
+ type: 'string',
12
+ default: ''
13
+ },
14
+ localId: {
15
+ type: 'string',
16
+ default: ''
17
+ }
18
+ }
19
+ });
@@ -2,7 +2,7 @@ import { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
3
3
  import { sanitizeNodes } from './sanitizeNodes';
4
4
  import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
5
- import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote } from './nodes';
5
+ import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote, syncBlock } from './nodes';
6
6
  function addItems(builtInItems, config, customSpecs = {}) {
7
7
  if (!config) {
8
8
  return {};
@@ -191,6 +191,9 @@ const nodesInOrder = [{
191
191
  }, {
192
192
  name: 'embedCard',
193
193
  spec: embedCard
194
+ }, {
195
+ name: 'syncBlock',
196
+ spec: syncBlock
194
197
  }, {
195
198
  name: 'unknownBlock',
196
199
  spec: unknownBlock
@@ -43,4 +43,5 @@ export { embedCard, embedCardWithLocalId } from './embed-card';
43
43
  export { extension } from './extension';
44
44
  export { inlineExtension } from './inline-extension';
45
45
  export { bodiedExtension } from './bodied-extension';
46
- export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
46
+ export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
47
+ export { syncBlock } from './sync-block';
@@ -0,0 +1,34 @@
1
+ import { syncBlockStage0 as syncBlockFactory } from '../../next-schema/generated/nodeTypes';
2
+
3
+ /**
4
+ * Represents a block node that is designed to be synchronized
5
+ * with an external resource across different products.
6
+ * @name syncBlock_node
7
+ */
8
+
9
+ export const syncBlock = syncBlockFactory({
10
+ parseDOM: [{
11
+ tag: 'div[data-sync-block]',
12
+ getAttrs: domNode => {
13
+ const dom = domNode;
14
+ const attrs = {
15
+ localId: dom.getAttribute('data-local-id') || '',
16
+ resourceId: dom.getAttribute('data-resource-id') || ''
17
+ };
18
+ return attrs;
19
+ }
20
+ }],
21
+ toDOM(node) {
22
+ const {
23
+ localId,
24
+ resourceId
25
+ } = node.attrs;
26
+ const name = 'div';
27
+ const attrs = {
28
+ 'data-sync-block': '',
29
+ 'data-local-id': localId,
30
+ 'data-resource-id': resourceId
31
+ };
32
+ return [name, attrs];
33
+ }
34
+ });
@@ -484,7 +484,7 @@ export const doc = {
484
484
  },
485
485
  content: {
486
486
  type: 'array',
487
- items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only']],
487
+ items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock']],
488
488
  allowUnsupportedBlock: true
489
489
  }
490
490
  }
@@ -1631,6 +1631,29 @@ export const subsup = {
1631
1631
  }
1632
1632
  }
1633
1633
  };
1634
+ export const syncBlock = {
1635
+ props: {
1636
+ type: {
1637
+ type: 'enum',
1638
+ values: ['syncBlock']
1639
+ },
1640
+ attrs: {
1641
+ props: {
1642
+ resourceId: {
1643
+ type: 'string'
1644
+ },
1645
+ localId: {
1646
+ type: 'string'
1647
+ }
1648
+ }
1649
+ },
1650
+ marks: {
1651
+ type: 'array',
1652
+ optional: true,
1653
+ items: ['breakout']
1654
+ }
1655
+ }
1656
+ };
1634
1657
  export const table = {
1635
1658
  props: {
1636
1659
  type: {
package/dist/esm/index.js CHANGED
@@ -1,8 +1,5 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, 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, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem,
3
- // TODO: EDITOR-1534 - Remove this blockTaskItem alias of blockTaskItemStage0 - blockTaskItemStage0 was removed without a major version when blockTaskItem was promoted to full schema
4
- // this broke backwards compatibility of minor versions so was restored - will be removed in next major version
5
- blockTaskItem as blockTaskItemStage0, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } from './schema';
6
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';
7
4
 
8
5
  // ADF createPMSpecFactory
@@ -5,10 +5,11 @@ import { blockRootOnlyGroup } from './groups/blockRootOnlyGroup';
5
5
  import { blockContentGroup } from './groups/blockContentGroup';
6
6
  import { expand } from './nodes/expand';
7
7
  import { codeBlock } from './nodes/codeBlock';
8
+ import { syncBlock } from './nodes/syncBlock';
8
9
  var doc = adfNode('doc').define({
9
10
  root: true,
10
11
  version: 1,
11
- content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only')))],
12
+ content: [$onePlus($or(blockGroup, blockContentGroup, codeBlock.use('root_only'), layoutSection, layoutSection.use('with_single_column'), layoutSection.use('full'), blockRootOnlyGroup, expand.use('root_only'), syncBlock))],
12
13
  DANGEROUS_MANUAL_OVERRIDE: {
13
14
  'validator-spec': {
14
15
  'props.content.minItems': {
@@ -272,7 +272,7 @@ export var decisionList = createPMNodeSpecFactory({
272
272
  defining: true
273
273
  });
274
274
  export var doc = createPMNodeSpecFactory({
275
- content: '(block | codeBlock | layoutSection | blockRootOnly | expand)+',
275
+ content: '(block | codeBlock | layoutSection | blockRootOnly | expand | syncBlock)+',
276
276
  marks: 'unsupportedMark unsupportedNodeAttribute alignment indentation dataConsumer fragment breakout'
277
277
  });
278
278
  export var embedCard = createPMNodeSpecFactory({
@@ -1090,6 +1090,17 @@ export var statusStage0 = createPMNodeSpecFactory({
1090
1090
  },
1091
1091
  selectable: true
1092
1092
  });
1093
+ export var syncBlockStage0 = createPMNodeSpecFactory({
1094
+ attrs: {
1095
+ resourceId: {
1096
+ default: ''
1097
+ },
1098
+ localId: {
1099
+ default: ''
1100
+ }
1101
+ },
1102
+ selectable: true
1103
+ });
1093
1104
  export var table = createPMNodeSpecFactory({
1094
1105
  content: 'tableRow+',
1095
1106
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -0,0 +1,19 @@
1
+ import { adfNode } from '@atlaskit/adf-schema-generator';
2
+ import { breakout } from '../marks/breakout';
3
+ import { unsupportedMark } from '../marks/unsupportedMark';
4
+ import { unsupportedNodeAttribute } from '../marks/unsupportedNodeAttribute';
5
+ export var syncBlock = adfNode('syncBlock').define({
6
+ stage0: true,
7
+ selectable: true,
8
+ marks: [breakout, unsupportedMark, unsupportedNodeAttribute],
9
+ attrs: {
10
+ resourceId: {
11
+ type: 'string',
12
+ default: ''
13
+ },
14
+ localId: {
15
+ type: 'string',
16
+ default: ''
17
+ }
18
+ }
19
+ });
@@ -2,7 +2,7 @@ import { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  import { COLOR, FONT_STYLE, SEARCH_QUERY, LINK } from './groups';
3
3
  import { sanitizeNodes } from './sanitizeNodes';
4
4
  import { link, em, strong, textColor, strike, subsup, underline, code, typeAheadQuery, confluenceInlineComment, breakout, alignment, indentation, annotation, unsupportedMark, unsupportedNodeAttribute, dataConsumer, fragment, border, backgroundColor } from './marks';
5
- import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote } from './nodes';
5
+ import { confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, doc, paragraph, text, bulletList, orderedListWithOrder, listItem, heading, codeBlock, extendedPanel, rule, image, mention, media, mediaInline, mediaSingleFull, mediaGroup, hardBreak, emoji, table, tableCell, tableHeader, tableRow, decisionList, decisionItem, taskList, taskItem, blockTaskItem, unknownBlock, extension, inlineExtension, bodiedExtension, multiBodiedExtension, extensionFrame, date, placeholder, layoutSection, layoutColumn, inlineCard, blockCard, unsupportedBlock, unsupportedInline, status, expandWithNestedExpand, nestedExpand, embedCard, caption, extendedBlockquote, syncBlock } from './nodes';
6
6
  function addItems(builtInItems, config) {
7
7
  var customSpecs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8
8
  if (!config) {
@@ -193,6 +193,9 @@ var nodesInOrder = [{
193
193
  }, {
194
194
  name: 'embedCard',
195
195
  spec: embedCard
196
+ }, {
197
+ name: 'syncBlock',
198
+ spec: syncBlock
196
199
  }, {
197
200
  name: 'unknownBlock',
198
201
  spec: unknownBlock
@@ -43,4 +43,5 @@ export { embedCard, embedCardWithLocalId } from './embed-card';
43
43
  export { extension } from './extension';
44
44
  export { inlineExtension } from './inline-extension';
45
45
  export { bodiedExtension } from './bodied-extension';
46
- export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
46
+ export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
47
+ export { syncBlock } from './sync-block';
@@ -0,0 +1,33 @@
1
+ import { syncBlockStage0 as syncBlockFactory } from '../../next-schema/generated/nodeTypes';
2
+
3
+ /**
4
+ * Represents a block node that is designed to be synchronized
5
+ * with an external resource across different products.
6
+ * @name syncBlock_node
7
+ */
8
+
9
+ export var syncBlock = syncBlockFactory({
10
+ parseDOM: [{
11
+ tag: 'div[data-sync-block]',
12
+ getAttrs: function getAttrs(domNode) {
13
+ var dom = domNode;
14
+ var attrs = {
15
+ localId: dom.getAttribute('data-local-id') || '',
16
+ resourceId: dom.getAttribute('data-resource-id') || ''
17
+ };
18
+ return attrs;
19
+ }
20
+ }],
21
+ toDOM: function toDOM(node) {
22
+ var _node$attrs = node.attrs,
23
+ localId = _node$attrs.localId,
24
+ resourceId = _node$attrs.resourceId;
25
+ var name = 'div';
26
+ var attrs = {
27
+ 'data-sync-block': '',
28
+ 'data-local-id': localId,
29
+ 'data-resource-id': resourceId
30
+ };
31
+ return [name, attrs];
32
+ }
33
+ });
@@ -484,7 +484,7 @@ export var doc = {
484
484
  },
485
485
  content: {
486
486
  type: 'array',
487
- items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only']],
487
+ items: [['blockCard', 'paragraph_with_no_marks', 'paragraph_with_alignment', 'paragraph_with_indentation', 'mediaSingle_caption', 'mediaSingle_full', 'codeBlock', 'taskList', 'bulletList', 'orderedList', 'heading_with_no_marks', 'heading_with_alignment', 'heading_with_indentation', 'mediaGroup', 'decisionList', 'rule', 'panel', 'blockquote', 'extension_with_marks', 'embedCard', 'table', 'expand', 'bodiedExtension_with_marks', 'codeBlock_root_only', 'layoutSection_with_single_column', 'layoutSection_full', 'multiBodiedExtension', 'expand_root_only', 'syncBlock']],
488
488
  allowUnsupportedBlock: true
489
489
  }
490
490
  }
@@ -1631,6 +1631,29 @@ export var subsup = {
1631
1631
  }
1632
1632
  }
1633
1633
  };
1634
+ export var syncBlock = {
1635
+ props: {
1636
+ type: {
1637
+ type: 'enum',
1638
+ values: ['syncBlock']
1639
+ },
1640
+ attrs: {
1641
+ props: {
1642
+ resourceId: {
1643
+ type: 'string'
1644
+ },
1645
+ localId: {
1646
+ type: 'string'
1647
+ }
1648
+ }
1649
+ },
1650
+ marks: {
1651
+ type: 'array',
1652
+ optional: true,
1653
+ items: ['breakout']
1654
+ }
1655
+ }
1656
+ };
1634
1657
  export var table = {
1635
1658
  props: {
1636
1659
  type: {
@@ -852,6 +852,9 @@
852
852
  },
853
853
  {
854
854
  "$ref": "#/definitions/expand_root_only_node"
855
+ },
856
+ {
857
+ "$ref": "#/definitions/syncBlock_node"
855
858
  }
856
859
  ]
857
860
  }
@@ -2691,6 +2694,35 @@
2691
2694
  "required": ["type", "attrs"],
2692
2695
  "additionalProperties": false
2693
2696
  },
2697
+ "syncBlock_node": {
2698
+ "type": "object",
2699
+ "properties": {
2700
+ "type": {
2701
+ "enum": ["syncBlock"]
2702
+ },
2703
+ "marks": {
2704
+ "type": "array",
2705
+ "items": {
2706
+ "$ref": "#/definitions/breakout_mark"
2707
+ }
2708
+ },
2709
+ "attrs": {
2710
+ "type": "object",
2711
+ "properties": {
2712
+ "resourceId": {
2713
+ "type": "string"
2714
+ },
2715
+ "localId": {
2716
+ "type": "string"
2717
+ }
2718
+ },
2719
+ "required": ["resourceId", "localId"],
2720
+ "additionalProperties": false
2721
+ }
2722
+ },
2723
+ "additionalProperties": false,
2724
+ "required": ["type", "attrs"]
2725
+ },
2694
2726
  "table_cell_content": {
2695
2727
  "type": "array",
2696
2728
  "items": {
@@ -1,7 +1,7 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, breakout, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, code, codeBlock, codeBlockWithLocalId, codeBlockToJSON, colorPalette,
2
2
  /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, blockTaskItem as blockTaskItemStage0, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './schema';
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, 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, BlockTaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, MultiBodiedExtensionDefinition, ExtensionFrameDefinition, BackgroundColorDefinition, } from './schema';
3
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, link, linkToJSON, listItem, listItemWithLocalId, listItemWithDecisionStage0, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './schema';
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, 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, SyncBlockDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, BlockTaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, MultiBodiedExtensionDefinition, ExtensionFrameDefinition, BackgroundColorDefinition, } from './schema';
5
5
  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';
6
6
  export type { Match, NameToEmoji } from './utils';
7
7
  export type { NodeSpecOptions, MarkSpecOptions } from './schema';
@@ -202,7 +202,7 @@ export type DecisionListNode = PMNode & DecisionListDefinition;
202
202
  export declare const decisionList: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<DecisionListNode>) => import("prosemirror-model").NodeSpec;
203
203
  export interface DocDefinition {
204
204
  type: 'doc';
205
- content: Array<BlockDefinition | BlockRootOnlyDefinition | CodeBlockRootOnlyDefinition | ExpandRootOnlyDefinition | LayoutSectionDefinition | LayoutSectionFullDefinition | LayoutSectionWithSingleColumnStage0Definition>;
205
+ content: Array<BlockDefinition | BlockRootOnlyDefinition | CodeBlockRootOnlyDefinition | ExpandRootOnlyDefinition | LayoutSectionDefinition | LayoutSectionFullDefinition | LayoutSectionWithSingleColumnStage0Definition | SyncBlockStage0Definition>;
206
206
  }
207
207
  export type DocNode = PMNode & DocDefinition;
208
208
  export declare const doc: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<DocNode>) => import("prosemirror-model").NodeSpec;
@@ -788,6 +788,16 @@ export interface StatusStage0Definition {
788
788
  }
789
789
  export type StatusStage0Node = PMNode & StatusStage0Definition;
790
790
  export declare const statusStage0: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<StatusStage0Node>) => import("prosemirror-model").NodeSpec;
791
+ export interface SyncBlockStage0Definition {
792
+ type: 'syncBlock';
793
+ marks: Array<BreakoutMark | UnsupportedMarkMark | UnsupportedNodeAttributeMark>;
794
+ attrs: {
795
+ resourceId: string;
796
+ localId: string;
797
+ };
798
+ }
799
+ export type SyncBlockStage0Node = PMNode & SyncBlockStage0Definition;
800
+ export declare const syncBlockStage0: ({ parseDOM, toDOM, toDebugString }: import("../../schema/createPMSpecFactory").NodeSpecOptions<SyncBlockStage0Node>) => import("prosemirror-model").NodeSpec;
791
801
  export interface TableDefinition {
792
802
  type: 'table';
793
803
  content: Array<TableRowDefinition>;
@@ -0,0 +1 @@
1
+ export declare const syncBlock: import("@atlaskit/adf-schema-generator/dist/types/adfNode").ADFNode<[string], import("@atlaskit/adf-schema-generator/dist/types/types/ADFNodeSpec").ADFCommonNodeSpec>;
@@ -1,5 +1,5 @@
1
1
  export { PanelType, blockCard, blockCardWithLocalId, blockquote, extendedBlockquote, extendedBlockquoteWithLocalId, bodiedExtension, bulletList, bulletListSelector, bulletListWithLocalId, caption, captionWithLocalId, codeBlock, codeBlockWithLocalId, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, dateWithLocalId, decisionItem, decisionList, decisionListSelector, doc, embedCard, embedCardWithLocalId, emoji, emojiWithLocalId, expandWithNestedExpand, expandWithNestedExpandLocalId, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, listItemWithLocalId, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, nestedExpandWithLocalId, orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId, extendedPanel, extendedPanelWithLocalId, paragraph, placeholder, placeholderWithLocalId, rule, ruleWithLocalId, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, blockTaskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './nodes';
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, 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, TableWithNestedTableDefinition, TableRowWithNestedTableDefinition, TableCellWithNestedTableDefinition, TableHeaderWithNestedTableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, BlockTaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
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, 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, TableWithNestedTableDefinition, TableRowWithNestedTableDefinition, TableCellWithNestedTableDefinition, TableHeaderWithNestedTableDefinition, TableDisplayMode, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, BlockTaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, SyncBlockDefinition, } 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. */
5
5
  colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, backgroundColor, backgroundColorPalette, backgroundColorPaletteNext, } from './marks';
@@ -4,6 +4,7 @@ import { LayoutSectionDefinition as LayoutSection } from './layout-section';
4
4
  import { ParagraphWithIndentationDefinition } from './paragraph';
5
5
  import { BlockContent } from './types/block-content';
6
6
  import { MultiBodiedExtensionDefinition as MultiBodiedExtension } from './multi-bodied-extension';
7
+ import { SyncBlockDefinition as SyncBlock } from './sync-block';
7
8
  /**
8
9
  * @name doc_node
9
10
  */
@@ -13,6 +14,6 @@ export interface DocNode {
13
14
  /**
14
15
  * @allowUnsupportedBlock true
15
16
  */
16
- content: Array<BlockContent | LayoutSection | CodeBlockWithMarks | ExpandRootOnly | ParagraphWithIndentationDefinition | MultiBodiedExtension>;
17
+ content: Array<BlockContent | LayoutSection | CodeBlockWithMarks | ExpandRootOnly | ParagraphWithIndentationDefinition | MultiBodiedExtension | SyncBlock>;
17
18
  }
18
19
  export declare const doc: import("prosemirror-model").NodeSpec;
@@ -92,3 +92,5 @@ export { bodiedExtension } from './bodied-extension';
92
92
  export type { BodiedExtensionDefinition } from './bodied-extension';
93
93
  export type { ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './multi-bodied-extension';
94
94
  export { extensionFrame, multiBodiedExtension } from './multi-bodied-extension';
95
+ export { syncBlock } from './sync-block';
96
+ export type { SyncBlockDefinition } from './sync-block';
@@ -0,0 +1,22 @@
1
+ import { BreakoutMarkDefinition } from '../marks';
2
+ export interface SyncBlockAttrs {
3
+ /**
4
+ * The ID of the resource to be synchronized.
5
+ */
6
+ resourceId: string;
7
+ /**
8
+ * An optional UUID for unique identification of the node
9
+ */
10
+ localId: string;
11
+ }
12
+ /**
13
+ * Represents a block node that is designed to be synchronized
14
+ * with an external resource across different products.
15
+ * @name syncBlock_node
16
+ */
17
+ export interface SyncBlockDefinition {
18
+ type: 'syncBlock';
19
+ marks?: Array<BreakoutMarkDefinition>;
20
+ attrs: SyncBlockAttrs;
21
+ }
22
+ export declare const syncBlock: import("prosemirror-model").NodeSpec;
@@ -1650,6 +1650,29 @@ export declare const subsup: {
1650
1650
  };
1651
1651
  };
1652
1652
  };
1653
+ export declare const syncBlock: {
1654
+ props: {
1655
+ type: {
1656
+ type: string;
1657
+ values: string[];
1658
+ };
1659
+ attrs: {
1660
+ props: {
1661
+ resourceId: {
1662
+ type: string;
1663
+ };
1664
+ localId: {
1665
+ type: string;
1666
+ };
1667
+ };
1668
+ };
1669
+ marks: {
1670
+ type: string;
1671
+ optional: boolean;
1672
+ items: string[];
1673
+ };
1674
+ };
1675
+ };
1653
1676
  export declare const table: {
1654
1677
  props: {
1655
1678
  type: {
@@ -852,6 +852,9 @@
852
852
  },
853
853
  {
854
854
  "$ref": "#/definitions/expand_root_only_node"
855
+ },
856
+ {
857
+ "$ref": "#/definitions/syncBlock_node"
855
858
  }
856
859
  ]
857
860
  }
@@ -2691,6 +2694,35 @@
2691
2694
  "required": ["type", "attrs"],
2692
2695
  "additionalProperties": false
2693
2696
  },
2697
+ "syncBlock_node": {
2698
+ "type": "object",
2699
+ "properties": {
2700
+ "type": {
2701
+ "enum": ["syncBlock"]
2702
+ },
2703
+ "marks": {
2704
+ "type": "array",
2705
+ "items": {
2706
+ "$ref": "#/definitions/breakout_mark"
2707
+ }
2708
+ },
2709
+ "attrs": {
2710
+ "type": "object",
2711
+ "properties": {
2712
+ "resourceId": {
2713
+ "type": "string"
2714
+ },
2715
+ "localId": {
2716
+ "type": "string"
2717
+ }
2718
+ },
2719
+ "required": ["resourceId", "localId"],
2720
+ "additionalProperties": false
2721
+ }
2722
+ },
2723
+ "additionalProperties": false,
2724
+ "required": ["type", "attrs"]
2725
+ },
2694
2726
  "table_cell_content": {
2695
2727
  "type": "array",
2696
2728
  "items": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "50.4.0",
3
+ "version": "51.1.0",
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/"