@atlaskit/editor-plugin-media 14.3.15 → 14.3.16
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 +6 -0
- package/dist/types/nodeviews/toDOM-fixes/media.d.ts +1 -1
- package/dist/types/nodeviews/toDOM-fixes/mediaGroup.d.ts +2 -2
- package/dist/types/nodeviews/toDOM-fixes/mediaInline.d.ts +1 -1
- package/dist/types/nodeviews/toDOM-fixes/toDOMAttrs.d.ts +11 -11
- package/dist/types/pm-plugins/alt-text/reducer.d.ts +1 -1
- package/dist/types/pm-plugins/linking/index.d.ts +1 -1
- package/dist/types/pm-plugins/linking/reducer.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +1 -1
- package/dist/types/pm-plugins/pixel-resizing/reducer.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/ui/Media/DropPlaceholder.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/commands.d.ts +1 -1
- package/dist/types/ui/toolbar/comments.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/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -34,7 +34,7 @@ export declare const defaultSquareCardDimensions: {
|
|
|
34
34
|
* In the long term likely `toDOM` will move back out of `adf-schema` in which
|
|
35
35
|
* case we can consolidate them.
|
|
36
36
|
*/
|
|
37
|
-
export declare const getDefaultCardDimensions: (appearance?:
|
|
37
|
+
export declare const getDefaultCardDimensions: (appearance?: 'image' | 'square' | 'horizontal' | 'auto') => Required<typeof defaultImageCardDimensions>;
|
|
38
38
|
export declare const mediaGroupSpecWithFixedToDOM: () => {
|
|
39
39
|
toDOM: () => DOMOutputSpec;
|
|
40
40
|
content?: string;
|
|
@@ -48,7 +48,7 @@ export declare const mediaGroupSpecWithFixedToDOM: () => {
|
|
|
48
48
|
selectable?: boolean;
|
|
49
49
|
draggable?: boolean;
|
|
50
50
|
code?: boolean;
|
|
51
|
-
whitespace?:
|
|
51
|
+
whitespace?: 'pre' | 'normal';
|
|
52
52
|
definingAsContext?: boolean;
|
|
53
53
|
definingForContent?: boolean;
|
|
54
54
|
defining?: boolean;
|
|
@@ -5,15 +5,15 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
5
5
|
* When we patch adf-schema with media `toDOM` fixes we can remove this.
|
|
6
6
|
*/
|
|
7
7
|
export declare const getMediaAttrs: (nodeName: string, node: PMNode) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
'data-alt': any;
|
|
9
|
+
'data-collection': any;
|
|
10
|
+
'data-height': any;
|
|
11
|
+
'data-id': any;
|
|
12
|
+
'data-node-type': string;
|
|
13
|
+
'data-occurrence-key': any;
|
|
14
|
+
'data-type': any;
|
|
15
|
+
'data-url': any;
|
|
16
|
+
'data-width': any;
|
|
17
17
|
style: string;
|
|
18
18
|
title: string;
|
|
19
19
|
};
|
|
@@ -24,6 +24,6 @@ export declare const camelCaseToKebabCase: (str: string) => string;
|
|
|
24
24
|
* When we patch adf-schema with media `toDOM` fixes we can remove this.
|
|
25
25
|
*/
|
|
26
26
|
export declare const getAttrsFromNodeMediaSingle: (withExtendedWidthTypes: boolean, node: PMNode) => {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
'data-media-vc-wrapper': string;
|
|
28
|
+
'data-width-type': any;
|
|
29
29
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { MediaAltTextAction } from './actions';
|
|
2
2
|
import type { MediaAltTextState } from './types';
|
|
3
|
-
declare const _default: (state: MediaAltTextState, action: MediaAltTextAction) => MediaAltTextState;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default(state: MediaAltTextState, action: MediaAltTextAction): MediaAltTextState;
|
|
@@ -8,5 +8,5 @@ import type { MediaLinkingState } from './types';
|
|
|
8
8
|
export declare const mediaLinkingPluginKey: PluginKey<MediaLinkingState>;
|
|
9
9
|
export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
|
|
10
10
|
export declare const getMediaLinkingState: (state: EditorState) => MediaLinkingState;
|
|
11
|
-
declare const _default: (dispatch: Dispatch) => SafePlugin<MediaLinkingState>;
|
|
12
11
|
export default _default;
|
|
12
|
+
declare function _default(dispatch: Dispatch): SafePlugin<MediaLinkingState>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { MediaLinkingActions } from './actions';
|
|
2
2
|
import type { MediaLinkingState } from './types';
|
|
3
|
-
declare const _default: (state: MediaLinkingState, action: MediaLinkingActions) => MediaLinkingState;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default(state: MediaLinkingState, action: MediaLinkingActions): MediaLinkingState;
|
|
@@ -147,7 +147,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
147
147
|
private handleMediaState;
|
|
148
148
|
removeSelectedMediaContainer: () => boolean;
|
|
149
149
|
selectedMediaContainerNode: () => PMNode | undefined;
|
|
150
|
-
handleDrag: (dragState:
|
|
150
|
+
handleDrag: (dragState: 'enter' | 'leave') => void;
|
|
151
151
|
updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
|
|
152
152
|
}
|
|
153
153
|
export declare const getMediaPluginState: (state: EditorState) => MediaPluginState;
|
|
@@ -8,5 +8,5 @@ type ClosePixelEditor = {
|
|
|
8
8
|
type: 'closePixelEditor';
|
|
9
9
|
};
|
|
10
10
|
type MediaPixelResizingAction = OpenPixelEditor | ClosePixelEditor;
|
|
11
|
-
declare const _default: (state: MediaPixelResizingState, action: MediaPixelResizingAction) => MediaPixelResizingState;
|
|
12
11
|
export default _default;
|
|
12
|
+
declare function _default(state: MediaPixelResizingState, action: MediaPixelResizingAction): MediaPixelResizingState;
|
|
@@ -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>;
|
|
@@ -32,7 +32,7 @@ export default class ResizableMediaSingle extends React.Component<Props, State>
|
|
|
32
32
|
layout: MediaSingleLayout;
|
|
33
33
|
width: number | null;
|
|
34
34
|
};
|
|
35
|
-
calcUnwrappedLayout: (pct: number, width: number) =>
|
|
35
|
+
calcUnwrappedLayout: (pct: number, width: number) => 'center' | 'wide' | 'full-width';
|
|
36
36
|
get $pos(): ResolvedPos | null;
|
|
37
37
|
/**
|
|
38
38
|
* The maxmimum number of grid columns this node can resize to.
|
|
@@ -13,5 +13,5 @@ interface AltTextToolbarOptions {
|
|
|
13
13
|
triggerButtonSelector?: string;
|
|
14
14
|
}
|
|
15
15
|
export declare const getAltTextToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, options?: AltTextToolbarOptions) => FloatingToolbarConfig;
|
|
16
|
-
export declare const getAltTextDropdownOption: (state: EditorState, formatMessage: IntlShape[
|
|
16
|
+
export declare const getAltTextDropdownOption: (state: EditorState, formatMessage: IntlShape['formatMessage'], allowAltTextOnImages?: boolean, selectedNodeType?: NodeType, editorAnalyticsAPI?: EditorAnalyticsAPI) => FloatingToolbarOverflowDropdownOptions<Command>;
|
|
17
17
|
export {};
|
|
@@ -7,7 +7,7 @@ import type { PixelEntryValidation } from '../../pm-plugins/pixel-resizing/ui/ty
|
|
|
7
7
|
import type { EventInput } from '../../pm-plugins/types';
|
|
8
8
|
export declare const DEFAULT_BORDER_COLOR = "#091e4224";
|
|
9
9
|
export declare const DEFAULT_BORDER_SIZE = 2;
|
|
10
|
-
export declare const getNodeType: (state: EditorState) =>
|
|
10
|
+
export declare const getNodeType: (state: EditorState) => 'mediaInline' | 'mediaSingle';
|
|
11
11
|
export declare const changeInlineToMediaCard: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, forceFocusSelector: ForceFocusSelector | undefined) => Command;
|
|
12
12
|
export declare const changeMediaCardToInline: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, forceFocusSelector: ForceFocusSelector | undefined) => Command;
|
|
13
13
|
export declare const changeMediaInlineToMediaSingle: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, widthPluginState: WidthPluginState | undefined, allowPixelResizing?: boolean) => Command;
|
|
@@ -3,4 +3,4 @@ import type { Command, ExtractInjectionAPI, FloatingToolbarButton } from '@atlas
|
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
5
5
|
import type { MediaPluginOptions } from '../../types';
|
|
6
|
-
export declare const commentButton: (intl: IntlShape, state: EditorState, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, onCommentButtonMount?: () => void, createCommentExperience?: MediaPluginOptions[
|
|
6
|
+
export declare const commentButton: (intl: IntlShape, state: EditorState, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, onCommentButtonMount?: () => void, createCommentExperience?: MediaPluginOptions['createCommentExperience']) => FloatingToolbarButton<Command>;
|
|
@@ -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>;
|
|
@@ -26,4 +26,4 @@ export declare const getSelectedLayoutIcon: (layoutIcons: LayoutIcon[], selected
|
|
|
26
26
|
*/
|
|
27
27
|
export declare const canShowSwitchButtons: (mediaSingleNode?: ProseMirrorNode) => boolean | null;
|
|
28
28
|
export declare const updateToFullHeightSeparator: (items: FloatingToolbarItem<Command>[]) => void;
|
|
29
|
-
export declare const getMediaSingleAndMediaInlineSwitcherDropdown: (nodeType:
|
|
29
|
+
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": "14.3.
|
|
3
|
+
"version": "14.3.16",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
58
58
|
"@atlaskit/primitives": "^22.2.0",
|
|
59
59
|
"@atlaskit/textfield": "^9.1.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^135.0.0",
|
|
61
61
|
"@atlaskit/tokens": "^16.3.0",
|
|
62
|
-
"@atlaskit/tooltip": "^23.
|
|
62
|
+
"@atlaskit/tooltip": "^23.2.0",
|
|
63
63
|
"@babel/runtime": "^7.0.0",
|
|
64
64
|
"@emotion/react": "^11.7.1",
|
|
65
65
|
"bind-event-listener": "^3.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"uuid": "^3.1.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@atlaskit/editor-common": "^116.
|
|
72
|
+
"@atlaskit/editor-common": "^116.41.0",
|
|
73
73
|
"@atlaskit/media-core": "^38.0.0",
|
|
74
74
|
"react": "^18.2.0",
|
|
75
75
|
"react-dom": "^18.2.0",
|