@atlaskit/adf-schema 35.8.0 → 35.9.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 (121) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/index.js +6 -0
  3. package/dist/cjs/schema/bitbucket-schema.js +2 -3
  4. package/dist/cjs/schema/confluence-schema.js +3 -5
  5. package/dist/cjs/schema/create-schema.js +1 -2
  6. package/dist/cjs/schema/default-schema.js +5 -7
  7. package/dist/cjs/schema/groups.js +6 -12
  8. package/dist/cjs/schema/index.js +6 -0
  9. package/dist/cjs/schema/inline-nodes.js +4 -5
  10. package/dist/cjs/schema/marks/alignment.js +4 -5
  11. package/dist/cjs/schema/marks/annotation.js +4 -7
  12. package/dist/cjs/schema/marks/border.js +3 -5
  13. package/dist/cjs/schema/marks/breakout.js +2 -3
  14. package/dist/cjs/schema/marks/code.js +2 -3
  15. package/dist/cjs/schema/marks/confluence-inline-comment.js +2 -3
  16. package/dist/cjs/schema/marks/data-consumer.js +3 -5
  17. package/dist/cjs/schema/marks/em.js +2 -3
  18. package/dist/cjs/schema/marks/fragment.js +3 -5
  19. package/dist/cjs/schema/marks/indentation.js +2 -3
  20. package/dist/cjs/schema/marks/link.js +4 -7
  21. package/dist/cjs/schema/marks/strike.js +2 -3
  22. package/dist/cjs/schema/marks/strong.js +2 -3
  23. package/dist/cjs/schema/marks/subsup.js +2 -3
  24. package/dist/cjs/schema/marks/text-color.js +5 -9
  25. package/dist/cjs/schema/marks/type-ahead-query.js +2 -3
  26. package/dist/cjs/schema/marks/underline.js +2 -3
  27. package/dist/cjs/schema/marks/unsupported-mark.js +2 -3
  28. package/dist/cjs/schema/marks/unsupported-node-attributes.js +2 -3
  29. package/dist/cjs/schema/nodes/block-card.js +2 -3
  30. package/dist/cjs/schema/nodes/blockquote.js +2 -4
  31. package/dist/cjs/schema/nodes/bodied-extension.js +1 -2
  32. package/dist/cjs/schema/nodes/bullet-list.js +3 -5
  33. package/dist/cjs/schema/nodes/caption.js +2 -3
  34. package/dist/cjs/schema/nodes/code-block.js +3 -5
  35. package/dist/cjs/schema/nodes/confluence-jira-issue.js +2 -3
  36. package/dist/cjs/schema/nodes/confluence-unsupported-block.js +2 -3
  37. package/dist/cjs/schema/nodes/confluence-unsupported-inline.js +2 -3
  38. package/dist/cjs/schema/nodes/date.js +2 -3
  39. package/dist/cjs/schema/nodes/decision-item.js +2 -3
  40. package/dist/cjs/schema/nodes/decision-list.js +3 -5
  41. package/dist/cjs/schema/nodes/doc.js +2 -3
  42. package/dist/cjs/schema/nodes/embed-card.js +2 -3
  43. package/dist/cjs/schema/nodes/emoji.js +2 -3
  44. package/dist/cjs/schema/nodes/expand.js +3 -5
  45. package/dist/cjs/schema/nodes/extension.js +1 -2
  46. package/dist/cjs/schema/nodes/hard-break.js +2 -3
  47. package/dist/cjs/schema/nodes/heading.js +2 -3
  48. package/dist/cjs/schema/nodes/image.js +2 -3
  49. package/dist/cjs/schema/nodes/index.js +6 -0
  50. package/dist/cjs/schema/nodes/inline-card.js +2 -3
  51. package/dist/cjs/schema/nodes/inline-extension.js +1 -2
  52. package/dist/cjs/schema/nodes/layout-column.js +2 -3
  53. package/dist/cjs/schema/nodes/layout-section.js +3 -5
  54. package/dist/cjs/schema/nodes/list-item.js +3 -5
  55. package/dist/cjs/schema/nodes/media-group.js +2 -3
  56. package/dist/cjs/schema/nodes/media-inline.js +1 -2
  57. package/dist/cjs/schema/nodes/media-single.js +8 -15
  58. package/dist/cjs/schema/nodes/media.js +7 -13
  59. package/dist/cjs/schema/nodes/mention.js +4 -7
  60. package/dist/cjs/schema/nodes/multi-bodied-extension.js +3 -4
  61. package/dist/cjs/schema/nodes/nested-expand.js +2 -4
  62. package/dist/cjs/schema/nodes/ordered-list.js +4 -7
  63. package/dist/cjs/schema/nodes/panel.js +4 -7
  64. package/dist/cjs/schema/nodes/paragraph.js +5 -3
  65. package/dist/cjs/schema/nodes/placeholder.js +2 -3
  66. package/dist/cjs/schema/nodes/rule.js +2 -3
  67. package/dist/cjs/schema/nodes/status.js +2 -3
  68. package/dist/cjs/schema/nodes/tableNodes.js +32 -42
  69. package/dist/cjs/schema/nodes/task-item.js +2 -3
  70. package/dist/cjs/schema/nodes/task-list.js +3 -5
  71. package/dist/cjs/schema/nodes/text.js +2 -3
  72. package/dist/cjs/schema/nodes/types/rich-media-common.js +2 -3
  73. package/dist/cjs/schema/nodes/unknown-block.js +2 -3
  74. package/dist/cjs/schema/nodes/unsupported-block.js +2 -3
  75. package/dist/cjs/schema/nodes/unsupported-inline.js +2 -3
  76. package/dist/cjs/schema/unsupported.js +1 -2
  77. package/dist/cjs/steps/analytics.js +11 -17
  78. package/dist/cjs/steps/link-meta-step.js +9 -14
  79. package/dist/cjs/steps/override-document-step.js +10 -15
  80. package/dist/cjs/steps/set-attrs.js +7 -10
  81. package/dist/cjs/steps/type-ahead.js +9 -14
  82. package/dist/cjs/utils/colors.js +50 -99
  83. package/dist/cjs/utils/editor-palette.js +4 -7
  84. package/dist/cjs/utils/extensions.js +3 -5
  85. package/dist/cjs/utils/lch-color-inversion.js +3 -5
  86. package/dist/cjs/utils/parseDOM.js +2 -3
  87. package/dist/cjs/utils/url.js +4 -8
  88. package/dist/cjs/utils/uuid.js +4 -5
  89. package/dist/es2019/index.js +1 -1
  90. package/dist/es2019/schema/default-schema.js +3 -2
  91. package/dist/es2019/schema/index.js +1 -1
  92. package/dist/es2019/schema/nodes/heading.js +2 -0
  93. package/dist/es2019/schema/nodes/index.js +1 -1
  94. package/dist/es2019/schema/nodes/layout-section.js +3 -0
  95. package/dist/es2019/schema/nodes/paragraph.js +3 -0
  96. package/dist/es2019/schema/nodes/tableNodes.js +13 -4
  97. package/dist/es2019/utils/colors.js +0 -1
  98. package/dist/esm/index.js +1 -1
  99. package/dist/esm/schema/default-schema.js +3 -2
  100. package/dist/esm/schema/index.js +1 -1
  101. package/dist/esm/schema/marks/link.js +1 -2
  102. package/dist/esm/schema/nodes/heading.js +2 -0
  103. package/dist/esm/schema/nodes/index.js +1 -1
  104. package/dist/esm/schema/nodes/layout-section.js +3 -0
  105. package/dist/esm/schema/nodes/paragraph.js +3 -0
  106. package/dist/esm/schema/nodes/tableNodes.js +12 -3
  107. package/dist/esm/steps/analytics.js +8 -11
  108. package/dist/esm/steps/link-meta-step.js +6 -8
  109. package/dist/esm/steps/override-document-step.js +8 -11
  110. package/dist/esm/steps/set-attrs.js +6 -8
  111. package/dist/esm/steps/type-ahead.js +6 -8
  112. package/dist/esm/utils/colors.js +0 -1
  113. package/dist/json-schema/v1/full.json +3 -0
  114. package/dist/json-schema/v1/stage-0.json +9 -0
  115. package/dist/types/index.d.ts +1 -1
  116. package/dist/types/schema/index.d.ts +1 -1
  117. package/dist/types/schema/nodes/index.d.ts +1 -1
  118. package/dist/types/schema/nodes/tableNodes.d.ts +7 -1
  119. package/json-schema/v1/full.json +3 -0
  120. package/json-schema/v1/stage-0.json +9 -0
  121. package/package.json +1 -1
@@ -9,31 +9,30 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
12
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
14
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
15
  var _transform = require("@atlaskit/editor-prosemirror/transform");
16
16
  var _model = require("@atlaskit/editor-prosemirror/model");
17
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
18
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
20
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
19
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
20
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
21
  /**
22
22
  * For more context on what this is about:
23
23
  * @see https://discuss.prosemirror.net/t/preventing-image-placeholder-replacement-from-being-undone/1394
24
24
  */
25
- var SetAttrsStep = /*#__PURE__*/function (_Step) {
26
- (0, _inherits2.default)(SetAttrsStep, _Step);
27
- var _super = _createSuper(SetAttrsStep);
25
+ var SetAttrsStep = exports.SetAttrsStep = /*#__PURE__*/function (_Step) {
28
26
  function SetAttrsStep(pos, attrs) {
29
27
  var _this;
30
28
  (0, _classCallCheck2.default)(this, SetAttrsStep);
31
- _this = _super.call(this);
29
+ _this = _callSuper(this, SetAttrsStep);
32
30
  _this.pos = pos;
33
31
  _this.attrs = attrs;
34
32
  return _this;
35
33
  }
36
- (0, _createClass2.default)(SetAttrsStep, [{
34
+ (0, _inherits2.default)(SetAttrsStep, _Step);
35
+ return (0, _createClass2.default)(SetAttrsStep, [{
37
36
  key: "apply",
38
37
  value: function apply(doc) {
39
38
  var target = doc.nodeAt(this.pos);
@@ -78,7 +77,5 @@ var SetAttrsStep = /*#__PURE__*/function (_Step) {
78
77
  return new SetAttrsStep(json.pos, json.attrs);
79
78
  }
80
79
  }]);
81
- return SetAttrsStep;
82
80
  }(_transform.Step);
83
- exports.SetAttrsStep = SetAttrsStep;
84
81
  _transform.Step.jsonID('setAttrs', SetAttrsStep);
@@ -7,24 +7,20 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.insertTypeAheadStepType = exports.InsertTypeAheadStep = exports.InsertTypeAheadStages = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
11
10
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
12
11
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
13
  var _model = require("@atlaskit/editor-prosemirror/model");
14
14
  var _transform = require("@atlaskit/editor-prosemirror/transform");
15
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
16
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
17
- var insertTypeAheadStepType = 'atlaskit-insert-type-ahead';
18
- exports.insertTypeAheadStepType = insertTypeAheadStepType;
19
- var InsertTypeAheadStages = /*#__PURE__*/function (InsertTypeAheadStages) {
15
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
16
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
17
+ var insertTypeAheadStepType = exports.insertTypeAheadStepType = 'atlaskit-insert-type-ahead';
18
+ var InsertTypeAheadStages = exports.InsertTypeAheadStages = /*#__PURE__*/function (InsertTypeAheadStages) {
20
19
  InsertTypeAheadStages["DELETING_RAW_QUERY"] = "DELETING_RAW_QUERY";
21
20
  InsertTypeAheadStages["INSERTING_ITEM"] = "INSERTING_ITEM";
22
21
  return InsertTypeAheadStages;
23
22
  }({});
24
- exports.InsertTypeAheadStages = InsertTypeAheadStages;
25
- var InsertTypeAheadStep = /*#__PURE__*/function (_Step) {
26
- (0, _inherits2.default)(InsertTypeAheadStep, _Step);
27
- var _super = _createSuper(InsertTypeAheadStep);
23
+ var InsertTypeAheadStep = exports.InsertTypeAheadStep = /*#__PURE__*/function (_Step) {
28
24
  function InsertTypeAheadStep(_ref) {
29
25
  var _this;
30
26
  var stage = _ref.stage,
@@ -33,7 +29,7 @@ var InsertTypeAheadStep = /*#__PURE__*/function (_Step) {
33
29
  selectedIndex = _ref.selectedIndex;
34
30
  var isInvertStep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
35
31
  (0, _classCallCheck2.default)(this, InsertTypeAheadStep);
36
- _this = _super.call(this);
32
+ _this = _callSuper(this, InsertTypeAheadStep);
37
33
  _this.isInvertStep = isInvertStep;
38
34
  _this.stage = stage;
39
35
  _this.query = query;
@@ -41,7 +37,8 @@ var InsertTypeAheadStep = /*#__PURE__*/function (_Step) {
41
37
  _this.selectedIndex = selectedIndex;
42
38
  return _this;
43
39
  }
44
- (0, _createClass2.default)(InsertTypeAheadStep, [{
40
+ (0, _inherits2.default)(InsertTypeAheadStep, _Step);
41
+ return (0, _createClass2.default)(InsertTypeAheadStep, [{
45
42
  key: "invert",
46
43
  value: function invert() {
47
44
  var config = {
@@ -107,8 +104,6 @@ var InsertTypeAheadStep = /*#__PURE__*/function (_Step) {
107
104
  return new _transform.ReplaceStep(0, 0, _model.Slice.empty);
108
105
  }
109
106
  }]);
110
- return InsertTypeAheadStep;
111
107
  }(_transform.Step);
112
108
  /** Register this step with Prosemirror */
113
- exports.InsertTypeAheadStep = InsertTypeAheadStep;
114
109
  _transform.Step.jsonID(insertTypeAheadStepType, InsertTypeAheadStep);
@@ -14,8 +14,8 @@ 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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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; }
19
19
  /**
20
20
  * We're avoding importing these colors from @atlaskit/theme since we
21
21
  * do not want to have react as a dependency of this package.
@@ -23,106 +23,58 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
23
  * https://product-fabric.atlassian.net/browse/CS-908
24
24
  */
25
25
 
26
- var R50 = '#FFEBE6';
27
- exports.R50 = R50;
28
- var R75 = '#FFBDAD';
29
- exports.R75 = R75;
30
- var R100 = '#FF8F73';
31
- exports.R100 = R100;
32
- var R300 = '#FF5630';
33
- exports.R300 = R300;
34
- var R400 = '#DE350B';
35
- exports.R400 = R400;
36
- var R500 = '#BF2600';
37
- exports.R500 = R500;
38
- var Y50 = '#FFFAE6';
39
- exports.Y50 = Y50;
40
- var Y75 = '#FFF0B3';
41
- exports.Y75 = Y75;
42
- var Y200 = '#FFC400';
43
- exports.Y200 = Y200;
44
- var Y400 = '#FF991F';
45
- exports.Y400 = Y400;
46
- var Y500 = '#FF8B00';
47
- exports.Y500 = Y500;
48
- var G50 = '#E3FCEF';
49
- exports.G50 = G50;
50
- var G75 = '#ABF5D1';
51
- exports.G75 = G75;
52
- var G200 = '#57D9A3';
53
- exports.G200 = G200;
54
- var G300 = '#36B37E';
55
- exports.G300 = G300;
56
- var G400 = '#00875A';
57
- exports.G400 = G400;
58
- var G500 = '#006644';
59
- exports.G500 = G500;
60
- var B50 = '#DEEBFF';
61
- exports.B50 = B50;
62
- var B75 = '#B3D4FF';
63
- exports.B75 = B75;
64
- var B100 = '#4C9AFF';
65
- exports.B100 = B100;
66
- var B400 = '#0052CC';
67
- exports.B400 = B400;
68
- var B500 = '#0747A6';
69
- exports.B500 = B500;
70
- var N0 = '#FFFFFF';
71
- exports.N0 = N0;
72
- var N20 = '#F4F5F7';
73
- exports.N20 = N20;
74
- var N30 = '#EBECF0';
75
- exports.N30 = N30;
76
- var N40 = '#DFE1E6';
77
- exports.N40 = N40;
78
- var N50 = '#C1C7D0';
79
- exports.N50 = N50;
80
- var N60 = '#B3BAC5';
81
- exports.N60 = N60;
82
- var N80 = '#97A0AF';
83
- exports.N80 = N80;
84
- var N90 = '#8993A4';
85
- exports.N90 = N90;
86
- var N200 = '#6B778C';
87
- exports.N200 = N200;
88
- var N300 = '#5E6C84';
89
- exports.N300 = N300;
90
- var N300A = '#091E4224';
91
- exports.N300A = N300A;
92
- var N500 = '#42526E';
93
- exports.N500 = N500;
94
- var N600 = '#758195';
95
- exports.N600 = N600;
96
- var N800 = '#172B4D';
97
- exports.N800 = N800;
98
- var N1000 = '#172B4D';
99
- exports.N1000 = N1000;
100
- var P50 = '#EAE6FF';
101
- exports.P50 = P50;
102
- var P75 = '#C0B6F2';
103
- exports.P75 = P75;
104
- var P100 = '#998DD9';
105
- exports.P100 = P100;
106
- var P300 = '#6554C0';
107
- exports.P300 = P300;
108
- var P400 = '#5243AA';
109
- exports.P400 = P400;
110
- var P500 = '#403294';
111
- exports.P500 = P500;
112
- var T50 = '#E6FCFF';
113
- exports.T50 = T50;
114
- var T75 = '#B3F5FF';
115
- exports.T75 = T75;
116
- var T100 = '#79E2F2';
117
- exports.T100 = T100;
118
- var T300 = '#00B8D9';
119
- exports.T300 = T300;
120
- var T500 = '#008DA6';
26
+ var R50 = exports.R50 = '#FFEBE6';
27
+ var R75 = exports.R75 = '#FFBDAD';
28
+ var R100 = exports.R100 = '#FF8F73';
29
+ var R300 = exports.R300 = '#FF5630';
30
+ var R400 = exports.R400 = '#DE350B';
31
+ var R500 = exports.R500 = '#BF2600';
32
+ var Y50 = exports.Y50 = '#FFFAE6';
33
+ var Y75 = exports.Y75 = '#FFF0B3';
34
+ var Y200 = exports.Y200 = '#FFC400';
35
+ var Y400 = exports.Y400 = '#FF991F';
36
+ var Y500 = exports.Y500 = '#FF8B00';
37
+ var G50 = exports.G50 = '#E3FCEF';
38
+ var G75 = exports.G75 = '#ABF5D1';
39
+ var G200 = exports.G200 = '#57D9A3';
40
+ var G300 = exports.G300 = '#36B37E';
41
+ var G400 = exports.G400 = '#00875A';
42
+ var G500 = exports.G500 = '#006644';
43
+ var B50 = exports.B50 = '#DEEBFF';
44
+ var B75 = exports.B75 = '#B3D4FF';
45
+ var B100 = exports.B100 = '#4C9AFF';
46
+ var B400 = exports.B400 = '#0052CC';
47
+ var B500 = exports.B500 = '#0747A6';
48
+ var N0 = exports.N0 = '#FFFFFF';
49
+ var N20 = exports.N20 = '#F4F5F7';
50
+ var N30 = exports.N30 = '#EBECF0';
51
+ var N40 = exports.N40 = '#DFE1E6';
52
+ var N50 = exports.N50 = '#C1C7D0';
53
+ var N60 = exports.N60 = '#B3BAC5';
54
+ var N80 = exports.N80 = '#97A0AF';
55
+ var N90 = exports.N90 = '#8993A4';
56
+ var N200 = exports.N200 = '#6B778C';
57
+ var N300 = exports.N300 = '#5E6C84';
58
+ var N300A = exports.N300A = '#091E4224';
59
+ var N500 = exports.N500 = '#42526E';
60
+ var N600 = exports.N600 = '#758195';
61
+ var N800 = exports.N800 = '#172B4D';
62
+ var N1000 = exports.N1000 = '#172B4D';
63
+ var P50 = exports.P50 = '#EAE6FF';
64
+ var P75 = exports.P75 = '#C0B6F2';
65
+ var P100 = exports.P100 = '#998DD9';
66
+ var P300 = exports.P300 = '#6554C0';
67
+ var P400 = exports.P400 = '#5243AA';
68
+ var P500 = exports.P500 = '#403294';
69
+ var T50 = exports.T50 = '#E6FCFF';
70
+ var T75 = exports.T75 = '#B3F5FF';
71
+ var T100 = exports.T100 = '#79E2F2';
72
+ var T300 = exports.T300 = '#00B8D9';
73
+ var T500 = exports.T500 = '#008DA6';
121
74
 
122
75
  /**
123
76
  * @return String with HEX-coded color.
124
77
  */
125
- exports.T500 = T500;
126
78
  function normalizeHexColor(color, defaultColor) {
127
79
  if (!color) {
128
80
  return null;
@@ -204,7 +156,6 @@ function rgbToHex(value) {
204
156
  return '#' + (blue | green << 8 | red << 16 | 1 << 24).toString(16).slice(1) // eslint-disable-line no-bitwise
205
157
  ;
206
158
  }
207
-
208
159
  return null;
209
160
  }
210
161
  function isRgb(color) {
@@ -29,7 +29,7 @@ function hexToEditorBorderPaletteColor(hexColor) {
29
29
  // (preferencing better type on consumption over safety in implementation)
30
30
  return editorBorderPalette[hexColor.toUpperCase()];
31
31
  }
32
- var editorBorderPalette = {
32
+ var editorBorderPalette = exports.editorBorderPalette = {
33
33
  /** gray - subtle */
34
34
  '#091E4224': 'var(--ds-border, #091E4224)',
35
35
  /** gray */
@@ -55,13 +55,12 @@ var editorBorderPalette = {
55
55
  * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
56
56
  * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color
57
57
  */
58
- exports.editorBorderPalette = editorBorderPalette;
59
58
  function hexToEditorTextPaletteColor(hexColor) {
60
59
  // Ts ignore was used to allow use of conditional return type
61
60
  // (preferencing better type on consumption over safety in implementation)
62
61
  return editorTextPalette[hexColor.toUpperCase()];
63
62
  }
64
- var editorTextPalette = {
63
+ var editorTextPalette = exports.editorTextPalette = {
65
64
  /** blue - light */
66
65
  '#B3D4FF': 'var(--ds-background-accent-blue-subtler, #B3D4FF)',
67
66
  /** blue - medium */
@@ -119,7 +118,6 @@ var editorTextPalette = {
119
118
  * - **DO NOT**: store the output of these functions in any user-generated content or back-end.
120
119
  * - **DO**: store the ADF hex color, and use these utilities at render time to display the themed version of the color.
121
120
  */
122
- exports.editorTextPalette = editorTextPalette;
123
121
  function hexToEditorBackgroundPaletteRawValue(hexColor) {
124
122
  // Ts ignore was used to allow use of conditional return type
125
123
  // (preferencing better type on consumption over safety in implementation)
@@ -131,7 +129,7 @@ function hexToEditorBackgroundPaletteRawValue(hexColor) {
131
129
  * Using object structure as getValue() function needed for table values, and other
132
130
  * properties may be needed in the future.
133
131
  */
134
- var editorBackgroundPalette = {
132
+ var editorBackgroundPalette = exports.editorBackgroundPalette = {
135
133
  /** blue - light */
136
134
  '#DEEBFF': {
137
135
  getValue: function getValue() {
@@ -279,5 +277,4 @@ var editorBackgroundPalette = {
279
277
  },
280
278
  token: 'var(--ds-background-accent-gray-subtle, #B3BAC5)'
281
279
  }
282
- };
283
- exports.editorBackgroundPalette = editorBackgroundPalette;
280
+ };
@@ -4,11 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isValidLayout = exports.getExtensionAttrs = void 0;
7
- var isValidLayout = function isValidLayout(name) {
7
+ var isValidLayout = exports.isValidLayout = function isValidLayout(name) {
8
8
  return !!name && ['default', 'wide', 'full-width'].includes(name);
9
9
  };
10
- exports.isValidLayout = isValidLayout;
11
- var getExtensionAttrs = function getExtensionAttrs(dom) {
10
+ var getExtensionAttrs = exports.getExtensionAttrs = function getExtensionAttrs(dom) {
12
11
  var isInline = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
13
12
  var extensionType = dom.getAttribute('data-extension-type');
14
13
  var extensionKey = dom.getAttribute('data-extension-key');
@@ -27,5 +26,4 @@ var getExtensionAttrs = function getExtensionAttrs(dom) {
27
26
  attrs.layout = isValidLayout(rawLayout) ? rawLayout : 'default';
28
27
  }
29
28
  return attrs;
30
- };
31
- exports.getExtensionAttrs = getExtensionAttrs;
29
+ };
@@ -122,7 +122,7 @@ var rgbToLch = function rgbToLch(rgb) {
122
122
  var lchToRgb = function lchToRgb(lch) {
123
123
  return xyzToRgb(labToXyz(lchToLab(lch)));
124
124
  };
125
- var clampLightness = function clampLightness(color, newPercent) {
125
+ var clampLightness = exports.clampLightness = function clampLightness(color, newPercent) {
126
126
  var rgb = rgbFromHex(color);
127
127
  if (rgb === null) {
128
128
  return color;
@@ -133,7 +133,6 @@ var clampLightness = function clampLightness(color, newPercent) {
133
133
  lch.l = clamp(newPercent, 0, 100);
134
134
  return rgbToHex(lchToRgb(lch));
135
135
  };
136
- exports.clampLightness = clampLightness;
137
136
  var getLightness = function getLightness(color) {
138
137
  var rgb = rgbFromHex(color);
139
138
  if (rgb === null) {
@@ -142,9 +141,8 @@ var getLightness = function getLightness(color) {
142
141
  var lch = rgbToLch(rgb);
143
142
  return lch.l;
144
143
  };
145
- var getDarkModeLCHColor = function getDarkModeLCHColor(currentBackgroundColor) {
144
+ var getDarkModeLCHColor = exports.getDarkModeLCHColor = function getDarkModeLCHColor(currentBackgroundColor) {
146
145
  var lightness = getLightness(currentBackgroundColor);
147
146
  var newLightness = Math.abs(100 - lightness);
148
147
  return clampLightness(currentBackgroundColor, newLightness).toUpperCase();
149
- };
150
- exports.getDarkModeLCHColor = getDarkModeLCHColor;
148
+ };
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.isDOMElement = void 0;
7
- var isDOMElement = function isDOMElement(maybeNode) {
7
+ var isDOMElement = exports.isDOMElement = function isDOMElement(maybeNode) {
8
8
  return maybeNode instanceof Node && maybeNode.nodeType === Node.ELEMENT_NODE;
9
- };
10
- exports.isDOMElement = isDOMElement;
9
+ };
@@ -26,7 +26,7 @@ var whitelistedURLPatterns = [/^https?:\/\//im, /^ftps?:\/\//im, /^gopher:\/\//i
26
26
  /**
27
27
  * Please notify the Editor Mobile team (Slack: #help-mobilekit) if the logic for this changes.
28
28
  */
29
- var isSafeUrl = function isSafeUrl(url) {
29
+ var isSafeUrl = exports.isSafeUrl = function isSafeUrl(url) {
30
30
  var urlTrimmed = url.trim();
31
31
  if (urlTrimmed.length === 0) {
32
32
  return true;
@@ -35,9 +35,7 @@ var isSafeUrl = function isSafeUrl(url) {
35
35
  return p.test(urlTrimmed);
36
36
  });
37
37
  };
38
- exports.isSafeUrl = isSafeUrl;
39
- var linkify = (0, _linkifyIt.default)();
40
- exports.linkify = linkify;
38
+ var linkify = exports.linkify = (0, _linkifyIt.default)();
41
39
  linkify.add('sourcetree:', 'http:');
42
40
  linkify.add('jamfselfservice:', 'http:');
43
41
  var urlWithoutSpacesValidator = {
@@ -58,11 +56,10 @@ linkify.tlds(tlds, false);
58
56
 
59
57
  // linkify-it mishandles closing braces on long urls, so we preference using our own regex first:
60
58
  // https://product-fabric.atlassian.net/browse/ED-13669
61
- var LINK_REGEXP = /(https?|ftp|jamfselfservice|gopher|dynamicsnav|integrity|file|smb):\/\/[^\s]+/;
59
+ var LINK_REGEXP = exports.LINK_REGEXP = /(https?|ftp|jamfselfservice|gopher|dynamicsnav|integrity|file|smb):\/\/[^\s]+/;
62
60
 
63
61
  /** Attempt to find a link match using a regex string defining a URL */
64
- exports.LINK_REGEXP = LINK_REGEXP;
65
- var linkifyMatch = function linkifyMatch(text) {
62
+ var linkifyMatch = exports.linkifyMatch = function linkifyMatch(text) {
66
63
  if (!LINK_REGEXP.test(text)) {
67
64
  return [];
68
65
  }
@@ -96,7 +93,6 @@ var linkifyMatch = function linkifyMatch(text) {
96
93
  * If this doesn't match (e.g. no protocol), try using linkify-it library.
97
94
  * Returns null if url string empty or no string given, or if no match found.
98
95
  */
99
- exports.linkifyMatch = linkifyMatch;
100
96
  function getLinkMatch(str) {
101
97
  if (!str) {
102
98
  return null;
@@ -5,21 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.uuid = exports.generateUuid = void 0;
7
7
  /* eslint-disable no-bitwise */
8
- var generateUuid = function generateUuid() {
8
+ var generateUuid = exports.generateUuid = function generateUuid() {
9
9
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
10
10
  var r = Math.random() * 16 | 0;
11
11
  return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
12
12
  });
13
13
  };
14
14
  /* eslint-enable no-bitwise */
15
- exports.generateUuid = generateUuid;
15
+
16
16
  var staticValue = false;
17
- var uuid = {
17
+ var uuid = exports.uuid = {
18
18
  setStatic: function setStatic(value) {
19
19
  staticValue = value;
20
20
  },
21
21
  generate: function generate() {
22
22
  return staticValue || generateUuid();
23
23
  }
24
- };
25
- exports.uuid = uuid;
24
+ };
@@ -1,3 +1,3 @@
1
1
  export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, blockquoteWithList, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
2
- colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, extendedNestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension } from './schema';
2
+ colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleSpec, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, extendedNestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, extensionFrame, multiBodiedExtension } 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';
@@ -1,5 +1,5 @@
1
1
  import memoizeOne from 'memoize-one';
2
- import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension } from './nodes';
2
+ import { extensionFrame, layoutSectionWithSingleColumn, multiBodiedExtension, tableStage0 } from './nodes';
3
3
  import { createSchema } from './create-schema';
4
4
  const getDefaultSchemaConfig = () => {
5
5
  const defaultSchemaConfig = {
@@ -17,7 +17,8 @@ export const getSchemaBasedOnStage = memoizeOne((stage = 'final') => {
17
17
  defaultSchemaConfig.customNodeSpecs = {
18
18
  layoutSection: layoutSectionWithSingleColumn,
19
19
  multiBodiedExtension: multiBodiedExtension,
20
- extensionFrame: extensionFrame
20
+ extensionFrame: extensionFrame,
21
+ table: tableStage0
21
22
  };
22
23
  }
23
24
  return createSchema(defaultSchemaConfig);
@@ -1,4 +1,4 @@
1
- export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, extendedNestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
1
+ export { PanelType, blockCard, blockquote, blockquoteWithList, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, listItemWithTask, media, mediaGroup, mediaSingle, mediaSingleSpec, mediaInline, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, extendedNestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, extendedPanel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableStage0, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, extensionFrame, multiBodiedExtension } from './nodes';
2
2
  export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
3
3
  colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './marks';
4
4
  export { unsupportedNodeTypesForMediaCards } from './unsupported';
@@ -10,9 +10,11 @@
10
10
  /**
11
11
  * @name heading_with_alignment_node
12
12
  */
13
+
13
14
  /**
14
15
  * @name heading_with_indentation_node
15
16
  */
17
+
16
18
  export const heading = {
17
19
  attrs: {
18
20
  level: {
@@ -24,7 +24,7 @@ export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as m
24
24
  export { mediaGroup } from './media-group';
25
25
  export { mediaInline } from './media-inline';
26
26
  export { mediaSingle, mediaSingleSpec, mediaSingleWithCaption, mediaSingleWithWidthType, mediaSingleFull, toJSON as mediaSingleToJSON } from './media-single';
27
- export { table, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
27
+ export { table, tableStage0, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
28
28
  export { decisionList, decisionListSelector } from './decision-list';
29
29
  export { decisionItem } from './decision-item';
30
30
  export { taskList, taskListSelector } from './task-list';
@@ -5,13 +5,16 @@
5
5
  /**
6
6
  * Need duplicate `type` and `marks` to make both validator and json-schema satisfied
7
7
  */
8
+
8
9
  /**
9
10
  * @name layoutSection_full_node
10
11
  */
12
+
11
13
  /**
12
14
  * @stage 0
13
15
  * @name layoutSection_with_single_column_node
14
16
  */
17
+
15
18
  export const layoutSection = {
16
19
  content: '(layoutColumn | unsupportedBlock){1,3} unsupportedBlock* | unsupportedBlock+',
17
20
  marks: 'unsupportedMark unsupportedNodeAttribute',
@@ -14,12 +14,15 @@
14
14
  * type T1 = X | Y
15
15
  * type T2 = A | T1 | B // T2 = A | X | Y | B
16
16
  */
17
+
17
18
  /**
18
19
  * @name paragraph_with_alignment_node
19
20
  */
21
+
20
22
  /**
21
23
  * @name paragraph_with_indentation_node
22
24
  */
25
+
23
26
  const pDOM = ['p', 0];
24
27
  export const paragraph = {
25
28
  selectable: false,
@@ -189,7 +189,7 @@ export const tableBackgroundColorNames = new Map();
189
189
  */
190
190
 
191
191
  // TODO: Fix any, potential issue. ED-5048
192
- const createTableSpec = () => {
192
+ const createTableSpec = (allowPreserveTableWidth = false) => {
193
193
  const attrs = {
194
194
  isNumberColumnEnabled: {
195
195
  default: false
@@ -207,9 +207,15 @@ const createTableSpec = () => {
207
207
  default: null
208
208
  }
209
209
  };
210
+ const finalAttrs = allowPreserveTableWidth ? {
211
+ ...attrs,
212
+ displayMode: {
213
+ default: null
214
+ }
215
+ } : attrs;
210
216
  const tableNodeSpec = {
211
217
  content: 'tableRow+',
212
- attrs: attrs,
218
+ attrs: finalAttrs,
213
219
  marks: 'unsupportedMark unsupportedNodeAttribute',
214
220
  tableRole: 'table',
215
221
  isolating: true,
@@ -229,7 +235,8 @@ const createTableSpec = () => {
229
235
  breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
230
236
  __autoSize: dom.getAttribute('data-autosize') === 'true',
231
237
  localId: dom.getAttribute('data-table-local-id') || uuid.generate(),
232
- width: Number(dom.getAttribute('data-table-width')) || null
238
+ width: Number(dom.getAttribute('data-table-width')) || null,
239
+ displayMode: dom.getAttribute('data-table-display-mode') || null
233
240
  };
234
241
  }
235
242
  }],
@@ -239,7 +246,8 @@ const createTableSpec = () => {
239
246
  'data-layout': node.attrs.layout,
240
247
  'data-autosize': node.attrs.__autoSize,
241
248
  'data-table-local-id': node.attrs.localId,
242
- 'data-table-width': node.attrs.width
249
+ 'data-table-width': node.attrs.width,
250
+ 'data-table-display-mode': node.attrs.displayMode
243
251
  };
244
252
  return ['table', attrs, ['tbody', 0]];
245
253
  }
@@ -252,6 +260,7 @@ const createTableSpec = () => {
252
260
  export const table = createTableSpec();
253
261
  /** @deprecated Do not use, instead use the regular `table` export */
254
262
  export const tableWithCustomWidth = createTableSpec();
263
+ export const tableStage0 = createTableSpec(true);
255
264
  const shouldIncludeAttribute = (key, value) => !key.startsWith('__') && (key !== 'localId' || !!value);
256
265
  export const tableToJSON = node => ({
257
266
  attrs: Object.keys(node.attrs).filter(key => shouldIncludeAttribute(key, node.attrs[key])).reduce((obj, key) => {
@@ -130,7 +130,6 @@ export function rgbToHex(value) {
130
130
  return '#' + (blue | green << 8 | red << 16 | 1 << 24).toString(16).slice(1) // eslint-disable-line no-bitwise
131
131
  ;
132
132
  }
133
-
134
133
  return null;
135
134
  }
136
135
  export function isRgb(color) {