@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,29 +0,0 @@
|
|
|
1
|
-
import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import { type Identifier } from '@atlaskit/media-client';
|
|
7
|
-
import type { MediaState, getPosHandler as ProsemirrorGetPosHandler } from '../../types';
|
|
8
|
-
export declare const isMediaBlobUrlFromAttrs: (attrs: MediaADFAttrs) => boolean;
|
|
9
|
-
export declare const posOfMediaGroupNearby: (state: EditorState) => number | undefined;
|
|
10
|
-
export declare const isSelectionNonMediaBlockNode: (state: EditorState) => boolean;
|
|
11
|
-
export declare const isSelectionMediaSingleNode: (state: EditorState) => boolean;
|
|
12
|
-
export declare const posOfPrecedingMediaGroup: (state: EditorState) => number | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Determine whether the cursor is inside empty paragraph
|
|
15
|
-
* or the selection is the entire paragraph
|
|
16
|
-
*/
|
|
17
|
-
export declare const isInsidePotentialEmptyParagraph: (state: EditorState) => boolean;
|
|
18
|
-
export declare const posOfParentMediaGroup: (state: EditorState, $pos?: ResolvedPos, prepend?: boolean) => number | undefined;
|
|
19
|
-
export declare const removeMediaNode: (view: EditorView, node: PMNode, getPos: ProsemirrorGetPosHandler) => void;
|
|
20
|
-
export declare const splitMediaGroup: (view: EditorView) => boolean;
|
|
21
|
-
export declare const copyOptionalAttrsFromMediaState: (mediaState: MediaState, node: PMNode) => void;
|
|
22
|
-
export declare const getMediaNodeFromSelection: (state: EditorState) => PMNode | null;
|
|
23
|
-
export declare const isMediaSingleOrInlineNodeSelected: (state: EditorState) => boolean | undefined;
|
|
24
|
-
export declare const getMediaSingleOrInlineNodeFromSelection: (state: EditorState) => PMNode | null;
|
|
25
|
-
export declare const getMediaFromSupportedMediaNodesFromSelection: (state: EditorState) => PMNode | null;
|
|
26
|
-
export declare const isNodeDoubleClickSupportedInLivePagesViewMode: (isViewMode: boolean, node?: PMNode | null) => boolean;
|
|
27
|
-
export declare const getIdentifier: (attrs: MediaADFAttrs) => Identifier;
|
|
28
|
-
export declare const extractMediaNodes: (doc: ProseMirrorNode) => PMNode[];
|
|
29
|
-
export declare const createMediaIdentifierArray: (mediaNodes: ProseMirrorNode[]) => any[];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI, InputMethodInsertMedia, InsertEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { ACTION_SUBJECT_ID, type InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { MediaState } from '../../types';
|
|
6
|
-
export declare const canInsertMediaInline: (state: EditorState) => boolean;
|
|
7
|
-
export declare const getFailToInsertAnalytics: (mediaState: MediaState, actionSubjectId: ACTION_SUBJECT_ID.MEDIA_INLINE | ACTION_SUBJECT_ID.MEDIA_GROUP | ACTION_SUBJECT_ID.MEDIA_SINGLE, inputMethod?: InputMethodInsertMedia, insertMediaVia?: InsertMediaVia, reason?: string) => InsertEventPayload;
|
|
8
|
-
/**
|
|
9
|
-
* Create a new media inline to insert the new media.
|
|
10
|
-
* @param view Editor view
|
|
11
|
-
* @param mediaState Media file to be added to the editor
|
|
12
|
-
* @param allowInlineImages Configuration for allowing adding of inline images
|
|
13
|
-
* @param collection Collection for the media to be added
|
|
14
|
-
*/
|
|
15
|
-
export declare const insertMediaInlineNode: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, mediaState: MediaState, collection: string, allowInlineImages: boolean, inputMethod?: InputMethodInsertMedia, insertMediaVia?: InsertMediaVia) => boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Insert a media into an existing media group
|
|
18
|
-
* or create a new media group to insert the new media.
|
|
19
|
-
* @param view Editor view
|
|
20
|
-
* @param mediaStates Media files to be added to the editor
|
|
21
|
-
* @param collection Collection for the media to be added
|
|
22
|
-
*/
|
|
23
|
-
export declare const insertMediaGroupNode: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, mediaStates: MediaState[], collection: string, inputMethod?: InputMethodInsertMedia, insertMediaVia?: InsertMediaVia) => void;
|
|
24
|
-
/**
|
|
25
|
-
* Return position of media to be inserted, if it is inside a list
|
|
26
|
-
* @param content Content to be inserted
|
|
27
|
-
* @param state Editor State
|
|
28
|
-
*/
|
|
29
|
-
export declare const getPosInList: (state: EditorState) => number | undefined;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { MediaOptions } from '../../types';
|
|
3
|
-
type MediaNodeType = 'inline' | 'block' | 'group';
|
|
4
|
-
export declare const isInSupportedInlineImageParent: (state: EditorState) => boolean;
|
|
5
|
-
export declare const getMediaNodeInsertionType: (state: EditorState, mediaOptions?: MediaOptions, fileMimeType?: string) => MediaNodeType;
|
|
6
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type MemoizedFn } from 'memoize-one';
|
|
2
|
-
import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
3
|
-
import type { EditorAnalyticsAPI, InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { type InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import type { EditorCommand, EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { MediaState } from '../../types';
|
|
9
|
-
export declare const isMediaSingle: (schema: Schema, fileMimeType?: string) => boolean;
|
|
10
|
-
export type InsertMediaAsMediaSingle = (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
11
|
-
export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
12
|
-
export declare const createInsertMediaAsMediaSingleCommand: (mediaAttrs: MediaADFAttrs, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean, positions?: [
|
|
13
|
-
number,
|
|
14
|
-
number
|
|
15
|
-
], dataConsumerSource?: string) => EditorCommand;
|
|
16
|
-
export declare const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined, onNodeInserted?: (id: string, selectionPosition: number) => void, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
17
|
-
export declare const changeFromMediaInlineToMediaSingleNode: (view: EditorView, fromNode: PMNode, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined, allowPixelResizing?: boolean) => boolean;
|
|
18
|
-
export declare const isVideo: MemoizedFn<(fileType?: string) => boolean>;
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import type { MediaADFAttrs, MediaInlineAttributes } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { MediaProvider, ProviderFactory, Providers } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { HandlePositioning } from '@atlaskit/editor-common/resizer';
|
|
4
|
-
import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
5
|
-
import type { EditorAppearance, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
6
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
9
|
-
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
10
|
-
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
11
|
-
import type { MediaFile, UploadParams } from '@atlaskit/media-picker/types';
|
|
12
|
-
import type { MediaViewerExtensions } from '@atlaskit/media-viewer';
|
|
13
|
-
interface PlaceholderTextOptions {
|
|
14
|
-
allowInserting?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
|
|
17
|
-
export type MediaSingleWithType = 'pixel' | 'percentage';
|
|
18
|
-
export type MediaCopyScope = 'editor' | 'context';
|
|
19
|
-
export interface MediaPluginOptions {
|
|
20
|
-
alignLeftOnInsert?: boolean;
|
|
21
|
-
allowAdvancedToolBarOptions?: boolean;
|
|
22
|
-
allowAltTextOnImages?: boolean;
|
|
23
|
-
allowBreakoutSnapPoints?: boolean;
|
|
24
|
-
allowCaptions?: boolean;
|
|
25
|
-
allowCommentsOnMedia?: boolean;
|
|
26
|
-
allowDropzoneDropLine?: boolean;
|
|
27
|
-
allowImageEditing?: boolean;
|
|
28
|
-
allowImagePreview?: boolean;
|
|
29
|
-
allowLazyLoading?: boolean;
|
|
30
|
-
allowLinking?: boolean;
|
|
31
|
-
allowMarkingUploadsAsIncomplete?: boolean;
|
|
32
|
-
allowMediaGroup?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* @experimental
|
|
35
|
-
* Still under development. Use with caution.
|
|
36
|
-
*/
|
|
37
|
-
allowMediaInlineImages?: boolean;
|
|
38
|
-
allowMediaSingle?: boolean | MediaSingleOptions;
|
|
39
|
-
allowMediaSingleEditable?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* @caution
|
|
42
|
-
* This attribute is used to enable the pixel resizing experience.
|
|
43
|
-
* When enabled it cannot be rolled back -> see PIR-27544 https://ops.internal.atlassian.com/jira/browse/PIR-27544
|
|
44
|
-
* Rollback action causes dataloss, no way to retrieve the original width, as fallback will always be 100
|
|
45
|
-
*/
|
|
46
|
-
allowPixelResizing?: boolean;
|
|
47
|
-
allowRemoteDimensionsFetch?: boolean;
|
|
48
|
-
allowResizing?: boolean;
|
|
49
|
-
allowResizingInTables?: boolean;
|
|
50
|
-
allowTemplatePlaceholders?: boolean | PlaceholderTextOptions;
|
|
51
|
-
altTextValidator?: (value: string) => string[];
|
|
52
|
-
createCommentExperience?: {
|
|
53
|
-
initExperience: {
|
|
54
|
-
start: () => void;
|
|
55
|
-
};
|
|
56
|
-
start: (_: {
|
|
57
|
-
attributes: {
|
|
58
|
-
annotationId?: undefined;
|
|
59
|
-
blockType: 'media';
|
|
60
|
-
commentType: 'block';
|
|
61
|
-
entryPoint?: 'highlightActionsSimple';
|
|
62
|
-
pageClass: 'editor';
|
|
63
|
-
};
|
|
64
|
-
}) => void;
|
|
65
|
-
};
|
|
66
|
-
customDropzoneContainer?: HTMLElement;
|
|
67
|
-
customMediaPicker?: CustomMediaPicker;
|
|
68
|
-
disableQuickInsert?: boolean;
|
|
69
|
-
editorAppearance?: EditorAppearance;
|
|
70
|
-
editorSelectionAPI?: EditorSelectionAPI;
|
|
71
|
-
enableDownloadButton?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Optional fallback fetcher to retrieve the media filename from another service
|
|
74
|
-
* Workaround for #hot-301450 where media service is missing filenames for DC -> Cloud migrated media
|
|
75
|
-
* Receives the file ID and should resolve to the filename string.
|
|
76
|
-
*/
|
|
77
|
-
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
78
|
-
featureFlags?: MediaFeatureFlags;
|
|
79
|
-
forceHandlePositioning?: HandlePositioning;
|
|
80
|
-
fullWidthEnabled?: boolean;
|
|
81
|
-
getEditorFeatureFlags?: GetEditorFeatureFlags;
|
|
82
|
-
isCopyPasteEnabled?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Enabling this will prevent this plugin from automatically trying to upload external images to the Media service.
|
|
85
|
-
* This can be used in conjunction with the `isOnlyExternalLinks` config for `media-insert-plugin` to limit images
|
|
86
|
-
* to external URLs in the UI as well.
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* ```typescript
|
|
90
|
-
* createDefaultPreset({ featureFlags: {}, paste: {} })
|
|
91
|
-
* .add(listPlugin)
|
|
92
|
-
* .add(gridPlugin)
|
|
93
|
-
* .add([mediaPlugin, { provider, allowMediaSingle: true, isExternalMediaUploadDisabled: true }])
|
|
94
|
-
* .add(insertBlockPlugin)
|
|
95
|
-
* .add(contentInsertionPlugin)
|
|
96
|
-
* .add([mediaInsertPlugin, { isOnlyExternalLinks: true }])
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
isExternalMediaUploadDisabled?: boolean;
|
|
100
|
-
mediaShallowCopyScope?: MediaCopyScope;
|
|
101
|
-
/** Extensions for the media viewer header (e.g. comment navigation button). */
|
|
102
|
-
mediaViewerExtensions?: MediaViewerExtensions;
|
|
103
|
-
onCommentButtonMount?: () => void;
|
|
104
|
-
/**
|
|
105
|
-
* When enabled, prevents automatic focus/selection of media nodes after upload completion.
|
|
106
|
-
* The existing focus will be preserved instead of switching to the uploaded media.
|
|
107
|
-
* @default false
|
|
108
|
-
*/
|
|
109
|
-
preventAutoFocusOnUpload?: boolean;
|
|
110
|
-
provider?: Providers['mediaProvider'];
|
|
111
|
-
syncProvider?: MediaProvider;
|
|
112
|
-
uploadErrorHandler?: (state: MediaState) => void;
|
|
113
|
-
useForgePlugins?: boolean;
|
|
114
|
-
waitForMediaUpload?: boolean;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* @private
|
|
118
|
-
* @deprecated Use {@link MediaPluginOptions} instead.
|
|
119
|
-
* @see https://product-fabric.atlassian.net/browse/ED-27496
|
|
120
|
-
*/
|
|
121
|
-
export type MediaOptions = MediaPluginOptions;
|
|
122
|
-
export interface MediaSingleOptions {
|
|
123
|
-
disableLayout?: boolean;
|
|
124
|
-
}
|
|
125
|
-
export interface MediaState {
|
|
126
|
-
collection?: string;
|
|
127
|
-
contextId?: string;
|
|
128
|
-
dimensions?: {
|
|
129
|
-
height: number | undefined;
|
|
130
|
-
width: number | undefined;
|
|
131
|
-
};
|
|
132
|
-
error?: {
|
|
133
|
-
description: string;
|
|
134
|
-
name: string;
|
|
135
|
-
};
|
|
136
|
-
fileMimeType?: string;
|
|
137
|
-
fileName?: string;
|
|
138
|
-
fileSize?: number;
|
|
139
|
-
id: string;
|
|
140
|
-
/** still require to support Mobile */
|
|
141
|
-
publicId?: string;
|
|
142
|
-
scaleFactor?: number;
|
|
143
|
-
status?: MediaStateStatus;
|
|
144
|
-
}
|
|
145
|
-
export type Listener = (data: any) => void;
|
|
146
|
-
export interface CustomMediaPicker {
|
|
147
|
-
destroy: () => void;
|
|
148
|
-
emit: (event: string, data: any) => void;
|
|
149
|
-
on: (event: string, cb: Listener) => void;
|
|
150
|
-
removeAllListeners: (event: any) => void;
|
|
151
|
-
setUploadParams: (uploadParams: UploadParams) => void;
|
|
152
|
-
}
|
|
153
|
-
export type MobileUploadEndEventPayload = {
|
|
154
|
-
readonly file: MediaFile & {
|
|
155
|
-
readonly collectionName?: string;
|
|
156
|
-
readonly publicId?: string;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
export type MediaEditorState = {
|
|
160
|
-
editor?: {
|
|
161
|
-
identifier: FileIdentifier;
|
|
162
|
-
pos: number;
|
|
163
|
-
};
|
|
164
|
-
mediaClientConfig?: MediaClientConfig;
|
|
165
|
-
};
|
|
166
|
-
export type MediaToolbarBaseConfig = {
|
|
167
|
-
getDomRef?: (view: EditorView) => HTMLElement | undefined;
|
|
168
|
-
nodeType: NodeType | NodeType[];
|
|
169
|
-
title: string;
|
|
170
|
-
};
|
|
171
|
-
export type MediaFloatingToolbarOptions = {
|
|
172
|
-
allowAdvancedToolBarOptions?: boolean;
|
|
173
|
-
allowAltTextOnImages?: boolean;
|
|
174
|
-
allowCommentsOnMedia?: boolean;
|
|
175
|
-
allowImageEditing?: boolean;
|
|
176
|
-
allowImagePreview?: boolean;
|
|
177
|
-
allowLinking?: boolean;
|
|
178
|
-
allowMediaInline?: boolean;
|
|
179
|
-
allowMediaInlineImages?: boolean;
|
|
180
|
-
/**
|
|
181
|
-
* @caution
|
|
182
|
-
* This attribute is used to enable the pixel resizing experience.
|
|
183
|
-
* When enabled it cannot be rolled back -> see PIR-27544 https://ops.internal.atlassian.com/jira/browse/PIR-27544
|
|
184
|
-
* Rollback action causes dataloss, no way to retrieve the original width, as fallback will always be 100
|
|
185
|
-
**/
|
|
186
|
-
allowPixelResizing?: boolean;
|
|
187
|
-
allowResizing?: boolean;
|
|
188
|
-
allowResizingInTables?: boolean;
|
|
189
|
-
altTextValidator?: (value: string) => string[];
|
|
190
|
-
createCommentExperience?: MediaPluginOptions['createCommentExperience'];
|
|
191
|
-
fullWidthEnabled?: boolean;
|
|
192
|
-
isViewOnly?: boolean;
|
|
193
|
-
onCommentButtonMount?: () => void;
|
|
194
|
-
providerFactory?: ProviderFactory;
|
|
195
|
-
};
|
|
196
|
-
export type MediaDecorationSpec = {
|
|
197
|
-
selected: boolean;
|
|
198
|
-
type: 'media';
|
|
199
|
-
};
|
|
200
|
-
export type SupportedMediaAttributes = MediaADFAttrs | MediaInlineAttributes;
|
|
201
|
-
export type ProsemirrorGetPosHandler = getPosHandlerNode;
|
|
202
|
-
export type getPosHandler = getPosHandlerNode;
|
|
203
|
-
export type getPosHandlerNode = () => number | undefined;
|
|
204
|
-
export interface ReactNodeProps {
|
|
205
|
-
selected: boolean;
|
|
206
|
-
}
|
|
207
|
-
export type ForwardRef = (node: HTMLElement | null) => void;
|
|
208
|
-
export type { InsertMediaAsMediaSingle } from '../pm-plugins/utils/media-single';
|
|
209
|
-
export type { MediaPluginState } from '../pm-plugins/types';
|
|
210
|
-
type MediaStateEvent = MediaState;
|
|
211
|
-
export type MediaStateEventListener = (evt: MediaStateEvent) => void;
|
|
212
|
-
export type MediaStateEventSubscriber = (listener: MediaStateEventListener) => void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
|
|
2
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
-
import type { ErrorReporter } from '@atlaskit/editor-common/utils';
|
|
4
|
-
import type { CustomMediaPicker, MediaState } from './index';
|
|
5
|
-
export type MediaPluginOptions = {
|
|
6
|
-
allowResizing: boolean;
|
|
7
|
-
customDropzoneContainer?: HTMLElement;
|
|
8
|
-
customMediaPicker?: CustomMediaPicker;
|
|
9
|
-
errorReporter?: ErrorReporter;
|
|
10
|
-
nodeViews: {
|
|
11
|
-
[name: string]: NodeViewConstructor;
|
|
12
|
-
};
|
|
13
|
-
providerFactory: ProviderFactory;
|
|
14
|
-
uploadErrorHandler?: (state: MediaState) => void;
|
|
15
|
-
waitForMediaUpload?: boolean;
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
type CaptionPlaceholderProps = {
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
placeholderMessage?: {
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare const CaptionPlaceholder: React.ForwardRefExoticComponent<CaptionPlaceholderProps & React.RefAttributes<HTMLSpanElement>>;
|
|
15
|
-
export declare const CaptionPlaceholderButton: React.ForwardRefExoticComponent<CaptionPlaceholderProps & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { AnnotationMarkDefinition } from '@atlaskit/adf-schema';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
7
|
-
import type { getPosHandler } from '../../types';
|
|
8
|
-
type CommentBadgeWrapperProps = {
|
|
9
|
-
api?: ExtractInjectionAPI<MediaNextEditorPluginType>;
|
|
10
|
-
getPos: getPosHandler;
|
|
11
|
-
isDrafting?: boolean;
|
|
12
|
-
marks?: AnnotationMarkDefinition[];
|
|
13
|
-
mediaNode: PMNode | null;
|
|
14
|
-
mediaSingleElement?: HTMLElement | null;
|
|
15
|
-
view: EditorView;
|
|
16
|
-
};
|
|
17
|
-
export declare const CommentBadgeWrapper: ({ api, mediaNode, view, getPos, isDrafting, }: CommentBadgeWrapperProps) => React.JSX.Element | null;
|
|
18
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { IntlShape } from 'react-intl';
|
|
3
|
-
import type { BorderMarkAttributes } from '@atlaskit/adf-schema';
|
|
4
|
-
export interface ImageBorderProps {
|
|
5
|
-
borderMark?: BorderMarkAttributes;
|
|
6
|
-
intl: IntlShape;
|
|
7
|
-
setBorder: (attrs: Partial<BorderMarkAttributes>) => void;
|
|
8
|
-
toggleBorder: () => void;
|
|
9
|
-
}
|
|
10
|
-
declare const ImageBorder: ({ intl: { formatMessage }, toggleBorder, borderMark, setBorder, }: ImageBorderProps) => jsx.JSX.Element;
|
|
11
|
-
export default ImageBorder;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type SerializedStyles } from '@emotion/react';
|
|
2
|
-
export declare const menuItemDimensions: {
|
|
3
|
-
width: number;
|
|
4
|
-
height: number;
|
|
5
|
-
};
|
|
6
|
-
export declare const itemSpacing = 4;
|
|
7
|
-
export declare const contextualMenuArrow: SerializedStyles;
|
|
8
|
-
export declare const contextualMenuColorIcon: (color?: string) => SerializedStyles;
|
|
9
|
-
export declare const contextualSubMenu: (index: number) => SerializedStyles;
|
|
10
|
-
export declare const buttonStyle: (selected: boolean) => SerializedStyles;
|
|
11
|
-
export declare const buttonWrapperStyle: SerializedStyles;
|
|
12
|
-
export declare const line: (size: number, selected: boolean) => SerializedStyles;
|
|
13
|
-
export declare const toolbarButtonWrapper: ({ enabled, isOpen, }: {
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
isOpen: boolean;
|
|
16
|
-
}) => SerializedStyles;
|
|
17
|
-
export declare const dropdownOptionButton: SerializedStyles;
|
|
18
|
-
export declare const dropdownWrapper: SerializedStyles;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
6
|
-
export type PlaceholderType = 'single' | 'group';
|
|
7
|
-
interface Props {
|
|
8
|
-
type: PlaceholderType;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: ({ type }: Props) => jsx.JSX.Element;
|
|
11
|
-
export default _default;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { IntlShape, WrappedComponentProps } from 'react-intl';
|
|
8
|
-
import type { RecentSearchInputTypes } from '@atlaskit/editor-common/link';
|
|
9
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
10
|
-
type Props = {
|
|
11
|
-
areAnyNewToolbarFlagsEnabled: boolean;
|
|
12
|
-
displayUrl?: string;
|
|
13
|
-
editing: boolean;
|
|
14
|
-
intl: IntlShape;
|
|
15
|
-
onBack: (url: string, meta: {
|
|
16
|
-
inputMethod?: RecentSearchInputTypes;
|
|
17
|
-
}, setFocus?: boolean) => void;
|
|
18
|
-
onBlur: (href: string) => void;
|
|
19
|
-
onCancel: () => void;
|
|
20
|
-
onSubmit: (href: string, meta: {
|
|
21
|
-
inputMethod: RecentSearchInputTypes;
|
|
22
|
-
}, setFocus?: boolean) => void;
|
|
23
|
-
onUnlink: (setFocus?: boolean) => void;
|
|
24
|
-
providerFactory: ProviderFactory;
|
|
25
|
-
};
|
|
26
|
-
declare class LinkAddToolbar extends React.PureComponent<Props & WrappedComponentProps> {
|
|
27
|
-
state: {
|
|
28
|
-
validationErrors: never[];
|
|
29
|
-
};
|
|
30
|
-
private handleSubmit;
|
|
31
|
-
private handleOnBack;
|
|
32
|
-
private handleCancel;
|
|
33
|
-
private handleUnlink;
|
|
34
|
-
private handleOnBlur;
|
|
35
|
-
private getValidationErrors;
|
|
36
|
-
private renderContainer;
|
|
37
|
-
render(): jsx.JSX.Element;
|
|
38
|
-
}
|
|
39
|
-
export default LinkAddToolbar;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { MediaFeatureFlags } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
4
|
-
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
5
|
-
type Props = {
|
|
6
|
-
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
7
|
-
featureFlags?: MediaFeatureFlags;
|
|
8
|
-
isOpen?: boolean;
|
|
9
|
-
onBrowseFn: (browse: () => void) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare const BrowserWrapper: ({ api, isOpen, onBrowseFn, featureFlags, }: Props) => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { MediaFeatureFlags } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
4
|
-
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
5
|
-
type Props = {
|
|
6
|
-
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
7
|
-
container?: HTMLElement;
|
|
8
|
-
featureFlags?: MediaFeatureFlags;
|
|
9
|
-
};
|
|
10
|
-
export declare const ClipboardWrapper: ({ api, container, featureFlags }: Props) => React.JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { MediaFeatureFlags } from '@atlaskit/media-common/mediaFeatureFlags';
|
|
4
|
-
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
5
|
-
type Props = {
|
|
6
|
-
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
7
|
-
appearance: EditorAppearance;
|
|
8
|
-
editorDomElement: Element;
|
|
9
|
-
featureFlags?: MediaFeatureFlags;
|
|
10
|
-
isActive: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare const DropzoneWrapper: ({ api, isActive, featureFlags, editorDomElement, appearance, }: Props) => React.JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
-
import type { BrowserConfig, ClipboardConfig, DropzoneConfig } from '@atlaskit/media-picker/types';
|
|
5
|
-
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
6
|
-
import PickerFacade from '../../pm-plugins/picker-facade';
|
|
7
|
-
interface ChildrenProps {
|
|
8
|
-
config: ClipboardConfig | BrowserConfig | DropzoneConfig;
|
|
9
|
-
mediaClientConfig: MediaClientConfig;
|
|
10
|
-
pickerFacadeInstance: PickerFacade;
|
|
11
|
-
}
|
|
12
|
-
export type Props = {
|
|
13
|
-
analyticsName: string;
|
|
14
|
-
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
15
|
-
children: (props: ChildrenProps) => React.ReactElement | null;
|
|
16
|
-
};
|
|
17
|
-
export default function PickerFacadeProvider({ api, analyticsName, children, }: Props): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
18
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
4
|
-
type Props = {
|
|
5
|
-
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
6
|
-
appearance: EditorAppearance;
|
|
7
|
-
editorDomElement: Element;
|
|
8
|
-
onPopupToggle: (onPopupToggle: (isPopupOpened: boolean) => void) => void;
|
|
9
|
-
setBrowseFn: (nativeBrowseFn: () => void) => void;
|
|
10
|
-
};
|
|
11
|
-
type State = {
|
|
12
|
-
isPopupOpened: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare class MediaPickerComponents extends React.Component<Props, State> {
|
|
15
|
-
static displayName: string;
|
|
16
|
-
state: {
|
|
17
|
-
isPopupOpened: boolean;
|
|
18
|
-
};
|
|
19
|
-
componentDidMount(): void;
|
|
20
|
-
onBrowseFn: (nativeBrowseFn: () => void) => void;
|
|
21
|
-
render(): React.JSX.Element;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type IntlShape } from 'react-intl';
|
|
3
|
-
interface Props {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
intl: IntlShape | undefined;
|
|
6
|
-
}
|
|
7
|
-
export declare function MediaSSRReactContextsProvider({ children, intl }: Props): ReactNode;
|
|
8
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
-
import type { MediaClientConfig } from '@atlaskit/media-core/auth';
|
|
9
|
-
import type { MediaViewerExtensions } from '@atlaskit/media-viewer';
|
|
10
|
-
type MediaViewerContainerProps = {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
isEditorViewMode?: boolean;
|
|
13
|
-
isInline?: boolean;
|
|
14
|
-
isSelected?: boolean;
|
|
15
|
-
mediaClientConfig: MediaClientConfig;
|
|
16
|
-
mediaNode: PMNode;
|
|
17
|
-
mediaViewerExtensions?: MediaViewerExtensions;
|
|
18
|
-
selectedMediaContainerNode: () => PMNode | undefined;
|
|
19
|
-
};
|
|
20
|
-
export declare const MediaViewerContainer: ({ mediaNode, selectedMediaContainerNode, mediaClientConfig, isEditorViewMode, isSelected, isInline, mediaViewerExtensions, children, }: MediaViewerContainerProps) => jsx.JSX.Element;
|
|
21
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
3
|
-
import type { Identifier, MediaClientConfig } from '@atlaskit/media-client';
|
|
4
|
-
import { type MediaViewerExtensions } from '@atlaskit/media-viewer';
|
|
5
|
-
interface RenderMediaViewerProps {
|
|
6
|
-
extensions?: MediaViewerExtensions;
|
|
7
|
-
items?: Identifier[];
|
|
8
|
-
mediaClientConfig: MediaClientConfig;
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
selectedNodeAttrs: MediaADFAttrs;
|
|
11
|
-
}
|
|
12
|
-
export declare const RenderMediaViewer: ({ mediaClientConfig, onClose, selectedNodeAttrs, items, extensions, }: RenderMediaViewerProps) => React.ReactPortal;
|
|
13
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx } from '@emotion/react';
|
|
2
|
-
import type { Props } from './types';
|
|
3
|
-
export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
|
|
4
|
-
type ResizableMediaSingleNextProps = Props & {
|
|
5
|
-
showLegacyNotification?: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare const ResizableMediaSingleNextFunctional: (props: ResizableMediaSingleNextProps) => jsx.JSX.Element;
|
|
8
|
-
declare const ResizableMediaSingleToggle: ({ allowBreakoutSnapPoints, children, className, containerWidth, dataAttributes, disableHandles, dispatchAnalyticsEvent, editorAppearance, fullWidthMode, getPos, gridSize, handleMediaSingleRef, hasFallbackContainer, height, isInsideOfInlineExtension, isLoading, layout, lineLength, mediaSingleWidth, nodeType, pctWidth, pluginInjectionApi, selected, showLegacyNotification, size, updateSize, view, viewMediaClientConfig, width, forceHandlePositioning, }: ResizableMediaSingleNextProps) => jsx.JSX.Element;
|
|
9
|
-
export default ResizableMediaSingleToggle;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
8
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
-
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
10
|
-
import type { Props } from './types';
|
|
11
|
-
type State = {
|
|
12
|
-
isVideoFile: boolean;
|
|
13
|
-
offsetLeft: number;
|
|
14
|
-
resizedPctWidth?: number;
|
|
15
|
-
};
|
|
16
|
-
export default class ResizableMediaSingle extends React.Component<Props, State> {
|
|
17
|
-
private hasResized;
|
|
18
|
-
state: State;
|
|
19
|
-
componentDidUpdate(prevProps: Props): boolean;
|
|
20
|
-
private displayGrid;
|
|
21
|
-
get wrappedLayout(): boolean;
|
|
22
|
-
isNestedInTable(): boolean;
|
|
23
|
-
componentDidMount(): Promise<void>;
|
|
24
|
-
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
25
|
-
checkVideoFile(viewMediaClientConfig?: MediaClientConfig): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* When returning to center layout from a wrapped/aligned layout, it might actually
|
|
28
|
-
* be wide or full-width
|
|
29
|
-
*/
|
|
30
|
-
checkLayout(oldLayout: MediaSingleLayout, newLayout: MediaSingleLayout): void;
|
|
31
|
-
calcNewSize: (newWidth: number, stop: boolean) => {
|
|
32
|
-
layout: MediaSingleLayout;
|
|
33
|
-
width: number | null;
|
|
34
|
-
};
|
|
35
|
-
calcUnwrappedLayout: (pct: number, width: number) => "center" | "wide" | "full-width";
|
|
36
|
-
get $pos(): ResolvedPos | null;
|
|
37
|
-
/**
|
|
38
|
-
* The maxmimum number of grid columns this node can resize to.
|
|
39
|
-
*/
|
|
40
|
-
get gridWidth(): number;
|
|
41
|
-
calcColumnLeftOffset: () => number;
|
|
42
|
-
wrapper?: HTMLElement;
|
|
43
|
-
calcPxWidth: (useLayout?: MediaSingleLayout) => number;
|
|
44
|
-
get insideInlineLike(): boolean;
|
|
45
|
-
get insideLayout(): boolean;
|
|
46
|
-
highlights: (newWidth: number, snapPoints: number[]) => string[] | number[];
|
|
47
|
-
private saveWrapper;
|
|
48
|
-
render(): jsx.JSX.Element;
|
|
49
|
-
}
|
|
50
|
-
export {};
|