@atlaskit/adf-schema 50.1.0 → 50.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 (34) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +24 -6
  3. package/dist/cjs/schema/index.js +12 -6
  4. package/dist/cjs/schema/nodes/hard-break.js +1 -18
  5. package/dist/cjs/schema/nodes/index.js +12 -6
  6. package/dist/cjs/schema/nodes/inline-card.js +2 -1
  7. package/dist/cjs/schema/nodes/layout-section.js +24 -1
  8. package/dist/cjs/schema/nodes/media.js +7 -5
  9. package/dist/cjs/schema/nodes/task-item.js +4 -0
  10. package/dist/es2019/index.js +1 -1
  11. package/dist/es2019/schema/index.js +1 -1
  12. package/dist/es2019/schema/nodes/hard-break.js +0 -15
  13. package/dist/es2019/schema/nodes/index.js +3 -3
  14. package/dist/es2019/schema/nodes/inline-card.js +2 -1
  15. package/dist/es2019/schema/nodes/layout-section.js +25 -0
  16. package/dist/es2019/schema/nodes/media.js +7 -5
  17. package/dist/es2019/schema/nodes/task-item.js +4 -0
  18. package/dist/esm/index.js +1 -1
  19. package/dist/esm/schema/index.js +1 -1
  20. package/dist/esm/schema/nodes/hard-break.js +0 -17
  21. package/dist/esm/schema/nodes/index.js +3 -3
  22. package/dist/esm/schema/nodes/inline-card.js +2 -1
  23. package/dist/esm/schema/nodes/layout-section.js +23 -0
  24. package/dist/esm/schema/nodes/media.js +7 -5
  25. package/dist/esm/schema/nodes/task-item.js +4 -0
  26. package/dist/types/index.d.ts +2 -2
  27. package/dist/types/schema/index.d.ts +2 -2
  28. package/dist/types/schema/nodes/hard-break.d.ts +0 -2
  29. package/dist/types/schema/nodes/index.d.ts +4 -4
  30. package/dist/types/schema/nodes/layout-section.d.ts +1 -0
  31. package/dist/types/schema/nodes/media.d.ts +1 -0
  32. package/dist/types/schema/nodes/task-item.d.ts +16 -0
  33. package/dist/types/schema/nodes/task-list.d.ts +3 -3
  34. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 50.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4aa837d: EDITOR-1219 Remove localId from hardBreak. Fix exports for listItemWithLocalId and layoutSectionwithLocalId. Add localId to media nodes.
8
+
9
+ ## 50.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - f27ce6e: EDITOR-1105 Add typescript types for blockTaskItem
14
+
3
15
  ## 50.1.0
4
16
 
5
17
  ### Minor Changes
package/dist/cjs/index.js CHANGED
@@ -699,12 +699,6 @@ Object.defineProperty(exports, "hardBreak", {
699
699
  return _schema.hardBreak;
700
700
  }
701
701
  });
702
- Object.defineProperty(exports, "hardBreakWithLocalId", {
703
- enumerable: true,
704
- get: function get() {
705
- return _schema.hardBreakWithLocalId;
706
- }
707
- });
708
702
  Object.defineProperty(exports, "heading", {
709
703
  enumerable: true,
710
704
  get: function get() {
@@ -795,6 +789,24 @@ Object.defineProperty(exports, "layoutSection", {
795
789
  return _schema.layoutSection;
796
790
  }
797
791
  });
792
+ Object.defineProperty(exports, "layoutSectionWithLocalId", {
793
+ enumerable: true,
794
+ get: function get() {
795
+ return _schema.layoutSectionWithLocalId;
796
+ }
797
+ });
798
+ Object.defineProperty(exports, "layoutSectionWithSingleColumn", {
799
+ enumerable: true,
800
+ get: function get() {
801
+ return _schema.layoutSectionWithSingleColumn;
802
+ }
803
+ });
804
+ Object.defineProperty(exports, "layoutSectionWithSingleColumnLocalId", {
805
+ enumerable: true,
806
+ get: function get() {
807
+ return _schema.layoutSectionWithSingleColumnLocalId;
808
+ }
809
+ });
798
810
  Object.defineProperty(exports, "link", {
799
811
  enumerable: true,
800
812
  get: function get() {
@@ -831,6 +843,12 @@ Object.defineProperty(exports, "listItemWithDecisionStage0", {
831
843
  return _schema.listItemWithDecisionStage0;
832
844
  }
833
845
  });
846
+ Object.defineProperty(exports, "listItemWithLocalId", {
847
+ enumerable: true,
848
+ get: function get() {
849
+ return _schema.listItemWithLocalId;
850
+ }
851
+ });
834
852
  Object.defineProperty(exports, "media", {
835
853
  enumerable: true,
836
854
  get: function get() {
@@ -387,12 +387,6 @@ Object.defineProperty(exports, "hardBreak", {
387
387
  return _nodes.hardBreak;
388
388
  }
389
389
  });
390
- Object.defineProperty(exports, "hardBreakWithLocalId", {
391
- enumerable: true,
392
- get: function get() {
393
- return _nodes.hardBreakWithLocalId;
394
- }
395
- });
396
390
  Object.defineProperty(exports, "heading", {
397
391
  enumerable: true,
398
392
  get: function get() {
@@ -453,6 +447,12 @@ Object.defineProperty(exports, "layoutSection", {
453
447
  return _nodes.layoutSection;
454
448
  }
455
449
  });
450
+ Object.defineProperty(exports, "layoutSectionWithLocalId", {
451
+ enumerable: true,
452
+ get: function get() {
453
+ return _nodes.layoutSectionWithLocalId;
454
+ }
455
+ });
456
456
  Object.defineProperty(exports, "layoutSectionWithSingleColumn", {
457
457
  enumerable: true,
458
458
  get: function get() {
@@ -489,6 +489,12 @@ Object.defineProperty(exports, "listItemWithDecisionStage0", {
489
489
  return _nodes.listItemWithDecisionStage0;
490
490
  }
491
491
  });
492
+ Object.defineProperty(exports, "listItemWithLocalId", {
493
+ enumerable: true,
494
+ get: function get() {
495
+ return _nodes.listItemWithLocalId;
496
+ }
497
+ });
492
498
  Object.defineProperty(exports, "media", {
493
499
  enumerable: true,
494
500
  get: function get() {
@@ -3,8 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.hardBreakWithLocalId = exports.hardBreak = void 0;
7
- var _uuid = require("../../utils/uuid");
6
+ exports.hardBreak = void 0;
8
7
  var _nodeTypes = require("../../next-schema/generated/nodeTypes");
9
8
  /**
10
9
  * @name hardBreak_node
@@ -17,20 +16,4 @@ var hardBreak = exports.hardBreak = (0, _nodeTypes.hardBreak)({
17
16
  toDOM: function toDOM() {
18
17
  return ['br'];
19
18
  }
20
- });
21
- var hardBreakWithLocalId = exports.hardBreakWithLocalId = (0, _nodeTypes.hardBreak)({
22
- parseDOM: [{
23
- tag: 'br',
24
- getAttrs: function getAttrs() {
25
- return {
26
- localId: _uuid.uuid.generate()
27
- };
28
- }
29
- }],
30
- toDOM: function toDOM(node) {
31
- var _node$attrs;
32
- return ['br', {
33
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
34
- }];
35
- }
36
19
  });
@@ -244,12 +244,6 @@ Object.defineProperty(exports, "hardBreak", {
244
244
  return _hardBreak.hardBreak;
245
245
  }
246
246
  });
247
- Object.defineProperty(exports, "hardBreakWithLocalId", {
248
- enumerable: true,
249
- get: function get() {
250
- return _hardBreak.hardBreakWithLocalId;
251
- }
252
- });
253
247
  Object.defineProperty(exports, "heading", {
254
248
  enumerable: true,
255
249
  get: function get() {
@@ -298,6 +292,12 @@ Object.defineProperty(exports, "layoutSection", {
298
292
  return _layoutSection.layoutSection;
299
293
  }
300
294
  });
295
+ Object.defineProperty(exports, "layoutSectionWithLocalId", {
296
+ enumerable: true,
297
+ get: function get() {
298
+ return _layoutSection.layoutSectionWithLocalId;
299
+ }
300
+ });
301
301
  Object.defineProperty(exports, "layoutSectionWithSingleColumn", {
302
302
  enumerable: true,
303
303
  get: function get() {
@@ -322,6 +322,12 @@ Object.defineProperty(exports, "listItemWithDecisionStage0", {
322
322
  return _listItem.listItemWithDecisionStage0;
323
323
  }
324
324
  });
325
+ Object.defineProperty(exports, "listItemWithLocalId", {
326
+ enumerable: true,
327
+ get: function get() {
328
+ return _listItem.listItemWithLocalId;
329
+ }
330
+ });
325
331
  Object.defineProperty(exports, "media", {
326
332
  enumerable: true,
327
333
  get: function get() {
@@ -63,7 +63,8 @@ var inlineCardWithLocalId = exports.inlineCardWithLocalId = (0, _nodeTypes.inlin
63
63
  /* Support attrs from Editor and Renderer */
64
64
  return {
65
65
  url: anchor.getAttribute('href') || anchor.getAttribute('data-card-url') || null,
66
- data: data ? JSON.parse(data) : null
66
+ data: data ? JSON.parse(data) : null,
67
+ localId: _uuid.uuid.generate()
67
68
  };
68
69
  }
69
70
  },
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.layoutSectionWithSingleColumnLocalId = exports.layoutSectionWithSingleColumn = exports.layoutSectionFull = exports.layoutSection = void 0;
6
+ exports.layoutSectionWithSingleColumnLocalId = exports.layoutSectionWithSingleColumn = exports.layoutSectionWithLocalId = exports.layoutSectionFull = exports.layoutSection = void 0;
7
7
  var _nodeTypes = require("../../next-schema/generated/nodeTypes");
8
8
  var _uuid = require("../../utils/uuid");
9
9
  /**
@@ -78,6 +78,29 @@ var layoutSectionWithSingleColumn = exports.layoutSectionWithSingleColumn = (0,
78
78
  return ['div', attrs, 0];
79
79
  }
80
80
  });
81
+ var layoutSectionWithLocalId = exports.layoutSectionWithLocalId = (0, _nodeTypes.layoutSectionFull)({
82
+ parseDOM: [{
83
+ context: 'layoutSection//|layoutColumn//',
84
+ tag: 'div[data-layout-section]',
85
+ skip: true
86
+ }, {
87
+ tag: 'div[data-layout-section]',
88
+ getAttrs: function getAttrs() {
89
+ var localId = _uuid.uuid.generate();
90
+ return {
91
+ localId: localId
92
+ };
93
+ }
94
+ }],
95
+ toDOM: function toDOM(node) {
96
+ var localId = node.attrs.localId;
97
+ var attrs = {
98
+ 'data-layout-section': 'true',
99
+ 'data-local-id': localId
100
+ };
101
+ return ['div', attrs, 0];
102
+ }
103
+ });
81
104
  var layoutSectionWithSingleColumnLocalId = exports.layoutSectionWithSingleColumnLocalId = (0, _nodeTypes.layoutSectionWithSingleColumnStage0)({
82
105
  parseDOM: [{
83
106
  context: 'layoutSection//|layoutColumn//',
@@ -47,6 +47,9 @@ var createMediaSpec = exports.createMediaSpec = function createMediaSpec(attribu
47
47
  if (typeof height !== 'undefined' && !isNaN(height)) {
48
48
  attrs.height = height;
49
49
  }
50
+ if (generateLocalId) {
51
+ attrs.localId = _uuid.uuid.generate();
52
+ }
50
53
  return attrs;
51
54
  }
52
55
  },
@@ -56,7 +59,6 @@ var createMediaSpec = exports.createMediaSpec = function createMediaSpec(attribu
56
59
  ignore: true
57
60
  }];
58
61
  var toDOM = function toDOM(node) {
59
- var _node$attrs;
60
62
  var attrs = {
61
63
  'data-id': node.attrs.id,
62
64
  'data-node-type': "".concat(nodeName),
@@ -67,14 +69,14 @@ var createMediaSpec = exports.createMediaSpec = function createMediaSpec(attribu
67
69
  'data-height': node.attrs.height,
68
70
  'data-url': node.attrs.url,
69
71
  'data-alt': node.attrs.alt,
72
+ 'data-local-id': node.attrs.localId || undefined,
70
73
  // toDOM is used for static rendering as well as editor rendering. This comes into play for
71
74
  // emails, copy/paste, etc, so the title and styling here *is* useful (despite a React-based
72
75
  // node view being used for editing).
73
76
  title: 'Attachment',
74
77
  // Manually kept in sync with the style of media cards. The goal is to render a plain gray
75
78
  // rectangle that provides an affordance for media.
76
- style: "display: inline-block; border-radius: 3px; background: ".concat(_colors.N30, "; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);"),
77
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
79
+ style: "display: inline-block; border-radius: 3px; background: ".concat(_colors.N30, "; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);")
78
80
  };
79
81
  copyPrivateAttributes(node.attrs, attrs, function (key) {
80
82
  return "data-".concat(camelCaseToKebabCase(key.slice(2)));
@@ -133,8 +135,8 @@ var copyPrivateAttributes = exports.copyPrivateAttributes = function copyPrivate
133
135
  * There's no concept of optional property in ProseMirror. It sets value as `null`
134
136
  * when there's no use of any property. We are filtering out all private & optional attrs here.
135
137
  */
136
- var optionalAttributes = ['occurrenceKey', 'width', 'height', 'url', 'alt'];
137
- var externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt'];
138
+ var optionalAttributes = ['occurrenceKey', 'width', 'height', 'url', 'alt', 'localId'];
139
+ var externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt', 'localId'];
138
140
  var toJSON = exports.toJSON = function toJSON(node) {
139
141
  return {
140
142
  attrs: Object.keys(node.attrs)
@@ -10,6 +10,10 @@ var _nodeTypes = require("../../next-schema/generated/nodeTypes");
10
10
  * @name taskItem_node
11
11
  */
12
12
 
13
+ /**
14
+ * @name blockTaskItem_node
15
+ */
16
+
13
17
  var taskItem = exports.taskItem = (0, _nodeTypes.taskItem)({
14
18
  parseDOM: [{
15
19
  tag: 'div[data-task-local-id]',
@@ -1,5 +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, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, 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, 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 } 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, 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 } 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
@@ -1,4 +1,4 @@
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, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, 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, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './nodes';
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, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } 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, backgroundColorPaletteNext } from './marks';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -1,4 +1,3 @@
1
- import { uuid } from '../../utils/uuid';
2
1
  import { hardBreak as hardBreakFactory } from '../../next-schema/generated/nodeTypes';
3
2
 
4
3
  /**
@@ -12,18 +11,4 @@ export const hardBreak = hardBreakFactory({
12
11
  toDOM() {
13
12
  return ['br'];
14
13
  }
15
- });
16
- export const hardBreakWithLocalId = hardBreakFactory({
17
- parseDOM: [{
18
- tag: 'br',
19
- getAttrs: () => ({
20
- localId: uuid.generate()
21
- })
22
- }],
23
- toDOM(node) {
24
- var _node$attrs;
25
- return ['br', {
26
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
27
- }];
28
- }
29
14
  });
@@ -6,7 +6,7 @@ export { doc } from './doc';
6
6
  export { blockquote, extendedBlockquote, extendedBlockquoteWithLocalId } from './blockquote';
7
7
  export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-list';
8
8
  export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
9
- export { hardBreak, hardBreakWithLocalId } from './hard-break';
9
+ export { hardBreak } from './hard-break';
10
10
  export { heading } from './heading';
11
11
  export { rule, ruleWithLocalId } from './rule';
12
12
  export { orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId } from './ordered-list';
@@ -14,7 +14,7 @@ export { paragraph } from './paragraph';
14
14
  export { emoji, emojiWithLocalId } from './emoji';
15
15
  export { image } from './image';
16
16
  export { mention, toJSON as mentionToJSON } from './mention';
17
- export { listItem, listItemWithDecisionStage0 } from './list-item';
17
+ export { listItem, listItemWithDecisionStage0, listItemWithLocalId } from './list-item';
18
18
  export { extendedPanel, extendedPanelWithLocalId, PanelType } from './panel';
19
19
  export { text } from './text';
20
20
  export { default as unknownBlock } from './unknown-block';
@@ -30,7 +30,7 @@ export { taskList, taskListSelector } from './task-list';
30
30
  export { taskItem, blockTaskItemStage0 } from './task-item';
31
31
  export { date, dateWithLocalId } from './date';
32
32
  export { placeholder, placeholderWithLocalId } from './placeholder';
33
- export { layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId } from './layout-section';
33
+ export { layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId } from './layout-section';
34
34
  export { layoutColumn, layoutColumnWithLocalId } from './layout-column';
35
35
  export { inlineCard, inlineCardWithLocalId } from './inline-card';
36
36
  export { blockCard, blockCardWithLocalId } from './block-card';
@@ -58,7 +58,8 @@ export const inlineCardWithLocalId = inlineCardFactory({
58
58
  /* Support attrs from Editor and Renderer */
59
59
  return {
60
60
  url: anchor.getAttribute('href') || anchor.getAttribute('data-card-url') || null,
61
- data: data ? JSON.parse(data) : null
61
+ data: data ? JSON.parse(data) : null,
62
+ localId: uuid.generate()
62
63
  };
63
64
  }
64
65
  },
@@ -76,6 +76,31 @@ export const layoutSectionWithSingleColumn = layoutSectionWithSingleColumnStage0
76
76
  return ['div', attrs, 0];
77
77
  }
78
78
  });
79
+ export const layoutSectionWithLocalId = layoutSectionFullFactory({
80
+ parseDOM: [{
81
+ context: 'layoutSection//|layoutColumn//',
82
+ tag: 'div[data-layout-section]',
83
+ skip: true
84
+ }, {
85
+ tag: 'div[data-layout-section]',
86
+ getAttrs: () => {
87
+ const localId = uuid.generate();
88
+ return {
89
+ localId
90
+ };
91
+ }
92
+ }],
93
+ toDOM(node) {
94
+ const {
95
+ localId
96
+ } = node.attrs;
97
+ const attrs = {
98
+ 'data-layout-section': 'true',
99
+ 'data-local-id': localId
100
+ };
101
+ return ['div', attrs, 0];
102
+ }
103
+ });
79
104
  export const layoutSectionWithSingleColumnLocalId = layoutSectionWithSingleColumnStage0Factory({
80
105
  parseDOM: [{
81
106
  context: 'layoutSection//|layoutColumn//',
@@ -37,6 +37,9 @@ export const createMediaSpec = (attributes, inline = false, generateLocalId = fa
37
37
  if (typeof height !== 'undefined' && !isNaN(height)) {
38
38
  attrs.height = height;
39
39
  }
40
+ if (generateLocalId) {
41
+ attrs.localId = uuid.generate();
42
+ }
40
43
  return attrs;
41
44
  }
42
45
  },
@@ -46,7 +49,6 @@ export const createMediaSpec = (attributes, inline = false, generateLocalId = fa
46
49
  ignore: true
47
50
  }];
48
51
  const toDOM = node => {
49
- var _node$attrs;
50
52
  const attrs = {
51
53
  'data-id': node.attrs.id,
52
54
  'data-node-type': `${nodeName}`,
@@ -57,14 +59,14 @@ export const createMediaSpec = (attributes, inline = false, generateLocalId = fa
57
59
  'data-height': node.attrs.height,
58
60
  'data-url': node.attrs.url,
59
61
  'data-alt': node.attrs.alt,
62
+ 'data-local-id': node.attrs.localId || undefined,
60
63
  // toDOM is used for static rendering as well as editor rendering. This comes into play for
61
64
  // emails, copy/paste, etc, so the title and styling here *is* useful (despite a React-based
62
65
  // node view being used for editing).
63
66
  title: 'Attachment',
64
67
  // Manually kept in sync with the style of media cards. The goal is to render a plain gray
65
68
  // rectangle that provides an affordance for media.
66
- style: `display: inline-block; border-radius: 3px; background: ${N30}; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);`,
67
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
69
+ style: `display: inline-block; border-radius: 3px; background: ${N30}; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);`
68
70
  };
69
71
  copyPrivateAttributes(node.attrs, attrs, key => `data-${camelCaseToKebabCase(key.slice(2))}`);
70
72
  return [`${domNodeType}`, attrs];
@@ -118,8 +120,8 @@ export const copyPrivateAttributes = (from, to, map) => {
118
120
  * There's no concept of optional property in ProseMirror. It sets value as `null`
119
121
  * when there's no use of any property. We are filtering out all private & optional attrs here.
120
122
  */
121
- const optionalAttributes = ['occurrenceKey', 'width', 'height', 'url', 'alt'];
122
- const externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt'];
123
+ const optionalAttributes = ['occurrenceKey', 'width', 'height', 'url', 'alt', 'localId'];
124
+ const externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt', 'localId'];
123
125
  export const toJSON = node => ({
124
126
  attrs: Object.keys(node.attrs)
125
127
  // Strip private attributes e.g. __fileName, __fileSize, __fileMimeType, etc.
@@ -5,6 +5,10 @@ import { taskItem as taskItemFactory, blockTaskItemStage0 as blockTaskItemFactor
5
5
  * @name taskItem_node
6
6
  */
7
7
 
8
+ /**
9
+ * @name blockTaskItem_node
10
+ */
11
+
8
12
  export const taskItem = taskItemFactory({
9
13
  parseDOM: [{
10
14
  tag: 'div[data-task-local-id]',
package/dist/esm/index.js CHANGED
@@ -1,5 +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, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, 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, 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 } 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, 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 } 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
@@ -1,4 +1,4 @@
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, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, 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, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } from './nodes';
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, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId } 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, backgroundColorPaletteNext } from './marks';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -1,4 +1,3 @@
1
- import { uuid } from '../../utils/uuid';
2
1
  import { hardBreak as hardBreakFactory } from '../../next-schema/generated/nodeTypes';
3
2
 
4
3
  /**
@@ -12,20 +11,4 @@ export var hardBreak = hardBreakFactory({
12
11
  toDOM: function toDOM() {
13
12
  return ['br'];
14
13
  }
15
- });
16
- export var hardBreakWithLocalId = hardBreakFactory({
17
- parseDOM: [{
18
- tag: 'br',
19
- getAttrs: function getAttrs() {
20
- return {
21
- localId: uuid.generate()
22
- };
23
- }
24
- }],
25
- toDOM: function toDOM(node) {
26
- var _node$attrs;
27
- return ['br', {
28
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
29
- }];
30
- }
31
14
  });
@@ -6,7 +6,7 @@ export { doc } from './doc';
6
6
  export { blockquote, extendedBlockquote, extendedBlockquoteWithLocalId } from './blockquote';
7
7
  export { bulletList, bulletListSelector, bulletListWithLocalId } from './bullet-list';
8
8
  export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON } from './code-block';
9
- export { hardBreak, hardBreakWithLocalId } from './hard-break';
9
+ export { hardBreak } from './hard-break';
10
10
  export { heading } from './heading';
11
11
  export { rule, ruleWithLocalId } from './rule';
12
12
  export { orderedList, orderedListSelector, orderedListWithLocalId, orderedListWithOrder, orderedListWithOrderAndLocalId } from './ordered-list';
@@ -14,7 +14,7 @@ export { paragraph } from './paragraph';
14
14
  export { emoji, emojiWithLocalId } from './emoji';
15
15
  export { image } from './image';
16
16
  export { mention, toJSON as mentionToJSON } from './mention';
17
- export { listItem, listItemWithDecisionStage0 } from './list-item';
17
+ export { listItem, listItemWithDecisionStage0, listItemWithLocalId } from './list-item';
18
18
  export { extendedPanel, extendedPanelWithLocalId, PanelType } from './panel';
19
19
  export { text } from './text';
20
20
  export { default as unknownBlock } from './unknown-block';
@@ -30,7 +30,7 @@ export { taskList, taskListSelector } from './task-list';
30
30
  export { taskItem, blockTaskItemStage0 } from './task-item';
31
31
  export { date, dateWithLocalId } from './date';
32
32
  export { placeholder, placeholderWithLocalId } from './placeholder';
33
- export { layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId } from './layout-section';
33
+ export { layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId } from './layout-section';
34
34
  export { layoutColumn, layoutColumnWithLocalId } from './layout-column';
35
35
  export { inlineCard, inlineCardWithLocalId } from './inline-card';
36
36
  export { blockCard, blockCardWithLocalId } from './block-card';
@@ -58,7 +58,8 @@ export var inlineCardWithLocalId = inlineCardFactory({
58
58
  /* Support attrs from Editor and Renderer */
59
59
  return {
60
60
  url: anchor.getAttribute('href') || anchor.getAttribute('data-card-url') || null,
61
- data: data ? JSON.parse(data) : null
61
+ data: data ? JSON.parse(data) : null,
62
+ localId: uuid.generate()
62
63
  };
63
64
  }
64
65
  },
@@ -74,6 +74,29 @@ export var layoutSectionWithSingleColumn = layoutSectionWithSingleColumnStage0Fa
74
74
  return ['div', attrs, 0];
75
75
  }
76
76
  });
77
+ export var layoutSectionWithLocalId = layoutSectionFullFactory({
78
+ parseDOM: [{
79
+ context: 'layoutSection//|layoutColumn//',
80
+ tag: 'div[data-layout-section]',
81
+ skip: true
82
+ }, {
83
+ tag: 'div[data-layout-section]',
84
+ getAttrs: function getAttrs() {
85
+ var localId = uuid.generate();
86
+ return {
87
+ localId: localId
88
+ };
89
+ }
90
+ }],
91
+ toDOM: function toDOM(node) {
92
+ var localId = node.attrs.localId;
93
+ var attrs = {
94
+ 'data-layout-section': 'true',
95
+ 'data-local-id': localId
96
+ };
97
+ return ['div', attrs, 0];
98
+ }
99
+ });
77
100
  export var layoutSectionWithSingleColumnLocalId = layoutSectionWithSingleColumnStage0Factory({
78
101
  parseDOM: [{
79
102
  context: 'layoutSection//|layoutColumn//',
@@ -42,6 +42,9 @@ export var createMediaSpec = function createMediaSpec(attributes) {
42
42
  if (typeof height !== 'undefined' && !isNaN(height)) {
43
43
  attrs.height = height;
44
44
  }
45
+ if (generateLocalId) {
46
+ attrs.localId = uuid.generate();
47
+ }
45
48
  return attrs;
46
49
  }
47
50
  },
@@ -51,7 +54,6 @@ export var createMediaSpec = function createMediaSpec(attributes) {
51
54
  ignore: true
52
55
  }];
53
56
  var toDOM = function toDOM(node) {
54
- var _node$attrs;
55
57
  var attrs = {
56
58
  'data-id': node.attrs.id,
57
59
  'data-node-type': "".concat(nodeName),
@@ -62,14 +64,14 @@ export var createMediaSpec = function createMediaSpec(attributes) {
62
64
  'data-height': node.attrs.height,
63
65
  'data-url': node.attrs.url,
64
66
  'data-alt': node.attrs.alt,
67
+ 'data-local-id': node.attrs.localId || undefined,
65
68
  // toDOM is used for static rendering as well as editor rendering. This comes into play for
66
69
  // emails, copy/paste, etc, so the title and styling here *is* useful (despite a React-based
67
70
  // node view being used for editing).
68
71
  title: 'Attachment',
69
72
  // Manually kept in sync with the style of media cards. The goal is to render a plain gray
70
73
  // rectangle that provides an affordance for media.
71
- style: "display: inline-block; border-radius: 3px; background: ".concat(N30, "; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);"),
72
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.localId) || undefined
74
+ style: "display: inline-block; border-radius: 3px; background: ".concat(N30, "; box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);")
73
75
  };
74
76
  copyPrivateAttributes(node.attrs, attrs, function (key) {
75
77
  return "data-".concat(camelCaseToKebabCase(key.slice(2)));
@@ -128,8 +130,8 @@ export var copyPrivateAttributes = function copyPrivateAttributes(from, to, map)
128
130
  * There's no concept of optional property in ProseMirror. It sets value as `null`
129
131
  * when there's no use of any property. We are filtering out all private & optional attrs here.
130
132
  */
131
- var optionalAttributes = ['occurrenceKey', 'width', 'height', 'url', 'alt'];
132
- var externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt'];
133
+ var optionalAttributes = ['occurrenceKey', 'width', 'height', 'url', 'alt', 'localId'];
134
+ var externalOnlyAttributes = ['type', 'url', 'width', 'height', 'alt', 'localId'];
133
135
  export var toJSON = function toJSON(node) {
134
136
  return {
135
137
  attrs: Object.keys(node.attrs)
@@ -5,6 +5,10 @@ import { taskItem as taskItemFactory, blockTaskItemStage0 as blockTaskItemFactor
5
5
  * @name taskItem_node
6
6
  */
7
7
 
8
+ /**
9
+ * @name blockTaskItem_node
10
+ */
11
+
8
12
  export var taskItem = taskItemFactory({
9
13
  parseDOM: [{
10
14
  tag: 'div[data-task-local-id]',
@@ -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, hardBreakWithLocalId, heading, image, indentation, inlineCard, inlineCardWithLocalId, inlineExtension, inlineNodes, layoutColumn, layoutColumnWithLocalId, layoutSection, link, linkToJSON, listItem, 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, 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, } 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, 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, 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, } 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';
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';
@@ -1,5 +1,5 @@
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, hardBreakWithLocalId, heading, image, inlineCard, inlineCardWithLocalId, inlineExtension, layoutColumn, layoutColumnWithLocalId, layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, listItem, listItemWithDecisionStage0, 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, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, } 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, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, ExtendedMediaAttributes, RichMediaLayout, CellDomAttrs, ExtensionFrameDefinition, MultiBodiedExtensionDefinition, } from './nodes';
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, blockTaskItemStage0, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, } 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';
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';
@@ -5,8 +5,6 @@ export interface HardBreakDefinition {
5
5
  type: 'hardBreak';
6
6
  attrs?: {
7
7
  text?: '\n';
8
- localId?: string;
9
8
  };
10
9
  }
11
10
  export declare const hardBreak: import("prosemirror-model").NodeSpec;
12
- export declare const hardBreakWithLocalId: import("prosemirror-model").NodeSpec;
@@ -11,7 +11,7 @@ export { bulletList, bulletListSelector, bulletListWithLocalId, } from './bullet
11
11
  export type { BulletListDefinition } from './types/list';
12
12
  export { codeBlock, codeBlockWithLocalId, toJSON as codeBlockToJSON, } from './code-block';
13
13
  export type { CodeBlockDefinition, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockWithMarksDefinition, } from './code-block';
14
- export { hardBreak, hardBreakWithLocalId } from './hard-break';
14
+ export { hardBreak } from './hard-break';
15
15
  export type { HardBreakDefinition } from './hard-break';
16
16
  export { heading } from './heading';
17
17
  export type { HeadingDefinition, HeadingBaseDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, } from './heading';
@@ -26,7 +26,7 @@ export type { EmojiAttributes, EmojiDefinition } from './emoji';
26
26
  export { image } from './image';
27
27
  export { mention, toJSON as mentionToJSON } from './mention';
28
28
  export type { MentionAttributes, UserType as MentionUserType, MentionDefinition, } from './mention';
29
- export { listItem, listItemWithDecisionStage0 } from './list-item';
29
+ export { listItem, listItemWithDecisionStage0, listItemWithLocalId, } from './list-item';
30
30
  export type { ListItemArray, ListItemDefinition } from './types/list';
31
31
  export { extendedPanel, extendedPanelWithLocalId, PanelType } from './panel';
32
32
  export type { PanelAttributes, PanelDefinition } from './panel';
@@ -52,12 +52,12 @@ export type { DecisionItemDefinition } from './decision-item';
52
52
  export { taskList, taskListSelector } from './task-list';
53
53
  export type { TaskListDefinition, TaskListContent } from './task-list';
54
54
  export { taskItem, blockTaskItemStage0 } from './task-item';
55
- export type { TaskItemDefinition } from './task-item';
55
+ export type { TaskItemDefinition, BlockTaskItemDefinition } from './task-item';
56
56
  export { date, dateWithLocalId } from './date';
57
57
  export type { DateDefinition } from './date';
58
58
  export { placeholder, placeholderWithLocalId } from './placeholder';
59
59
  export type { PlaceholderDefinition } from './placeholder';
60
- export { layoutSection, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, } from './layout-section';
60
+ export { layoutSection, layoutSectionWithLocalId, layoutSectionWithSingleColumn, layoutSectionWithSingleColumnLocalId, } from './layout-section';
61
61
  export type { LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, } from './layout-section';
62
62
  export { layoutColumn, layoutColumnWithLocalId } from './layout-column';
63
63
  export type { LayoutColumnDefinition } from './layout-column';
@@ -45,4 +45,5 @@ export type LayoutSectionDefinition = LayoutSectionFullDefinition | LayoutSectio
45
45
  export declare const layoutSection: import("prosemirror-model").NodeSpec;
46
46
  export declare const layoutSectionFull: import("prosemirror-model").NodeSpec;
47
47
  export declare const layoutSectionWithSingleColumn: import("prosemirror-model").NodeSpec;
48
+ export declare const layoutSectionWithLocalId: import("prosemirror-model").NodeSpec;
48
49
  export declare const layoutSectionWithSingleColumnLocalId: import("prosemirror-model").NodeSpec;
@@ -52,6 +52,7 @@ export interface ExternalMediaAttributes {
52
52
  width?: number;
53
53
  height?: number;
54
54
  __external?: boolean;
55
+ localId?: string;
55
56
  }
56
57
  export type MediaADFAttrs = MediaAttributes | ExternalMediaAttributes;
57
58
  export declare const defaultAttrs: {
@@ -1,4 +1,6 @@
1
1
  import { Inline } from './types/inline-content';
2
+ import { ParagraphDefinition as Paragraph } from './paragraph';
3
+ import { ExtensionDefinition as Extension } from './extension';
2
4
  /**
3
5
  * @name taskItem_node
4
6
  */
@@ -13,5 +15,19 @@ export interface TaskItemDefinition {
13
15
  state: 'TODO' | 'DONE';
14
16
  };
15
17
  }
18
+ /**
19
+ * @name blockTaskItem_node
20
+ */
21
+ export interface BlockTaskItemDefinition {
22
+ type: 'blockTaskItem';
23
+ /**
24
+ * @allowUnsupportedInline true
25
+ */
26
+ content?: Array<Paragraph | Extension>;
27
+ attrs: {
28
+ localId: string;
29
+ state: 'TODO' | 'DONE';
30
+ };
31
+ }
16
32
  export declare const taskItem: import("prosemirror-model").NodeSpec;
17
33
  export declare const blockTaskItemStage0: import("prosemirror-model").NodeSpec;
@@ -1,6 +1,6 @@
1
- import { TaskItemDefinition as TaskItemNode } from './task-item';
2
- export interface TaskListContent extends Array<TaskItemNode | TaskListDefinition> {
3
- 0: TaskItemNode;
1
+ import { TaskItemDefinition as TaskItemNode, BlockTaskItemDefinition as BlockTaskItem } from './task-item';
2
+ export interface TaskListContent extends Array<TaskItemNode | TaskListDefinition | BlockTaskItem> {
3
+ 0: TaskItemNode | BlockTaskItem;
4
4
  }
5
5
  /**
6
6
  * @name taskList_node
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "50.1.0",
3
+ "version": "50.2.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/"