@atlaskit/editor-core 180.0.0 → 180.1.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 +74 -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 +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +12 -762
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +783 -0
- package/dist/cjs/create-editor/ReactEditorViewNext.js +16 -0
- package/dist/cjs/create-editor/create-plugins-list.js +1 -0
- package/dist/cjs/create-editor/feature-flags-from-props.js +3 -2
- package/dist/cjs/editor-next/editor-internal.js +147 -0
- package/dist/cjs/editor-next/editor-migration-component.js +35 -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 +72 -0
- package/dist/cjs/editor-next/index.js +139 -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/handleProviders.js +56 -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 +130 -443
- package/dist/cjs/index.js +7 -0
- 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/preset.js +0 -5
- package/dist/cjs/labs/next/presets/universal.js +11 -2
- 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 +5 -6
- package/dist/cjs/plugins/analytics/utils.js +0 -11
- 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/utils/input-latency-tracking.js +24 -25
- 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/card/nodeviews/blockCard.js +2 -1
- package/dist/cjs/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/cjs/plugins/card/pm-plugins/main.js +4 -2
- package/dist/cjs/plugins/clipboard/pm-plugins/main.js +4 -1
- package/dist/cjs/plugins/collab-edit/plugin.js +2 -3
- package/dist/cjs/plugins/extension/toolbar.js +7 -1
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Button.js +2 -0
- package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +38 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +23 -21
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +11 -0
- package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- 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/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/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/panel/utils.js +4 -1
- package/dist/cjs/plugins/paste/handlers.js +128 -13
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +15 -6
- package/dist/cjs/plugins/paste/pm-plugins/main.js +12 -3
- package/dist/cjs/plugins/placeholder-text/index.js +2 -2
- package/dist/cjs/plugins/status/index.js +9 -3
- package/dist/cjs/plugins/status/ui/statusPicker.js +8 -2
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +42 -8
- 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 -10
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +19 -1
- package/dist/cjs/plugins/type-ahead/index.js +1 -1
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +79 -106
- package/dist/cjs/types/get-editor-props.js +5 -0
- package/dist/cjs/ui/ChromeCollapsed/index.js +1 -0
- package/dist/cjs/ui/CollapsedEditor/index.js +7 -13
- package/dist/cjs/ui/ColorPickerButton/index.js +68 -6
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.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/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/PanelTextInput/index.js +4 -4
- package/dist/cjs/ui/PortalProvider/index.js +5 -5
- package/dist/cjs/ui/WidthEmitter/index.js +29 -35
- package/dist/cjs/utils/document.js +15 -0
- package/dist/cjs/utils/extensions.js +6 -7
- package/dist/cjs/utils/get-editor-plugins.js +32 -0
- 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 +2 -2
- package/dist/es2019/create-editor/ReactEditorView.js +6 -708
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +712 -0
- package/dist/es2019/create-editor/ReactEditorViewNext.js +7 -0
- package/dist/es2019/create-editor/create-plugins-list.js +1 -0
- package/dist/es2019/create-editor/feature-flags-from-props.js +3 -2
- package/dist/es2019/editor-next/editor-internal.js +142 -0
- package/dist/es2019/editor-next/editor-migration-component.js +10 -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 +61 -0
- package/dist/es2019/editor-next/index.js +90 -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/handleProviders.js +52 -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 +111 -396
- package/dist/es2019/index.js +2 -1
- 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/preset.js +0 -3
- package/dist/es2019/labs/next/presets/universal.js +13 -2
- 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 +1 -2
- package/dist/es2019/plugins/analytics/utils.js +0 -4
- 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/utils/input-latency-tracking.js +23 -23
- 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/card/nodeviews/blockCard.js +4 -1
- package/dist/es2019/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/es2019/plugins/card/pm-plugins/main.js +3 -1
- package/dist/es2019/plugins/clipboard/pm-plugins/main.js +3 -1
- package/dist/es2019/plugins/collab-edit/plugin.js +1 -2
- package/dist/es2019/plugins/extension/toolbar.js +7 -1
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Button.js +2 -0
- package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +35 -7
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +2 -2
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +11 -0
- package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- 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/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/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/panel/utils.js +4 -1
- package/dist/es2019/plugins/paste/handlers.js +127 -5
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +10 -4
- package/dist/es2019/plugins/paste/pm-plugins/main.js +13 -4
- package/dist/es2019/plugins/placeholder-text/index.js +1 -1
- package/dist/es2019/plugins/status/index.js +8 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +8 -2
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +42 -8
- 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 -8
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +16 -1
- package/dist/es2019/plugins/type-ahead/index.js +1 -1
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +73 -92
- package/dist/es2019/types/get-editor-props.js +1 -0
- package/dist/es2019/ui/ChromeCollapsed/index.js +1 -0
- package/dist/es2019/ui/CollapsedEditor/index.js +7 -11
- package/dist/es2019/ui/ColorPickerButton/index.js +61 -8
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.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/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/PanelTextInput/index.js +3 -3
- package/dist/es2019/ui/PortalProvider/index.js +1 -1
- package/dist/es2019/ui/WidthEmitter/index.js +25 -29
- package/dist/es2019/utils/document.js +11 -1
- package/dist/es2019/utils/extensions.js +1 -3
- package/dist/es2019/utils/get-editor-plugins.js +25 -0
- 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 +2 -2
- package/dist/esm/create-editor/ReactEditorView.js +12 -763
- package/dist/esm/create-editor/ReactEditorViewInternal.js +776 -0
- package/dist/esm/create-editor/ReactEditorViewNext.js +7 -0
- package/dist/esm/create-editor/create-plugins-list.js +1 -0
- package/dist/esm/create-editor/feature-flags-from-props.js +3 -2
- package/dist/esm/editor-next/editor-internal.js +141 -0
- package/dist/esm/editor-next/editor-migration-component.js +28 -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 +65 -0
- package/dist/esm/editor-next/index.js +134 -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/handleProviders.js +50 -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 +130 -440
- package/dist/esm/index.js +2 -1
- 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/preset.js +0 -5
- package/dist/esm/labs/next/presets/universal.js +11 -2
- 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 +1 -2
- package/dist/esm/plugins/analytics/utils.js +0 -9
- 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/utils/input-latency-tracking.js +24 -25
- 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/card/nodeviews/blockCard.js +2 -1
- package/dist/esm/plugins/card/nodeviews/genericCard.js +16 -2
- package/dist/esm/plugins/card/pm-plugins/main.js +4 -2
- package/dist/esm/plugins/clipboard/pm-plugins/main.js +4 -1
- package/dist/esm/plugins/collab-edit/plugin.js +1 -2
- package/dist/esm/plugins/extension/toolbar.js +7 -1
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +5 -1
- package/dist/esm/plugins/floating-toolbar/ui/Button.js +2 -0
- package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +5 -3
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +38 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +23 -21
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +12 -7
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +11 -0
- package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +1 -0
- 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/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/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/panel/utils.js +4 -1
- package/dist/esm/plugins/paste/handlers.js +127 -13
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +13 -5
- package/dist/esm/plugins/paste/pm-plugins/main.js +13 -4
- package/dist/esm/plugins/placeholder-text/index.js +2 -2
- package/dist/esm/plugins/status/index.js +9 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +8 -2
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +42 -8
- 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 -8
- package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +19 -1
- package/dist/esm/plugins/type-ahead/index.js +1 -1
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +79 -106
- package/dist/esm/types/get-editor-props.js +1 -0
- package/dist/esm/ui/ChromeCollapsed/index.js +1 -0
- package/dist/esm/ui/CollapsedEditor/index.js +7 -13
- package/dist/esm/ui/ColorPickerButton/index.js +69 -7
- package/dist/esm/ui/ConfigPanel/ConfigPanel.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/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/PanelTextInput/index.js +4 -4
- package/dist/esm/ui/PortalProvider/index.js +1 -1
- package/dist/esm/ui/WidthEmitter/index.js +28 -37
- package/dist/esm/utils/document.js +15 -1
- package/dist/esm/utils/extensions.js +1 -3
- package/dist/esm/utils/get-editor-plugins.js +25 -0
- 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 +2 -2
- package/dist/types/create-editor/ReactEditorView.d.ts +7 -109
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +112 -0
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +9 -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/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 +47 -25
- package/dist/types/index.d.ts +1 -0
- 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/preset.d.ts +6 -6
- package/dist/types/labs/next/presets/universal.d.ts +1 -1
- package/dist/types/plugins/alignment/index.d.ts +1 -1
- 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/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/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/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/card/index.d.ts +3 -1
- package/dist/types/plugins/card/nodeviews/genericCard.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/index.d.ts +3 -1
- package/dist/types/plugins/collab-edit/index.d.ts +3 -1
- package/dist/types/plugins/context-panel/index.d.ts +1 -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/index.d.ts +3 -1
- 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 -1
- package/dist/types/plugins/find-replace/index.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +2 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +5 -2
- package/dist/types/plugins/grid/index.d.ts +3 -1
- package/dist/types/plugins/help-dialog/index.d.ts +3 -1
- 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/list/index.d.ts +3 -1
- 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/mentions/index.d.ts +3 -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 -1
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +4 -1
- 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/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/submit-editor/index.d.ts +3 -1
- package/dist/types/plugins/tasks-and-decisions/index.d.ts +3 -1
- package/dist/types/plugins/text-color/index.d.ts +3 -1
- 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/ui/Toolbar/more-button.d.ts +2 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +0 -1
- package/dist/types/plugins/toolbar-lists-indentation/index.d.ts +3 -1
- package/dist/types/plugins/type-ahead/index.d.ts +3 -1
- 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/FullPage/StyledComponents.d.ts +29 -29
- package/dist/types/ui/CollapsedEditor/index.d.ts +4 -3
- package/dist/types/ui/ColorPickerButton/index.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ContextPanel/context.d.ts +2 -1
- package/dist/types/ui/PanelTextInput/index.d.ts +1 -1
- package/dist/types/ui/PortalProvider/index.d.ts +1 -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/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/docs/0-intro.tsx +0 -1
- package/package.json +23 -22
- package/report.api.md +193 -139
- package/dist/cjs/plugins/analytics/analytics-queue.js +0 -79
- package/dist/cjs/plugins/analytics/fire-analytics-event.js +0 -35
- package/dist/es2019/plugins/analytics/analytics-queue.js +0 -53
- package/dist/es2019/plugins/analytics/fire-analytics-event.js +0 -26
- package/dist/esm/plugins/analytics/analytics-queue.js +0 -71
- package/dist/esm/plugins/analytics/fire-analytics-event.js +0 -28
- package/dist/types/plugins/analytics/analytics-queue.d.ts +0 -10
- package/dist/types/plugins/analytics/fire-analytics-event.d.ts +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EditorState,
|
|
2
|
-
import {
|
|
1
|
+
import { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
+
import { AnalyticsEventPayload } from './types';
|
|
3
3
|
import { HigherOrderCommand } from '../../types/command';
|
|
4
4
|
import { mapActionSubjectIdToAttributes } from '../../analytics-api/map-attributes';
|
|
5
5
|
import { getStateContext, getSelectionType, findInsertLocation } from '../../analytics-api/editor-state-context';
|
|
@@ -7,4 +7,3 @@ export { getStateContext, mapActionSubjectIdToAttributes, getSelectionType, find
|
|
|
7
7
|
export declare function addAnalytics(state: EditorState, tr: Transaction, payload: AnalyticsEventPayload, channel?: string): Transaction;
|
|
8
8
|
export declare type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
9
9
|
export declare function withAnalytics(payload: AnalyticsEventPayload | AnalyticsEventPayloadCallback, channel?: string): HigherOrderCommand;
|
|
10
|
-
export declare function getAnalyticsEventsFromTransaction(tr: Transaction | ReadonlyTransaction): AnalyticsEventPayloadWithChannel[];
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { AnnotationProviders, InlineCommentAnnotationProvider, AnnotationInfo, AnnotationState, InlineCommentState, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationTypeProvider } from './types';
|
|
3
3
|
import { UpdateEvent, AnnotationUpdateEmitter } from './update-provider';
|
|
4
|
-
declare const annotationPlugin: NextEditorPlugin<'annotation',
|
|
4
|
+
declare const annotationPlugin: NextEditorPlugin<'annotation', {
|
|
5
|
+
pluginConfiguration: AnnotationProviders | undefined;
|
|
6
|
+
}>;
|
|
5
7
|
export default annotationPlugin;
|
|
6
8
|
export { AnnotationUpdateEmitter };
|
|
7
9
|
export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationTypeProvider, AnnotationInfo, AnnotationState, InlineCommentState, UpdateEvent, };
|
|
@@ -4,5 +4,7 @@ declare type Config = {
|
|
|
4
4
|
collabEdit?: CollabEditOptions;
|
|
5
5
|
takeFullWidth: boolean;
|
|
6
6
|
};
|
|
7
|
-
declare const avatarGroup: NextEditorPlugin<'avatarGroup',
|
|
7
|
+
declare const avatarGroup: NextEditorPlugin<'avatarGroup', {
|
|
8
|
+
pluginConfiguration: Config;
|
|
9
|
+
}>;
|
|
8
10
|
export default avatarGroup;
|
|
@@ -9,5 +9,7 @@ export interface BasePluginOptions {
|
|
|
9
9
|
ufo?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare const isChromeWithSelectionBug: any;
|
|
12
|
-
declare const basePlugin: NextEditorPlugin<'base',
|
|
12
|
+
declare const basePlugin: NextEditorPlugin<'base', {
|
|
13
|
+
pluginConfiguration: BasePluginOptions | undefined;
|
|
14
|
+
}>;
|
|
13
15
|
export default basePlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { DispatchAnalyticsEvent } from '
|
|
2
|
+
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
declare const _default: (dispatchAnalyticsEvent: DispatchAnalyticsEvent) => SafePlugin<any, any>;
|
|
4
4
|
export default _default;
|
|
@@ -20,7 +20,6 @@ interface Opts {
|
|
|
20
20
|
export default class InputLatencyTracker {
|
|
21
21
|
private samples;
|
|
22
22
|
private total;
|
|
23
|
-
private currentStart;
|
|
24
23
|
private samplingRate;
|
|
25
24
|
private slowThreshold;
|
|
26
25
|
private normalThreshold;
|
|
@@ -31,8 +30,7 @@ export default class InputLatencyTracker {
|
|
|
31
30
|
private onSampleEnd;
|
|
32
31
|
private onSlowInput;
|
|
33
32
|
constructor({ samplingRate, slowThreshold, normalThreshold, degradedThreshold, dispatchAverage, dispatchSample, onSampleStart, onSampleEnd, onSlowInput, }: Opts);
|
|
34
|
-
start(): void;
|
|
35
|
-
end(): void;
|
|
33
|
+
start(): () => void;
|
|
36
34
|
flush(): void;
|
|
37
35
|
private dispatch;
|
|
38
36
|
private push;
|
|
@@ -2,5 +2,7 @@ import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
declare type Config = {
|
|
3
3
|
beforePrimaryToolbarComponents?: any;
|
|
4
4
|
};
|
|
5
|
-
declare const beforePrimaryToolbar: NextEditorPlugin<'beforePrimaryToolbar',
|
|
5
|
+
declare const beforePrimaryToolbar: NextEditorPlugin<'beforePrimaryToolbar', {
|
|
6
|
+
pluginConfiguration: Config;
|
|
7
|
+
}>;
|
|
6
8
|
export default beforePrimaryToolbar;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { BlockTypePluginOptions } from './types';
|
|
3
|
-
declare const blockTypePlugin: NextEditorPlugin<'blockType',
|
|
3
|
+
declare const blockTypePlugin: NextEditorPlugin<'blockType', {
|
|
4
|
+
pluginConfiguration: BlockTypePluginOptions | undefined;
|
|
5
|
+
}>;
|
|
4
6
|
export default blockTypePlugin;
|
|
5
7
|
export { pluginKey } from './pm-plugins/main';
|
|
6
8
|
export type { BlockTypeState } from './pm-plugins/main';
|
|
@@ -10,6 +10,7 @@ export interface BlockTypeButtonProps {
|
|
|
10
10
|
disabled: boolean;
|
|
11
11
|
title: MessageDescriptor;
|
|
12
12
|
onClick(e: React.MouseEvent): void;
|
|
13
|
+
onKeyDown(e: React.KeyboardEvent): void;
|
|
13
14
|
formatMessage: WrappedComponentProps['intl']['formatMessage'];
|
|
14
15
|
}
|
|
15
16
|
export declare const messages: {
|
|
@@ -21,6 +21,7 @@ export interface Props {
|
|
|
21
21
|
}
|
|
22
22
|
export interface State {
|
|
23
23
|
active: boolean;
|
|
24
|
+
isOpenedByKeyboard: boolean;
|
|
24
25
|
}
|
|
25
26
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
26
27
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
@@ -2,5 +2,7 @@ import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
interface BreakoutPluginOptions {
|
|
3
3
|
allowBreakoutButton?: boolean;
|
|
4
4
|
}
|
|
5
|
-
declare const breakoutPlugin: NextEditorPlugin<'breakout',
|
|
5
|
+
declare const breakoutPlugin: NextEditorPlugin<'breakout', {
|
|
6
|
+
pluginConfiguration: BreakoutPluginOptions | undefined;
|
|
7
|
+
}>;
|
|
6
8
|
export default breakoutPlugin;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { CardPluginOptions } from './types';
|
|
3
|
-
declare const cardPlugin: NextEditorPlugin<'card',
|
|
3
|
+
declare const cardPlugin: NextEditorPlugin<'card', {
|
|
4
|
+
pluginConfiguration: CardPluginOptions;
|
|
5
|
+
}>;
|
|
4
6
|
export default cardPlugin;
|
|
@@ -6,7 +6,7 @@ import { CardPlatform } from '@atlaskit/smart-card';
|
|
|
6
6
|
import { SmartCardContext } from '@atlaskit/link-provider';
|
|
7
7
|
import { getPosHandler, ReactComponentProps } from '../../../nodeviews';
|
|
8
8
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
9
|
-
import { DispatchAnalyticsEvent } from '../../../plugins/analytics';
|
|
9
|
+
import { DispatchAnalyticsEvent } from '../../../plugins/analytics/types';
|
|
10
10
|
export declare type EditorContext<T> = React.Context<T> & {
|
|
11
11
|
value: T;
|
|
12
12
|
};
|
|
@@ -20,5 +20,6 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
20
20
|
showLinkingToolbar: boolean;
|
|
21
21
|
smartLinkEvents?: import("@atlaskit/smart-card").SmartLinkEvents | undefined;
|
|
22
22
|
createAnalyticsEvent?: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | undefined;
|
|
23
|
+
editorAppearance?: import("@atlaskit/editor-common/types").EditorAppearance | undefined;
|
|
23
24
|
};
|
|
24
25
|
export declare const getNewRequests: (oldState: CardPluginState | undefined, currentState: CardPluginState) => Request[];
|
|
@@ -4,6 +4,7 @@ import { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
|
4
4
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
6
6
|
import { LinkPickerOptions } from '../hyperlink/types';
|
|
7
|
+
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
7
8
|
export declare type CardInfo = {
|
|
8
9
|
title?: string;
|
|
9
10
|
url?: string;
|
|
@@ -28,8 +29,10 @@ export declare type CardPluginState = {
|
|
|
28
29
|
showLinkingToolbar: boolean;
|
|
29
30
|
smartLinkEvents?: SmartLinkEvents;
|
|
30
31
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
32
|
+
editorAppearance?: EditorAppearance;
|
|
31
33
|
};
|
|
32
34
|
export declare type CardPluginOptions = CardOptions & {
|
|
35
|
+
editorAppearance?: EditorAppearance;
|
|
33
36
|
platform: 'mobile' | 'web';
|
|
34
37
|
fullWidthMode?: boolean;
|
|
35
38
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
@@ -2,5 +2,7 @@ import type { NextEditorPlugin, EditorProps } from '../../types';
|
|
|
2
2
|
declare type Config = {
|
|
3
3
|
appearance: EditorProps['appearance'];
|
|
4
4
|
};
|
|
5
|
-
declare const codeBidiWarning: NextEditorPlugin<'codeBidiWarning',
|
|
5
|
+
declare const codeBidiWarning: NextEditorPlugin<'codeBidiWarning', {
|
|
6
|
+
pluginConfiguration: Config;
|
|
7
|
+
}>;
|
|
6
8
|
export default codeBidiWarning;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { CodeBlockOptions } from './types';
|
|
3
|
-
declare const codeBlockPlugin: NextEditorPlugin<'codeBlock',
|
|
3
|
+
declare const codeBlockPlugin: NextEditorPlugin<'codeBlock', {
|
|
4
|
+
pluginConfiguration: CodeBlockOptions;
|
|
5
|
+
}>;
|
|
4
6
|
export default codeBlockPlugin;
|
|
@@ -4,5 +4,7 @@ import { CollabEditOptions, PrivateCollabEditOptions } from './types';
|
|
|
4
4
|
export type { CollabEditProvider } from './provider';
|
|
5
5
|
export { pluginKey };
|
|
6
6
|
export type { CollabEditOptions };
|
|
7
|
-
declare const collabEditPlugin: NextEditorPlugin<'collabEdit',
|
|
7
|
+
declare const collabEditPlugin: NextEditorPlugin<'collabEdit', {
|
|
8
|
+
pluginConfiguration: PrivateCollabEditOptions;
|
|
9
|
+
}>;
|
|
8
10
|
export default collabEditPlugin;
|
|
@@ -8,5 +8,5 @@ export declare type ContextPanelPluginState = {
|
|
|
8
8
|
contents: React.ReactNode[];
|
|
9
9
|
};
|
|
10
10
|
export declare function getPluginState(state: EditorState): any;
|
|
11
|
-
declare const contextPanelPlugin: NextEditorPlugin<'contextPanel'
|
|
11
|
+
declare const contextPanelPlugin: NextEditorPlugin<'contextPanel'>;
|
|
12
12
|
export default contextPanelPlugin;
|
|
@@ -10,7 +10,9 @@ export declare function memoize<ResultFn extends (emoji: EmojiDescription, emoji
|
|
|
10
10
|
clear(): void;
|
|
11
11
|
};
|
|
12
12
|
export declare const defaultListLimit = 50;
|
|
13
|
-
declare const emojiPlugin: NextEditorPlugin<'emoji',
|
|
13
|
+
declare const emojiPlugin: NextEditorPlugin<'emoji', {
|
|
14
|
+
pluginConfiguration: EmojiPluginOptions | undefined;
|
|
15
|
+
}>;
|
|
14
16
|
export default emojiPlugin;
|
|
15
17
|
/**
|
|
16
18
|
* Actions
|
|
@@ -4,7 +4,9 @@ interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
|
4
4
|
allowInsertion?: boolean;
|
|
5
5
|
appearance?: EditorProps['appearance'];
|
|
6
6
|
}
|
|
7
|
-
declare const expandPlugin: NextEditorPlugin<'expand',
|
|
7
|
+
declare const expandPlugin: NextEditorPlugin<'expand', {
|
|
8
|
+
pluginConfiguration: ExpandPluginOptions | undefined;
|
|
9
|
+
}>;
|
|
8
10
|
interface ExpandEditorProps {
|
|
9
11
|
allowExpand?: EditorProps['allowExpand'];
|
|
10
12
|
}
|
|
@@ -7,5 +7,7 @@ interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
|
7
7
|
extensionHandlers?: ExtensionHandlers;
|
|
8
8
|
appearance?: EditorAppearance;
|
|
9
9
|
}
|
|
10
|
-
declare const extensionPlugin: NextEditorPlugin<'extension',
|
|
10
|
+
declare const extensionPlugin: NextEditorPlugin<'extension', {
|
|
11
|
+
pluginConfiguration: ExtensionPluginOptions | undefined;
|
|
12
|
+
}>;
|
|
11
13
|
export default extensionPlugin;
|
|
@@ -10,6 +10,11 @@ export declare const messages: {
|
|
|
10
10
|
defaultMessage: string;
|
|
11
11
|
description: string;
|
|
12
12
|
};
|
|
13
|
+
unnamedSource: {
|
|
14
|
+
id: string;
|
|
15
|
+
defaultMessage: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
13
18
|
confirmDeleteLinkedModalOKButton: {
|
|
14
19
|
id: string;
|
|
15
20
|
defaultMessage: string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { EditorState } from 'prosemirror-state';
|
|
2
2
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { FeatureFlags } from '../../types/feature-flags';
|
|
4
|
-
declare const featureFlagsContextPlugin: NextEditorPlugin<'featureFlagsContext',
|
|
4
|
+
declare const featureFlagsContextPlugin: NextEditorPlugin<'featureFlagsContext', {
|
|
5
|
+
pluginConfiguration: FeatureFlags;
|
|
6
|
+
}>;
|
|
5
7
|
export declare const getFeatureFlags: (state: EditorState) => FeatureFlags;
|
|
6
8
|
export declare const useFeatureFlags: () => FeatureFlags | undefined;
|
|
7
9
|
export default featureFlagsContextPlugin;
|
|
@@ -3,5 +3,7 @@ import type { FeedbackInfo } from '../../types';
|
|
|
3
3
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare const pluginKey: PluginKey<any, any>;
|
|
5
5
|
export declare const openFeedbackDialog: (feedbackInfo?: FeedbackInfo | undefined) => Promise<unknown>;
|
|
6
|
-
declare const feedbackDialog: NextEditorPlugin<'feedbackDialog',
|
|
6
|
+
declare const feedbackDialog: NextEditorPlugin<'feedbackDialog', {
|
|
7
|
+
pluginConfiguration: FeedbackInfo;
|
|
8
|
+
}>;
|
|
7
9
|
export default feedbackDialog;
|
|
@@ -3,5 +3,7 @@ declare type Config = {
|
|
|
3
3
|
takeFullWidth: boolean;
|
|
4
4
|
twoLineEditorToolbar: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const findReplacePlugin: NextEditorPlugin<'findReplace',
|
|
6
|
+
export declare const findReplacePlugin: NextEditorPlugin<'findReplace', {
|
|
7
|
+
pluginConfiguration: Config;
|
|
8
|
+
}>;
|
|
7
9
|
export default findReplacePlugin;
|
|
@@ -6,6 +6,7 @@ export interface Props {
|
|
|
6
6
|
icon?: React.ReactElement<any>;
|
|
7
7
|
iconAfter?: React.ReactElement<any>;
|
|
8
8
|
onClick?: React.MouseEventHandler;
|
|
9
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
9
10
|
onMouseEnter?: <T>(event: React.MouseEvent<T>) => void;
|
|
10
11
|
onMouseLeave?: <T>(event: React.MouseEvent<T>) => void;
|
|
11
12
|
onFocus?: <T>(event: React.FocusEvent<T>) => void;
|
|
@@ -23,5 +24,5 @@ export interface Props {
|
|
|
23
24
|
hideTooltipOnClick?: boolean;
|
|
24
25
|
tabIndex?: number | null | undefined;
|
|
25
26
|
}
|
|
26
|
-
declare const _default: ({ title, icon, iconAfter, onClick, onMouseEnter, onMouseLeave, onFocus, onBlur, selected, disabled, href, target, appearance, children, className, tooltipContent, testId, hideTooltipOnClick, ariaHasPopup, tabIndex, }: Props) => JSX.Element;
|
|
27
|
+
declare const _default: ({ title, icon, iconAfter, onClick, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onBlur, selected, disabled, href, target, appearance, children, className, tooltipContent, testId, hideTooltipOnClick, ariaHasPopup, tabIndex, }: Props) => JSX.Element;
|
|
27
28
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { Component, ReactElement } from 'react';
|
|
2
|
+
import React, { Component, ReactElement } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { DropdownOptions } from './types';
|
|
5
5
|
import { EditorView } from 'prosemirror-view';
|
|
@@ -22,14 +22,17 @@ export interface Props {
|
|
|
22
22
|
}
|
|
23
23
|
export interface State {
|
|
24
24
|
isOpen: boolean;
|
|
25
|
+
isOpenedByKeyboard: boolean;
|
|
25
26
|
}
|
|
26
27
|
export default class Dropdown extends Component<Props, State> {
|
|
27
28
|
state: State;
|
|
29
|
+
triggerRef: React.RefObject<HTMLDivElement>;
|
|
28
30
|
render(): jsx.JSX.Element;
|
|
29
31
|
private renderArrayOptions;
|
|
30
32
|
private toggleOpen;
|
|
33
|
+
private toggleOpenByKeyboard;
|
|
31
34
|
private hide;
|
|
32
|
-
private
|
|
35
|
+
private hideOnEsc;
|
|
33
36
|
private onOpenChanged;
|
|
34
37
|
componentDidUpdate(prevProps: Props, prevState: State): void;
|
|
35
38
|
}
|
|
@@ -11,6 +11,8 @@ export declare const gridTypeForLayout: (layout: MediaSingleLayout) => GridType;
|
|
|
11
11
|
interface GridPluginOptions {
|
|
12
12
|
shouldCalcBreakoutGridLines?: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare const gridPlugin: NextEditorPlugin<'grid',
|
|
14
|
+
declare const gridPlugin: NextEditorPlugin<'grid', {
|
|
15
|
+
pluginConfiguration: GridPluginOptions | undefined;
|
|
16
|
+
}>;
|
|
15
17
|
export default gridPlugin;
|
|
16
18
|
export { GRID_GUTTER } from './styles';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
export declare function createPlugin(dispatch: Function, imageEnabled: boolean): SafePlugin<any, any>;
|
|
4
|
-
declare const helpDialog: NextEditorPlugin<'helpDialog',
|
|
4
|
+
declare const helpDialog: NextEditorPlugin<'helpDialog', {
|
|
5
|
+
pluginConfiguration: boolean;
|
|
6
|
+
}>;
|
|
5
7
|
export default helpDialog;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AnalyticsEventPayload, InputMethodInsertLink } from '../analytics';
|
|
1
|
+
import { AnalyticsEventPayload, InputMethodInsertLink } from '../analytics/types';
|
|
2
2
|
export declare function getLinkCreationAnalyticsEvent(inputMethod: InputMethodInsertLink, url: string): AnalyticsEventPayload;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import { HyperlinkPluginOptions } from './types';
|
|
3
|
-
declare const hyperlinkPlugin: NextEditorPlugin<'hyperlink',
|
|
3
|
+
declare const hyperlinkPlugin: NextEditorPlugin<'hyperlink', {
|
|
4
|
+
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
5
|
+
}>;
|
|
4
6
|
export type { HyperlinkState } from './pm-plugins/main';
|
|
5
7
|
export default hyperlinkPlugin;
|
|
@@ -2,7 +2,8 @@ import { Node } from 'prosemirror-model';
|
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import { EditorState, PluginKey } from 'prosemirror-state';
|
|
4
4
|
import { Dispatch } from '../../../event-dispatcher';
|
|
5
|
-
import { INPUT_METHOD } from '../../analytics';
|
|
5
|
+
import { INPUT_METHOD } from '../../analytics/types';
|
|
6
|
+
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
6
7
|
export declare enum LinkAction {
|
|
7
8
|
SHOW_INSERT_TOOLBAR = "SHOW_INSERT_TOOLBAR",
|
|
8
9
|
HIDE_TOOLBAR = "HIDE_TOOLBAR",
|
|
@@ -39,6 +40,7 @@ export interface HyperlinkState {
|
|
|
39
40
|
canInsertLink: boolean;
|
|
40
41
|
searchSessionId?: string;
|
|
41
42
|
inputMethod?: INPUT_METHOD;
|
|
43
|
+
editorAppearance?: EditorAppearance;
|
|
42
44
|
}
|
|
43
45
|
export declare const stateKey: PluginKey<HyperlinkState, any>;
|
|
44
|
-
export declare const plugin: (dispatch: Dispatch) => SafePlugin<any, any>;
|
|
46
|
+
export declare const plugin: (dispatch: Dispatch, editorAppearance?: EditorAppearance | undefined) => SafePlugin<any, any>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CardOptions } from '@atlaskit/editor-common/card';
|
|
2
2
|
import { LinkPickerProps } from '@atlaskit/link-picker';
|
|
3
|
-
import { INPUT_METHOD } from '../analytics';
|
|
3
|
+
import { INPUT_METHOD } from '../analytics/types';
|
|
4
|
+
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
4
5
|
export declare type LinkInputType = INPUT_METHOD.MANUAL | INPUT_METHOD.TYPEAHEAD;
|
|
5
6
|
/**
|
|
6
7
|
* Configuration for the link picker
|
|
@@ -30,4 +31,5 @@ export interface HyperlinkPluginOptions {
|
|
|
30
31
|
cardOptions?: CardOptions;
|
|
31
32
|
linkPicker?: LinkPickerOptions;
|
|
32
33
|
platform?: 'mobile' | 'web';
|
|
34
|
+
editorAppearance?: EditorAppearance;
|
|
33
35
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { LinkPickerProps } from '@atlaskit/link-picker';
|
|
4
|
+
import { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
4
5
|
/**
|
|
5
6
|
* Returns a type that matches T but where keys (K) are now optional
|
|
6
7
|
*/
|
|
@@ -12,6 +13,7 @@ export interface EditorLinkPickerProps extends OptionalKeys<LinkPickerProps, 'on
|
|
|
12
13
|
* Should be roughly equivalent to the `inputMethod` analytics value
|
|
13
14
|
*/
|
|
14
15
|
invokeMethod?: string;
|
|
16
|
+
editorAppearance?: EditorAppearance;
|
|
15
17
|
}
|
|
16
|
-
export declare const EditorLinkPicker: ({ view, onCancel, invokeMethod, ...restProps }: EditorLinkPickerProps) => JSX.Element;
|
|
18
|
+
export declare const EditorLinkPicker: ({ view, onCancel, invokeMethod, editorAppearance, ...restProps }: EditorLinkPickerProps) => JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -10,5 +10,7 @@ export interface InsertBlockOptions {
|
|
|
10
10
|
showElementBrowserLink?: boolean;
|
|
11
11
|
insertNodeAPI?: InsertNodeAPI;
|
|
12
12
|
}
|
|
13
|
-
declare const insertBlockPlugin: NextEditorPlugin<'insertBlock',
|
|
13
|
+
declare const insertBlockPlugin: NextEditorPlugin<'insertBlock', {
|
|
14
|
+
pluginConfiguration: InsertBlockOptions | undefined;
|
|
15
|
+
}>;
|
|
14
16
|
export default insertBlockPlugin;
|
package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-element-browser.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface BlockInsertElementBrowserProps {
|
|
|
17
17
|
showElementBrowserLink: boolean;
|
|
18
18
|
onRef(el: HTMLElement): void;
|
|
19
19
|
onClick: React.MouseEventHandler;
|
|
20
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
20
21
|
onInsert: OnInsert;
|
|
21
22
|
togglePlusMenuVisibility: SimpleEventHandler<MouseEvent | KeyboardEvent>;
|
|
22
23
|
}
|
|
@@ -10,6 +10,7 @@ export interface BlockInsertMenuLegacyProps {
|
|
|
10
10
|
popupsBoundariesElement?: HTMLElement;
|
|
11
11
|
popupsScrollableElement?: HTMLElement;
|
|
12
12
|
onClick: React.MouseEventHandler;
|
|
13
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
13
14
|
onRef(el: HTMLElement): void;
|
|
14
15
|
onItemActivated(attrs: any): void;
|
|
15
16
|
onOpenChange(attrs: any): void;
|
|
@@ -9,6 +9,7 @@ export interface DropDownButtonProps {
|
|
|
9
9
|
'aria-haspopup': React.AriaAttributes['aria-haspopup'];
|
|
10
10
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
11
11
|
onClick: React.MouseEventHandler;
|
|
12
|
+
onKeyDown?: React.KeyboardEventHandler;
|
|
12
13
|
spacing: 'none' | 'default';
|
|
13
14
|
handleRef(el: ToolbarButtonRef): void;
|
|
14
15
|
}
|
|
@@ -21,6 +21,7 @@ export declare class ToolbarInsertBlock extends React.PureComponent<Props & Wrap
|
|
|
21
21
|
private handleDropDownButtonRef;
|
|
22
22
|
render(): jsx.JSX.Element | null;
|
|
23
23
|
private handleClick;
|
|
24
|
+
private handleOpenByKeyboard;
|
|
24
25
|
private toggleLinkPanel;
|
|
25
26
|
private insertMention;
|
|
26
27
|
private insertTable;
|
|
@@ -2,5 +2,7 @@ import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
3
3
|
import { LayoutPluginOptions } from './types';
|
|
4
4
|
export { pluginKey };
|
|
5
|
-
declare const layoutPlugin: NextEditorPlugin<'layout',
|
|
5
|
+
declare const layoutPlugin: NextEditorPlugin<'layout', {
|
|
6
|
+
pluginConfiguration: LayoutPluginOptions | undefined;
|
|
7
|
+
}>;
|
|
6
8
|
export default layoutPlugin;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '../../types';
|
|
2
2
|
import type { ListPluginOptions } from './types';
|
|
3
|
-
declare const listPlugin: NextEditorPlugin<'list',
|
|
3
|
+
declare const listPlugin: NextEditorPlugin<'list', {
|
|
4
|
+
pluginConfiguration: ListPluginOptions | undefined;
|
|
5
|
+
}>;
|
|
4
6
|
export default listPlugin;
|
|
@@ -7,5 +7,7 @@ export declare type MaxContentSizePluginState = {
|
|
|
7
7
|
maxContentSizeReached: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare function createPlugin(dispatch: Dispatch, maxContentSize?: number): SafePlugin | undefined;
|
|
10
|
-
declare const maxContentSizePlugin: NextEditorPlugin<'maxContentSize',
|
|
10
|
+
declare const maxContentSizePlugin: NextEditorPlugin<'maxContentSize', {
|
|
11
|
+
pluginConfiguration: number | undefined;
|
|
12
|
+
}>;
|
|
11
13
|
export default maxContentSizePlugin;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import type { Command } from '../../../types/command';
|
|
2
2
|
import type { MediaNodeWithPosHandler, MediaPluginState } from '../pm-plugins/types';
|
|
3
3
|
import { EditorState } from 'prosemirror-state';
|
|
4
|
-
export declare const findMediaSingleNode: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler | null;
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* However it is not of type mediaSingle.
|
|
5
|
+
* Note that Media Inline is inserted like a media single node into the media plugin state.
|
|
6
|
+
* Though it is not of type mediaSingle, it shares the same `findMediaSingleNode` method
|
|
9
7
|
*
|
|
10
|
-
* @param mediaPluginState
|
|
11
|
-
* @param id
|
|
12
|
-
* @param isMediaSingle
|
|
13
|
-
* @returns {MediaNodeWithPosHandler | null}
|
|
14
8
|
*/
|
|
15
|
-
export declare const
|
|
9
|
+
export declare const findMediaSingleNode: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler | null;
|
|
16
10
|
export declare const findAllMediaSingleNodes: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler[];
|
|
17
|
-
export declare const findMediaNode: (mediaPluginState: MediaPluginState, id: string, isMediaSingle: boolean) => MediaNodeWithPosHandler | null;
|
|
18
11
|
export declare const isMediaNode: (pos: number, state: EditorState) => boolean | null | undefined;
|
|
19
|
-
export declare const
|
|
12
|
+
export declare const updateAllMediaSingleNodesAttrs: (id: string, attrs: object) => Command;
|
|
20
13
|
export declare const updateCurrentMediaNodeAttrs: (attrs: object, mediaNode: MediaNodeWithPosHandler) => Command;
|
|
21
|
-
export declare const
|
|
14
|
+
export declare const updateMediaSingleNodeAttrs: (id: string, attrs: object) => Command;
|
|
22
15
|
export declare const replaceExternalMedia: (pos: number, attrs: object) => Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { updateMediaSingleNodeAttrs, updateAllMediaSingleNodesAttrs, replaceExternalMedia, } from './helpers';
|
|
@@ -4,5 +4,7 @@ import { MediaState } from './pm-plugins/main';
|
|
|
4
4
|
import { CustomMediaPicker, MediaOptions } from './types';
|
|
5
5
|
export type { MediaState, MediaProvider, CustomMediaPicker };
|
|
6
6
|
export { insertMediaSingleNode } from './utils/media-single';
|
|
7
|
-
declare const mediaPlugin: NextEditorPlugin<'media',
|
|
7
|
+
declare const mediaPlugin: NextEditorPlugin<'media', {
|
|
8
|
+
pluginConfiguration: MediaOptions | undefined;
|
|
9
|
+
}>;
|
|
8
10
|
export default mediaPlugin;
|
|
@@ -5,6 +5,7 @@ export declare class MediaNodeUpdater {
|
|
|
5
5
|
constructor();
|
|
6
6
|
static setMock(thisKey: string, value: any): void;
|
|
7
7
|
updateContextId(): Promise<void>;
|
|
8
|
+
updateNodeContextId(): Promise<void>;
|
|
8
9
|
getAttrs(): void;
|
|
9
10
|
getObjectId(): Promise<void>;
|
|
10
11
|
getNodeContextId(): void;
|
|
@@ -13,7 +14,8 @@ export declare class MediaNodeUpdater {
|
|
|
13
14
|
isNodeFromDifferentCollection(): Promise<void>;
|
|
14
15
|
hasDifferentContextId(): Promise<void>;
|
|
15
16
|
copyNode(): Promise<void>;
|
|
16
|
-
|
|
17
|
+
copyNodeFromPos(): Promise<void>;
|
|
18
|
+
updateMediaSingleFileAttrs(): Promise<void>;
|
|
17
19
|
uploadExternalMedia(): Promise<void>;
|
|
18
20
|
isMediaBlobUrl(): void;
|
|
19
21
|
copyNodeFromBlobUrl(): void;
|
|
@@ -26,9 +26,10 @@ export declare class MediaNodeUpdater {
|
|
|
26
26
|
constructor(props: MediaNodeUpdaterProps);
|
|
27
27
|
isMediaBlobUrl(): boolean;
|
|
28
28
|
updateContextId: () => Promise<void>;
|
|
29
|
+
updateNodeContextId: (getPos: ProsemirrorGetPosHandler) => Promise<void>;
|
|
29
30
|
private hasFileAttributesDefined;
|
|
30
31
|
private getNewFileAttrsForNode;
|
|
31
|
-
|
|
32
|
+
updateMediaSingleFileAttrs: () => Promise<void>;
|
|
32
33
|
updateNodeAttrs: (getPos: ProsemirrorGetPosHandler) => Promise<void>;
|
|
33
34
|
getAttrs: () => MediaADFAttrs | undefined;
|
|
34
35
|
getObjectId: () => Promise<string | null>;
|
|
@@ -40,5 +41,7 @@ export declare class MediaNodeUpdater {
|
|
|
40
41
|
isNodeFromDifferentCollection: () => Promise<boolean>;
|
|
41
42
|
handleExternalMedia(getPos: ProsemirrorGetPosHandler): Promise<void>;
|
|
42
43
|
copyNodeFromBlobUrl: (getPos: ProsemirrorGetPosHandler) => Promise<void>;
|
|
44
|
+
copyNodeFromPos: (getPos: ProsemirrorGetPosHandler, traceContext?: MediaTraceContext | undefined) => Promise<void>;
|
|
43
45
|
copyNode: (traceContext?: MediaTraceContext | undefined) => Promise<void>;
|
|
46
|
+
private copyFile;
|
|
44
47
|
}
|
|
@@ -27,7 +27,6 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
27
27
|
element?: HTMLElement;
|
|
28
28
|
layout: MediaSingleLayout;
|
|
29
29
|
mediaNodes: MediaNodeWithPosHandler[];
|
|
30
|
-
mediaGroupNodes: Record<string, any>;
|
|
31
30
|
options: MediaPluginOptions;
|
|
32
31
|
mediaProvider?: MediaProvider;
|
|
33
32
|
private view;
|
|
@@ -96,11 +95,9 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
96
95
|
private destroyPickers;
|
|
97
96
|
private initPickers;
|
|
98
97
|
private getInputMethod;
|
|
99
|
-
|
|
98
|
+
updateMediaSingleNodeAttrs: (id: string, attrs: object) => boolean | undefined;
|
|
100
99
|
private collectionFromProvider;
|
|
101
100
|
private handleMediaState;
|
|
102
|
-
setMediaGroupNode: (node: PMNode<any>, getPos: () => number) => void;
|
|
103
|
-
removeNodeById: (state: MediaState) => void;
|
|
104
101
|
removeSelectedMediaContainer: () => boolean;
|
|
105
102
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
106
103
|
handleDrag: (dragState: 'enter' | 'leave') => void;
|