@atlaskit/editor-core 221.6.2 → 221.7.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.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +2 -1
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +9 -0
- package/dist/cjs/ui/EditorContentContainer/styles/containerTypeStyles.js +38 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -0
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +2 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +9 -0
- package/dist/es2019/ui/EditorContentContainer/styles/containerTypeStyles.js +31 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -0
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +2 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +9 -0
- package/dist/esm/ui/EditorContentContainer/styles/containerTypeStyles.js +31 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/EditorContentContainer/styles/containerTypeStyles.d.ts +26 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 221.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5214dcad2fc6d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5214dcad2fc6d) -
|
|
8
|
+
Fix editor content responsiveness (native embeds and media) in non-full-page appearances such as
|
|
9
|
+
Jira's comment editor. The content area now establishes a container-query context (container-type:
|
|
10
|
+
inline-size) for comment/chromeless appearances so --ak-editor-max-container-width resolves
|
|
11
|
+
against the sidebar-aware editor width instead of the viewport. Behind feature gate
|
|
12
|
+
platform_comment_container_query; full-page is unchanged (keeps the editor-area container).
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 221.6.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -2239,6 +2239,7 @@
|
|
|
2239
2239
|
._78lz1j28 .ProseMirror span.pm-placeholder.ak-editor-selected-node::-moz-selection{background-color:transparent}
|
|
2240
2240
|
._78qp1j28 .ProseMirror .layoutSectionView-content-wrap.ak-editor-selected-node:not(.danger) [data-layout-column] ::selection{background-color:transparent}
|
|
2241
2241
|
._79ymglyw .ak-editor-panel.ak-editor-selected-node:not(.danger):before{pointer-events:none}
|
|
2242
|
+
._7cca15wb{container-type:inline-size}
|
|
2242
2243
|
._7df91l2s [data-prosemirror-node-name=blockTaskItem] [data-component=placeholder]{text-overflow:ellipsis}
|
|
2243
2244
|
._7fayidpf [layout=wrap-right]+.ProseMirror-gapcursor+span+[layout=wrap-left]>div{margin-bottom:0}
|
|
2244
2245
|
._7gsu17v8 .search-match-block.search-match-dark .loader-wrapper>div:after{box-shadow:inset 0 0 0 1px var(--ds-background-accent-magenta-bolder,#ae4787),inset 0 0 0 5px var(--ds-background-accent-magenta-bolder-pressed,#77325b)}
|
|
@@ -172,6 +172,7 @@ var editorContentStyles = {
|
|
|
172
172
|
codeMarkStyles: "_59uzyh40 _6p44m5ip _1i9tyh40 _2lvxm5ip _9g7rfajl _1iyw1wug _syi51wug _pwh8glyw _af7gi8nm _1bsc1nu9 _1atv187e _1srjqvcn _z49mi7uo _95t2zzfg _ri7p1wqq _5061i7a9 _9ef31hna _or5e1jtm",
|
|
173
173
|
codeMarkStylesA11yFix: "_1iywn7od _syi5n7od",
|
|
174
174
|
commentEditorStyles: "_16jlkb7n _1reozryt _vwz41tcg _ca0qv47k _u5f3v47k _n3tdv47k _19bvv47k _1lbautpp _2k8xutpp _4aknutpp _1r9butpp _1pg2v77o _1ocsv77o _8ctj1b4h",
|
|
175
|
+
nonFullPageContainerTypeStyles: "_7cca15wb",
|
|
175
176
|
cursorStyles: "_178n1j28 _1xy6glyw _102f1j28",
|
|
176
177
|
dangerDateStyles: "_o7sybimv",
|
|
177
178
|
dangerRuleStyles: "_zih31bqt",
|
|
@@ -401,7 +402,7 @@ var EditorContentContainerCompiled = exports.EditorContentContainerCompiled = /*
|
|
|
401
402
|
}) && editorContentStyles.textSelectedNodeStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? editorContentStyles.blocktypeStyles_fg_platform_editor_typography_ugc : editorContentStyles.blocktypeStyles_without_fg_platform_editor_typography_ugc, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.codeMarkStyles, (0, _expValEquals.expValEquals)('platform_editor_a11y_scrollable_region', 'isEnabled', true) && editorContentStyles.codeMarkStylesA11yFix, editorContentStyles.textColorStyles, editorContentStyles.backgroundColorStyles, !(0, _expValEquals.expValEquals)('platform_editor_lovability_text_bg_color', 'isEnabled', true) && editorContentStyles.highlightLinksUnsetStyles, editorContentStyles.textHighlightPaddingStyles, editorContentStyles.listsStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_flexible_list_schema', 'isEnabled', true) && editorContentStyles.listItemHiddenMarkerStyles, editorContentStyles.diffListStyles, contentMode === 'compact' && isDense && editorContentStyles.listsDenseStyles, isFullPage && editorContentStyles.listsStylesMarginLayoutShiftFix, editorContentStyles.ruleStyles, editorContentStyles.smartCardDiffStyles, (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? editorContentStyles.showDiffDeletedNodeStylesNew : editorContentStyles.showDiffDeletedNodeStyles, editorContentStyles.mediaStyles, contentMode === 'compact' && editorContentStyles.mediaCaptionStyles, (0, _platformFeatureFlags.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 */
|
|
402
403
|
editorContentStyles.telepointerColorAndCommonStyle, editorContentStyles.gapCursorStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.gapCursorStylesVisibilityFix, editorContentStyles.panelStyles, editorContentStyles.nestedPanelBorderStylesMixin, (0, _platformFeatureFlags.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, (0, _expValEquals.expValEquals)('platform_editor_bodiedextension_layoutshift_fix', 'isEnabled', true) && editorContentStyles.bodiedExtensionLayoutShiftFix, editorContentStyles.extensionDiffStyles, editorContentStyles.expandStylesBase, !useStandardNodeWidth && editorContentStyles.expandStyles, contentMode === 'compact' && isDense && editorContentStyles.expandDenseStyles, (0, _platformFeatureFlags.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, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.findReplaceStylesNewWithA11Y : editorContentStyles.findReplaceStyles, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesNewWithCodeblockColorContrastFix, !(0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? editorContentStyles.statusStylesTeam26 : (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _expValEqualsNoExposure.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 : (0, _expValEqualsNoExposure.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' && (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch : editorContentStyles.smartCardStyles, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') || (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true)) && editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.resizerStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-maui-experiment', 'isEnabled', true) && (0, _expValEquals.expValEquals)('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, (0, _expValEquals.expValEquals)('platform_editor_table_excerpts_fix', 'isEnabled', true) && editorContentStyles.layoutBaseStylesWithTableExcerptsFix, (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && editorContentStyles.alignMultipleWrappedImageInLayoutStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockStylesBase, (0, _experiments.editorExperiment)('platform_synced_block', true) &&
|
|
403
404
|
// Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
404
|
-
!useStandardNodeWidth && editorContentStyles.syncBlockStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_14') && editorContentStyles.syncBlockTextSelectionStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnDividerStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutColumnDividerStylesNestedDnD, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnResizeStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFGExcludingBodiedSync, !(0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFG, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.layoutColumnMartinTopFixesNew : editorContentStyles.layoutColumnMartinTopFixesOld, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed : contentMode === 'compact' ? editorContentStyles.paragraphStylesOldWithScaledMargin : editorContentStyles.paragraphStylesOld, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesSyncedBlock, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesPanelAndRule, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && !(0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockLegacy, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesForTooltip, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && ((0, _experiments.editorExperiment)('advanced_layouts', true) || (0, _expValEqualsNoExposure.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' && (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutSelectedStylesForViewAdvanced, viewMode === 'view' && (0, _experiments.editorExperiment)('advanced_layouts', false) && editorContentStyles.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutResponsiveStylesForView, isComment && editorContentStyles.commentEditorStyles, isComment && editorContentStyles.tableCommentEditorStyles, isFullPage && editorContentStyles.fullPageEditorStyles, isFullPage && editorContentStyles.scrollbarStyles, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.firstCodeBlockWithNoMargin : editorContentStyles.firstCodeBlockWithNoMarginOld, editorContentStyles.firstBlockNodeStyles, editorContentStyles.mentionNodeStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.mentionsSelectionStylesWithSearchMatch : editorContentStyles.mentionsSelectionStyles, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, contentMode === 'compact' && isDense && (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.scaledEmojiDenseStyles, contentMode === 'compact' && isDense && !(0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.emojiDenseStyles, editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, (0, _expValEquals.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, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? editorContentStyles.tableSharedStyle_with_platform_editor_table_q4_loveability : editorContentStyles.tableSharedStyle_without_platform_editor_table_q4_loveability, (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates', 'isEnabled', true) && editorContentStyles.tableSharedStyle_with_platform_editor_table_menu_updates, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && editorContentStyles.tableSharedStyle_with_platform_editor_bordered_panel_nested_in_table, editorContentStyles.tableEmptyRowStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_table_q4_patch_1') && editorContentStyles.tableRoundedCornerStyles, (0, _expValEquals.expValEquals)('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, (0, _expValEquals.expValEquals)('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_table_nested_renderer_fix') && editorContentStyles.tableContentModeNestedTableStyles, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.blockquoteDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.textDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.listDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.dangerDateStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.emojiDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.mentionDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.decisionDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.statusDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.dangerRuleStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.mediaDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.nestedPanelDangerStyles, isBlockSpacingEnabled && editorContentStyles.blockSpacingVarStyles, isBlockSpacingEnabled && isDense && editorContentStyles.blockSpacingVarScaledStyles, className || undefined]),
|
|
405
|
+
!useStandardNodeWidth && editorContentStyles.syncBlockStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_14') && editorContentStyles.syncBlockTextSelectionStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnDividerStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutColumnDividerStylesNestedDnD, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnResizeStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFGExcludingBodiedSync, !(0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFG, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.layoutColumnMartinTopFixesNew : editorContentStyles.layoutColumnMartinTopFixesOld, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed : contentMode === 'compact' ? editorContentStyles.paragraphStylesOldWithScaledMargin : editorContentStyles.paragraphStylesOld, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesSyncedBlock, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesPanelAndRule, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && !(0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.pragmaticResizerStylesCodeBlockLegacy, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesForTooltip, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && ((0, _experiments.editorExperiment)('advanced_layouts', true) || (0, _expValEqualsNoExposure.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' && (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutSelectedStylesForViewAdvanced, viewMode === 'view' && (0, _experiments.editorExperiment)('advanced_layouts', false) && editorContentStyles.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutResponsiveStylesForView, isComment && editorContentStyles.commentEditorStyles, isComment && editorContentStyles.tableCommentEditorStyles, (isComment || isChromeless) && (0, _platformFeatureFlags.fg)('platform_comment_container_query') && editorContentStyles.nonFullPageContainerTypeStyles, isFullPage && editorContentStyles.fullPageEditorStyles, isFullPage && editorContentStyles.scrollbarStyles, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.firstCodeBlockWithNoMargin : editorContentStyles.firstCodeBlockWithNoMarginOld, editorContentStyles.firstBlockNodeStyles, editorContentStyles.mentionNodeStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.mentionsSelectionStylesWithSearchMatch : editorContentStyles.mentionsSelectionStyles, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, contentMode === 'compact' && isDense && (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.scaledEmojiDenseStyles, contentMode === 'compact' && isDense && !(0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.emojiDenseStyles, editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, (0, _expValEquals.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, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? editorContentStyles.tableSharedStyle_with_platform_editor_table_q4_loveability : editorContentStyles.tableSharedStyle_without_platform_editor_table_q4_loveability, (0, _expValEquals.expValEquals)('platform_editor_table_menu_updates', 'isEnabled', true) && editorContentStyles.tableSharedStyle_with_platform_editor_table_menu_updates, (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') && editorContentStyles.tableSharedStyle_with_platform_editor_bordered_panel_nested_in_table, editorContentStyles.tableEmptyRowStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_table_q4_patch_1') && editorContentStyles.tableRoundedCornerStyles, (0, _expValEquals.expValEquals)('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, (0, _expValEquals.expValEquals)('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_table_nested_renderer_fix') && editorContentStyles.tableContentModeNestedTableStyles, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.blockquoteDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.textDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.listDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.dangerDateStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.emojiDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.mentionDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.decisionDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.statusDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.dangerRuleStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.mediaDangerStyles, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) && editorContentStyles.nestedPanelDangerStyles, isBlockSpacingEnabled && editorContentStyles.blockSpacingVarStyles, isBlockSpacingEnabled && isDense && editorContentStyles.blockSpacingVarScaledStyles, className || undefined]),
|
|
405
406
|
ref: ref,
|
|
406
407
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
407
408
|
"data-testid": "editor-content-container"
|
|
@@ -27,6 +27,7 @@ var _blockTypeStyles = require("./styles/blockTypeStyles");
|
|
|
27
27
|
var _codeBlockStyles = require("./styles/codeBlockStyles");
|
|
28
28
|
var _codeMarkStyles = require("./styles/codeMarkStyles");
|
|
29
29
|
var _commentEditorStyles = require("./styles/commentEditorStyles");
|
|
30
|
+
var _containerTypeStyles = require("./styles/containerTypeStyles");
|
|
30
31
|
var _cursorStyles = require("./styles/cursorStyles");
|
|
31
32
|
var _dateStyles = require("./styles/dateStyles");
|
|
32
33
|
var _editorUGCTokenStyles = require("./styles/editorUGCTokenStyles");
|
|
@@ -486,6 +487,14 @@ var EditorContentContainerEmotion = exports.EditorContentContainerEmotion = /*#_
|
|
|
486
487
|
isComment && _commentEditorStyles.commentEditorStyles,
|
|
487
488
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
488
489
|
isComment && _tableStyles.tableCommentEditorStyles,
|
|
490
|
+
// Non-full-page appearances (comment, chromeless) have no `container-type` ancestor,
|
|
491
|
+
// so `cqw`-based content sizing (native embeds, media) falls back to the viewport and
|
|
492
|
+
// does not shrink when a sidebar narrows the content column. Make the content area a
|
|
493
|
+
// query container so `--ak-editor-max-container-width` resolves against the actual
|
|
494
|
+
// (sidebar-aware) editor width. Full-page keeps using the `editor-area` container.
|
|
495
|
+
(isComment || isChromeless) && (0, _platformFeatureFlags.fg)('platform_comment_container_query') &&
|
|
496
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
497
|
+
_containerTypeStyles.nonFullPageContainerTypeStyles,
|
|
489
498
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
490
499
|
isFullPage && _fullPageEditorStyles.fullPageEditorStyles,
|
|
491
500
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.nonFullPageContainerTypeStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled,
|
|
9
|
+
@repo/internal/deprecations/deprecation-ticket-required,
|
|
10
|
+
@atlaskit/ui-styling-standard/no-exported-styles */
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Establishes a container-query context on the editor content area for non-full-page
|
|
14
|
+
* appearances (comment, chromeless).
|
|
15
|
+
*
|
|
16
|
+
* Content sizing (native embeds, media / rich-media) reads `--ak-editor-max-container-width`
|
|
17
|
+
* (`calc(100cqw - gutter)`) and, in some paths, `100cqw` directly. Those `cqw` units resolve
|
|
18
|
+
* against the nearest ancestor with `container-type: inline-size`.
|
|
19
|
+
*
|
|
20
|
+
* Full-page already provides such an ancestor (the `editor-area` wrapper), so full-width
|
|
21
|
+
* breakout keeps working there. But comment / chromeless appearances have no container-query
|
|
22
|
+
* ancestor, so `cqw` falls back to the viewport width. The viewport does not shrink when an
|
|
23
|
+
* in-page sidebar narrows the content column, so content max-widths stay viewport-wide and
|
|
24
|
+
* never shrink: responsiveness works without a sidebar but breaks with one.
|
|
25
|
+
*
|
|
26
|
+
* Making the content area itself a query container gives `cqw` a real, sidebar-aware width to
|
|
27
|
+
* resolve against. It is applied only to non-full-page appearances (full-page keeps the
|
|
28
|
+
* existing `editor-area` container) and only to the content area (not the outer editor
|
|
29
|
+
* wrapper), so the implied `contain: layout` stays confined to content — exactly how the
|
|
30
|
+
* full-page `editor-area` container already behaves.
|
|
31
|
+
*
|
|
32
|
+
* @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
|
|
33
|
+
* If you need to make changes here, also update the corresponding style in
|
|
34
|
+
* packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
|
|
35
|
+
*/
|
|
36
|
+
var nonFullPageContainerTypeStyles = exports.nonFullPageContainerTypeStyles = (0, _react.css)({
|
|
37
|
+
containerType: 'inline-size'
|
|
38
|
+
});
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
8
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
9
|
-
var version = exports.version = "221.6.
|
|
9
|
+
var version = exports.version = "221.6.2";
|
|
@@ -2239,6 +2239,7 @@
|
|
|
2239
2239
|
._78lz1j28 .ProseMirror span.pm-placeholder.ak-editor-selected-node::-moz-selection{background-color:transparent}
|
|
2240
2240
|
._78qp1j28 .ProseMirror .layoutSectionView-content-wrap.ak-editor-selected-node:not(.danger) [data-layout-column] ::selection{background-color:transparent}
|
|
2241
2241
|
._79ymglyw .ak-editor-panel.ak-editor-selected-node:not(.danger):before{pointer-events:none}
|
|
2242
|
+
._7cca15wb{container-type:inline-size}
|
|
2242
2243
|
._7df91l2s [data-prosemirror-node-name=blockTaskItem] [data-component=placeholder]{text-overflow:ellipsis}
|
|
2243
2244
|
._7fayidpf [layout=wrap-right]+.ProseMirror-gapcursor+span+[layout=wrap-left]>div{margin-bottom:0}
|
|
2244
2245
|
._7gsu17v8 .search-match-block.search-match-dark .loader-wrapper>div:after{box-shadow:inset 0 0 0 1px var(--ds-background-accent-magenta-bolder,#ae4787),inset 0 0 0 5px var(--ds-background-accent-magenta-bolder-pressed,#77325b)}
|
|
@@ -223,6 +223,7 @@ const editorContentStyles = {
|
|
|
223
223
|
codeMarkStyles: "_59uzyh40 _6p44m5ip _1i9tyh40 _2lvxm5ip _9g7rfajl _1iyw1wug _syi51wug _pwh8glyw _af7gi8nm _1bsc1nu9 _1atv187e _1srjqvcn _z49mi7uo _95t2zzfg _ri7p1wqq _5061i7a9 _9ef31hna _or5e1jtm",
|
|
224
224
|
codeMarkStylesA11yFix: "_1iywn7od _syi5n7od",
|
|
225
225
|
commentEditorStyles: "_16jlkb7n _1reozryt _vwz41tcg _ca0qv47k _u5f3v47k _n3tdv47k _19bvv47k _1lbautpp _2k8xutpp _4aknutpp _1r9butpp _1pg2v77o _1ocsv77o _8ctj1b4h",
|
|
226
|
+
nonFullPageContainerTypeStyles: "_7cca15wb",
|
|
226
227
|
cursorStyles: "_178n1j28 _1xy6glyw _102f1j28",
|
|
227
228
|
dangerDateStyles: "_o7sybimv",
|
|
228
229
|
dangerRuleStyles: "_zih31bqt",
|
|
@@ -457,7 +458,7 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
|
|
|
457
458
|
}) && 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 */
|
|
458
459
|
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) &&
|
|
459
460
|
// Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
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]),
|
|
461
|
+
!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, (isComment || isChromeless) && fg('platform_comment_container_query') && editorContentStyles.nonFullPageContainerTypeStyles, 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]),
|
|
461
462
|
ref: ref,
|
|
462
463
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
463
464
|
"data-testid": "editor-content-container"
|
|
@@ -26,6 +26,7 @@ import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles,
|
|
|
26
26
|
import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
|
|
27
27
|
import { codeMarkStyles, codeMarkStylesA11yFix } from './styles/codeMarkStyles';
|
|
28
28
|
import { commentEditorStyles } from './styles/commentEditorStyles';
|
|
29
|
+
import { nonFullPageContainerTypeStyles } from './styles/containerTypeStyles';
|
|
29
30
|
import { cursorStyles } from './styles/cursorStyles';
|
|
30
31
|
import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
31
32
|
import { editorUGCSmallText, editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
@@ -490,6 +491,14 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
|
|
|
490
491
|
isComment && commentEditorStyles,
|
|
491
492
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
492
493
|
isComment && tableCommentEditorStyles,
|
|
494
|
+
// Non-full-page appearances (comment, chromeless) have no `container-type` ancestor,
|
|
495
|
+
// so `cqw`-based content sizing (native embeds, media) falls back to the viewport and
|
|
496
|
+
// does not shrink when a sidebar narrows the content column. Make the content area a
|
|
497
|
+
// query container so `--ak-editor-max-container-width` resolves against the actual
|
|
498
|
+
// (sidebar-aware) editor width. Full-page keeps using the `editor-area` container.
|
|
499
|
+
(isComment || isChromeless) && fg('platform_comment_container_query') &&
|
|
500
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
501
|
+
nonFullPageContainerTypeStyles,
|
|
493
502
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
494
503
|
isFullPage && fullPageEditorStyles,
|
|
495
504
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled,
|
|
2
|
+
@repo/internal/deprecations/deprecation-ticket-required,
|
|
3
|
+
@atlaskit/ui-styling-standard/no-exported-styles */
|
|
4
|
+
import { css } from '@emotion/react';
|
|
5
|
+
/**
|
|
6
|
+
* Establishes a container-query context on the editor content area for non-full-page
|
|
7
|
+
* appearances (comment, chromeless).
|
|
8
|
+
*
|
|
9
|
+
* Content sizing (native embeds, media / rich-media) reads `--ak-editor-max-container-width`
|
|
10
|
+
* (`calc(100cqw - gutter)`) and, in some paths, `100cqw` directly. Those `cqw` units resolve
|
|
11
|
+
* against the nearest ancestor with `container-type: inline-size`.
|
|
12
|
+
*
|
|
13
|
+
* Full-page already provides such an ancestor (the `editor-area` wrapper), so full-width
|
|
14
|
+
* breakout keeps working there. But comment / chromeless appearances have no container-query
|
|
15
|
+
* ancestor, so `cqw` falls back to the viewport width. The viewport does not shrink when an
|
|
16
|
+
* in-page sidebar narrows the content column, so content max-widths stay viewport-wide and
|
|
17
|
+
* never shrink: responsiveness works without a sidebar but breaks with one.
|
|
18
|
+
*
|
|
19
|
+
* Making the content area itself a query container gives `cqw` a real, sidebar-aware width to
|
|
20
|
+
* resolve against. It is applied only to non-full-page appearances (full-page keeps the
|
|
21
|
+
* existing `editor-area` container) and only to the content area (not the outer editor
|
|
22
|
+
* wrapper), so the implied `contain: layout` stays confined to content — exactly how the
|
|
23
|
+
* full-page `editor-area` container already behaves.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
|
|
26
|
+
* If you need to make changes here, also update the corresponding style in
|
|
27
|
+
* packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
|
|
28
|
+
*/
|
|
29
|
+
export const nonFullPageContainerTypeStyles = css({
|
|
30
|
+
containerType: 'inline-size'
|
|
31
|
+
});
|
|
@@ -2239,6 +2239,7 @@
|
|
|
2239
2239
|
._78lz1j28 .ProseMirror span.pm-placeholder.ak-editor-selected-node::-moz-selection{background-color:transparent}
|
|
2240
2240
|
._78qp1j28 .ProseMirror .layoutSectionView-content-wrap.ak-editor-selected-node:not(.danger) [data-layout-column] ::selection{background-color:transparent}
|
|
2241
2241
|
._79ymglyw .ak-editor-panel.ak-editor-selected-node:not(.danger):before{pointer-events:none}
|
|
2242
|
+
._7cca15wb{container-type:inline-size}
|
|
2242
2243
|
._7df91l2s [data-prosemirror-node-name=blockTaskItem] [data-component=placeholder]{text-overflow:ellipsis}
|
|
2243
2244
|
._7fayidpf [layout=wrap-right]+.ProseMirror-gapcursor+span+[layout=wrap-left]>div{margin-bottom:0}
|
|
2244
2245
|
._7gsu17v8 .search-match-block.search-match-dark .loader-wrapper>div:after{box-shadow:inset 0 0 0 1px var(--ds-background-accent-magenta-bolder,#ae4787),inset 0 0 0 5px var(--ds-background-accent-magenta-bolder-pressed,#77325b)}
|
|
@@ -170,6 +170,7 @@ var editorContentStyles = {
|
|
|
170
170
|
codeMarkStyles: "_59uzyh40 _6p44m5ip _1i9tyh40 _2lvxm5ip _9g7rfajl _1iyw1wug _syi51wug _pwh8glyw _af7gi8nm _1bsc1nu9 _1atv187e _1srjqvcn _z49mi7uo _95t2zzfg _ri7p1wqq _5061i7a9 _9ef31hna _or5e1jtm",
|
|
171
171
|
codeMarkStylesA11yFix: "_1iywn7od _syi5n7od",
|
|
172
172
|
commentEditorStyles: "_16jlkb7n _1reozryt _vwz41tcg _ca0qv47k _u5f3v47k _n3tdv47k _19bvv47k _1lbautpp _2k8xutpp _4aknutpp _1r9butpp _1pg2v77o _1ocsv77o _8ctj1b4h",
|
|
173
|
+
nonFullPageContainerTypeStyles: "_7cca15wb",
|
|
173
174
|
cursorStyles: "_178n1j28 _1xy6glyw _102f1j28",
|
|
174
175
|
dangerDateStyles: "_o7sybimv",
|
|
175
176
|
dangerRuleStyles: "_zih31bqt",
|
|
@@ -399,7 +400,7 @@ export var EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef(functi
|
|
|
399
400
|
}) && 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 */
|
|
400
401
|
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) &&
|
|
401
402
|
// Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
|
|
402
|
-
!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]),
|
|
403
|
+
!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, (isComment || isChromeless) && fg('platform_comment_container_query') && editorContentStyles.nonFullPageContainerTypeStyles, 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]),
|
|
403
404
|
ref: ref,
|
|
404
405
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
405
406
|
"data-testid": "editor-content-container"
|
|
@@ -29,6 +29,7 @@ import { blockquoteDangerStyles, blockquoteSelectedNodeStyles, blocktypeStyles,
|
|
|
29
29
|
import { codeBlockStyles, codeBlockStylesWithEmUnits, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
|
|
30
30
|
import { codeMarkStyles, codeMarkStylesA11yFix } from './styles/codeMarkStyles';
|
|
31
31
|
import { commentEditorStyles } from './styles/commentEditorStyles';
|
|
32
|
+
import { nonFullPageContainerTypeStyles } from './styles/containerTypeStyles';
|
|
32
33
|
import { cursorStyles } from './styles/cursorStyles';
|
|
33
34
|
import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
34
35
|
import { editorUGCSmallText, editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
@@ -483,6 +484,14 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
|
|
|
483
484
|
isComment && commentEditorStyles,
|
|
484
485
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
485
486
|
isComment && tableCommentEditorStyles,
|
|
487
|
+
// Non-full-page appearances (comment, chromeless) have no `container-type` ancestor,
|
|
488
|
+
// so `cqw`-based content sizing (native embeds, media) falls back to the viewport and
|
|
489
|
+
// does not shrink when a sidebar narrows the content column. Make the content area a
|
|
490
|
+
// query container so `--ak-editor-max-container-width` resolves against the actual
|
|
491
|
+
// (sidebar-aware) editor width. Full-page keeps using the `editor-area` container.
|
|
492
|
+
(isComment || isChromeless) && fg('platform_comment_container_query') &&
|
|
493
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
494
|
+
nonFullPageContainerTypeStyles,
|
|
486
495
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
487
496
|
isFullPage && fullPageEditorStyles,
|
|
488
497
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/use-compiled,
|
|
2
|
+
@repo/internal/deprecations/deprecation-ticket-required,
|
|
3
|
+
@atlaskit/ui-styling-standard/no-exported-styles */
|
|
4
|
+
import { css } from '@emotion/react';
|
|
5
|
+
/**
|
|
6
|
+
* Establishes a container-query context on the editor content area for non-full-page
|
|
7
|
+
* appearances (comment, chromeless).
|
|
8
|
+
*
|
|
9
|
+
* Content sizing (native embeds, media / rich-media) reads `--ak-editor-max-container-width`
|
|
10
|
+
* (`calc(100cqw - gutter)`) and, in some paths, `100cqw` directly. Those `cqw` units resolve
|
|
11
|
+
* against the nearest ancestor with `container-type: inline-size`.
|
|
12
|
+
*
|
|
13
|
+
* Full-page already provides such an ancestor (the `editor-area` wrapper), so full-width
|
|
14
|
+
* breakout keeps working there. But comment / chromeless appearances have no container-query
|
|
15
|
+
* ancestor, so `cqw` falls back to the viewport width. The viewport does not shrink when an
|
|
16
|
+
* in-page sidebar narrows the content column, so content max-widths stay viewport-wide and
|
|
17
|
+
* never shrink: responsiveness works without a sidebar but breaks with one.
|
|
18
|
+
*
|
|
19
|
+
* Making the content area itself a query container gives `cqw` a real, sidebar-aware width to
|
|
20
|
+
* resolve against. It is applied only to non-full-page appearances (full-page keeps the
|
|
21
|
+
* existing `editor-area` container) and only to the content area (not the outer editor
|
|
22
|
+
* wrapper), so the implied `contain: layout` stays confined to content — exactly how the
|
|
23
|
+
* full-page `editor-area` container already behaves.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
|
|
26
|
+
* If you need to make changes here, also update the corresponding style in
|
|
27
|
+
* packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
|
|
28
|
+
*/
|
|
29
|
+
export var nonFullPageContainerTypeStyles = css({
|
|
30
|
+
containerType: 'inline-size'
|
|
31
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
2
|
+
/**
|
|
3
|
+
* Establishes a container-query context on the editor content area for non-full-page
|
|
4
|
+
* appearances (comment, chromeless).
|
|
5
|
+
*
|
|
6
|
+
* Content sizing (native embeds, media / rich-media) reads `--ak-editor-max-container-width`
|
|
7
|
+
* (`calc(100cqw - gutter)`) and, in some paths, `100cqw` directly. Those `cqw` units resolve
|
|
8
|
+
* against the nearest ancestor with `container-type: inline-size`.
|
|
9
|
+
*
|
|
10
|
+
* Full-page already provides such an ancestor (the `editor-area` wrapper), so full-width
|
|
11
|
+
* breakout keeps working there. But comment / chromeless appearances have no container-query
|
|
12
|
+
* ancestor, so `cqw` falls back to the viewport width. The viewport does not shrink when an
|
|
13
|
+
* in-page sidebar narrows the content column, so content max-widths stay viewport-wide and
|
|
14
|
+
* never shrink: responsiveness works without a sidebar but breaks with one.
|
|
15
|
+
*
|
|
16
|
+
* Making the content area itself a query container gives `cqw` a real, sidebar-aware width to
|
|
17
|
+
* resolve against. It is applied only to non-full-page appearances (full-page keeps the
|
|
18
|
+
* existing `editor-area` container) and only to the content area (not the outer editor
|
|
19
|
+
* wrapper), so the implied `contain: layout` stays confined to content — exactly how the
|
|
20
|
+
* full-page `editor-area` container already behaves.
|
|
21
|
+
*
|
|
22
|
+
* @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
|
|
23
|
+
* If you need to make changes here, also update the corresponding style in
|
|
24
|
+
* packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
|
|
25
|
+
*/
|
|
26
|
+
export declare const nonFullPageContainerTypeStyles: SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "221.
|
|
3
|
+
"version": "221.7.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -164,6 +164,9 @@
|
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
"platform-feature-flags": {
|
|
167
|
+
"platform_comment_container_query": {
|
|
168
|
+
"type": "boolean"
|
|
169
|
+
},
|
|
167
170
|
"platform_editor_reconfigure_filter_plugins": {
|
|
168
171
|
"type": "boolean"
|
|
169
172
|
},
|