@atlaskit/editor-plugin-media 13.5.0 → 13.5.2

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 (112) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/media-plugin/package.json +1 -8
  3. package/media-plugin-type/package.json +1 -8
  4. package/nodeviewHelpers/package.json +1 -8
  5. package/package.json +3 -3
  6. package/types/package.json +1 -8
  7. package/dist/types-ts4.5/entry-points/media-plugin-type.d.ts +0 -1
  8. package/dist/types-ts4.5/entry-points/media-plugin.d.ts +0 -1
  9. package/dist/types-ts4.5/entry-points/nodeview-helpers.d.ts +0 -1
  10. package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
  11. package/dist/types-ts4.5/index.d.ts +0 -3
  12. package/dist/types-ts4.5/mediaPlugin.d.ts +0 -2
  13. package/dist/types-ts4.5/mediaPluginType.d.ts +0 -107
  14. package/dist/types-ts4.5/nodeviews/__mocks__/mediaNodeUpdater.d.ts +0 -27
  15. package/dist/types-ts4.5/nodeviews/helpers.d.ts +0 -2
  16. package/dist/types-ts4.5/nodeviews/lazy-media-group.d.ts +0 -9
  17. package/dist/types-ts4.5/nodeviews/lazy-media-inline.d.ts +0 -9
  18. package/dist/types-ts4.5/nodeviews/mediaGroup.d.ts +0 -10
  19. package/dist/types-ts4.5/nodeviews/mediaGroupNext.d.ts +0 -37
  20. package/dist/types-ts4.5/nodeviews/mediaInline.d.ts +0 -49
  21. package/dist/types-ts4.5/nodeviews/mediaNodeUpdater.d.ts +0 -52
  22. package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +0 -48
  23. package/dist/types-ts4.5/nodeviews/mediaNodeView/media.d.ts +0 -65
  24. package/dist/types-ts4.5/nodeviews/mediaSingle.d.ts +0 -38
  25. package/dist/types-ts4.5/nodeviews/mediaSingleNext.d.ts +0 -33
  26. package/dist/types-ts4.5/nodeviews/nodeviewHelpers.d.ts +0 -11
  27. package/dist/types-ts4.5/nodeviews/styles.d.ts +0 -17
  28. package/dist/types-ts4.5/nodeviews/toDOM-fixes/media.d.ts +0 -44
  29. package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaGroup.d.ts +0 -64
  30. package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaInline.d.ts +0 -29
  31. package/dist/types-ts4.5/nodeviews/toDOM-fixes/mediaSingle.d.ts +0 -45
  32. package/dist/types-ts4.5/nodeviews/toDOM-fixes/toDOMAttrs.d.ts +0 -29
  33. package/dist/types-ts4.5/nodeviews/types.d.ts +0 -50
  34. package/dist/types-ts4.5/pm-plugins/actions.d.ts +0 -7
  35. package/dist/types-ts4.5/pm-plugins/ai-generating-decoration.d.ts +0 -49
  36. package/dist/types-ts4.5/pm-plugins/alt-text/actions.d.ts +0 -10
  37. package/dist/types-ts4.5/pm-plugins/alt-text/commands.d.ts +0 -6
  38. package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +0 -9
  39. package/dist/types-ts4.5/pm-plugins/alt-text/keymap.d.ts +0 -4
  40. package/dist/types-ts4.5/pm-plugins/alt-text/reducer.d.ts +0 -4
  41. package/dist/types-ts4.5/pm-plugins/alt-text/types.d.ts +0 -3
  42. package/dist/types-ts4.5/pm-plugins/alt-text/ui/AltTextEdit.d.ts +0 -47
  43. package/dist/types-ts4.5/pm-plugins/commands/captions.d.ts +0 -5
  44. package/dist/types-ts4.5/pm-plugins/commands/helpers.d.ts +0 -15
  45. package/dist/types-ts4.5/pm-plugins/commands/linking.d.ts +0 -9
  46. package/dist/types-ts4.5/pm-plugins/commands.d.ts +0 -24
  47. package/dist/types-ts4.5/pm-plugins/keymap-media.d.ts +0 -3
  48. package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -10
  49. package/dist/types-ts4.5/pm-plugins/linking/actions.d.ts +0 -21
  50. package/dist/types-ts4.5/pm-plugins/linking/index.d.ts +0 -12
  51. package/dist/types-ts4.5/pm-plugins/linking/keymap.d.ts +0 -3
  52. package/dist/types-ts4.5/pm-plugins/linking/reducer.d.ts +0 -4
  53. package/dist/types-ts4.5/pm-plugins/linking/types.d.ts +0 -12
  54. package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -154
  55. package/dist/types-ts4.5/pm-plugins/media-editor-plugin-factory.d.ts +0 -3
  56. package/dist/types-ts4.5/pm-plugins/mediaTaskManager.d.ts +0 -9
  57. package/dist/types-ts4.5/pm-plugins/picker-facade.d.ts +0 -37
  58. package/dist/types-ts4.5/pm-plugins/pixel-resizing/commands.d.ts +0 -5
  59. package/dist/types-ts4.5/pm-plugins/pixel-resizing/index.d.ts +0 -15
  60. package/dist/types-ts4.5/pm-plugins/pixel-resizing/reducer.d.ts +0 -12
  61. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/constants.d.ts +0 -3
  62. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/index.d.ts +0 -22
  63. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/pixel-entry.d.ts +0 -4
  64. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/styles.d.ts +0 -8
  65. package/dist/types-ts4.5/pm-plugins/pixel-resizing/ui/types.d.ts +0 -86
  66. package/dist/types-ts4.5/pm-plugins/plugin-key.d.ts +0 -3
  67. package/dist/types-ts4.5/pm-plugins/types.d.ts +0 -82
  68. package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +0 -6
  69. package/dist/types-ts4.5/pm-plugins/utils/batchMediaNodeAttrs.d.ts +0 -54
  70. package/dist/types-ts4.5/pm-plugins/utils/batchSteps.d.ts +0 -19
  71. package/dist/types-ts4.5/pm-plugins/utils/check-media-type.d.ts +0 -4
  72. package/dist/types-ts4.5/pm-plugins/utils/current-media-node.d.ts +0 -10
  73. package/dist/types-ts4.5/pm-plugins/utils/is-type.d.ts +0 -2
  74. package/dist/types-ts4.5/pm-plugins/utils/media-common.d.ts +0 -29
  75. package/dist/types-ts4.5/pm-plugins/utils/media-files.d.ts +0 -29
  76. package/dist/types-ts4.5/pm-plugins/utils/media-inline.d.ts +0 -6
  77. package/dist/types-ts4.5/pm-plugins/utils/media-single.d.ts +0 -18
  78. package/dist/types-ts4.5/types/index.d.ts +0 -212
  79. package/dist/types-ts4.5/types/media-plugin-options.d.ts +0 -16
  80. package/dist/types-ts4.5/ui/CaptionPlaceholder/index.d.ts +0 -16
  81. package/dist/types-ts4.5/ui/CommentBadge/index.d.ts +0 -18
  82. package/dist/types-ts4.5/ui/ImageBorder/index.d.ts +0 -11
  83. package/dist/types-ts4.5/ui/ImageBorder/styles.d.ts +0 -18
  84. package/dist/types-ts4.5/ui/Media/DropPlaceholder.d.ts +0 -11
  85. package/dist/types-ts4.5/ui/MediaLinkingToolbar.d.ts +0 -39
  86. package/dist/types-ts4.5/ui/MediaPicker/BrowserWrapper.d.ts +0 -12
  87. package/dist/types-ts4.5/ui/MediaPicker/ClipboardWrapper.d.ts +0 -11
  88. package/dist/types-ts4.5/ui/MediaPicker/DropzoneWrapper.d.ts +0 -13
  89. package/dist/types-ts4.5/ui/MediaPicker/PickerFacadeProvider.d.ts +0 -18
  90. package/dist/types-ts4.5/ui/MediaPicker/index.d.ts +0 -23
  91. package/dist/types-ts4.5/ui/MediaSSRReactContextsProvider.d.ts +0 -8
  92. package/dist/types-ts4.5/ui/MediaViewer/MediaViewerContainer.d.ts +0 -21
  93. package/dist/types-ts4.5/ui/MediaViewer/PortalWrapper.d.ts +0 -13
  94. package/dist/types-ts4.5/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.d.ts +0 -6
  95. package/dist/types-ts4.5/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +0 -9
  96. package/dist/types-ts4.5/ui/ResizableMediaSingle/index.d.ts +0 -50
  97. package/dist/types-ts4.5/ui/ResizableMediaSingle/styled.d.ts +0 -3
  98. package/dist/types-ts4.5/ui/ResizableMediaSingle/styles.d.ts +0 -2
  99. package/dist/types-ts4.5/ui/ResizableMediaSingle/types.d.ts +0 -30
  100. package/dist/types-ts4.5/ui/ToolbarMedia/index.d.ts +0 -13
  101. package/dist/types-ts4.5/ui/hooks/useMediaProvider.d.ts +0 -4
  102. package/dist/types-ts4.5/ui/toolbar/alt-text.d.ts +0 -17
  103. package/dist/types-ts4.5/ui/toolbar/commands.d.ts +0 -20
  104. package/dist/types-ts4.5/ui/toolbar/comments.d.ts +0 -6
  105. package/dist/types-ts4.5/ui/toolbar/imageBorder.d.ts +0 -2
  106. package/dist/types-ts4.5/ui/toolbar/index.d.ts +0 -16
  107. package/dist/types-ts4.5/ui/toolbar/layout-group.d.ts +0 -14
  108. package/dist/types-ts4.5/ui/toolbar/linking-toolbar-appearance.d.ts +0 -21
  109. package/dist/types-ts4.5/ui/toolbar/linking.d.ts +0 -11
  110. package/dist/types-ts4.5/ui/toolbar/mediaInline.d.ts +0 -8
  111. package/dist/types-ts4.5/ui/toolbar/pixel-resizing.d.ts +0 -8
  112. package/dist/types-ts4.5/ui/toolbar/utils.d.ts +0 -29
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 13.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.5.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 13.5.0
4
16
 
5
17
  ### Minor Changes
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/media-plugin.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/media-plugin.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/media-plugin.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/media-plugin-type.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/media-plugin-type.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/media-plugin-type.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/nodeview-helpers.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/nodeview-helpers.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/nodeview-helpers.d.ts"
17
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "13.5.0",
3
+ "version": "13.5.2",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/editor-tables": "^2.10.0",
54
54
  "@atlaskit/form": "^15.5.0",
55
55
  "@atlaskit/icon": "^35.4.0",
56
- "@atlaskit/icon-lab": "^6.13.0",
56
+ "@atlaskit/icon-lab": "^6.14.0",
57
57
  "@atlaskit/media-card": "^80.8.0",
58
58
  "@atlaskit/media-client": "^36.3.0",
59
59
  "@atlaskit/media-client-react": "^5.2.0",
@@ -65,7 +65,7 @@
65
65
  "@atlaskit/platform-feature-flags": "^1.1.0",
66
66
  "@atlaskit/primitives": "^19.0.0",
67
67
  "@atlaskit/textfield": "^8.3.0",
68
- "@atlaskit/tmp-editor-statsig": "^101.0.0",
68
+ "@atlaskit/tmp-editor-statsig": "^103.0.0",
69
69
  "@atlaskit/tokens": "^13.4.0",
70
70
  "@atlaskit/tooltip": "^22.6.0",
71
71
  "@babel/runtime": "^7.0.0",
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1 +0,0 @@
1
- export type { MediaNextEditorPluginType as MediaPlugin, MediaPluginDependencies, } from '../mediaPluginType';
@@ -1 +0,0 @@
1
- export { mediaPlugin } from '../mediaPlugin';
@@ -1 +0,0 @@
1
- export { computeReplacementDisplayWidth } from '../nodeviews/nodeviewHelpers';
@@ -1 +0,0 @@
1
- export type { CustomMediaPicker, ForwardRef, InsertMediaAsMediaSingle, Listener, MediaCopyScope, MediaDecorationSpec, MediaEditorState, MediaFloatingToolbarOptions, MediaOptions, MediaPluginOptions, MediaPluginState, MediaSingleOptions, MediaSingleWithType, MediaState, MediaStateEventListener, MediaStateEventSubscriber, MediaStateStatus, MediaToolbarBaseConfig, MobileUploadEndEventPayload, ProsemirrorGetPosHandler, ReactNodeProps, SupportedMediaAttributes, getPosHandler, getPosHandlerNode, } from '../types/index';
@@ -1,3 +0,0 @@
1
- export type { MediaNextEditorPluginType as MediaPlugin, MediaPluginDependencies, } from './mediaPluginType';
2
- export type { MediaPluginOptions } from './types/index';
3
- export { mediaPlugin } from './mediaPlugin';
@@ -1,2 +0,0 @@
1
- import type { MediaNextEditorPluginType } from './mediaPluginType';
2
- export declare const mediaPlugin: MediaNextEditorPluginType;
@@ -1,107 +0,0 @@
1
- import type { MediaADFAttrs } from '@atlaskit/adf-schema';
2
- import type { InputMethodInsertMedia, InsertMediaVia } from '@atlaskit/editor-common/analytics';
3
- import type { MediaProvider } from '@atlaskit/editor-common/provider-factory';
4
- import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
5
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
- import type { AnnotationPlugin } from '@atlaskit/editor-plugin-annotation';
7
- import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
8
- import type { ContextIdentifierPlugin } from '@atlaskit/editor-plugin-context-identifier';
9
- import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
10
- import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
11
- import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
12
- import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
13
- import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
14
- import type { FocusPlugin } from '@atlaskit/editor-plugin-focus';
15
- import type { GridPlugin } from '@atlaskit/editor-plugin-grid';
16
- import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
17
- import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
18
- import type { MediaEditingPlugin } from '@atlaskit/editor-plugin-media-editing';
19
- import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
20
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
21
- import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
22
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
23
- import type { AIGeneratingSource } from './pm-plugins/ai-generating-decoration';
24
- import type { MediaPluginState } from './pm-plugins/types';
25
- import type { InsertMediaAsMediaSingle } from './pm-plugins/utils/media-single';
26
- import type { MediaOptions } from './types';
27
- type MediaInsertPlugin = NextEditorPlugin<'mediaInsert', any>;
28
- export type MediaPluginDependencies = [
29
- OptionalPlugin<AnalyticsPlugin>,
30
- OptionalPlugin<ContextIdentifierPlugin>,
31
- OptionalPlugin<EditorViewModePlugin>,
32
- OptionalPlugin<GuidelinePlugin>,
33
- GridPlugin,
34
- WidthPlugin,
35
- DecorationsPlugin,
36
- FloatingToolbarPlugin,
37
- EditorDisabledPlugin,
38
- FocusPlugin,
39
- OptionalPlugin<MediaInsertPlugin>,
40
- OptionalPlugin<InteractionPlugin>,
41
- SelectionPlugin,
42
- OptionalPlugin<AnnotationPlugin>,
43
- OptionalPlugin<FeatureFlagsPlugin>,
44
- OptionalPlugin<ConnectivityPlugin>,
45
- OptionalPlugin<InteractionPlugin>,
46
- OptionalPlugin<ToolbarPlugin>,
47
- OptionalPlugin<MediaEditingPlugin>
48
- ];
49
- export type MediaNextEditorPluginType = NextEditorPlugin<'media', {
50
- actions: {
51
- /**
52
- * Callback to be called when there is an error rendering a media node.
53
- */
54
- handleMediaNodeRenderError: (node: PMNode, reason: string, nestedUnder?: string) => void;
55
- /**
56
- * @private
57
- * @deprecated Use the command `insertMediaSingle` instead which is decoupled from EditorView
58
- * and easier to use.
59
- */
60
- insertMediaAsMediaSingle: InsertMediaAsMediaSingle;
61
- /**
62
- * Used to update the initial provider passed to the media plugin.
63
- *
64
- * For performance reasons if you attempt to set the same provider more
65
- * than once this method will fail and return false.
66
- *
67
- * @param provider Promise<MediaProvider>
68
- * @returns {boolean} if setting the provider was successful or not
69
- */
70
- setProvider: (provider: Promise<MediaProvider>) => boolean;
71
- };
72
- commands: {
73
- /**
74
- * Clears the AI-generating decoration for a specific media node identified by
75
- * `mediaId`. Removes the AI border from that media node.
76
- */
77
- clearAIGenerating: (mediaId: string) => EditorCommand;
78
- hideMediaViewer: EditorCommand;
79
- /**
80
- * Inserts a media node as a media single.
81
- * This command creates a media single node from a set of attributes
82
- *
83
- * @param attrs - The media node attributes of the node to insert
84
- * @param inputMethod - The method used to input the media
85
- * @param insertMediaVia - Optional parameter indicating how the media was inserted
86
- * @param positions - Optional parameter indicating the positions for the insertion
87
- */
88
- insertMediaSingle: (attrs: MediaADFAttrs, inputMethod: InputMethodInsertMedia, insertMediaVia?: InsertMediaVia, positions?: [
89
- number,
90
- number
91
- ], dataConsumerSource?: string) => EditorCommand;
92
- /**
93
- * Sets the AI-generating decoration on a media node identified by `mediaId`.
94
- * Renders an AI border around the media node while AI is generating/replacing it.
95
- *
96
- * Decorations live in the view layer only and never affect the document model
97
- * or undo/redo history.
98
- */
99
- setAIGenerating: (mediaId: string, source?: AIGeneratingSource) => EditorCommand;
100
- showMediaViewer: (media: MediaADFAttrs) => EditorCommand;
101
- trackMediaPaste: (attrs: MediaADFAttrs) => EditorCommand;
102
- };
103
- dependencies: MediaPluginDependencies;
104
- pluginConfiguration: MediaOptions | undefined;
105
- sharedState: MediaPluginState | null;
106
- }>;
107
- export {};
@@ -1,27 +0,0 @@
1
- export declare class MediaNodeUpdater {
2
- static instances: MediaNodeUpdater[];
3
- static mockOverrides: {};
4
- static mockReset(): void;
5
- constructor();
6
- static setMock(thisKey: string, value: any): void;
7
- setProps(): void;
8
- updateContextId(): Promise<void>;
9
- updateNodeContextId(): Promise<void>;
10
- getAttrs(): void;
11
- getObjectId(): Promise<void>;
12
- getNodeContextId(): void;
13
- updateDimensions(): void;
14
- getRemoteDimensions(): Promise<void>;
15
- isNodeFromDifferentCollection(): Promise<void>;
16
- hasDifferentContextId(): Promise<void>;
17
- shouldNodeBeDeepCopied(): Promise<void>;
18
- copyNode(): Promise<void>;
19
- copyNodeFromPos(): Promise<void>;
20
- updateMediaSingleFileAttrs(): Promise<void>;
21
- uploadExternalMedia(): Promise<void>;
22
- isMediaBlobUrl(): void;
23
- copyNodeFromBlobUrl(): void;
24
- updateNodeAttrs(): void;
25
- handleExternalMedia(): Promise<void>;
26
- }
27
- export declare function createMediaNodeUpdater(): MediaNodeUpdater;
@@ -1,2 +0,0 @@
1
- import type { MediaAttributes } from '@atlaskit/adf-schema';
2
- export declare const hasPrivateAttrsChanged: (currentAttrs: MediaAttributes, newAttrs: Partial<MediaAttributes>) => boolean;
@@ -1,9 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
3
- import type { NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
4
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
5
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
6
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
7
- import type { MediaNextEditorPluginType } from '../mediaPluginType';
8
- import type { MediaPluginOptions } from '../types';
9
- export declare const lazyMediaGroupView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, options: MediaPluginOptions | undefined, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, intl?: IntlShape) => NodeViewConstructor;
@@ -1,9 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
- import { type NodeViewConstructor } from '@atlaskit/editor-common/lazy-node-view';
5
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
6
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
- import type { MediaNextEditorPluginType } from '../mediaPluginType';
9
- export declare const lazyMediaInlineView: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, fallbackMediaNameFetcher?: (id: string) => Promise<string>, intl?: IntlShape) => NodeViewConstructor;
@@ -1,10 +0,0 @@
1
- import type { IntlShape } from 'react-intl';
2
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
3
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
4
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
7
- import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
8
- import type { MediaNextEditorPluginType } from '../mediaPluginType';
9
- import type { getPosHandler, MediaPluginOptions } from '../types';
10
- export declare const ReactMediaGroupNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, intl?: IntlShape) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
4
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import type { MediaOptions } from '../types';
7
- export declare const MediaGroupNext: React.FC<WithIntlProps<{
8
- allowLazyLoading?: boolean;
9
- anchorPos: number;
10
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
11
- disabled?: boolean;
12
- editorViewMode?: boolean;
13
- forwardRef?: (ref: HTMLElement) => void;
14
- getPos: () => number | undefined;
15
- headPos: number;
16
- isCopyPasteEnabled?: boolean;
17
- mediaOptions: MediaOptions;
18
- mediaProvider?: Promise<MediaProvider>;
19
- node: PMNode;
20
- view: EditorView;
21
- } & WrappedComponentProps>> & {
22
- WrappedComponent: React.ComponentType<{
23
- allowLazyLoading?: boolean;
24
- anchorPos: number;
25
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
26
- disabled?: boolean;
27
- editorViewMode?: boolean;
28
- forwardRef?: (ref: HTMLElement) => void;
29
- getPos: () => number | undefined;
30
- headPos: number;
31
- isCopyPasteEnabled?: boolean;
32
- mediaOptions: MediaOptions;
33
- mediaProvider?: Promise<MediaProvider>;
34
- node: PMNode;
35
- view: EditorView;
36
- } & WrappedComponentProps>;
37
- };
@@ -1,49 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { IntlShape } from 'react-intl';
3
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
5
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
6
- import type { ContextIdentifierProvider, MediaProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
8
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
9
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
10
- import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
11
- import type { FileIdentifier } from '@atlaskit/media-client';
12
- import type { MediaClientConfig } from '@atlaskit/media-core/auth';
13
- import type { MediaNextEditorPluginType } from '../mediaPluginType';
14
- import type { getPosHandler, getPosHandler as ProsemirrorGetPosHandler } from '../types';
15
- export interface MediaInlineProps {
16
- addPendingTask: (promise: Promise<any>) => void;
17
- allowInlineImages?: boolean;
18
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
19
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
20
- editorViewMode?: boolean;
21
- fallbackMediaNameFetcher?: (id: string) => Promise<string>;
22
- getPos: ProsemirrorGetPosHandler;
23
- handleMediaNodeMount: (node: PMNode, getPos: ProsemirrorGetPosHandler) => void;
24
- handleMediaNodeUnmount: (node: PMNode) => void;
25
- identifier: FileIdentifier;
26
- isSelected: boolean;
27
- mediaClientConfig: MediaClientConfig;
28
- mediaProvider: Promise<MediaProvider>;
29
- node: PMNode;
30
- selectedMediaContainerNode: () => PMNode | undefined;
31
- view: EditorView;
32
- }
33
- export declare const handleNewNode: (props: MediaInlineProps) => void;
34
- export declare const MediaInline: (props: MediaInlineProps) => jsx.JSX.Element;
35
- interface MediaInlineNodeViewProps {
36
- api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
37
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
38
- fallbackMediaNameFetcher?: (id: string) => Promise<string>;
39
- intl?: IntlShape;
40
- providerFactory: ProviderFactory;
41
- }
42
- export declare class MediaInlineNodeView extends SelectionBasedNodeView<MediaInlineNodeViewProps> {
43
- createDomRef(): HTMLSpanElement;
44
- ignoreMutation(): boolean;
45
- viewShouldUpdate(nextNode: PMNode): boolean;
46
- render(props: MediaInlineNodeViewProps): jsx.JSX.Element;
47
- }
48
- export declare const ReactMediaInlineNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, api: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, fallbackMediaNameFetcher?: (id: string) => Promise<string>, intl?: IntlShape) => (node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView;
49
- export {};
@@ -1,52 +0,0 @@
1
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
2
- import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
3
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
4
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
- import { type MediaTraceContext } from '@atlaskit/media-common';
6
- import type { getPosHandler as ProsemirrorGetPosHandler, MediaOptions, MediaPluginState, SupportedMediaAttributes } from '../types';
7
- type RemoteDimensions = {
8
- height: number;
9
- id: string;
10
- width: number;
11
- };
12
- export interface MediaNodeUpdaterProps {
13
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
14
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
15
- isMediaSingle: boolean;
16
- /** Content column width in pixels, used to clamp display width on media replacement. */
17
- lineLength?: number;
18
- mediaOptions?: MediaOptions;
19
- mediaProvider?: Promise<MediaProvider>;
20
- node: PMNode;
21
- view: EditorView;
22
- }
23
- export declare class MediaNodeUpdater {
24
- props: MediaNodeUpdaterProps;
25
- mediaPluginState: MediaPluginState | undefined;
26
- constructor(props: MediaNodeUpdaterProps);
27
- setProps(newComponentProps: Partial<MediaNodeUpdaterProps>): void;
28
- isMediaBlobUrl(): boolean;
29
- updateContextId: () => Promise<void>;
30
- updateNodeContextId: (getPos: ProsemirrorGetPosHandler) => Promise<void>;
31
- private hasFileAttributesDefined;
32
- private getNewFileAttrsForNode;
33
- updateMediaSingleFileAttrs: () => Promise<void>;
34
- updateNodeAttrs: (getPos: ProsemirrorGetPosHandler) => Promise<void>;
35
- getAttrs: () => SupportedMediaAttributes | undefined;
36
- getObjectId: () => Promise<string | null>;
37
- uploadExternalMedia: (getPos: ProsemirrorGetPosHandler) => Promise<void>;
38
- getNodeContextId: () => string | null;
39
- updateDimensions: (dimensions: RemoteDimensions) => void;
40
- getRemoteDimensions(): Promise<false | RemoteDimensions>;
41
- shouldNodeBeDeepCopied: () => Promise<boolean>;
42
- hasDifferentContextId: () => Promise<boolean>;
43
- isNodeFromDifferentCollection: () => Promise<boolean>;
44
- handleExternalMedia(getPos: ProsemirrorGetPosHandler): Promise<void>;
45
- private handleCopyFileSwitcher;
46
- copyNodeFromBlobUrl: (getPos: ProsemirrorGetPosHandler) => Promise<void>;
47
- copyNodeFromPos: (getPos: ProsemirrorGetPosHandler, traceContext?: MediaTraceContext) => Promise<void>;
48
- copyNode: (traceContext?: MediaTraceContext) => Promise<void>;
49
- private copyFile;
50
- }
51
- export declare const createMediaNodeUpdater: (props: MediaNodeUpdaterProps) => MediaNodeUpdater;
52
- export {};
@@ -1,48 +0,0 @@
1
- import React from 'react';
2
- import type { IntlShape } from 'react-intl';
3
- import type { MediaADFAttrs } from '@atlaskit/adf-schema';
4
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
5
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
6
- import type { ContextIdentifierProvider, MediaProvider, ProviderFactory, Providers } from '@atlaskit/editor-common/provider-factory';
7
- import { SelectionBasedNodeView } from '@atlaskit/editor-common/selection-based-node-view';
8
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
9
- import type { SharedInteractionState } from '@atlaskit/editor-plugin-interaction';
10
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
11
- import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
12
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
13
- import type { getPosHandler, getPosHandlerNode, MediaOptions, MediaPluginOptions } from '../../types';
14
- import type { MediaNodeViewProps } from '../types';
15
- interface MediaNodeWithPluginStateComponentProps {
16
- interactionState?: SharedInteractionState['interactionState'];
17
- mediaProvider?: Promise<MediaProvider>;
18
- }
19
- declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
20
- private isSelected;
21
- private isAIGenerating;
22
- private hasBeenResized;
23
- private resizeListenerBinding?;
24
- getMediaSingleNode(getPos: getPosHandlerNode): PMNode | null;
25
- getMaxWidthFromMediaSingleNode(mediaSingleNode: PMNode): number;
26
- hasPxWidthType(mediaSingleNode: PMNode): boolean;
27
- hasResizedListener: () => void;
28
- createDomRef(): HTMLElement;
29
- viewShouldUpdate(nextNode: PMNode, decorations: Decoration[]): boolean;
30
- stopEvent(event: Event): boolean;
31
- getAttrs(): MediaADFAttrs;
32
- isMediaBlobUrl(): boolean;
33
- onExternalImageLoaded: (dimensions: {
34
- height: number;
35
- width: number;
36
- }) => void;
37
- getMaxCardDimensions: () => {
38
- height: string;
39
- width: string;
40
- };
41
- getMediaProviderToUse: (mediaOptions: MediaOptions, mediaProvider?: Promise<MediaProvider>) => Promise<MediaProvider> | undefined;
42
- renderMediaNodeWithState: (contextIdentifierProvider?: Promise<ContextIdentifierProvider>) => ({ mediaProvider, interactionState, }: MediaNodeWithPluginStateComponentProps) => React.JSX.Element;
43
- renderMediaNodeWithProviders: ({ contextIdentifierProvider }: Providers) => React.JSX.Element;
44
- render(): React.JSX.Element;
45
- destroy(): void;
46
- }
47
- export declare const ReactMediaNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaPluginOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, intl?: IntlShape) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
48
- export {};
@@ -1,65 +0,0 @@
1
- import React, { Component } from 'react';
2
- import type { UnbindFn } from 'bind-event-listener';
3
- import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
4
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
5
- import type { ImageLoaderProps } from '@atlaskit/editor-common/utils';
6
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
7
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
- import type { CardDimensions, CardOnClickCallback, NumericalCardDimensions } from '@atlaskit/media-card';
9
- import type { MediaClientConfig } from '@atlaskit/media-core';
10
- import type { MediaNextEditorPluginType } from '../../mediaPluginType';
11
- import type { MediaOptions, getPosHandler as ProsemirrorGetPosHandler, ReactNodeProps } from '../../types';
12
- export declare const MEDIA_HEIGHT = 125;
13
- export declare const FILE_WIDTH = 156;
14
- export interface MediaNodeProps extends ReactNodeProps, ImageLoaderProps {
15
- api?: ExtractInjectionAPI<MediaNextEditorPluginType>;
16
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
17
- getPos: ProsemirrorGetPosHandler;
18
- isAIGenerating?: boolean;
19
- isLoading?: boolean;
20
- isMediaSingle?: boolean;
21
- isViewOnly?: boolean;
22
- maxDimensions: CardDimensions;
23
- mediaOptions?: MediaOptions;
24
- mediaProvider?: Promise<MediaProvider>;
25
- node: PMNode;
26
- onClick?: CardOnClickCallback;
27
- originalDimensions: NumericalCardDimensions;
28
- pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
29
- syncProvider?: MediaProvider;
30
- view: EditorView;
31
- }
32
- interface MediaNodeState {
33
- contextIdentifierProvider?: ContextIdentifierProvider;
34
- viewAndUploadMediaClientConfig?: MediaClientConfig;
35
- viewMediaClientConfig?: MediaClientConfig;
36
- }
37
- export declare class MediaNode extends Component<MediaNodeProps, MediaNodeState> {
38
- private mediaPluginState;
39
- state: MediaNodeState;
40
- videoControlsWrapperRef: React.RefObject<HTMLDivElement>;
41
- unbindKeyDown: UnbindFn | null;
42
- constructor(props: MediaNodeProps);
43
- shouldComponentUpdate(nextProps: MediaNodeProps, nextState: MediaNodeState): boolean;
44
- componentDidMount(): Promise<void>;
45
- componentWillUnmount(): void;
46
- componentDidUpdate(prevProps: Readonly<MediaNodeProps>): void;
47
- bindKeydown(): void;
48
- private setViewMediaClientConfig;
49
- private selectMediaSingleFromCard;
50
- private selectMediaSingle;
51
- private getMediaSettings;
52
- private onPreviewRender;
53
- private onError;
54
- /**
55
- * This function checks if the media node is nested under a certain nodes, and if so,
56
- * returns the name of the parent node type. This is used for providing more context in media render errors.
57
- * @returns
58
- */
59
- private getNestedUnder;
60
- render(): React.JSX.Element;
61
- private onFullscreenChange;
62
- private handleNewNode;
63
- }
64
- declare const _default_1: React.ComponentClass<MediaNodeProps & ImageLoaderProps>;
65
- export default _default_1;
@@ -1,38 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { IntlShape } from 'react-intl';
3
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
5
- import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
6
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import ReactNodeView from '@atlaskit/editor-common/react-node-view';
8
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
9
- import { SelectedState } from '@atlaskit/editor-common/utils';
10
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
11
- import type { Decoration, DecorationSource, EditorView } from '@atlaskit/editor-prosemirror/view';
12
- import type { MediaNextEditorPluginType } from '../mediaPluginType';
13
- import type { ForwardRef, getPosHandler, MediaOptions } from '../types';
14
- import type { MediaSingleNodeViewProps } from './types';
15
- declare class MediaSingleNodeView extends ReactNodeView<MediaSingleNodeViewProps> {
16
- lastOffsetLeft: number;
17
- forceViewUpdate: boolean;
18
- selectionType: number | null;
19
- unsubscribeToViewModeChange: (() => void) | undefined;
20
- hasResized: boolean;
21
- createDomRef(): HTMLElement;
22
- getContentDOM(): {
23
- dom: HTMLDivElement;
24
- };
25
- viewShouldUpdate(nextNode: PMNode): boolean;
26
- subscribeToViewModeChange(domRef: HTMLElement): (() => void) | undefined;
27
- updateDomRefContentEditable(domRef: HTMLElement, editorViewMode?: 'edit' | 'view'): void;
28
- checkAndUpdateSelectionType: () => SelectedState | null;
29
- isNodeSelected: () => boolean;
30
- getNodeMediaId(node: PMNode): string | undefined;
31
- stopEvent(event: Event): boolean;
32
- update(node: PMNode, decorations: readonly Decoration[], _innerDecorations?: DecorationSource, isValidUpdate?: (currentNode: PMNode, newNode: PMNode) => boolean): boolean;
33
- render(props: MediaSingleNodeViewProps, forwardRef?: ForwardRef): jsx.JSX.Element;
34
- ignoreMutation(): boolean;
35
- destroy(): void;
36
- }
37
- export declare const ReactMediaSingleNode: (portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, mediaOptions?: MediaOptions, intl?: IntlShape) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaSingleNodeView;
38
- export {};
@@ -1,33 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
- import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
- import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
5
- import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
7
- import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
- import type { MediaNextEditorPluginType } from '../mediaPluginType';
9
- import type { ForwardRef, MediaOptions } from '../types';
10
- export type MediaSingleNodeNextProps = {
11
- addPendingTask?: (promise: Promise<any>) => void;
12
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
13
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
14
- editorAppearance?: EditorAppearance;
15
- editorDisabled?: boolean;
16
- editorViewMode?: boolean;
17
- eventDispatcher: EventDispatcher;
18
- forwardRef: ForwardRef;
19
- fullWidthMode?: boolean;
20
- getPos: () => number | undefined;
21
- isCopyPasteEnabled?: boolean;
22
- isDrafting?: boolean;
23
- lineLength: number;
24
- mediaOptions: MediaOptions;
25
- mediaProvider?: Promise<MediaProvider>;
26
- node: PMNode;
27
- pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined;
28
- selected: () => boolean;
29
- targetNodeId?: string;
30
- view: EditorView;
31
- width: number;
32
- };
33
- export declare const MediaSingleNodeNext: (mediaSingleNodeNextProps: MediaSingleNodeNextProps) => jsx.JSX.Element;
@@ -1,11 +0,0 @@
1
- /**
2
- * Computes the new mediaSingle display width that preserves the original display height
3
- * when a media node is replaced with a file of a different aspect ratio, clamped to valid bounds.
4
- *
5
- * @param targetDisplayHeight - The display height to preserve (from the old image)
6
- * @param newIntrinsicWidth - The new file's intrinsic pixel width
7
- * @param newIntrinsicHeight - The new file's intrinsic pixel height
8
- * @param layout - The mediaSingle layout (affects max width)
9
- * @param lineLength - The editor content column width in pixels
10
- */
11
- export declare const computeReplacementDisplayWidth: (targetDisplayHeight: number, newIntrinsicWidth: number, newIntrinsicHeight: number, layout: string, lineLength: number) => number;