@atlaskit/editor-core 223.0.6 → 223.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/cjs/create-editor/ReactEditorView.js +1 -1
  3. package/dist/cjs/presets/default.js +2 -1
  4. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
  5. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -1
  6. package/dist/cjs/ui/quick-insert/ExtensionQuickInsertIcon.js +85 -0
  7. package/dist/cjs/ui/quick-insert/ExtensionQuickInsertMenuItem.js +47 -0
  8. package/dist/cjs/ui/quick-insert/executeExtensionQuickInsertItem.js +98 -0
  9. package/dist/cjs/ui/quick-insert/getExtensionQuickInsertComponents.js +36 -0
  10. package/dist/cjs/utils/combineQuickInsertProviders.js +5 -1
  11. package/dist/cjs/utils/extensions.js +30 -9
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/es2019/create-editor/ReactEditorView.js +1 -1
  14. package/dist/es2019/presets/default.js +2 -1
  15. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
  16. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -1
  17. package/dist/es2019/ui/quick-insert/ExtensionQuickInsertIcon.js +46 -0
  18. package/dist/es2019/ui/quick-insert/ExtensionQuickInsertMenuItem.js +42 -0
  19. package/dist/es2019/ui/quick-insert/executeExtensionQuickInsertItem.js +77 -0
  20. package/dist/es2019/ui/quick-insert/getExtensionQuickInsertComponents.js +28 -0
  21. package/dist/es2019/utils/combineQuickInsertProviders.js +5 -1
  22. package/dist/es2019/utils/extensions.js +25 -8
  23. package/dist/es2019/version-wrapper.js +1 -1
  24. package/dist/esm/create-editor/ReactEditorView.js +1 -1
  25. package/dist/esm/presets/default.js +2 -1
  26. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -1
  27. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -1
  28. package/dist/esm/ui/quick-insert/ExtensionQuickInsertIcon.js +78 -0
  29. package/dist/esm/ui/quick-insert/ExtensionQuickInsertMenuItem.js +39 -0
  30. package/dist/esm/ui/quick-insert/executeExtensionQuickInsertItem.js +91 -0
  31. package/dist/esm/ui/quick-insert/getExtensionQuickInsertComponents.js +29 -0
  32. package/dist/esm/utils/combineQuickInsertProviders.js +5 -1
  33. package/dist/esm/utils/extensions.js +30 -9
  34. package/dist/esm/version-wrapper.js +1 -1
  35. package/dist/types/ui/quick-insert/ExtensionQuickInsertIcon.d.ts +6 -0
  36. package/dist/types/ui/quick-insert/ExtensionQuickInsertMenuItem.d.ts +11 -0
  37. package/dist/types/ui/quick-insert/executeExtensionQuickInsertItem.d.ts +16 -0
  38. package/dist/types/ui/quick-insert/getExtensionQuickInsertComponents.d.ts +11 -0
  39. package/dist/types/utils/extensions.d.ts +1 -0
  40. package/package.json +3 -9
@@ -478,7 +478,7 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
478
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, 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 */
479
479
  editorContentStyles.telepointerColorAndCommonStyle, colorMode === 'dark' && editorContentStyles.telepointerColorAndCommonStyleDarkMode, expValEqualsNoExposure('platform_editor_agent_be_streaming', 'isEnabled', true) && editorContentStyles.agentShimmerStyles, editorContentStyles.gapCursorStyles, editorExperiment('platform_synced_block', true) && 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, 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') ? 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, (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) &&
480
480
  // Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
481
- !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockTextSelectionStyles, isSyncBlockActivationEnabled && editorExperiment('platform_synced_block', true) && 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, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutBaseStylesNestedDndExcludingBodiedSync, !editorExperiment('platform_synced_block', true) && editorContentStyles.layoutBaseStylesNestedDnd, editorContentStyles.layoutColumnMartinTopFixes, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed, 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) && isExperimentEnabled('platform_editor_lovability_resize_extensions') && editorContentStyles.pragmaticResizerStylesExtensions, 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, 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) && fg('platform_editor_table_q4_patch_1') && 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) && fg('platform_editor_table_nested_renderer_fix') && 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]),
481
+ !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockTextSelectionStyles, isSyncBlockActivationEnabled && editorExperiment('platform_synced_block', true) && 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, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutBaseStylesNestedDndExcludingBodiedSync, !editorExperiment('platform_synced_block', true) && editorContentStyles.layoutBaseStylesNestedDnd, editorContentStyles.layoutColumnMartinTopFixes, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed, 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) && isExperimentEnabled('platform_editor_lovability_resize_extensions') && editorContentStyles.pragmaticResizerStylesExtensions, 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, 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) && fg('platform_editor_table_nested_renderer_fix') && 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
482
  ref: ref,
483
483
  "data-editor-scroll-container": isScrollable ? 'true' : undefined,
484
484
  "data-testid": "editor-content-container"
@@ -542,7 +542,7 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
542
542
  tableEmptyRowStyles,
543
543
  // SSR-safe rounded corners (see tableRoundedCornerStyles). Gated to match the table plugin
544
544
  // migration that drops roundedTableCellCornerStyles() from the client-only <Global> styles.
545
- expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && fg('platform_editor_table_q4_patch_1') &&
545
+ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) &&
546
546
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
547
547
  tableRoundedCornerStyles,
548
548
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import AppsIcon from '@atlaskit/icon/core/apps';
3
+ const lazyExtensionIconCache = new WeakMap();
4
+ const resolveExtensionIcon = async getIcon => {
5
+ try {
6
+ const maybeIcon = await (getIcon === null || getIcon === void 0 ? void 0 : getIcon());
7
+ if (!maybeIcon) {
8
+ return AppsIcon;
9
+ }
10
+ if (Object.prototype.hasOwnProperty.call(maybeIcon, 'default')) {
11
+ var _default;
12
+ return (_default = maybeIcon.default) !== null && _default !== void 0 ? _default : AppsIcon;
13
+ }
14
+ return maybeIcon;
15
+ } catch {
16
+ return AppsIcon;
17
+ }
18
+ };
19
+ const createLazyExtensionIcon = getIcon => {
20
+ const cachedIcon = lazyExtensionIconCache.get(getIcon);
21
+ if (cachedIcon) {
22
+ return cachedIcon;
23
+ }
24
+ const LazyIcon = /*#__PURE__*/React.lazy(() => resolveExtensionIcon(getIcon).then(Icon => ({
25
+ default: Icon
26
+ })));
27
+ LazyIcon.displayName = 'lazy(ExtensionIcon)';
28
+ const Icon = props => /*#__PURE__*/React.createElement(React.Suspense, {
29
+ fallback: /*#__PURE__*/React.createElement(AppsIcon, {
30
+ label: props.label
31
+ })
32
+ }, /*#__PURE__*/React.createElement(LazyIcon, {
33
+ label: props.label
34
+ }));
35
+ lazyExtensionIconCache.set(getIcon, Icon);
36
+ return Icon;
37
+ };
38
+ export const ExtensionQuickInsertIcon = ({
39
+ getIcon,
40
+ label
41
+ }) => {
42
+ const Icon = React.useMemo(() => getIcon ? createLazyExtensionIcon(getIcon) : AppsIcon, [getIcon]);
43
+ return /*#__PURE__*/React.createElement(Icon, {
44
+ label: label
45
+ });
46
+ };
@@ -0,0 +1,42 @@
1
+ import React, { useCallback } from 'react';
2
+ import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
3
+ import { useQuickInsertContext } from '@atlaskit/editor-common/quick-insert/use-quick-insert-context';
4
+ import { executeExtensionQuickInsertItem } from './executeExtensionQuickInsertItem';
5
+ import { ExtensionQuickInsertIcon } from './ExtensionQuickInsertIcon';
6
+ export const ExtensionQuickInsertMenuItem = ({
7
+ apiRef,
8
+ createAnalyticsEvent,
9
+ item,
10
+ onInsert
11
+ }) => {
12
+ const {
13
+ editorView,
14
+ isOffline
15
+ } = useQuickInsertContext();
16
+ const onSelect = useCallback(({
17
+ insert,
18
+ source
19
+ }) => {
20
+ const result = executeExtensionQuickInsertItem({
21
+ apiRef,
22
+ createAnalyticsEvent,
23
+ insert,
24
+ item,
25
+ source,
26
+ state: editorView.state
27
+ });
28
+ if (result) {
29
+ onInsert === null || onInsert === void 0 ? void 0 : onInsert();
30
+ }
31
+ return result;
32
+ }, [apiRef, createAnalyticsEvent, editorView.state, item, onInsert]);
33
+ return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
34
+ iconBefore: /*#__PURE__*/React.createElement(ExtensionQuickInsertIcon, {
35
+ getIcon: item.icon,
36
+ label: ""
37
+ }),
38
+ isDisabled: isOffline,
39
+ onSelect: onSelect,
40
+ title: item.title
41
+ });
42
+ };
@@ -0,0 +1,77 @@
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
+ import { resolveImport } from '@atlaskit/editor-common/extensions';
3
+ import { safeInsert } from '@atlaskit/editor-common/insert';
4
+ import { logException } from '@atlaskit/editor-common/monitoring';
5
+ import { processRawValue } from '@atlaskit/editor-common/process-raw-value';
6
+ import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
7
+ const sendAnalytics = (item, selection, createAnalyticsEvent, source) => {
8
+ if (createAnalyticsEvent) {
9
+ const insertLocation = findInsertLocation(selection);
10
+ fireAnalyticsEvent(createAnalyticsEvent)({
11
+ payload: {
12
+ action: ACTION.INSERTED,
13
+ actionSubject: ACTION_SUBJECT.DOCUMENT,
14
+ actionSubjectId: ACTION_SUBJECT_ID.EXTENSION,
15
+ attributes: {
16
+ extensionType: item.extensionType,
17
+ extensionKey: item.extensionKey,
18
+ key: item.key,
19
+ inputMethod: source || INPUT_METHOD.QUICK_INSERT,
20
+ ...(insertLocation ? {
21
+ insertLocation
22
+ } : {})
23
+ },
24
+ eventType: EVENT_TYPE.TRACK
25
+ }
26
+ });
27
+ }
28
+ };
29
+ const warnDummyAPI = location => {
30
+ if (process.env.NODE_ENV !== 'production') {
31
+ // eslint-disable-next-line no-console
32
+ console.warn('Extension plugin not attached to editor - cannot use extension API in ' + location);
33
+ }
34
+ };
35
+ const dummyExtensionAPI = {
36
+ editInContextPanel: () => warnDummyAPI('editInContextPanel'),
37
+ _editInLegacyMacroBrowser: () => warnDummyAPI('_editInLegacyMacroBrowser'),
38
+ getNodeWithPosByLocalId: () => ({
39
+ node: null,
40
+ pos: null
41
+ }),
42
+ doc: {
43
+ insertAfter: () => warnDummyAPI('doc:insertAfter'),
44
+ scrollTo: () => warnDummyAPI('doc:scrollTo'),
45
+ update: () => warnDummyAPI('doc:update')
46
+ }
47
+ };
48
+ export const executeExtensionQuickInsertItem = ({
49
+ apiRef,
50
+ createAnalyticsEvent,
51
+ insert,
52
+ item,
53
+ source,
54
+ state
55
+ }) => {
56
+ if (typeof item.node === 'function') {
57
+ var _apiRef$current$exten, _apiRef$current, _apiRef$current$exten2, _apiRef$current$exten3;
58
+ const extensionAPI = (_apiRef$current$exten = (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 ? void 0 : (_apiRef$current$exten2 = _apiRef$current.extension) === null || _apiRef$current$exten2 === void 0 ? void 0 : (_apiRef$current$exten3 = _apiRef$current$exten2.actions) === null || _apiRef$current$exten3 === void 0 ? void 0 : _apiRef$current$exten3.api()) !== null && _apiRef$current$exten !== void 0 ? _apiRef$current$exten : dummyExtensionAPI;
59
+ void resolveImport(item.node(extensionAPI)).then(node => {
60
+ sendAnalytics(item, state.selection, createAnalyticsEvent, source);
61
+ if (node && apiRef.current) {
62
+ apiRef.current.core.actions.execute(({
63
+ tr
64
+ }) => {
65
+ var _safeInsert$scrollInt, _safeInsert;
66
+ const content = processRawValue(tr.doc.type.schema, node);
67
+ return content ? (_safeInsert$scrollInt = (_safeInsert = safeInsert(content)(tr)) === null || _safeInsert === void 0 ? void 0 : _safeInsert.scrollIntoView()) !== null && _safeInsert$scrollInt !== void 0 ? _safeInsert$scrollInt : null : null;
68
+ });
69
+ }
70
+ }).catch(error => logException(error, {
71
+ location: 'editor-core/quick-insert'
72
+ }));
73
+ return insert('');
74
+ }
75
+ sendAnalytics(item, state.selection, createAnalyticsEvent, source);
76
+ return insert(item.node);
77
+ };
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
3
+ import { EXTENSION_ITEM_RANK } from '@atlaskit/editor-common/quick-insert/rank';
4
+ import { ExtensionQuickInsertMenuItem } from './ExtensionQuickInsertMenuItem';
5
+ export const getExtensionQuickInsertComponents = ({
6
+ apiRef,
7
+ createAnalyticsEvent,
8
+ items
9
+ }) => items.map((item, index) => {
10
+ var _item$priority;
11
+ return {
12
+ type: 'menu-item',
13
+ key: item.key,
14
+ parents: getQuickInsertMenuItemParents({
15
+ categories: item.categories,
16
+ rank: EXTENSION_ITEM_RANK + ((_item$priority = item.priority) !== null && _item$priority !== void 0 ? _item$priority : index)
17
+ }),
18
+ component: props => {
19
+ const onInsert = typeof props.onInsert === 'function' ? props.onInsert : undefined;
20
+ return /*#__PURE__*/React.createElement(ExtensionQuickInsertMenuItem, {
21
+ apiRef: apiRef,
22
+ createAnalyticsEvent: createAnalyticsEvent,
23
+ item: item,
24
+ onInsert: onInsert
25
+ });
26
+ }
27
+ };
28
+ });
@@ -1,9 +1,13 @@
1
1
  import { combineProviders } from '@atlaskit/editor-common/provider-helpers';
2
2
  export function combineQuickInsertProviders(quickInsertProviders) {
3
3
  const {
4
- invokeList
4
+ invokeList,
5
+ invokeOptionalList
5
6
  } = combineProviders(quickInsertProviders);
6
7
  return {
8
+ getComponents() {
9
+ return invokeOptionalList('getComponents');
10
+ },
7
11
  getItems() {
8
12
  return invokeList('getItems');
9
13
  }
@@ -3,6 +3,8 @@ import Loadable from 'react-loadable';
3
3
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
4
  import { getQuickInsertItemsFromModule, resolveImport } from '@atlaskit/editor-common/extensions';
5
5
  import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
6
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
+ import { getExtensionQuickInsertComponents } from '../ui/quick-insert/getExtensionQuickInsertComponents';
6
8
 
7
9
  // Structural shape of the markdown-mode plugin's slice of the injection API.
8
10
  // Used to read `isMarkdownMode` without importing the `MarkdownModePlugin`
@@ -10,7 +12,7 @@ import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
10
12
  // dependency graph and force every consuming product to rebuild.
11
13
 
12
14
  /**
13
- * Utils to send analytics event when a extension is inserted using quickInsert
15
+ * Utils to send analytics event when an extension is inserted using quickInsert
14
16
  */
15
17
  function sendExtensionQuickInsertAnalytics(item, selection, createAnalyticsEvent, source) {
16
18
  if (createAnalyticsEvent) {
@@ -24,7 +26,6 @@ function sendExtensionQuickInsertAnalytics(item, selection, createAnalyticsEvent
24
26
  extensionType: item.extensionType,
25
27
  extensionKey: item.extensionKey,
26
28
  key: item.key,
27
- // @note inputMethod defaults to QUICK_INSERT if not provided
28
29
  inputMethod: source || INPUT_METHOD.QUICK_INSERT,
29
30
  ...(insertLocation ? {
30
31
  insertLocation
@@ -54,16 +55,31 @@ const dummyExtensionAPI = {
54
55
  update: () => showDummyAPIWarning('doc:update')
55
56
  }
56
57
  };
58
+
59
+ /** Creates legacy and registered Quick Insert representations for extensions. */
57
60
  export async function extensionProviderToQuickInsertProvider(extensionProvider, editorActions, apiRef, createAnalyticsEvent) {
58
61
  const extensions = await extensionProvider.getExtensions();
62
+ const getMenuItems = () => getQuickInsertItemsFromModule(extensions, item => item);
59
63
  return {
60
- getItems: () => {
64
+ getComponents: () => {
61
65
  var _apiRef$current, _apiRef$current$markd, _apiRef$current$markd2;
66
+ const isMarkdownMode = (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 ? void 0 : (_apiRef$current$markd = _apiRef$current.markdownMode) === null || _apiRef$current$markd === void 0 ? void 0 : (_apiRef$current$markd2 = _apiRef$current$markd.sharedState.currentState()) === null || _apiRef$current$markd2 === void 0 ? void 0 : _apiRef$current$markd2.isMarkdownMode;
67
+ if (!isExperimentEnabled('platform_editor_slash_command') || isMarkdownMode) {
68
+ return Promise.resolve([]);
69
+ }
70
+ return Promise.resolve(getExtensionQuickInsertComponents({
71
+ apiRef,
72
+ createAnalyticsEvent,
73
+ items: getMenuItems()
74
+ }));
75
+ },
76
+ getItems: () => {
77
+ var _apiRef$current2, _apiRef$current2$mark, _apiRef$current2$mark2;
62
78
  // `extensionProvider` is supplied independently of the preset, so
63
79
  // suppress its items in markdown mode where rich-only content cannot
64
80
  // be inserted. See `MarkdownModeReader` above for why this is read
65
81
  // via a structural cast rather than the typed plugin API.
66
- const isMarkdownMode = (_apiRef$current = apiRef.current) === null || _apiRef$current === void 0 ? void 0 : (_apiRef$current$markd = _apiRef$current.markdownMode) === null || _apiRef$current$markd === void 0 ? void 0 : (_apiRef$current$markd2 = _apiRef$current$markd.sharedState.currentState()) === null || _apiRef$current$markd2 === void 0 ? void 0 : _apiRef$current$markd2.isMarkdownMode;
82
+ const isMarkdownMode = (_apiRef$current2 = apiRef.current) === null || _apiRef$current2 === void 0 ? void 0 : (_apiRef$current2$mark = _apiRef$current2.markdownMode) === null || _apiRef$current2$mark === void 0 ? void 0 : (_apiRef$current2$mark2 = _apiRef$current2$mark.sharedState.currentState()) === null || _apiRef$current2$mark2 === void 0 ? void 0 : _apiRef$current2$mark2.isMarkdownMode;
67
83
  if (isMarkdownMode) {
68
84
  return Promise.resolve([]);
69
85
  }
@@ -90,10 +106,12 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
90
106
  lozenge: item.lozenge
91
107
  }),
92
108
  isDisabledOffline: true,
109
+ // This legacy action intentionally mirrors executeExtensionQuickInsertItem,
110
+ // which serves the registered representation of the same item.
93
111
  action: (insert, state, source) => {
94
112
  if (typeof item.node === 'function') {
95
- var _apiRef$current2, _apiRef$current2$exte, _apiRef$current2$exte2;
96
- const extensionAPI = apiRef === null || apiRef === void 0 ? void 0 : (_apiRef$current2 = apiRef.current) === null || _apiRef$current2 === void 0 ? void 0 : (_apiRef$current2$exte = _apiRef$current2.extension) === null || _apiRef$current2$exte === void 0 ? void 0 : (_apiRef$current2$exte2 = _apiRef$current2$exte.actions) === null || _apiRef$current2$exte2 === void 0 ? void 0 : _apiRef$current2$exte2.api();
113
+ var _apiRef$current3, _apiRef$current3$exte, _apiRef$current3$exte2;
114
+ const extensionAPI = apiRef === null || apiRef === void 0 ? void 0 : (_apiRef$current3 = apiRef.current) === null || _apiRef$current3 === void 0 ? void 0 : (_apiRef$current3$exte = _apiRef$current3.extension) === null || _apiRef$current3$exte === void 0 ? void 0 : (_apiRef$current3$exte2 = _apiRef$current3$exte.actions) === null || _apiRef$current3$exte2 === void 0 ? void 0 : _apiRef$current3$exte2.api();
97
115
  // While this should only run when the extension some setups of editor
98
116
  // may not have the extension API
99
117
  if (extensionAPI) {
@@ -106,8 +124,7 @@ export async function extensionProviderToQuickInsertProvider(extensionProvider,
106
124
  } else {
107
125
  // Originally it was understood we could only use this if we were using the extension plugin
108
126
  // However there are some edge cases where this is not true (ie. in jira)
109
- // Since making it optional now would be a breaking change - instead we can just pass a dummy
110
- // extension API to consumers that warns them of using the methods.
127
+ // Since making it optional now would be a breaking change - instead we can just pass a dummy extension API to consumers that warns them of using the methods.
111
128
  resolveImport(item.node(dummyExtensionAPI)).then(node => {
112
129
  sendExtensionQuickInsertAnalytics(item, state.selection, createAnalyticsEvent, source);
113
130
  if (node) {
@@ -1,3 +1,3 @@
1
1
  export const name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export const version = "223.0.5";
3
+ export const version = "223.0.7";
@@ -469,7 +469,7 @@ export function ReactEditorView(props) {
469
469
  // (purpose 2). When NOT rebuilding, run both — even under the
470
470
  // `cc-markdown-mode` experiment, otherwise no-op preset identity
471
471
  // changes would silently leave a broken plugin/schema mismatch.
472
- if (presetChanged && fg('platform_editor_reconfigure_filter_plugins')) {
472
+ if (presetChanged) {
473
473
  var dropped = [];
474
474
  if (!shouldRebuildSchema) {
475
475
  var _result = filterPluginsForReconfigure(editorPlugins, viewRef.current.state.schema, previousPluginNames);
@@ -39,6 +39,7 @@ import { undoRedoPlugin } from '@atlaskit/editor-plugins/undo-redo';
39
39
  import { unsupportedContentPlugin } from '@atlaskit/editor-plugins/unsupported-content';
40
40
  import { userIntentPlugin } from '@atlaskit/editor-plugins/user-intent';
41
41
  import { widthPlugin } from '@atlaskit/editor-plugins/width';
42
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
42
43
  import { fg } from '@atlaskit/platform-feature-flags';
43
44
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
44
45
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -70,7 +71,7 @@ export function createDefaultPreset(options) {
70
71
  contextIdentifierProvider: options.contextIdentifierProvider
71
72
  }]).add([basePlugin, options.base]).add(decorationsPlugin).add([typeAheadPlugin, options.typeAhead]).maybeAdd(historyPlugin, Boolean(options.allowUndoRedoButtons)).add(userIntentPlugin).maybeAdd([toolbarPlugin, options.toolbar || {}], Boolean((_options$toolbar = options.toolbar) === null || _options$toolbar === void 0 ? void 0 : _options$toolbar.enableNewToolbarExperience)).add([primaryToolbarPlugin, {
72
73
  contextualFormattingEnabled: isFullPage
73
- }]).maybeAdd(uiControlRegistryPlugin, expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_paste_actions_menu', 'isEnabled', true)).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).maybeAdd([blockMenuPlugin, {
74
+ }]).maybeAdd(uiControlRegistryPlugin, expValEqualsNoExposure('platform_editor_table_menu_updates', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_paste_actions_menu', 'isEnabled', true) || isExperimentEnabled('platform_editor_slash_command')).maybeAdd(undoRedoPlugin, Boolean((_options$featureFlags = (_options$featureFlags2 = options.featureFlags) === null || _options$featureFlags2 === void 0 ? void 0 : _options$featureFlags2.undoRedoButtons) !== null && _options$featureFlags !== void 0 ? _options$featureFlags : options.allowUndoRedoButtons)).maybeAdd([blockMenuPlugin, {
74
75
  useStandardNodeWidth: (_options$blockMenu$us = (_options$blockMenu = options.blockMenu) === null || _options$blockMenu === void 0 ? void 0 : _options$blockMenu.useStandardNodeWidth) !== null && _options$blockMenu$us !== void 0 ? _options$blockMenu$us : false,
75
76
  blockLinkHashPrefix: (_options$blockMenu2 = options.blockMenu) === null || _options$blockMenu2 === void 0 ? void 0 : _options$blockMenu2.blockLinkHashPrefix,
76
77
  getLinkPath: (_options$blockMenu3 = options.blockMenu) === null || _options$blockMenu3 === void 0 ? void 0 : _options$blockMenu3.getLinkPath
@@ -420,7 +420,7 @@ export var EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef(functi
420
420
  }) && 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, 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 */
421
421
  editorContentStyles.telepointerColorAndCommonStyle, colorMode === 'dark' && editorContentStyles.telepointerColorAndCommonStyleDarkMode, expValEqualsNoExposure('platform_editor_agent_be_streaming', 'isEnabled', true) && editorContentStyles.agentShimmerStyles, editorContentStyles.gapCursorStyles, editorExperiment('platform_synced_block', true) && 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, 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') ? 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, (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) &&
422
422
  // Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
423
- !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockTextSelectionStyles, isSyncBlockActivationEnabled && editorExperiment('platform_synced_block', true) && 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, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutBaseStylesNestedDndExcludingBodiedSync, !editorExperiment('platform_synced_block', true) && editorContentStyles.layoutBaseStylesNestedDnd, editorContentStyles.layoutColumnMartinTopFixes, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed, 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) && isExperimentEnabled('platform_editor_lovability_resize_extensions') && editorContentStyles.pragmaticResizerStylesExtensions, 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, 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) && fg('platform_editor_table_q4_patch_1') && 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) && fg('platform_editor_table_nested_renderer_fix') && 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]),
423
+ !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockTextSelectionStyles, isSyncBlockActivationEnabled && editorExperiment('platform_synced_block', true) && 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, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutBaseStylesNestedDndExcludingBodiedSync, !editorExperiment('platform_synced_block', true) && editorContentStyles.layoutBaseStylesNestedDnd, editorContentStyles.layoutColumnMartinTopFixes, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed, 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) && isExperimentEnabled('platform_editor_lovability_resize_extensions') && editorContentStyles.pragmaticResizerStylesExtensions, 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, 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) && fg('platform_editor_table_nested_renderer_fix') && 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]),
424
424
  ref: ref,
425
425
  "data-editor-scroll-container": isScrollable ? 'true' : undefined,
426
426
  "data-testid": "editor-content-container"
@@ -535,7 +535,7 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
535
535
  tableEmptyRowStyles,
536
536
  // SSR-safe rounded corners (see tableRoundedCornerStyles). Gated to match the table plugin
537
537
  // migration that drops roundedTableCellCornerStyles() from the client-only <Global> styles.
538
- expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && fg('platform_editor_table_q4_patch_1') &&
538
+ expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) &&
539
539
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
540
540
  tableRoundedCornerStyles,
541
541
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -0,0 +1,78 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import React from 'react';
4
+ import AppsIcon from '@atlaskit/icon/core/apps';
5
+ var lazyExtensionIconCache = new WeakMap();
6
+ var resolveExtensionIcon = /*#__PURE__*/function () {
7
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(getIcon) {
8
+ var maybeIcon, _default, _t;
9
+ return _regeneratorRuntime.wrap(function (_context) {
10
+ while (1) switch (_context.prev = _context.next) {
11
+ case 0:
12
+ _context.prev = 0;
13
+ _context.next = 1;
14
+ return getIcon === null || getIcon === void 0 ? void 0 : getIcon();
15
+ case 1:
16
+ maybeIcon = _context.sent;
17
+ if (maybeIcon) {
18
+ _context.next = 2;
19
+ break;
20
+ }
21
+ return _context.abrupt("return", AppsIcon);
22
+ case 2:
23
+ if (!Object.prototype.hasOwnProperty.call(maybeIcon, 'default')) {
24
+ _context.next = 3;
25
+ break;
26
+ }
27
+ return _context.abrupt("return", (_default = maybeIcon.default) !== null && _default !== void 0 ? _default : AppsIcon);
28
+ case 3:
29
+ return _context.abrupt("return", maybeIcon);
30
+ case 4:
31
+ _context.prev = 4;
32
+ _t = _context["catch"](0);
33
+ return _context.abrupt("return", AppsIcon);
34
+ case 5:
35
+ case "end":
36
+ return _context.stop();
37
+ }
38
+ }, _callee, null, [[0, 4]]);
39
+ }));
40
+ return function resolveExtensionIcon(_x) {
41
+ return _ref.apply(this, arguments);
42
+ };
43
+ }();
44
+ var createLazyExtensionIcon = function createLazyExtensionIcon(getIcon) {
45
+ var cachedIcon = lazyExtensionIconCache.get(getIcon);
46
+ if (cachedIcon) {
47
+ return cachedIcon;
48
+ }
49
+ var LazyIcon = /*#__PURE__*/React.lazy(function () {
50
+ return resolveExtensionIcon(getIcon).then(function (Icon) {
51
+ return {
52
+ default: Icon
53
+ };
54
+ });
55
+ });
56
+ LazyIcon.displayName = 'lazy(ExtensionIcon)';
57
+ var Icon = function Icon(props) {
58
+ return /*#__PURE__*/React.createElement(React.Suspense, {
59
+ fallback: /*#__PURE__*/React.createElement(AppsIcon, {
60
+ label: props.label
61
+ })
62
+ }, /*#__PURE__*/React.createElement(LazyIcon, {
63
+ label: props.label
64
+ }));
65
+ };
66
+ lazyExtensionIconCache.set(getIcon, Icon);
67
+ return Icon;
68
+ };
69
+ export var ExtensionQuickInsertIcon = function ExtensionQuickInsertIcon(_ref2) {
70
+ var getIcon = _ref2.getIcon,
71
+ label = _ref2.label;
72
+ var Icon = React.useMemo(function () {
73
+ return getIcon ? createLazyExtensionIcon(getIcon) : AppsIcon;
74
+ }, [getIcon]);
75
+ return /*#__PURE__*/React.createElement(Icon, {
76
+ label: label
77
+ });
78
+ };
@@ -0,0 +1,39 @@
1
+ import React, { useCallback } from 'react';
2
+ import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
3
+ import { useQuickInsertContext } from '@atlaskit/editor-common/quick-insert/use-quick-insert-context';
4
+ import { executeExtensionQuickInsertItem } from './executeExtensionQuickInsertItem';
5
+ import { ExtensionQuickInsertIcon } from './ExtensionQuickInsertIcon';
6
+ export var ExtensionQuickInsertMenuItem = function ExtensionQuickInsertMenuItem(_ref) {
7
+ var apiRef = _ref.apiRef,
8
+ createAnalyticsEvent = _ref.createAnalyticsEvent,
9
+ item = _ref.item,
10
+ onInsert = _ref.onInsert;
11
+ var _useQuickInsertContex = useQuickInsertContext(),
12
+ editorView = _useQuickInsertContex.editorView,
13
+ isOffline = _useQuickInsertContex.isOffline;
14
+ var onSelect = useCallback(function (_ref2) {
15
+ var insert = _ref2.insert,
16
+ source = _ref2.source;
17
+ var result = executeExtensionQuickInsertItem({
18
+ apiRef: apiRef,
19
+ createAnalyticsEvent: createAnalyticsEvent,
20
+ insert: insert,
21
+ item: item,
22
+ source: source,
23
+ state: editorView.state
24
+ });
25
+ if (result) {
26
+ onInsert === null || onInsert === void 0 || onInsert();
27
+ }
28
+ return result;
29
+ }, [apiRef, createAnalyticsEvent, editorView.state, item, onInsert]);
30
+ return /*#__PURE__*/React.createElement(QuickInsertMenuItem, {
31
+ iconBefore: /*#__PURE__*/React.createElement(ExtensionQuickInsertIcon, {
32
+ getIcon: item.icon,
33
+ label: ""
34
+ }),
35
+ isDisabled: isOffline,
36
+ onSelect: onSelect,
37
+ title: item.title
38
+ });
39
+ };