@atlaskit/editor-plugin-media 8.4.4 → 8.4.6

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,20 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 8.4.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 8.4.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9f7ed79776010`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9f7ed79776010) -
14
+ [EDF-2767] Better documentation on features that cannot be rolled back - starting on attribute
15
+ allowPixelResizing
16
+ - Updated dependencies
17
+
3
18
  ## 8.4.4
4
19
 
5
20
  ### Patch Changes
@@ -22,7 +22,7 @@ var _pluginKey = require("../pm-plugins/plugin-key");
22
22
  var _batchMediaNodeAttrs = require("../pm-plugins/utils/batchMediaNodeAttrs");
23
23
  var _mediaCommon = require("../pm-plugins/utils/media-common");
24
24
  var _excluded = ["authProvider"],
25
- _excluded2 = ["authProvider"];
25
+ _excluded2 = ["authProvider"]; // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
26
26
  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; }
27
27
  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; }
28
28
  var isMediaTypeSupported = function isMediaTypeSupported(type) {
@@ -531,6 +531,7 @@ var MediaNodeUpdater = exports.MediaNodeUpdater = /*#__PURE__*/function () {
531
531
  destination: {
532
532
  collection: currentCollectionName,
533
533
  authProvider: uploadMediaClientConfig.authProvider,
534
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
534
535
  occurrenceKey: (0, _v.default)()
535
536
  }
536
537
  });
@@ -680,6 +681,7 @@ var MediaNodeUpdater = exports.MediaNodeUpdater = /*#__PURE__*/function () {
680
681
  destination: {
681
682
  collection: currentCollectionName,
682
683
  authProvider: uploadMediaClientConfig.authProvider,
684
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
683
685
  occurrenceKey: (0, _v.default)()
684
686
  },
685
687
  traceContext: traceContext
@@ -45,7 +45,8 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
45
45
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
46
46
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
47
47
  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; }
48
- 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; } // Ignored via go/ees005
48
+ 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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
49
+ // Ignored via go/ees005
49
50
  // eslint-disable-next-line import/no-namespace
50
51
  var MEDIA_CONTENT_WRAP_CLASS_NAME = exports.MEDIA_CONTENT_WRAP_CLASS_NAME = 'media-content-wrap';
51
52
  var MEDIA_PLUGIN_IS_RESIZING_KEY = exports.MEDIA_PLUGIN_IS_RESIZING_KEY = 'mediaSinglePlugin.isResizing';
@@ -970,6 +971,7 @@ var createPlugin = exports.createPlugin = function createPlugin(_schema, options
970
971
  if (pos === null || pos === undefined) {
971
972
  return _view2.DecorationSet.create(state.doc, mediaNodes);
972
973
  }
974
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
973
975
  var dropPlaceholderKey = (0, _uuid.default)();
974
976
  var dropPlaceholders = [_view2.Decoration.widget(pos, function () {
975
977
  return createDropPlaceholder(intl, nodeViewPortalProviderAPI, dropPlaceholderKey, mediaOptions && mediaOptions.allowDropzoneDropLine);
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
3
  import uuidV4 from 'uuid/v4';
3
4
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
4
5
  import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
@@ -304,6 +305,7 @@ export class MediaNodeUpdater {
304
305
  destination: {
305
306
  collection: currentCollectionName,
306
307
  authProvider: uploadMediaClientConfig.authProvider,
308
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
307
309
  occurrenceKey: uuidV4()
308
310
  }
309
311
  });
@@ -375,6 +377,7 @@ export class MediaNodeUpdater {
375
377
  destination: {
376
378
  collection: currentCollectionName,
377
379
  authProvider: uploadMediaClientConfig.authProvider,
380
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
378
381
  occurrenceKey: uuidV4()
379
382
  },
380
383
  traceContext
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import assert from 'assert';
3
3
  import React from 'react';
4
4
  import { RawIntlProvider } from 'react-intl-next';
5
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
5
6
  import uuid from 'uuid';
6
7
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
7
8
  import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
@@ -858,6 +859,7 @@ export const createPlugin = (_schema, options, getIntl, pluginInjectionApi, node
858
859
  if (pos === null || pos === undefined) {
859
860
  return DecorationSet.create(state.doc, mediaNodes);
860
861
  }
862
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
861
863
  const dropPlaceholderKey = uuid();
862
864
  const dropPlaceholders = [Decoration.widget(pos, () => {
863
865
  return createDropPlaceholder(intl, nodeViewPortalProviderAPI, dropPlaceholderKey, mediaOptions && mediaOptions.allowDropzoneDropLine);
@@ -8,6 +8,7 @@ var _excluded = ["authProvider"],
8
8
  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
9
  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
10
  import _regeneratorRuntime from "@babel/runtime/regenerator";
11
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
11
12
  import uuidV4 from 'uuid/v4';
12
13
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
13
14
  import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '@atlaskit/editor-common/media-single';
@@ -524,6 +525,7 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
524
525
  destination: {
525
526
  collection: currentCollectionName,
526
527
  authProvider: uploadMediaClientConfig.authProvider,
528
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
527
529
  occurrenceKey: uuidV4()
528
530
  }
529
531
  });
@@ -673,6 +675,7 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
673
675
  destination: {
674
676
  collection: currentCollectionName,
675
677
  authProvider: uploadMediaClientConfig.authProvider,
678
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
676
679
  occurrenceKey: uuidV4()
677
680
  },
678
681
  traceContext: traceContext
@@ -11,6 +11,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
11
11
  import assert from 'assert';
12
12
  import React from 'react';
13
13
  import { RawIntlProvider } from 'react-intl-next';
14
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
14
15
  import uuid from 'uuid';
15
16
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
16
17
  import { mediaInlineImagesEnabled } from '@atlaskit/editor-common/media-inline';
@@ -962,6 +963,7 @@ export var createPlugin = function createPlugin(_schema, options, getIntl, plugi
962
963
  if (pos === null || pos === undefined) {
963
964
  return DecorationSet.create(state.doc, mediaNodes);
964
965
  }
966
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
965
967
  var dropPlaceholderKey = uuid();
966
968
  var dropPlaceholders = [Decoration.widget(pos, function () {
967
969
  return createDropPlaceholder(intl, nodeViewPortalProviderAPI, dropPlaceholderKey, mediaOptions && mediaOptions.allowDropzoneDropLine);
@@ -35,17 +35,17 @@ export interface MediaPluginOptions {
35
35
  allowMediaInlineImages?: boolean;
36
36
  allowMediaSingle?: boolean | MediaSingleOptions;
37
37
  allowMediaSingleEditable?: boolean;
38
+ /**
39
+ * @caution
40
+ * This attribute is used to enable the pixel resizing experience.
41
+ * When enabled it cannot be rolled back -> see PIR-27544 https://ops.internal.atlassian.com/jira/browse/PIR-27544
42
+ * Rollback action causes dataloss, no way to retrieve the original width, as fallback will always be 100
43
+ */
38
44
  allowPixelResizing?: boolean;
39
45
  allowRemoteDimensionsFetch?: boolean;
40
46
  allowResizing?: boolean;
41
47
  allowResizingInTables?: boolean;
42
48
  allowTemplatePlaceholders?: boolean | PlaceholderTextOptions;
43
- /**
44
- * When enabled, prevents automatic focus/selection of media nodes after upload completion.
45
- * The existing focus will be preserved instead of switching to the uploaded media.
46
- * @default false
47
- */
48
- preventAutoFocusOnUpload?: boolean;
49
49
  altTextValidator?: (value: string) => string[];
50
50
  customDropzoneContainer?: HTMLElement;
51
51
  customMediaPicker?: CustomMediaPicker;
@@ -77,6 +77,12 @@ export interface MediaPluginOptions {
77
77
  isExternalMediaUploadDisabled?: boolean;
78
78
  mediaShallowCopyScope?: MediaCopyScope;
79
79
  onCommentButtonMount?: () => void;
80
+ /**
81
+ * When enabled, prevents automatic focus/selection of media nodes after upload completion.
82
+ * The existing focus will be preserved instead of switching to the uploaded media.
83
+ * @default false
84
+ */
85
+ preventAutoFocusOnUpload?: boolean;
80
86
  provider?: Providers['mediaProvider'];
81
87
  syncProvider?: MediaProvider;
82
88
  uploadErrorHandler?: (state: MediaState) => void;
@@ -146,6 +152,12 @@ export type MediaFloatingToolbarOptions = {
146
152
  allowLinking?: boolean;
147
153
  allowMediaInline?: boolean;
148
154
  allowMediaInlineImages?: boolean;
155
+ /**
156
+ * @caution
157
+ * This attribute is used to enable the pixel resizing experience.
158
+ * When enabled it cannot be rolled back -> see PIR-27544 https://ops.internal.atlassian.com/jira/browse/PIR-27544
159
+ * Rollback action causes dataloss, no way to retrieve the original width, as fallback will always be 100
160
+ **/
149
161
  allowPixelResizing?: boolean;
150
162
  allowResizing?: boolean;
151
163
  allowResizingInTables?: boolean;
@@ -35,17 +35,17 @@ export interface MediaPluginOptions {
35
35
  allowMediaInlineImages?: boolean;
36
36
  allowMediaSingle?: boolean | MediaSingleOptions;
37
37
  allowMediaSingleEditable?: boolean;
38
+ /**
39
+ * @caution
40
+ * This attribute is used to enable the pixel resizing experience.
41
+ * When enabled it cannot be rolled back -> see PIR-27544 https://ops.internal.atlassian.com/jira/browse/PIR-27544
42
+ * Rollback action causes dataloss, no way to retrieve the original width, as fallback will always be 100
43
+ */
38
44
  allowPixelResizing?: boolean;
39
45
  allowRemoteDimensionsFetch?: boolean;
40
46
  allowResizing?: boolean;
41
47
  allowResizingInTables?: boolean;
42
48
  allowTemplatePlaceholders?: boolean | PlaceholderTextOptions;
43
- /**
44
- * When enabled, prevents automatic focus/selection of media nodes after upload completion.
45
- * The existing focus will be preserved instead of switching to the uploaded media.
46
- * @default false
47
- */
48
- preventAutoFocusOnUpload?: boolean;
49
49
  altTextValidator?: (value: string) => string[];
50
50
  customDropzoneContainer?: HTMLElement;
51
51
  customMediaPicker?: CustomMediaPicker;
@@ -77,6 +77,12 @@ export interface MediaPluginOptions {
77
77
  isExternalMediaUploadDisabled?: boolean;
78
78
  mediaShallowCopyScope?: MediaCopyScope;
79
79
  onCommentButtonMount?: () => void;
80
+ /**
81
+ * When enabled, prevents automatic focus/selection of media nodes after upload completion.
82
+ * The existing focus will be preserved instead of switching to the uploaded media.
83
+ * @default false
84
+ */
85
+ preventAutoFocusOnUpload?: boolean;
80
86
  provider?: Providers['mediaProvider'];
81
87
  syncProvider?: MediaProvider;
82
88
  uploadErrorHandler?: (state: MediaState) => void;
@@ -146,6 +152,12 @@ export type MediaFloatingToolbarOptions = {
146
152
  allowLinking?: boolean;
147
153
  allowMediaInline?: boolean;
148
154
  allowMediaInlineImages?: boolean;
155
+ /**
156
+ * @caution
157
+ * This attribute is used to enable the pixel resizing experience.
158
+ * When enabled it cannot be rolled back -> see PIR-27544 https://ops.internal.atlassian.com/jira/browse/PIR-27544
159
+ * Rollback action causes dataloss, no way to retrieve the original width, as fallback will always be 100
160
+ **/
149
161
  allowPixelResizing?: boolean;
150
162
  allowResizing?: boolean;
151
163
  allowResizingInTables?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "8.4.4",
3
+ "version": "8.4.6",
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.3.2",
33
33
  "@atlaskit/analytics-namespaced-context": "^7.1.0",
34
34
  "@atlaskit/analytics-next": "^11.1.0",
35
- "@atlaskit/button": "^23.5.0",
35
+ "@atlaskit/button": "^23.6.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.2.0",
@@ -44,7 +44,7 @@
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",
47
- "@atlaskit/editor-plugin-interaction": "^9.0.0",
47
+ "@atlaskit/editor-plugin-interaction": "^10.0.0",
48
48
  "@atlaskit/editor-plugin-selection": "^6.1.0",
49
49
  "@atlaskit/editor-plugin-toolbar": "^3.4.0",
50
50
  "@atlaskit/editor-plugin-width": "^7.0.0",
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/editor-tables": "^2.9.0",
54
54
  "@atlaskit/form": "^14.2.0",
55
55
  "@atlaskit/icon": "^28.5.0",
56
- "@atlaskit/icon-lab": "^5.10.0",
56
+ "@atlaskit/icon-lab": "^5.11.0",
57
57
  "@atlaskit/media-card": "^79.6.0",
58
58
  "@atlaskit/media-client": "^35.5.0",
59
59
  "@atlaskit/media-client-react": "^4.1.0",
@@ -63,12 +63,12 @@
63
63
  "@atlaskit/media-ui": "^28.7.0",
64
64
  "@atlaskit/media-viewer": "^52.4.0",
65
65
  "@atlaskit/platform-feature-flags": "^1.1.0",
66
- "@atlaskit/primitives": "^16.0.0",
66
+ "@atlaskit/primitives": "^16.1.0",
67
67
  "@atlaskit/textfield": "^8.0.0",
68
68
  "@atlaskit/theme": "^21.0.0",
69
- "@atlaskit/tmp-editor-statsig": "^13.19.0",
70
- "@atlaskit/tokens": "^7.0.0",
71
- "@atlaskit/tooltip": "^20.6.0",
69
+ "@atlaskit/tmp-editor-statsig": "^13.32.0",
70
+ "@atlaskit/tokens": "^8.0.0",
71
+ "@atlaskit/tooltip": "^20.8.0",
72
72
  "@babel/runtime": "^7.0.0",
73
73
  "@emotion/react": "^11.7.1",
74
74
  "bind-event-listener": "^3.0.0",
@@ -78,7 +78,7 @@
78
78
  "uuid": "^3.1.0"
79
79
  },
80
80
  "peerDependencies": {
81
- "@atlaskit/editor-common": "^110.18.0",
81
+ "@atlaskit/editor-common": "^110.24.0",
82
82
  "@atlaskit/media-core": "^37.0.0",
83
83
  "react": "^18.2.0",
84
84
  "react-dom": "^18.2.0",