@atlaskit/editor-plugin-media 14.3.15 → 14.3.17

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 14.3.17
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 14.3.16
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 14.3.15
4
16
 
5
17
  ### Patch Changes
@@ -40,5 +40,5 @@ export declare const mediaSpecWithFixedToDOM: () => {
40
40
  selectable?: boolean;
41
41
  toDebugString?: (node: PMNode) => string;
42
42
  toDOM: (node: PMNode) => DOMOutputSpec;
43
- whitespace?: "pre" | "normal";
43
+ whitespace?: 'pre' | 'normal';
44
44
  };
@@ -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?: "image" | "square" | "horizontal" | "auto") => Required<typeof defaultImageCardDimensions>;
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?: "pre" | "normal";
51
+ whitespace?: 'pre' | 'normal';
52
52
  definingAsContext?: boolean;
53
53
  definingForContent?: boolean;
54
54
  defining?: boolean;
@@ -25,5 +25,5 @@ export declare const mediaInlineSpecWithFixedToDOM: () => {
25
25
  selectable?: boolean;
26
26
  toDebugString?: (node: PMNode) => string;
27
27
  toDOM: (node: PMNode) => DOMOutputSpec;
28
- whitespace?: "pre" | "normal";
28
+ whitespace?: 'pre' | 'normal';
29
29
  };
@@ -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
- "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;
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
- "data-media-vc-wrapper": string;
28
- "data-width-type": any;
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: "enter" | "leave") => void;
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["attributes"]) => MediaEventPayload | void;
4
- export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
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 | "external" | undefined>;
4
+ export declare const checkMediaType: (mediaNode: PMNode, mediaClientConfig: MediaClientConfig) => Promise<MediaType | 'external' | undefined>;
@@ -7,5 +7,5 @@ export type PlaceholderType = 'single' | 'group';
7
7
  interface Props {
8
8
  type: PlaceholderType;
9
9
  }
10
- declare const _default: ({ type }: Props) => jsx.JSX.Element;
11
10
  export default _default;
11
+ declare function _default({ type }: Props): jsx.JSX.Element;
@@ -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) => "center" | "wide" | "full-width";
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["formatMessage"], allowAltTextOnImages?: boolean, selectedNodeType?: NodeType, editorAnalyticsAPI?: EditorAnalyticsAPI) => FloatingToolbarOverflowDropdownOptions<Command>;
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) => "mediaInline" | "mediaSingle";
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["createCommentExperience"]) => FloatingToolbarButton<Command>;
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, "editorView" | "selectedMediaSingleNode">) => FloatingToolbarConfig;
8
- export declare const getResizeDropdownOption: (mediaOptions: MediaOptions, state: EditorState, formatMessage: IntlShape["formatMessage"], selectedNodeType?: NodeType) => FloatingToolbarOverflowDropdownOptions<Command>;
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: "inline" | "block", intl: IntlShape, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, hasCaption?: boolean) => FloatingToolbarDropdown<Command>;
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.15",
3
+ "version": "14.3.17",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -52,14 +52,14 @@
52
52
  "@atlaskit/media-common": "^14.3.0",
53
53
  "@atlaskit/media-filmstrip": "^52.2.0",
54
54
  "@atlaskit/media-picker": "^72.1.0",
55
- "@atlaskit/media-ui": "^30.10.0",
55
+ "@atlaskit/media-ui": "^30.11.0",
56
56
  "@atlaskit/media-viewer": "^54.5.0",
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": "^134.0.0",
60
+ "@atlaskit/tmp-editor-statsig": "^135.6.0",
61
61
  "@atlaskit/tokens": "^16.3.0",
62
- "@atlaskit/tooltip": "^23.1.0",
62
+ "@atlaskit/tooltip": "^24.0.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.40.0",
72
+ "@atlaskit/editor-common": "^116.44.0",
73
73
  "@atlaskit/media-core": "^38.0.0",
74
74
  "react": "^18.2.0",
75
75
  "react-dom": "^18.2.0",