@atlaskit/media-file-preview 0.5.0 → 0.5.1

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,11 @@
1
1
  # @atlaskit/media-file-preview
2
2
 
3
+ ## 0.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
8
+
3
9
  ## 0.5.0
4
10
 
5
11
  ### Minor Changes
@@ -19,7 +19,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
19
19
  var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
20
20
  var _mediaClientReact = require("@atlaskit/media-client-react");
21
21
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
22
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
22
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
23
23
  /**
24
24
  * Primary reason is logged through Data Portal.
25
25
  * Make sure all the values are whitelisted in Measure -> Event Regitry -> "mediaCardRender failed" event
@@ -14,7 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
14
  var _eventemitter = require("eventemitter2");
15
15
  var _lru_map = require("lru_map");
16
16
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
17
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
17
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
18
18
  var PREVIEW_CACHE_LRU_SIZE = exports.PREVIEW_CACHE_LRU_SIZE = 50;
19
19
  var ExtendedLRUCache = /*#__PURE__*/function (_LRUMap) {
20
20
  (0, _inherits2.default)(ExtendedLRUCache, _LRUMap);
package/dist/cjs/types.js CHANGED
@@ -1,5 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ "use strict";
@@ -3,6 +3,7 @@ import { createObjectURLCache } from './objectURLCache';
3
3
 
4
4
  // Dimensions are used to create a key.
5
5
  // Cache is invalidated when different dimensions are provided.
6
+
6
7
  export const getCacheKey = (id, mode) => {
7
8
  const resizeMode = mode || 'crop';
8
9
  return [id, resizeMode].join('-');
@@ -4,6 +4,7 @@ import { printFunctionCall, printScript } from './printScript';
4
4
  // Any changes to this file must be tested directly in product before merging.
5
5
  // The scripts printed here might differ from what we observe in our internal tests
6
6
  // due to minimification, for example.
7
+
7
8
  export const GLOBAL_MEDIA_CARD_SSR = 'mediaCardSsr';
8
9
  export const GLOBAL_MEDIA_NAMESPACE = '__MEDIA_INTERNAL';
9
10
  export function getMediaGlobalScope(globalScope = window) {
@@ -1 +0,0 @@
1
- export {};
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
8
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
9
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import { MediaFileStateError } from '@atlaskit/media-client-react';
11
11
 
12
12
  /**
@@ -5,6 +5,7 @@ import { createObjectURLCache } from './objectURLCache';
5
5
 
6
6
  // Dimensions are used to create a key.
7
7
  // Cache is invalidated when different dimensions are provided.
8
+
8
9
  export var getCacheKey = function getCacheKey(id, mode) {
9
10
  var resizeMode = mode || 'crop';
10
11
  return [id, resizeMode].join('-');
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
8
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import { EventEmitter2 } from 'eventemitter2';
10
10
  import { LRUMap } from 'lru_map';
11
11
  export var PREVIEW_CACHE_LRU_SIZE = 50;
@@ -4,6 +4,7 @@ import { printFunctionCall, printScript } from './printScript';
4
4
  // Any changes to this file must be tested directly in product before merging.
5
5
  // The scripts printed here might differ from what we observe in our internal tests
6
6
  // due to minimification, for example.
7
+
7
8
  export var GLOBAL_MEDIA_CARD_SSR = 'mediaCardSsr';
8
9
  export var GLOBAL_MEDIA_NAMESPACE = '__MEDIA_INTERNAL';
9
10
  export function getMediaGlobalScope() {
package/dist/esm/types.js CHANGED
@@ -1 +0,0 @@
1
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-file-preview",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "A React Hook to fetch and render file previews. It's overloaded with fancy features like SSR, lazy loading, memory cache and local preview.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -37,8 +37,8 @@
37
37
  "dependencies": {
38
38
  "@atlaskit/media-client": "^26.2.0",
39
39
  "@atlaskit/media-client-react": "^2.0.1",
40
- "@atlaskit/media-common": "^11.0.0",
41
- "@atlaskit/media-ui": "^25.1.0",
40
+ "@atlaskit/media-common": "^11.1.0",
41
+ "@atlaskit/media-ui": "^25.4.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "eventemitter2": "^4.1.0",
44
44
  "lru_map": "^0.4.1"
@@ -58,7 +58,7 @@
58
58
  "@testing-library/react": "^12.1.5",
59
59
  "@testing-library/react-hooks": "^8.0.1",
60
60
  "react-dom": "^16.8.0",
61
- "typescript": "~4.9.5",
61
+ "typescript": "~5.4.2",
62
62
  "wait-for-expect": "^1.2.0"
63
63
  },
64
64
  "techstack": {
@@ -97,4 +97,4 @@
97
97
  }
98
98
  },
99
99
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
100
- }
100
+ }