@atlaskit/renderer 108.6.4 → 108.6.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,12 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.6.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`f486dbd535c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f486dbd535c) - MEX-2481 Fix minor gap between image and border
8
+ - Updated dependencies
9
+
3
10
  ## 108.6.4
4
11
 
5
12
  ### Patch Changes
@@ -63,6 +63,7 @@ var Media = /*#__PURE__*/function (_PureComponent) {
63
63
  border: !!borderMark
64
64
  })
65
65
  }, (0, _react2.jsx)(_MediaCard.MediaCard, (0, _extends2.default)({
66
+ expandByPixel: borderMark && _ui.IMAGE_AND_BORDER_ADJUSTMENT,
66
67
  mediaProvider: mediaProvider,
67
68
  contextIdentifierProvider: contextIdentifierProvider
68
69
  }, _this.props, {
@@ -79,8 +80,8 @@ var Media = /*#__PURE__*/function (_PureComponent) {
79
80
  "data-color": borderColor,
80
81
  "data-size": borderWidth,
81
82
  style: {
82
- width: '100%',
83
- height: '100%',
83
+ width: "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
84
+ height: "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
84
85
  borderColor: paletteColorValue,
85
86
  borderWidth: "".concat(borderWidth, "px"),
86
87
  borderStyle: 'solid',
@@ -227,7 +227,8 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
227
227
  alt = _this$props4.alt,
228
228
  featureFlags = _this$props4.featureFlags,
229
229
  ssr = _this$props4.ssr,
230
- rendererAppearance = _this$props4.rendererAppearance;
230
+ rendererAppearance = _this$props4.rendererAppearance,
231
+ expandByPixel = _this$props4.expandByPixel;
231
232
  if (imageStatus === 'loading' || !url) {
232
233
  return this.renderLoadingCard();
233
234
  }
@@ -241,6 +242,7 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
241
242
  // context is not really used when the type is external and we want to render the component asap
242
243
  , {
243
244
  mediaClientConfig: mediaClientConfig,
245
+ expandByPixel: expandByPixel,
244
246
  alt: alt,
245
247
  identifier: identifier,
246
248
  dimensions: cardDimensions,
@@ -276,7 +278,8 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
276
278
  forceOpenMediaViewer = _this$props5.shouldOpenMediaViewer,
277
279
  featureFlags = _this$props5.featureFlags,
278
280
  shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
279
- ssr = _this$props5.ssr;
281
+ ssr = _this$props5.ssr,
282
+ expandByPixel = _this$props5.expandByPixel;
280
283
  var isMobile = rendererAppearance === 'mobile';
281
284
  var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
282
285
  var isInlinePlayer = isMobile ? false : shouldPlayInline;
@@ -312,6 +315,7 @@ var MediaCardInternal = /*#__PURE__*/function (_Component) {
312
315
  originalDimensions: originalDimensions,
313
316
  fileState: fileState
314
317
  }), /*#__PURE__*/_react.default.createElement(_mediaCard.Card, {
318
+ expandByPixel: expandByPixel,
315
319
  identifier: identifier,
316
320
  alt: alt,
317
321
  contextId: contextId,
@@ -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.4";
58
+ var packageVersion = "108.6.5";
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.4",
3
+ "version": "108.6.5",
4
4
  "sideEffects": false
5
5
  }
@@ -7,7 +7,7 @@ import { jsx } from '@emotion/react';
7
7
  import { AnalyticsContext } from '@atlaskit/analytics-next';
8
8
  import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context';
9
9
  import { WithProviders } from '@atlaskit/editor-common/provider-factory';
10
- import { mediaLinkStyle } from '@atlaskit/editor-common/ui';
10
+ import { mediaLinkStyle, IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
11
11
  import { MediaCard } from '../../ui/MediaCard';
12
12
  import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
13
13
  import { getEventHandler } from '../../utils';
@@ -44,6 +44,7 @@ export default class Media extends PureComponent {
44
44
  }
45
45
  }
46
46
  }, jsx(MediaCard, _extends({
47
+ expandByPixel: borderMark && IMAGE_AND_BORDER_ADJUSTMENT,
47
48
  mediaProvider: mediaProvider,
48
49
  contextIdentifierProvider: contextIdentifierProvider
49
50
  }, this.props, {
@@ -60,8 +61,8 @@ export default class Media extends PureComponent {
60
61
  "data-color": borderColor,
61
62
  "data-size": borderWidth,
62
63
  style: {
63
- width: '100%',
64
- height: '100%',
64
+ width: `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`,
65
+ height: `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`,
65
66
  borderColor: paletteColorValue,
66
67
  borderWidth: `${borderWidth}px`,
67
68
  borderStyle: 'solid',
@@ -159,7 +159,8 @@ export class MediaCardInternal extends Component {
159
159
  alt,
160
160
  featureFlags,
161
161
  ssr,
162
- rendererAppearance
162
+ rendererAppearance,
163
+ expandByPixel
163
164
  } = this.props;
164
165
  if (imageStatus === 'loading' || !url) {
165
166
  return this.renderLoadingCard();
@@ -174,6 +175,7 @@ export class MediaCardInternal extends Component {
174
175
  // context is not really used when the type is external and we want to render the component asap
175
176
  , {
176
177
  mediaClientConfig: mediaClientConfig,
178
+ expandByPixel: expandByPixel,
177
179
  alt: alt,
178
180
  identifier: identifier,
179
181
  dimensions: cardDimensions,
@@ -208,7 +210,8 @@ export class MediaCardInternal extends Component {
208
210
  shouldOpenMediaViewer: forceOpenMediaViewer,
209
211
  featureFlags,
210
212
  shouldEnableDownloadButton,
211
- ssr
213
+ ssr,
214
+ expandByPixel
212
215
  } = this.props;
213
216
  const isMobile = rendererAppearance === 'mobile';
214
217
  const shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
@@ -245,6 +248,7 @@ export class MediaCardInternal extends Component {
245
248
  originalDimensions,
246
249
  fileState
247
250
  }), /*#__PURE__*/React.createElement(Card, {
251
+ expandByPixel: expandByPixel,
248
252
  identifier: identifier,
249
253
  alt: alt,
250
254
  contextId: contextId,
@@ -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.4";
38
+ const packageVersion = "108.6.5";
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.4",
3
+ "version": "108.6.5",
4
4
  "sideEffects": false
5
5
  }
@@ -15,7 +15,7 @@ import { jsx } from '@emotion/react';
15
15
  import { AnalyticsContext } from '@atlaskit/analytics-next';
16
16
  import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context';
17
17
  import { WithProviders } from '@atlaskit/editor-common/provider-factory';
18
- import { mediaLinkStyle } from '@atlaskit/editor-common/ui';
18
+ import { mediaLinkStyle, IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
19
19
  import { MediaCard } from '../../ui/MediaCard';
20
20
  import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
21
21
  import { getEventHandler } from '../../utils';
@@ -55,6 +55,7 @@ var Media = /*#__PURE__*/function (_PureComponent) {
55
55
  border: !!borderMark
56
56
  })
57
57
  }, jsx(MediaCard, _extends({
58
+ expandByPixel: borderMark && IMAGE_AND_BORDER_ADJUSTMENT,
58
59
  mediaProvider: mediaProvider,
59
60
  contextIdentifierProvider: contextIdentifierProvider
60
61
  }, _this.props, {
@@ -71,8 +72,8 @@ var Media = /*#__PURE__*/function (_PureComponent) {
71
72
  "data-color": borderColor,
72
73
  "data-size": borderWidth,
73
74
  style: {
74
- width: '100%',
75
- height: '100%',
75
+ width: "calc(100% - ".concat(IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
76
+ height: "calc(100% - ".concat(IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
76
77
  borderColor: paletteColorValue,
77
78
  borderWidth: "".concat(borderWidth, "px"),
78
79
  borderStyle: 'solid',
@@ -215,7 +215,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
215
215
  alt = _this$props4.alt,
216
216
  featureFlags = _this$props4.featureFlags,
217
217
  ssr = _this$props4.ssr,
218
- rendererAppearance = _this$props4.rendererAppearance;
218
+ rendererAppearance = _this$props4.rendererAppearance,
219
+ expandByPixel = _this$props4.expandByPixel;
219
220
  if (imageStatus === 'loading' || !url) {
220
221
  return this.renderLoadingCard();
221
222
  }
@@ -229,6 +230,7 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
229
230
  // context is not really used when the type is external and we want to render the component asap
230
231
  , {
231
232
  mediaClientConfig: mediaClientConfig,
233
+ expandByPixel: expandByPixel,
232
234
  alt: alt,
233
235
  identifier: identifier,
234
236
  dimensions: cardDimensions,
@@ -264,7 +266,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
264
266
  forceOpenMediaViewer = _this$props5.shouldOpenMediaViewer,
265
267
  featureFlags = _this$props5.featureFlags,
266
268
  shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
267
- ssr = _this$props5.ssr;
269
+ ssr = _this$props5.ssr,
270
+ expandByPixel = _this$props5.expandByPixel;
268
271
  var isMobile = rendererAppearance === 'mobile';
269
272
  var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
270
273
  var isInlinePlayer = isMobile ? false : shouldPlayInline;
@@ -300,6 +303,7 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
300
303
  originalDimensions: originalDimensions,
301
304
  fileState: fileState
302
305
  }), /*#__PURE__*/React.createElement(Card, {
306
+ expandByPixel: expandByPixel,
303
307
  identifier: identifier,
304
308
  alt: alt,
305
309
  contextId: contextId,
@@ -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.4";
48
+ var packageVersion = "108.6.5";
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.4",
3
+ "version": "108.6.5",
4
4
  "sideEffects": false
5
5
  }
@@ -40,6 +40,7 @@ export interface MediaCardProps {
40
40
  featureFlags?: MediaFeatureFlags;
41
41
  shouldEnableDownloadButton?: boolean;
42
42
  ssr?: MediaSSR;
43
+ expandByPixel?: number;
43
44
  }
44
45
  export interface State {
45
46
  mediaClientConfig?: MediaClientConfig;
@@ -40,6 +40,7 @@ export interface MediaCardProps {
40
40
  featureFlags?: MediaFeatureFlags;
41
41
  shouldEnableDownloadButton?: boolean;
42
42
  ssr?: MediaSSR;
43
+ expandByPixel?: number;
43
44
  }
44
45
  export interface State {
45
46
  mediaClientConfig?: MediaClientConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.4",
3
+ "version": "108.6.5",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,30 +24,30 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@atlaskit/adf-schema": "^26.0.0",
27
+ "@atlaskit/adf-schema": "^26.1.0",
28
28
  "@atlaskit/adf-utils": "^19.0.0",
29
29
  "@atlaskit/analytics-listeners": "^8.7.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.7.0",
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.15.0",
35
- "@atlaskit/editor-json-transformer": "^8.9.0",
34
+ "@atlaskit/editor-common": "^74.19.0",
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",
38
38
  "@atlaskit/emoji": "^67.4.0",
39
39
  "@atlaskit/icon": "^21.12.0",
40
- "@atlaskit/link-datasource": "^0.27.0",
41
- "@atlaskit/media-card": "^76.0.0",
40
+ "@atlaskit/link-datasource": "^0.28.0",
41
+ "@atlaskit/media-card": "^76.1.0",
42
42
  "@atlaskit/media-client": "^23.1.0",
43
43
  "@atlaskit/media-common": "^7.1.0",
44
44
  "@atlaskit/media-filmstrip": "^47.0.0",
45
- "@atlaskit/media-ui": "^23.1.0",
45
+ "@atlaskit/media-ui": "^23.2.0",
46
46
  "@atlaskit/media-viewer": "^48.0.0",
47
47
  "@atlaskit/platform-feature-flags": "^0.2.0",
48
48
  "@atlaskit/smart-card": "^26.9.0",
49
49
  "@atlaskit/status": "^1.3.0",
50
- "@atlaskit/task-decision": "^17.6.0",
50
+ "@atlaskit/task-decision": "^17.7.0",
51
51
  "@atlaskit/theme": "^12.5.0",
52
52
  "@atlaskit/tokens": "^1.11.0",
53
53
  "@atlaskit/tooltip": "^17.8.0",
@@ -71,9 +71,8 @@
71
71
  "devDependencies": {
72
72
  "@atlaskit/analytics-gas-types": "^5.1.0",
73
73
  "@atlaskit/css-reset": "^6.5.0",
74
- "@atlaskit/editor-core": "^185.8.0",
75
- "@atlaskit/editor-test-helpers": "^18.8.0",
76
- "@atlaskit/inline-edit": "^12.3.3",
74
+ "@atlaskit/editor-core": "^185.11.0",
75
+ "@atlaskit/editor-test-helpers": "^18.10.0",
77
76
  "@atlaskit/link-provider": "^1.6.0",
78
77
  "@atlaskit/link-test-helpers": "^4.1.0",
79
78
  "@atlaskit/media-core": "^34.1.0",