@atlaskit/editor-core 175.0.5 → 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 +70 -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 +20 -18
- package/report.api.md +74 -74
package/.eslintrc.js
CHANGED
|
@@ -1,64 +1,30 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
+
rules: {
|
|
3
|
+
'import/no-restricted-paths': [
|
|
4
|
+
'warn',
|
|
5
|
+
{
|
|
6
|
+
zones: [
|
|
7
|
+
{
|
|
8
|
+
target: 'packages/editor/editor-core/src/**/*',
|
|
9
|
+
from: `packages/editor/editor-core/src/plugins/*/!(types)*`,
|
|
10
|
+
message:
|
|
11
|
+
'[ELR101] Avoid importing dependencies from editor plugins. Move shared code to a common location. https://developer.atlassian.com/cloud/framework/atlassian-frontend/editor/lint#elr101',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
target: 'packages/editor/editor-core/src/**/*',
|
|
15
|
+
from: `packages/editor/editor-core/src/plugins/*/!(types)**/*`,
|
|
16
|
+
message:
|
|
17
|
+
'[ELR101] Avoid importing dependencies from editor plugins. Move shared code to a common location. https://developer.atlassian.com/cloud/framework/atlassian-frontend/editor/lint#elr101',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
2
23
|
overrides: [
|
|
3
24
|
{
|
|
4
|
-
|
|
5
|
-
// TODO remove in https://product-fabric.atlassian.net/browse/DSP-4001
|
|
6
|
-
files: [
|
|
7
|
-
'./src/keymaps/index.tsx',
|
|
8
|
-
'./src/labs/next/full-page.tsx',
|
|
9
|
-
'./src/plugins/alignment/**/*',
|
|
10
|
-
'./src/plugins/block-type/**/*',
|
|
11
|
-
'./src/plugins/breakout/**/*',
|
|
12
|
-
'./src/plugins/card/**/*',
|
|
13
|
-
'./src/plugins/code-block/**/*',
|
|
14
|
-
'./src/plugins/collab-edit/**/*',
|
|
15
|
-
'./src/plugins/date/**/*',
|
|
16
|
-
'./src/plugins/emoji/**/*',
|
|
17
|
-
'./src/plugins/expand/**/*',
|
|
18
|
-
'./src/plugins/extension/**/*',
|
|
19
|
-
'./src/plugins/fake-text-cursor/**/*',
|
|
20
|
-
'./src/plugins/find-replace/**/*',
|
|
21
|
-
'./src/plugins/floating-toolbar/**/*',
|
|
22
|
-
'./src/plugins/grid/**/*',
|
|
23
|
-
'./src/plugins/help-dialog/**/*',
|
|
24
|
-
'./src/plugins/hyperlink/**/*',
|
|
25
|
-
'./src/plugins/jira-issue/**/*',
|
|
26
|
-
'./src/plugins/layout/**/*',
|
|
27
|
-
'./src/plugins/media/**/*',
|
|
28
|
-
'./src/plugins/mentions/**/*',
|
|
29
|
-
'./src/plugins/panel/**/*',
|
|
30
|
-
'./src/plugins/placeholder-text/**/*',
|
|
31
|
-
'./src/plugins/placeholder/**/*',
|
|
32
|
-
'./src/plugins/status/**/*',
|
|
33
|
-
'./src/plugins/table/**/*',
|
|
34
|
-
'./src/plugins/type-ahead/**/*',
|
|
35
|
-
'./src/ui/Addon/**/*',
|
|
36
|
-
'./src/ui/Appearance/**/*',
|
|
37
|
-
'./src/ui/ChromeCollapsed/**/*',
|
|
38
|
-
'./src/ui/ConfigPanel/**/*',
|
|
39
|
-
'./src/ui/ContentStyles/**/*',
|
|
40
|
-
'./src/ui/ContextPanel/**/*',
|
|
41
|
-
'./src/ui/DropdownMenu/**/*',
|
|
42
|
-
'./src/ui/ElementBrowser/**/*',
|
|
43
|
-
'./src/ui/ElementBrowser/**/*',
|
|
44
|
-
'./src/ui/FloatingToolbar/**/*',
|
|
45
|
-
'./src/ui/LinkSearch/**/*',
|
|
46
|
-
'./src/ui/PanelTextInput/**/*',
|
|
47
|
-
'./src/ui/Separator/**/*',
|
|
48
|
-
'./src/ui/styles.ts',
|
|
49
|
-
'./src/ui/ToolbarFeedback/**/*',
|
|
50
|
-
'./src/ui/WithFlash/**/*',
|
|
51
|
-
],
|
|
25
|
+
files: ['**/__tests__/**/*.{js,ts,tsx}', 'examples/**/*.{js,ts,tsx}'],
|
|
52
26
|
rules: {
|
|
53
|
-
'
|
|
54
|
-
'error',
|
|
55
|
-
{ shouldEnforceFallbacks: true },
|
|
56
|
-
],
|
|
57
|
-
'@atlaskit/design-system/no-unsafe-design-token-usage': [
|
|
58
|
-
'error',
|
|
59
|
-
{ shouldEnforceFallbacks: true },
|
|
60
|
-
],
|
|
61
|
-
'@atlaskit/design-system/no-deprecated-design-token-usage': ['warn'],
|
|
27
|
+
'import/no-restricted-paths': ['off'],
|
|
62
28
|
},
|
|
63
29
|
},
|
|
64
30
|
],
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 176.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`2df5ab17c10`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2df5ab17c10) - DSP-6459: Adds a background to code blocks in the editor to remove transparency. E.g. prevents table cell background colors from affecting code blocks. Also modifies code blocks in table headers to have a border instead of a different color when design tokens are enabled.
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- [`e657779ba39`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e657779ba39) - [ux] ED-15877 Added plain text fallback when using the copy button. When copying links, the url would be the plain text fallback. This also resolves ED-15955: copy button does not work on Android
|
|
12
|
+
- [`2e7d2c81d2f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e7d2c81d2f) - EDM-3626 Remove plain text paste linkification feature flag
|
|
13
|
+
the feature flag will not exist anymore so this cannot be enabled/disabled
|
|
14
|
+
plain text containing URLs will always be 'linkified' using shift-cmd-v/shift-ctrl-v
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`cb8f8e76d25`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb8f8e76d25) - Update types for react-select and @atlaskit/select upgrade
|
|
19
|
+
Update commerce-ui entrypoints that caused a pipeline issue.
|
|
20
|
+
- [`1a798ec6296`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1a798ec6296) - ED-15425 Adds table row check when using up arrow in table
|
|
21
|
+
- [`352f2b5a90f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/352f2b5a90f) - ED-15984 fix sticky toolbar on JIRA
|
|
22
|
+
- [`25617fe0633`](https://bitbucket.org/atlassian/atlassian-frontend/commits/25617fe0633) - [ux] ED-16010 this updates the text color picker to use design tokens when available.
|
|
23
|
+
- [`9f597c3c697`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9f597c3c697) - ED-14996 allow start/end line selection when cursor is next to an inline comment
|
|
24
|
+
- [`94f8a899d36`](https://bitbucket.org/atlassian/atlassian-frontend/commits/94f8a899d36) - [ED-15851] Add feature flags for the restart numbered lists project. These include:
|
|
25
|
+
|
|
26
|
+
- restartNumberedLists: Allow numbered lists to start from any number greater than 0, not just 1
|
|
27
|
+
- listNumberContinuity: Allow lists to continue their numbering when split by other nodes
|
|
28
|
+
- restartNumberedListsToolbar: Show a toolbar for users to restart the numbering of a list
|
|
29
|
+
|
|
30
|
+
We will be encapsulating all dev work under these flags.
|
|
31
|
+
|
|
32
|
+
These flags are for development purposes only, please don't turn these on. Only feature leads can turn these on.
|
|
33
|
+
|
|
34
|
+
- [`c472a1eed2f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c472a1eed2f) - DSP-3443 Updates tokens used for floating buttons; updated appearances only visible in applications configured to use the new Tokens API (currently in alpha).
|
|
35
|
+
- [`01472b73d72`](https://bitbucket.org/atlassian/atlassian-frontend/commits/01472b73d72) - DSP-4815 - Adds design tokens to non-custom panels. Updated appearances only visible in applications configured to use the new Tokens API (currently in alpha).
|
|
36
|
+
- [`7a1a5d392ef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7a1a5d392ef) - [ux][ed-15366] remove right align shortcut as it was interfering with default browser activity
|
|
37
|
+
- [`9995644eec0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9995644eec0) - [ux] ED-16095: Resolve a bug where the codeblock floating toolbar disappeared on selecting a language from the dropdown menu. (Add getter paths for atlaskit/select refs that safely work for both react-select v5 and v4 scenarios).
|
|
38
|
+
- [`8a11811caca`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8a11811caca) - ED-15298 clean up table cell optimisation
|
|
39
|
+
- [`10a6576545e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/10a6576545e) - [ED-16104] To fix a regression caused by [ED-15947] The arrow key behaviour is unexpected when we open find and replace button.
|
|
40
|
+
- [`be6ac35db24`](https://bitbucket.org/atlassian/atlassian-frontend/commits/be6ac35db24) - [ED-15485 & ED-15486] changes to make emojis and mention nodes screen reader compatible (only the ones which are rendered in the editor - toolbar and typeahead emojis are out of scope)
|
|
41
|
+
- [`0606572f9b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0606572f9b8) - [ux] ED-15348 docs(changeset): ED-15348 Fix a bug preventing typeahead actions to be fired from a gap cursor. Typing a typeahead trigger key (/, : or @) should pop-up a typeahead menu. However, if the current selection is inside a gap cursor, the trigger character is inserted and the pop-up menu doesn't open. This changeset fixes that.
|
|
42
|
+
- [`e143a0cc82e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e143a0cc82e) - [ED-15851] Adjust set up of feature flags for the restart numbered lists project so that they work for mobile.
|
|
43
|
+
- [`b80e36ad1fb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b80e36ad1fb) - ED-15290 adds padding bottom to chromeless editor
|
|
44
|
+
- [`6a9d0618b08`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a9d0618b08) - Fix bug on safari where the caret briefly appears in the middle of a mention after autocompleting a mention.
|
|
45
|
+
- [`e3f86801895`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e3f86801895) - To Focus the last typeahead list item when up arrow key is pressed [ED-15805]
|
|
46
|
+
- [`d5fd6da78ab`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d5fd6da78ab) - To add arrow key navigation for the main toolbar items and menu items [ED-15497]
|
|
47
|
+
|
|
48
|
+
To make the editor main toolbar items accessible using left and right arrow keys.
|
|
49
|
+
The menus are expandable using Space or Enter key, once the menus are expanded the options are accessible using up/down arrow keys.
|
|
50
|
+
'Esc' key closes the menus and focuses the toolbar item.
|
|
51
|
+
|
|
52
|
+
- [`1b489f87e1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1b489f87e1e) - Removed unused prop 'stickToolbarToBottom' from editor-core
|
|
53
|
+
- [`46561872fb9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/46561872fb9) - ED-16357 To restore default keyboard navigation in emoji popup in main toolbar
|
|
54
|
+
- [`9176a182f13`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9176a182f13) - [MEX-2012] Fix iOS 16 introduced regression in media single selection
|
|
55
|
+
- [`7bf4281949a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7bf4281949a) - ED-15704 - Fix missing hover inducators on Delete column and Delete row under table floating toolbar context menu
|
|
56
|
+
- [`e55b07b8fcd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e55b07b8fcd) - fix whole media caption is removed if delete emoji in it
|
|
57
|
+
- [`e5792780377`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e5792780377) - don't encode PM node twice when rendering table toolbar
|
|
58
|
+
- [`db75d733f3c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/db75d733f3c) - [ux] DSP-4354 - Adds design tokens for code snippet deletion hover state. Adds overlay for code snippet gutter to create a more saturated color for the deletion hover state. Updated appearances only visible in applications configured to use the new Tokens API (currently in alpha).
|
|
59
|
+
- [`c80ef2d3bd0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c80ef2d3bd0) - [ux] Allow tabbing past the save indicator
|
|
60
|
+
- [`3a66592edd7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3a66592edd7) - [ED-16104] To fix a regression caused by [ED-15947] The arrow key behaviour is unexpected when we open find and replace button.
|
|
61
|
+
- [`17014a9004c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/17014a9004c) - [ux] ED-15632 preprocess invalid media adf to avoid empty mediaSingle node and duplicated captions and media inside mediaSingle.The document will be transformed for this cases and validation error not thrown.When mediaSingle with empty content is encountered - it will be removed.When mediaSingle with duplicated captions or media nodes is encountered - duplicate captions or media nodes will be removed, prioritising removal of nodes with empty content first.
|
|
62
|
+
- [`8cc8e807222`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc8e807222) - DSP-4001 - Removes custom eslint rule for design token usage to follow a standard design token tech stack.
|
|
63
|
+
- [`c2510fa261f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c2510fa261f) - [ux] ED-15961 [ux] Updates the presentation of text color to use dark and light mode colors when those modes are enabled
|
|
64
|
+
- [`0724b5e6562`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0724b5e6562) - Fixed typeahead behaviour after undoing insertion.
|
|
65
|
+
- [`9116ae65eaf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9116ae65eaf) - [ux] ED-15345 fix annotation should work with leading and trailing whitespace across mark
|
|
66
|
+
- [`28e25520771`](https://bitbucket.org/atlassian/atlassian-frontend/commits/28e25520771) - [ED-16264] changes made to fix a regression caused in ED-15483 and ED-15497 , The arrow key navigation in 'Edit Link' 'Alt Text' popup and 'cell options' popup of table is hijacked incorrectly. post this fix the arrow key navigation behaviour should be deafult in these two popups
|
|
67
|
+
- [`84254f9842e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/84254f9842e) - ED-14828 Make sure typeahead does not show when it is at the beginning of the slash command
|
|
68
|
+
- [`47dfcc04652`](https://bitbucket.org/atlassian/atlassian-frontend/commits/47dfcc04652) - ED-15703 - Minor change on floating toolbar to allow z-index value to be passed as parameter
|
|
69
|
+
- [`58365aae521`](https://bitbucket.org/atlassian/atlassian-frontend/commits/58365aae521) - [ux] Refactor messages on tooltip of media toolbar item and media slash commend result to show video as an explicit upload option.
|
|
70
|
+
- [`3354633aa75`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3354633aa75) - Modified quick insert menu items such that they are read according to content design by screen readers.
|
|
71
|
+
- Updated dependencies
|
|
72
|
+
|
|
3
73
|
## 175.0.5
|
|
4
74
|
|
|
5
75
|
### Patch Changes
|
|
@@ -125,7 +125,7 @@ function shouldReconfigureState(props, nextProps) {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
var mobileProperties = props.appearance === 'mobile' ? ['featureFlags', 'quickInsert'] : [];
|
|
128
|
-
var properties = ['appearance', 'persistScrollGutter', 'allowUndoRedoButtons', 'placeholder'].concat(mobileProperties);
|
|
128
|
+
var properties = ['appearance', 'persistScrollGutter', 'allowUndoRedoButtons', 'placeholder', 'sanitizePrivateContent'].concat(mobileProperties);
|
|
129
129
|
return properties.reduce(function (acc, curr) {
|
|
130
130
|
return acc || props[curr] !== nextProps[curr];
|
|
131
131
|
}, false);
|
|
@@ -67,7 +67,7 @@ function getScrollGutterOptions(props) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent) {
|
|
70
|
-
var _props$performanceTra, _props$linking, _props$
|
|
70
|
+
var _props$performanceTra, _props$linking, _props$performanceTra2, _props$textFormatting, _props$linking2;
|
|
71
71
|
|
|
72
72
|
var appearance = props.appearance;
|
|
73
73
|
var isMobile = appearance === 'mobile';
|
|
@@ -82,8 +82,7 @@ function getDefaultPresetOptionsFromEditorProps(props, createAnalyticsEvent) {
|
|
|
82
82
|
featureFlags: (0, _featureFlagsFromProps.createFeatureFlagsFromProps)(props),
|
|
83
83
|
paste: {
|
|
84
84
|
cardOptions: cardOptions,
|
|
85
|
-
sanitizePrivateContent: props.sanitizePrivateContent
|
|
86
|
-
plainTextPasteLinkification: ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.plainTextPasteLinkification) === true
|
|
85
|
+
sanitizePrivateContent: props.sanitizePrivateContent
|
|
87
86
|
},
|
|
88
87
|
base: {
|
|
89
88
|
allowInlineCursorTarget: !isMobile,
|
|
@@ -322,7 +321,6 @@ function createPluginsList(props, prevProps, createAnalyticsEvent, insertNodeAPI
|
|
|
322
321
|
var extensionConfig = (0, _typeof2.default)(props.allowExtension) === 'object' ? props.allowExtension : {};
|
|
323
322
|
preset.add([_plugins.extensionPlugin, {
|
|
324
323
|
breakoutEnabled: props.appearance === 'full-page' && extensionConfig.allowBreakout !== false,
|
|
325
|
-
stickToolbarToBottom: extensionConfig.stickToolbarToBottom,
|
|
326
324
|
allowAutoSave: extensionConfig.allowAutoSave,
|
|
327
325
|
extensionHandlers: props.extensionHandlers,
|
|
328
326
|
useLongPressSelection: false,
|
|
@@ -129,12 +129,6 @@ Object.defineProperty(exports, "alignLeft", {
|
|
|
129
129
|
return _keymaps.alignLeft;
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
-
Object.defineProperty(exports, "alignRight", {
|
|
133
|
-
enumerable: true,
|
|
134
|
-
get: function get() {
|
|
135
|
-
return _keymaps.alignRight;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
132
|
Object.defineProperty(exports, "altPaste", {
|
|
139
133
|
enumerable: true,
|
|
140
134
|
get: function get() {
|
|
@@ -29,9 +29,7 @@ function useCXHTMLPreset(_ref) {
|
|
|
29
29
|
|
|
30
30
|
var _useDefaultPreset = (0, _default.useDefaultPreset)({
|
|
31
31
|
featureFlags: featureFlags,
|
|
32
|
-
paste: {
|
|
33
|
-
plainTextPasteLinkification: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.plainTextPasteLinkification
|
|
34
|
-
}
|
|
32
|
+
paste: {}
|
|
35
33
|
}),
|
|
36
34
|
_useDefaultPreset2 = (0, _slicedToArray2.default)(_useDefaultPreset, 1),
|
|
37
35
|
preset = _useDefaultPreset2[0];
|
|
@@ -75,9 +75,7 @@ function useMobilePreset(_ref) {
|
|
|
75
75
|
|
|
76
76
|
var _useDefaultPreset = (0, _default.useDefaultPreset)({
|
|
77
77
|
featureFlags: featureFlags,
|
|
78
|
-
paste: {
|
|
79
|
-
plainTextPasteLinkification: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.plainTextPasteLinkification
|
|
80
|
-
}
|
|
78
|
+
paste: {}
|
|
81
79
|
}),
|
|
82
80
|
_useDefaultPreset2 = (0, _slicedToArray2.default)(_useDefaultPreset, 1),
|
|
83
81
|
preset = _useDefaultPreset2[0];
|
|
@@ -10,7 +10,9 @@ exports.inlineNodeViewClassname = void 0;
|
|
|
10
10
|
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
12
|
|
|
13
|
-
var _react =
|
|
13
|
+
var _react = require("@emotion/react");
|
|
14
|
+
|
|
15
|
+
var _react2 = _interopRequireDefault(require("react"));
|
|
14
16
|
|
|
15
17
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
18
|
|
|
@@ -22,6 +24,7 @@ var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
|
22
24
|
|
|
23
25
|
var _getPerformanceOptions = require("./getPerformanceOptions");
|
|
24
26
|
|
|
27
|
+
/** @jsx jsx */
|
|
25
28
|
var inlineNodeViewClassname = 'inlineNodeView';
|
|
26
29
|
exports.inlineNodeViewClassname = inlineNodeViewClassname;
|
|
27
30
|
|
|
@@ -176,17 +179,21 @@ function getPortalChildren(_ref2) {
|
|
|
176
179
|
// within inline node view Components however would require a sizable
|
|
177
180
|
// refactor. A test suite to catch any instances of this is ideal however
|
|
178
181
|
// the refactor required is currently out of scope for https://product-fabric.atlassian.net/browse/ED-14176
|
|
179
|
-
return
|
|
182
|
+
return (0, _react.jsx)(_ErrorBoundary.ErrorBoundary, {
|
|
180
183
|
component: _analytics.ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
181
184
|
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 : _analytics.ACTION_SUBJECT_ID.UNKNOWN_NODE,
|
|
182
185
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
183
|
-
},
|
|
186
|
+
}, (0, _react.jsx)("span", {
|
|
187
|
+
"aria-hidden": "true",
|
|
188
|
+
className: "zeroWidthSpaceContainer"
|
|
189
|
+
}, (0, _react.jsx)("span", {
|
|
184
190
|
className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
|
|
185
|
-
}), _utils.ZERO_WIDTH_SPACE,
|
|
191
|
+
}), _utils.ZERO_WIDTH_SPACE), (0, _react.jsx)(Component, (0, _extends2.default)({
|
|
186
192
|
view: nodeViewParams.view,
|
|
187
193
|
getPos: nodeViewParams.getPos,
|
|
188
194
|
node: currentNode
|
|
189
|
-
}, extraComponentProps)),
|
|
195
|
+
}, extraComponentProps)), (0, _react.jsx)("span", {
|
|
196
|
+
"aria-hidden": "true",
|
|
190
197
|
className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
|
|
191
198
|
}));
|
|
192
199
|
};
|
|
@@ -19,5 +19,5 @@ var _templateObject;
|
|
|
19
19
|
|
|
20
20
|
// For reasoning behind styles, see comments in:
|
|
21
21
|
// ./getInlineNodeViewProducer -> portalChildren()
|
|
22
|
-
var InlineNodeViewSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & >
|
|
22
|
+
var InlineNodeViewSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > *:not(span[aria-hidden='true'].zeroWidthSpaceContainer) {\n white-space: pre-wrap;\n }\n }\n /** Remove browser deafult selections style. This prevents\n unexpected visual artefacts in Safari when navigating\n with the keyboard or making range selections. */\n &.ua-safari {\n .", " {\n ::selection,\n *::selection {\n background: transparent;\n }\n }\n }\n\n &.ua-chrome .", " > span {\n user-select: none;\n }\n\n .", "AddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), _getInlineNodeViewProducer.inlineNodeViewClassname, _getInlineNodeViewProducer.inlineNodeViewClassname, _getInlineNodeViewProducer.inlineNodeViewClassname, _getInlineNodeViewProducer.inlineNodeViewClassname, _utils.ZERO_WIDTH_SPACE);
|
|
23
23
|
exports.InlineNodeViewSharedStyles = InlineNodeViewSharedStyles;
|
|
@@ -14,6 +14,5 @@ var _commands = require("../commands");
|
|
|
14
14
|
function keymapPlugin() {
|
|
15
15
|
var list = {};
|
|
16
16
|
(0, _keymaps.bindKeymapWithCommand)(_keymaps.alignLeft.common, (0, _commands.changeAlignment)('start'), list);
|
|
17
|
-
(0, _keymaps.bindKeymapWithCommand)(_keymaps.alignRight.common, (0, _commands.changeAlignment)('end'), list);
|
|
18
17
|
return (0, _prosemirrorKeymap.keymap)(list);
|
|
19
18
|
}
|
|
@@ -60,6 +60,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
63
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "toolbarItemRef", /*#__PURE__*/_react.default.createRef());
|
|
63
64
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
64
65
|
isOpen: false
|
|
65
66
|
});
|
|
@@ -80,13 +81,27 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
80
81
|
isOpen: isOpen
|
|
81
82
|
});
|
|
82
83
|
});
|
|
83
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hide", function () {
|
|
84
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hide", function (attrs) {
|
|
84
85
|
if (_this.state.isOpen) {
|
|
85
86
|
_this.setState({
|
|
86
87
|
isOpen: false
|
|
87
88
|
});
|
|
89
|
+
|
|
90
|
+
if ((attrs === null || attrs === void 0 ? void 0 : attrs.event) instanceof KeyboardEvent && attrs.event.key === 'Escape') {
|
|
91
|
+
var _this$toolbarItemRef, _this$toolbarItemRef$;
|
|
92
|
+
|
|
93
|
+
(_this$toolbarItemRef = _this.toolbarItemRef) === null || _this$toolbarItemRef === void 0 ? void 0 : (_this$toolbarItemRef$ = _this$toolbarItemRef.current) === null || _this$toolbarItemRef$ === void 0 ? void 0 : _this$toolbarItemRef$.focus();
|
|
94
|
+
}
|
|
88
95
|
}
|
|
89
96
|
});
|
|
97
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hideonEsc", function () {
|
|
98
|
+
var _this$toolbarItemRef2, _this$toolbarItemRef3;
|
|
99
|
+
|
|
100
|
+
_this.hide(); //To set the focus on the textcolor button when the menu is closed by 'Esc' only (aria guidelines)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
(_this$toolbarItemRef2 = _this.toolbarItemRef) === null || _this$toolbarItemRef2 === void 0 ? void 0 : (_this$toolbarItemRef3 = _this$toolbarItemRef2.current) === null || _this$toolbarItemRef3 === void 0 ? void 0 : _this$toolbarItemRef3.focus();
|
|
104
|
+
});
|
|
90
105
|
return _this;
|
|
91
106
|
}
|
|
92
107
|
|
|
@@ -112,10 +127,17 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
112
127
|
boundariesElement: popupsBoundariesElement,
|
|
113
128
|
scrollableElement: popupsScrollableElement,
|
|
114
129
|
isOpen: isOpen,
|
|
115
|
-
handleClickOutside:
|
|
116
|
-
|
|
130
|
+
handleClickOutside: function handleClickOutside(event) {
|
|
131
|
+
return _this2.hide({
|
|
132
|
+
isOpen: false,
|
|
133
|
+
event: event
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
handleEscapeKeydown: this.hideonEsc,
|
|
137
|
+
onOpenChange: this.hide,
|
|
117
138
|
fitWidth: 112,
|
|
118
139
|
fitHeight: 80,
|
|
140
|
+
closeonTab: true,
|
|
119
141
|
trigger: (0, _react2.jsx)(_ToolbarButton.default, {
|
|
120
142
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
121
143
|
disabled: disabled,
|
|
@@ -134,7 +156,8 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
134
156
|
css: _styles.expandIconWrapper
|
|
135
157
|
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
136
158
|
label: ""
|
|
137
|
-
})))
|
|
159
|
+
}))),
|
|
160
|
+
ref: this.toolbarItemRef
|
|
138
161
|
})
|
|
139
162
|
}, (0, _react2.jsx)(_Alignment.default, {
|
|
140
163
|
onClick: function onClick(align) {
|
|
@@ -23,10 +23,6 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
23
23
|
|
|
24
24
|
var _nodeviews = require("../../../nodeviews");
|
|
25
25
|
|
|
26
|
-
var _WithPluginState = _interopRequireDefault(require("../../../ui/WithPluginState"));
|
|
27
|
-
|
|
28
|
-
var _utils = require("../utils");
|
|
29
|
-
|
|
30
26
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
31
27
|
|
|
32
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -58,37 +54,13 @@ var AnnotationNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
58
54
|
}, {
|
|
59
55
|
key: "render",
|
|
60
56
|
value: function render(_props, forwardRef) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
render: function render(_ref) {
|
|
69
|
-
var inlineCommentState = _ref.inlineCommentState;
|
|
70
|
-
|
|
71
|
-
if (!(inlineCommentState !== null && inlineCommentState !== void 0 && inlineCommentState.isVisible)) {
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
73
|
-
ref: forwardRef
|
|
74
|
-
});
|
|
75
|
-
} // Check if selection includes current annotation ID
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var annotations = inlineCommentState.annotations,
|
|
79
|
-
selectedAnnotations = inlineCommentState.selectedAnnotations;
|
|
80
|
-
var id = _this.node.attrs.id;
|
|
81
|
-
var isUnresolved = annotations[id] === false;
|
|
82
|
-
var annotationHasFocus = selectedAnnotations.some(function (x) {
|
|
83
|
-
return x.id === id;
|
|
84
|
-
});
|
|
85
|
-
var className = getAnnotationViewClassname(isUnresolved, annotationHasFocus);
|
|
86
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
87
|
-
className: className,
|
|
88
|
-
ref: forwardRef
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
});
|
|
57
|
+
return (
|
|
58
|
+
/*#__PURE__*/
|
|
59
|
+
// all inline comment states are now set in decorations at ../pm-plugins/inline-comment.ts
|
|
60
|
+
_react.default.createElement("span", {
|
|
61
|
+
ref: forwardRef
|
|
62
|
+
})
|
|
63
|
+
);
|
|
92
64
|
}
|
|
93
65
|
}]);
|
|
94
66
|
return AnnotationNodeView;
|
|
@@ -17,6 +17,8 @@ var _inlineCommentEvents = require("./../../analytics/types/inline-comment-event
|
|
|
17
17
|
|
|
18
18
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
19
19
|
|
|
20
|
+
var _prosemirrorView = require("prosemirror-view");
|
|
21
|
+
|
|
20
22
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
21
23
|
|
|
22
24
|
var _nodeviews = require("../nodeviews");
|
|
@@ -237,10 +239,34 @@ var inlineCommentPlugin = function inlineCommentPlugin(options) {
|
|
|
237
239
|
}
|
|
238
240
|
},
|
|
239
241
|
decorations: function decorations(state) {
|
|
242
|
+
// highlight comments, depending on state
|
|
240
243
|
var _getPluginState3 = (0, _utils.getPluginState)(state),
|
|
241
|
-
draftDecorationSet = _getPluginState3.draftDecorationSet
|
|
244
|
+
draftDecorationSet = _getPluginState3.draftDecorationSet,
|
|
245
|
+
annotations = _getPluginState3.annotations,
|
|
246
|
+
selectedAnnotations = _getPluginState3.selectedAnnotations,
|
|
247
|
+
isVisible = _getPluginState3.isVisible;
|
|
248
|
+
|
|
249
|
+
var decorations = draftDecorationSet !== null && draftDecorationSet !== void 0 ? draftDecorationSet : _prosemirrorView.DecorationSet.empty;
|
|
250
|
+
var focusDecorations = [];
|
|
251
|
+
state.doc.descendants(function (node, pos) {
|
|
252
|
+
node.marks.filter(function (mark) {
|
|
253
|
+
return mark.type === state.schema.marks.annotation;
|
|
254
|
+
}).forEach(function (mark) {
|
|
255
|
+
var isSelected = selectedAnnotations.some(function (selectedAnnotation) {
|
|
256
|
+
return selectedAnnotation.id === mark.attrs.id;
|
|
257
|
+
});
|
|
258
|
+
var isUnresolved = annotations[mark.attrs.id] === false;
|
|
242
259
|
|
|
243
|
-
|
|
260
|
+
if (isVisible) {
|
|
261
|
+
focusDecorations.push(_prosemirrorView.Decoration.inline(pos, pos + node.nodeSize, {
|
|
262
|
+
class: "".concat((0, _nodeviews.getAnnotationViewClassname)(isUnresolved, isSelected), " ").concat(isUnresolved),
|
|
263
|
+
nodeName: 'span'
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
decorations = decorations.add(state.doc, focusDecorations);
|
|
269
|
+
return decorations;
|
|
244
270
|
}
|
|
245
271
|
}
|
|
246
272
|
});
|
|
@@ -323,7 +323,7 @@ var isSelectionValid = function isSelectionValid(state) {
|
|
|
323
323
|
return _types.AnnotationSelectionType.DISABLED;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
if (disallowOnWhitespace && hasInvalidWhitespaceNode(selection)) {
|
|
326
|
+
if (disallowOnWhitespace && hasInvalidWhitespaceNode(selection, state.schema)) {
|
|
327
327
|
return _types.AnnotationSelectionType.INVALID;
|
|
328
328
|
}
|
|
329
329
|
|
|
@@ -379,10 +379,14 @@ function isEmptyTextSelection(selection, schema) {
|
|
|
379
379
|
*/
|
|
380
380
|
|
|
381
381
|
|
|
382
|
-
function hasInvalidWhitespaceNode(selection) {
|
|
382
|
+
function hasInvalidWhitespaceNode(selection, schema) {
|
|
383
383
|
var foundInvalidWhitespace = false;
|
|
384
384
|
var content = selection.content().content;
|
|
385
385
|
content.descendants(function (node) {
|
|
386
|
+
if ((0, _utils2.isText)(node, schema)) {
|
|
387
|
+
return false;
|
|
388
|
+
}
|
|
389
|
+
|
|
386
390
|
if (node.textContent.trim() === '') {
|
|
387
391
|
// Trailing new lines do not result in the annotation spanning into
|
|
388
392
|
// the trailing new line so can be ignored when looking for invalid
|
|
@@ -390,7 +394,7 @@ function hasInvalidWhitespaceNode(selection) {
|
|
|
390
394
|
var nodeIsTrailingNewLine = // it is the final node
|
|
391
395
|
node.eq(content.lastChild) && // and there are multiple nodes
|
|
392
396
|
!node.eq(content.firstChild) && // and it is a paragraph node
|
|
393
|
-
node
|
|
397
|
+
(0, _utils2.isParagraph)(node, schema);
|
|
394
398
|
|
|
395
399
|
if (!nodeIsTrailingNewLine) {
|
|
396
400
|
foundInvalidWhitespace = true;
|
|
@@ -58,6 +58,7 @@ var _default = function _default() {
|
|
|
58
58
|
var createWidget = function createWidget(side) {
|
|
59
59
|
var node = document.createElement('span');
|
|
60
60
|
node.contentEditable = 'true';
|
|
61
|
+
node.setAttribute('aria-hidden', 'true');
|
|
61
62
|
node.appendChild(document.createTextNode(_utils.ZERO_WIDTH_SPACE));
|
|
62
63
|
node.className = 'cursor-target';
|
|
63
64
|
return _prosemirrorView.Decoration.widget(selection.from, node, {
|
|
@@ -61,7 +61,10 @@ var CaptionNodeView = /*#__PURE__*/function (_SelectionBasedNodeVi) {
|
|
|
61
61
|
}, {
|
|
62
62
|
key: "getContentDOM",
|
|
63
63
|
value: function getContentDOM() {
|
|
64
|
-
var dom = document.createElement('div');
|
|
64
|
+
var dom = document.createElement('div'); // setting a className prevents PM/Chrome mutation observer from
|
|
65
|
+
// incorrectly deleting nodes
|
|
66
|
+
|
|
67
|
+
dom.className = 'caption-wrapper';
|
|
65
68
|
return {
|
|
66
69
|
dom: dom
|
|
67
70
|
};
|
|
@@ -86,9 +86,10 @@ var getCustomStyles = function getCustomStyles(selected, disabled) {
|
|
|
86
86
|
return [primitiveStyles, unselectedStyles, interactiveStyles];
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
+
//tabindex is -1 as the menu options should be focusable explicitly only by arrow keys.
|
|
89
90
|
var OptionRoot = function OptionRoot(props) {
|
|
90
91
|
return (0, _react2.jsx)("div", (0, _extends2.default)({}, props, {
|
|
91
|
-
tabIndex:
|
|
92
|
+
tabIndex: -1
|
|
92
93
|
}));
|
|
93
94
|
};
|
|
94
95
|
|
|
@@ -36,6 +36,8 @@ var toDOM = function toDOM(node) {
|
|
|
36
36
|
class: _classNames.codeBlockClassNames.start,
|
|
37
37
|
contenteditable: 'false'
|
|
38
38
|
}], ['div', {
|
|
39
|
+
class: _classNames.codeBlockClassNames.contentWrapper
|
|
40
|
+
}, ['div', {
|
|
39
41
|
class: _classNames.codeBlockClassNames.gutter,
|
|
40
42
|
contenteditable: 'false'
|
|
41
43
|
}], ['div', {
|
|
@@ -45,7 +47,7 @@ var toDOM = function toDOM(node) {
|
|
|
45
47
|
spellcheck: 'false',
|
|
46
48
|
contenteditable: 'true',
|
|
47
49
|
'data-testid': 'code-block--code'
|
|
48
|
-
}, 0]], ['div', {
|
|
50
|
+
}, 0]]], ['div', {
|
|
49
51
|
class: _classNames.codeBlockClassNames.end,
|
|
50
52
|
contenteditable: 'false'
|
|
51
53
|
}]];
|
|
@@ -97,7 +99,8 @@ var CodeBlockView = /*#__PURE__*/function () {
|
|
|
97
99
|
if ((_this$dom = this.dom) !== null && _this$dom !== void 0 && _this$dom.childNodes && this.dom.childNodes.length > 1) {
|
|
98
100
|
var _contentView$childNod;
|
|
99
101
|
|
|
100
|
-
var
|
|
102
|
+
var contentWrapper = this.dom.childNodes[1];
|
|
103
|
+
var contentView = contentWrapper === null || contentWrapper === void 0 ? void 0 : contentWrapper.childNodes[1];
|
|
101
104
|
|
|
102
105
|
if ((contentView === null || contentView === void 0 ? void 0 : (_contentView$childNod = contentView.childNodes) === null || _contentView$childNod === void 0 ? void 0 : _contentView$childNod.length) > 0) {
|
|
103
106
|
var codeElement = contentView.firstChild;
|
|
@@ -121,7 +124,8 @@ var CodeBlockView = /*#__PURE__*/function () {
|
|
|
121
124
|
var _this$dom2;
|
|
122
125
|
|
|
123
126
|
if ((_this$dom2 = this.dom) !== null && _this$dom2 !== void 0 && _this$dom2.childNodes && this.dom.childNodes.length > 1) {
|
|
124
|
-
var
|
|
127
|
+
var contentWrapper = this.dom.childNodes[1];
|
|
128
|
+
var contentView = contentWrapper === null || contentWrapper === void 0 ? void 0 : contentWrapper.childNodes[1];
|
|
125
129
|
|
|
126
130
|
if (contentView !== null && contentView !== void 0 && contentView.childNodes && contentView.childNodes.length > 1) {
|
|
127
131
|
var savedInnerHTML = '';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.refreshBrowserSelection = exports.default = void 0;
|
|
7
7
|
|
|
8
8
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
9
9
|
|
|
@@ -24,6 +24,8 @@ var refreshBrowserSelection = function refreshBrowserSelection() {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
exports.refreshBrowserSelection = refreshBrowserSelection;
|
|
28
|
+
|
|
27
29
|
var refreshBrowserSelectionOnChange = function refreshBrowserSelectionOnChange(transaction, editorState) {
|
|
28
30
|
var _pluginKey$getState;
|
|
29
31
|
|