@atlaskit/renderer 137.3.0 → 137.4.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 +37 -0
- package/dist/cjs/react/nodes/mediaInline.js +12 -3
- package/dist/cjs/ui/MediaCard.js +8 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/mediaInline.js +11 -4
- package/dist/es2019/ui/MediaCard.js +6 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/mediaInline.js +13 -4
- package/dist/esm/ui/MediaCard.js +8 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/types/mediaOptions.d.ts +8 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 137.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`be8a71519cbc2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/be8a71519cbc2) -
|
|
8
|
+
Add support for seeding media card file state from SSR media node metadata, behind the
|
|
9
|
+
`platform_media_ssr_data_seed` feature gate.
|
|
10
|
+
|
|
11
|
+
`@atlaskit/media-client` gains a Relay-free `mapSsrMediaItemToFileState`. Malformed, partial, or
|
|
12
|
+
non-array input yields `undefined` rather than throwing.
|
|
13
|
+
|
|
14
|
+
`@atlaskit/media-card` accepts an optional `ssrMediaItem` prop. When `ssrFileState` is absent and
|
|
15
|
+
the gate is on, the card converts `ssrMediaItem` to FileState via `mapSsrMediaItemToFileState` and
|
|
16
|
+
seeds `useFileState`. `ssrFileState` still wins when both are provided (Relay / media-card-relay).
|
|
17
|
+
|
|
18
|
+
`@atlaskit/renderer` extends `MediaSSR` with `ssrMediaItems` — the host's SSR media payload,
|
|
19
|
+
passed through untouched. The renderer finds the matching item by id and forwards it as
|
|
20
|
+
`ssrMediaItem` to Card. Hosts need no knowledge of `FileState` or of media internals. The field is
|
|
21
|
+
optional and additive: hosts that do not supply it, and media ids without an entry, keep the
|
|
22
|
+
current fetch behaviour.
|
|
23
|
+
|
|
24
|
+
`@atlaskit/media-card-relay`'s `MediaCardRelay` / `MediaInlineCardRelay` now call the shared
|
|
25
|
+
`mapSsrMediaItemToFileState` mapper directly (the Relay fragment data is structurally assignable
|
|
26
|
+
to `SsrMediaItem`, so no cast or wrapper is needed). Its public API and behaviour are unchanged.
|
|
27
|
+
|
|
28
|
+
`@atlaskit/media-file-preview` now forwards an SSR-seeded pre-signed `previewCdnUrl` to the new
|
|
29
|
+
optional `MediaClient.getImageUrlSync(id, params, seededCdnUrl)` argument when
|
|
30
|
+
`platform_media_ssr_data_seed` is enabled and CDN delivery is in use. `@atlaskit/media-client`
|
|
31
|
+
preserves the signed CDN asset URL and inserts supported image parameters before the `wm-ari` /
|
|
32
|
+
`wm-v` watermark anchor, avoiding query-string rebuilding or re-encoding that can invalidate
|
|
33
|
+
CloudFront signatures. Path-based routing, isolated cloud, GCP, and callers without a seeded URL
|
|
34
|
+
retain the existing URL-generation behaviour.
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
|
|
3
40
|
## 137.3.0
|
|
4
41
|
|
|
5
42
|
### Minor Changes
|
|
@@ -33,7 +33,8 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
33
33
|
collectionName = _ref.collection,
|
|
34
34
|
eventHandlers = _ref.eventHandlers,
|
|
35
35
|
identifier = _ref.identifier,
|
|
36
|
-
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher
|
|
36
|
+
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher,
|
|
37
|
+
ssr = _ref.ssr;
|
|
37
38
|
var _useState = (0, _react.useState)(),
|
|
38
39
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
39
40
|
contextIdentifier = _useState2[0],
|
|
@@ -44,6 +45,12 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
44
45
|
setFileState = _useState4[1];
|
|
45
46
|
var mediaClient = (0, _react.useContext)(_mediaClientProvider.MediaClientContext);
|
|
46
47
|
var contextIdentifierProvider = (0, _providerFactory.useProvider)('contextIdentifierProvider');
|
|
48
|
+
var ssrMediaItem = (0, _react.useMemo)(function () {
|
|
49
|
+
var _ssr$ssrMediaItems;
|
|
50
|
+
return ssr === null || ssr === void 0 || (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(function (item) {
|
|
51
|
+
return item.id === identifier.id;
|
|
52
|
+
});
|
|
53
|
+
}, [ssr === null || ssr === void 0 ? void 0 : ssr.ssrMediaItems, identifier.id]);
|
|
47
54
|
(0, _react.useEffect)(function () {
|
|
48
55
|
if (contextIdentifierProvider) {
|
|
49
56
|
contextIdentifierProvider.then(function (resolvedContextID) {
|
|
@@ -144,7 +151,8 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
144
151
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
145
152
|
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
146
153
|
mediaViewerItems: Array.from(_MediaCard.mediaIdentifierMap.values()),
|
|
147
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
154
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
155
|
+
ssrMediaItem: ssrMediaItem
|
|
148
156
|
}))
|
|
149
157
|
);
|
|
150
158
|
};
|
|
@@ -214,7 +222,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
214
222
|
intl: intl,
|
|
215
223
|
collection: collection,
|
|
216
224
|
featureFlags: featureFlags,
|
|
217
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
225
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
226
|
+
ssr: ssr
|
|
218
227
|
});
|
|
219
228
|
};
|
|
220
229
|
|
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -285,6 +285,7 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
285
285
|
}, {
|
|
286
286
|
key: "render",
|
|
287
287
|
value: function render() {
|
|
288
|
+
var _ssr$ssrMediaItems;
|
|
288
289
|
var _this$state = this.state,
|
|
289
290
|
contextIdentifierProvider = _this$state.contextIdentifierProvider,
|
|
290
291
|
fileState = _this$state.fileState;
|
|
@@ -342,6 +343,9 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
342
343
|
// More robust solution will be implemented as part of CCPDF-233 - Link: https://hello.jira.atlassian.cloud/browse/CCPDF-233
|
|
343
344
|
var currentUrl = window.location.href;
|
|
344
345
|
var shouldDisableLazyLoading = (0, _expValEquals.expValEquals)('platform_editor_disable_lazy_load_media', 'isEnabled', true) && currentUrl.includes('/wiki/pdf/spaces/');
|
|
346
|
+
var ssrMediaItem = ssr === null || ssr === void 0 || (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(function (item) {
|
|
347
|
+
return item.id === id;
|
|
348
|
+
});
|
|
345
349
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, getClipboardAttrs({
|
|
346
350
|
id: id,
|
|
347
351
|
alt: alt,
|
|
@@ -367,7 +371,10 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
367
371
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
368
372
|
featureFlags: featureFlags,
|
|
369
373
|
shouldEnableDownloadButton: shouldEnableDownloadButton,
|
|
370
|
-
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
374
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
375
|
+
// Optional SSR seed supplied by the host product. Undefined when absent,
|
|
376
|
+
,
|
|
377
|
+
ssrMediaItem: ssrMediaItem,
|
|
371
378
|
shouldHideTooltip: isMobile,
|
|
372
379
|
mediaViewerExtensions: mediaViewerExtensions,
|
|
373
380
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
@@ -74,7 +74,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
74
74
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
75
75
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
76
76
|
var packageName = "@atlaskit/renderer";
|
|
77
|
-
var packageVersion = "137.
|
|
77
|
+
var packageVersion = "137.3.0";
|
|
78
78
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
79
79
|
containerName: 'ak-renderer-wrapper',
|
|
80
80
|
containerType: 'inline-size'
|
|
@@ -5,7 +5,7 @@ import { MediaInlineCard } from '@atlaskit/media-card';
|
|
|
5
5
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
6
6
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
7
7
|
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
8
|
-
import React, { useCallback, useEffect, useState, useContext } from 'react';
|
|
8
|
+
import React, { useCallback, useEffect, useMemo, useState, useContext } from 'react';
|
|
9
9
|
import { injectIntl } from 'react-intl';
|
|
10
10
|
import { getClipboardAttrs, mediaIdentifierMap } from '../../ui/MediaCard';
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
@@ -18,12 +18,17 @@ const RenderMediaInline = ({
|
|
|
18
18
|
collection: collectionName,
|
|
19
19
|
eventHandlers,
|
|
20
20
|
identifier,
|
|
21
|
-
fallbackMediaNameFetcher
|
|
21
|
+
fallbackMediaNameFetcher,
|
|
22
|
+
ssr
|
|
22
23
|
}) => {
|
|
23
24
|
const [contextIdentifier, setContextIdentifier] = useState();
|
|
24
25
|
const [fileState, setFileState] = useState();
|
|
25
26
|
const mediaClient = useContext(MediaClientContext);
|
|
26
27
|
const contextIdentifierProvider = useProvider('contextIdentifierProvider');
|
|
28
|
+
const ssrMediaItem = useMemo(() => {
|
|
29
|
+
var _ssr$ssrMediaItems;
|
|
30
|
+
return ssr === null || ssr === void 0 ? void 0 : (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(item => item.id === identifier.id);
|
|
31
|
+
}, [ssr === null || ssr === void 0 ? void 0 : ssr.ssrMediaItems, identifier.id]);
|
|
27
32
|
useEffect(() => {
|
|
28
33
|
if (contextIdentifierProvider) {
|
|
29
34
|
contextIdentifierProvider.then(resolvedContextID => {
|
|
@@ -110,7 +115,8 @@ const RenderMediaInline = ({
|
|
|
110
115
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
111
116
|
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
112
117
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
113
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
118
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
119
|
+
ssrMediaItem: ssrMediaItem
|
|
114
120
|
}))
|
|
115
121
|
);
|
|
116
122
|
};
|
|
@@ -179,7 +185,8 @@ const MediaInline = props => {
|
|
|
179
185
|
intl: intl,
|
|
180
186
|
collection: collection,
|
|
181
187
|
featureFlags: featureFlags,
|
|
182
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
188
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
189
|
+
ssr: ssr
|
|
183
190
|
});
|
|
184
191
|
};
|
|
185
192
|
|
|
@@ -223,6 +223,7 @@ export class MediaCardView extends Component {
|
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
225
|
render() {
|
|
226
|
+
var _ssr$ssrMediaItems;
|
|
226
227
|
const {
|
|
227
228
|
contextIdentifierProvider,
|
|
228
229
|
fileState
|
|
@@ -282,6 +283,7 @@ export class MediaCardView extends Component {
|
|
|
282
283
|
// More robust solution will be implemented as part of CCPDF-233 - Link: https://hello.jira.atlassian.cloud/browse/CCPDF-233
|
|
283
284
|
const currentUrl = window.location.href;
|
|
284
285
|
const shouldDisableLazyLoading = expValEquals('platform_editor_disable_lazy_load_media', 'isEnabled', true) && currentUrl.includes('/wiki/pdf/spaces/');
|
|
286
|
+
const ssrMediaItem = ssr === null || ssr === void 0 ? void 0 : (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(item => item.id === id);
|
|
285
287
|
return /*#__PURE__*/React.createElement("div", _extends({}, getClipboardAttrs({
|
|
286
288
|
id,
|
|
287
289
|
alt,
|
|
@@ -307,7 +309,10 @@ export class MediaCardView extends Component {
|
|
|
307
309
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
308
310
|
featureFlags: featureFlags,
|
|
309
311
|
shouldEnableDownloadButton: shouldEnableDownloadButton,
|
|
310
|
-
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
312
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
313
|
+
// Optional SSR seed supplied by the host product. Undefined when absent,
|
|
314
|
+
,
|
|
315
|
+
ssrMediaItem: ssrMediaItem,
|
|
311
316
|
shouldHideTooltip: isMobile,
|
|
312
317
|
mediaViewerExtensions: mediaViewerExtensions,
|
|
313
318
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
@@ -60,7 +60,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
60
60
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
61
61
|
const RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
62
62
|
const packageName = "@atlaskit/renderer";
|
|
63
|
-
const packageVersion = "137.
|
|
63
|
+
const packageVersion = "137.3.0";
|
|
64
64
|
const setAsQueryContainerStyles = css({
|
|
65
65
|
containerName: 'ak-renderer-wrapper',
|
|
66
66
|
containerType: 'inline-size'
|
|
@@ -11,7 +11,7 @@ import { MediaInlineCard } from '@atlaskit/media-card';
|
|
|
11
11
|
import { MediaClientContext } from '@atlaskit/media-client-react/media-client-provider';
|
|
12
12
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
13
13
|
import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
|
|
14
|
-
import React, { useCallback, useEffect, useState, useContext } from 'react';
|
|
14
|
+
import React, { useCallback, useEffect, useMemo, useState, useContext } from 'react';
|
|
15
15
|
import { injectIntl } from 'react-intl';
|
|
16
16
|
import { getClipboardAttrs, mediaIdentifierMap } from '../../ui/MediaCard';
|
|
17
17
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
@@ -24,7 +24,8 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
24
24
|
collectionName = _ref.collection,
|
|
25
25
|
eventHandlers = _ref.eventHandlers,
|
|
26
26
|
identifier = _ref.identifier,
|
|
27
|
-
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher
|
|
27
|
+
fallbackMediaNameFetcher = _ref.fallbackMediaNameFetcher,
|
|
28
|
+
ssr = _ref.ssr;
|
|
28
29
|
var _useState = useState(),
|
|
29
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
31
|
contextIdentifier = _useState2[0],
|
|
@@ -35,6 +36,12 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
35
36
|
setFileState = _useState4[1];
|
|
36
37
|
var mediaClient = useContext(MediaClientContext);
|
|
37
38
|
var contextIdentifierProvider = useProvider('contextIdentifierProvider');
|
|
39
|
+
var ssrMediaItem = useMemo(function () {
|
|
40
|
+
var _ssr$ssrMediaItems;
|
|
41
|
+
return ssr === null || ssr === void 0 || (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(function (item) {
|
|
42
|
+
return item.id === identifier.id;
|
|
43
|
+
});
|
|
44
|
+
}, [ssr === null || ssr === void 0 ? void 0 : ssr.ssrMediaItems, identifier.id]);
|
|
38
45
|
useEffect(function () {
|
|
39
46
|
if (contextIdentifierProvider) {
|
|
40
47
|
contextIdentifierProvider.then(function (resolvedContextID) {
|
|
@@ -135,7 +142,8 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
135
142
|
shouldDisplayToolTip: shouldDisplayToolTip,
|
|
136
143
|
mediaClientConfig: mediaClient.mediaClientConfig,
|
|
137
144
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
138
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
145
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
146
|
+
ssrMediaItem: ssrMediaItem
|
|
139
147
|
}))
|
|
140
148
|
);
|
|
141
149
|
};
|
|
@@ -205,7 +213,8 @@ var MediaInline = function MediaInline(props) {
|
|
|
205
213
|
intl: intl,
|
|
206
214
|
collection: collection,
|
|
207
215
|
featureFlags: featureFlags,
|
|
208
|
-
fallbackMediaNameFetcher: fallbackMediaNameFetcher
|
|
216
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
217
|
+
ssr: ssr
|
|
209
218
|
});
|
|
210
219
|
};
|
|
211
220
|
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -276,6 +276,7 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
276
276
|
}, {
|
|
277
277
|
key: "render",
|
|
278
278
|
value: function render() {
|
|
279
|
+
var _ssr$ssrMediaItems;
|
|
279
280
|
var _this$state = this.state,
|
|
280
281
|
contextIdentifierProvider = _this$state.contextIdentifierProvider,
|
|
281
282
|
fileState = _this$state.fileState;
|
|
@@ -333,6 +334,9 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
333
334
|
// More robust solution will be implemented as part of CCPDF-233 - Link: https://hello.jira.atlassian.cloud/browse/CCPDF-233
|
|
334
335
|
var currentUrl = window.location.href;
|
|
335
336
|
var shouldDisableLazyLoading = expValEquals('platform_editor_disable_lazy_load_media', 'isEnabled', true) && currentUrl.includes('/wiki/pdf/spaces/');
|
|
337
|
+
var ssrMediaItem = ssr === null || ssr === void 0 || (_ssr$ssrMediaItems = ssr.ssrMediaItems) === null || _ssr$ssrMediaItems === void 0 ? void 0 : _ssr$ssrMediaItems.find(function (item) {
|
|
338
|
+
return item.id === id;
|
|
339
|
+
});
|
|
336
340
|
return /*#__PURE__*/React.createElement("div", _extends({}, getClipboardAttrs({
|
|
337
341
|
id: id,
|
|
338
342
|
alt: alt,
|
|
@@ -358,7 +362,10 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
358
362
|
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
359
363
|
featureFlags: featureFlags,
|
|
360
364
|
shouldEnableDownloadButton: shouldEnableDownloadButton,
|
|
361
|
-
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
365
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
366
|
+
// Optional SSR seed supplied by the host product. Undefined when absent,
|
|
367
|
+
,
|
|
368
|
+
ssrMediaItem: ssrMediaItem,
|
|
362
369
|
shouldHideTooltip: isMobile,
|
|
363
370
|
mediaViewerExtensions: mediaViewerExtensions,
|
|
364
371
|
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
@@ -65,7 +65,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
65
65
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
66
66
|
var RENDER_EVENT_SAMPLE_RATE = 0.1;
|
|
67
67
|
var packageName = "@atlaskit/renderer";
|
|
68
|
-
var packageVersion = "137.
|
|
68
|
+
var packageVersion = "137.3.0";
|
|
69
69
|
var setAsQueryContainerStyles = css({
|
|
70
70
|
containerName: 'ak-renderer-wrapper',
|
|
71
71
|
containerType: 'inline-size'
|
|
@@ -4,6 +4,14 @@ import type { MediaViewerExtensions } from '@atlaskit/media-viewer';
|
|
|
4
4
|
export type MediaSSR = {
|
|
5
5
|
config: MediaClientConfig;
|
|
6
6
|
mode: SSR;
|
|
7
|
+
/**
|
|
8
|
+
* Host SSR media payload. The renderer looks up each card's id with `.find()`
|
|
9
|
+
* and passes the matching item as `ssrMediaItem` to Card. Missing entries fall
|
|
10
|
+
* back to the normal remote fetch path.
|
|
11
|
+
*/
|
|
12
|
+
ssrMediaItems?: ReadonlyArray<{
|
|
13
|
+
id?: string;
|
|
14
|
+
}>;
|
|
7
15
|
};
|
|
8
16
|
export interface MediaOptions {
|
|
9
17
|
allowCaptions?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "137.
|
|
3
|
+
"version": "137.4.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@atlaskit/link-datasource": "^6.11.0",
|
|
54
54
|
"@atlaskit/link-extractors": "^4.2.0",
|
|
55
55
|
"@atlaskit/linking-common": "^12.1.0",
|
|
56
|
-
"@atlaskit/media-card": "^81.
|
|
57
|
-
"@atlaskit/media-client": "^37.
|
|
56
|
+
"@atlaskit/media-card": "^81.10.0",
|
|
57
|
+
"@atlaskit/media-client": "^37.7.0",
|
|
58
58
|
"@atlaskit/media-client-react": "^6.4.0",
|
|
59
59
|
"@atlaskit/media-common": "^14.6.0",
|
|
60
60
|
"@atlaskit/media-filmstrip": "^52.4.0",
|