@atlaskit/editor-core 176.0.2 → 177.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 +2 -2
- package/CHANGELOG.md +114 -0
- package/codemods/{173.0.0-rename-unsafe-allowUndoRedoButton-prop.ts → 175.0.0-rename-unsafe-allowUndoRedoButton-prop.ts} +0 -0
- package/dist/cjs/create-editor/ReactEditorView.js +3 -1
- package/dist/cjs/create-editor/create-plugins-list.js +9 -6
- package/dist/cjs/create-editor/messages.js +17 -0
- package/dist/cjs/i18n/en.js +2 -2
- package/dist/cjs/i18n/en_GB.js +2 -2
- package/dist/cjs/i18n/en_ZZ.js +2 -2
- package/dist/cjs/i18n/index.js +4 -4
- package/dist/cjs/i18n/languages.js +9 -4
- package/dist/cjs/labs/next/presets/mobile.js +2 -2
- package/dist/cjs/labs/next/presets/preset.js +38 -6
- package/dist/cjs/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +6 -1
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +5 -1
- package/dist/cjs/plugins/card/pm-plugins/doc.js +18 -29
- package/dist/cjs/plugins/card/pm-plugins/main.js +7 -21
- package/dist/cjs/plugins/card/toolbar.js +24 -8
- package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +9 -5
- package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +19 -53
- package/dist/cjs/plugins/card/utils.js +17 -3
- package/dist/cjs/plugins/collab-edit/actions.js +3 -3
- package/dist/cjs/plugins/copy-button/toolbar.js +5 -3
- package/dist/cjs/plugins/date/index.js +1 -7
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +1 -2
- package/dist/cjs/plugins/emoji/index.js +7 -14
- package/dist/cjs/plugins/expand/pm-plugins/main.js +4 -1
- package/dist/cjs/plugins/expand/toolbar.js +1 -0
- package/dist/cjs/plugins/extension/commands.js +17 -2
- package/dist/cjs/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/cjs/plugins/extension/toolbar.js +49 -7
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -2
- package/dist/cjs/plugins/floating-toolbar/index.js +16 -4
- package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +99 -0
- package/dist/cjs/plugins/floating-toolbar/ui/ConfirmationModal.js +10 -30
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +16 -4
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +108 -55
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -2
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +29 -108
- package/dist/cjs/plugins/floating-toolbar/ui/SimpleModal.js +51 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +27 -47
- package/dist/cjs/plugins/floating-toolbar/ui/messages.js +13 -3
- package/dist/cjs/plugins/floating-toolbar/utils.js +4 -19
- package/dist/cjs/plugins/help-dialog/index.js +3 -2
- package/dist/cjs/plugins/hyperlink/Toolbar.js +20 -1
- package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +6 -3
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -10
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +26 -12
- package/dist/cjs/plugins/layout/toolbar.js +1 -0
- package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +34 -4
- package/dist/cjs/plugins/list/commands/outdent-list.js +1 -1
- package/dist/cjs/plugins/list/index.js +6 -2
- package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/cjs/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/cjs/plugins/list/pm-plugins/main.js +32 -10
- package/dist/cjs/plugins/media/index.js +35 -0
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +7 -6
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +70 -64
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +6 -0
- package/dist/cjs/plugins/media/toolbar/index.js +3 -0
- package/dist/cjs/plugins/media/utils/media-single.js +19 -3
- package/dist/cjs/plugins/panel/toolbar.js +1 -0
- package/dist/cjs/plugins/panel/utils.js +1 -1
- package/dist/cjs/plugins/paste/index.js +2 -1
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +19 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/paste/util/index.js +2 -2
- package/dist/cjs/plugins/placeholder/index.js +24 -47
- package/dist/cjs/plugins/placeholder/styles.js +2 -4
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +7 -3
- package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +10 -5
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +5 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +5 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -6
- package/dist/cjs/plugins/type-ahead/index.js +2 -8
- package/dist/cjs/plugins/type-ahead/messages.js +44 -4
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +0 -1
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +17 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +9 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
- package/dist/cjs/plugins/type-ahead/utils.js +44 -2
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -2
- package/dist/cjs/ui/Alignment/AlignmentButton/index.js +4 -1
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/cjs/ui/CollapsedEditor/index.js +4 -2
- package/dist/cjs/ui/ColorPickerButton/index.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -4
- package/dist/cjs/ui/ConfigPanel/FormContent.js +2 -1
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +3 -1
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +55 -33
- package/dist/cjs/utils/commands.js +25 -13
- package/dist/cjs/utils/input-rules.js +26 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -1
- package/dist/es2019/create-editor/create-plugins-list.js +9 -6
- package/dist/es2019/create-editor/messages.js +8 -0
- package/dist/es2019/i18n/en.js +2 -2
- package/dist/es2019/i18n/en_GB.js +2 -2
- package/dist/es2019/i18n/en_ZZ.js +2 -2
- package/dist/es2019/i18n/index.js +4 -4
- package/dist/es2019/i18n/languages.js +9 -4
- package/dist/es2019/labs/next/presets/mobile.js +2 -2
- package/dist/es2019/labs/next/presets/preset.js +28 -7
- package/dist/es2019/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +5 -1
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +4 -1
- package/dist/es2019/plugins/card/pm-plugins/doc.js +10 -19
- package/dist/es2019/plugins/card/pm-plugins/main.js +4 -19
- package/dist/es2019/plugins/card/toolbar.js +19 -2
- package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +8 -6
- package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +7 -36
- package/dist/es2019/plugins/card/utils.js +15 -2
- package/dist/es2019/plugins/collab-edit/actions.js +3 -3
- package/dist/es2019/plugins/copy-button/toolbar.js +5 -3
- package/dist/es2019/plugins/date/index.js +0 -7
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +1 -2
- package/dist/es2019/plugins/emoji/index.js +7 -13
- package/dist/es2019/plugins/expand/pm-plugins/main.js +3 -3
- package/dist/es2019/plugins/expand/toolbar.js +1 -0
- package/dist/es2019/plugins/extension/commands.js +10 -1
- package/dist/es2019/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/es2019/plugins/extension/toolbar.js +43 -8
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -3
- package/dist/es2019/plugins/floating-toolbar/index.js +15 -5
- package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +70 -0
- package/dist/es2019/plugins/floating-toolbar/ui/ConfirmationModal.js +8 -27
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +17 -4
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +96 -50
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +29 -76
- package/dist/es2019/plugins/floating-toolbar/ui/SimpleModal.js +32 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +26 -46
- package/dist/es2019/plugins/floating-toolbar/ui/messages.js +14 -4
- package/dist/es2019/plugins/floating-toolbar/utils.js +4 -17
- package/dist/es2019/plugins/help-dialog/index.js +2 -2
- package/dist/es2019/plugins/hyperlink/Toolbar.js +18 -2
- package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +9 -2
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -9
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +25 -12
- package/dist/es2019/plugins/layout/toolbar.js +1 -0
- package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +24 -4
- package/dist/es2019/plugins/list/commands/outdent-list.js +1 -1
- package/dist/es2019/plugins/list/index.js +7 -3
- package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/es2019/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/es2019/plugins/list/pm-plugins/main.js +31 -11
- package/dist/es2019/plugins/media/index.js +38 -0
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +6 -5
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +7 -0
- package/dist/es2019/plugins/media/toolbar/index.js +3 -0
- package/dist/es2019/plugins/media/utils/media-single.js +20 -3
- package/dist/es2019/plugins/panel/toolbar.js +1 -0
- package/dist/es2019/plugins/panel/utils.js +1 -1
- package/dist/es2019/plugins/paste/index.js +2 -1
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +15 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/paste/util/index.js +2 -2
- package/dist/es2019/plugins/placeholder/index.js +21 -47
- package/dist/es2019/plugins/placeholder/styles.js +1 -19
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +6 -3
- package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +8 -7
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +4 -1
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +18 -12
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -7
- package/dist/es2019/plugins/type-ahead/index.js +2 -2
- package/dist/es2019/plugins/type-ahead/messages.js +44 -4
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -1
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +17 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +10 -5
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
- package/dist/es2019/plugins/type-ahead/utils.js +38 -0
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -3
- package/dist/es2019/ui/Alignment/AlignmentButton/index.js +4 -2
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/es2019/ui/CollapsedEditor/index.js +3 -2
- package/dist/es2019/ui/ColorPickerButton/index.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +4 -5
- package/dist/es2019/ui/ConfigPanel/FormContent.js +3 -3
- package/dist/es2019/ui/ContentStyles/index.js +7 -2
- package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +1 -0
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +56 -34
- package/dist/es2019/utils/commands.js +26 -14
- package/dist/es2019/utils/input-rules.js +22 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -1
- package/dist/esm/create-editor/create-plugins-list.js +9 -6
- package/dist/esm/create-editor/messages.js +8 -0
- package/dist/esm/i18n/en.js +2 -2
- package/dist/esm/i18n/en_GB.js +2 -2
- package/dist/esm/i18n/en_ZZ.js +2 -2
- package/dist/esm/i18n/index.js +4 -4
- package/dist/esm/i18n/languages.js +9 -4
- package/dist/esm/labs/next/presets/mobile.js +2 -2
- package/dist/esm/labs/next/presets/preset.js +36 -6
- package/dist/esm/plugins/annotation/nodeviews/index.js +1 -0
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +5 -1
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +4 -1
- package/dist/esm/plugins/card/pm-plugins/doc.js +10 -20
- package/dist/esm/plugins/card/pm-plugins/main.js +4 -17
- package/dist/esm/plugins/card/toolbar.js +24 -8
- package/dist/esm/plugins/card/ui/EditLinkToolbar.js +8 -6
- package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +9 -39
- package/dist/esm/plugins/card/utils.js +15 -2
- package/dist/esm/plugins/collab-edit/actions.js +3 -3
- package/dist/esm/plugins/copy-button/toolbar.js +5 -3
- package/dist/esm/plugins/date/index.js +1 -6
- package/dist/esm/plugins/date/ui/DatePicker/index.js +1 -2
- package/dist/esm/plugins/emoji/index.js +7 -13
- package/dist/esm/plugins/expand/pm-plugins/main.js +3 -3
- package/dist/esm/plugins/expand/toolbar.js +1 -0
- package/dist/esm/plugins/extension/commands.js +12 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +10 -0
- package/dist/esm/plugins/extension/toolbar.js +50 -8
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +11 -11
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +7 -3
- package/dist/esm/plugins/floating-toolbar/index.js +16 -4
- package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +75 -0
- package/dist/esm/plugins/floating-toolbar/ui/ConfirmationModal.js +11 -25
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +17 -4
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +100 -47
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +29 -108
- package/dist/esm/plugins/floating-toolbar/ui/SimpleModal.js +30 -0
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +27 -47
- package/dist/esm/plugins/floating-toolbar/ui/messages.js +13 -3
- package/dist/esm/plugins/floating-toolbar/utils.js +4 -17
- package/dist/esm/plugins/help-dialog/index.js +3 -2
- package/dist/esm/plugins/hyperlink/Toolbar.js +20 -2
- package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -3
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +5 -10
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +2 -1
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +2 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +25 -12
- package/dist/esm/plugins/layout/toolbar.js +1 -0
- package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +30 -4
- package/dist/esm/plugins/list/commands/outdent-list.js +1 -1
- package/dist/esm/plugins/list/index.js +7 -3
- package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +13 -2
- package/dist/esm/plugins/list/pm-plugins/input-rules/index.js +5 -2
- package/dist/esm/plugins/list/pm-plugins/main.js +31 -11
- package/dist/esm/plugins/media/index.js +33 -0
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +7 -6
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +3 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +70 -64
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +3 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +7 -0
- package/dist/esm/plugins/media/toolbar/index.js +3 -0
- package/dist/esm/plugins/media/utils/media-single.js +18 -3
- package/dist/esm/plugins/panel/toolbar.js +1 -0
- package/dist/esm/plugins/panel/utils.js +1 -1
- package/dist/esm/plugins/paste/index.js +2 -1
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +15 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/paste/util/index.js +2 -2
- package/dist/esm/plugins/placeholder/index.js +23 -45
- package/dist/esm/plugins/placeholder/styles.js +1 -2
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +6 -3
- package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -0
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +9 -5
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +4 -1
- package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +5 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/Toolbar.js +16 -7
- package/dist/esm/plugins/type-ahead/index.js +2 -2
- package/dist/esm/plugins/type-ahead/messages.js +44 -4
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -1
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +17 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +10 -5
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +8 -5
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +2 -1
- package/dist/esm/plugins/type-ahead/utils.js +38 -0
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +6 -3
- package/dist/esm/ui/Alignment/AlignmentButton/index.js +4 -2
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
- package/dist/esm/ui/CollapsedEditor/index.js +3 -2
- package/dist/esm/ui/ColorPickerButton/index.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +4 -5
- package/dist/esm/ui/ConfigPanel/FormContent.js +3 -3
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/LinkSearch/ToolbarComponents.js +1 -0
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +56 -34
- package/dist/esm/utils/commands.js +25 -13
- package/dist/esm/utils/input-rules.js +23 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/messages.d.ts +7 -0
- package/dist/types/i18n/index.d.ts +4 -4
- package/dist/types/i18n/languages.d.ts +8 -3
- package/dist/types/labs/next/presets/cxhtml.d.ts +1 -1
- package/dist/types/labs/next/presets/default.d.ts +2 -2
- package/dist/types/labs/next/presets/mobile.d.ts +1 -1
- package/dist/types/labs/next/presets/preset.d.ts +10 -6
- package/dist/types/plugins/alignment/index.d.ts +2 -2
- package/dist/types/plugins/analytics/plugin.d.ts +2 -2
- package/dist/types/plugins/annotation/index.d.ts +2 -2
- package/dist/types/plugins/avatar-group/index.d.ts +4 -3
- package/dist/types/plugins/base/index.d.ts +2 -2
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +4 -3
- package/dist/types/plugins/block-type/index.d.ts +2 -2
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -1
- package/dist/types/plugins/breakout/index.d.ts +2 -2
- package/dist/types/plugins/caption/index.d.ts +2 -2
- package/dist/types/plugins/card/index.d.ts +2 -2
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +4 -4
- package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -1
- package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +5 -5
- package/dist/types/plugins/card/utils.d.ts +2 -1
- package/dist/types/plugins/clear-marks-on-change-to-empty-document/index.d.ts +2 -2
- package/dist/types/plugins/clipboard/index.d.ts +2 -2
- package/dist/types/plugins/code-bidi-warning/index.d.ts +4 -3
- package/dist/types/plugins/code-block/index.d.ts +2 -2
- package/dist/types/plugins/collab-edit/actions.d.ts +1 -1
- package/dist/types/plugins/collab-edit/index.d.ts +2 -2
- package/dist/types/plugins/context-panel/index.d.ts +2 -2
- package/dist/types/plugins/copy-button/index.d.ts +2 -2
- package/dist/types/plugins/custom-autoformat/index.d.ts +2 -2
- package/dist/types/plugins/data-consumer/index.d.ts +2 -2
- package/dist/types/plugins/date/index.d.ts +2 -2
- package/dist/types/plugins/date/ui/DatePicker/index.d.ts +0 -1
- package/dist/types/plugins/editor-disabled/index.d.ts +2 -2
- package/dist/types/plugins/emoji/index.d.ts +2 -2
- package/dist/types/plugins/emoji/types.d.ts +2 -1
- package/dist/types/plugins/expand/index.d.ts +2 -2
- package/dist/types/plugins/expand/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/extension/commands.d.ts +2 -0
- package/dist/types/plugins/extension/index.d.ts +2 -2
- package/dist/types/plugins/extension/toolbar.d.ts +10 -0
- package/dist/types/plugins/fake-text-cursor/index.d.ts +2 -2
- package/dist/types/plugins/feature-flags-context/index.d.ts +2 -2
- package/dist/types/plugins/feedback-dialog/index.d.ts +3 -2
- package/dist/types/plugins/find-replace/index.d.ts +4 -3
- package/dist/types/plugins/floating-toolbar/index.d.ts +2 -2
- package/dist/types/plugins/floating-toolbar/ui/CheckboxModal.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/ConfirmationModal.d.ts +1 -8
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +3 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/SimpleModal.d.ts +4 -0
- package/dist/types/plugins/floating-toolbar/ui/messages.d.ts +10 -0
- package/dist/types/plugins/floating-toolbar/ui/types.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/utils.d.ts +2 -3
- package/dist/types/plugins/fragment/index.d.ts +2 -2
- package/dist/types/plugins/grid/index.d.ts +2 -2
- package/dist/types/plugins/help-dialog/index.d.ts +2 -3
- package/dist/types/plugins/history/index.d.ts +2 -2
- package/dist/types/plugins/hyperlink/index.d.ts +2 -2
- package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +7 -2
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +2 -1
- package/dist/types/plugins/image-upload/index.d.ts +2 -2
- package/dist/types/plugins/indentation/index.d.ts +2 -2
- package/dist/types/plugins/insert-block/index.d.ts +2 -2
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
- package/dist/types/plugins/jira-issue/index.d.ts +2 -2
- package/dist/types/plugins/layout/index.d.ts +2 -2
- package/dist/types/plugins/list/actions/outdent-list-items-selected.d.ts +2 -2
- package/dist/types/plugins/list/index.d.ts +3 -2
- package/dist/types/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +3 -1
- package/dist/types/plugins/list/pm-plugins/main.d.ts +2 -2
- package/dist/types/plugins/list/types.d.ts +2 -0
- package/dist/types/plugins/macro/index.d.ts +2 -2
- package/dist/types/plugins/max-content-size/index.d.ts +2 -2
- package/dist/types/plugins/media/index.d.ts +2 -2
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -0
- package/dist/types/plugins/media/pm-plugins/types.d.ts +1 -0
- package/dist/types/plugins/mentions/index.d.ts +2 -2
- package/dist/types/plugins/mobile-dimensions/index.d.ts +2 -2
- package/dist/types/plugins/mobile-selection/mobile-selection-plugin.d.ts +2 -2
- package/dist/types/plugins/panel/index.d.ts +2 -2
- package/dist/types/plugins/paste/index.d.ts +3 -2
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
- package/dist/types/plugins/placeholder/index.d.ts +4 -4
- package/dist/types/plugins/placeholder/styles.d.ts +0 -1
- package/dist/types/plugins/placeholder-text/index.d.ts +2 -2
- package/dist/types/plugins/quick-insert/index.d.ts +2 -2
- package/dist/types/plugins/rule/index.d.ts +2 -2
- package/dist/types/plugins/save-on-enter/index.d.ts +3 -2
- package/dist/types/plugins/scroll-into-view/index.d.ts +2 -2
- package/dist/types/plugins/selection/index.d.ts +2 -2
- package/dist/types/plugins/status/index.d.ts +2 -2
- package/dist/types/plugins/submit-editor/index.d.ts +4 -2
- package/dist/types/plugins/tasks-and-decisions/index.d.ts +2 -2
- package/dist/types/plugins/text-color/index.d.ts +3 -2
- package/dist/types/plugins/text-formatting/index.d.ts +2 -2
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +4 -3
- package/dist/types/plugins/type-ahead/index.d.ts +2 -2
- package/dist/types/plugins/type-ahead/messages.d.ts +41 -1
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +3 -1
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +1 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +7 -1
- package/dist/types/plugins/undo-redo/index.d.ts +2 -2
- package/dist/types/plugins/unsupported-content/index.d.ts +2 -2
- package/dist/types/plugins/view-update-subscription/index.d.ts +2 -2
- package/dist/types/plugins/width/index.d.ts +2 -2
- package/dist/types/test-utils.d.ts +2 -1
- package/dist/types/types/editor-plugin.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +0 -2
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/FormContent.d.ts +2 -23
- package/dist/types/ui/ConfigPanel/types.d.ts +22 -0
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +1 -0
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +4 -1
- package/package.json +24 -24
- package/report.api.md +25 -16
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +0 -181
- package/dist/cjs/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -66
- package/dist/cjs/plugins/emoji/ui/EmojiContextProvider/index.js +0 -61
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +0 -151
- package/dist/es2019/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -51
- package/dist/es2019/plugins/emoji/ui/EmojiContextProvider/index.js +0 -21
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +0 -161
- package/dist/esm/plugins/card/ui/link-toolbar-icon-dropdown-options.js +0 -51
- package/dist/esm/plugins/emoji/ui/EmojiContextProvider/index.js +0 -46
- package/dist/types/plugins/card/ui/LinkToolbarIconDropdown.d.ts +0 -25
- package/dist/types/plugins/card/ui/link-toolbar-icon-dropdown-options.d.ts +0 -5
- package/dist/types/plugins/emoji/ui/EmojiContextProvider/index.d.ts +0 -13
|
@@ -14,12 +14,13 @@ import { jsx } from '@emotion/react';
|
|
|
14
14
|
import { injectIntl } from 'react-intl-next';
|
|
15
15
|
import UndoIcon from '@atlaskit/icon/glyph/undo';
|
|
16
16
|
import RedoIcon from '@atlaskit/icon/glyph/redo';
|
|
17
|
-
import { undo as undoKeymap, redo as redoKeymap, ToolTipContent } from '../../../../keymaps';
|
|
17
|
+
import { undo as undoKeymap, redo as redoKeymap, ToolTipContent, tooltip } from '../../../../keymaps';
|
|
18
18
|
import { buttonGroupStyle, separatorStyles } from '../../../../ui/styles';
|
|
19
19
|
import ToolbarButton, { TOOLBAR_BUTTON } from '../../../../ui/ToolbarButton';
|
|
20
20
|
import { messages } from '../../messages';
|
|
21
21
|
import { createTypeAheadTools } from '../../../type-ahead/api';
|
|
22
22
|
import { undoFromToolbar, redoFromToolbar } from '../../commands';
|
|
23
|
+
import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
23
24
|
|
|
24
25
|
var closeTypeAheadAndRunCommand = function closeTypeAheadAndRunCommand(editorView) {
|
|
25
26
|
return function (command) {
|
|
@@ -90,7 +91,8 @@ export var ToolbarUndoRedo = /*#__PURE__*/function (_PureComponent) {
|
|
|
90
91
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
91
92
|
onClick: handleUndo,
|
|
92
93
|
disabled: !canUndo || disabled,
|
|
93
|
-
"aria-label": labelUndo,
|
|
94
|
+
"aria-label": tooltip(undoKeymap, labelUndo),
|
|
95
|
+
"aria-keyshortcuts": getAriaKeyshortcuts(undoKeymap),
|
|
94
96
|
title: jsx(ToolTipContent, {
|
|
95
97
|
description: labelUndo,
|
|
96
98
|
keymap: undoKeymap
|
|
@@ -112,7 +114,8 @@ export var ToolbarUndoRedo = /*#__PURE__*/function (_PureComponent) {
|
|
|
112
114
|
label: ""
|
|
113
115
|
}),
|
|
114
116
|
testId: "ak-editor-toolbar-button-redo",
|
|
115
|
-
"aria-label": labelRedo
|
|
117
|
+
"aria-label": tooltip(redoKeymap, labelRedo),
|
|
118
|
+
"aria-keyshortcuts": getAriaKeyshortcuts(redoKeymap)
|
|
116
119
|
}), jsx("span", {
|
|
117
120
|
css: separatorStyles
|
|
118
121
|
}));
|
|
@@ -13,7 +13,8 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { PureComponent } from 'react';
|
|
15
15
|
import ToolbarButton from '../../ToolbarButton';
|
|
16
|
-
import { ToolTipContent } from '../../../keymaps';
|
|
16
|
+
import { ToolTipContent, tooltip } from '../../../keymaps';
|
|
17
|
+
import { getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
17
18
|
|
|
18
19
|
var AlignmentButton = /*#__PURE__*/function (_PureComponent) {
|
|
19
20
|
_inherits(AlignmentButton, _PureComponent);
|
|
@@ -57,8 +58,9 @@ var AlignmentButton = /*#__PURE__*/function (_PureComponent) {
|
|
|
57
58
|
description: label,
|
|
58
59
|
keymap: shortcut
|
|
59
60
|
}),
|
|
60
|
-
"aria-label": label,
|
|
61
|
+
"aria-label": shortcut ? tooltip(shortcut, label) : label,
|
|
61
62
|
"aria-pressed": isSelected,
|
|
63
|
+
"aria-keyshortcuts": getAriaKeyshortcuts(shortcut),
|
|
62
64
|
onClick: this.onClick,
|
|
63
65
|
iconBefore: content
|
|
64
66
|
});
|
|
@@ -9,10 +9,10 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
10
10
|
import { N30 } from '@atlaskit/theme/colors';
|
|
11
11
|
import { token } from '@atlaskit/tokens';
|
|
12
|
-
import { akEditorToolbarKeylineHeight,
|
|
12
|
+
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
13
13
|
export var TableControlsPadding = 20;
|
|
14
14
|
var mainToolbarWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), gridSize(), gridSize(), token('elevation.surface', 'white'), TableControlsPadding);
|
|
15
|
-
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", "px;\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), gridSize(),
|
|
15
|
+
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", "px;\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), gridSize(), akEditorMenuZIndex, akEditorToolbarKeylineHeight, token('color.border', N30));
|
|
16
16
|
|
|
17
17
|
var StickyToolbar = function StickyToolbar(props) {
|
|
18
18
|
var _useState = useState(0),
|
|
@@ -78,7 +78,8 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
78
78
|
|
|
79
79
|
var contextPanelWidth = _ref.width;
|
|
80
80
|
return jsx(ToolbarArrowKeyNavigationProvider, {
|
|
81
|
-
editorView: props.editorView
|
|
81
|
+
editorView: props.editorView,
|
|
82
|
+
childComponentSelector: "[data-testid='ak-editor-main-toolbar']"
|
|
82
83
|
}, jsx("div", {
|
|
83
84
|
css: mainToolbarStyle(props.showKeyline || contextPanelWidth > 0, !!((_props$featureFlags8 = props.featureFlags) !== null && _props$featureFlags8 !== void 0 && _props$featureFlags8.twoLineEditorToolbar)),
|
|
84
85
|
"data-testid": "ak-editor-main-toolbar"
|
|
@@ -10,6 +10,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
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; } }
|
|
12
12
|
|
|
13
|
+
import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
13
14
|
import React from 'react';
|
|
14
15
|
import Editor from '../../editor';
|
|
15
16
|
import EditorWithActions from '../../labs/EditorWithActions';
|
|
@@ -72,10 +73,10 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
if (!this.props.isExpanded) {
|
|
75
|
-
return /*#__PURE__*/React.createElement(ChromeCollapsed, {
|
|
76
|
+
return /*#__PURE__*/React.createElement(IntlProviderIfMissingWrapper, null, /*#__PURE__*/React.createElement(ChromeCollapsed, {
|
|
76
77
|
onFocus: this.props.onFocus,
|
|
77
78
|
text: this.props.placeholder
|
|
78
|
-
});
|
|
79
|
+
}));
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -92,7 +92,8 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
92
92
|
zIndex: props.setDisableParentScroll ? 600 : undefined,
|
|
93
93
|
ariaLabel: "Color picker popup"
|
|
94
94
|
}, jsx("div", {
|
|
95
|
-
css: colorPickerWrapper
|
|
95
|
+
css: colorPickerWrapper,
|
|
96
|
+
"data-test-id": "color-picker-menu"
|
|
96
97
|
}, jsx(ColorPaletteWithListeners, {
|
|
97
98
|
palette: props.colorPalette,
|
|
98
99
|
cols: props.cols,
|
|
@@ -27,9 +27,7 @@ import SectionMessage from '@atlaskit/section-message';
|
|
|
27
27
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
28
28
|
import Select from '@atlaskit/select';
|
|
29
29
|
import AddCircleIcon from '@atlaskit/icon/glyph/add-circle';
|
|
30
|
-
import { messages } from '../messages';
|
|
31
|
-
|
|
32
|
-
import FormContent from '../FormContent';
|
|
30
|
+
import { messages } from '../messages';
|
|
33
31
|
import { getNameFromDuplicateField, isDuplicateField } from '../utils';
|
|
34
32
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
35
33
|
import { N40A } from '@atlaskit/theme/colors';
|
|
@@ -267,7 +265,8 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
267
265
|
extensionManifest = _this$props.extensionManifest,
|
|
268
266
|
onFieldChange = _this$props.onFieldChange,
|
|
269
267
|
firstVisibleFieldName = _this$props.firstVisibleFieldName,
|
|
270
|
-
error = _this$props.error
|
|
268
|
+
error = _this$props.error,
|
|
269
|
+
FormComponent = _this$props.formComponent;
|
|
271
270
|
var label = field.label,
|
|
272
271
|
options = field.options;
|
|
273
272
|
var _this$state3 = this.state,
|
|
@@ -277,7 +276,7 @@ var FieldsetField = /*#__PURE__*/function (_React$Component) {
|
|
|
277
276
|
var children = this.renderActions();
|
|
278
277
|
return jsx(Fragment, null, error && jsx(FieldsetError, {
|
|
279
278
|
message: error
|
|
280
|
-
}), jsx("div", null, options.showTitle && jsx("h5", null, label), jsx(
|
|
279
|
+
}), jsx("div", null, options.showTitle && jsx("h5", null, label), jsx(FormComponent, {
|
|
281
280
|
fields: selectedFields,
|
|
282
281
|
parentName: name,
|
|
283
282
|
extensionManifest: extensionManifest,
|
|
@@ -11,8 +11,7 @@ import Boolean from './Fields/Boolean';
|
|
|
11
11
|
import CustomSelect from './Fields/CustomSelect';
|
|
12
12
|
import Date from './Fields/Date';
|
|
13
13
|
import DateRange from './Fields/DateRange';
|
|
14
|
-
import Enum from './Fields/Enum';
|
|
15
|
-
|
|
14
|
+
import Enum from './Fields/Enum';
|
|
16
15
|
import Fieldset from './Fields/Fieldset';
|
|
17
16
|
import Number from './Fields/Number';
|
|
18
17
|
import String from './Fields/String';
|
|
@@ -125,7 +124,8 @@ export function FieldComponent(_ref) {
|
|
|
125
124
|
onFieldChange: onFieldChange,
|
|
126
125
|
extensionManifest: extensionManifest,
|
|
127
126
|
parameters: defaultValue || {},
|
|
128
|
-
error: error
|
|
127
|
+
error: error,
|
|
128
|
+
formComponent: FormContent
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
case 'user':
|
|
@@ -40,7 +40,7 @@ import { useFeatureFlags } from '../../plugins/feature-flags-context';
|
|
|
40
40
|
import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewProducer.styles';
|
|
41
41
|
|
|
42
42
|
var contentStyles = function contentStyles(props) {
|
|
43
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap,\n .pm-table-cell-content-wrap div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
|
|
43
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap :not(.fabric-editor-alignment),\n .pm-table-header-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark,\n .pm-table-cell-content-wrap\n :not(p, .fabric-editor-block-mark)\n + div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
|
|
44
44
|
theme: props.theme
|
|
45
45
|
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, token('color.border.focused', '#8cf'), placeholderTextStyles, placeholderStyles, codeBlockStyles(props), blocktypeStyles(props), textFormattingStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
46
46
|
};
|
|
@@ -6,6 +6,7 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
export var RECENT_SEARCH_WIDTH_IN_PX = 420;
|
|
7
7
|
export var RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX = 360;
|
|
8
8
|
export var RECENT_SEARCH_HEIGHT_IN_PX = 360;
|
|
9
|
+
export var LINKPICKER_HEIGHT_IN_PX = 570;
|
|
9
10
|
export var inputWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n line-height: 0;\n padding: 5px 0;\n align-items: center;\n"])));
|
|
10
11
|
export var container = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n overflow: auto;\n padding: 0;\n\n width: ", "px;\n line-height: initial;\n"])), RECENT_SEARCH_WIDTH_WITHOUT_ITEMS_IN_PX);
|
|
11
12
|
export var containerWithProvider = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "px;\n"])), RECENT_SEARCH_WIDTH_IN_PX);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
-
import React, { useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import React, { useCallback, useLayoutEffect, useRef } from 'react';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
** The context is used to handle the keydown events of submenus.
|
|
@@ -20,32 +20,33 @@ export var KeyDownHandlerContext = /*#__PURE__*/React.createContext({
|
|
|
20
20
|
|
|
21
21
|
export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvider(_ref) {
|
|
22
22
|
var children = _ref.children,
|
|
23
|
-
editorView = _ref.editorView
|
|
23
|
+
editorView = _ref.editorView,
|
|
24
|
+
childComponentSelector = _ref.childComponentSelector,
|
|
25
|
+
handleEscape = _ref.handleEscape,
|
|
26
|
+
disableArrowKeyNavigation = _ref.disableArrowKeyNavigation;
|
|
24
27
|
var wrapperRef = useRef(null);
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
currentSelectedItemIndex.current = 0;
|
|
28
|
+
var selectedItemIndex = useRef(0);
|
|
29
|
+
var incrementIndex = useCallback(function (list) {
|
|
30
|
+
if (selectedItemIndex.current === list.length - 1) {
|
|
31
|
+
selectedItemIndex.current = 0;
|
|
30
32
|
} else {
|
|
31
|
-
|
|
33
|
+
selectedItemIndex.current = selectedItemIndex.current + 1;
|
|
32
34
|
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
currentSelectedItemIndex.current = list.length - 1;
|
|
35
|
+
}, []);
|
|
36
|
+
var decrementIndex = useCallback(function (list) {
|
|
37
|
+
if (selectedItemIndex.current === 0) {
|
|
38
|
+
selectedItemIndex.current = list.length - 1;
|
|
38
39
|
} else {
|
|
39
|
-
|
|
40
|
+
selectedItemIndex.current = selectedItemIndex.current - 1;
|
|
40
41
|
}
|
|
41
|
-
};
|
|
42
|
+
}, []);
|
|
42
43
|
|
|
43
44
|
var handleArrowRight = function handleArrowRight() {
|
|
44
45
|
var _filteredFocusableEle;
|
|
45
46
|
|
|
46
47
|
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
47
48
|
incrementIndex(filteredFocusableElements);
|
|
48
|
-
(_filteredFocusableEle = filteredFocusableElements[
|
|
49
|
+
(_filteredFocusableEle = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle === void 0 ? void 0 : _filteredFocusableEle.focus();
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
var handleArrowLeft = function handleArrowLeft() {
|
|
@@ -53,14 +54,23 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
53
54
|
|
|
54
55
|
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
55
56
|
decrementIndex(filteredFocusableElements);
|
|
56
|
-
(_filteredFocusableEle2 = filteredFocusableElements[
|
|
57
|
+
(_filteredFocusableEle2 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle2 === void 0 ? void 0 : _filteredFocusableEle2.focus();
|
|
57
58
|
};
|
|
58
59
|
|
|
59
60
|
var handleTab = function handleTab() {
|
|
60
61
|
var _filteredFocusableEle3;
|
|
61
62
|
|
|
62
63
|
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
63
|
-
(_filteredFocusableEle3 = filteredFocusableElements[
|
|
64
|
+
(_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
var focusAndScrollToElement = function focusAndScrollToElement(element) {
|
|
68
|
+
element === null || element === void 0 ? void 0 : element.scrollIntoView({
|
|
69
|
+
behavior: 'smooth',
|
|
70
|
+
block: 'center',
|
|
71
|
+
inline: 'nearest'
|
|
72
|
+
});
|
|
73
|
+
element.focus();
|
|
64
74
|
};
|
|
65
75
|
|
|
66
76
|
var submenuKeydownHandleContext = {
|
|
@@ -69,7 +79,7 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
69
79
|
handleTab: handleTab
|
|
70
80
|
};
|
|
71
81
|
useLayoutEffect(function () {
|
|
72
|
-
if (!wrapperRef.current) {
|
|
82
|
+
if (!wrapperRef.current || disableArrowKeyNavigation) {
|
|
73
83
|
return;
|
|
74
84
|
}
|
|
75
85
|
|
|
@@ -80,17 +90,17 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
80
90
|
*/
|
|
81
91
|
|
|
82
92
|
var handleKeyDown = function handleKeyDown(event) {
|
|
83
|
-
var _document$querySelect, _wrapperRef$current
|
|
93
|
+
var _document$querySelect, _document$querySelect2, _wrapperRef$current;
|
|
84
94
|
|
|
85
|
-
//To trap the focus inside the horizontal
|
|
86
|
-
var targetElement = event.target; //To filter out the events outside the
|
|
95
|
+
//To trap the focus inside the horizontal toolbar for left and right arrow keys
|
|
96
|
+
var targetElement = event.target; //To filter out the events outside the child component
|
|
87
97
|
|
|
88
|
-
if (!targetElement.closest("
|
|
98
|
+
if (!targetElement.closest("".concat(childComponentSelector))) {
|
|
89
99
|
return;
|
|
90
100
|
} //The key events are from child components such as dropdown menus / popups are ignored
|
|
91
101
|
|
|
92
102
|
|
|
93
|
-
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') {
|
|
103
|
+
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) || (_document$querySelect2 = document.querySelector('[data-test-id="color-picker-menu"]')) !== null && _document$querySelect2 !== void 0 && _document$querySelect2.contains(targetElement) || event.key === 'ArrowUp' || event.key === 'ArrowDown' || disableArrowKeyNavigation) {
|
|
94
104
|
return;
|
|
95
105
|
}
|
|
96
106
|
|
|
@@ -103,25 +113,37 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
|
|
|
103
113
|
|
|
104
114
|
|
|
105
115
|
if (!((_wrapperRef$current = wrapperRef.current) !== null && _wrapperRef$current !== void 0 && _wrapperRef$current.contains(targetElement))) {
|
|
106
|
-
|
|
116
|
+
selectedItemIndex.current = -1;
|
|
107
117
|
} else {
|
|
108
|
-
|
|
118
|
+
selectedItemIndex.current = filteredFocusableElements.indexOf(targetElement) > -1 ? filteredFocusableElements.indexOf(targetElement) : selectedItemIndex.current;
|
|
109
119
|
}
|
|
110
120
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
121
|
+
switch (event.key) {
|
|
122
|
+
case 'ArrowRight':
|
|
123
|
+
incrementIndex(filteredFocusableElements);
|
|
124
|
+
focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current]);
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
break;
|
|
127
|
+
|
|
128
|
+
case 'ArrowLeft':
|
|
129
|
+
decrementIndex(filteredFocusableElements);
|
|
130
|
+
focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current]);
|
|
131
|
+
event.preventDefault();
|
|
132
|
+
break;
|
|
116
133
|
|
|
117
|
-
|
|
134
|
+
case 'Escape':
|
|
135
|
+
handleEscape(event);
|
|
136
|
+
break;
|
|
137
|
+
|
|
138
|
+
default:
|
|
139
|
+
}
|
|
118
140
|
};
|
|
119
141
|
|
|
120
142
|
element === null || element === void 0 ? void 0 : element.addEventListener('keydown', handleKeyDown);
|
|
121
143
|
return function () {
|
|
122
144
|
element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleKeyDown);
|
|
123
145
|
};
|
|
124
|
-
}, [
|
|
146
|
+
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex]);
|
|
125
147
|
return /*#__PURE__*/React.createElement("div", {
|
|
126
148
|
className: "custom-key-handler-wrapper",
|
|
127
149
|
ref: wrapperRef
|
|
@@ -142,6 +164,6 @@ function getFocusableElements(rootNode) {
|
|
|
142
164
|
function getFilteredFocusableElements(rootNode) {
|
|
143
165
|
//The focusable elements from child components such as dropdown menus / popups are ignored
|
|
144
166
|
return getFocusableElements(rootNode).filter(function (elm) {
|
|
145
|
-
return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]');
|
|
167
|
+
return !elm.closest('[data-role="droplistContent"]') && !elm.closest('[data-emoji-picker-container="true"]') && !elm.closest('[data-test-id="color-picker-menu"]') && !elm.closest('.scroll-buttons');
|
|
146
168
|
});
|
|
147
169
|
}
|
|
@@ -114,12 +114,27 @@ var applyMarkOnRange = function applyMarkOnRange(from, to, removeMark, mark, tr)
|
|
|
114
114
|
return tr;
|
|
115
115
|
};
|
|
116
116
|
|
|
117
|
+
var entireSelectionContainsMark = function entireSelectionContainsMark(mark, doc, fromPos, toPos) {
|
|
118
|
+
var onlyContainsMark = true;
|
|
119
|
+
doc.nodesBetween(fromPos, toPos, function (node) {
|
|
120
|
+
// Skip recursion once we've found text which doesn't include the mark
|
|
121
|
+
if (!onlyContainsMark) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (node.isText) {
|
|
126
|
+
onlyContainsMark && (onlyContainsMark = mark.isInSet(node.marks));
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return onlyContainsMark;
|
|
130
|
+
};
|
|
131
|
+
|
|
117
132
|
var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
118
133
|
return function (state, dispatch) {
|
|
119
134
|
var tr = state.tr;
|
|
120
135
|
|
|
121
136
|
if (state.selection instanceof CellSelection) {
|
|
122
|
-
var
|
|
137
|
+
var removeMark = true;
|
|
123
138
|
var cells = [];
|
|
124
139
|
state.selection.forEachCell(function (cell, cellPos) {
|
|
125
140
|
cells.push({
|
|
@@ -128,30 +143,27 @@ var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
|
128
143
|
});
|
|
129
144
|
var from = cellPos;
|
|
130
145
|
var to = cellPos + cell.nodeSize;
|
|
131
|
-
|
|
132
|
-
if (!markInRange) {
|
|
133
|
-
markInRange = state.doc.rangeHasMark(from, to, mark);
|
|
134
|
-
}
|
|
146
|
+
removeMark && (removeMark = entireSelectionContainsMark(mark, state.doc, from, to));
|
|
135
147
|
});
|
|
136
148
|
|
|
137
149
|
for (var i = cells.length - 1; i >= 0; i--) {
|
|
138
150
|
var cell = cells[i];
|
|
139
151
|
var from = cell.pos;
|
|
140
152
|
var to = from + cell.node.nodeSize;
|
|
141
|
-
applyMarkOnRange(from, to,
|
|
153
|
+
applyMarkOnRange(from, to, removeMark, mark, tr);
|
|
142
154
|
}
|
|
143
155
|
} else {
|
|
144
156
|
var _state$selection3 = state.selection,
|
|
145
157
|
$from = _state$selection3.$from,
|
|
146
|
-
$to = _state$selection3.$to; //
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
//
|
|
158
|
+
$to = _state$selection3.$to; // We decide to remove the mark only if the entire selection contains the mark
|
|
159
|
+
// Examples with *bold* text
|
|
160
|
+
// Scenario 1: Selection contains both bold and non-bold text -> bold entire selection
|
|
161
|
+
// Scenario 2: Selection contains only bold text -> un-bold entire selection
|
|
162
|
+
// Scenario 3: Selection contains no bold text -> bold entire selection
|
|
151
163
|
|
|
152
|
-
var
|
|
164
|
+
var _removeMark = entireSelectionContainsMark(mark, state.doc, $from.pos, $to.pos);
|
|
153
165
|
|
|
154
|
-
applyMarkOnRange($from.pos, $to.pos,
|
|
166
|
+
applyMarkOnRange($from.pos, $to.pos, _removeMark, mark, tr);
|
|
155
167
|
}
|
|
156
168
|
|
|
157
169
|
if (tr.docChanged) {
|
|
@@ -4,12 +4,14 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
4
4
|
|
|
5
5
|
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) { _defineProperty(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; }
|
|
6
6
|
|
|
7
|
-
import { closeHistory } from 'prosemirror-history';
|
|
8
7
|
import { TextSelection } from 'prosemirror-state';
|
|
9
8
|
import { canJoin, findWrapping } from 'prosemirror-transform';
|
|
10
9
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
11
10
|
import { createInputRulePlugin } from '@atlaskit/prosemirror-input-rules';
|
|
12
11
|
import { addAnalytics } from '../plugins/analytics';
|
|
12
|
+
import { closeHistory } from 'prosemirror-history';
|
|
13
|
+
import { findParentNodeOfTypeClosestToPos } from 'prosemirror-utils';
|
|
14
|
+
import { getFeatureFlags } from '../plugins/feature-flags-context';
|
|
13
15
|
export var ruleWithAnalytics = function ruleWithAnalytics(getPayload) {
|
|
14
16
|
return function (originalRule) {
|
|
15
17
|
var onHandlerApply = function onHandlerApply(state, tr, matchResult) {
|
|
@@ -128,6 +130,26 @@ export var createWrappingJoinRule = function createWrappingJoinRule(_ref3) {
|
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
tr.wrap(range, wrapping);
|
|
133
|
+
var featureFlags = getFeatureFlags(state);
|
|
134
|
+
|
|
135
|
+
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists && nodeType === state.schema.nodes.orderedList) {
|
|
136
|
+
// if an orderedList node would be inserted by the input rule match, and
|
|
137
|
+
// that orderedList node is being added directly before another orderedList
|
|
138
|
+
// node, then join those nodes
|
|
139
|
+
var $end = tr.doc.resolve(tr.mapping.map(end));
|
|
140
|
+
|
|
141
|
+
var _node = findParentNodeOfTypeClosestToPos($end, nodeType);
|
|
142
|
+
|
|
143
|
+
if (_node) {
|
|
144
|
+
var nodeEnd = _node.pos + _node.node.nodeSize;
|
|
145
|
+
var after = tr.doc.resolve(nodeEnd).nodeAfter;
|
|
146
|
+
|
|
147
|
+
if (after && after.type === nodeType && canJoin(tr.doc, nodeEnd) && (!joinPredicate || joinPredicate(match, after))) {
|
|
148
|
+
tr.join(nodeEnd);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
131
153
|
var before = tr.doc.resolve(fixedStart - 1).nodeBefore;
|
|
132
154
|
|
|
133
155
|
if (before && before.type === nodeType && canJoin(tr.doc, fixedStart - 1) && (!joinPredicate || joinPredicate(match, before))) {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* ED-16073:
|
|
5
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
6
6
|
*/
|
|
7
7
|
export { default as zh } from './zh';
|
|
8
8
|
export { default as zh_TW } from './zh_TW';
|
|
9
9
|
export { default as cs } from './cs';
|
|
10
10
|
export { default as da } from './da';
|
|
11
|
+
export { default as en } from './en';
|
|
12
|
+
export { default as en_GB } from './en_GB';
|
|
11
13
|
export { default as nl } from './nl';
|
|
12
14
|
export { default as et } from './et';
|
|
13
15
|
export { default as fi } from './fi';
|
|
@@ -29,7 +31,5 @@ export { default as th } from './th';
|
|
|
29
31
|
export { default as tr } from './tr';
|
|
30
32
|
export { default as uk } from './uk';
|
|
31
33
|
export { default as vi } from './vi';
|
|
32
|
-
export { default as en } from './en';
|
|
33
|
-
export { default as en_GB } from './en_GB';
|
|
34
34
|
export { default as is } from './is';
|
|
35
35
|
export { default as ro } from './ro';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
zh: string;
|
|
3
|
+
zh_TW: string;
|
|
3
4
|
cs: string;
|
|
4
|
-
da: string;
|
|
5
5
|
nl: string;
|
|
6
|
+
da: string;
|
|
6
7
|
en: string;
|
|
7
8
|
en_GB: string;
|
|
8
9
|
et: string;
|
|
@@ -23,11 +24,15 @@ declare const _default: {
|
|
|
23
24
|
sk: string;
|
|
24
25
|
es: string;
|
|
25
26
|
sv: string;
|
|
27
|
+
th: string;
|
|
28
|
+
tr: string;
|
|
29
|
+
uk: string;
|
|
30
|
+
vi: string;
|
|
26
31
|
};
|
|
27
32
|
/**
|
|
28
33
|
* NOTE:
|
|
29
34
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
35
|
+
* ED-16073:
|
|
36
|
+
* This was manually updated since the original `@atlaskit/i18n-tools` has been deprecated
|
|
32
37
|
*/
|
|
33
38
|
export default _default;
|
|
@@ -8,5 +8,5 @@ export declare type EditorPresetCXHTMLProps = {
|
|
|
8
8
|
mentionProvider?: Promise<MentionProvider>;
|
|
9
9
|
mediaProvider?: Promise<MediaProvider>;
|
|
10
10
|
} & EditorPresetProps;
|
|
11
|
-
export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeholder, featureFlags, }: EditorPresetCXHTMLProps): import("./preset").Preset<import("@atlaskit/editor-common/types").EditorPlugin>[];
|
|
11
|
+
export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeholder, featureFlags, }: EditorPresetCXHTMLProps): import("./preset").Preset<import("@atlaskit/editor-common/types").EditorPlugin, []>[];
|
|
12
12
|
export declare function EditorPresetCXHTML(props: EditorPresetCXHTMLProps): JSX.Element;
|
|
@@ -39,7 +39,7 @@ export declare type DefaultPresetPluginOptions = {
|
|
|
39
39
|
* Note: The order that presets are added determines
|
|
40
40
|
* their placement in the editor toolbar
|
|
41
41
|
*/
|
|
42
|
-
export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): Preset<EditorPlugin>;
|
|
43
|
-
export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): Preset<EditorPlugin>[];
|
|
42
|
+
export declare function createDefaultPreset(options: EditorPresetProps & DefaultPresetPluginOptions): Preset<EditorPlugin, []>;
|
|
43
|
+
export declare function useDefaultPreset(props: EditorPresetProps & DefaultPresetPluginOptions): Preset<EditorPlugin, []>[];
|
|
44
44
|
export declare function EditorPresetDefault(props: EditorPresetDefaultProps & EditorPresetProps & DefaultPresetPluginOptions): JSX.Element;
|
|
45
45
|
export {};
|
|
@@ -11,7 +11,7 @@ declare type EditorPresetMobileProps = {
|
|
|
11
11
|
allowMediaSingle?: boolean;
|
|
12
12
|
};
|
|
13
13
|
} & EditorPresetProps;
|
|
14
|
-
export declare function useMobilePreset({ media, placeholder, maxContentSize, createAnalyticsEvent, featureFlags, }: EditorPresetMobileProps & EditorPresetProps): import("./preset").Preset<import("@atlaskit/editor-common/types").EditorPlugin>[];
|
|
14
|
+
export declare function useMobilePreset({ media, placeholder, maxContentSize, createAnalyticsEvent, featureFlags, }: EditorPresetMobileProps & EditorPresetProps): import("./preset").Preset<import("@atlaskit/editor-common/types").EditorPlugin, []>[];
|
|
15
15
|
export declare type MobilePresetProps = EditorPresetMobileProps & EditorPresetProps;
|
|
16
16
|
export declare function EditorPresetMobile(props: MobilePresetProps): JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type { AllBuilderPlugins, AllNextEditorPlugins, SafePresetCheck } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { Builder } from '@atlaskit/editor-common/utils';
|
|
1
3
|
export declare class Preset<T extends {
|
|
2
4
|
name: string;
|
|
3
|
-
}> {
|
|
4
|
-
|
|
5
|
-
constructor();
|
|
6
|
-
add<
|
|
7
|
-
has(plugin:
|
|
8
|
-
getEditorPlugins(excludes?: Set<string>):
|
|
5
|
+
}, StackPlugins extends AllBuilderPlugins[] = []> implements Builder<T, StackPlugins> {
|
|
6
|
+
data: [...StackPlugins];
|
|
7
|
+
constructor(...more: [...StackPlugins]);
|
|
8
|
+
add<NewPlugin extends AllBuilderPlugins>(nextOrTuple: SafePresetCheck<NewPlugin, StackPlugins>): Preset<T, [...[NewPlugin], ...StackPlugins]>;
|
|
9
|
+
has(plugin: AllBuilderPlugins): boolean;
|
|
10
|
+
getEditorPlugins(excludes?: Set<string>): AllNextEditorPlugins[];
|
|
9
11
|
private processEditorPlugins;
|
|
10
12
|
private removeExcludedPlugins;
|
|
11
13
|
}
|
|
@@ -17,6 +19,8 @@ export declare type PluginsPreset = Array<PluginConfig<any, any>>;
|
|
|
17
19
|
* – () => EditorPlugin
|
|
18
20
|
* – (options: any) => EditorPlugin
|
|
19
21
|
* – (options?: any) => EditorPlugin
|
|
22
|
+
* (In the future, a preset may contain NextEditorPluginWithDependencies)
|
|
23
|
+
* – (props.externalPlugins) => (options?: any) => EditorPlugin
|
|
20
24
|
*
|
|
21
25
|
* Usage:
|
|
22
26
|
* – preset.add(plugin)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { AlignmentPluginState } from './pm-plugins/types';
|
|
3
3
|
export declare const defaultConfig: AlignmentPluginState;
|
|
4
|
-
declare const alignmentPlugin:
|
|
4
|
+
declare const alignmentPlugin: NextEditorPlugin<'alignment', never>;
|
|
5
5
|
export default alignmentPlugin;
|