@atlaskit/editor-plugin-paste 17.0.3 → 17.0.5

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 17.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`12a986f8ae94a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/12a986f8ae94a) -
8
+ Ship fix_copy_paste_external_media_renderer_to_editor permanently by always hoisting external
9
+ media copied from renderer markup. Remove its temporary Statsig experiment configuration;
10
+ consumers should remove any calls that read this experiment.
11
+ - Updated dependencies
12
+
13
+ ## 17.0.4
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 17.0.3
4
20
 
5
21
  ### Patch Changes
@@ -12,7 +12,6 @@ var _mediaSingle = require("@atlaskit/editor-common/media-single");
12
12
  var _utils = require("@atlaskit/editor-common/utils");
13
13
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
14
14
  var _mediaCommon = require("@atlaskit/media-common");
15
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
15
  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; }
17
16
  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; }
18
17
  /**
@@ -220,7 +219,7 @@ var unwrapNestedMediaElements = exports.unwrapNestedMediaElements = function unw
220
219
  // so we hoist the <img> to replace the entire mediaSingle wrapper
221
220
  // so the editor can treat it as a plain external image and render/re-upload it correctly.
222
221
  var mediaSingleWrapper = imageTag.closest('[data-node-type="mediaSingle"]');
223
- if (mediaSingleWrapper && shouldHoistFromMediaSingle(imageTag) && (0, _expValEquals.expValEquals)('fix_copy_paste_external_media_renderer_to_editor', 'isEnabled', true)) {
222
+ if (mediaSingleWrapper && shouldHoistFromMediaSingle(imageTag)) {
224
223
  // Hoist the <img> to replace the entire mediaSingle wrapper
225
224
  if (mediaSingleWrapper.parentElement) {
226
225
  mediaSingleWrapper.parentElement.insertBefore(imageTag, mediaSingleWrapper);
@@ -2,7 +2,6 @@ import { DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
2
2
  import { mapSlice, removeNestedEmptyEls, unwrap, walkUpTreeUntil } from '@atlaskit/editor-common/utils';
3
3
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
4
  import { getRandomHex } from '@atlaskit/media-common';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  /**
7
6
  * Ensure correct layout in nested mode
8
7
  *
@@ -216,7 +215,7 @@ export const unwrapNestedMediaElements = html => {
216
215
  // so we hoist the <img> to replace the entire mediaSingle wrapper
217
216
  // so the editor can treat it as a plain external image and render/re-upload it correctly.
218
217
  const mediaSingleWrapper = imageTag.closest('[data-node-type="mediaSingle"]');
219
- if (mediaSingleWrapper && shouldHoistFromMediaSingle(imageTag) && expValEquals('fix_copy_paste_external_media_renderer_to_editor', 'isEnabled', true)) {
218
+ if (mediaSingleWrapper && shouldHoistFromMediaSingle(imageTag)) {
220
219
  // Hoist the <img> to replace the entire mediaSingle wrapper
221
220
  if (mediaSingleWrapper.parentElement) {
222
221
  mediaSingleWrapper.parentElement.insertBefore(imageTag, mediaSingleWrapper);
@@ -5,7 +5,6 @@ import { DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
5
5
  import { mapSlice, removeNestedEmptyEls, unwrap, walkUpTreeUntil } from '@atlaskit/editor-common/utils';
6
6
  import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
7
7
  import { getRandomHex } from '@atlaskit/media-common';
8
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
8
  /**
10
9
  * Ensure correct layout in nested mode
11
10
  *
@@ -211,7 +210,7 @@ export var unwrapNestedMediaElements = function unwrapNestedMediaElements(html)
211
210
  // so we hoist the <img> to replace the entire mediaSingle wrapper
212
211
  // so the editor can treat it as a plain external image and render/re-upload it correctly.
213
212
  var mediaSingleWrapper = imageTag.closest('[data-node-type="mediaSingle"]');
214
- if (mediaSingleWrapper && shouldHoistFromMediaSingle(imageTag) && expValEquals('fix_copy_paste_external_media_renderer_to_editor', 'isEnabled', true)) {
213
+ if (mediaSingleWrapper && shouldHoistFromMediaSingle(imageTag)) {
215
214
  // Hoist the <img> to replace the entire mediaSingle wrapper
216
215
  if (mediaSingleWrapper.parentElement) {
217
216
  mediaSingleWrapper.parentElement.insertBefore(imageTag, mediaSingleWrapper);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "17.0.3",
3
+ "version": "17.0.5",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -19,7 +19,7 @@
19
19
  "sideEffects": false,
20
20
  "atlaskit:src": "src/index.ts",
21
21
  "dependencies": {
22
- "@atlaskit/adf-schema": "^57.1.0",
22
+ "@atlaskit/adf-schema": "^57.2.0",
23
23
  "@atlaskit/adf-utils": "^20.7.0",
24
24
  "@atlaskit/code": "^19.1.0",
25
25
  "@atlaskit/editor-markdown-transformer": "^6.2.0",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/editor-plugin-feature-flags": "^15.0.0",
33
33
  "@atlaskit/editor-plugin-list": "^18.0.0",
34
34
  "@atlaskit/editor-plugin-media": "^18.0.0",
35
- "@atlaskit/editor-plugin-mentions": "^18.0.0",
35
+ "@atlaskit/editor-plugin-mentions": "^18.1.0",
36
36
  "@atlaskit/editor-prosemirror": "^8.0.0",
37
37
  "@atlaskit/editor-tables": "^3.0.0",
38
38
  "@atlaskit/flag": "^18.4.0",
@@ -44,14 +44,14 @@
44
44
  "@atlaskit/platform-feature-experiments": "^0.3.0",
45
45
  "@atlaskit/platform-feature-flags": "^2.1.0",
46
46
  "@atlaskit/prosemirror-history": "^1.2.0",
47
- "@atlaskit/tmp-editor-statsig": "^162.0.0",
47
+ "@atlaskit/tmp-editor-statsig": "^164.0.0",
48
48
  "@atlaskit/tokens": "^16.8.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "lodash": "^4.17.21",
51
51
  "uuid": "^3.1.0"
52
52
  },
53
53
  "peerDependencies": {
54
- "@atlaskit/editor-common": "^120.2.0",
54
+ "@atlaskit/editor-common": "^120.3.0",
55
55
  "react": "^18.2.0 || ^19.2.0",
56
56
  "react-dom": "^18.2.0 || ^19.2.0",
57
57
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"