@atlaskit/editor-core 181.0.0 → 182.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/codemods/140.0.0-rc-kraken-fix-type-errors.ts +0 -2
- package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +0 -17
- package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +0 -4
- package/dist/cjs/create-editor/create-plugins-list.js +7 -2
- package/dist/cjs/create-editor/feature-flags-from-props.js +31 -26
- package/dist/cjs/create-editor/sort-by-order.js +12 -0
- package/dist/cjs/editor-next/editor-migration-component.js +4 -1
- package/dist/cjs/editor-next/utils/deprecationWarnings.js +0 -5
- package/dist/cjs/labs/next/full-page.js +2 -1
- package/dist/cjs/labs/next/presets/default.js +2 -1
- package/dist/cjs/labs/next/presets/universal.js +7 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +2 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +4 -7
- package/dist/cjs/plugins/analytics/plugin.js +6 -6
- package/dist/cjs/plugins/avatar-group/index.js +5 -2
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -2
- package/dist/cjs/plugins/base/index.js +4 -2
- package/dist/cjs/plugins/base/pm-plugins/disable-spell-checking.js +1 -3
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -6
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +2 -8
- package/dist/cjs/plugins/border/index.js +20 -0
- package/dist/cjs/plugins/card/index.js +4 -2
- package/dist/cjs/plugins/card/toolbar.js +12 -15
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +7 -3
- package/dist/cjs/plugins/code-block/toolbar.js +1 -1
- package/dist/cjs/plugins/collab-edit/analytics.js +2 -3
- package/dist/cjs/plugins/collab-edit/events/handlers.js +2 -2
- package/dist/cjs/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/cjs/plugins/collab-edit/index.js +5 -3
- package/dist/cjs/plugins/collab-edit/plugin.js +4 -3
- package/dist/cjs/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +2 -3
- package/dist/cjs/plugins/date/index.js +90 -64
- package/dist/cjs/plugins/editor-disabled/index.js +8 -0
- package/dist/cjs/plugins/expand/index.js +4 -1
- package/dist/cjs/plugins/expand/nodeviews/index.js +6 -7
- package/dist/cjs/plugins/expand/pm-plugins/main.js +5 -2
- package/dist/cjs/plugins/extension/extension-api.js +27 -14
- package/dist/cjs/plugins/extension/pm-plugins/main.js +117 -177
- package/dist/cjs/plugins/extension/pm-plugins/utils.js +80 -0
- package/dist/cjs/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +7 -11
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +3 -4
- package/dist/cjs/plugins/find-replace/index.js +5 -2
- package/dist/cjs/plugins/floating-toolbar/index.js +15 -7
- package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +2 -1
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +13 -3
- package/dist/cjs/plugins/floating-toolbar/ui/SimpleModal.js +2 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +6 -5
- package/dist/cjs/plugins/hyperlink/Toolbar.js +9 -12
- package/dist/cjs/plugins/hyperlink/index.js +6 -2
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -4
- package/dist/cjs/plugins/index.js +7 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
- package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +5 -5
- package/dist/cjs/plugins/list/commands/index.js +31 -27
- package/dist/cjs/plugins/list/commands/outdent-list.js +2 -3
- package/dist/cjs/plugins/list/index.js +4 -3
- package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +3 -1
- package/dist/cjs/plugins/list/pm-plugins/input-rules/index.js +2 -1
- package/dist/cjs/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +58 -0
- package/dist/cjs/plugins/list/pm-plugins/keymap.js +4 -4
- package/dist/cjs/plugins/list/pm-plugins/main.js +23 -21
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -1
- package/dist/cjs/plugins/media/nodeviews/styles.js +13 -1
- package/dist/cjs/plugins/media/toolbar/commands.js +105 -2
- package/dist/cjs/plugins/media/toolbar/imageBorder.js +20 -0
- package/dist/cjs/plugins/media/toolbar/index.js +33 -4
- package/dist/cjs/plugins/media/ui/ImageBorder/index.js +219 -0
- package/dist/cjs/plugins/media/ui/ImageBorder/messages.js +50 -0
- package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +54 -0
- package/dist/cjs/plugins/media/utils/current-media-node.js +28 -5
- package/dist/cjs/plugins/paste/util/index.js +2 -0
- package/dist/cjs/plugins/rank.js +1 -1
- package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +5 -0
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +2 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/index.js +3 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +2 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/index.js +6 -3
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +3 -2
- package/dist/cjs/plugins/type-ahead/index.js +4 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +4 -2
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/cjs/plugins/type-ahead/utils.js +22 -2
- package/dist/cjs/test-utils.js +3 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +4 -2
- package/dist/cjs/ui/styles.js +1 -1
- package/dist/cjs/utils/input-rules.js +0 -17
- package/dist/cjs/utils/insert.js +53 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +7 -2
- package/dist/es2019/create-editor/feature-flags-from-props.js +31 -26
- package/dist/es2019/create-editor/sort-by-order.js +11 -0
- package/dist/es2019/editor-next/editor-migration-component.js +4 -1
- package/dist/es2019/editor-next/utils/deprecationWarnings.js +0 -5
- package/dist/es2019/labs/next/full-page.js +2 -1
- package/dist/es2019/labs/next/presets/default.js +2 -1
- package/dist/es2019/labs/next/presets/universal.js +8 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +3 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +0 -8
- package/dist/es2019/plugins/analytics/plugin.js +45 -43
- package/dist/es2019/plugins/avatar-group/index.js +26 -21
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -2
- package/dist/es2019/plugins/base/index.js +101 -97
- package/dist/es2019/plugins/base/pm-plugins/disable-spell-checking.js +1 -3
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -6
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +2 -7
- package/dist/es2019/plugins/border/index.js +11 -0
- package/dist/es2019/plugins/card/index.js +4 -2
- package/dist/es2019/plugins/card/toolbar.js +10 -11
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +7 -3
- package/dist/es2019/plugins/code-block/toolbar.js +2 -2
- package/dist/es2019/plugins/collab-edit/analytics.js +2 -3
- package/dist/es2019/plugins/collab-edit/events/handlers.js +2 -2
- package/dist/es2019/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/es2019/plugins/collab-edit/index.js +5 -3
- package/dist/es2019/plugins/collab-edit/plugin.js +4 -3
- package/dist/es2019/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +2 -3
- package/dist/es2019/plugins/date/index.js +92 -64
- package/dist/es2019/plugins/editor-disabled/index.js +8 -0
- package/dist/es2019/plugins/expand/index.js +57 -53
- package/dist/es2019/plugins/expand/nodeviews/index.js +6 -9
- package/dist/es2019/plugins/expand/pm-plugins/main.js +5 -3
- package/dist/es2019/plugins/extension/extension-api.js +31 -13
- package/dist/es2019/plugins/extension/pm-plugins/main.js +77 -96
- package/dist/es2019/plugins/extension/pm-plugins/utils.js +30 -0
- package/dist/es2019/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +1 -8
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +3 -3
- package/dist/es2019/plugins/find-replace/index.js +5 -2
- package/dist/es2019/plugins/floating-toolbar/index.js +159 -149
- package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +4 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +13 -3
- package/dist/es2019/plugins/floating-toolbar/ui/SimpleModal.js +4 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +6 -5
- package/dist/es2019/plugins/hyperlink/Toolbar.js +7 -9
- package/dist/es2019/plugins/hyperlink/index.js +66 -62
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -3
- package/dist/es2019/plugins/index.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
- package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +5 -5
- package/dist/es2019/plugins/list/commands/index.js +4 -4
- package/dist/es2019/plugins/list/commands/outdent-list.js +2 -4
- package/dist/es2019/plugins/list/index.js +80 -77
- package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +3 -1
- package/dist/es2019/plugins/list/pm-plugins/input-rules/index.js +2 -1
- package/dist/es2019/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +52 -0
- package/dist/es2019/plugins/list/pm-plugins/keymap.js +4 -4
- package/dist/es2019/plugins/list/pm-plugins/main.js +46 -46
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +4 -1
- package/dist/es2019/plugins/media/nodeviews/styles.js +12 -1
- package/dist/es2019/plugins/media/toolbar/commands.js +93 -0
- package/dist/es2019/plugins/media/toolbar/imageBorder.js +15 -0
- package/dist/es2019/plugins/media/toolbar/index.js +36 -5
- package/dist/es2019/plugins/media/ui/ImageBorder/index.js +206 -0
- package/dist/es2019/plugins/media/ui/ImageBorder/messages.js +43 -0
- package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +124 -0
- package/dist/es2019/plugins/media/utils/current-media-node.js +22 -3
- package/dist/es2019/plugins/paste/util/index.js +2 -0
- package/dist/es2019/plugins/rank.js +1 -1
- package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +7 -0
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +2 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/index.js +59 -55
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +2 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/index.js +6 -3
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +3 -2
- package/dist/es2019/plugins/type-ahead/index.js +4 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +4 -2
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/es2019/plugins/type-ahead/utils.js +22 -2
- package/dist/es2019/test-utils.js +3 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +4 -2
- package/dist/es2019/ui/styles.js +1 -0
- package/dist/es2019/utils/input-rules.js +0 -17
- package/dist/es2019/utils/insert.js +61 -10
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +7 -2
- package/dist/esm/create-editor/feature-flags-from-props.js +31 -26
- package/dist/esm/create-editor/sort-by-order.js +11 -0
- package/dist/esm/editor-next/editor-migration-component.js +3 -0
- package/dist/esm/editor-next/utils/deprecationWarnings.js +0 -5
- package/dist/esm/labs/next/full-page.js +2 -1
- package/dist/esm/labs/next/presets/default.js +2 -1
- package/dist/esm/labs/next/presets/universal.js +8 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +3 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +3 -5
- package/dist/esm/plugins/analytics/plugin.js +6 -6
- package/dist/esm/plugins/avatar-group/index.js +5 -2
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +4 -2
- package/dist/esm/plugins/base/index.js +4 -2
- package/dist/esm/plugins/base/pm-plugins/disable-spell-checking.js +1 -3
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -6
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +2 -8
- package/dist/esm/plugins/border/index.js +13 -0
- package/dist/esm/plugins/card/index.js +4 -2
- package/dist/esm/plugins/card/toolbar.js +12 -15
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +7 -3
- package/dist/esm/plugins/code-block/toolbar.js +2 -2
- package/dist/esm/plugins/collab-edit/analytics.js +2 -3
- package/dist/esm/plugins/collab-edit/events/handlers.js +2 -2
- package/dist/esm/plugins/collab-edit/events/initialize.js +3 -2
- package/dist/esm/plugins/collab-edit/index.js +5 -3
- package/dist/esm/plugins/collab-edit/plugin.js +4 -3
- package/dist/esm/plugins/collab-edit/ui/avatars-with-plugin-state.js +5 -3
- package/dist/esm/plugins/collab-edit/ui/avatars.js +2 -3
- package/dist/esm/plugins/date/index.js +90 -64
- package/dist/esm/plugins/editor-disabled/index.js +8 -0
- package/dist/esm/plugins/expand/index.js +4 -1
- package/dist/esm/plugins/expand/nodeviews/index.js +6 -7
- package/dist/esm/plugins/expand/pm-plugins/main.js +5 -2
- package/dist/esm/plugins/extension/extension-api.js +24 -12
- package/dist/esm/plugins/extension/pm-plugins/main.js +113 -173
- package/dist/esm/plugins/extension/pm-plugins/utils.js +72 -0
- package/dist/esm/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +1 -10
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +3 -4
- package/dist/esm/plugins/find-replace/index.js +5 -2
- package/dist/esm/plugins/floating-toolbar/index.js +15 -7
- package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +13 -3
- package/dist/esm/plugins/floating-toolbar/ui/SimpleModal.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +6 -5
- package/dist/esm/plugins/hyperlink/Toolbar.js +9 -13
- package/dist/esm/plugins/hyperlink/index.js +6 -2
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -4
- package/dist/esm/plugins/index.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -1
- package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +5 -5
- package/dist/esm/plugins/list/commands/index.js +31 -27
- package/dist/esm/plugins/list/commands/outdent-list.js +2 -3
- package/dist/esm/plugins/list/index.js +4 -3
- package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +3 -1
- package/dist/esm/plugins/list/pm-plugins/input-rules/index.js +2 -1
- package/dist/esm/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +51 -0
- package/dist/esm/plugins/list/pm-plugins/keymap.js +4 -4
- package/dist/esm/plugins/list/pm-plugins/main.js +23 -21
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +6 -1
- package/dist/esm/plugins/media/nodeviews/styles.js +13 -1
- package/dist/esm/plugins/media/toolbar/commands.js +99 -0
- package/dist/esm/plugins/media/toolbar/imageBorder.js +14 -0
- package/dist/esm/plugins/media/toolbar/index.js +34 -5
- package/dist/esm/plugins/media/ui/ImageBorder/index.js +211 -0
- package/dist/esm/plugins/media/ui/ImageBorder/messages.js +43 -0
- package/dist/esm/plugins/media/ui/ImageBorder/styles.js +37 -0
- package/dist/esm/plugins/media/utils/current-media-node.js +24 -3
- package/dist/esm/plugins/paste/util/index.js +2 -0
- package/dist/esm/plugins/rank.js +1 -1
- package/dist/esm/plugins/rule/pm-plugins/input-rule.js +5 -0
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +2 -1
- package/dist/esm/plugins/toolbar-lists-indentation/index.js +3 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +2 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/index.js +6 -3
- package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +3 -2
- package/dist/esm/plugins/type-ahead/index.js +4 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +4 -2
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +4 -2
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +41 -4
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +2 -0
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +9 -5
- package/dist/esm/plugins/type-ahead/utils.js +22 -2
- package/dist/esm/test-utils.js +3 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +4 -2
- package/dist/esm/ui/styles.js +1 -1
- package/dist/esm/utils/input-rules.js +0 -17
- package/dist/esm/utils/insert.js +56 -10
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/sort-by-order.d.ts +9 -0
- package/dist/types/editor-next/editor-migration-component.d.ts +1 -0
- package/dist/types/labs/next/presets/cxhtml.d.ts +36 -2
- package/dist/types/labs/next/presets/default.d.ts +72 -4
- package/dist/types/labs/next/presets/mobile.d.ts +36 -2
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/styles.d.ts +0 -1
- package/dist/types/plugins/analytics/plugin.d.ts +2 -0
- package/dist/types/plugins/avatar-group/index.d.ts +2 -0
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +2 -0
- package/dist/types/plugins/base/index.d.ts +2 -0
- package/dist/types/plugins/base/pm-plugins/disable-spell-checking.d.ts +2 -1
- package/dist/types/plugins/border/index.d.ts +3 -0
- package/dist/types/plugins/card/index.d.ts +2 -0
- package/dist/types/plugins/card/toolbar.d.ts +2 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +5 -2
- package/dist/types/plugins/collab-edit/analytics.d.ts +2 -1
- package/dist/types/plugins/collab-edit/events/handlers.d.ts +2 -1
- package/dist/types/plugins/collab-edit/events/initialize.d.ts +3 -1
- package/dist/types/plugins/collab-edit/index.d.ts +2 -0
- package/dist/types/plugins/collab-edit/plugin.d.ts +2 -1
- package/dist/types/plugins/collab-edit/ui/avatars-with-plugin-state.d.ts +4 -0
- package/dist/types/plugins/collab-edit/ui/avatars.d.ts +2 -0
- package/dist/types/plugins/date/index.d.ts +9 -1
- package/dist/types/plugins/editor-disabled/index.d.ts +3 -1
- package/dist/types/plugins/expand/index.d.ts +2 -0
- package/dist/types/plugins/expand/nodeviews/index.d.ts +5 -2
- package/dist/types/plugins/expand/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +8 -2
- package/dist/types/plugins/extension/pm-plugins/utils.d.ts +3 -0
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -7
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +2 -0
- package/dist/types/plugins/find-replace/index.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/index.d.ts +4 -1
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +2 -0
- package/dist/types/plugins/hyperlink/Toolbar.d.ts +2 -1
- package/dist/types/plugins/hyperlink/index.d.ts +2 -0
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +2 -0
- package/dist/types/plugins/index.d.ts +1 -0
- package/dist/types/plugins/list/actions/outdent-list-items-selected.d.ts +2 -1
- package/dist/types/plugins/list/commands/index.d.ts +3 -2
- package/dist/types/plugins/list/commands/outdent-list.d.ts +2 -1
- package/dist/types/plugins/list/index.d.ts +2 -0
- package/dist/types/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +1 -1
- package/dist/types/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +13 -0
- package/dist/types/plugins/list/pm-plugins/keymap.d.ts +2 -1
- package/dist/types/plugins/list/pm-plugins/main.d.ts +3 -2
- package/dist/types/plugins/media/nodeviews/styles.d.ts +3 -1
- package/dist/types/plugins/media/toolbar/commands.d.ts +5 -0
- package/dist/types/plugins/media/toolbar/imageBorder.d.ts +2 -0
- package/dist/types/plugins/media/types.d.ts +3 -0
- package/dist/types/plugins/media/ui/ImageBorder/index.d.ts +13 -0
- package/dist/types/plugins/media/ui/ImageBorder/messages.d.ts +42 -0
- package/dist/types/plugins/media/ui/ImageBorder/styles.d.ts +15 -0
- package/dist/types/plugins/media/utils/current-media-node.d.ts +6 -0
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +0 -2
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +2 -0
- package/dist/types/plugins/toolbar-lists-indentation/types.d.ts +2 -0
- package/dist/types/plugins/toolbar-lists-indentation/ui/index.d.ts +2 -0
- package/dist/types/plugins/toolbar-lists-indentation/ui/onItemActivated.d.ts +3 -1
- package/dist/types/plugins/type-ahead/index.d.ts +1 -0
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +2 -1
- package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +2 -1
- package/dist/types/test-utils.d.ts +4 -2
- package/dist/types/types/editor-props.d.ts +5 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +5 -5
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +13 -12
- package/report.api.md +12 -4
- package/codemods/__tests__/rename-experimental-text-color-prop.ts +0 -204
- package/codemods/migrates/rename-experimental-text-color-prop.ts +0 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { validator } from '@atlaskit/adf-utils/validator';
|
|
2
2
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
3
3
|
import { Fragment, Mark } from 'prosemirror-model';
|
|
4
|
-
import { NodeSelection } from 'prosemirror-state';
|
|
4
|
+
import { NodeSelection, Selection } from 'prosemirror-state';
|
|
5
5
|
import { insertMacroFromMacroBrowser } from '../macro';
|
|
6
6
|
import { pluginKey as macroPluginKey } from '../macro/plugin-key';
|
|
7
|
+
import { nodeToJSON } from '../../utils';
|
|
7
8
|
import { setEditingContextToContextPanel } from './commands';
|
|
8
|
-
import { findNodePosWithLocalId, getSelectedExtension } from './utils';
|
|
9
|
+
import { findNodePosWithLocalId, getDataConsumerMark, getNodeTypesReferenced, getSelectedExtension } from './utils';
|
|
9
10
|
import { addAnalytics, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '../analytics';
|
|
10
|
-
import { getNodeTypesReferenced, getDataConsumerMark } from './utils';
|
|
11
11
|
import { setTextSelection } from 'prosemirror-utils';
|
|
12
12
|
export const getEditInLegacyMacroBrowser = ({
|
|
13
13
|
view,
|
|
@@ -37,7 +37,18 @@ const extensionAPICallPayload = functionName => ({
|
|
|
37
37
|
eventType: EVENT_TYPE.TRACK
|
|
38
38
|
});
|
|
39
39
|
export const createExtensionAPI = options => {
|
|
40
|
-
const
|
|
40
|
+
const {
|
|
41
|
+
editorView: {
|
|
42
|
+
state: {
|
|
43
|
+
schema
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
} = options;
|
|
47
|
+
const nodes = Object.keys(schema.nodes);
|
|
48
|
+
const marks = Object.keys(schema.marks);
|
|
49
|
+
const validate = validator(nodes, marks, {
|
|
50
|
+
allowPrivateAttributes: true
|
|
51
|
+
});
|
|
41
52
|
|
|
42
53
|
/**
|
|
43
54
|
* Finds the node and its position by `localId`. Throws if the node could not be found.
|
|
@@ -189,20 +200,20 @@ export const createExtensionAPI = options => {
|
|
|
189
200
|
schema
|
|
190
201
|
} = state;
|
|
191
202
|
const changedValues = mutationCallback({
|
|
203
|
+
content: nodeToJSON(node).content,
|
|
192
204
|
attrs: node.attrs,
|
|
193
205
|
marks: node.marks.map(pmMark => ({
|
|
194
206
|
type: pmMark.type.name,
|
|
195
207
|
attrs: pmMark.attrs
|
|
196
208
|
}))
|
|
197
209
|
});
|
|
198
|
-
const {
|
|
199
|
-
parent
|
|
200
|
-
} = state.doc.resolve(pos);
|
|
201
210
|
const ensureValidMark = mark => {
|
|
202
211
|
if (typeof mark !== 'object' || Array.isArray(mark)) {
|
|
203
212
|
throw new Error(`update(): Invalid mark given.`);
|
|
204
213
|
}
|
|
205
|
-
|
|
214
|
+
const {
|
|
215
|
+
parent
|
|
216
|
+
} = state.doc.resolve(pos);
|
|
206
217
|
// Ensure that the given mark is present in the schema
|
|
207
218
|
const markType = schema.marks[mark.type];
|
|
208
219
|
if (!markType) {
|
|
@@ -216,20 +227,27 @@ export const createExtensionAPI = options => {
|
|
|
216
227
|
attrs: mark.attrs
|
|
217
228
|
};
|
|
218
229
|
};
|
|
219
|
-
const newMarks = (_changedValues$marks = changedValues.marks) === null || _changedValues$marks === void 0 ? void 0 : _changedValues$marks.map(ensureValidMark).map(({
|
|
230
|
+
const newMarks = changedValues.hasOwnProperty('marks') ? (_changedValues$marks = changedValues.marks) === null || _changedValues$marks === void 0 ? void 0 : _changedValues$marks.map(ensureValidMark).map(({
|
|
220
231
|
mark,
|
|
221
232
|
attrs
|
|
222
|
-
}) => mark.create(attrs));
|
|
233
|
+
}) => mark.create(attrs)) : node.marks;
|
|
234
|
+
const newContent = changedValues.hasOwnProperty('content') ? Fragment.fromJSON(schema, changedValues.content) : node.content;
|
|
235
|
+
const newAttrs = changedValues.hasOwnProperty('attrs') ? changedValues.attrs : node.attrs;
|
|
223
236
|
|
|
224
|
-
// Validate if the new attributes and marks result in a valid node and adf.
|
|
237
|
+
// Validate if the new attributes, content and marks result in a valid node and adf.
|
|
225
238
|
try {
|
|
226
|
-
const newNode = node.type.createChecked(
|
|
239
|
+
const newNode = node.type.createChecked(newAttrs, newContent, newMarks);
|
|
227
240
|
const newNodeAdf = new JSONTransformer().encodeNode(newNode);
|
|
228
241
|
validate(newNodeAdf);
|
|
242
|
+
tr.replaceWith(pos, pos + node.nodeSize, newNode);
|
|
243
|
+
|
|
244
|
+
// Keep selection if content does not change
|
|
245
|
+
if (newContent === node.content) {
|
|
246
|
+
tr.setSelection(Selection.fromJSON(tr.doc, state.selection.toJSON()));
|
|
247
|
+
}
|
|
229
248
|
} catch (err) {
|
|
230
249
|
throw new Error(`update(): The given ADFEntity cannot be inserted in the current position.\n${err}`);
|
|
231
250
|
}
|
|
232
|
-
tr.setNodeMarkup(pos, undefined, changedValues.attrs, newMarks);
|
|
233
251
|
|
|
234
252
|
// Analytics - tracking the api call
|
|
235
253
|
const apiCallPayload = extensionAPICallPayload('update');
|
|
@@ -1,38 +1,11 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { getExtensionModuleNode } from '@atlaskit/editor-common/extensions';
|
|
3
2
|
import { createSelectionClickHandler } from '../../selection/utils';
|
|
4
3
|
import ExtensionNodeView from '../nodeviews/extension';
|
|
5
4
|
import { updateState, clearEditingContext } from '../commands';
|
|
6
5
|
import { getSelectedExtension, getSelectedDomElement } from '../utils';
|
|
7
6
|
import { createPluginState, getPluginState, createCommand } from '../plugin-factory';
|
|
8
7
|
import { pluginKey } from '../plugin-key';
|
|
9
|
-
|
|
10
|
-
const nodeWithPos = getSelectedExtension(view.state, true);
|
|
11
|
-
if (!nodeWithPos) {
|
|
12
|
-
throw new Error('There is no selection');
|
|
13
|
-
}
|
|
14
|
-
const {
|
|
15
|
-
extensionType,
|
|
16
|
-
extensionKey
|
|
17
|
-
} = nodeWithPos.node.attrs;
|
|
18
|
-
const extensionModuleNode = await getExtensionModuleNode(extensionProvider, extensionType, extensionKey);
|
|
19
|
-
const newNodeWithPos = getSelectedExtension(view.state, true);
|
|
20
|
-
if (newNodeWithPos && newNodeWithPos.node.attrs.extensionType === extensionType && newNodeWithPos.node.attrs.extensionKey === extensionKey && newNodeWithPos.pos === nodeWithPos.pos && extensionModuleNode) {
|
|
21
|
-
return extensionModuleNode.update;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
export const updateEditButton = async (view, extensionProvider) => {
|
|
25
|
-
try {
|
|
26
|
-
const updateMethod = await maybeGetUpdateMethodFromExtensionProvider(view, extensionProvider);
|
|
27
|
-
updateState({
|
|
28
|
-
showEditButton: !!updateMethod,
|
|
29
|
-
updateExtension: updateMethod && Promise.resolve(updateMethod) || undefined
|
|
30
|
-
})(view.state, view.dispatch);
|
|
31
|
-
return updateMethod;
|
|
32
|
-
} catch {
|
|
33
|
-
// this exception is not important for this case, fail silently
|
|
34
|
-
}
|
|
35
|
-
};
|
|
8
|
+
import { updateEditButton } from './utils';
|
|
36
9
|
const shouldShowEditButton = (extensionHandler, extensionProvider) => {
|
|
37
10
|
const usesLegacyMacroBrowser = !extensionHandler && !extensionProvider || typeof extensionHandler === 'function';
|
|
38
11
|
const usesModernUpdateMethod = typeof extensionHandler === 'object' && typeof extensionHandler.update === 'function';
|
|
@@ -83,6 +56,75 @@ export const createContextIdentifierProviderHandler = view => async (name, provi
|
|
|
83
56
|
}
|
|
84
57
|
}
|
|
85
58
|
};
|
|
59
|
+
export const handleUpdate = ({
|
|
60
|
+
view,
|
|
61
|
+
prevState,
|
|
62
|
+
domAtPos,
|
|
63
|
+
extensionHandlers
|
|
64
|
+
}) => {
|
|
65
|
+
const {
|
|
66
|
+
state,
|
|
67
|
+
dispatch
|
|
68
|
+
} = view;
|
|
69
|
+
const {
|
|
70
|
+
element,
|
|
71
|
+
localId,
|
|
72
|
+
extensionProvider,
|
|
73
|
+
showContextPanel,
|
|
74
|
+
showEditButton
|
|
75
|
+
} = getPluginState(state);
|
|
76
|
+
|
|
77
|
+
// This fetches the selected extension node, either by keyboard selection or click for all types of extensions
|
|
78
|
+
const selectedExtension = getSelectedExtension(state, true);
|
|
79
|
+
if (!selectedExtension) {
|
|
80
|
+
if (showContextPanel) {
|
|
81
|
+
clearEditingContext(state, dispatch);
|
|
82
|
+
}
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const {
|
|
86
|
+
node
|
|
87
|
+
} = selectedExtension;
|
|
88
|
+
const newElement = getSelectedDomElement(state.schema, domAtPos, selectedExtension);
|
|
89
|
+
|
|
90
|
+
// In some cases, showEditButton can be stale and the edit button doesn't show - @see ED-15285
|
|
91
|
+
// To be safe, we update the showEditButton state here
|
|
92
|
+
const shouldUpdateEditButton = !showEditButton && extensionProvider && element === newElement && !getSelectedExtension(prevState, true);
|
|
93
|
+
const isNewNodeSelected = node.attrs.localId ? localId !== node.attrs.localId :
|
|
94
|
+
// This is the current assumption and it's wrong but we are keeping it
|
|
95
|
+
// as fallback in case we need to turn off `allowLocalIdGeneration`
|
|
96
|
+
element !== newElement;
|
|
97
|
+
if (isNewNodeSelected || shouldUpdateEditButton) {
|
|
98
|
+
if (showContextPanel) {
|
|
99
|
+
clearEditingContext(state, dispatch);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const {
|
|
103
|
+
extensionType
|
|
104
|
+
} = node.attrs;
|
|
105
|
+
const extensionHandler = extensionHandlers[extensionType];
|
|
106
|
+
|
|
107
|
+
// showEditButton might change async based on results from extension providers
|
|
108
|
+
const showEditButton = shouldShowEditButton(extensionHandler, extensionProvider);
|
|
109
|
+
const updateExtension = getUpdateExtensionPromise(view, extensionHandler, extensionProvider).catch(() => {
|
|
110
|
+
// do nothing;
|
|
111
|
+
});
|
|
112
|
+
updateState({
|
|
113
|
+
localId: node.attrs.localId,
|
|
114
|
+
showContextPanel: false,
|
|
115
|
+
element: newElement,
|
|
116
|
+
showEditButton,
|
|
117
|
+
updateExtension
|
|
118
|
+
})(state, dispatch);
|
|
119
|
+
}
|
|
120
|
+
// New DOM element doesn't necessarily mean it's a new Node
|
|
121
|
+
else if (element !== newElement) {
|
|
122
|
+
updateState({
|
|
123
|
+
element: newElement
|
|
124
|
+
})(state, dispatch);
|
|
125
|
+
}
|
|
126
|
+
return true;
|
|
127
|
+
};
|
|
86
128
|
const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, useLongPressSelection = false, options = {}) => {
|
|
87
129
|
const state = createPluginState(dispatch, {
|
|
88
130
|
showEditButton: false,
|
|
@@ -100,74 +142,13 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
|
|
|
100
142
|
providerFactory.subscribe('extensionProvider', extensionProviderHandler);
|
|
101
143
|
providerFactory.subscribe('contextIdentificationProvider', contextIdentificationProviderHandler);
|
|
102
144
|
return {
|
|
103
|
-
update: view => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
localId,
|
|
111
|
-
extensionProvider,
|
|
112
|
-
showContextPanel
|
|
113
|
-
} = getPluginState(state);
|
|
114
|
-
|
|
115
|
-
// This fetches the selected extension node, either by keyboard selection or click for all types of extensions
|
|
116
|
-
const selectedExtension = getSelectedExtension(state, true);
|
|
117
|
-
if (!selectedExtension) {
|
|
118
|
-
if (showContextPanel) {
|
|
119
|
-
clearEditingContext(state, dispatch);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// if an extension is no longer selected, but the plugin has cached the previous selected extension id/ref
|
|
123
|
-
// then this should clear those values so that if an exention is selected again, then this sees it as a change
|
|
124
|
-
// and updates the state correctly.
|
|
125
|
-
if (!!localId || !!element) {
|
|
126
|
-
updateState({
|
|
127
|
-
localId: undefined,
|
|
128
|
-
element: undefined
|
|
129
|
-
})(state, dispatch);
|
|
130
|
-
}
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
const {
|
|
134
|
-
node
|
|
135
|
-
} = selectedExtension;
|
|
136
|
-
const newElement = getSelectedDomElement(state.schema, domAtPos, selectedExtension);
|
|
137
|
-
|
|
138
|
-
// New node is selection
|
|
139
|
-
if (node.attrs.localId ? localId !== node.attrs.localId :
|
|
140
|
-
// This is the current assumption and it's wrong but we are keeping it
|
|
141
|
-
// as fallback in case we need to turn off `allowLocalIdGeneration`
|
|
142
|
-
element !== newElement) {
|
|
143
|
-
if (showContextPanel) {
|
|
144
|
-
clearEditingContext(state, dispatch);
|
|
145
|
-
}
|
|
146
|
-
const {
|
|
147
|
-
extensionType
|
|
148
|
-
} = node.attrs;
|
|
149
|
-
const extensionHandler = extensionHandlers[extensionType];
|
|
150
|
-
|
|
151
|
-
// showEditButton might change async based on results from extension providers
|
|
152
|
-
const showEditButton = shouldShowEditButton(extensionHandler, extensionProvider);
|
|
153
|
-
const updateExtension = getUpdateExtensionPromise(view, extensionHandler, extensionProvider).catch(() => {
|
|
154
|
-
// do nothing;
|
|
155
|
-
});
|
|
156
|
-
updateState({
|
|
157
|
-
localId: node.attrs.localId,
|
|
158
|
-
showContextPanel: false,
|
|
159
|
-
element: newElement,
|
|
160
|
-
showEditButton,
|
|
161
|
-
updateExtension
|
|
162
|
-
})(state, dispatch);
|
|
163
|
-
}
|
|
164
|
-
// New DOM element doesn't necessarily mean it's a new Node
|
|
165
|
-
else if (element !== newElement) {
|
|
166
|
-
updateState({
|
|
167
|
-
element: newElement
|
|
168
|
-
})(state, dispatch);
|
|
169
|
-
}
|
|
170
|
-
return true;
|
|
145
|
+
update: (view, prevState) => {
|
|
146
|
+
handleUpdate({
|
|
147
|
+
view,
|
|
148
|
+
prevState,
|
|
149
|
+
domAtPos,
|
|
150
|
+
extensionHandlers
|
|
151
|
+
});
|
|
171
152
|
},
|
|
172
153
|
destroy: () => {
|
|
173
154
|
providerFactory.unsubscribe('extensionProvider', extensionProviderHandler);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getExtensionModuleNode } from '@atlaskit/editor-common/extensions';
|
|
2
|
+
import { updateState } from '../commands';
|
|
3
|
+
import { getSelectedExtension } from '../utils';
|
|
4
|
+
const maybeGetUpdateMethodFromExtensionProvider = async (view, extensionProvider) => {
|
|
5
|
+
const nodeWithPos = getSelectedExtension(view.state, true);
|
|
6
|
+
if (!nodeWithPos) {
|
|
7
|
+
throw new Error('There is no selection');
|
|
8
|
+
}
|
|
9
|
+
const {
|
|
10
|
+
extensionType,
|
|
11
|
+
extensionKey
|
|
12
|
+
} = nodeWithPos.node.attrs;
|
|
13
|
+
const extensionModuleNode = await getExtensionModuleNode(extensionProvider, extensionType, extensionKey);
|
|
14
|
+
const newNodeWithPos = getSelectedExtension(view.state, true);
|
|
15
|
+
if (newNodeWithPos && newNodeWithPos.node.attrs.extensionType === extensionType && newNodeWithPos.node.attrs.extensionKey === extensionKey && newNodeWithPos.pos === nodeWithPos.pos && extensionModuleNode) {
|
|
16
|
+
return extensionModuleNode.update;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export const updateEditButton = async (view, extensionProvider) => {
|
|
20
|
+
try {
|
|
21
|
+
const updateMethod = await maybeGetUpdateMethodFromExtensionProvider(view, extensionProvider);
|
|
22
|
+
updateState({
|
|
23
|
+
showEditButton: !!updateMethod,
|
|
24
|
+
updateExtension: updateMethod && Promise.resolve(updateMethod) || undefined
|
|
25
|
+
})(view.state, view.dispatch);
|
|
26
|
+
return updateMethod;
|
|
27
|
+
} catch {
|
|
28
|
+
// this exception is not important for this case, fail silently
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Transforms FeatureFlags to a type safe string array of the enabled feature flags.
|
|
3
|
-
*
|
|
4
|
-
* Useful for analytics and analysis purposes.
|
|
5
|
-
*/
|
|
6
|
-
export function getEnabledFeatureFlagKeys(featureFlags) {
|
|
7
|
-
return Object.keys(featureFlags).filter(key => featureFlags[key] === true);
|
|
8
|
-
}
|
|
1
|
+
export { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
@@ -5,7 +5,6 @@ import { cancelSearchWithAnalytics, replaceWithAnalytics, replaceAllWithAnalytic
|
|
|
5
5
|
import { blur, toggleMatchCase } from './commands';
|
|
6
6
|
import FindReplaceToolbarButton from './ui/FindReplaceToolbarButton';
|
|
7
7
|
import { TRIGGER_METHOD } from '../analytics';
|
|
8
|
-
import { getFeatureFlags } from '../feature-flags-context';
|
|
9
8
|
const FindReplaceToolbarButtonWithState = props => {
|
|
10
9
|
const {
|
|
11
10
|
popupsBoundariesElement,
|
|
@@ -14,7 +13,8 @@ const FindReplaceToolbarButtonWithState = props => {
|
|
|
14
13
|
isToolbarReducedSpacing,
|
|
15
14
|
editorView,
|
|
16
15
|
containerElement,
|
|
17
|
-
dispatchAnalyticsEvent
|
|
16
|
+
dispatchAnalyticsEvent,
|
|
17
|
+
featureFlags
|
|
18
18
|
} = props;
|
|
19
19
|
if (!editorView) {
|
|
20
20
|
return null;
|
|
@@ -94,7 +94,7 @@ const FindReplaceToolbarButtonWithState = props => {
|
|
|
94
94
|
};
|
|
95
95
|
const {
|
|
96
96
|
findReplaceMatchCase
|
|
97
|
-
} =
|
|
97
|
+
} = featureFlags;
|
|
98
98
|
return /*#__PURE__*/React.createElement(WithPluginState, {
|
|
99
99
|
debounce: false,
|
|
100
100
|
plugins: {
|
|
@@ -2,7 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { createPlugin } from './plugin';
|
|
3
3
|
import keymapPlugin from './keymap';
|
|
4
4
|
import FindReplaceToolbarButtonWithState from './FindReplaceToolbarButtonWithState';
|
|
5
|
-
export const findReplacePlugin = props => {
|
|
5
|
+
export const findReplacePlugin = (props, api) => {
|
|
6
|
+
var _api$dependencies, _api$dependencies$fea;
|
|
7
|
+
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
|
|
6
8
|
return {
|
|
7
9
|
name: 'findReplace',
|
|
8
10
|
pmPlugins() {
|
|
@@ -36,7 +38,8 @@ export const findReplacePlugin = props => {
|
|
|
36
38
|
editorView: editorView,
|
|
37
39
|
containerElement: containerElement,
|
|
38
40
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
39
|
-
takeFullWidth: props.takeFullWidth
|
|
41
|
+
takeFullWidth: props.takeFullWidth,
|
|
42
|
+
featureFlags: featureFlags
|
|
40
43
|
});
|
|
41
44
|
}
|
|
42
45
|
}
|