@atlaskit/editor-core 161.0.0 → 163.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +92 -0
- package/dist/cjs/actions/index.js +76 -48
- package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +2 -2
- package/dist/cjs/editor.js +3 -7
- package/dist/cjs/extensibility.js +2 -2
- package/dist/cjs/keymaps/index.js +14 -9
- package/dist/cjs/labs/next/full-page.js +35 -47
- package/dist/cjs/labs/next/presets/cxhtml.js +0 -1
- package/dist/cjs/nodeviews/ReactNodeView.js +16 -41
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +227 -0
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +21 -0
- package/dist/cjs/nodeviews/getPerformanceOptions.js +64 -0
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +16 -6
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +10 -17
- package/dist/cjs/plugins/analytics/types/enums.js +2 -0
- package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +9 -16
- package/dist/cjs/plugins/base/index.js +26 -7
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +141 -76
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -8
- package/dist/cjs/plugins/block-type/commands/block-type.js +21 -9
- package/dist/cjs/plugins/block-type/styles.js +5 -2
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +13 -11
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +11 -7
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +9 -9
- package/dist/cjs/plugins/card/messages.js +4 -4
- package/dist/cjs/plugins/card/nodeviews/genericCard.js +4 -4
- package/dist/cjs/plugins/card/pm-plugins/doc.js +53 -6
- package/dist/cjs/plugins/card/pm-plugins/main.js +16 -1
- package/dist/cjs/plugins/card/styles.js +2 -2
- package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +29 -11
- package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +66 -7
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +166 -7
- package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +15 -13
- package/dist/cjs/plugins/card/ui/assets/card.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/embed.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/inline.js +1 -1
- package/dist/cjs/plugins/card/ui/assets/url.js +1 -1
- package/dist/cjs/plugins/card/ui/link-toolbar-button-group-options.js +60 -0
- package/dist/cjs/plugins/card/ui/link-toolbar-icon-dropdown-options.js +66 -0
- package/dist/cjs/plugins/card/ui/styled.js +5 -13
- package/dist/cjs/plugins/card/ui/types.js +5 -0
- package/dist/cjs/plugins/clipboard/pm-plugins/main.js +99 -3
- package/dist/cjs/plugins/code-block/styles.js +45 -38
- package/dist/cjs/plugins/collab-edit/styles.js +2 -2
- package/dist/cjs/plugins/collab-edit/ui/avatars.js +6 -1
- package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +4 -5
- package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +15 -4
- package/dist/cjs/plugins/collab-edit/ui/styles.js +10 -14
- package/dist/cjs/plugins/date/nodeviews/date.js +30 -75
- package/dist/cjs/plugins/date/pm-plugins/main.js +8 -11
- package/dist/cjs/plugins/date/styles.js +2 -2
- package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -6
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +8 -7
- package/dist/cjs/plugins/emoji/styles.js +3 -3
- package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +13 -16
- package/dist/cjs/plugins/expand/ui/styles.js +26 -12
- package/dist/cjs/plugins/extension/plugin-factory.js +4 -1
- package/dist/cjs/plugins/extension/pm-plugins/main.js +34 -11
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +16 -9
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +9 -6
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +7 -3
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +7 -4
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +14 -13
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +20 -26
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +14 -17
- package/dist/cjs/plugins/extension/ui/styles.js +2 -2
- package/dist/cjs/plugins/extension/utils.js +57 -12
- package/dist/cjs/plugins/fake-text-cursor/styles.js +2 -2
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
- package/dist/cjs/plugins/find-replace/styles.js +2 -2
- package/dist/cjs/plugins/find-replace/ui/Find.js +12 -12
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +5 -5
- package/dist/cjs/plugins/find-replace/ui/Replace.js +5 -5
- package/dist/cjs/plugins/find-replace/ui/styles.js +12 -15
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +6 -7
- package/dist/cjs/plugins/floating-toolbar/ui/styles.js +7 -1
- package/dist/cjs/plugins/grid/styles.js +2 -2
- package/dist/cjs/plugins/help-dialog/ui/index.js +134 -40
- package/dist/cjs/plugins/help-dialog/ui/styles.js +26 -49
- package/dist/cjs/plugins/hyperlink/styles.js +6 -16
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +23 -20
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +13 -10
- package/dist/cjs/plugins/layout/styles.js +2 -2
- package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +180 -0
- package/dist/cjs/plugins/list/commands/index.js +42 -37
- package/dist/cjs/plugins/list/pm-plugins/main.js +6 -0
- package/dist/cjs/plugins/list/styles.js +2 -2
- package/dist/cjs/plugins/list/utils/node.js +4 -3
- package/dist/cjs/plugins/list/utils/replace-content.js +31 -0
- package/dist/cjs/plugins/media/index.js +9 -40
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +28 -23
- package/dist/cjs/plugins/media/pm-plugins/main.js +1 -8
- package/dist/cjs/plugins/media/pm-plugins/media-editor-plugin-factory.js +2 -67
- package/dist/cjs/plugins/media/styles.js +2 -2
- package/dist/cjs/plugins/media/toolbar/index.js +0 -13
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +12 -8
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/styled.js +7 -6
- package/dist/cjs/plugins/media/utils/media-single.js +23 -6
- package/dist/cjs/plugins/mentions/styles.js +2 -2
- package/dist/cjs/plugins/panel/styles.js +5 -2
- package/dist/cjs/plugins/paste/handlers.js +19 -5
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +1 -1
- package/dist/cjs/plugins/placeholder/styles.js +2 -2
- package/dist/cjs/plugins/placeholder-text/index.js +45 -1
- package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +66 -22
- package/dist/cjs/plugins/placeholder-text/selection-utils.js +19 -0
- package/dist/cjs/plugins/placeholder-text/styles.js +4 -2
- package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +2 -1
- package/dist/cjs/plugins/rule/styles.js +5 -2
- package/dist/cjs/plugins/selection/gap-cursor/styles.js +4 -4
- package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +13 -30
- package/dist/cjs/plugins/status/index.js +9 -12
- package/dist/cjs/plugins/status/nodeviews/status.js +43 -126
- package/dist/cjs/plugins/status/plugin.js +14 -6
- package/dist/cjs/plugins/status/styles.js +2 -2
- package/dist/cjs/plugins/table/commands/index.js +0 -6
- package/dist/cjs/plugins/table/commands/insert.js +1 -1
- package/dist/cjs/plugins/table/commands/misc.js +5 -18
- package/dist/cjs/plugins/table/commands-with-analytics.js +1 -1
- package/dist/cjs/plugins/table/handlers.js +6 -2
- package/dist/cjs/plugins/table/index.js +8 -14
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/cjs/plugins/table/nodeviews/table.js +7 -38
- package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +2 -2
- package/dist/cjs/plugins/table/pm-plugins/main.js +3 -1
- package/dist/cjs/plugins/table/pm-plugins/plugin-factory.js +4 -7
- package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +11 -0
- package/dist/cjs/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -3
- package/dist/cjs/plugins/table/reducer.js +0 -7
- package/dist/cjs/plugins/table/toolbar.js +5 -15
- package/dist/cjs/plugins/table/transforms/metadata.js +2 -2
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +11 -17
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +23 -0
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +11 -14
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +27 -0
- package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/cjs/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/cjs/plugins/table/ui/common-styles.js +53 -0
- package/dist/cjs/plugins/table/ui/ui-styles.js +109 -0
- package/dist/cjs/plugins/table/utils/nodes.js +15 -15
- package/dist/cjs/plugins/tasks-and-decisions/commands.js +15 -1
- package/dist/cjs/plugins/tasks-and-decisions/styles.js +2 -2
- package/dist/cjs/plugins/text-formatting/styles.js +5 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +71 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/cjs/plugins/text-formatting/utils.js +30 -2
- package/dist/cjs/plugins/type-ahead/api.js +32 -1
- package/dist/cjs/plugins/type-ahead/constants.js +3 -1
- package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -5
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +8 -0
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +15 -56
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +48 -3
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +4 -1
- package/dist/cjs/plugins/type-ahead/utils.js +22 -4
- package/dist/cjs/plugins/unsupported-content/styles.js +2 -2
- package/dist/cjs/profiler/render-count.js +1 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +0 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/messages.js +2 -2
- package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +18 -16
- package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +16 -14
- package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +13 -10
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +15 -4
- package/dist/cjs/ui/ConfigPanel/Header.js +30 -30
- package/dist/cjs/ui/ContentStyles/index.js +32 -16
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +5 -6
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +30 -23
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +51 -47
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +17 -14
- package/dist/cjs/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +18 -18
- package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +55 -68
- package/dist/cjs/ui/ElementBrowser/hooks/use-container-width.js +10 -11
- package/dist/cjs/ui/FloatingToolbar/styles.js +1 -1
- package/dist/cjs/ui/LinkSearch/LinkSearchList.js +18 -22
- package/dist/cjs/ui/PortalProvider/index.js +3 -3
- package/dist/cjs/ui/Resizer/styled.js +7 -5
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +5 -3
- package/dist/cjs/ui/WithFlash/index.js +9 -17
- package/dist/cjs/utils/index.js +1 -8
- package/dist/cjs/utils/insert.js +26 -11
- package/dist/cjs/utils/performance/components/RenderTracking.js +52 -0
- package/dist/cjs/utils/selection.js +2 -9
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +20 -23
- package/dist/es2019/create-editor/ErrorBoundary.js +2 -2
- package/dist/es2019/create-editor/ReactEditorView.js +1 -1
- package/dist/es2019/editor.js +3 -5
- package/dist/es2019/extensibility.js +1 -1
- package/dist/es2019/keymaps/index.js +10 -4
- package/dist/es2019/labs/next/full-page.js +43 -42
- package/dist/es2019/labs/next/presets/cxhtml.js +0 -1
- package/dist/es2019/nodeviews/ReactNodeView.js +13 -35
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +216 -0
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +15 -0
- package/dist/es2019/nodeviews/getPerformanceOptions.js +47 -0
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +18 -7
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +5 -5
- package/dist/es2019/plugins/analytics/types/enums.js +2 -0
- package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +12 -7
- package/dist/es2019/plugins/base/index.js +24 -5
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +135 -77
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -4
- package/dist/es2019/plugins/block-type/commands/block-type.js +18 -11
- package/dist/es2019/plugins/block-type/styles.js +3 -3
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +15 -12
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +19 -14
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +10 -6
- package/dist/es2019/plugins/card/messages.js +4 -4
- package/dist/es2019/plugins/card/nodeviews/genericCard.js +5 -5
- package/dist/es2019/plugins/card/pm-plugins/doc.js +44 -4
- package/dist/es2019/plugins/card/pm-plugins/main.js +17 -1
- package/dist/es2019/plugins/card/styles.js +1 -1
- package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +21 -9
- package/dist/es2019/plugins/card/ui/LinkToolbarButtonGroup.js +54 -3
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +145 -3
- package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +17 -12
- package/dist/es2019/plugins/card/ui/assets/card.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/embed.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/inline.js +1 -1
- package/dist/es2019/plugins/card/ui/assets/url.js +1 -1
- package/dist/es2019/plugins/card/ui/link-toolbar-button-group-options.js +45 -0
- package/dist/es2019/plugins/card/ui/link-toolbar-icon-dropdown-options.js +51 -0
- package/dist/es2019/plugins/card/ui/styled.js +2 -2
- package/dist/es2019/plugins/card/ui/types.js +1 -0
- package/dist/es2019/plugins/clipboard/pm-plugins/main.js +91 -9
- package/dist/es2019/plugins/code-block/styles.js +18 -14
- package/dist/es2019/plugins/collab-edit/styles.js +1 -1
- package/dist/es2019/plugins/collab-edit/ui/avatars.js +6 -2
- package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +5 -4
- package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +9 -5
- package/dist/es2019/plugins/collab-edit/ui/styles.js +5 -7
- package/dist/es2019/plugins/date/nodeviews/date.js +37 -48
- package/dist/es2019/plugins/date/pm-plugins/main.js +8 -10
- package/dist/es2019/plugins/date/styles.js +1 -1
- package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +8 -4
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +9 -5
- package/dist/es2019/plugins/emoji/styles.js +1 -2
- package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +13 -14
- package/dist/es2019/plugins/expand/ui/styles.js +32 -22
- package/dist/es2019/plugins/extension/plugin-factory.js +3 -1
- package/dist/es2019/plugins/extension/pm-plugins/main.js +38 -12
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +17 -11
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +7 -6
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +9 -5
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +5 -3
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +14 -7
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +14 -8
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +15 -9
- package/dist/es2019/plugins/extension/ui/styles.js +2 -1
- package/dist/es2019/plugins/extension/utils.js +37 -2
- package/dist/es2019/plugins/fake-text-cursor/styles.js +1 -1
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
- package/dist/es2019/plugins/find-replace/styles.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/Find.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/es2019/plugins/find-replace/ui/styles.js +14 -9
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +12 -8
- package/dist/es2019/plugins/floating-toolbar/ui/styles.js +7 -1
- package/dist/es2019/plugins/grid/styles.js +1 -1
- package/dist/es2019/plugins/help-dialog/ui/index.js +132 -37
- package/dist/es2019/plugins/help-dialog/ui/styles.js +13 -13
- package/dist/es2019/plugins/hyperlink/styles.js +1 -5
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +25 -20
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +14 -7
- package/dist/es2019/plugins/layout/styles.js +5 -1
- package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +163 -0
- package/dist/es2019/plugins/list/commands/index.js +36 -28
- package/dist/es2019/plugins/list/pm-plugins/main.js +6 -0
- package/dist/es2019/plugins/list/styles.js +1 -1
- package/dist/es2019/plugins/list/utils/node.js +4 -3
- package/dist/es2019/plugins/list/utils/replace-content.js +22 -0
- package/dist/es2019/plugins/media/index.js +1 -28
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +30 -16
- package/dist/es2019/plugins/media/pm-plugins/main.js +1 -7
- package/dist/es2019/plugins/media/pm-plugins/media-editor-plugin-factory.js +1 -49
- package/dist/es2019/plugins/media/styles.js +2 -3
- package/dist/es2019/plugins/media/toolbar/index.js +0 -12
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +0 -1
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +14 -9
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/styled.js +4 -5
- package/dist/es2019/plugins/media/utils/media-single.js +23 -6
- package/dist/es2019/plugins/mentions/styles.js +1 -1
- package/dist/es2019/plugins/panel/styles.js +3 -3
- package/dist/es2019/plugins/paste/handlers.js +19 -5
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/es2019/plugins/placeholder/styles.js +1 -1
- package/dist/es2019/plugins/placeholder-text/index.js +46 -1
- package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +66 -20
- package/dist/es2019/plugins/placeholder-text/selection-utils.js +9 -0
- package/dist/es2019/plugins/placeholder-text/styles.js +23 -1
- package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +4 -1
- package/dist/es2019/plugins/rule/styles.js +3 -3
- package/dist/es2019/plugins/selection/gap-cursor/styles.js +2 -2
- package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +4 -20
- package/dist/es2019/plugins/status/index.js +1 -5
- package/dist/es2019/plugins/status/nodeviews/status.js +45 -82
- package/dist/es2019/plugins/status/plugin.js +13 -6
- package/dist/es2019/plugins/status/styles.js +1 -7
- package/dist/es2019/plugins/table/commands/index.js +1 -1
- package/dist/es2019/plugins/table/commands/insert.js +1 -1
- package/dist/es2019/plugins/table/commands/misc.js +5 -11
- package/dist/es2019/plugins/table/commands-with-analytics.js +1 -1
- package/dist/es2019/plugins/table/handlers.js +6 -2
- package/dist/es2019/plugins/table/index.js +5 -9
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/es2019/plugins/table/nodeviews/table.js +2 -16
- package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +1 -1
- package/dist/es2019/plugins/table/pm-plugins/main.js +2 -1
- package/dist/es2019/plugins/table/pm-plugins/plugin-factory.js +1 -2
- package/dist/es2019/plugins/table/pm-plugins/plugin-key.js +2 -0
- package/dist/es2019/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +1 -1
- package/dist/es2019/plugins/table/reducer.js +0 -9
- package/dist/es2019/plugins/table/toolbar.js +1 -4
- package/dist/es2019/plugins/table/transforms/metadata.js +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +12 -11
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/{styles.css.js → styles.js} +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +10 -10
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/{styles.css.js → styles.js} +1 -1
- package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/es2019/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/es2019/plugins/table/ui/{common-styles.css.js → common-styles.js} +61 -27
- package/dist/es2019/plugins/table/ui/{ui-styles.css.js → ui-styles.js} +99 -78
- package/dist/es2019/plugins/table/utils/nodes.js +11 -11
- package/dist/es2019/plugins/tasks-and-decisions/commands.js +13 -1
- package/dist/es2019/plugins/tasks-and-decisions/styles.js +1 -1
- package/dist/es2019/plugins/text-formatting/styles.js +3 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +61 -2
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/es2019/plugins/text-formatting/utils.js +13 -1
- package/dist/es2019/plugins/type-ahead/api.js +31 -2
- package/dist/es2019/plugins/type-ahead/constants.js +1 -0
- package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +17 -5
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +11 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +19 -51
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +41 -3
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +3 -1
- package/dist/es2019/plugins/type-ahead/utils.js +15 -0
- package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
- package/dist/es2019/profiler/render-count.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +0 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/Appearance/FullPage/messages.js +1 -1
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +19 -16
- package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +18 -13
- package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +14 -8
- package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +12 -3
- package/dist/es2019/ui/ConfigPanel/Header.js +30 -19
- package/dist/es2019/ui/ContentStyles/index.js +40 -23
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +5 -6
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +49 -38
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +54 -33
- package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +18 -10
- package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +19 -17
- package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +132 -119
- package/dist/es2019/ui/ElementBrowser/hooks/use-container-width.js +10 -9
- package/dist/es2019/ui/FloatingToolbar/styles.js +2 -1
- package/dist/es2019/ui/LinkSearch/LinkSearchList.js +14 -9
- package/dist/es2019/ui/PortalProvider/index.js +3 -3
- package/dist/es2019/ui/Resizer/styled.js +3 -3
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +6 -3
- package/dist/es2019/ui/WithFlash/index.js +15 -6
- package/dist/es2019/utils/index.js +1 -1
- package/dist/es2019/utils/insert.js +22 -10
- package/dist/es2019/utils/performance/components/RenderTracking.js +37 -0
- package/dist/es2019/utils/selection.js +1 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +76 -48
- package/dist/esm/create-editor/ErrorBoundary.js +2 -2
- package/dist/esm/create-editor/ReactEditorView.js +1 -1
- package/dist/esm/editor.js +3 -5
- package/dist/esm/extensibility.js +1 -1
- package/dist/esm/keymaps/index.js +7 -4
- package/dist/esm/labs/next/full-page.js +38 -36
- package/dist/esm/labs/next/presets/cxhtml.js +0 -1
- package/dist/esm/nodeviews/ReactNodeView.js +17 -38
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +212 -0
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
- package/dist/esm/nodeviews/getPerformanceOptions.js +45 -0
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +17 -7
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +5 -5
- package/dist/esm/plugins/analytics/types/enums.js +2 -0
- package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +9 -9
- package/dist/esm/plugins/base/index.js +26 -7
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +134 -69
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -4
- package/dist/esm/plugins/block-type/commands/block-type.js +19 -9
- package/dist/esm/plugins/block-type/styles.js +4 -2
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +14 -12
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +9 -5
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +9 -6
- package/dist/esm/plugins/card/messages.js +4 -4
- package/dist/esm/plugins/card/nodeviews/genericCard.js +5 -5
- package/dist/esm/plugins/card/pm-plugins/doc.js +47 -4
- package/dist/esm/plugins/card/pm-plugins/main.js +15 -1
- package/dist/esm/plugins/card/styles.js +1 -1
- package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +25 -9
- package/dist/esm/plugins/card/ui/LinkToolbarButtonGroup.js +57 -5
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +154 -5
- package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +16 -14
- package/dist/esm/plugins/card/ui/assets/card.js +1 -1
- package/dist/esm/plugins/card/ui/assets/embed.js +1 -1
- package/dist/esm/plugins/card/ui/assets/inline.js +1 -1
- package/dist/esm/plugins/card/ui/assets/url.js +1 -1
- package/dist/esm/plugins/card/ui/link-toolbar-button-group-options.js +45 -0
- package/dist/esm/plugins/card/ui/link-toolbar-icon-dropdown-options.js +51 -0
- package/dist/esm/plugins/card/ui/styled.js +2 -2
- package/dist/esm/plugins/card/ui/types.js +1 -0
- package/dist/esm/plugins/clipboard/pm-plugins/main.js +91 -2
- package/dist/esm/plugins/code-block/styles.js +42 -38
- package/dist/esm/plugins/collab-edit/styles.js +1 -1
- package/dist/esm/plugins/collab-edit/ui/avatars.js +6 -2
- package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +5 -4
- package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +9 -5
- package/dist/esm/plugins/collab-edit/ui/styles.js +6 -7
- package/dist/esm/plugins/date/nodeviews/date.js +30 -71
- package/dist/esm/plugins/date/pm-plugins/main.js +8 -9
- package/dist/esm/plugins/date/styles.js +1 -1
- package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +7 -4
- package/dist/esm/plugins/date/ui/DatePicker/index.js +8 -5
- package/dist/esm/plugins/emoji/styles.js +2 -2
- package/dist/esm/plugins/expand/ui/ExpandIconButton.js +13 -15
- package/dist/esm/plugins/expand/ui/styles.js +24 -12
- package/dist/esm/plugins/extension/plugin-factory.js +3 -1
- package/dist/esm/plugins/extension/pm-plugins/main.js +34 -11
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +18 -11
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -5
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +9 -5
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +5 -3
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +13 -7
- package/dist/esm/plugins/extension/ui/Extension/styles.js +13 -11
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +15 -9
- package/dist/esm/plugins/extension/ui/styles.js +2 -2
- package/dist/esm/plugins/extension/utils.js +51 -9
- package/dist/esm/plugins/fake-text-cursor/styles.js +1 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
- package/dist/esm/plugins/find-replace/styles.js +1 -1
- package/dist/esm/plugins/find-replace/ui/Find.js +1 -1
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +1 -1
- package/dist/esm/plugins/find-replace/ui/Replace.js +1 -1
- package/dist/esm/plugins/find-replace/ui/styles.js +6 -10
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +6 -7
- package/dist/esm/plugins/floating-toolbar/ui/styles.js +7 -1
- package/dist/esm/plugins/grid/styles.js +1 -1
- package/dist/esm/plugins/help-dialog/ui/index.js +135 -41
- package/dist/esm/plugins/help-dialog/ui/styles.js +13 -13
- package/dist/esm/plugins/hyperlink/styles.js +3 -5
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -20
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +14 -7
- package/dist/esm/plugins/layout/styles.js +2 -2
- package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +168 -0
- package/dist/esm/plugins/list/commands/index.js +40 -34
- package/dist/esm/plugins/list/pm-plugins/main.js +6 -0
- package/dist/esm/plugins/list/styles.js +1 -1
- package/dist/esm/plugins/list/utils/node.js +4 -3
- package/dist/esm/plugins/list/utils/replace-content.js +21 -0
- package/dist/esm/plugins/media/index.js +9 -37
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +29 -15
- package/dist/esm/plugins/media/pm-plugins/main.js +1 -9
- package/dist/esm/plugins/media/pm-plugins/media-editor-plugin-factory.js +1 -58
- package/dist/esm/plugins/media/styles.js +2 -2
- package/dist/esm/plugins/media/toolbar/index.js +0 -12
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +13 -9
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/styled.js +4 -3
- package/dist/esm/plugins/media/utils/media-single.js +21 -6
- package/dist/esm/plugins/mentions/styles.js +1 -1
- package/dist/esm/plugins/panel/styles.js +4 -2
- package/dist/esm/plugins/paste/handlers.js +19 -5
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/esm/plugins/placeholder/styles.js +1 -1
- package/dist/esm/plugins/placeholder-text/index.js +44 -1
- package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +67 -20
- package/dist/esm/plugins/placeholder-text/selection-utils.js +9 -0
- package/dist/esm/plugins/placeholder-text/styles.js +3 -2
- package/dist/esm/plugins/rule/pm-plugins/input-rule.js +2 -1
- package/dist/esm/plugins/rule/styles.js +4 -2
- package/dist/esm/plugins/selection/gap-cursor/styles.js +3 -3
- package/dist/esm/plugins/selection/pm-plugins/selection-main.js +5 -21
- package/dist/esm/plugins/status/index.js +9 -12
- package/dist/esm/plugins/status/nodeviews/status.js +37 -115
- package/dist/esm/plugins/status/plugin.js +13 -6
- package/dist/esm/plugins/status/styles.js +2 -2
- package/dist/esm/plugins/table/commands/index.js +1 -1
- package/dist/esm/plugins/table/commands/insert.js +1 -1
- package/dist/esm/plugins/table/commands/misc.js +5 -15
- package/dist/esm/plugins/table/commands-with-analytics.js +1 -1
- package/dist/esm/plugins/table/handlers.js +6 -2
- package/dist/esm/plugins/table/index.js +7 -12
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +2 -2
- package/dist/esm/plugins/table/nodeviews/table.js +6 -37
- package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +1 -1
- package/dist/esm/plugins/table/pm-plugins/main.js +2 -1
- package/dist/esm/plugins/table/pm-plugins/plugin-factory.js +1 -2
- package/dist/esm/plugins/table/pm-plugins/plugin-key.js +2 -0
- package/dist/esm/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
- package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +1 -1
- package/dist/esm/plugins/table/reducer.js +0 -7
- package/dist/esm/plugins/table/toolbar.js +1 -10
- package/dist/esm/plugins/table/transforms/metadata.js +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +11 -12
- package/dist/esm/plugins/table/ui/FloatingContextualButton/{styles.css.js → styles.js} +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +10 -12
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/{styles.css.js → styles.js} +1 -1
- package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -1
- package/dist/esm/plugins/table/ui/LayoutButton/index.js +1 -2
- package/dist/esm/plugins/table/ui/common-styles.js +27 -0
- package/dist/esm/plugins/table/ui/ui-styles.js +68 -0
- package/dist/esm/plugins/table/utils/nodes.js +14 -14
- package/dist/esm/plugins/tasks-and-decisions/commands.js +13 -1
- package/dist/esm/plugins/tasks-and-decisions/styles.js +1 -1
- package/dist/esm/plugins/text-formatting/styles.js +4 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +69 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
- package/dist/esm/plugins/text-formatting/utils.js +18 -0
- package/dist/esm/plugins/type-ahead/api.js +30 -2
- package/dist/esm/plugins/type-ahead/constants.js +1 -0
- package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +16 -4
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +9 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +18 -56
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +44 -3
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +3 -1
- package/dist/esm/plugins/type-ahead/utils.js +17 -3
- package/dist/esm/plugins/unsupported-content/styles.js +1 -1
- package/dist/esm/profiler/render-count.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +0 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/Appearance/FullPage/messages.js +1 -1
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +19 -16
- package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +17 -13
- package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +13 -8
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +14 -3
- package/dist/esm/ui/ConfigPanel/Header.js +30 -19
- package/dist/esm/ui/ContentStyles/index.js +28 -15
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -6
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +29 -18
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +50 -35
- package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +18 -10
- package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +19 -17
- package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +53 -52
- package/dist/esm/ui/ElementBrowser/hooks/use-container-width.js +9 -8
- package/dist/esm/ui/FloatingToolbar/styles.js +1 -1
- package/dist/esm/ui/LinkSearch/LinkSearchList.js +14 -9
- package/dist/esm/ui/PortalProvider/index.js +3 -3
- package/dist/esm/ui/Resizer/styled.js +4 -2
- package/dist/esm/ui/Toolbar/ToolbarInner.js +6 -3
- package/dist/esm/ui/WithFlash/index.js +8 -8
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/insert.js +22 -10
- package/dist/esm/utils/performance/components/RenderTracking.js +39 -0
- package/dist/esm/utils/selection.js +1 -6
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +2 -2
- package/dist/types/editor.d.ts +1 -1
- package/dist/types/extensibility.d.ts +1 -1
- package/dist/types/keymaps/index.d.ts +3 -2
- package/dist/types/labs/next/full-page.d.ts +1 -1
- package/dist/types/labs/next/mobile.d.ts +1 -1
- package/dist/types/nodeviews/ReactNodeView.d.ts +0 -5
- package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +23 -0
- package/dist/types/nodeviews/getInlineNodeViewProducer.styles.d.ts +1 -0
- package/dist/types/nodeviews/getPerformanceOptions.d.ts +19 -0
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +3 -1
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/styles.d.ts +4 -5
- package/dist/types/plugins/analytics/types/enums.d.ts +2 -0
- package/dist/types/plugins/analytics/types/events.d.ts +11 -3
- package/dist/types/plugins/analytics/types/general-events.d.ts +1 -1
- package/dist/types/plugins/analytics/types/list-events.d.ts +0 -1
- package/dist/types/plugins/analytics/types/utils.d.ts +4 -0
- package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +2 -2
- package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +12 -6
- package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +3 -3
- package/dist/types/plugins/block-type/styles.d.ts +2 -1
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -0
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/styled.d.ts +2 -7
- package/dist/types/plugins/breakout/ui/LayoutButton.d.ts +1 -0
- package/dist/types/plugins/card/messages.d.ts +2 -2
- package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -0
- package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/card/styles.d.ts +1 -1
- package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +18 -2
- package/dist/types/plugins/card/ui/LinkToolbarIconDropdown.d.ts +23 -3
- package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +3 -1
- package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +5 -0
- package/dist/types/plugins/card/ui/link-toolbar-icon-dropdown-options.d.ts +5 -0
- package/dist/types/plugins/card/ui/styled.d.ts +2 -3
- package/dist/types/plugins/card/ui/types.d.ts +12 -0
- package/dist/types/plugins/clipboard/pm-plugins/main.d.ts +10 -1
- package/dist/types/plugins/code-block/styles.d.ts +3 -2
- package/dist/types/plugins/collab-edit/styles.d.ts +1 -1
- package/dist/types/plugins/collab-edit/ui/avatars.d.ts +1 -0
- package/dist/types/plugins/collab-edit/ui/colored-avatar-item.d.ts +3 -2
- package/dist/types/plugins/collab-edit/ui/invite-to-edit.d.ts +1 -0
- package/dist/types/plugins/collab-edit/ui/styles.d.ts +3 -8
- package/dist/types/plugins/date/nodeviews/date.d.ts +3 -15
- package/dist/types/plugins/date/styles.d.ts +1 -1
- package/dist/types/plugins/date/ui/DatePicker/date-picker-input.d.ts +1 -0
- package/dist/types/plugins/date/ui/DatePicker/index.d.ts +1 -0
- package/dist/types/plugins/emoji/styles.d.ts +2 -2
- package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +5 -3
- package/dist/types/plugins/expand/ui/styles.d.ts +2 -1
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/extension/types.d.ts +1 -0
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +1 -0
- package/dist/types/plugins/extension/ui/Extension/Extension/styles.d.ts +3 -8
- package/dist/types/plugins/extension/ui/Extension/InlineExtension/index.d.ts +3 -1
- package/dist/types/plugins/extension/ui/Extension/InlineExtension/styles.d.ts +2 -2
- package/dist/types/plugins/extension/ui/Extension/Lozenge.d.ts +3 -1
- package/dist/types/plugins/extension/ui/Extension/styles.d.ts +6 -6
- package/dist/types/plugins/extension/ui/SaveIndicator/SaveIndicator.d.ts +1 -0
- package/dist/types/plugins/extension/ui/styles.d.ts +1 -1
- package/dist/types/plugins/extension/utils.d.ts +3 -1
- package/dist/types/plugins/fake-text-cursor/styles.d.ts +1 -1
- package/dist/types/plugins/find-replace/styles.d.ts +1 -1
- package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +2 -1
- package/dist/types/plugins/find-replace/ui/styles.d.ts +5 -5
- package/dist/types/plugins/floating-toolbar/ui/styles.d.ts +6 -1
- package/dist/types/plugins/grid/styles.d.ts +1 -1
- package/dist/types/plugins/help-dialog/ui/index.d.ts +3 -1
- package/dist/types/plugins/help-dialog/ui/styles.d.ts +12 -13
- package/dist/types/plugins/hyperlink/styles.d.ts +2 -4
- package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +4 -2
- package/dist/types/plugins/jira-issue/nodeviews/jira-issue.d.ts +3 -2
- package/dist/types/plugins/layout/styles.d.ts +1 -1
- package/dist/types/plugins/list/actions/wrap-and-join-lists.d.ts +25 -0
- package/dist/types/plugins/list/commands/index.d.ts +0 -1
- package/dist/types/plugins/list/styles.d.ts +1 -1
- package/dist/types/plugins/list/utils/node.d.ts +0 -1
- package/dist/types/plugins/list/utils/replace-content.d.ts +8 -0
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -2
- package/dist/types/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +3 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +0 -1
- package/dist/types/plugins/media/pm-plugins/media-editor-plugin-factory.d.ts +1 -3
- package/dist/types/plugins/media/styles.d.ts +1 -1
- package/dist/types/plugins/media/types.d.ts +0 -19
- package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +3 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/styled.d.ts +2 -2
- package/dist/types/plugins/media/utils/media-single.d.ts +1 -0
- package/dist/types/plugins/mentions/styles.d.ts +1 -1
- package/dist/types/plugins/panel/styles.d.ts +2 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -1
- package/dist/types/plugins/placeholder/styles.d.ts +1 -1
- package/dist/types/plugins/placeholder-text/placeholder-text-nodeview.d.ts +3 -2
- package/dist/types/plugins/placeholder-text/selection-utils.d.ts +2 -0
- package/dist/types/plugins/placeholder-text/styles.d.ts +1 -1
- package/dist/types/plugins/rule/styles.d.ts +2 -1
- package/dist/types/plugins/selection/gap-cursor/styles.d.ts +1 -1
- package/dist/types/plugins/status/nodeviews/status.d.ts +6 -13
- package/dist/types/plugins/status/plugin.d.ts +2 -3
- package/dist/types/plugins/status/styles.d.ts +1 -1
- package/dist/types/plugins/status/ui/statusPicker.d.ts +1 -1
- package/dist/types/plugins/table/commands/index.d.ts +1 -1
- package/dist/types/plugins/table/commands/misc.d.ts +0 -1
- package/dist/types/plugins/table/nodeviews/table.d.ts +0 -1
- package/dist/types/plugins/table/pm-plugins/plugin-factory.d.ts +1 -4
- package/dist/types/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
- package/dist/types/plugins/table/types.d.ts +1 -8
- package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +4 -2
- package/dist/types/plugins/table/ui/FloatingContextualButton/styles.d.ts +1 -0
- package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +3 -2
- package/dist/types/plugins/table/ui/FloatingContextualMenu/styles.d.ts +1 -0
- package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +0 -1
- package/dist/types/plugins/table/ui/common-styles.d.ts +6 -0
- package/dist/types/plugins/table/ui/ui-styles.d.ts +15 -0
- package/dist/types/plugins/table/utils/nodes.d.ts +6 -6
- package/dist/types/plugins/tasks-and-decisions/styles.d.ts +1 -1
- package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
- package/dist/types/plugins/text-formatting/styles.d.ts +2 -1
- package/dist/types/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +30 -0
- package/dist/types/plugins/text-formatting/utils.d.ts +4 -0
- package/dist/types/plugins/type-ahead/api.d.ts +11 -1
- package/dist/types/plugins/type-ahead/constants.d.ts +1 -0
- package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +1 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +26 -0
- package/dist/types/plugins/type-ahead/utils.d.ts +4 -0
- package/dist/types/plugins/unsupported-content/styles.d.ts +1 -1
- package/dist/types/types/editor-appearance-component.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -9
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/ErrorMessage/ErrorImage.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/Fields/Boolean.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Header.d.ts +3 -3
- package/dist/types/ui/ContentStyles/index.d.ts +2 -4
- package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +1 -0
- package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -0
- package/dist/types/ui/ElementBrowser/components/ElementSearch.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +2 -1
- package/dist/types/ui/ElementBrowser/hooks/use-container-width.d.ts +1 -0
- package/dist/types/ui/LinkSearch/LinkSearchList.d.ts +4 -3
- package/dist/types/ui/Resizer/styled.d.ts +1 -2
- package/dist/types/ui/Toolbar/ToolbarInner.d.ts +3 -1
- package/dist/types/ui/ToolbarButton/index.d.ts +3 -3
- package/dist/types/ui/ToolbarButton/styles.d.ts +2 -2
- package/dist/types/ui/WithFlash/index.d.ts +3 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/insert.d.ts +2 -1
- package/dist/types/utils/performance/components/RenderTracking.d.ts +13 -0
- package/dist/types/utils/selection.d.ts +0 -1
- package/package.json +36 -36
- package/dist/cjs/plugins/media/commands/media-editor.js +0 -80
- package/dist/cjs/plugins/media/pm-plugins/media-editor.js +0 -106
- package/dist/cjs/plugins/media/toolbar/annotation.js +0 -244
- package/dist/cjs/plugins/media/ui/MediaEditor.js +0 -88
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.css.js +0 -23
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.css.js +0 -27
- package/dist/cjs/plugins/table/ui/common-styles.css.js +0 -44
- package/dist/cjs/plugins/table/ui/ui-styles.css.js +0 -95
- package/dist/cjs/utils/compare.js +0 -136
- package/dist/cjs/utils/react-hooks/use-component-renderer-tracking/index.js +0 -83
- package/dist/es2019/plugins/media/commands/media-editor.js +0 -46
- package/dist/es2019/plugins/media/pm-plugins/media-editor.js +0 -43
- package/dist/es2019/plugins/media/toolbar/annotation.js +0 -136
- package/dist/es2019/plugins/media/ui/MediaEditor.js +0 -51
- package/dist/es2019/utils/compare.js +0 -99
- package/dist/es2019/utils/react-hooks/use-component-renderer-tracking/index.js +0 -66
- package/dist/esm/plugins/media/commands/media-editor.js +0 -59
- package/dist/esm/plugins/media/pm-plugins/media-editor.js +0 -90
- package/dist/esm/plugins/media/toolbar/annotation.js +0 -218
- package/dist/esm/plugins/media/ui/MediaEditor.js +0 -76
- package/dist/esm/plugins/table/ui/common-styles.css.js +0 -23
- package/dist/esm/plugins/table/ui/ui-styles.css.js +0 -59
- package/dist/esm/utils/compare.js +0 -115
- package/dist/esm/utils/react-hooks/use-component-renderer-tracking/index.js +0 -68
- package/dist/types/plugins/media/commands/media-editor.d.ts +0 -7
- package/dist/types/plugins/media/pm-plugins/media-editor.d.ts +0 -3
- package/dist/types/plugins/media/toolbar/annotation.d.ts +0 -24
- package/dist/types/plugins/media/ui/MediaEditor.d.ts +0 -14
- package/dist/types/plugins/table/ui/FloatingContextualButton/styles.css.d.ts +0 -1
- package/dist/types/plugins/table/ui/FloatingContextualMenu/styles.css.d.ts +0 -1
- package/dist/types/plugins/table/ui/common-styles.css.d.ts +0 -3
- package/dist/types/plugins/table/ui/ui-styles.css.d.ts +0 -14
- package/dist/types/utils/compare.d.ts +0 -32
- package/dist/types/utils/react-hooks/use-component-renderer-tracking/index.d.ts +0 -30
|
@@ -17,25 +17,17 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
17
17
|
|
|
18
18
|
var _react = _interopRequireDefault(require("react"));
|
|
19
19
|
|
|
20
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
21
|
-
|
|
22
|
-
var _pluginKey = require("../plugins/analytics/plugin-key");
|
|
23
|
-
|
|
24
20
|
var _eventDispatcher = require("../event-dispatcher");
|
|
25
21
|
|
|
26
22
|
var _analytics = require("../plugins/analytics");
|
|
27
23
|
|
|
28
24
|
var _consts = require("../plugins/analytics/consts");
|
|
29
25
|
|
|
30
|
-
var _getParticipantsCount = require("../plugins/collab-edit/get-participants-count");
|
|
31
|
-
|
|
32
26
|
var _featureFlagsContext = require("../plugins/feature-flags-context");
|
|
33
27
|
|
|
34
28
|
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
35
29
|
|
|
36
|
-
var
|
|
37
|
-
var DEFAULT_SLOW_THRESHOLD = 7;
|
|
38
|
-
var nodeViewEventsCounter = 0;
|
|
30
|
+
var _getPerformanceOptions = require("./getPerformanceOptions");
|
|
39
31
|
|
|
40
32
|
var ReactNodeView = /*#__PURE__*/function () {
|
|
41
33
|
function ReactNodeView(_node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent) {
|
|
@@ -104,27 +96,24 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
104
96
|
|
|
105
97
|
|
|
106
98
|
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
|
|
100
|
+
var _getPerformanceOption = (0, _getPerformanceOptions.getPerformanceOptions)(this.view),
|
|
101
|
+
samplingRate = _getPerformanceOption.samplingRate,
|
|
102
|
+
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
103
|
+
trackingEnabled = _getPerformanceOption.trackingEnabled;
|
|
104
|
+
|
|
105
|
+
trackingEnabled && (0, _getPerformanceOptions.startMeasureReactNodeViewRendered)({
|
|
106
|
+
nodeTypeName: this.node.type.name
|
|
107
|
+
});
|
|
112
108
|
this.renderReactComponent(function () {
|
|
113
109
|
return _this2.render(_this2.reactComponentProps, _this2.handleRef);
|
|
114
110
|
});
|
|
115
|
-
trackingEnabled && (0,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
attributes: {
|
|
122
|
-
node: _this2.node.type.name,
|
|
123
|
-
duration: duration,
|
|
124
|
-
participants: (0, _getParticipantsCount.getParticipantsCount)(_this2.view.state)
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}
|
|
111
|
+
trackingEnabled && (0, _getPerformanceOptions.stopMeasureReactNodeViewRendered)({
|
|
112
|
+
nodeTypeName: this.node.type.name,
|
|
113
|
+
dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
|
|
114
|
+
editorState: this.view.state,
|
|
115
|
+
samplingRate: samplingRate,
|
|
116
|
+
slowThreshold: slowThreshold
|
|
128
117
|
});
|
|
129
118
|
return this;
|
|
130
119
|
}
|
|
@@ -260,20 +249,6 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
260
249
|
this.domRef = undefined;
|
|
261
250
|
this.contentDOM = undefined;
|
|
262
251
|
}
|
|
263
|
-
}, {
|
|
264
|
-
key: "performanceOptions",
|
|
265
|
-
get: function get() {
|
|
266
|
-
var pluginState = _pluginKey.analyticsPluginKey.getState(this.view.state);
|
|
267
|
-
|
|
268
|
-
var nodeViewTracking = pluginState && pluginState.performanceTracking ? pluginState.performanceTracking.nodeViewTracking || {} : {};
|
|
269
|
-
var samplingRate = nodeViewTracking.samplingRate || DEFAULT_SAMPLING_RATE;
|
|
270
|
-
var slowThreshold = nodeViewTracking.slowThreshold || DEFAULT_SLOW_THRESHOLD;
|
|
271
|
-
return {
|
|
272
|
-
enabled: !!nodeViewTracking.enabled,
|
|
273
|
-
samplingRate: samplingRate,
|
|
274
|
-
slowThreshold: slowThreshold
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
252
|
}], [{
|
|
278
253
|
key: "fromComponent",
|
|
279
254
|
value: function fromComponent(component, portalProviderAPI, eventDispatcher, props, viewShouldUpdate) {
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getInlineNodeViewProducer = getInlineNodeViewProducer;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
|
+
|
|
16
|
+
var _analytics = require("../plugins/analytics");
|
|
17
|
+
|
|
18
|
+
var _consts = require("../plugins/analytics/consts");
|
|
19
|
+
|
|
20
|
+
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
21
|
+
|
|
22
|
+
var _getPerformanceOptions = require("./getPerformanceOptions");
|
|
23
|
+
|
|
24
|
+
function createNodeView(_ref) {
|
|
25
|
+
var nodeViewParams = _ref.nodeViewParams,
|
|
26
|
+
pmPluginFactoryParams = _ref.pmPluginFactoryParams,
|
|
27
|
+
Component = _ref.Component,
|
|
28
|
+
extraComponentProps = _ref.extraComponentProps;
|
|
29
|
+
// We set a variable for the current node which is
|
|
30
|
+
// used for comparisions when doing updates, before being
|
|
31
|
+
// overwritten to the updated node.
|
|
32
|
+
var currentNode = nodeViewParams.node; // First we setup the dom element which will be rendered and "tracked" by prosemirror
|
|
33
|
+
// and also used as a "editor portal" (not react portal) target by the editor
|
|
34
|
+
// portal provider api, for rendering the Component passed.
|
|
35
|
+
|
|
36
|
+
var domRef = document.createElement('span');
|
|
37
|
+
domRef.contentEditable = 'false';
|
|
38
|
+
setDomAttrs(nodeViewParams.node, domRef); // @see ED-3790
|
|
39
|
+
// something gets messed up during mutation processing inside of a
|
|
40
|
+
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
41
|
+
// difference between them and it kills the nodeView
|
|
42
|
+
|
|
43
|
+
domRef.classList.add("".concat(nodeViewParams.node.type.name, "View-content-wrap"), "inlineNodeViewOuterContainer"); // This util is shared for tracking rendering, and the ErrorBoundary that
|
|
44
|
+
// is setup to wrap the Component when rendering
|
|
45
|
+
// NOTE: This is not a prosemirror dispatch
|
|
46
|
+
|
|
47
|
+
function dispatchAnalyticsEvent(payload) {
|
|
48
|
+
pmPluginFactoryParams.eventDispatcher.emit(_consts.analyticsEventKey, {
|
|
49
|
+
payload: payload
|
|
50
|
+
});
|
|
51
|
+
} // This is called to render the Component into domRef which is inside the
|
|
52
|
+
// prosemirror View.
|
|
53
|
+
// Internally it uses the unstable_renderSubtreeIntoContainer api to render,
|
|
54
|
+
// to the passed dom element (domRef) which means it is automatically
|
|
55
|
+
// "cleaned up" when you do a "re render".
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
function renderComponent() {
|
|
59
|
+
pmPluginFactoryParams.portalProviderAPI.render(getPortalChildren({
|
|
60
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
61
|
+
currentNode: currentNode,
|
|
62
|
+
nodeViewParams: nodeViewParams,
|
|
63
|
+
Component: Component,
|
|
64
|
+
extraComponentProps: extraComponentProps
|
|
65
|
+
}), domRef, false, // node views should be rendered with intl context
|
|
66
|
+
true);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var _getPerformanceOption = (0, _getPerformanceOptions.getPerformanceOptions)(nodeViewParams.view),
|
|
70
|
+
samplingRate = _getPerformanceOption.samplingRate,
|
|
71
|
+
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
72
|
+
trackingEnabled = _getPerformanceOption.trackingEnabled;
|
|
73
|
+
|
|
74
|
+
trackingEnabled && (0, _getPerformanceOptions.startMeasureReactNodeViewRendered)({
|
|
75
|
+
nodeTypeName: currentNode.type.name
|
|
76
|
+
}); // We render the component while creating the node view
|
|
77
|
+
|
|
78
|
+
renderComponent();
|
|
79
|
+
trackingEnabled && (0, _getPerformanceOptions.stopMeasureReactNodeViewRendered)({
|
|
80
|
+
nodeTypeName: currentNode.type.name,
|
|
81
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
82
|
+
editorState: nodeViewParams.view.state,
|
|
83
|
+
samplingRate: samplingRate,
|
|
84
|
+
slowThreshold: slowThreshold
|
|
85
|
+
}); // https://prosemirror.net/docs/ref/#view.NodeView
|
|
86
|
+
|
|
87
|
+
var nodeView = {
|
|
88
|
+
get dom() {
|
|
89
|
+
return domRef;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
update: function update(nextNode, _decorations) {
|
|
93
|
+
// Let ProseMirror handle the update if node types are different.
|
|
94
|
+
// This prevents an issue where it was not possible to select the
|
|
95
|
+
// inline node view then replace it by entering text - the node
|
|
96
|
+
// view contents would be deleted but the node view itself would
|
|
97
|
+
// stay in the view and become uneditable.
|
|
98
|
+
if (currentNode.type !== nextNode.type) {
|
|
99
|
+
return false;
|
|
100
|
+
} // On updates, we only set the new attributes if the type, attributes, and marks
|
|
101
|
+
// have changed on the node.
|
|
102
|
+
// NOTE: this could mean attrs changes aren't reflected in the dom,
|
|
103
|
+
// when an attribute key which was previously present is no longer
|
|
104
|
+
// present.
|
|
105
|
+
// ie.
|
|
106
|
+
// -> Original attributes { text: "hello world", color: "red" }
|
|
107
|
+
// -> Updated attributes { color: "blue" }
|
|
108
|
+
// in this case, the dom text attribute will not be cleared.
|
|
109
|
+
//
|
|
110
|
+
// This may not be an issue with any of our current node schemas.
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
if (!currentNode.sameMarkup(nextNode)) {
|
|
114
|
+
setDomAttrs(nextNode, domRef);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
currentNode = nextNode;
|
|
118
|
+
renderComponent();
|
|
119
|
+
return true;
|
|
120
|
+
},
|
|
121
|
+
destroy: function destroy() {
|
|
122
|
+
// When prosemirror destroys the node view, we need to clean up
|
|
123
|
+
// what we have previously rendered using the editor portal
|
|
124
|
+
// provider api.
|
|
125
|
+
pmPluginFactoryParams.portalProviderAPI.remove(domRef); // @ts-expect-error Expect an error as domRef is expected to be
|
|
126
|
+
// of HTMLSpanElement type however once the node view has
|
|
127
|
+
// been destroyed no other consumers should still be using it.
|
|
128
|
+
|
|
129
|
+
domRef = undefined;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
return nodeView;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Copies the attributes from a ProseMirror Node to a DOM node.
|
|
136
|
+
* @param node The Prosemirror Node from which to source the attributes
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
function setDomAttrs(node, element) {
|
|
141
|
+
Object.keys(node.attrs || {}).forEach(function (attr) {
|
|
142
|
+
element.setAttribute(attr, node.attrs[attr]);
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function getPortalChildren(_ref2) {
|
|
147
|
+
var dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
148
|
+
currentNode = _ref2.currentNode,
|
|
149
|
+
nodeViewParams = _ref2.nodeViewParams,
|
|
150
|
+
Component = _ref2.Component,
|
|
151
|
+
extraComponentProps = _ref2.extraComponentProps;
|
|
152
|
+
return function portalChildren() {
|
|
153
|
+
var _currentNode$type$nam, _currentNode$type;
|
|
154
|
+
|
|
155
|
+
// All inline nodes use `display: inline` to allow for multi-line
|
|
156
|
+
// wrapping. This does produce an issue in Chrome where it is not
|
|
157
|
+
// possible to click select the position after the node,
|
|
158
|
+
// see: https://product-fabric.atlassian.net/browse/ED-12003
|
|
159
|
+
// however this is only a problem for node views that use
|
|
160
|
+
// `display: inline-block` somewhere within the Component.
|
|
161
|
+
// Looking at the below structure, spans with className
|
|
162
|
+
// `inlineNodeViewAddZeroWidthSpace` have pseudo elements that
|
|
163
|
+
// add a zero width space which fixes the problem.
|
|
164
|
+
// Without the additional zero width space before the Component,
|
|
165
|
+
// it is not possible to use the keyboard to range select in Safari.
|
|
166
|
+
//
|
|
167
|
+
// Zero width spaces on either side of the Component also prevent
|
|
168
|
+
// the cursor from appearing inside the node view on all browsers.
|
|
169
|
+
//
|
|
170
|
+
// Note:
|
|
171
|
+
// In future it is worth considering prohibiting the use of `display: inline-block`
|
|
172
|
+
// within inline node view Components however would require a sizable
|
|
173
|
+
// refactor. A test suite to catch any instances of this is ideal however
|
|
174
|
+
// the refactor required is currently out of scope for https://product-fabric.atlassian.net/browse/ED-14176
|
|
175
|
+
return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
|
|
176
|
+
component: _analytics.ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
177
|
+
componentId: (_currentNode$type$nam = currentNode === null || currentNode === void 0 ? void 0 : (_currentNode$type = currentNode.type) === null || _currentNode$type === void 0 ? void 0 : _currentNode$type.name) !== null && _currentNode$type$nam !== void 0 ? _currentNode$type$nam : _analytics.ACTION_SUBJECT_ID.UNKNOWN_NODE,
|
|
178
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
179
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
180
|
+
className: "inlineNodeViewAddZeroWidthSpace"
|
|
181
|
+
}), _utils.ZERO_WIDTH_SPACE, /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
|
|
182
|
+
view: nodeViewParams.view,
|
|
183
|
+
getPos: nodeViewParams.getPos,
|
|
184
|
+
node: currentNode
|
|
185
|
+
}, extraComponentProps)), /*#__PURE__*/_react.default.createElement("span", {
|
|
186
|
+
className: "inlineNodeViewAddZeroWidthSpace"
|
|
187
|
+
}));
|
|
188
|
+
};
|
|
189
|
+
} // https://prosemirror.net/docs/ref/#view.EditorProps.nodeViews
|
|
190
|
+
// The prosemirror EditorProps has a nodeViews key which has the rough shape:
|
|
191
|
+
// type nodeViews: {
|
|
192
|
+
// [nodeViewName: string]: (node, editorView, getPos, decorations, innerDecorations) => NodeView
|
|
193
|
+
// }
|
|
194
|
+
// So the value of the keys on the nodeViews object, are a function which should return a NodeView.
|
|
195
|
+
// The following type NodeViewProducer, refers to these functions which return a NodeView.
|
|
196
|
+
//
|
|
197
|
+
// So the above type could also be described as
|
|
198
|
+
// type NodeViewProducer = (node, editorView, getPos, decorations, innerDecorations) => NodeView
|
|
199
|
+
// nodeViews: {
|
|
200
|
+
// [nodeViewName: string]: NodeViewProducer
|
|
201
|
+
// }
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
// This return of this function is intended to be the value of a key
|
|
205
|
+
// in a ProseMirror nodeViews object.
|
|
206
|
+
function getInlineNodeViewProducer(_ref3) {
|
|
207
|
+
var pmPluginFactoryParams = _ref3.pmPluginFactoryParams,
|
|
208
|
+
Component = _ref3.Component,
|
|
209
|
+
extraComponentProps = _ref3.extraComponentProps;
|
|
210
|
+
|
|
211
|
+
function nodeViewProducer() {
|
|
212
|
+
var nodeView = createNodeView({
|
|
213
|
+
nodeViewParams: {
|
|
214
|
+
node: arguments.length <= 0 ? undefined : arguments[0],
|
|
215
|
+
view: arguments.length <= 1 ? undefined : arguments[1],
|
|
216
|
+
getPos: arguments.length <= 2 ? undefined : arguments[2],
|
|
217
|
+
decorations: arguments.length <= 3 ? undefined : arguments[3]
|
|
218
|
+
},
|
|
219
|
+
pmPluginFactoryParams: pmPluginFactoryParams,
|
|
220
|
+
Component: Component,
|
|
221
|
+
extraComponentProps: extraComponentProps
|
|
222
|
+
});
|
|
223
|
+
return nodeView;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return nodeViewProducer;
|
|
227
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.InlineNodeViewSharedStyles = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
|
+
|
|
14
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
// For reasoning behind styles, see comments in:
|
|
19
|
+
// ./getInlineNodeViewProducer -> portalChildren()
|
|
20
|
+
var InlineNodeViewSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .inlineNodeViewOuterContainer {\n display: inline;\n }\n\n .inlineNodeViewAddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), _utils.ZERO_WIDTH_SPACE);
|
|
21
|
+
exports.InlineNodeViewSharedStyles = InlineNodeViewSharedStyles;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getPerformanceOptions = getPerformanceOptions;
|
|
7
|
+
exports.nodeViewRenderedEventsCounter = void 0;
|
|
8
|
+
exports.startMeasureReactNodeViewRendered = startMeasureReactNodeViewRendered;
|
|
9
|
+
exports.stopMeasureReactNodeViewRendered = stopMeasureReactNodeViewRendered;
|
|
10
|
+
|
|
11
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
|
+
|
|
13
|
+
var _getParticipantsCount = require("../plugins/collab-edit/get-participants-count");
|
|
14
|
+
|
|
15
|
+
var _pluginKey = require("../plugins/analytics/plugin-key");
|
|
16
|
+
|
|
17
|
+
var _analytics = require("../plugins/analytics");
|
|
18
|
+
|
|
19
|
+
// This was existing logic when converting from ReactNodeView
|
|
20
|
+
// our current sampling for this event is not bound by node.type
|
|
21
|
+
var nodeViewRenderedEventsCounter = 0;
|
|
22
|
+
exports.nodeViewRenderedEventsCounter = nodeViewRenderedEventsCounter;
|
|
23
|
+
var DEFAULT_SAMPLING_RATE = 100;
|
|
24
|
+
var DEFAULT_SLOW_THRESHOLD = 7;
|
|
25
|
+
|
|
26
|
+
function getPerformanceOptions(view) {
|
|
27
|
+
var pluginState = _pluginKey.analyticsPluginKey.getState(view.state);
|
|
28
|
+
|
|
29
|
+
var nodeViewTracking = pluginState && pluginState.performanceTracking ? pluginState.performanceTracking.nodeViewTracking || {} : {};
|
|
30
|
+
var samplingRate = nodeViewTracking.samplingRate || DEFAULT_SAMPLING_RATE;
|
|
31
|
+
var slowThreshold = nodeViewTracking.slowThreshold || DEFAULT_SLOW_THRESHOLD;
|
|
32
|
+
return {
|
|
33
|
+
trackingEnabled: !!nodeViewTracking.enabled,
|
|
34
|
+
samplingRate: samplingRate,
|
|
35
|
+
slowThreshold: slowThreshold
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function startMeasureReactNodeViewRendered(_ref) {
|
|
40
|
+
var nodeTypeName = _ref.nodeTypeName;
|
|
41
|
+
(0, _utils.startMeasure)("\uD83E\uDD89".concat(nodeTypeName, "::ReactNodeView"));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function stopMeasureReactNodeViewRendered(_ref2) {
|
|
45
|
+
var nodeTypeName = _ref2.nodeTypeName,
|
|
46
|
+
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
47
|
+
editorState = _ref2.editorState,
|
|
48
|
+
samplingRate = _ref2.samplingRate,
|
|
49
|
+
slowThreshold = _ref2.slowThreshold;
|
|
50
|
+
(0, _utils.stopMeasure)("\uD83E\uDD89".concat(nodeTypeName, "::ReactNodeView"), function (duration) {
|
|
51
|
+
if ((exports.nodeViewRenderedEventsCounter = nodeViewRenderedEventsCounter = +nodeViewRenderedEventsCounter + 1) % samplingRate === 0 && duration > slowThreshold) {
|
|
52
|
+
dispatchAnalyticsEvent({
|
|
53
|
+
action: _analytics.ACTION.REACT_NODEVIEW_RENDERED,
|
|
54
|
+
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
55
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
56
|
+
attributes: {
|
|
57
|
+
node: nodeTypeName,
|
|
58
|
+
duration: duration,
|
|
59
|
+
participants: (0, _getParticipantsCount.getParticipantsCount)(editorState)
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
@@ -23,6 +23,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
23
23
|
|
|
24
24
|
var _react = _interopRequireDefault(require("react"));
|
|
25
25
|
|
|
26
|
+
var _react2 = require("@emotion/react");
|
|
27
|
+
|
|
26
28
|
var _reactIntlNext = require("react-intl-next");
|
|
27
29
|
|
|
28
30
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
|
|
@@ -103,7 +105,9 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
103
105
|
disabled = _this$props.disabled,
|
|
104
106
|
intl = _this$props.intl;
|
|
105
107
|
var title = intl.formatMessage(_messages.messages.alignment);
|
|
106
|
-
return
|
|
108
|
+
return (0, _react2.jsx)("span", {
|
|
109
|
+
css: _styles.wrapper
|
|
110
|
+
}, (0, _react2.jsx)(_Dropdown.default, {
|
|
107
111
|
mountTo: popupsMountPoint,
|
|
108
112
|
boundariesElement: popupsBoundariesElement,
|
|
109
113
|
scrollableElement: popupsScrollableElement,
|
|
@@ -112,7 +116,7 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
112
116
|
handleEscapeKeydown: this.hide,
|
|
113
117
|
fitWidth: 112,
|
|
114
118
|
fitHeight: 80,
|
|
115
|
-
trigger:
|
|
119
|
+
trigger: (0, _react2.jsx)(_ToolbarButton.default, {
|
|
116
120
|
spacing: isReducedSpacing ? 'none' : 'default',
|
|
117
121
|
disabled: disabled,
|
|
118
122
|
selected: isOpen,
|
|
@@ -122,18 +126,24 @@ var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
122
126
|
"aria-expanded": isOpen,
|
|
123
127
|
"aria-haspopup": true,
|
|
124
128
|
onClick: this.toggleOpen,
|
|
125
|
-
iconBefore:
|
|
129
|
+
iconBefore: (0, _react2.jsx)("div", {
|
|
130
|
+
css: _styles.triggerWrapper
|
|
131
|
+
}, (0, _react2.jsx)(_iconMap.IconMap, {
|
|
126
132
|
alignment: pluginState.align
|
|
127
|
-
}),
|
|
133
|
+
}), (0, _react2.jsx)("span", {
|
|
134
|
+
css: _styles.expandIconWrapper
|
|
135
|
+
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
128
136
|
label: ""
|
|
129
137
|
})))
|
|
130
138
|
})
|
|
131
|
-
},
|
|
139
|
+
}, (0, _react2.jsx)(_Alignment.default, {
|
|
132
140
|
onClick: function onClick(align) {
|
|
133
141
|
return _this2.changeAlignment(align);
|
|
134
142
|
},
|
|
135
143
|
selectedAlignment: pluginState.align
|
|
136
|
-
})),
|
|
144
|
+
})), (0, _react2.jsx)("span", {
|
|
145
|
+
css: _styles.separator
|
|
146
|
+
}));
|
|
137
147
|
}
|
|
138
148
|
}]);
|
|
139
149
|
return AlignmentToolbar;
|
|
@@ -5,28 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.wrapper = exports.triggerWrapper = exports.separator = exports.expandIconWrapper = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var Wrapper = _styledComponents.default.span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n div {\n display: flex;\n }\n"])));
|
|
27
|
-
|
|
28
|
-
exports.Wrapper = Wrapper;
|
|
29
|
-
|
|
30
|
-
var ExpandIconWrapper = _styledComponents.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: -8px;\n"])));
|
|
31
|
-
|
|
32
|
-
exports.ExpandIconWrapper = ExpandIconWrapper;
|
|
18
|
+
var triggerWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n"])));
|
|
19
|
+
exports.triggerWrapper = triggerWrapper;
|
|
20
|
+
var separator = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), _colors.N30);
|
|
21
|
+
exports.separator = separator;
|
|
22
|
+
var wrapper = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n div {\n display: flex;\n }\n"])));
|
|
23
|
+
exports.wrapper = wrapper;
|
|
24
|
+
var expandIconWrapper = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: -8px;\n"])));
|
|
25
|
+
exports.expandIconWrapper = expandIconWrapper;
|
|
@@ -51,6 +51,7 @@ exports.ACTION = ACTION;
|
|
|
51
51
|
ACTION["RE_RENDERED"] = "reRendered";
|
|
52
52
|
ACTION["ENTERED"] = "entered";
|
|
53
53
|
ACTION["ERRORED"] = "errored";
|
|
54
|
+
ACTION["EXPOSED"] = "exposed";
|
|
54
55
|
ACTION["FAILED_TO_UNMOUNT"] = "failedToUnmount";
|
|
55
56
|
ACTION["FIND_NEXT_PERFORMED"] = "findNextPerformed";
|
|
56
57
|
ACTION["FIND_PERFORMED"] = "findPerformed";
|
|
@@ -169,6 +170,7 @@ exports.ACTION_SUBJECT = ACTION_SUBJECT;
|
|
|
169
170
|
ACTION_SUBJECT["EMBEDS"] = "embeds";
|
|
170
171
|
ACTION_SUBJECT["EXPAND"] = "expand";
|
|
171
172
|
ACTION_SUBJECT["EXTENSION"] = "extension";
|
|
173
|
+
ACTION_SUBJECT["FEATURE"] = "feature";
|
|
172
174
|
ACTION_SUBJECT["FEEDBACK_DIALOG"] = "feedbackDialog";
|
|
173
175
|
ACTION_SUBJECT["FIND_REPLACE_DIALOG"] = "findReplaceDialog";
|
|
174
176
|
ACTION_SUBJECT["FLOATING_CONTEXTUAL_BUTTON"] = "floatingContextualButton";
|
|
@@ -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
|
});
|
|
@@ -11,11 +9,11 @@ exports.default = void 0;
|
|
|
11
9
|
|
|
12
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
11
|
|
|
14
|
-
var _react =
|
|
12
|
+
var _react = require("react");
|
|
15
13
|
|
|
16
|
-
var
|
|
14
|
+
var _react2 = require("@emotion/react");
|
|
17
15
|
|
|
18
|
-
var
|
|
16
|
+
var _avatarsWithPluginState = _interopRequireDefault(require("../../collab-edit/ui/avatars-with-plugin-state"));
|
|
19
17
|
|
|
20
18
|
var _reactIntlNext = require("react-intl-next");
|
|
21
19
|
|
|
@@ -23,15 +21,10 @@ var _messages = require("../messages");
|
|
|
23
21
|
|
|
24
22
|
var _analytics = require("../../analytics");
|
|
25
23
|
|
|
26
|
-
var _templateObject;
|
|
24
|
+
var _templateObject, _templateObject2;
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
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; }
|
|
31
|
-
|
|
32
|
-
var ToolbarButtonWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-grow: ", ";\n justify-content: flex-end;\n align-items: center;\n & > div {\n margin-right: 0;\n }\n"])), function (props) {
|
|
33
|
-
return props.takeFullWidth ? 1 : 0;
|
|
34
|
-
});
|
|
26
|
+
var toolbarButtonWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-end;\n flex-grow: 0;\n align-items: center;\n & > div {\n margin-right: 0;\n }\n"])));
|
|
27
|
+
var toolbarButtonWrapperFullWidth = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n flex-grow: 1;\n"])), toolbarButtonWrapper);
|
|
35
28
|
|
|
36
29
|
var AvatarGroupPluginWrapper = function AvatarGroupPluginWrapper(props) {
|
|
37
30
|
var dispatchAnalyticsEvent = props.dispatchAnalyticsEvent;
|
|
@@ -48,11 +41,11 @@ var AvatarGroupPluginWrapper = function AvatarGroupPluginWrapper(props) {
|
|
|
48
41
|
eventType: _analytics.EVENT_TYPE.UI
|
|
49
42
|
});
|
|
50
43
|
}, [dispatchAnalyticsEvent]);
|
|
51
|
-
return
|
|
44
|
+
return (0, _react2.jsx)("div", {
|
|
52
45
|
"aria-label": intl.formatMessage(_messages.avatarGroupMessages.editors),
|
|
53
46
|
"data-testid": 'avatar-group-in-plugin',
|
|
54
|
-
|
|
55
|
-
},
|
|
47
|
+
css: props.takeFullWidth ? toolbarButtonWrapperFullWidth : toolbarButtonWrapper
|
|
48
|
+
}, (0, _react2.jsx)(_avatarsWithPluginState.default, {
|
|
56
49
|
editorView: props.editorView,
|
|
57
50
|
eventDispatcher: props.eventDispatcher,
|
|
58
51
|
inviteToEditComponent: props.collabEdit && props.collabEdit.inviteToEditComponent,
|
|
@@ -61,12 +61,31 @@ var basePlugin = function basePlugin(options) {
|
|
|
61
61
|
var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
|
|
62
62
|
return (0, _filterSteps.default)(dispatchAnalyticsEvent);
|
|
63
63
|
}
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
}]; // In Chrome, when the selection is placed between adjacent nodes which are not contenteditatble
|
|
65
|
+
// the cursor appears at the right most point of the parent container.
|
|
66
|
+
// In Firefox, when the selection is placed between adjacent nodes which are not contenteditatble
|
|
67
|
+
// no cursor is presented to users.
|
|
68
|
+
// In Safari, when the selection is placed between adjacent nodes which are not contenteditatble
|
|
69
|
+
// the cursor appears inside the adjacent nodes.
|
|
70
|
+
// This plugin workarounds the issues with chrome and firefox by inserting decorations between
|
|
71
|
+
// inline nodes which are set as contenteditable, and have a zero width space.
|
|
72
|
+
// At time of development, using this workaround in Safari caused additional issues;
|
|
73
|
+
// - visual artifacts when moving across inline nodes (ie. using the arrow key to traverse a
|
|
74
|
+
// series of inline nodes)
|
|
75
|
+
// - blocking the right arrow key when at the start of a line from moving to the end of the
|
|
76
|
+
// previous line.
|
|
77
|
+
// As such we only apply the workaround for firefox and chrome.
|
|
78
|
+
|
|
79
|
+
if (_utils.browser.chrome || _utils.browser.gecko) {
|
|
80
|
+
plugins.push({
|
|
81
|
+
name: 'inlineCursorTargetPlugin',
|
|
82
|
+
plugin: function plugin() {
|
|
83
|
+
return options && options.allowInlineCursorTarget ? (0, _inlineCursorTarget.default)() : undefined;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
plugins.push({
|
|
70
89
|
name: 'focusHandlerPlugin',
|
|
71
90
|
plugin: function plugin(_ref2) {
|
|
72
91
|
var dispatch = _ref2.dispatch;
|
|
@@ -125,7 +144,7 @@ var basePlugin = function basePlugin(options) {
|
|
|
125
144
|
providerFactory = _ref5.providerFactory;
|
|
126
145
|
return (0, _betterTypeHistory.default)();
|
|
127
146
|
}
|
|
128
|
-
}
|
|
147
|
+
});
|
|
129
148
|
|
|
130
149
|
if (options && options.allowScrollGutter) {
|
|
131
150
|
plugins.push({
|