@atlaskit/editor-plugin-media 13.5.1 → 13.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/nodeviews/mediaNodeView/media.js +8 -1
- package/dist/es2019/nodeviews/mediaNodeView/media.js +6 -1
- package/dist/esm/nodeviews/mediaNodeView/media.js +8 -1
- package/media-plugin/package.json +1 -8
- package/media-plugin-type/package.json +1 -8
- package/nodeviewHelpers/package.json +1 -8
- package/package.json +8 -4
- package/types/package.json +1 -8
- package/dist/types-ts4.5/entry-points/media-plugin-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/media-plugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/nodeview-helpers.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/mediaPlugin.d.ts +0 -2
- package/dist/types-ts4.5/mediaPluginType.d.ts +0 -107
- package/dist/types-ts4.5/nodeviews/__mocks__/mediaNodeUpdater.d.ts +0 -27
- package/dist/types-ts4.5/nodeviews/helpers.d.ts +0 -2
- package/dist/types-ts4.5/nodeviews/lazy-media-group.d.ts +0 -9
- package/dist/types-ts4.5/nodeviews/lazy-media-inline.d.ts +0 -9
- package/dist/types-ts4.5/nodeviews/mediaGroup.d.ts +0 -10
- package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +0 -37
- package/dist/types-ts4.5/nodeviews/mediaInline.d.ts +0 -49
- package/dist/types-ts4.5/nodeviews/mediaNodeUpdater.d.ts +0 -52
- package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +0 -48
- package/dist/types-ts4.5/nodeviews/mediaNodeView/media.d.ts +0 -65
- package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +0 -38
- package/dist/types-ts4.5/nodeviews/mediaSingleNext.d.ts +0 -33
- package/dist/types-ts4.5/nodeviews/nodeviewHelpers.d.ts +0 -11
- package/dist/types-ts4.5/nodeviews/styles.d.ts +0 -17
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/media.d.ts +0 -44
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaGroup.d.ts +0 -64
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaInline.d.ts +0 -29
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaSingle.d.ts +0 -45
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/toDOMAttrs.d.ts +0 -29
- package/dist/types-ts4.5/nodeviews/types.d.ts +0 -50
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +0 -7
- package/dist/types-ts4.5/pm-plugins/ai-generating-decoration.d.ts +0 -49
- package/dist/types-ts4.5/pm-plugins/alt-text/actions.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/alt-text/commands.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/alt-text/keymap.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/alt-text/reducer.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/alt-text/types.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +0 -47
- package/dist/types-ts4.5/pm-plugins/commands/captions.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/commands/helpers.d.ts +0 -15
- package/dist/types-ts4.5/pm-plugins/commands/linking.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -24
- package/dist/types-ts4.5/pm-plugins/keymap-media.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/linking/actions.d.ts +0 -21
- package/dist/types-ts4.5/pm-plugins/linking/index.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/linking/keymap.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/linking/reducer.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/linking/types.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -154
- package/dist/types-ts4.5/pm-plugins/media-editor-plugin-factory.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/mediaTaskManager.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/picker-facade.d.ts +0 -37
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/commands.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/index.d.ts +0 -15
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/reducer.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/constants.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/index.d.ts +0 -22
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/pixel-entry.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/styles.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/types.d.ts +0 -86
- package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/types.d.ts +0 -82
- package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/utils/batchMediaNodeAttrs.d.ts +0 -54
- package/dist/types-ts4.5/pm-plugins/utils/batchSteps.d.ts +0 -19
- package/dist/types-ts4.5/pm-plugins/utils/check-media-type.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/utils/current-media-node.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/utils/is-type.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/utils/media-common.d.ts +0 -29
- package/dist/types-ts4.5/pm-plugins/utils/media-files.d.ts +0 -29
- package/dist/types-ts4.5/pm-plugins/utils/media-inline.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +0 -18
- package/dist/types-ts4.5/types/index.d.ts +0 -212
- package/dist/types-ts4.5/types/media-plugin-options.d.ts +0 -16
- package/dist/types-ts4.5/ui/CaptionPlaceholder/index.d.ts +0 -16
- package/dist/types-ts4.5/ui/CommentBadge/index.d.ts +0 -18
- package/dist/types-ts4.5/ui/ImageBorder/index.d.ts +0 -11
- package/dist/types-ts4.5/ui/ImageBorder/styles.d.ts +0 -18
- package/dist/types-ts4.5/ui/Media/DropPlaceholder.d.ts +0 -11
- package/dist/types-ts4.5/ui/MediaLinkingToolbar.d.ts +0 -39
- package/dist/types-ts4.5/ui/MediaPicker/BrowserWrapper.d.ts +0 -12
- package/dist/types-ts4.5/ui/MediaPicker/ClipboardWrapper.d.ts +0 -11
- package/dist/types-ts4.5/ui/MediaPicker/DropzoneWrapper.d.ts +0 -13
- package/dist/types-ts4.5/ui/MediaPicker/PickerFacadeProvider.d.ts +0 -18
- package/dist/types-ts4.5/ui/MediaPicker/index.d.ts +0 -23
- package/dist/types-ts4.5/ui/MediaSSRReactContextsProvider.d.ts +0 -8
- package/dist/types-ts4.5/ui/MediaViewer/MediaViewerContainer.d.ts +0 -21
- package/dist/types-ts4.5/ui/MediaViewer/PortalWrapper.d.ts +0 -13
- package/dist/types-ts4.5/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.d.ts +0 -6
- package/dist/types-ts4.5/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +0 -9
- package/dist/types-ts4.5/ui/ResizableMediaSingle/index.d.ts +0 -50
- package/dist/types-ts4.5/ui/ResizableMediaSingle/styled.d.ts +0 -3
- package/dist/types-ts4.5/ui/ResizableMediaSingle/styles.d.ts +0 -2
- package/dist/types-ts4.5/ui/ResizableMediaSingle/types.d.ts +0 -30
- package/dist/types-ts4.5/ui/ToolbarMedia/index.d.ts +0 -13
- package/dist/types-ts4.5/ui/hooks/useMediaProvider.d.ts +0 -4
- package/dist/types-ts4.5/ui/toolbar/alt-text.d.ts +0 -17
- package/dist/types-ts4.5/ui/toolbar/commands.d.ts +0 -20
- package/dist/types-ts4.5/ui/toolbar/comments.d.ts +0 -6
- package/dist/types-ts4.5/ui/toolbar/imageBorder.d.ts +0 -2
- package/dist/types-ts4.5/ui/toolbar/index.d.ts +0 -16
- package/dist/types-ts4.5/ui/toolbar/layout-group.d.ts +0 -14
- package/dist/types-ts4.5/ui/toolbar/linking-toolbar-appearance.d.ts +0 -21
- package/dist/types-ts4.5/ui/toolbar/linking.d.ts +0 -11
- package/dist/types-ts4.5/ui/toolbar/mediaInline.d.ts +0 -8
- package/dist/types-ts4.5/ui/toolbar/pixel-resizing.d.ts +0 -8
- package/dist/types-ts4.5/ui/toolbar/utils.d.ts +0 -29
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import type { UnbindFn } from 'bind-event-listener';
|
|
3
|
-
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { ImageLoaderProps } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { CardDimensions, CardOnClickCallback, NumericalCardDimensions } from '@atlaskit/media-card';
|
|
9
|
-
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
10
|
-
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
11
|
-
import type { MediaOptions, getPosHandler as ProsemirrorGetPosHandler, ReactNodeProps } from '../../types';
|
|
12
|
-
export declare const MEDIA_HEIGHT = 125;
|
|
13
|
-
export declare const FILE_WIDTH = 156;
|
|
14
|
-
export interface MediaNodeProps extends ReactNodeProps, ImageLoaderProps {
|
|
15
|
-
api?: ExtractInjectionAPI<MediaNextEditorPluginType>;
|
|
16
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
17
|
-
getPos: ProsemirrorGetPosHandler;
|
|
18
|
-
isAIGenerating?: boolean;
|
|
19
|
-
isLoading?: boolean;
|
|
20
|
-
isMediaSingle?: boolean;
|
|
21
|
-
isViewOnly?: boolean;
|
|
22
|
-
maxDimensions: CardDimensions;
|
|
23
|
-
mediaOptions?: MediaOptions;
|
|
24
|
-
mediaProvider?: Promise<MediaProvider>;
|
|
25
|
-
node: PMNode;
|
|
26
|
-
onClick?: CardOnClickCallback;
|
|
27
|
-
originalDimensions: NumericalCardDimensions;
|
|
28
|
-
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
29
|
-
syncProvider?: MediaProvider;
|
|
30
|
-
view: EditorView;
|
|
31
|
-
}
|
|
32
|
-
interface MediaNodeState {
|
|
33
|
-
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
34
|
-
viewAndUploadMediaClientConfig?: MediaClientConfig;
|
|
35
|
-
viewMediaClientConfig?: MediaClientConfig;
|
|
36
|
-
}
|
|
37
|
-
export declare class MediaNode extends Component<MediaNodeProps, MediaNodeState> {
|
|
38
|
-
private mediaPluginState;
|
|
39
|
-
state: MediaNodeState;
|
|
40
|
-
videoControlsWrapperRef: React.RefObject<HTMLDivElement>;
|
|
41
|
-
unbindKeyDown: UnbindFn | null;
|
|
42
|
-
constructor(props: MediaNodeProps);
|
|
43
|
-
shouldComponentUpdate(nextProps: MediaNodeProps, nextState: MediaNodeState): boolean;
|
|
44
|
-
componentDidMount(): Promise<void>;
|
|
45
|
-
componentWillUnmount(): void;
|
|
46
|
-
componentDidUpdate(prevProps: Readonly<MediaNodeProps>): void;
|
|
47
|
-
bindKeydown(): void;
|
|
48
|
-
private setViewMediaClientConfig;
|
|
49
|
-
private selectMediaSingleFromCard;
|
|
50
|
-
private selectMediaSingle;
|
|
51
|
-
private getMediaSettings;
|
|
52
|
-
private onPreviewRender;
|
|
53
|
-
private onError;
|
|
54
|
-
/**
|
|
55
|
-
* This function checks if the media node is nested under a certain nodes, and if so,
|
|
56
|
-
* returns the name of the parent node type. This is used for providing more context in media render errors.
|
|
57
|
-
* @returns
|
|
58
|
-
*/
|
|
59
|
-
private getNestedUnder;
|
|
60
|
-
render(): React.JSX.Element;
|
|
61
|
-
private onFullscreenChange;
|
|
62
|
-
private handleNewNode;
|
|
63
|
-
}
|
|
64
|
-
declare const _default_1: React.ComponentClass<MediaNodeProps & ImageLoaderProps>;
|
|
65
|
-
export default _default_1;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
|
-
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
6
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
7
|
-
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
8
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
-
import { SelectedState } from '@atlaskit/editor-common/utils';
|
|
10
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
11
|
-
import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
|
-
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
13
|
-
import type { ForwardRef, getPosHandler, MediaOptions } from '../types';
|
|
14
|
-
import type { MediaSingleNodeViewProps } from './types';
|
|
15
|
-
declare class MediaSingleNodeView extends ReactNodeView<MediaSingleNodeViewProps> {
|
|
16
|
-
lastOffsetLeft: number;
|
|
17
|
-
forceViewUpdate: boolean;
|
|
18
|
-
selectionType: number | null;
|
|
19
|
-
unsubscribeToViewModeChange: (() => void) | undefined;
|
|
20
|
-
hasResized: boolean;
|
|
21
|
-
createDomRef(): HTMLElement;
|
|
22
|
-
getContentDOM(): {
|
|
23
|
-
dom: HTMLDivElement;
|
|
24
|
-
};
|
|
25
|
-
viewShouldUpdate(nextNode: PMNode): boolean;
|
|
26
|
-
subscribeToViewModeChange(domRef: HTMLElement): (() => void) | undefined;
|
|
27
|
-
updateDomRefContentEditable(domRef: HTMLElement, editorViewMode?: 'edit' | 'view'): void;
|
|
28
|
-
checkAndUpdateSelectionType: () => SelectedState | null;
|
|
29
|
-
isNodeSelected: () => boolean;
|
|
30
|
-
getNodeMediaId(node: PMNode): string | undefined;
|
|
31
|
-
stopEvent(event: Event): boolean;
|
|
32
|
-
update(node: PMNode, decorations: readonly Decoration[], _innerDecorations?: DecorationSource, isValidUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
|
|
33
|
-
render(props: MediaSingleNodeViewProps, forwardRef?: ForwardRef): jsx.JSX.Element;
|
|
34
|
-
ignoreMutation(): boolean;
|
|
35
|
-
destroy(): void;
|
|
36
|
-
}
|
|
37
|
-
export declare const ReactMediaSingleNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, mediaOptions?: MediaOptions, intl?: IntlShape) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaSingleNodeView;
|
|
38
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
9
|
-
import type { ForwardRef, MediaOptions } from '../types';
|
|
10
|
-
export type MediaSingleNodeNextProps = {
|
|
11
|
-
addPendingTask?: (promise: Promise<any>) => void;
|
|
12
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
13
|
-
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
14
|
-
editorAppearance?: EditorAppearance;
|
|
15
|
-
editorDisabled?: boolean;
|
|
16
|
-
editorViewMode?: boolean;
|
|
17
|
-
eventDispatcher: EventDispatcher;
|
|
18
|
-
forwardRef: ForwardRef;
|
|
19
|
-
fullWidthMode?: boolean;
|
|
20
|
-
getPos: () => number | undefined;
|
|
21
|
-
isCopyPasteEnabled?: boolean;
|
|
22
|
-
isDrafting?: boolean;
|
|
23
|
-
lineLength: number;
|
|
24
|
-
mediaOptions: MediaOptions;
|
|
25
|
-
mediaProvider?: Promise<MediaProvider>;
|
|
26
|
-
node: PMNode;
|
|
27
|
-
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
28
|
-
selected: () => boolean;
|
|
29
|
-
targetNodeId?: string;
|
|
30
|
-
view: EditorView;
|
|
31
|
-
width: number;
|
|
32
|
-
};
|
|
33
|
-
export declare const MediaSingleNodeNext: (mediaSingleNodeNextProps: MediaSingleNodeNextProps) => jsx.JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Computes the new mediaSingle display width that preserves the original display height
|
|
3
|
-
* when a media node is replaced with a file of a different aspect ratio, clamped to valid bounds.
|
|
4
|
-
*
|
|
5
|
-
* @param targetDisplayHeight - The display height to preserve (from the old image)
|
|
6
|
-
* @param newIntrinsicWidth - The new file's intrinsic pixel width
|
|
7
|
-
* @param newIntrinsicHeight - The new file's intrinsic pixel height
|
|
8
|
-
* @param layout - The mediaSingle layout (affects max width)
|
|
9
|
-
* @param lineLength - The editor content column width in pixels
|
|
10
|
-
*/
|
|
11
|
-
export declare const computeReplacementDisplayWidth: (targetDisplayHeight: number, newIntrinsicWidth: number, newIntrinsicHeight: number, layout: string, lineLength: number) => number;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
8
|
-
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
9
|
-
type MediaCardWrapperProps = {
|
|
10
|
-
borderWidth?: number;
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
dimensions: NumericalCardDimensions;
|
|
13
|
-
onContextMenu?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare const MediaCardWrapper: ({ dimensions, children, selected, borderWidth, onContextMenu, }: MediaCardWrapperProps) => jsx.JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { AttributeSpec, DOMOutputSpec, Node as PMNode, TagParseRule } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
/**
|
|
4
|
-
* Duplicate consts from `media-card`.
|
|
5
|
-
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
6
|
-
*
|
|
7
|
-
* WHY?
|
|
8
|
-
* This will eventually move to `@atlaskit/adf-schema` and we cannot reference
|
|
9
|
-
* `media-card` from here or it will cause dependency issues.
|
|
10
|
-
*
|
|
11
|
-
* In the long term likely `toDOM` will move back out of `adf-schema` in which
|
|
12
|
-
* case we can consolidate them.
|
|
13
|
-
*/
|
|
14
|
-
export declare const defaultImageCardDimensions: {
|
|
15
|
-
width: number;
|
|
16
|
-
height: number;
|
|
17
|
-
};
|
|
18
|
-
export declare const mediaSpecWithFixedToDOM: () => {
|
|
19
|
-
atom?: boolean;
|
|
20
|
-
attrs?: {
|
|
21
|
-
[name: string]: AttributeSpec;
|
|
22
|
-
};
|
|
23
|
-
code?: boolean;
|
|
24
|
-
content?: string;
|
|
25
|
-
defining?: boolean;
|
|
26
|
-
definingAsContext?: boolean;
|
|
27
|
-
definingForContent?: boolean;
|
|
28
|
-
disableDropCursor?: boolean | ((view: EditorView, pos: {
|
|
29
|
-
inside: number;
|
|
30
|
-
pos: number;
|
|
31
|
-
}, event: DragEvent) => boolean);
|
|
32
|
-
draggable?: boolean;
|
|
33
|
-
group?: string;
|
|
34
|
-
inline?: boolean;
|
|
35
|
-
isolating?: boolean;
|
|
36
|
-
leafText?: (node: PMNode) => string;
|
|
37
|
-
linebreakReplacement?: boolean;
|
|
38
|
-
marks?: string;
|
|
39
|
-
parseDOM?: readonly TagParseRule[];
|
|
40
|
-
selectable?: boolean;
|
|
41
|
-
toDebugString?: (node: PMNode) => string;
|
|
42
|
-
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
43
|
-
whitespace?: "pre" | "normal";
|
|
44
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { AttributeSpec, DOMOutputSpec, Node, TagParseRule } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
/**
|
|
4
|
-
* Duplicate consts from `media-card`.
|
|
5
|
-
* `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
6
|
-
*
|
|
7
|
-
* WHY?
|
|
8
|
-
* This will eventually move to `@atlaskit/adf-schema` and we cannot reference
|
|
9
|
-
* `media-card` from here or it will cause dependency issues.
|
|
10
|
-
*
|
|
11
|
-
* In the long term likely `toDOM` will move back out of `adf-schema` in which
|
|
12
|
-
* case we can consolidate them.
|
|
13
|
-
*/
|
|
14
|
-
export declare const defaultImageCardDimensions: {
|
|
15
|
-
width: number;
|
|
16
|
-
height: number;
|
|
17
|
-
};
|
|
18
|
-
export declare const defaultHorizontalCardDimensions: {
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
};
|
|
22
|
-
export declare const defaultSquareCardDimensions: {
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Duplicate logic from `@atlaskit/media-card` for computing the dimensions of a media group card.
|
|
28
|
-
* From: `packages/media/media-card/src/utils/cardDimensions.ts`
|
|
29
|
-
*
|
|
30
|
-
* WHY?
|
|
31
|
-
* This will eventually move to `@atlaskit/adf-schema` and we cannot reference
|
|
32
|
-
* `@atlaskit/media-card` from here or it will cause dependency issues.
|
|
33
|
-
*
|
|
34
|
-
* In the long term likely `toDOM` will move back out of `adf-schema` in which
|
|
35
|
-
* case we can consolidate them.
|
|
36
|
-
*/
|
|
37
|
-
export declare const getDefaultCardDimensions: (appearance?: "image" | "square" | "horizontal" | "auto") => Required<typeof defaultImageCardDimensions>;
|
|
38
|
-
export declare const mediaGroupSpecWithFixedToDOM: () => {
|
|
39
|
-
toDOM: () => DOMOutputSpec;
|
|
40
|
-
content?: string;
|
|
41
|
-
marks?: string;
|
|
42
|
-
group?: string;
|
|
43
|
-
inline?: boolean;
|
|
44
|
-
atom?: boolean;
|
|
45
|
-
attrs?: {
|
|
46
|
-
[name: string]: AttributeSpec;
|
|
47
|
-
};
|
|
48
|
-
selectable?: boolean;
|
|
49
|
-
draggable?: boolean;
|
|
50
|
-
code?: boolean;
|
|
51
|
-
whitespace?: "pre" | "normal";
|
|
52
|
-
definingAsContext?: boolean;
|
|
53
|
-
definingForContent?: boolean;
|
|
54
|
-
defining?: boolean;
|
|
55
|
-
isolating?: boolean;
|
|
56
|
-
parseDOM?: readonly TagParseRule[];
|
|
57
|
-
toDebugString?: (node: Node) => string;
|
|
58
|
-
leafText?: (node: Node) => string;
|
|
59
|
-
linebreakReplacement?: boolean;
|
|
60
|
-
disableDropCursor?: boolean | ((view: EditorView, pos: {
|
|
61
|
-
pos: number;
|
|
62
|
-
inside: number;
|
|
63
|
-
}, event: DragEvent) => boolean);
|
|
64
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { AttributeSpec, DOMOutputSpec, Node as PMNode, TagParseRule } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
export declare const mediaInlineSpecWithFixedToDOM: () => {
|
|
4
|
-
atom?: boolean;
|
|
5
|
-
attrs?: {
|
|
6
|
-
[name: string]: AttributeSpec;
|
|
7
|
-
};
|
|
8
|
-
code?: boolean;
|
|
9
|
-
content?: string;
|
|
10
|
-
defining?: boolean;
|
|
11
|
-
definingAsContext?: boolean;
|
|
12
|
-
definingForContent?: boolean;
|
|
13
|
-
disableDropCursor?: boolean | ((view: EditorView, pos: {
|
|
14
|
-
inside: number;
|
|
15
|
-
pos: number;
|
|
16
|
-
}, event: DragEvent) => boolean);
|
|
17
|
-
draggable?: boolean;
|
|
18
|
-
group?: string;
|
|
19
|
-
inline?: boolean;
|
|
20
|
-
isolating?: boolean;
|
|
21
|
-
leafText?: (node: PMNode) => string;
|
|
22
|
-
linebreakReplacement?: boolean;
|
|
23
|
-
marks?: string;
|
|
24
|
-
parseDOM?: readonly TagParseRule[];
|
|
25
|
-
selectable?: boolean;
|
|
26
|
-
toDebugString?: (node: PMNode) => string;
|
|
27
|
-
toDOM: (node: PMNode) => DOMOutputSpec;
|
|
28
|
-
whitespace?: "pre" | "normal";
|
|
29
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema/schema';
|
|
2
|
-
import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
type MediaWidthCSSCalcProps = {
|
|
4
|
-
baseWidth: number | undefined;
|
|
5
|
-
isExtendedResizeExperience: boolean;
|
|
6
|
-
isPixelWidth: boolean;
|
|
7
|
-
layout: MediaSingleLayout;
|
|
8
|
-
mediaSingleDimensionWidth: number | undefined;
|
|
9
|
-
};
|
|
10
|
-
export declare const mediaWidthCSSCalc: ({ mediaSingleDimensionWidth, layout, baseWidth, isPixelWidth, isExtendedResizeExperience, }: MediaWidthCSSCalcProps) => string;
|
|
11
|
-
type MediaContentWrapperWidthCSSCalcProps = {
|
|
12
|
-
childMediaWidth: number | undefined;
|
|
13
|
-
isExternalMedia: boolean;
|
|
14
|
-
isMediaWrapped: boolean;
|
|
15
|
-
isPixelWidth: boolean;
|
|
16
|
-
mediaSingleDimensionWidth: number | undefined;
|
|
17
|
-
};
|
|
18
|
-
export declare const mediaContentWrapperWidthCSSCalc: ({ isMediaWrapped, isExternalMedia, isPixelWidth, childMediaWidth, mediaSingleDimensionWidth, }: MediaContentWrapperWidthCSSCalcProps) => string;
|
|
19
|
-
type MediaProportionalWidthCSSCalcProps = {
|
|
20
|
-
isExtendedResizeExperience: boolean;
|
|
21
|
-
isMediaWrapped: boolean;
|
|
22
|
-
isPixelWidth: boolean;
|
|
23
|
-
mediaSingleDimensionWidth: number | undefined;
|
|
24
|
-
};
|
|
25
|
-
export declare const mediaProportionalWidthCSSCalc: ({ isPixelWidth, isExtendedResizeExperience, mediaSingleDimensionWidth, isMediaWrapped, }: MediaProportionalWidthCSSCalcProps) => string;
|
|
26
|
-
type MediaJustifyContentCSSProps = {
|
|
27
|
-
layout: MediaSingleLayout;
|
|
28
|
-
};
|
|
29
|
-
export declare const mediaJustifyContentCSS: ({ layout }: MediaJustifyContentCSSProps) => string;
|
|
30
|
-
type PrepareWrapperContentDOMProps = {
|
|
31
|
-
childMediaHeight: number;
|
|
32
|
-
childMediaWidth: number;
|
|
33
|
-
dataAttrs: Record<string, unknown>;
|
|
34
|
-
isExtendedResizeExperience: boolean;
|
|
35
|
-
isPixelWidth: boolean;
|
|
36
|
-
layout: MediaSingleLayout;
|
|
37
|
-
mediaSingleDimensionWidth: number;
|
|
38
|
-
};
|
|
39
|
-
export declare const prepareWrapperContentDOM: ({ layout, dataAttrs, childMediaWidth, childMediaHeight, mediaSingleDimensionWidth, isPixelWidth, isExtendedResizeExperience, }: PrepareWrapperContentDOMProps) => DOMOutputSpec;
|
|
40
|
-
export declare const getToDom: (allowPixelResizing: boolean) => (node: PMNode) => DOMOutputSpec;
|
|
41
|
-
export declare const mediaSingleSpecWithFixedToDOM: (mediaSingleOption: {
|
|
42
|
-
withCaption?: boolean;
|
|
43
|
-
withExtendedWidthTypes: boolean;
|
|
44
|
-
}) => NodeSpec;
|
|
45
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
/**
|
|
3
|
-
* Copied from `packages/adf-schema/src/schema/nodes/media.ts`
|
|
4
|
-
*
|
|
5
|
-
* When we patch adf-schema with media `toDOM` fixes we can remove this.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getMediaAttrs: (nodeName: string, node: PMNode) => {
|
|
8
|
-
"data-alt": any;
|
|
9
|
-
"data-collection": any;
|
|
10
|
-
"data-height": any;
|
|
11
|
-
"data-id": any;
|
|
12
|
-
"data-node-type": string;
|
|
13
|
-
"data-occurrence-key": any;
|
|
14
|
-
"data-type": any;
|
|
15
|
-
"data-url": any;
|
|
16
|
-
"data-width": any;
|
|
17
|
-
style: string;
|
|
18
|
-
title: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const camelCaseToKebabCase: (str: string) => string;
|
|
21
|
-
/**
|
|
22
|
-
* Copied from `packages/adf-schema/src/schema/nodes/media-single.ts`
|
|
23
|
-
*
|
|
24
|
-
* When we patch adf-schema with media `toDOM` fixes we can remove this.
|
|
25
|
-
*/
|
|
26
|
-
export declare const getAttrsFromNodeMediaSingle: (withExtendedWidthTypes: boolean, node: PMNode) => {
|
|
27
|
-
"data-media-vc-wrapper": string;
|
|
28
|
-
"data-width-type": any;
|
|
29
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
import type { ContextIdentifierProvider, MediaProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
|
-
import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
9
|
-
import type { ForwardRef, MediaOptions, getPosHandler as ProsemirrorGetPosHandler } from '../types';
|
|
10
|
-
export interface MediaSingleNodeProps {
|
|
11
|
-
addPendingTask?: (promise: Promise<any>) => void;
|
|
12
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
13
|
-
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
14
|
-
editorAppearance?: EditorAppearance;
|
|
15
|
-
editorDisabled?: boolean;
|
|
16
|
-
editorViewMode?: boolean;
|
|
17
|
-
eventDispatcher: EventDispatcher;
|
|
18
|
-
forwardRef: ForwardRef;
|
|
19
|
-
fullWidthMode?: boolean;
|
|
20
|
-
getPos: ProsemirrorGetPosHandler;
|
|
21
|
-
isCopyPasteEnabled?: boolean;
|
|
22
|
-
isDrafting?: boolean;
|
|
23
|
-
lineLength: number;
|
|
24
|
-
mediaOptions: MediaOptions;
|
|
25
|
-
mediaProvider?: Promise<MediaProvider>;
|
|
26
|
-
node: PMNode;
|
|
27
|
-
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
28
|
-
selected: () => boolean;
|
|
29
|
-
targetNodeId?: string;
|
|
30
|
-
view: EditorView;
|
|
31
|
-
width: number;
|
|
32
|
-
}
|
|
33
|
-
export interface MediaSingleNodeViewProps {
|
|
34
|
-
dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
|
|
35
|
-
editorAppearance?: EditorAppearance;
|
|
36
|
-
eventDispatcher: EventDispatcher;
|
|
37
|
-
fullWidthMode?: boolean;
|
|
38
|
-
intl?: IntlShape;
|
|
39
|
-
isCopyPasteEnabled?: boolean;
|
|
40
|
-
mediaOptions: MediaOptions;
|
|
41
|
-
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
42
|
-
providerFactory: ProviderFactory;
|
|
43
|
-
}
|
|
44
|
-
export interface MediaNodeViewProps {
|
|
45
|
-
eventDispatcher: EventDispatcher;
|
|
46
|
-
intl?: IntlShape;
|
|
47
|
-
mediaOptions: MediaOptions;
|
|
48
|
-
pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
49
|
-
providerFactory: ProviderFactory;
|
|
50
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
/**
|
|
6
|
-
* ProseMirror plugin that manages AI-generating decorations on media nodes.
|
|
7
|
-
*
|
|
8
|
-
* Instead of storing transient `__isAIGenerating` attributes in the ADF schema
|
|
9
|
-
* (which pollutes the document model and undo history), this plugin uses
|
|
10
|
-
* ProseMirror decorations — a view-layer-only mechanism that never affects the
|
|
11
|
-
* document content, serialization, or undo/redo stack.
|
|
12
|
-
*/
|
|
13
|
-
export declare const aiGeneratingDecorationPluginKey: PluginKey;
|
|
14
|
-
export type AIGeneratingSource = 'cwr' | 'maui';
|
|
15
|
-
export type AIGeneratingAction = {
|
|
16
|
-
mediaId: string;
|
|
17
|
-
source?: AIGeneratingSource;
|
|
18
|
-
type: 'SET_GENERATING';
|
|
19
|
-
} | {
|
|
20
|
-
mediaId: string;
|
|
21
|
-
type: 'CLEAR_GENERATING';
|
|
22
|
-
} | {
|
|
23
|
-
type: 'CLEAR_ALL';
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Returns `true` if the given decorations array contains an AI-generating
|
|
27
|
-
* decoration. Call this from a NodeView's `update()` / `viewShouldUpdate()`
|
|
28
|
-
* to determine whether to render the AI border.
|
|
29
|
-
*/
|
|
30
|
-
export declare function hasAIGeneratingDecoration(decorations: readonly Decoration[]): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Dispatch a transaction that sets the AI-generating decoration on a media
|
|
33
|
-
* node identified by `mediaId`.
|
|
34
|
-
*
|
|
35
|
-
* Usage from the editor bridge:
|
|
36
|
-
* ```
|
|
37
|
-
* editorAPI.core.actions.execute(({ tr }) =>
|
|
38
|
-
* setAIGeneratingMeta(tr, mediaId),
|
|
39
|
-
* );
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare function setAIGeneratingMeta(tr: Transaction, mediaId: string, source?: AIGeneratingSource): Transaction;
|
|
43
|
-
/**
|
|
44
|
-
* Dispatch a transaction that clears the AI-generating decoration for a
|
|
45
|
-
* specific media node.
|
|
46
|
-
*/
|
|
47
|
-
export declare function clearAIGeneratingMeta(tr: Transaction, mediaId: string): Transaction;
|
|
48
|
-
/** Creates the ProseMirror plugin that manages AI-generating decorations on media nodes. */
|
|
49
|
-
export declare function createAIGeneratingDecorationPlugin(): SafePlugin;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type CloseMediaAltTextMenu = {
|
|
2
|
-
type: 'closeMediaAltTextMenu';
|
|
3
|
-
};
|
|
4
|
-
export type OpenMediaAltTextMenu = {
|
|
5
|
-
type: 'openMediaAltTextMenu';
|
|
6
|
-
};
|
|
7
|
-
export type UpdateAltText = {
|
|
8
|
-
type: 'updateAltText';
|
|
9
|
-
};
|
|
10
|
-
export type MediaAltTextAction = OpenMediaAltTextMenu | CloseMediaAltTextMenu | UpdateAltText;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
export declare const closeMediaAltTextMenuAndSave: (altText?: string) => Command;
|
|
4
|
-
export declare const closeMediaAltTextMenu: Command;
|
|
5
|
-
export declare const openMediaAltTextMenu: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
6
|
-
export declare const updateAltText: (newAltText: string) => Command;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { Command, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { MediaAltTextAction } from './actions';
|
|
5
|
-
import type { MediaAltTextState } from './types';
|
|
6
|
-
declare const createCommand: <A = MediaAltTextAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
7
|
-
declare const getPluginState: (state: EditorState) => MediaAltTextState;
|
|
8
|
-
export declare const createPlugin: ({ dispatch, providerFactory, }: PMPluginFactoryParams) => SafePlugin<MediaAltTextState>;
|
|
9
|
-
export { createCommand, getPluginState };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
export default function keymapPlugin(schema: Schema, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { WrappedComponentProps } from 'react-intl';
|
|
4
|
-
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
export declare const MAX_ALT_TEXT_LENGTH = 510;
|
|
7
|
-
type Props = {
|
|
8
|
-
altTextValidator?: (value: string) => string[];
|
|
9
|
-
areAnyNewToolbarFlagsEnabled?: boolean;
|
|
10
|
-
mediaType: 'file' | 'image' | 'external';
|
|
11
|
-
nodeType: 'mediaSingle' | 'mediaInline';
|
|
12
|
-
onEnter?: () => void;
|
|
13
|
-
onEscape?: () => void;
|
|
14
|
-
value?: string;
|
|
15
|
-
view: EditorView;
|
|
16
|
-
} & WrappedComponentProps & WithAnalyticsEventsProps;
|
|
17
|
-
export type AltTextEditComponentState = {
|
|
18
|
-
lastValue: string | undefined;
|
|
19
|
-
showClearTextButton: boolean;
|
|
20
|
-
validationErrors: string[] | undefined;
|
|
21
|
-
};
|
|
22
|
-
export declare class AltTextEditComponent extends React.Component<Props, AltTextEditComponentState> {
|
|
23
|
-
private fireCustomAnalytics?;
|
|
24
|
-
private errorsListRef;
|
|
25
|
-
state: {
|
|
26
|
-
lastValue: string | undefined;
|
|
27
|
-
showClearTextButton: boolean;
|
|
28
|
-
validationErrors: string[];
|
|
29
|
-
};
|
|
30
|
-
constructor(props: Props);
|
|
31
|
-
prevValue: string | undefined;
|
|
32
|
-
componentDidMount(): void;
|
|
33
|
-
componentWillUnmount(): void;
|
|
34
|
-
private getValidationErrors;
|
|
35
|
-
render(): jsx.JSX.Element;
|
|
36
|
-
private closeMediaAltTextMenu;
|
|
37
|
-
private closeMediaAltTextMenuAndSetFocus;
|
|
38
|
-
private fireAnalytics;
|
|
39
|
-
private dispatchCancelEvent;
|
|
40
|
-
private handleOnChange;
|
|
41
|
-
private handleOnBlur;
|
|
42
|
-
private handleClearText;
|
|
43
|
-
}
|
|
44
|
-
declare const _default_1: React.ForwardRefExoticComponent<Omit<Omit<Props, 'intl'> & {
|
|
45
|
-
forwardedRef?: React.Ref<any>;
|
|
46
|
-
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
47
|
-
export default _default_1;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
export declare const selectCaptionFromMediaSinglePos: (mediaSingleNodePos: number, mediaSingleNode: PMNode) => Command;
|
|
5
|
-
export declare const insertAndSelectCaptionFromMediaSinglePos: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (mediaSingleNodePos: number | undefined, mediaSingleNode: PMNode) => Command;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { MediaNodeWithPosHandler, MediaPluginState } from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* Note that Media Inline is inserted like a media single node into the media plugin state.
|
|
6
|
-
* Though it is not of type mediaSingle, it shares the same `findMediaSingleNode` method
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
export declare const findMediaNode: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler | null;
|
|
10
|
-
export declare const findAllMediaNodes: (mediaPluginState: MediaPluginState, id: string) => MediaNodeWithPosHandler[];
|
|
11
|
-
export declare const isMediaNode: (pos: number, state: EditorState) => boolean | null;
|
|
12
|
-
export declare const updateAllMediaNodesAttrs: (id: string, attrs: object) => Command;
|
|
13
|
-
export declare const updateCurrentMediaNodeAttrs: (attrs: object, mediaNode: MediaNodeWithPosHandler, tintDirtyTr?: boolean) => Command;
|
|
14
|
-
export declare const updateMediaNodeAttrs: (id: string, attrs: object) => Command;
|
|
15
|
-
export declare const replaceExternalMedia: (pos: number, attrs: object) => Command;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Command, CommandDispatch } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
export declare const showLinkingToolbar: Command;
|
|
6
|
-
export declare const showLinkingToolbarWithMediaTypeCheck: Command;
|
|
7
|
-
export declare const hideLinkingToolbar: (state: EditorState, dispatch?: CommandDispatch, view?: EditorView, focusFloatingToolbar?: boolean) => void;
|
|
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;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { EditorAnalyticsAPI, InputMethodInsertMedia, InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
4
|
-
import { type AIGeneratingSource } from '../pm-plugins/ai-generating-decoration';
|
|
5
|
-
export declare const showMediaViewer: (media: MediaADFAttrs) => EditorCommand;
|
|
6
|
-
export declare const hideMediaViewer: EditorCommand;
|
|
7
|
-
export declare const trackMediaPaste: (attrs: MediaADFAttrs) => EditorCommand;
|
|
8
|
-
/**
|
|
9
|
-
* Sets the AI-generating decoration on a media node identified by `mediaId`.
|
|
10
|
-
* The decoration triggers the AI border visual on the media's NodeView.
|
|
11
|
-
*
|
|
12
|
-
* Decorations live in the view layer only and never affect the document model
|
|
13
|
-
* or undo/redo history.
|
|
14
|
-
*/
|
|
15
|
-
export declare const setAIGenerating: (mediaId: string, source?: AIGeneratingSource) => EditorCommand;
|
|
16
|
-
/**
|
|
17
|
-
* Clears the AI-generating decoration for a specific media node identified by
|
|
18
|
-
* `mediaId`. Removes the AI border visual from that media's NodeView.
|
|
19
|
-
*/
|
|
20
|
-
export declare const clearAIGenerating: (mediaId: string) => EditorCommand;
|
|
21
|
-
export declare const insertMediaAsMediaSingleCommand: (editorAnalyticsAPI?: EditorAnalyticsAPI, allowPixelResizing?: boolean) => (mediaAttrs: MediaADFAttrs, inputMethod: InputMethodInsertMedia, insertMediaVia?: InsertMediaVia, positions?: [
|
|
22
|
-
number,
|
|
23
|
-
number
|
|
24
|
-
], dataConsumerSource?: string) => EditorCommand;
|