@atlaskit/editor-plugin-media 5.0.1 → 5.1.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 +12 -0
- package/dist/cjs/pm-plugins/pixel-resizing/ui/pixel-entry.js +2 -2
- package/dist/es2019/pm-plugins/pixel-resizing/ui/pixel-entry.js +2 -2
- package/dist/esm/pm-plugins/pixel-resizing/ui/pixel-entry.js +2 -2
- package/dist/types/nodeviews/lazy-media-group.d.ts +1 -2
- package/dist/types/nodeviews/lazy-media.d.ts +1 -2
- package/dist/types/nodeviews/mediaGroup.d.ts +2 -2
- package/dist/types/nodeviews/mediaGroupNext.d.ts +12 -12
- package/dist/types/nodeviews/mediaNodeView/index.d.ts +2 -2
- package/dist/types/nodeviews/toDOM-fixes/mediaGroup.d.ts +1 -1
- package/dist/types/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/pm-plugins/picker-facade.d.ts +2 -7
- package/dist/types/pm-plugins/pixel-resizing/index.d.ts +1 -1
- package/dist/types/pm-plugins/utils/analytics.d.ts +2 -2
- package/dist/types/pm-plugins/utils/check-media-type.d.ts +1 -1
- package/dist/types/pm-plugins/utils/media-single.d.ts +1 -1
- package/dist/types/ui/ResizableMediaSingle/index.d.ts +1 -1
- package/dist/types/ui/toolbar/alt-text.d.ts +1 -1
- package/dist/types/ui/toolbar/pixel-resizing.d.ts +2 -2
- package/dist/types/ui/toolbar/utils.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/lazy-media-group.d.ts +1 -2
- package/dist/types-ts4.5/nodeviews/lazy-media.d.ts +1 -2
- package/dist/types-ts4.5/nodeviews/mediaGroup.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +12 -12
- package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaGroup.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/picker-facade.d.ts +2 -7
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/check-media-type.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +1 -1
- package/dist/types-ts4.5/ui/ResizableMediaSingle/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/alt-text.d.ts +1 -1
- package/dist/types-ts4.5/ui/toolbar/pixel-resizing.d.ts +2 -2
- package/dist/types-ts4.5/ui/toolbar/utils.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-media
|
|
2
2
|
|
|
3
|
+
## 5.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#175869](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/175869)
|
|
8
|
+
[`e7f822af7edc1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e7f822af7edc1) -
|
|
9
|
+
Updated usages of deprecated icons with replacement icons
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 5.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -14,7 +14,7 @@ var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
|
14
14
|
var _new = require("@atlaskit/button/new");
|
|
15
15
|
var _media = require("@atlaskit/editor-common/media");
|
|
16
16
|
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
17
|
-
var
|
|
17
|
+
var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
|
|
18
18
|
var _primitives = require("@atlaskit/primitives");
|
|
19
19
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
20
20
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -365,7 +365,7 @@ var PixelEntryComponentNext = exports.PixelEntryComponentNext = function PixelEn
|
|
|
365
365
|
xcss: dividerStyles
|
|
366
366
|
}), (0, _react2.jsx)(_new.IconButton, {
|
|
367
367
|
icon: function icon() {
|
|
368
|
-
return (0, _react2.jsx)(
|
|
368
|
+
return (0, _react2.jsx)(_cross.default, {
|
|
369
369
|
label: "",
|
|
370
370
|
color: "var(--ds-icon-subtlest, #626F86)"
|
|
371
371
|
});
|
|
@@ -11,7 +11,7 @@ import Button from '@atlaskit/button';
|
|
|
11
11
|
import { IconButton } from '@atlaskit/button/new';
|
|
12
12
|
import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
|
|
13
13
|
import Form, { Field } from '@atlaskit/form';
|
|
14
|
-
import
|
|
14
|
+
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives
|
|
16
16
|
import { Inline, Box, Text, xcss } from '@atlaskit/primitives';
|
|
17
17
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -346,7 +346,7 @@ export const PixelEntryComponentNext = ({
|
|
|
346
346
|
}))), !isViewMode && jsx(Fragment, null, jsx(Box, {
|
|
347
347
|
xcss: dividerStyles
|
|
348
348
|
}), jsx(IconButton, {
|
|
349
|
-
icon: () => jsx(
|
|
349
|
+
icon: () => jsx(CrossIcon, {
|
|
350
350
|
label: "",
|
|
351
351
|
color: "var(--ds-icon-subtlest, #626F86)"
|
|
352
352
|
}),
|
|
@@ -12,7 +12,7 @@ import Button from '@atlaskit/button';
|
|
|
12
12
|
import { IconButton } from '@atlaskit/button/new';
|
|
13
13
|
import { pixelEntryMessages as messages } from '@atlaskit/editor-common/media';
|
|
14
14
|
import Form, { Field } from '@atlaskit/form';
|
|
15
|
-
import
|
|
15
|
+
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
16
16
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives
|
|
17
17
|
import { Inline, Box, Text, xcss } from '@atlaskit/primitives';
|
|
18
18
|
import Textfield from '@atlaskit/textfield';
|
|
@@ -353,7 +353,7 @@ export var PixelEntryComponentNext = function PixelEntryComponentNext(_ref5) {
|
|
|
353
353
|
xcss: dividerStyles
|
|
354
354
|
}), jsx(IconButton, {
|
|
355
355
|
icon: function icon() {
|
|
356
|
-
return jsx(
|
|
356
|
+
return jsx(CrossIcon, {
|
|
357
357
|
label: "",
|
|
358
358
|
color: "var(--ds-icon-subtlest, #626F86)"
|
|
359
359
|
});
|
|
@@ -3,5 +3,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
3
3
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
6
|
-
|
|
7
|
-
export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
|
|
6
|
+
export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: import("../types").MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
|
|
@@ -4,5 +4,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
7
|
-
|
|
8
|
-
export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
|
|
7
|
+
export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: import("../types").MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
|
|
@@ -5,5 +5,5 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
5
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
8
|
-
import type { getPosHandler
|
|
9
|
-
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions:
|
|
8
|
+
import type { getPosHandler } from '../types';
|
|
9
|
+
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: import("../types").MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
@@ -5,31 +5,31 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { MediaOptions } from '../types';
|
|
7
7
|
export declare const MediaGroupNext: React.FC<import("react-intl-next").WithIntlProps<{
|
|
8
|
-
forwardRef?: (ref: HTMLElement) => void;
|
|
8
|
+
forwardRef?: ((ref: HTMLElement) => void) | undefined;
|
|
9
9
|
node: PMNode;
|
|
10
10
|
view: EditorView;
|
|
11
11
|
getPos: () => number | undefined;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
editorViewMode?: boolean;
|
|
14
|
-
allowLazyLoading?: boolean;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
|
+
editorViewMode?: boolean | undefined;
|
|
14
|
+
allowLazyLoading?: boolean | undefined;
|
|
15
15
|
mediaProvider: Promise<MediaProvider>;
|
|
16
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider
|
|
17
|
-
isCopyPasteEnabled?: boolean;
|
|
16
|
+
contextIdentifierProvider?: Promise<ContextIdentifierProvider> | undefined;
|
|
17
|
+
isCopyPasteEnabled?: boolean | undefined;
|
|
18
18
|
anchorPos: number;
|
|
19
19
|
headPos: number;
|
|
20
20
|
mediaOptions: MediaOptions;
|
|
21
21
|
} & WrappedComponentProps>> & {
|
|
22
22
|
WrappedComponent: React.ComponentType<{
|
|
23
|
-
forwardRef?: (ref: HTMLElement) => void;
|
|
23
|
+
forwardRef?: ((ref: HTMLElement) => void) | undefined;
|
|
24
24
|
node: PMNode;
|
|
25
25
|
view: EditorView;
|
|
26
26
|
getPos: () => number | undefined;
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
editorViewMode?: boolean;
|
|
29
|
-
allowLazyLoading?: boolean;
|
|
27
|
+
disabled?: boolean | undefined;
|
|
28
|
+
editorViewMode?: boolean | undefined;
|
|
29
|
+
allowLazyLoading?: boolean | undefined;
|
|
30
30
|
mediaProvider: Promise<MediaProvider>;
|
|
31
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider
|
|
32
|
-
isCopyPasteEnabled?: boolean;
|
|
31
|
+
contextIdentifierProvider?: Promise<ContextIdentifierProvider> | undefined;
|
|
32
|
+
isCopyPasteEnabled?: boolean | undefined;
|
|
33
33
|
anchorPos: number;
|
|
34
34
|
headPos: number;
|
|
35
35
|
mediaOptions: MediaOptions;
|
|
@@ -9,7 +9,7 @@ import type { SharedInteractionState } from '@atlaskit/editor-plugin-interaction
|
|
|
9
9
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
10
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
12
|
-
import type { getPosHandler
|
|
12
|
+
import type { getPosHandler } from '../../types';
|
|
13
13
|
import type { MediaNodeViewProps } from '../types';
|
|
14
14
|
interface MediaNodeWithPluginStateComponentProps {
|
|
15
15
|
width?: WidthPluginState;
|
|
@@ -31,5 +31,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
31
31
|
renderMediaNodeWithProviders: ({ contextIdentifierProvider }: Providers) => React.JSX.Element;
|
|
32
32
|
render(): React.JSX.Element;
|
|
33
33
|
}
|
|
34
|
-
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions:
|
|
34
|
+
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: import("../../types").MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
|
|
35
35
|
export {};
|
|
@@ -32,5 +32,5 @@ export declare const defaultSquareCardDimensions: {
|
|
|
32
32
|
* In the long term likely `toDOM` will move back out of `adf-schema` in which
|
|
33
33
|
* case we can consolidate them.
|
|
34
34
|
*/
|
|
35
|
-
export declare const getDefaultCardDimensions: (appearance?:
|
|
35
|
+
export declare const getDefaultCardDimensions: (appearance?: 'image' | 'square' | 'horizontal' | 'auto') => Required<typeof defaultImageCardDimensions>;
|
|
36
36
|
export declare const mediaGroupSpecWithFixedToDOM: () => import("prosemirror-model").NodeSpec;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
-
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
|
|
3
|
+
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
|
|
4
4
|
export declare const createPlugin: ({ dispatch, providerFactory }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState>;
|
|
5
5
|
export { createCommand, getPluginState };
|
|
@@ -41,6 +41,6 @@ export declare class AltTextEditComponent extends React.Component<Props, AltText
|
|
|
41
41
|
private handleClearText;
|
|
42
42
|
}
|
|
43
43
|
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<Props, "intl"> & {
|
|
44
|
-
forwardedRef?: React.Ref<any
|
|
44
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
45
45
|
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
46
46
|
export default _default;
|
|
@@ -4,6 +4,6 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import type { MediaLinkingActions } from './actions';
|
|
5
5
|
import type { MediaLinkingState } from './types';
|
|
6
6
|
export declare const mediaLinkingPluginKey: PluginKey<MediaLinkingState>;
|
|
7
|
-
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getMediaLinkingState: (state: import("prosemirror-state").EditorState) => MediaLinkingState;
|
|
7
|
+
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getMediaLinkingState: (state: import("prosemirror-state").EditorState) => MediaLinkingState;
|
|
8
8
|
declare const _default: (dispatch: Dispatch) => SafePlugin<MediaLinkingState>;
|
|
9
9
|
export default _default;
|
|
@@ -96,7 +96,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
96
96
|
*
|
|
97
97
|
* NOTE: The promise will resolve even if some of the media have failed to process.
|
|
98
98
|
*/
|
|
99
|
-
waitForPendingTasks: (timeout?: number, lastTask?: Promise<MediaState | null>) => Promise<MediaState | null>;
|
|
99
|
+
waitForPendingTasks: (timeout?: number | undefined, lastTask?: Promise<MediaState | null> | undefined) => Promise<MediaState | null>;
|
|
100
100
|
setView(view: EditorView): void;
|
|
101
101
|
/**
|
|
102
102
|
* Called from React UI Component when user clicks on "Delete" icon
|
|
@@ -134,7 +134,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
134
134
|
private handleMediaState;
|
|
135
135
|
removeSelectedMediaContainer: () => boolean;
|
|
136
136
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
137
|
-
handleDrag: (dragState:
|
|
137
|
+
handleDrag: (dragState: 'enter' | 'leave') => void;
|
|
138
138
|
updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
|
|
139
139
|
}
|
|
140
140
|
export declare const getMediaPluginState: (state: EditorState) => MediaPluginState;
|
|
@@ -4,11 +4,6 @@ import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
4
4
|
import type { UploadEndEventPayload, UploadErrorEventPayload, UploadParams, UploadPreviewUpdateEventPayload } from '@atlaskit/media-picker/types';
|
|
5
5
|
import type { CustomMediaPicker, MediaState, MediaStateEventSubscriber, MobileUploadEndEventPayload } from '../types';
|
|
6
6
|
type PickerType = 'clipboard' | 'dropzone' | 'customMediaPicker';
|
|
7
|
-
type ExtendedComponentConfigs = {
|
|
8
|
-
customMediaPicker: CustomMediaPicker;
|
|
9
|
-
dropzone: null;
|
|
10
|
-
clipboard: null;
|
|
11
|
-
};
|
|
12
7
|
export type PickerFacadeConfig = {
|
|
13
8
|
mediaClientConfig: MediaClientConfig;
|
|
14
9
|
errorReporter: ErrorReportingHandler;
|
|
@@ -17,7 +12,7 @@ export type PickerFacadeConfig = {
|
|
|
17
12
|
type NewMediaEvent = (state: MediaState, onStateChanged: MediaStateEventSubscriber, pickerType?: string) => void;
|
|
18
13
|
export default class PickerFacade {
|
|
19
14
|
readonly config: PickerFacadeConfig;
|
|
20
|
-
readonly pickerConfig?:
|
|
15
|
+
readonly pickerConfig?: CustomMediaPicker | null | undefined;
|
|
21
16
|
private picker?;
|
|
22
17
|
private onDragListeners;
|
|
23
18
|
private pickerType;
|
|
@@ -25,7 +20,7 @@ export default class PickerFacade {
|
|
|
25
20
|
private eventListeners;
|
|
26
21
|
private analyticsName;
|
|
27
22
|
erroredFiles: Set<string>;
|
|
28
|
-
constructor(pickerType: PickerType, config: PickerFacadeConfig, pickerConfig?:
|
|
23
|
+
constructor(pickerType: PickerType, config: PickerFacadeConfig, pickerConfig?: CustomMediaPicker | null | undefined, analyticsName?: string);
|
|
29
24
|
init(): Promise<PickerFacade>;
|
|
30
25
|
get type(): PickerType;
|
|
31
26
|
get mediaPicker(): CustomMediaPicker | undefined;
|
|
@@ -4,7 +4,7 @@ declare const createCommand: <A = {
|
|
|
4
4
|
type: "openPixelEditor";
|
|
5
5
|
} | {
|
|
6
6
|
type: "closePixelEditor";
|
|
7
|
-
}>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => {
|
|
7
|
+
}>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => {
|
|
8
8
|
isPixelEditorOpen: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare const createPlugin: ({ dispatch }: PMPluginFactoryParams) => SafePlugin<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MediaEventPayload, MediaInputResizeTrackAction, MediaResizeTrackAction, MediaSwitchType } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T[
|
|
4
|
-
export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T[
|
|
3
|
+
export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T['attributes']) => MediaEventPayload | void;
|
|
4
|
+
export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T['attributes']) => MediaEventPayload | void;
|
|
5
5
|
export declare const getChangeMediaAnalytics: (previousType: MediaSwitchType, newType: MediaSwitchType, changeFromLocation?: string) => MediaEventPayload;
|
|
6
6
|
export declare function findChangeFromLocation(selection: Selection): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { MediaType } from '@atlaskit/media-client';
|
|
3
3
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
-
export declare const checkMediaType: (mediaNode: PMNode, mediaClientConfig: MediaClientConfig) => Promise<MediaType |
|
|
4
|
+
export declare const checkMediaType: (mediaNode: PMNode, mediaClientConfig: MediaClientConfig) => Promise<MediaType | 'external' | undefined>;
|
|
@@ -7,6 +7,6 @@ import type { MediaState } from '../../types';
|
|
|
7
7
|
export declare const isMediaSingle: (schema: Schema, fileMimeType?: string) => boolean;
|
|
8
8
|
export type InsertMediaAsMediaSingle = (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
9
9
|
export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
10
|
-
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;
|
|
10
|
+
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) | undefined, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
11
11
|
export declare const changeFromMediaInlineToMediaSingleNode: (view: EditorView, fromNode: PMNode, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined, allowPixelResizing?: boolean) => boolean;
|
|
12
12
|
export declare const isVideo: import("memoize-one").MemoizedFn<(fileType?: string) => boolean>;
|
|
@@ -30,7 +30,7 @@ export default class ResizableMediaSingle extends React.Component<Props, State>
|
|
|
30
30
|
width: number | null;
|
|
31
31
|
layout: MediaSingleLayout;
|
|
32
32
|
};
|
|
33
|
-
calcUnwrappedLayout: (pct: number, width: number) =>
|
|
33
|
+
calcUnwrappedLayout: (pct: number, width: number) => 'center' | 'wide' | 'full-width';
|
|
34
34
|
get $pos(): import("prosemirror-model").ResolvedPos | null;
|
|
35
35
|
/**
|
|
36
36
|
* The maxmimum number of grid columns this node can resize to.
|
|
@@ -12,5 +12,5 @@ interface AltTextToolbarOptions {
|
|
|
12
12
|
triggerButtonSelector?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare const getAltTextToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, options?: AltTextToolbarOptions) => FloatingToolbarConfig;
|
|
15
|
-
export declare const getAltTextDropdownOption: (state: EditorState, formatMessage: IntlShape[
|
|
15
|
+
export declare const getAltTextDropdownOption: (state: EditorState, formatMessage: IntlShape['formatMessage'], allowAltTextOnImages?: boolean, selectedNodeType?: NodeType, editorAnalyticsAPI?: EditorAnalyticsAPI) => FloatingToolbarOverflowDropdownOptions<Command>;
|
|
16
16
|
export {};
|
|
@@ -4,5 +4,5 @@ import { type NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type Props } from '../../pm-plugins/pixel-resizing/ui';
|
|
6
6
|
import type { MediaOptions, MediaToolbarBaseConfig } from '../../types';
|
|
7
|
-
export declare const getPixelResizingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, { pluginInjectionApi, intl, pluginState, hoverDecoration, isEditorFullWidthEnabled, triggerButtonSelector, }: Omit<Props,
|
|
8
|
-
export declare const getResizeDropdownOption: (mediaOptions: MediaOptions, state: EditorState, formatMessage: IntlShape[
|
|
7
|
+
export declare const getPixelResizingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, { pluginInjectionApi, intl, pluginState, hoverDecoration, isEditorFullWidthEnabled, triggerButtonSelector, }: Omit<Props, 'editorView' | 'selectedMediaSingleNode'>) => FloatingToolbarConfig;
|
|
8
|
+
export declare const getResizeDropdownOption: (mediaOptions: MediaOptions, state: EditorState, formatMessage: IntlShape['formatMessage'], selectedNodeType?: NodeType) => FloatingToolbarOverflowDropdownOptions<Command>;
|
|
@@ -24,4 +24,4 @@ export declare const getSelectedLayoutIcon: (layoutIcons: LayoutIcon[], selected
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const canShowSwitchButtons: (mediaSingleNode?: ProseMirrorNode) => boolean | null;
|
|
26
26
|
export declare const updateToFullHeightSeparator: (items: FloatingToolbarItem<Command>[]) => void;
|
|
27
|
-
export declare const getMediaSingleAndMediaInlineSwitcherDropdown: (nodeType:
|
|
27
|
+
export declare const getMediaSingleAndMediaInlineSwitcherDropdown: (nodeType: 'inline' | 'block', intl: IntlShape, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, hasCaption?: boolean) => FloatingToolbarDropdown<Command>;
|
|
@@ -3,5 +3,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
3
3
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
6
|
-
|
|
7
|
-
export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
|
|
6
|
+
export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: import("../types").MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
|
|
@@ -4,5 +4,4 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
6
6
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
7
|
-
|
|
8
|
-
export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
|
|
7
|
+
export declare const lazyMediaView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: import("../types").MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
|
|
@@ -5,5 +5,5 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
5
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
7
7
|
import type { MediaNextEditorPluginType } from '../mediaPluginType';
|
|
8
|
-
import type { getPosHandler
|
|
9
|
-
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions:
|
|
8
|
+
import type { getPosHandler } from '../types';
|
|
9
|
+
export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: import("../types").MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
|
|
@@ -5,31 +5,31 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import type { MediaOptions } from '../types';
|
|
7
7
|
export declare const MediaGroupNext: React.FC<import("react-intl-next").WithIntlProps<{
|
|
8
|
-
forwardRef?: (ref: HTMLElement) => void;
|
|
8
|
+
forwardRef?: ((ref: HTMLElement) => void) | undefined;
|
|
9
9
|
node: PMNode;
|
|
10
10
|
view: EditorView;
|
|
11
11
|
getPos: () => number | undefined;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
editorViewMode?: boolean;
|
|
14
|
-
allowLazyLoading?: boolean;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
|
+
editorViewMode?: boolean | undefined;
|
|
14
|
+
allowLazyLoading?: boolean | undefined;
|
|
15
15
|
mediaProvider: Promise<MediaProvider>;
|
|
16
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider
|
|
17
|
-
isCopyPasteEnabled?: boolean;
|
|
16
|
+
contextIdentifierProvider?: Promise<ContextIdentifierProvider> | undefined;
|
|
17
|
+
isCopyPasteEnabled?: boolean | undefined;
|
|
18
18
|
anchorPos: number;
|
|
19
19
|
headPos: number;
|
|
20
20
|
mediaOptions: MediaOptions;
|
|
21
21
|
} & WrappedComponentProps>> & {
|
|
22
22
|
WrappedComponent: React.ComponentType<{
|
|
23
|
-
forwardRef?: (ref: HTMLElement) => void;
|
|
23
|
+
forwardRef?: ((ref: HTMLElement) => void) | undefined;
|
|
24
24
|
node: PMNode;
|
|
25
25
|
view: EditorView;
|
|
26
26
|
getPos: () => number | undefined;
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
editorViewMode?: boolean;
|
|
29
|
-
allowLazyLoading?: boolean;
|
|
27
|
+
disabled?: boolean | undefined;
|
|
28
|
+
editorViewMode?: boolean | undefined;
|
|
29
|
+
allowLazyLoading?: boolean | undefined;
|
|
30
30
|
mediaProvider: Promise<MediaProvider>;
|
|
31
|
-
contextIdentifierProvider?: Promise<ContextIdentifierProvider
|
|
32
|
-
isCopyPasteEnabled?: boolean;
|
|
31
|
+
contextIdentifierProvider?: Promise<ContextIdentifierProvider> | undefined;
|
|
32
|
+
isCopyPasteEnabled?: boolean | undefined;
|
|
33
33
|
anchorPos: number;
|
|
34
34
|
headPos: number;
|
|
35
35
|
mediaOptions: MediaOptions;
|
|
@@ -9,7 +9,7 @@ import type { SharedInteractionState } from '@atlaskit/editor-plugin-interaction
|
|
|
9
9
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
10
10
|
import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
11
11
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
12
|
-
import type { getPosHandler
|
|
12
|
+
import type { getPosHandler } from '../../types';
|
|
13
13
|
import type { MediaNodeViewProps } from '../types';
|
|
14
14
|
interface MediaNodeWithPluginStateComponentProps {
|
|
15
15
|
width?: WidthPluginState;
|
|
@@ -31,5 +31,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
31
31
|
renderMediaNodeWithProviders: ({ contextIdentifierProvider }: Providers) => React.JSX.Element;
|
|
32
32
|
render(): React.JSX.Element;
|
|
33
33
|
}
|
|
34
|
-
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions:
|
|
34
|
+
export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: import("../../types").MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
|
|
35
35
|
export {};
|
|
@@ -32,5 +32,5 @@ export declare const defaultSquareCardDimensions: {
|
|
|
32
32
|
* In the long term likely `toDOM` will move back out of `adf-schema` in which
|
|
33
33
|
* case we can consolidate them.
|
|
34
34
|
*/
|
|
35
|
-
export declare const getDefaultCardDimensions: (appearance?:
|
|
35
|
+
export declare const getDefaultCardDimensions: (appearance?: 'image' | 'square' | 'horizontal' | 'auto') => Required<typeof defaultImageCardDimensions>;
|
|
36
36
|
export declare const mediaGroupSpecWithFixedToDOM: () => import("prosemirror-model").NodeSpec;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
3
|
-
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
|
|
3
|
+
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
|
|
4
4
|
export declare const createPlugin: ({ dispatch, providerFactory }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState>;
|
|
5
5
|
export { createCommand, getPluginState };
|
|
@@ -41,6 +41,6 @@ export declare class AltTextEditComponent extends React.Component<Props, AltText
|
|
|
41
41
|
private handleClearText;
|
|
42
42
|
}
|
|
43
43
|
declare const _default: React.ForwardRefExoticComponent<Omit<Omit<Props, "intl"> & {
|
|
44
|
-
forwardedRef?: React.Ref<any
|
|
44
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
45
45
|
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
|
|
46
46
|
export default _default;
|
|
@@ -4,6 +4,6 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import type { MediaLinkingActions } from './actions';
|
|
5
5
|
import type { MediaLinkingState } from './types';
|
|
6
6
|
export declare const mediaLinkingPluginKey: PluginKey<MediaLinkingState>;
|
|
7
|
-
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getMediaLinkingState: (state: import("prosemirror-state").EditorState) => MediaLinkingState;
|
|
7
|
+
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getMediaLinkingState: (state: import("prosemirror-state").EditorState) => MediaLinkingState;
|
|
8
8
|
declare const _default: (dispatch: Dispatch) => SafePlugin<MediaLinkingState>;
|
|
9
9
|
export default _default;
|
|
@@ -96,7 +96,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
96
96
|
*
|
|
97
97
|
* NOTE: The promise will resolve even if some of the media have failed to process.
|
|
98
98
|
*/
|
|
99
|
-
waitForPendingTasks: (timeout?: number, lastTask?: Promise<MediaState | null>) => Promise<MediaState | null>;
|
|
99
|
+
waitForPendingTasks: (timeout?: number | undefined, lastTask?: Promise<MediaState | null> | undefined) => Promise<MediaState | null>;
|
|
100
100
|
setView(view: EditorView): void;
|
|
101
101
|
/**
|
|
102
102
|
* Called from React UI Component when user clicks on "Delete" icon
|
|
@@ -134,7 +134,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
134
134
|
private handleMediaState;
|
|
135
135
|
removeSelectedMediaContainer: () => boolean;
|
|
136
136
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
137
|
-
handleDrag: (dragState:
|
|
137
|
+
handleDrag: (dragState: 'enter' | 'leave') => void;
|
|
138
138
|
updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
|
|
139
139
|
}
|
|
140
140
|
export declare const getMediaPluginState: (state: EditorState) => MediaPluginState;
|
|
@@ -4,11 +4,6 @@ import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
|
4
4
|
import type { UploadEndEventPayload, UploadErrorEventPayload, UploadParams, UploadPreviewUpdateEventPayload } from '@atlaskit/media-picker/types';
|
|
5
5
|
import type { CustomMediaPicker, MediaState, MediaStateEventSubscriber, MobileUploadEndEventPayload } from '../types';
|
|
6
6
|
type PickerType = 'clipboard' | 'dropzone' | 'customMediaPicker';
|
|
7
|
-
type ExtendedComponentConfigs = {
|
|
8
|
-
customMediaPicker: CustomMediaPicker;
|
|
9
|
-
dropzone: null;
|
|
10
|
-
clipboard: null;
|
|
11
|
-
};
|
|
12
7
|
export type PickerFacadeConfig = {
|
|
13
8
|
mediaClientConfig: MediaClientConfig;
|
|
14
9
|
errorReporter: ErrorReportingHandler;
|
|
@@ -17,7 +12,7 @@ export type PickerFacadeConfig = {
|
|
|
17
12
|
type NewMediaEvent = (state: MediaState, onStateChanged: MediaStateEventSubscriber, pickerType?: string) => void;
|
|
18
13
|
export default class PickerFacade {
|
|
19
14
|
readonly config: PickerFacadeConfig;
|
|
20
|
-
readonly pickerConfig?:
|
|
15
|
+
readonly pickerConfig?: CustomMediaPicker | null | undefined;
|
|
21
16
|
private picker?;
|
|
22
17
|
private onDragListeners;
|
|
23
18
|
private pickerType;
|
|
@@ -25,7 +20,7 @@ export default class PickerFacade {
|
|
|
25
20
|
private eventListeners;
|
|
26
21
|
private analyticsName;
|
|
27
22
|
erroredFiles: Set<string>;
|
|
28
|
-
constructor(pickerType: PickerType, config: PickerFacadeConfig, pickerConfig?:
|
|
23
|
+
constructor(pickerType: PickerType, config: PickerFacadeConfig, pickerConfig?: CustomMediaPicker | null | undefined, analyticsName?: string);
|
|
29
24
|
init(): Promise<PickerFacade>;
|
|
30
25
|
get type(): PickerType;
|
|
31
26
|
get mediaPicker(): CustomMediaPicker | undefined;
|
|
@@ -4,7 +4,7 @@ declare const createCommand: <A = {
|
|
|
4
4
|
type: "openPixelEditor";
|
|
5
5
|
} | {
|
|
6
6
|
type: "closePixelEditor";
|
|
7
|
-
}>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => {
|
|
7
|
+
}>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => {
|
|
8
8
|
isPixelEditorOpen: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare const createPlugin: ({ dispatch }: PMPluginFactoryParams) => SafePlugin<{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MediaEventPayload, MediaInputResizeTrackAction, MediaResizeTrackAction, MediaSwitchType } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T[
|
|
4
|
-
export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T[
|
|
3
|
+
export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T['attributes']) => MediaEventPayload | void;
|
|
4
|
+
export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T['attributes']) => MediaEventPayload | void;
|
|
5
5
|
export declare const getChangeMediaAnalytics: (previousType: MediaSwitchType, newType: MediaSwitchType, changeFromLocation?: string) => MediaEventPayload;
|
|
6
6
|
export declare function findChangeFromLocation(selection: Selection): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { MediaType } from '@atlaskit/media-client';
|
|
3
3
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
4
|
-
export declare const checkMediaType: (mediaNode: PMNode, mediaClientConfig: MediaClientConfig) => Promise<MediaType |
|
|
4
|
+
export declare const checkMediaType: (mediaNode: PMNode, mediaClientConfig: MediaClientConfig) => Promise<MediaType | 'external' | undefined>;
|
|
@@ -7,6 +7,6 @@ import type { MediaState } from '../../types';
|
|
|
7
7
|
export declare const isMediaSingle: (schema: Schema, fileMimeType?: string) => boolean;
|
|
8
8
|
export type InsertMediaAsMediaSingle = (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
9
9
|
export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
10
|
-
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;
|
|
10
|
+
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) | undefined, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => boolean;
|
|
11
11
|
export declare const changeFromMediaInlineToMediaSingleNode: (view: EditorView, fromNode: PMNode, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined, allowPixelResizing?: boolean) => boolean;
|
|
12
12
|
export declare const isVideo: import("memoize-one").MemoizedFn<(fileType?: string) => boolean>;
|
|
@@ -30,7 +30,7 @@ export default class ResizableMediaSingle extends React.Component<Props, State>
|
|
|
30
30
|
width: number | null;
|
|
31
31
|
layout: MediaSingleLayout;
|
|
32
32
|
};
|
|
33
|
-
calcUnwrappedLayout: (pct: number, width: number) =>
|
|
33
|
+
calcUnwrappedLayout: (pct: number, width: number) => 'center' | 'wide' | 'full-width';
|
|
34
34
|
get $pos(): import("prosemirror-model").ResolvedPos | null;
|
|
35
35
|
/**
|
|
36
36
|
* The maxmimum number of grid columns this node can resize to.
|
|
@@ -12,5 +12,5 @@ interface AltTextToolbarOptions {
|
|
|
12
12
|
triggerButtonSelector?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare const getAltTextToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, options?: AltTextToolbarOptions) => FloatingToolbarConfig;
|
|
15
|
-
export declare const getAltTextDropdownOption: (state: EditorState, formatMessage: IntlShape[
|
|
15
|
+
export declare const getAltTextDropdownOption: (state: EditorState, formatMessage: IntlShape['formatMessage'], allowAltTextOnImages?: boolean, selectedNodeType?: NodeType, editorAnalyticsAPI?: EditorAnalyticsAPI) => FloatingToolbarOverflowDropdownOptions<Command>;
|
|
16
16
|
export {};
|
|
@@ -4,5 +4,5 @@ import { type NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
|
4
4
|
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { type Props } from '../../pm-plugins/pixel-resizing/ui';
|
|
6
6
|
import type { MediaOptions, MediaToolbarBaseConfig } from '../../types';
|
|
7
|
-
export declare const getPixelResizingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, { pluginInjectionApi, intl, pluginState, hoverDecoration, isEditorFullWidthEnabled, triggerButtonSelector, }: Omit<Props,
|
|
8
|
-
export declare const getResizeDropdownOption: (mediaOptions: MediaOptions, state: EditorState, formatMessage: IntlShape[
|
|
7
|
+
export declare const getPixelResizingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, { pluginInjectionApi, intl, pluginState, hoverDecoration, isEditorFullWidthEnabled, triggerButtonSelector, }: Omit<Props, 'editorView' | 'selectedMediaSingleNode'>) => FloatingToolbarConfig;
|
|
8
|
+
export declare const getResizeDropdownOption: (mediaOptions: MediaOptions, state: EditorState, formatMessage: IntlShape['formatMessage'], selectedNodeType?: NodeType) => FloatingToolbarOverflowDropdownOptions<Command>;
|
|
@@ -24,4 +24,4 @@ export declare const getSelectedLayoutIcon: (layoutIcons: LayoutIcon[], selected
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const canShowSwitchButtons: (mediaSingleNode?: ProseMirrorNode) => boolean | null;
|
|
26
26
|
export declare const updateToFullHeightSeparator: (items: FloatingToolbarItem<Command>[]) => void;
|
|
27
|
-
export declare const getMediaSingleAndMediaInlineSwitcherDropdown: (nodeType:
|
|
27
|
+
export declare const getMediaSingleAndMediaInlineSwitcherDropdown: (nodeType: 'inline' | 'block', intl: IntlShape, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, hasCaption?: boolean) => FloatingToolbarDropdown<Command>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "5.0
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
56
56
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
57
57
|
"@atlaskit/form": "^12.0.0",
|
|
58
|
-
"@atlaskit/icon": "^27.
|
|
58
|
+
"@atlaskit/icon": "^27.3.0",
|
|
59
59
|
"@atlaskit/icon-lab": "^5.1.0",
|
|
60
60
|
"@atlaskit/media-card": "^79.3.0",
|
|
61
61
|
"@atlaskit/media-client": "^35.0.0",
|