@atlaskit/editor-plugin-media 9.9.1 → 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.
Files changed (125) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/nodeviews/mediaGroupNext.js +1 -0
  3. package/dist/cjs/nodeviews/mediaInline.js +1 -1
  4. package/dist/cjs/nodeviews/mediaNodeView/media.js +2 -1
  5. package/dist/cjs/nodeviews/mediaSingle.js +2 -1
  6. package/dist/cjs/nodeviews/mediaSingleNext.js +1 -1
  7. package/dist/cjs/nodeviews/styles.js +1 -1
  8. package/dist/cjs/pm-plugins/alt-text/index.js +15 -13
  9. package/dist/cjs/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
  10. package/dist/cjs/pm-plugins/linking/index.js +2 -2
  11. package/dist/cjs/pm-plugins/pixel-resizing/index.js +12 -10
  12. package/dist/cjs/pm-plugins/pixel-resizing/ui/index.js +1 -1
  13. package/dist/cjs/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
  14. package/dist/cjs/ui/ImageBorder/index.js +1 -1
  15. package/dist/cjs/ui/Media/DropPlaceholder.js +1 -1
  16. package/dist/cjs/ui/MediaLinkingToolbar.js +1 -1
  17. package/dist/cjs/ui/MediaViewer/MediaViewerContainer.js +1 -1
  18. package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
  19. package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
  20. package/dist/cjs/ui/ResizableMediaSingle/index.js +1 -1
  21. package/dist/cjs/ui/ToolbarMedia/index.js +4 -1
  22. package/dist/cjs/ui/toolbar/layout-group.js +1 -1
  23. package/dist/cjs/ui/toolbar/linking-toolbar-appearance.js +1 -1
  24. package/dist/es2019/nodeviews/mediaGroupNext.js +1 -0
  25. package/dist/es2019/nodeviews/mediaInline.js +1 -1
  26. package/dist/es2019/nodeviews/mediaNodeView/media.js +2 -1
  27. package/dist/es2019/nodeviews/mediaSingle.js +2 -1
  28. package/dist/es2019/nodeviews/mediaSingleNext.js +1 -1
  29. package/dist/es2019/nodeviews/styles.js +1 -1
  30. package/dist/es2019/pm-plugins/alt-text/index.js +5 -5
  31. package/dist/es2019/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
  32. package/dist/es2019/pm-plugins/linking/index.js +2 -4
  33. package/dist/es2019/pm-plugins/pixel-resizing/index.js +5 -5
  34. package/dist/es2019/pm-plugins/pixel-resizing/ui/index.js +1 -1
  35. package/dist/es2019/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
  36. package/dist/es2019/ui/ImageBorder/index.js +1 -1
  37. package/dist/es2019/ui/Media/DropPlaceholder.js +1 -1
  38. package/dist/es2019/ui/MediaLinkingToolbar.js +1 -1
  39. package/dist/es2019/ui/MediaPicker/PickerFacadeProvider.js +1 -0
  40. package/dist/es2019/ui/MediaViewer/MediaViewerContainer.js +1 -1
  41. package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
  42. package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
  43. package/dist/es2019/ui/ResizableMediaSingle/index.js +1 -1
  44. package/dist/es2019/ui/ToolbarMedia/index.js +4 -1
  45. package/dist/es2019/ui/toolbar/layout-group.js +1 -1
  46. package/dist/es2019/ui/toolbar/linking-toolbar-appearance.js +1 -1
  47. package/dist/esm/nodeviews/mediaGroupNext.js +1 -0
  48. package/dist/esm/nodeviews/mediaInline.js +1 -1
  49. package/dist/esm/nodeviews/mediaNodeView/media.js +2 -1
  50. package/dist/esm/nodeviews/mediaSingle.js +2 -1
  51. package/dist/esm/nodeviews/mediaSingleNext.js +1 -1
  52. package/dist/esm/nodeviews/styles.js +1 -1
  53. package/dist/esm/pm-plugins/alt-text/index.js +14 -13
  54. package/dist/esm/pm-plugins/alt-text/ui/AltTextEdit.js +3 -2
  55. package/dist/esm/pm-plugins/linking/index.js +2 -3
  56. package/dist/esm/pm-plugins/pixel-resizing/index.js +11 -10
  57. package/dist/esm/pm-plugins/pixel-resizing/ui/index.js +1 -1
  58. package/dist/esm/pm-plugins/pixel-resizing/ui/pixel-entry.js +1 -1
  59. package/dist/esm/ui/ImageBorder/index.js +1 -1
  60. package/dist/esm/ui/Media/DropPlaceholder.js +1 -1
  61. package/dist/esm/ui/MediaLinkingToolbar.js +1 -1
  62. package/dist/esm/ui/MediaViewer/MediaViewerContainer.js +1 -1
  63. package/dist/esm/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +1 -1
  64. package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +1 -1
  65. package/dist/esm/ui/ResizableMediaSingle/index.js +1 -1
  66. package/dist/esm/ui/ToolbarMedia/index.js +4 -1
  67. package/dist/esm/ui/toolbar/layout-group.js +1 -1
  68. package/dist/esm/ui/toolbar/linking-toolbar-appearance.js +1 -1
  69. package/dist/types/nodeviews/lazy-media-group.d.ts +3 -2
  70. package/dist/types/nodeviews/lazy-media-inline.d.ts +2 -1
  71. package/dist/types/nodeviews/mediaGroup.d.ts +2 -2
  72. package/dist/types/nodeviews/mediaGroupNext.d.ts +2 -2
  73. package/dist/types/nodeviews/mediaNodeView/index.d.ts +2 -2
  74. package/dist/types/nodeviews/mediaNodeView/media.d.ts +2 -2
  75. package/dist/types/nodeviews/mediaSingle.d.ts +2 -1
  76. package/dist/types/nodeviews/toDOM-fixes/media.d.ts +18 -17
  77. package/dist/types/nodeviews/toDOM-fixes/mediaGroup.d.ts +7 -6
  78. package/dist/types/nodeviews/toDOM-fixes/mediaInline.d.ts +18 -17
  79. package/dist/types/pm-plugins/alt-text/commands.d.ts +5 -4
  80. package/dist/types/pm-plugins/alt-text/index.d.ts +7 -3
  81. package/dist/types/pm-plugins/alt-text/ui/AltTextEdit.d.ts +2 -2
  82. package/dist/types/pm-plugins/linking/index.d.ts +4 -1
  83. package/dist/types/pm-plugins/main.d.ts +2 -2
  84. package/dist/types/pm-plugins/picker-facade.d.ts +2 -7
  85. package/dist/types/pm-plugins/pixel-resizing/commands.d.ts +4 -3
  86. package/dist/types/pm-plugins/pixel-resizing/index.d.ts +7 -5
  87. package/dist/types/pm-plugins/pixel-resizing/ui/index.d.ts +1 -1
  88. package/dist/types/pm-plugins/utils/media-single.d.ts +2 -1
  89. package/dist/types/ui/ImageBorder/styles.d.ts +10 -9
  90. package/dist/types/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
  91. package/dist/types/ui/ResizableMediaSingle/index.d.ts +3 -2
  92. package/dist/types/ui/ResizableMediaSingle/styled.d.ts +2 -1
  93. package/dist/types/ui/ToolbarMedia/index.d.ts +3 -3
  94. package/dist/types/ui/hooks/useMediaProvider.d.ts +2 -1
  95. package/dist/types/ui/toolbar/commands.d.ts +2 -2
  96. package/dist/types/ui/toolbar/utils.d.ts +4 -3
  97. package/dist/types-ts4.5/nodeviews/lazy-media-group.d.ts +3 -2
  98. package/dist/types-ts4.5/nodeviews/lazy-media-inline.d.ts +2 -1
  99. package/dist/types-ts4.5/nodeviews/mediaGroup.d.ts +2 -2
  100. package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +2 -2
  101. package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +2 -2
  102. package/dist/types-ts4.5/nodeviews/mediaNodeView/media.d.ts +2 -2
  103. package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +2 -1
  104. package/dist/types-ts4.5/nodeviews/toDOM-fixes/media.d.ts +18 -17
  105. package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaGroup.d.ts +7 -6
  106. package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaInline.d.ts +18 -17
  107. package/dist/types-ts4.5/pm-plugins/alt-text/commands.d.ts +5 -4
  108. package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +7 -3
  109. package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +2 -2
  110. package/dist/types-ts4.5/pm-plugins/linking/index.d.ts +4 -1
  111. package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
  112. package/dist/types-ts4.5/pm-plugins/picker-facade.d.ts +2 -7
  113. package/dist/types-ts4.5/pm-plugins/pixel-resizing/commands.d.ts +4 -3
  114. package/dist/types-ts4.5/pm-plugins/pixel-resizing/index.d.ts +7 -5
  115. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/index.d.ts +1 -1
  116. package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +2 -1
  117. package/dist/types-ts4.5/ui/ImageBorder/styles.d.ts +10 -9
  118. package/dist/types-ts4.5/ui/MediaPicker/PickerFacadeProvider.d.ts +1 -1
  119. package/dist/types-ts4.5/ui/ResizableMediaSingle/index.d.ts +3 -2
  120. package/dist/types-ts4.5/ui/ResizableMediaSingle/styled.d.ts +2 -1
  121. package/dist/types-ts4.5/ui/ToolbarMedia/index.d.ts +3 -3
  122. package/dist/types-ts4.5/ui/hooks/useMediaProvider.d.ts +2 -1
  123. package/dist/types-ts4.5/ui/toolbar/commands.d.ts +2 -2
  124. package/dist/types-ts4.5/ui/toolbar/utils.d.ts +4 -3
  125. package/package.json +18 -18
@@ -1,13 +1,15 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
2
+ import type { Command, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
3
+ import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
4
  declare const createCommand: <A = {
4
- type: "openPixelEditor";
5
+ type: 'openPixelEditor';
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
+ type: 'closePixelEditor';
8
+ }>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
9
+ declare const getPluginState: (state: EditorState) => {
8
10
  isPixelEditorOpen: boolean;
9
11
  };
10
- export declare const createPlugin: ({ dispatch }: PMPluginFactoryParams) => SafePlugin<{
12
+ export declare const createPlugin: ({ dispatch, }: PMPluginFactoryParams) => SafePlugin<{
11
13
  isPixelEditorOpen: boolean;
12
14
  }>;
13
15
  export { createCommand, getPluginState };
@@ -17,6 +17,6 @@ export type Props = {
17
17
  triggerButtonSelector?: string;
18
18
  };
19
19
  export declare const PixelEntry: ({ editorView, selectedMediaSingleNode, pluginInjectionApi, intl, pluginState, hoverDecoration, isEditorFullWidthEnabled, triggerButtonSelector, }: Props) => jsx.JSX.Element | null;
20
- export declare const FullWidthDisplay: ({ intl: { formatMessage } }: {
20
+ export declare const FullWidthDisplay: ({ intl: { formatMessage }, }: {
21
21
  intl: IntlShape;
22
22
  }) => jsx.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { type MemoizedFn } from 'memoize-one';
1
2
  import type { MediaADFAttrs } from '@atlaskit/adf-schema';
2
3
  import type { EditorAnalyticsAPI, InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
3
4
  import { type InsertMediaVia } from '@atlaskit/editor-common/analytics';
@@ -11,4 +12,4 @@ export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode,
11
12
  export declare const createInsertMediaAsMediaSingleCommand: (mediaAttrs: MediaADFAttrs, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => EditorCommand;
12
13
  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;
13
14
  export declare const changeFromMediaInlineToMediaSingleNode: (view: EditorView, fromNode: PMNode, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined, allowPixelResizing?: boolean) => boolean;
14
- export declare const isVideo: import("memoize-one").MemoizedFn<(fileType?: string) => boolean>;
15
+ export declare const isVideo: MemoizedFn<(fileType?: string) => boolean>;
@@ -1,17 +1,18 @@
1
+ import { type SerializedStyles } from '@emotion/react';
1
2
  export declare const menuItemDimensions: {
2
3
  width: number;
3
4
  height: number;
4
5
  };
5
6
  export declare const itemSpacing = 4;
6
- export declare const contextualMenuArrow: import("@emotion/utils").SerializedStyles;
7
- export declare const contextualMenuColorIcon: (color?: string) => import("@emotion/utils").SerializedStyles;
8
- export declare const contextualSubMenu: (index: number) => import("@emotion/utils").SerializedStyles;
9
- export declare const buttonStyle: (selected: boolean) => import("@emotion/utils").SerializedStyles;
10
- export declare const buttonWrapperStyle: import("@emotion/utils").SerializedStyles;
11
- export declare const line: (size: number, selected: boolean) => import("@emotion/utils").SerializedStyles;
7
+ export declare const contextualMenuArrow: SerializedStyles;
8
+ export declare const contextualMenuColorIcon: (color?: string) => SerializedStyles;
9
+ export declare const contextualSubMenu: (index: number) => SerializedStyles;
10
+ export declare const buttonStyle: (selected: boolean) => SerializedStyles;
11
+ export declare const buttonWrapperStyle: SerializedStyles;
12
+ export declare const line: (size: number, selected: boolean) => SerializedStyles;
12
13
  export declare const toolbarButtonWrapper: ({ enabled, isOpen, }: {
13
14
  enabled: boolean;
14
15
  isOpen: boolean;
15
- }) => import("@emotion/utils").SerializedStyles;
16
- export declare const dropdownOptionButton: import("@emotion/utils").SerializedStyles;
17
- export declare const dropdownWrapper: import("@emotion/utils").SerializedStyles;
16
+ }) => SerializedStyles;
17
+ export declare const dropdownOptionButton: SerializedStyles;
18
+ export declare const dropdownWrapper: SerializedStyles;
@@ -14,5 +14,5 @@ export type Props = {
14
14
  api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
15
15
  children: (props: ChildrenProps) => React.ReactElement | null;
16
16
  };
17
- export default function PickerFacadeProvider({ api, analyticsName, children }: Props): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
17
+ export default function PickerFacadeProvider({ api, analyticsName, children, }: Props): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
18
18
  export {};
@@ -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(): import("prosemirror-model").ResolvedPos | null;
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) => import("@emotion/utils").SerializedStyles;
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 _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
10
+ declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
11
11
  WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
12
12
  };
13
- export default _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) => import("@atlaskit/editor-common/provider-factory").MediaProvider | 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) => import("prosemirror-state").Transaction | null;
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) => import("prosemirror-state").Transaction;
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: import("memoize-one").MemoizedFn<(editorView: EditorView, pos: number, mediaWidth: number) => number>;
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;
@@ -1,7 +1,8 @@
1
1
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
+ import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
2
3
  import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
3
4
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
4
5
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
6
  import type { MediaNextEditorPluginType } from '../mediaPluginType';
6
- import type { MediaOptions } from '../types';
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;
7
+ import type { MediaPluginOptions } from '../types';
8
+ export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => NodeViewConstructor;
@@ -1,7 +1,8 @@
1
1
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
2
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
3
+ import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
3
4
  import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
4
5
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
6
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
7
  import type { MediaNextEditorPluginType } from '../mediaPluginType';
7
- export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => import("@atlaskit/editor-common/lazy-node-view").NodeViewConstructor;
8
+ export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent) => 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, MediaOptions } from '../types';
9
- export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
8
+ import type { getPosHandler, MediaPluginOptions } from '../types';
9
+ export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -1,10 +1,10 @@
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 { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
4
4
  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
- export declare const MediaGroupNext: React.FC<import("react-intl-next").WithIntlProps<{
7
+ export declare const MediaGroupNext: React.FC<WithIntlProps<{
8
8
  allowLazyLoading?: boolean;
9
9
  anchorPos: number;
10
10
  contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
@@ -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, getPosHandlerNode, MediaOptions } from '../../types';
12
+ import type { getPosHandler, getPosHandlerNode, MediaOptions, MediaPluginOptions } from '../../types';
13
13
  import type { MediaNodeViewProps } from '../types';
14
14
  interface MediaNodeWithPluginStateComponentProps {
15
15
  interactionState?: SharedInteractionState['interactionState'];
@@ -41,5 +41,5 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
41
41
  render(): React.JSX.Element;
42
42
  destroy(): void;
43
43
  }
44
- export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
44
+ export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
45
45
  export {};
@@ -59,5 +59,5 @@ export declare class MediaNode extends Component<MediaNodeProps, MediaNodeState>
59
59
  private onFullscreenChange;
60
60
  private handleNewNode;
61
61
  }
62
- declare const _default: React.ComponentClass<MediaNodeProps & ImageLoaderProps, any>;
63
- export default _default;
62
+ declare const _default_1: React.ComponentClass<MediaNodeProps & ImageLoaderProps>;
63
+ export default _default_1;
@@ -5,6 +5,7 @@ import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
5
5
  import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
6
  import ReactNodeView from '@atlaskit/editor-common/react-node-view';
7
7
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
+ import { SelectedState } from '@atlaskit/editor-common/utils';
8
9
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
10
  import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
10
11
  import type { MediaNextEditorPluginType } from '../mediaPluginType';
@@ -23,7 +24,7 @@ declare class MediaSingleNodeView extends ReactNodeView<MediaSingleNodeViewProps
23
24
  viewShouldUpdate(nextNode: PMNode): boolean;
24
25
  subscribeToViewModeChange(domRef: HTMLElement): (() => void) | undefined;
25
26
  updateDomRefContentEditable(domRef: HTMLElement, editorViewMode?: 'edit' | 'view'): void;
26
- checkAndUpdateSelectionType: () => import("@atlaskit/editor-common/utils").SelectedState | null;
27
+ checkAndUpdateSelectionType: () => SelectedState | null;
27
28
  isNodeSelected: () => boolean;
28
29
  getNodeMediaId(node: PMNode): string | undefined;
29
30
  stopEvent(event: Event): boolean;
@@ -1,4 +1,5 @@
1
- import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
1
+ import type { AttributeSpec, DOMOutputSpec, Node as PMNode, TagParseRule } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
3
  /**
3
4
  * Duplicate consts from `media-card`.
4
5
  * `packages/media/media-card/src/utils/cardDimensions.ts`
@@ -15,29 +16,29 @@ export declare const defaultImageCardDimensions: {
15
16
  height: number;
16
17
  };
17
18
  export declare const mediaSpecWithFixedToDOM: () => {
18
- toDOM: (node: PMNode) => DOMOutputSpec;
19
- content?: string;
20
- marks?: string;
21
- group?: string;
22
- inline?: boolean;
23
19
  atom?: boolean;
24
20
  attrs?: {
25
- [name: string]: import("prosemirror-model").AttributeSpec;
21
+ [name: string]: AttributeSpec;
26
22
  };
27
- selectable?: boolean;
28
- draggable?: boolean;
29
23
  code?: boolean;
30
- whitespace?: "pre" | "normal";
24
+ content?: string;
25
+ defining?: boolean;
31
26
  definingAsContext?: boolean;
32
27
  definingForContent?: boolean;
33
- defining?: boolean;
28
+ disableDropCursor?: boolean | ((view: EditorView, pos: {
29
+ inside: number;
30
+ pos: number;
31
+ }, event: DragEvent) => boolean);
32
+ draggable?: boolean;
33
+ group?: string;
34
+ inline?: boolean;
34
35
  isolating?: boolean;
35
- parseDOM?: readonly import("prosemirror-model").TagParseRule[];
36
- toDebugString?: (node: PMNode) => string;
37
36
  leafText?: (node: PMNode) => string;
38
37
  linebreakReplacement?: boolean;
39
- disableDropCursor?: boolean | ((view: import("prosemirror-view").EditorView, pos: {
40
- pos: number;
41
- inside: number;
42
- }, event: DragEvent) => boolean);
38
+ marks?: string;
39
+ parseDOM?: readonly TagParseRule[];
40
+ selectable?: boolean;
41
+ toDebugString?: (node: PMNode) => string;
42
+ toDOM: (node: PMNode) => DOMOutputSpec;
43
+ whitespace?: "pre" | "normal";
43
44
  };
@@ -1,4 +1,5 @@
1
- import type { DOMOutputSpec } from '@atlaskit/editor-prosemirror/model';
1
+ import type { AttributeSpec, DOMOutputSpec, Node, TagParseRule } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
3
  /**
3
4
  * Duplicate consts from `media-card`.
4
5
  * `packages/media/media-card/src/utils/cardDimensions.ts`
@@ -42,7 +43,7 @@ export declare const mediaGroupSpecWithFixedToDOM: () => {
42
43
  inline?: boolean;
43
44
  atom?: boolean;
44
45
  attrs?: {
45
- [name: string]: import("prosemirror-model").AttributeSpec;
46
+ [name: string]: AttributeSpec;
46
47
  };
47
48
  selectable?: boolean;
48
49
  draggable?: boolean;
@@ -52,11 +53,11 @@ export declare const mediaGroupSpecWithFixedToDOM: () => {
52
53
  definingForContent?: boolean;
53
54
  defining?: boolean;
54
55
  isolating?: boolean;
55
- parseDOM?: readonly import("prosemirror-model").TagParseRule[];
56
- toDebugString?: (node: import("prosemirror-model").Node) => string;
57
- leafText?: (node: import("prosemirror-model").Node) => string;
56
+ parseDOM?: readonly TagParseRule[];
57
+ toDebugString?: (node: Node) => string;
58
+ leafText?: (node: Node) => string;
58
59
  linebreakReplacement?: boolean;
59
- disableDropCursor?: boolean | ((view: import("prosemirror-view").EditorView, pos: {
60
+ disableDropCursor?: boolean | ((view: EditorView, pos: {
60
61
  pos: number;
61
62
  inside: number;
62
63
  }, event: DragEvent) => boolean);
@@ -1,28 +1,29 @@
1
- import type { DOMOutputSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
1
+ import type { AttributeSpec, DOMOutputSpec, Node as PMNode, TagParseRule } from '@atlaskit/editor-prosemirror/model';
2
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
3
  export declare const mediaInlineSpecWithFixedToDOM: () => {
3
- toDOM: (node: PMNode) => DOMOutputSpec;
4
- content?: string;
5
- marks?: string;
6
- group?: string;
7
- inline?: boolean;
8
4
  atom?: boolean;
9
5
  attrs?: {
10
- [name: string]: import("prosemirror-model").AttributeSpec;
6
+ [name: string]: AttributeSpec;
11
7
  };
12
- selectable?: boolean;
13
- draggable?: boolean;
14
8
  code?: boolean;
15
- whitespace?: "pre" | "normal";
9
+ content?: string;
10
+ defining?: boolean;
16
11
  definingAsContext?: boolean;
17
12
  definingForContent?: boolean;
18
- defining?: boolean;
13
+ disableDropCursor?: boolean | ((view: EditorView, pos: {
14
+ inside: number;
15
+ pos: number;
16
+ }, event: DragEvent) => boolean);
17
+ draggable?: boolean;
18
+ group?: string;
19
+ inline?: boolean;
19
20
  isolating?: boolean;
20
- parseDOM?: readonly import("prosemirror-model").TagParseRule[];
21
- toDebugString?: (node: PMNode) => string;
22
21
  leafText?: (node: PMNode) => string;
23
22
  linebreakReplacement?: boolean;
24
- disableDropCursor?: boolean | ((view: import("prosemirror-view").EditorView, pos: {
25
- pos: number;
26
- inside: number;
27
- }, event: DragEvent) => boolean);
23
+ marks?: string;
24
+ parseDOM?: readonly TagParseRule[];
25
+ selectable?: boolean;
26
+ toDebugString?: (node: PMNode) => string;
27
+ toDOM: (node: PMNode) => DOMOutputSpec;
28
+ whitespace?: "pre" | "normal";
28
29
  };
@@ -1,5 +1,6 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- export declare const closeMediaAltTextMenuAndSave: (altText?: string) => import("@atlaskit/editor-common/types").Command;
3
- export declare const closeMediaAltTextMenu: import("@atlaskit/editor-common/types").Command;
4
- export declare const openMediaAltTextMenu: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => import("@atlaskit/editor-common/types").Command;
5
- export declare const updateAltText: (newAltText: string) => import("@atlaskit/editor-common/types").Command;
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
+ export declare const closeMediaAltTextMenuAndSave: (altText?: string) => Command;
4
+ export declare const closeMediaAltTextMenu: Command;
5
+ export declare const openMediaAltTextMenu: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
6
+ export declare const updateAltText: (newAltText: string) => Command;
@@ -1,5 +1,9 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
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;
4
- export declare const createPlugin: ({ dispatch, providerFactory }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState>;
2
+ import type { Command, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
3
+ import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
+ import type { MediaAltTextAction } from './actions';
5
+ import type { MediaAltTextState } from './types';
6
+ declare const createCommand: <A = MediaAltTextAction>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
7
+ declare const getPluginState: (state: EditorState) => MediaAltTextState;
8
+ export declare const createPlugin: ({ dispatch, providerFactory, }: PMPluginFactoryParams) => SafePlugin<MediaAltTextState>;
5
9
  export { createCommand, getPluginState };
@@ -41,7 +41,7 @@ export declare class AltTextEditComponent extends React.Component<Props, AltText
41
41
  private handleOnBlur;
42
42
  private handleClearText;
43
43
  }
44
- declare const _default: React.ForwardRefExoticComponent<Omit<Omit<Props, "intl"> & {
44
+ declare const _default_1: React.ForwardRefExoticComponent<Omit<Omit<Props, 'intl'> & {
45
45
  forwardedRef?: React.Ref<any>;
46
46
  }, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
47
- export default _default;
47
+ export default _default_1;
@@ -1,9 +1,12 @@
1
1
  import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
+ import type { Command } from '@atlaskit/editor-common/types';
4
+ import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
5
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
4
6
  import type { MediaLinkingActions } from './actions';
5
7
  import type { MediaLinkingState } from './types';
6
8
  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;
9
+ export declare const createMediaLinkingCommand: <A = MediaLinkingActions>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
10
+ export declare const getMediaLinkingState: (state: EditorState) => MediaLinkingState;
8
11
  declare const _default: (dispatch: Dispatch) => SafePlugin<MediaLinkingState>;
9
12
  export default _default;
@@ -3,7 +3,7 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
3
3
  import type { InsertMediaVia } from '@atlaskit/editor-common/analytics';
4
4
  import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
5
5
  import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
6
- import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
6
+ import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
7
7
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
8
8
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
9
9
  import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
@@ -75,7 +75,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
75
75
  updateElement(): void;
76
76
  private isMediaSchemaNode;
77
77
  private getDomElement;
78
- get contextIdentifierProvider(): import("@atlaskit/editor-common/provider-factory").ContextIdentifierProvider | undefined;
78
+ get contextIdentifierProvider(): ContextIdentifierProvider | undefined;
79
79
  onNodeInserted: (id: string, selectionPosition: number) => void;
80
80
  /**
81
81
  * we insert a new file by inserting a initial state for that file.
@@ -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
- clipboard: null;
9
- customMediaPicker: CustomMediaPicker;
10
- dropzone: null;
11
- };
12
7
  export type PickerFacadeConfig = {
13
8
  errorReporter: ErrorReportingHandler;
14
9
  featureFlags?: MediaFeatureFlags;
@@ -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?: ExtendedComponentConfigs[PickerType] | undefined;
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?: ExtendedComponentConfigs[PickerType] | undefined, analyticsName?: string);
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;
@@ -1,4 +1,5 @@
1
+ import type { Command } from '@atlaskit/editor-common/types';
1
2
  import { type Transaction, type EditorState } from '@atlaskit/editor-prosemirror/state';
2
- export declare const openPixelEditor: () => import("@atlaskit/editor-common/types").Command;
3
- export declare const closePixelEditor: () => import("@atlaskit/editor-common/types").Command;
4
- export declare const closePixelEditorAndSave: (saveTransform: (tr: Transaction, state: EditorState) => Transaction) => import("@atlaskit/editor-common/types").Command;
3
+ export declare const openPixelEditor: () => Command;
4
+ export declare const closePixelEditor: () => Command;
5
+ export declare const closePixelEditorAndSave: (saveTransform: (tr: Transaction, state: EditorState) => Transaction) => Command;
@@ -1,13 +1,15 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
2
+ import type { Command, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
3
+ import { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
3
4
  declare const createCommand: <A = {
4
- type: "openPixelEditor";
5
+ type: 'openPixelEditor';
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
+ type: 'closePixelEditor';
8
+ }>(action: A | ((state: Readonly<EditorState>) => false | A), transform?: (tr: Transaction, state: EditorState) => Transaction) => Command;
9
+ declare const getPluginState: (state: EditorState) => {
8
10
  isPixelEditorOpen: boolean;
9
11
  };
10
- export declare const createPlugin: ({ dispatch }: PMPluginFactoryParams) => SafePlugin<{
12
+ export declare const createPlugin: ({ dispatch, }: PMPluginFactoryParams) => SafePlugin<{
11
13
  isPixelEditorOpen: boolean;
12
14
  }>;
13
15
  export { createCommand, getPluginState };
@@ -17,6 +17,6 @@ export type Props = {
17
17
  triggerButtonSelector?: string;
18
18
  };
19
19
  export declare const PixelEntry: ({ editorView, selectedMediaSingleNode, pluginInjectionApi, intl, pluginState, hoverDecoration, isEditorFullWidthEnabled, triggerButtonSelector, }: Props) => jsx.JSX.Element | null;
20
- export declare const FullWidthDisplay: ({ intl: { formatMessage } }: {
20
+ export declare const FullWidthDisplay: ({ intl: { formatMessage }, }: {
21
21
  intl: IntlShape;
22
22
  }) => jsx.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { type MemoizedFn } from 'memoize-one';
1
2
  import type { MediaADFAttrs } from '@atlaskit/adf-schema';
2
3
  import type { EditorAnalyticsAPI, InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
3
4
  import { type InsertMediaVia } from '@atlaskit/editor-common/analytics';
@@ -11,4 +12,4 @@ export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode,
11
12
  export declare const createInsertMediaAsMediaSingleCommand: (mediaAttrs: MediaADFAttrs, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, insertMediaVia?: InsertMediaVia, allowPixelResizing?: boolean) => EditorCommand;
12
13
  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;
13
14
  export declare const changeFromMediaInlineToMediaSingleNode: (view: EditorView, fromNode: PMNode, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined, allowPixelResizing?: boolean) => boolean;
14
- export declare const isVideo: import("memoize-one").MemoizedFn<(fileType?: string) => boolean>;
15
+ export declare const isVideo: MemoizedFn<(fileType?: string) => boolean>;
@@ -1,17 +1,18 @@
1
+ import { type SerializedStyles } from '@emotion/react';
1
2
  export declare const menuItemDimensions: {
2
3
  width: number;
3
4
  height: number;
4
5
  };
5
6
  export declare const itemSpacing = 4;
6
- export declare const contextualMenuArrow: import("@emotion/utils").SerializedStyles;
7
- export declare const contextualMenuColorIcon: (color?: string) => import("@emotion/utils").SerializedStyles;
8
- export declare const contextualSubMenu: (index: number) => import("@emotion/utils").SerializedStyles;
9
- export declare const buttonStyle: (selected: boolean) => import("@emotion/utils").SerializedStyles;
10
- export declare const buttonWrapperStyle: import("@emotion/utils").SerializedStyles;
11
- export declare const line: (size: number, selected: boolean) => import("@emotion/utils").SerializedStyles;
7
+ export declare const contextualMenuArrow: SerializedStyles;
8
+ export declare const contextualMenuColorIcon: (color?: string) => SerializedStyles;
9
+ export declare const contextualSubMenu: (index: number) => SerializedStyles;
10
+ export declare const buttonStyle: (selected: boolean) => SerializedStyles;
11
+ export declare const buttonWrapperStyle: SerializedStyles;
12
+ export declare const line: (size: number, selected: boolean) => SerializedStyles;
12
13
  export declare const toolbarButtonWrapper: ({ enabled, isOpen, }: {
13
14
  enabled: boolean;
14
15
  isOpen: boolean;
15
- }) => import("@emotion/utils").SerializedStyles;
16
- export declare const dropdownOptionButton: import("@emotion/utils").SerializedStyles;
17
- export declare const dropdownWrapper: import("@emotion/utils").SerializedStyles;
16
+ }) => SerializedStyles;
17
+ export declare const dropdownOptionButton: SerializedStyles;
18
+ export declare const dropdownWrapper: SerializedStyles;
@@ -14,5 +14,5 @@ export type Props = {
14
14
  api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
15
15
  children: (props: ChildrenProps) => React.ReactElement | null;
16
16
  };
17
- export default function PickerFacadeProvider({ api, analyticsName, children }: Props): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
17
+ export default function PickerFacadeProvider({ api, analyticsName, children, }: Props): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
18
18
  export {};