@atlaskit/renderer 124.14.0 → 124.15.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 CHANGED
@@ -1,5 +1,34 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 124.15.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`d155989f1f294`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d155989f1f294) -
8
+ [ux] EDITOR-2885 Add max-width styles for "max" width appearance in renderer
9
+ - [`a05464ea42678`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a05464ea42678) -
10
+ EDITOR-2791 bump adf-schema
11
+ - Updated dependencies
12
+
13
+ ## 124.15.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`81ac927e830b5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/81ac927e830b5) -
18
+ [ux] EDITOR-2866: Add max-width support and guideline wiring for node custom resizers
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
24
+ ## 124.14.1
25
+
26
+ ### Patch Changes
27
+
28
+ - [`dce46a29986fe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/dce46a29986fe) -
29
+ Fix media with wide layout is not rendered with correct width
30
+ - Updated dependencies
31
+
3
32
  ## 124.14.0
4
33
 
5
34
  ### Minor Changes
@@ -27,6 +27,11 @@ var getWidth = function getWidth(width, mode) {
27
27
  if ((0, _experiments.editorExperiment)('advanced_layouts', true) && width) {
28
28
  return "min(".concat(width, "px, var(--ak-editor--breakout-container-without-gutter-width))");
29
29
  } else {
30
+ if ((0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) {
31
+ if (mode === 'max' || typeof width === 'number' && width >= _editorSharedStyles.akEditorFullWidthLayoutWidth) {
32
+ return "min(".concat(_editorSharedStyles.akEditorMaxLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
33
+ }
34
+ }
30
35
  if (mode === 'full-width') {
31
36
  if ((0, _expValEquals.expValEquals)('platform_editor_renderer_breakout_fix', 'isEnabled', true)) {
32
37
  return "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
@@ -206,6 +206,15 @@ var rendererFullWidthStyles = (0, _react.css)({
206
206
  width: '100% !important'
207
207
  }
208
208
  });
209
+ var rendererMaxWidthStyles = (0, _react.css)({
210
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
211
+ maxWidth: "".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px"),
212
+ margin: "0 auto",
213
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
214
+ '.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
215
+ width: '100% !important'
216
+ }
217
+ });
209
218
  var rendererFullWidthStylesForTableResizing = (0, _react.css)({
210
219
  '.pm-table-container': {
211
220
  width: '100% !important'
@@ -1645,13 +1654,13 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
1645
1654
  '--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
1646
1655
  '--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
1647
1656
  },
1648
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, !(0, _platformFeatureFlags.fg)('aifc_create_enabled') && telepointerStyles, (0, _platformFeatureFlags.fg)('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, (0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true) &&
1657
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !(0, _platformFeatureFlags.fg)('aifc_create_enabled') && telepointerStyles, (0, _platformFeatureFlags.fg)('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, (0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true) &&
1649
1658
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
1650
1659
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1651
1660
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
1652
1661
  (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && (0, _platformFeatureFlags.fg)('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
1653
1662
  // merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
1654
- (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, appearance === 'full-width' && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined],
1663
+ (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, (0, _table.isStickyScrollbarEnabled)(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined],
1655
1664
  "data-testid": testId
1656
1665
  }, children)
1657
1666
  );
@@ -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 = "124.13.3";
72
+ var packageVersion = "124.15.0";
73
73
  var setAsQueryContainerStyles = (0, _react2.css)({
74
74
  containerName: 'ak-renderer-wrapper',
75
75
  containerType: 'inline-size'
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
8
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxLayoutWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
9
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
11
  const wrapperStyles = css({
@@ -19,6 +19,11 @@ const getWidth = (width, mode) => {
19
19
  if (editorExperiment('advanced_layouts', true) && width) {
20
20
  return `min(${width}px, var(--ak-editor--breakout-container-without-gutter-width))`;
21
21
  } else {
22
+ if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
23
+ if (mode === 'max' || typeof width === 'number' && width >= akEditorFullWidthLayoutWidth) {
24
+ return `min(${akEditorMaxLayoutWidth}px, var(--ak-editor--breakout-container-without-gutter-width))`;
25
+ }
26
+ }
22
27
  if (mode === 'full-width') {
23
28
  if (expValEquals('platform_editor_renderer_breakout_fix', 'isEnabled', true)) {
24
29
  return `min(${akEditorFullWidthLayoutWidth}px, var(--ak-editor--breakout-container-without-gutter-width))`;
@@ -13,7 +13,7 @@ import { FullPagePadding } from './style';
13
13
  import { fg } from '@atlaskit/platform-feature-flags';
14
14
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
15
15
  import { RendererCssClassName } from '../../consts';
16
- import { akEditorBlockquoteBorderColor, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorFullPageNarrowBreakout, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorLineHeight, akEditorSelectedNodeClassName, akEditorShadowZIndex, akEditorStickyHeaderZIndex, akEditorTableBorder, akEditorTableCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, blockNodesVerticalMargin, scaledBlockNodesVerticalMargin, gridMediumMaxWidth, akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '@atlaskit/editor-shared-styles';
16
+ import { akEditorBlockquoteBorderColor, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorFullPageNarrowBreakout, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxWidthLayoutWidth, akEditorGutterPadding, akEditorLineHeight, akEditorSelectedNodeClassName, akEditorShadowZIndex, akEditorStickyHeaderZIndex, akEditorTableBorder, akEditorTableCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, blockNodesVerticalMargin, scaledBlockNodesVerticalMargin, gridMediumMaxWidth, akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '@atlaskit/editor-shared-styles';
17
17
  import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
18
18
  import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
19
19
  import { CodeBlockSharedCssClassName, DateSharedCssClassName, listItemCounterPadding, richMediaClassName, SmartCardSharedCssClassName, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginTop, TableSharedCssClassName, TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
@@ -280,6 +280,15 @@ const rendererFullWidthStyles = css({
280
280
  width: '100% !important'
281
281
  }
282
282
  });
283
+ const rendererMaxWidthStyles = css({
284
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
285
+ maxWidth: `${akEditorMaxWidthLayoutWidth}px`,
286
+ margin: `0 auto`,
287
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
288
+ '.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
289
+ width: '100% !important'
290
+ }
291
+ });
283
292
  const rendererFullWidthStylesForTableResizing = css({
284
293
  '.pm-table-container': {
285
294
  width: '100% !important'
@@ -2068,13 +2077,13 @@ export const RendererStyleContainer = props => {
2068
2077
  '--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
2069
2078
  '--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
2070
2079
  },
2071
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, !fg('aifc_create_enabled') && telepointerStyles, fg('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
2080
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !fg('aifc_create_enabled') && telepointerStyles, fg('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
2072
2081
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2073
2082
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
2074
2083
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
2075
2084
  fg('editor_inline_comments_on_inline_nodes') && fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
2076
2085
  // merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
2077
- fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, appearance === 'full-width' && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined],
2086
+ fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined],
2078
2087
  "data-testid": testId
2079
2088
  }, children)
2080
2089
  );
@@ -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 = "124.13.3";
58
+ const packageVersion = "124.15.0";
59
59
  const setAsQueryContainerStyles = css({
60
60
  containerName: 'ak-renderer-wrapper',
61
61
  containerType: 'inline-size'
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
7
  import { css, jsx } from '@emotion/react';
8
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
8
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxLayoutWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
9
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
11
  var wrapperStyles = css({
@@ -19,6 +19,11 @@ var getWidth = function getWidth(width, mode) {
19
19
  if (editorExperiment('advanced_layouts', true) && width) {
20
20
  return "min(".concat(width, "px, var(--ak-editor--breakout-container-without-gutter-width))");
21
21
  } else {
22
+ if (expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) {
23
+ if (mode === 'max' || typeof width === 'number' && width >= akEditorFullWidthLayoutWidth) {
24
+ return "min(".concat(akEditorMaxLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
25
+ }
26
+ }
22
27
  if (mode === 'full-width') {
23
28
  if (expValEquals('platform_editor_renderer_breakout_fix', 'isEnabled', true)) {
24
29
  return "min(".concat(akEditorFullWidthLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
@@ -15,7 +15,7 @@ import { FullPagePadding } from './style';
15
15
  import { fg } from '@atlaskit/platform-feature-flags';
16
16
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
17
17
  import { RendererCssClassName } from '../../consts';
18
- import { akEditorBlockquoteBorderColor, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorFullPageNarrowBreakout, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorLineHeight, akEditorSelectedNodeClassName, akEditorShadowZIndex, akEditorStickyHeaderZIndex, akEditorTableBorder, akEditorTableCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, blockNodesVerticalMargin, scaledBlockNodesVerticalMargin, gridMediumMaxWidth, akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '@atlaskit/editor-shared-styles';
18
+ import { akEditorBlockquoteBorderColor, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorFullPageNarrowBreakout, akEditorGutterPaddingReduced, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxWidthLayoutWidth, akEditorGutterPadding, akEditorLineHeight, akEditorSelectedNodeClassName, akEditorShadowZIndex, akEditorStickyHeaderZIndex, akEditorTableBorder, akEditorTableCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, blockNodesVerticalMargin, scaledBlockNodesVerticalMargin, gridMediumMaxWidth, akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '@atlaskit/editor-shared-styles';
19
19
  import { INLINE_IMAGE_WRAPPER_CLASS_NAME } from '@atlaskit/editor-common/media-inline';
20
20
  import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
21
21
  import { CodeBlockSharedCssClassName, DateSharedCssClassName, listItemCounterPadding, richMediaClassName, SmartCardSharedCssClassName, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginTop, TableSharedCssClassName, TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
@@ -199,6 +199,15 @@ var rendererFullWidthStyles = css({
199
199
  width: '100% !important'
200
200
  }
201
201
  });
202
+ var rendererMaxWidthStyles = css({
203
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
204
+ maxWidth: "".concat(akEditorMaxWidthLayoutWidth, "px"),
205
+ margin: "0 auto",
206
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
207
+ '.fabric-editor-breakout-mark:not([data-has-width="true"]), .ak-renderer-extension': {
208
+ width: '100% !important'
209
+ }
210
+ });
202
211
  var rendererFullWidthStylesForTableResizing = css({
203
212
  '.pm-table-container': {
204
213
  width: '100% !important'
@@ -1638,13 +1647,13 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
1638
1647
  '--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
1639
1648
  '--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
1640
1649
  },
1641
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, !fg('aifc_create_enabled') && telepointerStyles, fg('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
1650
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !fg('aifc_create_enabled') && telepointerStyles, fg('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
1642
1651
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
1643
1652
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1644
1653
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
1645
1654
  fg('editor_inline_comments_on_inline_nodes') && fg('annotations_align_editor_and_renderer_styles') && rendererAnnotationStylesCommentHeightFix, baseOtherStyles, allowNestedHeaderLinks && alignedHeadingAnchorStyle, mediaSingleSharedStyle,
1646
1655
  // merge firstWrappedMediaStyles with mediaSingleSharedStyle when clean up platform_editor_fix_media_in_renderer
1647
- fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, appearance === 'full-width' && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined],
1656
+ fg('platform_editor_fix_media_in_renderer') && firstWrappedMediaStyles, tableSharedStyle, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, fg('platform_editor_nested_dnd_styles_changes') ? firstNodeWithNotMarginTopWithNestedDnD : firstNodeWithNotMarginTop, rendererTableStyles, isStickyScrollbarEnabled(appearance) && stickyScrollbarStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && allowNestedHeaderLinks && rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks, rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? isCompactModeEnabled ? scaledDenseEmojiStyles : scaledEmojiStyles : isCompactModeEnabled ? denseStyles : undefined],
1648
1657
  "data-testid": testId
1649
1658
  }, children)
1650
1659
  );
@@ -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 = "124.13.3";
63
+ var packageVersion = "124.15.0";
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.14.0",
3
+ "version": "124.15.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@atlaskit/adf-schema": "^51.3.2",
26
+ "@atlaskit/adf-schema": "^51.4.0",
27
27
  "@atlaskit/adf-utils": "^19.26.0",
28
28
  "@atlaskit/afm-i18n-platform-editor-renderer": "2.10.0",
29
29
  "@atlaskit/analytics-listeners": "^9.1.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/editor-json-transformer": "^8.31.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-prosemirror": "7.0.0",
38
- "@atlaskit/editor-shared-styles": "^3.9.0",
38
+ "@atlaskit/editor-shared-styles": "^3.10.0",
39
39
  "@atlaskit/editor-tables": "^2.9.0",
40
40
  "@atlaskit/emoji": "^69.8.0",
41
41
  "@atlaskit/feature-gate-js-client": "^5.5.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/link-datasource": "^4.30.0",
45
45
  "@atlaskit/link-extractors": "^2.4.0",
46
46
  "@atlaskit/linking-common": "^9.8.0",
47
- "@atlaskit/media-card": "^79.7.0",
47
+ "@atlaskit/media-card": "^79.8.0",
48
48
  "@atlaskit/media-client": "^35.6.0",
49
49
  "@atlaskit/media-client-react": "^4.1.0",
50
50
  "@atlaskit/media-common": "^12.3.0",
@@ -53,14 +53,14 @@
53
53
  "@atlaskit/media-viewer": "^52.4.0",
54
54
  "@atlaskit/platform-feature-flags": "^1.1.0",
55
55
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
56
- "@atlaskit/react-ufo": "^4.14.0",
56
+ "@atlaskit/react-ufo": "^4.15.0",
57
57
  "@atlaskit/smart-card": "^43.7.0",
58
58
  "@atlaskit/status": "^3.0.0",
59
59
  "@atlaskit/task-decision": "^19.2.0",
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.8.0",
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.31.0",
75
+ "@atlaskit/editor-common": "^110.32.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
  },