@atlaskit/editor-plugin-media 10.0.0 → 10.0.1
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/cjs/nodeviews/mediaGroupNext.js +1 -0
- package/dist/cjs/nodeviews/mediaInline.js +1 -1
- package/dist/cjs/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/cjs/nodeviews/mediaSingle.js +2 -1
- package/dist/cjs/nodeviews/mediaSingleNext.js +1 -1
- package/dist/cjs/nodeviews/styles.js +1 -1
- package/dist/cjs/pm-plugins/alt-text/index.js +15 -13
- package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
- package/dist/cjs/pm-plugins/linking/index.js +2 -2
- package/dist/cjs/pm-plugins/pixel-resizing/index.js +12 -10
- package/dist/cjs/pm-plugins/pixel-resizing/ui/index.js +1 -1
- package/dist/cjs/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
- package/dist/cjs/ui/ImageBorder/index.js +1 -1
- package/dist/cjs/ui/Media/DropPlaceholder.js +1 -1
- package/dist/cjs/ui/MediaLinkingToolbar.js +1 -1
- package/dist/cjs/ui/MediaViewer/MediaViewerContainer.js +1 -1
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/cjs/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/cjs/ui/ToolbarMedia/index.js +4 -1
- package/dist/cjs/ui/toolbar/layout-group.js +1 -1
- package/dist/cjs/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/es2019/nodeviews/mediaGroupNext.js +1 -0
- package/dist/es2019/nodeviews/mediaInline.js +1 -1
- package/dist/es2019/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/es2019/nodeviews/mediaSingle.js +2 -1
- package/dist/es2019/nodeviews/mediaSingleNext.js +1 -1
- package/dist/es2019/nodeviews/styles.js +1 -1
- package/dist/es2019/pm-plugins/alt-text/index.js +5 -5
- package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
- package/dist/es2019/pm-plugins/linking/index.js +2 -4
- package/dist/es2019/pm-plugins/pixel-resizing/index.js +5 -5
- package/dist/es2019/pm-plugins/pixel-resizing/ui/index.js +1 -1
- package/dist/es2019/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
- package/dist/es2019/ui/ImageBorder/index.js +1 -1
- package/dist/es2019/ui/Media/DropPlaceholder.js +1 -1
- package/dist/es2019/ui/MediaLinkingToolbar.js +1 -1
- package/dist/es2019/ui/MediaPicker/PickerFacadeProvider.js +1 -0
- package/dist/es2019/ui/MediaViewer/MediaViewerContainer.js +1 -1
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/es2019/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/es2019/ui/ToolbarMedia/index.js +4 -1
- package/dist/es2019/ui/toolbar/layout-group.js +1 -1
- package/dist/es2019/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/esm/nodeviews/mediaGroupNext.js +1 -0
- package/dist/esm/nodeviews/mediaInline.js +1 -1
- package/dist/esm/nodeviews/mediaNodeView/media.js +2 -1
- package/dist/esm/nodeviews/mediaSingle.js +2 -1
- package/dist/esm/nodeviews/mediaSingleNext.js +1 -1
- package/dist/esm/nodeviews/styles.js +1 -1
- package/dist/esm/pm-plugins/alt-text/index.js +14 -13
- package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
- package/dist/esm/pm-plugins/linking/index.js +2 -3
- package/dist/esm/pm-plugins/pixel-resizing/index.js +11 -10
- package/dist/esm/pm-plugins/pixel-resizing/ui/index.js +1 -1
- package/dist/esm/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
- package/dist/esm/ui/ImageBorder/index.js +1 -1
- package/dist/esm/ui/Media/DropPlaceholder.js +1 -1
- package/dist/esm/ui/MediaLinkingToolbar.js +1 -1
- package/dist/esm/ui/MediaViewer/MediaViewerContainer.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/index.js +1 -1
- package/dist/esm/ui/ToolbarMedia/index.js +4 -1
- package/dist/esm/ui/toolbar/layout-group.js +1 -1
- package/dist/esm/ui/toolbar/linking-toolbar-appearance.js +1 -1
- package/dist/types/nodeviews/lazy-media-group.d.ts +3 -2
- package/dist/types/nodeviews/lazy-media-inline.d.ts +2 -1
- package/dist/types/nodeviews/mediaGroup.d.ts +2 -2
- package/dist/types/nodeviews/mediaGroupNext.d.ts +2 -2
- package/dist/types/nodeviews/mediaNodeView/index.d.ts +2 -2
- package/dist/types/nodeviews/mediaNodeView/media.d.ts +2 -2
- package/dist/types/nodeviews/mediaSingle.d.ts +2 -1
- package/dist/types/nodeviews/toDOM-fixes/media.d.ts +18 -17
- package/dist/types/nodeviews/toDOM-fixes/mediaGroup.d.ts +7 -6
- package/dist/types/nodeviews/toDOM-fixes/mediaInline.d.ts +18 -17
- package/dist/types/pm-plugins/alt-text/commands.d.ts +5 -4
- package/dist/types/pm-plugins/alt-text/index.d.ts +7 -3
- package/dist/types/pm-plugins/alt-text/ui/AltTextEdit.d.ts +2 -2
- package/dist/types/pm-plugins/linking/index.d.ts +4 -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/commands.d.ts +4 -3
- package/dist/types/pm-plugins/pixel-resizing/index.d.ts +7 -5
- package/dist/types/pm-plugins/pixel-resizing/ui/index.d.ts +1 -1
- package/dist/types/pm-plugins/utils/media-single.d.ts +2 -1
- package/dist/types/ui/ImageBorder/styles.d.ts +10 -9
- package/dist/types/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
- package/dist/types/ui/ResizableMediaSingle/index.d.ts +3 -2
- package/dist/types/ui/ResizableMediaSingle/styled.d.ts +2 -1
- package/dist/types/ui/ToolbarMedia/index.d.ts +3 -3
- package/dist/types/ui/hooks/useMediaProvider.d.ts +2 -1
- package/dist/types/ui/toolbar/commands.d.ts +2 -2
- package/dist/types/ui/toolbar/utils.d.ts +4 -3
- package/dist/types-ts4.5/nodeviews/lazy-media-group.d.ts +3 -2
- package/dist/types-ts4.5/nodeviews/lazy-media-inline.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/mediaGroup.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaNodeView/media.d.ts +2 -2
- package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/media.d.ts +18 -17
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaGroup.d.ts +7 -6
- package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaInline.d.ts +18 -17
- package/dist/types-ts4.5/pm-plugins/alt-text/commands.d.ts +5 -4
- package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +7 -3
- package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/linking/index.d.ts +4 -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/commands.d.ts +4 -3
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/index.d.ts +7 -5
- package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +2 -1
- package/dist/types-ts4.5/ui/ImageBorder/styles.d.ts +10 -9
- package/dist/types-ts4.5/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
- package/dist/types-ts4.5/ui/ResizableMediaSingle/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/ResizableMediaSingle/styled.d.ts +2 -1
- package/dist/types-ts4.5/ui/ToolbarMedia/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/hooks/useMediaProvider.d.ts +2 -1
- package/dist/types-ts4.5/ui/toolbar/commands.d.ts +2 -2
- package/dist/types-ts4.5/ui/toolbar/utils.d.ts +4 -3
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
8
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
8
9
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
9
10
|
import type { Props } from './types';
|
|
10
11
|
type State = {
|
|
@@ -28,11 +29,11 @@ export default class ResizableMediaSingle extends React.Component<Props, State>
|
|
|
28
29
|
*/
|
|
29
30
|
checkLayout(oldLayout: MediaSingleLayout, newLayout: MediaSingleLayout): void;
|
|
30
31
|
calcNewSize: (newWidth: number, stop: boolean) => {
|
|
31
|
-
width: number | null;
|
|
32
32
|
layout: MediaSingleLayout;
|
|
33
|
+
width: number | null;
|
|
33
34
|
};
|
|
34
35
|
calcUnwrappedLayout: (pct: number, width: number) => "center" | "wide" | "full-width";
|
|
35
|
-
get $pos():
|
|
36
|
+
get $pos(): ResolvedPos | null;
|
|
36
37
|
/**
|
|
37
38
|
* The maxmimum number of grid columns this node can resize to.
|
|
38
39
|
*/
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { type SerializedStyles } from '@emotion/react';
|
|
1
2
|
import type { MediaSingleDimensionHelperProps } from '@atlaskit/editor-common/ui';
|
|
2
|
-
export declare const wrapperStyle: (props: MediaSingleDimensionHelperProps) =>
|
|
3
|
+
export declare const wrapperStyle: (props: MediaSingleDimensionHelperProps) => SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
+
import type { WithIntlProps, WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
5
5
|
interface Props {
|
|
@@ -7,7 +7,7 @@ interface Props {
|
|
|
7
7
|
isDisabled?: boolean;
|
|
8
8
|
isReducedSpacing?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const
|
|
10
|
+
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
11
11
|
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
12
12
|
};
|
|
13
|
-
export default
|
|
13
|
+
export default _default_1;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
1
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
3
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
3
|
-
export declare const useMediaProvider: (pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) =>
|
|
4
|
+
export declare const useMediaProvider: (pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => MediaProvider | undefined;
|
|
@@ -2,7 +2,7 @@ import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema
|
|
|
2
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { Command, EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
5
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
+
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { PixelEntryValidation } from '../../pm-plugins/pixel-resizing/ui/types';
|
|
7
7
|
import type { EventInput } from '../../pm-plugins/types';
|
|
8
8
|
export declare const DEFAULT_BORDER_COLOR = "#091e4224";
|
|
@@ -15,6 +15,6 @@ export declare const removeInlineCardWithAnalytics: (editorAnalyticsAPI: EditorA
|
|
|
15
15
|
export declare const removeInlineCard: Command;
|
|
16
16
|
export declare const toggleBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
17
17
|
export declare const setBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (attrs: Partial<BorderMarkAttributes>) => Command;
|
|
18
|
-
export declare const updateMediaSingleWidthTr: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, state: EditorState, width: number, validation: PixelEntryValidation, inputMethod: EventInput, layout: RichMediaLayout) =>
|
|
18
|
+
export declare const updateMediaSingleWidthTr: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, state: EditorState, width: number, validation: PixelEntryValidation, inputMethod: EventInput, layout: RichMediaLayout) => Transaction | null;
|
|
19
19
|
export declare const updateMediaSingleWidth: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (width: number, validation: PixelEntryValidation, inputMethod: EventInput, layout: RichMediaLayout) => Command;
|
|
20
20
|
export declare const changeMediaSingleToMediaInline: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { type MemoizedFn } from 'memoize-one';
|
|
1
2
|
import type { IntlShape } from 'react-intl-next';
|
|
2
3
|
import type { ExternalMediaAttributes, MediaADFAttrs, RichMediaLayout } from '@atlaskit/adf-schema';
|
|
3
4
|
import type { LayoutIcon } from '@atlaskit/editor-common/card';
|
|
4
5
|
import type { Command, FloatingToolbarItem, FloatingToolbarDropdown, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
6
|
import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
+
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
8
|
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
8
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
10
|
import type { MediaNextEditorPluginType } from '../../mediaPluginType';
|
|
@@ -13,9 +14,9 @@ export declare const getSelectedNearestMediaContainerNodeAttrsFunction: (selecte
|
|
|
13
14
|
export declare const getSelectedNearestMediaContainerNodeAttrs: (mediaPluginState: MediaPluginState) => MediaADFAttrs | null;
|
|
14
15
|
export declare const getIsDownloadDisabledByDataSecurityPolicy: (mediaPluginState: MediaPluginState) => boolean;
|
|
15
16
|
export declare const downloadMedia: (mediaPluginState: MediaPluginState, isViewMode?: boolean) => Promise<boolean>;
|
|
16
|
-
export declare const removeMediaGroupNode: (state: EditorState) =>
|
|
17
|
+
export declare const removeMediaGroupNode: (state: EditorState) => Transaction;
|
|
17
18
|
export declare const getSelectedMediaSingle: (state: EditorState) => ReturnType<ReturnType<typeof findSelectedNodeOfType>> | ReturnType<ReturnType<typeof findParentNodeOfType>>;
|
|
18
|
-
export declare const getPixelWidthOfElement:
|
|
19
|
+
export declare const getPixelWidthOfElement: MemoizedFn<(editorView: EditorView, pos: number, mediaWidth: number) => number>;
|
|
19
20
|
export declare const calcNewLayout: (width: number, layout: RichMediaLayout, contentWidth: number, fullWidthMode?: boolean, isNested?: boolean) => RichMediaLayout;
|
|
20
21
|
export declare const getMaxToolbarWidth: () => number;
|
|
21
22
|
export declare const getSelectedLayoutIcon: (layoutIcons: LayoutIcon[], selectedNode: ProseMirrorNode) => LayoutIcon | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-media",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "Media plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/primitives": "^18.0.0",
|
|
67
67
|
"@atlaskit/textfield": "^8.2.0",
|
|
68
68
|
"@atlaskit/theme": "^22.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^36.0.0",
|
|
70
70
|
"@atlaskit/tokens": "^11.1.0",
|
|
71
71
|
"@atlaskit/tooltip": "^20.14.0",
|
|
72
72
|
"@babel/runtime": "^7.0.0",
|