@atlaskit/editor-plugin-media 1.20.4 → 1.20.5

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 (49) hide show
  1. package/.eslintrc.js +13 -13
  2. package/CHANGELOG.md +588 -586
  3. package/LICENSE.md +6 -8
  4. package/dist/cjs/nodeviews/mediaSingle.js +3 -1
  5. package/dist/cjs/nodeviews/styles.js +4 -1
  6. package/dist/cjs/toolbar/linking-toolbar-appearance.js +3 -1
  7. package/dist/cjs/ui/CaptionPlaceholder/index.js +1 -1
  8. package/dist/cjs/ui/ImageBorder/index.js +12 -4
  9. package/dist/cjs/ui/ImageBorder/styles.js +7 -7
  10. package/dist/cjs/ui/MediaLinkingToolbar.js +56 -53
  11. package/dist/cjs/ui/PixelEntry/styles.js +1 -1
  12. package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
  13. package/dist/cjs/ui/ResizableMediaSingle/styled.js +1 -1
  14. package/dist/es2019/nodeviews/mediaSingle.js +3 -1
  15. package/dist/es2019/nodeviews/styles.js +4 -1
  16. package/dist/es2019/toolbar/linking-toolbar-appearance.js +3 -1
  17. package/dist/es2019/ui/CaptionPlaceholder/index.js +5 -5
  18. package/dist/es2019/ui/ImageBorder/index.js +12 -4
  19. package/dist/es2019/ui/ImageBorder/styles.js +82 -82
  20. package/dist/es2019/ui/MediaLinkingToolbar.js +55 -52
  21. package/dist/es2019/ui/PixelEntry/styles.js +11 -11
  22. package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
  23. package/dist/es2019/ui/ResizableMediaSingle/styled.js +5 -5
  24. package/dist/esm/nodeviews/mediaSingle.js +3 -1
  25. package/dist/esm/nodeviews/styles.js +4 -1
  26. package/dist/esm/toolbar/linking-toolbar-appearance.js +3 -1
  27. package/dist/esm/ui/CaptionPlaceholder/index.js +1 -1
  28. package/dist/esm/ui/ImageBorder/index.js +12 -4
  29. package/dist/esm/ui/ImageBorder/styles.js +7 -7
  30. package/dist/esm/ui/MediaLinkingToolbar.js +56 -53
  31. package/dist/esm/ui/PixelEntry/styles.js +1 -1
  32. package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
  33. package/dist/esm/ui/ResizableMediaSingle/styled.js +1 -1
  34. package/dist/types/nodeviews/mediaNodeView/index.d.ts +1 -1
  35. package/dist/types/pm-plugins/alt-text/index.d.ts +1 -1
  36. package/dist/types/toolbar/filePreviewItem.d.ts +1 -1
  37. package/dist/types/toolbar/layout-group.d.ts +1 -1
  38. package/dist/types/ui/MediaPicker/BrowserWrapper.d.ts +1 -1
  39. package/dist/types/ui/MediaPicker/ClipboardWrapper.d.ts +1 -1
  40. package/dist/types/ui/PixelEntry/index.d.ts +1 -1
  41. package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +1 -1
  42. package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +1 -1
  43. package/dist/types-ts4.5/toolbar/filePreviewItem.d.ts +1 -1
  44. package/dist/types-ts4.5/toolbar/layout-group.d.ts +1 -1
  45. package/dist/types-ts4.5/ui/MediaPicker/BrowserWrapper.d.ts +1 -1
  46. package/dist/types-ts4.5/ui/MediaPicker/ClipboardWrapper.d.ts +1 -1
  47. package/dist/types-ts4.5/ui/PixelEntry/index.d.ts +1 -1
  48. package/package.json +8 -10
  49. package/report.api.md +302 -316
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/editor-plugin-media"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -52,16 +53,16 @@ import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
52
53
 
53
54
  // @public (undocumented)
54
55
  interface CustomMediaPicker {
55
- // (undocumented)
56
- destroy(): void;
57
- // (undocumented)
58
- emit(event: string, data: any): void;
59
- // (undocumented)
60
- on(event: string, cb: Listener): void;
61
- // (undocumented)
62
- removeAllListeners(event: any): void;
63
- // (undocumented)
64
- setUploadParams(uploadParams: UploadParams): void;
56
+ // (undocumented)
57
+ destroy(): void;
58
+ // (undocumented)
59
+ emit(event: string, data: any): void;
60
+ // (undocumented)
61
+ on(event: string, cb: Listener): void;
62
+ // (undocumented)
63
+ removeAllListeners(event: any): void;
64
+ // (undocumented)
65
+ setUploadParams(uploadParams: UploadParams): void;
65
66
  }
66
67
 
67
68
  // @public (undocumented)
@@ -72,9 +73,9 @@ type getPosHandlerNode = () => number | undefined;
72
73
 
73
74
  // @public (undocumented)
74
75
  type InsertMediaAsMediaSingle = (
75
- view: EditorView,
76
- node: Node_2,
77
- inputMethod: InputMethodInsertMedia,
76
+ view: EditorView,
77
+ node: Node_2,
78
+ inputMethod: InputMethodInsertMedia,
78
79
  ) => boolean;
79
80
 
80
81
  // @public (undocumented)
@@ -82,96 +83,96 @@ type Listener = (data: any) => void;
82
83
 
83
84
  // @public (undocumented)
84
85
  interface MediaNodeWithPosHandler {
85
- // (undocumented)
86
- getPos: ProsemirrorGetPosHandler;
87
- // (undocumented)
88
- node: Node_2;
86
+ // (undocumented)
87
+ getPos: ProsemirrorGetPosHandler;
88
+ // (undocumented)
89
+ node: Node_2;
89
90
  }
90
91
 
91
92
  // @public (undocumented)
92
93
  interface MediaOptions {
93
- // (undocumented)
94
- alignLeftOnInsert?: boolean;
95
- // (undocumented)
96
- allowAdvancedToolBarOptions?: boolean;
97
- // (undocumented)
98
- allowAltTextOnImages?: boolean;
99
- // (undocumented)
100
- allowBreakoutSnapPoints?: boolean;
101
- // (undocumented)
102
- allowCaptions?: boolean;
103
- // (undocumented)
104
- allowDropzoneDropLine?: boolean;
105
- // (undocumented)
106
- allowLazyLoading?: boolean;
107
- // (undocumented)
108
- allowLinking?: boolean;
109
- // (undocumented)
110
- allowMarkingUploadsAsIncomplete?: boolean;
111
- // (undocumented)
112
- allowMediaGroup?: boolean;
113
- // (undocumented)
114
- allowMediaSingle?: MediaSingleOptions | boolean;
115
- // (undocumented)
116
- allowMediaSingleEditable?: boolean;
117
- // (undocumented)
118
- allowRemoteDimensionsFetch?: boolean;
119
- // (undocumented)
120
- allowResizing?: boolean;
121
- // (undocumented)
122
- allowResizingInTables?: boolean;
123
- // (undocumented)
124
- allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
125
- // (undocumented)
126
- altTextValidator?: (value: string) => string[];
127
- // (undocumented)
128
- customDropzoneContainer?: HTMLElement;
129
- // (undocumented)
130
- customMediaPicker?: CustomMediaPicker;
131
- // (undocumented)
132
- editorSelectionAPI?: EditorSelectionAPI;
133
- // (undocumented)
134
- enableDownloadButton?: boolean;
135
- // (undocumented)
136
- featureFlags?: MediaFeatureFlags;
137
- // (undocumented)
138
- fullWidthEnabled?: boolean;
139
- // (undocumented)
140
- getEditorFeatureFlags?: GetEditorFeatureFlags;
141
- // (undocumented)
142
- isCopyPasteEnabled?: boolean;
143
- // (undocumented)
144
- provider?: Providers['mediaProvider'];
145
- // (undocumented)
146
- uploadErrorHandler?: (state: MediaState) => void;
147
- // (undocumented)
148
- useForgePlugins?: boolean;
149
- // (undocumented)
150
- waitForMediaUpload?: boolean;
94
+ // (undocumented)
95
+ alignLeftOnInsert?: boolean;
96
+ // (undocumented)
97
+ allowAdvancedToolBarOptions?: boolean;
98
+ // (undocumented)
99
+ allowAltTextOnImages?: boolean;
100
+ // (undocumented)
101
+ allowBreakoutSnapPoints?: boolean;
102
+ // (undocumented)
103
+ allowCaptions?: boolean;
104
+ // (undocumented)
105
+ allowDropzoneDropLine?: boolean;
106
+ // (undocumented)
107
+ allowLazyLoading?: boolean;
108
+ // (undocumented)
109
+ allowLinking?: boolean;
110
+ // (undocumented)
111
+ allowMarkingUploadsAsIncomplete?: boolean;
112
+ // (undocumented)
113
+ allowMediaGroup?: boolean;
114
+ // (undocumented)
115
+ allowMediaSingle?: MediaSingleOptions | boolean;
116
+ // (undocumented)
117
+ allowMediaSingleEditable?: boolean;
118
+ // (undocumented)
119
+ allowRemoteDimensionsFetch?: boolean;
120
+ // (undocumented)
121
+ allowResizing?: boolean;
122
+ // (undocumented)
123
+ allowResizingInTables?: boolean;
124
+ // (undocumented)
125
+ allowTemplatePlaceholders?: PlaceholderTextOptions | boolean;
126
+ // (undocumented)
127
+ altTextValidator?: (value: string) => string[];
128
+ // (undocumented)
129
+ customDropzoneContainer?: HTMLElement;
130
+ // (undocumented)
131
+ customMediaPicker?: CustomMediaPicker;
132
+ // (undocumented)
133
+ editorSelectionAPI?: EditorSelectionAPI;
134
+ // (undocumented)
135
+ enableDownloadButton?: boolean;
136
+ // (undocumented)
137
+ featureFlags?: MediaFeatureFlags;
138
+ // (undocumented)
139
+ fullWidthEnabled?: boolean;
140
+ // (undocumented)
141
+ getEditorFeatureFlags?: GetEditorFeatureFlags;
142
+ // (undocumented)
143
+ isCopyPasteEnabled?: boolean;
144
+ // (undocumented)
145
+ provider?: Providers['mediaProvider'];
146
+ // (undocumented)
147
+ uploadErrorHandler?: (state: MediaState) => void;
148
+ // (undocumented)
149
+ useForgePlugins?: boolean;
150
+ // (undocumented)
151
+ waitForMediaUpload?: boolean;
151
152
  }
152
153
 
153
154
  // @public (undocumented)
154
155
  export type MediaPlugin = NextEditorPlugin<
155
- 'media',
156
- {
157
- pluginConfiguration: MediaOptions | undefined;
158
- dependencies: [
159
- OptionalPlugin<FeatureFlagsPlugin>,
160
- OptionalPlugin<AnalyticsPlugin>,
161
- GuidelinePlugin,
162
- GridPlugin,
163
- WidthPlugin,
164
- DecorationsPlugin,
165
- FloatingToolbarPlugin,
166
- EditorDisabledPlugin,
167
- FocusPlugin,
168
- SelectionPlugin,
169
- ];
170
- sharedState: MediaPluginState | null;
171
- actions: {
172
- insertMediaAsMediaSingle: InsertMediaAsMediaSingle;
173
- };
174
- }
156
+ 'media',
157
+ {
158
+ pluginConfiguration: MediaOptions | undefined;
159
+ dependencies: [
160
+ OptionalPlugin<FeatureFlagsPlugin>,
161
+ OptionalPlugin<AnalyticsPlugin>,
162
+ GuidelinePlugin,
163
+ GridPlugin,
164
+ WidthPlugin,
165
+ DecorationsPlugin,
166
+ FloatingToolbarPlugin,
167
+ EditorDisabledPlugin,
168
+ FocusPlugin,
169
+ SelectionPlugin,
170
+ ];
171
+ sharedState: MediaPluginState | null;
172
+ actions: {
173
+ insertMediaAsMediaSingle: InsertMediaAsMediaSingle;
174
+ };
175
+ }
175
176
  >;
176
177
 
177
178
  // @public (undocumented)
@@ -179,182 +180,167 @@ export const mediaPlugin: MediaPlugin;
179
180
 
180
181
  // @public (undocumented)
181
182
  type MediaPluginOptions = {
182
- providerFactory: ProviderFactory;
183
- nodeViews: {
184
- [name: string]: (
185
- node: Node_2,
186
- view: EditorView,
187
- getPos: getPosHandler,
188
- ) => NodeView;
189
- };
190
- errorReporter?: ErrorReporter;
191
- uploadErrorHandler?: (state: MediaState) => void;
192
- waitForMediaUpload?: boolean;
193
- customDropzoneContainer?: HTMLElement;
194
- customMediaPicker?: CustomMediaPicker;
195
- allowResizing: boolean;
183
+ providerFactory: ProviderFactory;
184
+ nodeViews: {
185
+ [name: string]: (node: Node_2, view: EditorView, getPos: getPosHandler) => NodeView;
186
+ };
187
+ errorReporter?: ErrorReporter;
188
+ uploadErrorHandler?: (state: MediaState) => void;
189
+ waitForMediaUpload?: boolean;
190
+ customDropzoneContainer?: HTMLElement;
191
+ customMediaPicker?: CustomMediaPicker;
192
+ allowResizing: boolean;
196
193
  };
197
194
 
198
195
  // @public (undocumented)
199
196
  interface MediaPluginState {
200
- // (undocumented)
201
- addPendingTask: (promise: Promise<any>) => void;
202
- // (undocumented)
203
- allowsUploads: boolean;
204
- // (undocumented)
205
- allUploadsFinished: boolean;
206
- // (undocumented)
207
- clone(): MediaPluginState;
208
- // (undocumented)
209
- currentMaxWidth?: number;
210
- // (undocumented)
211
- destroy(): void;
212
- // (undocumented)
213
- dispatch?: Dispatch;
214
- // (undocumented)
215
- editingMediaSinglePos?: number;
216
- // (undocumented)
217
- element?: HTMLElement;
218
- // (undocumented)
219
- findMediaNode: (id: string) => MediaNodeWithPosHandler | null;
220
- // (undocumented)
221
- getMediaOptions: () => MediaPluginOptions;
222
- // (undocumented)
223
- handleDrag: (dragState: 'enter' | 'leave') => void;
224
- // (undocumented)
225
- handleMediaGroupUpdate: (oldNodes: Node_2[], newNodes: Node_2[]) => void;
226
- // (undocumented)
227
- handleMediaNodeMount: (
228
- node: Node_2,
229
- getPos: ProsemirrorGetPosHandler,
230
- ) => void;
231
- // (undocumented)
232
- handleMediaNodeRemoval: (
233
- node: Node_2 | undefined,
234
- getPos: ProsemirrorGetPosHandler,
235
- ) => void;
236
- // (undocumented)
237
- handleMediaNodeUnmount: (oldNode: Node_2) => void;
238
- // (undocumented)
239
- ignoreLinks: boolean;
240
- // (undocumented)
241
- insertFile: (
242
- mediaState: MediaState,
243
- onMediaStateChanged: MediaStateEventSubscriber,
244
- pickerType?: string,
245
- ) => void;
246
- // (undocumented)
247
- isFullscreen: boolean;
248
- // (undocumented)
249
- isResizing: boolean;
250
- // (undocumented)
251
- layout: RichMediaLayout;
252
- // (undocumented)
253
- mediaClientConfig?: MediaClientConfig;
254
- // (undocumented)
255
- mediaNodes: MediaNodeWithPosHandler[];
256
- // (undocumented)
257
- mediaOptions?: MediaOptions;
258
- // (undocumented)
259
- mediaProvider?: MediaProvider_2;
260
- // (undocumented)
261
- onContextIdentifierProvider: (
262
- _name: string,
263
- provider?: Promise<ContextIdentifierProvider>,
264
- ) => Promise<void>;
265
- // (undocumented)
266
- onPopupPickerClose: () => void;
267
- // (undocumented)
268
- onPopupToggle: (onPopupToogleCallback: (isOpen: boolean) => void) => void;
269
- // (undocumented)
270
- options: MediaPluginOptions;
271
- // (undocumented)
272
- pickerPromises: Array<Promise<PickerFacade>>;
273
- // (undocumented)
274
- pickers: PickerFacade[];
275
- // (undocumented)
276
- removeSelectedMediaContainer: () => boolean;
277
- // (undocumented)
278
- resizingWidth: number;
279
- // (undocumented)
280
- selectedMediaContainerNode: () => Node_2 | undefined;
281
- // (undocumented)
282
- setBrowseFn: (browseFn: () => void) => void;
283
- // (undocumented)
284
- setIsResizing(isResizing: boolean): void;
285
- // (undocumented)
286
- setMediaProvider: (mediaProvider?: Promise<MediaProvider_2>) => Promise<void>;
287
- // (undocumented)
288
- setResizingWidth(width: number): void;
289
- // (undocumented)
290
- setView(view: EditorView): void;
291
- // (undocumented)
292
- showDropzone: boolean;
293
- // (undocumented)
294
- showEditingDialog?: boolean;
295
- // (undocumented)
296
- showMediaPicker: () => void;
297
- // (undocumented)
298
- splitMediaGroup: () => boolean;
299
- // (undocumented)
300
- updateAndDispatch(
301
- props: Partial<
302
- Pick<this, 'allUploadsFinished' | 'allowsUploads' | 'isFullscreen'>
303
- >,
304
- ): void;
305
- // (undocumented)
306
- updateElement(): void;
307
- // (undocumented)
308
- updateMediaSingleNodeAttrs: (
309
- id: string,
310
- attrs: object,
311
- ) => boolean | undefined;
312
- // (undocumented)
313
- uploadMediaClientConfig?: MediaClientConfig;
314
- // (undocumented)
315
- waitForMediaUpload: boolean;
316
- // (undocumented)
317
- waitForPendingTasks: (
318
- timeout?: number,
319
- lastTask?: Promise<MediaState | null>,
320
- ) => Promise<MediaState | null>;
197
+ // (undocumented)
198
+ addPendingTask: (promise: Promise<any>) => void;
199
+ // (undocumented)
200
+ allowsUploads: boolean;
201
+ // (undocumented)
202
+ allUploadsFinished: boolean;
203
+ // (undocumented)
204
+ clone(): MediaPluginState;
205
+ // (undocumented)
206
+ currentMaxWidth?: number;
207
+ // (undocumented)
208
+ destroy(): void;
209
+ // (undocumented)
210
+ dispatch?: Dispatch;
211
+ // (undocumented)
212
+ editingMediaSinglePos?: number;
213
+ // (undocumented)
214
+ element?: HTMLElement;
215
+ // (undocumented)
216
+ findMediaNode: (id: string) => MediaNodeWithPosHandler | null;
217
+ // (undocumented)
218
+ getMediaOptions: () => MediaPluginOptions;
219
+ // (undocumented)
220
+ handleDrag: (dragState: 'enter' | 'leave') => void;
221
+ // (undocumented)
222
+ handleMediaGroupUpdate: (oldNodes: Node_2[], newNodes: Node_2[]) => void;
223
+ // (undocumented)
224
+ handleMediaNodeMount: (node: Node_2, getPos: ProsemirrorGetPosHandler) => void;
225
+ // (undocumented)
226
+ handleMediaNodeRemoval: (node: Node_2 | undefined, getPos: ProsemirrorGetPosHandler) => void;
227
+ // (undocumented)
228
+ handleMediaNodeUnmount: (oldNode: Node_2) => void;
229
+ // (undocumented)
230
+ ignoreLinks: boolean;
231
+ // (undocumented)
232
+ insertFile: (
233
+ mediaState: MediaState,
234
+ onMediaStateChanged: MediaStateEventSubscriber,
235
+ pickerType?: string,
236
+ ) => void;
237
+ // (undocumented)
238
+ isFullscreen: boolean;
239
+ // (undocumented)
240
+ isResizing: boolean;
241
+ // (undocumented)
242
+ layout: RichMediaLayout;
243
+ // (undocumented)
244
+ mediaClientConfig?: MediaClientConfig;
245
+ // (undocumented)
246
+ mediaNodes: MediaNodeWithPosHandler[];
247
+ // (undocumented)
248
+ mediaOptions?: MediaOptions;
249
+ // (undocumented)
250
+ mediaProvider?: MediaProvider_2;
251
+ // (undocumented)
252
+ onContextIdentifierProvider: (
253
+ _name: string,
254
+ provider?: Promise<ContextIdentifierProvider>,
255
+ ) => Promise<void>;
256
+ // (undocumented)
257
+ onPopupPickerClose: () => void;
258
+ // (undocumented)
259
+ onPopupToggle: (onPopupToogleCallback: (isOpen: boolean) => void) => void;
260
+ // (undocumented)
261
+ options: MediaPluginOptions;
262
+ // (undocumented)
263
+ pickerPromises: Array<Promise<PickerFacade>>;
264
+ // (undocumented)
265
+ pickers: PickerFacade[];
266
+ // (undocumented)
267
+ removeSelectedMediaContainer: () => boolean;
268
+ // (undocumented)
269
+ resizingWidth: number;
270
+ // (undocumented)
271
+ selectedMediaContainerNode: () => Node_2 | undefined;
272
+ // (undocumented)
273
+ setBrowseFn: (browseFn: () => void) => void;
274
+ // (undocumented)
275
+ setIsResizing(isResizing: boolean): void;
276
+ // (undocumented)
277
+ setMediaProvider: (mediaProvider?: Promise<MediaProvider_2>) => Promise<void>;
278
+ // (undocumented)
279
+ setResizingWidth(width: number): void;
280
+ // (undocumented)
281
+ setView(view: EditorView): void;
282
+ // (undocumented)
283
+ showDropzone: boolean;
284
+ // (undocumented)
285
+ showEditingDialog?: boolean;
286
+ // (undocumented)
287
+ showMediaPicker: () => void;
288
+ // (undocumented)
289
+ splitMediaGroup: () => boolean;
290
+ // (undocumented)
291
+ updateAndDispatch(
292
+ props: Partial<Pick<this, 'allUploadsFinished' | 'allowsUploads' | 'isFullscreen'>>,
293
+ ): void;
294
+ // (undocumented)
295
+ updateElement(): void;
296
+ // (undocumented)
297
+ updateMediaSingleNodeAttrs: (id: string, attrs: object) => boolean | undefined;
298
+ // (undocumented)
299
+ uploadMediaClientConfig?: MediaClientConfig;
300
+ // (undocumented)
301
+ waitForMediaUpload: boolean;
302
+ // (undocumented)
303
+ waitForPendingTasks: (
304
+ timeout?: number,
305
+ lastTask?: Promise<MediaState | null>,
306
+ ) => Promise<MediaState | null>;
321
307
  }
322
308
 
323
309
  // @public (undocumented)
324
310
  interface MediaSingleOptions {
325
- // (undocumented)
326
- disableLayout?: boolean;
311
+ // (undocumented)
312
+ disableLayout?: boolean;
327
313
  }
328
314
 
329
315
  // @public (undocumented)
330
316
  interface MediaState {
331
- // (undocumented)
332
- collection?: string;
333
- // (undocumented)
334
- contextId?: string;
335
- // (undocumented)
336
- dimensions?: {
337
- width: number | undefined;
338
- height: number | undefined;
339
- };
340
- // (undocumented)
341
- error?: {
342
- name: string;
343
- description: string;
344
- };
345
- // (undocumented)
346
- fileMimeType?: string;
347
- // (undocumented)
348
- fileName?: string;
349
- // (undocumented)
350
- fileSize?: number;
351
- // (undocumented)
352
- id: string;
353
- publicId?: string;
354
- // (undocumented)
355
- scaleFactor?: number;
356
- // (undocumented)
357
- status?: MediaStateStatus;
317
+ // (undocumented)
318
+ collection?: string;
319
+ // (undocumented)
320
+ contextId?: string;
321
+ // (undocumented)
322
+ dimensions?: {
323
+ width: number | undefined;
324
+ height: number | undefined;
325
+ };
326
+ // (undocumented)
327
+ error?: {
328
+ name: string;
329
+ description: string;
330
+ };
331
+ // (undocumented)
332
+ fileMimeType?: string;
333
+ // (undocumented)
334
+ fileName?: string;
335
+ // (undocumented)
336
+ fileSize?: number;
337
+ // (undocumented)
338
+ id: string;
339
+ publicId?: string;
340
+ // (undocumented)
341
+ scaleFactor?: number;
342
+ // (undocumented)
343
+ status?: MediaStateStatus;
358
344
  }
359
345
 
360
346
  // @public (undocumented)
@@ -368,71 +354,71 @@ type MediaStateEventSubscriber = (listener: MediaStateEventListener) => void;
368
354
 
369
355
  // @public (undocumented)
370
356
  type MediaStateStatus =
371
- | 'cancelled'
372
- | 'error'
373
- | 'mobile-upload-end'
374
- | 'preview'
375
- | 'ready'
376
- | 'unknown';
357
+ | 'cancelled'
358
+ | 'error'
359
+ | 'mobile-upload-end'
360
+ | 'preview'
361
+ | 'ready'
362
+ | 'unknown';
377
363
 
378
364
  // @public (undocumented)
379
365
  type MobileUploadEndEventPayload = {
380
- readonly file: MediaFile & {
381
- readonly collectionName?: string;
382
- readonly publicId?: string;
383
- };
366
+ readonly file: MediaFile & {
367
+ readonly collectionName?: string;
368
+ readonly publicId?: string;
369
+ };
384
370
  };
385
371
 
386
372
  // @public (undocumented)
387
373
  type NewMediaEvent = (
388
- state: MediaState,
389
- onStateChanged: MediaStateEventSubscriber,
390
- pickerType?: string,
374
+ state: MediaState,
375
+ onStateChanged: MediaStateEventSubscriber,
376
+ pickerType?: string,
391
377
  ) => void;
392
378
 
393
379
  // @public (undocumented)
394
380
  class PickerFacade {
395
- constructor(
396
- pickerType: PickerType,
397
- config: PickerFacadeConfig,
398
- pickerConfig?: CustomMediaPicker | null | undefined,
399
- analyticsName?: string,
400
- );
401
- // (undocumented)
402
- readonly config: PickerFacadeConfig;
403
- // (undocumented)
404
- destroy(): void;
405
- // (undocumented)
406
- erroredFiles: Set<string>;
407
- // (undocumented)
408
- handleMobileUploadEnd: (event: MobileUploadEndEventPayload) => void;
409
- // (undocumented)
410
- handleReady: (event: UploadEndEventPayload) => void;
411
- // (undocumented)
412
- handleUploadError: ({ error, fileId }: UploadErrorEventPayload) => void;
413
- // (undocumented)
414
- handleUploadPreviewUpdate: (event: UploadPreviewUpdateEventPayload) => void;
415
- // (undocumented)
416
- init(): Promise<PickerFacade>;
417
- // (undocumented)
418
- get mediaPicker(): CustomMediaPicker | undefined;
419
- // (undocumented)
420
- onDrag(cb: (state: 'enter' | 'leave') => any): void;
421
- // (undocumented)
422
- onNewMedia(cb: NewMediaEvent): void;
423
- // (undocumented)
424
- readonly pickerConfig?: CustomMediaPicker | null | undefined;
425
- // (undocumented)
426
- setUploadParams(params: UploadParams): void;
427
- // (undocumented)
428
- get type(): PickerType;
381
+ constructor(
382
+ pickerType: PickerType,
383
+ config: PickerFacadeConfig,
384
+ pickerConfig?: CustomMediaPicker | null | undefined,
385
+ analyticsName?: string,
386
+ );
387
+ // (undocumented)
388
+ readonly config: PickerFacadeConfig;
389
+ // (undocumented)
390
+ destroy(): void;
391
+ // (undocumented)
392
+ erroredFiles: Set<string>;
393
+ // (undocumented)
394
+ handleMobileUploadEnd: (event: MobileUploadEndEventPayload) => void;
395
+ // (undocumented)
396
+ handleReady: (event: UploadEndEventPayload) => void;
397
+ // (undocumented)
398
+ handleUploadError: ({ error, fileId }: UploadErrorEventPayload) => void;
399
+ // (undocumented)
400
+ handleUploadPreviewUpdate: (event: UploadPreviewUpdateEventPayload) => void;
401
+ // (undocumented)
402
+ init(): Promise<PickerFacade>;
403
+ // (undocumented)
404
+ get mediaPicker(): CustomMediaPicker | undefined;
405
+ // (undocumented)
406
+ onDrag(cb: (state: 'enter' | 'leave') => any): void;
407
+ // (undocumented)
408
+ onNewMedia(cb: NewMediaEvent): void;
409
+ // (undocumented)
410
+ readonly pickerConfig?: CustomMediaPicker | null | undefined;
411
+ // (undocumented)
412
+ setUploadParams(params: UploadParams): void;
413
+ // (undocumented)
414
+ get type(): PickerType;
429
415
  }
430
416
 
431
417
  // @public (undocumented)
432
418
  type PickerFacadeConfig = {
433
- mediaClientConfig: MediaClientConfig;
434
- errorReporter: ErrorReportingHandler;
435
- featureFlags?: MediaFeatureFlags_2;
419
+ mediaClientConfig: MediaClientConfig;
420
+ errorReporter: ErrorReportingHandler;
421
+ featureFlags?: MediaFeatureFlags_2;
436
422
  };
437
423
 
438
424
  // @public (undocumented)
@@ -440,8 +426,8 @@ type PickerType = 'clipboard' | 'customMediaPicker' | 'dropzone';
440
426
 
441
427
  // @public (undocumented)
442
428
  interface PlaceholderTextOptions {
443
- // (undocumented)
444
- allowInserting?: boolean;
429
+ // (undocumented)
430
+ allowInserting?: boolean;
445
431
  }
446
432
 
447
433
  // @public (undocumented)
@@ -458,10 +444,10 @@ type ProsemirrorGetPosHandler = getPosHandlerNode;
458
444
 
459
445
  ```json
460
446
  {
461
- "@atlaskit/media-core": "^34.1.2",
462
- "react": "^16.8.0",
463
- "react-dom": "^16.8.0",
464
- "react-intl-next": "npm:react-intl@^5.18.1"
447
+ "@atlaskit/media-core": "^34.1.2",
448
+ "react": "^16.8.0",
449
+ "react-dom": "^16.8.0",
450
+ "react-intl-next": "npm:react-intl@^5.18.1"
465
451
  }
466
452
  ```
467
453