@atlaskit/renderer 124.5.1 → 124.5.2
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 +9 -0
- package/dist/cjs/react/nodes/mediaSingle/index.js +15 -6
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/mediaSingle/index.js +15 -6
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/mediaSingle/index.js +15 -6
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`eec573b4a7a6a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eec573b4a7a6a) -
|
|
8
|
+
Passing the precise Pixel width when available instead of the container width, and passing height
|
|
9
|
+
100% to avoid attempting height calculations to remove changes for VC
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 124.5.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -140,12 +140,21 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
|
|
|
140
140
|
var padding = isFullPage ? _style.FullPagePadding * 2 : 0;
|
|
141
141
|
var calcDimensions = (0, _react.useCallback)(function (mediaContainerWidth) {
|
|
142
142
|
var containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
|
|
143
|
-
var
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
143
|
+
var cardDimensions = {};
|
|
144
|
+
if ((0, _platformFeatureFlags.fg)('media-perf-uplift-mutation-fix')) {
|
|
145
|
+
var maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
|
|
146
|
+
cardDimensions = {
|
|
147
|
+
width: "".concat(maxWidth, "px"),
|
|
148
|
+
height: "100%"
|
|
149
|
+
};
|
|
150
|
+
} else {
|
|
151
|
+
var _maxWidth = (0, _coreUtils.isSSR)() && widthAttr && typeof widthAttr === 'number' && (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
|
|
152
|
+
var maxHeight = height / width * _maxWidth;
|
|
153
|
+
cardDimensions = {
|
|
154
|
+
width: "".concat(_maxWidth, "px"),
|
|
155
|
+
height: "".concat(maxHeight, "px")
|
|
156
|
+
};
|
|
157
|
+
}
|
|
149
158
|
var nonFullWidthSize = containerWidth;
|
|
150
159
|
if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
|
|
151
160
|
var isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
@@ -68,7 +68,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
68
68
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
69
69
|
var TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
70
70
|
var packageName = "@atlaskit/renderer";
|
|
71
|
-
var packageVersion = "
|
|
71
|
+
var packageVersion = "124.5.1";
|
|
72
72
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
73
73
|
containerName: 'ak-renderer-wrapper',
|
|
74
74
|
containerType: 'inline-size'
|
|
@@ -127,12 +127,21 @@ const MediaSingleWithChildren = props => {
|
|
|
127
127
|
const padding = isFullPage ? FullPagePadding * 2 : 0;
|
|
128
128
|
const calcDimensions = useCallback(mediaContainerWidth => {
|
|
129
129
|
const containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
let cardDimensions = {};
|
|
131
|
+
if (fg('media-perf-uplift-mutation-fix')) {
|
|
132
|
+
const maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
|
|
133
|
+
cardDimensions = {
|
|
134
|
+
width: `${maxWidth}px`,
|
|
135
|
+
height: `100%`
|
|
136
|
+
};
|
|
137
|
+
} else {
|
|
138
|
+
const maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
|
|
139
|
+
const maxHeight = height / width * maxWidth;
|
|
140
|
+
cardDimensions = {
|
|
141
|
+
width: `${maxWidth}px`,
|
|
142
|
+
height: `${maxHeight}px`
|
|
143
|
+
};
|
|
144
|
+
}
|
|
136
145
|
let nonFullWidthSize = containerWidth;
|
|
137
146
|
if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
|
|
138
147
|
const isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= akEditorDefaultLayoutWidth;
|
|
@@ -54,7 +54,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
54
54
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
55
55
|
const TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
56
56
|
const packageName = "@atlaskit/renderer";
|
|
57
|
-
const packageVersion = "
|
|
57
|
+
const packageVersion = "124.5.1";
|
|
58
58
|
const setAsQueryContainerStyles = css({
|
|
59
59
|
containerName: 'ak-renderer-wrapper',
|
|
60
60
|
containerType: 'inline-size'
|
|
@@ -130,12 +130,21 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
|
|
|
130
130
|
var padding = isFullPage ? FullPagePadding * 2 : 0;
|
|
131
131
|
var calcDimensions = useCallback(function (mediaContainerWidth) {
|
|
132
132
|
var containerWidth = getMediaContainerWidth(mediaContainerWidth, layout);
|
|
133
|
-
var
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
133
|
+
var cardDimensions = {};
|
|
134
|
+
if (fg('media-perf-uplift-mutation-fix')) {
|
|
135
|
+
var maxWidth = widthAttr && typeof widthAttr === 'number' ? widthAttr : containerWidth;
|
|
136
|
+
cardDimensions = {
|
|
137
|
+
width: "".concat(maxWidth, "px"),
|
|
138
|
+
height: "100%"
|
|
139
|
+
};
|
|
140
|
+
} else {
|
|
141
|
+
var _maxWidth = isSSR() && widthAttr && typeof widthAttr === 'number' && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(widthAttr, containerWidth) : containerWidth;
|
|
142
|
+
var maxHeight = height / width * _maxWidth;
|
|
143
|
+
cardDimensions = {
|
|
144
|
+
width: "".concat(_maxWidth, "px"),
|
|
145
|
+
height: "".concat(maxHeight, "px")
|
|
146
|
+
};
|
|
147
|
+
}
|
|
139
148
|
var nonFullWidthSize = containerWidth;
|
|
140
149
|
if (!isInsideOfBlockNode && rendererAppearance !== 'comment') {
|
|
141
150
|
var isContainerSizeGreaterThanMaxFullPageWidth = containerWidth - padding >= akEditorDefaultLayoutWidth;
|
|
@@ -59,7 +59,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
59
59
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
60
60
|
var TABLE_WIDTH_INFO_TIMEOUT = 10000;
|
|
61
61
|
var packageName = "@atlaskit/renderer";
|
|
62
|
-
var packageVersion = "
|
|
62
|
+
var packageVersion = "124.5.1";
|
|
63
63
|
var setAsQueryContainerStyles = css({
|
|
64
64
|
containerName: 'ak-renderer-wrapper',
|
|
65
65
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.5.
|
|
3
|
+
"version": "124.5.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -250,6 +250,9 @@
|
|
|
250
250
|
},
|
|
251
251
|
"hot-121622_lazy_load_expand_content": {
|
|
252
252
|
"type": "boolean"
|
|
253
|
+
},
|
|
254
|
+
"media-perf-uplift-mutation-fix": {
|
|
255
|
+
"type": "boolean"
|
|
253
256
|
}
|
|
254
257
|
}
|
|
255
258
|
}
|