@atlaskit/media-common 11.2.1 → 11.3.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.
package/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/media-common"
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
@@ -25,11 +26,8 @@ export const ANALYTICS_MEDIA_CHANNEL = 'media';
25
26
  type BaseAttributes = {};
26
27
 
27
28
  // @public (undocumented)
28
- type BaseEventPayload<Attributes extends BaseAttributes> = Omit<
29
- GasCorePayload,
30
- 'attributes'
31
- > & {
32
- attributes: Attributes;
29
+ type BaseEventPayload<Attributes extends BaseAttributes> = Omit<GasCorePayload, 'attributes'> & {
30
+ attributes: Attributes;
33
31
  };
34
32
 
35
33
  // @public (undocumented)
@@ -39,10 +37,7 @@ export type ContextPublicAttributes = PackageAttributes;
39
37
  export type ContextStaticProps = WithMediaFeatureFlags;
40
38
 
41
39
  // @public (undocumented)
42
- export const debounce: (
43
- func: Function,
44
- wait: number,
45
- ) => (...args: any[]) => void;
40
+ export const debounce: (func: Function, wait: number) => (...args: any[]) => void;
46
41
 
47
42
  // @public
48
43
  export const defaultMediaFeatureFlags: Required<MediaFeatureFlags>;
@@ -52,39 +47,34 @@ export const downloadUrl: (url: string, options?: DownloadUrlOptions) => void;
52
47
 
53
48
  // @public (undocumented)
54
49
  interface DownloadUrlOptions {
55
- // (undocumented)
56
- name?: string;
50
+ // (undocumented)
51
+ name?: string;
57
52
  }
58
53
 
59
54
  // @public (undocumented)
60
55
  export type FailureAttributes = {
61
- status: 'fail';
62
- failReason: string;
63
- error?: string;
64
- errorDetail?: string;
56
+ status: 'fail';
57
+ failReason: string;
58
+ error?: string;
59
+ errorDetail?: string;
65
60
  };
66
61
 
67
62
  // @public (undocumented)
68
63
  export type FileAttributes = {
69
- fileId: string;
70
- fileSize?: number;
71
- fileMediatype?: MediaType;
72
- fileMimetype?: string;
73
- fileSource?: string;
74
- fileStatus?: FileStatus;
64
+ fileId: string;
65
+ fileSize?: number;
66
+ fileMediatype?: MediaType;
67
+ fileMimetype?: string;
68
+ fileSource?: string;
69
+ fileStatus?: FileStatus;
75
70
  };
76
71
 
77
72
  // @public (undocumented)
78
- export type FileStatus =
79
- | 'error'
80
- | 'failed-processing'
81
- | 'processed'
82
- | 'processing'
83
- | 'uploading';
73
+ export type FileStatus = 'error' | 'failed-processing' | 'processed' | 'processing' | 'uploading';
84
74
 
85
75
  // @public (undocumented)
86
76
  export const filterFeatureFlagNames: (
87
- flags: RequiredMediaFeatureFlags,
77
+ flags: RequiredMediaFeatureFlags,
88
78
  ) => Array<keyof MediaFeatureFlags>;
89
79
 
90
80
  // @public
@@ -92,8 +82,8 @@ export const getFeatureFlagKeysAllProducts: () => Array<string>;
92
82
 
93
83
  // @public
94
84
  export function getMediaFeatureFlag<T = boolean>(
95
- flagName: keyof MediaFeatureFlags,
96
- featureFlags?: MediaFeatureFlags,
85
+ flagName: keyof MediaFeatureFlags,
86
+ featureFlags?: MediaFeatureFlags,
97
87
  ): T;
98
88
 
99
89
  // @public (undocumented)
@@ -106,9 +96,7 @@ export function getRandomHex(byte: number): string;
106
96
  export const isAudioMimeTypeSupportedByServer: (mimeType: string) => boolean;
107
97
 
108
98
  // @public (undocumented)
109
- export const isDocumentMimeTypeSupportedByBrowser: (
110
- mimeType: string,
111
- ) => boolean;
99
+ export const isDocumentMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
112
100
 
113
101
  // @public (undocumented)
114
102
  export const isDocumentMimeTypeSupportedByServer: (mimeType: string) => boolean;
@@ -142,110 +130,99 @@ export const matches: (srcObj: Object) => (obj: Object) => boolean;
142
130
 
143
131
  // @public (undocumented)
144
132
  export interface MediaFeatureFlags {
145
- // (undocumented)
146
- folderUploads?: boolean;
147
- // (undocumented)
148
- mediaInline?: boolean;
133
+ // (undocumented)
134
+ folderUploads?: boolean;
135
+ // (undocumented)
136
+ mediaInline?: boolean;
149
137
  }
150
138
 
151
139
  // @public (undocumented)
152
140
  export type MediaTraceContext = {
153
- traceId: string;
154
- spanId?: string;
141
+ traceId: string;
142
+ spanId?: string;
155
143
  };
156
144
 
157
145
  // @public (undocumented)
158
- export type MediaType =
159
- | 'archive'
160
- | 'audio'
161
- | 'doc'
162
- | 'image'
163
- | 'unknown'
164
- | 'video';
146
+ export type MediaType = 'archive' | 'audio' | 'doc' | 'image' | 'unknown' | 'video';
165
147
 
166
148
  // @public (undocumented)
167
149
  export interface NumericalCardDimensions {
168
- // (undocumented)
169
- height: number;
170
- // (undocumented)
171
- width: number;
150
+ // (undocumented)
151
+ height: number;
152
+ // (undocumented)
153
+ width: number;
172
154
  }
173
155
 
174
156
  // @public (undocumented)
175
157
  export const omitBy: (
176
- obj: Object,
177
- predicate: Function,
158
+ obj: Object,
159
+ predicate: Function,
178
160
  ) => {
179
- [k: string]: any;
161
+ [k: string]: any;
180
162
  };
181
163
 
182
164
  // @public (undocumented)
183
165
  export type OperationalAttributes =
184
- | (BaseAttributes &
185
- WithFileAttributes &
186
- StatusAttributes &
187
- WithPerformanceAttributes &
188
- WithTraceContext)
189
- | (BaseAttributes & WithFileAttributes & StatusAttributes)
190
- | (BaseAttributes & WithFileAttributes)
191
- | BaseAttributes;
166
+ | (BaseAttributes &
167
+ WithFileAttributes &
168
+ StatusAttributes &
169
+ WithPerformanceAttributes &
170
+ WithTraceContext)
171
+ | (BaseAttributes & WithFileAttributes & StatusAttributes)
172
+ | (BaseAttributes & WithFileAttributes)
173
+ | BaseAttributes;
192
174
 
193
175
  // @public (undocumented)
194
176
  export type OperationalEventPayload<
195
- Attributes extends OperationalAttributes,
196
- Action extends string,
197
- ActionSubject extends string,
198
- ActionSubjectId extends string = string,
177
+ Attributes extends OperationalAttributes,
178
+ Action extends string,
179
+ ActionSubject extends string,
180
+ ActionSubjectId extends string = string,
199
181
  > = BaseEventPayload<Attributes> & {
200
- eventType: 'operational';
201
- action: Action;
202
- actionSubject: ActionSubject;
203
- actionSubjectId?: ActionSubjectId;
182
+ eventType: 'operational';
183
+ action: Action;
184
+ actionSubject: ActionSubject;
185
+ actionSubjectId?: ActionSubjectId;
204
186
  };
205
187
 
206
188
  // @public (undocumented)
207
189
  export type PackageAttributes = {
208
- packageName: string;
209
- packageVersion: string;
210
- componentName: string;
211
- component: string;
190
+ packageName: string;
191
+ packageVersion: string;
192
+ componentName: string;
193
+ component: string;
212
194
  };
213
195
 
214
196
  // @public (undocumented)
215
197
  export type PerformanceAttributes = {
216
- overall: {
217
- durationSincePageStart: number;
218
- durationSinceCommenced?: number;
219
- };
198
+ overall: {
199
+ durationSincePageStart: number;
200
+ durationSinceCommenced?: number;
201
+ };
220
202
  };
221
203
 
222
204
  // @public (undocumented)
223
205
  export const pick: (
224
- obj?: Object,
225
- keys?: Array<String>,
206
+ obj?: Object,
207
+ keys?: Array<String>,
226
208
  ) => {
227
- [k: string]: any;
209
+ [k: string]: any;
228
210
  };
229
211
 
230
212
  // @public (undocumented)
231
- type RequiredMediaFeatureFlags = Record<
232
- keyof Required<MediaFeatureFlags>,
233
- boolean
234
- >;
213
+ type RequiredMediaFeatureFlags = Record<keyof Required<MediaFeatureFlags>, boolean>;
235
214
 
236
215
  // @public (undocumented)
237
- export type ScreenAttributes =
238
- | (BaseAttributes & WithFileAttributes)
239
- | BaseAttributes;
216
+ export type ScreenAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;
240
217
 
241
218
  // @public (undocumented)
242
219
  export type ScreenEventPayload<
243
- Attributes extends ScreenAttributes,
244
- ActionSubject extends string,
220
+ Attributes extends ScreenAttributes,
221
+ ActionSubject extends string,
245
222
  > = BaseEventPayload<Attributes> & {
246
- eventType: 'screen';
247
- actionSubject: ActionSubject;
248
- name: ActionSubject;
223
+ eventType: 'screen';
224
+ actionSubject: ActionSubject;
225
+ name: ActionSubject;
249
226
  };
250
227
 
251
228
  // @public (undocumented)
@@ -256,78 +233,71 @@ type StatusAttributes = FailureAttributes | SuccessAttributes;
256
233
 
257
234
  // @public (undocumented)
258
235
  export type SuccessAttributes = {
259
- status: 'success';
260
- fileMediatype?: MediaType;
236
+ status: 'success';
237
+ fileMediatype?: MediaType;
261
238
  };
262
239
 
263
240
  // @public (undocumented)
264
- export type TrackAttributes =
265
- | (BaseAttributes & WithFileAttributes)
266
- | BaseAttributes;
241
+ export type TrackAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;
267
242
 
268
243
  // @public (undocumented)
269
244
  export type TrackEventPayload<
270
- Attributes extends TrackAttributes,
271
- Action extends string,
272
- ActionSubject extends string,
273
- ActionSubjectId extends string = string,
245
+ Attributes extends TrackAttributes,
246
+ Action extends string,
247
+ ActionSubject extends string,
248
+ ActionSubjectId extends string = string,
274
249
  > = BaseEventPayload<Attributes> & {
275
- eventType: 'track';
276
- action: Action;
277
- actionSubject: ActionSubject;
278
- actionSubjectId?: ActionSubjectId;
250
+ eventType: 'track';
251
+ action: Action;
252
+ actionSubject: ActionSubject;
253
+ actionSubjectId?: ActionSubjectId;
279
254
  };
280
255
 
281
256
  // @public (undocumented)
282
- export type UIAttributes =
283
- | (BaseAttributes & WithFileAttributes)
284
- | BaseAttributes;
257
+ export type UIAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;
285
258
 
286
259
  // @public (undocumented)
287
260
  export type UIEventPayload<
288
- Attributes extends UIAttributes,
289
- Action extends string,
290
- ActionSubject extends string,
261
+ Attributes extends UIAttributes,
262
+ Action extends string,
263
+ ActionSubject extends string,
291
264
  > = BaseEventPayload<Attributes> & {
292
- eventType: 'ui';
293
- action: Action;
294
- actionSubject: ActionSubject;
295
- actionSubjectId?: string;
265
+ eventType: 'ui';
266
+ action: Action;
267
+ actionSubject: ActionSubject;
268
+ actionSubjectId?: string;
296
269
  };
297
270
 
298
271
  // @public (undocumented)
299
272
  export type WithFileAttributes = {
300
- fileAttributes: FileAttributes;
273
+ fileAttributes: FileAttributes;
301
274
  };
302
275
 
303
276
  // @public
304
277
  export const withMediaAnalyticsContext: (
305
- contextPublicAttributes: ContextPublicAttributes,
306
- ) => <
307
- Props extends WithMediaFeatureFlags,
308
- Component extends React_2.ComponentType<Props>,
309
- >(
310
- WrappedComponent: React_2.JSXElementConstructor<Props> & Component,
278
+ contextPublicAttributes: ContextPublicAttributes,
279
+ ) => <Props extends WithMediaFeatureFlags, Component extends React_2.ComponentType<Props>>(
280
+ WrappedComponent: React_2.JSXElementConstructor<Props> & Component,
311
281
  ) => React_2.ForwardRefExoticComponent<
312
- React_2.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props>> &
313
- React_2.RefAttributes<any>
282
+ React_2.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props>> &
283
+ React_2.RefAttributes<any>
314
284
  >;
315
285
 
316
286
  // @public (undocumented)
317
287
  export interface WithMediaFeatureFlags {
318
- // (undocumented)
319
- featureFlags?: MediaFeatureFlags;
288
+ // (undocumented)
289
+ featureFlags?: MediaFeatureFlags;
320
290
  }
321
291
 
322
292
  // @public (undocumented)
323
293
  export type WithPerformanceAttributes = {
324
- performanceAttributes?: PerformanceAttributes;
294
+ performanceAttributes?: PerformanceAttributes;
325
295
  };
326
296
 
327
297
  // @public (undocumented)
328
298
  export type WithTraceContext = {
329
- traceContext?: MediaTraceContext;
330
- metadataTraceContext?: MediaTraceContext;
299
+ traceContext?: MediaTraceContext;
300
+ metadataTraceContext?: MediaTraceContext;
331
301
  };
332
302
 
333
303
  // (No @packageDocumentation comment for this package)
@@ -341,9 +311,9 @@ export type WithTraceContext = {
341
311
 
342
312
  ```json
343
313
  {
344
- "enzyme": ">=3.10.0",
345
- "react": "^16.8.0",
346
- "react-dom": "^16.8.0"
314
+ "enzyme": ">=3.10.0",
315
+ "react": "^16.8.0",
316
+ "react-dom": "^16.8.0"
347
317
  }
348
318
  ```
349
319