@atlaskit/editor-core 166.0.0 → 166.0.3

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 (75) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +2 -2
  3. package/dist/cjs/plugins/collab-edit/index.js +2 -2
  4. package/dist/cjs/plugins/collab-edit/provider/channel.js +2 -2
  5. package/dist/cjs/plugins/extension/context-panel.js +2 -2
  6. package/dist/cjs/plugins/extension/pm-plugins/main.js +2 -2
  7. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
  8. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -2
  9. package/dist/cjs/plugins/macro/actions.js +2 -2
  10. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +2 -2
  11. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  12. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  13. package/dist/cjs/plugins/paste/handlers.js +21 -6
  14. package/dist/cjs/plugins/table/event-handlers.js +3 -3
  15. package/dist/cjs/plugins/text-formatting/utils.js +1 -1
  16. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +2 -2
  17. package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -2
  18. package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -2
  19. package/dist/cjs/ui/ConfigPanel/transformers.js +2 -2
  20. package/dist/cjs/version-wrapper.js +1 -1
  21. package/dist/cjs/version.json +1 -1
  22. package/dist/es2019/plugins/paste/handlers.js +22 -7
  23. package/dist/es2019/plugins/text-formatting/utils.js +1 -1
  24. package/dist/es2019/version-wrapper.js +1 -1
  25. package/dist/es2019/version.json +1 -1
  26. package/dist/esm/actions/index.js +1 -1
  27. package/dist/esm/create-editor/ErrorBoundary.js +1 -1
  28. package/dist/esm/editor.js +2 -1
  29. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +1 -1
  30. package/dist/esm/plugins/collab-edit/index.js +1 -1
  31. package/dist/esm/plugins/collab-edit/provider/channel.js +1 -1
  32. package/dist/esm/plugins/custom-autoformat/doc.js +1 -1
  33. package/dist/esm/plugins/custom-autoformat/index.js +1 -1
  34. package/dist/esm/plugins/extension/actions.js +1 -1
  35. package/dist/esm/plugins/extension/context-panel.js +1 -1
  36. package/dist/esm/plugins/extension/pm-plugins/main.js +1 -1
  37. package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +1 -1
  38. package/dist/esm/plugins/feedback-dialog/index.js +1 -1
  39. package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +1 -1
  40. package/dist/esm/plugins/find-replace/utils/batch-decorations.js +1 -1
  41. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -1
  42. package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +1 -1
  43. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +2 -1
  44. package/dist/esm/plugins/image-upload/pm-plugins/main.js +1 -1
  45. package/dist/esm/plugins/macro/actions.js +1 -1
  46. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -1
  47. package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -1
  48. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  49. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +1 -1
  50. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
  51. package/dist/esm/plugins/media/picker-facade.js +1 -1
  52. package/dist/esm/plugins/media/pm-plugins/main.js +1 -1
  53. package/dist/esm/plugins/media/toolbar/utils.js +1 -1
  54. package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -1
  55. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +1 -1
  56. package/dist/esm/plugins/media/utils/check-media-type.js +1 -1
  57. package/dist/esm/plugins/paste/handlers.js +23 -8
  58. package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
  59. package/dist/esm/plugins/quick-insert/index.js +1 -1
  60. package/dist/esm/plugins/table/event-handlers.js +3 -3
  61. package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +1 -1
  62. package/dist/esm/plugins/text-formatting/utils.js +1 -1
  63. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
  64. package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +1 -1
  65. package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +1 -1
  66. package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +1 -1
  67. package/dist/esm/ui/ConfigPanel/transformers.js +1 -1
  68. package/dist/esm/ui/LinkSearch/index.js +1 -1
  69. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  70. package/dist/esm/utils/action.js +1 -1
  71. package/dist/esm/utils/clipboard.js +1 -1
  72. package/dist/esm/utils/extensions.js +1 -1
  73. package/dist/esm/version-wrapper.js +1 -1
  74. package/dist/esm/version.json +1 -1
  75. package/package.json +7 -7
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
12
 
@@ -1,5 +1,4 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
4
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
5
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
@@ -13,6 +12,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
13
12
 
14
13
  var _templateObject, _templateObject2, _templateObject3;
15
14
 
15
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
16
+
16
17
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
17
18
 
18
19
  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; } }
@@ -1,6 +1,6 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
 
5
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
6
 
@@ -1,11 +1,11 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
 
5
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
5
 
7
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
7
 
8
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
9
9
  import assert from 'assert';
10
10
  import { Selection, NodeSelection, TextSelection } from 'prosemirror-state';
11
11
  import { safeInsert, replaceSelectedNode, findSelectedNodeOfType, replaceParentNodeOfType } from 'prosemirror-utils';
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
12
 
@@ -5,7 +5,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
8
- import _regeneratorRuntime from "@babel/runtime/regenerator";
9
8
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
10
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
10
 
@@ -13,6 +12,8 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
13
12
 
14
13
  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; } }
15
14
 
15
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
16
+
16
17
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
18
 
18
19
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -1,8 +1,8 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
5
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import uuidV4 from 'uuid/v4';
7
7
  import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/ui';
8
8
  import { getMediaClient, isMediaBlobUrl as _isMediaBlobUrl, getAttrsFromUrl, isImageRepresentationReady } from '@atlaskit/media-client';
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
12
 
@@ -1,6 +1,5 @@
1
1
  import _get from "@babel/runtime/helpers/get";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
5
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
6
5
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -9,6 +8,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
9
8
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
10
9
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
11
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
12
12
 
13
13
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
14
 
@@ -1,8 +1,8 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
5
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  import { isImagePreview } from '@atlaskit/media-picker';
7
7
 
8
8
  var PickerFacade = /*#__PURE__*/function () {
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -14,6 +13,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
14
13
 
15
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
15
 
16
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
17
17
  import React from 'react';
18
18
  import ReactDOM from 'react-dom';
19
19
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
@@ -1,5 +1,5 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { getMediaClient } from '@atlaskit/media-client';
4
4
  import { findParentNodeOfType, removeParentNodeOfType, removeSelectedNode } from 'prosemirror-utils';
5
5
  export var getSelectedMediaContainerNodeAttrs = function getSelectedMediaContainerNodeAttrs(mediaPluginState) {
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
12
 
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
4
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -8,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
9
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
11
11
 
12
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
13
 
@@ -1,5 +1,5 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { getMediaClient } from '@atlaskit/media-client';
4
4
  export var checkMediaType = /*#__PURE__*/function () {
5
5
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(mediaNode, mediaClientConfig) {
@@ -1,6 +1,6 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
 
5
5
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
6
6
 
@@ -16,7 +16,7 @@ import { closeHistory } from 'prosemirror-history';
16
16
  import { Fragment, Node as PMNode, Slice } from 'prosemirror-model';
17
17
  import { TextSelection, NodeSelection } from 'prosemirror-state';
18
18
  import { findParentNodeOfType, hasParentNodeOfType, safeInsert } from 'prosemirror-utils';
19
- import { compose, insideTable, isParagraph, isText, isLinkMark, processRawValue } from '../../utils';
19
+ import { compose, insideTable, isParagraph, isText, isLinkMark, processRawValue, insideTableCell } from '../../utils';
20
20
  import { mapSlice } from '../../utils/slice';
21
21
  import { INPUT_METHOD } from '../analytics';
22
22
  import { insertCard, queueCardsFromChangedTr } from '../card/pm-plugins/doc';
@@ -644,7 +644,7 @@ export function insertIntoPanel(tr, slice, panel) {
644
644
  }
645
645
  export function handleRichText(slice) {
646
646
  return function (state, dispatch) {
647
- var _slice$content, _panelParentOverCurre;
647
+ var _slice$content, _slice$content2, _panelParentOverCurre;
648
648
 
649
649
  var _state$schema$nodes2 = state.schema.nodes,
650
650
  codeBlock = _state$schema$nodes2.codeBlock,
@@ -652,7 +652,8 @@ export function handleRichText(slice) {
652
652
  paragraph = _state$schema$nodes2.paragraph,
653
653
  panel = _state$schema$nodes2.panel;
654
654
  var selection = state.selection;
655
- var firstChildOfSlice = (_slice$content = slice.content) === null || _slice$content === void 0 ? void 0 : _slice$content.firstChild; // In case user is pasting inline code,
655
+ var firstChildOfSlice = (_slice$content = slice.content) === null || _slice$content === void 0 ? void 0 : _slice$content.firstChild;
656
+ var lastChildOfSlice = (_slice$content2 = slice.content) === null || _slice$content2 === void 0 ? void 0 : _slice$content2.lastChild; // In case user is pasting inline code,
656
657
  // any backtick ` immediately preceding it should be removed.
657
658
 
658
659
  var tr = state.tr;
@@ -667,7 +668,7 @@ export function handleRichText(slice) {
667
668
 
668
669
  closeHistory(tr);
669
670
  var isFirstChildListNode = isListNode(firstChildOfSlice);
670
- var isLastChildListNode = isListNode(firstChildOfSlice);
671
+ var isLastChildListNode = isListNode(lastChildOfSlice);
671
672
  var isSliceContentListNodes = isFirstChildListNode || isLastChildListNode; // We want to use safeInsert to insert invalid content, as it inserts at the closest non schema violating position
672
673
  // rather than spliting the selection parent node in half (which is what replaceSelection does)
673
674
  // Exception is paragraph and heading nodes, these should be split, provided their parent supports the pasted content
@@ -686,9 +687,23 @@ export function handleRichText(slice) {
686
687
  } else if (noNeedForSafeInsert) {
687
688
  tr.replaceSelection(slice);
688
689
  } else {
689
- // need safeInsert rather than replaceSelection, so that nodes aren't split in half
690
- // e.g. when pasting a layout into a table, replaceSelection splits the table in half and adds the layout in the middle
691
- tr = safeInsert(slice.content, tr.selection.$to.pos)(tr);
690
+ // need to scan the slice if there's a block node inside it
691
+ var doesBlockNodeExist = false;
692
+ slice.content.nodesBetween(0, slice.content.size, function (node, start) {
693
+ if (start >= slice.openStart && start <= slice.content.size - slice.openEnd && node.isBlock) {
694
+ doesBlockNodeExist = true;
695
+ return false;
696
+ }
697
+ });
698
+
699
+ if (insideTableCell(state) && !doesBlockNodeExist) {
700
+ // bring back the old code for inline nodes
701
+ insertIntoPanel(tr, slice, panel);
702
+ } else {
703
+ // need safeInsert rather than replaceSelection, so that nodes aren't split in half
704
+ // e.g. when pasting a layout into a table, replaceSelection splits the table in half and adds the layout in the middle
705
+ tr = safeInsert(slice.content, tr.selection.$to.pos)(tr);
706
+ }
692
707
  }
693
708
 
694
709
  tr.setStoredMarks([]);
@@ -1,5 +1,5 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { Slice, Fragment } from 'prosemirror-model';
4
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import { PluginKey } from 'prosemirror-state';
@@ -1,6 +1,6 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
4
 
5
5
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
6
 
@@ -254,9 +254,9 @@ export var handleMouseMove = function handleMouseMove(view, event, tableCellOpti
254
254
  var useMouseMoveOptimisation = tableCellOptimization && mouseMoveOptimization;
255
255
 
256
256
  if (!isResizeHandleDecoration(element) && isCell(element)) {
257
- var _positionColumn = getMousePositionHorizontalRelativeByElement(event, useMouseMoveOptimisation, elementContentRects, RESIZE_HANDLE_AREA_DECORATION_GAP);
257
+ var positionColumn = getMousePositionHorizontalRelativeByElement(event, useMouseMoveOptimisation, elementContentRects, RESIZE_HANDLE_AREA_DECORATION_GAP);
258
258
 
259
- if (_positionColumn !== null) {
259
+ if (positionColumn !== null) {
260
260
  var _state4 = view.state,
261
261
  _dispatch5 = view.dispatch;
262
262
 
@@ -268,7 +268,7 @@ export var handleMouseMove = function handleMouseMove(view, event, tableCellOpti
268
268
  var rect = findCellRectClosestToPos(_state4.doc.resolve(cellStartPosition));
269
269
 
270
270
  if (rect) {
271
- var columnEndIndexTarget = _positionColumn === 'left' ? rect.left : rect.right;
271
+ var columnEndIndexTarget = positionColumn === 'left' ? rect.left : rect.right;
272
272
 
273
273
  if (columnEndIndexTarget !== resizeHandleColumnIndex || !hasResizeHandler({
274
274
  target: element,
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _regeneratorRuntime from "@babel/runtime/regenerator";
4
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
5
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
6
5
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -10,6 +9,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
10
9
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
11
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
12
11
  var _excluded = ["contextIdentifierProvider"];
12
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
13
13
 
14
14
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
15
 
@@ -130,7 +130,7 @@ export var checkFormattingIsPresent = function checkFormattingIsPresent(state) {
130
130
  return marksArePresent(state) || blockStylingIsPresent(state);
131
131
  };
132
132
  export var usePreviousObjectState = function usePreviousObjectState(value) {
133
- var ref = useRef();
133
+ var ref = useRef([]);
134
134
  useEffect(function () {
135
135
  ref.current = value;
136
136
  });
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
4
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -8,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
9
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
11
11
 
12
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
13
 
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  import React, { useEffect, useState } from 'react';
6
6
  import { injectIntl } from 'react-intl-next';
7
7
  import { messages } from '../messages';
@@ -1,9 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
5
  var _excluded = ["value"];
6
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
 
8
8
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
9
9
 
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
12
 
@@ -1,5 +1,4 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import _regeneratorRuntime from "@babel/runtime/regenerator";
3
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
3
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
5
4
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
@@ -11,6 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
11
10
 
12
11
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
13
12
 
13
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
14
14
  import { isFieldset, isDateRange, isTabGroup, isTabField, isExpand, getFieldSerializer, getFieldDeserializer } from '@atlaskit/editor-common/extensions';
15
15
  import { getNameFromDuplicateField, isDuplicateField } from './utils';
16
16
 
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
12
 
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
 
11
11
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
12
 
@@ -1,5 +1,5 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import { Selection } from 'prosemirror-state';
4
4
  import { pluginKey as extensionPluginKey } from '../plugins/extension/plugin-key';
5
5
  import { forceAutoSave } from '../plugins/extension/commands';
@@ -1,5 +1,5 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  export function checkClipboardTypes(type, item) {
4
4
  var isDOMStringList = function isDOMStringList(t) {
5
5
  return !t.indexOf && !!t.contains;
@@ -1,5 +1,5 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import React from 'react';
4
4
  import Loadable from 'react-loadable';
5
5
  import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "166.0.0";
2
+ export var version = "166.0.3";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "166.0.0",
3
+ "version": "166.0.3",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "166.0.0",
3
+ "version": "166.0.3",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/radio": "^5.3.0",
70
70
  "@atlaskit/section-message": "^6.1.0",
71
71
  "@atlaskit/select": "^15.2.0",
72
- "@atlaskit/smart-user-picker": "^5.0.2",
72
+ "@atlaskit/smart-user-picker": "^5.1.0",
73
73
  "@atlaskit/spinner": "^15.1.0",
74
74
  "@atlaskit/status": "^1.1.0",
75
75
  "@atlaskit/tabs": "^13.2.0",
@@ -78,7 +78,7 @@
78
78
  "@atlaskit/textfield": "^5.1.0",
79
79
  "@atlaskit/theme": "^12.1.0",
80
80
  "@atlaskit/toggle": "^12.4.0",
81
- "@atlaskit/tokens": "^0.9.0",
81
+ "@atlaskit/tokens": "^0.10.0",
82
82
  "@atlaskit/tooltip": "^17.5.0",
83
83
  "@atlaskit/util-service-support": "^6.1.0",
84
84
  "@atlaskit/width-detector": "^4.0.0",
@@ -128,7 +128,7 @@
128
128
  },
129
129
  "peerDependencies": {
130
130
  "@atlaskit/media-core": "^33.0.0",
131
- "@atlaskit/smart-card": "^19.1.0",
131
+ "@atlaskit/smart-card": "^19.1.1",
132
132
  "react": "^16.8.0",
133
133
  "react-dom": "^16.8.0",
134
134
  "react-intl-next": "npm:react-intl@^5.18.1",
@@ -136,7 +136,7 @@
136
136
  },
137
137
  "devDependencies": {
138
138
  "@atlaskit/atlassian-navigation": "^2.2.0",
139
- "@atlaskit/breadcrumbs": "11.6.0",
139
+ "@atlaskit/breadcrumbs": "11.6.1",
140
140
  "@atlaskit/code": "^14.3.0",
141
141
  "@atlaskit/collab-provider": "7.4.0",
142
142
  "@atlaskit/docs": "*",
@@ -159,7 +159,7 @@
159
159
  "@atlaskit/section-message": "^6.1.0",
160
160
  "@atlaskit/share": "*",
161
161
  "@atlaskit/smart-card": "^19.1.0",
162
- "@atlaskit/smart-user-picker": "^5.0.2",
162
+ "@atlaskit/smart-user-picker": "^5.1.0",
163
163
  "@atlaskit/synchrony-test-helpers": "^2.3.0",
164
164
  "@atlaskit/textarea": "^4.3.0",
165
165
  "@atlaskit/toggle": "^12.4.0",
@@ -168,7 +168,7 @@
168
168
  "@atlaskit/visual-regression": "*",
169
169
  "@atlaskit/webdriver-runner": "*",
170
170
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
171
- "@atlassian/search-provider": "2.2.4",
171
+ "@atlassian/search-provider": "2.3.0",
172
172
  "@atlassian/ufo": "^0.1.0",
173
173
  "@emotion/jest": "^11.8.0",
174
174
  "@testing-library/dom": "^7.7.3",