@atlaskit/editor-plugin-media-insert 3.1.4 → 3.1.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,14 @@
1
1
  # @atlaskit/editor-plugin-media-insert
2
2
 
3
+ ## 3.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#148355](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148355)
8
+ [`128902be1556b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/128902be1556b) -
9
+ [ux] ED-25117 Set image from link width based on image size
10
+ - Updated dependencies
11
+
3
12
  ## 3.1.4
4
13
 
5
14
  ### Patch Changes
@@ -20,10 +20,10 @@ var MediaCard = exports.MediaCard = function MediaCard(_ref) {
20
20
  var mediaAlt = intl.formatMessage(_messages.mediaInsertMessages.mediaAlt);
21
21
  var dimensions = _react.default.useMemo(function () {
22
22
  return {
23
- width: attrs.width,
24
- height: attrs.height
23
+ width: attrs.dimensions.width,
24
+ height: attrs.dimensions.height
25
25
  };
26
- }, [attrs.width, attrs.height]);
26
+ }, [attrs.dimensions.width, attrs.dimensions.height]);
27
27
  var identifier = _react.default.useMemo(function () {
28
28
  return {
29
29
  id: attrs.id,
@@ -149,8 +149,7 @@ function MediaFromURL(_ref) {
149
149
  payload: {
150
150
  id: uploadableFileUpfrontIds.id,
151
151
  collection: collection,
152
- height: dimensions.height,
153
- width: dimensions.width,
152
+ dimensions: dimensions,
154
153
  occurrenceKey: uploadableFileUpfrontIds.occurrenceKey,
155
154
  fileMimeType: mimeType
156
155
  }
@@ -14,10 +14,10 @@ export const MediaCard = ({
14
14
  const mediaAlt = intl.formatMessage(mediaInsertMessages.mediaAlt);
15
15
  const dimensions = React.useMemo(() => {
16
16
  return {
17
- width: attrs.width,
18
- height: attrs.height
17
+ width: attrs.dimensions.width,
18
+ height: attrs.dimensions.height
19
19
  };
20
- }, [attrs.width, attrs.height]);
20
+ }, [attrs.dimensions.width, attrs.dimensions.height]);
21
21
  const identifier = React.useMemo(() => ({
22
22
  id: attrs.id,
23
23
  mediaItemType: 'file',
@@ -126,8 +126,7 @@ export function MediaFromURL({
126
126
  payload: {
127
127
  id: uploadableFileUpfrontIds.id,
128
128
  collection,
129
- height: dimensions.height,
130
- width: dimensions.width,
129
+ dimensions,
131
130
  occurrenceKey: uploadableFileUpfrontIds.occurrenceKey,
132
131
  fileMimeType: mimeType
133
132
  }
@@ -13,10 +13,10 @@ export var MediaCard = function MediaCard(_ref) {
13
13
  var mediaAlt = intl.formatMessage(mediaInsertMessages.mediaAlt);
14
14
  var dimensions = React.useMemo(function () {
15
15
  return {
16
- width: attrs.width,
17
- height: attrs.height
16
+ width: attrs.dimensions.width,
17
+ height: attrs.dimensions.height
18
18
  };
19
- }, [attrs.width, attrs.height]);
19
+ }, [attrs.dimensions.width, attrs.dimensions.height]);
20
20
  var identifier = React.useMemo(function () {
21
21
  return {
22
22
  id: attrs.id,
@@ -138,8 +138,7 @@ export function MediaFromURL(_ref) {
138
138
  payload: {
139
139
  id: uploadableFileUpfrontIds.id,
140
140
  collection: collection,
141
- height: dimensions.height,
142
- width: dimensions.width,
141
+ dimensions: dimensions,
143
142
  occurrenceKey: uploadableFileUpfrontIds.occurrenceKey,
144
143
  fileMimeType: mimeType
145
144
  }
@@ -1,8 +1,10 @@
1
1
  export type OnInsertAttrs = {
2
2
  id: string;
3
3
  collection: string | undefined;
4
- height?: number;
5
- width?: number;
4
+ dimensions?: {
5
+ width: number;
6
+ height: number;
7
+ };
6
8
  occurrenceKey: string | undefined;
7
9
  fileMimeType: string;
8
10
  };
@@ -1,8 +1,10 @@
1
1
  export type OnInsertAttrs = {
2
2
  id: string;
3
3
  collection: string | undefined;
4
- height?: number;
5
- width?: number;
4
+ dimensions?: {
5
+ width: number;
6
+ height: number;
7
+ };
6
8
  occurrenceKey: string | undefined;
7
9
  fileMimeType: string;
8
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media-insert",
3
- "version": "3.1.4",
3
+ "version": "3.1.5",
4
4
  "description": "Media Insert plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@atlaskit/adf-schema": "^40.9.0",
27
27
  "@atlaskit/button": "^20.2.0",
28
- "@atlaskit/editor-common": "^93.0.0",
28
+ "@atlaskit/editor-common": "^93.1.0",
29
29
  "@atlaskit/editor-plugin-analytics": "^1.8.0",
30
30
  "@atlaskit/editor-plugin-media": "^1.34.0",
31
31
  "@atlaskit/editor-prosemirror": "6.0.0",