@atlaskit/editor-core 163.0.0 → 164.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +20 -0
- package/CHANGELOG.md +86 -0
- package/dist/cjs/editor.js +22 -14
- package/dist/cjs/i18n/cs.js +1 -1
- package/dist/cjs/i18n/de.js +3 -3
- package/dist/cjs/i18n/en.js +277 -131
- package/dist/cjs/i18n/en_GB.js +278 -132
- package/dist/cjs/i18n/es.js +1 -1
- package/dist/cjs/i18n/hu.js +2 -2
- package/dist/cjs/i18n/ko.js +2 -2
- package/dist/cjs/i18n/nb.js +1 -1
- package/dist/cjs/i18n/pl.js +24 -0
- package/dist/cjs/i18n/th.js +2 -2
- package/dist/cjs/i18n/tr.js +2 -2
- package/dist/cjs/i18n/vi.js +1 -1
- package/dist/cjs/i18n/zh.js +3 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +1 -1
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +16 -23
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +13 -8
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +14 -6
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +6 -8
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +16 -42
- package/dist/cjs/plugins/card/pm-plugins/main.js +18 -16
- package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +27 -30
- package/dist/cjs/plugins/code-block/pm-plugins/keymaps.js +1 -1
- package/dist/cjs/plugins/emoji/ui/Emoji/index.js +5 -4
- package/dist/cjs/plugins/extension/nodeviews/extension.js +5 -0
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +7 -3
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +15 -19
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +14 -15
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +16 -11
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +14 -13
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +16 -13
- package/dist/cjs/plugins/floating-toolbar/ui/Input.js +5 -2
- package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +4 -5
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +28 -22
- package/dist/cjs/plugins/grid/index.js +2 -2
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +22 -18
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +12 -5
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +23 -21
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/item.js +9 -4
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +4 -5
- package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +3 -73
- package/dist/cjs/plugins/list/ui/ToolbarLists/index.js +34 -18
- package/dist/cjs/plugins/media/commands/helpers.js +45 -25
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +13 -17
- package/dist/cjs/plugins/media/nodeviews/styles.js +14 -16
- package/dist/cjs/plugins/media/picker-facade.js +6 -69
- package/dist/cjs/plugins/media/pm-plugins/main.js +14 -56
- package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +15 -11
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +5 -7
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +9 -8
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +28 -17
- package/dist/cjs/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -3
- package/dist/cjs/plugins/media/ui/MediaPicker/index.js +1 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +22 -9
- package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +15 -27
- package/dist/cjs/plugins/panel/actions.js +2 -2
- package/dist/cjs/plugins/panel/nodeviews/panel.js +2 -2
- package/dist/cjs/plugins/panel/pm-plugins/main.js +4 -4
- package/dist/cjs/plugins/panel/styles.js +2 -2
- package/dist/cjs/plugins/panel/toolbar.js +3 -3
- package/dist/cjs/plugins/panel/utils.js +4 -4
- package/dist/cjs/plugins/paste/handlers.js +6 -3
- package/dist/cjs/plugins/paste/pm-plugins/main.js +45 -85
- package/dist/cjs/plugins/status/nodeviews/status.js +10 -13
- package/dist/cjs/plugins/status/ui/statusPicker.js +6 -5
- package/dist/cjs/plugins/table/commands/insert.js +0 -6
- package/dist/cjs/plugins/table/pm-plugins/main.js +67 -0
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +18 -16
- package/dist/cjs/plugins/table/ui/common-styles.js +5 -12
- package/dist/cjs/plugins/table/utils/paste.js +10 -2
- package/dist/cjs/plugins/tasks-and-decisions/commands.js +44 -14
- package/dist/cjs/plugins/tasks-and-decisions/index.js +17 -18
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/input-rules.js +20 -16
- package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +1 -1
- package/dist/cjs/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +1 -1
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +21 -9
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/styles.js +9 -22
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +7 -8
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +8 -4
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +14 -8
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/more-button.js +7 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +6 -3
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +11 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +26 -22
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +7 -6
- package/dist/cjs/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +14 -10
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +5 -5
- package/dist/cjs/ui/Addon/ClickAreaInline/index.js +4 -5
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +12 -11
- package/dist/cjs/ui/Addon/Dropdown/index.js +5 -1
- package/dist/cjs/ui/Addon/Dropdown/styles.js +4 -5
- package/dist/cjs/ui/Addon/DropdownItem/index.js +5 -5
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +4 -5
- package/dist/cjs/ui/Alignment/index.js +9 -15
- package/dist/cjs/ui/Alignment/styles.js +4 -5
- package/dist/cjs/ui/Appearance/Chromeless.js +11 -15
- package/dist/cjs/ui/Appearance/Comment/Comment.js +29 -34
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +14 -23
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +6 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +30 -19
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +21 -15
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +34 -46
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +44 -49
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +12 -15
- package/dist/cjs/ui/ChromeCollapsed/index.js +5 -2
- package/dist/cjs/ui/ChromeCollapsed/styles.js +4 -5
- package/dist/cjs/ui/ColorPalette/Color/index.js +8 -3
- package/dist/cjs/ui/ColorPalette/Color/styles.js +6 -9
- package/dist/cjs/ui/ColorPalette/Palettes/panelBackgroundPalette.js +22 -22
- package/dist/cjs/ui/ColorPalette/index.js +8 -3
- package/dist/cjs/ui/ColorPalette/styles.js +4 -5
- package/dist/cjs/ui/ColorPickerButton/index.js +11 -8
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +10 -3
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +11 -17
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +15 -12
- package/dist/cjs/ui/ConfigPanel/Fields/DateRange.js +27 -30
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +32 -31
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +22 -13
- package/dist/cjs/ui/ConfigPanel/Fields/SelectItem.js +17 -20
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +4 -5
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +5 -5
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +13 -14
- package/dist/cjs/ui/ContentStyles/index.js +24 -18
- package/dist/cjs/ui/ContextPanel/index.js +35 -62
- package/dist/cjs/ui/DropdownMenu/index.js +20 -25
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +38 -18
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +13 -12
- package/dist/cjs/ui/ElementBrowser/components/ElementBrowserLoader.js +7 -6
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +5 -3
- package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +18 -21
- package/dist/cjs/ui/FloatingToolbar/index.js +9 -14
- package/dist/cjs/ui/FloatingToolbar/styles.js +6 -13
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +37 -27
- package/dist/cjs/ui/LinkSearch/ToolbarComponents.js +8 -21
- package/dist/cjs/ui/PanelTextInput/index.js +7 -11
- package/dist/cjs/ui/PanelTextInput/styles.js +10 -7
- package/dist/cjs/ui/PluginSlot/index.js +6 -4
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +19 -12
- package/dist/cjs/ui/ToolbarButton/index.js +8 -8
- package/dist/cjs/ui/ToolbarFeedback/index.js +21 -14
- package/dist/cjs/ui/ToolbarFeedback/styles.js +14 -28
- package/dist/cjs/ui/styles.js +29 -56
- package/dist/cjs/utils/prosemirror/autojoin.js +83 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/editor.js +17 -13
- package/dist/es2019/i18n/cs.js +1 -1
- package/dist/es2019/i18n/de.js +3 -3
- package/dist/es2019/i18n/en.js +277 -131
- package/dist/es2019/i18n/en_GB.js +278 -132
- package/dist/es2019/i18n/es.js +1 -1
- package/dist/es2019/i18n/hu.js +2 -2
- package/dist/es2019/i18n/ko.js +2 -2
- package/dist/es2019/i18n/nb.js +1 -1
- package/dist/es2019/i18n/pl.js +24 -0
- package/dist/es2019/i18n/th.js +2 -2
- package/dist/es2019/i18n/tr.js +2 -2
- package/dist/es2019/i18n/vi.js +1 -1
- package/dist/es2019/i18n/zh.js +3 -0
- package/dist/es2019/index.js +3 -3
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +1 -1
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +6 -1
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +15 -12
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +13 -9
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +16 -8
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +6 -4
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +15 -23
- package/dist/es2019/plugins/card/pm-plugins/main.js +22 -18
- package/dist/es2019/plugins/card/ui/LinkToolbarButtonGroup.js +19 -14
- package/dist/es2019/plugins/code-block/pm-plugins/keymaps.js +1 -1
- package/dist/es2019/plugins/emoji/ui/Emoji/index.js +6 -3
- package/dist/es2019/plugins/extension/nodeviews/extension.js +5 -0
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +8 -4
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -6
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +18 -11
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +18 -10
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +13 -9
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +14 -9
- package/dist/es2019/plugins/floating-toolbar/ui/Input.js +7 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +5 -4
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +28 -18
- package/dist/es2019/plugins/grid/index.js +1 -1
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +23 -14
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +13 -7
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +21 -17
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/item.js +9 -5
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +2 -2
- package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +3 -69
- package/dist/es2019/plugins/list/ui/ToolbarLists/index.js +34 -18
- package/dist/es2019/plugins/media/commands/helpers.js +45 -25
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +13 -10
- package/dist/es2019/plugins/media/nodeviews/styles.js +13 -9
- package/dist/es2019/plugins/media/picker-facade.js +2 -44
- package/dist/es2019/plugins/media/pm-plugins/main.js +5 -30
- package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +17 -12
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +6 -5
- package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +10 -6
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +24 -16
- package/dist/es2019/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -2
- package/dist/es2019/plugins/media/ui/MediaPicker/index.js +1 -1
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +19 -6
- package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +11 -9
- package/dist/es2019/plugins/panel/actions.js +1 -1
- package/dist/es2019/plugins/panel/nodeviews/panel.js +1 -1
- package/dist/es2019/plugins/panel/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/panel/styles.js +1 -1
- package/dist/es2019/plugins/panel/toolbar.js +1 -1
- package/dist/es2019/plugins/panel/utils.js +1 -1
- package/dist/es2019/plugins/paste/handlers.js +6 -3
- package/dist/es2019/plugins/paste/pm-plugins/main.js +26 -61
- package/dist/es2019/plugins/status/nodeviews/status.js +11 -7
- package/dist/es2019/plugins/status/ui/statusPicker.js +8 -5
- package/dist/es2019/plugins/table/commands/insert.js +0 -5
- package/dist/es2019/plugins/table/pm-plugins/main.js +65 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +20 -11
- package/dist/es2019/plugins/table/ui/common-styles.js +2 -18
- package/dist/es2019/plugins/table/utils/paste.js +8 -3
- package/dist/es2019/plugins/tasks-and-decisions/commands.js +26 -14
- package/dist/es2019/plugins/tasks-and-decisions/index.js +18 -19
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/input-rules.js +16 -10
- package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +2 -2
- package/dist/es2019/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +2 -2
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +24 -11
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/styles.js +20 -27
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +7 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +9 -5
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +15 -9
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/more-button.js +7 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +6 -4
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +13 -5
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +25 -14
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +8 -6
- package/dist/es2019/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +15 -11
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +7 -4
- package/dist/es2019/ui/Addon/ClickAreaInline/index.js +6 -4
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +14 -9
- package/dist/es2019/ui/Addon/Dropdown/index.js +7 -2
- package/dist/es2019/ui/Addon/Dropdown/styles.js +2 -2
- package/dist/es2019/ui/Addon/DropdownItem/index.js +6 -4
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +2 -2
- package/dist/es2019/ui/Alignment/index.js +8 -9
- package/dist/es2019/ui/Alignment/styles.js +3 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +18 -13
- package/dist/es2019/ui/Appearance/Comment/Comment.js +34 -30
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +15 -15
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +8 -4
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +28 -18
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +21 -14
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +41 -51
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +59 -58
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +12 -13
- package/dist/es2019/ui/ChromeCollapsed/index.js +7 -3
- package/dist/es2019/ui/ChromeCollapsed/styles.js +2 -2
- package/dist/es2019/ui/ColorPalette/Color/index.js +10 -4
- package/dist/es2019/ui/ColorPalette/Color/styles.js +3 -3
- package/dist/es2019/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -1
- package/dist/es2019/ui/ColorPalette/index.js +6 -3
- package/dist/es2019/ui/ColorPalette/styles.js +2 -2
- package/dist/es2019/ui/ColorPickerButton/index.js +12 -7
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +11 -4
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +13 -10
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +16 -10
- package/dist/es2019/ui/ConfigPanel/Fields/DateRange.js +28 -19
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +24 -16
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +18 -13
- package/dist/es2019/ui/ConfigPanel/Fields/SelectItem.js +15 -15
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -2
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +6 -4
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +15 -10
- package/dist/es2019/ui/ContentStyles/index.js +20 -17
- package/dist/es2019/ui/ContextPanel/index.js +27 -37
- package/dist/es2019/ui/DropdownMenu/index.js +28 -20
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +34 -15
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +9 -5
- package/dist/es2019/ui/ElementBrowser/components/ElementBrowserLoader.js +6 -3
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +7 -5
- package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +31 -18
- package/dist/es2019/ui/FloatingToolbar/index.js +8 -8
- package/dist/es2019/ui/FloatingToolbar/styles.js +5 -7
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +30 -14
- package/dist/es2019/ui/LinkSearch/ToolbarComponents.js +7 -12
- package/dist/es2019/ui/PanelTextInput/index.js +7 -5
- package/dist/es2019/ui/PanelTextInput/styles.js +7 -3
- package/dist/es2019/ui/PluginSlot/index.js +8 -4
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +15 -12
- package/dist/es2019/ui/ToolbarButton/index.js +8 -5
- package/dist/es2019/ui/ToolbarFeedback/index.js +21 -8
- package/dist/es2019/ui/ToolbarFeedback/styles.js +9 -11
- package/dist/es2019/ui/styles.js +24 -20
- package/dist/es2019/utils/prosemirror/autojoin.js +70 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/editor.js +16 -13
- package/dist/esm/i18n/cs.js +1 -1
- package/dist/esm/i18n/de.js +3 -3
- package/dist/esm/i18n/en.js +277 -131
- package/dist/esm/i18n/en_GB.js +278 -132
- package/dist/esm/i18n/es.js +1 -1
- package/dist/esm/i18n/hu.js +2 -2
- package/dist/esm/i18n/ko.js +2 -2
- package/dist/esm/i18n/nb.js +1 -1
- package/dist/esm/i18n/pl.js +24 -0
- package/dist/esm/i18n/th.js +2 -2
- package/dist/esm/i18n/tr.js +2 -2
- package/dist/esm/i18n/vi.js +1 -1
- package/dist/esm/i18n/zh.js +3 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +1 -1
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +15 -16
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +13 -9
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +16 -8
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +4 -6
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +14 -38
- package/dist/esm/plugins/card/pm-plugins/main.js +18 -17
- package/dist/esm/plugins/card/ui/LinkToolbarButtonGroup.js +26 -27
- package/dist/esm/plugins/code-block/pm-plugins/keymaps.js +1 -1
- package/dist/esm/plugins/emoji/ui/Emoji/index.js +6 -3
- package/dist/esm/plugins/extension/nodeviews/extension.js +5 -0
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +8 -4
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +10 -9
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +15 -13
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +17 -10
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +13 -9
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +14 -9
- package/dist/esm/plugins/floating-toolbar/ui/Input.js +6 -3
- package/dist/esm/plugins/floating-toolbar/ui/Separator.js +5 -4
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +30 -22
- package/dist/esm/plugins/grid/index.js +1 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -15
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +13 -7
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +25 -23
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/item.js +9 -5
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/styles.js +2 -2
- package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +3 -73
- package/dist/esm/plugins/list/ui/ToolbarLists/index.js +33 -18
- package/dist/esm/plugins/media/commands/helpers.js +45 -25
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +12 -10
- package/dist/esm/plugins/media/nodeviews/styles.js +13 -10
- package/dist/esm/plugins/media/picker-facade.js +7 -71
- package/dist/esm/plugins/media/pm-plugins/main.js +14 -57
- package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +17 -12
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +6 -5
- package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +10 -6
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +23 -16
- package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +1 -2
- package/dist/esm/plugins/media/ui/MediaPicker/index.js +1 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +19 -6
- package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +8 -12
- package/dist/esm/plugins/panel/actions.js +1 -1
- package/dist/esm/plugins/panel/nodeviews/panel.js +1 -1
- package/dist/esm/plugins/panel/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/panel/styles.js +1 -1
- package/dist/esm/plugins/panel/toolbar.js +1 -1
- package/dist/esm/plugins/panel/utils.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +6 -3
- package/dist/esm/plugins/paste/pm-plugins/main.js +26 -61
- package/dist/esm/plugins/status/nodeviews/status.js +9 -9
- package/dist/esm/plugins/status/ui/statusPicker.js +7 -5
- package/dist/esm/plugins/table/commands/insert.js +0 -5
- package/dist/esm/plugins/table/pm-plugins/main.js +62 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +19 -11
- package/dist/esm/plugins/table/ui/common-styles.js +3 -7
- package/dist/esm/plugins/table/utils/paste.js +8 -3
- package/dist/esm/plugins/tasks-and-decisions/commands.js +35 -11
- package/dist/esm/plugins/tasks-and-decisions/index.js +19 -18
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/input-rules.js +21 -17
- package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarDecision/index.js +2 -2
- package/dist/esm/plugins/tasks-and-decisions/ui/ToolbarTask/index.js +2 -2
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +23 -11
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/styles.js +7 -15
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +7 -3
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +9 -5
- package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +15 -9
- package/dist/esm/plugins/text-formatting/ui/Toolbar/more-button.js +7 -3
- package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +6 -4
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +13 -5
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +25 -14
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +8 -6
- package/dist/esm/plugins/undo-redo/ui/ToolbarUndoRedo/index.js +15 -11
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +6 -4
- package/dist/esm/ui/Addon/ClickAreaInline/index.js +5 -4
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +13 -10
- package/dist/esm/ui/Addon/Dropdown/index.js +6 -2
- package/dist/esm/ui/Addon/Dropdown/styles.js +2 -2
- package/dist/esm/ui/Addon/DropdownItem/index.js +6 -4
- package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -2
- package/dist/esm/ui/Alignment/index.js +8 -9
- package/dist/esm/ui/Alignment/styles.js +2 -2
- package/dist/esm/ui/Appearance/Chromeless.js +12 -14
- package/dist/esm/ui/Appearance/Comment/Comment.js +31 -31
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +13 -16
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +7 -4
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +28 -18
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +22 -14
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +21 -24
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +35 -34
- package/dist/esm/ui/AppearanceComponents/Mobile.js +13 -14
- package/dist/esm/ui/ChromeCollapsed/index.js +6 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +2 -2
- package/dist/esm/ui/ColorPalette/Color/index.js +9 -4
- package/dist/esm/ui/ColorPalette/Color/styles.js +3 -3
- package/dist/esm/ui/ColorPalette/Palettes/panelBackgroundPalette.js +1 -1
- package/dist/esm/ui/ColorPalette/index.js +7 -4
- package/dist/esm/ui/ColorPalette/styles.js +2 -2
- package/dist/esm/ui/ColorPickerButton/index.js +12 -7
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +11 -4
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +12 -10
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +16 -10
- package/dist/esm/ui/ConfigPanel/Fields/DateRange.js +27 -19
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +30 -21
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +17 -13
- package/dist/esm/ui/ConfigPanel/Fields/SelectItem.js +18 -18
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -2
- package/dist/esm/ui/ConfigPanel/LoadingState.js +6 -4
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +13 -12
- package/dist/esm/ui/ContentStyles/index.js +20 -17
- package/dist/esm/ui/ContextPanel/index.js +31 -48
- package/dist/esm/ui/DropdownMenu/index.js +21 -22
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +39 -16
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +9 -6
- package/dist/esm/ui/ElementBrowser/components/ElementBrowserLoader.js +6 -3
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +7 -5
- package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +20 -18
- package/dist/esm/ui/FloatingToolbar/index.js +8 -8
- package/dist/esm/ui/FloatingToolbar/styles.js +4 -5
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +27 -16
- package/dist/esm/ui/LinkSearch/ToolbarComponents.js +4 -7
- package/dist/esm/ui/PanelTextInput/index.js +6 -5
- package/dist/esm/ui/PanelTextInput/styles.js +6 -5
- package/dist/esm/ui/PluginSlot/index.js +7 -4
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +14 -12
- package/dist/esm/ui/ToolbarButton/index.js +8 -5
- package/dist/esm/ui/ToolbarFeedback/index.js +20 -8
- package/dist/esm/ui/ToolbarFeedback/styles.js +8 -11
- package/dist/esm/ui/styles.js +17 -23
- package/dist/esm/utils/prosemirror/autojoin.js +76 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/commands/index.d.ts +2 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +1 -1
- package/dist/types/create-editor/WithEditorView.d.ts +1 -1
- package/dist/types/editor.d.ts +8 -8
- package/dist/types/i18n/en.d.ts +276 -130
- package/dist/types/i18n/en_GB.d.ts +276 -130
- package/dist/types/i18n/pl.d.ts +24 -0
- package/dist/types/i18n/zh.d.ts +3 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/labs/EditorWithActions/index.d.ts +1 -1
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/labs/next/internal/context/shared-config.d.ts +2 -2
- package/dist/types/labs/next/mobile.d.ts +1 -1
- package/dist/types/plugins/alignment/commands/index.d.ts +3 -2
- package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -3
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/blocktype-button.d.ts +1 -0
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/styled.d.ts +2 -4
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +1 -1
- package/dist/types/plugins/card/nodeviews/embedCard.d.ts +1 -1
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +3 -6
- package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/util/state.d.ts +2 -2
- package/dist/types/plugins/card/toolbar.d.ts +1 -1
- package/dist/types/plugins/card/ui/LinkToolbarAppearance.d.ts +1 -1
- package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +2 -7
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/plugins/card/utils.d.ts +1 -1
- package/dist/types/plugins/date/actions.d.ts +2 -1
- package/dist/types/plugins/emoji/ui/Emoji/index.d.ts +3 -2
- package/dist/types/plugins/emoji/ui/EmojiContextProvider/index.d.ts +1 -1
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +2 -2
- package/dist/types/plugins/extension/ui/Extension/Extension/styles.d.ts +3 -4
- package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
- package/dist/types/plugins/find-replace/ui/FindReplaceToolbarButton.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/index.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +3 -3
- package/dist/types/plugins/floating-toolbar/ui/Input.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/Separator.d.ts +3 -2
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +2 -1
- package/dist/types/plugins/floating-toolbar/ui/ToolbarLoader.d.ts +1 -1
- package/dist/types/plugins/help-dialog/ui/HelpDialogLoader.d.ts +1 -1
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/styles.d.ts +1 -2
- package/dist/types/plugins/list/actions/wrap-and-join-lists.d.ts +1 -11
- package/dist/types/plugins/list/ui/ToolbarLists/index.d.ts +3 -3
- package/dist/types/plugins/media/commands/helpers.d.ts +2 -2
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +4 -2
- package/dist/types/plugins/media/nodeviews/styles.d.ts +4 -2
- package/dist/types/plugins/media/picker-facade.d.ts +5 -12
- package/dist/types/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -4
- package/dist/types/plugins/media/pm-plugins/types.d.ts +0 -1
- package/dist/types/plugins/media/toolbar/linking-toolbar-appearance.d.ts +1 -0
- package/dist/types/plugins/media/types.d.ts +0 -1
- package/dist/types/plugins/media/ui/CaptionPlaceholder/index.d.ts +3 -2
- package/dist/types/plugins/media/ui/Media/DropPlaceholder.d.ts +3 -2
- package/dist/types/plugins/media/ui/MediaLinkingToolbar.d.ts +3 -1
- package/dist/types/plugins/media/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +1 -1
- package/dist/types/plugins/media/utils/media-files.d.ts +3 -2
- package/dist/types/plugins/media/utils/media-single.d.ts +2 -2
- package/dist/types/plugins/mentions/analytics.d.ts +4 -3
- package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +6 -6
- package/dist/types/plugins/quick-insert/assets/index.d.ts +24 -24
- package/dist/types/plugins/status/nodeviews/status.d.ts +1 -4
- package/dist/types/plugins/status/ui/statusPicker.d.ts +4 -2
- package/dist/types/plugins/table/nodeviews/tableCell.d.ts +0 -1
- package/dist/types/plugins/table/types.d.ts +0 -1
- package/dist/types/plugins/table/ui/FloatingContextualMenu/ContextualMenu.d.ts +6 -4
- package/dist/types/plugins/table/ui/common-styles.d.ts +0 -2
- package/dist/types/plugins/table/utils/paste.d.ts +2 -0
- package/dist/types/plugins/tasks-and-decisions/commands.d.ts +5 -2
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +3 -1
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/styles.d.ts +3 -11
- package/dist/types/plugins/text-formatting/ui/Toolbar/index.d.ts +1 -0
- package/dist/types/plugins/text-formatting/ui/Toolbar/more-button.d.ts +1 -0
- package/dist/types/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.d.ts +1 -0
- package/dist/types/plugins/type-ahead/api.d.ts +1 -2
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +8 -5
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +2 -1
- package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/hooks/use-resize-observer.d.ts +0 -1
- package/dist/types/plugins/undo-redo/ui/ToolbarUndoRedo/index.d.ts +6 -4
- package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +3 -1
- package/dist/types/ui/Addon/ClickAreaInline/index.d.ts +3 -1
- package/dist/types/ui/Addon/ClickAreaMobile/index.d.ts +3 -1
- package/dist/types/ui/Addon/Dropdown/index.d.ts +3 -1
- package/dist/types/ui/Addon/Dropdown/styles.d.ts +1 -2
- package/dist/types/ui/Addon/DropdownItem/index.d.ts +3 -2
- package/dist/types/ui/Addon/DropdownItem/styles.d.ts +1 -2
- package/dist/types/ui/Alignment/index.d.ts +3 -3
- package/dist/types/ui/Alignment/styles.d.ts +1 -2
- package/dist/types/ui/Appearance/Chromeless.d.ts +3 -1
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +1 -0
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +2 -2
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +3 -1
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +6 -12
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +376 -17
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +3 -1
- package/dist/types/ui/ChromeCollapsed/index.d.ts +1 -0
- package/dist/types/ui/ChromeCollapsed/styles.d.ts +1 -4
- package/dist/types/ui/ColorPalette/Color/index.d.ts +3 -1
- package/dist/types/ui/ColorPalette/Color/styles.d.ts +2 -3
- package/dist/types/ui/ColorPalette/index.d.ts +1 -0
- package/dist/types/ui/ColorPalette/styles.d.ts +1 -2
- package/dist/types/ui/ColorPickerButton/index.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanelLoader.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ErrorMessage/index.d.ts +5 -4
- package/dist/types/ui/ConfigPanel/Fields/CheckboxGroup.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/ColorPicker.d.ts +3 -2
- package/dist/types/ui/ConfigPanel/Fields/DateRange.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +11 -7
- package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/Fields/SelectItem.d.ts +3 -2
- package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +6 -4
- package/dist/types/ui/ConfigPanel/Fields/common/RequiredIndicator.d.ts +1 -2
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Header.d.ts +13 -7
- package/dist/types/ui/ConfigPanel/LoadingState.d.ts +3 -2
- package/dist/types/ui/ConfigPanel/NestedForms/RemovableField.d.ts +14 -8
- package/dist/types/ui/ContentStyles/index.d.ts +4 -1
- package/dist/types/ui/ContextPanel/index.d.ts +8 -14
- package/dist/types/ui/DropdownMenu/index.d.ts +3 -1
- package/dist/types/ui/EditorContext/index.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/components/CategoryList.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/ElementBrowserLoader.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/ElementSearch.d.ts +3 -2
- package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types/ui/FloatingToolbar/index.d.ts +3 -2
- package/dist/types/ui/FloatingToolbar/styles.d.ts +1 -5
- package/dist/types/ui/LinkSearch/LinkSearchListItem.d.ts +5 -7
- package/dist/types/ui/LinkSearch/ToolbarComponents.d.ts +3 -8
- package/dist/types/ui/LinkSearch/index.d.ts +20 -20
- package/dist/types/ui/LinkSearch/withActivityProvider.d.ts +21 -20
- package/dist/types/ui/PanelTextInput/index.d.ts +3 -1
- package/dist/types/ui/PanelTextInput/styles.d.ts +2 -4
- package/dist/types/ui/PluginSlot/index.d.ts +3 -1
- package/dist/types/ui/Toolbar/ToolbarWithSizeDetector.d.ts +1 -0
- package/dist/types/ui/Toolbar/toolbar-size.d.ts +3 -2
- package/dist/types/ui/ToolbarButton/index.d.ts +5 -7
- package/dist/types/ui/ToolbarButton/styles.d.ts +2 -4
- package/dist/types/ui/ToolbarFeedback/index.d.ts +4 -2
- package/dist/types/ui/ToolbarFeedback/styles.d.ts +6 -7
- package/dist/types/ui/WithEditorActions/index.d.ts +2 -2
- package/dist/types/ui/WithHelpTrigger/index.d.ts +1 -1
- package/dist/types/ui/WithPluginState/index.d.ts +3 -3
- package/dist/types/ui/styles.d.ts +12 -22
- package/dist/types/utils/nodes.d.ts +2 -1
- package/dist/types/utils/prosemirror/autojoin.d.ts +13 -0
- package/package.json +23 -23
- package/dist/cjs/ui/Separator/index.js +0 -21
- package/dist/es2019/ui/Separator/index.js +0 -9
- package/dist/esm/ui/Separator/index.js +0 -8
- package/dist/types/ui/Separator/index.d.ts +0 -3
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -31,7 +29,9 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
31
29
|
|
|
32
30
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
33
31
|
|
|
34
|
-
var _react =
|
|
32
|
+
var _react = require("@emotion/react");
|
|
33
|
+
|
|
34
|
+
var _react2 = require("react");
|
|
35
35
|
|
|
36
36
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
37
37
|
|
|
@@ -77,10 +77,6 @@ var _prosemirrorState = require("prosemirror-state");
|
|
|
77
77
|
|
|
78
78
|
var _captions = require("../commands/captions");
|
|
79
79
|
|
|
80
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
81
|
-
|
|
82
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
83
|
-
|
|
84
80
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
85
81
|
|
|
86
82
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -457,15 +453,15 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
457
453
|
|
|
458
454
|
var shouldShowPlaceholder = (0, _mediaCommon2.getMediaFeatureFlag)('captions', mediaOptions.featureFlags) && node.childCount !== 2 && isSelected && state.selection instanceof _prosemirrorState.NodeSelection;
|
|
459
455
|
|
|
460
|
-
var MediaChildren =
|
|
456
|
+
var MediaChildren = (0, _react.jsx)("figure", {
|
|
457
|
+
css: _styles.figureWrapper,
|
|
461
458
|
className: _styles.MediaSingleNodeSelector
|
|
462
|
-
},
|
|
459
|
+
}, (0, _react.jsx)("div", {
|
|
463
460
|
ref: this.props.forwardRef
|
|
464
|
-
}), shouldShowPlaceholder &&
|
|
461
|
+
}), shouldShowPlaceholder && (0, _react.jsx)(_CaptionPlaceholder.default, {
|
|
465
462
|
onClick: this.clickPlaceholder
|
|
466
463
|
}));
|
|
467
|
-
|
|
468
|
-
return canResize ? /*#__PURE__*/_react.default.createElement(_ResizableMediaSingle.default, (0, _extends2.default)({}, mediaSingleProps, {
|
|
464
|
+
return canResize ? (0, _react.jsx)(_ResizableMediaSingle.default, (0, _extends2.default)({}, mediaSingleProps, {
|
|
469
465
|
lineLength: lineLength,
|
|
470
466
|
view: this.props.view,
|
|
471
467
|
getPos: getPos,
|
|
@@ -476,11 +472,11 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
476
472
|
allowBreakoutSnapPoints: mediaOptions && mediaOptions.allowBreakoutSnapPoints,
|
|
477
473
|
selected: isSelected,
|
|
478
474
|
dispatchAnalyticsEvent: this.props.dispatchAnalyticsEvent
|
|
479
|
-
}), MediaChildren) :
|
|
475
|
+
}), MediaChildren) : (0, _react.jsx)(_ui.MediaSingle, mediaSingleProps, MediaChildren);
|
|
480
476
|
}
|
|
481
477
|
}]);
|
|
482
478
|
return MediaSingleNode;
|
|
483
|
-
}(
|
|
479
|
+
}(_react2.Component);
|
|
484
480
|
|
|
485
481
|
exports.default = MediaSingleNode;
|
|
486
482
|
(0, _defineProperty2.default)(MediaSingleNode, "defaultProps", {
|
|
@@ -600,13 +596,13 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
600
596
|
dispatchAnalyticsEvent = _this$reactComponentP.dispatchAnalyticsEvent; // getPos is a boolean for marks, since this is a node we know it must be a function
|
|
601
597
|
|
|
602
598
|
var getPos = this.getPos;
|
|
603
|
-
return
|
|
599
|
+
return (0, _react.jsx)(_providerFactory.WithProviders, {
|
|
604
600
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
605
601
|
providerFactory: providerFactory,
|
|
606
602
|
renderNode: function renderNode(_ref5) {
|
|
607
603
|
var mediaProvider = _ref5.mediaProvider,
|
|
608
604
|
contextIdentifierProvider = _ref5.contextIdentifierProvider;
|
|
609
|
-
return
|
|
605
|
+
return (0, _react.jsx)(_WithPluginState.default, {
|
|
610
606
|
editorView: _this4.view,
|
|
611
607
|
plugins: {
|
|
612
608
|
width: _width.pluginKey,
|
|
@@ -615,7 +611,7 @@ var MediaSingleNodeView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
615
611
|
render: function render(_ref6) {
|
|
616
612
|
var width = _ref6.width,
|
|
617
613
|
mediaPluginState = _ref6.mediaPluginState;
|
|
618
|
-
return
|
|
614
|
+
return (0, _react.jsx)(MediaSingleNode, {
|
|
619
615
|
width: width.width,
|
|
620
616
|
lineLength: width.lineLength,
|
|
621
617
|
node: _this4.node,
|
|
@@ -5,13 +5,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.figureWrapper = exports.MediaSingleNodeSelector = exports.MediaInlineNodeSelector = exports.MediaCardWrapper = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireDefault(require("react"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
15
15
|
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3;
|
|
17
17
|
|
|
@@ -19,26 +19,24 @@ var MediaInlineNodeSelector = 'media-inline-node';
|
|
|
19
19
|
exports.MediaInlineNodeSelector = MediaInlineNodeSelector;
|
|
20
20
|
var MediaSingleNodeSelector = 'media-single-node';
|
|
21
21
|
exports.MediaSingleNodeSelector = MediaSingleNodeSelector;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
FigureWrapper.displayName = 'FigureWrapper';
|
|
27
|
-
|
|
28
|
-
var AbsoluteDiv = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 100%;\n height: 100%;\n"])));
|
|
29
|
-
|
|
30
|
-
var ForcedDimensions = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n position: relative;\n padding-bottom: ", "%;\n"])), function (props) {
|
|
31
|
-
return props.dimensions.height / props.dimensions.width * 100;
|
|
32
|
-
});
|
|
22
|
+
var figureWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n"])));
|
|
23
|
+
exports.figureWrapper = figureWrapper;
|
|
24
|
+
var absoluteDiv = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 100%;\n height: 100%;\n"])));
|
|
25
|
+
var forcedDimensions = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n position: relative;\n"])));
|
|
33
26
|
|
|
34
27
|
var MediaCardWrapper = function MediaCardWrapper(_ref) {
|
|
35
28
|
var dimensions = _ref.dimensions,
|
|
36
29
|
children = _ref.children,
|
|
37
30
|
onContextMenu = _ref.onContextMenu;
|
|
38
|
-
return
|
|
39
|
-
|
|
31
|
+
return (0, _react2.jsx)("div", {
|
|
32
|
+
css: forcedDimensions,
|
|
33
|
+
style: {
|
|
34
|
+
paddingBottom: "".concat(dimensions.height / dimensions.width * 100, "%")
|
|
35
|
+
},
|
|
40
36
|
onContextMenuCapture: onContextMenu
|
|
41
|
-
},
|
|
37
|
+
}, (0, _react2.jsx)("div", {
|
|
38
|
+
css: absoluteDiv
|
|
39
|
+
}, children));
|
|
42
40
|
};
|
|
43
41
|
|
|
44
42
|
exports.MediaCardWrapper = MediaCardWrapper;
|
|
@@ -20,11 +20,9 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
20
20
|
var _mediaPicker = require("@atlaskit/media-picker");
|
|
21
21
|
|
|
22
22
|
var PickerFacade = /*#__PURE__*/function () {
|
|
23
|
-
function PickerFacade(pickerType, config, pickerConfig) {
|
|
23
|
+
function PickerFacade(pickerType, config, pickerConfig, analyticsName) {
|
|
24
24
|
var _this = this;
|
|
25
25
|
|
|
26
|
-
var mediaPickerFactoryClass = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _mediaPicker.MediaPicker;
|
|
27
|
-
var analyticsName = arguments.length > 4 ? arguments[4] : undefined;
|
|
28
26
|
(0, _classCallCheck2.default)(this, PickerFacade);
|
|
29
27
|
(0, _defineProperty2.default)(this, "onDragListeners", []);
|
|
30
28
|
(0, _defineProperty2.default)(this, "onStartListeners", []);
|
|
@@ -129,9 +127,7 @@ var PickerFacade = /*#__PURE__*/function () {
|
|
|
129
127
|
});
|
|
130
128
|
this.config = config;
|
|
131
129
|
this.pickerConfig = pickerConfig;
|
|
132
|
-
this.mediaPickerFactoryClass = mediaPickerFactoryClass;
|
|
133
130
|
this.pickerType = pickerType;
|
|
134
|
-
this.errorReporter = config.errorReporter;
|
|
135
131
|
this.analyticsName = analyticsName;
|
|
136
132
|
this.erroredFiles = new Set();
|
|
137
133
|
}
|
|
@@ -145,43 +141,25 @@ var PickerFacade = /*#__PURE__*/function () {
|
|
|
145
141
|
while (1) {
|
|
146
142
|
switch (_context.prev = _context.next) {
|
|
147
143
|
case 0:
|
|
148
|
-
if (
|
|
149
|
-
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
picker = this.picker = this.pickerConfig;
|
|
154
|
-
_context.next = 8;
|
|
155
|
-
break;
|
|
156
|
-
|
|
157
|
-
case 4:
|
|
158
|
-
if (!(this.pickerType === 'popup')) {
|
|
159
|
-
_context.next = 8;
|
|
160
|
-
break;
|
|
144
|
+
if (this.pickerType === 'customMediaPicker') {
|
|
145
|
+
picker = this.picker = this.pickerConfig;
|
|
161
146
|
}
|
|
162
147
|
|
|
163
|
-
_context.next = 7;
|
|
164
|
-
return this.mediaPickerFactoryClass(this.config.mediaClientConfig, this.pickerConfig);
|
|
165
|
-
|
|
166
|
-
case 7:
|
|
167
|
-
picker = this.picker = _context.sent;
|
|
168
|
-
|
|
169
|
-
case 8:
|
|
170
148
|
if (picker) {
|
|
171
|
-
_context.next =
|
|
149
|
+
_context.next = 3;
|
|
172
150
|
break;
|
|
173
151
|
}
|
|
174
152
|
|
|
175
153
|
return _context.abrupt("return", this);
|
|
176
154
|
|
|
177
|
-
case
|
|
155
|
+
case 3:
|
|
178
156
|
picker.on('upload-preview-update', this.handleUploadPreviewUpdate);
|
|
179
157
|
picker.on('upload-end', this.handleReady);
|
|
180
158
|
picker.on('upload-error', this.handleUploadError);
|
|
181
159
|
picker.on('mobile-upload-end', this.handleMobileUploadEnd);
|
|
182
160
|
return _context.abrupt("return", this);
|
|
183
161
|
|
|
184
|
-
case
|
|
162
|
+
case 8:
|
|
185
163
|
case "end":
|
|
186
164
|
return _context.stop();
|
|
187
165
|
}
|
|
@@ -219,14 +197,6 @@ var PickerFacade = /*#__PURE__*/function () {
|
|
|
219
197
|
picker.removeAllListeners('upload-error');
|
|
220
198
|
this.onStartListeners = [];
|
|
221
199
|
this.onDragListeners = [];
|
|
222
|
-
|
|
223
|
-
try {
|
|
224
|
-
if (this.pickerType === 'popup') {
|
|
225
|
-
picker.teardown();
|
|
226
|
-
}
|
|
227
|
-
} catch (ex) {
|
|
228
|
-
this.errorReporter.captureException(ex);
|
|
229
|
-
}
|
|
230
200
|
}
|
|
231
201
|
}, {
|
|
232
202
|
key: "setUploadParams",
|
|
@@ -235,39 +205,6 @@ var PickerFacade = /*#__PURE__*/function () {
|
|
|
235
205
|
this.picker.setUploadParams(params);
|
|
236
206
|
}
|
|
237
207
|
}
|
|
238
|
-
}, {
|
|
239
|
-
key: "onClose",
|
|
240
|
-
value: function onClose(cb) {
|
|
241
|
-
var picker = this.picker;
|
|
242
|
-
|
|
243
|
-
if (this.pickerType === 'popup') {
|
|
244
|
-
var popupPicker = picker;
|
|
245
|
-
popupPicker.on('closed', cb);
|
|
246
|
-
return function () {
|
|
247
|
-
return popupPicker.off('closed', cb);
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
return function () {};
|
|
252
|
-
}
|
|
253
|
-
}, {
|
|
254
|
-
key: "show",
|
|
255
|
-
value: function show() {
|
|
256
|
-
if (this.pickerType === 'popup') {
|
|
257
|
-
try {
|
|
258
|
-
this.picker.show();
|
|
259
|
-
} catch (ex) {
|
|
260
|
-
this.errorReporter.captureException(ex);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}, {
|
|
265
|
-
key: "hide",
|
|
266
|
-
value: function hide() {
|
|
267
|
-
if (this.pickerType === 'popup') {
|
|
268
|
-
this.picker.hide();
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
208
|
}, {
|
|
272
209
|
key: "onNewMedia",
|
|
273
210
|
value: function onNewMedia(cb) {
|
|
@@ -107,7 +107,7 @@ var createDropPlaceholder = function createDropPlaceholder(intl, allowDropLine)
|
|
|
107
107
|
var MEDIA_RESOLVED_STATES = ['ready', 'error', 'cancelled'];
|
|
108
108
|
|
|
109
109
|
var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
110
|
-
function MediaPluginStateImplementation(_state, options,
|
|
110
|
+
function MediaPluginStateImplementation(_state, options, mediaOptions, _dispatch) {
|
|
111
111
|
var _this = this;
|
|
112
112
|
|
|
113
113
|
(0, _classCallCheck2.default)(this, MediaPluginStateImplementation);
|
|
@@ -246,7 +246,7 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
_context2.next = 30;
|
|
249
|
-
return _this.initPickers(_this.mediaProvider.uploadParams, _pickerFacade.default
|
|
249
|
+
return _this.initPickers(_this.mediaProvider.uploadParams, _pickerFacade.default);
|
|
250
250
|
|
|
251
251
|
case 30:
|
|
252
252
|
_context2.next = 33;
|
|
@@ -373,20 +373,11 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
373
373
|
(0, _defineProperty2.default)(this, "onPopupPickerClose", function () {
|
|
374
374
|
_this.onPopupToggleCallback(false);
|
|
375
375
|
});
|
|
376
|
-
(0, _defineProperty2.default)(this, "shouldUseMediaPickerPopup", function () {
|
|
377
|
-
return false;
|
|
378
|
-
});
|
|
379
376
|
(0, _defineProperty2.default)(this, "showMediaPicker", function () {
|
|
380
|
-
if (_this.openMediaPickerBrowser
|
|
377
|
+
if (_this.openMediaPickerBrowser) {
|
|
381
378
|
return _this.openMediaPickerBrowser();
|
|
382
379
|
}
|
|
383
380
|
|
|
384
|
-
if (!_this.popupPicker) {
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
_this.popupPicker.show();
|
|
389
|
-
|
|
390
381
|
_this.onPopupToggleCallback(true);
|
|
391
382
|
});
|
|
392
383
|
(0, _defineProperty2.default)(this, "setBrowseFn", function (browseFn) {
|
|
@@ -467,14 +458,10 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
467
458
|
});
|
|
468
459
|
}
|
|
469
460
|
|
|
470
|
-
_this.popupPicker = undefined;
|
|
471
461
|
_this.customPicker = undefined;
|
|
472
462
|
});
|
|
473
463
|
(0, _defineProperty2.default)(this, "getInputMethod", function (pickerType) {
|
|
474
464
|
switch (pickerType) {
|
|
475
|
-
case 'popup':
|
|
476
|
-
return _types.INPUT_METHOD.PICKER_CLOUD;
|
|
477
|
-
|
|
478
465
|
case 'clipboard':
|
|
479
466
|
return _types.INPUT_METHOD.CLIPBOARD;
|
|
480
467
|
|
|
@@ -570,7 +557,6 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
570
557
|
|
|
571
558
|
dispatch(state.tr);
|
|
572
559
|
});
|
|
573
|
-
this.reactContext = reactContext;
|
|
574
560
|
this.options = options;
|
|
575
561
|
this.mediaOptions = mediaOptions;
|
|
576
562
|
this.dispatch = _dispatch;
|
|
@@ -655,10 +641,10 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
655
641
|
}, {
|
|
656
642
|
key: "initPickers",
|
|
657
643
|
value: function () {
|
|
658
|
-
var _initPickers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(uploadParams, Picker
|
|
644
|
+
var _initPickers = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(uploadParams, Picker) {
|
|
659
645
|
var _this2 = this;
|
|
660
646
|
|
|
661
|
-
var errorReporter, pickers, pickerPromises, pickerFacadeConfig,
|
|
647
|
+
var errorReporter, pickers, pickerPromises, pickerFacadeConfig, customPicker;
|
|
662
648
|
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
663
649
|
while (1) {
|
|
664
650
|
switch (_context3.prev = _context3.next) {
|
|
@@ -674,7 +660,7 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
674
660
|
errorReporter = this.errorReporter, pickers = this.pickers, pickerPromises = this.pickerPromises; // create pickers if they don't exist, re-use otherwise
|
|
675
661
|
|
|
676
662
|
if (pickers.length) {
|
|
677
|
-
_context3.next =
|
|
663
|
+
_context3.next = 14;
|
|
678
664
|
break;
|
|
679
665
|
}
|
|
680
666
|
|
|
@@ -682,63 +668,35 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
682
668
|
mediaClientConfig: this.uploadMediaClientConfig,
|
|
683
669
|
errorReporter: errorReporter
|
|
684
670
|
};
|
|
685
|
-
defaultPickerConfig = {
|
|
686
|
-
uploadParams: uploadParams,
|
|
687
|
-
proxyReactContext: reactContext(),
|
|
688
|
-
useForgePlugins: this.mediaOptions && this.mediaOptions.useForgePlugins || false,
|
|
689
|
-
featureFlags: this.mediaOptions && this.mediaOptions.featureFlags
|
|
690
|
-
};
|
|
691
671
|
|
|
692
672
|
if (!this.options.customMediaPicker) {
|
|
693
|
-
_context3.next =
|
|
673
|
+
_context3.next = 13;
|
|
694
674
|
break;
|
|
695
675
|
}
|
|
696
676
|
|
|
697
677
|
customPicker = new Picker('customMediaPicker', pickerFacadeConfig, this.options.customMediaPicker).init();
|
|
698
678
|
pickerPromises.push(customPicker);
|
|
699
679
|
_context3.t0 = pickers;
|
|
700
|
-
_context3.next =
|
|
680
|
+
_context3.next = 11;
|
|
701
681
|
return customPicker;
|
|
702
682
|
|
|
703
|
-
case
|
|
683
|
+
case 11:
|
|
704
684
|
_context3.t1 = this.customPicker = _context3.sent;
|
|
705
685
|
|
|
706
686
|
_context3.t0.push.call(_context3.t0, _context3.t1);
|
|
707
687
|
|
|
708
|
-
|
|
709
|
-
break;
|
|
710
|
-
|
|
711
|
-
case 16:
|
|
712
|
-
if (!this.shouldUseMediaPickerPopup()) {
|
|
713
|
-
_context3.next = 25;
|
|
714
|
-
break;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
popupPicker = new Picker('popup', pickerFacadeConfig, defaultPickerConfig).init();
|
|
718
|
-
pickerPromises.push(popupPicker);
|
|
719
|
-
_context3.t2 = pickers;
|
|
720
|
-
_context3.next = 22;
|
|
721
|
-
return popupPicker;
|
|
722
|
-
|
|
723
|
-
case 22:
|
|
724
|
-
_context3.t3 = this.popupPicker = _context3.sent;
|
|
725
|
-
|
|
726
|
-
_context3.t2.push.call(_context3.t2, _context3.t3);
|
|
727
|
-
|
|
728
|
-
this.removeOnCloseListener = this.popupPicker.onClose(this.onPopupPickerClose);
|
|
729
|
-
|
|
730
|
-
case 25:
|
|
688
|
+
case 13:
|
|
731
689
|
pickers.forEach(function (picker) {
|
|
732
690
|
picker.onNewMedia(_this2.insertFile);
|
|
733
691
|
});
|
|
734
692
|
|
|
735
|
-
case
|
|
693
|
+
case 14:
|
|
736
694
|
// set new upload params for the pickers
|
|
737
695
|
pickers.forEach(function (picker) {
|
|
738
696
|
return picker.setUploadParams(uploadParams);
|
|
739
697
|
});
|
|
740
698
|
|
|
741
|
-
case
|
|
699
|
+
case 15:
|
|
742
700
|
case "end":
|
|
743
701
|
return _context3.stop();
|
|
744
702
|
}
|
|
@@ -746,7 +704,7 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
|
|
|
746
704
|
}, _callee3, this);
|
|
747
705
|
}));
|
|
748
706
|
|
|
749
|
-
function initPickers(_x4, _x5
|
|
707
|
+
function initPickers(_x4, _x5) {
|
|
750
708
|
return _initPickers.apply(this, arguments);
|
|
751
709
|
}
|
|
752
710
|
|
|
@@ -794,7 +752,7 @@ var createPlugin = function createPlugin(_schema, options, reactContext, getIntl
|
|
|
794
752
|
return new _safePlugin.SafePlugin({
|
|
795
753
|
state: {
|
|
796
754
|
init: function init(_config, state) {
|
|
797
|
-
return new MediaPluginStateImplementation(state, options,
|
|
755
|
+
return new MediaPluginStateImplementation(state, options, mediaOptions, dispatch);
|
|
798
756
|
},
|
|
799
757
|
apply: function apply(tr, pluginState) {
|
|
800
758
|
// remap editing media single position if we're in collab
|
|
@@ -15,7 +15,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
15
15
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _react2 = require("@emotion/react");
|
|
19
19
|
|
|
20
20
|
var _link = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/link"));
|
|
21
21
|
|
|
@@ -44,7 +44,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
44
44
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
45
|
|
|
46
46
|
// need this wrapper, need to have 4px between items.
|
|
47
|
-
var
|
|
47
|
+
var wrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n margin-right: 4px;\n"])));
|
|
48
48
|
|
|
49
49
|
var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
|
|
50
50
|
var editorState = _ref.editorState,
|
|
@@ -90,39 +90,43 @@ var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
|
|
|
90
90
|
var isValidUrl = (0, _adfSchema.isSafeUrl)(mediaLinkingState.link);
|
|
91
91
|
var title = intl.formatMessage(_messages.linkToolbarMessages.editLink);
|
|
92
92
|
var linkTitle = intl.formatMessage(isValidUrl ? _messages.linkMessages.openLink : _messages.linkToolbarMessages.unableToOpenLink);
|
|
93
|
-
return
|
|
93
|
+
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
94
|
+
css: wrapper
|
|
95
|
+
}, (0, _react2.jsx)(_Button.default, {
|
|
94
96
|
onClick: onEditLink,
|
|
95
97
|
title: title,
|
|
96
|
-
tooltipContent:
|
|
98
|
+
tooltipContent: (0, _react2.jsx)(_keymaps.ToolTipContent, {
|
|
97
99
|
description: title,
|
|
98
100
|
keymap: _keymaps.addLink
|
|
99
101
|
})
|
|
100
|
-
}, title)),
|
|
102
|
+
}, title)), (0, _react2.jsx)("div", {
|
|
103
|
+
css: wrapper
|
|
104
|
+
}, (0, _react2.jsx)(_Separator.default, null)), (0, _react2.jsx)(_Button.default, {
|
|
101
105
|
target: "_blank",
|
|
102
106
|
href: isValidUrl ? mediaLinkingState.link : undefined,
|
|
103
107
|
disabled: !isValidUrl,
|
|
104
108
|
onClick: onOpenLink,
|
|
105
109
|
title: linkTitle,
|
|
106
|
-
icon:
|
|
110
|
+
icon: (0, _react2.jsx)(_shortcut.default, {
|
|
107
111
|
label: linkTitle
|
|
108
112
|
}),
|
|
109
113
|
className: "hyperlink-open-link"
|
|
110
|
-
}),
|
|
114
|
+
}), (0, _react2.jsx)(_Separator.default, null));
|
|
111
115
|
} else {
|
|
112
116
|
var _title = intl.formatMessage(_messages.linkToolbarMessages.addLink);
|
|
113
117
|
|
|
114
|
-
return
|
|
118
|
+
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_Button.default, {
|
|
115
119
|
testId: "add-link-button",
|
|
116
120
|
onClick: onAddLink,
|
|
117
121
|
title: _title,
|
|
118
|
-
tooltipContent:
|
|
122
|
+
tooltipContent: (0, _react2.jsx)(_keymaps.ToolTipContent, {
|
|
119
123
|
description: _title,
|
|
120
124
|
keymap: _keymaps.addLink
|
|
121
125
|
}),
|
|
122
|
-
icon:
|
|
126
|
+
icon: (0, _react2.jsx)(_link.default, {
|
|
123
127
|
label: _title
|
|
124
128
|
})
|
|
125
|
-
}),
|
|
129
|
+
}), (0, _react2.jsx)(_Separator.default, null));
|
|
126
130
|
}
|
|
127
131
|
};
|
|
128
132
|
|
|
@@ -9,30 +9,28 @@ exports.default = exports.CAPTION_PLACEHOLDER_ID = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
-
var _react =
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _reactIntlNext = require("react-intl-next");
|
|
15
15
|
|
|
16
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
17
|
-
|
|
18
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
17
|
|
|
20
18
|
var _messages = require("./messages");
|
|
21
19
|
|
|
22
20
|
var _templateObject;
|
|
23
21
|
|
|
24
|
-
var
|
|
25
|
-
|
|
22
|
+
var placeholder = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n width: 100%;\n text-align: center;\n margin-top: 8px !important;\n display: block;\n"])), _colors.N200);
|
|
26
23
|
var CAPTION_PLACEHOLDER_ID = 'caption-placeholder';
|
|
27
24
|
exports.CAPTION_PLACEHOLDER_ID = CAPTION_PLACEHOLDER_ID;
|
|
28
25
|
|
|
29
26
|
var _default = function _default(_ref) {
|
|
30
27
|
var onClick = _ref.onClick;
|
|
31
|
-
return
|
|
28
|
+
return (0, _react.jsx)("span", {
|
|
29
|
+
css: placeholder,
|
|
32
30
|
onClick: onClick,
|
|
33
31
|
"data-id": CAPTION_PLACEHOLDER_ID,
|
|
34
32
|
"data-testid": "caption-placeholder"
|
|
35
|
-
},
|
|
33
|
+
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.placeholder));
|
|
36
34
|
};
|
|
37
35
|
|
|
38
36
|
exports.default = _default;
|
|
@@ -9,9 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
-
var _react =
|
|
13
|
-
|
|
14
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
+
var _react = require("@emotion/react");
|
|
15
13
|
|
|
16
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
15
|
|
|
@@ -29,14 +27,15 @@ var _media = require("../../nodeviews/mediaNodeView/media");
|
|
|
29
27
|
|
|
30
28
|
var _templateObject, _templateObject2;
|
|
31
29
|
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
var DropLine = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: ", "px;\n margin: 2px 0;\n width: 100%;\n height: 2px;\n"])), _colors.B200, (0, _constants.borderRadius)());
|
|
30
|
+
var iconWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n background: ", ";\n border-radius: ", "px;\n margin: 5px 3px 25px;\n width: ", "px;\n min-height: ", "px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), (0, _adfSchema.hexToRgba)(_colors.B400, 0.4) || _colors.B400, (0, _adfSchema.hexToRgba)(_colors.B300, 0.6) || _colors.B300, (0, _constants.borderRadius)(), _media.FILE_WIDTH, _media.MEDIA_HEIGHT);
|
|
31
|
+
var dropLine = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: ", "px;\n margin: 2px 0;\n width: 100%;\n height: 2px;\n"])), _colors.B200, (0, _constants.borderRadius)());
|
|
35
32
|
|
|
36
33
|
var IconWrapperComponent = function IconWrapperComponent(props) {
|
|
37
34
|
var intl = props.intl;
|
|
38
35
|
var dropPlaceholderLabel = _dropPlaceholderMessages.dropPlaceholderMessages.dropPlaceholderLabel;
|
|
39
|
-
return
|
|
36
|
+
return (0, _react.jsx)("div", {
|
|
37
|
+
css: iconWrapper
|
|
38
|
+
}, (0, _react.jsx)(_documentFilled.default, {
|
|
40
39
|
label: intl.formatMessage(dropPlaceholderLabel),
|
|
41
40
|
size: "medium"
|
|
42
41
|
}));
|
|
@@ -47,7 +46,9 @@ var IntlIconWrapper = (0, _reactIntlNext.injectIntl)(IconWrapperComponent);
|
|
|
47
46
|
var _default = function _default(_ref) {
|
|
48
47
|
var _ref$type = _ref.type,
|
|
49
48
|
type = _ref$type === void 0 ? 'group' : _ref$type;
|
|
50
|
-
return type === 'single' ?
|
|
49
|
+
return type === 'single' ? (0, _react.jsx)("div", {
|
|
50
|
+
css: dropLine
|
|
51
|
+
}) : (0, _react.jsx)(IntlIconWrapper, null);
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
exports.default = _default;
|