@atlaskit/editor-plugin-media 13.5.1 → 13.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/nodeviews/mediaNodeView/media.js +8 -1
  3. package/dist/es2019/nodeviews/mediaNodeView/media.js +6 -1
  4. package/dist/esm/nodeviews/mediaNodeView/media.js +8 -1
  5. package/media-plugin/package.json +1 -8
  6. package/media-plugin-type/package.json +1 -8
  7. package/nodeviewHelpers/package.json +1 -8
  8. package/package.json +8 -4
  9. package/types/package.json +1 -8
  10. package/dist/types-ts4.5/entry-points/media-plugin-type.d.ts +0 -1
  11. package/dist/types-ts4.5/entry-points/media-plugin.d.ts +0 -1
  12. package/dist/types-ts4.5/entry-points/nodeview-helpers.d.ts +0 -1
  13. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  14. package/dist/types-ts4.5/index.d.ts +0 -3
  15. package/dist/types-ts4.5/mediaPlugin.d.ts +0 -2
  16. package/dist/types-ts4.5/mediaPluginType.d.ts +0 -107
  17. package/dist/types-ts4.5/nodeviews/__mocks__/mediaNodeUpdater.d.ts +0 -27
  18. package/dist/types-ts4.5/nodeviews/helpers.d.ts +0 -2
  19. package/dist/types-ts4.5/nodeviews/lazy-media-group.d.ts +0 -9
  20. package/dist/types-ts4.5/nodeviews/lazy-media-inline.d.ts +0 -9
  21. package/dist/types-ts4.5/nodeviews/mediaGroup.d.ts +0 -10
  22. package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +0 -37
  23. package/dist/types-ts4.5/nodeviews/mediaInline.d.ts +0 -49
  24. package/dist/types-ts4.5/nodeviews/mediaNodeUpdater.d.ts +0 -52
  25. package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +0 -48
  26. package/dist/types-ts4.5/nodeviews/mediaNodeView/media.d.ts +0 -65
  27. package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +0 -38
  28. package/dist/types-ts4.5/nodeviews/mediaSingleNext.d.ts +0 -33
  29. package/dist/types-ts4.5/nodeviews/nodeviewHelpers.d.ts +0 -11
  30. package/dist/types-ts4.5/nodeviews/styles.d.ts +0 -17
  31. package/dist/types-ts4.5/nodeviews/toDOM-fixes/media.d.ts +0 -44
  32. package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaGroup.d.ts +0 -64
  33. package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaInline.d.ts +0 -29
  34. package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaSingle.d.ts +0 -45
  35. package/dist/types-ts4.5/nodeviews/toDOM-fixes/toDOMAttrs.d.ts +0 -29
  36. package/dist/types-ts4.5/nodeviews/types.d.ts +0 -50
  37. package/dist/types-ts4.5/pm-plugins/actions.d.ts +0 -7
  38. package/dist/types-ts4.5/pm-plugins/ai-generating-decoration.d.ts +0 -49
  39. package/dist/types-ts4.5/pm-plugins/alt-text/actions.d.ts +0 -10
  40. package/dist/types-ts4.5/pm-plugins/alt-text/commands.d.ts +0 -6
  41. package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +0 -9
  42. package/dist/types-ts4.5/pm-plugins/alt-text/keymap.d.ts +0 -4
  43. package/dist/types-ts4.5/pm-plugins/alt-text/reducer.d.ts +0 -4
  44. package/dist/types-ts4.5/pm-plugins/alt-text/types.d.ts +0 -3
  45. package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +0 -47
  46. package/dist/types-ts4.5/pm-plugins/commands/captions.d.ts +0 -5
  47. package/dist/types-ts4.5/pm-plugins/commands/helpers.d.ts +0 -15
  48. package/dist/types-ts4.5/pm-plugins/commands/linking.d.ts +0 -9
  49. package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -24
  50. package/dist/types-ts4.5/pm-plugins/keymap-media.d.ts +0 -3
  51. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -10
  52. package/dist/types-ts4.5/pm-plugins/linking/actions.d.ts +0 -21
  53. package/dist/types-ts4.5/pm-plugins/linking/index.d.ts +0 -12
  54. package/dist/types-ts4.5/pm-plugins/linking/keymap.d.ts +0 -3
  55. package/dist/types-ts4.5/pm-plugins/linking/reducer.d.ts +0 -4
  56. package/dist/types-ts4.5/pm-plugins/linking/types.d.ts +0 -12
  57. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -154
  58. package/dist/types-ts4.5/pm-plugins/media-editor-plugin-factory.d.ts +0 -3
  59. package/dist/types-ts4.5/pm-plugins/mediaTaskManager.d.ts +0 -9
  60. package/dist/types-ts4.5/pm-plugins/picker-facade.d.ts +0 -37
  61. package/dist/types-ts4.5/pm-plugins/pixel-resizing/commands.d.ts +0 -5
  62. package/dist/types-ts4.5/pm-plugins/pixel-resizing/index.d.ts +0 -15
  63. package/dist/types-ts4.5/pm-plugins/pixel-resizing/reducer.d.ts +0 -12
  64. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/constants.d.ts +0 -3
  65. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/index.d.ts +0 -22
  66. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/pixel-entry.d.ts +0 -4
  67. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/styles.d.ts +0 -8
  68. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/types.d.ts +0 -86
  69. package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -3
  70. package/dist/types-ts4.5/pm-plugins/types.d.ts +0 -82
  71. package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +0 -6
  72. package/dist/types-ts4.5/pm-plugins/utils/batchMediaNodeAttrs.d.ts +0 -54
  73. package/dist/types-ts4.5/pm-plugins/utils/batchSteps.d.ts +0 -19
  74. package/dist/types-ts4.5/pm-plugins/utils/check-media-type.d.ts +0 -4
  75. package/dist/types-ts4.5/pm-plugins/utils/current-media-node.d.ts +0 -10
  76. package/dist/types-ts4.5/pm-plugins/utils/is-type.d.ts +0 -2
  77. package/dist/types-ts4.5/pm-plugins/utils/media-common.d.ts +0 -29
  78. package/dist/types-ts4.5/pm-plugins/utils/media-files.d.ts +0 -29
  79. package/dist/types-ts4.5/pm-plugins/utils/media-inline.d.ts +0 -6
  80. package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +0 -18
  81. package/dist/types-ts4.5/types/index.d.ts +0 -212
  82. package/dist/types-ts4.5/types/media-plugin-options.d.ts +0 -16
  83. package/dist/types-ts4.5/ui/CaptionPlaceholder/index.d.ts +0 -16
  84. package/dist/types-ts4.5/ui/CommentBadge/index.d.ts +0 -18
  85. package/dist/types-ts4.5/ui/ImageBorder/index.d.ts +0 -11
  86. package/dist/types-ts4.5/ui/ImageBorder/styles.d.ts +0 -18
  87. package/dist/types-ts4.5/ui/Media/DropPlaceholder.d.ts +0 -11
  88. package/dist/types-ts4.5/ui/MediaLinkingToolbar.d.ts +0 -39
  89. package/dist/types-ts4.5/ui/MediaPicker/BrowserWrapper.d.ts +0 -12
  90. package/dist/types-ts4.5/ui/MediaPicker/ClipboardWrapper.d.ts +0 -11
  91. package/dist/types-ts4.5/ui/MediaPicker/DropzoneWrapper.d.ts +0 -13
  92. package/dist/types-ts4.5/ui/MediaPicker/PickerFacadeProvider.d.ts +0 -18
  93. package/dist/types-ts4.5/ui/MediaPicker/index.d.ts +0 -23
  94. package/dist/types-ts4.5/ui/MediaSSRReactContextsProvider.d.ts +0 -8
  95. package/dist/types-ts4.5/ui/MediaViewer/MediaViewerContainer.d.ts +0 -21
  96. package/dist/types-ts4.5/ui/MediaViewer/PortalWrapper.d.ts +0 -13
  97. package/dist/types-ts4.5/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.d.ts +0 -6
  98. package/dist/types-ts4.5/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +0 -9
  99. package/dist/types-ts4.5/ui/ResizableMediaSingle/index.d.ts +0 -50
  100. package/dist/types-ts4.5/ui/ResizableMediaSingle/styled.d.ts +0 -3
  101. package/dist/types-ts4.5/ui/ResizableMediaSingle/styles.d.ts +0 -2
  102. package/dist/types-ts4.5/ui/ResizableMediaSingle/types.d.ts +0 -30
  103. package/dist/types-ts4.5/ui/ToolbarMedia/index.d.ts +0 -13
  104. package/dist/types-ts4.5/ui/hooks/useMediaProvider.d.ts +0 -4
  105. package/dist/types-ts4.5/ui/toolbar/alt-text.d.ts +0 -17
  106. package/dist/types-ts4.5/ui/toolbar/commands.d.ts +0 -20
  107. package/dist/types-ts4.5/ui/toolbar/comments.d.ts +0 -6
  108. package/dist/types-ts4.5/ui/toolbar/imageBorder.d.ts +0 -2
  109. package/dist/types-ts4.5/ui/toolbar/index.d.ts +0 -16
  110. package/dist/types-ts4.5/ui/toolbar/layout-group.d.ts +0 -14
  111. package/dist/types-ts4.5/ui/toolbar/linking-toolbar-appearance.d.ts +0 -21
  112. package/dist/types-ts4.5/ui/toolbar/linking.d.ts +0 -11
  113. package/dist/types-ts4.5/ui/toolbar/mediaInline.d.ts +0 -8
  114. package/dist/types-ts4.5/ui/toolbar/pixel-resizing.d.ts +0 -8
  115. package/dist/types-ts4.5/ui/toolbar/utils.d.ts +0 -29
@@ -1,30 +0,0 @@
1
- import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
2
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
- import type { HandlePositioning } from '@atlaskit/editor-common/resizer';
4
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
- import type { MediaSingleProps } from '@atlaskit/editor-common/ui';
6
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
- import type { MediaClientConfig } from '@atlaskit/media-core';
8
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
9
- import type { getPosHandler } from '../../types';
10
- export type EnabledHandles = {
11
- left?: boolean;
12
- right?: boolean;
13
- };
14
- export type Props = MediaSingleProps & {
15
- allowBreakoutSnapPoints?: boolean;
16
- containerWidth: number;
17
- disableHandles?: boolean;
18
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
19
- forceHandlePositioning?: HandlePositioning;
20
- fullWidthMode?: boolean;
21
- getPos: getPosHandler;
22
- gridSize: number;
23
- lineLength: number;
24
- mediaSingleWidth?: number;
25
- pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
26
- selected: boolean;
27
- updateSize: (width: number | null, layout: MediaSingleLayout) => void;
28
- view: EditorView;
29
- viewMediaClientConfig?: MediaClientConfig;
30
- };
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
5
- interface Props {
6
- api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
7
- isDisabled?: boolean;
8
- isReducedSpacing?: boolean;
9
- }
10
- declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
11
- WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
12
- };
13
- export default _default_1;
@@ -1,4 +0,0 @@
1
- import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
4
- export declare const useMediaProvider: (pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => MediaProvider | undefined;
@@ -1,17 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
- import type { Command, FloatingToolbarButton, FloatingToolbarConfig, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
4
- import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
5
- import type { NodeType } from '@atlaskit/editor-prosemirror/model';
6
- import { type EditorState } from '@atlaskit/editor-prosemirror/state';
7
- import type { MediaToolbarBaseConfig } from '../../types';
8
- export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
9
- interface AltTextToolbarOptions {
10
- altTextValidator?: (value: string) => string[];
11
- areAnyNewToolbarFlagsEnabled?: boolean;
12
- forceFocusSelector?: ForceFocusSelector;
13
- triggerButtonSelector?: string;
14
- }
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>;
17
- export {};
@@ -1,20 +0,0 @@
1
- import type { BorderMarkAttributes, RichMediaLayout } from '@atlaskit/adf-schema';
2
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
- import type { Command, EditorContainerWidth as WidthPluginState } from '@atlaskit/editor-common/types';
4
- import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
5
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
6
- import type { PixelEntryValidation } from '../../pm-plugins/pixel-resizing/ui/types';
7
- import type { EventInput } from '../../pm-plugins/types';
8
- export declare const DEFAULT_BORDER_COLOR = "#091e4224";
9
- export declare const DEFAULT_BORDER_SIZE = 2;
10
- export declare const getNodeType: (state: EditorState) => "mediaInline" | "mediaSingle";
11
- export declare const changeInlineToMediaCard: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, forceFocusSelector: ForceFocusSelector | undefined) => Command;
12
- export declare const changeMediaCardToInline: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, forceFocusSelector: ForceFocusSelector | undefined) => Command;
13
- export declare const changeMediaInlineToMediaSingle: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, widthPluginState: WidthPluginState | undefined, allowPixelResizing?: boolean) => Command;
14
- export declare const removeInlineCardWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
15
- export declare const removeInlineCard: Command;
16
- export declare const toggleBorderMark: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
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) => Transaction | null;
19
- export declare const updateMediaSingleWidth: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (width: number, validation: PixelEntryValidation, inputMethod: EventInput, layout: RichMediaLayout) => Command;
20
- export declare const changeMediaSingleToMediaInline: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
@@ -1,6 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { Command, ExtractInjectionAPI, FloatingToolbarButton } from '@atlaskit/editor-common/types';
3
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
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>;
@@ -1,2 +0,0 @@
1
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
2
- export declare function shouldShowImageBorder(editorState: EditorState): boolean;
@@ -1,16 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
3
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
5
- import type { MediaPluginState } from '../../pm-plugins/types';
6
- import type { MediaFloatingToolbarOptions } from '../../types';
7
- export declare const handleShowMediaViewer: ({ api, mediaPluginState, }: {
8
- api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
9
- mediaPluginState: MediaPluginState;
10
- }) => false | undefined;
11
- export declare const handleShowImageEditor: ({ api, mediaPluginState, }: {
12
- api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
13
- mediaPluginState: MediaPluginState;
14
- }) => false | undefined;
15
- export declare const overflowDropdwonBtnTriggerTestId = "media-overflow-dropdown-trigger";
16
- export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => FloatingToolbarConfig | undefined;
@@ -1,14 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
6
- import type { Command, FloatingToolbarItem } from '@atlaskit/editor-common/types';
7
- type Props = {
8
- areAnyNewToolbarFlagsEnabled: boolean;
9
- dispatchCommand: (command: Command) => void;
10
- hide: () => void;
11
- layoutButtons: FloatingToolbarItem<Command>[];
12
- };
13
- export declare const LayoutGroup: ({ layoutButtons, dispatchCommand, hide, areAnyNewToolbarFlagsEnabled, }: Props) => jsx.JSX.Element;
14
- export {};
@@ -1,21 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React from 'react';
6
- import { jsx } from '@emotion/react';
7
- import type { IntlShape } from 'react-intl';
8
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
9
- import type { MediaLinkingState } from '../../pm-plugins/linking/types';
10
- export interface LinkingToolbarProps {
11
- areAnyNewToolbarFlagsEnabled: boolean;
12
- editorState: EditorState;
13
- intl: IntlShape;
14
- isInlineNode?: boolean;
15
- isViewOnly?: boolean;
16
- mediaLinkingState: MediaLinkingState;
17
- onAddLink: React.MouseEventHandler;
18
- onEditLink: React.MouseEventHandler;
19
- onOpenLink: React.MouseEventHandler;
20
- }
21
- export declare const LinkToolbarAppearance: ({ editorState, mediaLinkingState, intl, onAddLink, onEditLink, onOpenLink, isInlineNode, isViewOnly, areAnyNewToolbarFlagsEnabled, }: LinkingToolbarProps) => jsx.JSX.Element | null;
@@ -1,11 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import type { Command, ExtractInjectionAPI, FloatingToolbarConfig, FloatingToolbarItem, FloatingToolbarOverflowDropdownOptions } from '@atlaskit/editor-common/types';
4
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
6
- import type { MediaLinkingState } from '../../pm-plugins/linking/types';
7
- import type { MediaToolbarBaseConfig } from '../../types';
8
- export declare function shouldShowMediaLinkToolbar(editorState: EditorState): boolean;
9
- export declare const getLinkingToolbar: (toolbarBaseConfig: MediaToolbarBaseConfig, mediaLinkingState: MediaLinkingState, state: EditorState, intl: IntlShape, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, providerFactory?: ProviderFactory) => FloatingToolbarConfig | undefined;
10
- export declare const getLinkingDropdownOptions: (editorState: EditorState, intl: IntlShape, mediaLinkingState: MediaLinkingState, isInlineNode?: boolean, allowLinking?: boolean, isViewOnly?: boolean) => FloatingToolbarOverflowDropdownOptions<Command>;
11
- export declare const getOpenLinkToolbarButtonOption: (intl: IntlShape, mediaLinkingState: MediaLinkingState, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => FloatingToolbarItem<Command>;
@@ -1,8 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { Command, ExtractInjectionAPI, FloatingToolbarItem } from '@atlaskit/editor-common/types';
3
- import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
4
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
6
- import type { MediaPluginState } from '../../pm-plugins/types';
7
- import type { MediaFloatingToolbarOptions } from '../../types';
8
- export declare const generateMediaInlineFloatingToolbar: (state: EditorState, intl: IntlShape, mediaPluginState: MediaPluginState, hoverDecoration: HoverDecorationHandler | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, options?: MediaFloatingToolbarOptions) => FloatingToolbarItem<Command>[];
@@ -1,8 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { FloatingToolbarConfig, FloatingToolbarOverflowDropdownOptions, Command } from '@atlaskit/editor-common/types';
3
- import type { NodeType } from '@atlaskit/editor-prosemirror/model';
4
- import type { EditorState } from '@atlaskit/editor-prosemirror/state';
5
- import { type Props } from '../../pm-plugins/pixel-resizing/ui';
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>;
@@ -1,29 +0,0 @@
1
- import { type MemoizedFn } from 'memoize-one';
2
- import type { IntlShape } from 'react-intl';
3
- import type { ExternalMediaAttributes, MediaADFAttrs, RichMediaLayout } from '@atlaskit/adf-schema';
4
- import type { LayoutIcon } from '@atlaskit/editor-common/card';
5
- import type { Command, FloatingToolbarItem, FloatingToolbarDropdown, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
- import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
7
- import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
8
- import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
9
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
11
- import type { MediaPluginState } from '../../pm-plugins/types';
12
- export declare const isExternalMedia: (attrs: MediaADFAttrs) => attrs is ExternalMediaAttributes;
13
- export declare const getSelectedNearestMediaContainerNodeAttrsFunction: (selectedMediaContainerNode: () => ProseMirrorNode | undefined) => MediaADFAttrs | null;
14
- export declare const getSelectedNearestMediaContainerNodeAttrs: (mediaPluginState: MediaPluginState) => MediaADFAttrs | null;
15
- export declare const getIsDownloadDisabledByDataSecurityPolicy: (mediaPluginState: MediaPluginState) => boolean;
16
- export declare const downloadMedia: (mediaPluginState: MediaPluginState, isViewMode?: boolean) => Promise<boolean>;
17
- export declare const removeMediaGroupNode: (state: EditorState) => Transaction;
18
- export declare const getSelectedMediaSingle: (state: EditorState) => ReturnType<ReturnType<typeof findSelectedNodeOfType>> | ReturnType<ReturnType<typeof findParentNodeOfType>>;
19
- export declare const getPixelWidthOfElement: MemoizedFn<(editorView: EditorView, pos: number, mediaWidth: number) => number>;
20
- export declare const calcNewLayout: (width: number, layout: RichMediaLayout, contentWidth: number, fullWidthMode?: boolean, isNested?: boolean) => RichMediaLayout;
21
- export declare const getMaxToolbarWidth: () => number;
22
- export declare const getSelectedLayoutIcon: (layoutIcons: LayoutIcon[], selectedNode: ProseMirrorNode) => LayoutIcon | undefined;
23
- /**
24
- * Check if 'original size' and 'inline' buttons can be shown in the toolbar for a given mediaSingle node.
25
- * @param mediaSingleNode node to be checked
26
- */
27
- export declare const canShowSwitchButtons: (mediaSingleNode?: ProseMirrorNode) => boolean | null;
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>;