@atlaskit/editor-core 225.0.0 → 226.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/afm-cc/tsconfig.json +0 -3
- package/dist/cjs/create-editor/ReactEditorView.js +0 -24
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +1 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +22 -12
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +25 -14
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +4 -3
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +4 -5
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +6 -5
- package/dist/cjs/ui/EditorContentContainer/styles/dateStyles.js +3 -4
- package/dist/cjs/ui/EditorContentContainer/styles/emoji.js +6 -8
- package/dist/cjs/ui/EditorContentContainer/styles/mentions.js +3 -4
- package/dist/cjs/ui/EditorContentContainer/styles/smartCardStyles.js +125 -13
- package/dist/cjs/ui/EditorContentContainer/styles/statusStyles.js +3 -4
- package/dist/cjs/ui/EditorContentContainer/styles/unsupportedStyles.js +16 -0
- package/dist/cjs/ui/EditorContentContainer/styles/vanillaTooltipStyles.js +41 -0
- package/dist/cjs/ui/quick-insert/getExtensionQuickInsertComponents.js +1 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +0 -24
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +1 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +22 -12
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +25 -14
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +4 -3
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +3 -5
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +5 -5
- package/dist/es2019/ui/EditorContentContainer/styles/dateStyles.js +3 -4
- package/dist/es2019/ui/EditorContentContainer/styles/emoji.js +6 -8
- package/dist/es2019/ui/EditorContentContainer/styles/mentions.js +3 -4
- package/dist/es2019/ui/EditorContentContainer/styles/smartCardStyles.js +183 -8
- package/dist/es2019/ui/EditorContentContainer/styles/statusStyles.js +3 -4
- package/dist/es2019/ui/EditorContentContainer/styles/unsupportedStyles.js +16 -0
- package/dist/es2019/ui/EditorContentContainer/styles/vanillaTooltipStyles.js +34 -0
- package/dist/es2019/ui/quick-insert/getExtensionQuickInsertComponents.js +1 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +0 -24
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +1 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +22 -12
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +25 -14
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +4 -3
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +4 -5
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +6 -5
- package/dist/esm/ui/EditorContentContainer/styles/dateStyles.js +3 -4
- package/dist/esm/ui/EditorContentContainer/styles/emoji.js +6 -8
- package/dist/esm/ui/EditorContentContainer/styles/mentions.js +3 -4
- package/dist/esm/ui/EditorContentContainer/styles/smartCardStyles.js +125 -12
- package/dist/esm/ui/EditorContentContainer/styles/statusStyles.js +3 -4
- package/dist/esm/ui/EditorContentContainer/styles/unsupportedStyles.js +16 -0
- package/dist/esm/ui/EditorContentContainer/styles/vanillaTooltipStyles.js +34 -0
- package/dist/esm/ui/quick-insert/getExtensionQuickInsertComponents.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/types/editor-props.d.ts +0 -1
- package/dist/types/ui/EditorContentContainer/EditorContentContainer-compiled.d.ts +0 -1
- package/dist/types/ui/EditorContentContainer/EditorContentContainer-emotion.d.ts +0 -1
- package/dist/types/ui/EditorContentContainer/styles/smartCardStyles.d.ts +14 -0
- package/dist/types/ui/EditorContentContainer/styles/vanillaTooltipStyles.d.ts +10 -0
- package/dist/types/ui/quick-insert/getExtensionQuickInsertComponents.d.ts +6 -2
- package/package.json +6 -7
|
@@ -409,6 +409,7 @@ const editorContentStyles = {
|
|
|
409
409
|
textHighlightStyle: "cc-277qb",
|
|
410
410
|
textSelectedNodeStyles: "cc-rrpz54",
|
|
411
411
|
unsupportedStyles: "cc-hnzg4x",
|
|
412
|
+
vanillaTooltipDefaultStyles: "cc-s0u8xw",
|
|
412
413
|
vanillaUnsupportedStyles: "cc-1ysxql5",
|
|
413
414
|
whitespaceStyles: "cc-14oigrh"
|
|
414
415
|
};
|
|
@@ -450,9 +451,6 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
|
|
|
450
451
|
// root div in editor-internal.tsx and inherited via the CSS cascade — do not set it here.
|
|
451
452
|
// For the legacy path, compute it from the Emotion theme as before.
|
|
452
453
|
const style = React.useMemo(() => ({
|
|
453
|
-
...(props.UNSAFE_containLayout ? {
|
|
454
|
-
contain: 'strict'
|
|
455
|
-
} : {}),
|
|
456
454
|
'--ak-editor--table-overflow-shadow': tableOverflowShadow,
|
|
457
455
|
...tableCellBackgroundColorVariablesForCompiled,
|
|
458
456
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -461,7 +459,7 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
|
|
|
461
459
|
}) && {
|
|
462
460
|
'--ak-editor--large-gutter-padding': `${akEditorGutterPaddingDynamic()}px`
|
|
463
461
|
})
|
|
464
|
-
}), [tableOverflowShadow
|
|
462
|
+
}), [tableOverflowShadow]);
|
|
465
463
|
const browser = getBrowserInfo();
|
|
466
464
|
|
|
467
465
|
// Evaluate the block-spacing experiment once per render.
|
|
@@ -478,7 +476,7 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
|
|
|
478
476
|
}) && editorContentStyles.listSelectedNodeStyles, editorExperiment('platform_editor_block_menu', true, {
|
|
479
477
|
exposure: true
|
|
480
478
|
}) && editorContentStyles.textSelectedNodeStyles, editorContentStyles.blocktypeStyles_fg_platform_editor_typography_ugc, editorContentStyles.blocktypeStylesNestedDnd, 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, isExperimentEnabled('platform_editor_vanilla_node_views_phase1') && editorContentStyles.vanillaCaptionStyles, 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 */
|
|
481
|
-
editorContentStyles.telepointerColorAndCommonStyle, colorMode === 'dark' && editorContentStyles.telepointerColorAndCommonStyleDarkMode, expValEqualsNoExposure('platform_editor_agent_be_streaming', 'isEnabled', true) && editorContentStyles.agentShimmerStyles, editorContentStyles.gapCursorStyles, editorContentStyles.gapCursorStylesVisibilityFix, editorContentStyles.panelStyles, editorContentStyles.nestedPanelBorderStylesMixin, editorContentStyles.panelStylesMixinNestedDnd, 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, editorContentStyles.expandStylesMixinNestedDnd, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && editorContentStyles.expandStylesMixin_chromeless_expand_fix, editorContentStyles.findReplaceStyles, editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, 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') ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, colorMode === 'dark' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, editorExperiment('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, isExperimentEnabled('platform_editor_vanilla_node_views_phase1') && editorContentStyles.vanillaUnsupportedStyles, 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, editorContentStyles.syncBlockStylesBase, !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorContentStyles.syncBlockOverflowStyles, editorContentStyles.syncBlockFirstNodeStyles, editorContentStyles.syncBlockTextSelectionStyles, isSyncBlockActivationEnabled && editorContentStyles.syncBlockInteractiveCursorStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, editorExperiment('advanced_layouts', true) && !fg('platform-dst-top-layer-tooltip') && editorContentStyles.layoutDragHandleWrapperStylesLegacy, 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) && 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, editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorContentStyles.layoutBaseStylesNestedDndExcludingBodiedSync, editorContentStyles.layoutColumnMartinTopFixes, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, 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) && isExperimentEnabled('platform_editor_lovability_resize_extensions') && editorContentStyles.pragmaticResizerStylesExtensions, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, 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, editorContentStyles.firstCodeBlockWithNoMargin, editorContentStyles.firstBlockNodeStyles, expValEquals('platform_editor_first_node_fix', 'isEnabled', true) && editorContentStyles.firstNodeWidgetFixStyles, editorContentStyles.mentionNodeStyles, editorContentStyles.mentionsSelectionStyles, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, isFloatingTocEnabled ? editorContentStyles.directEmojiSelectionStyles : editorContentStyles.emojiSelectionStyles, 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, expValEquals('platform_editor_table_css_overflow_shadow', 'isEnabled', true) && editorContentStyles.tableScrollInlineShadowStyles, (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) && editorContentStyles.tableRoundedCornerStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_1') && editorContentStyles.tableContentModeExtensionContainmentStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeNestedTableStyles, editorContentStyles.tableCellBackgroundColorOverrides, 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]),
|
|
479
|
+
editorContentStyles.telepointerColorAndCommonStyle, colorMode === 'dark' && editorContentStyles.telepointerColorAndCommonStyleDarkMode, expValEqualsNoExposure('platform_editor_agent_be_streaming', 'isEnabled', true) && editorContentStyles.agentShimmerStyles, editorContentStyles.gapCursorStyles, editorContentStyles.gapCursorStylesVisibilityFix, editorContentStyles.panelStyles, editorContentStyles.nestedPanelBorderStylesMixin, editorContentStyles.panelStylesMixinNestedDnd, 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, editorContentStyles.expandStylesMixinNestedDnd, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && editorContentStyles.expandStylesMixin_chromeless_expand_fix, editorContentStyles.findReplaceStyles, editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, 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') ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, colorMode === 'dark' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, editorExperiment('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.vanillaTooltipDefaultStyles, isExperimentEnabled('platform_editor_vanilla_node_views_phase1') && editorContentStyles.vanillaUnsupportedStyles, 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, editorContentStyles.syncBlockStylesBase, !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorContentStyles.syncBlockOverflowStyles, editorContentStyles.syncBlockFirstNodeStyles, editorContentStyles.syncBlockTextSelectionStyles, isSyncBlockActivationEnabled && editorContentStyles.syncBlockInteractiveCursorStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, editorExperiment('advanced_layouts', true) && !fg('platform-dst-top-layer-tooltip') && editorContentStyles.layoutDragHandleWrapperStylesLegacy, 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) && 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, editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorContentStyles.layoutBaseStylesNestedDndExcludingBodiedSync, editorContentStyles.layoutColumnMartinTopFixes, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, 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) && isExperimentEnabled('platform_editor_lovability_resize_extensions') && editorContentStyles.pragmaticResizerStylesExtensions, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, 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, editorContentStyles.firstCodeBlockWithNoMargin, editorContentStyles.firstBlockNodeStyles, expValEquals('platform_editor_first_node_fix', 'isEnabled', true) && editorContentStyles.firstNodeWidgetFixStyles, editorContentStyles.mentionNodeStyles, editorContentStyles.mentionsSelectionStyles, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, isFloatingTocEnabled ? editorContentStyles.directEmojiSelectionStyles : editorContentStyles.emojiSelectionStyles, 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, expValEquals('platform_editor_table_css_overflow_shadow', 'isEnabled', true) && editorContentStyles.tableScrollInlineShadowStyles, (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) && editorContentStyles.tableRoundedCornerStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeStyles, isExperimentEnabled('platform_editor_table_fit_to_content_patch_1') && editorContentStyles.tableContentModeExtensionContainmentStyles, expValEquals('platform_editor_table_fit_to_content_auto_convert', 'isEnabled', true) && editorContentStyles.tableContentModeNestedTableStyles, editorContentStyles.tableCellBackgroundColorOverrides, 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]),
|
|
482
480
|
ref: ref,
|
|
483
481
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
484
482
|
"data-testid": "editor-content-container"
|
|
@@ -69,6 +69,7 @@ import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telep
|
|
|
69
69
|
import { textColorStyles } from './styles/textColorStyles';
|
|
70
70
|
import { textHighlightStyle } from './styles/textHighlightStyles';
|
|
71
71
|
import { unsupportedStyles, vanillaUnsupportedStyles } from './styles/unsupportedStyles';
|
|
72
|
+
import { vanillaTooltipDefaultStyles } from './styles/vanillaTooltipStyles';
|
|
72
73
|
import { whitespaceStyles } from './styles/whitespaceStyles';
|
|
73
74
|
const isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
74
75
|
const alignMultipleWrappedImageInLayoutStyles = {
|
|
@@ -140,9 +141,6 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
|
|
|
140
141
|
// root div in editor-internal.tsx and inherited via the CSS cascade — do not set it here.
|
|
141
142
|
// For the legacy path, compute it from the Emotion theme as before.
|
|
142
143
|
const style = React.useMemo(() => ({
|
|
143
|
-
...(props.UNSAFE_containLayout ? {
|
|
144
|
-
contain: 'strict'
|
|
145
|
-
} : {}),
|
|
146
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
147
145
|
...(!expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true) && {
|
|
148
146
|
'--ak-editor-base-font-size': `${editorFontSize({
|
|
@@ -155,7 +153,7 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
|
|
|
155
153
|
}) && {
|
|
156
154
|
'--ak-editor--large-gutter-padding': `${akEditorGutterPaddingDynamic()}px`
|
|
157
155
|
})
|
|
158
|
-
}), [theme
|
|
156
|
+
}), [theme]);
|
|
159
157
|
const browser = getBrowserInfo();
|
|
160
158
|
|
|
161
159
|
// Evaluate the block-spacing experiment once per render.
|
|
@@ -369,7 +367,9 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
|
|
|
369
367
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
370
368
|
embedCardStyles,
|
|
371
369
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
372
|
-
unsupportedStyles,
|
|
370
|
+
unsupportedStyles,
|
|
371
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
372
|
+
vanillaTooltipDefaultStyles, isExperimentEnabled('platform_editor_vanilla_node_views_phase1') &&
|
|
373
373
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
374
374
|
vanillaUnsupportedStyles,
|
|
375
375
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -60,10 +60,9 @@ export const dateVanillaStyles = css({
|
|
|
60
60
|
export const dateStyles = css({
|
|
61
61
|
// Show diff: date attr change highlight. Keep this with date node styles so the highlight
|
|
62
62
|
// follows the date node view instead of living in shared smart-card diff styles.
|
|
63
|
-
// The
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
// platform_editor_show_diff_color_scheme_refactor is cleaned up.
|
|
63
|
+
// The ON cohort of platform_editor_show_diff_color_scheme_refactor sets
|
|
64
|
+
// --show-diff-atomic-inline-changed-border-color inline, overriding the table below; the OFF
|
|
65
|
+
// cohort picks its colour with the `-traditional` class. Drop the table at cleanup (EDITOR-8281).
|
|
67
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
68
67
|
'.show-diff-atomic-inline-changed-date': {
|
|
69
68
|
'--show-diff-atomic-inline-changed-border-color': "var(--ds-border-accent-purple, #AF59E1)",
|
|
@@ -14,10 +14,9 @@ import { akEditorFullPageDefaultFontSize, akEditorSelectedNodeClassName } from '
|
|
|
14
14
|
export const emojiStyles = css({
|
|
15
15
|
// Show diff: emoji attr change highlight. Keep this with emoji node styles so the highlight
|
|
16
16
|
// targets sprite/image/unicode emoji renderers.
|
|
17
|
-
// The
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
// platform_editor_show_diff_color_scheme_refactor is cleaned up.
|
|
17
|
+
// The ON cohort of platform_editor_show_diff_color_scheme_refactor sets
|
|
18
|
+
// --show-diff-atomic-inline-changed-border-color inline, overriding the table below; the OFF
|
|
19
|
+
// cohort picks its colour with the `-traditional` class. Drop the table at cleanup (EDITOR-8281).
|
|
21
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
22
21
|
'.show-diff-atomic-inline-changed-emoji': {
|
|
23
22
|
'--show-diff-atomic-inline-changed-border-color': "var(--ds-border-accent-purple, #AF59E1)"
|
|
@@ -95,10 +94,9 @@ export const emojiStyles = css({
|
|
|
95
94
|
export const scaledEmojiStyles = css({
|
|
96
95
|
// Show diff: emoji attr change highlight. Keep this with scaled emoji node styles too,
|
|
97
96
|
// because scaled emoji styles replace the base emoji style bucket when enabled.
|
|
98
|
-
// The
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
// platform_editor_show_diff_color_scheme_refactor is cleaned up.
|
|
97
|
+
// The ON cohort of platform_editor_show_diff_color_scheme_refactor sets
|
|
98
|
+
// --show-diff-atomic-inline-changed-border-color inline, overriding the table below; the OFF
|
|
99
|
+
// cohort picks its colour with the `-traditional` class. Drop the table at cleanup (EDITOR-8281).
|
|
102
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
103
101
|
'.show-diff-atomic-inline-changed-emoji': {
|
|
104
102
|
'--show-diff-atomic-inline-changed-border-color': "var(--ds-border-accent-purple, #AF59E1)"
|
|
@@ -56,10 +56,9 @@ export const mentionsStyles = css({
|
|
|
56
56
|
export const mentionNodeStyles = css({
|
|
57
57
|
// Show diff: mention attr change highlight. Keep this with mention node styles so the
|
|
58
58
|
// highlight targets the mention primitive's rounded shape.
|
|
59
|
-
// The
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
// platform_editor_show_diff_color_scheme_refactor is cleaned up.
|
|
59
|
+
// The ON cohort of platform_editor_show_diff_color_scheme_refactor sets
|
|
60
|
+
// --show-diff-atomic-inline-changed-border-color inline, overriding the table below; the OFF
|
|
61
|
+
// cohort picks its colour with the `-traditional` class. Drop the table at cleanup (EDITOR-8281).
|
|
63
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
64
63
|
'.show-diff-atomic-inline-changed-mention': {
|
|
65
64
|
'--show-diff-atomic-inline-changed-border-color': "var(--ds-border-accent-purple, #AF59E1)"
|
|
@@ -83,8 +83,21 @@ export const smartCardDiffStyles = css({
|
|
|
83
83
|
* If you need to make changes here, also update the corresponding style in
|
|
84
84
|
* packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
|
|
85
85
|
* See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
|
|
86
|
+
*
|
|
87
|
+
* Two rule sets, one per cohort of `platform_editor_show_diff_color_scheme_refactor`. Their base
|
|
88
|
+
* classes are disjoint — `wrapBlockNodeView` emits `-node`/`-node-traditional` when the gate is off
|
|
89
|
+
* and `-node-vars` when it is on — so only one set can ever match an element.
|
|
90
|
+
*
|
|
91
|
+
* The OFF set is the pre-refactor CSS, kept verbatim: that cohort emits no custom properties, so the
|
|
92
|
+
* tokens in its `var()` fallbacks are the live values. Delete it at experiment cleanup.
|
|
93
|
+
*
|
|
94
|
+
* The ON set reads the `--diff-delete-*` properties the factory emits inline, with no `var()`
|
|
95
|
+
* fallback — `wrapBlockNodeView` sets the class and the properties in the same step. The fallbacks
|
|
96
|
+
* it does keep are the ones standard leaves unset on purpose: `--diff-delete-opacity`,
|
|
97
|
+
* `--diff-delete-ring-width`, and `--diff-delete-text-decoration-color`.
|
|
86
98
|
*/
|
|
87
99
|
export const showDiffDeletedNodeStyles = css({
|
|
100
|
+
// --- OFF cohort: pre-refactor rules, restored verbatim ------------------------------------
|
|
88
101
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
89
102
|
[`.${SmartCardSharedCssClassName.EMBED_CARD_CONTAINER}`]: {
|
|
90
103
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -120,6 +133,31 @@ export const showDiffDeletedNodeStyles = css({
|
|
|
120
133
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
121
134
|
[`&.show-diff-deleted-node .${SmartCardSharedCssClassName.LOADER_WRAPPER}`]: {
|
|
122
135
|
opacity: 0.6
|
|
136
|
+
},
|
|
137
|
+
// ON cohort, same container: one rule per visual role, reading the factory's properties.
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
139
|
+
[`&.show-diff-deleted-node-vars .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div::after`]: {
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
141
|
+
boxShadow: `0 0 0 1px var(--diff-delete-color)`,
|
|
142
|
+
borderColor: 'transparent'
|
|
143
|
+
},
|
|
144
|
+
// Only schemes with a resting ring get `-outline-new`, so this is traditional-only in practice.
|
|
145
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
146
|
+
[`&.show-diff-deleted-node-vars.show-diff-deleted-outline-new .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div::after`]: {
|
|
147
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
148
|
+
boxShadow: `0 0 0 4px var(--diff-delete-color-new)`,
|
|
149
|
+
borderColor: 'transparent'
|
|
150
|
+
},
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
152
|
+
[`&.show-diff-deleted-node-vars.show-diff-deleted-active .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div::after`]: {
|
|
153
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
154
|
+
boxShadow: `0 0 0 4px var(--diff-delete-color-active)`,
|
|
155
|
+
borderColor: 'transparent'
|
|
156
|
+
},
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
158
|
+
[`&.show-diff-deleted-node-vars .${SmartCardSharedCssClassName.LOADER_WRAPPER}`]: {
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
160
|
+
opacity: `var(--diff-delete-opacity, 0.6)`
|
|
123
161
|
}
|
|
124
162
|
},
|
|
125
163
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -173,15 +211,68 @@ export const showDiffDeletedNodeStyles = css({
|
|
|
173
211
|
'[data-prosemirror-node-name="blockquote"].show-diff-deleted-node': {
|
|
174
212
|
textDecoration: 'line-through'
|
|
175
213
|
},
|
|
214
|
+
// Longhands, not the `text-decoration` shorthand: the shorthand resets `text-decoration-color`,
|
|
215
|
+
// and Compiled does not guarantee it lands before the longhand.
|
|
176
216
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
177
217
|
'[data-prosemirror-node-name="blockquote"].show-diff-deleted-node-traditional': {
|
|
178
|
-
|
|
179
|
-
|
|
218
|
+
textDecorationColor: `var(--diff-delete-text-decoration-color, ${"var(--ds-border-accent-red, #E2483D)"})`,
|
|
219
|
+
textDecorationLine: 'line-through'
|
|
180
220
|
},
|
|
221
|
+
// Longhands, for the same reason as the blockquote rule above.
|
|
181
222
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
182
223
|
'[data-prosemirror-node-name="embedCard"].show-diff-deleted-node-traditional': {
|
|
183
|
-
|
|
184
|
-
|
|
224
|
+
textDecorationColor: `var(--diff-delete-text-decoration-color, ${"var(--ds-border-accent-red, #E2483D)"})`,
|
|
225
|
+
textDecorationLine: 'line-through'
|
|
226
|
+
},
|
|
227
|
+
// --- ON cohort: merged rules, one per visual role -----------------------------------------
|
|
228
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
229
|
+
'.show-diff-deleted-node-vars .media-card-wrapper': {
|
|
230
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
231
|
+
'& > div': {
|
|
232
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
233
|
+
boxShadow: `0 0 0 1px var(--diff-delete-color)`,
|
|
234
|
+
borderRadius: "var(--ds-radius-small, 4px)",
|
|
235
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
236
|
+
opacity: `var(--diff-delete-opacity, 0.6)`
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
240
|
+
'.show-diff-deleted-node-vars.show-diff-deleted-outline-new .media-card-wrapper': {
|
|
241
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
242
|
+
'& > div': {
|
|
243
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
244
|
+
boxShadow: `0 0 0 4px var(--diff-delete-color-new)`,
|
|
245
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
249
|
+
'.show-diff-deleted-node-vars.show-diff-deleted-active .media-card-wrapper': {
|
|
250
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
251
|
+
'& > div': {
|
|
252
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
253
|
+
boxShadow: `0 0 0 4px var(--diff-delete-color-active)`,
|
|
254
|
+
borderRadius: "var(--ds-radius-small, 4px)",
|
|
255
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
256
|
+
opacity: `var(--diff-delete-opacity, 0.6)`
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
// Both schemes strike deleted blockquotes; only the colour differs. The variable is emitted for
|
|
260
|
+
// `stateful` (traditional) only, so standard falls through to `currentColor` — what it painted
|
|
261
|
+
// before. Longhands, not the shorthand, which would reset the colour.
|
|
262
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
263
|
+
'[data-prosemirror-node-name="blockquote"].show-diff-deleted-node-vars': {
|
|
264
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
265
|
+
textDecorationColor: `var(--diff-delete-text-decoration-color, currentColor)`,
|
|
266
|
+
textDecorationLine: 'line-through'
|
|
267
|
+
},
|
|
268
|
+
// Standard draws no strike on deleted embedCards, so the line itself is scheme-driven:
|
|
269
|
+
// `--diff-delete-embed-strike-line` is `line-through` for traditional, `none` for standard.
|
|
270
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
271
|
+
'[data-prosemirror-node-name="embedCard"].show-diff-deleted-node-vars': {
|
|
272
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
273
|
+
textDecorationColor: `var(--diff-delete-text-decoration-color, currentColor)`,
|
|
274
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
275
|
+
textDecorationLine: `var(--diff-delete-embed-strike-line)`
|
|
185
276
|
}
|
|
186
277
|
});
|
|
187
278
|
|
|
@@ -191,8 +282,11 @@ export const showDiffDeletedNodeStyles = css({
|
|
|
191
282
|
* If you need to make changes here, also update the corresponding style in
|
|
192
283
|
* packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
|
|
193
284
|
* See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
|
|
285
|
+
*
|
|
286
|
+
* The a11y-fixes variant of `showDiffDeletedNodeStyles`; same two-cohort split — see its note.
|
|
194
287
|
*/
|
|
195
288
|
export const showDiffDeletedNodeStylesNew = css({
|
|
289
|
+
// --- OFF cohort: pre-refactor rules, restored verbatim ------------------------------------
|
|
196
290
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
197
291
|
[`.${SmartCardSharedCssClassName.EMBED_CARD_CONTAINER}`]: {
|
|
198
292
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -228,6 +322,32 @@ export const showDiffDeletedNodeStylesNew = css({
|
|
|
228
322
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
229
323
|
[`&.show-diff-deleted-node .${SmartCardSharedCssClassName.LOADER_WRAPPER}`]: {
|
|
230
324
|
opacity: 0.8
|
|
325
|
+
},
|
|
326
|
+
// ON cohort, same container. Red in both schemes here, unlike standard's gray `deleteColor`
|
|
327
|
+
// — hence its own `deletedMediaRingColor` role rather than `--diff-delete-color`.
|
|
328
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
329
|
+
[`&.show-diff-deleted-node-vars .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div::after`]: {
|
|
330
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
331
|
+
boxShadow: `0 0 0 1px var(--diff-delete-media-ring-color)`,
|
|
332
|
+
borderColor: 'transparent'
|
|
333
|
+
},
|
|
334
|
+
// Only schemes with a resting ring get `-outline-new`, so this is traditional-only in practice.
|
|
335
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
336
|
+
[`&.show-diff-deleted-node-vars.show-diff-deleted-outline-new .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div::after`]: {
|
|
337
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
338
|
+
boxShadow: `0 0 0 4px var(--diff-delete-color-new)`,
|
|
339
|
+
borderColor: 'transparent'
|
|
340
|
+
},
|
|
341
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
342
|
+
[`&.show-diff-deleted-node-vars.show-diff-deleted-active .${SmartCardSharedCssClassName.LOADER_WRAPPER} > div::after`]: {
|
|
343
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
344
|
+
boxShadow: `0 0 0 4px var(--diff-delete-color-active)`,
|
|
345
|
+
borderColor: 'transparent'
|
|
346
|
+
},
|
|
347
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-nested-selectors
|
|
348
|
+
[`&.show-diff-deleted-node-vars .${SmartCardSharedCssClassName.LOADER_WRAPPER}`]: {
|
|
349
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
350
|
+
opacity: `var(--diff-delete-opacity, 0.8)`
|
|
231
351
|
}
|
|
232
352
|
},
|
|
233
353
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -281,15 +401,70 @@ export const showDiffDeletedNodeStylesNew = css({
|
|
|
281
401
|
'[data-prosemirror-node-name="blockquote"].show-diff-deleted-node': {
|
|
282
402
|
textDecoration: 'line-through'
|
|
283
403
|
},
|
|
404
|
+
// Longhands, not the `text-decoration` shorthand: the shorthand resets `text-decoration-color`,
|
|
405
|
+
// and Compiled does not guarantee it lands before the longhand.
|
|
284
406
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
285
407
|
'[data-prosemirror-node-name="blockquote"].show-diff-deleted-node-traditional': {
|
|
286
|
-
|
|
287
|
-
|
|
408
|
+
textDecorationColor: `var(--diff-delete-text-decoration-color, ${"var(--ds-border-accent-red, #E2483D)"})`,
|
|
409
|
+
textDecorationLine: 'line-through'
|
|
288
410
|
},
|
|
411
|
+
// Longhands, for the same reason as the blockquote rule above.
|
|
289
412
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
290
413
|
'[data-prosemirror-node-name="embedCard"].show-diff-deleted-node-traditional': {
|
|
291
|
-
|
|
292
|
-
|
|
414
|
+
textDecorationColor: `var(--diff-delete-text-decoration-color, ${"var(--ds-border-accent-red, #E2483D)"})`,
|
|
415
|
+
textDecorationLine: 'line-through'
|
|
416
|
+
},
|
|
417
|
+
// --- ON cohort: merged rules, one per visual role -----------------------------------------
|
|
418
|
+
// `--diff-delete-ring-width` is unset for standard (1px); traditional tracks the inherited
|
|
419
|
+
// marker ring width.
|
|
420
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
421
|
+
'.show-diff-deleted-node-vars .media-card-wrapper': {
|
|
422
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
423
|
+
'& > div': {
|
|
424
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
425
|
+
boxShadow: `0 0 0 var(--diff-delete-ring-width, 1px) var(--diff-delete-media-ring-color)`,
|
|
426
|
+
borderRadius: "var(--ds-radius-small, 4px)",
|
|
427
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
428
|
+
opacity: `var(--diff-delete-opacity, 0.8)`
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
432
|
+
'.show-diff-deleted-node-vars.show-diff-deleted-outline-new .media-card-wrapper': {
|
|
433
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
434
|
+
'& > div': {
|
|
435
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
436
|
+
boxShadow: `0 0 0 4px var(--diff-delete-color-new)`,
|
|
437
|
+
borderRadius: "var(--ds-radius-small, 4px)"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
441
|
+
'.show-diff-deleted-node-vars.show-diff-deleted-active .media-card-wrapper': {
|
|
442
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
443
|
+
'& > div': {
|
|
444
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
445
|
+
boxShadow: `0 0 0 4px var(--diff-delete-color-active)`,
|
|
446
|
+
borderRadius: "var(--ds-radius-small, 4px)",
|
|
447
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
448
|
+
opacity: `var(--diff-delete-opacity, 0.8)`
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
// Both schemes strike deleted blockquotes; only the colour differs. The variable is emitted for
|
|
452
|
+
// `stateful` (traditional) only, so standard falls through to `currentColor` — what it painted
|
|
453
|
+
// before. Longhands, not the shorthand, which would reset the colour.
|
|
454
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
455
|
+
'[data-prosemirror-node-name="blockquote"].show-diff-deleted-node-vars': {
|
|
456
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
457
|
+
textDecorationColor: `var(--diff-delete-text-decoration-color, currentColor)`,
|
|
458
|
+
textDecorationLine: 'line-through'
|
|
459
|
+
},
|
|
460
|
+
// Standard draws no strike on deleted embedCards, so the line itself is scheme-driven:
|
|
461
|
+
// `--diff-delete-embed-strike-line` is `line-through` for traditional, `none` for standard.
|
|
462
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
463
|
+
'[data-prosemirror-node-name="embedCard"].show-diff-deleted-node-vars': {
|
|
464
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
465
|
+
textDecorationColor: `var(--diff-delete-text-decoration-color, currentColor)`,
|
|
466
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
467
|
+
textDecorationLine: `var(--diff-delete-embed-strike-line)`
|
|
293
468
|
}
|
|
294
469
|
});
|
|
295
470
|
/**
|
|
@@ -11,10 +11,9 @@ import { css } from '@emotion/react';
|
|
|
11
11
|
export const statusStyles = css({
|
|
12
12
|
// Show diff: status attr change highlight. Keep this with status node styles so the highlight
|
|
13
13
|
// targets the lozenge shape rather than the decoration wrapper.
|
|
14
|
-
// The
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
// platform_editor_show_diff_color_scheme_refactor is cleaned up.
|
|
14
|
+
// The ON cohort of platform_editor_show_diff_color_scheme_refactor sets
|
|
15
|
+
// --show-diff-atomic-inline-changed-border-color inline, overriding the table below; the OFF
|
|
16
|
+
// cohort picks its colour with the `-traditional` class. Drop the table at cleanup (EDITOR-8281).
|
|
18
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
19
18
|
'.show-diff-atomic-inline-changed-status': {
|
|
20
19
|
'--show-diff-atomic-inline-changed-border-color': "var(--ds-border-accent-purple, #AF59E1)"
|
|
@@ -52,6 +52,22 @@ export const vanillaUnsupportedStyles = css({
|
|
|
52
52
|
justifyContent: 'center'
|
|
53
53
|
},
|
|
54
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
55
|
+
'.unsupported-inline-vanilla-inner': {
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
background: "var(--ds-background-disabled, #0515240F)",
|
|
58
|
+
border: `${"var(--ds-border-width, 1px)"} dashed ${"var(--ds-border-disabled, #0515240F)"}`,
|
|
59
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
60
|
+
boxSizing: 'border-box',
|
|
61
|
+
cursor: 'default',
|
|
62
|
+
display: 'inline-flex',
|
|
63
|
+
font: "var(--ds-font-body, normal 400 14px/20px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
64
|
+
margin: `0 ${"var(--ds-space-025, 2px)"}`,
|
|
65
|
+
minHeight: '24px',
|
|
66
|
+
padding: `0 ${"var(--ds-space-100, 8px)"}`,
|
|
67
|
+
verticalAlign: 'middle',
|
|
68
|
+
whiteSpace: 'nowrap'
|
|
69
|
+
},
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
55
71
|
'.unsupported-vanilla-icon': {
|
|
56
72
|
padding: "var(--ds-space-050, 4px)",
|
|
57
73
|
display: 'inline-flex',
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
* Default look for tooltips created by `VanillaTooltip` (`editor-common/vanilla-tooltip`).
|
|
7
|
+
* Opt in by adding `ak-editor-vanilla-tooltip-default` to the tooltip's class name.
|
|
8
|
+
*
|
|
9
|
+
* The tooltip is a `[popover]`: the browser paints it in the top layer but leaves it in the
|
|
10
|
+
* DOM, so this descendant selector still matches. `VanillaTooltip` sets `opacity`,
|
|
11
|
+
* `visibility` and `transition` inline for the show/hide animation;
|
|
12
|
+
*/
|
|
13
|
+
export const vanillaTooltipDefaultStyles = css({
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
15
|
+
'.ProseMirror': {
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
17
|
+
'.ak-editor-vanilla-tooltip-default': {
|
|
18
|
+
boxSizing: 'border-box',
|
|
19
|
+
maxWidth: '240px',
|
|
20
|
+
backgroundColor: "var(--ds-background-neutral-bold, #292A2E)",
|
|
21
|
+
border: 'none',
|
|
22
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
23
|
+
color: "var(--ds-text-inverse, #FFFFFF)",
|
|
24
|
+
font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
25
|
+
fontFamily: "var(--ds-font-family-body, \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
26
|
+
insetBlockStart: "var(--ds-space-0, 0px)",
|
|
27
|
+
insetInlineStart: "var(--ds-space-0, 0px)",
|
|
28
|
+
overflowWrap: 'break-word',
|
|
29
|
+
paddingBlock: "var(--ds-space-050, 4px)",
|
|
30
|
+
paddingInline: "var(--ds-space-075, 6px)",
|
|
31
|
+
whiteSpace: 'normal'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
@@ -22,12 +22,11 @@ export const getExtensionQuickInsertComponents = ({
|
|
|
22
22
|
title: item.title
|
|
23
23
|
})),
|
|
24
24
|
component: props => {
|
|
25
|
-
const onInsert = typeof props.onInsert === 'function' ? props.onInsert : undefined;
|
|
26
25
|
return /*#__PURE__*/React.createElement(ExtensionQuickInsertMenuItem, {
|
|
27
26
|
apiRef: apiRef,
|
|
28
27
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
29
28
|
item: item,
|
|
30
|
-
onInsert: onInsert
|
|
29
|
+
onInsert: props.onInsert
|
|
31
30
|
});
|
|
32
31
|
}
|
|
33
32
|
};
|
|
@@ -32,7 +32,6 @@ import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
32
32
|
import { EditorSSRRenderer } from '@atlaskit/editor-ssr-renderer';
|
|
33
33
|
import { createSSREditorState } from '@atlaskit/editor-ssr-renderer/create-ssr-editor-state';
|
|
34
34
|
import { createSSRPMPlugins } from '@atlaskit/editor-ssr-renderer/create-ssr-pm-plugins';
|
|
35
|
-
import { insm } from '@atlaskit/insm/api';
|
|
36
35
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
37
36
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
38
37
|
import { addUFOCustomData } from '@atlaskit/react-ufo/custom-data';
|
|
@@ -934,29 +933,6 @@ export function ReactEditorView(props) {
|
|
|
934
933
|
}
|
|
935
934
|
}, [createEditorView, onEditorCreated, eventDispatcher, onEditorDestroyed, handleAnalyticsEvent, mitigateScrollJump]);
|
|
936
935
|
var isPageAppearance = isFullPage(nextAppearance) || nextAppearance === 'max';
|
|
937
|
-
|
|
938
|
-
// insm measures a page, so only the page's own editor reports its dom size -- not a
|
|
939
|
-
// secondary editor such as a comment editor, or one nested inside a legacy content
|
|
940
|
-
// extension. This runs as an effect rather than from handleEditorViewRef because
|
|
941
|
-
// `isNestedEditor` is only resolved once `editorRef` is attached, which happens after
|
|
942
|
-
// the mount node's ref callback.
|
|
943
|
-
useEffect(function () {
|
|
944
|
-
if (!editorView || isNestedEditor.current || !isPageAppearance) {
|
|
945
|
-
return;
|
|
946
|
-
}
|
|
947
|
-
if (!isExperimentEnabled('platform_editor_insm_dom_node_count')) {
|
|
948
|
-
return;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
// insm has no reference to the editor, so the element it measures for `editorDomSize`
|
|
952
|
-
// on session events is provided here. It's captured rather than read again on cleanup,
|
|
953
|
-
// as the view is destroyed by then.
|
|
954
|
-
var editorDom = editorView.dom;
|
|
955
|
-
insm.registerEditorDom(editorDom);
|
|
956
|
-
return function () {
|
|
957
|
-
insm.unregisterEditorDom(editorDom);
|
|
958
|
-
};
|
|
959
|
-
}, [editorView, isPageAppearance]);
|
|
960
936
|
var createEditor = useCallback(function (assistiveLabel, assistiveDescribedBy) {
|
|
961
937
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fg('cc_editor_focus_before_editor_on_load') && /*#__PURE__*/React.createElement("div", {
|
|
962
938
|
tabIndex: -1,
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
._n3tdidpf{padding-bottom:0}
|
|
66
66
|
._n3tdoahv{padding-bottom:var(--ds-space-600,3pc)}
|
|
67
67
|
._njlp131u{contain:layout style inline-size}
|
|
68
|
+
._njlp3xnj{contain:layout size}
|
|
68
69
|
._ongaglyw .ProseMirror>h4{clear:none}
|
|
69
70
|
._otyr1wug{margin-bottom:auto}
|
|
70
71
|
._otyridpf{margin-bottom:0}
|