@atlaskit/editor-plugin-media 8.6.0 → 8.6.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 8.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b6a737b41d065`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b6a737b41d065) -
|
|
8
|
+
Clean up experiment platform_editor_fix_clone_nesting_exp
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 8.6.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -485,19 +485,14 @@ var MediaPluginStateImplementation = exports.MediaPluginStateImplementation = /*
|
|
|
485
485
|
return (0, _createClass2.default)(MediaPluginStateImplementation, [{
|
|
486
486
|
key: "clone",
|
|
487
487
|
value: function clone() {
|
|
488
|
+
var _originalTarget;
|
|
488
489
|
var clonedAt = (performance || Date).now();
|
|
489
490
|
|
|
490
491
|
// Prevent double wrapping
|
|
491
492
|
// If clone is repeatedly called, we want to proxy the underlying MediaPluginStateImplementation target, rather than the proxy itself
|
|
492
493
|
// If we proxy the proxy, then calling get in future will need to recursively unwrap proxies to find the original target, which causes performance issues
|
|
493
494
|
// Instead, we check if there is an original target stored on "this", and if so, we use that as the proxy target instead
|
|
494
|
-
|
|
495
|
-
var proxyTarget = this;
|
|
496
|
-
var originalTarget = this.originalTarget;
|
|
497
|
-
if (originalTarget !== undefined && (0, _expValEquals.expValEquals)('platform_editor_fix_clone_nesting_exp', 'isEnabled', true)) {
|
|
498
|
-
proxyTarget = originalTarget;
|
|
499
|
-
}
|
|
500
|
-
return new Proxy(proxyTarget, {
|
|
495
|
+
return new Proxy((_originalTarget = this.originalTarget) !== null && _originalTarget !== void 0 ? _originalTarget : this, {
|
|
501
496
|
get: function get(target, prop, receiver) {
|
|
502
497
|
if (prop === 'singletonCreatedAt') {
|
|
503
498
|
return clonedAt;
|
|
@@ -18,10 +18,10 @@ import { isFileIdentifier } from '@atlaskit/media-client';
|
|
|
18
18
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
|
-
import { updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
|
|
22
21
|
// Ignored via go/ees005
|
|
23
22
|
// eslint-disable-next-line import/no-namespace
|
|
24
23
|
import * as helpers from '../pm-plugins/commands/helpers';
|
|
24
|
+
import { updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
|
|
25
25
|
import { getIdentifier, getMediaFromSupportedMediaNodesFromSelection, isNodeDoubleClickSupportedInLivePagesViewMode, removeMediaNode, splitMediaGroup } from '../pm-plugins/utils/media-common';
|
|
26
26
|
import { insertMediaGroupNode, insertMediaInlineNode } from '../pm-plugins/utils/media-files';
|
|
27
27
|
import { getMediaNodeInsertionType } from '../pm-plugins/utils/media-inline';
|
|
@@ -462,19 +462,14 @@ export class MediaPluginStateImplementation {
|
|
|
462
462
|
this.singletonCreatedAt = (performance || Date).now();
|
|
463
463
|
}
|
|
464
464
|
clone() {
|
|
465
|
+
var _originalTarget;
|
|
465
466
|
const clonedAt = (performance || Date).now();
|
|
466
467
|
|
|
467
468
|
// Prevent double wrapping
|
|
468
469
|
// If clone is repeatedly called, we want to proxy the underlying MediaPluginStateImplementation target, rather than the proxy itself
|
|
469
470
|
// If we proxy the proxy, then calling get in future will need to recursively unwrap proxies to find the original target, which causes performance issues
|
|
470
471
|
// Instead, we check if there is an original target stored on "this", and if so, we use that as the proxy target instead
|
|
471
|
-
|
|
472
|
-
let proxyTarget = this;
|
|
473
|
-
const originalTarget = this.originalTarget;
|
|
474
|
-
if (originalTarget !== undefined && expValEquals('platform_editor_fix_clone_nesting_exp', 'isEnabled', true)) {
|
|
475
|
-
proxyTarget = originalTarget;
|
|
476
|
-
}
|
|
477
|
-
return new Proxy(proxyTarget, {
|
|
472
|
+
return new Proxy((_originalTarget = this.originalTarget) !== null && _originalTarget !== void 0 ? _originalTarget : this, {
|
|
478
473
|
get(target, prop, receiver) {
|
|
479
474
|
if (prop === 'singletonCreatedAt') {
|
|
480
475
|
return clonedAt;
|
|
@@ -27,10 +27,10 @@ import { isFileIdentifier } from '@atlaskit/media-client';
|
|
|
27
27
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
28
28
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
29
29
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
30
|
-
import { updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
|
|
31
30
|
// Ignored via go/ees005
|
|
32
31
|
// eslint-disable-next-line import/no-namespace
|
|
33
32
|
import * as helpers from '../pm-plugins/commands/helpers';
|
|
33
|
+
import { updateMediaNodeAttrs } from '../pm-plugins/commands/helpers';
|
|
34
34
|
import { getIdentifier, getMediaFromSupportedMediaNodesFromSelection, isNodeDoubleClickSupportedInLivePagesViewMode, removeMediaNode, splitMediaGroup } from '../pm-plugins/utils/media-common';
|
|
35
35
|
import { insertMediaGroupNode, insertMediaInlineNode } from '../pm-plugins/utils/media-files';
|
|
36
36
|
import { getMediaNodeInsertionType } from '../pm-plugins/utils/media-inline';
|
|
@@ -477,19 +477,14 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
477
477
|
return _createClass(MediaPluginStateImplementation, [{
|
|
478
478
|
key: "clone",
|
|
479
479
|
value: function clone() {
|
|
480
|
+
var _originalTarget;
|
|
480
481
|
var clonedAt = (performance || Date).now();
|
|
481
482
|
|
|
482
483
|
// Prevent double wrapping
|
|
483
484
|
// If clone is repeatedly called, we want to proxy the underlying MediaPluginStateImplementation target, rather than the proxy itself
|
|
484
485
|
// If we proxy the proxy, then calling get in future will need to recursively unwrap proxies to find the original target, which causes performance issues
|
|
485
486
|
// Instead, we check if there is an original target stored on "this", and if so, we use that as the proxy target instead
|
|
486
|
-
|
|
487
|
-
var proxyTarget = this;
|
|
488
|
-
var originalTarget = this.originalTarget;
|
|
489
|
-
if (originalTarget !== undefined && expValEquals('platform_editor_fix_clone_nesting_exp', 'isEnabled', true)) {
|
|
490
|
-
proxyTarget = originalTarget;
|
|
491
|
-
}
|
|
492
|
-
return new Proxy(proxyTarget, {
|
|
487
|
+
return new Proxy((_originalTarget = this.originalTarget) !== null && _originalTarget !== void 0 ? _originalTarget : this, {
|
|
493
488
|
get: function get(target, prop, receiver) {
|
|
494
489
|
if (prop === 'singletonCreatedAt') {
|
|
495
490
|
return clonedAt;
|
|
@@ -12,7 +12,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
12
12
|
import { type Identifier } from '@atlaskit/media-client';
|
|
13
13
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
14
14
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
15
|
-
import type { MediaOptions, MediaState, MediaStateEventSubscriber
|
|
15
|
+
import type { getPosHandlerNode as ProsemirrorGetPosHandler, MediaOptions, MediaState, MediaStateEventSubscriber } from '../types';
|
|
16
16
|
import type { MediaPluginOptions } from '../types/media-plugin-options';
|
|
17
17
|
import PickerFacade from './picker-facade';
|
|
18
18
|
import type { MediaNodeWithPosHandler, MediaPluginState } from './types';
|
|
@@ -64,7 +64,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
64
64
|
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
65
65
|
singletonCreatedAt: number;
|
|
66
66
|
constructor(state: EditorState, options: MediaPluginOptions, mediaOptions: MediaOptions | undefined, dispatch: Dispatch | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined);
|
|
67
|
-
clone():
|
|
67
|
+
clone(): MediaPluginStateImplementation;
|
|
68
68
|
subscribeToUploadInProgressState(fn: (isUploading: boolean) => void): void;
|
|
69
69
|
unsubscribeFromUploadInProgressState(fn: (isUploading: boolean) => void): void;
|
|
70
70
|
private previousMediaProvider;
|
|
@@ -12,7 +12,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
12
12
|
import { type Identifier } from '@atlaskit/media-client';
|
|
13
13
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
14
14
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
15
|
-
import type { MediaOptions, MediaState, MediaStateEventSubscriber
|
|
15
|
+
import type { getPosHandlerNode as ProsemirrorGetPosHandler, MediaOptions, MediaState, MediaStateEventSubscriber } from '../types';
|
|
16
16
|
import type { MediaPluginOptions } from '../types/media-plugin-options';
|
|
17
17
|
import PickerFacade from './picker-facade';
|
|
18
18
|
import type { MediaNodeWithPosHandler, MediaPluginState } from './types';
|
|
@@ -64,7 +64,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
64
64
|
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
65
65
|
singletonCreatedAt: number;
|
|
66
66
|
constructor(state: EditorState, options: MediaPluginOptions, mediaOptions: MediaOptions | undefined, dispatch: Dispatch | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined);
|
|
67
|
-
clone():
|
|
67
|
+
clone(): MediaPluginStateImplementation;
|
|
68
68
|
subscribeToUploadInProgressState(fn: (isUploading: boolean) => void): void;
|
|
69
69
|
unsubscribeFromUploadInProgressState(fn: (isUploading: boolean) => void): void;
|
|
70
70
|
private previousMediaProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "8.6.
|
|
3
|
+
"version": "8.6.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@atlaskit/editor-prosemirror": "^7.2.0",
|
|
52
52
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
53
53
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
54
|
-
"@atlaskit/form": "^15.
|
|
55
|
-
"@atlaskit/icon": "^29.
|
|
56
|
-
"@atlaskit/icon-lab": "^5.
|
|
54
|
+
"@atlaskit/form": "^15.1.0",
|
|
55
|
+
"@atlaskit/icon": "^29.3.0",
|
|
56
|
+
"@atlaskit/icon-lab": "^5.13.0",
|
|
57
57
|
"@atlaskit/media-card": "^79.11.0",
|
|
58
58
|
"@atlaskit/media-client": "^35.7.0",
|
|
59
59
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/primitives": "^16.4.0",
|
|
67
67
|
"@atlaskit/textfield": "^8.2.0",
|
|
68
68
|
"@atlaskit/theme": "^21.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^15.13.0",
|
|
70
70
|
"@atlaskit/tokens": "^8.6.0",
|
|
71
71
|
"@atlaskit/tooltip": "^20.11.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"uuid": "^3.1.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@atlaskit/editor-common": "^110.
|
|
81
|
+
"@atlaskit/editor-common": "^110.46.0",
|
|
82
82
|
"@atlaskit/media-core": "^37.0.0",
|
|
83
83
|
"react": "^18.2.0",
|
|
84
84
|
"react-dom": "^18.2.0",
|