@atlaskit/media-common 2.16.3 → 2.17.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/media-common
2
2
 
3
+ ## 2.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`2c402e87213`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2c402e87213) - [Experimental] Add traceId in media card get image request.
8
+
9
+ ### Patch Changes
10
+
11
+ - [`19141d537a4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/19141d537a4) - Removes use of console.info in runtime
12
+
13
+ ## 2.16.4
14
+
15
+ ### Patch Changes
16
+
17
+ - [`42116304154`](https://bitbucket.org/atlassian/atlassian-frontend/commits/42116304154) - Mocks console when it's not available
18
+ - Updated dependencies
19
+
3
20
  ## 2.16.3
4
21
 
5
22
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -57,6 +57,12 @@ Object.defineProperty(exports, "getMediaTypeFromMimeType", {
57
57
  return _mediaTypeUtils.getMediaTypeFromMimeType;
58
58
  }
59
59
  });
60
+ Object.defineProperty(exports, "getRandomHex", {
61
+ enumerable: true,
62
+ get: function get() {
63
+ return _helpers.getRandomHex;
64
+ }
65
+ });
60
66
  Object.defineProperty(exports, "isAudioMimeTypeSupportedByServer", {
61
67
  enumerable: true,
62
68
  get: function get() {
@@ -138,19 +138,6 @@ function getMediaFeatureFlag(flagName, featureFlags) {
138
138
 
139
139
  return defaultMediaFeatureFlags[flagName];
140
140
  }
141
- /**
142
- * do a check for any localStorage overrides, warn user once only
143
- */
144
-
145
-
146
- Object.keys(defaultMediaFeatureFlags).forEach(function (flagName) {
147
- var localOverride = (0, _mediaFeatureFlagLocal.getLocalMediaFeatureFlag)(flagName);
148
-
149
- if (localOverride !== null) {
150
- // eslint-disable-next-line no-console
151
- console.info("%c* LOCAL * MediaFeatureFlag.".concat(flagName, " = ").concat(localOverride), 'font-weight:bold;color:cyan');
152
- }
153
- });
154
141
 
155
142
  var useMemoizeFeatureFlags = function useMemoizeFeatureFlags(featureFlags) {
156
143
  var ref = (0, _react.useRef)();
@@ -5,7 +5,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.pick = exports.omitBy = exports.matches = exports.isUndefined = exports.debounce = void 0;
8
+ exports.debounce = void 0;
9
+ exports.getRandomHex = getRandomHex;
10
+ exports.pick = exports.omitBy = exports.matches = exports.isUndefined = void 0;
11
+
12
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
13
 
10
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
15
 
@@ -74,4 +78,10 @@ var matches = function matches(srcObj) {
74
78
  };
75
79
  };
76
80
 
77
- exports.matches = matches;
81
+ exports.matches = matches;
82
+
83
+ function getRandomHex(size) {
84
+ return (0, _toConsumableArray2.default)(Array(size)).map(function () {
85
+ return Math.floor(Math.random() * 16).toString(16);
86
+ }).join('');
87
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "2.16.3",
3
+ "version": "2.17.0",
4
4
  "sideEffects": false
5
5
  }
@@ -8,4 +8,4 @@ export { withMediaAnalyticsContext } from './analytics/withMediaAnalyticsContext
8
8
 
9
9
  export { ANALYTICS_MEDIA_CHANNEL } from './analytics/constants';
10
10
  export { getMediaTypeFromMimeType, isImageMimeTypeSupportedByBrowser, isDocumentMimeTypeSupportedByBrowser, isMimeTypeSupportedByBrowser, isImageMimeTypeSupportedByServer, isDocumentMimeTypeSupportedByServer, isAudioMimeTypeSupportedByServer, isVideoMimeTypeSupportedByServer, isUnknownMimeTypeSupportedByServer, isMimeTypeSupportedByServer } from './mediaTypeUtils';
11
- export { isUndefined, pick, omitBy, debounce, matches } from './utils/helpers';
11
+ export { isUndefined, pick, omitBy, debounce, matches, getRandomHex } from './utils/helpers';
@@ -87,18 +87,6 @@ export function getMediaFeatureFlag(flagName, featureFlags) {
87
87
 
88
88
  return defaultMediaFeatureFlags[flagName];
89
89
  }
90
- /**
91
- * do a check for any localStorage overrides, warn user once only
92
- */
93
-
94
- Object.keys(defaultMediaFeatureFlags).forEach(flagName => {
95
- const localOverride = getLocalMediaFeatureFlag(flagName);
96
-
97
- if (localOverride !== null) {
98
- // eslint-disable-next-line no-console
99
- console.info(`%c* LOCAL * MediaFeatureFlag.${flagName} = ${localOverride}`, 'font-weight:bold;color:cyan');
100
- }
101
- });
102
90
  export const useMemoizeFeatureFlags = featureFlags => {
103
91
  const ref = useRef();
104
92
 
@@ -26,4 +26,7 @@ export const matches = srcObj => {
26
26
 
27
27
  return true;
28
28
  };
29
- };
29
+ };
30
+ export function getRandomHex(size) {
31
+ return [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');
32
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "2.16.3",
3
+ "version": "2.17.0",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/index.js CHANGED
@@ -8,4 +8,4 @@ export { withMediaAnalyticsContext } from './analytics/withMediaAnalyticsContext
8
8
 
9
9
  export { ANALYTICS_MEDIA_CHANNEL } from './analytics/constants';
10
10
  export { getMediaTypeFromMimeType, isImageMimeTypeSupportedByBrowser, isDocumentMimeTypeSupportedByBrowser, isMimeTypeSupportedByBrowser, isImageMimeTypeSupportedByServer, isDocumentMimeTypeSupportedByServer, isAudioMimeTypeSupportedByServer, isVideoMimeTypeSupportedByServer, isUnknownMimeTypeSupportedByServer, isMimeTypeSupportedByServer } from './mediaTypeUtils';
11
- export { isUndefined, pick, omitBy, debounce, matches } from './utils/helpers';
11
+ export { isUndefined, pick, omitBy, debounce, matches, getRandomHex } from './utils/helpers';
@@ -109,18 +109,6 @@ export function getMediaFeatureFlag(flagName, featureFlags) {
109
109
 
110
110
  return defaultMediaFeatureFlags[flagName];
111
111
  }
112
- /**
113
- * do a check for any localStorage overrides, warn user once only
114
- */
115
-
116
- Object.keys(defaultMediaFeatureFlags).forEach(function (flagName) {
117
- var localOverride = getLocalMediaFeatureFlag(flagName);
118
-
119
- if (localOverride !== null) {
120
- // eslint-disable-next-line no-console
121
- console.info("%c* LOCAL * MediaFeatureFlag.".concat(flagName, " = ").concat(localOverride), 'font-weight:bold;color:cyan');
122
- }
123
- });
124
112
  export var useMemoizeFeatureFlags = function useMemoizeFeatureFlags(featureFlags) {
125
113
  var ref = useRef();
126
114
 
@@ -1,3 +1,4 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  export var isUndefined = function isUndefined(value) {
3
4
  return value === undefined;
@@ -50,4 +51,9 @@ export var matches = function matches(srcObj) {
50
51
 
51
52
  return true;
52
53
  };
53
- };
54
+ };
55
+ export function getRandomHex(size) {
56
+ return _toConsumableArray(Array(size)).map(function () {
57
+ return Math.floor(Math.random() * 16).toString(16);
58
+ }).join('');
59
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "2.16.3",
3
+ "version": "2.17.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { GasCorePayload } from '@atlaskit/analytics-gas-types';
2
2
  import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context/MediaAnalyticsContext';
3
- import { MediaType, FileStatus, WithMediaFeatureFlags } from '..';
3
+ import { MediaType, FileStatus, WithMediaFeatureFlags, MediaTraceContext } from '..';
4
4
  export declare type BaseAttributes = {};
5
5
  export declare type PackageAttributes = {
6
6
  packageName: string;
@@ -31,6 +31,9 @@ export declare type WithFileAttributes = {
31
31
  export declare type WithPerformanceAttributes = {
32
32
  performanceAttributes?: PerformanceAttributes;
33
33
  };
34
+ export declare type WithTraceContext = {
35
+ traceContext?: MediaTraceContext;
36
+ };
34
37
  export declare type SuccessAttributes = {
35
38
  status: 'success';
36
39
  fileMediatype?: MediaType;
@@ -7,9 +7,13 @@ export interface NumericalCardDimensions {
7
7
  width: number;
8
8
  height: number;
9
9
  }
10
- export type { PackageAttributes, WithFileAttributes, WithPerformanceAttributes, FileAttributes, PerformanceAttributes, SuccessAttributes, FailureAttributes, OperationalAttributes, OperationalEventPayload, UIAttributes, UIEventPayload, ScreenAttributes, ScreenEventPayload, TrackAttributes, TrackEventPayload, ContextPublicAttributes, ContextStaticProps, } from './analytics/types';
10
+ export type { PackageAttributes, WithFileAttributes, WithPerformanceAttributes, WithTraceContext, FileAttributes, PerformanceAttributes, SuccessAttributes, FailureAttributes, OperationalAttributes, OperationalEventPayload, UIAttributes, UIEventPayload, ScreenAttributes, ScreenEventPayload, TrackAttributes, TrackEventPayload, ContextPublicAttributes, ContextStaticProps, } from './analytics/types';
11
11
  export { withMediaAnalyticsContext } from './analytics/withMediaAnalyticsContext';
12
12
  export { ANALYTICS_MEDIA_CHANNEL } from './analytics/constants';
13
13
  export { getMediaTypeFromMimeType, isImageMimeTypeSupportedByBrowser, isDocumentMimeTypeSupportedByBrowser, isMimeTypeSupportedByBrowser, isImageMimeTypeSupportedByServer, isDocumentMimeTypeSupportedByServer, isAudioMimeTypeSupportedByServer, isVideoMimeTypeSupportedByServer, isUnknownMimeTypeSupportedByServer, isMimeTypeSupportedByServer, } from './mediaTypeUtils';
14
14
  export declare type SSR = 'client' | 'server';
15
- export { isUndefined, pick, omitBy, debounce, matches } from './utils/helpers';
15
+ export { isUndefined, pick, omitBy, debounce, matches, getRandomHex, } from './utils/helpers';
16
+ export declare type MediaTraceContext = {
17
+ traceId: string;
18
+ spanId?: string;
19
+ };
@@ -7,3 +7,4 @@ export declare const omitBy: (obj: Object, predicate: Function) => {
7
7
  };
8
8
  export declare const debounce: (func: Function, wait: number) => (...args: any[]) => void;
9
9
  export declare const matches: (srcObj: Object) => (obj: Object) => boolean;
10
+ export declare function getRandomHex(size: number): string;
@@ -1,6 +1,6 @@
1
1
  import { GasCorePayload } from '@atlaskit/analytics-gas-types';
2
2
  import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context/MediaAnalyticsContext';
3
- import { MediaType, FileStatus, WithMediaFeatureFlags } from '..';
3
+ import { MediaType, FileStatus, WithMediaFeatureFlags, MediaTraceContext } from '..';
4
4
  export declare type BaseAttributes = {};
5
5
  export declare type PackageAttributes = {
6
6
  packageName: string;
@@ -31,6 +31,9 @@ export declare type WithFileAttributes = {
31
31
  export declare type WithPerformanceAttributes = {
32
32
  performanceAttributes?: PerformanceAttributes;
33
33
  };
34
+ export declare type WithTraceContext = {
35
+ traceContext?: MediaTraceContext;
36
+ };
34
37
  export declare type SuccessAttributes = {
35
38
  status: 'success';
36
39
  fileMediatype?: MediaType;
@@ -7,9 +7,13 @@ export interface NumericalCardDimensions {
7
7
  width: number;
8
8
  height: number;
9
9
  }
10
- export type { PackageAttributes, WithFileAttributes, WithPerformanceAttributes, FileAttributes, PerformanceAttributes, SuccessAttributes, FailureAttributes, OperationalAttributes, OperationalEventPayload, UIAttributes, UIEventPayload, ScreenAttributes, ScreenEventPayload, TrackAttributes, TrackEventPayload, ContextPublicAttributes, ContextStaticProps, } from './analytics/types';
10
+ export type { PackageAttributes, WithFileAttributes, WithPerformanceAttributes, WithTraceContext, FileAttributes, PerformanceAttributes, SuccessAttributes, FailureAttributes, OperationalAttributes, OperationalEventPayload, UIAttributes, UIEventPayload, ScreenAttributes, ScreenEventPayload, TrackAttributes, TrackEventPayload, ContextPublicAttributes, ContextStaticProps, } from './analytics/types';
11
11
  export { withMediaAnalyticsContext } from './analytics/withMediaAnalyticsContext';
12
12
  export { ANALYTICS_MEDIA_CHANNEL } from './analytics/constants';
13
13
  export { getMediaTypeFromMimeType, isImageMimeTypeSupportedByBrowser, isDocumentMimeTypeSupportedByBrowser, isMimeTypeSupportedByBrowser, isImageMimeTypeSupportedByServer, isDocumentMimeTypeSupportedByServer, isAudioMimeTypeSupportedByServer, isVideoMimeTypeSupportedByServer, isUnknownMimeTypeSupportedByServer, isMimeTypeSupportedByServer, } from './mediaTypeUtils';
14
14
  export declare type SSR = 'client' | 'server';
15
- export { isUndefined, pick, omitBy, debounce, matches } from './utils/helpers';
15
+ export { isUndefined, pick, omitBy, debounce, matches, getRandomHex, } from './utils/helpers';
16
+ export declare type MediaTraceContext = {
17
+ traceId: string;
18
+ spanId?: string;
19
+ };
@@ -7,3 +7,4 @@ export declare const omitBy: (obj: Object, predicate: Function) => {
7
7
  };
8
8
  export declare const debounce: (func: Function, wait: number) => (...args: any[]) => void;
9
9
  export declare const matches: (srcObj: Object) => (obj: Object) => boolean;
10
+ export declare function getRandomHex(size: number): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "2.16.3",
3
+ "version": "2.17.0",
4
4
  "description": "Includes common utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -15,7 +15,8 @@
15
15
  "typesVersions": {
16
16
  ">=4.0 <4.5": {
17
17
  "*": [
18
- "dist/types-ts4.0/*"
18
+ "dist/types-ts4.0/*",
19
+ "dist/types-ts4.0/index.d.ts"
19
20
  ]
20
21
  }
21
22
  },
@@ -42,7 +43,7 @@
42
43
  "@atlaskit/analytics-gas-types": "^5.0.5",
43
44
  "@atlaskit/analytics-namespaced-context": "^6.5.0",
44
45
  "@atlaskit/analytics-next": "^8.1.1",
45
- "@atlaskit/section-message": "^6.2.0",
46
+ "@atlaskit/section-message": "^6.3.0",
46
47
  "@babel/runtime": "^7.0.0"
47
48
  },
48
49
  "peerDependencies": {
package/report.api.md CHANGED
@@ -2,54 +2,73 @@
2
2
 
3
3
  > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
4
 
5
+ <!--
6
+ Generated API Report version: 2.0
7
+ -->
8
+
9
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
10
+
5
11
  ```ts
6
12
  import { GasCorePayload } from '@atlaskit/analytics-gas-types';
7
13
  import { default as React_2 } from 'react';
8
14
 
9
- export declare const ANALYTICS_MEDIA_CHANNEL = 'media';
15
+ // @public (undocumented)
16
+ export const ANALYTICS_MEDIA_CHANNEL = 'media';
10
17
 
11
- export declare const areEqualFeatureFlags: (
18
+ // @public (undocumented)
19
+ export const areEqualFeatureFlags: (
12
20
  ffA?: MediaFeatureFlags | undefined,
13
21
  ffB?: MediaFeatureFlags | undefined,
14
22
  ) => boolean;
15
23
 
16
- declare type BaseAttributes = {};
24
+ // @public (undocumented)
25
+ type BaseAttributes = {};
17
26
 
18
- declare type BaseEventPayload<Attributes extends BaseAttributes> = Omit<
27
+ // @public (undocumented)
28
+ type BaseEventPayload<Attributes extends BaseAttributes> = Omit<
19
29
  GasCorePayload,
20
30
  'attributes'
21
31
  > & {
22
32
  attributes: Attributes;
23
33
  };
24
34
 
25
- export declare type ContextPublicAttributes = PackageAttributes;
35
+ // @public (undocumented)
36
+ export type ContextPublicAttributes = PackageAttributes;
26
37
 
27
- export declare type ContextStaticProps = WithMediaFeatureFlags;
38
+ // @public (undocumented)
39
+ export type ContextStaticProps = WithMediaFeatureFlags;
28
40
 
29
- export declare const debounce: (
41
+ // @public (undocumented)
42
+ export const debounce: (
30
43
  func: Function,
31
44
  wait: number,
32
45
  ) => (...args: any[]) => void;
33
46
 
34
- export declare const defaultMediaFeatureFlags: Required<MediaFeatureFlags>;
47
+ // @public (undocumented)
48
+ export const defaultMediaFeatureFlags: Required<MediaFeatureFlags>;
35
49
 
36
- export declare const downloadUrl: (
50
+ // @public (undocumented)
51
+ export const downloadUrl: (
37
52
  url: string,
38
53
  options?: DownloadUrlOptions | undefined,
39
54
  ) => void;
40
55
 
41
- declare interface DownloadUrlOptions {
56
+ // @public (undocumented)
57
+ interface DownloadUrlOptions {
58
+ // (undocumented)
42
59
  name?: string;
43
60
  }
44
61
 
45
- export declare type FailureAttributes = {
62
+ // @public (undocumented)
63
+ export type FailureAttributes = {
46
64
  status: 'fail';
47
65
  failReason: string;
48
66
  error?: string;
49
67
  errorDetail?: string;
50
68
  };
51
69
 
52
- export declare type FileAttributes = {
70
+ // @public (undocumented)
71
+ export type FileAttributes = {
53
72
  fileId: string;
54
73
  fileSize?: number;
55
74
  fileMediatype?: MediaType;
@@ -58,91 +77,90 @@ export declare type FileAttributes = {
58
77
  fileStatus?: FileStatus;
59
78
  };
60
79
 
61
- export declare type FileStatus =
80
+ // @public (undocumented)
81
+ export type FileStatus =
62
82
  | 'uploading'
63
83
  | 'processing'
64
84
  | 'processed'
65
85
  | 'error'
66
86
  | 'failed-processing';
67
87
 
68
- /**
69
- * Takes a record of {Media Feature Flag Names → boolean}.
70
- * Returns the Launch Darkly Keys from all products for each of the flags set as true in the input record.
71
- * */
72
- export declare const filterFeatureFlagKeysAllProducts: (
88
+ // @public
89
+ export const filterFeatureFlagKeysAllProducts: (
73
90
  flags: RequiredMediaFeatureFlags,
74
91
  ) => Array<string>;
75
92
 
76
- export declare const filterFeatureFlagNames: (
93
+ // @public (undocumented)
94
+ export const filterFeatureFlagNames: (
77
95
  flags: RequiredMediaFeatureFlags,
78
96
  ) => Array<keyof MediaFeatureFlags>;
79
97
 
80
- /**
81
- * Public accessor from components to fallback to defaults if flags not passed,
82
- * otherwise whatever product has set will be returned.
83
- *
84
- * To override locally for testing:
85
- * - `localStorage[flagName] = true` to enable locally,
86
- * - `delete localStorage[flagName]` to remove.
87
- *
88
- * (you will see a warning in console if override used)
89
- * */
90
- export declare function getMediaFeatureFlag<T = boolean>(
98
+ // @public
99
+ export function getMediaFeatureFlag<T = boolean>(
91
100
  flagName: keyof MediaFeatureFlags,
92
101
  featureFlags?: MediaFeatureFlags,
93
102
  ): T;
94
103
 
95
- export declare const getMediaTypeFromMimeType: (mimeType: string) => MediaType;
104
+ // @public (undocumented)
105
+ export const getMediaTypeFromMimeType: (mimeType: string) => MediaType;
96
106
 
97
- export declare const isAudioMimeTypeSupportedByServer: (
98
- mimeType: string,
99
- ) => boolean;
107
+ // @public (undocumented)
108
+ export const isAudioMimeTypeSupportedByServer: (mimeType: string) => boolean;
100
109
 
101
- export declare const isDocumentMimeTypeSupportedByBrowser: (
110
+ // @public (undocumented)
111
+ export const isDocumentMimeTypeSupportedByBrowser: (
102
112
  mimeType: string,
103
113
  ) => boolean;
104
114
 
105
- export declare const isDocumentMimeTypeSupportedByServer: (
106
- mimeType: string,
107
- ) => boolean;
115
+ // @public (undocumented)
116
+ export const isDocumentMimeTypeSupportedByServer: (mimeType: string) => boolean;
108
117
 
109
- export declare const isImageMimeTypeSupportedByBrowser: (
110
- mimeType: string,
111
- ) => boolean;
118
+ // @public (undocumented)
119
+ export const isImageMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
112
120
 
113
- export declare const isImageMimeTypeSupportedByServer: (
114
- mimeType: string,
115
- ) => boolean;
121
+ // @public (undocumented)
122
+ export const isImageMimeTypeSupportedByServer: (mimeType: string) => boolean;
116
123
 
117
- export declare const isMimeTypeSupportedByBrowser: (
118
- mimeType: string,
119
- ) => boolean;
124
+ // @public (undocumented)
125
+ export const isMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
120
126
 
121
- export declare const isMimeTypeSupportedByServer: (mimeType: string) => boolean;
127
+ // @public (undocumented)
128
+ export const isMimeTypeSupportedByServer: (mimeType: string) => boolean;
122
129
 
123
- export declare const isUndefined: (value: any) => boolean;
130
+ // @public (undocumented)
131
+ export const isUndefined: (value: any) => boolean;
124
132
 
125
- export declare const isUnknownMimeTypeSupportedByServer: (
126
- mimeType: string,
127
- ) => boolean;
133
+ // @public (undocumented)
134
+ export const isUnknownMimeTypeSupportedByServer: (mimeType: string) => boolean;
128
135
 
129
- export declare const isVideoMimeTypeSupportedByServer: (
130
- mimeType: string,
131
- ) => boolean;
136
+ // @public (undocumented)
137
+ export const isVideoMimeTypeSupportedByServer: (mimeType: string) => boolean;
132
138
 
133
- export declare const matches: (srcObj: Object) => (obj: Object) => boolean;
139
+ // @public (undocumented)
140
+ export const matches: (srcObj: Object) => (obj: Object) => boolean;
134
141
 
135
- export declare interface MediaFeatureFlags {
136
- newCardExperience?: boolean;
142
+ // @public (undocumented)
143
+ export interface MediaFeatureFlags {
144
+ // (undocumented)
137
145
  captions?: boolean;
138
- mediaInline?: boolean;
146
+ // (undocumented)
139
147
  folderUploads?: boolean;
148
+ // (undocumented)
149
+ mediaInline?: boolean;
150
+ // (undocumented)
151
+ mediaUploadApiV2?: boolean;
152
+ // (undocumented)
153
+ memoryCacheLogging?: boolean;
154
+ // (undocumented)
155
+ newCardExperience?: boolean;
156
+ // (undocumented)
140
157
  observedWidth?: boolean;
158
+ // (undocumented)
141
159
  timestampOnVideo?: boolean;
142
- mediaUploadApiV2?: boolean;
143
160
  }
144
161
 
145
- export declare type MediaType =
162
+ // @public (undocumented)
163
+ export type MediaType =
146
164
  | 'doc'
147
165
  | 'audio'
148
166
  | 'video'
@@ -150,19 +168,24 @@ export declare type MediaType =
150
168
  | 'archive'
151
169
  | 'unknown';
152
170
 
153
- export declare interface NumericalCardDimensions {
154
- width: number;
171
+ // @public (undocumented)
172
+ export interface NumericalCardDimensions {
173
+ // (undocumented)
155
174
  height: number;
175
+ // (undocumented)
176
+ width: number;
156
177
  }
157
178
 
158
- export declare const omitBy: (
179
+ // @public (undocumented)
180
+ export const omitBy: (
159
181
  obj: Object,
160
182
  predicate: Function,
161
183
  ) => {
162
184
  [k: string]: any;
163
185
  };
164
186
 
165
- export declare type OperationalAttributes =
187
+ // @public (undocumented)
188
+ export type OperationalAttributes =
166
189
  | BaseAttributes
167
190
  | (BaseAttributes & WithFileAttributes)
168
191
  | (BaseAttributes & WithFileAttributes & StatusAttributes)
@@ -171,7 +194,8 @@ export declare type OperationalAttributes =
171
194
  StatusAttributes &
172
195
  WithPerformanceAttributes);
173
196
 
174
- export declare type OperationalEventPayload<
197
+ // @public (undocumented)
198
+ export type OperationalEventPayload<
175
199
  Attributes extends OperationalAttributes,
176
200
  Action extends string,
177
201
  ActionSubject extends string,
@@ -183,37 +207,43 @@ export declare type OperationalEventPayload<
183
207
  actionSubjectId?: ActionSubjectId;
184
208
  };
185
209
 
186
- export declare type PackageAttributes = {
210
+ // @public (undocumented)
211
+ export type PackageAttributes = {
187
212
  packageName: string;
188
213
  packageVersion: string;
189
214
  componentName: string;
190
215
  component: string;
191
216
  };
192
217
 
193
- export declare type PerformanceAttributes = {
218
+ // @public (undocumented)
219
+ export type PerformanceAttributes = {
194
220
  overall: {
195
221
  durationSincePageStart: number;
196
222
  durationSinceCommenced?: number;
197
223
  };
198
224
  };
199
225
 
200
- export declare const pick: (
226
+ // @public (undocumented)
227
+ export const pick: (
201
228
  obj?: Object | undefined,
202
229
  keys?: Array<String>,
203
230
  ) => {
204
231
  [k: string]: any;
205
232
  };
206
233
 
207
- declare type RequiredMediaFeatureFlags = Record<
234
+ // @public (undocumented)
235
+ type RequiredMediaFeatureFlags = Record<
208
236
  keyof Required<MediaFeatureFlags>,
209
237
  boolean
210
238
  >;
211
239
 
212
- export declare type ScreenAttributes =
240
+ // @public (undocumented)
241
+ export type ScreenAttributes =
213
242
  | BaseAttributes
214
243
  | (BaseAttributes & WithFileAttributes);
215
244
 
216
- export declare type ScreenEventPayload<
245
+ // @public (undocumented)
246
+ export type ScreenEventPayload<
217
247
  Attributes extends ScreenAttributes,
218
248
  ActionSubject extends string
219
249
  > = BaseEventPayload<Attributes> & {
@@ -222,19 +252,25 @@ export declare type ScreenEventPayload<
222
252
  name: ActionSubject;
223
253
  };
224
254
 
225
- export declare type SSR = 'client' | 'server';
255
+ // @public (undocumented)
256
+ export type SSR = 'client' | 'server';
226
257
 
227
- declare type StatusAttributes = SuccessAttributes | FailureAttributes;
258
+ // @public (undocumented)
259
+ type StatusAttributes = SuccessAttributes | FailureAttributes;
228
260
 
229
- export declare type SuccessAttributes = {
261
+ // @public (undocumented)
262
+ export type SuccessAttributes = {
230
263
  status: 'success';
264
+ fileMediatype?: MediaType;
231
265
  };
232
266
 
233
- export declare type TrackAttributes =
267
+ // @public (undocumented)
268
+ export type TrackAttributes =
234
269
  | BaseAttributes
235
270
  | (BaseAttributes & WithFileAttributes);
236
271
 
237
- export declare type TrackEventPayload<
272
+ // @public (undocumented)
273
+ export type TrackEventPayload<
238
274
  Attributes extends TrackAttributes,
239
275
  Action extends string,
240
276
  ActionSubject extends string,
@@ -246,11 +282,13 @@ export declare type TrackEventPayload<
246
282
  actionSubjectId?: ActionSubjectId;
247
283
  };
248
284
 
249
- export declare type UIAttributes =
285
+ // @public (undocumented)
286
+ export type UIAttributes =
250
287
  | BaseAttributes
251
288
  | (BaseAttributes & WithFileAttributes);
252
289
 
253
- export declare type UIEventPayload<
290
+ // @public (undocumented)
291
+ export type UIEventPayload<
254
292
  Attributes extends UIAttributes,
255
293
  Action extends string,
256
294
  ActionSubject extends string
@@ -261,27 +299,18 @@ export declare type UIEventPayload<
261
299
  actionSubjectId?: string;
262
300
  };
263
301
 
264
- export declare const useMemoizeFeatureFlags: (
302
+ // @public (undocumented)
303
+ export const useMemoizeFeatureFlags: (
265
304
  featureFlags?: MediaFeatureFlags | undefined,
266
305
  ) => MediaFeatureFlags | undefined;
267
306
 
268
- export declare type WithFileAttributes = {
307
+ // @public (undocumented)
308
+ export type WithFileAttributes = {
269
309
  fileAttributes: FileAttributes;
270
310
  };
271
311
 
272
- /**
273
- * HOC for attaching MediaAnalyticsContext to a top-level React Component.
274
- *
275
- * Similar than "packages/analytics/analytics-next/src/hocs/withAnalyticsContext.tsx",
276
- * except that we restrict attributes put in this context using ContextPublicAttributes and ContextPrivateAttributes.
277
- *
278
- * As a constraint, the wrapped React Component's props must extend ContextStaticProps.
279
- *
280
- * @param {ContextPublicAttributes} attributes public attributes to put in context
281
- *
282
- * @see packages/analytics/analytics-next/src/hocs/withAnalyticsContext.tsx
283
- */
284
- export declare const withMediaAnalyticsContext: (
312
+ // @public
313
+ export const withMediaAnalyticsContext: (
285
314
  contextPublicAttributes: ContextPublicAttributes,
286
315
  options?: {
287
316
  filterFeatureFlags?: Array<keyof MediaFeatureFlags>;
@@ -296,13 +325,16 @@ export declare const withMediaAnalyticsContext: (
296
325
  React_2.RefAttributes<any>
297
326
  >;
298
327
 
299
- export declare interface WithMediaFeatureFlags {
328
+ // @public (undocumented)
329
+ export interface WithMediaFeatureFlags {
330
+ // (undocumented)
300
331
  featureFlags?: MediaFeatureFlags;
301
332
  }
302
333
 
303
- export declare type WithPerformanceAttributes = {
334
+ // @public (undocumented)
335
+ export type WithPerformanceAttributes = {
304
336
  performanceAttributes?: PerformanceAttributes;
305
337
  };
306
338
 
307
- export {};
339
+ // (No @packageDocumentation comment for this package)
308
340
  ```