@atlaskit/adf-schema 50.1.1 → 50.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +42 -6
  3. package/dist/cjs/schema/index.js +30 -6
  4. package/dist/cjs/schema/inline-nodes.js +1 -2
  5. package/dist/cjs/schema/nodes/hard-break.js +1 -18
  6. package/dist/cjs/schema/nodes/index.js +30 -6
  7. package/dist/cjs/schema/nodes/inline-card.js +2 -1
  8. package/dist/cjs/schema/nodes/layout-section.js +24 -1
  9. package/dist/cjs/schema/nodes/media.js +7 -5
  10. package/dist/cjs/schema/nodes/tableNodes.js +8 -7
  11. package/dist/cjs/utils/colors.js +1 -2
  12. package/dist/es2019/index.js +1 -1
  13. package/dist/es2019/schema/index.js +1 -1
  14. package/dist/es2019/schema/nodes/hard-break.js +0 -15
  15. package/dist/es2019/schema/nodes/index.js +4 -4
  16. package/dist/es2019/schema/nodes/inline-card.js +2 -1
  17. package/dist/es2019/schema/nodes/layout-section.js +25 -0
  18. package/dist/es2019/schema/nodes/media.js +7 -5
  19. package/dist/es2019/schema/nodes/tableNodes.js +7 -6
  20. package/dist/esm/index.js +1 -1
  21. package/dist/esm/schema/index.js +1 -1
  22. package/dist/esm/schema/nodes/hard-break.js +0 -17
  23. package/dist/esm/schema/nodes/index.js +4 -4
  24. package/dist/esm/schema/nodes/inline-card.js +2 -1
  25. package/dist/esm/schema/nodes/layout-section.js +23 -0
  26. package/dist/esm/schema/nodes/media.js +7 -5
  27. package/dist/esm/schema/nodes/tableNodes.js +7 -6
  28. package/dist/types/index.d.ts +1 -1
  29. package/dist/types/schema/index.d.ts +1 -1
  30. package/dist/types/schema/nodes/hard-break.d.ts +0 -2
  31. package/dist/types/schema/nodes/index.d.ts +4 -4
  32. package/dist/types/schema/nodes/layout-section.d.ts +1 -0
  33. package/dist/types/schema/nodes/media.d.ts +1 -0
  34. package/dist/types/schema/nodes/tableNodes.d.ts +3 -0
  35. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/adf-schema
2
2
 
3
+ ## 50.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b6e815d: EDITOR-1373 Fix tableCellWithLocalId toDOM and export nested table cell nodes with localId.
8
+
9
+ ## 50.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 4aa837d: EDITOR-1219 Remove localId from hardBreak. Fix exports for listItemWithLocalId and layoutSectionwithLocalId. Add localId to media nodes.
14
+
3
15
  ## 50.1.1
4
16
 
5
17
  ### Patch 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() {
@@ -1095,6 +1113,12 @@ Object.defineProperty(exports, "tableCellWithNestedTable", {
1095
1113
  return _schema.tableCellWithNestedTable;
1096
1114
  }
1097
1115
  });
1116
+ Object.defineProperty(exports, "tableCellWithNestedTableWithLocalId", {
1117
+ enumerable: true,
1118
+ get: function get() {
1119
+ return _schema.tableCellWithNestedTableWithLocalId;
1120
+ }
1121
+ });
1098
1122
  Object.defineProperty(exports, "tableHeader", {
1099
1123
  enumerable: true,
1100
1124
  get: function get() {
@@ -1119,6 +1143,12 @@ Object.defineProperty(exports, "tableHeaderWithNestedTable", {
1119
1143
  return _schema.tableHeaderWithNestedTable;
1120
1144
  }
1121
1145
  });
1146
+ Object.defineProperty(exports, "tableHeaderWithNestedTableWithLocalId", {
1147
+ enumerable: true,
1148
+ get: function get() {
1149
+ return _schema.tableHeaderWithNestedTableWithLocalId;
1150
+ }
1151
+ });
1122
1152
  Object.defineProperty(exports, "tablePrefixSelector", {
1123
1153
  enumerable: true,
1124
1154
  get: function get() {
@@ -1143,6 +1173,12 @@ Object.defineProperty(exports, "tableRowWithNestedTable", {
1143
1173
  return _schema.tableRowWithNestedTable;
1144
1174
  }
1145
1175
  });
1176
+ Object.defineProperty(exports, "tableRowWithNestedTableWithLocalId", {
1177
+ enumerable: true,
1178
+ get: function get() {
1179
+ return _schema.tableRowWithNestedTableWithLocalId;
1180
+ }
1181
+ });
1146
1182
  Object.defineProperty(exports, "tableStage0", {
1147
1183
  enumerable: true,
1148
1184
  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() {
@@ -735,6 +741,12 @@ Object.defineProperty(exports, "tableCellWithNestedTable", {
735
741
  return _nodes.tableCellWithNestedTable;
736
742
  }
737
743
  });
744
+ Object.defineProperty(exports, "tableCellWithNestedTableWithLocalId", {
745
+ enumerable: true,
746
+ get: function get() {
747
+ return _nodes.tableCellWithNestedTableWithLocalId;
748
+ }
749
+ });
738
750
  Object.defineProperty(exports, "tableHeader", {
739
751
  enumerable: true,
740
752
  get: function get() {
@@ -759,6 +771,12 @@ Object.defineProperty(exports, "tableHeaderWithNestedTable", {
759
771
  return _nodes.tableHeaderWithNestedTable;
760
772
  }
761
773
  });
774
+ Object.defineProperty(exports, "tableHeaderWithNestedTableWithLocalId", {
775
+ enumerable: true,
776
+ get: function get() {
777
+ return _nodes.tableHeaderWithNestedTableWithLocalId;
778
+ }
779
+ });
762
780
  Object.defineProperty(exports, "tablePrefixSelector", {
763
781
  enumerable: true,
764
782
  get: function get() {
@@ -783,6 +801,12 @@ Object.defineProperty(exports, "tableRowWithNestedTable", {
783
801
  return _nodes.tableRowWithNestedTable;
784
802
  }
785
803
  });
804
+ Object.defineProperty(exports, "tableRowWithNestedTableWithLocalId", {
805
+ enumerable: true,
806
+ get: function get() {
807
+ return _nodes.tableRowWithNestedTableWithLocalId;
808
+ }
809
+ });
786
810
  Object.defineProperty(exports, "tableStage0", {
787
811
  enumerable: true,
788
812
  get: function get() {
@@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.inlineNodes = void 0;
8
8
  var nodes = _interopRequireWildcard(require("./nodes"));
9
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
10
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
11
10
  var typedNodes = nodes;
12
11
  var inlineNodes = exports.inlineNodes = new Set(Object.keys(typedNodes).filter(function (key) {
13
12
  return typedNodes[key] && typedNodes[key].group === 'inline';
@@ -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() {
@@ -544,6 +550,12 @@ Object.defineProperty(exports, "tableCellWithNestedTable", {
544
550
  return _tableNodes.tableCellWithNestedTable;
545
551
  }
546
552
  });
553
+ Object.defineProperty(exports, "tableCellWithNestedTableWithLocalId", {
554
+ enumerable: true,
555
+ get: function get() {
556
+ return _tableNodes.tableCellWithNestedTableWithLocalId;
557
+ }
558
+ });
547
559
  Object.defineProperty(exports, "tableHeader", {
548
560
  enumerable: true,
549
561
  get: function get() {
@@ -568,6 +580,12 @@ Object.defineProperty(exports, "tableHeaderWithNestedTable", {
568
580
  return _tableNodes.tableHeaderWithNestedTable;
569
581
  }
570
582
  });
583
+ Object.defineProperty(exports, "tableHeaderWithNestedTableWithLocalId", {
584
+ enumerable: true,
585
+ get: function get() {
586
+ return _tableNodes.tableHeaderWithNestedTableWithLocalId;
587
+ }
588
+ });
571
589
  Object.defineProperty(exports, "tablePrefixSelector", {
572
590
  enumerable: true,
573
591
  get: function get() {
@@ -592,6 +610,12 @@ Object.defineProperty(exports, "tableRowWithNestedTable", {
592
610
  return _tableNodes.tableRowWithNestedTable;
593
611
  }
594
612
  });
613
+ Object.defineProperty(exports, "tableRowWithNestedTableWithLocalId", {
614
+ enumerable: true,
615
+ get: function get() {
616
+ return _tableNodes.tableRowWithNestedTableWithLocalId;
617
+ }
618
+ });
595
619
  Object.defineProperty(exports, "tableStage0", {
596
620
  enumerable: true,
597
621
  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)
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.toJSONTableHeader = exports.toJSONTableCell = exports.tableWithNestedTable = exports.tableWithCustomWidth = exports.tableToJSON = exports.tableStage0 = exports.tableRowWithNestedTable = exports.tableRowWithLocalId = exports.tableRow = exports.tablePrefixSelector = exports.tableHeaderWithNestedTable = exports.tableHeaderWithLocalId = exports.tableHeaderSelector = exports.tableHeader = exports.tableCellWithNestedTable = exports.tableCellWithLocalId = exports.tableCellSelector = exports.tableCellContentWrapperSelector = exports.tableCellContentDomSelector = exports.tableCell = exports.tableBackgroundColorPalette = exports.tableBackgroundColorNames = exports.tableBackgroundBorderColor = exports.table = exports.setGlobalTheme = exports.getCellDomAttrs = exports.getCellAttrs = void 0;
7
+ exports.toJSONTableHeader = exports.toJSONTableCell = exports.tableWithNestedTable = exports.tableWithCustomWidth = exports.tableToJSON = exports.tableStage0 = exports.tableRowWithNestedTableWithLocalId = exports.tableRowWithNestedTable = exports.tableRowWithLocalId = exports.tableRow = exports.tablePrefixSelector = exports.tableHeaderWithNestedTableWithLocalId = exports.tableHeaderWithNestedTable = exports.tableHeaderWithLocalId = exports.tableHeaderSelector = exports.tableHeader = exports.tableCellWithNestedTableWithLocalId = exports.tableCellWithNestedTable = exports.tableCellWithLocalId = exports.tableCellSelector = exports.tableCellContentWrapperSelector = exports.tableCellContentDomSelector = exports.tableCell = exports.tableBackgroundColorPalette = exports.tableBackgroundColorNames = exports.tableBackgroundBorderColor = exports.table = exports.setGlobalTheme = exports.getCellDomAttrs = exports.getCellAttrs = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _editorPalette = require("../../utils/editor-palette");
@@ -351,7 +351,6 @@ var tableWithNestedTable = exports.tableWithNestedTable = (0, _nodeTypes.tableWi
351
351
  var tableRowWithNestedTable = exports.tableRowWithNestedTable = (0, _nodeTypes.tableRowWithNestedTable)(tableRowNodeSpecOptions);
352
352
  var tableCellWithNestedTable = exports.tableCellWithNestedTable = (0, _nodeTypes.tableCellWithNestedTable)(tableCellNodeSpecOptions);
353
353
  var tableHeaderWithNestedTable = exports.tableHeaderWithNestedTable = (0, _nodeTypes.tableHeaderWithNestedTable)(tableHeaderNodeSpecOptions);
354
-
355
354
  // table nodes with localId support
356
355
  var tableRowNodeSpecOptionsWithLocalId = {
357
356
  parseDOM: [{
@@ -380,10 +379,7 @@ var tableCellNodeSpecOptionsWithLocalId = {
380
379
  }
381
380
  }],
382
381
  toDOM: function toDOM(node) {
383
- var _node$attrs3;
384
- return ['td', {
385
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.localId) || undefined
386
- }, 0];
382
+ return ['td', getCellDomAttrs(node), 0];
387
383
  }
388
384
  };
389
385
  var tableCellWithLocalId = exports.tableCellWithLocalId = (0, _nodeTypes.tableCell)(tableCellNodeSpecOptionsWithLocalId);
@@ -401,4 +397,9 @@ var tableHeaderNodeSpecOptionsWithLocalId = {
401
397
  return ['th', getCellDomAttrs(node), 0];
402
398
  }
403
399
  };
404
- var tableHeaderWithLocalId = exports.tableHeaderWithLocalId = (0, _nodeTypes.tableHeader)(tableHeaderNodeSpecOptionsWithLocalId);
400
+ var tableHeaderWithLocalId = exports.tableHeaderWithLocalId = (0, _nodeTypes.tableHeader)(tableHeaderNodeSpecOptionsWithLocalId);
401
+
402
+ // nested table nodes with localId support
403
+ var tableRowWithNestedTableWithLocalId = exports.tableRowWithNestedTableWithLocalId = (0, _nodeTypes.tableRowWithNestedTable)(tableRowNodeSpecOptionsWithLocalId);
404
+ var tableCellWithNestedTableWithLocalId = exports.tableCellWithNestedTableWithLocalId = (0, _nodeTypes.tableCellWithNestedTable)(tableCellNodeSpecOptionsWithLocalId);
405
+ var tableHeaderWithNestedTableWithLocalId = exports.tableHeaderWithNestedTableWithLocalId = (0, _nodeTypes.tableHeaderWithNestedTable)(tableHeaderNodeSpecOptionsWithLocalId);
@@ -14,8 +14,7 @@ exports.normalizeHexColor = normalizeHexColor;
14
14
  exports.rgbToHex = rgbToHex;
15
15
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
16
16
  var namedColors = _interopRequireWildcard(require("css-color-names"));
17
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
19
18
  /**
20
19
  * We're avoding importing these colors from @atlaskit/theme since we
21
20
  * do not want to have react as a dependency of this package.
@@ -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, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } 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, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } 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';
@@ -23,14 +23,14 @@ export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as m
23
23
  export { mediaGroup } from './media-group';
24
24
  export { mediaInline } from './media-inline';
25
25
  export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, toJSON as mediaSingleToJSON } from './media-single';
26
- export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
26
+ export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
27
27
  export { decisionList, decisionListSelector } from './decision-list';
28
28
  export { decisionItem } from './decision-item';
29
29
  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.
@@ -324,7 +324,6 @@ export const tableWithNestedTable = tableWithNestedTableFactory(tableNodeSpecOpt
324
324
  export const tableRowWithNestedTable = tableRowWithNestedTableFactory(tableRowNodeSpecOptions);
325
325
  export const tableCellWithNestedTable = tableCellWithNestedTableFactory(tableCellNodeSpecOptions);
326
326
  export const tableHeaderWithNestedTable = tableHeaderWithNestedTableFactory(tableHeaderNodeSpecOptions);
327
-
328
327
  // table nodes with localId support
329
328
  const tableRowNodeSpecOptionsWithLocalId = {
330
329
  parseDOM: [{
@@ -349,10 +348,7 @@ const tableCellNodeSpecOptionsWithLocalId = {
349
348
  })
350
349
  }],
351
350
  toDOM(node) {
352
- var _node$attrs3;
353
- return ['td', {
354
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.localId) || undefined
355
- }, 0];
351
+ return ['td', getCellDomAttrs(node), 0];
356
352
  }
357
353
  };
358
354
  export const tableCellWithLocalId = tableCellFactory(tableCellNodeSpecOptionsWithLocalId);
@@ -366,4 +362,9 @@ const tableHeaderNodeSpecOptionsWithLocalId = {
366
362
  }],
367
363
  toDOM: node => ['th', getCellDomAttrs(node), 0]
368
364
  };
369
- export const tableHeaderWithLocalId = tableHeaderFactory(tableHeaderNodeSpecOptionsWithLocalId);
365
+ export const tableHeaderWithLocalId = tableHeaderFactory(tableHeaderNodeSpecOptionsWithLocalId);
366
+
367
+ // nested table nodes with localId support
368
+ export const tableRowWithNestedTableWithLocalId = tableRowWithNestedTableFactory(tableRowNodeSpecOptionsWithLocalId);
369
+ export const tableCellWithNestedTableWithLocalId = tableCellWithNestedTableFactory(tableCellNodeSpecOptionsWithLocalId);
370
+ export const tableHeaderWithNestedTableWithLocalId = tableHeaderWithNestedTableFactory(tableHeaderNodeSpecOptionsWithLocalId);
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, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } 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, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId } 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';
@@ -23,14 +23,14 @@ export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as m
23
23
  export { mediaGroup } from './media-group';
24
24
  export { mediaInline } from './media-inline';
25
25
  export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, toJSON as mediaSingleToJSON } from './media-single';
26
- export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
26
+ export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
27
27
  export { decisionList, decisionListSelector } from './decision-list';
28
28
  export { decisionItem } from './decision-item';
29
29
  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)
@@ -344,7 +344,6 @@ export var tableWithNestedTable = tableWithNestedTableFactory(tableNodeSpecOptio
344
344
  export var tableRowWithNestedTable = tableRowWithNestedTableFactory(tableRowNodeSpecOptions);
345
345
  export var tableCellWithNestedTable = tableCellWithNestedTableFactory(tableCellNodeSpecOptions);
346
346
  export var tableHeaderWithNestedTable = tableHeaderWithNestedTableFactory(tableHeaderNodeSpecOptions);
347
-
348
347
  // table nodes with localId support
349
348
  var tableRowNodeSpecOptionsWithLocalId = {
350
349
  parseDOM: [{
@@ -373,10 +372,7 @@ var tableCellNodeSpecOptionsWithLocalId = {
373
372
  }
374
373
  }],
375
374
  toDOM: function toDOM(node) {
376
- var _node$attrs3;
377
- return ['td', {
378
- 'data-local-id': (node === null || node === void 0 ? void 0 : (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.localId) || undefined
379
- }, 0];
375
+ return ['td', getCellDomAttrs(node), 0];
380
376
  }
381
377
  };
382
378
  export var tableCellWithLocalId = tableCellFactory(tableCellNodeSpecOptionsWithLocalId);
@@ -394,4 +390,9 @@ var tableHeaderNodeSpecOptionsWithLocalId = {
394
390
  return ['th', getCellDomAttrs(node), 0];
395
391
  }
396
392
  };
397
- export var tableHeaderWithLocalId = tableHeaderFactory(tableHeaderNodeSpecOptionsWithLocalId);
393
+ export var tableHeaderWithLocalId = tableHeaderFactory(tableHeaderNodeSpecOptionsWithLocalId);
394
+
395
+ // nested table nodes with localId support
396
+ export var tableRowWithNestedTableWithLocalId = tableRowWithNestedTableFactory(tableRowNodeSpecOptionsWithLocalId);
397
+ export var tableCellWithNestedTableWithLocalId = tableCellWithNestedTableFactory(tableCellNodeSpecOptionsWithLocalId);
398
+ export var tableHeaderWithNestedTableWithLocalId = tableHeaderWithNestedTableFactory(tableHeaderNodeSpecOptionsWithLocalId);
@@ -1,6 +1,6 @@
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';
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, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './schema';
4
4
  export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, 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';
@@ -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, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, } from './nodes';
2
2
  export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, 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,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';
@@ -43,7 +43,7 @@ export type { MediaInlineAttributes, MediaInlineDefinition, } from './media-inli
43
43
  export type { MediaGroupDefinition } from './media-group';
44
44
  export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleFullWithLocalId, toJSON as mediaSingleToJSON, } from './media-single';
45
45
  export type { MediaSingleDefinition } from './media-single';
46
- export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
46
+ export { table, tableWithNestedTable, tableRowWithNestedTable, tableCellWithNestedTable, tableHeaderWithNestedTable, tableRowWithLocalId, tableCellWithLocalId, tableHeaderWithLocalId, tableRowWithNestedTableWithLocalId, tableCellWithNestedTableWithLocalId, tableHeaderWithNestedTableWithLocalId, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
47
47
  export type { DisplayMode as TableDisplayMode, TableAttributes, CellAttributes, Layout as TableLayout, TableDefinition, TableCell as TableCellDefinition, TableHeader as TableHeaderDefinition, TableRow as TableRowDefinition, TableWithNestedTableDefinition, TableRowWithNestedTableDefinition, TableCellWithNestedTableDefinition, TableHeaderWithNestedTableDefinition, CellDomAttrs, } from './tableNodes';
48
48
  export { decisionList, decisionListSelector } from './decision-list';
49
49
  export type { DecisionListDefinition } from './decision-list';
@@ -57,7 +57,7 @@ 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: {
@@ -155,3 +155,6 @@ export declare const tableHeaderWithNestedTable: import("prosemirror-model").Nod
155
155
  export declare const tableRowWithLocalId: import("prosemirror-model").NodeSpec;
156
156
  export declare const tableCellWithLocalId: import("prosemirror-model").NodeSpec;
157
157
  export declare const tableHeaderWithLocalId: import("prosemirror-model").NodeSpec;
158
+ export declare const tableRowWithNestedTableWithLocalId: import("prosemirror-model").NodeSpec;
159
+ export declare const tableCellWithNestedTableWithLocalId: import("prosemirror-model").NodeSpec;
160
+ export declare const tableHeaderWithNestedTableWithLocalId: import("prosemirror-model").NodeSpec;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/adf-schema",
3
- "version": "50.1.1",
3
+ "version": "50.2.1",
4
4
  "description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"