@atlaskit/editor-plugin-media 8.6.1 → 8.7.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 +15 -0
- package/dist/cjs/mediaPlugin.js +76 -43
- package/dist/cjs/pm-plugins/actions.js +3 -1
- package/dist/cjs/pm-plugins/commands.js +23 -1
- package/dist/cjs/pm-plugins/main.js +16 -0
- package/dist/cjs/ui/CaptionPlaceholder/index.js +2 -2
- package/dist/cjs/ui/ImageEditor/ModalWrapper.js +69 -0
- package/dist/cjs/ui/ImageEditor/index.js +62 -0
- package/dist/cjs/ui/toolbar/index.js +24 -11
- package/dist/es2019/mediaPlugin.js +38 -3
- package/dist/es2019/pm-plugins/actions.js +3 -1
- package/dist/es2019/pm-plugins/commands.js +22 -0
- package/dist/es2019/pm-plugins/main.js +14 -0
- package/dist/es2019/ui/CaptionPlaceholder/index.js +2 -2
- package/dist/es2019/ui/ImageEditor/ModalWrapper.js +58 -0
- package/dist/es2019/ui/ImageEditor/index.js +53 -0
- package/dist/es2019/ui/toolbar/index.js +20 -6
- package/dist/esm/mediaPlugin.js +77 -44
- package/dist/esm/pm-plugins/actions.js +3 -1
- package/dist/esm/pm-plugins/commands.js +22 -0
- package/dist/esm/pm-plugins/main.js +16 -0
- package/dist/esm/ui/CaptionPlaceholder/index.js +2 -2
- package/dist/esm/ui/ImageEditor/ModalWrapper.js +60 -0
- package/dist/esm/ui/ImageEditor/index.js +52 -0
- package/dist/esm/ui/toolbar/index.js +23 -10
- package/dist/types/mediaPluginType.d.ts +2 -0
- package/dist/types/pm-plugins/actions.d.ts +2 -0
- package/dist/types/pm-plugins/commands.d.ts +2 -0
- package/dist/types/pm-plugins/main.d.ts +4 -1
- package/dist/types/pm-plugins/types.d.ts +3 -0
- package/dist/types/ui/ImageEditor/ModalWrapper.d.ts +13 -0
- package/dist/types/ui/ImageEditor/index.d.ts +12 -0
- package/dist/types/ui/toolbar/index.d.ts +4 -0
- package/dist/types-ts4.5/mediaPluginType.d.ts +2 -0
- package/dist/types-ts4.5/pm-plugins/actions.d.ts +2 -0
- package/dist/types-ts4.5/pm-plugins/commands.d.ts +2 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +4 -1
- package/dist/types-ts4.5/pm-plugins/types.d.ts +3 -0
- package/dist/types-ts4.5/ui/ImageEditor/ModalWrapper.d.ts +13 -0
- package/dist/types-ts4.5/ui/ImageEditor/index.d.ts +12 -0
- package/dist/types-ts4.5/ui/toolbar/index.d.ts +4 -0
- package/package.json +3 -2
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
8
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
9
|
+
import Button from '@atlaskit/button/new';
|
|
10
|
+
import Modal, { ModalBody, ModalFooter, ModalTransition } from '@atlaskit/modal-dialog';
|
|
11
|
+
var imageWrapper = css({
|
|
12
|
+
maxHeight: 'calc(100vh - 250px)',
|
|
13
|
+
width: '100%',
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
display: 'flex',
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
alignItems: 'center'
|
|
18
|
+
});
|
|
19
|
+
var imageStyle = css({
|
|
20
|
+
maxWidth: '100%',
|
|
21
|
+
maxHeight: 'calc(100vh - 250px)',
|
|
22
|
+
width: 'auto',
|
|
23
|
+
height: 'auto',
|
|
24
|
+
objectFit: 'contain'
|
|
25
|
+
});
|
|
26
|
+
export var ImageEditor = function ImageEditor(_ref) {
|
|
27
|
+
var isOpen = _ref.isOpen,
|
|
28
|
+
onClose = _ref.onClose,
|
|
29
|
+
imageUrl = _ref.imageUrl;
|
|
30
|
+
return jsx(ModalTransition, null, isOpen && jsx(Modal, {
|
|
31
|
+
onClose: onClose,
|
|
32
|
+
width: 1800
|
|
33
|
+
}, jsx("br", null), jsx(ModalBody, null, jsx("div", {
|
|
34
|
+
css: imageWrapper
|
|
35
|
+
}, imageUrl && jsx("img", {
|
|
36
|
+
src: imageUrl,
|
|
37
|
+
alt: "Edit preview",
|
|
38
|
+
css: imageStyle
|
|
39
|
+
}))), jsx(ModalFooter, null, jsx(Button, {
|
|
40
|
+
appearance: "subtle",
|
|
41
|
+
onClick: onClose
|
|
42
|
+
}, jsx(FormattedMessage, {
|
|
43
|
+
id: "editor.imageEditor.cancel",
|
|
44
|
+
defaultMessage: "Cancel"
|
|
45
|
+
})), jsx(Button, {
|
|
46
|
+
appearance: "primary",
|
|
47
|
+
onClick: onClose
|
|
48
|
+
}, jsx(FormattedMessage, {
|
|
49
|
+
id: "editor.imageEditor.done",
|
|
50
|
+
defaultMessage: "Done"
|
|
51
|
+
})))));
|
|
52
|
+
};
|
|
@@ -112,6 +112,15 @@ export var handleShowMediaViewer = function handleShowMediaViewer(_ref) {
|
|
|
112
112
|
}
|
|
113
113
|
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 ? void 0 : api.media.commands.showMediaViewer(selectedNodeAttrs));
|
|
114
114
|
};
|
|
115
|
+
export var handleShowImageEditor = function handleShowImageEditor(_ref2) {
|
|
116
|
+
var api = _ref2.api,
|
|
117
|
+
mediaPluginState = _ref2.mediaPluginState;
|
|
118
|
+
var selectedNodeAttrs = getSelectedNearestMediaContainerNodeAttrs(mediaPluginState);
|
|
119
|
+
if (!selectedNodeAttrs) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 ? void 0 : api.media.commands.showImageEditor(selectedNodeAttrs));
|
|
123
|
+
};
|
|
115
124
|
var generateMediaCardFloatingToolbar = function generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi, editorAnalyticsAPI, forceFocusSelector, isViewOnly) {
|
|
116
125
|
var _pluginInjectionApi$c;
|
|
117
126
|
var disableDownloadButton = getIsDownloadDisabledByDataSecurityPolicy(mediaPluginState);
|
|
@@ -269,8 +278,8 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
269
278
|
allowPixelResizing = options.allowPixelResizing,
|
|
270
279
|
onCommentButtonMount = options.onCommentButtonMount;
|
|
271
280
|
var toolbarButtons = [];
|
|
272
|
-
var
|
|
273
|
-
hoverDecoration =
|
|
281
|
+
var _ref3 = (_pluginInjectionApi$d = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d2 = pluginInjectionApi.decorations) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions) !== null && _pluginInjectionApi$d !== void 0 ? _pluginInjectionApi$d : {},
|
|
282
|
+
hoverDecoration = _ref3.hoverDecoration;
|
|
274
283
|
var areAnyNewToolbarFlagsEnabled = areToolbarFlagsEnabled(Boolean(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.toolbar));
|
|
275
284
|
var disableDownloadButton = getIsDownloadDisabledByDataSecurityPolicy(pluginState);
|
|
276
285
|
if (shouldShowImageBorder(state)) {
|
|
@@ -556,9 +565,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
556
565
|
icon: ImageCropIcon,
|
|
557
566
|
title: intl.formatMessage(commonMessages.imageEdit),
|
|
558
567
|
onClick: function onClick() {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
568
|
+
var _handleShowImageEdito;
|
|
569
|
+
return (_handleShowImageEdito = handleShowImageEditor({
|
|
570
|
+
api: pluginInjectionApi,
|
|
571
|
+
mediaPluginState: pluginState
|
|
572
|
+
})) !== null && _handleShowImageEdito !== void 0 ? _handleShowImageEdito : false;
|
|
562
573
|
},
|
|
563
574
|
supportsViewMode: false
|
|
564
575
|
});
|
|
@@ -714,9 +725,11 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
714
725
|
icon: ImageCropIcon,
|
|
715
726
|
title: intl.formatMessage(commonMessages.imageEdit),
|
|
716
727
|
onClick: function onClick() {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
728
|
+
var _handleShowImageEdito2;
|
|
729
|
+
return (_handleShowImageEdito2 = handleShowImageEditor({
|
|
730
|
+
api: pluginInjectionApi,
|
|
731
|
+
mediaPluginState: pluginState
|
|
732
|
+
})) !== null && _handleShowImageEdito2 !== void 0 ? _handleShowImageEdito2 : false;
|
|
720
733
|
},
|
|
721
734
|
supportsViewMode: false
|
|
722
735
|
}, {
|
|
@@ -764,8 +777,8 @@ export var floatingToolbar = function floatingToolbar(state, intl) {
|
|
|
764
777
|
allowMediaInline = fg('platform_editor_remove_media_inline_feature_flag') ? allowMediaInlineImages : allowMediaInline;
|
|
765
778
|
var mediaPluginState = stateKey.getState(state);
|
|
766
779
|
var mediaLinkingState = getMediaLinkingState(state);
|
|
767
|
-
var
|
|
768
|
-
hoverDecoration =
|
|
780
|
+
var _ref4 = (_pluginInjectionApi$d3 = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$d4 = pluginInjectionApi.decorations) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : _pluginInjectionApi$d4.actions) !== null && _pluginInjectionApi$d3 !== void 0 ? _pluginInjectionApi$d3 : {},
|
|
781
|
+
hoverDecoration = _ref4.hoverDecoration;
|
|
769
782
|
if (!mediaPluginState) {
|
|
770
783
|
return;
|
|
771
784
|
}
|
|
@@ -59,7 +59,9 @@ export type MediaNextEditorPluginType = NextEditorPlugin<'media', {
|
|
|
59
59
|
setProvider: (provider: Promise<MediaProvider>) => boolean;
|
|
60
60
|
};
|
|
61
61
|
commands: {
|
|
62
|
+
hideImageEditor: EditorCommand;
|
|
62
63
|
hideMediaViewer: EditorCommand;
|
|
64
|
+
showImageEditor: (media: MediaADFAttrs) => EditorCommand;
|
|
63
65
|
showMediaViewer: (media: MediaADFAttrs) => EditorCommand;
|
|
64
66
|
trackMediaPaste: (attrs: MediaADFAttrs) => EditorCommand;
|
|
65
67
|
};
|
|
@@ -3,3 +3,5 @@ import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
export declare const showMediaViewer: (media: MediaADFAttrs) => EditorCommand;
|
|
4
4
|
export declare const hideMediaViewer: EditorCommand;
|
|
5
5
|
export declare const trackMediaPaste: (attrs: MediaADFAttrs) => EditorCommand;
|
|
6
|
+
export declare const showImageEditor: (media: MediaADFAttrs) => EditorCommand;
|
|
7
|
+
export declare const hideImageEditor: EditorCommand;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { MediaADFAttrs, RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
5
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
@@ -41,6 +41,8 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
41
41
|
(isUploading: boolean): void;
|
|
42
42
|
}[];
|
|
43
43
|
uploadInProgressSubscriptionsNotified: boolean;
|
|
44
|
+
isImageEditorVisible?: boolean;
|
|
45
|
+
imageEditorSelectedMedia?: MediaADFAttrs;
|
|
44
46
|
lastAddedMediaSingleFileIds: {
|
|
45
47
|
id: string;
|
|
46
48
|
selectionPosition: number;
|
|
@@ -72,6 +74,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
72
74
|
getMediaOptions: () => MediaPluginOptions;
|
|
73
75
|
setIsResizing(isResizing: boolean): void;
|
|
74
76
|
setResizingWidth(width: number): void;
|
|
77
|
+
setImageEditorVisibility(isVisible: boolean): void;
|
|
75
78
|
updateElement(): void;
|
|
76
79
|
private isMediaSchemaNode;
|
|
77
80
|
private getDomElement;
|
|
@@ -32,9 +32,11 @@ export interface MediaPluginState {
|
|
|
32
32
|
handleMediaNodeRemoval: (node: PMNode | undefined, getPos: ProsemirrorGetPosHandler) => void;
|
|
33
33
|
handleMediaNodeUnmount: (oldNode: PMNode) => void;
|
|
34
34
|
ignoreLinks: boolean;
|
|
35
|
+
imageEditorSelectedMedia?: MediaADFAttrs;
|
|
35
36
|
insertFile: (mediaState: MediaState, onMediaStateChanged: MediaStateEventSubscriber, pickerType?: string, insertMediaVia?: InsertMediaVia) => void;
|
|
36
37
|
isFullscreen: boolean;
|
|
37
38
|
isIdentifierInEditorScope: (identifier: Identifier) => boolean;
|
|
39
|
+
isImageEditorVisible?: boolean;
|
|
38
40
|
isMediaViewerVisible?: boolean;
|
|
39
41
|
isResizing: boolean;
|
|
40
42
|
lastAddedMediaSingleFileIds: {
|
|
@@ -56,6 +58,7 @@ export interface MediaPluginState {
|
|
|
56
58
|
resizingWidth: number;
|
|
57
59
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
58
60
|
setBrowseFn: (browseFn: () => void) => void;
|
|
61
|
+
setImageEditorVisibility: (isVisible: boolean) => void;
|
|
59
62
|
setIsResizing(isResizing: boolean): void;
|
|
60
63
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
61
64
|
setResizingWidth(width: number): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
|
|
4
|
+
import type { MediaClientConfig } from '@atlaskit/media-client';
|
|
5
|
+
interface RenderImageEditorProps {
|
|
6
|
+
errorReporter?: ErrorReporter;
|
|
7
|
+
mediaClientConfig: MediaClientConfig;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onSave?: (updatedAttrs: MediaADFAttrs) => void;
|
|
10
|
+
selectedNodeAttrs: MediaADFAttrs;
|
|
11
|
+
}
|
|
12
|
+
export declare const RenderImageEditor: ({ mediaClientConfig, onClose, selectedNodeAttrs, errorReporter, onSave, }: RenderImageEditorProps) => React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
|
+
interface ImageEditModalProps {
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ImageEditor: ({ isOpen, onClose, imageUrl, }: ImageEditModalProps) => jsx.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -8,5 +8,9 @@ export declare const handleShowMediaViewer: ({ api, mediaPluginState, }: {
|
|
|
8
8
|
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
9
9
|
mediaPluginState: MediaPluginState;
|
|
10
10
|
}) => false | undefined;
|
|
11
|
+
export declare const handleShowImageEditor: ({ api, mediaPluginState, }: {
|
|
12
|
+
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
13
|
+
mediaPluginState: MediaPluginState;
|
|
14
|
+
}) => false | undefined;
|
|
11
15
|
export declare const overflowDropdwonBtnTriggerTestId = "media-overflow-dropdown-trigger";
|
|
12
16
|
export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -59,7 +59,9 @@ export type MediaNextEditorPluginType = NextEditorPlugin<'media', {
|
|
|
59
59
|
setProvider: (provider: Promise<MediaProvider>) => boolean;
|
|
60
60
|
};
|
|
61
61
|
commands: {
|
|
62
|
+
hideImageEditor: EditorCommand;
|
|
62
63
|
hideMediaViewer: EditorCommand;
|
|
64
|
+
showImageEditor: (media: MediaADFAttrs) => EditorCommand;
|
|
63
65
|
showMediaViewer: (media: MediaADFAttrs) => EditorCommand;
|
|
64
66
|
trackMediaPaste: (attrs: MediaADFAttrs) => EditorCommand;
|
|
65
67
|
};
|
|
@@ -3,3 +3,5 @@ import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
export declare const showMediaViewer: (media: MediaADFAttrs) => EditorCommand;
|
|
4
4
|
export declare const hideMediaViewer: EditorCommand;
|
|
5
5
|
export declare const trackMediaPaste: (attrs: MediaADFAttrs) => EditorCommand;
|
|
6
|
+
export declare const showImageEditor: (media: MediaADFAttrs) => EditorCommand;
|
|
7
|
+
export declare const hideImageEditor: EditorCommand;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
|
-
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { MediaADFAttrs, RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
3
3
|
import type { InsertMediaVia } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
5
5
|
import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
@@ -41,6 +41,8 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
41
41
|
(isUploading: boolean): void;
|
|
42
42
|
}[];
|
|
43
43
|
uploadInProgressSubscriptionsNotified: boolean;
|
|
44
|
+
isImageEditorVisible?: boolean;
|
|
45
|
+
imageEditorSelectedMedia?: MediaADFAttrs;
|
|
44
46
|
lastAddedMediaSingleFileIds: {
|
|
45
47
|
id: string;
|
|
46
48
|
selectionPosition: number;
|
|
@@ -72,6 +74,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
72
74
|
getMediaOptions: () => MediaPluginOptions;
|
|
73
75
|
setIsResizing(isResizing: boolean): void;
|
|
74
76
|
setResizingWidth(width: number): void;
|
|
77
|
+
setImageEditorVisibility(isVisible: boolean): void;
|
|
75
78
|
updateElement(): void;
|
|
76
79
|
private isMediaSchemaNode;
|
|
77
80
|
private getDomElement;
|
|
@@ -32,9 +32,11 @@ export interface MediaPluginState {
|
|
|
32
32
|
handleMediaNodeRemoval: (node: PMNode | undefined, getPos: ProsemirrorGetPosHandler) => void;
|
|
33
33
|
handleMediaNodeUnmount: (oldNode: PMNode) => void;
|
|
34
34
|
ignoreLinks: boolean;
|
|
35
|
+
imageEditorSelectedMedia?: MediaADFAttrs;
|
|
35
36
|
insertFile: (mediaState: MediaState, onMediaStateChanged: MediaStateEventSubscriber, pickerType?: string, insertMediaVia?: InsertMediaVia) => void;
|
|
36
37
|
isFullscreen: boolean;
|
|
37
38
|
isIdentifierInEditorScope: (identifier: Identifier) => boolean;
|
|
39
|
+
isImageEditorVisible?: boolean;
|
|
38
40
|
isMediaViewerVisible?: boolean;
|
|
39
41
|
isResizing: boolean;
|
|
40
42
|
lastAddedMediaSingleFileIds: {
|
|
@@ -56,6 +58,7 @@ export interface MediaPluginState {
|
|
|
56
58
|
resizingWidth: number;
|
|
57
59
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
58
60
|
setBrowseFn: (browseFn: () => void) => void;
|
|
61
|
+
setImageEditorVisibility: (isVisible: boolean) => void;
|
|
59
62
|
setIsResizing(isResizing: boolean): void;
|
|
60
63
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
61
64
|
setResizingWidth(width: number): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MediaADFAttrs } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { ErrorReporter } from '@atlaskit/editor-common/error-reporter';
|
|
4
|
+
import type { MediaClientConfig } from '@atlaskit/media-client';
|
|
5
|
+
interface RenderImageEditorProps {
|
|
6
|
+
errorReporter?: ErrorReporter;
|
|
7
|
+
mediaClientConfig: MediaClientConfig;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onSave?: (updatedAttrs: MediaADFAttrs) => void;
|
|
10
|
+
selectedNodeAttrs: MediaADFAttrs;
|
|
11
|
+
}
|
|
12
|
+
export declare const RenderImageEditor: ({ mediaClientConfig, onClose, selectedNodeAttrs, errorReporter, onSave, }: RenderImageEditorProps) => React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { jsx } from '@emotion/react';
|
|
6
|
+
interface ImageEditModalProps {
|
|
7
|
+
imageUrl?: string;
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ImageEditor: ({ isOpen, onClose, imageUrl, }: ImageEditModalProps) => jsx.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -8,5 +8,9 @@ export declare const handleShowMediaViewer: ({ api, mediaPluginState, }: {
|
|
|
8
8
|
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
9
9
|
mediaPluginState: MediaPluginState;
|
|
10
10
|
}) => false | undefined;
|
|
11
|
+
export declare const handleShowImageEditor: ({ api, mediaPluginState, }: {
|
|
12
|
+
api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
|
|
13
|
+
mediaPluginState: MediaPluginState;
|
|
14
|
+
}) => false | undefined;
|
|
11
15
|
export declare const overflowDropdwonBtnTriggerTestId = "media-overflow-dropdown-trigger";
|
|
12
16
|
export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => FloatingToolbarConfig | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.7.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -62,11 +62,12 @@
|
|
|
62
62
|
"@atlaskit/media-picker": "^70.1.0",
|
|
63
63
|
"@atlaskit/media-ui": "^28.7.0",
|
|
64
64
|
"@atlaskit/media-viewer": "^52.5.0",
|
|
65
|
+
"@atlaskit/modal-dialog": "^14.9.0",
|
|
65
66
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
66
67
|
"@atlaskit/primitives": "^16.4.0",
|
|
67
68
|
"@atlaskit/textfield": "^8.2.0",
|
|
68
69
|
"@atlaskit/theme": "^21.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^15.
|
|
70
|
+
"@atlaskit/tmp-editor-statsig": "^15.15.0",
|
|
70
71
|
"@atlaskit/tokens": "^8.6.0",
|
|
71
72
|
"@atlaskit/tooltip": "^20.11.0",
|
|
72
73
|
"@babel/runtime": "^7.0.0",
|