@atlaskit/renderer 141.0.6 → 141.0.7
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 +12 -0
- package/dist/cjs/react/marks/breakout.js +2 -5
- package/dist/cjs/react/nodes/panel-compiled.js +1 -1
- package/dist/cjs/react/nodes/panel-emotion.js +1 -1
- package/dist/cjs/react/nodes/table/colgroup.js +2 -3
- package/dist/cjs/react/nodes/table.js +4 -4
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +2 -2
- package/dist/cjs/ui/Renderer/index.js +2 -9
- package/dist/es2019/react/marks/breakout.js +2 -5
- package/dist/es2019/react/nodes/panel-compiled.js +1 -1
- package/dist/es2019/react/nodes/panel-emotion.js +1 -1
- package/dist/es2019/react/nodes/table/colgroup.js +2 -3
- package/dist/es2019/react/nodes/table.js +4 -4
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +2 -2
- package/dist/es2019/ui/Renderer/index.js +2 -9
- package/dist/esm/react/marks/breakout.js +2 -5
- package/dist/esm/react/nodes/panel-compiled.js +1 -1
- package/dist/esm/react/nodes/panel-emotion.js +1 -1
- package/dist/esm/react/nodes/table/colgroup.js +2 -3
- package/dist/esm/react/nodes/table.js +4 -4
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +2 -2
- package/dist/esm/ui/Renderer/index.js +2 -9
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 141.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3f8ea6c51b718`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3f8ea6c51b718) -
|
|
8
|
+
Remove the rolled-out `editor_tinymce_full_width_mode` and
|
|
9
|
+
`confluence_max_width_content_appearance` experiments and make max-width content behavior
|
|
10
|
+
permanent.
|
|
11
|
+
- [`a181b8f5541eb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a181b8f5541eb) -
|
|
12
|
+
Clean up feature gate `platform_editor_nest_table_in_panel_patch_2`
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 141.0.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -9,7 +9,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
11
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
12
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
12
|
var _consts = require("../../consts");
|
|
14
13
|
/**
|
|
15
14
|
* @jsxRuntime classic
|
|
@@ -31,10 +30,8 @@ var getWidth = function getWidth(width, mode) {
|
|
|
31
30
|
if ((0, _editorExperiment.editorExperiment)('advanced_layouts', true) && width) {
|
|
32
31
|
return "min(".concat(width, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
33
32
|
} else {
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
return "min(".concat(_editorSharedStyles.akEditorMaxLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
37
|
-
}
|
|
33
|
+
if (mode === 'max' || typeof width === 'number' && width >= _editorSharedStyles.akEditorFullWidthLayoutWidth) {
|
|
34
|
+
return "min(".concat(_editorSharedStyles.akEditorMaxLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
38
35
|
}
|
|
39
36
|
if (mode === 'full-width') {
|
|
40
37
|
return "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
@@ -48,7 +48,7 @@ var PanelStyledCompiled = exports.PanelStyledCompiled = function PanelStyledComp
|
|
|
48
48
|
var customBackgroundColor = backgroundColor ? (0, _editorPalette.hexToEditorBackgroundPaletteColor)(backgroundColor) || backgroundColor : undefined;
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, props, {
|
|
50
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- intentional: preserve existing PanelSharedCssClassName.prefix class
|
|
51
|
-
className: (0, _runtime.ax)(["_lklzfajl _imyb1bbz _50vakb7n _19agidpf _1q6xf1ug _jde2v77o _1bi2v77o _gb1eidpf _11k7idpf _fc9iidpf _1554u2gc _1eiopxbi _1w22u2gc _66ohu2gc _1it3jmsf _19s71txw _18w0h2mm _13n84jg8 _6qwr1hna _ujht1s93 _iqv91kw7 _1l9midpf _1v1c1ejb _11wb1ejb _1oah1ntv _1pciu2gc _1cgk1h6o _5zphglyw _wz94glyw _zs6jglyw _1n3wglyw _1yw1vq3b _1h33yhbg _1a3fnkob _1uvd116y _1hauowts _7c6p1t9x _udsa1o8l _nlelp2ly _18y8qm1h _e5ovn729 _g8a34pcx _1g6dibhp _1udservl _15sp1vk5 _1fe7s4qr _s4ldn729 _gt7x4pcx", (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) && (0, _fg.fg)('platform_editor_nest_table_in_panel_patch_3') && "_niep1s93 _a9e5p2ly _giv8n729 _vy90n729 _eba1ibhp _18hz1vk5 _93eu1aok", (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) &&
|
|
51
|
+
className: (0, _runtime.ax)(["_lklzfajl _imyb1bbz _50vakb7n _19agidpf _1q6xf1ug _jde2v77o _1bi2v77o _gb1eidpf _11k7idpf _fc9iidpf _1554u2gc _1eiopxbi _1w22u2gc _66ohu2gc _1it3jmsf _19s71txw _18w0h2mm _13n84jg8 _6qwr1hna _ujht1s93 _iqv91kw7 _1l9midpf _1v1c1ejb _11wb1ejb _1oah1ntv _1pciu2gc _1cgk1h6o _5zphglyw _wz94glyw _zs6jglyw _1n3wglyw _1yw1vq3b _1h33yhbg _1a3fnkob _1uvd116y _1hauowts _7c6p1t9x _udsa1o8l _nlelp2ly _18y8qm1h _e5ovn729 _g8a34pcx _1g6dibhp _1udservl _15sp1vk5 _1fe7s4qr _s4ldn729 _gt7x4pcx", (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) && (0, _fg.fg)('platform_editor_nest_table_in_panel_patch_3') && "_niep1s93 _a9e5p2ly _giv8n729 _vy90n729 _eba1ibhp _18hz1vk5 _93eu1aok", (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) && "_19mdyhbg", !hasIcon && "_1whxutpp _1b0jutpp", props['data-panel-type'] === _panel.PanelType.CUSTOM && backgroundColor && "_122m1aok", "_9dunutpp _pzbautpp", "_1wvnia51", className]),
|
|
52
52
|
style: _objectSpread(_objectSpread({}, {
|
|
53
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- intentional: custom panel background is dynamic via CSS variable
|
|
54
54
|
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
@@ -213,7 +213,7 @@ var PanelStyledEmotion = exports.PanelStyledEmotion = function PanelStyledEmotio
|
|
|
213
213
|
{
|
|
214
214
|
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
215
215
|
},
|
|
216
|
-
css: [panelBaseStyles, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) && (0, _fg.fg)('platform_editor_nest_table_in_panel_patch_3') && panelBackgroundColorVariableStyles, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) &&
|
|
216
|
+
css: [panelBaseStyles, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) && (0, _fg.fg)('platform_editor_nest_table_in_panel_patch_3') && panelBackgroundColorVariableStyles, (0, _expValEquals.expValEquals)('platform_editor_nest_table_in_panel', 'isEnabled', true) && panelInfoIconStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === _panel.PanelType.CUSTOM && backgroundColor && panelCustomBackground, panelNestedIconStyles, nestedPanelStyles]
|
|
217
217
|
// Ignored via go/ees005
|
|
218
218
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
219
219
|
}, props), props.children);
|
|
@@ -13,7 +13,6 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
13
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
14
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
15
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
16
|
var _rendererContext = require("../../../renderer-context");
|
|
18
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
19
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -370,8 +369,8 @@ var Colgroup = exports.Colgroup = function Colgroup(props) {
|
|
|
370
369
|
})) !== null && _renderSyncBlockColgr !== void 0 ? _renderSyncBlockColgr : renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
371
370
|
isTopLevelRenderer: isTopLevelRenderer,
|
|
372
371
|
isInsideOfSyncBlock: isInsideOfSyncBlock,
|
|
373
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max'
|
|
374
|
-
isTableFixedColumnWidthsOptionEnabled: isTableFixedColumnWidthsOptionEnabled && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max'
|
|
372
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' || props.rendererAppearance === 'comment',
|
|
373
|
+
isTableFixedColumnWidthsOptionEnabled: isTableFixedColumnWidthsOptionEnabled && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max')
|
|
375
374
|
}));
|
|
376
375
|
if (!colStyles) {
|
|
377
376
|
return null;
|
|
@@ -622,7 +622,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
622
622
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(_style.FullPagePadding, "px * 2");
|
|
623
623
|
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
624
624
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
625
|
-
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)
|
|
625
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
626
626
|
return "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
627
627
|
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
628
628
|
return "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
@@ -641,9 +641,9 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
641
641
|
var fullWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
642
642
|
var maxWidthLineLengthCSS = "min(".concat(_editorSharedStyles.akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
643
643
|
var isCommentAppearanceAndTableAlignmentEnabled = (0, _appearance.isCommentAppearance)(rendererAppearance) && allowTableAlignment;
|
|
644
|
-
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : (0, _appearance.isMaxWidthAppearance)(rendererAppearance)
|
|
644
|
+
var lineLengthCSS = (0, _appearance.isFullWidthAppearance)(rendererAppearance) ? fullWidthLineLengthCSS : (0, _appearance.isMaxWidthAppearance)(rendererAppearance) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
645
645
|
var tableWidthNew = (0, _nodeWidth.getTableContainerWidth)(tableNode);
|
|
646
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || (0, _appearance.isMaxWidthAppearance)(rendererAppearance)
|
|
646
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && ((0, _appearance.isFullPageAppearance)(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || (0, _appearance.isFullWidthAppearance)(rendererAppearance) || (0, _appearance.isMaxWidthAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
647
647
|
var leftCSS;
|
|
648
648
|
if (shouldCalculateLeftForAlignment) {
|
|
649
649
|
leftCSS = "(".concat(tableWidthCSS, " - ").concat(lineLengthCSS, ") / 2");
|
|
@@ -672,7 +672,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
|
|
|
672
672
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
673
673
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
674
674
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
675
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max'
|
|
675
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max') {
|
|
676
676
|
finalTableContainerWidth = allowTableResizing ? "calc(".concat(tableWidthCSS, ")") : 'inherit';
|
|
677
677
|
}
|
|
678
678
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -2313,13 +2313,13 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
2313
2313
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2314
2314
|
'--ak-renderer-editor-font-small-text': _ugcTokens.editorUGCTokensRefreshed['editor.font.body.small']
|
|
2315
2315
|
},
|
|
2316
|
-
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max'
|
|
2316
|
+
css: [(0, _expValEquals.expValEquals)('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !(0, _table2.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2317
2317
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2318
2318
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _fg.fg)('editor_inline_comments_on_inline_nodes') && ((0, _expValEquals.expValEquals)('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2319
2319
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2320
2320
|
(0, _fg.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2321
2321
|
// this should be placed after baseOtherStyles
|
|
2322
|
-
(0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), (0, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, (0, _fg.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max'
|
|
2322
|
+
(0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), (0, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, (0, _fg.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, (0, _expValEquals.expValEquals)('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2323
2323
|
"data-testid": testId
|
|
2324
2324
|
}, children);
|
|
2325
2325
|
};
|
|
@@ -29,8 +29,6 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
29
29
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
30
30
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
31
31
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
32
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
33
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
34
32
|
var _ = require("../../");
|
|
35
33
|
var _analyticsContext = _interopRequireDefault(require("../../analytics/analyticsContext"));
|
|
36
34
|
var _events = require("../../analytics/events");
|
|
@@ -73,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
73
71
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
74
72
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
75
73
|
var packageName = "@atlaskit/renderer";
|
|
76
|
-
var packageVersion = "141.0.
|
|
74
|
+
var packageVersion = "141.0.6";
|
|
77
75
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
78
76
|
containerName: 'ak-renderer-wrapper',
|
|
79
77
|
containerType: 'inline-size'
|
|
@@ -802,7 +800,7 @@ var RendererWrapper = /*#__PURE__*/_react.default.memo(function (props) {
|
|
|
802
800
|
// Only apply container-type = inline-size when having a known width in full-page/full-width/comment mode.
|
|
803
801
|
// Otherwise when appearance is unspecified the renderer size is decided by the content.
|
|
804
802
|
// In this case we can't set the container-type = inline-size as it will collapse width to 0.
|
|
805
|
-
return (appearance === 'full-page' || appearance === 'full-width' ||
|
|
803
|
+
return (appearance === 'full-page' || appearance === 'full-width' || appearance === 'max') &&
|
|
806
804
|
// In case of having excerpt-include on page there are multiple renderers nested.
|
|
807
805
|
// Make sure only the root renderer is set to be query container.
|
|
808
806
|
isTopLevelRenderer && allowRendererContainerStyles ? (0, _react2.jsx)("div", {
|
|
@@ -859,11 +857,6 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
|
|
|
859
857
|
adfDocument = props.document;
|
|
860
858
|
var localRef = _react.default.useRef(null);
|
|
861
859
|
var innerRef = props.innerRef || localRef;
|
|
862
|
-
|
|
863
|
-
// @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
|
|
864
|
-
if (props.appearance === 'max' && !(0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && !(0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
865
|
-
props.appearance = 'full-width';
|
|
866
|
-
}
|
|
867
860
|
if (!allowAnnotations) {
|
|
868
861
|
// Ignored via go/ees005
|
|
869
862
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -7,7 +7,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
7
7
|
import { jsx, css } from '@emotion/react';
|
|
8
8
|
import { akEditorFullWidthLayoutWidth, akEditorMaxLayoutWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { RendererCssClassName } from '../../consts';
|
|
12
11
|
const flexWrapperStyles = css({
|
|
13
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -23,10 +22,8 @@ const getWidth = (width, mode) => {
|
|
|
23
22
|
if (editorExperiment('advanced_layouts', true) && width) {
|
|
24
23
|
return `min(${width}px, var(--ak-editor--breakout-container-without-gutter-width))`;
|
|
25
24
|
} else {
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
return `min(${akEditorMaxLayoutWidth}px, var(--ak-editor--breakout-container-without-gutter-width))`;
|
|
29
|
-
}
|
|
25
|
+
if (mode === 'max' || typeof width === 'number' && width >= akEditorFullWidthLayoutWidth) {
|
|
26
|
+
return `min(${akEditorMaxLayoutWidth}px, var(--ak-editor--breakout-container-without-gutter-width))`;
|
|
30
27
|
}
|
|
31
28
|
if (mode === 'full-width') {
|
|
32
29
|
return `min(${akEditorFullWidthLayoutWidth}px, var(--ak-editor--breakout-container-without-gutter-width))`;
|
|
@@ -37,7 +37,7 @@ export const PanelStyledCompiled = ({
|
|
|
37
37
|
const customBackgroundColor = backgroundColor ? hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor : undefined;
|
|
38
38
|
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
39
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- intentional: preserve existing PanelSharedCssClassName.prefix class
|
|
40
|
-
className: ax(["_lklzfajl _1alzoqnp _xmo1idpf _u70eidpf _1m1jidpf _50vakb7n _19agidpf _1q6xf1ug _jde2v77o _1bi2v77o _gb1eidpf _11k7idpf _fc9iidpf _1554u2gc _1eiopxbi _1w22u2gc _66ohu2gc _1it3ckbl _19s71txw _18w0h2mm _13n84jg8 _6qwr1hna _ujht1s93 _iqv91kw7 _1l9midpf _1v1c1ejb _11wb1ejb _1oah1ntv _1pciu2gc _1cgk1h6o _5zphglyw _wz94glyw _zs6jglyw _1n3wglyw _1yw1vq3b _1h33yhbg _1a3fnkob _1uvd116y _1hau12gs _7c6pj39m _udsa1o8l _nlelp2ly _18y8qm1h _e5ovn729 _g8a34pcx _1g6dibhp _1udservl _15sp1vk5 _1fe7s4qr _s4ldn729 _gt7x4pcx", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && fg('platform_editor_nest_table_in_panel_patch_3') && "_niep1s93 _a9e5p2ly _giv8n729 _vy90n729 _eba1ibhp _18hz1vk5 _93eu1aok", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) &&
|
|
40
|
+
className: ax(["_lklzfajl _1alzoqnp _xmo1idpf _u70eidpf _1m1jidpf _50vakb7n _19agidpf _1q6xf1ug _jde2v77o _1bi2v77o _gb1eidpf _11k7idpf _fc9iidpf _1554u2gc _1eiopxbi _1w22u2gc _66ohu2gc _1it3ckbl _19s71txw _18w0h2mm _13n84jg8 _6qwr1hna _ujht1s93 _iqv91kw7 _1l9midpf _1v1c1ejb _11wb1ejb _1oah1ntv _1pciu2gc _1cgk1h6o _5zphglyw _wz94glyw _zs6jglyw _1n3wglyw _1yw1vq3b _1h33yhbg _1a3fnkob _1uvd116y _1hau12gs _7c6pj39m _udsa1o8l _nlelp2ly _18y8qm1h _e5ovn729 _g8a34pcx _1g6dibhp _1udservl _15sp1vk5 _1fe7s4qr _s4ldn729 _gt7x4pcx", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && fg('platform_editor_nest_table_in_panel_patch_3') && "_niep1s93 _a9e5p2ly _giv8n729 _vy90n729 _eba1ibhp _18hz1vk5 _93eu1aok", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && "_19mdyhbg", !hasIcon && "_1whxutpp _1b0jutpp", props['data-panel-type'] === PanelType.CUSTOM && backgroundColor && "_122m1aok", "_9dunutpp _pzbautpp", "_1wvnia51", className]),
|
|
41
41
|
style: {
|
|
42
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- intentional: custom panel background is dynamic via CSS variable
|
|
43
43
|
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
@@ -206,7 +206,7 @@ export const PanelStyledEmotion = ({
|
|
|
206
206
|
{
|
|
207
207
|
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
208
208
|
},
|
|
209
|
-
css: [panelBaseStyles, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && fg('platform_editor_nest_table_in_panel_patch_3') && panelBackgroundColorVariableStyles, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) &&
|
|
209
|
+
css: [panelBaseStyles, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && fg('platform_editor_nest_table_in_panel_patch_3') && panelBackgroundColorVariableStyles, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && panelInfoIconStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === PanelType.CUSTOM && backgroundColor && panelCustomBackground, panelNestedIconStyles, nestedPanelStyles]
|
|
210
210
|
// Ignored via go/ees005
|
|
211
211
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
212
212
|
}, props), props.children);
|
|
@@ -4,7 +4,6 @@ import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common
|
|
|
4
4
|
import { WidthContext } from '@atlaskit/editor-common/ui';
|
|
5
5
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth, akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
import { useRendererContext } from '../../../renderer-context';
|
|
9
8
|
// we allow scaling down column widths by no more than 30%
|
|
10
9
|
// this intends to reduce unwanted scrolling in the Renderer in these scenarios:
|
|
@@ -342,8 +341,8 @@ export const Colgroup = props => {
|
|
|
342
341
|
...props,
|
|
343
342
|
isTopLevelRenderer,
|
|
344
343
|
isInsideOfSyncBlock,
|
|
345
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max'
|
|
346
|
-
isTableFixedColumnWidthsOptionEnabled: isTableFixedColumnWidthsOptionEnabled && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max'
|
|
344
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' || props.rendererAppearance === 'comment',
|
|
345
|
+
isTableFixedColumnWidthsOptionEnabled: isTableFixedColumnWidthsOptionEnabled && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max')
|
|
347
346
|
});
|
|
348
347
|
if (!colStyles) {
|
|
349
348
|
return null;
|
|
@@ -561,7 +561,7 @@ export class TableContainer extends React.Component {
|
|
|
561
561
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : `100cqw - ${FullPagePadding}px * 2`;
|
|
562
562
|
const renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : `100cqw`;
|
|
563
563
|
const calcDefaultLayoutWidthByAppearance = (rendererAppearance, tableNode) => {
|
|
564
|
-
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)
|
|
564
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
565
565
|
return `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
566
566
|
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
567
567
|
return `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
@@ -580,9 +580,9 @@ export class TableContainer extends React.Component {
|
|
|
580
580
|
const fullWidthLineLengthCSS = `min(${akEditorFullWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
581
581
|
const maxWidthLineLengthCSS = `min(${akEditorMaxWidthLayoutWidth}px, ${renderWidthCSS})`;
|
|
582
582
|
const isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
583
|
-
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance)
|
|
583
|
+
const lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : `${lineLengthFixedWidth}px`;
|
|
584
584
|
const tableWidthNew = getTableContainerWidth(tableNode);
|
|
585
|
-
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance)
|
|
585
|
+
const shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
586
586
|
let leftCSS;
|
|
587
587
|
if (shouldCalculateLeftForAlignment) {
|
|
588
588
|
leftCSS = `(${tableWidthCSS} - ${lineLengthCSS}) / 2`;
|
|
@@ -611,7 +611,7 @@ export class TableContainer extends React.Component {
|
|
|
611
611
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
612
612
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
613
613
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
614
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max'
|
|
614
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max') {
|
|
615
615
|
finalTableContainerWidth = allowTableResizing ? `calc(${tableWidthCSS})` : 'inherit';
|
|
616
616
|
}
|
|
617
617
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -2948,13 +2948,13 @@ export const RendererStyleContainer = props => {
|
|
|
2948
2948
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2949
2949
|
'--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
|
|
2950
2950
|
},
|
|
2951
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max'
|
|
2951
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2952
2952
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2953
2953
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2954
2954
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2955
2955
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2956
2956
|
// this should be placed after baseOtherStyles
|
|
2957
|
-
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, fg('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max'
|
|
2957
|
+
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, fg('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2958
2958
|
"data-testid": testId
|
|
2959
2959
|
}, children);
|
|
2960
2960
|
};
|
|
@@ -23,8 +23,6 @@ import { BaseTheme, IntlErrorBoundary, UnsupportedBlock, WidthProvider, WithCrea
|
|
|
23
23
|
import { getAnalyticsAppearance, getAnalyticsEventSeverity, shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
24
24
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
25
25
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
26
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
28
26
|
import { ReactSerializer, renderDocument } from '../../';
|
|
29
27
|
import AnalyticsContext from '../../analytics/analyticsContext';
|
|
30
28
|
import { MODE, PLATFORM } from '../../analytics/events';
|
|
@@ -58,7 +56,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
58
56
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
59
57
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
60
58
|
const packageName = "@atlaskit/renderer";
|
|
61
|
-
const packageVersion = "141.0.
|
|
59
|
+
const packageVersion = "141.0.6";
|
|
62
60
|
const setAsQueryContainerStyles = css({
|
|
63
61
|
containerName: 'ak-renderer-wrapper',
|
|
64
62
|
containerType: 'inline-size'
|
|
@@ -793,7 +791,7 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
|
|
|
793
791
|
// Only apply container-type = inline-size when having a known width in full-page/full-width/comment mode.
|
|
794
792
|
// Otherwise when appearance is unspecified the renderer size is decided by the content.
|
|
795
793
|
// In this case we can't set the container-type = inline-size as it will collapse width to 0.
|
|
796
|
-
return (appearance === 'full-page' || appearance === 'full-width' ||
|
|
794
|
+
return (appearance === 'full-page' || appearance === 'full-width' || appearance === 'max') &&
|
|
797
795
|
// In case of having excerpt-include on page there are multiple renderers nested.
|
|
798
796
|
// Make sure only the root renderer is set to be query container.
|
|
799
797
|
isTopLevelRenderer && allowRendererContainerStyles ? jsx("div", {
|
|
@@ -849,11 +847,6 @@ const RendererWithAnnotationSelection = props => {
|
|
|
849
847
|
} = props;
|
|
850
848
|
const localRef = React.useRef(null);
|
|
851
849
|
const innerRef = props.innerRef || localRef;
|
|
852
|
-
|
|
853
|
-
// @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
|
|
854
|
-
if (props.appearance === 'max' && !expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && !expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
855
|
-
props.appearance = 'full-width';
|
|
856
|
-
}
|
|
857
850
|
if (!allowAnnotations) {
|
|
858
851
|
// Ignored via go/ees005
|
|
859
852
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -7,7 +7,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
7
7
|
import { jsx, css } from '@emotion/react';
|
|
8
8
|
import { akEditorFullWidthLayoutWidth, akEditorMaxLayoutWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { RendererCssClassName } from '../../consts';
|
|
12
11
|
var flexWrapperStyles = css({
|
|
13
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -23,10 +22,8 @@ var getWidth = function getWidth(width, mode) {
|
|
|
23
22
|
if (editorExperiment('advanced_layouts', true) && width) {
|
|
24
23
|
return "min(".concat(width, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
25
24
|
} else {
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
return "min(".concat(akEditorMaxLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
29
|
-
}
|
|
25
|
+
if (mode === 'max' || typeof width === 'number' && width >= akEditorFullWidthLayoutWidth) {
|
|
26
|
+
return "min(".concat(akEditorMaxLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
30
27
|
}
|
|
31
28
|
if (mode === 'full-width') {
|
|
32
29
|
return "min(".concat(akEditorFullWidthLayoutWidth, "px, var(--ak-editor--breakout-container-without-gutter-width))");
|
|
@@ -41,7 +41,7 @@ var PanelStyledCompiled = function PanelStyledCompiled(_ref) {
|
|
|
41
41
|
var customBackgroundColor = backgroundColor ? hexToEditorBackgroundPaletteColor(backgroundColor) || backgroundColor : undefined;
|
|
42
42
|
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
43
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- intentional: preserve existing PanelSharedCssClassName.prefix class
|
|
44
|
-
className: ax(["_lklzfajl _imyb1bbz _50vakb7n _19agidpf _1q6xf1ug _jde2v77o _1bi2v77o _gb1eidpf _11k7idpf _fc9iidpf _1554u2gc _1eiopxbi _1w22u2gc _66ohu2gc _1it3jmsf _19s71txw _18w0h2mm _13n84jg8 _6qwr1hna _ujht1s93 _iqv91kw7 _1l9midpf _1v1c1ejb _11wb1ejb _1oah1ntv _1pciu2gc _1cgk1h6o _5zphglyw _wz94glyw _zs6jglyw _1n3wglyw _1yw1vq3b _1h33yhbg _1a3fnkob _1uvd116y _1hauowts _7c6p1t9x _udsa1o8l _nlelp2ly _18y8qm1h _e5ovn729 _g8a34pcx _1g6dibhp _1udservl _15sp1vk5 _1fe7s4qr _s4ldn729 _gt7x4pcx", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && fg('platform_editor_nest_table_in_panel_patch_3') && "_niep1s93 _a9e5p2ly _giv8n729 _vy90n729 _eba1ibhp _18hz1vk5 _93eu1aok", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) &&
|
|
44
|
+
className: ax(["_lklzfajl _imyb1bbz _50vakb7n _19agidpf _1q6xf1ug _jde2v77o _1bi2v77o _gb1eidpf _11k7idpf _fc9iidpf _1554u2gc _1eiopxbi _1w22u2gc _66ohu2gc _1it3jmsf _19s71txw _18w0h2mm _13n84jg8 _6qwr1hna _ujht1s93 _iqv91kw7 _1l9midpf _1v1c1ejb _11wb1ejb _1oah1ntv _1pciu2gc _1cgk1h6o _5zphglyw _wz94glyw _zs6jglyw _1n3wglyw _1yw1vq3b _1h33yhbg _1a3fnkob _1uvd116y _1hauowts _7c6p1t9x _udsa1o8l _nlelp2ly _18y8qm1h _e5ovn729 _g8a34pcx _1g6dibhp _1udservl _15sp1vk5 _1fe7s4qr _s4ldn729 _gt7x4pcx", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && fg('platform_editor_nest_table_in_panel_patch_3') && "_niep1s93 _a9e5p2ly _giv8n729 _vy90n729 _eba1ibhp _18hz1vk5 _93eu1aok", expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && "_19mdyhbg", !hasIcon && "_1whxutpp _1b0jutpp", props['data-panel-type'] === PanelType.CUSTOM && backgroundColor && "_122m1aok", "_9dunutpp _pzbautpp", "_1wvnia51", className]),
|
|
45
45
|
style: _objectSpread(_objectSpread({}, {
|
|
46
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- intentional: custom panel background is dynamic via CSS variable
|
|
47
47
|
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
@@ -207,7 +207,7 @@ var PanelStyledEmotion = function PanelStyledEmotion(_ref) {
|
|
|
207
207
|
{
|
|
208
208
|
'--ak-renderer-panel-custom-bg-color': customBackgroundColor
|
|
209
209
|
},
|
|
210
|
-
css: [panelBaseStyles, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && fg('platform_editor_nest_table_in_panel_patch_3') && panelBackgroundColorVariableStyles, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) &&
|
|
210
|
+
css: [panelBaseStyles, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && fg('platform_editor_nest_table_in_panel_patch_3') && panelBackgroundColorVariableStyles, expValEquals('platform_editor_nest_table_in_panel', 'isEnabled', true) && panelInfoIconStyles, !hasIcon && panelHasNoIconStyles, props['data-panel-type'] === PanelType.CUSTOM && backgroundColor && panelCustomBackground, panelNestedIconStyles, nestedPanelStyles]
|
|
211
211
|
// Ignored via go/ees005
|
|
212
212
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
213
213
|
}, props), props.children);
|
|
@@ -7,7 +7,6 @@ import { tableCellBorderWidth, tableCellMinWidth } from '@atlaskit/editor-common
|
|
|
7
7
|
import { WidthContext } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import { akEditorTableNumberColumnWidth, akEditorTableLegacyCellMinWidth, akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { useRendererContext } from '../../../renderer-context';
|
|
12
11
|
// we allow scaling down column widths by no more than 30%
|
|
13
12
|
// this intends to reduce unwanted scrolling in the Renderer in these scenarios:
|
|
@@ -361,8 +360,8 @@ export var Colgroup = function Colgroup(props) {
|
|
|
361
360
|
})) !== null && _renderSyncBlockColgr !== void 0 ? _renderSyncBlockColgr : renderScaleDownColgroup(_objectSpread(_objectSpread({}, props), {}, {
|
|
362
361
|
isTopLevelRenderer: isTopLevelRenderer,
|
|
363
362
|
isInsideOfSyncBlock: isInsideOfSyncBlock,
|
|
364
|
-
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max'
|
|
365
|
-
isTableFixedColumnWidthsOptionEnabled: isTableFixedColumnWidthsOptionEnabled && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max'
|
|
363
|
+
isTableScalingEnabled: props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max' || props.rendererAppearance === 'comment',
|
|
364
|
+
isTableFixedColumnWidthsOptionEnabled: isTableFixedColumnWidthsOptionEnabled && (props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width' || props.rendererAppearance === 'max')
|
|
366
365
|
}));
|
|
367
366
|
if (!colStyles) {
|
|
368
367
|
return null;
|
|
@@ -617,7 +617,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
617
617
|
}) ? 'calc(100cqw - var(--ak-renderer--full-page-gutter) * 2)' : "100cqw - ".concat(FullPagePadding, "px * 2");
|
|
618
618
|
var renderWidthCSS = rendererAppearance === 'full-page' ? fullPageRendererWidthCSS : "100cqw";
|
|
619
619
|
var calcDefaultLayoutWidthByAppearance = function calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode) {
|
|
620
|
-
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)
|
|
620
|
+
if (rendererAppearance === 'max' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
621
621
|
return "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
622
622
|
} else if (rendererAppearance === 'full-width' && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width)) {
|
|
623
623
|
return "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
@@ -636,9 +636,9 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
636
636
|
var fullWidthLineLengthCSS = "min(".concat(akEditorFullWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
637
637
|
var maxWidthLineLengthCSS = "min(".concat(akEditorMaxWidthLayoutWidth, "px, ").concat(renderWidthCSS, ")");
|
|
638
638
|
var isCommentAppearanceAndTableAlignmentEnabled = isCommentAppearance(rendererAppearance) && allowTableAlignment;
|
|
639
|
-
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance)
|
|
639
|
+
var lineLengthCSS = isFullWidthAppearance(rendererAppearance) ? fullWidthLineLengthCSS : isMaxWidthAppearance(rendererAppearance) ? maxWidthLineLengthCSS : isCommentAppearanceAndTableAlignmentEnabled ? renderWidthCSS : "".concat(lineLengthFixedWidth, "px");
|
|
640
640
|
var tableWidthNew = getTableContainerWidth(tableNode);
|
|
641
|
-
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance)
|
|
641
|
+
var shouldCalculateLeftForAlignment = !isInsideOfBlockNode && !isInsideOfTable && isTableAlignStart && (isFullPageAppearance(rendererAppearance) && tableWidthNew <= lineLengthFixedWidth || isFullWidthAppearance(rendererAppearance) || isMaxWidthAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled);
|
|
642
642
|
var leftCSS;
|
|
643
643
|
if (shouldCalculateLeftForAlignment) {
|
|
644
644
|
leftCSS = "(".concat(tableWidthCSS, " - ").concat(lineLengthCSS, ") / 2");
|
|
@@ -667,7 +667,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
667
667
|
// We can only use CSS to determine the width when we have a known width in container.
|
|
668
668
|
// When appearance is full-page, full-width or comment we use CSS based width calculation.
|
|
669
669
|
// Otherwise it's fixed table width (customized width) or inherit.
|
|
670
|
-
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max'
|
|
670
|
+
if (rendererAppearance === 'full-page' || rendererAppearance === 'full-width' || rendererAppearance === 'max') {
|
|
671
671
|
finalTableContainerWidth = allowTableResizing ? "calc(".concat(tableWidthCSS, ")") : 'inherit';
|
|
672
672
|
}
|
|
673
673
|
if (rendererAppearance === 'comment' && allowTableResizing && !allowTableAlignment) {
|
|
@@ -2306,13 +2306,13 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
2306
2306
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- CSS custom properties for UGC font tokens
|
|
2307
2307
|
'--ak-renderer-editor-font-small-text': editorUGCTokensRefreshed['editor.font.body.small']
|
|
2308
2308
|
},
|
|
2309
|
-
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max'
|
|
2309
|
+
css: [expValEquals('confluence_ttvc_inline_extensions', 'isEnabled', true) ? baseFontStyle : originalBaseFontLineHeight, baseStyles, fontSizeStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingAnchorStyles : headingAnchorStylesDuplicateAnchor, headingAnchorButtonFocusVisibleStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? hideHeadingCopyLinkWrapperStyles : hideHeadingCopyLinkWrapperStylesDuplicateAnchor, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererFullWidthStyles : oldRendererFullWidthStyles), (appearance === 'full-width' || appearance === 'max') && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? rendererMaxWidthStyles : oldRendererMaxWidthStyles), rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingWrapperInlineFlowStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? headingWithAlignmentStyles : headingWithAlignmentStylesDuplicateAnchor, ruleSharedStyles, contentMode === 'compact' && extensionStyle, contentMode === 'compact' ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, listItemHiddenMarkerStyles, indentationSharedStyles, indentationSharedStylesWithMarginFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? blockMarksSharedStyles : blockMarksSharedStylesDuplicateAnchor, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && highlightLinksUnsetStyles,
|
|
2310
2310
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
2311
2311
|
textHighlightPaddingStyles, tasksAndDecisionsStyles, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) && headingPanelStyles, smartCardStyles, smartCardStylesAvatarFix, headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && (expValEquals('confluence_fe_renderer_inline_node_mark_color_fix', 'isEnabled', true) ? rendererAnnotationStyles : rendererAnnotationStylesOld),
|
|
2312
2312
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
2313
2313
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
|
|
2314
2314
|
// this should be placed after baseOtherStyles
|
|
2315
|
-
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, fg('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max'
|
|
2315
|
+
expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && (expValEquals('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), fg('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_2') && tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, fg('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && isExperimentEnabled('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && (expValEquals('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, fg('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, expValEquals('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
|
|
2316
2316
|
"data-testid": testId
|
|
2317
2317
|
}, children);
|
|
2318
2318
|
};
|
|
@@ -28,8 +28,6 @@ import { BaseTheme, IntlErrorBoundary, UnsupportedBlock, WidthProvider, WithCrea
|
|
|
28
28
|
import { getAnalyticsAppearance, getAnalyticsEventSeverity, shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
29
29
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
30
30
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
31
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
32
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
33
31
|
import { ReactSerializer, renderDocument } from '../../';
|
|
34
32
|
import AnalyticsContext from '../../analytics/analyticsContext';
|
|
35
33
|
import { MODE, PLATFORM } from '../../analytics/events';
|
|
@@ -63,7 +61,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
63
61
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
64
62
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
65
63
|
var packageName = "@atlaskit/renderer";
|
|
66
|
-
var packageVersion = "141.0.
|
|
64
|
+
var packageVersion = "141.0.6";
|
|
67
65
|
var setAsQueryContainerStyles = css({
|
|
68
66
|
containerName: 'ak-renderer-wrapper',
|
|
69
67
|
containerType: 'inline-size'
|
|
@@ -792,7 +790,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
792
790
|
// Only apply container-type = inline-size when having a known width in full-page/full-width/comment mode.
|
|
793
791
|
// Otherwise when appearance is unspecified the renderer size is decided by the content.
|
|
794
792
|
// In this case we can't set the container-type = inline-size as it will collapse width to 0.
|
|
795
|
-
return (appearance === 'full-page' || appearance === 'full-width' ||
|
|
793
|
+
return (appearance === 'full-page' || appearance === 'full-width' || appearance === 'max') &&
|
|
796
794
|
// In case of having excerpt-include on page there are multiple renderers nested.
|
|
797
795
|
// Make sure only the root renderer is set to be query container.
|
|
798
796
|
isTopLevelRenderer && allowRendererContainerStyles ? jsx("div", {
|
|
@@ -849,11 +847,6 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
|
|
|
849
847
|
adfDocument = props.document;
|
|
850
848
|
var localRef = React.useRef(null);
|
|
851
849
|
var innerRef = props.innerRef || localRef;
|
|
852
|
-
|
|
853
|
-
// @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
|
|
854
|
-
if (props.appearance === 'max' && !expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && !expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) {
|
|
855
|
-
props.appearance = 'full-width';
|
|
856
|
-
}
|
|
857
850
|
if (!allowAnnotations) {
|
|
858
851
|
// Ignored via go/ees005
|
|
859
852
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "141.0.
|
|
3
|
+
"version": "141.0.7",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/status": "^5.12.0",
|
|
74
74
|
"@atlaskit/task-decision": "^21.10.0",
|
|
75
75
|
"@atlaskit/theme": "^28.2.0",
|
|
76
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
76
|
+
"@atlaskit/tmp-editor-statsig": "^202.0.0",
|
|
77
77
|
"@atlaskit/tokens": "^18.2.0",
|
|
78
78
|
"@atlaskit/tooltip": "^24.3.0",
|
|
79
79
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"uuid": "^11.1.1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@atlaskit/editor-common": "^123.
|
|
91
|
+
"@atlaskit/editor-common": "^123.5.0",
|
|
92
92
|
"@atlaskit/link-provider": "^5.7.0",
|
|
93
93
|
"@atlaskit/media-core": "^38.2.0",
|
|
94
94
|
"react": "^18.2.0 || ^19.2.0",
|
|
@@ -200,9 +200,6 @@
|
|
|
200
200
|
"platform_editor_bordered_panel_nested_in_table": {
|
|
201
201
|
"type": "boolean"
|
|
202
202
|
},
|
|
203
|
-
"platform_editor_nest_table_in_panel_patch_2": {
|
|
204
|
-
"type": "boolean"
|
|
205
|
-
},
|
|
206
203
|
"platform_editor_nest_table_in_panel_patch_3": {
|
|
207
204
|
"type": "boolean"
|
|
208
205
|
},
|