@atlaskit/editor-core 166.0.4 → 167.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +46 -1
- package/CHANGELOG.md +99 -0
- package/dist/cjs/actions/index.js +26 -2
- package/dist/cjs/create-editor/ReactEditorView.js +2 -0
- package/dist/cjs/create-editor/create-plugins-list.js +1 -2
- package/dist/cjs/editor.js +5 -2
- package/dist/cjs/keymaps/index.js +5 -1
- package/dist/cjs/labs/next/ContentComponents.js +8 -4
- package/dist/cjs/labs/next/full-page.js +14 -8
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +7 -3
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +3 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +3 -1
- package/dist/cjs/plugins/analytics/types/enums.js +3 -0
- package/dist/cjs/plugins/base/index.js +8 -17
- package/dist/cjs/plugins/base/pm-plugins/better-type-history.js +3 -12
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +71 -16
- package/dist/cjs/plugins/block-type/commands/block-type.js +32 -22
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +4 -2
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -11
- package/dist/cjs/plugins/card/styles.js +1 -1
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/cjs/plugins/code-block/actions.js +36 -2
- package/dist/cjs/plugins/code-block/nodeviews/code-block.js +70 -1
- package/dist/cjs/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/cjs/plugins/code-block/pm-plugins/main.js +46 -8
- package/dist/cjs/plugins/code-block/styles.js +28 -24
- package/dist/cjs/plugins/collab-edit/styles.js +4 -2
- package/dist/cjs/plugins/collab-edit/ui/styles.js +4 -2
- package/dist/cjs/plugins/collab-edit/utils.js +1 -0
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +3 -1
- package/dist/cjs/plugins/expand/ui/styles.js +16 -14
- package/dist/cjs/plugins/extension/commands.js +3 -2
- package/dist/cjs/plugins/extension/context-panel.js +21 -7
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +6 -4
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +3 -1
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +7 -5
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -2
- package/dist/cjs/plugins/fake-text-cursor/styles.js +3 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/cjs/plugins/find-replace/styles.js +2 -6
- package/dist/cjs/plugins/find-replace/ui/styles.js +4 -2
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +6 -4
- package/dist/cjs/plugins/floating-toolbar/ui/styles.js +12 -10
- package/dist/cjs/plugins/grid/styles.js +3 -1
- package/dist/cjs/plugins/help-dialog/ui/styles.js +9 -7
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +23 -1
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +10 -1
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -3
- package/dist/cjs/plugins/hyperlink/utils.js +53 -2
- package/dist/cjs/plugins/insert-block/index.js +1 -1
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -2
- package/dist/cjs/plugins/layout/styles.js +1 -1
- package/dist/cjs/plugins/media/commands/helpers.js +10 -9
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +23 -4
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -0
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -3
- package/dist/cjs/plugins/media/pm-plugins/main.js +1 -0
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +4 -2
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +3 -1
- package/dist/cjs/plugins/mentions/styles.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +4 -2
- package/dist/cjs/plugins/panel/index.js +1 -0
- package/dist/cjs/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +21 -3
- package/dist/cjs/plugins/paste/handlers.js +23 -0
- package/dist/cjs/plugins/paste/linkify-md-plugin.js +7 -0
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +9 -1
- package/dist/cjs/plugins/paste/pm-plugins/main.js +27 -1
- package/dist/cjs/plugins/placeholder/index.js +15 -3
- package/dist/cjs/plugins/placeholder/styles.js +3 -1
- package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
- package/dist/cjs/plugins/quick-insert/search.js +3 -1
- package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/cjs/plugins/status/ui/statusPicker.js +3 -3
- package/dist/cjs/plugins/table/index.js +14 -4
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/cjs/plugins/table/nodeviews/table.js +9 -4
- package/dist/cjs/plugins/table/pm-plugins/main.js +1 -4
- package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +118 -0
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/cjs/plugins/table/transforms/column-width.js +1 -2
- package/dist/cjs/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +4 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +3 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +4 -2
- package/dist/cjs/plugins/table/ui/consts.js +14 -11
- package/dist/cjs/plugins/table/ui/ui-styles.js +17 -10
- package/dist/cjs/plugins/table/utils/decoration.js +3 -4
- package/dist/cjs/plugins/table/utils/paste.js +9 -9
- package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
- package/dist/cjs/plugins/type-ahead/index.js +4 -3
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +3 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +11 -9
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +73 -3
- package/dist/cjs/plugins/unsupported-content/styles.js +1 -1
- package/dist/cjs/ui/Addon/Dropdown/styles.js +3 -1
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +3 -1
- package/dist/cjs/ui/Appearance/Chromeless.js +2 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +10 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +5 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +6 -3
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +21 -14
- package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +4 -2
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -8
- package/dist/cjs/ui/ContentStyles/index.js +4 -2
- package/dist/cjs/ui/ContextPanel/index.js +3 -1
- package/dist/cjs/ui/DropdownMenu/index.js +5 -0
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +6 -4
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +4 -2
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +4 -2
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +3 -1
- package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +3 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +3 -1
- package/dist/cjs/ui/FloatingToolbar/styles.js +2 -2
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +5 -3
- package/dist/cjs/ui/PanelTextInput/styles.js +3 -1
- package/dist/cjs/ui/PluginSlot/index.js +7 -4
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -2
- package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -3
- package/dist/cjs/ui/WithFlash/index.js +4 -2
- package/dist/cjs/ui/styles.js +6 -4
- package/dist/cjs/utils/document.js +62 -6
- package/dist/cjs/utils/filter/privacy-filter.js +2 -2
- package/dist/cjs/utils/step.js +17 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +25 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -0
- package/dist/es2019/create-editor/create-plugins-list.js +1 -2
- package/dist/es2019/editor.js +5 -2
- package/dist/es2019/keymaps/index.js +5 -1
- package/dist/es2019/labs/next/ContentComponents.js +7 -2
- package/dist/es2019/labs/next/full-page.js +11 -8
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +4 -3
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +16 -4
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
- package/dist/es2019/plugins/analytics/types/enums.js +3 -0
- package/dist/es2019/plugins/base/index.js +6 -15
- package/dist/es2019/plugins/base/pm-plugins/better-type-history.js +1 -11
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
- package/dist/es2019/plugins/block-type/commands/block-type.js +25 -16
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -10
- package/dist/es2019/plugins/card/styles.js +1 -1
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/es2019/plugins/code-block/actions.js +32 -0
- package/dist/es2019/plugins/code-block/nodeviews/code-block.js +61 -1
- package/dist/es2019/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/es2019/plugins/code-block/pm-plugins/main.js +37 -3
- package/dist/es2019/plugins/code-block/styles.js +30 -27
- package/dist/es2019/plugins/collab-edit/styles.js +3 -2
- package/dist/es2019/plugins/collab-edit/ui/styles.js +4 -3
- package/dist/es2019/plugins/collab-edit/utils.js +1 -0
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +3 -2
- package/dist/es2019/plugins/expand/ui/styles.js +15 -14
- package/dist/es2019/plugins/extension/commands.js +3 -2
- package/dist/es2019/plugins/extension/context-panel.js +11 -3
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -4
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +7 -6
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -4
- package/dist/es2019/plugins/fake-text-cursor/styles.js +3 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/es2019/plugins/find-replace/styles.js +4 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +4 -4
- package/dist/es2019/plugins/floating-toolbar/ui/styles.js +11 -10
- package/dist/es2019/plugins/grid/styles.js +4 -2
- package/dist/es2019/plugins/help-dialog/ui/styles.js +10 -9
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +9 -1
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -4
- package/dist/es2019/plugins/hyperlink/utils.js +43 -2
- package/dist/es2019/plugins/insert-block/index.js +1 -1
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/es2019/plugins/layout/styles.js +10 -7
- package/dist/es2019/plugins/media/commands/helpers.js +6 -8
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +21 -5
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -4
- package/dist/es2019/plugins/media/pm-plugins/main.js +2 -0
- package/dist/es2019/plugins/media/styles.js +3 -3
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
- package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +4 -3
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +2 -1
- package/dist/es2019/plugins/mentions/styles.js +5 -4
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +3 -2
- package/dist/es2019/plugins/panel/index.js +1 -0
- package/dist/es2019/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +22 -4
- package/dist/es2019/plugins/paste/handlers.js +23 -0
- package/dist/es2019/plugins/paste/linkify-md-plugin.js +7 -1
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +4 -1
- package/dist/es2019/plugins/paste/pm-plugins/main.js +27 -2
- package/dist/es2019/plugins/placeholder/index.js +12 -1
- package/dist/es2019/plugins/placeholder/styles.js +3 -1
- package/dist/es2019/plugins/placeholder-text/styles.js +5 -4
- package/dist/es2019/plugins/quick-insert/search.js +1 -1
- package/dist/es2019/plugins/selection/gap-cursor/styles.js +9 -9
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +3 -3
- package/dist/es2019/plugins/table/index.js +13 -4
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/es2019/plugins/table/nodeviews/table.js +6 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +1 -4
- package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +106 -0
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +3 -7
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/es2019/plugins/table/transforms/column-width.js +1 -2
- package/dist/es2019/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +4 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +4 -3
- package/dist/es2019/plugins/table/ui/common-styles.js +29 -27
- package/dist/es2019/plugins/table/ui/consts.js +15 -12
- package/dist/es2019/plugins/table/ui/ui-styles.js +28 -23
- package/dist/es2019/plugins/table/utils/decoration.js +1 -4
- package/dist/es2019/plugins/table/utils/paste.js +9 -9
- package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
- package/dist/es2019/plugins/type-ahead/index.js +4 -3
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +2 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +64 -6
- package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
- package/dist/es2019/ui/Addon/Dropdown/styles.js +3 -2
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +3 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +2 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +9 -4
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +7 -3
- package/dist/es2019/ui/ChromeCollapsed/styles.js +4 -3
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +10 -2
- package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +3 -2
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +4 -3
- package/dist/es2019/ui/ContentStyles/index.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +2 -1
- package/dist/es2019/ui/DropdownMenu/index.js +5 -0
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +6 -3
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +3 -2
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +3 -2
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
- package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
- package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +2 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +3 -1
- package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +4 -3
- package/dist/es2019/ui/PanelTextInput/styles.js +5 -5
- package/dist/es2019/ui/PluginSlot/index.js +7 -4
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
- package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -4
- package/dist/es2019/ui/WithFlash/index.js +4 -3
- package/dist/es2019/ui/styles.js +10 -9
- package/dist/es2019/utils/document.js +58 -5
- package/dist/es2019/utils/filter/privacy-filter.js +1 -1
- package/dist/es2019/utils/step.js +12 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +26 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -0
- package/dist/esm/create-editor/create-plugins-list.js +1 -2
- package/dist/esm/editor.js +5 -2
- package/dist/esm/keymaps/index.js +5 -1
- package/dist/esm/labs/next/ContentComponents.js +8 -4
- package/dist/esm/labs/next/full-page.js +11 -8
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +4 -3
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +3 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
- package/dist/esm/plugins/analytics/types/enums.js +3 -0
- package/dist/esm/plugins/base/index.js +8 -17
- package/dist/esm/plugins/base/pm-plugins/better-type-history.js +1 -11
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
- package/dist/esm/plugins/block-type/commands/block-type.js +31 -22
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -5
- package/dist/esm/plugins/card/styles.js +1 -1
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/esm/plugins/code-block/actions.js +28 -0
- package/dist/esm/plugins/code-block/nodeviews/code-block.js +67 -1
- package/dist/esm/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/esm/plugins/code-block/pm-plugins/main.js +39 -3
- package/dist/esm/plugins/code-block/styles.js +27 -23
- package/dist/esm/plugins/collab-edit/styles.js +3 -2
- package/dist/esm/plugins/collab-edit/ui/styles.js +3 -2
- package/dist/esm/plugins/collab-edit/utils.js +2 -0
- package/dist/esm/plugins/date/ui/DatePicker/index.js +2 -1
- package/dist/esm/plugins/expand/ui/styles.js +15 -14
- package/dist/esm/plugins/extension/commands.js +3 -2
- package/dist/esm/plugins/extension/context-panel.js +21 -7
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -4
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
- package/dist/esm/plugins/extension/ui/Extension/styles.js +6 -5
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -2
- package/dist/esm/plugins/fake-text-cursor/styles.js +2 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/esm/plugins/find-replace/styles.js +3 -3
- package/dist/esm/plugins/find-replace/ui/styles.js +3 -2
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Separator.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -4
- package/dist/esm/plugins/floating-toolbar/ui/styles.js +11 -10
- package/dist/esm/plugins/grid/styles.js +2 -1
- package/dist/esm/plugins/help-dialog/ui/styles.js +8 -7
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +9 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -3
- package/dist/esm/plugins/hyperlink/utils.js +44 -2
- package/dist/esm/plugins/insert-block/index.js +1 -1
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +3 -2
- package/dist/esm/plugins/layout/styles.js +1 -1
- package/dist/esm/plugins/media/commands/helpers.js +6 -8
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +22 -4
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -3
- package/dist/esm/plugins/media/pm-plugins/main.js +2 -0
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
- package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +3 -2
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +2 -1
- package/dist/esm/plugins/mentions/styles.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +3 -2
- package/dist/esm/plugins/panel/index.js +1 -0
- package/dist/esm/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/esm/plugins/panel/pm-plugins/keymaps.js +22 -4
- package/dist/esm/plugins/paste/handlers.js +21 -0
- package/dist/esm/plugins/paste/linkify-md-plugin.js +7 -1
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +6 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +27 -2
- package/dist/esm/plugins/placeholder/index.js +12 -1
- package/dist/esm/plugins/placeholder/styles.js +2 -1
- package/dist/esm/plugins/placeholder-text/styles.js +2 -1
- package/dist/esm/plugins/quick-insert/search.js +3 -1
- package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/esm/plugins/status/ui/statusPicker.js +2 -2
- package/dist/esm/plugins/table/index.js +13 -4
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/esm/plugins/table/nodeviews/table.js +6 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +1 -4
- package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +102 -0
- package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/esm/plugins/table/transforms/column-width.js +1 -2
- package/dist/esm/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +3 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +2 -1
- package/dist/esm/plugins/table/ui/common-styles.js +4 -2
- package/dist/esm/plugins/table/ui/consts.js +15 -12
- package/dist/esm/plugins/table/ui/ui-styles.js +15 -10
- package/dist/esm/plugins/table/utils/decoration.js +3 -4
- package/dist/esm/plugins/table/utils/paste.js +9 -9
- package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
- package/dist/esm/plugins/type-ahead/index.js +4 -3
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +2 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +71 -5
- package/dist/esm/plugins/unsupported-content/styles.js +1 -1
- package/dist/esm/ui/Addon/Dropdown/styles.js +2 -1
- package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -1
- package/dist/esm/ui/Appearance/Chromeless.js +2 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +10 -3
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +5 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +21 -14
- package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
- package/dist/esm/ui/ConfigPanel/Header.js +3 -2
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
- package/dist/esm/ui/ContentStyles/index.js +3 -2
- package/dist/esm/ui/ContextPanel/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +5 -0
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -4
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +3 -2
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +3 -2
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +11 -5
- package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
- package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +2 -1
- package/dist/esm/ui/ElementBrowser/constants.js +3 -1
- package/dist/esm/ui/FloatingToolbar/styles.js +3 -3
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +4 -3
- package/dist/esm/ui/PanelTextInput/styles.js +4 -3
- package/dist/esm/ui/PluginSlot/index.js +7 -4
- package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
- package/dist/esm/ui/ToolbarFeedback/styles.js +4 -3
- package/dist/esm/ui/WithFlash/index.js +3 -2
- package/dist/esm/ui/styles.js +5 -4
- package/dist/esm/utils/document.js +59 -5
- package/dist/esm/utils/filter/privacy-filter.js +1 -1
- package/dist/esm/utils/step.js +12 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +6 -0
- package/dist/types/labs/next/ContentComponents.d.ts +7 -1
- package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +1 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +3 -0
- package/dist/types/plugins/analytics/types/general-events.d.ts +7 -1
- package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -1
- package/dist/types/plugins/code-block/actions.d.ts +2 -0
- package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +2 -0
- package/dist/types/plugins/code-block/pm-plugins/actions.d.ts +1 -0
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +1 -0
- package/dist/types/plugins/extension/commands.d.ts +1 -1
- package/dist/types/plugins/extension/types.d.ts +1 -0
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
- package/dist/types/plugins/find-replace/styles.d.ts +0 -2
- package/dist/types/plugins/hyperlink/utils.d.ts +8 -0
- package/dist/types/plugins/media/commands/helpers.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -0
- package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -0
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
- package/dist/types/plugins/table/commands/misc.d.ts +0 -1
- package/dist/types/plugins/table/index.d.ts +0 -1
- package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types/plugins/table/nodeviews/types.d.ts +0 -1
- package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
- package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -2
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +0 -1
- package/dist/types/plugins/table/types.d.ts +0 -1
- package/dist/types/plugins/table/ui/consts.d.ts +9 -9
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +2 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +4 -4
- package/dist/types/types/editor-appearance-component.d.ts +0 -1
- package/dist/types/types/editor-props.d.ts +4 -0
- package/dist/types/types/feature-flags.d.ts +8 -0
- package/dist/types/types/ui-components.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -2
- package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -2
- package/dist/types/ui/PluginSlot/index.d.ts +1 -0
- package/dist/types/ui/Toolbar/toolbar-types.d.ts +1 -0
- package/dist/types/utils/document.d.ts +1 -0
- package/dist/types/utils/step.d.ts +1 -0
- package/docs/0-intro.tsx +12 -4
- package/package.json +23 -23
|
@@ -23,12 +23,14 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
23
23
|
|
|
24
24
|
var _dropPlaceholderMessages = require("./drop-placeholder-messages");
|
|
25
25
|
|
|
26
|
+
var _tokens = require("@atlaskit/tokens");
|
|
27
|
+
|
|
26
28
|
var _media = require("../../nodeviews/mediaNodeView/media");
|
|
27
29
|
|
|
28
30
|
var _templateObject, _templateObject2;
|
|
29
31
|
|
|
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)());
|
|
32
|
+
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, _tokens.token)('color.icon.accent.blue', (0, _adfSchema.hexToRgba)(_colors.B400, 0.4) || _colors.B400), (0, _tokens.token)('color.background.accent.blue.subtle', (0, _adfSchema.hexToRgba)(_colors.B300, 0.6) || _colors.B300), (0, _constants.borderRadius)(), _media.FILE_WIDTH, _media.MEDIA_HEIGHT);
|
|
33
|
+
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"])), (0, _tokens.token)('color.border.focused', _colors.B200), (0, _constants.borderRadius)());
|
|
32
34
|
|
|
33
35
|
var IconWrapperComponent = function IconWrapperComponent(props) {
|
|
34
36
|
var intl = props.intl;
|
|
@@ -55,6 +55,8 @@ var _enums = require("../../analytics/types/enums");
|
|
|
55
55
|
|
|
56
56
|
var _mediaLinkingToolbarMessages = require("./media-linking-toolbar-messages");
|
|
57
57
|
|
|
58
|
+
var _tokens = require("@atlaskit/tokens");
|
|
59
|
+
|
|
58
60
|
var _templateObject, _templateObject2;
|
|
59
61
|
|
|
60
62
|
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); }
|
|
@@ -65,7 +67,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
65
67
|
|
|
66
68
|
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; } }
|
|
67
69
|
|
|
68
|
-
var validationWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: 0;\n padding: 12px 24px 12px 0;\n margin: 0 4px 0 32px;\n border-top: 1px solid ", ";\n align-items: start;\n display: flex;\n flex-direction: column;\n"])), _colors.R400);
|
|
70
|
+
var validationWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: 0;\n padding: 12px 24px 12px 0;\n margin: 0 4px 0 32px;\n border-top: 1px solid ", ";\n align-items: start;\n display: flex;\n flex-direction: column;\n"])), (0, _tokens.token)('color.border.danger', _colors.R400));
|
|
69
71
|
var buttonWrapper = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n padding: 4px 8px 4px 0px;\n"])));
|
|
70
72
|
|
|
71
73
|
var LinkAddToolbar = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -17,7 +17,9 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
17
17
|
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
|
|
20
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
|
+
|
|
20
22
|
var _templateObject;
|
|
21
23
|
|
|
22
|
-
var mentionsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), _colors.N500, _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, _editorSharedStyles.akEditorDeleteBackgroundWithOpacity, _mention.MentionSharedCssClassName.MENTION_CONTAINER, _colors.N30A, _colors.N500);
|
|
24
|
+
var mentionsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n &.", " [data-mention-id] > span {\n ", "\n\n /* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n }\n }\n\n .danger {\n .", ".", "\n > span\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n }\n .", " > span > span {\n background-color: ", ";\n color: ", ";\n }\n }\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), (0, _tokens.token)('color.text.subtle', _colors.N500), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, (0, _tokens.token)('color.background.danger', _editorSharedStyles.akEditorDeleteBackgroundWithOpacity), _mention.MentionSharedCssClassName.MENTION_CONTAINER, (0, _tokens.token)('color.background.neutral', _colors.N30A), (0, _tokens.token)('color.text.subtle', _colors.N500));
|
|
23
25
|
exports.mentionsStyles = mentionsStyles;
|
|
@@ -17,6 +17,8 @@ var _add = _interopRequireDefault(require("@atlaskit/icon/glyph/add"));
|
|
|
17
17
|
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
|
|
20
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
|
+
|
|
20
22
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
21
23
|
|
|
22
24
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -76,7 +78,7 @@ var InviteItem = function InviteItem(_ref) {
|
|
|
76
78
|
css: _styles.avatarStyle
|
|
77
79
|
}, (0, _react.jsx)(_add.default, {
|
|
78
80
|
label: intl.formatMessage(_messages.messages.mentionsAddLabel),
|
|
79
|
-
primaryColor: _colors.N300
|
|
81
|
+
primaryColor: (0, _tokens.token)('color.icon.subtle', _colors.N300)
|
|
80
82
|
})), (0, _react.jsx)("div", {
|
|
81
83
|
css: _styles.nameSectionStyle,
|
|
82
84
|
"data-testid": "name-section"
|
|
@@ -13,6 +13,8 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
+
var _tokens = require("@atlaskit/tokens");
|
|
17
|
+
|
|
16
18
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
17
19
|
|
|
18
20
|
var ROW_SIDE_PADDING = 14;
|
|
@@ -23,11 +25,11 @@ var AVATAR_HEIGHT = 36;
|
|
|
23
25
|
exports.AVATAR_HEIGHT = AVATAR_HEIGHT;
|
|
24
26
|
var avatarStyle = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n flex: initial;\n opacity: inherit;\n width: 36px;\n height: ", "px;\n\n > span {\n width: 24px;\n height: 24px;\n padding: 6px;\n }\n"])), AVATAR_HEIGHT);
|
|
25
27
|
exports.avatarStyle = avatarStyle;
|
|
26
|
-
var nameSectionStyle = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n min-width: 0;\n margin-left: 14px;\n color: ", ";\n opacity: inherit;\n"])), _colors.N300);
|
|
28
|
+
var nameSectionStyle = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n min-width: 0;\n margin-left: 14px;\n color: ", ";\n opacity: inherit;\n"])), (0, _tokens.token)('color.text.subtle', _colors.N300));
|
|
27
29
|
exports.nameSectionStyle = nameSectionStyle;
|
|
28
30
|
var mentionItemStyle = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n background-color: transparent;\n display: block;\n overflow: hidden;\n list-style-type: none;\n cursor: pointer;\n"])));
|
|
29
31
|
exports.mentionItemStyle = mentionItemStyle;
|
|
30
|
-
var mentionItemSelectedStyle = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n"])), _colors.N30);
|
|
32
|
+
var mentionItemSelectedStyle = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n"])), (0, _tokens.token)('color.background.neutral.subtle.hovered', _colors.N30));
|
|
31
33
|
exports.mentionItemSelectedStyle = mentionItemSelectedStyle;
|
|
32
34
|
var capitalizedStyle = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n text-transform: capitalize;\n"])));
|
|
33
35
|
exports.capitalizedStyle = capitalizedStyle;
|
|
@@ -163,6 +163,7 @@ var panelPlugin = function panelPlugin() {
|
|
|
163
163
|
panelIcon: ':rainbow:',
|
|
164
164
|
panelIconId: '1f308',
|
|
165
165
|
panelIconText: '🌈',
|
|
166
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
166
167
|
panelColor: _colors.T50
|
|
167
168
|
}, state, insert);
|
|
168
169
|
}
|
|
@@ -106,7 +106,10 @@ var PanelNodeView = /*#__PURE__*/function () {
|
|
|
106
106
|
key: "ignoreMutation",
|
|
107
107
|
value: function ignoreMutation(mutation) {
|
|
108
108
|
// ignore mutation if it caused by the icon.
|
|
109
|
-
|
|
109
|
+
var isIcon = mutation.target === this.icon || mutation.target.parentNode === this.icon; // ignore mutation if it caused by the lazy load emoji inside icon.
|
|
110
|
+
|
|
111
|
+
var isInsideIcon = this.icon.contains(mutation.target);
|
|
112
|
+
return isIcon || isInsideIcon;
|
|
110
113
|
}
|
|
111
114
|
}]);
|
|
112
115
|
return PanelNodeView;
|
|
@@ -10,7 +10,24 @@ var _prosemirrorKeymap = require("prosemirror-keymap");
|
|
|
10
10
|
|
|
11
11
|
var _prosemirrorUtils = require("prosemirror-utils");
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
var _utils = require("../../../utils");
|
|
14
|
+
|
|
15
|
+
function findParentNode(selection, nodeType) {
|
|
16
|
+
var parentPosition = (0, _prosemirrorUtils.findParentNodeOfType)(nodeType)(selection);
|
|
17
|
+
|
|
18
|
+
if (parentPosition) {
|
|
19
|
+
return parentPosition.node;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isInsideAnEmptyNode(selection, nodeType, schema) {
|
|
26
|
+
var parentNode = findParentNode(selection, nodeType);
|
|
27
|
+
return parentNode && (0, _utils.isEmptyNode)(schema)(parentNode);
|
|
28
|
+
} // Somewhat broken and subverted: https://product-fabric.atlassian.net/browse/ED-6504
|
|
29
|
+
|
|
30
|
+
|
|
14
31
|
function keymapPlugin() {
|
|
15
32
|
var deleteCurrentItem = function deleteCurrentItem($from, tr) {
|
|
16
33
|
return tr.delete($from.before($from.depth) - 1, $from.end($from.depth) + 1);
|
|
@@ -21,7 +38,8 @@ function keymapPlugin() {
|
|
|
21
38
|
var selection = state.selection,
|
|
22
39
|
nodes = state.schema.nodes,
|
|
23
40
|
tr = state.tr;
|
|
24
|
-
var panel = nodes.panel
|
|
41
|
+
var panel = nodes.panel,
|
|
42
|
+
blockquote = nodes.blockquote;
|
|
25
43
|
var $from = selection.$from,
|
|
26
44
|
$to = selection.$to; // Don't do anything if selection is a range
|
|
27
45
|
|
|
@@ -40,7 +58,7 @@ function keymapPlugin() {
|
|
|
40
58
|
var isPreviousNodeAPanel = previousNodeType === panel;
|
|
41
59
|
var isParentNodeAPanel = parentNodeType === panel; // Stops merging panels when deleting empty paragraph in between
|
|
42
60
|
|
|
43
|
-
if (isPreviousNodeAPanel && !isParentNodeAPanel) {
|
|
61
|
+
if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || isInsideAnEmptyNode(selection, blockquote, state.schema)) {
|
|
44
62
|
var content = $from.node($from.depth).content;
|
|
45
63
|
var insertPos = previousPos.pos - 1;
|
|
46
64
|
deleteCurrentItem($from, tr).insert(insertPos, content);
|
|
@@ -14,6 +14,7 @@ exports.handleMediaSingle = handleMediaSingle;
|
|
|
14
14
|
exports.handleMention = handleMention;
|
|
15
15
|
exports.handleParagraphBlockMarks = handleParagraphBlockMarks;
|
|
16
16
|
exports.handlePasteAsPlainText = handlePasteAsPlainText;
|
|
17
|
+
exports.handlePasteIntoCaption = handlePasteIntoCaption;
|
|
17
18
|
exports.handlePasteIntoTaskAndDecision = handlePasteIntoTaskAndDecision;
|
|
18
19
|
exports.handlePasteLinkOnSelectedText = handlePasteLinkOnSelectedText;
|
|
19
20
|
exports.handlePastePreservingMarks = handlePastePreservingMarks;
|
|
@@ -778,6 +779,28 @@ function handleRichText(slice) {
|
|
|
778
779
|
};
|
|
779
780
|
}
|
|
780
781
|
|
|
782
|
+
function handlePasteIntoCaption(slice) {
|
|
783
|
+
return function (state, dispatch) {
|
|
784
|
+
var caption = state.schema.nodes.caption;
|
|
785
|
+
var tr = state.tr;
|
|
786
|
+
|
|
787
|
+
if ((0, _prosemirrorUtils.hasParentNodeOfType)(caption)(state.selection)) {
|
|
788
|
+
// We let PM replace the selection and it will insert as text where it can't place the node
|
|
789
|
+
// This is totally fine as caption is just a simple block that only contains inline contents
|
|
790
|
+
// And it is more in line with WYSIWYG expectations
|
|
791
|
+
tr.replaceSelection(slice).scrollIntoView();
|
|
792
|
+
|
|
793
|
+
if (dispatch) {
|
|
794
|
+
dispatch(tr);
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
return true;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
return false;
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
|
|
781
804
|
var handleSelectedTable = function handleSelectedTable(slice) {
|
|
782
805
|
return function (state, dispatch) {
|
|
783
806
|
var tr = (0, _replaceTable.replaceSelectedTable)(state, slice, _analytics.INPUT_METHOD.CLIPBOARD);
|
|
@@ -11,6 +11,8 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
11
11
|
|
|
12
12
|
var _linkifyIt = _interopRequireDefault(require("linkify-it"));
|
|
13
13
|
|
|
14
|
+
var _utils = require("../hyperlink/utils");
|
|
15
|
+
|
|
14
16
|
// modified version of the original Linkify plugin
|
|
15
17
|
// https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.js
|
|
16
18
|
var arrayReplaceAt = function arrayReplaceAt(src, pos, newElements) {
|
|
@@ -78,8 +80,13 @@ var linkify = function linkify(state) {
|
|
|
78
80
|
var nodes = [];
|
|
79
81
|
var level = currentToken.level;
|
|
80
82
|
var lastPos = 0;
|
|
83
|
+
var filepaths = (0, _utils.findFilepaths)(text);
|
|
81
84
|
|
|
82
85
|
for (var ln = 0; ln < links.length; ln++) {
|
|
86
|
+
if ((0, _utils.isLinkInMatches)(links[ln].index, filepaths)) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
|
|
83
90
|
var url = links[ln].url;
|
|
84
91
|
var fullUrl = state.md.normalizeLink(url);
|
|
85
92
|
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.createPasteAnalyticsPayload = createPasteAnalyticsPayload;
|
|
9
9
|
exports.createPasteMeasurePayload = void 0;
|
|
10
10
|
exports.getContent = getContent;
|
|
11
|
-
exports.handleSelectedTableWithAnalytics = exports.handleRichTextWithAnalytics = exports.handlePastePreservingMarksWithAnalytics = exports.handlePasteLinkOnSelectedTextWithAnalytics = exports.handlePasteIntoTaskAndDecisionWithAnalytics = exports.handlePasteAsPlainTextWithAnalytics = exports.handleMediaSingleWithAnalytics = exports.handleMarkdownWithAnalytics = exports.handleExpandWithAnalytics = exports.handleCodeBlockWithAnalytics = exports.getContentNodeTypes = void 0;
|
|
11
|
+
exports.handleSelectedTableWithAnalytics = exports.handleRichTextWithAnalytics = exports.handlePastePreservingMarksWithAnalytics = exports.handlePasteLinkOnSelectedTextWithAnalytics = exports.handlePasteIntoTaskAndDecisionWithAnalytics = exports.handlePasteIntoCaptionWithAnalytics = exports.handlePasteAsPlainTextWithAnalytics = exports.handleMediaSingleWithAnalytics = exports.handleMarkdownWithAnalytics = exports.handleExpandWithAnalytics = exports.handleCodeBlockWithAnalytics = exports.getContentNodeTypes = void 0;
|
|
12
12
|
exports.pasteCommandWithAnalytics = pasteCommandWithAnalytics;
|
|
13
13
|
exports.sendPasteAnalyticsEvent = sendPasteAnalyticsEvent;
|
|
14
14
|
|
|
@@ -254,6 +254,14 @@ var handlePasteIntoTaskAndDecisionWithAnalytics = function handlePasteIntoTaskAn
|
|
|
254
254
|
|
|
255
255
|
exports.handlePasteIntoTaskAndDecisionWithAnalytics = handlePasteIntoTaskAndDecisionWithAnalytics;
|
|
256
256
|
|
|
257
|
+
var handlePasteIntoCaptionWithAnalytics = function handlePasteIntoCaptionWithAnalytics(view, event, slice, type) {
|
|
258
|
+
return (0, _utils.pipe)(_handlers.handlePasteIntoCaption, pasteCommandWithAnalytics(view, event, slice, {
|
|
259
|
+
type: type
|
|
260
|
+
}))(slice);
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
exports.handlePasteIntoCaptionWithAnalytics = handlePasteIntoCaptionWithAnalytics;
|
|
264
|
+
|
|
257
265
|
var handleCodeBlockWithAnalytics = function handleCodeBlockWithAnalytics(view, event, slice, text) {
|
|
258
266
|
return (0, _utils.pipe)(_handlers.handleCodeBlock, pasteCommandWithAnalytics(view, event, slice, {
|
|
259
267
|
type: _analytics.PasteTypes.plain
|
|
@@ -74,6 +74,8 @@ var _tinyMCE = require("../util/tinyMCE");
|
|
|
74
74
|
|
|
75
75
|
var _utils9 = require("@atlaskit/editor-tables/utils");
|
|
76
76
|
|
|
77
|
+
var _step = require("../../../utils/step");
|
|
78
|
+
|
|
77
79
|
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); }
|
|
78
80
|
|
|
79
81
|
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; }
|
|
@@ -238,8 +240,25 @@ function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinkificatio
|
|
|
238
240
|
// don't add closeHistory call if we're pasting a text inside placeholder text as we want the whole action
|
|
239
241
|
// to be atomic
|
|
240
242
|
var placeholder = state.schema.nodes.placeholder;
|
|
243
|
+
var isPastingTextInsidePlaceholderText = ((_state$doc$resolve$no = state.doc.resolve(state.selection.$anchor.pos).nodeAfter) === null || _state$doc$resolve$no === void 0 ? void 0 : _state$doc$resolve$no.type) === placeholder; // don't add closeHistory call if we're pasting a table, as some tables may involve additional
|
|
244
|
+
// appendedTransactions to repair them (if they're partial or incomplete) and we don't want
|
|
245
|
+
// to split those repairing transactions in prosemirror-history when they're being added to the
|
|
246
|
+
// "done" stack
|
|
247
|
+
|
|
248
|
+
var isPastingTable = tr.steps.some(function (step) {
|
|
249
|
+
var _slice$content;
|
|
250
|
+
|
|
251
|
+
var slice = (0, _step.extractSliceFromStep)(step);
|
|
252
|
+
var tableExists = false;
|
|
253
|
+
slice === null || slice === void 0 ? void 0 : (_slice$content = slice.content) === null || _slice$content === void 0 ? void 0 : _slice$content.forEach(function (node) {
|
|
254
|
+
if (node.type === state.schema.nodes.table) {
|
|
255
|
+
tableExists = true;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
return tableExists;
|
|
259
|
+
});
|
|
241
260
|
|
|
242
|
-
if (
|
|
261
|
+
if (!isPastingTextInsidePlaceholderText && !isPastingTable) {
|
|
243
262
|
tr.setMeta(_betterTypeHistory.pluginKey, true);
|
|
244
263
|
}
|
|
245
264
|
|
|
@@ -362,6 +381,13 @@ function createPlugin(schema, dispatchAnalyticsEvent, plainTextPasteLinkificatio
|
|
|
362
381
|
|
|
363
382
|
if (!(0, _utils4.insideTable)(state)) {
|
|
364
383
|
slice = (0, _utils2.transformSliceNestedExpandToExpand)(slice, state.schema);
|
|
384
|
+
} // Create a custom handler to avoid handling with handleRichText method
|
|
385
|
+
// As SafeInsert is used inside handleRichText which caused some bad UX like this:
|
|
386
|
+
// https://product-fabric.atlassian.net/browse/MEX-1520
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
if ((0, _analytics.handlePasteIntoCaptionWithAnalytics)(view, event, slice, _analytics2.PasteTypes.richText)(state, dispatch)) {
|
|
390
|
+
return true;
|
|
365
391
|
}
|
|
366
392
|
|
|
367
393
|
return (0, _analytics.handleRichTextWithAnalytics)(view, event, slice)(state, dispatch);
|
|
@@ -9,6 +9,8 @@ exports.pluginKey = exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
11
11
|
|
|
12
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
|
+
|
|
12
14
|
var _prosemirrorState = require("prosemirror-state");
|
|
13
15
|
|
|
14
16
|
var _prosemirrorView = require("prosemirror-view");
|
|
@@ -21,7 +23,7 @@ var _styles = require("./styles");
|
|
|
21
23
|
|
|
22
24
|
var _focusHandler = require("../base/pm-plugins/focus-handler");
|
|
23
25
|
|
|
24
|
-
var
|
|
26
|
+
var _utils2 = require("../type-ahead/utils");
|
|
25
27
|
|
|
26
28
|
var pluginKey = new _prosemirrorState.PluginKey('placeholderPlugin');
|
|
27
29
|
exports.pluginKey = pluginKey;
|
|
@@ -46,7 +48,17 @@ function createPlaceholderDecoration(editorState, placeholderText) {
|
|
|
46
48
|
placeholderDecoration.className = placeHolderClass;
|
|
47
49
|
var placeholderNode = document.createElement('span');
|
|
48
50
|
placeholderNode.textContent = placeholderText;
|
|
49
|
-
placeholderDecoration.appendChild(placeholderNode);
|
|
51
|
+
placeholderDecoration.appendChild(placeholderNode); // ME-2289 Tapping on backspace in empty editor hides and displays the keyboard
|
|
52
|
+
// Add a editable buff node as the cursor moving forward is inevitable
|
|
53
|
+
// when backspace in GBoard composition
|
|
54
|
+
|
|
55
|
+
if (_utils.browser.android && _utils.browser.chrome) {
|
|
56
|
+
var buffNode = document.createElement('span');
|
|
57
|
+
buffNode.setAttribute('contenteditable', 'true');
|
|
58
|
+
buffNode.textContent = ' ';
|
|
59
|
+
placeholderDecoration.appendChild(buffNode);
|
|
60
|
+
}
|
|
61
|
+
|
|
50
62
|
return _prosemirrorView.DecorationSet.create(editorState.doc, [_prosemirrorView.Decoration.widget(pos, placeholderDecoration, {
|
|
51
63
|
side: -1,
|
|
52
64
|
key: 'placeholder'
|
|
@@ -68,7 +80,7 @@ var emptyPlaceholder = {
|
|
|
68
80
|
function createPlaceHolderStateFrom(editorState, getPlaceholderHintMessage, defaultPlaceholderText, bracketPlaceholderText) {
|
|
69
81
|
var isEditorFocused = _focusHandler.focusStateKey.getState(editorState);
|
|
70
82
|
|
|
71
|
-
if ((0,
|
|
83
|
+
if ((0, _utils2.isTypeAheadOpen)(editorState)) {
|
|
72
84
|
return emptyPlaceholder;
|
|
73
85
|
}
|
|
74
86
|
|
|
@@ -13,9 +13,11 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
+
var _tokens = require("@atlaskit/tokens");
|
|
17
|
+
|
|
16
18
|
var _templateObject;
|
|
17
19
|
|
|
18
20
|
var placeHolderClassName = 'placeholder-decoration';
|
|
19
21
|
exports.placeHolderClassName = placeHolderClassName;
|
|
20
|
-
var placeholderStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .", " {\n position: relative;\n color: ", ";\n width: 100%;\n\n pointer-events: none;\n display: block;\n user-select: none;\n\n > span {\n position: absolute;\n pointer-events: none;\n }\n\n &.align-end > span {\n right: 0;\n }\n\n &.align-center > span {\n left: 0;\n }\n }\n"])), placeHolderClassName, _colors.N200);
|
|
22
|
+
var placeholderStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror .", " {\n position: relative;\n color: ", ";\n width: 100%;\n\n pointer-events: none;\n display: block;\n user-select: none;\n\n > span {\n position: absolute;\n pointer-events: none;\n outline: none;\n }\n\n &.align-end > span {\n right: 0;\n }\n\n &.align-center > span {\n left: 0;\n }\n }\n"])), placeHolderClassName, (0, _tokens.token)('color.text.subtlest', _colors.N200));
|
|
21
23
|
exports.placeholderStyles = placeholderStyles;
|
|
@@ -15,7 +15,9 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
15
|
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
|
|
18
|
+
var _tokens = require("@atlaskit/tokens");
|
|
19
|
+
|
|
18
20
|
var _templateObject;
|
|
19
21
|
|
|
20
|
-
var placeholderTextStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n"])), _colors.N300, _colors.N300, _colors.N300, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background]), _colors.N300);
|
|
22
|
+
var placeholderTextStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror span[data-placeholder] {\n color: ", ";\n display: inline;\n }\n\n .ProseMirror span.pm-placeholder {\n display: inline;\n color: ", ";\n }\n .ProseMirror span.pm-placeholder__text {\n display: inline;\n color: ", ";\n }\n\n .ProseMirror span.pm-placeholder.", " {\n ", "\n }\n\n .ProseMirror span.pm-placeholder__text[data-placeholder]::after {\n color: ", ";\n cursor: text;\n content: attr(data-placeholder);\n display: inline;\n }\n"])), (0, _tokens.token)('color.text.subtlest', _colors.N300), (0, _tokens.token)('color.text.subtlest', _colors.N300), (0, _tokens.token)('color.text.subtlest', _colors.N300), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Background]), (0, _tokens.token)('color.text.subtlest', _colors.N300));
|
|
21
23
|
exports.placeholderTextStyles = placeholderTextStyles;
|
|
@@ -45,7 +45,9 @@ function find(query, items) {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
return fuse.search(query)
|
|
48
|
+
return fuse.search(query).map(function (result) {
|
|
49
|
+
return result.item;
|
|
50
|
+
});
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
var searchQuickInsertItems = function searchQuickInsertItems(quickInsertState, options) {
|
|
@@ -20,5 +20,5 @@ var gapCursor = '.ProseMirror-gapcursor';
|
|
|
20
20
|
var prosemirrorwidget = '.ProseMirror-widget';
|
|
21
21
|
var wrapLeft = '[layout="wrap-left"]';
|
|
22
22
|
var wrapRight = '[layout="wrap-right"]';
|
|
23
|
-
var gapCursorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: -3px;\n }\n &.-right span::after {\n right: -3px;\n }\n & span[layout='full-width'],\n & span[layout='wide'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical
|
|
23
|
+
var gapCursorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: -3px;\n }\n &.-right span::after {\n right: -3px;\n }\n & span[layout='full-width'],\n & span[layout='wide'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alignment of gap cursor */\n &:first-of-type + ul,\n &:first-of-type + span + ul,\n &:first-of-type + ol,\n &:first-of-type + span + ol,\n &:first-of-type + pre,\n &:first-of-type + span + pre,\n &:first-of-type + blockquote,\n &:first-of-type + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
|
|
24
24
|
exports.gapCursorStyles = gapCursorStyles;
|
|
@@ -53,8 +53,8 @@ var plugin = new _safePlugin.SafePlugin({
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
return {
|
|
56
|
-
update: function update(view
|
|
57
|
-
var pluginState = _gapCursorPluginKey.gapCursorPluginKey.getState(state);
|
|
56
|
+
update: function update(view) {
|
|
57
|
+
var pluginState = _gapCursorPluginKey.gapCursorPluginKey.getState(view.state);
|
|
58
58
|
/**
|
|
59
59
|
* Starting with prosemirror-view 1.19.4, cursor wrapper that previousely was hiding cursor doesn't exist:
|
|
60
60
|
* https://github.com/ProseMirror/prosemirror-view/commit/4a56bc7b7e61e96ef879d1dae1014ede0fc09e43
|
|
@@ -39,14 +39,14 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
39
39
|
|
|
40
40
|
var _colors = require("@atlaskit/theme/colors");
|
|
41
41
|
|
|
42
|
-
var _styles = require("../../../ui/styles");
|
|
43
|
-
|
|
44
42
|
var _withOuterListeners = _interopRequireDefault(require("../../../ui/with-outer-listeners"));
|
|
45
43
|
|
|
46
44
|
var _actions = require("../actions");
|
|
47
45
|
|
|
48
46
|
var _analytics = require("../analytics");
|
|
49
47
|
|
|
48
|
+
var _tokens = require("@atlaskit/tokens");
|
|
49
|
+
|
|
50
50
|
var _templateObject;
|
|
51
51
|
|
|
52
52
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
@@ -63,7 +63,7 @@ exports.InputMethod = InputMethod;
|
|
|
63
63
|
InputMethod["enterKey"] = "enterKey";
|
|
64
64
|
})(InputMethod || (exports.InputMethod = InputMethod = {}));
|
|
65
65
|
|
|
66
|
-
var pickerContainer = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n padding: ", "px 0;\n border-radius: ", "px;\n ", ";\n input {\n text-transform: uppercase;\n }\n"])), _colors.N0, (0, _constants.gridSize)(), (0, _constants.borderRadius)(),
|
|
66
|
+
var pickerContainer = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n padding: ", "px 0;\n border-radius: ", "px;\n box-shadow: ", ";\n input {\n text-transform: uppercase;\n }\n"])), (0, _tokens.token)('elevation.surface.overlay', _colors.N0), (0, _constants.gridSize)(), (0, _constants.borderRadius)(), (0, _tokens.token)('elevation.shadow.overlay', '0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)'));
|
|
67
67
|
|
|
68
68
|
var StatusPickerWithoutAnalytcs = /*#__PURE__*/function (_React$Component) {
|
|
69
69
|
(0, _inherits2.default)(StatusPickerWithoutAnalytcs, _React$Component);
|
|
@@ -33,6 +33,8 @@ var _tableLocalId = require("./pm-plugins/table-local-id");
|
|
|
33
33
|
|
|
34
34
|
var _safariDelayedDomSelectionSyncingWorkaround = require("./pm-plugins/safari-delayed-dom-selection-syncing-workaround");
|
|
35
35
|
|
|
36
|
+
var _safariDeleteCompositionTextIssueWorkaround = require("./pm-plugins/safari-delete-composition-text-issue-workaround");
|
|
37
|
+
|
|
36
38
|
var _plugin = require("./pm-plugins/decorations/plugin");
|
|
37
39
|
|
|
38
40
|
var _keymap = require("./pm-plugins/keymap");
|
|
@@ -91,13 +93,12 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
91
93
|
eventDispatcher = _ref.eventDispatcher;
|
|
92
94
|
|
|
93
95
|
var _ref2 = options || {},
|
|
94
|
-
dynamicSizingEnabled = _ref2.dynamicSizingEnabled,
|
|
95
96
|
fullWidthEnabled = _ref2.fullWidthEnabled,
|
|
96
97
|
wasFullWidthEnabled = _ref2.wasFullWidthEnabled,
|
|
97
98
|
breakoutEnabled = _ref2.breakoutEnabled,
|
|
98
99
|
tableOptions = _ref2.tableOptions;
|
|
99
100
|
|
|
100
|
-
return (0, _main.createPlugin)(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, (0, _createPluginConfig.pluginConfig)(tableOptions), breakoutEnabled
|
|
101
|
+
return (0, _main.createPlugin)(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, (0, _createPluginConfig.pluginConfig)(tableOptions), breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled);
|
|
101
102
|
}
|
|
102
103
|
}, {
|
|
103
104
|
name: 'tablePMColResizing',
|
|
@@ -105,7 +106,6 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
105
106
|
var dispatch = _ref3.dispatch;
|
|
106
107
|
|
|
107
108
|
var _ref4 = options || {},
|
|
108
|
-
dynamicSizingEnabled = _ref4.dynamicSizingEnabled,
|
|
109
109
|
fullWidthEnabled = _ref4.fullWidthEnabled,
|
|
110
110
|
tableOptions = _ref4.tableOptions;
|
|
111
111
|
|
|
@@ -113,7 +113,6 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
113
113
|
allowColumnResizing = _pluginConfig.allowColumnResizing;
|
|
114
114
|
|
|
115
115
|
return allowColumnResizing ? (0, _tableResizing.createPlugin)(dispatch, {
|
|
116
|
-
dynamicTextSizing: dynamicSizingEnabled && !fullWidthEnabled,
|
|
117
116
|
lastColumnResizable: !fullWidthEnabled
|
|
118
117
|
}) : undefined;
|
|
119
118
|
}
|
|
@@ -165,6 +164,17 @@ var tablesPlugin = function tablesPlugin(options) {
|
|
|
165
164
|
return (0, _safariDelayedDomSelectionSyncingWorkaround.createPlugin)();
|
|
166
165
|
}
|
|
167
166
|
});
|
|
167
|
+
} // Workaround for table element breaking issue caused by composition event with an inputType of deleteCompositionText.
|
|
168
|
+
// https://github.com/ProseMirror/prosemirror/issues/934
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
if (_utils.browser.safari) {
|
|
172
|
+
plugins.push({
|
|
173
|
+
name: 'tableSafariDeleteCompositionTextIssueWorkaround',
|
|
174
|
+
plugin: function plugin() {
|
|
175
|
+
return (0, _safariDeleteCompositionTextIssueWorkaround.createPlugin)();
|
|
176
|
+
}
|
|
177
|
+
});
|
|
168
178
|
}
|
|
169
179
|
|
|
170
180
|
return plugins;
|
|
@@ -251,7 +251,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
251
251
|
view = _this$props3.view,
|
|
252
252
|
getNode = _this$props3.getNode,
|
|
253
253
|
getPos = _this$props3.getPos,
|
|
254
|
-
options = _this$props3.options,
|
|
255
254
|
containerWidth = _this$props3.containerWidth;
|
|
256
255
|
var node = getNode();
|
|
257
256
|
var pos = getPos();
|
|
@@ -261,7 +260,6 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
261
260
|
}
|
|
262
261
|
|
|
263
262
|
(0, _commands.autoSizeTable)(view, node, _this.table, pos, {
|
|
264
|
-
dynamicTextSizing: options && options.dynamicTextSizing || false,
|
|
265
263
|
containerWidth: containerWidth.width
|
|
266
264
|
});
|
|
267
265
|
}
|
|
@@ -344,10 +342,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
344
342
|
_this.node = _getNode();
|
|
345
343
|
_this.containerWidth = _containerWidth; // store table size using previous full-width mode so can detect if it has changed
|
|
346
344
|
|
|
347
|
-
var dynamicTextSizing = _options ? _options.dynamicTextSizing : false;
|
|
348
345
|
var isFullWidthModeEnabled = _options ? _options.wasFullWidthModeEnabled : false;
|
|
349
346
|
_this.layoutSize = _this.tableNodeLayoutSize(_this.node, _containerWidth.width, {
|
|
350
|
-
dynamicTextSizing: dynamicTextSizing,
|
|
351
347
|
isFullWidthModeEnabled: isFullWidthModeEnabled
|
|
352
348
|
}); // Disable inline table editing and resizing controls in Firefox
|
|
353
349
|
// https://github.com/ProseMirror/prosemirror/issues/432
|
|
@@ -432,7 +428,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
432
428
|
value: function componentDidUpdate(prevProps) {
|
|
433
429
|
var _this$props8 = this.props,
|
|
434
430
|
view = _this$props8.view,
|
|
435
|
-
getNode = _this$props8.getNode
|
|
431
|
+
getNode = _this$props8.getNode,
|
|
432
|
+
isMediaFullscreen = _this$props8.isMediaFullscreen,
|
|
433
|
+
allowColumnResizing = _this$props8.allowColumnResizing;
|
|
436
434
|
|
|
437
435
|
var _ref4 = (0, _featureFlagsContext.getFeatureFlags)(view.state) || {},
|
|
438
436
|
tableOverflowShadowsOptimization = _ref4.tableOverflowShadowsOptimization;
|
|
@@ -458,7 +456,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
458
456
|
if (currentTable.attrs.__autoSize) {
|
|
459
457
|
// Wait for next tick to handle auto sizing, gives the browser time to do layout calc etc.
|
|
460
458
|
this.handleAutoSizeDebounced();
|
|
461
|
-
}
|
|
459
|
+
} // re-drawing will cause media component get unmounted that will exit fullscreen mode if media is in fullscreen mode
|
|
460
|
+
// see https://product-fabric.atlassian.net/browse/MEX-1290
|
|
461
|
+
else if (allowColumnResizing && this.table && !isMediaFullscreen) {
|
|
462
462
|
// If col widths (e.g. via collab) or number of columns (e.g. delete a column) have changed,
|
|
463
463
|
// re-draw colgroup.
|
|
464
464
|
var previousTable = this.node;
|
|
@@ -31,6 +31,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
31
31
|
|
|
32
32
|
var _prosemirrorModel = require("prosemirror-model");
|
|
33
33
|
|
|
34
|
+
var _pluginKey = require("../../../plugins/media/pm-plugins/plugin-key");
|
|
35
|
+
|
|
34
36
|
var _ReactNodeView2 = _interopRequireDefault(require("../../../nodeviews/ReactNodeView"));
|
|
35
37
|
|
|
36
38
|
var _WithPluginState = _interopRequireDefault(require("../../../ui/WithPluginState"));
|
|
@@ -41,7 +43,7 @@ var _createPluginConfig = require("../create-plugin-config");
|
|
|
41
43
|
|
|
42
44
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
43
45
|
|
|
44
|
-
var
|
|
46
|
+
var _pluginKey2 = require("../pm-plugins/plugin-key");
|
|
45
47
|
|
|
46
48
|
var _tableResizing = require("../pm-plugins/table-resizing");
|
|
47
49
|
|
|
@@ -131,20 +133,23 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
131
133
|
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
132
134
|
plugins: {
|
|
133
135
|
containerWidth: _width.pluginKey,
|
|
134
|
-
pluginState:
|
|
135
|
-
tableResizingPluginState: _tableResizing.pluginKey
|
|
136
|
+
pluginState: _pluginKey2.pluginKey,
|
|
137
|
+
tableResizingPluginState: _tableResizing.pluginKey,
|
|
138
|
+
mediaState: _pluginKey.stateKey
|
|
136
139
|
},
|
|
137
140
|
editorView: props.view,
|
|
138
141
|
render: function render(pluginStates) {
|
|
139
142
|
var tableResizingPluginState = pluginStates.tableResizingPluginState,
|
|
140
143
|
pluginState = pluginStates.pluginState,
|
|
141
|
-
containerWidth = pluginStates.containerWidth
|
|
144
|
+
containerWidth = pluginStates.containerWidth,
|
|
145
|
+
mediaState = pluginStates.mediaState;
|
|
142
146
|
var tableActive = props.getPos() === pluginState.tablePos;
|
|
143
147
|
return /*#__PURE__*/_react.default.createElement(_TableComponent.default, {
|
|
144
148
|
view: props.view,
|
|
145
149
|
allowColumnResizing: props.allowColumnResizing,
|
|
146
150
|
eventDispatcher: props.eventDispatcher,
|
|
147
151
|
getPos: props.getPos,
|
|
152
|
+
isMediaFullscreen: mediaState === null || mediaState === void 0 ? void 0 : mediaState.isFullscreen,
|
|
148
153
|
options: props.options,
|
|
149
154
|
allowControls: pluginState.pluginConfig.allowControls,
|
|
150
155
|
isHeaderRowEnabled: pluginState.isHeaderRowEnabled,
|