@atlaskit/editor-core 175.0.4 → 176.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/.eslintrc.js +23 -57
- package/CHANGELOG.md +76 -0
- package/dist/cjs/create-editor/ReactEditorView.js +1 -1
- package/dist/cjs/create-editor/create-plugins-list.js +2 -4
- package/dist/cjs/keymaps/index.js +0 -6
- package/dist/cjs/labs/next/presets/cxhtml.js +1 -3
- package/dist/cjs/labs/next/presets/mobile.js +1 -3
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +12 -5
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/plugins/alignment/pm-plugins/keymap.js +0 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +27 -4
- package/dist/cjs/plugins/annotation/nodeviews/index.js +7 -35
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +28 -2
- package/dist/cjs/plugins/annotation/utils.js +7 -3
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +1 -0
- package/dist/cjs/plugins/caption/nodeviews/index.js +4 -1
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +1 -0
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +2 -1
- package/dist/cjs/plugins/code-block/nodeviews/code-block.js +7 -3
- package/dist/cjs/plugins/code-block/refresh-browser-selection.js +3 -1
- package/dist/cjs/plugins/code-block/styles.js +6 -2
- package/dist/cjs/plugins/code-block/ui/class-names.js +2 -0
- package/dist/cjs/plugins/collab-edit/utils.js +4 -0
- package/dist/cjs/plugins/copy-button/commands.js +5 -3
- package/dist/cjs/plugins/emoji/messages.js +17 -0
- package/dist/cjs/plugins/emoji/nodeviews/emoji.js +18 -2
- package/dist/cjs/plugins/expand/pm-plugins/keymap.js +11 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +17 -13
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/index.js +2 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +9 -1
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +20 -1
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +6 -2
- package/dist/cjs/plugins/floating-toolbar/ui/Select.js +10 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +1 -0
- package/dist/cjs/plugins/help-dialog/ui/index.js +1 -4
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +2 -2
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -9
- package/dist/cjs/plugins/media/index.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +27 -3
- package/dist/cjs/plugins/media/pm-plugins/main.js +17 -2
- package/dist/cjs/plugins/media/toolbar/alt-text.js +1 -0
- package/dist/cjs/plugins/media/toolbar/linking.js +1 -0
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +9 -6
- package/dist/cjs/plugins/media/ui/ToolbarMedia/toolbar-media-messages.js +2 -2
- package/dist/cjs/plugins/mentions/messages.js +5 -0
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +18 -2
- package/dist/cjs/plugins/mentions/styles.js +1 -1
- package/dist/cjs/plugins/mentions/ui/Mention/index.js +15 -0
- package/dist/cjs/plugins/panel/actions.js +1 -1
- package/dist/cjs/plugins/panel/index.js +1 -0
- package/dist/cjs/plugins/panel/toolbar.js +2 -2
- package/dist/cjs/plugins/paste/index.js +2 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/cjs/plugins/quick-insert/assets/action.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/code.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/custom-panel.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/date.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/decision.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/divider.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/emoji.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/expand.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/fallback.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/feedback.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading1.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading2.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading3.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading4.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading5.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/heading6.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/images.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/layout.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/link.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/list-number.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/list.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/mention.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel-error.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel-note.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel-success.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel-warning.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/panel.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/quote.js +3 -0
- package/dist/cjs/plugins/quick-insert/assets/status.js +3 -0
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +26 -3
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +41 -4
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/styles.js +6 -1
- package/dist/cjs/plugins/text-color/utils/color.js +3 -0
- package/dist/cjs/plugins/type-ahead/commands/insert-type-ahead-item.js +4 -3
- package/dist/cjs/plugins/type-ahead/index.js +42 -22
- package/dist/cjs/plugins/type-ahead/messages.js +13 -3
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +25 -16
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +126 -64
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +12 -14
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +37 -14
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +36 -5
- package/dist/cjs/plugins/type-ahead/utils.js +3 -1
- package/dist/cjs/ui/Alignment/index.js +0 -1
- package/dist/cjs/ui/Appearance/Chromeless.js +1 -1
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +6 -2
- package/dist/cjs/ui/ColorPickerButton/index.js +4 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -4
- package/dist/cjs/ui/ConfigPanel/Fields/Select.js +1 -3
- package/dist/cjs/ui/Dropdown/index.js +28 -1
- package/dist/cjs/ui/DropdownMenu/index.js +25 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +0 -1
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +166 -0
- package/dist/cjs/ui/styles.js +12 -18
- package/dist/cjs/utils/clipboard.js +17 -12
- package/dist/cjs/utils/document.js +13 -0
- package/dist/cjs/utils/index.js +0 -9
- package/dist/cjs/utils/input-rules.js +7 -5
- package/dist/cjs/utils/table.js +35 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +1 -1
- package/dist/es2019/create-editor/create-plugins-list.js +2 -4
- package/dist/es2019/keymaps/index.js +1 -1
- package/dist/es2019/labs/next/presets/cxhtml.js +1 -3
- package/dist/es2019/labs/next/presets/mobile.js +1 -3
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +11 -4
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/es2019/plugins/alignment/pm-plugins/keymap.js +1 -2
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +26 -4
- package/dist/es2019/plugins/annotation/nodeviews/index.js +7 -31
- package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +24 -3
- package/dist/es2019/plugins/annotation/utils.js +8 -4
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +1 -0
- package/dist/es2019/plugins/caption/nodeviews/index.js +4 -1
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +1 -0
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -1
- package/dist/es2019/plugins/code-block/nodeviews/code-block.js +7 -3
- package/dist/es2019/plugins/code-block/refresh-browser-selection.js +2 -1
- package/dist/es2019/plugins/code-block/styles.js +21 -5
- package/dist/es2019/plugins/code-block/ui/class-names.js +2 -0
- package/dist/es2019/plugins/collab-edit/utils.js +5 -1
- package/dist/es2019/plugins/copy-button/commands.js +5 -3
- package/dist/es2019/plugins/emoji/messages.js +8 -0
- package/dist/es2019/plugins/emoji/nodeviews/emoji.js +16 -2
- package/dist/es2019/plugins/expand/pm-plugins/keymap.js +10 -1
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +17 -13
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -0
- package/dist/es2019/plugins/floating-toolbar/index.js +2 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +9 -1
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +20 -1
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Select.js +9 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +1 -0
- package/dist/es2019/plugins/help-dialog/ui/index.js +1 -2
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +2 -2
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +15 -2
- package/dist/es2019/plugins/media/index.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +25 -4
- package/dist/es2019/plugins/media/pm-plugins/main.js +14 -1
- package/dist/es2019/plugins/media/toolbar/alt-text.js +1 -0
- package/dist/es2019/plugins/media/toolbar/linking.js +1 -0
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +4 -2
- package/dist/es2019/plugins/media/ui/ToolbarMedia/toolbar-media-messages.js +2 -2
- package/dist/es2019/plugins/mentions/messages.js +5 -0
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +16 -2
- package/dist/es2019/plugins/mentions/styles.js +2 -1
- package/dist/es2019/plugins/mentions/ui/Mention/index.js +12 -0
- package/dist/es2019/plugins/panel/actions.js +2 -2
- package/dist/es2019/plugins/panel/index.js +1 -0
- package/dist/es2019/plugins/panel/toolbar.js +3 -3
- package/dist/es2019/plugins/paste/index.js +2 -3
- package/dist/es2019/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/es2019/plugins/quick-insert/assets/action.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/code.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/custom-panel.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/date.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/decision.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/divider.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/emoji.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/expand.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/fallback.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/feedback.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading1.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading2.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading3.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading4.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading5.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/heading6.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/images.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/layout.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/link.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/list-number.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/list.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/mention.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel-error.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel-note.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel-success.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel-warning.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/panel.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/quote.js +3 -0
- package/dist/es2019/plugins/quick-insert/assets/status.js +3 -0
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +26 -5
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +42 -4
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/styles.js +6 -1
- package/dist/es2019/plugins/text-color/utils/color.js +3 -0
- package/dist/es2019/plugins/type-ahead/commands/insert-type-ahead-item.js +4 -3
- package/dist/es2019/plugins/type-ahead/index.js +17 -4
- package/dist/es2019/plugins/type-ahead/messages.js +13 -3
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +24 -16
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +108 -61
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +12 -14
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +32 -8
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +42 -7
- package/dist/es2019/plugins/type-ahead/utils.js +3 -1
- package/dist/es2019/ui/Alignment/index.js +1 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +4 -0
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +5 -2
- package/dist/es2019/ui/ColorPickerButton/index.js +4 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CustomSelect.js +2 -4
- package/dist/es2019/ui/ConfigPanel/Fields/Select.js +1 -3
- package/dist/es2019/ui/Dropdown/index.js +16 -1
- package/dist/es2019/ui/DropdownMenu/index.js +13 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +148 -0
- package/dist/es2019/ui/styles.js +1 -7
- package/dist/es2019/utils/clipboard.js +11 -9
- package/dist/es2019/utils/document.js +14 -1
- package/dist/es2019/utils/index.js +0 -7
- package/dist/es2019/utils/input-rules.js +4 -3
- package/dist/es2019/utils/table.js +28 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +1 -1
- package/dist/esm/create-editor/create-plugins-list.js +2 -4
- package/dist/esm/keymaps/index.js +1 -1
- package/dist/esm/labs/next/presets/cxhtml.js +1 -3
- package/dist/esm/labs/next/presets/mobile.js +1 -3
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +11 -4
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/alignment/pm-plugins/keymap.js +1 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +29 -4
- package/dist/esm/plugins/annotation/nodeviews/index.js +7 -33
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +28 -3
- package/dist/esm/plugins/annotation/utils.js +8 -4
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +1 -0
- package/dist/esm/plugins/caption/nodeviews/index.js +4 -1
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +1 -0
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -1
- package/dist/esm/plugins/code-block/nodeviews/code-block.js +7 -3
- package/dist/esm/plugins/code-block/refresh-browser-selection.js +2 -1
- package/dist/esm/plugins/code-block/styles.js +7 -2
- package/dist/esm/plugins/code-block/ui/class-names.js +2 -0
- package/dist/esm/plugins/collab-edit/utils.js +5 -2
- package/dist/esm/plugins/copy-button/commands.js +5 -3
- package/dist/esm/plugins/emoji/messages.js +8 -0
- package/dist/esm/plugins/emoji/nodeviews/emoji.js +15 -2
- package/dist/esm/plugins/expand/pm-plugins/keymap.js +10 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +17 -13
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +1 -0
- package/dist/esm/plugins/floating-toolbar/index.js +2 -0
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +10 -1
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +20 -1
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +5 -2
- package/dist/esm/plugins/floating-toolbar/ui/Select.js +9 -3
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +1 -0
- package/dist/esm/plugins/help-dialog/ui/index.js +1 -4
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/create-items.js +2 -2
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +23 -9
- package/dist/esm/plugins/media/index.js +2 -2
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +25 -4
- package/dist/esm/plugins/media/pm-plugins/main.js +14 -1
- package/dist/esm/plugins/media/toolbar/alt-text.js +1 -0
- package/dist/esm/plugins/media/toolbar/linking.js +1 -0
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
- package/dist/esm/plugins/media/ui/ToolbarMedia/toolbar-media-messages.js +2 -2
- package/dist/esm/plugins/mentions/messages.js +5 -0
- package/dist/esm/plugins/mentions/nodeviews/mention.js +15 -2
- package/dist/esm/plugins/mentions/styles.js +1 -1
- package/dist/esm/plugins/mentions/ui/Mention/index.js +13 -0
- package/dist/esm/plugins/panel/actions.js +2 -2
- package/dist/esm/plugins/panel/index.js +1 -0
- package/dist/esm/plugins/panel/toolbar.js +3 -3
- package/dist/esm/plugins/paste/index.js +2 -3
- package/dist/esm/plugins/paste/pm-plugins/main.js +2 -2
- package/dist/esm/plugins/quick-insert/assets/action.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/code.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/custom-panel.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/date.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/decision.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/divider.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/emoji.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/expand.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/fallback.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/feedback.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading1.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading2.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading3.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading4.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading5.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/heading6.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/images.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/layout.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/link.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/list-number.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/list.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/mention.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel-error.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel-note.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel-success.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel-warning.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/panel.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/quote.js +3 -0
- package/dist/esm/plugins/quick-insert/assets/status.js +3 -0
- package/dist/esm/plugins/selection/gap-cursor/actions.js +24 -5
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +44 -4
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/styles.js +6 -1
- package/dist/esm/plugins/text-color/utils/color.js +3 -0
- package/dist/esm/plugins/type-ahead/commands/insert-type-ahead-item.js +4 -3
- package/dist/esm/plugins/type-ahead/index.js +35 -22
- package/dist/esm/plugins/type-ahead/messages.js +13 -3
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +24 -16
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +124 -64
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +12 -14
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +35 -14
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +38 -7
- package/dist/esm/plugins/type-ahead/utils.js +3 -1
- package/dist/esm/ui/Alignment/index.js +1 -2
- package/dist/esm/ui/Appearance/Chromeless.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +5 -2
- package/dist/esm/ui/ColorPickerButton/index.js +4 -0
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +2 -4
- package/dist/esm/ui/ConfigPanel/Fields/Select.js +1 -3
- package/dist/esm/ui/Dropdown/index.js +17 -1
- package/dist/esm/ui/DropdownMenu/index.js +14 -1
- package/dist/esm/ui/ElementBrowser/constants.js +0 -1
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +147 -0
- package/dist/esm/ui/styles.js +12 -16
- package/dist/esm/utils/clipboard.js +17 -12
- package/dist/esm/utils/document.js +14 -1
- package/dist/esm/utils/index.js +0 -7
- package/dist/esm/utils/input-rules.js +4 -3
- package/dist/esm/utils/table.js +28 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/keymaps/index.d.ts +1 -1
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +2 -0
- package/dist/types/plugins/annotation/utils.d.ts +2 -2
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +2 -0
- package/dist/types/plugins/code-block/refresh-browser-selection.d.ts +2 -0
- package/dist/types/plugins/code-block/ui/class-names.d.ts +2 -0
- package/dist/types/plugins/emoji/messages.d.ts +7 -0
- package/dist/types/plugins/extension/index.d.ts +0 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +6 -0
- package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +1 -0
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +4 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/media/ui/CaptionPlaceholder/index.d.ts +3 -3
- package/dist/types/plugins/mentions/messages.d.ts +5 -0
- package/dist/types/plugins/mentions/ui/Mention/index.d.ts +1 -0
- package/dist/types/plugins/paste/index.d.ts +1 -2
- package/dist/types/plugins/paste/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/selection/gap-cursor/actions.d.ts +2 -0
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +3 -0
- package/dist/types/plugins/type-ahead/messages.d.ts +10 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +7 -1
- package/dist/types/plugins/type-ahead/utils.d.ts +1 -0
- package/dist/types/types/extension-config.d.ts +0 -1
- package/dist/types/ui/ConfigPanel/Fields/SelectItem.d.ts +1 -1
- package/dist/types/ui/Dropdown/index.d.ts +6 -1
- package/dist/types/ui/DropdownMenu/index.d.ts +2 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +3 -1
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +18 -0
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/clipboard.d.ts +1 -1
- package/dist/types/utils/index.d.ts +0 -4
- package/dist/types/utils/input-rules.d.ts +2 -2
- package/dist/types/utils/table.d.ts +3 -0
- package/docs/3-annotations.tsx +1 -0
- package/package.json +27 -25
- package/report.api.md +74 -74
|
@@ -52,9 +52,7 @@ function SelectField(_ref) {
|
|
|
52
52
|
onChange: function onChange(value) {
|
|
53
53
|
fieldProps.onChange(value);
|
|
54
54
|
onFieldChange(name, true);
|
|
55
|
-
} //
|
|
56
|
-
,
|
|
57
|
-
enableAnimation: false // add type cast to avoid adding a "IsMulti" generic prop (TODO: ED-12072)
|
|
55
|
+
} // add type cast to avoid adding a "IsMulti" generic prop (TODO: ED-12072)
|
|
58
56
|
,
|
|
59
57
|
isMulti: field.isMultiple || false,
|
|
60
58
|
options: field.items || [],
|
|
@@ -1,11 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
3
7
|
Object.defineProperty(exports, "__esModule", {
|
|
4
8
|
value: true
|
|
5
9
|
});
|
|
6
10
|
exports.default = void 0;
|
|
7
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
8
14
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
9
15
|
|
|
10
|
-
var
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _ToolbarArrowKeyNavigationProvider = require("../ToolbarArrowKeyNavigationProvider");
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
var Dropdown = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
25
|
+
var props = (0, _extends2.default)({}, _ref);
|
|
26
|
+
var keydownHandlerContext = (0, _react.useContext)(_ToolbarArrowKeyNavigationProvider.KeyDownHandlerContext);
|
|
27
|
+
return (
|
|
28
|
+
/*#__PURE__*/
|
|
29
|
+
//This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
30
|
+
//Default context has the void callbacks for above key events
|
|
31
|
+
_react.default.createElement(_uiMenu.Dropdown, (0, _extends2.default)({
|
|
32
|
+
keyDownHandlerContext: keydownHandlerContext
|
|
33
|
+
}, props))
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
var _default = Dropdown;
|
|
11
38
|
exports.default = _default;
|
|
@@ -1,11 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
3
7
|
Object.defineProperty(exports, "__esModule", {
|
|
4
8
|
value: true
|
|
5
9
|
});
|
|
6
10
|
exports.default = void 0;
|
|
7
11
|
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
8
14
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
9
15
|
|
|
10
|
-
var
|
|
16
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
+
|
|
18
|
+
var _ToolbarArrowKeyNavigationProvider = require("../ToolbarArrowKeyNavigationProvider");
|
|
19
|
+
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
+
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
+
|
|
24
|
+
var DropdownMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
25
|
+
var props = (0, _extends2.default)({}, _ref);
|
|
26
|
+
var keydownHandlerContext = (0, _react.useContext)(_ToolbarArrowKeyNavigationProvider.KeyDownHandlerContext); //This context is to handle the tab, Arrow Right/Left key events for dropdown.
|
|
27
|
+
//Default context has the void callbacks for above key events
|
|
28
|
+
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_uiMenu.DropdownMenu, (0, _extends2.default)({
|
|
30
|
+
keyDownHandlerContext: keydownHandlerContext
|
|
31
|
+
}, props));
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
var _default = DropdownMenu;
|
|
11
35
|
exports.default = _default;
|
|
@@ -7,7 +7,6 @@ exports.SIDEBAR_WIDTH = exports.SIDEBAR_HEADING_WRAPPER_HEIGHT = exports.SIDEBAR
|
|
|
7
7
|
|
|
8
8
|
var _constants = require("@atlaskit/theme/constants");
|
|
9
9
|
|
|
10
|
-
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
11
10
|
var GRID_SIZE = (0, _constants.gridSize)();
|
|
12
11
|
exports.GRID_SIZE = GRID_SIZE;
|
|
13
12
|
var DEVICE_BREAKPOINT_NUMBERS = {
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.ToolbarArrowKeyNavigationProvider = exports.KeyDownHandlerContext = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
|
|
16
|
+
/* eslint-disable no-console */
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
** The context is used to handle the keydown events of submenus.
|
|
20
|
+
** Because the keyboard navigation is explicitly managed for main toolbar items
|
|
21
|
+
** Few key presses such as Tab,Arrow Right/Left need ot be handled here via context
|
|
22
|
+
*/
|
|
23
|
+
var KeyDownHandlerContext = /*#__PURE__*/_react.default.createContext({
|
|
24
|
+
handleArrowLeft: function handleArrowLeft() {},
|
|
25
|
+
handleArrowRight: function handleArrowRight() {},
|
|
26
|
+
handleTab: function handleTab() {}
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* This component is a wrapper of main toolbar which listens to keydown events of children
|
|
30
|
+
* and handles left/right arrow key navigation for all focusable elements
|
|
31
|
+
* @param
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
exports.KeyDownHandlerContext = KeyDownHandlerContext;
|
|
37
|
+
|
|
38
|
+
var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvider(_ref) {
|
|
39
|
+
var children = _ref.children,
|
|
40
|
+
editorView = _ref.editorView;
|
|
41
|
+
var wrapperRef = (0, _react.useRef)(null);
|
|
42
|
+
var currentSelectedItemIndex = (0, _react.useRef)(0);
|
|
43
|
+
|
|
44
|
+
var incrementIndex = function incrementIndex(list) {
|
|
45
|
+
if (currentSelectedItemIndex.current === list.length - 1) {
|
|
46
|
+
currentSelectedItemIndex.current = 0;
|
|
47
|
+
} else {
|
|
48
|
+
currentSelectedItemIndex.current = currentSelectedItemIndex.current + 1;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var decrementIndex = function decrementIndex(list) {
|
|
53
|
+
if (currentSelectedItemIndex.current === 0) {
|
|
54
|
+
currentSelectedItemIndex.current = list.length - 1;
|
|
55
|
+
} else {
|
|
56
|
+
currentSelectedItemIndex.current = currentSelectedItemIndex.current - 1;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var handleArrowRight = function handleArrowRight() {
|
|
61
|
+
var _filteredFocusableEle;
|
|
62
|
+
|
|
63
|
+
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
64
|
+
incrementIndex(filteredFocusableElements);
|
|
65
|
+
(_filteredFocusableEle = filteredFocusableElements[currentSelectedItemIndex.current]) === null || _filteredFocusableEle === void 0 ? void 0 : _filteredFocusableEle.focus();
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var handleArrowLeft = function handleArrowLeft() {
|
|
69
|
+
var _filteredFocusableEle2;
|
|
70
|
+
|
|
71
|
+
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
72
|
+
decrementIndex(filteredFocusableElements);
|
|
73
|
+
(_filteredFocusableEle2 = filteredFocusableElements[currentSelectedItemIndex.current]) === null || _filteredFocusableEle2 === void 0 ? void 0 : _filteredFocusableEle2.focus();
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var handleTab = function handleTab() {
|
|
77
|
+
var _filteredFocusableEle3;
|
|
78
|
+
|
|
79
|
+
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
80
|
+
(_filteredFocusableEle3 = filteredFocusableElements[currentSelectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
var submenuKeydownHandleContext = {
|
|
84
|
+
handleArrowLeft: handleArrowLeft,
|
|
85
|
+
handleArrowRight: handleArrowRight,
|
|
86
|
+
handleTab: handleTab
|
|
87
|
+
};
|
|
88
|
+
(0, _react.useLayoutEffect)(function () {
|
|
89
|
+
if (!wrapperRef.current) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
var element = wrapperRef.current;
|
|
94
|
+
/**
|
|
95
|
+
* To handle the key events on the list
|
|
96
|
+
* @param event
|
|
97
|
+
*/
|
|
98
|
+
|
|
99
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
100
|
+
var _document$querySelect, _wrapperRef$current, _filteredFocusableEle4;
|
|
101
|
+
|
|
102
|
+
//To trap the focus inside the horizontal main toolbar for left and right arrow keys
|
|
103
|
+
var targetElement = event.target; //To filter out the events outside the main toolbar
|
|
104
|
+
|
|
105
|
+
if (!targetElement.closest("[data-testid='ak-editor-main-toolbar']")) {
|
|
106
|
+
return;
|
|
107
|
+
} //The key events are from child components such as dropdown menus / popups are ignored
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
if ((_document$querySelect = document.querySelector('[data-role="droplistContent"], [data-test-id="color-picker-menu"], [data-emoji-picker-container="true"]')) !== null && _document$querySelect !== void 0 && _document$querySelect.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
115
|
+
|
|
116
|
+
if (!filteredFocusableElements || (filteredFocusableElements === null || filteredFocusableElements === void 0 ? void 0 : filteredFocusableElements.length) === 0) {
|
|
117
|
+
return;
|
|
118
|
+
} //This is kind of hack to reset the current focused toolbar item
|
|
119
|
+
//to handle some usecases such as Tab in/out of main toolbar
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
if (!((_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 && _wrapperRef$current.contains(targetElement))) {
|
|
123
|
+
currentSelectedItemIndex.current = -1;
|
|
124
|
+
} else {
|
|
125
|
+
currentSelectedItemIndex.current = filteredFocusableElements.indexOf(targetElement) > -1 ? filteredFocusableElements.indexOf(targetElement) : currentSelectedItemIndex.current;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (event.key === 'ArrowRight') {
|
|
129
|
+
incrementIndex(filteredFocusableElements);
|
|
130
|
+
} else if (event.key === 'ArrowLeft') {
|
|
131
|
+
decrementIndex(filteredFocusableElements);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
(_filteredFocusableEle4 = filteredFocusableElements[currentSelectedItemIndex.current]) === null || _filteredFocusableEle4 === void 0 ? void 0 : _filteredFocusableEle4.focus();
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
element === null || element === void 0 ? void 0 : element.addEventListener('keydown', handleKeyDown);
|
|
138
|
+
return function () {
|
|
139
|
+
element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleKeyDown);
|
|
140
|
+
};
|
|
141
|
+
}, [currentSelectedItemIndex, wrapperRef, editorView]);
|
|
142
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
+
className: "custom-key-handler-wrapper",
|
|
144
|
+
ref: wrapperRef
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement(KeyDownHandlerContext.Provider, {
|
|
146
|
+
value: submenuKeydownHandleContext
|
|
147
|
+
}, children));
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
exports.ToolbarArrowKeyNavigationProvider = ToolbarArrowKeyNavigationProvider;
|
|
151
|
+
|
|
152
|
+
function getFocusableElements(rootNode) {
|
|
153
|
+
if (!rootNode) {
|
|
154
|
+
return [];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
var focusableModalElements = rootNode.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, div[tabindex="-1"], div[tabindex="0"]') || [];
|
|
158
|
+
return Array.from(focusableModalElements);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function getFilteredFocusableElements(rootNode) {
|
|
162
|
+
//The focusable elements from child components such as dropdown menus / popups are ignored
|
|
163
|
+
return getFocusableElements(rootNode).filter(function (elm) {
|
|
164
|
+
return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]');
|
|
165
|
+
});
|
|
166
|
+
}
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.expandIconWrapperStyle = exports.dropShadow = exports.clickSelectWrapperStyle = exports.
|
|
8
|
+
exports.expandIconWrapperStyle = exports.dropShadow = exports.clickSelectWrapperStyle = exports.buttonGroupStyle = exports.buttonContentStyle = exports.buttonContentReducedSpacingStyle = void 0;
|
|
9
9
|
Object.defineProperty(exports, "scrollbarStyles", {
|
|
10
10
|
enumerable: true,
|
|
11
11
|
get: function get() {
|
|
@@ -33,32 +33,26 @@ var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
|
33
33
|
|
|
34
34
|
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
35
35
|
|
|
36
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10
|
|
36
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
var cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
|
|
40
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &::before {\n background: ", ";\n }\n"])), selectedColor);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
exports.cellColourPreviewStyles = cellColourPreviewStyles;
|
|
44
|
-
var buttonGroupStyle = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n\n & > div {\n display: flex;\n }\n"])));
|
|
38
|
+
var buttonGroupStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n\n & > div {\n display: flex;\n }\n"])));
|
|
45
39
|
exports.buttonGroupStyle = buttonGroupStyle;
|
|
46
|
-
var separatorStyles = (0, _react.css)(
|
|
40
|
+
var separatorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), (0, _tokens.token)('color.border', _colors.N30));
|
|
47
41
|
exports.separatorStyles = separatorStyles;
|
|
48
|
-
var wrapperStyle = (0, _react.css)(
|
|
42
|
+
var wrapperStyle = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n\n > div,\n > span {\n display: flex;\n }\n\n > div > div {\n display: flex;\n }\n\n margin-left: 0;\n min-width: auto;\n"])));
|
|
49
43
|
exports.wrapperStyle = wrapperStyle;
|
|
50
|
-
var wrapperSmallStyle = (0, _react.css)(
|
|
44
|
+
var wrapperSmallStyle = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 4px;\n min-width: 40px;\n"])));
|
|
51
45
|
exports.wrapperSmallStyle = wrapperSmallStyle;
|
|
52
|
-
var expandIconWrapperStyle = (0, _react.css)(
|
|
46
|
+
var expandIconWrapperStyle = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: -8px;\n"])));
|
|
53
47
|
exports.expandIconWrapperStyle = expandIconWrapperStyle;
|
|
54
|
-
var triggerWrapperStyles = (0, _react.css)(
|
|
48
|
+
var triggerWrapperStyles = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n"])));
|
|
55
49
|
exports.triggerWrapperStyles = triggerWrapperStyles;
|
|
56
|
-
var buttonContentStyle = (0, _react.css)(
|
|
50
|
+
var buttonContentStyle = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n min-width: 80px;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n flex-direction: column;\n padding: 6px;\n"])));
|
|
57
51
|
exports.buttonContentStyle = buttonContentStyle;
|
|
58
|
-
var buttonContentReducedSpacingStyle = (0, _react.css)(
|
|
52
|
+
var buttonContentReducedSpacingStyle = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n padding: 8px;\n"]))); // Taken from the style of inline dialog components
|
|
59
53
|
|
|
60
54
|
exports.buttonContentReducedSpacingStyle = buttonContentReducedSpacingStyle;
|
|
61
|
-
var dropShadow = (0, _react.css)(
|
|
55
|
+
var dropShadow = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: ", ";\n"])), (0, _tokens.token)('elevation.shadow.overlay', "0 0 1px rgba(9, 30, 66, 0.31),\n 0 4px 8px -2px rgba(9, 30, 66, 0.25)"));
|
|
62
56
|
exports.dropShadow = dropShadow;
|
|
63
|
-
var clickSelectWrapperStyle = (0, _react.css)(
|
|
57
|
+
var clickSelectWrapperStyle = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n user-select: all;\n"])));
|
|
64
58
|
exports.clickSelectWrapperStyle = clickSelectWrapperStyle;
|
|
@@ -118,8 +118,8 @@ var copyToClipboard = /*#__PURE__*/function () {
|
|
|
118
118
|
exports.copyToClipboard = copyToClipboard;
|
|
119
119
|
|
|
120
120
|
var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
121
|
-
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(
|
|
122
|
-
var
|
|
121
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(elementToCopy, plainTextToCopy) {
|
|
122
|
+
var data, Clipboard, dt;
|
|
123
123
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
124
124
|
while (1) {
|
|
125
125
|
switch (_context2.prev = _context2.next) {
|
|
@@ -130,15 +130,19 @@ var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
_context2.prev = 1;
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
data = new ClipboardItem({
|
|
134
|
+
'text/plain': new Blob([plainTextToCopy || elementToCopy.innerText], {
|
|
135
|
+
type: 'text/plain'
|
|
136
|
+
}),
|
|
137
|
+
'text/html': new Blob([elementToCopy.innerHTML], {
|
|
138
|
+
type: 'text/html'
|
|
139
|
+
})
|
|
135
140
|
}); // @ts-ignore
|
|
136
141
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
})]; // @ts-ignore
|
|
142
|
+
_context2.next = 5;
|
|
143
|
+
return navigator.clipboard.write([data]);
|
|
140
144
|
|
|
141
|
-
|
|
145
|
+
case 5:
|
|
142
146
|
_context2.next = 10;
|
|
143
147
|
break;
|
|
144
148
|
|
|
@@ -148,7 +152,7 @@ var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
|
148
152
|
throw new Error('Clipboard api is not supported');
|
|
149
153
|
|
|
150
154
|
case 10:
|
|
151
|
-
_context2.next =
|
|
155
|
+
_context2.next = 17;
|
|
152
156
|
break;
|
|
153
157
|
|
|
154
158
|
case 12:
|
|
@@ -156,10 +160,11 @@ var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
|
156
160
|
// Hence of use of this polyfill
|
|
157
161
|
Clipboard = clipboard;
|
|
158
162
|
dt = new Clipboard.DT();
|
|
159
|
-
dt.setData('text/
|
|
163
|
+
dt.setData('text/plain', plainTextToCopy || elementToCopy.innerText);
|
|
164
|
+
dt.setData('text/html', elementToCopy.innerHTML);
|
|
160
165
|
Clipboard.write(dt);
|
|
161
166
|
|
|
162
|
-
case
|
|
167
|
+
case 17:
|
|
163
168
|
case "end":
|
|
164
169
|
return _context2.stop();
|
|
165
170
|
}
|
|
@@ -167,7 +172,7 @@ var copyHTMLToClipboard = /*#__PURE__*/function () {
|
|
|
167
172
|
}, _callee2, null, [[1, 7]]);
|
|
168
173
|
}));
|
|
169
174
|
|
|
170
|
-
return function copyHTMLToClipboard(_x2) {
|
|
175
|
+
return function copyHTMLToClipboard(_x2, _x3) {
|
|
171
176
|
return _ref3.apply(this, arguments);
|
|
172
177
|
};
|
|
173
178
|
}();
|
|
@@ -288,6 +288,19 @@ function processRawValue(schema, value, providerFactory, sanitizePrivateContent,
|
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
var _transformInvalidMedi = (0, _transforms.transformInvalidMediaContent)(transformedAdf);
|
|
292
|
+
|
|
293
|
+
transformedAdf = _transformInvalidMedi.transformedAdf;
|
|
294
|
+
isTransformed = _transformInvalidMedi.isTransformed;
|
|
295
|
+
|
|
296
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
297
|
+
dispatchAnalyticsEvent({
|
|
298
|
+
action: _enums.ACTION.INVALID_MEDIA_CONTENT_TRANSFORMED,
|
|
299
|
+
actionSubject: _enums.ACTION_SUBJECT.EDITOR,
|
|
300
|
+
eventType: _enums.EVENT_TYPE.OPERATIONAL
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
291
304
|
var entity = (0, _utils.validateADFEntity)(schema, transformedAdf || node, dispatchAnalyticsEvent);
|
|
292
305
|
var newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
|
|
293
306
|
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "SetAttrsStep", {
|
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
exports.areBlockTypesDisabled = areBlockTypesDisabled;
|
|
15
|
-
exports.arrayFrom = arrayFrom;
|
|
16
15
|
exports.canJoinDown = canJoinDown;
|
|
17
16
|
exports.canJoinUp = canJoinUp;
|
|
18
17
|
exports.canMoveDown = canMoveDown;
|
|
@@ -655,14 +654,6 @@ function stringRepeat(text, length) {
|
|
|
655
654
|
|
|
656
655
|
return result;
|
|
657
656
|
}
|
|
658
|
-
/**
|
|
659
|
-
* A replacement for `Array.from` until it becomes widely implemented.
|
|
660
|
-
*/
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
function arrayFrom(obj) {
|
|
664
|
-
return Array.prototype.slice.call(obj);
|
|
665
|
-
}
|
|
666
657
|
/*
|
|
667
658
|
* From Modernizr
|
|
668
659
|
* Returns the kind of transitionevent available for the element
|
|
@@ -9,16 +9,18 @@ exports.ruleWithTransform = exports.ruleWithAnalytics = exports.createWrappingTe
|
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
12
|
-
var _prosemirrorTransform = require("prosemirror-transform");
|
|
13
|
-
|
|
14
12
|
var _prosemirrorHistory = require("prosemirror-history");
|
|
15
13
|
|
|
16
14
|
var _prosemirrorState = require("prosemirror-state");
|
|
17
15
|
|
|
18
|
-
var
|
|
16
|
+
var _prosemirrorTransform = require("prosemirror-transform");
|
|
17
|
+
|
|
18
|
+
var _selection = require("@atlaskit/editor-common/selection");
|
|
19
19
|
|
|
20
20
|
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
21
21
|
|
|
22
|
+
var _analytics = require("../plugins/analytics");
|
|
23
|
+
|
|
22
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
25
|
|
|
24
26
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -27,7 +29,7 @@ var ruleWithAnalytics = function ruleWithAnalytics(getPayload) {
|
|
|
27
29
|
return function (originalRule) {
|
|
28
30
|
var onHandlerApply = function onHandlerApply(state, tr, matchResult) {
|
|
29
31
|
var payload = typeof getPayload === 'function' ? getPayload(state, matchResult) : getPayload;
|
|
30
|
-
(0,
|
|
32
|
+
(0, _analytics.addAnalytics)(state, tr, payload);
|
|
31
33
|
|
|
32
34
|
if (originalRule.onHandlerApply) {
|
|
33
35
|
originalRule.onHandlerApply(state, tr, matchResult);
|
|
@@ -86,7 +88,7 @@ var createPlugin = function createPlugin(pluginName, rules) {
|
|
|
86
88
|
var unsupportedMarks = isBlockNodeRule ? ['code', 'link', 'typeAheadQuery'] : ['code'];
|
|
87
89
|
var $from = state.selection.$from;
|
|
88
90
|
|
|
89
|
-
if ($from.parent.type.spec.code || !(state.selection instanceof _prosemirrorState.TextSelection) || hasUnsupportedMarks(state, from, to, unsupportedMarks) || isBlockNodeRule && isCursorInsideUnsupportedMarks(state, unsupportedMarks)) {
|
|
91
|
+
if ($from.parent.type.spec.code || !(state.selection instanceof _prosemirrorState.TextSelection) && !(state.selection instanceof _selection.GapCursorSelection) || hasUnsupportedMarks(state, from, to, unsupportedMarks) || isBlockNodeRule && isCursorInsideUnsupportedMarks(state, unsupportedMarks)) {
|
|
90
92
|
return false;
|
|
91
93
|
}
|
|
92
94
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isPositionNearTableRow = isPositionNearTableRow;
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
isPositionNearTableRow()
|
|
10
|
+
Returns true when a sibling node, or any of the parent's sibling
|
|
11
|
+
nodes are a tableRow
|
|
12
|
+
*/
|
|
13
|
+
function isPositionNearTableRow(pos, schema, direction) {
|
|
14
|
+
if (!schema.nodes.tableRow) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var doc = pos.doc;
|
|
19
|
+
var resolved = pos;
|
|
20
|
+
var sibling = direction === 'before' ? 'nodeBefore' : 'nodeAfter';
|
|
21
|
+
|
|
22
|
+
while (resolved.depth > 0) {
|
|
23
|
+
var _resolved$sibling;
|
|
24
|
+
|
|
25
|
+
var siblingType = (_resolved$sibling = resolved[sibling]) === null || _resolved$sibling === void 0 ? void 0 : _resolved$sibling.type;
|
|
26
|
+
|
|
27
|
+
if (siblingType === schema.nodes.tableRow) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
resolved = doc.resolve(resolved[direction]());
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "176.0.0";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -56,7 +56,7 @@ export function shouldReconfigureState(props, nextProps) {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
const mobileProperties = props.appearance === 'mobile' ? ['featureFlags', 'quickInsert'] : [];
|
|
59
|
-
const properties = ['appearance', 'persistScrollGutter', 'allowUndoRedoButtons', 'placeholder', ...mobileProperties];
|
|
59
|
+
const properties = ['appearance', 'persistScrollGutter', 'allowUndoRedoButtons', 'placeholder', 'sanitizePrivateContent', ...mobileProperties];
|
|
60
60
|
return properties.reduce((acc, curr) => acc || props[curr] !== nextProps[curr], false);
|
|
61
61
|
}
|
|
62
62
|
export class ReactEditorView extends React.Component {
|
|
@@ -38,7 +38,7 @@ export function getScrollGutterOptions(props) {
|
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
40
40
|
export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent) {
|
|
41
|
-
var _props$performanceTra, _props$linking, _props$
|
|
41
|
+
var _props$performanceTra, _props$linking, _props$performanceTra2, _props$textFormatting, _props$linking2;
|
|
42
42
|
|
|
43
43
|
const appearance = props.appearance;
|
|
44
44
|
const isMobile = appearance === 'mobile';
|
|
@@ -53,8 +53,7 @@ export function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEve
|
|
|
53
53
|
featureFlags: createFeatureFlagsFromProps(props),
|
|
54
54
|
paste: {
|
|
55
55
|
cardOptions,
|
|
56
|
-
sanitizePrivateContent: props.sanitizePrivateContent
|
|
57
|
-
plainTextPasteLinkification: ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.plainTextPasteLinkification) === true
|
|
56
|
+
sanitizePrivateContent: props.sanitizePrivateContent
|
|
58
57
|
},
|
|
59
58
|
base: {
|
|
60
59
|
allowInlineCursorTarget: !isMobile,
|
|
@@ -294,7 +293,6 @@ export default function createPluginsList(props, prevProps, createAnalyticsEvent
|
|
|
294
293
|
const extensionConfig = typeof props.allowExtension === 'object' ? props.allowExtension : {};
|
|
295
294
|
preset.add([extensionPlugin, {
|
|
296
295
|
breakoutEnabled: props.appearance === 'full-page' && extensionConfig.allowBreakout !== false,
|
|
297
|
-
stickToolbarToBottom: extensionConfig.stickToolbarToBottom,
|
|
298
296
|
allowAutoSave: extensionConfig.allowAutoSave,
|
|
299
297
|
extensionHandlers: props.extensionHandlers,
|
|
300
298
|
useLongPressSelection: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { addAltText, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, cut, copy, paste, altPaste, find, alignLeft,
|
|
1
|
+
export { addAltText, toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleSubscript, toggleSuperscript, toggleCode, pastePlainText, clearFormatting, setNormalText, toggleHeading1, toggleHeading2, toggleHeading3, toggleHeading4, toggleHeading5, toggleHeading6, toggleOrderedList, ctrlBackSpace, toggleBulletList, toggleBlockQuote, insertNewLine, shiftBackspace, splitCodeBlock, splitListItem, insertRule, undo, moveUp, moveDown, moveLeft, moveRight, indentList, outdentList, redo, openHelp, addLink, addInlineComment, submit, enter, shiftEnter, tab, indent, outdent, backspace, deleteKey, forwardDelete, space, escape, nextCell, previousCell, shiftTab, toggleTable, addRowBefore, addRowAfter, addColumnAfter, addColumnBefore, cut, copy, paste, altPaste, find, alignLeft, tooltip, ToolTipContent, findKeymapByDescription, findShortcutByDescription, findShortcutByKeymap, makeKeymap, makeKeyMapWithCommon, bindKeymapWithCommand, findKeyMapForBrowser, DOWN, HEADING_KEYS, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, LEFT, RIGHT, UP } from '@atlaskit/editor-common/keymaps';
|
|
@@ -13,9 +13,7 @@ export function useCXHTMLPreset({
|
|
|
13
13
|
}) {
|
|
14
14
|
const [preset] = useDefaultPreset({
|
|
15
15
|
featureFlags,
|
|
16
|
-
paste: {
|
|
17
|
-
plainTextPasteLinkification: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.plainTextPasteLinkification
|
|
18
|
-
}
|
|
16
|
+
paste: {}
|
|
19
17
|
});
|
|
20
18
|
preset.add([basePlugin, {
|
|
21
19
|
allowInlineCursorTarget: true,
|
|
@@ -37,9 +37,7 @@ export function useMobilePreset({
|
|
|
37
37
|
const mediaProvider = useProvider('mediaProvider');
|
|
38
38
|
const [preset] = useDefaultPreset({
|
|
39
39
|
featureFlags,
|
|
40
|
-
paste: {
|
|
41
|
-
plainTextPasteLinkification: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.plainTextPasteLinkification
|
|
42
|
-
}
|
|
40
|
+
paste: {}
|
|
43
41
|
});
|
|
44
42
|
preset.add([basePlugin, {
|
|
45
43
|
allowScrollGutter: {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
2
5
|
import React from 'react';
|
|
3
6
|
import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
4
7
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../plugins/analytics';
|
|
@@ -162,17 +165,21 @@ function getPortalChildren({
|
|
|
162
165
|
// within inline node view Components however would require a sizable
|
|
163
166
|
// refactor. A test suite to catch any instances of this is ideal however
|
|
164
167
|
// the refactor required is currently out of scope for https://product-fabric.atlassian.net/browse/ED-14176
|
|
165
|
-
return
|
|
168
|
+
return jsx(ErrorBoundary, {
|
|
166
169
|
component: ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
167
170
|
componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0 ? void 0 : (_currentNode$type = currentNode.type) === null || _currentNode$type === void 0 ? void 0 : _currentNode$type.name) !== null && _currentNode$type$nam !== void 0 ? _currentNode$type$nam : ACTION_SUBJECT_ID.UNKNOWN_NODE,
|
|
168
171
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
169
|
-
},
|
|
172
|
+
}, jsx("span", {
|
|
173
|
+
"aria-hidden": "true",
|
|
174
|
+
className: `zeroWidthSpaceContainer`
|
|
175
|
+
}, jsx("span", {
|
|
170
176
|
className: `${inlineNodeViewClassname}AddZeroWidthSpace`
|
|
171
|
-
}), ZERO_WIDTH_SPACE,
|
|
177
|
+
}), ZERO_WIDTH_SPACE), jsx(Component, _extends({
|
|
172
178
|
view: nodeViewParams.view,
|
|
173
179
|
getPos: nodeViewParams.getPos,
|
|
174
180
|
node: currentNode
|
|
175
|
-
}, extraComponentProps)),
|
|
181
|
+
}, extraComponentProps)), jsx("span", {
|
|
182
|
+
"aria-hidden": "true",
|
|
176
183
|
className: `${inlineNodeViewClassname}AddZeroWidthSpace`
|
|
177
184
|
}));
|
|
178
185
|
};
|
|
@@ -13,7 +13,7 @@ export const InlineNodeViewSharedStyles = css`
|
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
/* Then reset to the Editor default so we don't interfere
|
|
15
15
|
with any component styling. */
|
|
16
|
-
& >
|
|
16
|
+
& > *:not(span[aria-hidden='true'].zeroWidthSpaceContainer) {
|
|
17
17
|
white-space: pre-wrap;
|
|
18
18
|
}
|
|
19
19
|
}
|