@atlaskit/editor-core 185.2.24 → 185.2.26
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 +14 -0
- package/dist/cjs/editor-next/editor-internal.js +3 -3
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/labs/next/Editor.js +3 -3
- package/dist/cjs/labs/next/presets/universal.js +6 -5
- package/dist/cjs/nodeviews/index.js +1 -16
- package/dist/cjs/plugins/annotation/index.js +31 -21
- package/dist/cjs/plugins/annotation/nodeviews/index.js +2 -2
- package/dist/cjs/plugins/base/index.js +0 -6
- package/dist/cjs/plugins/caption/index.js +1 -2
- package/dist/cjs/plugins/caption/nodeviews/index.js +3 -3
- package/dist/cjs/plugins/caption/pm-plugins/main.js +4 -2
- package/dist/cjs/plugins/card/nodeviews/embedCard.js +4 -4
- package/dist/cjs/plugins/extension/actions.js +6 -4
- package/dist/cjs/plugins/extension/commands.js +19 -16
- package/dist/cjs/plugins/extension/context-panel.js +4 -4
- package/dist/cjs/plugins/extension/extension-api.js +1 -1
- package/dist/cjs/plugins/extension/index.js +11 -4
- package/dist/cjs/plugins/extension/nodeviews/extension.js +2 -2
- package/dist/cjs/plugins/extension/pm-plugins/keymap.js +2 -2
- package/dist/cjs/plugins/extension/pm-plugins/main.js +10 -5
- package/dist/cjs/plugins/extension/toolbar.js +8 -6
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +11 -6
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +5 -2
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/jira-issue/index.js +2 -2
- package/dist/cjs/plugins/media/index.js +2 -2
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +25 -19
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +3 -3
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +16 -10
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
- package/dist/cjs/plugins/media/pm-plugins/main.js +25 -8
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +2 -2
- package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +2 -2
- package/dist/cjs/plugins/unsupported-content/index.js +6 -4
- package/dist/cjs/test-utils.js +0 -7
- package/dist/cjs/ui/ContextPanel/index.js +9 -2
- package/dist/cjs/utils/action.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/editor-next/editor-internal.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/labs/next/Editor.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +7 -6
- package/dist/es2019/nodeviews/index.js +1 -2
- package/dist/es2019/plugins/annotation/index.js +34 -23
- package/dist/es2019/plugins/annotation/nodeviews/index.js +1 -1
- package/dist/es2019/plugins/base/index.js +0 -4
- package/dist/es2019/plugins/caption/index.js +1 -4
- package/dist/es2019/plugins/caption/nodeviews/index.js +2 -2
- package/dist/es2019/plugins/caption/pm-plugins/main.js +4 -2
- package/dist/es2019/plugins/card/nodeviews/embedCard.js +2 -2
- package/dist/es2019/plugins/extension/actions.js +6 -4
- package/dist/es2019/plugins/extension/commands.js +6 -7
- package/dist/es2019/plugins/extension/context-panel.js +4 -4
- package/dist/es2019/plugins/extension/extension-api.js +1 -1
- package/dist/es2019/plugins/extension/index.js +11 -4
- package/dist/es2019/plugins/extension/nodeviews/extension.js +1 -1
- package/dist/es2019/plugins/extension/pm-plugins/keymap.js +2 -2
- package/dist/es2019/plugins/extension/pm-plugins/main.js +10 -5
- package/dist/es2019/plugins/extension/toolbar.js +8 -4
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +11 -6
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +5 -2
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/jira-issue/index.js +1 -1
- package/dist/es2019/plugins/media/index.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +21 -14
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +2 -2
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +13 -9
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +28 -11
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/es2019/plugins/unsupported-content/index.js +1 -1
- package/dist/es2019/test-utils.js +0 -1
- package/dist/es2019/ui/ContextPanel/index.js +8 -1
- package/dist/es2019/utils/action.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/editor-next/editor-internal.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/labs/next/Editor.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +7 -6
- package/dist/esm/nodeviews/index.js +1 -2
- package/dist/esm/plugins/annotation/index.js +32 -22
- package/dist/esm/plugins/annotation/nodeviews/index.js +1 -1
- package/dist/esm/plugins/base/index.js +0 -6
- package/dist/esm/plugins/caption/index.js +1 -2
- package/dist/esm/plugins/caption/nodeviews/index.js +2 -2
- package/dist/esm/plugins/caption/pm-plugins/main.js +4 -2
- package/dist/esm/plugins/card/nodeviews/embedCard.js +4 -4
- package/dist/esm/plugins/extension/actions.js +6 -4
- package/dist/esm/plugins/extension/commands.js +18 -15
- package/dist/esm/plugins/extension/context-panel.js +4 -4
- package/dist/esm/plugins/extension/extension-api.js +1 -1
- package/dist/esm/plugins/extension/index.js +11 -4
- package/dist/esm/plugins/extension/nodeviews/extension.js +1 -1
- package/dist/esm/plugins/extension/pm-plugins/keymap.js +2 -2
- package/dist/esm/plugins/extension/pm-plugins/main.js +10 -5
- package/dist/esm/plugins/extension/toolbar.js +8 -6
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +11 -6
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -2
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/jira-issue/index.js +1 -1
- package/dist/esm/plugins/media/index.js +2 -2
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +24 -18
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +2 -2
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +15 -9
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +26 -9
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +1 -1
- package/dist/esm/plugins/unsupported-content/index.js +1 -1
- package/dist/esm/test-utils.js +0 -1
- package/dist/esm/ui/ContextPanel/index.js +8 -1
- package/dist/esm/utils/action.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/labs/next/internal/components/EditorInternal.d.ts +2 -2
- package/dist/types/labs/next/internal/editor-props-type.d.ts +1 -1
- package/dist/types/labs/next/internal/hooks/use-editor/create-editor.d.ts +1 -1
- package/dist/types/labs/next/presets/cxhtml.d.ts +18 -2
- package/dist/types/labs/next/presets/default.d.ts +36 -4
- package/dist/types/labs/next/presets/mobile.d.ts +18 -2
- package/dist/types/nodeviews/index.d.ts +0 -2
- package/dist/types/plugins/annotation/index.d.ts +3 -1
- package/dist/types/plugins/annotation/nodeviews/index.d.ts +2 -1
- package/dist/types/plugins/annotation/pm-plugins/types.d.ts +2 -2
- package/dist/types/plugins/caption/index.d.ts +1 -1
- package/dist/types/plugins/caption/nodeviews/index.d.ts +7 -4
- package/dist/types/plugins/caption/pm-plugins/main.d.ts +5 -4
- package/dist/types/plugins/card/nodeviews/embedCard.d.ts +2 -2
- package/dist/types/plugins/extension/actions.d.ts +2 -1
- package/dist/types/plugins/extension/commands.d.ts +4 -3
- package/dist/types/plugins/extension/context-panel.d.ts +2 -1
- package/dist/types/plugins/extension/extension-api.d.ts +2 -0
- package/dist/types/plugins/extension/index.d.ts +4 -2
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +3 -2
- package/dist/types/plugins/extension/pm-plugins/keymap.d.ts +2 -1
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +5 -3
- package/dist/types/plugins/extension/toolbar.d.ts +8 -1
- package/dist/types/plugins/extension/types.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +7 -3
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/media/index.d.ts +3 -1
- package/dist/types/plugins/media/nodeviews/mediaGroup.d.ts +5 -3
- package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +6 -3
- package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +6 -4
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +2 -2
- package/dist/types/plugins/media/types.d.ts +4 -0
- package/dist/types/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +1 -1
- package/dist/types/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +1 -1
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +1 -1
- package/dist/types/test-utils.d.ts +0 -1
- package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/labs/next/internal/components/EditorInternal.d.ts +2 -2
- package/dist/types-ts4.5/labs/next/internal/editor-props-type.d.ts +1 -1
- package/dist/types-ts4.5/labs/next/internal/hooks/use-editor/create-editor.d.ts +1 -1
- package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +20 -2
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +40 -4
- package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +20 -2
- package/dist/types-ts4.5/nodeviews/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/annotation/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/annotation/nodeviews/index.d.ts +2 -1
- package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +2 -2
- package/dist/types-ts4.5/plugins/caption/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/caption/nodeviews/index.d.ts +7 -4
- package/dist/types-ts4.5/plugins/caption/pm-plugins/main.d.ts +5 -4
- package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +2 -2
- package/dist/types-ts4.5/plugins/extension/actions.d.ts +2 -1
- package/dist/types-ts4.5/plugins/extension/commands.d.ts +4 -3
- package/dist/types-ts4.5/plugins/extension/context-panel.d.ts +2 -1
- package/dist/types-ts4.5/plugins/extension/extension-api.d.ts +2 -0
- package/dist/types-ts4.5/plugins/extension/index.d.ts +4 -2
- package/dist/types-ts4.5/plugins/extension/nodeviews/extension.d.ts +3 -2
- package/dist/types-ts4.5/plugins/extension/pm-plugins/keymap.d.ts +2 -1
- package/dist/types-ts4.5/plugins/extension/pm-plugins/main.d.ts +5 -3
- package/dist/types-ts4.5/plugins/extension/toolbar.d.ts +8 -1
- package/dist/types-ts4.5/plugins/extension/types.d.ts +2 -0
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +7 -3
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaGroup.d.ts +5 -3
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaInline.d.ts +6 -3
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/index.d.ts +6 -4
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/types.d.ts +4 -0
- package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +1 -1
- package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +1 -1
- package/dist/types-ts4.5/plugins/tasks-and-decisions/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/test-utils.d.ts +0 -1
- package/package.json +3 -2
- package/report.api.md +20 -85
- package/tmp/api-report-tmp.d.ts +18 -68
- package/dist/cjs/nodeviews/ReactNodeView.js +0 -224
- package/dist/cjs/nodeviews/SelectionBasedNodeView.js +0 -169
- package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +0 -72
- package/dist/cjs/plugins/context-panel/index.js +0 -66
- package/dist/cjs/plugins/context-panel/transforms.js +0 -13
- package/dist/cjs/plugins/context-panel/types.js +0 -5
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +0 -43
- package/dist/cjs/ui/PortalProvider/index.js +0 -252
- package/dist/es2019/nodeviews/ReactNodeView.js +0 -170
- package/dist/es2019/nodeviews/SelectionBasedNodeView.js +0 -158
- package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +0 -48
- package/dist/es2019/plugins/context-panel/index.js +0 -45
- package/dist/es2019/plugins/context-panel/transforms.js +0 -4
- package/dist/es2019/plugins/context-panel/types.js +0 -1
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +0 -37
- package/dist/es2019/ui/PortalProvider/index.js +0 -184
- package/dist/esm/nodeviews/ReactNodeView.js +0 -217
- package/dist/esm/nodeviews/SelectionBasedNodeView.js +0 -163
- package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +0 -62
- package/dist/esm/plugins/context-panel/index.js +0 -57
- package/dist/esm/plugins/context-panel/transforms.js +0 -6
- package/dist/esm/plugins/context-panel/types.js +0 -1
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +0 -36
- package/dist/esm/ui/PortalProvider/index.js +0 -242
- package/dist/types/nodeviews/ReactNodeView.d.ts +0 -52
- package/dist/types/nodeviews/SelectionBasedNodeView.d.ts +0 -53
- package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +0 -13
- package/dist/types/plugins/context-panel/index.d.ts +0 -11
- package/dist/types/plugins/context-panel/transforms.d.ts +0 -2
- package/dist/types/plugins/context-panel/types.d.ts +0 -1
- package/dist/types/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
- package/dist/types/ui/PortalProvider/index.d.ts +0 -51
- package/dist/types-ts4.5/nodeviews/ReactNodeView.d.ts +0 -52
- package/dist/types-ts4.5/nodeviews/SelectionBasedNodeView.d.ts +0 -53
- package/dist/types-ts4.5/plugins/base/pm-plugins/react-nodeview.d.ts +0 -13
- package/dist/types-ts4.5/plugins/context-panel/index.d.ts +0 -11
- package/dist/types-ts4.5/plugins/context-panel/transforms.d.ts +0 -2
- package/dist/types-ts4.5/plugins/context-panel/types.d.ts +0 -1
- package/dist/types-ts4.5/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
- package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +0 -51
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExtensionAPI } from '@atlaskit/editor-common/extensions';
|
|
2
2
|
import type { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { MacroProvider } from '../macro';
|
|
4
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
4
5
|
interface EditInLegacyMacroBrowserArgs {
|
|
5
6
|
view: EditorView;
|
|
6
7
|
macroProvider?: MacroProvider;
|
|
@@ -8,6 +9,7 @@ interface EditInLegacyMacroBrowserArgs {
|
|
|
8
9
|
export declare const getEditInLegacyMacroBrowser: ({ view, macroProvider, }: EditInLegacyMacroBrowserArgs) => () => void;
|
|
9
10
|
interface CreateExtensionAPIOptions {
|
|
10
11
|
editorView: EditorView;
|
|
12
|
+
applyChange: ApplyChangeHandler | undefined;
|
|
11
13
|
editInLegacyMacroBrowser?: () => void;
|
|
12
14
|
}
|
|
13
15
|
export declare const createExtensionAPI: (options: CreateExtensionAPIOptions) => ExtensionAPI;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
2
2
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
3
|
-
import { NextEditorPlugin, EditorAppearance } from '
|
|
3
|
+
import { NextEditorPlugin, EditorAppearance, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { LongPressSelectionPluginOptions } from '../selection/types';
|
|
5
5
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
6
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
|
+
import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
7
8
|
interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
8
9
|
allowAutoSave?: boolean;
|
|
9
10
|
breakoutEnabled?: boolean;
|
|
@@ -15,7 +16,8 @@ declare const extensionPlugin: NextEditorPlugin<'extension', {
|
|
|
15
16
|
dependencies: [
|
|
16
17
|
typeof featureFlagsPlugin,
|
|
17
18
|
typeof widthPlugin,
|
|
18
|
-
typeof decorationsPlugin
|
|
19
|
+
typeof decorationsPlugin,
|
|
20
|
+
OptionalPlugin<typeof contextPanelPlugin>
|
|
19
21
|
];
|
|
20
22
|
}>;
|
|
21
23
|
export default extensionPlugin;
|
|
@@ -5,8 +5,9 @@ import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
|
5
5
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import { PluginInjectionAPIWithDependency } from '@atlaskit/editor-common/types';
|
|
7
7
|
import { EditorAppearance } from '../../../types/editor-appearance';
|
|
8
|
-
import { ForwardRef, getPosHandler
|
|
9
|
-
import
|
|
8
|
+
import { ForwardRef, getPosHandler } from '../../../nodeviews';
|
|
9
|
+
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
10
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
10
11
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
11
12
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
12
13
|
interface ExtensionNodeViewOptions {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
|
|
2
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
3
|
+
export default function keymapPlugin(applyChange: ApplyChangeHandler | undefined): SafePlugin;
|
|
@@ -6,18 +6,20 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
6
6
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
8
|
import { EditorAppearance } from '../../../types/editor-appearance';
|
|
9
|
-
import { Dispatch, EventDispatcher } from '
|
|
10
|
-
import { PortalProviderAPI } from '
|
|
9
|
+
import { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
10
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
11
11
|
import { getPluginState, createCommand } from '../plugin-factory';
|
|
12
12
|
import { pluginKey } from '../plugin-key';
|
|
13
13
|
import type extensionPlugin from '../index';
|
|
14
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
14
15
|
export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
|
|
15
16
|
export declare const createContextIdentifierProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
16
|
-
export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, }: {
|
|
17
|
+
export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: {
|
|
17
18
|
view: EditorView;
|
|
18
19
|
prevState: EditorState;
|
|
19
20
|
domAtPos: EditorView['domAtPos'];
|
|
20
21
|
extensionHandlers: ExtensionHandlers;
|
|
22
|
+
applyChange: ApplyChangeHandler | undefined;
|
|
21
23
|
}) => true | undefined;
|
|
22
24
|
declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<typeof extensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
23
25
|
appearance?: EditorAppearance;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FloatingToolbarHandler } from '../floating-toolbar/types';
|
|
2
2
|
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
|
|
3
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
3
4
|
export declare const messages: {
|
|
4
5
|
edit: {
|
|
5
6
|
id: string;
|
|
@@ -32,4 +33,10 @@ export declare const messages: {
|
|
|
32
33
|
description: string;
|
|
33
34
|
};
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
+
interface GetToolbarConfigProps {
|
|
37
|
+
breakoutEnabled: boolean | undefined;
|
|
38
|
+
hoverDecoration: HoverDecorationHandler | undefined;
|
|
39
|
+
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
40
|
+
}
|
|
41
|
+
export declare const getToolbarConfig: ({ breakoutEnabled, hoverDecoration, applyChangeToContextPanel, }: GetToolbarConfigProps) => FloatingToolbarHandler;
|
|
42
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
2
2
|
import { UpdateExtension, ExtensionProvider, Parameters, TransformBefore, TransformAfter } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
3
4
|
export type ExtensionState<T extends Parameters = Parameters> = {
|
|
4
5
|
localId?: string;
|
|
5
6
|
autoSaveResolve?: () => void;
|
|
@@ -13,6 +14,7 @@ export type ExtensionState<T extends Parameters = Parameters> = {
|
|
|
13
14
|
processParametersBefore?: TransformBefore<T>;
|
|
14
15
|
processParametersAfter?: TransformAfter<T>;
|
|
15
16
|
positions?: Record<number, number>;
|
|
17
|
+
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
16
18
|
};
|
|
17
19
|
export type ExtensionAction<T extends Parameters = Parameters> = {
|
|
18
20
|
type: 'UPDATE_STATE';
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
import { Node as PMNode } from 'prosemirror-model';
|
|
3
3
|
import { EditorView } from 'prosemirror-view';
|
|
4
4
|
import type { ExtensionProvider } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
5
6
|
interface Props {
|
|
6
7
|
node: PMNode;
|
|
7
8
|
extensionProvider: ExtensionProvider;
|
|
8
9
|
editorView: EditorView;
|
|
9
10
|
separator?: 'start' | 'end' | 'both';
|
|
11
|
+
applyChangeToContextPanel: ApplyChangeHandler | undefined;
|
|
10
12
|
}
|
|
11
13
|
export declare const ExtensionsPlaceholder: (props: Props) => JSX.Element | null;
|
|
12
14
|
export {};
|
|
@@ -7,8 +7,9 @@ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
|
7
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { FloatingToolbarItem } from '../types';
|
|
9
9
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
10
|
-
import { FeatureFlags,
|
|
11
|
-
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
10
|
+
import { FeatureFlags, PluginInjectionAPIWithDependencies, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
11
|
+
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
12
|
+
import type { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
12
13
|
export type Item = FloatingToolbarItem<Function>;
|
|
13
14
|
export interface Props {
|
|
14
15
|
items: Array<Item>;
|
|
@@ -26,7 +27,10 @@ export interface Props {
|
|
|
26
27
|
extensionsProvider?: ExtensionProvider;
|
|
27
28
|
scrollable?: boolean;
|
|
28
29
|
featureFlags: FeatureFlags;
|
|
29
|
-
api:
|
|
30
|
+
api: PluginInjectionAPIWithDependencies<[
|
|
31
|
+
typeof decorationsPlugin,
|
|
32
|
+
OptionalPlugin<typeof contextPanelPlugin>
|
|
33
|
+
]> | undefined;
|
|
30
34
|
}
|
|
31
35
|
export declare const isSameItem: (leftItem: Item, rightItem: Item) => boolean;
|
|
32
36
|
export declare const areSameItems: (leftArr?: Array<Item>, rightArr?: Array<Item>) => boolean;
|
|
@@ -53,7 +53,6 @@ export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
|
|
|
53
53
|
export { default as scrollIntoViewPlugin } from './scroll-into-view';
|
|
54
54
|
export { default as mobileDimensionsPlugin } from './mobile-dimensions';
|
|
55
55
|
export { default as findReplacePlugin } from './find-replace';
|
|
56
|
-
export { default as contextPanelPlugin } from './context-panel';
|
|
57
56
|
export { default as selectionPlugin } from './selection';
|
|
58
57
|
export { default as mobileSelectionPlugin } from './mobile-selection';
|
|
59
58
|
export { default as clipboardPlugin } from './clipboard';
|
|
@@ -10,6 +10,7 @@ import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
|
10
10
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
11
11
|
import { MediaPluginState } from './pm-plugins/types';
|
|
12
12
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
13
|
+
import type editorDisabled from '../editor-disabled';
|
|
13
14
|
export type { MediaState, MediaProvider, CustomMediaPicker };
|
|
14
15
|
export { insertMediaSingleNode } from './utils/media-single';
|
|
15
16
|
declare const mediaPlugin: NextEditorPlugin<'media', {
|
|
@@ -20,7 +21,8 @@ declare const mediaPlugin: NextEditorPlugin<'media', {
|
|
|
20
21
|
typeof gridPlugin,
|
|
21
22
|
typeof widthPlugin,
|
|
22
23
|
typeof decorationsPlugin,
|
|
23
|
-
FloatingToolbarPlugin
|
|
24
|
+
FloatingToolbarPlugin,
|
|
25
|
+
typeof editorDisabled
|
|
24
26
|
];
|
|
25
27
|
sharedState: MediaPluginState | null;
|
|
26
28
|
}>;
|
|
@@ -4,11 +4,13 @@ import { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
4
4
|
import { Node as PMNode } from 'prosemirror-model';
|
|
5
5
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { EventDispatcher } from '
|
|
7
|
+
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
8
|
import { getPosHandler } from '../../../nodeviews/';
|
|
9
|
-
import { PortalProviderAPI } from '
|
|
9
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
10
10
|
import { MediaOptions } from '../types';
|
|
11
11
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
12
|
+
import type mediaPlugin from '../index';
|
|
13
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
12
14
|
export type MediaGroupProps = {
|
|
13
15
|
forwardRef?: (ref: HTMLElement) => void;
|
|
14
16
|
node: PMNode;
|
|
@@ -30,4 +32,4 @@ declare const IntlMediaGroup: React.FC<import("react-intl-next").WithIntlProps<M
|
|
|
30
32
|
WrappedComponent: React.ComponentType<MediaGroupProps>;
|
|
31
33
|
};
|
|
32
34
|
export default IntlMediaGroup;
|
|
33
|
-
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions
|
|
35
|
+
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
@@ -2,14 +2,17 @@ import { Node as PMNode } from 'prosemirror-model';
|
|
|
2
2
|
import { EditorView, NodeView } from 'prosemirror-view';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
5
|
-
import { getPosHandler, ProsemirrorGetPosHandler
|
|
5
|
+
import { getPosHandler, ProsemirrorGetPosHandler } from '../../../nodeviews/';
|
|
6
|
+
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
6
7
|
import { FileIdentifier } from '@atlaskit/media-client';
|
|
7
8
|
import { ProviderFactory, ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
8
9
|
import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
9
|
-
import { PortalProviderAPI } from '
|
|
10
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
10
11
|
import { MediaPluginState } from '../pm-plugins/types';
|
|
11
12
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
12
13
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
14
|
+
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
15
|
+
import type mediaPlugin from '../index';
|
|
13
16
|
export interface MediaInlineProps {
|
|
14
17
|
mediaProvider: Promise<MediaProvider>;
|
|
15
18
|
identifier: FileIdentifier;
|
|
@@ -44,4 +47,4 @@ export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInl
|
|
|
44
47
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
45
48
|
render(props: MediaInlineNodeViewProps): JSX.Element;
|
|
46
49
|
}
|
|
47
|
-
export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
50
|
+
export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
@@ -3,18 +3,20 @@ import { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { Providers, MediaProvider, ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import { Node as PMNode } from 'prosemirror-model';
|
|
6
|
-
import { EditorView } from 'prosemirror-view';
|
|
6
|
+
import { EditorView, Decoration } from 'prosemirror-view';
|
|
7
7
|
import { EventDispatcher } from '../../../../event-dispatcher';
|
|
8
|
-
import { getPosHandler
|
|
9
|
-
import {
|
|
8
|
+
import { getPosHandler } from '../../../../nodeviews';
|
|
9
|
+
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
10
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
10
11
|
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
11
12
|
import { MediaOptions } from '../../types';
|
|
12
13
|
import { MediaNodeViewProps } from '../types';
|
|
13
14
|
import { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
14
15
|
import type mediaPlugin from '../../index';
|
|
15
16
|
declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
17
|
+
private isSelected;
|
|
16
18
|
createDomRef(): HTMLElement;
|
|
17
|
-
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
19
|
+
viewShouldUpdate(nextNode: PMNode, decorations: Decoration[]): boolean;
|
|
18
20
|
stopEvent(event: Event): boolean;
|
|
19
21
|
getAttrs(): MediaADFAttrs;
|
|
20
22
|
isMediaBlobUrl(): boolean;
|
|
@@ -11,12 +11,12 @@ import { CardEvent } from '@atlaskit/media-card';
|
|
|
11
11
|
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
12
12
|
import { getPosHandler, ForwardRef } from '../../../nodeviews/';
|
|
13
13
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
14
|
-
import { PortalProviderAPI } from '
|
|
14
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
15
15
|
import { MediaOptions } from '../types';
|
|
16
16
|
import { MediaSingleNodeProps, MediaSingleNodeViewProps } from './types';
|
|
17
17
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
18
18
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
19
|
-
import ReactNodeView from '
|
|
19
|
+
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
20
20
|
import type mediaPlugin from '../index';
|
|
21
21
|
export interface MediaSingleNodeState {
|
|
22
22
|
width?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NodeView } from 'prosemirror-view';
|
|
2
2
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
3
3
|
import { getPosHandler } from '../../../nodeviews';
|
|
4
|
-
import { PortalProviderAPI } from '
|
|
4
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
5
5
|
export declare const decisionItemNodeView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher) => (node: any, view: any, getPos: getPosHandler) => NodeView;
|
|
@@ -2,7 +2,7 @@ import { NodeView } from 'prosemirror-view';
|
|
|
2
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { EventDispatcher } from '../../../event-dispatcher';
|
|
4
4
|
import { getPosHandler } from '../../../nodeviews';
|
|
5
|
-
import { PortalProviderAPI } from '
|
|
5
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
6
6
|
export interface Props {
|
|
7
7
|
providerFactory: ProviderFactory;
|
|
8
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import { Dispatch, EventDispatcher } from '../../../event-dispatcher';
|
|
4
|
-
import { PortalProviderAPI } from '
|
|
4
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
5
5
|
export declare function createPlugin(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, useLongPressSelection?: boolean): SafePlugin<any, any>;
|
|
@@ -27,7 +27,6 @@ type PluginData = {
|
|
|
27
27
|
export declare const createPMSchemaAndPlugins: (inputPreset?: EditorPresetBuilder<string[], AllEditorPresetPluginTypes[]>) => (pluginFactoryParams: Omit<LightPMPluginFactoryParams, 'schema'> & {
|
|
28
28
|
pluginInjectionAPI: EditorPluginInjectionAPI;
|
|
29
29
|
}) => PluginData;
|
|
30
|
-
export { PortalProviderAPI } from './ui/PortalProvider';
|
|
31
30
|
export { EventDispatcher } from './event-dispatcher';
|
|
32
31
|
export type { Dispatch } from './event-dispatcher';
|
|
33
32
|
export { GapCursorSelection, Side as GapCursorSide, } from './plugins/selection/gap-cursor/selection';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "185.2.
|
|
3
|
+
"version": "185.2.26",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -49,12 +49,13 @@
|
|
|
49
49
|
"@atlaskit/code": "^14.6.0",
|
|
50
50
|
"@atlaskit/date": "^0.10.0",
|
|
51
51
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
52
|
-
"@atlaskit/editor-common": "^74.
|
|
52
|
+
"@atlaskit/editor-common": "^74.8.0",
|
|
53
53
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
54
54
|
"@atlaskit/editor-markdown-transformer": "^5.2.0",
|
|
55
55
|
"@atlaskit/editor-palette": "1.5.0",
|
|
56
56
|
"@atlaskit/editor-plugin-analytics": "^0.0.2",
|
|
57
57
|
"@atlaskit/editor-plugin-content-insertion": "^0.0.2",
|
|
58
|
+
"@atlaskit/editor-plugin-context-panel": "^0.1.0",
|
|
58
59
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
59
60
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
60
61
|
"@atlaskit/editor-plugin-floating-toolbar": "^0.2.0",
|
package/report.api.md
CHANGED
|
@@ -121,6 +121,9 @@ import { PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
|
121
121
|
import { PluginConfig } from '@atlaskit/editor-plugin-table/types';
|
|
122
122
|
import { PluginKey } from 'prosemirror-state';
|
|
123
123
|
import { PMPlugin } from '@atlaskit/editor-common/types';
|
|
124
|
+
import { PortalProvider } from '@atlaskit/editor-common/portal-provider';
|
|
125
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
126
|
+
import { PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
124
127
|
import { PositionType } from '@atlaskit/tooltip/types';
|
|
125
128
|
import { PresenceProvider } from '@atlaskit/mention/resource';
|
|
126
129
|
import { PresenceResource } from '@atlaskit/mention/resource';
|
|
@@ -147,7 +150,6 @@ import { setTextSelection } from '@atlaskit/editor-common/utils';
|
|
|
147
150
|
import { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
148
151
|
import { TaskDecisionProvider } from '@atlaskit/task-decision';
|
|
149
152
|
import { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
150
|
-
import type { ThemeModes } from '@atlaskit/theme/types';
|
|
151
153
|
import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
|
|
152
154
|
import { Transaction } from 'prosemirror-state';
|
|
153
155
|
import { TransactionTracking } from '@atlaskit/editor-common/types';
|
|
@@ -259,16 +261,6 @@ interface BasePluginOptions {
|
|
|
259
261
|
ufo?: boolean;
|
|
260
262
|
}
|
|
261
263
|
|
|
262
|
-
// @public (undocumented)
|
|
263
|
-
type BasePortalProviderProps = {
|
|
264
|
-
render: (
|
|
265
|
-
portalProviderAPI: PortalProviderAPI,
|
|
266
|
-
) => JSX.Element | React_2.ReactChild | null;
|
|
267
|
-
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
268
|
-
useAnalyticsContext?: boolean;
|
|
269
|
-
themeMode?: ThemeModes;
|
|
270
|
-
} & WrappedComponentProps;
|
|
271
|
-
|
|
272
264
|
// @public (undocumented)
|
|
273
265
|
export class BaseReactEditorView<T = {}> extends ReactEditorView_2<T> {}
|
|
274
266
|
|
|
@@ -778,6 +770,19 @@ type EditorContextProps = {
|
|
|
778
770
|
editorActions?: EditorActions;
|
|
779
771
|
};
|
|
780
772
|
|
|
773
|
+
// @public (undocumented)
|
|
774
|
+
const editorDisabledPlugin: NextEditorPlugin<
|
|
775
|
+
'editorDisabled',
|
|
776
|
+
{
|
|
777
|
+
sharedState: EditorDisabledPluginState;
|
|
778
|
+
}
|
|
779
|
+
>;
|
|
780
|
+
|
|
781
|
+
// @public (undocumented)
|
|
782
|
+
type EditorDisabledPluginState = {
|
|
783
|
+
editorDisabled: boolean;
|
|
784
|
+
};
|
|
785
|
+
|
|
781
786
|
export { EditorFeatureFlags };
|
|
782
787
|
|
|
783
788
|
// @public (undocumented)
|
|
@@ -1561,6 +1566,7 @@ export const mediaPlugin: NextEditorPlugin<
|
|
|
1561
1566
|
typeof widthPlugin,
|
|
1562
1567
|
typeof decorationsPlugin,
|
|
1563
1568
|
FloatingToolbarPlugin,
|
|
1569
|
+
typeof editorDisabledPlugin,
|
|
1564
1570
|
];
|
|
1565
1571
|
sharedState: MediaPluginState | null;
|
|
1566
1572
|
}
|
|
@@ -1799,13 +1805,6 @@ type MobileUploadEndEventPayload = {
|
|
|
1799
1805
|
};
|
|
1800
1806
|
};
|
|
1801
1807
|
|
|
1802
|
-
// @public (undocumented)
|
|
1803
|
-
type MountedPortal = {
|
|
1804
|
-
children: () => React_2.ReactChild | null;
|
|
1805
|
-
hasAnalyticsContext: boolean;
|
|
1806
|
-
hasIntlContext: boolean;
|
|
1807
|
-
};
|
|
1808
|
-
|
|
1809
1808
|
// @public (undocumented)
|
|
1810
1809
|
const name_2: string;
|
|
1811
1810
|
export { name_2 as name };
|
|
@@ -1923,75 +1922,11 @@ interface PlaceholderTextOptions {
|
|
|
1923
1922
|
allowInserting?: boolean;
|
|
1924
1923
|
}
|
|
1925
1924
|
|
|
1926
|
-
|
|
1927
|
-
export const PortalProvider: React_2.FC<
|
|
1928
|
-
WithIntlProps<BasePortalProviderProps>
|
|
1929
|
-
> & {
|
|
1930
|
-
WrappedComponent: React_2.ComponentType<BasePortalProviderProps>;
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
// @public (undocumented)
|
|
1934
|
-
export class PortalProviderAPI extends EventDispatcher {
|
|
1935
|
-
constructor(
|
|
1936
|
-
intl: IntlShape,
|
|
1937
|
-
onAnalyticsEvent?: FireAnalyticsCallback,
|
|
1938
|
-
analyticsContext?: boolean,
|
|
1939
|
-
themeMode?: ThemeModes,
|
|
1940
|
-
);
|
|
1941
|
-
// (undocumented)
|
|
1942
|
-
context: any;
|
|
1943
|
-
// (undocumented)
|
|
1944
|
-
forceUpdate({
|
|
1945
|
-
intl,
|
|
1946
|
-
themeMode,
|
|
1947
|
-
}: {
|
|
1948
|
-
intl: IntlShape;
|
|
1949
|
-
themeMode: ThemeModes | undefined;
|
|
1950
|
-
}): void;
|
|
1951
|
-
// (undocumented)
|
|
1952
|
-
intl: IntlShape;
|
|
1953
|
-
// (undocumented)
|
|
1954
|
-
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
1955
|
-
// (undocumented)
|
|
1956
|
-
portals: Map<HTMLElement, MountedPortal>;
|
|
1957
|
-
// (undocumented)
|
|
1958
|
-
remove(container: HTMLElement): void;
|
|
1959
|
-
// (undocumented)
|
|
1960
|
-
render(
|
|
1961
|
-
children: () => JSX.Element | React_2.ReactChild | null,
|
|
1962
|
-
container: HTMLElement,
|
|
1963
|
-
hasAnalyticsContext?: boolean,
|
|
1964
|
-
hasIntlContext?: boolean,
|
|
1965
|
-
): void;
|
|
1966
|
-
// (undocumented)
|
|
1967
|
-
setContext: (context: any) => void;
|
|
1968
|
-
// (undocumented)
|
|
1969
|
-
themeMode?: ThemeModes;
|
|
1970
|
-
// (undocumented)
|
|
1971
|
-
useAnalyticsContext?: boolean;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
// @public (undocumented)
|
|
1975
|
-
export class PortalRenderer extends React_2.Component<
|
|
1976
|
-
{
|
|
1977
|
-
portalProviderAPI: PortalProviderAPI;
|
|
1978
|
-
},
|
|
1979
|
-
PortalRendererState
|
|
1980
|
-
> {
|
|
1981
|
-
constructor(props: { portalProviderAPI: PortalProviderAPI });
|
|
1982
|
-
// (undocumented)
|
|
1983
|
-
handleUpdate: (portals: Portals) => void;
|
|
1984
|
-
// (undocumented)
|
|
1985
|
-
render(): JSX.Element;
|
|
1986
|
-
}
|
|
1925
|
+
export { PortalProvider };
|
|
1987
1926
|
|
|
1988
|
-
|
|
1989
|
-
type PortalRendererState = {
|
|
1990
|
-
portals: Portals;
|
|
1991
|
-
};
|
|
1927
|
+
export { PortalProviderAPI };
|
|
1992
1928
|
|
|
1993
|
-
|
|
1994
|
-
type Portals = Map<HTMLElement, React_2.ReactChild>;
|
|
1929
|
+
export { PortalRenderer };
|
|
1995
1930
|
|
|
1996
1931
|
// @public (undocumented)
|
|
1997
1932
|
type Predicate = (state: EditorState, view?: EditorView) => boolean;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -110,6 +110,9 @@ import { PerformanceTracking } from '@atlaskit/editor-common/types';
|
|
|
110
110
|
import { PluginConfig } from '@atlaskit/editor-plugin-table/types';
|
|
111
111
|
import { PluginKey } from 'prosemirror-state';
|
|
112
112
|
import { PMPlugin } from '@atlaskit/editor-common/types';
|
|
113
|
+
import { PortalProvider } from '@atlaskit/editor-common/portal-provider';
|
|
114
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
115
|
+
import { PortalRenderer } from '@atlaskit/editor-common/portal-provider';
|
|
113
116
|
import { PositionType } from '@atlaskit/tooltip/types';
|
|
114
117
|
import { PresenceProvider } from '@atlaskit/mention/resource';
|
|
115
118
|
import { PresenceResource } from '@atlaskit/mention/resource';
|
|
@@ -136,7 +139,6 @@ import { setTextSelection } from '@atlaskit/editor-common/utils';
|
|
|
136
139
|
import { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
137
140
|
import { TaskDecisionProvider } from '@atlaskit/task-decision';
|
|
138
141
|
import { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
139
|
-
import type { ThemeModes } from '@atlaskit/theme/types';
|
|
140
142
|
import { ToolbarUIComponentFactory } from '@atlaskit/editor-common/types';
|
|
141
143
|
import { Transaction } from 'prosemirror-state';
|
|
142
144
|
import { TransactionTracking } from '@atlaskit/editor-common/types';
|
|
@@ -246,14 +248,6 @@ interface BasePluginOptions {
|
|
|
246
248
|
ufo?: boolean;
|
|
247
249
|
}
|
|
248
250
|
|
|
249
|
-
// @public (undocumented)
|
|
250
|
-
type BasePortalProviderProps = {
|
|
251
|
-
render: (portalProviderAPI: PortalProviderAPI) => JSX.Element | React_2.ReactChild | null;
|
|
252
|
-
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
253
|
-
useAnalyticsContext?: boolean;
|
|
254
|
-
themeMode?: ThemeModes;
|
|
255
|
-
} & WrappedComponentProps;
|
|
256
|
-
|
|
257
251
|
// @public (undocumented)
|
|
258
252
|
export class BaseReactEditorView<T = {}> extends ReactEditorView_2<T> {
|
|
259
253
|
}
|
|
@@ -711,6 +705,16 @@ type EditorContextProps = {
|
|
|
711
705
|
editorActions?: EditorActions;
|
|
712
706
|
};
|
|
713
707
|
|
|
708
|
+
// @public (undocumented)
|
|
709
|
+
const editorDisabledPlugin: NextEditorPlugin<'editorDisabled', {
|
|
710
|
+
sharedState: EditorDisabledPluginState;
|
|
711
|
+
}>;
|
|
712
|
+
|
|
713
|
+
// @public (undocumented)
|
|
714
|
+
type EditorDisabledPluginState = {
|
|
715
|
+
editorDisabled: boolean;
|
|
716
|
+
};
|
|
717
|
+
|
|
714
718
|
export { EditorFeatureFlags }
|
|
715
719
|
|
|
716
720
|
// @public (undocumented)
|
|
@@ -1394,7 +1398,8 @@ export const mediaPlugin: NextEditorPlugin<'media', {
|
|
|
1394
1398
|
typeof gridPlugin,
|
|
1395
1399
|
typeof widthPlugin,
|
|
1396
1400
|
typeof decorationsPlugin,
|
|
1397
|
-
FloatingToolbarPlugin
|
|
1401
|
+
FloatingToolbarPlugin,
|
|
1402
|
+
typeof editorDisabledPlugin
|
|
1398
1403
|
];
|
|
1399
1404
|
sharedState: MediaPluginState | null;
|
|
1400
1405
|
}>;
|
|
@@ -1599,13 +1604,6 @@ type MobileUploadEndEventPayload = {
|
|
|
1599
1604
|
};
|
|
1600
1605
|
};
|
|
1601
1606
|
|
|
1602
|
-
// @public (undocumented)
|
|
1603
|
-
type MountedPortal = {
|
|
1604
|
-
children: () => React_2.ReactChild | null;
|
|
1605
|
-
hasAnalyticsContext: boolean;
|
|
1606
|
-
hasIntlContext: boolean;
|
|
1607
|
-
};
|
|
1608
|
-
|
|
1609
1607
|
// @public (undocumented)
|
|
1610
1608
|
const name_2: string;
|
|
1611
1609
|
export { name_2 as name }
|
|
@@ -1711,59 +1709,11 @@ interface PlaceholderTextOptions {
|
|
|
1711
1709
|
allowInserting?: boolean;
|
|
1712
1710
|
}
|
|
1713
1711
|
|
|
1714
|
-
|
|
1715
|
-
export const PortalProvider: React_2.FC<WithIntlProps<BasePortalProviderProps>> & {
|
|
1716
|
-
WrappedComponent: React_2.ComponentType<BasePortalProviderProps>;
|
|
1717
|
-
};
|
|
1712
|
+
export { PortalProvider }
|
|
1718
1713
|
|
|
1719
|
-
|
|
1720
|
-
export class PortalProviderAPI extends EventDispatcher {
|
|
1721
|
-
constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean, themeMode?: ThemeModes);
|
|
1722
|
-
// (undocumented)
|
|
1723
|
-
context: any;
|
|
1724
|
-
// (undocumented)
|
|
1725
|
-
forceUpdate({ intl, themeMode, }: {
|
|
1726
|
-
intl: IntlShape;
|
|
1727
|
-
themeMode: ThemeModes | undefined;
|
|
1728
|
-
}): void;
|
|
1729
|
-
// (undocumented)
|
|
1730
|
-
intl: IntlShape;
|
|
1731
|
-
// (undocumented)
|
|
1732
|
-
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
1733
|
-
// (undocumented)
|
|
1734
|
-
portals: Map<HTMLElement, MountedPortal>;
|
|
1735
|
-
// (undocumented)
|
|
1736
|
-
remove(container: HTMLElement): void;
|
|
1737
|
-
// (undocumented)
|
|
1738
|
-
render(children: () => JSX.Element | React_2.ReactChild | null, container: HTMLElement, hasAnalyticsContext?: boolean, hasIntlContext?: boolean): void;
|
|
1739
|
-
// (undocumented)
|
|
1740
|
-
setContext: (context: any) => void;
|
|
1741
|
-
// (undocumented)
|
|
1742
|
-
themeMode?: ThemeModes;
|
|
1743
|
-
// (undocumented)
|
|
1744
|
-
useAnalyticsContext?: boolean;
|
|
1745
|
-
}
|
|
1714
|
+
export { PortalProviderAPI }
|
|
1746
1715
|
|
|
1747
|
-
|
|
1748
|
-
export class PortalRenderer extends React_2.Component<{
|
|
1749
|
-
portalProviderAPI: PortalProviderAPI;
|
|
1750
|
-
}, PortalRendererState> {
|
|
1751
|
-
constructor(props: {
|
|
1752
|
-
portalProviderAPI: PortalProviderAPI;
|
|
1753
|
-
});
|
|
1754
|
-
// (undocumented)
|
|
1755
|
-
handleUpdate: (portals: Portals) => void;
|
|
1756
|
-
// (undocumented)
|
|
1757
|
-
render(): JSX.Element;
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
// @public (undocumented)
|
|
1761
|
-
type PortalRendererState = {
|
|
1762
|
-
portals: Portals;
|
|
1763
|
-
};
|
|
1764
|
-
|
|
1765
|
-
// @public (undocumented)
|
|
1766
|
-
type Portals = Map<HTMLElement, React_2.ReactChild>;
|
|
1716
|
+
export { PortalRenderer }
|
|
1767
1717
|
|
|
1768
1718
|
// @public (undocumented)
|
|
1769
1719
|
type Predicate = (state: EditorState, view?: EditorView) => boolean;
|