@atlaskit/editor-plugin-media 8.5.2 → 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,24 @@
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
+
11
+ ## 8.6.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`762b79e21f96a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/762b79e21f96a) -
16
+ Migrated and cleaned up legacy iconography usage.
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 8.5.2
4
23
 
5
24
  ### Patch 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
- // eslint-disable-next-line @typescript-eslint/no-this-alias -- This is required while this is behind a feature-gate. Once the feature-gate is removed, we can inline proxyTarget as "(this as unknown as { originalTarget?: typeof proxyTarget }).originalTarget ?? this"
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;
@@ -8,7 +8,6 @@ exports.default = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
- var _icons = require("@atlaskit/editor-common/icons");
12
11
  var _media = require("@atlaskit/editor-common/media");
13
12
  var _styles = require("@atlaskit/editor-common/styles");
14
13
  var _ui = require("@atlaskit/editor-common/ui");
@@ -20,7 +19,6 @@ var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-d
20
19
  var _strokeWeightLarge = _interopRequireDefault(require("@atlaskit/icon/core/stroke-weight-large"));
21
20
  var _strokeWeightMedium = _interopRequireDefault(require("@atlaskit/icon/core/stroke-weight-medium"));
22
21
  var _strokeWeightSmall = _interopRequireDefault(require("@atlaskit/icon/core/stroke-weight-small"));
23
- var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
24
22
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
25
23
  var _compiled = require("@atlaskit/primitives/compiled");
26
24
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
@@ -314,8 +312,7 @@ var ImageBorder = function ImageBorder(_ref) {
314
312
  iconBefore: (0, _react2.jsx)(_border.default, {
315
313
  color: "currentColor",
316
314
  label: "",
317
- spacing: "spacious",
318
- LEGACY_fallbackIcon: _icons.BorderIcon
315
+ spacing: "spacious"
319
316
  }),
320
317
  title: enabled ? formatMessage(_media.imageBorderMessages.removeBorder) : formatMessage(_media.imageBorderMessages.addBorder)
321
318
  }), (0, _react2.jsx)("div", {
@@ -334,7 +331,6 @@ var ImageBorder = function ImageBorder(_ref) {
334
331
  color: "currentColor",
335
332
  spacing: "spacious",
336
333
  label: "",
337
- LEGACY_fallbackIcon: _chevronDown2.default,
338
334
  size: "small"
339
335
  }),
340
336
  onClick: function onClick() {
@@ -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
- // eslint-disable-next-line @typescript-eslint/no-this-alias -- This is required while this is behind a feature-gate. Once the feature-gate is removed, we can inline proxyTarget as "(this as unknown as { originalTarget?: typeof proxyTarget }).originalTarget ?? this"
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;
@@ -6,7 +6,6 @@ import { useCallback, useEffect, useRef, useState } from 'react';
6
6
 
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { jsx } from '@emotion/react';
9
- import { BorderIcon as LegacyBorderIcon } from '@atlaskit/editor-common/icons';
10
9
  import { imageBorderMessages as messages } from '@atlaskit/editor-common/media';
11
10
  import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
12
11
  import { Popup } from '@atlaskit/editor-common/ui';
@@ -18,7 +17,6 @@ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
18
17
  import StrokeWeightLargeIcon from '@atlaskit/icon/core/stroke-weight-large';
19
18
  import StrokeWeightMediumIcon from '@atlaskit/icon/core/stroke-weight-medium';
20
19
  import StrokeWeightSmallIcon from '@atlaskit/icon/core/stroke-weight-small';
21
- import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
22
20
  import { fg } from '@atlaskit/platform-feature-flags';
23
21
  import { Text } from '@atlaskit/primitives/compiled';
24
22
  import Tooltip from '@atlaskit/tooltip';
@@ -287,8 +285,7 @@ const ImageBorder = ({
287
285
  iconBefore: jsx(BorderIcon, {
288
286
  color: "currentColor",
289
287
  label: "",
290
- spacing: "spacious",
291
- LEGACY_fallbackIcon: LegacyBorderIcon
288
+ spacing: "spacious"
292
289
  }),
293
290
  title: enabled ? formatMessage(messages.removeBorder) : formatMessage(messages.addBorder)
294
291
  }), jsx("div", {
@@ -307,7 +304,6 @@ const ImageBorder = ({
307
304
  color: "currentColor",
308
305
  spacing: "spacious",
309
306
  label: "",
310
- LEGACY_fallbackIcon: ExpandIcon,
311
307
  size: "small"
312
308
  }),
313
309
  onClick: () => {
@@ -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
- // eslint-disable-next-line @typescript-eslint/no-this-alias -- This is required while this is behind a feature-gate. Once the feature-gate is removed, we can inline proxyTarget as "(this as unknown as { originalTarget?: typeof proxyTarget }).originalTarget ?? this"
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;
@@ -7,7 +7,6 @@ import { useCallback, useEffect, useRef, useState } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
- import { BorderIcon as LegacyBorderIcon } from '@atlaskit/editor-common/icons';
11
10
  import { imageBorderMessages as messages } from '@atlaskit/editor-common/media';
12
11
  import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
13
12
  import { Popup } from '@atlaskit/editor-common/ui';
@@ -19,7 +18,6 @@ import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
19
18
  import StrokeWeightLargeIcon from '@atlaskit/icon/core/stroke-weight-large';
20
19
  import StrokeWeightMediumIcon from '@atlaskit/icon/core/stroke-weight-medium';
21
20
  import StrokeWeightSmallIcon from '@atlaskit/icon/core/stroke-weight-small';
22
- import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
23
21
  import { fg } from '@atlaskit/platform-feature-flags';
24
22
  import { Text } from '@atlaskit/primitives/compiled';
25
23
  import Tooltip from '@atlaskit/tooltip';
@@ -306,8 +304,7 @@ var ImageBorder = function ImageBorder(_ref) {
306
304
  iconBefore: jsx(BorderIcon, {
307
305
  color: "currentColor",
308
306
  label: "",
309
- spacing: "spacious",
310
- LEGACY_fallbackIcon: LegacyBorderIcon
307
+ spacing: "spacious"
311
308
  }),
312
309
  title: enabled ? formatMessage(messages.removeBorder) : formatMessage(messages.addBorder)
313
310
  }), jsx("div", {
@@ -326,7 +323,6 @@ var ImageBorder = function ImageBorder(_ref) {
326
323
  color: "currentColor",
327
324
  spacing: "spacious",
328
325
  label: "",
329
- LEGACY_fallbackIcon: ExpandIcon,
330
326
  size: "small"
331
327
  }),
332
328
  onClick: function onClick() {
@@ -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, getPosHandlerNode as ProsemirrorGetPosHandler } from '../types';
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(): this;
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, getPosHandlerNode as ProsemirrorGetPosHandler } from '../types';
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(): this;
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.5.2",
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",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/adf-schema": "^51.5.0",
33
33
  "@atlaskit/analytics-namespaced-context": "^7.2.0",
34
34
  "@atlaskit/analytics-next": "^11.1.0",
35
- "@atlaskit/button": "^23.7.0",
35
+ "@atlaskit/button": "^23.8.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
38
38
  "@atlaskit/editor-plugin-annotation": "^6.3.0",
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/editor-plugin-decorations": "^6.1.0",
41
41
  "@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
42
42
  "@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
43
- "@atlaskit/editor-plugin-floating-toolbar": "^8.2.0",
43
+ "@atlaskit/editor-plugin-floating-toolbar": "^8.3.0",
44
44
  "@atlaskit/editor-plugin-focus": "^5.0.0",
45
45
  "@atlaskit/editor-plugin-grid": "^6.0.0",
46
46
  "@atlaskit/editor-plugin-guideline": "^6.0.0",
@@ -51,10 +51,10 @@
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.0.0",
55
- "@atlaskit/icon": "^29.1.0",
56
- "@atlaskit/icon-lab": "^5.12.0",
57
- "@atlaskit/media-card": "^79.10.0",
54
+ "@atlaskit/form": "^15.1.0",
55
+ "@atlaskit/icon": "^29.3.0",
56
+ "@atlaskit/icon-lab": "^5.13.0",
57
+ "@atlaskit/media-card": "^79.11.0",
58
58
  "@atlaskit/media-client": "^35.7.0",
59
59
  "@atlaskit/media-client-react": "^4.1.0",
60
60
  "@atlaskit/media-common": "^12.3.0",
@@ -66,8 +66,8 @@
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.12.0",
70
- "@atlaskit/tokens": "^8.5.0",
69
+ "@atlaskit/tmp-editor-statsig": "^15.13.0",
70
+ "@atlaskit/tokens": "^8.6.0",
71
71
  "@atlaskit/tooltip": "^20.11.0",
72
72
  "@babel/runtime": "^7.0.0",
73
73
  "@emotion/react": "^11.7.1",
@@ -78,7 +78,7 @@
78
78
  "uuid": "^3.1.0"
79
79
  },
80
80
  "peerDependencies": {
81
- "@atlaskit/editor-common": "^110.44.0",
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",