@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,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';
|
|
@@ -13,7 +13,7 @@ import { Dispatch, EventDispatcher } from '../event-dispatcher';
|
|
|
13
13
|
import { AnalyticsEventPayload, DispatchAnalyticsEvent, FULL_WIDTH_MODE } from '@atlaskit/editor-common/analytics';
|
|
14
14
|
import { EditorAppearance, EditorConfig, EditorReactContext, EditorPlugin, EditorProps } from '../types';
|
|
15
15
|
import type { EditorNextProps } from '../types/editor-props';
|
|
16
|
-
import { PortalProviderAPI } from '
|
|
16
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
17
17
|
import { SEVERITY } from '@atlaskit/editor-common/utils';
|
|
18
18
|
import { TransactionTracker } from '../utils/performance/track-transactions';
|
|
19
19
|
import type { FireAnalyticsCallback } from '@atlaskit/editor-common/analytics';
|
|
@@ -68,7 +68,7 @@ export { getDefaultPresetOptionsFromEditorProps } from './create-editor';
|
|
|
68
68
|
export type { Command, EditorPlugin, EditorProps, EditorInstance, CommandDispatch, } from './types';
|
|
69
69
|
export { default as EditorActions } from './actions';
|
|
70
70
|
export type { MacroProvider, MacroAttributes, ExtensionType, CardProvider, } from '@atlaskit/editor-common/provider-factory';
|
|
71
|
-
export { PortalProvider, PortalProviderAPI, PortalRenderer, } from '
|
|
71
|
+
export { PortalProvider, PortalProviderAPI, PortalRenderer, } from '@atlaskit/editor-common/portal-provider';
|
|
72
72
|
export { GapCursorSelection, Side as GapCursorSide, } from './plugins/selection/gap-cursor-selection';
|
|
73
73
|
export type { HistoryPluginState } from './plugins/history/types';
|
|
74
74
|
export type { MentionPluginState } from './plugins/mentions/types';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
export declare const EditorInternal: React.FC<import("react-intl-next").WithIntlProps<import("../editor-props-type").EditorProps & {
|
|
4
|
-
portalProviderAPI: import("
|
|
4
|
+
portalProviderAPI: import("@atlaskit/editor-common/portal-provider").PortalProviderAPI;
|
|
5
5
|
} & WrappedComponentProps<"intl">>> & {
|
|
6
6
|
WrappedComponent: React.ComponentType<import("../editor-props-type").EditorProps & {
|
|
7
|
-
portalProviderAPI: import("
|
|
7
|
+
portalProviderAPI: import("@atlaskit/editor-common/portal-provider").PortalProviderAPI;
|
|
8
8
|
} & WrappedComponentProps<"intl">>;
|
|
9
9
|
};
|
|
@@ -4,7 +4,7 @@ import EditorActions from '../../../actions';
|
|
|
4
4
|
import { Transformer } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { EditorPlugin } from '../../../types';
|
|
6
6
|
import { FireAnalyticsCallback } from '../../../plugins/analytics';
|
|
7
|
-
import { PortalProviderAPI } from '
|
|
7
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
8
8
|
export type EditorProps = {
|
|
9
9
|
plugins?: Array<EditorPlugin>;
|
|
10
10
|
transformer?: (schema: Schema) => Transformer<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
3
|
import EditorActions from '../../../../../actions';
|
|
4
|
-
import { PortalProviderAPI } from '
|
|
4
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
5
5
|
import { EditorSharedConfig } from '../../context/shared-config';
|
|
6
6
|
import { EditorPropsExtended } from '../../editor-props-type';
|
|
7
7
|
import { FeatureFlags } from '../../../../../types/feature-flags';
|
|
@@ -150,7 +150,16 @@ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeh
|
|
|
150
150
|
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
151
151
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
152
152
|
};
|
|
153
|
-
}
|
|
153
|
+
}>,
|
|
154
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"contextPanel", {
|
|
155
|
+
actions: {
|
|
156
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
157
|
+
};
|
|
158
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"contextPanel", {
|
|
159
|
+
actions: {
|
|
160
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
161
|
+
};
|
|
162
|
+
}>>
|
|
154
163
|
];
|
|
155
164
|
actions: {
|
|
156
165
|
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
@@ -176,7 +185,16 @@ export declare function useCXHTMLPreset({ mentionProvider, mediaProvider, placeh
|
|
|
176
185
|
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
177
186
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
178
187
|
};
|
|
179
|
-
}
|
|
188
|
+
}>,
|
|
189
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"contextPanel", {
|
|
190
|
+
actions: {
|
|
191
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
192
|
+
};
|
|
193
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"contextPanel", {
|
|
194
|
+
actions: {
|
|
195
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
196
|
+
};
|
|
197
|
+
}>>
|
|
180
198
|
];
|
|
181
199
|
actions: {
|
|
182
200
|
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
@@ -179,7 +179,16 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
179
179
|
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
180
180
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
181
181
|
};
|
|
182
|
-
}
|
|
182
|
+
}>,
|
|
183
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"contextPanel", {
|
|
184
|
+
actions: {
|
|
185
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
186
|
+
};
|
|
187
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"contextPanel", {
|
|
188
|
+
actions: {
|
|
189
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
190
|
+
};
|
|
191
|
+
}>>
|
|
183
192
|
];
|
|
184
193
|
actions: {
|
|
185
194
|
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
@@ -205,7 +214,16 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
205
214
|
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
206
215
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
207
216
|
};
|
|
208
|
-
}
|
|
217
|
+
}>,
|
|
218
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"contextPanel", {
|
|
219
|
+
actions: {
|
|
220
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
221
|
+
};
|
|
222
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"contextPanel", {
|
|
223
|
+
actions: {
|
|
224
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
225
|
+
};
|
|
226
|
+
}>>
|
|
209
227
|
];
|
|
210
228
|
actions: {
|
|
211
229
|
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
@@ -476,7 +494,16 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
476
494
|
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
477
495
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
478
496
|
};
|
|
479
|
-
}
|
|
497
|
+
}>,
|
|
498
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"contextPanel", {
|
|
499
|
+
actions: {
|
|
500
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
501
|
+
};
|
|
502
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"contextPanel", {
|
|
503
|
+
actions: {
|
|
504
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
505
|
+
};
|
|
506
|
+
}>>
|
|
480
507
|
];
|
|
481
508
|
actions: {
|
|
482
509
|
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
@@ -502,7 +529,16 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
502
529
|
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
503
530
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
504
531
|
};
|
|
505
|
-
}
|
|
532
|
+
}>,
|
|
533
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"contextPanel", {
|
|
534
|
+
actions: {
|
|
535
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
536
|
+
};
|
|
537
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"contextPanel", {
|
|
538
|
+
actions: {
|
|
539
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
540
|
+
};
|
|
541
|
+
}>>
|
|
506
542
|
];
|
|
507
543
|
actions: {
|
|
508
544
|
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
@@ -153,7 +153,16 @@ export declare function useMobilePreset({ media, placeholder, maxContentSize, cr
|
|
|
153
153
|
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
154
154
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
155
155
|
};
|
|
156
|
-
}
|
|
156
|
+
}>,
|
|
157
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"contextPanel", {
|
|
158
|
+
actions: {
|
|
159
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
160
|
+
};
|
|
161
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"contextPanel", {
|
|
162
|
+
actions: {
|
|
163
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
164
|
+
};
|
|
165
|
+
}>>
|
|
157
166
|
];
|
|
158
167
|
actions: {
|
|
159
168
|
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
@@ -179,7 +188,16 @@ export declare function useMobilePreset({ media, placeholder, maxContentSize, cr
|
|
|
179
188
|
hoverDecoration: (nodeType: import("prosemirror-model").NodeType<any> | import("prosemirror-model").NodeType<any>[], add: boolean, className?: string | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
180
189
|
removeDecoration: import("@atlaskit/editor-common/types").Command;
|
|
181
190
|
};
|
|
182
|
-
}
|
|
191
|
+
}>,
|
|
192
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<(config?: undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"contextPanel", {
|
|
193
|
+
actions: {
|
|
194
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
195
|
+
};
|
|
196
|
+
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"contextPanel", {
|
|
197
|
+
actions: {
|
|
198
|
+
applyChange: (tr: import("prosemirror-state").Transaction<any>) => import("prosemirror-state").Transaction<any>;
|
|
199
|
+
};
|
|
200
|
+
}>>
|
|
183
201
|
];
|
|
184
202
|
actions: {
|
|
185
203
|
forceFocusSelector: import("@atlaskit/editor-plugin-floating-toolbar").ForceFocusSelector;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { 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
|
+
import type { InlineCommentPluginState } from './pm-plugins/types';
|
|
4
5
|
declare const annotationPlugin: NextEditorPlugin<'annotation', {
|
|
5
6
|
pluginConfiguration: AnnotationProviders | undefined;
|
|
7
|
+
sharedState: InlineCommentPluginState | undefined;
|
|
6
8
|
}>;
|
|
7
9
|
export default annotationPlugin;
|
|
8
10
|
export { AnnotationUpdateEmitter };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ForwardRef } from '../../../nodeviews';
|
|
3
|
+
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
3
4
|
export declare class AnnotationNodeView extends ReactNodeView {
|
|
4
5
|
createDomRef(): HTMLSpanElement;
|
|
5
6
|
getContentDOM(): {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DecorationSet } from 'prosemirror-view';
|
|
2
2
|
import { EditorState, SelectionBookmark } from 'prosemirror-state';
|
|
3
|
-
import { PortalProviderAPI } from '
|
|
4
|
-
import { Dispatch, EventDispatcher } from '
|
|
3
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
4
|
+
import { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
5
|
import { InlineCommentAnnotationProvider, AnnotationInfo } from '../types';
|
|
6
6
|
export declare enum ACTIONS {
|
|
7
7
|
UPDATE_INLINE_COMMENT_STATE = 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
2
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
3
|
declare const captionPlugin: NextEditorPlugin<'caption', {
|
|
4
4
|
dependencies: [
|
|
5
5
|
typeof analyticsPlugin
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { Node as PMNode } from 'prosemirror-model';
|
|
4
|
-
import { getPosHandler, ForwardRef
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { getPosHandler, ForwardRef } from '../../../nodeviews/';
|
|
5
|
+
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
6
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
7
|
+
import { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type captionPlugin from '../index';
|
|
7
10
|
export declare class CaptionNodeView extends SelectionBasedNodeView {
|
|
8
11
|
private selected;
|
|
9
12
|
createDomRef(): HTMLElement;
|
|
@@ -13,4 +16,4 @@ export declare class CaptionNodeView extends SelectionBasedNodeView {
|
|
|
13
16
|
render(_props: never, forwardRef: ForwardRef): JSX.Element;
|
|
14
17
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
15
18
|
}
|
|
16
|
-
export default function captionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher): (node: PMNode, view: EditorView, getPos: getPosHandler) => CaptionNodeView;
|
|
19
|
+
export default function captionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<typeof captionPlugin> | undefined): (node: PMNode, view: EditorView, getPos: getPosHandler) => CaptionNodeView;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { PortalProviderAPI } from '
|
|
3
|
-
import { Dispatch, EventDispatcher } from '
|
|
2
|
+
import { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
3
|
+
import { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type captionPlugin from '../index';
|
|
7
|
+
declare const _default: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, dispatch: Dispatch, pluginInjectionApi: ExtractInjectionAPI<typeof captionPlugin> | undefined) => SafePlugin<any, any>;
|
|
7
8
|
export default _default;
|
|
@@ -3,7 +3,7 @@ import { Node as PMNode } from 'prosemirror-model';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { SmartCardProps } from './genericCard';
|
|
5
5
|
import { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
6
|
-
import
|
|
6
|
+
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
7
7
|
export type EmbedCardState = {
|
|
8
8
|
hasPreview: boolean;
|
|
9
9
|
liveHeight?: number;
|
|
@@ -39,7 +39,7 @@ export declare class EmbedCardComponent extends React.PureComponent<SmartCardPro
|
|
|
39
39
|
render(): JSX.Element;
|
|
40
40
|
}
|
|
41
41
|
export type EmbedCardNodeViewProps = Pick<SmartCardProps, 'eventDispatcher' | 'allowResizing' | 'platform' | 'fullWidthMode' | 'dispatchAnalyticsEvent' | 'pluginInjectionApi'>;
|
|
42
|
-
export declare class EmbedCard extends
|
|
42
|
+
export declare class EmbedCard extends ReactNodeView<EmbedCardNodeViewProps> {
|
|
43
43
|
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
44
44
|
createDomRef(): HTMLElement;
|
|
45
45
|
render(): JSX.Element;
|
|
@@ -6,6 +6,7 @@ import { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
|
6
6
|
export { transformSliceToRemoveOpenBodiedExtension } from '@atlaskit/editor-common/transforms';
|
|
7
7
|
import { Command, CommandDispatch } from '../../types';
|
|
8
8
|
import EditorActions from '../../actions';
|
|
9
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
9
10
|
export declare const buildExtensionNode: <S extends Schema<any, any>>(type: 'inlineExtension' | 'extension' | 'bodiedExtension', schema: S, attrs: object, content?: Fragment, marks?: Mark<S>[] | undefined) => PmNode<Schema<any, any>>;
|
|
10
11
|
export declare const performNodeUpdate: (type: 'inlineExtension' | 'extension' | 'bodiedExtension', newAttrs: object, content: Fragment<any>, marks: Mark[], shouldScrollIntoView: boolean) => Command;
|
|
11
12
|
export declare const updateExtensionParams: (updateExtension: UpdateExtension<object>, node: {
|
|
@@ -13,4 +14,4 @@ export declare const updateExtensionParams: (updateExtension: UpdateExtension<ob
|
|
|
13
14
|
pos: number;
|
|
14
15
|
}, actions: ExtensionAPI) => (state: EditorState, dispatch?: CommandDispatch, view?: EditorView) => Promise<boolean>;
|
|
15
16
|
export declare const editSelectedExtension: (editorActions: EditorActions) => boolean;
|
|
16
|
-
export declare const editExtension: (macroProvider: MacroProvider | null, updateExtension?: Promise<UpdateExtension<object> | void>) => Command;
|
|
17
|
+
export declare const editExtension: (macroProvider: MacroProvider | null, applyChangeToContextPanel: ApplyChangeHandler | undefined, updateExtension?: Promise<UpdateExtension<object> | void>) => Command;
|
|
@@ -2,10 +2,11 @@ import { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
|
2
2
|
import { Node as PMNode } from 'prosemirror-model';
|
|
3
3
|
import { ExtensionState } from './types';
|
|
4
4
|
import { Parameters, TransformBefore, TransformAfter } from '@atlaskit/editor-common/src/extensions';
|
|
5
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
5
6
|
export declare function updateState(state: Partial<ExtensionState>): import("@atlaskit/editor-common/types").Command;
|
|
6
|
-
export declare function setEditingContextToContextPanel<T extends Parameters = Parameters>(processParametersBefore: TransformBefore<T>, processParametersAfter: TransformAfter<T
|
|
7
|
-
export declare const clearEditingContext: import("@atlaskit/editor-common/types").Command;
|
|
8
|
-
export declare const forceAutoSave: (resolve: () => void, reject?: ((reason?: any) => void) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
7
|
+
export declare function setEditingContextToContextPanel<T extends Parameters = Parameters>(processParametersBefore: TransformBefore<T>, processParametersAfter: TransformAfter<T>, applyChangeToContextPanel: ApplyChangeHandler | undefined): import("@atlaskit/editor-common/types").Command;
|
|
8
|
+
export declare const clearEditingContext: (applyChangeToContextPanel: ApplyChangeHandler | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
9
|
+
export declare const forceAutoSave: (applyChangeToContextPanel: ApplyChangeHandler | undefined) => (resolve: () => void, reject?: ((reason?: any) => void) | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
9
10
|
export declare const updateExtensionLayout: (layout: ExtensionLayout) => import("@atlaskit/editor-common/types").Command;
|
|
10
11
|
export declare const removeExtension: () => import("@atlaskit/editor-common/types").Command;
|
|
11
12
|
export declare const removeDescendantNodes: (sourceNode?: PMNode) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -3,5 +3,6 @@ import { EditorState } from 'prosemirror-state';
|
|
|
3
3
|
import { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from 'prosemirror-view';
|
|
5
5
|
import type { ContentNodeWithPos } from 'prosemirror-utils';
|
|
6
|
-
|
|
6
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
7
|
+
export declare const getContextPanel: (allowAutoSave?: boolean, featureFlags?: FeatureFlags, applyChange?: ApplyChangeHandler) => (state: EditorState) => JSX.Element | undefined;
|
|
7
8
|
export declare function onChangeAction(editorView: EditorView, updatedParameters: object | undefined, oldParameters: object | undefined, nodeWithPos: ContentNodeWithPos, onSaving?: () => void): Promise<void>;
|