@atlaskit/editor-common 96.4.0 → 96.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/analytics/analytics-queue.js +4 -5
  3. package/dist/cjs/annotation/index.js +9 -10
  4. package/dist/cjs/element-browser/ElementBrowser.js +11 -14
  5. package/dist/cjs/event-dispatcher/index.js +1 -2
  6. package/dist/cjs/extensibility/Extension/Lozenge/index.js +7 -10
  7. package/dist/cjs/extensibility/Extension.js +6 -9
  8. package/dist/cjs/extensibility/ExtensionComponent.js +25 -30
  9. package/dist/cjs/extensibility/extensionNodeView.js +5 -7
  10. package/dist/cjs/extensions/default-extension-provider.js +1 -2
  11. package/dist/cjs/hooks/useSharedPluginState.js +3 -0
  12. package/dist/cjs/hooks/useSharedPluginStateSelector/index.js +12 -0
  13. package/dist/cjs/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +114 -0
  14. package/dist/cjs/lazy-node-view/lazy-scheduler.js +1 -1
  15. package/dist/cjs/lazy-node-view/node-view.js +1 -2
  16. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +39 -45
  17. package/dist/cjs/link/LinkSearch/LinkSearchList.js +5 -7
  18. package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +9 -12
  19. package/dist/cjs/link/LinkSearch/index.js +13 -16
  20. package/dist/cjs/link/LinkSearch/withActivityProvider.js +6 -9
  21. package/dist/cjs/media-inline/inline-image-wrapper.js +1 -2
  22. package/dist/cjs/monitoring/error.js +1 -1
  23. package/dist/cjs/portal/PortalManager.js +1 -2
  24. package/dist/cjs/preset/builder.js +2 -4
  25. package/dist/cjs/preset/editor-commands.js +4 -5
  26. package/dist/cjs/preset/plugin-injection-api.js +4 -8
  27. package/dist/cjs/provider-factory/provider-factory.js +1 -2
  28. package/dist/cjs/provider-factory/with-providers.js +8 -11
  29. package/dist/cjs/react-node-view/index.js +1 -2
  30. package/dist/cjs/safe-plugin/index.js +4 -5
  31. package/dist/cjs/selection/gap-cursor/selection.js +7 -11
  32. package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +10 -13
  33. package/dist/cjs/styles/shared/media-single.js +21 -20
  34. package/dist/cjs/styles/shared/paragraph.js +1 -1
  35. package/dist/cjs/styles/shared/shadow.js +9 -8
  36. package/dist/cjs/styles/shared/table.js +1 -1
  37. package/dist/cjs/types/annotation/emitter.js +1 -2
  38. package/dist/cjs/ui/Caption/index.js +5 -7
  39. package/dist/cjs/ui/ContextPanel/context.js +8 -11
  40. package/dist/cjs/ui/DropList/index.js +22 -25
  41. package/dist/cjs/ui/ErrorBoundary/index.js +6 -9
  42. package/dist/cjs/ui/Expand/sharedStyles.js +1 -1
  43. package/dist/cjs/ui/IntlErrorBoundary/index.js +6 -9
  44. package/dist/cjs/ui/Layer/index.js +9 -12
  45. package/dist/cjs/ui/Mention/index.js +6 -9
  46. package/dist/cjs/ui/Mention/mention-with-providers.js +6 -9
  47. package/dist/cjs/ui/Messages/index.js +1 -1
  48. package/dist/cjs/ui/OverflowShadow/index.js +13 -16
  49. package/dist/cjs/ui/OverflowShadow/shadowObserver.js +3 -5
  50. package/dist/cjs/ui/PanelTextInput/index.js +10 -13
  51. package/dist/cjs/ui/Popup/index.js +14 -17
  52. package/dist/cjs/ui/ResizerLegacy/index.js +12 -16
  53. package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +5 -7
  54. package/dist/cjs/ui/with-outer-listeners.js +10 -13
  55. package/dist/cjs/ui-menu/Dropdown/index.js +9 -12
  56. package/dist/cjs/ui-menu/DropdownMenu/index.js +11 -14
  57. package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +8 -11
  58. package/dist/cjs/utils/error-reporter.js +1 -2
  59. package/dist/cjs/utils/hyperlink.js +2 -4
  60. package/dist/cjs/utils/imageLoader.js +14 -19
  61. package/dist/cjs/utils/profiler/render-count.js +3 -2
  62. package/dist/cjs/utils/traversor.js +1 -2
  63. package/dist/cjs/with-plugin-state/index.js +28 -35
  64. package/dist/es2019/analytics/analytics-queue.js +3 -3
  65. package/dist/es2019/hooks/useSharedPluginState.js +3 -0
  66. package/dist/es2019/hooks/useSharedPluginStateSelector/index.js +2 -0
  67. package/dist/es2019/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +98 -0
  68. package/dist/es2019/lazy-node-view/lazy-scheduler.js +1 -1
  69. package/dist/es2019/monitoring/error.js +1 -1
  70. package/dist/es2019/styles/shared/paragraph.js +1 -1
  71. package/dist/es2019/styles/shared/table.js +1 -1
  72. package/dist/es2019/ui/DropList/index.js +1 -1
  73. package/dist/es2019/ui/Expand/sharedStyles.js +1 -1
  74. package/dist/es2019/ui/Messages/index.js +1 -1
  75. package/dist/es2019/utils/profiler/render-count.js +2 -0
  76. package/dist/esm/analytics/analytics-queue.js +4 -5
  77. package/dist/esm/annotation/index.js +9 -10
  78. package/dist/esm/element-browser/ElementBrowser.js +11 -14
  79. package/dist/esm/event-dispatcher/index.js +1 -2
  80. package/dist/esm/extensibility/Extension/Lozenge/index.js +7 -10
  81. package/dist/esm/extensibility/Extension.js +6 -9
  82. package/dist/esm/extensibility/ExtensionComponent.js +25 -30
  83. package/dist/esm/extensibility/extensionNodeView.js +5 -7
  84. package/dist/esm/extensions/default-extension-provider.js +1 -2
  85. package/dist/esm/hooks/useSharedPluginState.js +3 -0
  86. package/dist/esm/hooks/useSharedPluginStateSelector/index.js +2 -0
  87. package/dist/esm/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +108 -0
  88. package/dist/esm/lazy-node-view/lazy-scheduler.js +1 -1
  89. package/dist/esm/lazy-node-view/node-view.js +1 -2
  90. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +39 -45
  91. package/dist/esm/link/LinkSearch/LinkSearchList.js +5 -7
  92. package/dist/esm/link/LinkSearch/LinkSearchListItem.js +9 -12
  93. package/dist/esm/link/LinkSearch/index.js +13 -16
  94. package/dist/esm/link/LinkSearch/withActivityProvider.js +6 -9
  95. package/dist/esm/media-inline/inline-image-wrapper.js +1 -2
  96. package/dist/esm/monitoring/error.js +1 -1
  97. package/dist/esm/portal/PortalManager.js +1 -2
  98. package/dist/esm/preset/builder.js +2 -4
  99. package/dist/esm/preset/editor-commands.js +4 -5
  100. package/dist/esm/preset/plugin-injection-api.js +4 -8
  101. package/dist/esm/provider-factory/provider-factory.js +1 -2
  102. package/dist/esm/provider-factory/with-providers.js +8 -11
  103. package/dist/esm/react-node-view/index.js +1 -2
  104. package/dist/esm/safe-plugin/index.js +4 -5
  105. package/dist/esm/selection/gap-cursor/selection.js +7 -11
  106. package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +10 -13
  107. package/dist/esm/styles/shared/media-single.js +19 -20
  108. package/dist/esm/styles/shared/paragraph.js +1 -1
  109. package/dist/esm/styles/shared/shadow.js +7 -8
  110. package/dist/esm/styles/shared/table.js +1 -1
  111. package/dist/esm/types/annotation/emitter.js +1 -2
  112. package/dist/esm/ui/Caption/index.js +5 -7
  113. package/dist/esm/ui/ContextPanel/context.js +8 -11
  114. package/dist/esm/ui/DropList/index.js +22 -25
  115. package/dist/esm/ui/ErrorBoundary/index.js +6 -9
  116. package/dist/esm/ui/Expand/sharedStyles.js +1 -1
  117. package/dist/esm/ui/IntlErrorBoundary/index.js +6 -9
  118. package/dist/esm/ui/Layer/index.js +9 -12
  119. package/dist/esm/ui/Mention/index.js +6 -9
  120. package/dist/esm/ui/Mention/mention-with-providers.js +6 -9
  121. package/dist/esm/ui/Messages/index.js +1 -1
  122. package/dist/esm/ui/OverflowShadow/index.js +13 -16
  123. package/dist/esm/ui/OverflowShadow/shadowObserver.js +3 -5
  124. package/dist/esm/ui/PanelTextInput/index.js +10 -13
  125. package/dist/esm/ui/Popup/index.js +14 -17
  126. package/dist/esm/ui/ResizerLegacy/index.js +12 -16
  127. package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +5 -7
  128. package/dist/esm/ui/with-outer-listeners.js +10 -13
  129. package/dist/esm/ui-menu/Dropdown/index.js +9 -12
  130. package/dist/esm/ui-menu/DropdownMenu/index.js +11 -14
  131. package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +8 -11
  132. package/dist/esm/utils/error-reporter.js +1 -2
  133. package/dist/esm/utils/hyperlink.js +2 -4
  134. package/dist/esm/utils/imageLoader.js +14 -19
  135. package/dist/esm/utils/profiler/render-count.js +3 -2
  136. package/dist/esm/utils/traversor.js +1 -2
  137. package/dist/esm/with-plugin-state/index.js +28 -35
  138. package/dist/types/hooks/useSharedPluginState.d.ts +5 -3
  139. package/dist/types/hooks/useSharedPluginStateSelector/index.d.ts +1 -0
  140. package/dist/types/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.d.ts +74 -0
  141. package/dist/types-ts4.5/hooks/useSharedPluginState.d.ts +5 -3
  142. package/dist/types-ts4.5/hooks/useSharedPluginStateSelector/index.d.ts +1 -0
  143. package/dist/types-ts4.5/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.d.ts +74 -0
  144. package/package.json +4 -3
  145. package/use-shared-plugin-state-selector/package.json +15 -0
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  /**
11
10
  * @jsxRuntime classic
@@ -65,35 +64,33 @@ var iconStyle = css({
65
64
  }
66
65
  });
67
66
  var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
68
- _inherits(LinkSearchListItem, _React$PureComponent);
69
- var _super = _createSuper(LinkSearchListItem);
70
67
  function LinkSearchListItem() {
71
68
  var _this;
72
69
  _classCallCheck(this, LinkSearchListItem);
73
70
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
74
71
  args[_key] = arguments[_key];
75
72
  }
76
- _this = _super.call.apply(_super, [this].concat(args));
77
- _defineProperty(_assertThisInitialized(_this), "handleSelect", function (e) {
73
+ _this = _callSuper(this, LinkSearchListItem, [].concat(args));
74
+ _defineProperty(_this, "handleSelect", function (e) {
78
75
  e.preventDefault(); // don't let editor lose focus
79
76
  var _this$props = _this.props,
80
77
  item = _this$props.item,
81
78
  onSelect = _this$props.onSelect;
82
79
  onSelect(item.url, item.name);
83
80
  });
84
- _defineProperty(_assertThisInitialized(_this), "handleMouseMove", function () {
81
+ _defineProperty(_this, "handleMouseMove", function () {
85
82
  var _this$props2 = _this.props,
86
83
  onMouseMove = _this$props2.onMouseMove,
87
84
  item = _this$props2.item;
88
85
  onMouseMove && onMouseMove(item.objectId);
89
86
  });
90
- _defineProperty(_assertThisInitialized(_this), "handleMouseEnter", function () {
87
+ _defineProperty(_this, "handleMouseEnter", function () {
91
88
  var _this$props3 = _this.props,
92
89
  onMouseEnter = _this$props3.onMouseEnter,
93
90
  item = _this$props3.item;
94
91
  onMouseEnter && onMouseEnter(item.objectId);
95
92
  });
96
- _defineProperty(_assertThisInitialized(_this), "handleMouseLeave", function () {
93
+ _defineProperty(_this, "handleMouseLeave", function () {
97
94
  var _this$props4 = _this.props,
98
95
  onMouseLeave = _this$props4.onMouseLeave,
99
96
  item = _this$props4.item;
@@ -101,7 +98,8 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
101
98
  });
102
99
  return _this;
103
100
  }
104
- _createClass(LinkSearchListItem, [{
101
+ _inherits(LinkSearchListItem, _React$PureComponent);
102
+ return _createClass(LinkSearchListItem, [{
105
103
  key: "renderIcon",
106
104
  value: function renderIcon() {
107
105
  var _this$props5 = this.props,
@@ -168,6 +166,5 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
168
166
  );
169
167
  }
170
168
  }]);
171
- return LinkSearchListItem;
172
169
  }(React.PureComponent);
173
170
  export default injectIntl(LinkSearchListItem);
@@ -1,13 +1,12 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
8
  import _regeneratorRuntime from "@babel/runtime/regenerator";
10
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
9
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
11
  import React from 'react';
13
12
  import { injectIntl } from 'react-intl-next';
@@ -20,14 +19,12 @@ var limit = function limit(items, max) {
20
19
  return items.slice(0, max);
21
20
  };
22
21
  var RecentLink = /*#__PURE__*/function (_React$Component) {
23
- _inherits(RecentLink, _React$Component);
24
- var _super = _createSuper(RecentLink);
25
22
  function RecentLink(props) {
26
23
  var _this;
27
24
  _classCallCheck(this, RecentLink);
28
- _this = _super.call(this, props);
29
- _defineProperty(_assertThisInitialized(_this), "activityProvider", null);
30
- _defineProperty(_assertThisInitialized(_this), "handleSubmit", function () {
25
+ _this = _callSuper(this, RecentLink, [props]);
26
+ _defineProperty(_this, "activityProvider", null);
27
+ _defineProperty(_this, "handleSubmit", function () {
31
28
  var _this$state = _this.state,
32
29
  items = _this$state.items,
33
30
  url = _this$state.url,
@@ -65,7 +62,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
65
62
  }
66
63
  }
67
64
  });
68
- _defineProperty(_assertThisInitialized(_this), "handleSelected", function (href, text) {
65
+ _defineProperty(_this, "handleSelected", function (href, text) {
69
66
  if (_this.props.onSubmit) {
70
67
  _this.setState(function () {
71
68
  return {
@@ -79,7 +76,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
79
76
  });
80
77
  }
81
78
  });
82
- _defineProperty(_assertThisInitialized(_this), "handleChange", /*#__PURE__*/function () {
79
+ _defineProperty(_this, "handleChange", /*#__PURE__*/function () {
83
80
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(input) {
84
81
  return _regeneratorRuntime.wrap(function _callee$(_context) {
85
82
  while (1) switch (_context.prev = _context.next) {
@@ -135,7 +132,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
135
132
  return _ref.apply(this, arguments);
136
133
  };
137
134
  }());
138
- _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (e) {
135
+ _defineProperty(_this, "handleKeyDown", function (e) {
139
136
  var _this$state2 = _this.state,
140
137
  items = _this$state2.items,
141
138
  selectedIndex = _this$state2.selectedIndex;
@@ -156,7 +153,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
156
153
  });
157
154
  }
158
155
  });
159
- _defineProperty(_assertThisInitialized(_this), "handleMouseMove", function (objectId) {
156
+ _defineProperty(_this, "handleMouseMove", function (objectId) {
160
157
  var items = _this.state.items;
161
158
  if (items) {
162
159
  var index = items.findIndex(function (item) {
@@ -167,7 +164,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
167
164
  });
168
165
  }
169
166
  });
170
- _defineProperty(_assertThisInitialized(_this), "renderRecentList", function () {
167
+ _defineProperty(_this, "renderRecentList", function () {
171
168
  var _this$state3 = _this.state,
172
169
  items = _this$state3.items,
173
170
  isLoading = _this$state3.isLoading,
@@ -180,7 +177,7 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
180
177
  onMouseMove: _this.handleMouseMove
181
178
  });
182
179
  });
183
- _defineProperty(_assertThisInitialized(_this), "clearValue", function () {
180
+ _defineProperty(_this, "clearValue", function () {
184
181
  _this.setState({
185
182
  url: ''
186
183
  });
@@ -193,7 +190,8 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
193
190
  };
194
191
  return _this;
195
192
  }
196
- _createClass(RecentLink, [{
193
+ _inherits(RecentLink, _React$Component);
194
+ return _createClass(RecentLink, [{
197
195
  key: "UNSAFE_componentWillReceiveProps",
198
196
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
199
197
  if (!fg('platform_editor_react18_phase2_v2')) {
@@ -333,7 +331,6 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
333
331
  });
334
332
  }
335
333
  }]);
336
- return RecentLink;
337
334
  }(React.Component);
338
335
  _defineProperty(RecentLink, "defaultProps", {
339
336
  limit: DEFAULT_ITEMS_LIMIT
@@ -2,13 +2,12 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
5
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime/helpers/inherits";
7
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
+ import _inherits from "@babel/runtime/helpers/inherits";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
9
  var _excluded = ["providerFactory"];
11
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
12
  import React from 'react';
14
13
  import { WithProviders } from '../../provider-factory';
@@ -16,16 +15,14 @@ import { WithProviders } from '../../provider-factory';
16
15
 
17
16
  export default function withActivityProvider(WrappedComponent) {
18
17
  return /*#__PURE__*/function (_React$Component) {
19
- _inherits(WithActivityProvider, _React$Component);
20
- var _super = _createSuper(WithActivityProvider);
21
18
  function WithActivityProvider() {
22
19
  var _this;
23
20
  _classCallCheck(this, WithActivityProvider);
24
21
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25
22
  args[_key] = arguments[_key];
26
23
  }
27
- _this = _super.call.apply(_super, [this].concat(args));
28
- _defineProperty(_assertThisInitialized(_this), "renderNode", function (providers) {
24
+ _this = _callSuper(this, WithActivityProvider, [].concat(args));
25
+ _defineProperty(_this, "renderNode", function (providers) {
29
26
  var _ref = _this.props,
30
27
  providerFactory = _ref.providerFactory,
31
28
  props = _objectWithoutProperties(_ref, _excluded);
@@ -36,7 +33,8 @@ export default function withActivityProvider(WrappedComponent) {
36
33
  });
37
34
  return _this;
38
35
  }
39
- _createClass(WithActivityProvider, [{
36
+ _inherits(WithActivityProvider, _React$Component);
37
+ return _createClass(WithActivityProvider, [{
40
38
  key: "render",
41
39
  value: function render() {
42
40
  var providerFactory = this.props.providerFactory;
@@ -47,6 +45,5 @@ export default function withActivityProvider(WrappedComponent) {
47
45
  });
48
46
  }
49
47
  }]);
50
- return WithActivityProvider;
51
48
  }(React.Component);
52
49
  }
@@ -22,7 +22,6 @@ var sizeWrapperStyle = css({
22
22
  height: '100%'
23
23
  });
24
24
  export var InlineImageWrapper = function InlineImageWrapper(_ref) {
25
- var _ref2;
26
25
  var children = _ref.children,
27
26
  isSelected = _ref.isSelected,
28
27
  aspectRatio = _ref.aspectRatio,
@@ -31,7 +30,7 @@ export var InlineImageWrapper = function InlineImageWrapper(_ref) {
31
30
  _ref$htmlAttrs = _ref.htmlAttrs,
32
31
  htmlAttrs = _ref$htmlAttrs === void 0 ? {} : _ref$htmlAttrs,
33
32
  onClick = _ref.onClick;
34
- var borderStyleVars = borderSize && borderColor ? (_ref2 = {}, _defineProperty(_ref2, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, borderSize), _defineProperty(_ref2, INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, hexToEditorBorderPaletteColor(borderColor) || borderColor), _ref2) : {};
33
+ var borderStyleVars = borderSize && borderColor ? _defineProperty(_defineProperty({}, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, borderSize), INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, hexToEditorBorderPaletteColor(borderColor) || borderColor) : {};
35
34
  var aspectStyleVars = aspectRatio ? _defineProperty({}, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, aspectRatio) : {};
36
35
  return (
37
36
  // eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "96.4.0";
10
+ var packageVersion = "96.5.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -69,7 +69,7 @@ export var PortalManager = /*#__PURE__*/function () {
69
69
  this.portalRendererUpdater = null;
70
70
  this.scaleCapacityThreshold = maxBucketCapacity / 2;
71
71
  }
72
- _createClass(PortalManager, [{
72
+ return _createClass(PortalManager, [{
73
73
  key: "getCurrentBucket",
74
74
  value: function getCurrentBucket() {
75
75
  return this.availableBuckets.values().next().value;
@@ -198,5 +198,4 @@ export var PortalManager = /*#__PURE__*/function () {
198
198
  }));
199
199
  }
200
200
  }]);
201
- return PortalManager;
202
201
  }();
@@ -558,7 +558,7 @@ export var EditorPresetBuilder = /*#__PURE__*/function () {
558
558
  return _this.apiEmitter = emitter;
559
559
  });
560
560
  }
561
- _createClass(EditorPresetBuilder, [{
561
+ return _createClass(EditorPresetBuilder, [{
562
562
  key: "add",
563
563
  value: function add(nextOrTuple) {
564
564
  return _construct(EditorPresetBuilder, [
@@ -685,7 +685,6 @@ export var EditorPresetBuilder = /*#__PURE__*/function () {
685
685
  return plugins;
686
686
  }
687
687
  }]);
688
- return EditorPresetBuilder;
689
688
  }();
690
689
  /**
691
690
  * WARNING: Internal object
@@ -717,7 +716,7 @@ var APIDispatcher = /*#__PURE__*/function () {
717
716
  * This will also emit the last event if the stream has already started.
718
717
  * @returns Cleanup function to cleanup the listener
719
718
  */
720
- _createClass(APIDispatcher, [{
719
+ return _createClass(APIDispatcher, [{
721
720
  key: "on",
722
721
  value: function on(cb) {
723
722
  var _this4 = this;
@@ -739,5 +738,4 @@ var APIDispatcher = /*#__PURE__*/function () {
739
738
  this.eventDispatcher.destroy();
740
739
  }
741
740
  }]);
742
- return APIDispatcher;
743
741
  }();
@@ -1,9 +1,9 @@
1
1
  import _createClass from "@babel/runtime/helpers/createClass";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import { Transaction } from '@atlaskit/editor-prosemirror/state';
9
9
  /**
@@ -38,15 +38,14 @@ export function editorCommandToPMCommand(command) {
38
38
  * an `EditorCommand` should return `true` but should not dispatch.
39
39
  */
40
40
  export var PassiveTransaction = /*#__PURE__*/function (_Transaction) {
41
- _inherits(PassiveTransaction, _Transaction);
42
- var _super = _createSuper(PassiveTransaction);
43
41
  // This is very cheeky but this should never be used outside its intended
44
42
  // purpose - it will likely crash the editor so we should get an early warning
45
43
  // signal
46
44
  function PassiveTransaction() {
47
45
  _classCallCheck(this, PassiveTransaction);
48
46
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
- return _super.call(this, {});
47
+ return _callSuper(this, PassiveTransaction, [{}]);
50
48
  }
49
+ _inherits(PassiveTransaction, _Transaction);
51
50
  return _createClass(PassiveTransaction);
52
51
  }(Transaction);
@@ -101,7 +101,7 @@ var ActionsAPI = /*#__PURE__*/function () {
101
101
  function ActionsAPI() {
102
102
  _classCallCheck(this, ActionsAPI);
103
103
  }
104
- _createClass(ActionsAPI, [{
104
+ return _createClass(ActionsAPI, [{
105
105
  key: "createAPI",
106
106
  value: function createAPI(plugin) {
107
107
  if (!plugin || !hasActions(plugin)) {
@@ -115,13 +115,12 @@ var ActionsAPI = /*#__PURE__*/function () {
115
115
  });
116
116
  }
117
117
  }]);
118
- return ActionsAPI;
119
118
  }();
120
119
  var EditorCommandsAPI = /*#__PURE__*/function () {
121
120
  function EditorCommandsAPI() {
122
121
  _classCallCheck(this, EditorCommandsAPI);
123
122
  }
124
- _createClass(EditorCommandsAPI, [{
123
+ return _createClass(EditorCommandsAPI, [{
125
124
  key: "createAPI",
126
125
  value: function createAPI(plugin) {
127
126
  if (!plugin || !hasCommands(plugin)) {
@@ -135,7 +134,6 @@ var EditorCommandsAPI = /*#__PURE__*/function () {
135
134
  });
136
135
  }
137
136
  }]);
138
- return EditorCommandsAPI;
139
137
  }();
140
138
  export var SharedStateAPI = /*#__PURE__*/function () {
141
139
  function SharedStateAPI(_ref4) {
@@ -145,7 +143,7 @@ export var SharedStateAPI = /*#__PURE__*/function () {
145
143
  this.getEditorState = getEditorState;
146
144
  this.listeners = new Map();
147
145
  }
148
- _createClass(SharedStateAPI, [{
146
+ return _createClass(SharedStateAPI, [{
149
147
  key: "createAPI",
150
148
  value: function createAPI(plugin) {
151
149
  var _this = this;
@@ -230,7 +228,6 @@ export var SharedStateAPI = /*#__PURE__*/function () {
230
228
  this.updatesToNotifyQueue.clear();
231
229
  }
232
230
  }]);
233
- return SharedStateAPI;
234
231
  }();
235
232
  var editorAPICache = new WeakMap();
236
233
  export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
@@ -279,7 +276,7 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
279
276
  }
280
277
  }));
281
278
  }
282
- _createClass(EditorPluginInjectionAPI, [{
279
+ return _createClass(EditorPluginInjectionAPI, [{
283
280
  key: "createAPI",
284
281
  value: function createAPI() {
285
282
  var sharedStateAPI = this.sharedStateAPI,
@@ -318,5 +315,4 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
318
315
  return editorAPICache.get(this);
319
316
  }
320
317
  }]);
321
- return EditorPluginInjectionAPI;
322
318
  }();
@@ -10,7 +10,7 @@ var ProviderFactory = /*#__PURE__*/function () {
10
10
  _defineProperty(this, "providers", new Map());
11
11
  _defineProperty(this, "subscribers", new Map());
12
12
  }
13
- _createClass(ProviderFactory, [{
13
+ return _createClass(ProviderFactory, [{
14
14
  key: "destroy",
15
15
  value: function destroy() {
16
16
  this.providers.clear();
@@ -106,6 +106,5 @@ var ProviderFactory = /*#__PURE__*/function () {
106
106
  return providerFactory;
107
107
  }
108
108
  }]);
109
- return ProviderFactory;
110
109
  }();
111
110
  export { ProviderFactory as default };
@@ -1,32 +1,29 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
7
  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; }
9
8
  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) { _defineProperty(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; }
10
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
9
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
11
  /* eslint-disable @repo/internal/react/no-class-components */
13
12
  import { PureComponent } from 'react';
14
13
  import { fg } from '@atlaskit/platform-feature-flags';
15
14
  export var WithProviders = /*#__PURE__*/function (_PureComponent) {
16
- _inherits(WithProviders, _PureComponent);
17
- var _super = _createSuper(WithProviders);
18
15
  function WithProviders(props) {
19
16
  var _this;
20
17
  _classCallCheck(this, WithProviders);
21
- _this = _super.call(this, props);
22
- _defineProperty(_assertThisInitialized(_this), "mounted", false);
23
- _defineProperty(_assertThisInitialized(_this), "handleProviderIfMounted", function (name, provider) {
18
+ _this = _callSuper(this, WithProviders, [props]);
19
+ _defineProperty(_this, "mounted", false);
20
+ _defineProperty(_this, "handleProviderIfMounted", function (name, provider) {
24
21
  if (!_this.mounted) {
25
22
  return;
26
23
  }
27
24
  _this.handleProvider(name, provider);
28
25
  });
29
- _defineProperty(_assertThisInitialized(_this), "handleProvider", function (name, provider) {
26
+ _defineProperty(_this, "handleProvider", function (name, provider) {
30
27
  _this.setState(function (_ref) {
31
28
  var providers = _ref.providers;
32
29
  return {
@@ -49,7 +46,8 @@ export var WithProviders = /*#__PURE__*/function (_PureComponent) {
49
46
  };
50
47
  return _this;
51
48
  }
52
- _createClass(WithProviders, [{
49
+ _inherits(WithProviders, _PureComponent);
50
+ return _createClass(WithProviders, [{
53
51
  key: "componentDidMount",
54
52
  value: function componentDidMount() {
55
53
  this.mounted = true;
@@ -87,6 +85,5 @@ export var WithProviders = /*#__PURE__*/function (_PureComponent) {
87
85
  return renderNode(state.providers);
88
86
  }
89
87
  }]);
90
- return WithProviders;
91
88
  }(PureComponent);
92
89
  _defineProperty(WithProviders, "displayName", 'WithProviders');
@@ -49,7 +49,7 @@ var ReactNodeView = /*#__PURE__*/function () {
49
49
  * constructor, which leads to some methods being undefined during the
50
50
  * first render.
51
51
  */
52
- _createClass(ReactNodeView, [{
52
+ return _createClass(ReactNodeView, [{
53
53
  key: "init",
54
54
  value: function init() {
55
55
  var _this2 = this;
@@ -257,6 +257,5 @@ var ReactNodeView = /*#__PURE__*/function () {
257
257
  };
258
258
  }
259
259
  }]);
260
- return ReactNodeView;
261
260
  }();
262
261
  export { ReactNodeView as default };
@@ -1,12 +1,12 @@
1
1
  import _createClass from "@babel/runtime/helpers/createClass";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
- import _inherits from "@babel/runtime/helpers/inherits";
4
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
7
7
  import _toArray from "@babel/runtime/helpers/toArray";
8
8
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
9
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
9
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import { Plugin } from '@atlaskit/editor-prosemirror/state';
12
12
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -78,15 +78,14 @@ var wrapGetPosExceptions = function wrapGetPosExceptions(spec) {
78
78
  return spec;
79
79
  };
80
80
  export var SafePlugin = /*#__PURE__*/function (_Plugin) {
81
- _inherits(SafePlugin, _Plugin);
82
- var _super = _createSuper(SafePlugin);
83
81
  // This variable isn't (and shouldn't) be used anywhere. Its purpose is
84
82
  // to distinguish Plugin from SafePlugin, thus ensuring that an 'unsafe'
85
83
  // Plugin cannot be assigned as an item in EditorPlugin → pmPlugins.
86
84
 
87
85
  function SafePlugin(spec) {
88
86
  _classCallCheck(this, SafePlugin);
89
- return _super.call(this, wrapGetPosExceptions(spec));
87
+ return _callSuper(this, SafePlugin, [wrapGetPosExceptions(spec)]);
90
88
  }
89
+ _inherits(SafePlugin, _Plugin);
91
90
  return _createClass(SafePlugin);
92
91
  }(Plugin);
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  import { Slice } from '@atlaskit/editor-prosemirror/model';
11
10
  import { Selection } from '@atlaskit/editor-prosemirror/state';
@@ -17,8 +16,6 @@ export var Side = /*#__PURE__*/function (Side) {
17
16
  }({});
18
17
  export var JSON_ID = 'gapcursor';
19
18
  export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
20
- _inherits(GapCursorSelection, _Selection);
21
- var _super = _createSuper(GapCursorSelection);
22
19
  /**
23
20
  * Construct a GapCursorSelection
24
21
  * @param {ResolvedPos} $pos resolved position
@@ -28,12 +25,13 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
28
25
  var _this;
29
26
  var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Side.LEFT;
30
27
  _classCallCheck(this, GapCursorSelection);
31
- _this = _super.call(this, $pos, $pos);
32
- _defineProperty(_assertThisInitialized(_this), "visible", false);
28
+ _this = _callSuper(this, GapCursorSelection, [$pos, $pos]);
29
+ _defineProperty(_this, "visible", false);
33
30
  _this.side = side;
34
31
  return _this;
35
32
  }
36
- _createClass(GapCursorSelection, [{
33
+ _inherits(GapCursorSelection, _Selection);
34
+ return _createClass(GapCursorSelection, [{
37
35
  key: "map",
38
36
  value: function map(doc, mapping) {
39
37
  var $pos = doc.resolve(mapping.map(this.head));
@@ -125,7 +123,6 @@ export var GapCursorSelection = /*#__PURE__*/function (_Selection) {
125
123
  return new GapCursorSelection(doc.resolve(json.pos), json.side);
126
124
  }
127
125
  }]);
128
- return GapCursorSelection;
129
126
  }(Selection);
130
127
  Selection.jsonID(JSON_ID, GapCursorSelection);
131
128
  export var GapBookmark = /*#__PURE__*/function () {
@@ -133,7 +130,7 @@ export var GapBookmark = /*#__PURE__*/function () {
133
130
  _classCallCheck(this, GapBookmark);
134
131
  this.pos = pos;
135
132
  }
136
- _createClass(GapBookmark, [{
133
+ return _createClass(GapBookmark, [{
137
134
  key: "map",
138
135
  value: function map(mapping) {
139
136
  return new GapBookmark(mapping.map(this.pos));
@@ -145,5 +142,4 @@ export var GapBookmark = /*#__PURE__*/function () {
145
142
  return GapCursorSelection.valid($pos) ? new GapCursorSelection($pos) : Selection.near($pos);
146
143
  }
147
144
  }]);
148
- return GapBookmark;
149
145
  }();