@atlaskit/editor-core 166.0.4 → 167.0.2
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/.eslintrc.js +46 -1
- package/CHANGELOG.md +99 -0
- package/dist/cjs/actions/index.js +26 -2
- package/dist/cjs/create-editor/ReactEditorView.js +2 -0
- package/dist/cjs/create-editor/create-plugins-list.js +1 -2
- package/dist/cjs/editor.js +5 -2
- package/dist/cjs/keymaps/index.js +5 -1
- package/dist/cjs/labs/next/ContentComponents.js +8 -4
- package/dist/cjs/labs/next/full-page.js +14 -8
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +7 -3
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +3 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +3 -1
- package/dist/cjs/plugins/analytics/types/enums.js +3 -0
- package/dist/cjs/plugins/base/index.js +8 -17
- package/dist/cjs/plugins/base/pm-plugins/better-type-history.js +3 -12
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +71 -16
- package/dist/cjs/plugins/block-type/commands/block-type.js +32 -22
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +4 -2
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -11
- package/dist/cjs/plugins/card/styles.js +1 -1
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/cjs/plugins/code-block/actions.js +36 -2
- package/dist/cjs/plugins/code-block/nodeviews/code-block.js +70 -1
- package/dist/cjs/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/cjs/plugins/code-block/pm-plugins/main.js +46 -8
- package/dist/cjs/plugins/code-block/styles.js +28 -24
- package/dist/cjs/plugins/collab-edit/styles.js +4 -2
- package/dist/cjs/plugins/collab-edit/ui/styles.js +4 -2
- package/dist/cjs/plugins/collab-edit/utils.js +1 -0
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +3 -1
- package/dist/cjs/plugins/expand/ui/styles.js +16 -14
- package/dist/cjs/plugins/extension/commands.js +3 -2
- package/dist/cjs/plugins/extension/context-panel.js +21 -7
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +6 -4
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +3 -1
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +7 -5
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -2
- package/dist/cjs/plugins/fake-text-cursor/styles.js +3 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/cjs/plugins/find-replace/styles.js +2 -6
- package/dist/cjs/plugins/find-replace/ui/styles.js +4 -2
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +6 -4
- package/dist/cjs/plugins/floating-toolbar/ui/styles.js +12 -10
- package/dist/cjs/plugins/grid/styles.js +3 -1
- package/dist/cjs/plugins/help-dialog/ui/styles.js +9 -7
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +23 -1
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +10 -1
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -3
- package/dist/cjs/plugins/hyperlink/utils.js +53 -2
- package/dist/cjs/plugins/insert-block/index.js +1 -1
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -2
- package/dist/cjs/plugins/layout/styles.js +1 -1
- package/dist/cjs/plugins/media/commands/helpers.js +10 -9
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +23 -4
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -0
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -3
- package/dist/cjs/plugins/media/pm-plugins/main.js +1 -0
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +4 -2
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +3 -1
- package/dist/cjs/plugins/mentions/styles.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +4 -2
- package/dist/cjs/plugins/panel/index.js +1 -0
- package/dist/cjs/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +21 -3
- package/dist/cjs/plugins/paste/handlers.js +23 -0
- package/dist/cjs/plugins/paste/linkify-md-plugin.js +7 -0
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +9 -1
- package/dist/cjs/plugins/paste/pm-plugins/main.js +27 -1
- package/dist/cjs/plugins/placeholder/index.js +15 -3
- package/dist/cjs/plugins/placeholder/styles.js +3 -1
- package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
- package/dist/cjs/plugins/quick-insert/search.js +3 -1
- package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/cjs/plugins/status/ui/statusPicker.js +3 -3
- package/dist/cjs/plugins/table/index.js +14 -4
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/cjs/plugins/table/nodeviews/table.js +9 -4
- package/dist/cjs/plugins/table/pm-plugins/main.js +1 -4
- package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +118 -0
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/cjs/plugins/table/transforms/column-width.js +1 -2
- package/dist/cjs/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +4 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +3 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +4 -2
- package/dist/cjs/plugins/table/ui/consts.js +14 -11
- package/dist/cjs/plugins/table/ui/ui-styles.js +17 -10
- package/dist/cjs/plugins/table/utils/decoration.js +3 -4
- package/dist/cjs/plugins/table/utils/paste.js +9 -9
- package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
- package/dist/cjs/plugins/type-ahead/index.js +4 -3
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +3 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +11 -9
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +73 -3
- package/dist/cjs/plugins/unsupported-content/styles.js +1 -1
- package/dist/cjs/ui/Addon/Dropdown/styles.js +3 -1
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +3 -1
- package/dist/cjs/ui/Appearance/Chromeless.js +2 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +10 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +5 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +6 -3
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +21 -14
- package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +4 -2
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -8
- package/dist/cjs/ui/ContentStyles/index.js +4 -2
- package/dist/cjs/ui/ContextPanel/index.js +3 -1
- package/dist/cjs/ui/DropdownMenu/index.js +5 -0
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +6 -4
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +4 -2
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +4 -2
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +3 -1
- package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +3 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +3 -1
- package/dist/cjs/ui/FloatingToolbar/styles.js +2 -2
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +5 -3
- package/dist/cjs/ui/PanelTextInput/styles.js +3 -1
- package/dist/cjs/ui/PluginSlot/index.js +7 -4
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -2
- package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -3
- package/dist/cjs/ui/WithFlash/index.js +4 -2
- package/dist/cjs/ui/styles.js +6 -4
- package/dist/cjs/utils/document.js +62 -6
- package/dist/cjs/utils/filter/privacy-filter.js +2 -2
- package/dist/cjs/utils/step.js +17 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +25 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -0
- package/dist/es2019/create-editor/create-plugins-list.js +1 -2
- package/dist/es2019/editor.js +5 -2
- package/dist/es2019/keymaps/index.js +5 -1
- package/dist/es2019/labs/next/ContentComponents.js +7 -2
- package/dist/es2019/labs/next/full-page.js +11 -8
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +4 -3
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +16 -4
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
- package/dist/es2019/plugins/analytics/types/enums.js +3 -0
- package/dist/es2019/plugins/base/index.js +6 -15
- package/dist/es2019/plugins/base/pm-plugins/better-type-history.js +1 -11
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
- package/dist/es2019/plugins/block-type/commands/block-type.js +25 -16
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -10
- package/dist/es2019/plugins/card/styles.js +1 -1
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/es2019/plugins/code-block/actions.js +32 -0
- package/dist/es2019/plugins/code-block/nodeviews/code-block.js +61 -1
- package/dist/es2019/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/es2019/plugins/code-block/pm-plugins/main.js +37 -3
- package/dist/es2019/plugins/code-block/styles.js +30 -27
- package/dist/es2019/plugins/collab-edit/styles.js +3 -2
- package/dist/es2019/plugins/collab-edit/ui/styles.js +4 -3
- package/dist/es2019/plugins/collab-edit/utils.js +1 -0
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +3 -2
- package/dist/es2019/plugins/expand/ui/styles.js +15 -14
- package/dist/es2019/plugins/extension/commands.js +3 -2
- package/dist/es2019/plugins/extension/context-panel.js +11 -3
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -4
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +7 -6
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -4
- package/dist/es2019/plugins/fake-text-cursor/styles.js +3 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/es2019/plugins/find-replace/styles.js +4 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +4 -4
- package/dist/es2019/plugins/floating-toolbar/ui/styles.js +11 -10
- package/dist/es2019/plugins/grid/styles.js +4 -2
- package/dist/es2019/plugins/help-dialog/ui/styles.js +10 -9
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +9 -1
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -4
- package/dist/es2019/plugins/hyperlink/utils.js +43 -2
- package/dist/es2019/plugins/insert-block/index.js +1 -1
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/es2019/plugins/layout/styles.js +10 -7
- package/dist/es2019/plugins/media/commands/helpers.js +6 -8
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +21 -5
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -4
- package/dist/es2019/plugins/media/pm-plugins/main.js +2 -0
- package/dist/es2019/plugins/media/styles.js +3 -3
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
- package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +4 -3
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +2 -1
- package/dist/es2019/plugins/mentions/styles.js +5 -4
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +3 -2
- package/dist/es2019/plugins/panel/index.js +1 -0
- package/dist/es2019/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +22 -4
- package/dist/es2019/plugins/paste/handlers.js +23 -0
- package/dist/es2019/plugins/paste/linkify-md-plugin.js +7 -1
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +4 -1
- package/dist/es2019/plugins/paste/pm-plugins/main.js +27 -2
- package/dist/es2019/plugins/placeholder/index.js +12 -1
- package/dist/es2019/plugins/placeholder/styles.js +3 -1
- package/dist/es2019/plugins/placeholder-text/styles.js +5 -4
- package/dist/es2019/plugins/quick-insert/search.js +1 -1
- package/dist/es2019/plugins/selection/gap-cursor/styles.js +9 -9
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +3 -3
- package/dist/es2019/plugins/table/index.js +13 -4
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/es2019/plugins/table/nodeviews/table.js +6 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +1 -4
- package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +106 -0
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +3 -7
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/es2019/plugins/table/transforms/column-width.js +1 -2
- package/dist/es2019/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +4 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +4 -3
- package/dist/es2019/plugins/table/ui/common-styles.js +29 -27
- package/dist/es2019/plugins/table/ui/consts.js +15 -12
- package/dist/es2019/plugins/table/ui/ui-styles.js +28 -23
- package/dist/es2019/plugins/table/utils/decoration.js +1 -4
- package/dist/es2019/plugins/table/utils/paste.js +9 -9
- package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
- package/dist/es2019/plugins/type-ahead/index.js +4 -3
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +2 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +64 -6
- package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
- package/dist/es2019/ui/Addon/Dropdown/styles.js +3 -2
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +3 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +2 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +9 -4
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +7 -3
- package/dist/es2019/ui/ChromeCollapsed/styles.js +4 -3
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +10 -2
- package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +3 -2
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +4 -3
- package/dist/es2019/ui/ContentStyles/index.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +2 -1
- package/dist/es2019/ui/DropdownMenu/index.js +5 -0
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +6 -3
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +3 -2
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +3 -2
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
- package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
- package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +2 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +3 -1
- package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +4 -3
- package/dist/es2019/ui/PanelTextInput/styles.js +5 -5
- package/dist/es2019/ui/PluginSlot/index.js +7 -4
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
- package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -4
- package/dist/es2019/ui/WithFlash/index.js +4 -3
- package/dist/es2019/ui/styles.js +10 -9
- package/dist/es2019/utils/document.js +58 -5
- package/dist/es2019/utils/filter/privacy-filter.js +1 -1
- package/dist/es2019/utils/step.js +12 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +26 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -0
- package/dist/esm/create-editor/create-plugins-list.js +1 -2
- package/dist/esm/editor.js +5 -2
- package/dist/esm/keymaps/index.js +5 -1
- package/dist/esm/labs/next/ContentComponents.js +8 -4
- package/dist/esm/labs/next/full-page.js +11 -8
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +4 -3
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +3 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
- package/dist/esm/plugins/analytics/types/enums.js +3 -0
- package/dist/esm/plugins/base/index.js +8 -17
- package/dist/esm/plugins/base/pm-plugins/better-type-history.js +1 -11
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
- package/dist/esm/plugins/block-type/commands/block-type.js +31 -22
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -5
- package/dist/esm/plugins/card/styles.js +1 -1
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/esm/plugins/code-block/actions.js +28 -0
- package/dist/esm/plugins/code-block/nodeviews/code-block.js +67 -1
- package/dist/esm/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/esm/plugins/code-block/pm-plugins/main.js +39 -3
- package/dist/esm/plugins/code-block/styles.js +27 -23
- package/dist/esm/plugins/collab-edit/styles.js +3 -2
- package/dist/esm/plugins/collab-edit/ui/styles.js +3 -2
- package/dist/esm/plugins/collab-edit/utils.js +2 -0
- package/dist/esm/plugins/date/ui/DatePicker/index.js +2 -1
- package/dist/esm/plugins/expand/ui/styles.js +15 -14
- package/dist/esm/plugins/extension/commands.js +3 -2
- package/dist/esm/plugins/extension/context-panel.js +21 -7
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -4
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
- package/dist/esm/plugins/extension/ui/Extension/styles.js +6 -5
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -2
- package/dist/esm/plugins/fake-text-cursor/styles.js +2 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/esm/plugins/find-replace/styles.js +3 -3
- package/dist/esm/plugins/find-replace/ui/styles.js +3 -2
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Separator.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -4
- package/dist/esm/plugins/floating-toolbar/ui/styles.js +11 -10
- package/dist/esm/plugins/grid/styles.js +2 -1
- package/dist/esm/plugins/help-dialog/ui/styles.js +8 -7
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +9 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -3
- package/dist/esm/plugins/hyperlink/utils.js +44 -2
- package/dist/esm/plugins/insert-block/index.js +1 -1
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +3 -2
- package/dist/esm/plugins/layout/styles.js +1 -1
- package/dist/esm/plugins/media/commands/helpers.js +6 -8
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +22 -4
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -3
- package/dist/esm/plugins/media/pm-plugins/main.js +2 -0
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
- package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +3 -2
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +2 -1
- package/dist/esm/plugins/mentions/styles.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +3 -2
- package/dist/esm/plugins/panel/index.js +1 -0
- package/dist/esm/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/esm/plugins/panel/pm-plugins/keymaps.js +22 -4
- package/dist/esm/plugins/paste/handlers.js +21 -0
- package/dist/esm/plugins/paste/linkify-md-plugin.js +7 -1
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +6 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +27 -2
- package/dist/esm/plugins/placeholder/index.js +12 -1
- package/dist/esm/plugins/placeholder/styles.js +2 -1
- package/dist/esm/plugins/placeholder-text/styles.js +2 -1
- package/dist/esm/plugins/quick-insert/search.js +3 -1
- package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/esm/plugins/status/ui/statusPicker.js +2 -2
- package/dist/esm/plugins/table/index.js +13 -4
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/esm/plugins/table/nodeviews/table.js +6 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +1 -4
- package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +102 -0
- package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/esm/plugins/table/transforms/column-width.js +1 -2
- package/dist/esm/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +3 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +2 -1
- package/dist/esm/plugins/table/ui/common-styles.js +4 -2
- package/dist/esm/plugins/table/ui/consts.js +15 -12
- package/dist/esm/plugins/table/ui/ui-styles.js +15 -10
- package/dist/esm/plugins/table/utils/decoration.js +3 -4
- package/dist/esm/plugins/table/utils/paste.js +9 -9
- package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
- package/dist/esm/plugins/type-ahead/index.js +4 -3
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +2 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +71 -5
- package/dist/esm/plugins/unsupported-content/styles.js +1 -1
- package/dist/esm/ui/Addon/Dropdown/styles.js +2 -1
- package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -1
- package/dist/esm/ui/Appearance/Chromeless.js +2 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +10 -3
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +5 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +21 -14
- package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
- package/dist/esm/ui/ConfigPanel/Header.js +3 -2
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
- package/dist/esm/ui/ContentStyles/index.js +3 -2
- package/dist/esm/ui/ContextPanel/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +5 -0
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -4
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +3 -2
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +3 -2
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +11 -5
- package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
- package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +2 -1
- package/dist/esm/ui/ElementBrowser/constants.js +3 -1
- package/dist/esm/ui/FloatingToolbar/styles.js +3 -3
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +4 -3
- package/dist/esm/ui/PanelTextInput/styles.js +4 -3
- package/dist/esm/ui/PluginSlot/index.js +7 -4
- package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
- package/dist/esm/ui/ToolbarFeedback/styles.js +4 -3
- package/dist/esm/ui/WithFlash/index.js +3 -2
- package/dist/esm/ui/styles.js +5 -4
- package/dist/esm/utils/document.js +59 -5
- package/dist/esm/utils/filter/privacy-filter.js +1 -1
- package/dist/esm/utils/step.js +12 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +6 -0
- package/dist/types/labs/next/ContentComponents.d.ts +7 -1
- package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +1 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +3 -0
- package/dist/types/plugins/analytics/types/general-events.d.ts +7 -1
- package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -1
- package/dist/types/plugins/code-block/actions.d.ts +2 -0
- package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +2 -0
- package/dist/types/plugins/code-block/pm-plugins/actions.d.ts +1 -0
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +1 -0
- package/dist/types/plugins/extension/commands.d.ts +1 -1
- package/dist/types/plugins/extension/types.d.ts +1 -0
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
- package/dist/types/plugins/find-replace/styles.d.ts +0 -2
- package/dist/types/plugins/hyperlink/utils.d.ts +8 -0
- package/dist/types/plugins/media/commands/helpers.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -0
- package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -0
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
- package/dist/types/plugins/table/commands/misc.d.ts +0 -1
- package/dist/types/plugins/table/index.d.ts +0 -1
- package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types/plugins/table/nodeviews/types.d.ts +0 -1
- package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
- package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -2
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +0 -1
- package/dist/types/plugins/table/types.d.ts +0 -1
- package/dist/types/plugins/table/ui/consts.d.ts +9 -9
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +2 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +4 -4
- package/dist/types/types/editor-appearance-component.d.ts +0 -1
- package/dist/types/types/editor-props.d.ts +4 -0
- package/dist/types/types/feature-flags.d.ts +8 -0
- package/dist/types/types/ui-components.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -2
- package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -2
- package/dist/types/ui/PluginSlot/index.d.ts +1 -0
- package/dist/types/ui/Toolbar/toolbar-types.d.ts +1 -0
- package/dist/types/utils/document.d.ts +1 -0
- package/dist/types/utils/step.d.ts +1 -0
- package/docs/0-intro.tsx +12 -4
- package/package.json +23 -23
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import { inlineNodeViewClassname } from './getInlineNodeViewProducer'; // For reasoning behind styles, see comments in:
|
|
3
4
|
// ./getInlineNodeViewProducer -> portalChildren()
|
|
4
5
|
|
|
5
6
|
export const InlineNodeViewSharedStyles = css`
|
|
6
|
-
|
|
7
|
+
.${inlineNodeViewClassname} {
|
|
7
8
|
display: inline;
|
|
8
9
|
user-select: all;
|
|
9
10
|
/* Collapses zero width spaces inside the inline node view
|
|
@@ -16,12 +17,23 @@ export const InlineNodeViewSharedStyles = css`
|
|
|
16
17
|
white-space: pre-wrap;
|
|
17
18
|
}
|
|
18
19
|
}
|
|
20
|
+
/** Remove browser deafult selections style. This prevents
|
|
21
|
+
unexpected visual artefacts in Safari when navigating
|
|
22
|
+
with the keyboard or making range selections. */
|
|
23
|
+
&.ua-safari {
|
|
24
|
+
.${inlineNodeViewClassname} {
|
|
25
|
+
::selection,
|
|
26
|
+
*::selection {
|
|
27
|
+
background: transparent;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
19
31
|
|
|
20
|
-
&.ua-chrome
|
|
32
|
+
&.ua-chrome .${inlineNodeViewClassname} > span {
|
|
21
33
|
user-select: none;
|
|
22
34
|
}
|
|
23
35
|
|
|
24
|
-
|
|
36
|
+
.${inlineNodeViewClassname}AddZeroWidthSpace {
|
|
25
37
|
::after {
|
|
26
38
|
content: '${ZERO_WIDTH_SPACE}';
|
|
27
39
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N30 } from '@atlaskit/theme/colors';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
export const triggerWrapper = css`
|
|
4
5
|
display: flex;
|
|
5
6
|
`;
|
|
6
7
|
export const separator = css`
|
|
7
|
-
background: ${N30};
|
|
8
|
+
background: ${token('color.border', N30)};
|
|
8
9
|
width: 1px;
|
|
9
10
|
height: 24px;
|
|
10
11
|
display: inline-block;
|
|
@@ -84,6 +84,9 @@ export let ACTION;
|
|
|
84
84
|
ACTION["SYNCHRONY_ENTITY_ERROR"] = "synchronyEntityError";
|
|
85
85
|
ACTION["SYNCHRONY_ERROR"] = "synchronyError";
|
|
86
86
|
ACTION["TEXT_LINK_MARK_TRANSFORMED"] = "textLinkMarkTransformed";
|
|
87
|
+
ACTION["DEDUPE_MARKS_TRANSFORMED"] = "dedupeMarksTransformed";
|
|
88
|
+
ACTION["NODES_MISSING_CONTENT_TRANSFORMED"] = "nodesMissingContentTransformed";
|
|
89
|
+
ACTION["INDENTATION_MARKS_TRANSFORMED"] = "indentationMarksTransformed";
|
|
87
90
|
ACTION["TOGGLE_EXPAND"] = "toggleExpand";
|
|
88
91
|
ACTION["TRANSACTION_DISPATCHED"] = "transactionDispatched";
|
|
89
92
|
ACTION["TRANSACTION_MUTATED_AFTER_DISPATCH"] = "transactionMutatedAfterDispatched";
|
|
@@ -32,23 +32,14 @@ const basePlugin = options => ({
|
|
|
32
32
|
// In Firefox, when the selection is placed between adjacent nodes which are not contenteditatble
|
|
33
33
|
// no cursor is presented to users.
|
|
34
34
|
// In Safari, when the selection is placed between adjacent nodes which are not contenteditatble
|
|
35
|
-
//
|
|
36
|
-
// This plugin
|
|
35
|
+
// it is not possible to navigate with arrow keys.
|
|
36
|
+
// This plugin works around the issues by inserting decorations between
|
|
37
37
|
// inline nodes which are set as contenteditable, and have a zero width space.
|
|
38
|
-
// At time of development, using this workaround in Safari caused additional issues;
|
|
39
|
-
// - visual artifacts when moving across inline nodes (ie. using the arrow key to traverse a
|
|
40
|
-
// series of inline nodes)
|
|
41
|
-
// - blocking the right arrow key when at the start of a line from moving to the end of the
|
|
42
|
-
// previous line.
|
|
43
|
-
// As such we only apply the workaround for firefox and chrome.
|
|
44
|
-
|
|
45
|
-
if (browser.chrome || browser.gecko) {
|
|
46
|
-
plugins.push({
|
|
47
|
-
name: 'inlineCursorTargetPlugin',
|
|
48
|
-
plugin: () => options && options.allowInlineCursorTarget ? inlineCursorTargetPlugin() : undefined
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
38
|
|
|
39
|
+
plugins.push({
|
|
40
|
+
name: 'inlineCursorTargetPlugin',
|
|
41
|
+
plugin: () => options && options.allowInlineCursorTarget ? inlineCursorTargetPlugin() : undefined
|
|
42
|
+
});
|
|
52
43
|
plugins.push({
|
|
53
44
|
name: 'focusHandlerPlugin',
|
|
54
45
|
plugin: ({
|
|
@@ -4,6 +4,7 @@ import { Fragment } from 'prosemirror-model';
|
|
|
4
4
|
import { closeHistory } from 'prosemirror-history';
|
|
5
5
|
import { ReplaceStep, ReplaceAroundStep } from 'prosemirror-transform';
|
|
6
6
|
import { PluginKey } from 'prosemirror-state';
|
|
7
|
+
import { extractSliceFromStep } from '../../../utils/step';
|
|
7
8
|
|
|
8
9
|
const getEnterKeyboardActionStep = trs => {
|
|
9
10
|
const firstTr = trs.length === 1 && trs[0];
|
|
@@ -25,17 +26,6 @@ const getEnterKeyboardActionStep = trs => {
|
|
|
25
26
|
return replaceSteps[0];
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
const extractSliceFromStep = step => {
|
|
29
|
-
if (!(step instanceof ReplaceStep) && !(step instanceof ReplaceAroundStep)) {
|
|
30
|
-
return null;
|
|
31
|
-
} // @ts-ignore This is by design. Slice is a private property, but accesible, from ReplaceStep.
|
|
32
|
-
// However, we need to read it to found if the step was adding a newline
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const slice = step.slice;
|
|
36
|
-
return slice;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
29
|
const isSliceSplittingBlockNode = slice => {
|
|
40
30
|
const hasOnlyTwoChildren = slice.size > 1 && slice.content.childCount === 2;
|
|
41
31
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DecorationSet, Decoration } from 'prosemirror-view';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { PluginKey } from 'prosemirror-state';
|
|
4
|
-
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { ZERO_WIDTH_SPACE, browser } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { isTextSelection } from '../../../utils';
|
|
6
6
|
export const inlineCursorTargetStateKey = new PluginKey('inlineCursorTargetPlugin');
|
|
7
7
|
export const isInlineNodeView = node => {
|
|
@@ -23,13 +23,35 @@ export default (() => {
|
|
|
23
23
|
const {
|
|
24
24
|
$from,
|
|
25
25
|
$to
|
|
26
|
-
} = selection;
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
} = selection; // In Safari, if the cursor target is to the right of the cursor it will block selections
|
|
27
|
+
// made with shift + arrowRight and vice versa for shift + arrowLeft. This is due to a
|
|
28
|
+
// contenteditable bug in safari, where editable elements block the selection but we need
|
|
29
|
+
// the cursor target to be editable for the following:
|
|
30
|
+
// - Ability to navigate with down/up arrows when between inline nodes
|
|
31
|
+
// - Ability to navigate with down/up arrows when between the start of a paragraph & an inline node
|
|
32
|
+
// - Ability to click and drag to select an inline node if it is the first node
|
|
33
|
+
// To prevent blocking the selection, we check handleDOMEvents and add meta to
|
|
34
|
+
// the transaction to prevent the plugin from making cursor target decorations.
|
|
35
|
+
|
|
36
|
+
const safariShiftSelection = tr.getMeta(inlineCursorTargetStateKey);
|
|
37
|
+
|
|
38
|
+
if (selection && isTextSelection(selection) && !safariShiftSelection) {
|
|
29
39
|
const hasInlineNodeViewAfter = isInlineNodeView($from.nodeAfter);
|
|
30
40
|
const hasInlineNodeViewBefore = isInlineNodeView($from.nodeBefore);
|
|
31
|
-
const
|
|
32
|
-
const
|
|
41
|
+
const isAtStartAndInlineNodeViewAfter = $from.parentOffset === 0 && isInlineNodeView($from.nodeAfter);
|
|
42
|
+
const isAtEndAndInlineNodeViewBefore = doc.resolve($from.pos).node().lastChild === $from.nodeBefore && isInlineNodeView($from.nodeBefore);
|
|
43
|
+
|
|
44
|
+
const createWidget = side => {
|
|
45
|
+
const node = document.createElement('span');
|
|
46
|
+
node.contentEditable = 'true';
|
|
47
|
+
node.appendChild(document.createTextNode(ZERO_WIDTH_SPACE));
|
|
48
|
+
node.className = 'cursor-target';
|
|
49
|
+
return Decoration.widget(selection.from, node, {
|
|
50
|
+
raw: true,
|
|
51
|
+
side: side === 'left' ? -1 : 1,
|
|
52
|
+
key: 'inlineCursor'
|
|
53
|
+
});
|
|
54
|
+
}; // Create editable decoration widgets either side of the cursor to allow
|
|
33
55
|
// text input.
|
|
34
56
|
// We check beforeInput events below to prevent content
|
|
35
57
|
// being added to the decorations.
|
|
@@ -40,18 +62,8 @@ export default (() => {
|
|
|
40
62
|
// - positioned between the beginning of another node and an inline node (firefox)
|
|
41
63
|
// - positioned between an inline node and the end of a node (chrome)
|
|
42
64
|
|
|
43
|
-
if ((hasInlineNodeViewAfter || isAtEnd) && (hasInlineNodeViewBefore || isAtStart)) {
|
|
44
|
-
const createWidget = side => {
|
|
45
|
-
const node = document.createElement('span');
|
|
46
|
-
node.contentEditable = 'true';
|
|
47
|
-
node.appendChild(document.createTextNode(ZERO_WIDTH_SPACE));
|
|
48
|
-
return Decoration.widget(selection.from, node, {
|
|
49
|
-
raw: true,
|
|
50
|
-
side: side === 'left' ? -1 : 1,
|
|
51
|
-
key: 'inlineCursor'
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
65
|
|
|
66
|
+
if (!browser.safari && (hasInlineNodeViewAfter || isAtEndAndInlineNodeViewBefore) && (hasInlineNodeViewBefore || isAtStartAndInlineNodeViewAfter)) {
|
|
55
67
|
return {
|
|
56
68
|
cursorTarget: {
|
|
57
69
|
decorations: [createWidget('left'), createWidget('right')],
|
|
@@ -61,6 +73,34 @@ export default (() => {
|
|
|
61
73
|
}
|
|
62
74
|
}
|
|
63
75
|
};
|
|
76
|
+
} // Only create one widget on the left or right of the cursor in Safari.
|
|
77
|
+
// This is to prevent the left key from being blocked when at the start of a paragraph,
|
|
78
|
+
// and the right key from being blocked when at the end of a paragraph. This also
|
|
79
|
+
// improves click and drag selections, making it easier to select the first node.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
if (browser.safari) {
|
|
83
|
+
if (isAtEndAndInlineNodeViewBefore || hasInlineNodeViewBefore && hasInlineNodeViewAfter) {
|
|
84
|
+
return {
|
|
85
|
+
cursorTarget: {
|
|
86
|
+
decorations: [createWidget('left')],
|
|
87
|
+
positions: {
|
|
88
|
+
from: $from.pos,
|
|
89
|
+
to: $to.pos
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
} else if (isAtStartAndInlineNodeViewAfter) {
|
|
94
|
+
return {
|
|
95
|
+
cursorTarget: {
|
|
96
|
+
decorations: [createWidget('right')],
|
|
97
|
+
positions: {
|
|
98
|
+
from: $from.pos,
|
|
99
|
+
to: $to.pos
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
64
104
|
}
|
|
65
105
|
}
|
|
66
106
|
|
|
@@ -87,6 +127,21 @@ export default (() => {
|
|
|
87
127
|
},
|
|
88
128
|
|
|
89
129
|
handleDOMEvents: {
|
|
130
|
+
// Workaround to prevent the decorations created by the plugin from
|
|
131
|
+
// blocking shift + arrow left/right selections in safari. When
|
|
132
|
+
// a shift + arrow left/right event is detected, send meta data to the
|
|
133
|
+
// plugin to prevent it from creating decorations.
|
|
134
|
+
// TODO We may be able to remove this when playing the following ticket:
|
|
135
|
+
// https://product-fabric.atlassian.net/browse/ED-14938
|
|
136
|
+
keydown: (view, event) => {
|
|
137
|
+
if (browser.safari && event instanceof KeyboardEvent && event.shiftKey && (event.key === 'ArrowLeft' || event.key === 'ArrowRight')) {
|
|
138
|
+
view.dispatch(view.state.tr.setMeta(inlineCursorTargetStateKey, {
|
|
139
|
+
cursorTarget: undefined
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return false;
|
|
144
|
+
},
|
|
90
145
|
// Check the DOM to see if there are inline cursor targets
|
|
91
146
|
// after a composition event ends. If so, manually insert the
|
|
92
147
|
// event data in order to prevent contents ending up inside
|
|
@@ -7,6 +7,7 @@ import { shouldSplitSelectedNodeOnNodeInsertion } from '../../../utils/insert';
|
|
|
7
7
|
import { withAnalytics, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
8
8
|
import { filterChildrenBetween } from '../../../utils';
|
|
9
9
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
10
|
+
import { CellSelection } from '@atlaskit/editor-tables';
|
|
10
11
|
export function setBlockType(name) {
|
|
11
12
|
return (state, dispatch) => {
|
|
12
13
|
const {
|
|
@@ -48,16 +49,20 @@ export function setBlockTypeWithAnalytics(name, inputMethod) {
|
|
|
48
49
|
export function setNormalText() {
|
|
49
50
|
return function (state, dispatch) {
|
|
50
51
|
const {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
$to
|
|
55
|
-
},
|
|
56
|
-
schema
|
|
52
|
+
selection,
|
|
53
|
+
schema,
|
|
54
|
+
tr
|
|
57
55
|
} = state;
|
|
56
|
+
const ranges = selection instanceof CellSelection ? selection.ranges : [selection];
|
|
57
|
+
ranges.forEach(({
|
|
58
|
+
$from,
|
|
59
|
+
$to
|
|
60
|
+
}) => {
|
|
61
|
+
tr.setBlockType($from.pos, $to.pos, schema.nodes.paragraph);
|
|
62
|
+
});
|
|
58
63
|
|
|
59
64
|
if (dispatch) {
|
|
60
|
-
dispatch(tr
|
|
65
|
+
dispatch(tr);
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
return true;
|
|
@@ -109,18 +114,22 @@ export function setNormalTextWithAnalytics(inputMethod) {
|
|
|
109
114
|
export function setHeading(level) {
|
|
110
115
|
return function (state, dispatch) {
|
|
111
116
|
const {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
$to
|
|
116
|
-
},
|
|
117
|
-
schema
|
|
117
|
+
selection,
|
|
118
|
+
schema,
|
|
119
|
+
tr
|
|
118
120
|
} = state;
|
|
121
|
+
const ranges = selection instanceof CellSelection ? selection.ranges : [selection];
|
|
122
|
+
ranges.forEach(({
|
|
123
|
+
$from,
|
|
124
|
+
$to
|
|
125
|
+
}) => {
|
|
126
|
+
tr.setBlockType($from.pos, $to.pos, schema.nodes.heading, {
|
|
127
|
+
level
|
|
128
|
+
});
|
|
129
|
+
});
|
|
119
130
|
|
|
120
131
|
if (dispatch) {
|
|
121
|
-
dispatch(tr
|
|
122
|
-
level
|
|
123
|
-
}));
|
|
132
|
+
dispatch(tr);
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
return true;
|
|
@@ -3,9 +3,10 @@ import { css } from '@emotion/react';
|
|
|
3
3
|
import { N400 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { headingsSharedStyles } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { shortcutStyle } from '../../../../ui/styles';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
6
7
|
export const blockTypeMenuItemStyle = (tagName, selected) => {
|
|
7
8
|
// TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
|
|
8
|
-
const selectedStyle = selected ? `${tagName} { color: white !important; }` : '';
|
|
9
|
+
const selectedStyle = selected ? `${tagName} { color: ${token('color.text.inverse', 'white')} !important; }` : '';
|
|
9
10
|
return themeProps => css`
|
|
10
11
|
${headingsSharedStyles(themeProps)};
|
|
11
12
|
> {
|
|
@@ -26,5 +27,5 @@ export const keyboardShortcut = css`
|
|
|
26
27
|
margin-left: 16px;
|
|
27
28
|
`;
|
|
28
29
|
export const keyboardShortcutSelect = css`
|
|
29
|
-
color: ${N400};
|
|
30
|
+
color: ${token('color.icon', N400)};
|
|
30
31
|
`;
|
|
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import
|
|
6
|
+
import { B300, N300, N20A } from '@atlaskit/theme/colors';
|
|
7
7
|
import { injectIntl } from 'react-intl-next';
|
|
8
8
|
import { findParentDomRefOfType, findDomRefAtPos } from 'prosemirror-utils';
|
|
9
9
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
@@ -19,18 +19,14 @@ import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
|
|
|
19
19
|
import { getPluginState } from '../plugin-key';
|
|
20
20
|
import { NodeSelection } from 'prosemirror-state';
|
|
21
21
|
import { isSupportedNodeForBreakout } from '../utils/is-supported-node';
|
|
22
|
-
|
|
23
|
-
B300,
|
|
24
|
-
N300,
|
|
25
|
-
N20A
|
|
26
|
-
} = colors;
|
|
22
|
+
import { token } from '@atlaskit/tokens';
|
|
27
23
|
const toolbarButtonWrapper = css`
|
|
28
24
|
&& button {
|
|
29
|
-
background: ${N20A};
|
|
30
|
-
color: ${N300};
|
|
25
|
+
background: ${token('color.background.neutral', N20A)};
|
|
26
|
+
color: ${token('color.icon', N300)};
|
|
31
27
|
:hover {
|
|
32
|
-
background: ${B300};
|
|
33
|
-
color: white !important;
|
|
28
|
+
background: ${token('color.background.neutral.hovered', B300)};
|
|
29
|
+
color: ${token('color.icon', 'white')} !important;
|
|
34
30
|
}
|
|
35
31
|
}
|
|
36
32
|
`;
|
|
@@ -15,7 +15,7 @@ const iconBoxStyles = css({
|
|
|
15
15
|
width: ICON_HEIGHT,
|
|
16
16
|
height: ICON_WIDTH,
|
|
17
17
|
overflow: 'hidden',
|
|
18
|
-
border:
|
|
18
|
+
border: `1px solid ${token('color.border', 'rgba(223, 225, 229, 0.5)')}`
|
|
19
19
|
/* N60 at 50% */
|
|
20
20
|
,
|
|
21
21
|
borderRadius: borderRadius(),
|
|
@@ -23,7 +23,7 @@ const iconBoxStyles = css({
|
|
|
23
23
|
display: 'flex',
|
|
24
24
|
justifyContent: 'center',
|
|
25
25
|
alignItems: 'center',
|
|
26
|
-
backgroundColor: token('
|
|
26
|
+
backgroundColor: token('elevation.surface', 'white')
|
|
27
27
|
});
|
|
28
28
|
const primitiveStyles = css({
|
|
29
29
|
padding: '0.75rem',
|
|
@@ -101,5 +101,37 @@ export const resetCopiedState = (state, dispatch) => {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
return true;
|
|
105
|
+
};
|
|
106
|
+
export const ignoreFollowingMutations = (state, dispatch) => {
|
|
107
|
+
const {
|
|
108
|
+
tr
|
|
109
|
+
} = state;
|
|
110
|
+
const ignoreFollowingMutationsTr = tr;
|
|
111
|
+
ignoreFollowingMutationsTr.setMeta(pluginKey, {
|
|
112
|
+
type: ACTIONS.SET_SHOULD_IGNORE_FOLLOWING_MUTATIONS,
|
|
113
|
+
data: true
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
if (dispatch) {
|
|
117
|
+
dispatch(ignoreFollowingMutationsTr);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return true;
|
|
121
|
+
};
|
|
122
|
+
export const resetShouldIgnoreFollowingMutations = (state, dispatch) => {
|
|
123
|
+
const {
|
|
124
|
+
tr
|
|
125
|
+
} = state;
|
|
126
|
+
const ignoreFollowingMutationsTr = tr;
|
|
127
|
+
ignoreFollowingMutationsTr.setMeta(pluginKey, {
|
|
128
|
+
type: ACTIONS.SET_SHOULD_IGNORE_FOLLOWING_MUTATIONS,
|
|
129
|
+
data: false
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
if (dispatch) {
|
|
133
|
+
dispatch(ignoreFollowingMutationsTr);
|
|
134
|
+
}
|
|
135
|
+
|
|
104
136
|
return true;
|
|
105
137
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import rafSchedule from 'raf-schd';
|
|
3
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import { DOMSerializer } from 'prosemirror-model';
|
|
4
5
|
import { codeBlockClassNames } from '../ui/class-names';
|
|
6
|
+
import { resetShouldIgnoreFollowingMutations } from '../actions';
|
|
7
|
+
import { getPluginState } from '../pm-plugins/main-state';
|
|
5
8
|
const MATCH_NEWLINES = new RegExp('\n', 'g');
|
|
6
9
|
|
|
7
10
|
const toDOM = node => ['div', {
|
|
@@ -51,6 +54,52 @@ export class CodeBlockView {
|
|
|
51
54
|
this.ensureLineNumbers();
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
updateDOMAndSelection(savedInnerHTML, newCursorPosition) {
|
|
58
|
+
var _this$dom;
|
|
59
|
+
|
|
60
|
+
if ((_this$dom = this.dom) !== null && _this$dom !== void 0 && _this$dom.childNodes && this.dom.childNodes.length > 1) {
|
|
61
|
+
var _contentView$childNod;
|
|
62
|
+
|
|
63
|
+
const contentView = this.dom.childNodes[1];
|
|
64
|
+
|
|
65
|
+
if ((contentView === null || contentView === void 0 ? void 0 : (_contentView$childNod = contentView.childNodes) === null || _contentView$childNod === void 0 ? void 0 : _contentView$childNod.length) > 0) {
|
|
66
|
+
const codeElement = contentView.firstChild;
|
|
67
|
+
codeElement.innerHTML = savedInnerHTML; // We need to set cursor for the DOM update
|
|
68
|
+
|
|
69
|
+
const textElement = [...codeElement.childNodes].find(child => child.nodeName === '#text');
|
|
70
|
+
const sel = window.getSelection();
|
|
71
|
+
const range = document.createRange();
|
|
72
|
+
range.setStart(textElement, newCursorPosition);
|
|
73
|
+
range.collapse(true);
|
|
74
|
+
sel === null || sel === void 0 ? void 0 : sel.removeAllRanges();
|
|
75
|
+
sel === null || sel === void 0 ? void 0 : sel.addRange(range);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
coalesceDOMElements() {
|
|
81
|
+
var _this$dom2;
|
|
82
|
+
|
|
83
|
+
if ((_this$dom2 = this.dom) !== null && _this$dom2 !== void 0 && _this$dom2.childNodes && this.dom.childNodes.length > 1) {
|
|
84
|
+
const contentView = this.dom.childNodes[1];
|
|
85
|
+
|
|
86
|
+
if (contentView !== null && contentView !== void 0 && contentView.childNodes && contentView.childNodes.length > 1) {
|
|
87
|
+
let savedInnerHTML = '';
|
|
88
|
+
|
|
89
|
+
while (contentView.childNodes.length > 1) {
|
|
90
|
+
const lastChild = contentView.lastChild;
|
|
91
|
+
savedInnerHTML = lastChild.innerHTML + savedInnerHTML;
|
|
92
|
+
contentView.removeChild(lastChild);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const firstChild = contentView.firstChild;
|
|
96
|
+
savedInnerHTML = firstChild.innerHTML + '\n' + savedInnerHTML;
|
|
97
|
+
const newCursorPosition = firstChild.innerHTML.length + 1;
|
|
98
|
+
setTimeout(this.updateDOMAndSelection.bind(this, savedInnerHTML, newCursorPosition), 20);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
54
103
|
update(node) {
|
|
55
104
|
if (node.type !== this.node.type) {
|
|
56
105
|
return false;
|
|
@@ -63,13 +112,24 @@ export class CodeBlockView {
|
|
|
63
112
|
|
|
64
113
|
this.node = node;
|
|
65
114
|
this.ensureLineNumbers();
|
|
115
|
+
|
|
116
|
+
if (browser.android) {
|
|
117
|
+
this.coalesceDOMElements();
|
|
118
|
+
resetShouldIgnoreFollowingMutations(this.view.state, this.view.dispatch);
|
|
119
|
+
}
|
|
66
120
|
}
|
|
67
121
|
|
|
68
122
|
return true;
|
|
69
123
|
}
|
|
70
124
|
|
|
71
125
|
ignoreMutation(record) {
|
|
72
|
-
|
|
126
|
+
const pluginState = getPluginState(this.view.state);
|
|
127
|
+
|
|
128
|
+
if (pluginState !== null && pluginState !== void 0 && pluginState.shouldIgnoreFollowingMutations) {
|
|
129
|
+
return true;
|
|
130
|
+
} // Ensure updating the line-number gutter doesn't trigger reparsing the codeblock
|
|
131
|
+
|
|
132
|
+
|
|
73
133
|
return record.target === this.lineNumberGutter || record.target.parentNode === this.lineNumberGutter;
|
|
74
134
|
}
|
|
75
135
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
2
3
|
import { NodeSelection } from 'prosemirror-state';
|
|
3
4
|
import { codeBidiWarningMessages } from '@atlaskit/editor-common/messages';
|
|
4
5
|
import { codeBlockNodeView } from '../nodeviews/code-block';
|
|
@@ -6,6 +7,7 @@ import { highlightingCodeBlockNodeView } from '../nodeviews/highlighting-code-bl
|
|
|
6
7
|
import { createSelectionClickHandler } from '../../selection/utils';
|
|
7
8
|
import { pluginKey } from '../plugin-key';
|
|
8
9
|
import { ACTIONS } from './actions';
|
|
10
|
+
import { ignoreFollowingMutations, resetShouldIgnoreFollowingMutations } from '../actions';
|
|
9
11
|
import { findCodeBlock } from '../utils';
|
|
10
12
|
import { codeBlockClassNames } from '../ui/class-names';
|
|
11
13
|
import { getFeatureFlags } from '../../feature-flags-context';
|
|
@@ -22,12 +24,39 @@ export const createPlugin = ({
|
|
|
22
24
|
|
|
23
25
|
if (allowCompositionInputOverride) {
|
|
24
26
|
handleDOMEvents.beforeinput = (view, event) => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
const keyEvent = event;
|
|
28
|
+
const eventInputType = keyEvent.inputType;
|
|
29
|
+
const eventText = keyEvent.data;
|
|
30
|
+
|
|
31
|
+
if (browser.ios && event.composed && // insertParagraph will be the input type when the enter key is pressed.
|
|
32
|
+
eventInputType === 'insertParagraph' && findCodeBlock(view.state, view.state.selection)) {
|
|
27
33
|
event.preventDefault();
|
|
34
|
+
return true;
|
|
35
|
+
} else if (browser.android && event.composed && eventInputType === 'insertCompositionText' && eventText[(eventText === null || eventText === void 0 ? void 0 : eventText.length) - 1] === '\n' && findCodeBlock(view.state, view.state.selection)) {
|
|
36
|
+
const resultingText = event.target.outerText + '\n';
|
|
37
|
+
|
|
38
|
+
if (resultingText.endsWith(eventText)) {
|
|
39
|
+
// End of paragraph
|
|
40
|
+
setTimeout(() => {
|
|
41
|
+
view.someProp('handleKeyDown', f => f(view, new KeyboardEvent('keydown', {
|
|
42
|
+
bubbles: true,
|
|
43
|
+
cancelable: true,
|
|
44
|
+
key: 'Enter',
|
|
45
|
+
code: 'Enter'
|
|
46
|
+
})));
|
|
47
|
+
}, 0);
|
|
48
|
+
} else {
|
|
49
|
+
// Middle of paragraph, end of line
|
|
50
|
+
ignoreFollowingMutations(view.state, view.dispatch);
|
|
51
|
+
}
|
|
52
|
+
|
|
28
53
|
return true;
|
|
29
54
|
}
|
|
30
55
|
|
|
56
|
+
if (browser.android) {
|
|
57
|
+
resetShouldIgnoreFollowingMutations(view.state, view.dispatch);
|
|
58
|
+
}
|
|
59
|
+
|
|
31
60
|
return false;
|
|
32
61
|
};
|
|
33
62
|
}
|
|
@@ -39,7 +68,8 @@ export const createPlugin = ({
|
|
|
39
68
|
return {
|
|
40
69
|
pos: node ? node.pos : null,
|
|
41
70
|
contentCopied: false,
|
|
42
|
-
isNodeSelected: false
|
|
71
|
+
isNodeSelected: false,
|
|
72
|
+
shouldIgnoreFollowingMutations: false
|
|
43
73
|
};
|
|
44
74
|
},
|
|
45
75
|
|
|
@@ -59,6 +89,10 @@ export const createPlugin = ({
|
|
|
59
89
|
return { ...pluginState,
|
|
60
90
|
contentCopied: meta.data
|
|
61
91
|
};
|
|
92
|
+
} else if ((meta === null || meta === void 0 ? void 0 : meta.type) === ACTIONS.SET_SHOULD_IGNORE_FOLLOWING_MUTATIONS) {
|
|
93
|
+
return { ...pluginState,
|
|
94
|
+
shouldIgnoreFollowingMutations: meta.data
|
|
95
|
+
};
|
|
62
96
|
}
|
|
63
97
|
|
|
64
98
|
return pluginState;
|