@atlaskit/renderer 108.6.11 → 108.7.0

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,15 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5f028fb62a1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f028fb62a1) - ED-19038 added mediaSingle.widthType support to renderer.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 108.6.11
4
14
 
5
15
  ### Patch Changes
@@ -55,7 +55,8 @@ var MediaSingle = function MediaSingle(props) {
55
55
  isInsideOfBlockNode = props.isInsideOfBlockNode,
56
56
  layout = props.layout,
57
57
  children = props.children,
58
- pctWidth = props.width;
58
+ widthAttr = props.width,
59
+ widthType = props.widthType;
59
60
  var isCaptionsFlaggedOn = (0, _mediaCommon.getMediaFeatureFlag)('captions', featureFlags);
60
61
  var _React$useState = _react.default.useState({
61
62
  width: 0,
@@ -163,7 +164,10 @@ var MediaSingle = function MediaSingle(props) {
163
164
  height: height,
164
165
  lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
165
166
  containerWidth: containerWidth,
166
- pctWidth: pctWidth,
167
+ size: {
168
+ width: widthAttr,
169
+ widthType: widthType
170
+ },
167
171
  fullWidthMode: isFullWidth
168
172
  }, (0, _react2.jsx)(_react.Fragment, null, mediaComponent), isCaptionsFlaggedOn && caption);
169
173
  };
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
55
55
  var DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "108.6.11";
58
+ var packageVersion = "108.7.0";
59
59
  var Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.11",
3
+ "version": "108.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -42,7 +42,8 @@ const MediaSingle = props => {
42
42
  isInsideOfBlockNode,
43
43
  layout,
44
44
  children,
45
- width: pctWidth
45
+ width: widthAttr,
46
+ widthType
46
47
  } = props;
47
48
  const isCaptionsFlaggedOn = getMediaFeatureFlag('captions', featureFlags);
48
49
  const [externalImageDimensions, setExternalImageDimensions] = React.useState({
@@ -148,7 +149,10 @@ const MediaSingle = props => {
148
149
  height: height,
149
150
  lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
150
151
  containerWidth: containerWidth,
151
- pctWidth: pctWidth,
152
+ size: {
153
+ width: widthAttr,
154
+ widthType
155
+ },
152
156
  fullWidthMode: isFullWidth
153
157
  }, jsx(Fragment, null, mediaComponent), isCaptionsFlaggedOn && caption);
154
158
  };
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
35
35
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
36
36
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
37
37
  const packageName = "@atlaskit/renderer";
38
- const packageVersion = "108.6.11";
38
+ const packageVersion = "108.7.0";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.11",
3
+ "version": "108.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -43,7 +43,8 @@ var MediaSingle = function MediaSingle(props) {
43
43
  isInsideOfBlockNode = props.isInsideOfBlockNode,
44
44
  layout = props.layout,
45
45
  children = props.children,
46
- pctWidth = props.width;
46
+ widthAttr = props.width,
47
+ widthType = props.widthType;
47
48
  var isCaptionsFlaggedOn = getMediaFeatureFlag('captions', featureFlags);
48
49
  var _React$useState = React.useState({
49
50
  width: 0,
@@ -151,7 +152,10 @@ var MediaSingle = function MediaSingle(props) {
151
152
  height: height,
152
153
  lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
153
154
  containerWidth: containerWidth,
154
- pctWidth: pctWidth,
155
+ size: {
156
+ width: widthAttr,
157
+ widthType: widthType
158
+ },
155
159
  fullWidthMode: isFullWidth
156
160
  }, jsx(Fragment, null, mediaComponent), isCaptionsFlaggedOn && caption);
157
161
  };
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
45
45
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  var packageName = "@atlaskit/renderer";
48
- var packageVersion = "108.6.11";
48
+ var packageVersion = "108.7.0";
49
49
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
50
50
  _inherits(Renderer, _PureComponent);
51
51
  var _super = _createSuper(Renderer);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.11",
3
+ "version": "108.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -3,7 +3,7 @@ import { default as React } from 'react';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
4
  import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
5
5
  import { MediaFeatureFlags } from '@atlaskit/media-common';
6
- import type { EventHandlers } from '@atlaskit/editor-common/ui';
6
+ import type { EventHandlers, MediaSingleWidthType } from '@atlaskit/editor-common/ui';
7
7
  import { AnalyticsEventPayload } from '../../../analytics/events';
8
8
  import { RendererAppearance } from '../../../ui/Renderer/types';
9
9
  export interface Props {
@@ -11,6 +11,7 @@ export interface Props {
11
11
  layout: MediaSingleLayout;
12
12
  eventHandlers?: EventHandlers;
13
13
  width?: number;
14
+ widthType?: MediaSingleWidthType;
14
15
  isInsideOfBlockNode?: boolean;
15
16
  rendererAppearance: RendererAppearance;
16
17
  fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
@@ -3,7 +3,7 @@ import { default as React } from 'react';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
4
  import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
5
5
  import { MediaFeatureFlags } from '@atlaskit/media-common';
6
- import type { EventHandlers } from '@atlaskit/editor-common/ui';
6
+ import type { EventHandlers, MediaSingleWidthType } from '@atlaskit/editor-common/ui';
7
7
  import { AnalyticsEventPayload } from '../../../analytics/events';
8
8
  import { RendererAppearance } from '../../../ui/Renderer/types';
9
9
  export interface Props {
@@ -11,6 +11,7 @@ export interface Props {
11
11
  layout: MediaSingleLayout;
12
12
  eventHandlers?: EventHandlers;
13
13
  width?: number;
14
+ widthType?: MediaSingleWidthType;
14
15
  isInsideOfBlockNode?: boolean;
15
16
  rendererAppearance: RendererAppearance;
16
17
  fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.11",
3
+ "version": "108.7.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/analytics-next": "^9.1.0",
32
32
  "@atlaskit/button": "^16.8.0",
33
33
  "@atlaskit/code": "^14.6.0",
34
- "@atlaskit/editor-common": "^74.22.0",
34
+ "@atlaskit/editor-common": "^74.23.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
36
36
  "@atlaskit/editor-palette": "1.5.1",
37
37
  "@atlaskit/editor-shared-styles": "^2.4.0",
@@ -69,6 +69,7 @@
69
69
  "react-dom": "^16.8.0"
70
70
  },
71
71
  "devDependencies": {
72
+ "@af/visual-regression": "*",
72
73
  "@atlaskit/analytics-gas-types": "^5.1.0",
73
74
  "@atlaskit/css-reset": "^6.5.0",
74
75
  "@atlaskit/editor-core": "^186.0.0",