@atlaskit/editor-core 187.44.8 → 187.44.11
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 +12 -0
- package/dist/cjs/plugins/media/commands/linking.js +1 -1
- package/dist/cjs/plugins/media/index.js +0 -1
- package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +5 -6
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +2 -3
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +5 -7
- package/dist/cjs/plugins/media/pm-plugins/alt-text/commands.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/alt-text/index.js +2 -3
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -2
- package/dist/cjs/plugins/media/pm-plugins/keymap-media-single.js +1 -1
- package/dist/cjs/plugins/media/pm-plugins/linking/index.js +2 -2
- package/dist/cjs/plugins/media/pm-plugins/main.js +1 -3
- package/dist/cjs/plugins/media/toolbar/alt-text.js +1 -1
- package/dist/cjs/plugins/media/toolbar/index.js +6 -4
- package/dist/cjs/plugins/media/toolbar/linking-toolbar-appearance.js +5 -6
- package/dist/cjs/plugins/media/ui/ImageBorder/index.js +2 -3
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +2 -2
- package/dist/cjs/plugins/media/utils/media-common.js +8 -8
- package/dist/cjs/plugins/media/utils/media-files.js +7 -8
- package/dist/cjs/plugins/media/utils/media-single.js +4 -6
- package/dist/cjs/utils/document.js +9 -18
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/media/commands/linking.js +2 -2
- package/dist/es2019/plugins/media/index.js +0 -1
- package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +1 -2
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +1 -3
- package/dist/es2019/plugins/media/pm-plugins/alt-text/commands.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/alt-text/index.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -2
- package/dist/es2019/plugins/media/pm-plugins/keymap-media-single.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/linking/index.js +1 -1
- package/dist/es2019/plugins/media/pm-plugins/main.js +1 -3
- package/dist/es2019/plugins/media/toolbar/alt-text.js +1 -1
- package/dist/es2019/plugins/media/toolbar/index.js +1 -1
- package/dist/es2019/plugins/media/toolbar/linking-toolbar-appearance.js +2 -3
- package/dist/es2019/plugins/media/ui/ImageBorder/index.js +1 -1
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/es2019/plugins/media/utils/media-common.js +6 -4
- package/dist/es2019/plugins/media/utils/media-files.js +1 -2
- package/dist/es2019/plugins/media/utils/media-single.js +1 -3
- package/dist/es2019/utils/document.js +2 -19
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/media/commands/linking.js +2 -2
- package/dist/esm/plugins/media/index.js +0 -1
- package/dist/esm/plugins/media/nodeviews/mediaGroup.js +1 -2
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +1 -3
- package/dist/esm/plugins/media/pm-plugins/alt-text/commands.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/alt-text/index.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +1 -2
- package/dist/esm/plugins/media/pm-plugins/keymap-media-single.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/linking/index.js +1 -1
- package/dist/esm/plugins/media/pm-plugins/main.js +1 -3
- package/dist/esm/plugins/media/toolbar/alt-text.js +1 -1
- package/dist/esm/plugins/media/toolbar/index.js +1 -1
- package/dist/esm/plugins/media/toolbar/linking-toolbar-appearance.js +2 -3
- package/dist/esm/plugins/media/ui/ImageBorder/index.js +1 -1
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -1
- package/dist/esm/plugins/media/utils/media-common.js +6 -4
- package/dist/esm/plugins/media/utils/media-files.js +1 -2
- package/dist/esm/plugins/media/utils/media-single.js +1 -3
- package/dist/esm/utils/document.js +5 -19
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/media/commands/captions.d.ts +1 -1
- package/dist/types/plugins/media/commands/helpers.d.ts +1 -1
- package/dist/types/plugins/media/commands/linking.d.ts +4 -5
- package/dist/types/plugins/media/media-plugin-options.d.ts +1 -2
- package/dist/types/plugins/media/nodeviews/mediaGroup.d.ts +3 -4
- package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -5
- package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -2
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +4 -4
- package/dist/types/plugins/media/nodeviews/types.d.ts +6 -7
- package/dist/types/plugins/media/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +6 -7
- package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -3
- package/dist/types/plugins/media/toolbar/alt-text.d.ts +2 -3
- package/dist/types/plugins/media/toolbar/commands.d.ts +2 -2
- package/dist/types/plugins/media/toolbar/index.d.ts +2 -2
- package/dist/types/plugins/media/toolbar/linking.d.ts +2 -2
- package/dist/types/plugins/media/types.d.ts +1 -0
- package/dist/types/plugins/media/ui/MediaPicker/DropzoneWrapper.d.ts +1 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +3 -3
- package/dist/types/plugins/media/utils/media-common.d.ts +1 -2
- package/dist/types/utils/document.d.ts +2 -3
- package/dist/types-ts4.5/plugins/media/commands/captions.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/commands/helpers.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/commands/linking.d.ts +4 -5
- package/dist/types-ts4.5/plugins/media/media-plugin-options.d.ts +1 -2
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaGroup.d.ts +3 -4
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeUpdater.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -5
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -2
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +4 -4
- package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +6 -7
- package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/main.d.ts +6 -7
- package/dist/types-ts4.5/plugins/media/pm-plugins/types.d.ts +2 -3
- package/dist/types-ts4.5/plugins/media/toolbar/alt-text.d.ts +2 -3
- package/dist/types-ts4.5/plugins/media/toolbar/commands.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/toolbar/linking.d.ts +2 -2
- package/dist/types-ts4.5/plugins/media/types.d.ts +1 -0
- package/dist/types-ts4.5/plugins/media/ui/MediaPicker/DropzoneWrapper.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +3 -3
- package/dist/types-ts4.5/plugins/media/utils/media-common.d.ts +1 -2
- package/dist/types-ts4.5/utils/document.d.ts +2 -3
- package/package.json +8 -4
- package/report.api.md +2 -2
- package/tmp/api-report-tmp.d.ts +2 -2
|
@@ -4,7 +4,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import type { MediaOptions } from '../types';
|
|
7
|
-
import type { ProsemirrorGetPosHandler } from '
|
|
7
|
+
import type { getPosHandler as ProsemirrorGetPosHandler } from '../types';
|
|
8
8
|
import type { MediaTraceContext } from '@atlaskit/media-common';
|
|
9
9
|
export type RemoteDimensions = {
|
|
10
10
|
id: string;
|
|
@@ -3,15 +3,14 @@ import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import type { Providers, MediaProvider, ContextIdentifierProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView, Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { EventDispatcher } from '
|
|
7
|
-
import type { getPosHandler } from '../../../../nodeviews';
|
|
6
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
7
|
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
9
8
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
10
9
|
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
11
|
-
import type { MediaOptions } from '../../types';
|
|
10
|
+
import type { getPosHandler, MediaOptions } from '../../types';
|
|
12
11
|
import type { MediaNodeViewProps } from '../types';
|
|
13
12
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
14
|
-
import type
|
|
13
|
+
import type { MediaNextEditorPluginType } from '../../next-plugin-type';
|
|
15
14
|
declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
16
15
|
private isSelected;
|
|
17
16
|
createDomRef(): HTMLElement;
|
|
@@ -25,5 +24,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
25
24
|
renderMediaNodeWithProviders: ({ mediaProvider, contextIdentifierProvider, }: Providers) => JSX.Element;
|
|
26
25
|
render(): JSX.Element;
|
|
27
26
|
}
|
|
28
|
-
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<
|
|
27
|
+
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
|
|
29
28
|
export {};
|
|
@@ -5,8 +5,7 @@ import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
5
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import React, { Component } from 'react';
|
|
8
|
-
import type {
|
|
9
|
-
import type { MediaOptions } from '../../types';
|
|
8
|
+
import type { MediaOptions, ReactNodeProps, getPosHandler as ProsemirrorGetPosHandler } from '../../types';
|
|
10
9
|
export declare const MEDIA_HEIGHT = 125;
|
|
11
10
|
export declare const FILE_WIDTH = 156;
|
|
12
11
|
export interface MediaNodeProps extends ReactNodeProps, ImageLoaderProps {
|
|
@@ -9,15 +9,15 @@ import type { ContextIdentifierProvider, ProviderFactory } from '@atlaskit/edito
|
|
|
9
9
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { CardEvent } from '@atlaskit/media-card';
|
|
11
11
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
12
|
-
import type {
|
|
13
|
-
import type { EventDispatcher } from '
|
|
12
|
+
import type { ForwardRef, getPosHandler } from '../types';
|
|
13
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
14
14
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
15
15
|
import type { MediaOptions } from '../types';
|
|
16
16
|
import type { MediaSingleNodeProps, MediaSingleNodeViewProps } from './types';
|
|
17
17
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
18
18
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
19
19
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
20
|
-
import type
|
|
20
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
21
21
|
export interface MediaSingleNodeState {
|
|
22
22
|
width?: number;
|
|
23
23
|
height?: number;
|
|
@@ -58,5 +58,5 @@ declare class MediaSingleNodeView extends ReactNodeView<MediaSingleNodeViewProps
|
|
|
58
58
|
render(props: MediaSingleNodeViewProps, forwardRef?: ForwardRef): jsx.JSX.Element;
|
|
59
59
|
ignoreMutation(): boolean;
|
|
60
60
|
}
|
|
61
|
-
export declare const ReactMediaSingleNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<
|
|
61
|
+
export declare const ReactMediaSingleNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, mediaOptions?: MediaOptions) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaSingleNodeView;
|
|
62
62
|
export {};
|
|
@@ -3,12 +3,11 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
3
3
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type {
|
|
7
|
-
import type { EventDispatcher } from '
|
|
8
|
-
import type { MediaOptions } from '../types';
|
|
6
|
+
import type { MediaOptions, ForwardRef, getPosHandler as ProsemirrorGetPosHandler } from '../types';
|
|
7
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
9
8
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
10
9
|
import type { MediaPluginState } from '../pm-plugins/types';
|
|
11
|
-
import type
|
|
10
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
12
11
|
export interface MediaSingleNodeProps {
|
|
13
12
|
view: EditorView;
|
|
14
13
|
node: PMNode;
|
|
@@ -25,7 +24,7 @@ export interface MediaSingleNodeProps {
|
|
|
25
24
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
26
25
|
isCopyPasteEnabled?: boolean;
|
|
27
26
|
forwardRef: ForwardRef;
|
|
28
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
27
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
29
28
|
}
|
|
30
29
|
export interface MediaSingleNodeViewProps {
|
|
31
30
|
eventDispatcher: EventDispatcher;
|
|
@@ -34,11 +33,11 @@ export interface MediaSingleNodeViewProps {
|
|
|
34
33
|
fullWidthMode?: boolean;
|
|
35
34
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
36
35
|
isCopyPasteEnabled?: boolean;
|
|
37
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
36
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
38
37
|
}
|
|
39
38
|
export interface MediaNodeViewProps {
|
|
40
39
|
eventDispatcher: EventDispatcher;
|
|
41
40
|
providerFactory: ProviderFactory;
|
|
42
41
|
mediaOptions: MediaOptions;
|
|
43
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
42
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
44
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { PMPluginFactoryParams } from '
|
|
3
|
+
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare const pluginKey: PluginKey<any>;
|
|
5
5
|
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
|
|
6
6
|
export declare const createPlugin: ({ dispatch, providerFactory, }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { Dispatch } from '
|
|
3
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
4
|
import type { MediaLinkingActions } from './actions';
|
|
5
5
|
import type { MediaLinkingState } from './types';
|
|
6
6
|
export declare const mediaLinkingPluginKey: PluginKey<MediaLinkingState>;
|
|
@@ -5,16 +5,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
6
6
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
7
7
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
-
import type { Dispatch } from '
|
|
9
|
-
import type { ProsemirrorGetPosHandler } from '../../../nodeviews';
|
|
8
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
10
9
|
import type { MediaPluginOptions } from '../media-plugin-options';
|
|
11
|
-
import type { MediaOptions, MediaState, MediaStateStatus } from '../types';
|
|
10
|
+
import type { getPosHandlerNode as ProsemirrorGetPosHandler, MediaOptions, MediaState, MediaStateStatus } from '../types';
|
|
12
11
|
import type { MediaStateEventSubscriber } from '../picker-facade';
|
|
13
12
|
import PickerFacade from '../picker-facade';
|
|
14
13
|
import type { MediaNodeWithPosHandler, MediaPluginState } from './types';
|
|
15
14
|
import type { IntlShape } from 'react-intl-next';
|
|
16
15
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
17
|
-
import type
|
|
16
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
18
17
|
export type { MediaState, MediaProvider, MediaStateStatus };
|
|
19
18
|
export { stateKey } from './plugin-key';
|
|
20
19
|
export declare const MEDIA_CONTENT_WRAP_CLASS_NAME = "media-content-wrap";
|
|
@@ -54,8 +53,8 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
54
53
|
showEditingDialog?: boolean;
|
|
55
54
|
mediaOptions?: MediaOptions;
|
|
56
55
|
dispatch?: Dispatch;
|
|
57
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
58
|
-
constructor(state: EditorState, options: MediaPluginOptions, mediaOptions: MediaOptions | undefined, newInsertionBehaviour: boolean | undefined, dispatch: Dispatch | undefined, pluginInjectionApi: ExtractInjectionAPI<
|
|
56
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
57
|
+
constructor(state: EditorState, options: MediaPluginOptions, mediaOptions: MediaOptions | undefined, newInsertionBehaviour: boolean | undefined, dispatch: Dispatch | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined);
|
|
59
58
|
onContextIdentifierProvider: (_name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
60
59
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
61
60
|
getMediaOptions: () => MediaPluginOptions;
|
|
@@ -116,4 +115,4 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
116
115
|
updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
|
|
117
116
|
}
|
|
118
117
|
export declare const getMediaPluginState: (state: EditorState) => MediaPluginState;
|
|
119
|
-
export declare const createPlugin: (_schema: Schema, options: MediaPluginOptions, reactContext: () => {}, getIntl: () => IntlShape, pluginInjectionApi: ExtractInjectionAPI<
|
|
118
|
+
export declare const createPlugin: (_schema: Schema, options: MediaPluginOptions, reactContext: () => {}, getIntl: () => IntlShape, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatch?: Dispatch, mediaOptions?: MediaOptions, newInsertionBehaviour?: boolean) => SafePlugin<MediaPluginState>;
|
|
@@ -2,13 +2,12 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
3
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
4
4
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { MediaOptions, MediaState } from '../types';
|
|
5
|
+
import type { ProsemirrorGetPosHandler, MediaOptions, MediaState } from '../types';
|
|
6
6
|
import type { MediaPluginOptions } from '../media-plugin-options';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { MediaStateEventSubscriber } from '../picker-facade';
|
|
9
9
|
import type PickerFacade from '../picker-facade';
|
|
10
|
-
import type { Dispatch } from '
|
|
11
|
-
import type { ProsemirrorGetPosHandler } from '../../../nodeviews/types';
|
|
10
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
12
11
|
export interface MediaNodeWithPosHandler {
|
|
13
12
|
node: PMNode;
|
|
14
13
|
getPos: ProsemirrorGetPosHandler;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { FloatingToolbarButton, FloatingToolbarCustom, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type {
|
|
2
|
+
import type { Command, FloatingToolbarButton, FloatingToolbarCustom, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { MediaToolbarBaseConfig } from '../types';
|
|
5
5
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
7
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
7
|
export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
|
|
9
8
|
export declare const altTextEditComponent: (options?: AltTextToolbarOptions) => FloatingToolbarCustom<Command>;
|
|
10
9
|
export interface AltTextToolbarOptions {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { Command } from '../../../types';
|
|
3
|
-
import type { PixelEntryValidation } from '../ui/PixelEntry/types';
|
|
4
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { PixelEntryValidation } from '../ui/PixelEntry/types';
|
|
5
5
|
export declare const DEFAULT_BORDER_COLOR = "#091e4224";
|
|
6
6
|
export declare const DEFAULT_BORDER_SIZE = 2;
|
|
7
7
|
export declare const changeInlineToMediaCard: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
@@ -2,5 +2,5 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
3
|
import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { MediaFloatingToolbarOptions } from '../types';
|
|
5
|
-
import type
|
|
6
|
-
export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<
|
|
5
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
6
|
+
export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -5,6 +5,6 @@ import type { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
|
5
5
|
import type { MediaLinkingState } from '../pm-plugins/linking';
|
|
6
6
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { MediaToolbarBaseConfig } from '../types';
|
|
8
|
-
import type
|
|
8
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
9
9
|
export declare function shouldShowMediaLinkToolbar(editorState: EditorState): boolean;
|
|
10
|
-
export declare const getLinkingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, mediaLinkingState: MediaLinkingState, state: EditorState, intl: IntlShape, pluginInjectionApi: ExtractInjectionAPI<
|
|
10
|
+
export declare const getLinkingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, mediaLinkingState: MediaLinkingState, state: EditorState, intl: IntlShape, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, providerFactory?: ProviderFactory) => FloatingToolbarConfig | undefined;
|
|
@@ -109,6 +109,7 @@ export type MediaDecorationSpec = {
|
|
|
109
109
|
type: 'media';
|
|
110
110
|
selected: boolean;
|
|
111
111
|
};
|
|
112
|
+
export type ProsemirrorGetPosHandler = getPosHandlerNode;
|
|
112
113
|
export type getPosHandler = getPosHandlerNode;
|
|
113
114
|
export type getPosHandlerNode = () => number | undefined;
|
|
114
115
|
export interface ReactNodeProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { MediaPluginState } from '../../pm-plugins/types';
|
|
3
3
|
import type { MediaFeatureFlags } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
4
|
-
import type { EditorAppearance } from '
|
|
4
|
+
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
5
5
|
type Props = {
|
|
6
6
|
mediaState: MediaPluginState;
|
|
7
7
|
isActive: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
2
2
|
import type { MediaSingleProps } from '@atlaskit/editor-common/ui';
|
|
3
3
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
-
import type
|
|
4
|
+
import type { MediaNextEditorPluginType } from '../../next-plugin-type';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { getPosHandler } from '
|
|
6
|
+
import type { getPosHandler } from '../../types';
|
|
7
7
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
9
|
export type EnabledHandles = {
|
|
@@ -23,5 +23,5 @@ export type Props = MediaSingleProps & {
|
|
|
23
23
|
fullWidthMode?: boolean;
|
|
24
24
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
25
25
|
mediaSingleWidth?: number;
|
|
26
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
26
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
27
27
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { Node as PMNode, ResolvedPos, Slice, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
-
import type { ProsemirrorGetPosHandler } from '
|
|
5
|
-
import type { MediaState } from '../types';
|
|
4
|
+
import type { getPosHandler as ProsemirrorGetPosHandler, MediaState } from '../types';
|
|
6
5
|
import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
7
6
|
export declare const isMediaBlobUrlFromAttrs: (attrs: MediaADFAttrs) => boolean;
|
|
8
7
|
export declare const posOfMediaGroupNearby: (state: EditorState) => number | undefined;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Transaction, ReadonlyTransaction
|
|
3
|
+
import type { Transaction, ReadonlyTransaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { Transformer, ReplaceRawValue } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { DispatchAnalyticsEvent } from '../plugins/analytics/types/dispatch-analytics-event';
|
|
7
7
|
import type { BreakoutMarkAttrs } from '@atlaskit/adf-schema';
|
|
8
|
-
export { findFarthestParentNode } from '@atlaskit/editor-common/utils';
|
|
9
|
-
export declare function isInEmptyLine(state: EditorState): boolean;
|
|
8
|
+
export { findFarthestParentNode, isInEmptyLine, } from '@atlaskit/editor-common/utils';
|
|
10
9
|
export declare function processRawFragmentValue(schema: Schema, value?: ReplaceRawValue[], providerFactory?: ProviderFactory, sanitizePrivateContent?: boolean, contentTransformer?: Transformer<string>, dispatchAnalyticsEvent?: DispatchAnalyticsEvent): Fragment | undefined;
|
|
11
10
|
export type ChangedFn = (node: Node, pos: number, parent: Node | null, index: number) => boolean | void;
|
|
12
11
|
export declare function getChangedNodesIn({ tr, doc, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Command } from '
|
|
2
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
export declare const selectCaptionFromMediaSinglePos: (mediaSingleNodePos: number, mediaSingleNode: PMNode) => Command;
|
|
5
5
|
export declare const insertAndSelectCaptionFromMediaSinglePos: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (mediaSingleNodePos: number | undefined, mediaSingleNode: PMNode) => Command;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command } from '
|
|
1
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { MediaNodeWithPosHandler, MediaPluginState } from '../pm-plugins/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
import type { CommandDispatch } from '
|
|
2
|
+
import type { Command, CommandDispatch } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { Command } from '../../../types';
|
|
5
4
|
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
export declare const showLinkingToolbar:
|
|
5
|
+
export declare const showLinkingToolbar: Command;
|
|
7
6
|
export declare const showLinkingToolbarWithMediaTypeCheck: Command;
|
|
8
7
|
export declare const hideLinkingToolbar: (state: EditorState, dispatch?: CommandDispatch, view?: EditorView, focusFloatingToolbar?: boolean) => void;
|
|
9
|
-
export declare const unlink: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) =>
|
|
10
|
-
export declare const setUrlToMedia: (url: string, inputMethod: INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) =>
|
|
8
|
+
export declare const unlink: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
9
|
+
export declare const setUrlToMedia: (url: string, inputMethod: INPUT_METHOD.TYPEAHEAD | INPUT_METHOD.MANUAL, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
@@ -2,8 +2,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
5
|
-
import type { MediaState, CustomMediaPicker } from './types';
|
|
6
|
-
import type { getPosHandler } from '../../nodeviews/types';
|
|
5
|
+
import type { MediaState, CustomMediaPicker, getPosHandler } from './types';
|
|
7
6
|
export type MediaPluginOptions = {
|
|
8
7
|
providerFactory: ProviderFactory;
|
|
9
8
|
nodeViews: {
|
|
@@ -4,11 +4,10 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
7
|
-
import type { getPosHandler } from '
|
|
7
|
+
import type { getPosHandler, MediaOptions } from '../types';
|
|
8
8
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
9
|
-
import type { MediaOptions } from '../types';
|
|
10
9
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
11
|
-
import type
|
|
10
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
12
11
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
13
12
|
export type MediaGroupProps = {
|
|
14
13
|
forwardRef?: (ref: HTMLElement) => void;
|
|
@@ -31,4 +30,4 @@ declare const IntlMediaGroup: React.FC<import("react-intl-next").WithIntlProps<M
|
|
|
31
30
|
WrappedComponent: React.ComponentType<MediaGroupProps>;
|
|
32
31
|
};
|
|
33
32
|
export default IntlMediaGroup;
|
|
34
|
-
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<
|
|
33
|
+
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
@@ -4,7 +4,7 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
6
6
|
import type { MediaOptions } from '../types';
|
|
7
|
-
import type { ProsemirrorGetPosHandler } from '
|
|
7
|
+
import type { getPosHandler as ProsemirrorGetPosHandler } from '../types';
|
|
8
8
|
import type { MediaTraceContext } from '@atlaskit/media-common';
|
|
9
9
|
export type RemoteDimensions = {
|
|
10
10
|
id: string;
|
|
@@ -3,15 +3,14 @@ import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import type { Providers, MediaProvider, ContextIdentifierProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView, Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { EventDispatcher } from '
|
|
7
|
-
import type { getPosHandler } from '../../../../nodeviews';
|
|
6
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
7
|
import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
|
|
9
8
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
10
9
|
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
11
|
-
import type { MediaOptions } from '../../types';
|
|
10
|
+
import type { getPosHandler, MediaOptions } from '../../types';
|
|
12
11
|
import type { MediaNodeViewProps } from '../types';
|
|
13
12
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
14
|
-
import type
|
|
13
|
+
import type { MediaNextEditorPluginType } from '../../next-plugin-type';
|
|
15
14
|
declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
16
15
|
private isSelected;
|
|
17
16
|
createDomRef(): HTMLElement;
|
|
@@ -25,5 +24,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
25
24
|
renderMediaNodeWithProviders: ({ mediaProvider, contextIdentifierProvider, }: Providers) => JSX.Element;
|
|
26
25
|
render(): JSX.Element;
|
|
27
26
|
}
|
|
28
|
-
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<
|
|
27
|
+
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
|
|
29
28
|
export {};
|
|
@@ -5,8 +5,7 @@ import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
5
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import React, { Component } from 'react';
|
|
8
|
-
import type {
|
|
9
|
-
import type { MediaOptions } from '../../types';
|
|
8
|
+
import type { MediaOptions, ReactNodeProps, getPosHandler as ProsemirrorGetPosHandler } from '../../types';
|
|
10
9
|
export declare const MEDIA_HEIGHT = 125;
|
|
11
10
|
export declare const FILE_WIDTH = 156;
|
|
12
11
|
export interface MediaNodeProps extends ReactNodeProps, ImageLoaderProps {
|
|
@@ -9,15 +9,15 @@ import type { ContextIdentifierProvider, ProviderFactory } from '@atlaskit/edito
|
|
|
9
9
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { CardEvent } from '@atlaskit/media-card';
|
|
11
11
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
12
|
-
import type {
|
|
13
|
-
import type { EventDispatcher } from '
|
|
12
|
+
import type { ForwardRef, getPosHandler } from '../types';
|
|
13
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
14
14
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
15
15
|
import type { MediaOptions } from '../types';
|
|
16
16
|
import type { MediaSingleNodeProps, MediaSingleNodeViewProps } from './types';
|
|
17
17
|
import { MediaNodeUpdater } from './mediaNodeUpdater';
|
|
18
18
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
19
19
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
20
|
-
import type
|
|
20
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
21
21
|
export interface MediaSingleNodeState {
|
|
22
22
|
width?: number;
|
|
23
23
|
height?: number;
|
|
@@ -58,5 +58,5 @@ declare class MediaSingleNodeView extends ReactNodeView<MediaSingleNodeViewProps
|
|
|
58
58
|
render(props: MediaSingleNodeViewProps, forwardRef?: ForwardRef): jsx.JSX.Element;
|
|
59
59
|
ignoreMutation(): boolean;
|
|
60
60
|
}
|
|
61
|
-
export declare const ReactMediaSingleNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<
|
|
61
|
+
export declare const ReactMediaSingleNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, mediaOptions?: MediaOptions) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaSingleNodeView;
|
|
62
62
|
export {};
|
|
@@ -3,12 +3,11 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
3
3
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type {
|
|
7
|
-
import type { EventDispatcher } from '
|
|
8
|
-
import type { MediaOptions } from '../types';
|
|
6
|
+
import type { MediaOptions, ForwardRef, getPosHandler as ProsemirrorGetPosHandler } from '../types';
|
|
7
|
+
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
9
8
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
10
9
|
import type { MediaPluginState } from '../pm-plugins/types';
|
|
11
|
-
import type
|
|
10
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
12
11
|
export interface MediaSingleNodeProps {
|
|
13
12
|
view: EditorView;
|
|
14
13
|
node: PMNode;
|
|
@@ -25,7 +24,7 @@ export interface MediaSingleNodeProps {
|
|
|
25
24
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
26
25
|
isCopyPasteEnabled?: boolean;
|
|
27
26
|
forwardRef: ForwardRef;
|
|
28
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
27
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
29
28
|
}
|
|
30
29
|
export interface MediaSingleNodeViewProps {
|
|
31
30
|
eventDispatcher: EventDispatcher;
|
|
@@ -34,11 +33,11 @@ export interface MediaSingleNodeViewProps {
|
|
|
34
33
|
fullWidthMode?: boolean;
|
|
35
34
|
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
36
35
|
isCopyPasteEnabled?: boolean;
|
|
37
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
36
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
38
37
|
}
|
|
39
38
|
export interface MediaNodeViewProps {
|
|
40
39
|
eventDispatcher: EventDispatcher;
|
|
41
40
|
providerFactory: ProviderFactory;
|
|
42
41
|
mediaOptions: MediaOptions;
|
|
43
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
42
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
44
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { PMPluginFactoryParams } from '
|
|
3
|
+
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare const pluginKey: PluginKey<any>;
|
|
5
5
|
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
|
|
6
6
|
export declare const createPlugin: ({ dispatch, providerFactory, }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { Dispatch } from '
|
|
3
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
4
|
import type { MediaLinkingActions } from './actions';
|
|
5
5
|
import type { MediaLinkingState } from './types';
|
|
6
6
|
export declare const mediaLinkingPluginKey: PluginKey<MediaLinkingState>;
|
|
@@ -5,16 +5,15 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
6
6
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
7
7
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
-
import type { Dispatch } from '
|
|
9
|
-
import type { ProsemirrorGetPosHandler } from '../../../nodeviews';
|
|
8
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
10
9
|
import type { MediaPluginOptions } from '../media-plugin-options';
|
|
11
|
-
import type { MediaOptions, MediaState, MediaStateStatus } from '../types';
|
|
10
|
+
import type { getPosHandlerNode as ProsemirrorGetPosHandler, MediaOptions, MediaState, MediaStateStatus } from '../types';
|
|
12
11
|
import type { MediaStateEventSubscriber } from '../picker-facade';
|
|
13
12
|
import PickerFacade from '../picker-facade';
|
|
14
13
|
import type { MediaNodeWithPosHandler, MediaPluginState } from './types';
|
|
15
14
|
import type { IntlShape } from 'react-intl-next';
|
|
16
15
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
17
|
-
import type
|
|
16
|
+
import type { MediaNextEditorPluginType } from '../next-plugin-type';
|
|
18
17
|
export type { MediaState, MediaProvider, MediaStateStatus };
|
|
19
18
|
export { stateKey } from './plugin-key';
|
|
20
19
|
export declare const MEDIA_CONTENT_WRAP_CLASS_NAME = "media-content-wrap";
|
|
@@ -54,8 +53,8 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
54
53
|
showEditingDialog?: boolean;
|
|
55
54
|
mediaOptions?: MediaOptions;
|
|
56
55
|
dispatch?: Dispatch;
|
|
57
|
-
pluginInjectionApi: ExtractInjectionAPI<
|
|
58
|
-
constructor(state: EditorState, options: MediaPluginOptions, mediaOptions: MediaOptions | undefined, newInsertionBehaviour: boolean | undefined, dispatch: Dispatch | undefined, pluginInjectionApi: ExtractInjectionAPI<
|
|
56
|
+
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
57
|
+
constructor(state: EditorState, options: MediaPluginOptions, mediaOptions: MediaOptions | undefined, newInsertionBehaviour: boolean | undefined, dispatch: Dispatch | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined);
|
|
59
58
|
onContextIdentifierProvider: (_name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
60
59
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
61
60
|
getMediaOptions: () => MediaPluginOptions;
|
|
@@ -116,4 +115,4 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
116
115
|
updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
|
|
117
116
|
}
|
|
118
117
|
export declare const getMediaPluginState: (state: EditorState) => MediaPluginState;
|
|
119
|
-
export declare const createPlugin: (_schema: Schema, options: MediaPluginOptions, reactContext: () => {}, getIntl: () => IntlShape, pluginInjectionApi: ExtractInjectionAPI<
|
|
118
|
+
export declare const createPlugin: (_schema: Schema, options: MediaPluginOptions, reactContext: () => {}, getIntl: () => IntlShape, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatch?: Dispatch, mediaOptions?: MediaOptions, newInsertionBehaviour?: boolean) => SafePlugin<MediaPluginState>;
|
|
@@ -2,13 +2,12 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
3
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
4
4
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { MediaOptions, MediaState } from '../types';
|
|
5
|
+
import type { ProsemirrorGetPosHandler, MediaOptions, MediaState } from '../types';
|
|
6
6
|
import type { MediaPluginOptions } from '../media-plugin-options';
|
|
7
7
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
import type { MediaStateEventSubscriber } from '../picker-facade';
|
|
9
9
|
import type PickerFacade from '../picker-facade';
|
|
10
|
-
import type { Dispatch } from '
|
|
11
|
-
import type { ProsemirrorGetPosHandler } from '../../../nodeviews/types';
|
|
10
|
+
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
12
11
|
export interface MediaNodeWithPosHandler {
|
|
13
12
|
node: PMNode;
|
|
14
13
|
getPos: ProsemirrorGetPosHandler;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { FloatingToolbarButton, FloatingToolbarCustom, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type {
|
|
2
|
+
import type { Command, FloatingToolbarButton, FloatingToolbarCustom, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { MediaToolbarBaseConfig } from '../types';
|
|
5
5
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
7
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
7
|
export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
|
|
9
8
|
export declare const altTextEditComponent: (options?: AltTextToolbarOptions) => FloatingToolbarCustom<Command>;
|
|
10
9
|
export interface AltTextToolbarOptions {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { Command } from '../../../types';
|
|
3
|
-
import type { PixelEntryValidation } from '../ui/PixelEntry/types';
|
|
4
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { PixelEntryValidation } from '../ui/PixelEntry/types';
|
|
5
5
|
export declare const DEFAULT_BORDER_COLOR = "#091e4224";
|
|
6
6
|
export declare const DEFAULT_BORDER_SIZE = 2;
|
|
7
7
|
export declare const changeInlineToMediaCard: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|