@atlaskit/editor-core 180.0.0 → 181.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 +117 -0
- package/codemods/180.1.0-update-to-editor-migration-component.ts +8 -0
- package/codemods/__tests__/rename-editor-to-editor-migration-component.ts +156 -0
- package/codemods/migrates/rename-editor-to-editor-migration-component.ts +34 -0
- package/dist/cjs/actions/index.js +26 -11
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +9 -764
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +753 -0
- package/dist/cjs/create-editor/ReactEditorViewNext.js +16 -0
- package/dist/cjs/create-editor/create-plugins-list.js +31 -3
- package/dist/cjs/create-editor/feature-flags-from-props.js +3 -2
- package/dist/cjs/create-editor/preset-utils.js +27 -0
- package/dist/cjs/editor-next/editor-internal.js +147 -0
- package/dist/cjs/editor-next/editor-migration-component.js +51 -0
- package/dist/cjs/editor-next/hooks/useEditorMeasuresConstructor.js +36 -0
- package/dist/cjs/editor-next/hooks/useMeasureEditorMountTime.js +42 -0
- package/dist/cjs/editor-next/hooks/useProviderFactory.js +73 -0
- package/dist/cjs/editor-next/index.js +143 -0
- package/dist/cjs/editor-next/utils/deprecationWarnings.js +45 -0
- package/dist/cjs/editor-next/utils/editorMeasureTTICallback.js +44 -0
- package/dist/cjs/editor-next/utils/editorPropTypes.js +36 -0
- package/dist/cjs/editor-next/utils/getBaseFontSize.js +17 -0
- package/dist/cjs/editor-next/utils/getProvidersFromEditorProps.js +41 -0
- package/dist/cjs/editor-next/utils/handleProviders.js +51 -0
- package/dist/cjs/editor-next/utils/onEditorCreated.js +28 -0
- package/dist/cjs/editor-next/utils/sendDurationAnalytics.js +68 -0
- package/dist/cjs/editor-next/utils/trackEditorActions.js +101 -0
- package/dist/cjs/editor.js +139 -445
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/keymaps/consts.js +1 -16
- package/dist/cjs/labs/next/internal/hooks/use-analytics/index.js +4 -4
- package/dist/cjs/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +6 -6
- package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +117 -0
- package/dist/cjs/labs/next/presets/cxhtml.js +56 -55
- package/dist/cjs/labs/next/presets/default.js +15 -42
- package/dist/cjs/labs/next/presets/mobile.js +76 -89
- package/dist/cjs/labs/next/presets/universal.js +337 -255
- package/dist/cjs/labs/next/presets/useUniversalPreset.js +36 -0
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +48 -13
- package/dist/cjs/plugins/analytics/index.js +2 -3
- package/dist/cjs/plugins/analytics/plugin.js +11 -6
- package/dist/cjs/plugins/analytics/utils.js +0 -11
- package/dist/cjs/plugins/annotation/utils.js +2 -36
- package/dist/cjs/plugins/base/pm-plugins/filter-steps.js +1 -1
- package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +98 -56
- package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +2 -7
- package/dist/cjs/plugins/base/utils/input-latency-tracking.js +24 -25
- package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +0 -10
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +36 -9
- package/dist/cjs/plugins/caption/index.js +0 -7
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +9 -3
- package/dist/cjs/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/cjs/plugins/card/pm-plugins/main.js +10 -5
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/cjs/plugins/clipboard/pm-plugins/main.js +4 -1
- package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +2 -14
- package/dist/cjs/plugins/collab-edit/plugin.js +2 -3
- package/dist/cjs/plugins/collab-edit/provider/index.js +1 -8
- package/dist/cjs/plugins/collab-edit/provider/types.js +1 -12
- package/dist/cjs/plugins/context-panel/index.js +1 -6
- package/dist/cjs/plugins/data-consumer/index.js +0 -8
- package/dist/cjs/plugins/date/utils/internal.js +0 -4
- package/dist/cjs/plugins/extension/commands.js +1 -8
- package/dist/cjs/plugins/extension/toolbar.js +7 -1
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/cjs/plugins/feedback-dialog/index.js +1 -4
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Button.js +9 -3
- package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +48 -14
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +24 -21
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +32 -5
- package/dist/cjs/plugins/floating-toolbar/utils.js +0 -12
- package/dist/cjs/plugins/fragment/index.js +0 -8
- package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- package/dist/cjs/plugins/help-dialog/commands.js +2 -6
- package/dist/cjs/plugins/hyperlink/analytics.js +5 -5
- package/dist/cjs/plugins/hyperlink/index.js +1 -1
- package/dist/cjs/plugins/hyperlink/pm-plugins/main.js +9 -5
- package/dist/cjs/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -4
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +4 -3
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +50 -12
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -0
- package/dist/cjs/plugins/layout/styles.js +10 -1
- package/dist/cjs/plugins/list/utils/find.js +0 -28
- package/dist/cjs/plugins/list/utils/indentation.js +1 -25
- package/dist/cjs/plugins/list/utils/node.js +0 -5
- package/dist/cjs/plugins/list/utils/selection.js +2 -15
- package/dist/cjs/plugins/media/commands/helpers.js +12 -40
- package/dist/cjs/plugins/media/commands/index.js +4 -4
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +14 -12
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +310 -205
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/main.js +2 -27
- package/dist/cjs/plugins/media/toolbar/filePreviewItem.js +1 -4
- package/dist/cjs/plugins/media/utils/media-common.js +1 -20
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +100 -16
- package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
- package/dist/cjs/plugins/mobile-dimensions/index.js +1 -4
- package/dist/cjs/plugins/panel/utils.js +4 -1
- package/dist/cjs/plugins/paste/handlers.js +128 -13
- package/dist/cjs/plugins/paste/index.js +1 -2
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +133 -88
- package/dist/cjs/plugins/paste/pm-plugins/main.js +12 -3
- package/dist/cjs/plugins/paste/util/index.js +0 -46
- package/dist/cjs/plugins/placeholder-text/index.js +2 -2
- package/dist/cjs/plugins/quick-insert/assets/index.js +1 -27
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +49 -44
- package/dist/cjs/plugins/status/index.js +9 -3
- package/dist/cjs/plugins/status/ui/statusPicker.js +8 -2
- package/dist/cjs/plugins/status/utils.js +1 -15
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -1
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +48 -12
- package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +22 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +3 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
- package/dist/cjs/plugins/text-formatting/utils.js +1 -35
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +19 -1
- package/dist/cjs/plugins/type-ahead/constants.js +1 -7
- package/dist/cjs/plugins/type-ahead/index.js +1 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +2 -35
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +79 -106
- package/dist/cjs/plugins/type-ahead/utils.js +3 -22
- package/dist/cjs/test-utils.js +4 -12
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +43 -8
- package/dist/cjs/ui/ChromeCollapsed/index.js +1 -0
- package/dist/cjs/ui/CollapsedEditor/index.js +7 -13
- package/dist/cjs/ui/ColorPalette/index.js +18 -0
- package/dist/cjs/ui/ColorPickerButton/index.js +73 -7
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/cjs/ui/ConfigPanel/utils.js +4 -17
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/ContextPanel/context.js +13 -12
- package/dist/cjs/ui/Dropdown/index.js +7 -2
- package/dist/cjs/ui/DropdownMenu/index.js +7 -2
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +1 -1
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
- package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +1 -3
- package/dist/cjs/ui/PanelTextInput/index.js +4 -4
- package/dist/cjs/ui/PortalProvider/index.js +5 -5
- package/dist/cjs/ui/Resizer/utils.js +1 -3
- package/dist/cjs/ui/WidthEmitter/index.js +29 -35
- package/dist/cjs/ui/styles.js +3 -7
- package/dist/cjs/utils/document.js +15 -0
- package/dist/cjs/utils/extensions.js +6 -7
- package/dist/cjs/utils/get-editor-plugins.js +30 -0
- package/dist/cjs/utils/index.js +9 -269
- package/dist/cjs/utils/input-rules.js +1 -15
- package/dist/cjs/utils/linking-utils.js +1 -1
- package/dist/cjs/utils/performance/components/RenderTracking.js +1 -1
- package/dist/cjs/utils/performance/safer-transactions.js +1 -1
- package/dist/cjs/utils/prepare-extension-provider.js +25 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +24 -10
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +3 -710
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +697 -0
- package/dist/es2019/create-editor/ReactEditorViewNext.js +7 -0
- package/dist/es2019/create-editor/create-plugins-list.js +26 -3
- package/dist/es2019/create-editor/feature-flags-from-props.js +3 -2
- package/dist/es2019/create-editor/preset-utils.js +15 -0
- package/dist/es2019/editor-next/editor-internal.js +142 -0
- package/dist/es2019/editor-next/editor-migration-component.js +27 -0
- package/dist/es2019/editor-next/hooks/useEditorMeasuresConstructor.js +30 -0
- package/dist/es2019/editor-next/hooks/useMeasureEditorMountTime.js +35 -0
- package/dist/es2019/editor-next/hooks/useProviderFactory.js +62 -0
- package/dist/es2019/editor-next/index.js +96 -0
- package/dist/es2019/editor-next/utils/deprecationWarnings.js +39 -0
- package/dist/es2019/editor-next/utils/editorMeasureTTICallback.js +40 -0
- package/dist/es2019/editor-next/utils/editorPropTypes.js +29 -0
- package/dist/es2019/editor-next/utils/getBaseFontSize.js +11 -0
- package/dist/es2019/editor-next/utils/getProvidersFromEditorProps.js +36 -0
- package/dist/es2019/editor-next/utils/handleProviders.js +46 -0
- package/dist/es2019/editor-next/utils/onEditorCreated.js +21 -0
- package/dist/es2019/editor-next/utils/sendDurationAnalytics.js +40 -0
- package/dist/es2019/editor-next/utils/trackEditorActions.js +78 -0
- package/dist/es2019/editor.js +122 -398
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/keymaps/consts.js +7 -11
- package/dist/es2019/labs/next/internal/hooks/use-analytics/index.js +2 -2
- package/dist/es2019/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +2 -3
- package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +105 -0
- package/dist/es2019/labs/next/presets/cxhtml.js +56 -53
- package/dist/es2019/labs/next/presets/default.js +18 -38
- package/dist/es2019/labs/next/presets/mobile.js +88 -88
- package/dist/es2019/labs/next/presets/universal.js +347 -263
- package/dist/es2019/labs/next/presets/useUniversalPreset.js +25 -0
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +41 -12
- package/dist/es2019/plugins/analytics/index.js +3 -4
- package/dist/es2019/plugins/analytics/plugin.js +8 -2
- package/dist/es2019/plugins/analytics/utils.js +0 -4
- package/dist/es2019/plugins/annotation/utils.js +2 -30
- package/dist/es2019/plugins/base/pm-plugins/filter-steps.js +1 -1
- package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +96 -58
- package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +1 -3
- package/dist/es2019/plugins/base/utils/input-latency-tracking.js +23 -23
- package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +31 -5
- package/dist/es2019/plugins/caption/index.js +0 -2
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +10 -3
- package/dist/es2019/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/es2019/plugins/card/pm-plugins/main.js +9 -4
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/es2019/plugins/clipboard/pm-plugins/main.js +3 -1
- package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +1 -9
- package/dist/es2019/plugins/collab-edit/plugin.js +1 -2
- package/dist/es2019/plugins/collab-edit/provider/index.js +1 -1
- package/dist/es2019/plugins/collab-edit/provider/types.js +1 -10
- package/dist/es2019/plugins/context-panel/index.js +0 -3
- package/dist/es2019/plugins/data-consumer/index.js +0 -7
- package/dist/es2019/plugins/date/utils/internal.js +0 -3
- package/dist/es2019/plugins/extension/commands.js +0 -6
- package/dist/es2019/plugins/extension/toolbar.js +7 -1
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +12 -2
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +3 -0
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/es2019/plugins/feedback-dialog/index.js +0 -2
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Button.js +9 -3
- package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +45 -12
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -11
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +29 -1
- package/dist/es2019/plugins/floating-toolbar/utils.js +0 -10
- package/dist/es2019/plugins/fragment/index.js +0 -7
- package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- package/dist/es2019/plugins/help-dialog/commands.js +1 -2
- package/dist/es2019/plugins/hyperlink/analytics.js +1 -1
- package/dist/es2019/plugins/hyperlink/index.js +1 -1
- package/dist/es2019/plugins/hyperlink/pm-plugins/main.js +8 -4
- package/dist/es2019/plugins/hyperlink/ui/EditorLinkPicker/index.js +9 -3
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -2
- package/dist/es2019/plugins/image-upload/pm-plugins/main.js +47 -5
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +24 -0
- package/dist/es2019/plugins/layout/styles.js +12 -4
- package/dist/es2019/plugins/list/utils/find.js +0 -27
- package/dist/es2019/plugins/list/utils/indentation.js +0 -23
- package/dist/es2019/plugins/list/utils/node.js +1 -4
- package/dist/es2019/plugins/list/utils/selection.js +2 -15
- package/dist/es2019/plugins/media/commands/helpers.js +9 -35
- package/dist/es2019/plugins/media/commands/index.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +3 -3
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +70 -37
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +3 -30
- package/dist/es2019/plugins/media/toolbar/filePreviewItem.js +1 -4
- package/dist/es2019/plugins/media/utils/media-common.js +1 -19
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +64 -16
- package/dist/es2019/plugins/mentions/type-ahead/index.js +1 -14
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/es2019/plugins/mobile-dimensions/index.js +0 -3
- package/dist/es2019/plugins/panel/utils.js +4 -1
- package/dist/es2019/plugins/paste/handlers.js +127 -5
- package/dist/es2019/plugins/paste/index.js +1 -2
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +131 -93
- package/dist/es2019/plugins/paste/pm-plugins/main.js +13 -4
- package/dist/es2019/plugins/paste/util/index.js +5 -45
- package/dist/es2019/plugins/placeholder-text/index.js +1 -1
- package/dist/es2019/plugins/quick-insert/assets/index.js +0 -8
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +56 -56
- package/dist/es2019/plugins/status/index.js +8 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +8 -2
- package/dist/es2019/plugins/status/utils.js +1 -11
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +48 -12
- package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +20 -3
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +4 -2
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
- package/dist/es2019/plugins/text-formatting/utils.js +0 -27
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +16 -1
- package/dist/es2019/plugins/type-ahead/constants.js +0 -5
- package/dist/es2019/plugins/type-ahead/index.js +1 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -35
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +73 -92
- package/dist/es2019/plugins/type-ahead/utils.js +0 -23
- package/dist/es2019/test-utils.js +4 -7
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -6
- package/dist/es2019/ui/ChromeCollapsed/index.js +1 -0
- package/dist/es2019/ui/CollapsedEditor/index.js +7 -11
- package/dist/es2019/ui/ColorPalette/index.js +2 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +66 -9
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/es2019/ui/ConfigPanel/utils.js +0 -6
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ContextPanel/context.js +5 -4
- package/dist/es2019/ui/Dropdown/index.js +5 -2
- package/dist/es2019/ui/DropdownMenu/index.js +5 -2
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +1 -1
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
- package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
- package/dist/es2019/ui/PanelTextInput/index.js +3 -3
- package/dist/es2019/ui/PortalProvider/index.js +1 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -1
- package/dist/es2019/ui/WidthEmitter/index.js +25 -29
- package/dist/es2019/ui/styles.js +0 -6
- package/dist/es2019/utils/document.js +11 -1
- package/dist/es2019/utils/extensions.js +1 -3
- package/dist/es2019/utils/get-editor-plugins.js +23 -0
- package/dist/es2019/utils/index.js +13 -199
- package/dist/es2019/utils/input-rules.js +0 -14
- package/dist/es2019/utils/linking-utils.js +1 -1
- package/dist/es2019/utils/performance/components/RenderTracking.js +1 -1
- package/dist/es2019/utils/performance/safer-transactions.js +1 -1
- package/dist/es2019/utils/prepare-extension-provider.js +13 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +24 -10
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +9 -765
- package/dist/esm/create-editor/ReactEditorViewInternal.js +747 -0
- package/dist/esm/create-editor/ReactEditorViewNext.js +7 -0
- package/dist/esm/create-editor/create-plugins-list.js +30 -3
- package/dist/esm/create-editor/feature-flags-from-props.js +3 -2
- package/dist/esm/create-editor/preset-utils.js +21 -0
- package/dist/esm/editor-next/editor-internal.js +141 -0
- package/dist/esm/editor-next/editor-migration-component.js +44 -0
- package/dist/esm/editor-next/hooks/useEditorMeasuresConstructor.js +30 -0
- package/dist/esm/editor-next/hooks/useMeasureEditorMountTime.js +35 -0
- package/dist/esm/editor-next/hooks/useProviderFactory.js +66 -0
- package/dist/esm/editor-next/index.js +138 -0
- package/dist/esm/editor-next/utils/deprecationWarnings.js +39 -0
- package/dist/esm/editor-next/utils/editorMeasureTTICallback.js +38 -0
- package/dist/esm/editor-next/utils/editorPropTypes.js +28 -0
- package/dist/esm/editor-next/utils/getBaseFontSize.js +11 -0
- package/dist/esm/editor-next/utils/getProvidersFromEditorProps.js +35 -0
- package/dist/esm/editor-next/utils/handleProviders.js +45 -0
- package/dist/esm/editor-next/utils/onEditorCreated.js +21 -0
- package/dist/esm/editor-next/utils/sendDurationAnalytics.js +61 -0
- package/dist/esm/editor-next/utils/trackEditorActions.js +94 -0
- package/dist/esm/editor.js +139 -442
- package/dist/esm/index.js +2 -1
- package/dist/esm/keymaps/consts.js +7 -11
- package/dist/esm/labs/next/internal/hooks/use-analytics/index.js +2 -2
- package/dist/esm/labs/next/internal/hooks/use-editor/create-dispatch-transaction.js +2 -3
- package/dist/esm/labs/next/presets/create-stub-internal-apis.js +110 -0
- package/dist/esm/labs/next/presets/cxhtml.js +56 -55
- package/dist/esm/labs/next/presets/default.js +18 -41
- package/dist/esm/labs/next/presets/mobile.js +88 -90
- package/dist/esm/labs/next/presets/universal.js +337 -255
- package/dist/esm/labs/next/presets/useUniversalPreset.js +29 -0
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +48 -13
- package/dist/esm/plugins/analytics/index.js +3 -4
- package/dist/esm/plugins/analytics/plugin.js +7 -2
- package/dist/esm/plugins/analytics/utils.js +0 -9
- package/dist/esm/plugins/annotation/utils.js +2 -32
- package/dist/esm/plugins/base/pm-plugins/filter-steps.js +1 -1
- package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +98 -56
- package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +1 -5
- package/dist/esm/plugins/base/utils/input-latency-tracking.js +24 -25
- package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/blocktype-button.js +1 -0
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +36 -9
- package/dist/esm/plugins/caption/index.js +0 -2
- package/dist/esm/plugins/card/nodeviews/blockCard.js +9 -3
- package/dist/esm/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/esm/plugins/card/pm-plugins/main.js +10 -5
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/esm/plugins/clipboard/pm-plugins/main.js +4 -1
- package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -10
- package/dist/esm/plugins/collab-edit/plugin.js +1 -2
- package/dist/esm/plugins/collab-edit/provider/index.js +1 -1
- package/dist/esm/plugins/collab-edit/provider/types.js +1 -10
- package/dist/esm/plugins/context-panel/index.js +0 -3
- package/dist/esm/plugins/data-consumer/index.js +0 -7
- package/dist/esm/plugins/date/utils/internal.js +0 -3
- package/dist/esm/plugins/extension/commands.js +0 -6
- package/dist/esm/plugins/extension/toolbar.js +7 -1
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/esm/plugins/feedback-dialog/index.js +0 -2
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/esm/plugins/floating-toolbar/ui/Button.js +9 -3
- package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +48 -14
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +24 -21
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +32 -5
- package/dist/esm/plugins/floating-toolbar/utils.js +0 -10
- package/dist/esm/plugins/fragment/index.js +0 -7
- package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- package/dist/esm/plugins/help-dialog/commands.js +0 -3
- package/dist/esm/plugins/hyperlink/analytics.js +1 -1
- package/dist/esm/plugins/hyperlink/index.js +1 -1
- package/dist/esm/plugins/hyperlink/pm-plugins/main.js +9 -5
- package/dist/esm/plugins/hyperlink/ui/EditorLinkPicker/index.js +10 -4
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +3 -2
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +51 -12
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.js +1 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.js +3 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.js +1 -0
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +22 -0
- package/dist/esm/plugins/layout/styles.js +11 -2
- package/dist/esm/plugins/list/utils/find.js +0 -27
- package/dist/esm/plugins/list/utils/indentation.js +0 -23
- package/dist/esm/plugins/list/utils/node.js +1 -4
- package/dist/esm/plugins/list/utils/selection.js +2 -12
- package/dist/esm/plugins/media/commands/helpers.js +9 -35
- package/dist/esm/plugins/media/commands/index.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +14 -12
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +311 -206
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +3 -28
- package/dist/esm/plugins/media/toolbar/filePreviewItem.js +1 -4
- package/dist/esm/plugins/media/utils/media-common.js +1 -17
- package/dist/esm/plugins/mentions/nodeviews/mention.js +97 -16
- package/dist/esm/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/esm/plugins/mobile-dimensions/index.js +0 -3
- package/dist/esm/plugins/panel/utils.js +4 -1
- package/dist/esm/plugins/paste/handlers.js +127 -13
- package/dist/esm/plugins/paste/index.js +1 -2
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +130 -86
- package/dist/esm/plugins/paste/pm-plugins/main.js +13 -4
- package/dist/esm/plugins/paste/util/index.js +5 -45
- package/dist/esm/plugins/placeholder-text/index.js +2 -2
- package/dist/esm/plugins/quick-insert/assets/index.js +0 -20
- package/dist/esm/plugins/selection/gap-cursor/actions.js +52 -45
- package/dist/esm/plugins/status/index.js +9 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +8 -2
- package/dist/esm/plugins/status/utils.js +1 -13
- package/dist/esm/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +48 -12
- package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +23 -3
- package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +4 -2
- package/dist/esm/plugins/text-formatting/ui/Toolbar/more-button.js +3 -1
- package/dist/esm/plugins/text-formatting/utils.js +0 -29
- package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +19 -1
- package/dist/esm/plugins/type-ahead/constants.js +0 -5
- package/dist/esm/plugins/type-ahead/index.js +1 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -31
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +79 -106
- package/dist/esm/plugins/type-ahead/utils.js +2 -20
- package/dist/esm/test-utils.js +4 -7
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +41 -6
- package/dist/esm/ui/ChromeCollapsed/index.js +1 -0
- package/dist/esm/ui/CollapsedEditor/index.js +7 -13
- package/dist/esm/ui/ColorPalette/index.js +2 -1
- package/dist/esm/ui/ColorPickerButton/index.js +74 -8
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +1 -1
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/esm/ui/ConfigPanel/utils.js +3 -14
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ContextPanel/context.js +8 -8
- package/dist/esm/ui/Dropdown/index.js +7 -2
- package/dist/esm/ui/DropdownMenu/index.js +7 -2
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +1 -1
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +1 -1
- package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +1 -1
- package/dist/esm/ui/ElementBrowser/constants.js +0 -1
- package/dist/esm/ui/PanelTextInput/index.js +4 -4
- package/dist/esm/ui/PortalProvider/index.js +1 -1
- package/dist/esm/ui/Resizer/utils.js +0 -1
- package/dist/esm/ui/WidthEmitter/index.js +28 -37
- package/dist/esm/ui/styles.js +2 -5
- package/dist/esm/utils/document.js +15 -1
- package/dist/esm/utils/extensions.js +1 -3
- package/dist/esm/utils/get-editor-plugins.js +23 -0
- package/dist/esm/utils/index.js +13 -196
- package/dist/esm/utils/input-rules.js +0 -13
- package/dist/esm/utils/linking-utils.js +1 -1
- package/dist/esm/utils/performance/components/RenderTracking.js +1 -1
- package/dist/esm/utils/performance/safer-transactions.js +1 -1
- package/dist/esm/utils/prepare-extension-provider.js +17 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +5 -5
- package/dist/types/create-editor/ReactEditorView.d.ts +5 -110
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +114 -0
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +8 -0
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -5
- package/dist/types/create-editor/preset-utils.d.ts +2 -0
- package/dist/types/editor-next/editor-internal.d.ts +44 -0
- package/dist/types/editor-next/editor-migration-component.d.ts +5 -0
- package/dist/types/editor-next/hooks/useEditorMeasuresConstructor.d.ts +17 -0
- package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +13 -0
- package/dist/types/editor-next/hooks/useProviderFactory.d.ts +21 -0
- package/dist/types/editor-next/index.d.ts +34 -0
- package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -0
- package/dist/types/editor-next/utils/editorMeasureTTICallback.d.ts +5 -0
- package/dist/types/editor-next/utils/editorPropTypes.d.ts +19 -0
- package/dist/types/editor-next/utils/getBaseFontSize.d.ts +6 -0
- package/dist/types/editor-next/utils/getProvidersFromEditorProps.d.ts +9 -0
- package/dist/types/editor-next/utils/handleProviders.d.ts +14 -0
- package/dist/types/editor-next/utils/onEditorCreated.d.ts +12 -0
- package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +15 -0
- package/dist/types/editor-next/utils/trackEditorActions.d.ts +29 -0
- package/dist/types/editor.d.ts +50 -25
- package/dist/types/index.d.ts +1 -0
- package/dist/types/keymaps/consts.d.ts +0 -11
- package/dist/types/labs/next/internal/hooks/use-analytics/index.d.ts +1 -1
- package/dist/types/labs/next/presets/create-stub-internal-apis.d.ts +16 -0
- package/dist/types/labs/next/presets/cxhtml.d.ts +33 -1
- package/dist/types/labs/next/presets/default.d.ts +67 -10
- package/dist/types/labs/next/presets/mobile.d.ts +33 -1
- package/dist/types/labs/next/presets/universal.d.ts +5 -13
- package/dist/types/labs/next/presets/useUniversalPreset.d.ts +7 -0
- package/dist/types/nodeviews/context-adapter.d.ts +0 -1
- package/dist/types/nodeviews/index.d.ts +0 -1
- package/dist/types/plugins/alignment/index.d.ts +1 -1
- package/dist/types/plugins/alignment/pm-plugins/types.d.ts +0 -11
- package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +3 -1
- package/dist/types/plugins/analytics/index.d.ts +3 -6
- package/dist/types/plugins/analytics/plugin.d.ts +3 -1
- package/dist/types/plugins/analytics/utils.d.ts +2 -3
- package/dist/types/plugins/annotation/index.d.ts +3 -1
- package/dist/types/plugins/annotation/utils.d.ts +0 -17
- package/dist/types/plugins/avatar-group/index.d.ts +3 -1
- package/dist/types/plugins/base/index.d.ts +3 -1
- package/dist/types/plugins/base/pm-plugins/filter-steps.d.ts +1 -1
- package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +2 -3
- package/dist/types/plugins/base/utils/input-latency-tracking.d.ts +1 -3
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +3 -1
- package/dist/types/plugins/block-type/index.d.ts +3 -1
- package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +2 -6
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/blocktype-button.d.ts +1 -0
- package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -0
- package/dist/types/plugins/breakout/index.d.ts +3 -1
- package/dist/types/plugins/caption/index.d.ts +0 -2
- package/dist/types/plugins/card/index.d.ts +3 -1
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +2 -10
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +2 -1
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/card/pm-plugins/util/state.d.ts +1 -0
- package/dist/types/plugins/card/types.d.ts +3 -0
- package/dist/types/plugins/code-bidi-warning/index.d.ts +3 -1
- package/dist/types/plugins/code-block/actions.d.ts +0 -4
- package/dist/types/plugins/code-block/index.d.ts +3 -1
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -3
- package/dist/types/plugins/collab-edit/index.d.ts +3 -1
- package/dist/types/plugins/collab-edit/provider/index.d.ts +1 -2
- package/dist/types/plugins/collab-edit/provider/types.d.ts +1 -36
- package/dist/types/plugins/context-panel/index.d.ts +3 -4
- package/dist/types/plugins/data-consumer/index.d.ts +0 -2
- package/dist/types/plugins/date/utils/internal.d.ts +0 -1
- package/dist/types/plugins/emoji/index.d.ts +3 -1
- package/dist/types/plugins/expand/index.d.ts +3 -1
- package/dist/types/plugins/extension/commands.d.ts +0 -1
- package/dist/types/plugins/extension/index.d.ts +3 -1
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +0 -5
- package/dist/types/plugins/extension/toolbar.d.ts +5 -0
- package/dist/types/plugins/feature-flags-context/index.d.ts +3 -1
- package/dist/types/plugins/feedback-dialog/index.d.ts +3 -3
- package/dist/types/plugins/find-replace/index.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +4 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +6 -2
- package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
- package/dist/types/plugins/fragment/index.d.ts +0 -2
- package/dist/types/plugins/grid/index.d.ts +3 -1
- package/dist/types/plugins/help-dialog/commands.d.ts +0 -1
- package/dist/types/plugins/help-dialog/index.d.ts +3 -1
- package/dist/types/plugins/history/actions.d.ts +1 -2
- package/dist/types/plugins/hyperlink/analytics.d.ts +1 -1
- package/dist/types/plugins/hyperlink/index.d.ts +3 -1
- package/dist/types/plugins/hyperlink/pm-plugins/main.d.ts +4 -2
- package/dist/types/plugins/hyperlink/types.d.ts +3 -1
- package/dist/types/plugins/hyperlink/ui/EditorLinkPicker/index.d.ts +3 -1
- package/dist/types/plugins/insert-block/index.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/dropdown-button.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +1 -0
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -0
- package/dist/types/plugins/layout/index.d.ts +3 -1
- package/dist/types/plugins/layout/styles.d.ts +2 -1
- package/dist/types/plugins/list/index.d.ts +3 -1
- package/dist/types/plugins/list/utils/find.d.ts +0 -1
- package/dist/types/plugins/list/utils/indentation.d.ts +0 -1
- package/dist/types/plugins/list/utils/node.d.ts +0 -2
- package/dist/types/plugins/list/utils/selection.d.ts +0 -3
- package/dist/types/plugins/max-content-size/index.d.ts +3 -1
- package/dist/types/plugins/media/commands/helpers.d.ts +5 -12
- package/dist/types/plugins/media/commands/index.d.ts +1 -1
- package/dist/types/plugins/media/index.d.ts +3 -1
- package/dist/types/plugins/media/nodeviews/__mocks__/mediaNodeUpdater.d.ts +3 -1
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +4 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -4
- package/dist/types/plugins/media/pm-plugins/types.d.ts +1 -4
- package/dist/types/plugins/media/utils/media-common.d.ts +0 -5
- package/dist/types/plugins/mentions/index.d.ts +3 -1
- package/dist/types/plugins/mentions/types.d.ts +1 -2
- package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +2 -3
- package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +0 -6
- package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -4
- package/dist/types/plugins/mobile-dimensions/index.d.ts +0 -1
- package/dist/types/plugins/panel/index.d.ts +3 -1
- package/dist/types/plugins/paste/handlers.d.ts +2 -1
- package/dist/types/plugins/paste/index.d.ts +3 -2
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +10 -4
- package/dist/types/plugins/paste/util/index.d.ts +0 -6
- package/dist/types/plugins/placeholder/index.d.ts +3 -1
- package/dist/types/plugins/placeholder-text/index.d.ts +3 -1
- package/dist/types/plugins/quick-insert/assets/index.d.ts +0 -2
- package/dist/types/plugins/quick-insert/index.d.ts +3 -1
- package/dist/types/plugins/save-on-enter/index.d.ts +3 -1
- package/dist/types/plugins/selection/index.d.ts +3 -1
- package/dist/types/plugins/status/index.d.ts +3 -1
- package/dist/types/plugins/status/ui/statusPicker.d.ts +3 -0
- package/dist/types/plugins/status/utils.d.ts +0 -3
- package/dist/types/plugins/submit-editor/index.d.ts +3 -1
- package/dist/types/plugins/tasks-and-decisions/index.d.ts +3 -1
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +0 -6
- package/dist/types/plugins/text-color/index.d.ts +3 -1
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +2 -12
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +2 -0
- package/dist/types/plugins/text-formatting/index.d.ts +3 -1
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -1
- package/dist/types/plugins/text-formatting/ui/Toolbar/more-button.d.ts +2 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +0 -5
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +3 -1
- package/dist/types/plugins/type-ahead/constants.d.ts +0 -4
- package/dist/types/plugins/type-ahead/index.d.ts +3 -1
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -10
- package/dist/types/plugins/type-ahead/utils.d.ts +1 -2
- package/dist/types/test-utils.d.ts +4 -5
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +55 -42
- package/dist/types/types/get-editor-props.d.ts +12 -0
- package/dist/types/types/performance-tracking.d.ts +10 -0
- package/dist/types/ui/Appearance/Chromeless.d.ts +0 -5
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +0 -7
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +3 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +29 -29
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -5
- package/dist/types/ui/CollapsedEditor/index.d.ts +4 -3
- package/dist/types/ui/ColorPalette/Palettes/index.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types/ui/ColorPalette/index.d.ts +2 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +5 -2
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/types.d.ts +0 -3
- package/dist/types/ui/ConfigPanel/utils.d.ts +2 -3
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ContextPanel/context.d.ts +2 -1
- package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +0 -3
- package/dist/types/ui/ElementBrowser/constants.d.ts +0 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +0 -5
- package/dist/types/ui/PanelTextInput/index.d.ts +1 -1
- package/dist/types/ui/PortalProvider/index.d.ts +1 -1
- package/dist/types/ui/Resizer/utils.d.ts +0 -1
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/document.d.ts +4 -3
- package/dist/types/utils/get-editor-plugins.d.ts +10 -0
- package/dist/types/utils/index.d.ts +6 -65
- package/dist/types/utils/input-rules.d.ts +1 -2
- package/dist/types/utils/linking-utils.d.ts +1 -1
- package/dist/types/utils/performance/components/RenderTracking.d.ts +1 -1
- package/dist/types/utils/performance/instrumented-plugin.d.ts +1 -1
- package/dist/types/utils/performance/safer-transactions.d.ts +1 -1
- package/dist/types/utils/prepare-extension-provider.d.ts +5 -0
- package/dist/types/utils/table.d.ts +0 -1
- package/docs/0-intro.tsx +0 -1
- package/package.json +37 -37
- package/report.api.md +307 -244
- package/dist/cjs/labs/next/presets/preset.js +0 -106
- package/dist/cjs/plugins/analytics/analytics-queue.js +0 -79
- package/dist/cjs/plugins/analytics/fire-analytics-event.js +0 -35
- package/dist/cjs/plugins/collab-edit/provider/channel.js +0 -313
- package/dist/cjs/plugins/collab-edit/provider/logger.js +0 -17
- package/dist/cjs/plugins/collab-edit/provider/mock-users.js +0 -19
- package/dist/cjs/plugins/data-consumer/plugin-key.js +0 -9
- package/dist/cjs/plugins/media/toolbar/toolbar-messages.js +0 -15
- package/dist/cjs/profiler/render-count.js +0 -60
- package/dist/cjs/ui/ColorPalette/Color/index.js +0 -9
- package/dist/cjs/ui/ConfigPanel/FieldDescription.js +0 -19
- package/dist/cjs/ui/WithPluginState/types.js +0 -5
- package/dist/es2019/labs/next/presets/preset.js +0 -71
- package/dist/es2019/plugins/analytics/analytics-queue.js +0 -53
- package/dist/es2019/plugins/analytics/fire-analytics-event.js +0 -26
- package/dist/es2019/plugins/collab-edit/provider/channel.js +0 -179
- package/dist/es2019/plugins/collab-edit/provider/logger.js +0 -8
- package/dist/es2019/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/es2019/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/es2019/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/es2019/profiler/render-count.js +0 -53
- package/dist/es2019/ui/ColorPalette/Color/index.js +0 -2
- package/dist/es2019/ui/ConfigPanel/FieldDescription.js +0 -12
- package/dist/esm/labs/next/presets/preset.js +0 -98
- package/dist/esm/plugins/analytics/analytics-queue.js +0 -71
- package/dist/esm/plugins/analytics/fire-analytics-event.js +0 -28
- package/dist/esm/plugins/analytics/types/type-ahead.js +0 -1
- package/dist/esm/plugins/collab-edit/provider/channel.js +0 -305
- package/dist/esm/plugins/collab-edit/provider/logger.js +0 -10
- package/dist/esm/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/esm/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/esm/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/esm/profiler/render-count.js +0 -49
- package/dist/esm/ui/ColorPalette/Color/index.js +0 -2
- package/dist/esm/ui/ConfigPanel/FieldDescription.js +0 -11
- package/dist/esm/ui/WithPluginState/types.js +0 -1
- package/dist/types/labs/next/presets/preset.d.ts +0 -46
- package/dist/types/plugins/analytics/analytics-queue.d.ts +0 -10
- package/dist/types/plugins/analytics/fire-analytics-event.d.ts +0 -9
- package/dist/types/plugins/analytics/types/type-ahead.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/channel.d.ts +0 -48
- package/dist/types/plugins/collab-edit/provider/logger.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/mock-users.d.ts +0 -6
- package/dist/types/plugins/data-consumer/plugin-key.d.ts +0 -2
- package/dist/types/plugins/media/toolbar/toolbar-messages.d.ts +0 -7
- package/dist/types/profiler/render-count.d.ts +0 -14
- package/dist/types/ui/ColorPalette/Color/index.d.ts +0 -2
- package/dist/types/ui/ConfigPanel/FieldDescription.d.ts +0 -6
- package/dist/types/ui/WithPluginState/types.d.ts +0 -10
- /package/dist/cjs/{plugins/analytics/types/type-ahead.js → types/get-editor-props.js} +0 -0
- /package/dist/es2019/{plugins/analytics/types/type-ahead.js → types/get-editor-props.js} +0 -0
- /package/dist/{es2019/ui/WithPluginState/types.js → esm/types/get-editor-props.js} +0 -0
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.InputQuery = void 0;
|
|
9
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
11
|
var _react2 = require("@emotion/react");
|
|
@@ -18,11 +17,25 @@ var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
|
18
17
|
var _AssistiveText = require("./AssistiveText");
|
|
19
18
|
var _messages = require("../messages");
|
|
20
19
|
var _reactIntlNext = require("react-intl-next");
|
|
21
|
-
var
|
|
20
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
21
|
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); }
|
|
23
22
|
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; }
|
|
24
23
|
/** @jsx jsx */
|
|
25
24
|
|
|
25
|
+
var querySpan = (0, _react2.css)({
|
|
26
|
+
outline: 'none',
|
|
27
|
+
'& input': {
|
|
28
|
+
width: '5px',
|
|
29
|
+
border: 'none',
|
|
30
|
+
background: 'transparent',
|
|
31
|
+
padding: 0,
|
|
32
|
+
margin: 0,
|
|
33
|
+
// ED-17022 Fixes firefox caret position
|
|
34
|
+
fontSize: '1em',
|
|
35
|
+
height: _editorSharedStyles.blockNodesVerticalMargin,
|
|
36
|
+
caretColor: "var(--ds-text-accent-blue, #0052CC)"
|
|
37
|
+
}
|
|
38
|
+
});
|
|
26
39
|
var isNavigationKey = function isNavigationKey(event) {
|
|
27
40
|
return ['Enter', 'Tab', 'ArrowDown', 'ArrowUp'].includes(event.key);
|
|
28
41
|
};
|
|
@@ -39,10 +52,6 @@ var isUndoRedoShortcut = function isUndoRedoShortcut(event) {
|
|
|
39
52
|
}
|
|
40
53
|
return false;
|
|
41
54
|
};
|
|
42
|
-
var isSelectAllShortcut = function isSelectAllShortcut(event) {
|
|
43
|
-
var key = (0, _w3cKeyname.keyName)(event);
|
|
44
|
-
return (event.ctrlKey || event.metaKey) && key === 'a';
|
|
45
|
-
};
|
|
46
55
|
var getAriaLabel = function getAriaLabel(triggerPrefix, intl) {
|
|
47
56
|
switch (triggerPrefix) {
|
|
48
57
|
case '@':
|
|
@@ -68,29 +77,31 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
68
77
|
onUndoRedo = _ref.onUndoRedo,
|
|
69
78
|
editorView = _ref.editorView,
|
|
70
79
|
items = _ref.items;
|
|
71
|
-
var ref = (0, _react.useRef)(document.createElement('
|
|
72
|
-
var
|
|
73
|
-
var _useState = (0, _react.useState)(
|
|
80
|
+
var ref = (0, _react.useRef)(document.createElement('span'));
|
|
81
|
+
var inputRef = (0, _react.useRef)(null);
|
|
82
|
+
var _useState = (0, _react.useState)(null),
|
|
74
83
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
setQuery(text);
|
|
84
|
+
query = _useState2[0],
|
|
85
|
+
setQuery = _useState2[1];
|
|
86
|
+
var cleanedInputContent = (0, _react.useCallback)(function () {
|
|
87
|
+
var _ref$current;
|
|
88
|
+
var raw = ((_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.textContent) || '';
|
|
89
|
+
return raw;
|
|
90
|
+
}, []);
|
|
91
|
+
var onKeyUp = (0, _react.useCallback)(function (event) {
|
|
92
|
+
var text = cleanedInputContent();
|
|
85
93
|
onQueryChange(text);
|
|
86
|
-
}, [onQueryChange]);
|
|
87
|
-
var
|
|
88
|
-
|
|
89
|
-
isInFocus =
|
|
90
|
-
setInFocus =
|
|
94
|
+
}, [onQueryChange, cleanedInputContent]);
|
|
95
|
+
var _useState3 = (0, _react.useState)(false),
|
|
96
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
97
|
+
isInFocus = _useState4[0],
|
|
98
|
+
setInFocus = _useState4[1];
|
|
91
99
|
var checkKeyEvent = (0, _react.useCallback)(function (event) {
|
|
100
|
+
var _ref$current2;
|
|
92
101
|
var key = (0, _w3cKeyname.keyName)(event);
|
|
93
|
-
var
|
|
102
|
+
var sel = document.getSelection();
|
|
103
|
+
var raw = ((_ref$current2 = ref.current) === null || _ref$current2 === void 0 ? void 0 : _ref$current2.textContent) || '';
|
|
104
|
+
var text = cleanedInputContent();
|
|
94
105
|
var stopDefault = false;
|
|
95
106
|
var _getPluginState = (0, _utils2.getPluginState)(editorView.state),
|
|
96
107
|
selectedIndex = _getPluginState.selectedIndex;
|
|
@@ -121,7 +132,7 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
121
132
|
stopDefault = true;
|
|
122
133
|
break;
|
|
123
134
|
case 'Backspace':
|
|
124
|
-
if (
|
|
135
|
+
if (raw.length === 0 || (sel === null || sel === void 0 ? void 0 : sel.anchorOffset) === 0) {
|
|
125
136
|
event.stopPropagation();
|
|
126
137
|
event.preventDefault();
|
|
127
138
|
cancel({
|
|
@@ -160,70 +171,24 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
160
171
|
}
|
|
161
172
|
break;
|
|
162
173
|
}
|
|
163
|
-
if (isSelectAllShortcut(event)) {
|
|
164
|
-
cancel({
|
|
165
|
-
forceFocusOnEditor: true,
|
|
166
|
-
addPrefixTrigger: true,
|
|
167
|
-
text: ref.current.value,
|
|
168
|
-
setSelectionAt: _constants.CloseSelectionOptions.BEFORE_TEXT_INSERTED
|
|
169
|
-
});
|
|
170
|
-
return true;
|
|
171
|
-
}
|
|
172
174
|
var undoRedoType = isUndoRedoShortcut(event);
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (!hasReopenQuery && undoRedoType === 'historyUndo' && text.length > 0) {
|
|
176
|
-
setRedoBuffer(function (buffer) {
|
|
177
|
-
return [ref.current.value].concat((0, _toConsumableArray2.default)(buffer));
|
|
178
|
-
});
|
|
179
|
-
var undoValue = text.substring(0, text.length - 1);
|
|
180
|
-
ref.current.value = undoValue;
|
|
181
|
-
sizeSpanRef.current.textContent = undoValue;
|
|
182
|
-
stopDefault = true;
|
|
183
|
-
} else if (undoRedoType === 'historyRedo' && redoBuffer.length > 0) {
|
|
184
|
-
var redoValue = redoBuffer[0];
|
|
185
|
-
ref.current.value = redoValue;
|
|
186
|
-
sizeSpanRef.current.textContent = redoValue;
|
|
187
|
-
setRedoBuffer(function (buffer) {
|
|
188
|
-
return buffer.slice(1);
|
|
189
|
-
});
|
|
190
|
-
stopDefault = true;
|
|
191
|
-
} else {
|
|
192
|
-
stopDefault = onUndoRedo(undoRedoType);
|
|
193
|
-
}
|
|
175
|
+
if (onUndoRedo && undoRedoType && onUndoRedo(undoRedoType)) {
|
|
176
|
+
stopDefault = true;
|
|
194
177
|
}
|
|
195
178
|
if (isNavigationKey(event) || stopDefault) {
|
|
196
179
|
event.stopPropagation();
|
|
197
180
|
event.preventDefault();
|
|
198
181
|
return false;
|
|
199
182
|
}
|
|
200
|
-
}, [onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, editorView.state
|
|
183
|
+
}, [onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state]);
|
|
201
184
|
var onClick = (0, _react.useCallback)(function (event) {
|
|
202
|
-
var
|
|
185
|
+
var _inputRef$current;
|
|
203
186
|
event.stopPropagation();
|
|
204
187
|
event.preventDefault();
|
|
205
188
|
onQueryFocus();
|
|
206
|
-
(
|
|
189
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
207
190
|
return false;
|
|
208
191
|
}, [onQueryFocus]);
|
|
209
|
-
var queryStyle = (0, _react2.css)({
|
|
210
|
-
'&&': {
|
|
211
|
-
outline: 'none',
|
|
212
|
-
position: 'absolute',
|
|
213
|
-
fontFamily: 'inherit',
|
|
214
|
-
fontSize: 'inherit',
|
|
215
|
-
fontWeight: 'inherit',
|
|
216
|
-
letterSpacing: 'inherit',
|
|
217
|
-
padding: 0,
|
|
218
|
-
height: '100%',
|
|
219
|
-
width: '100%',
|
|
220
|
-
top: 0,
|
|
221
|
-
left: 0,
|
|
222
|
-
background: 'transparent',
|
|
223
|
-
border: 'none',
|
|
224
|
-
color: "".concat("var(--ds-link, ".concat(colors.B400, ")"))
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
192
|
(0, _react.useLayoutEffect)(function () {
|
|
228
193
|
if (!ref.current) {
|
|
229
194
|
return;
|
|
@@ -235,18 +200,18 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
235
200
|
var keyDown = function keyDown(event) {
|
|
236
201
|
var key = (0, _w3cKeyname.keyName)(event);
|
|
237
202
|
if (['ArrowLeft', 'ArrowRight'].includes(key) && document.getSelection && document.getSelection()) {
|
|
238
|
-
var _ref$
|
|
239
|
-
var q = ((_ref$
|
|
240
|
-
var
|
|
241
|
-
var isMovingRight = 'ArrowRight' === key && anchorOffset === q.length;
|
|
242
|
-
var isMovingLeft = 'ArrowLeft' === key && (anchorOffset === 0 || event.metaKey);
|
|
203
|
+
var _ref$current3;
|
|
204
|
+
var q = ((_ref$current3 = ref.current) === null || _ref$current3 === void 0 ? void 0 : _ref$current3.textContent) || '';
|
|
205
|
+
var sel = document.getSelection();
|
|
206
|
+
var isMovingRight = sel && 'ArrowRight' === key && sel.anchorOffset === q.length;
|
|
207
|
+
var isMovingLeft = sel && 'ArrowLeft' === key && (sel.anchorOffset === 0 || event.metaKey);
|
|
243
208
|
if (!isMovingRight && !isMovingLeft) {
|
|
244
209
|
return;
|
|
245
210
|
}
|
|
246
211
|
cancel({
|
|
247
212
|
forceFocusOnEditor: true,
|
|
248
213
|
addPrefixTrigger: true,
|
|
249
|
-
text:
|
|
214
|
+
text: cleanedInputContent(),
|
|
250
215
|
setSelectionAt: isMovingRight ? _constants.CloseSelectionOptions.AFTER_TEXT_INSERTED : _constants.CloseSelectionOptions.BEFORE_TEXT_INSERTED
|
|
251
216
|
});
|
|
252
217
|
event.preventDefault();
|
|
@@ -277,8 +242,8 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
277
242
|
}
|
|
278
243
|
cancel({
|
|
279
244
|
addPrefixTrigger: true,
|
|
280
|
-
text:
|
|
281
|
-
setSelectionAt: _constants.CloseSelectionOptions.
|
|
245
|
+
text: cleanedInputContent(),
|
|
246
|
+
setSelectionAt: _constants.CloseSelectionOptions.BEFORE_TEXT_INSERTED,
|
|
282
247
|
forceFocusOnEditor: false
|
|
283
248
|
});
|
|
284
249
|
};
|
|
@@ -294,7 +259,7 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
294
259
|
var _target$textContent;
|
|
295
260
|
setInFocus(false);
|
|
296
261
|
var target = e.target;
|
|
297
|
-
if (e.isComposing || !(target instanceof
|
|
262
|
+
if (e.isComposing || !(target instanceof HTMLElement)) {
|
|
298
263
|
return;
|
|
299
264
|
}
|
|
300
265
|
if (e.inputType === 'historyUndo' && ((_target$textContent = target.textContent) === null || _target$textContent === void 0 ? void 0 : _target$textContent.length) === 0) {
|
|
@@ -303,6 +268,23 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
303
268
|
close();
|
|
304
269
|
return;
|
|
305
270
|
}
|
|
271
|
+
if (e.data != null && inputRef.current === null) {
|
|
272
|
+
setQuery('');
|
|
273
|
+
|
|
274
|
+
// We need to change the content on Safari
|
|
275
|
+
// and set the cursor at the right place
|
|
276
|
+
if (_utils.browser.safari) {
|
|
277
|
+
e.preventDefault();
|
|
278
|
+
var dataElement = document.createTextNode(e.data);
|
|
279
|
+
element.appendChild(dataElement);
|
|
280
|
+
var sel = window.getSelection();
|
|
281
|
+
var range = document.createRange();
|
|
282
|
+
range.setStart(dataElement, dataElement.length);
|
|
283
|
+
range.collapse(true);
|
|
284
|
+
sel === null || sel === void 0 ? void 0 : sel.removeAllRanges();
|
|
285
|
+
sel === null || sel === void 0 ? void 0 : sel.addRange(range);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
306
288
|
};
|
|
307
289
|
var onInput = null;
|
|
308
290
|
if (_utils.browser.safari) {
|
|
@@ -312,7 +294,7 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
312
294
|
var _onInput = function _onInput(e) {
|
|
313
295
|
var _target$textContent2;
|
|
314
296
|
var target = e.target;
|
|
315
|
-
if (e.isComposing || !(target instanceof
|
|
297
|
+
if (e.isComposing || !(target instanceof HTMLElement)) {
|
|
316
298
|
return;
|
|
317
299
|
}
|
|
318
300
|
if (e.inputType === 'historyUndo' && ((_target$textContent2 = target.textContent) === null || _target$textContent2 === void 0 ? void 0 : _target$textContent2.length) === 1) {
|
|
@@ -337,12 +319,11 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
337
319
|
element.removeEventListener('input', onInput);
|
|
338
320
|
}
|
|
339
321
|
};
|
|
340
|
-
}, [triggerQueryPrefix,
|
|
322
|
+
}, [triggerQueryPrefix, cleanedInputContent, onQueryFocus, cancel, checkKeyEvent, editorView.state]);
|
|
341
323
|
(0, _react.useLayoutEffect)(function () {
|
|
342
324
|
var hasReopenQuery = typeof reopenQuery === 'string' && reopenQuery.trim().length > 0;
|
|
343
325
|
if (ref.current && forceFocus) {
|
|
344
|
-
|
|
345
|
-
sizeSpanRef.current.textContent = hasReopenQuery ? reopenQuery : '';
|
|
326
|
+
setQuery(hasReopenQuery ? reopenQuery : null);
|
|
346
327
|
requestAnimationFrame(function () {
|
|
347
328
|
if (!(ref !== null && ref !== void 0 && ref.current)) {
|
|
348
329
|
return;
|
|
@@ -370,20 +351,10 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
370
351
|
Task added in https://product-fabric.atlassian.net/wiki/spaces/E/pages/3182068181/Potential+improvements#Moderate-changes.
|
|
371
352
|
*/
|
|
372
353
|
return (0, _react2.jsx)(_react.Fragment, null, triggerQueryPrefix, (0, _react2.jsx)("span", {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}
|
|
376
|
-
}, (0, _react2.jsx)("span", {
|
|
377
|
-
ref: sizeSpanRef,
|
|
378
|
-
"aria-hidden": true,
|
|
379
|
-
style: {
|
|
380
|
-
marginLeft: '1px',
|
|
381
|
-
visibility: 'hidden'
|
|
382
|
-
}
|
|
383
|
-
}), (0, _react2.jsx)("input", {
|
|
384
|
-
css: queryStyle,
|
|
354
|
+
css: querySpan,
|
|
355
|
+
contentEditable: true,
|
|
385
356
|
ref: ref,
|
|
386
|
-
|
|
357
|
+
onKeyUp: onKeyUp,
|
|
387
358
|
onClick: onClick,
|
|
388
359
|
role: "combobox",
|
|
389
360
|
"aria-controls": _constants.TYPE_AHEAD_DECORATION_ELEMENT_ID,
|
|
@@ -391,9 +362,11 @@ var InputQuery = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
391
362
|
"aria-expanded": items.length !== 0,
|
|
392
363
|
"aria-labelledby": assistiveHintID,
|
|
393
364
|
suppressContentEditableWarning: true,
|
|
394
|
-
"data-query-prefix": triggerQueryPrefix
|
|
395
|
-
|
|
396
|
-
|
|
365
|
+
"data-query-prefix": triggerQueryPrefix
|
|
366
|
+
}, query === null ? (0, _react2.jsx)("input", {
|
|
367
|
+
ref: inputRef,
|
|
368
|
+
type: "text"
|
|
369
|
+
}) : query), (0, _react2.jsx)("span", {
|
|
397
370
|
id: assistiveHintID,
|
|
398
371
|
style: {
|
|
399
372
|
display: 'none'
|
|
@@ -3,31 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadListAriaLabels = exports.getTypeAheadHandler = exports.getPluginState = exports.
|
|
7
|
-
var _prosemirrorState = require("prosemirror-state");
|
|
8
|
-
var _prosemirrorView = require("prosemirror-view");
|
|
6
|
+
exports.moveSelectedIndex = exports.isTypeAheadOpen = exports.isTypeAheadHandler = exports.isTypeAheadAllowed = exports.getTypeAheadQuery = exports.getTypeAheadListAriaLabels = exports.getTypeAheadHandler = exports.getPluginState = exports.findHandlerByTrigger = exports.findHandler = void 0;
|
|
9
7
|
var _typeAhead = require("@atlaskit/editor-common/type-ahead");
|
|
10
8
|
var _key = require("./pm-plugins/key");
|
|
11
9
|
var _updateSelectedIndex = require("./commands/update-selected-index");
|
|
12
10
|
var _statsModifier = require("./stats-modifier");
|
|
13
11
|
var _messages = require("./messages");
|
|
14
|
-
var findTypeAheadDecorations = function findTypeAheadDecorations(state) {
|
|
15
|
-
var selection = state.selection;
|
|
16
|
-
var _typeAheadPluginKey$g = _key.pluginKey.getState(state),
|
|
17
|
-
decorationSet = _typeAheadPluginKey$g.decorationSet;
|
|
18
|
-
if (!decorationSet || decorationSet === _prosemirrorView.DecorationSet.empty || !(selection instanceof _prosemirrorState.TextSelection) || !selection.$cursor) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
var pos = selection.$cursor.pos;
|
|
22
|
-
var decoration = decorationSet.find(pos, pos, function (spec) {
|
|
23
|
-
return spec === null || spec === void 0 ? void 0 : spec.isTypeAheadDecoration;
|
|
24
|
-
});
|
|
25
|
-
if (!decoration || decoration.length !== 1) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return decoration[0];
|
|
29
|
-
};
|
|
30
|
-
exports.findTypeAheadDecorations = findTypeAheadDecorations;
|
|
31
12
|
var isTypeAheadHandler = function isTypeAheadHandler(handler) {
|
|
32
13
|
return handler && Object.values(_typeAhead.TypeAheadAvailableNodes).includes(handler.id) && typeof handler.trigger === 'string' && typeof handler.selectItem === 'function' && typeof handler.getItems === 'function';
|
|
33
14
|
};
|
|
@@ -35,8 +16,8 @@ var isTypeAheadHandler = function isTypeAheadHandler(handler) {
|
|
|
35
16
|
/** Is a typeahead plugin open? */
|
|
36
17
|
exports.isTypeAheadHandler = isTypeAheadHandler;
|
|
37
18
|
var isTypeAheadOpen = function isTypeAheadOpen(editorState) {
|
|
38
|
-
var _typeAheadPluginKey$
|
|
39
|
-
return (_key.pluginKey === null || _key.pluginKey === void 0 ? void 0 : (_typeAheadPluginKey$
|
|
19
|
+
var _typeAheadPluginKey$g, _typeAheadPluginKey$g2;
|
|
20
|
+
return (_key.pluginKey === null || _key.pluginKey === void 0 ? void 0 : (_typeAheadPluginKey$g = _key.pluginKey.getState(editorState)) === null || _typeAheadPluginKey$g === void 0 ? void 0 : (_typeAheadPluginKey$g2 = _typeAheadPluginKey$g.decorationSet) === null || _typeAheadPluginKey$g2 === void 0 ? void 0 : _typeAheadPluginKey$g2.find().length) > 0;
|
|
40
21
|
};
|
|
41
22
|
exports.isTypeAheadOpen = isTypeAheadOpen;
|
|
42
23
|
var getPluginState = function getPluginState(editorState) {
|
package/dist/cjs/test-utils.js
CHANGED
|
@@ -28,12 +28,6 @@ Object.defineProperty(exports, "PortalProviderAPI", {
|
|
|
28
28
|
return _PortalProvider.PortalProviderAPI;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
Object.defineProperty(exports, "Preset", {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function get() {
|
|
34
|
-
return _preset.Preset;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
31
|
exports.createPMSchemaAndPlugins = void 0;
|
|
38
32
|
Object.defineProperty(exports, "createTypeAheadTools", {
|
|
39
33
|
enumerable: true,
|
|
@@ -48,11 +42,11 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
48
42
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
49
43
|
var _prosemirrorState = require("prosemirror-state");
|
|
50
44
|
var _sortByOrder = require("./create-editor/sort-by-order");
|
|
51
|
-
var _preset = require("./labs/next/presets/preset");
|
|
52
45
|
var _createSchema = require("./create-editor/create-schema");
|
|
53
46
|
var _base = _interopRequireDefault(require("./plugins/base"));
|
|
54
47
|
var _pluginKey = require("./plugins/analytics/plugin-key");
|
|
55
48
|
var _api = require("./plugins/type-ahead/api");
|
|
49
|
+
var _preset = require("@atlaskit/editor-common/preset");
|
|
56
50
|
var _PortalProvider = require("./ui/PortalProvider");
|
|
57
51
|
var _eventDispatcher = require("./event-dispatcher");
|
|
58
52
|
var _selection = require("./plugins/selection/gap-cursor/selection");
|
|
@@ -106,13 +100,11 @@ function lightProcessPluginsList(editorPlugins) {
|
|
|
106
100
|
});
|
|
107
101
|
}
|
|
108
102
|
var createPMSchemaAndPlugins = function createPMSchemaAndPlugins() {
|
|
109
|
-
var
|
|
103
|
+
var inputPreset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new _preset.EditorPresetBuilder();
|
|
110
104
|
return function (pluginFactoryParams) {
|
|
111
105
|
var editorPlugins = [];
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
editorPlugins = preset.getEditorPlugins();
|
|
106
|
+
var preset = inputPreset.has(_base.default) ? inputPreset : inputPreset.add(_base.default);
|
|
107
|
+
editorPlugins = preset.build();
|
|
116
108
|
var editorConfig = lightProcessPluginsList(editorPlugins);
|
|
117
109
|
var schema = (0, _createSchema.createSchema)(editorConfig);
|
|
118
110
|
var plugins = editorConfig.plugins.sort((0, _sortByOrder.sortByOrder)('plugins')).map(function (_ref) {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var
|
|
4
|
+
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.mainToolbarCustomComponentsSlotStyle = exports.TableControlsPadding = exports.MainToolbar = void 0;
|
|
9
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -15,7 +16,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
16
17
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
17
18
|
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); }
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
19
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
|
|
19
20
|
var TableControlsPadding = 20;
|
|
20
21
|
exports.TableControlsPadding = TableControlsPadding;
|
|
21
22
|
var mainToolbarWrapperStyle = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n padding: ", "px ", "px 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", "px;\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), (0, _constants.gridSize)(), (0, _constants.gridSize)(), "var(--ds-surface, white)", TableControlsPadding);
|
|
@@ -25,10 +26,18 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
25
26
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
26
27
|
top = _useState2[0],
|
|
27
28
|
setTop = _useState2[1];
|
|
29
|
+
|
|
30
|
+
// ED-15802: if externalToolbarRef is passed in, set top to externalToolbarRef?.current?.clientHeight
|
|
31
|
+
// else if offsetTop is a number set top to offsetTop
|
|
32
|
+
// otherwise top is 0 as initial state
|
|
28
33
|
(0, _react.useEffect)(function () {
|
|
29
34
|
var _props$externalToolba, _props$externalToolba2;
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
if ((_props$externalToolba = props.externalToolbarRef) !== null && _props$externalToolba !== void 0 && (_props$externalToolba2 = _props$externalToolba.current) !== null && _props$externalToolba2 !== void 0 && _props$externalToolba2.clientHeight) {
|
|
36
|
+
setTop(props.externalToolbarRef.current.clientHeight);
|
|
37
|
+
} else {
|
|
38
|
+
setTop(props.offsetTop || 0);
|
|
39
|
+
}
|
|
40
|
+
}, [props.externalToolbarRef, props.offsetTop]);
|
|
32
41
|
return (0, _react2.jsx)("div", {
|
|
33
42
|
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n top: ", "px;\n "])), top)],
|
|
34
43
|
"data-testid": "ak-editor-main-toolbar",
|
|
@@ -41,13 +50,39 @@ var FixedToolbar = function FixedToolbar(props) {
|
|
|
41
50
|
"data-testid": "ak-editor-main-toolbar"
|
|
42
51
|
}, props.children);
|
|
43
52
|
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* ED-15802: Scenarios when a sticky bar is used:
|
|
56
|
+
* 1. useStickyToolbar is true
|
|
57
|
+
* 2. useStickyToolbar is a DOM element
|
|
58
|
+
* 3. useStickyToolbar is an object and has offsetTop key;
|
|
59
|
+
*/
|
|
60
|
+
var getStickyParameters = function getStickyParameters(configuration) {
|
|
61
|
+
// const isUsingStickyOffset, isHTMLElement is used so TS can properly infer types.
|
|
62
|
+
var isHTMLElement = (0, _typeof2.default)(configuration) === 'object' && !('offsetTop' in configuration);
|
|
63
|
+
var isUsingStickyOffset = (0, _typeof2.default)(configuration) === 'object' && 'offsetTop' in configuration;
|
|
64
|
+
if ((0, _typeof2.default)(configuration) !== 'object') {
|
|
65
|
+
return {
|
|
66
|
+
externalToolbarRef: undefined,
|
|
67
|
+
offsetTop: undefined
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
if (isUsingStickyOffset) {
|
|
71
|
+
return {
|
|
72
|
+
offsetTop: configuration.offsetTop
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (isHTMLElement) {
|
|
76
|
+
return {
|
|
77
|
+
externalToolbarRef: configuration
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
};
|
|
44
81
|
var MainToolbar = function MainToolbar(_ref) {
|
|
45
82
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
46
83
|
children = _ref.children;
|
|
47
|
-
if (
|
|
48
|
-
return (0, _react2.jsx)(StickyToolbar,
|
|
49
|
-
externalToolbarRef: typeof useStickyToolbar === 'boolean' ? undefined : useStickyToolbar
|
|
50
|
-
}, children);
|
|
84
|
+
if (useStickyToolbar) {
|
|
85
|
+
return (0, _react2.jsx)(StickyToolbar, getStickyParameters(useStickyToolbar), children);
|
|
51
86
|
}
|
|
52
87
|
return (0, _react2.jsx)(FixedToolbar, null, children);
|
|
53
88
|
};
|
|
@@ -56,6 +56,7 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
|
56
56
|
value: function render() {
|
|
57
57
|
var placeholder = this.props.text || this.props.intl.formatMessage(_messages.messages.chromeCollapsedPlaceholder);
|
|
58
58
|
return (0, _react2.jsx)("input", {
|
|
59
|
+
"data-testid": "chrome-collapsed",
|
|
59
60
|
css: _styles.inputStyle,
|
|
60
61
|
ref: this.handleInputRef,
|
|
61
62
|
onFocus: this.focusHandler,
|
|
@@ -15,6 +15,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _editor = _interopRequireDefault(require("../../editor"));
|
|
18
|
+
var _editorNext = _interopRequireDefault(require("../../editor-next"));
|
|
19
|
+
var _editorMigrationComponent = _interopRequireDefault(require("../../editor-next/editor-migration-component"));
|
|
18
20
|
var _EditorWithActions = _interopRequireDefault(require("../../labs/EditorWithActions"));
|
|
19
21
|
var _ChromeCollapsed = _interopRequireDefault(require("../ChromeCollapsed"));
|
|
20
22
|
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); }; }
|
|
@@ -38,28 +40,20 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
38
40
|
return _this;
|
|
39
41
|
}
|
|
40
42
|
(0, _createClass2.default)(CollapsedEditor, [{
|
|
41
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
42
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
43
|
-
if (!this.props.isExpanded && nextProps.isExpanded) {
|
|
44
|
-
this.shouldTriggerExpandEvent = true;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
43
|
key: "componentDidUpdate",
|
|
49
44
|
value: function componentDidUpdate() {
|
|
50
|
-
if (this.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.props.onExpand();
|
|
54
|
-
}
|
|
45
|
+
if (this.props.isExpanded && this.editorComponent && (!this.previouslyExpanded || this.previouslyExpanded === undefined)) {
|
|
46
|
+
var _this$props$onExpand, _this$props;
|
|
47
|
+
(_this$props$onExpand = (_this$props = this.props).onExpand) === null || _this$props$onExpand === void 0 ? void 0 : _this$props$onExpand.call(_this$props);
|
|
55
48
|
}
|
|
49
|
+
this.previouslyExpanded = this.props.isExpanded;
|
|
56
50
|
}
|
|
57
51
|
}, {
|
|
58
52
|
key: "render",
|
|
59
53
|
value: function render() {
|
|
60
54
|
var _this2 = this;
|
|
61
55
|
var child = _react.default.Children.only(this.props.children);
|
|
62
|
-
if (child.type !== _editor.default && child.type !== _EditorWithActions.default) {
|
|
56
|
+
if (child.type !== _editor.default && child.type !== _EditorWithActions.default && child.type !== _editorNext.default && child.type !== _editorMigrationComponent.default) {
|
|
63
57
|
throw new Error('Expected child to be of type `Editor`');
|
|
64
58
|
}
|
|
65
59
|
if (!this.props.isExpanded) {
|
|
@@ -3,7 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "ColorPalette", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _uiColor.ColorPalette;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "backgroundPaletteTooltipMessages", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _uiColor.backgroundPaletteTooltipMessages;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
6
18
|
exports.default = void 0;
|
|
19
|
+
Object.defineProperty(exports, "textPaletteTooltipMessages", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function get() {
|
|
22
|
+
return _uiColor.textPaletteTooltipMessages;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
7
25
|
var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
8
26
|
var _default = _uiColor.ColorPalette;
|
|
9
27
|
exports.default = _default;
|