@atlaskit/media-file-preview 0.9.2 → 0.9.4
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,19 @@
|
|
|
1
1
|
# @atlaskit/media-file-preview
|
|
2
2
|
|
|
3
|
+
## 0.9.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#165609](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/165609)
|
|
8
|
+
[`b29c0cc4fef46`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b29c0cc4fef46) -
|
|
9
|
+
Cleaned up media card perf observer feature flag
|
|
10
|
+
|
|
11
|
+
## 0.9.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 0.9.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ var _react = require("react");
|
|
|
11
11
|
var _mediaClient = require("@atlaskit/media-client");
|
|
12
12
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
13
13
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _analytics = require("./analytics");
|
|
16
15
|
var _errors = require("./errors");
|
|
17
16
|
var _getPreview = require("./getPreview");
|
|
@@ -74,11 +73,9 @@ var useFilePreview = exports.useFilePreview = function useFilePreview(_ref) {
|
|
|
74
73
|
upscale: upscale,
|
|
75
74
|
'max-age': maxAge
|
|
76
75
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
});
|
|
81
|
-
}
|
|
76
|
+
imageURLParams = _objectSpread(_objectSpread({}, imageURLParams), {}, {
|
|
77
|
+
source: source
|
|
78
|
+
});
|
|
82
79
|
var previewInitializer = function previewInitializer() {
|
|
83
80
|
var preview = _getPreview.mediaFilePreviewCache.get(identifier.id, resizeMode);
|
|
84
81
|
if (preview) {
|
|
@@ -2,7 +2,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
2
2
|
import { isImageRepresentationReady } from '@atlaskit/media-client';
|
|
3
3
|
import { useFileState, useMediaClient } from '@atlaskit/media-client-react';
|
|
4
4
|
import { isMimeTypeSupportedByBrowser } from '@atlaskit/media-common';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import { createFailedSSRObject, extractErrorInfo } from './analytics';
|
|
7
6
|
import { ensureMediaFilePreviewError, ImageLoadError, MediaFilePreviewError } from './errors';
|
|
8
7
|
import { getAndCacheLocalPreview, getAndCacheRemotePreview, getSSRPreview, isLocalPreview, isRemotePreview, isSSRClientPreview, isSSRDataPreview, isSSRPreview, isSupportedLocalPreview, mediaFilePreviewCache } from './getPreview';
|
|
@@ -46,12 +45,10 @@ export const useFilePreview = ({
|
|
|
46
45
|
upscale,
|
|
47
46
|
'max-age': maxAge
|
|
48
47
|
};
|
|
49
|
-
|
|
50
|
-
imageURLParams
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
}
|
|
48
|
+
imageURLParams = {
|
|
49
|
+
...imageURLParams,
|
|
50
|
+
source
|
|
51
|
+
};
|
|
55
52
|
const previewInitializer = () => {
|
|
56
53
|
const preview = mediaFilePreviewCache.get(identifier.id, resizeMode);
|
|
57
54
|
if (preview) {
|
|
@@ -6,7 +6,6 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
6
6
|
import { isImageRepresentationReady } from '@atlaskit/media-client';
|
|
7
7
|
import { useFileState, useMediaClient } from '@atlaskit/media-client-react';
|
|
8
8
|
import { isMimeTypeSupportedByBrowser } from '@atlaskit/media-common';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { createFailedSSRObject, extractErrorInfo } from './analytics';
|
|
11
10
|
import { ensureMediaFilePreviewError, ImageLoadError, MediaFilePreviewError } from './errors';
|
|
12
11
|
import { getAndCacheLocalPreview, getAndCacheRemotePreview, getSSRPreview, isLocalPreview, isRemotePreview, isSSRClientPreview, isSSRDataPreview, isSSRPreview, isSupportedLocalPreview, mediaFilePreviewCache } from './getPreview';
|
|
@@ -67,11 +66,9 @@ export var useFilePreview = function useFilePreview(_ref) {
|
|
|
67
66
|
upscale: upscale,
|
|
68
67
|
'max-age': maxAge
|
|
69
68
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
});
|
|
74
|
-
}
|
|
69
|
+
imageURLParams = _objectSpread(_objectSpread({}, imageURLParams), {}, {
|
|
70
|
+
source: source
|
|
71
|
+
});
|
|
75
72
|
var previewInitializer = function previewInitializer() {
|
|
76
73
|
var preview = mediaFilePreviewCache.get(identifier.id, resizeMode);
|
|
77
74
|
if (preview) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-file-preview",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
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",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
".": "./src/index.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/media-client": "^28.
|
|
37
|
+
"@atlaskit/media-client": "^28.3.0",
|
|
38
38
|
"@atlaskit/media-client-react": "^2.3.0",
|
|
39
39
|
"@atlaskit/media-common": "^11.7.0",
|
|
40
|
-
"@atlaskit/media-ui": "^
|
|
40
|
+
"@atlaskit/media-ui": "^27.0.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
43
|
"eventemitter2": "^4.1.0",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@af/integration-testing": "*",
|
|
52
52
|
"@af/visual-regression": "*",
|
|
53
53
|
"@atlaskit/media-state": "^1.1.0",
|
|
54
|
-
"@atlaskit/media-test-data": "^2.
|
|
55
|
-
"@atlaskit/section-message": "^6.
|
|
54
|
+
"@atlaskit/media-test-data": "^2.7.0",
|
|
55
|
+
"@atlaskit/section-message": "^6.7.0",
|
|
56
56
|
"@atlaskit/ssr": "*",
|
|
57
57
|
"@atlaskit/visual-regression": "*",
|
|
58
58
|
"@testing-library/react": "^12.1.5",
|
|
@@ -96,9 +96,5 @@
|
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
"platform-feature-flags": {
|
|
100
|
-
"platform.media-card-performance-observer_a803k": {
|
|
101
|
-
"type": "boolean"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
99
|
+
"platform-feature-flags": {}
|
|
104
100
|
}
|