@atlaskit/media-common 13.0.1 → 13.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/analytics/types/package.json +15 -0
  3. package/await-error/package.json +15 -0
  4. package/clientIdCache/package.json +15 -0
  5. package/constants/package.json +15 -0
  6. package/dist/cjs/copyIntent/clientIdCache.js +55 -10
  7. package/dist/cjs/test-helpers/flushPromises.js +6 -3
  8. package/dist/es2019/copyIntent/clientIdCache.js +55 -10
  9. package/dist/es2019/test-helpers/flushPromises.js +3 -1
  10. package/dist/esm/copyIntent/clientIdCache.js +55 -10
  11. package/dist/esm/test-helpers/flushPromises.js +6 -3
  12. package/dist/types/copyIntent/clientIdCache.d.ts +0 -3
  13. package/dist/types/test-helpers/jestHelpers.d.ts +1 -1
  14. package/dist/types/test-helpers/nextTick.d.ts +1 -1
  15. package/dist/types-ts4.5/copyIntent/clientIdCache.d.ts +0 -3
  16. package/dist/types-ts4.5/test-helpers/jestHelpers.d.ts +1 -1
  17. package/dist/types-ts4.5/test-helpers/nextTick.d.ts +1 -1
  18. package/flushPromises/package.json +15 -0
  19. package/getJest/package.json +15 -0
  20. package/helpers/package.json +15 -0
  21. package/isMimeTypeSupportedByBrowser/package.json +15 -0
  22. package/isMimeTypeSupportedByServer/package.json +15 -0
  23. package/jestHelpers/package.json +15 -0
  24. package/media-use-only/package.json +15 -0
  25. package/nextTick/package.json +15 -0
  26. package/package.json +2 -2
  27. package/rxjs-notice/package.json +15 -0
  28. package/sanitisePayload/package.json +15 -0
  29. package/singleton-notice/package.json +15 -0
  30. package/smallImageURI/package.json +15 -0
  31. package/smallTransparentImageURI/package.json +15 -0
  32. package/tallImageURI/package.json +15 -0
  33. package/timeoutPromise/package.json +15 -0
  34. package/types/package.json +15 -0
  35. package/useStaticCallback/package.json +15 -0
  36. package/videoPreviewURI/package.json +15 -0
  37. package/videoURI/package.json +15 -0
  38. package/vr-test-small-image/package.json +15 -0
  39. package/wideImageURI/package.json +15 -0
  40. package/wideTransparentImageURI/package.json +15 -0
  41. package/withMediaAnalyticsContext/package.json +15 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/media-common
2
2
 
3
+ ## 13.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`818d7e656a226`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/818d7e656a226) -
8
+ Autofix: add explicit package exports (barrel removal)
9
+
10
+ ## 13.0.2
11
+
12
+ ### Patch Changes
13
+
14
+ - [`83401665664f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/83401665664f5) -
15
+ Fix failure to extract clientId when performing cross client copy/paste of rich text containing
16
+ media
17
+
3
18
  ## 13.0.1
4
19
 
5
20
  ### Patch Changes
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/analytics/types",
3
+ "main": "../../dist/cjs/analytics/types.js",
4
+ "module": "../../dist/esm/analytics/types.js",
5
+ "module:es2019": "../../dist/es2019/analytics/types.js",
6
+ "sideEffects": false,
7
+ "types": "../../dist/types/analytics/types.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../../dist/types-ts4.5/analytics/types.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/await-error",
3
+ "main": "../dist/cjs/test-helpers/await-error.js",
4
+ "module": "../dist/esm/test-helpers/await-error.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/await-error.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/await-error.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/await-error.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/clientIdCache",
3
+ "main": "../dist/cjs/copyIntent/clientIdCache.js",
4
+ "module": "../dist/esm/copyIntent/clientIdCache.js",
5
+ "module:es2019": "../dist/es2019/copyIntent/clientIdCache.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/copyIntent/clientIdCache.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/copyIntent/clientIdCache.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/constants",
3
+ "main": "../dist/cjs/analytics/constants.js",
4
+ "module": "../dist/esm/analytics/constants.js",
5
+ "module:es2019": "../dist/es2019/analytics/constants.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/analytics/constants.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/analytics/constants.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -47,20 +47,65 @@ var clearClientIdCache = exports.clearClientIdCache = function clearClientIdCach
47
47
 
48
48
  /**
49
49
  * Used to store fileId to clientId mappings on paste of Editor PM Node
50
+ *
51
+ * Handles two sources of pasted HTML:
52
+ *
53
+ * 1. Editor-to-editor copy: the clientId is stored as a `data-client-id` attribute
54
+ * directly on the `<div data-node-type="media">` element, written by the editor's
55
+ * clipboard serialiser.
56
+ *
57
+ * 2. Renderer-to-editor copy (e.g. pasting from a published Confluence page): the
58
+ * renderer does not write `data-client-id` on the media div. Instead, the clientId
59
+ * is embedded inside the blob URL on the `<img>` child element, in the hash params:
60
+ * `src="blob:https://...#media-blob-url=true&id=FILE_ID&...&clientId=CLIENT_ID"`
61
+ *
62
+ * All media nodes in a single pasted HTML fragment always share the same clientId,
63
+ * so we extract it once and apply it to all file IDs found in the HTML.
50
64
  */
65
+
66
+ /**
67
+ * Extract the clientId from a blob URL hash fragment (renderer-to-editor path).
68
+ * Returns undefined if not found.
69
+ */
70
+ var extractClientIdFromBlobUrl = function extractClientIdFromBlobUrl(html) {
71
+ // Matches both:
72
+ // - blob: URLs (client-rendered renderer)
73
+ // - HTTPS URLs with #media-blob-url=true in the hash (SSR-rendered renderer)
74
+ var imgSrcRegex = /src="([^"]*#media-blob-url=true[^"]*)"/g;
75
+ var match;
76
+ while ((match = imgSrcRegex.exec(html)) !== null) {
77
+ var src = match[1];
78
+ // clientId is encoded in the hash fragment as a URL param
79
+ // e.g. blob:https://hello.atlassian.net/uuid#media-blob-url=true&id=FILE_ID&clientId=CLIENT_ID
80
+ var hash = src.includes('#') ? src.slice(src.indexOf('#') + 1) : '';
81
+ // Unescape HTML-encoded ampersands that appear in raw clipboard HTML attribute values
82
+ var decodedHash = hash.replace(/&amp;/g, '&');
83
+ var clientId = new URLSearchParams(decodedHash).get('clientId');
84
+ if (clientId) {
85
+ return clientId;
86
+ }
87
+ }
88
+ return undefined;
89
+ };
51
90
  var extractClientIdsFromHtml = exports.extractClientIdsFromHtml = function extractClientIdsFromHtml(html) {
52
- if (!html || !html.includes('data-client-id')) {
91
+ var _exec$, _exec;
92
+ if (!html) {
93
+ return;
94
+ }
95
+
96
+ // All media nodes in a single paste share the same clientId.
97
+ // Extract it once from either source:
98
+ // - Editor-to-editor: present as data-client-id="..." attribute
99
+ // - Renderer-to-editor: embedded in the blob URL hash as clientId=...
100
+ var clientId = (_exec$ = (_exec = /data-client-id="([^"]*)"/.exec(html)) === null || _exec === void 0 ? void 0 : _exec[1]) !== null && _exec$ !== void 0 ? _exec$ : extractClientIdFromBlobUrl(html);
101
+ if (!clientId) {
53
102
  return;
54
103
  }
55
- var mediaTagRegex = /<[^>]*data-node-type="media(?:Inline)?"[^>]*>/g;
104
+
105
+ // Map every file ID in the HTML to the single clientId
106
+ var fileIdRegex = /data-id="([^"]*)"/g;
56
107
  var match;
57
- while ((match = mediaTagRegex.exec(html)) !== null) {
58
- var _exec, _exec2;
59
- var tag = match[0];
60
- var fileId = (_exec = /data-id="([^"]*)"/.exec(tag)) === null || _exec === void 0 ? void 0 : _exec[1];
61
- var clientId = (_exec2 = /data-client-id="([^"]*)"/.exec(tag)) === null || _exec2 === void 0 ? void 0 : _exec2[1];
62
- if (fileId && clientId) {
63
- setClientIdForFile(fileId, clientId);
64
- }
108
+ while ((match = fileIdRegex.exec(html)) !== null) {
109
+ setClientIdForFile(match[1], clientId);
65
110
  }
66
111
  };
@@ -7,7 +7,10 @@ exports.flushPromises = void 0;
7
7
  /** deprecated Use React Testing Library's waitFor like method instead */
8
8
  // eslint-disable-next-line @atlaskit/platform/no-set-immediate
9
9
  var flushPromises = exports.flushPromises = function flushPromises() {
10
- return new Promise(function (resolve) {
11
- return setImmediate(resolve);
12
- });
10
+ return (
11
+ // eslint-disable-next-line @atlaskit/platform/no-set-immediate
12
+ new Promise(function (resolve) {
13
+ return setImmediate(resolve);
14
+ })
15
+ );
13
16
  };
@@ -41,20 +41,65 @@ export const clearClientIdCache = () => {
41
41
 
42
42
  /**
43
43
  * Used to store fileId to clientId mappings on paste of Editor PM Node
44
+ *
45
+ * Handles two sources of pasted HTML:
46
+ *
47
+ * 1. Editor-to-editor copy: the clientId is stored as a `data-client-id` attribute
48
+ * directly on the `<div data-node-type="media">` element, written by the editor's
49
+ * clipboard serialiser.
50
+ *
51
+ * 2. Renderer-to-editor copy (e.g. pasting from a published Confluence page): the
52
+ * renderer does not write `data-client-id` on the media div. Instead, the clientId
53
+ * is embedded inside the blob URL on the `<img>` child element, in the hash params:
54
+ * `src="blob:https://...#media-blob-url=true&id=FILE_ID&...&clientId=CLIENT_ID"`
55
+ *
56
+ * All media nodes in a single pasted HTML fragment always share the same clientId,
57
+ * so we extract it once and apply it to all file IDs found in the HTML.
44
58
  */
59
+
60
+ /**
61
+ * Extract the clientId from a blob URL hash fragment (renderer-to-editor path).
62
+ * Returns undefined if not found.
63
+ */
64
+ const extractClientIdFromBlobUrl = html => {
65
+ // Matches both:
66
+ // - blob: URLs (client-rendered renderer)
67
+ // - HTTPS URLs with #media-blob-url=true in the hash (SSR-rendered renderer)
68
+ const imgSrcRegex = /src="([^"]*#media-blob-url=true[^"]*)"/g;
69
+ let match;
70
+ while ((match = imgSrcRegex.exec(html)) !== null) {
71
+ const src = match[1];
72
+ // clientId is encoded in the hash fragment as a URL param
73
+ // e.g. blob:https://hello.atlassian.net/uuid#media-blob-url=true&id=FILE_ID&clientId=CLIENT_ID
74
+ const hash = src.includes('#') ? src.slice(src.indexOf('#') + 1) : '';
75
+ // Unescape HTML-encoded ampersands that appear in raw clipboard HTML attribute values
76
+ const decodedHash = hash.replace(/&amp;/g, '&');
77
+ const clientId = new URLSearchParams(decodedHash).get('clientId');
78
+ if (clientId) {
79
+ return clientId;
80
+ }
81
+ }
82
+ return undefined;
83
+ };
45
84
  export const extractClientIdsFromHtml = html => {
46
- if (!html || !html.includes('data-client-id')) {
85
+ var _exec$, _exec;
86
+ if (!html) {
87
+ return;
88
+ }
89
+
90
+ // All media nodes in a single paste share the same clientId.
91
+ // Extract it once from either source:
92
+ // - Editor-to-editor: present as data-client-id="..." attribute
93
+ // - Renderer-to-editor: embedded in the blob URL hash as clientId=...
94
+ const clientId = (_exec$ = (_exec = /data-client-id="([^"]*)"/.exec(html)) === null || _exec === void 0 ? void 0 : _exec[1]) !== null && _exec$ !== void 0 ? _exec$ : extractClientIdFromBlobUrl(html);
95
+ if (!clientId) {
47
96
  return;
48
97
  }
49
- const mediaTagRegex = /<[^>]*data-node-type="media(?:Inline)?"[^>]*>/g;
98
+
99
+ // Map every file ID in the HTML to the single clientId
100
+ const fileIdRegex = /data-id="([^"]*)"/g;
50
101
  let match;
51
- while ((match = mediaTagRegex.exec(html)) !== null) {
52
- var _exec, _exec2;
53
- const tag = match[0];
54
- const fileId = (_exec = /data-id="([^"]*)"/.exec(tag)) === null || _exec === void 0 ? void 0 : _exec[1];
55
- const clientId = (_exec2 = /data-client-id="([^"]*)"/.exec(tag)) === null || _exec2 === void 0 ? void 0 : _exec2[1];
56
- if (fileId && clientId) {
57
- setClientIdForFile(fileId, clientId);
58
- }
102
+ while ((match = fileIdRegex.exec(html)) !== null) {
103
+ setClientIdForFile(match[1], clientId);
59
104
  }
60
105
  };
@@ -1,3 +1,5 @@
1
1
  /** deprecated Use React Testing Library's waitFor like method instead */
2
2
  // eslint-disable-next-line @atlaskit/platform/no-set-immediate
3
- export const flushPromises = () => new Promise(resolve => setImmediate(resolve));
3
+ export const flushPromises = () =>
4
+ // eslint-disable-next-line @atlaskit/platform/no-set-immediate
5
+ new Promise(resolve => setImmediate(resolve));
@@ -41,20 +41,65 @@ export var clearClientIdCache = function clearClientIdCache() {
41
41
 
42
42
  /**
43
43
  * Used to store fileId to clientId mappings on paste of Editor PM Node
44
+ *
45
+ * Handles two sources of pasted HTML:
46
+ *
47
+ * 1. Editor-to-editor copy: the clientId is stored as a `data-client-id` attribute
48
+ * directly on the `<div data-node-type="media">` element, written by the editor's
49
+ * clipboard serialiser.
50
+ *
51
+ * 2. Renderer-to-editor copy (e.g. pasting from a published Confluence page): the
52
+ * renderer does not write `data-client-id` on the media div. Instead, the clientId
53
+ * is embedded inside the blob URL on the `<img>` child element, in the hash params:
54
+ * `src="blob:https://...#media-blob-url=true&id=FILE_ID&...&clientId=CLIENT_ID"`
55
+ *
56
+ * All media nodes in a single pasted HTML fragment always share the same clientId,
57
+ * so we extract it once and apply it to all file IDs found in the HTML.
44
58
  */
59
+
60
+ /**
61
+ * Extract the clientId from a blob URL hash fragment (renderer-to-editor path).
62
+ * Returns undefined if not found.
63
+ */
64
+ var extractClientIdFromBlobUrl = function extractClientIdFromBlobUrl(html) {
65
+ // Matches both:
66
+ // - blob: URLs (client-rendered renderer)
67
+ // - HTTPS URLs with #media-blob-url=true in the hash (SSR-rendered renderer)
68
+ var imgSrcRegex = /src="([^"]*#media-blob-url=true[^"]*)"/g;
69
+ var match;
70
+ while ((match = imgSrcRegex.exec(html)) !== null) {
71
+ var src = match[1];
72
+ // clientId is encoded in the hash fragment as a URL param
73
+ // e.g. blob:https://hello.atlassian.net/uuid#media-blob-url=true&id=FILE_ID&clientId=CLIENT_ID
74
+ var hash = src.includes('#') ? src.slice(src.indexOf('#') + 1) : '';
75
+ // Unescape HTML-encoded ampersands that appear in raw clipboard HTML attribute values
76
+ var decodedHash = hash.replace(/&amp;/g, '&');
77
+ var clientId = new URLSearchParams(decodedHash).get('clientId');
78
+ if (clientId) {
79
+ return clientId;
80
+ }
81
+ }
82
+ return undefined;
83
+ };
45
84
  export var extractClientIdsFromHtml = function extractClientIdsFromHtml(html) {
46
- if (!html || !html.includes('data-client-id')) {
85
+ var _exec$, _exec;
86
+ if (!html) {
87
+ return;
88
+ }
89
+
90
+ // All media nodes in a single paste share the same clientId.
91
+ // Extract it once from either source:
92
+ // - Editor-to-editor: present as data-client-id="..." attribute
93
+ // - Renderer-to-editor: embedded in the blob URL hash as clientId=...
94
+ var clientId = (_exec$ = (_exec = /data-client-id="([^"]*)"/.exec(html)) === null || _exec === void 0 ? void 0 : _exec[1]) !== null && _exec$ !== void 0 ? _exec$ : extractClientIdFromBlobUrl(html);
95
+ if (!clientId) {
47
96
  return;
48
97
  }
49
- var mediaTagRegex = /<[^>]*data-node-type="media(?:Inline)?"[^>]*>/g;
98
+
99
+ // Map every file ID in the HTML to the single clientId
100
+ var fileIdRegex = /data-id="([^"]*)"/g;
50
101
  var match;
51
- while ((match = mediaTagRegex.exec(html)) !== null) {
52
- var _exec, _exec2;
53
- var tag = match[0];
54
- var fileId = (_exec = /data-id="([^"]*)"/.exec(tag)) === null || _exec === void 0 ? void 0 : _exec[1];
55
- var clientId = (_exec2 = /data-client-id="([^"]*)"/.exec(tag)) === null || _exec2 === void 0 ? void 0 : _exec2[1];
56
- if (fileId && clientId) {
57
- setClientIdForFile(fileId, clientId);
58
- }
102
+ while ((match = fileIdRegex.exec(html)) !== null) {
103
+ setClientIdForFile(match[1], clientId);
59
104
  }
60
105
  };
@@ -1,7 +1,10 @@
1
1
  /** deprecated Use React Testing Library's waitFor like method instead */
2
2
  // eslint-disable-next-line @atlaskit/platform/no-set-immediate
3
3
  export var flushPromises = function flushPromises() {
4
- return new Promise(function (resolve) {
5
- return setImmediate(resolve);
6
- });
4
+ return (
5
+ // eslint-disable-next-line @atlaskit/platform/no-set-immediate
6
+ new Promise(function (resolve) {
7
+ return setImmediate(resolve);
8
+ })
9
+ );
7
10
  };
@@ -19,7 +19,4 @@ export declare const getClientIdForFile: (fileId: string) => string | undefined;
19
19
  * Clear all cached clientIds (for testing purposes)
20
20
  */
21
21
  export declare const clearClientIdCache: () => void;
22
- /**
23
- * Used to store fileId to clientId mappings on paste of Editor PM Node
24
- */
25
22
  export declare const extractClientIdsFromHtml: (html: string) => void;
@@ -1,6 +1,6 @@
1
1
  export declare const asMock: (fn: Function) => jest.Mock;
2
2
  export declare const asMockFunction: <T extends (...args: any[]) => any>(fn: T) => jest.MockedFunction<T>;
3
- export declare const asMockReturnValue: <T extends (...args: any[]) => any>(fn: T, returnValue: ReturnType<T>) => jest.Mock<any, any, any>;
3
+ export declare const asMockReturnValue: <T extends (...args: any[]) => any>(fn: T, returnValue: ReturnType<T>) => jest.Mock;
4
4
  export declare const asMockFunctionReturnValue: <T extends (...args: any[]) => any>(fn: T, returnValue: ReturnType<T>) => jest.MockedFunction<T>;
5
5
  export declare const asMockFunctionResolvedValue: <T extends (...args: any[]) => any>(fn: T, resolveValue: jest.ResolvedValue<ReturnType<T>>) => jest.MockedFunction<T>;
6
6
  export declare const expectToEqual: <T>(actual: T, expected: T) => void;
@@ -1,2 +1,2 @@
1
1
  export declare const nextTick: () => Promise<void>;
2
- export declare const sleep: (time?: number) => Promise<unknown>;
2
+ export declare const sleep: (time?: number) => Promise<void>;
@@ -19,7 +19,4 @@ export declare const getClientIdForFile: (fileId: string) => string | undefined;
19
19
  * Clear all cached clientIds (for testing purposes)
20
20
  */
21
21
  export declare const clearClientIdCache: () => void;
22
- /**
23
- * Used to store fileId to clientId mappings on paste of Editor PM Node
24
- */
25
22
  export declare const extractClientIdsFromHtml: (html: string) => void;
@@ -1,6 +1,6 @@
1
1
  export declare const asMock: (fn: Function) => jest.Mock;
2
2
  export declare const asMockFunction: <T extends (...args: any[]) => any>(fn: T) => jest.MockedFunction<T>;
3
- export declare const asMockReturnValue: <T extends (...args: any[]) => any>(fn: T, returnValue: ReturnType<T>) => jest.Mock<any, any, any>;
3
+ export declare const asMockReturnValue: <T extends (...args: any[]) => any>(fn: T, returnValue: ReturnType<T>) => jest.Mock;
4
4
  export declare const asMockFunctionReturnValue: <T extends (...args: any[]) => any>(fn: T, returnValue: ReturnType<T>) => jest.MockedFunction<T>;
5
5
  export declare const asMockFunctionResolvedValue: <T extends (...args: any[]) => any>(fn: T, resolveValue: jest.ResolvedValue<ReturnType<T>>) => jest.MockedFunction<T>;
6
6
  export declare const expectToEqual: <T>(actual: T, expected: T) => void;
@@ -1,2 +1,2 @@
1
1
  export declare const nextTick: () => Promise<void>;
2
- export declare const sleep: (time?: number) => Promise<unknown>;
2
+ export declare const sleep: (time?: number) => Promise<void>;
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/flushPromises",
3
+ "main": "../dist/cjs/test-helpers/flushPromises.js",
4
+ "module": "../dist/esm/test-helpers/flushPromises.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/flushPromises.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/flushPromises.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/flushPromises.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/getJest",
3
+ "main": "../dist/cjs/test-helpers/getJest.js",
4
+ "module": "../dist/esm/test-helpers/getJest.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/getJest.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/getJest.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/getJest.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/helpers",
3
+ "main": "../dist/cjs/utils/helpers.js",
4
+ "module": "../dist/esm/utils/helpers.js",
5
+ "module:es2019": "../dist/es2019/utils/helpers.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/utils/helpers.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/utils/helpers.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/isMimeTypeSupportedByBrowser",
3
+ "main": "../dist/cjs/mediaTypeUtils/isMimeTypeSupportedByBrowser.js",
4
+ "module": "../dist/esm/mediaTypeUtils/isMimeTypeSupportedByBrowser.js",
5
+ "module:es2019": "../dist/es2019/mediaTypeUtils/isMimeTypeSupportedByBrowser.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/mediaTypeUtils/isMimeTypeSupportedByBrowser.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/mediaTypeUtils/isMimeTypeSupportedByBrowser.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/isMimeTypeSupportedByServer",
3
+ "main": "../dist/cjs/mediaTypeUtils/isMimeTypeSupportedByServer.js",
4
+ "module": "../dist/esm/mediaTypeUtils/isMimeTypeSupportedByServer.js",
5
+ "module:es2019": "../dist/es2019/mediaTypeUtils/isMimeTypeSupportedByServer.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/mediaTypeUtils/isMimeTypeSupportedByServer.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/mediaTypeUtils/isMimeTypeSupportedByServer.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/jestHelpers",
3
+ "main": "../dist/cjs/test-helpers/jestHelpers.js",
4
+ "module": "../dist/esm/test-helpers/jestHelpers.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/jestHelpers.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/jestHelpers.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/jestHelpers.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/media-use-only",
3
+ "main": "../dist/cjs/docs/media-use-only.js",
4
+ "module": "../dist/esm/docs/media-use-only.js",
5
+ "module:es2019": "../dist/es2019/docs/media-use-only.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/docs/media-use-only.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/docs/media-use-only.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/nextTick",
3
+ "main": "../dist/cjs/test-helpers/nextTick.js",
4
+ "module": "../dist/esm/test-helpers/nextTick.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/nextTick.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/nextTick.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/nextTick.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-common",
3
- "version": "13.0.1",
3
+ "version": "13.1.0",
4
4
  "description": "Includes common utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/analytics-gas-types": "^5.1.0",
33
33
  "@atlaskit/analytics-namespaced-context": "^7.2.0",
34
34
  "@atlaskit/analytics-next": "^11.2.0",
35
- "@atlaskit/link": "^3.3.0",
35
+ "@atlaskit/link": "^3.4.0",
36
36
  "@atlaskit/section-message": "^8.12.0",
37
37
  "@babel/runtime": "^7.0.0",
38
38
  "immer": "11.1.4",
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/rxjs-notice",
3
+ "main": "../dist/cjs/docs/rxjs-notice.js",
4
+ "module": "../dist/esm/docs/rxjs-notice.js",
5
+ "module:es2019": "../dist/es2019/docs/rxjs-notice.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/docs/rxjs-notice.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/docs/rxjs-notice.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/sanitisePayload",
3
+ "main": "../dist/cjs/analytics/sanitisePayload.js",
4
+ "module": "../dist/esm/analytics/sanitisePayload.js",
5
+ "module:es2019": "../dist/es2019/analytics/sanitisePayload.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/analytics/sanitisePayload.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/analytics/sanitisePayload.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/singleton-notice",
3
+ "main": "../dist/cjs/docs/singleton-notice.js",
4
+ "module": "../dist/esm/docs/singleton-notice.js",
5
+ "module:es2019": "../dist/es2019/docs/singleton-notice.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/docs/singleton-notice.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/docs/singleton-notice.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/smallImageURI",
3
+ "main": "../dist/cjs/test-helpers/dataURIs/smallImageURI.js",
4
+ "module": "../dist/esm/test-helpers/dataURIs/smallImageURI.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/dataURIs/smallImageURI.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/dataURIs/smallImageURI.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/dataURIs/smallImageURI.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/smallTransparentImageURI",
3
+ "main": "../dist/cjs/test-helpers/dataURIs/smallTransparentImageURI.js",
4
+ "module": "../dist/esm/test-helpers/dataURIs/smallTransparentImageURI.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/dataURIs/smallTransparentImageURI.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/dataURIs/smallTransparentImageURI.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/dataURIs/smallTransparentImageURI.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/tallImageURI",
3
+ "main": "../dist/cjs/test-helpers/dataURIs/tallImageURI.js",
4
+ "module": "../dist/esm/test-helpers/dataURIs/tallImageURI.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/dataURIs/tallImageURI.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/dataURIs/tallImageURI.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/dataURIs/tallImageURI.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/timeoutPromise",
3
+ "main": "../dist/cjs/test-helpers/timeoutPromise.js",
4
+ "module": "../dist/esm/test-helpers/timeoutPromise.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/timeoutPromise.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/timeoutPromise.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/timeoutPromise.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/types",
3
+ "main": "../dist/cjs/mediaFeatureFlags/types.js",
4
+ "module": "../dist/esm/mediaFeatureFlags/types.js",
5
+ "module:es2019": "../dist/es2019/mediaFeatureFlags/types.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/mediaFeatureFlags/types.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/mediaFeatureFlags/types.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/useStaticCallback",
3
+ "main": "../dist/cjs/hooks/useStaticCallback.js",
4
+ "module": "../dist/esm/hooks/useStaticCallback.js",
5
+ "module:es2019": "../dist/es2019/hooks/useStaticCallback.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/hooks/useStaticCallback.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/hooks/useStaticCallback.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/videoPreviewURI",
3
+ "main": "../dist/cjs/test-helpers/dataURIs/videoPreviewURI.js",
4
+ "module": "../dist/esm/test-helpers/dataURIs/videoPreviewURI.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/dataURIs/videoPreviewURI.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/dataURIs/videoPreviewURI.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/dataURIs/videoPreviewURI.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/videoURI",
3
+ "main": "../dist/cjs/test-helpers/dataURIs/videoURI.js",
4
+ "module": "../dist/esm/test-helpers/dataURIs/videoURI.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/dataURIs/videoURI.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/dataURIs/videoURI.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/dataURIs/videoURI.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/vr-test-small-image",
3
+ "main": "../dist/cjs/test-helpers/dataURIs/vr_test_small_image.js",
4
+ "module": "../dist/esm/test-helpers/dataURIs/vr_test_small_image.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/dataURIs/vr_test_small_image.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/dataURIs/vr_test_small_image.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/dataURIs/vr_test_small_image.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/wideImageURI",
3
+ "main": "../dist/cjs/test-helpers/dataURIs/wideImageURI.js",
4
+ "module": "../dist/esm/test-helpers/dataURIs/wideImageURI.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/dataURIs/wideImageURI.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/dataURIs/wideImageURI.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/dataURIs/wideImageURI.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/wideTransparentImageURI",
3
+ "main": "../dist/cjs/test-helpers/dataURIs/wideTransparentImageURI.js",
4
+ "module": "../dist/esm/test-helpers/dataURIs/wideTransparentImageURI.js",
5
+ "module:es2019": "../dist/es2019/test-helpers/dataURIs/wideTransparentImageURI.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/test-helpers/dataURIs/wideTransparentImageURI.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/test-helpers/dataURIs/wideTransparentImageURI.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/media-common/withMediaAnalyticsContext",
3
+ "main": "../dist/cjs/analytics/withMediaAnalyticsContext.js",
4
+ "module": "../dist/esm/analytics/withMediaAnalyticsContext.js",
5
+ "module:es2019": "../dist/es2019/analytics/withMediaAnalyticsContext.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/analytics/withMediaAnalyticsContext.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.9": {
10
+ "*": [
11
+ "../dist/types-ts4.5/analytics/withMediaAnalyticsContext.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }