@atlaskit/renderer 124.13.3 → 124.14.1
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 +19 -0
- package/dist/cjs/ui/Renderer/breakout-ssr.js +11 -6
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/breakout-ssr.js +11 -6
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/breakout-ssr.js +11 -6
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 124.14.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`dce46a29986fe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dce46a29986fe) -
|
|
8
|
+
Fix media with wide layout is not rendered with correct width
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 124.14.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`721d3790d48fe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/721d3790d48fe) -
|
|
16
|
+
EDITOR-2533 implement error-ui with retry
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 124.13.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -49,7 +49,8 @@ function BreakoutSSRInlineScript(_ref) {
|
|
|
49
49
|
}
|
|
50
50
|
function createBreakoutInlineScript(id, shouldSkipScript) {
|
|
51
51
|
var flags = {
|
|
52
|
-
platform_editor_fix_media_in_renderer: (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer')
|
|
52
|
+
platform_editor_fix_media_in_renderer: (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer'),
|
|
53
|
+
platform_editor_fix_wide_media_in_renderer: (0, _platformFeatureFlags.fg)('platform_editor_fix_wide_media_in_renderer')
|
|
53
54
|
};
|
|
54
55
|
return "(function(window){\nif(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) { return; }\n".concat(breakoutInlineScriptContext, ";\n(").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts, ").concat(JSON.stringify(shouldSkipScript), ", ").concat(JSON.stringify(flags), ");\n})(window);\n");
|
|
55
56
|
}
|
|
@@ -168,11 +169,11 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
|
|
|
168
169
|
item.target.dataset.nodeType === MEDIA_NODE_TYPE) {
|
|
169
170
|
// Ignored via go/ees005
|
|
170
171
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
171
|
-
applyMediaBreakout(item.target);
|
|
172
|
+
applyMediaBreakout(item.target, flags);
|
|
172
173
|
}
|
|
173
174
|
});
|
|
174
175
|
});
|
|
175
|
-
var applyMediaBreakout = function applyMediaBreakout(card) {
|
|
176
|
+
var applyMediaBreakout = function applyMediaBreakout(card, flags) {
|
|
176
177
|
// width was already set by another breakout script
|
|
177
178
|
if (card.style.width) {
|
|
178
179
|
return;
|
|
@@ -189,11 +190,15 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
|
|
|
189
190
|
var mode = card.dataset.mode || card.dataset.layout || '';
|
|
190
191
|
var width = card.dataset.width;
|
|
191
192
|
var isPixelBasedResizing = card.dataset.widthType === 'pixel';
|
|
193
|
+
|
|
194
|
+
// Pixel based resizing has width set in pixels based on its width attribute
|
|
195
|
+
// Thus, no need to override width
|
|
196
|
+
if (flags['platform_editor_fix_wide_media_in_renderer'] && isPixelBasedResizing) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
192
199
|
if (WIDE_LAYOUT_MODES.includes(mode)) {
|
|
193
200
|
card.style.width = '100%';
|
|
194
|
-
} else if (width && !isPixelBasedResizing) {
|
|
195
|
-
// Pixel based resizing has width set in pixels based on its width attribute
|
|
196
|
-
// Thus, no need to override for non-wide layouts
|
|
201
|
+
} else if (width && (!isPixelBasedResizing || flags['platform_editor_fix_wide_media_in_renderer'])) {
|
|
197
202
|
card.style.width = "".concat(width, "%");
|
|
198
203
|
}
|
|
199
204
|
};
|
|
@@ -69,7 +69,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
69
69
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
70
70
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
71
71
|
var packageName = "@atlaskit/renderer";
|
|
72
|
-
var packageVersion = "
|
|
72
|
+
var packageVersion = "0.0.0-development";
|
|
73
73
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
74
74
|
containerName: 'ak-renderer-wrapper',
|
|
75
75
|
containerType: 'inline-size'
|
|
@@ -41,7 +41,8 @@ export function BreakoutSSRInlineScript({
|
|
|
41
41
|
}
|
|
42
42
|
export function createBreakoutInlineScript(id, shouldSkipScript) {
|
|
43
43
|
const flags = {
|
|
44
|
-
platform_editor_fix_media_in_renderer: fg('platform_editor_fix_media_in_renderer')
|
|
44
|
+
platform_editor_fix_media_in_renderer: fg('platform_editor_fix_media_in_renderer'),
|
|
45
|
+
platform_editor_fix_wide_media_in_renderer: fg('platform_editor_fix_wide_media_in_renderer')
|
|
45
46
|
};
|
|
46
47
|
return `(function(window){
|
|
47
48
|
if(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) { return; }
|
|
@@ -173,11 +174,11 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
|
|
|
173
174
|
item.target.dataset.nodeType === MEDIA_NODE_TYPE) {
|
|
174
175
|
// Ignored via go/ees005
|
|
175
176
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
176
|
-
applyMediaBreakout(item.target);
|
|
177
|
+
applyMediaBreakout(item.target, flags);
|
|
177
178
|
}
|
|
178
179
|
});
|
|
179
180
|
});
|
|
180
|
-
const applyMediaBreakout = card => {
|
|
181
|
+
const applyMediaBreakout = (card, flags) => {
|
|
181
182
|
// width was already set by another breakout script
|
|
182
183
|
if (card.style.width) {
|
|
183
184
|
return;
|
|
@@ -192,11 +193,15 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
|
|
|
192
193
|
const mode = card.dataset.mode || card.dataset.layout || '';
|
|
193
194
|
const width = card.dataset.width;
|
|
194
195
|
const isPixelBasedResizing = card.dataset.widthType === 'pixel';
|
|
196
|
+
|
|
197
|
+
// Pixel based resizing has width set in pixels based on its width attribute
|
|
198
|
+
// Thus, no need to override width
|
|
199
|
+
if (flags['platform_editor_fix_wide_media_in_renderer'] && isPixelBasedResizing) {
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
195
202
|
if (WIDE_LAYOUT_MODES.includes(mode)) {
|
|
196
203
|
card.style.width = '100%';
|
|
197
|
-
} else if (width && !isPixelBasedResizing) {
|
|
198
|
-
// Pixel based resizing has width set in pixels based on its width attribute
|
|
199
|
-
// Thus, no need to override for non-wide layouts
|
|
204
|
+
} else if (width && (!isPixelBasedResizing || flags['platform_editor_fix_wide_media_in_renderer'])) {
|
|
200
205
|
card.style.width = `${width}%`;
|
|
201
206
|
}
|
|
202
207
|
};
|
|
@@ -55,7 +55,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
55
55
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
56
56
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
57
57
|
const packageName = "@atlaskit/renderer";
|
|
58
|
-
const packageVersion = "
|
|
58
|
+
const packageVersion = "0.0.0-development";
|
|
59
59
|
const setAsQueryContainerStyles = css({
|
|
60
60
|
containerName: 'ak-renderer-wrapper',
|
|
61
61
|
containerType: 'inline-size'
|
|
@@ -40,7 +40,8 @@ export function BreakoutSSRInlineScript(_ref) {
|
|
|
40
40
|
}
|
|
41
41
|
export function createBreakoutInlineScript(id, shouldSkipScript) {
|
|
42
42
|
var flags = {
|
|
43
|
-
platform_editor_fix_media_in_renderer: fg('platform_editor_fix_media_in_renderer')
|
|
43
|
+
platform_editor_fix_media_in_renderer: fg('platform_editor_fix_media_in_renderer'),
|
|
44
|
+
platform_editor_fix_wide_media_in_renderer: fg('platform_editor_fix_wide_media_in_renderer')
|
|
44
45
|
};
|
|
45
46
|
return "(function(window){\nif(typeof window !== 'undefined' && window.__RENDERER_BYPASS_BREAKOUT_SSR__) { return; }\n".concat(breakoutInlineScriptContext, ";\n(").concat(applyBreakoutAfterSSR.toString(), ")(\"").concat(id, "\", breakoutConsts, ").concat(JSON.stringify(shouldSkipScript), ", ").concat(JSON.stringify(flags), ");\n})(window);\n");
|
|
46
47
|
}
|
|
@@ -159,11 +160,11 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
|
|
|
159
160
|
item.target.dataset.nodeType === MEDIA_NODE_TYPE) {
|
|
160
161
|
// Ignored via go/ees005
|
|
161
162
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
162
|
-
applyMediaBreakout(item.target);
|
|
163
|
+
applyMediaBreakout(item.target, flags);
|
|
163
164
|
}
|
|
164
165
|
});
|
|
165
166
|
});
|
|
166
|
-
var applyMediaBreakout = function applyMediaBreakout(card) {
|
|
167
|
+
var applyMediaBreakout = function applyMediaBreakout(card, flags) {
|
|
167
168
|
// width was already set by another breakout script
|
|
168
169
|
if (card.style.width) {
|
|
169
170
|
return;
|
|
@@ -180,11 +181,15 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
|
|
|
180
181
|
var mode = card.dataset.mode || card.dataset.layout || '';
|
|
181
182
|
var width = card.dataset.width;
|
|
182
183
|
var isPixelBasedResizing = card.dataset.widthType === 'pixel';
|
|
184
|
+
|
|
185
|
+
// Pixel based resizing has width set in pixels based on its width attribute
|
|
186
|
+
// Thus, no need to override width
|
|
187
|
+
if (flags['platform_editor_fix_wide_media_in_renderer'] && isPixelBasedResizing) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
183
190
|
if (WIDE_LAYOUT_MODES.includes(mode)) {
|
|
184
191
|
card.style.width = '100%';
|
|
185
|
-
} else if (width && !isPixelBasedResizing) {
|
|
186
|
-
// Pixel based resizing has width set in pixels based on its width attribute
|
|
187
|
-
// Thus, no need to override for non-wide layouts
|
|
192
|
+
} else if (width && (!isPixelBasedResizing || flags['platform_editor_fix_wide_media_in_renderer'])) {
|
|
188
193
|
card.style.width = "".concat(width, "%");
|
|
189
194
|
}
|
|
190
195
|
};
|
|
@@ -60,7 +60,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
60
60
|
// we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
|
|
61
61
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
62
62
|
var packageName = "@atlaskit/renderer";
|
|
63
|
-
var packageVersion = "
|
|
63
|
+
var packageVersion = "0.0.0-development";
|
|
64
64
|
var setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "124.
|
|
3
|
+
"version": "124.14.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@atlaskit/theme": "^21.0.0",
|
|
61
61
|
"@atlaskit/tmp-editor-statsig": "^13.38.0",
|
|
62
62
|
"@atlaskit/tokens": "^8.0.0",
|
|
63
|
-
"@atlaskit/tooltip": "^20.
|
|
63
|
+
"@atlaskit/tooltip": "^20.9.0",
|
|
64
64
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
65
65
|
"@babel/runtime": "^7.0.0",
|
|
66
66
|
"@emotion/react": "^11.7.1",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^110.
|
|
75
|
+
"@atlaskit/editor-common": "^110.31.0",
|
|
76
76
|
"@atlaskit/link-provider": "^4.0.0",
|
|
77
77
|
"@atlaskit/media-core": "^37.0.0",
|
|
78
78
|
"react": "^18.2.0",
|
|
@@ -167,6 +167,9 @@
|
|
|
167
167
|
"platform_editor_fix_media_in_renderer": {
|
|
168
168
|
"type": "boolean"
|
|
169
169
|
},
|
|
170
|
+
"platform_editor_fix_wide_media_in_renderer": {
|
|
171
|
+
"type": "boolean"
|
|
172
|
+
},
|
|
170
173
|
"platform_editor_content_mode_button_mvp": {
|
|
171
174
|
"type": "boolean"
|
|
172
175
|
},
|