@atlaskit/editor-core 221.5.12 → 221.6.0

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.
Files changed (22) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +54 -0
  3. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +13 -1
  4. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +16 -2
  5. package/dist/cjs/ui/EditorContentContainer/styles/blockSpacingStyles.js +113 -0
  6. package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +47 -1
  7. package/dist/cjs/version-wrapper.js +1 -1
  8. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +54 -0
  9. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +13 -1
  10. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +17 -3
  11. package/dist/es2019/ui/EditorContentContainer/styles/blockSpacingStyles.js +114 -0
  12. package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +46 -0
  13. package/dist/es2019/version-wrapper.js +1 -1
  14. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +54 -0
  15. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +13 -1
  16. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +17 -3
  17. package/dist/esm/ui/EditorContentContainer/styles/blockSpacingStyles.js +106 -0
  18. package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +46 -0
  19. package/dist/esm/version-wrapper.js +1 -1
  20. package/dist/types/ui/EditorContentContainer/styles/blockSpacingStyles.d.ts +18 -0
  21. package/dist/types/ui/EditorContentContainer/styles/tableStyles.d.ts +7 -0
  22. package/package.json +12 -9
@@ -47,6 +47,12 @@ const GRID_GUTTER = 12;
47
47
  const blockNodesVerticalMargin = '0.75rem';
48
48
  const fontSize14px = `${14 / 16}rem`;
49
49
  const scaledBlockNodesVerticalMargin = '0.75em';
50
+ // Block spacing hook (gated by expValEquals('platform_editor_extension_block_spacing')).
51
+ // When the experiment is on, these variants re-declare the block margins to read from the
52
+ // `--ak-editor-extension-block-spacing` CSS custom property, falling back to the original values.
53
+ // When the experiment is off, none of these are applied and behaviour is identical to before.
54
+ const blockNodesVerticalMarginVar = 'var(--ak-editor-extension-block-spacing, 0.75rem)';
55
+ const scaledBlockNodesVerticalMarginVar = 'var(--ak-editor-extension-block-spacing, 0.75em)';
50
56
 
51
57
  // emoji constants — values inlined from packages/elements/emoji/src/util/constants.ts
52
58
  // If you need to update these values, please also update packages/elements/emoji/src/util/constants.ts
@@ -204,6 +210,8 @@ const editorContentStyles = {
204
210
  baseStyles: "_t7ab1vi7 _anrdukw8 _n6a11fwx _uw641q08 _fo6014dc _1gvnmqba _j03f1qop _qmjbxjz2 _zy25uj17 _pg931osq _121i1r31 _dcmgglyw _nv9v1o36 _19rk1uph _u8en3mia _3iqe18il _988v1osq _pi27grho _10zo1osq _1j8i1xb4",
205
211
  baseStylesMaxContainerWidthFixes: "_19rk1l99",
206
212
  blockMarksStyles: "_1244idpf _1qkxidpf _1e6iidpf _dvqjidpf _etngidpf _1jl2idpf _1je9idpf _1db9idpf _15i0idpf _16d4idpf _17liidpf _pxvridpf _1v4iidpf _s8m8idpf _16fuidpf _1543idpf _4offidpf _ttnbidpf _ujemidpf _1171idpf _mzasidpf _r8oxidpf _1pycidpf _6shmidpf _1bd0idpf _54e7idpf _1tenidpf _jzq1idpf _czpfidpf _1oraidpf _1kg4idpf _ksblidpf _1af7idpf _72x4idpf _zlwmidpf _7m6lidpf _1x2sidpf _3q5uidpf _11ukidpf _n65sidpf _1nn0idpf _1hwxidpf _j2goidpf _rfl4idpf _qhe2idpf _h4bbidpf _rjmvidpf _183yidpf _fk2nidpf _3429idpf _j543idpf _1op6idpf _mcklidpf _1uf8idpf _110lidpf _17agidpf _d9tridpf _f5slidpf _b9adidpf _1859idpf _1hrzidpf _1du2idpf _gdx6idpf _1av3idpf _1uj7idpf _s6y9idpf _ocz2idpf _129midpf _kj6kidpf _1uv9idpf _1tieidpf _ri4ridpf _tw0uidpf _15epidpf _12uhidpf _12i1idpf _vm1cidpf _jj6didpf _3d3tidpf _1xdsidpf",
213
+ blockSpacingVarStyles: "_poq41jih _shdd1jih _6st21jih _1j9eidpf _s5gz1jih _naf31jih _1de7idpf _1lezidpf _11ac1jih _lr831jih _jywy1jih _1ed81jih _14lv1jih _sls21jih _517s1jih _19jp1jih _1wbo1jih _6w10idpf _4cgxidpf _o96gidpf _1vtlidpf _zan7idpf _1jsnidpf _txhx1jih _dqv91jih _tkh81jih _ot961jih _1lzd1jih _ozar1jih _vmpy1jih _nre41jih _p4bhidpf _xirxidpf _borcidpf _uuikidpf _1jh6idpf _1qrtidpf _tz7vidpf _1wv1idpf",
214
+ blockSpacingVarScaledStyles: "_poq4h70n",
207
215
  blockquoteDangerStyles: "_10d41gly _13641bqt",
208
216
  blockquoteSelectedNodeStyles: "_13521dy8 _vee2q98m _vmcm1kdv _10ue1j28 _1fn81j28 _11781j28 _1o6w1j28",
209
217
  blocktypeStyles: "_6st2oqnp _g09oidpf _19vkidpf _17vdidpf _1gtxusvi _1htf1kw7 _a3pn1osq _lqso1o8l _19v7idpf _oql5idpf _1w3ipxbi _1sz21dm9 _1nehnqa1 _95mn1l7x _1ezqidpf _s6l1pxbi _1j9eidpf _ymd7b3bt _1cbmglyw _ew481ule _104r17hw _1mzi17hw _15l01ule _12lj1ule _q4ju1ule _yqzd1ule _1ohls05q _13dhs0v8 _1qup44jv _mhqkq19t _fziqs05q _12sp1aa5 _ab5gidpf _10u5idpf _f850idpf",
@@ -356,6 +364,7 @@ const editorContentStyles = {
356
364
  tableCommentEditorStyles: "_s9qz1mok _1quk1aqn _1tb2idpf _8vyeidpf _1igzolhs _ux48glyw _giavsm61 _axu71ibz",
357
365
  tableContainerStyles: "_18ml1osq _9e5g1wug _uwd31osq _12wgusvi _nnhzewfl _1gbz1osq _10va1osq _lkzl1n9t _1mca1wug",
358
366
  tableContentModeStyles: "_1lxan7od _11a2n7od _19iin7od _1vpzn7od _l6b9n7od _9v33vi1l _poet1ris _9loxvi1l _1dsv1wug _r83tvi1l _cbmx261p",
367
+ tableContentModeNestedTableStyles: "_pgryglyw _15spidpf _kze5vi1l _130mvi1l _9loxvi1l _ubzd1g3s _1ysk1g3s _u8ab1g3s _162evi1l _1dcuglyw _1uciidpf _1g73261p _g6ebvi1l _pru7vi1l _h2quglyw _p73zglyw _8wilewfl _1tdlewfl",
359
368
  tableEmptyRowStyles: "_1rgmmh6f _u0mgmh6f",
360
369
  tableRoundedCornerStyles: "_1c5kpb1k _qqx7pb1k _10n4pb1k _ddbmpb1k _hnwypb1k _vg21pb1k _iew5pb1k _b4v9pb1k",
361
370
  tableLayoutFixes: "_1f5xidpf _28dsidpf _f30jidpf _jr291hrf",
@@ -432,6 +441,9 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
432
441
  })
433
442
  };
434
443
  const browser = getBrowserInfo();
444
+
445
+ // Evaluate the block-spacing experiment once per render.
446
+ const isBlockSpacingEnabled = expValEquals('platform_editor_extension_block_spacing', 'isEnabled', true);
435
447
  return /*#__PURE__*/React.createElement("div", {
436
448
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
437
449
  className: ax([editorContentStyles.baseStyles, editorContentStyles.maxModeReizeFixStyles, editorContentStyles.baseStylesMaxContainerWidthFixes, fg('platform_editor_controls_increase_full_page_gutter') && editorExperiment('platform_editor_controls', 'variant1') ? editorContentStyles.editorLargeGutterPuddingBaseStylesEditorControls : editorContentStyles.editorLargeGutterPuddingBaseStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true, {
@@ -445,7 +457,7 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
445
457
  }) && editorContentStyles.textSelectedNodeStyles, fg('platform_editor_typography_ugc') ? editorContentStyles.blocktypeStyles_fg_platform_editor_typography_ugc : editorContentStyles.blocktypeStyles_without_fg_platform_editor_typography_ugc, fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.codeMarkStyles, expValEquals('platform_editor_a11y_scrollable_region', 'isEnabled', true) && editorContentStyles.codeMarkStylesA11yFix, editorContentStyles.textColorStyles, editorContentStyles.backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && editorContentStyles.highlightLinksUnsetStyles, editorContentStyles.textHighlightPaddingStyles, editorContentStyles.listsStyles, expValEqualsNoExposure('platform_editor_flexible_list_schema', 'isEnabled', true) && editorContentStyles.listItemHiddenMarkerStyles, editorContentStyles.diffListStyles, contentMode === 'compact' && isDense && editorContentStyles.listsDenseStyles, isFullPage && editorContentStyles.listsStylesMarginLayoutShiftFix, editorContentStyles.ruleStyles, editorContentStyles.smartCardDiffStyles, expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? editorContentStyles.showDiffDeletedNodeStylesNew : editorContentStyles.showDiffDeletedNodeStyles, editorContentStyles.mediaStyles, contentMode === 'compact' && editorContentStyles.mediaCaptionStyles, fg('platform_editor_fix_media_in_renderer') && editorContentStyles.firstWrappedMediaStyles, editorContentStyles.telepointerStyle, /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */
446
458
  editorContentStyles.telepointerColorAndCommonStyle, editorContentStyles.gapCursorStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.gapCursorStylesVisibilityFix, editorContentStyles.panelStyles, editorContentStyles.nestedPanelBorderStylesMixin, fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.panelStylesMixin, editorContentStyles.mentionsStyles, editorContentStyles.tasksAndDecisionsStyles, contentMode === 'compact' && isDense && editorContentStyles.tasksAndDecisionsDenseStyles, editorContentStyles.gridStyles, editorContentStyles.blockMarksStyles, editorContentStyles.dateStyles, editorContentStyles.extensionStyles, contentMode === 'compact' && editorContentStyles.extensionStylesDense, expValEquals('platform_editor_bodiedextension_layoutshift_fix', 'isEnabled', true) && editorContentStyles.bodiedExtensionLayoutShiftFix, editorContentStyles.extensionDiffStyles, editorContentStyles.expandStylesBase, !useStandardNodeWidth && editorContentStyles.expandStyles, contentMode === 'compact' && isDense && editorContentStyles.expandDenseStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes : editorContentStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && editorContentStyles.expandStylesMixin_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.findReplaceStylesNewWithA11Y : editorContentStyles.findReplaceStyles, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesNewWithCodeblockColorContrastFix, !expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, editorExperiment('platform_synced_block', true) && editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, expValEqualsNoExposure('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? editorContentStyles.statusStylesTeam26 : fg('platform-component-visual-refresh') ? expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh : expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh, colorMode === 'dark' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorExperiment('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch : editorContentStyles.smartCardStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || editorExperiment('platform_editor_preview_panel_linking_exp', true)) && editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.resizerStyles, expValEqualsNoExposure('cc-maui-experiment', 'isEnabled', true) && expValEquals('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, expValEquals('platform_editor_table_excerpts_fix', 'isEnabled', true) && editorContentStyles.layoutBaseStylesWithTableExcerptsFix, fg('platform_editor_fix_media_in_renderer') && editorContentStyles.alignMultipleWrappedImageInLayoutStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockStylesBase, editorExperiment('platform_synced_block', true) &&
447
459
  // Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
448
- !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_14') && editorContentStyles.syncBlockTextSelectionStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnDividerStyles, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutColumnDividerStylesNestedDnD, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnResizeStyles, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorExperiment('platform_synced_block', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFGExcludingBodiedSync, !editorExperiment('platform_synced_block', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFG, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.layoutColumnMartinTopFixesNew : editorContentStyles.layoutColumnMartinTopFixesOld, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, fg('platform_editor_typography_ugc') ? contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed : contentMode === 'compact' ? editorContentStyles.paragraphStylesOldWithScaledMargin : editorContentStyles.paragraphStylesOld, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesSyncedBlock, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStyles, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesPanelAndRule, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && !editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockLegacy, editorExperiment('advanced_layouts', true) && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesForTooltip, editorExperiment('platform_editor_preview_panel_responsiveness', true) && (editorExperiment('advanced_layouts', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) && editorContentStyles.pragmaticResizerStylesWithReducedEditorGutter, editorContentStyles.aiPanelBaseStyles, isFirefox && editorContentStyles.aiPanelBaseFirefoxStyles, colorMode === 'dark' && editorContentStyles.aiPanelDarkStyles, colorMode === 'dark' && isFirefox && editorContentStyles.aiPanelDarkFirefoxStyles, viewMode === 'view' && editorContentStyles.layoutStylesForView, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutSelectedStylesForViewAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', false) && editorContentStyles.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveStylesForView, isComment && editorContentStyles.commentEditorStyles, isComment && editorContentStyles.tableCommentEditorStyles, isFullPage && editorContentStyles.fullPageEditorStyles, isFullPage && editorContentStyles.scrollbarStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.firstCodeBlockWithNoMargin : editorContentStyles.firstCodeBlockWithNoMarginOld, editorContentStyles.firstBlockNodeStyles, editorContentStyles.mentionNodeStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.mentionsSelectionStylesWithSearchMatch : editorContentStyles.mentionsSelectionStyles, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, contentMode === 'compact' && isDense && expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.scaledEmojiDenseStyles, contentMode === 'compact' && isDense && !expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.emojiDenseStyles, editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) ? editorContentStyles.tableLayoutFixesWithFontSize : editorContentStyles.tableLayoutFixes, editorContentStyles.tableContainerStyles, editorContentStyles.tableSharedStyle, (browser.gecko || browser.ie || browser.mac && browser.chrome) && editorContentStyles.tableSharedStyleBackgroundClipFix, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? editorContentStyles.tableSharedStyle_with_platform_editor_table_q4_loveability : editorContentStyles.tableSharedStyle_without_platform_editor_table_q4_loveability, expValEquals('platform_editor_table_menu_updates', 'isEnabled', true) && editorContentStyles.tableSharedStyle_with_platform_editor_table_menu_updates, fg('platform_editor_bordered_panel_nested_in_table') && editorContentStyles.tableSharedStyle_with_platform_editor_bordered_panel_nested_in_table, editorContentStyles.tableEmptyRowStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && fg('platform_editor_table_q4_patch_1') && editorContentStyles.tableRoundedCornerStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.blockquoteDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.textDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.listDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerDateStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.emojiDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mentionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.decisionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.statusDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerRuleStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mediaDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.nestedPanelDangerStyles, className || undefined]),
460
+ !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_14') && editorContentStyles.syncBlockTextSelectionStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnDividerStyles, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutColumnDividerStylesNestedDnD, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnResizeStyles, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorExperiment('platform_synced_block', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFGExcludingBodiedSync, !editorExperiment('platform_synced_block', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFG, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.layoutColumnMartinTopFixesNew : editorContentStyles.layoutColumnMartinTopFixesOld, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, fg('platform_editor_typography_ugc') ? contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed : contentMode === 'compact' ? editorContentStyles.paragraphStylesOldWithScaledMargin : editorContentStyles.paragraphStylesOld, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesSyncedBlock, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStyles, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesPanelAndRule, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && !editorExperiment('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockLegacy, editorExperiment('advanced_layouts', true) && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesForTooltip, editorExperiment('platform_editor_preview_panel_responsiveness', true) && (editorExperiment('advanced_layouts', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) && editorContentStyles.pragmaticResizerStylesWithReducedEditorGutter, editorContentStyles.aiPanelBaseStyles, isFirefox && editorContentStyles.aiPanelBaseFirefoxStyles, colorMode === 'dark' && editorContentStyles.aiPanelDarkStyles, colorMode === 'dark' && isFirefox && editorContentStyles.aiPanelDarkFirefoxStyles, viewMode === 'view' && editorContentStyles.layoutStylesForView, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutSelectedStylesForViewAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', false) && editorContentStyles.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveStylesForView, isComment && editorContentStyles.commentEditorStyles, isComment && editorContentStyles.tableCommentEditorStyles, isFullPage && editorContentStyles.fullPageEditorStyles, isFullPage && editorContentStyles.scrollbarStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.firstCodeBlockWithNoMargin : editorContentStyles.firstCodeBlockWithNoMarginOld, editorContentStyles.firstBlockNodeStyles, editorContentStyles.mentionNodeStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.mentionsSelectionStylesWithSearchMatch : editorContentStyles.mentionsSelectionStyles, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, contentMode === 'compact' && isDense && expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.scaledEmojiDenseStyles, contentMode === 'compact' && isDense && !expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.emojiDenseStyles, editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, expValEquals('platform_editor_small_font_size', 'isEnabled', true) ? editorContentStyles.tableLayoutFixesWithFontSize : editorContentStyles.tableLayoutFixes, editorContentStyles.tableContainerStyles, editorContentStyles.tableSharedStyle, (browser.gecko || browser.ie || browser.mac && browser.chrome) && editorContentStyles.tableSharedStyleBackgroundClipFix, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? editorContentStyles.tableSharedStyle_with_platform_editor_table_q4_loveability : editorContentStyles.tableSharedStyle_without_platform_editor_table_q4_loveability, expValEquals('platform_editor_table_menu_updates', 'isEnabled', true) && editorContentStyles.tableSharedStyle_with_platform_editor_table_menu_updates, fg('platform_editor_bordered_panel_nested_in_table') && editorContentStyles.tableSharedStyle_with_platform_editor_bordered_panel_nested_in_table, editorContentStyles.tableEmptyRowStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && fg('platform_editor_table_q4_patch_1') && editorContentStyles.tableRoundedCornerStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && fg('platform_editor_table_nested_renderer_fix') && editorContentStyles.tableContentModeNestedTableStyles, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.blockquoteDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.textDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.listDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerDateStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.emojiDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mentionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.decisionDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.statusDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.dangerRuleStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.mediaDangerStyles, editorExperiment('platform_editor_block_menu', true) && editorContentStyles.nestedPanelDangerStyles, isBlockSpacingEnabled && editorContentStyles.blockSpacingVarStyles, isBlockSpacingEnabled && isDense && editorContentStyles.blockSpacingVarScaledStyles, className || undefined]),
449
461
  ref: ref,
450
462
  "data-editor-scroll-container": isScrollable ? 'true' : undefined,
451
463
  "data-testid": "editor-content-container"
@@ -21,6 +21,7 @@ import { annotationStyles } from './styles/annotationStyles';
21
21
  import { backgroundColorStyles, highlightLinksUnsetStyles, textHighlightPaddingStyles } from './styles/backgroundColorStyles';
22
22
  import { baseStyles, baseStylesMaxContainerWidthFixes, editorLargeGutterPuddingBaseStyles, editorLargeGutterPuddingBaseStylesEditorControls, editorLargeGutterPuddingReducedBaseStyles, maxModeReizeFixStyles } from './styles/baseStyles';
23
23
  import { blockMarksStyles } from './styles/blockMarksStyles';
24
+ import { blockSpacingVarScaledStyles, blockSpacingVarStyles } from './styles/blockSpacingStyles';
24
25
  import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc, listDangerStyles, listSelectedNodeStyles, textDangerStyles, textSelectedNodeStyles } from './styles/blockTypeStyles';
25
26
  import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
26
27
  import { codeMarkStyles, codeMarkStylesA11yFix } from './styles/codeMarkStyles';
@@ -58,7 +59,7 @@ import { shadowStyles } from './styles/shadowStyles';
58
59
  import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, showDiffDeletedNodeStyles, showDiffDeletedNodeStylesNew, smartCardDiffStyles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles } from './styles/smartCardStyles';
59
60
  import { statusDangerStyles, statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_fg_platform_component_visual_refresh_with_search_match, statusStylesMixin_without_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, statusStylesTeam26 } from './styles/statusStyles';
60
61
  import { syncBlockStyles, syncBlockStylesBase, syncBlockFirstNodeStyles, syncBlockOverflowStyles, syncBlockTextSelectionStyles } from './styles/syncBlockStyles';
61
- import { tableCommentEditorStyles, tableContainerStyles, tableEmptyRowStyles, tableLayoutFixes, tableRoundedCornerStyles, tableLayoutFixesWithFontSize, tableContentModeStyles } from './styles/tableStyles';
62
+ import { tableCommentEditorStyles, tableContainerStyles, tableEmptyRowStyles, tableLayoutFixes, tableRoundedCornerStyles, tableLayoutFixesWithFontSize, tableContentModeStyles, tableContentModeNestedTableStyles } from './styles/tableStyles';
62
63
  import { decisionDangerStyles, decisionIconWithVisualRefresh, decisionStyles, getDenseTasksAndDecisionsStyles, taskItemCheckboxStyles, taskItemStyles, taskItemStylesWithBlockTaskItem, tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
63
64
  import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telepointerStyles';
64
65
  import { textColorStyles } from './styles/textColorStyles';
@@ -145,6 +146,9 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
145
146
  })
146
147
  };
147
148
  const browser = getBrowserInfo();
149
+
150
+ // Evaluate the block-spacing experiment once per render.
151
+ const isBlockSpacingEnabled = expValEquals('platform_editor_extension_block_spacing', 'isEnabled', true);
148
152
  return jsx("div", {
149
153
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
150
154
  className: className || undefined,
@@ -538,7 +542,9 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
538
542
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
539
543
  expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) &&
540
544
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
541
- tableContentModeStyles,
545
+ tableContentModeStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && fg('platform_editor_table_nested_renderer_fix') &&
546
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
547
+ tableContentModeNestedTableStyles,
542
548
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
543
549
  hyperLinkFloatingToolbarStyles,
544
550
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -566,7 +572,15 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
566
572
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
567
573
  mediaDangerStyles,
568
574
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
569
- nestedPanelDangerStyles]],
575
+ nestedPanelDangerStyles],
576
+ // Block spacing hook — opt-in via --ak-editor-extension-block-spacing.
577
+ // Applied last so the var-based margins override the base block margins by source
578
+ // order. Gated by an experiment so it can be disabled.
579
+ isBlockSpacingEnabled &&
580
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
581
+ blockSpacingVarStyles, isBlockSpacingEnabled && contentMode === 'compact' &&
582
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
583
+ blockSpacingVarScaledStyles],
570
584
  "data-editor-scroll-container": isScrollable ? 'true' : undefined,
571
585
  "data-testid": "editor-content-container"
572
586
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
@@ -0,0 +1,114 @@
1
+ /* eslint-disable @atlaskit/ui-styling-standard/use-compiled,
2
+ @atlaskit/ui-styling-standard/no-exported-styles,
3
+ @atlaskit/ui-styling-standard/no-nested-selectors,
4
+ @atlaskit/ui-styling-standard/no-unsafe-values,
5
+ @atlaskit/ui-styling-standard/no-unsafe-selectors,
6
+ @atlaskit/ui-styling-standard/no-imported-style-values */
7
+ import { css } from '@emotion/react';
8
+ import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
9
+
10
+ /**
11
+ * Emotion mirror of the block-spacing styles in EditorContentContainer-compiled.tsx.
12
+ *
13
+ * Re-declares the block-element vertical margins so they read from the
14
+ * --ak-editor-extension-block-spacing CSS custom property (falling back to the original
15
+ * 0.75rem). This is applied LAST in the Emotion container's css array, and only when
16
+ * the platform_editor_extension_block_spacing experiment is enabled, so it overrides
17
+ * the base block margins by source order without affecting the experiment-off behaviour.
18
+ *
19
+ * Keep this in sync with the block-spacing styles in EditorContentContainer-compiled.tsx.
20
+ */
21
+ export const blockSpacingVarStyles = css({
22
+ '.ProseMirror': {
23
+ // paragraphs
24
+ p: {
25
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
26
+ },
27
+ // SSR reset rule (mirrors listsStyles `& > style:first-child + p`) so the first
28
+ // paragraph after an SSR style tag also honours the spacing var.
29
+ '& > style:first-child + p': {
30
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
31
+ },
32
+ // blockquotes — base also zeroes the first blockquote's top margin.
33
+ '& blockquote': {
34
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
35
+ '&:first-child': {
36
+ marginTop: 0
37
+ }
38
+ },
39
+ // code blocks
40
+ [`.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER}`]: {
41
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
42
+ },
43
+ li: {
44
+ '> .code-block': {
45
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
46
+ },
47
+ '> .code-block:first-child, > .ProseMirror-gapcursor:first-child + .code-block': {
48
+ marginTop: 0
49
+ },
50
+ '> div:last-of-type.code-block, > pre:last-of-type.code-block': {
51
+ marginBottom: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
52
+ }
53
+ },
54
+ // smart cards (block card) — base sets top margin only.
55
+ '.blockCardView-content-wrap': {
56
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
57
+ },
58
+ // extension wrappers — mirrors the base extensionStyles margin rules exactly so that
59
+ // experiment-on reproduces all of the base first/last margin resets.
60
+ '.extensionView-content-wrap, .multiBodiedExtensionView-content-wrap, .bodiedExtensionView-content-wrap': {
61
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
62
+ marginBottom: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
63
+ '&:first-of-type': {
64
+ marginTop: 0
65
+ },
66
+ '&:last-of-type': {
67
+ marginBottom: 0
68
+ }
69
+ },
70
+ "[data-mark-type='fragment']": {
71
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
72
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
73
+ marginBottom: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
74
+ },
75
+ "& > [data-mark-type='dataConsumer']": {
76
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
77
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75rem)',
78
+ marginBottom: 'var(--ak-editor-extension-block-spacing, 0.75rem)'
79
+ }
80
+ },
81
+ '&:first-child': {
82
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
83
+ marginTop: 0
84
+ },
85
+ "& > [data-mark-type='dataConsumer']": {
86
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
87
+ marginTop: 0
88
+ }
89
+ }
90
+ },
91
+ '&:nth-last-of-type(-n + 2):not(:first-of-type)': {
92
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
93
+ marginBottom: 0
94
+ },
95
+ "& > [data-mark-type='dataConsumer']": {
96
+ '& > .extensionView-content-wrap, & > .bodiedExtensionView-content-wrap': {
97
+ marginBottom: 0
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ });
104
+
105
+ /**
106
+ * Scaled (em-based) variant of the block-spacing styles for dense/scaled paragraph contexts.
107
+ * Keep this in sync with the scaled block-spacing styles in EditorContentContainer-compiled.tsx.
108
+ */
109
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/volt-strict-mode/no-multiple-exports
110
+ export const blockSpacingVarScaledStyles = css({
111
+ '.ProseMirror p': {
112
+ marginTop: 'var(--ak-editor-extension-block-spacing, 0.75em)'
113
+ }
114
+ });
@@ -155,6 +155,52 @@ export const tableContentModeStyles = css({
155
155
  width: 'unset !important'
156
156
  }
157
157
  });
158
+
159
+ /**
160
+ * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
161
+ * If you need to make changes here, also update the corresponding style in
162
+ * packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
163
+ * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
164
+ */
165
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/volt-strict-mode/no-multiple-exports
166
+ export const tableContentModeNestedTableStyles = css({
167
+ // Reset the base `margin-right: -1px` (ED-16212) that clips content-mode tables by 1px.
168
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
169
+ '.ProseMirror .pm-table-wrapper table[data-initial-width-mode="content"]': {
170
+ maxWidth: 'none',
171
+ marginRight: 0
172
+ },
173
+ // Let the resizer/wrapper chain grow to content width before the max-width cap.
174
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
175
+ '.resizer-item:has(table[data-initial-width-mode="content"]), .pm-table-container:has(> .pm-table-wrapper > table[data-initial-width-mode="content"]), .pm-table-wrapper:has(> table[data-initial-width-mode="content"])': {
176
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
177
+ width: 'max-content !important',
178
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
179
+ maxWidth: 'var(--ak-editor-table-max-width) !important'
180
+ },
181
+ // Nested content-mode table: size to content, reset base max-width and margin.
182
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
183
+ '.ProseMirror table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .pm-table-container > .pm-table-wrapper > table': {
184
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
185
+ width: 'max-content !important',
186
+ maxWidth: 'none',
187
+ marginRight: 0
188
+ },
189
+ // Stop nested table col widths from constraining parent table measurement.
190
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
191
+ '.ProseMirror table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .pm-table-container > .pm-table-wrapper > table > colgroup > col': {
192
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
193
+ width: 'unset !important'
194
+ },
195
+ // Let the nested table container/wrapper grow to content width before the cap.
196
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
197
+ '.ProseMirror table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .pm-table-container, .ProseMirror table[data-initial-width-mode="content"] > tbody > tr > :is(th, td) .pm-table-container > .pm-table-wrapper': {
198
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
199
+ width: 'max-content !important',
200
+ maxWidth: 'none',
201
+ overflowX: 'visible'
202
+ }
203
+ });
158
204
  /**
159
205
  * SSR-safe rounded corners for the outermost table cells.
160
206
  *
@@ -1,3 +1,3 @@
1
1
  export const name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export const version = "221.5.11";
3
+ export const version = "221.5.13";