@postrun/react 2.14.0 → 2.16.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/dist/index.cjs +1 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -2563
- package/dist/index.d.ts +94 -2563
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -939,9 +939,6 @@ function resourceFor(ref, fallback) {
|
|
|
939
939
|
}
|
|
940
940
|
return fallback?.find((asset) => asset.id === ref.media_id);
|
|
941
941
|
}
|
|
942
|
-
function renditionFor(asset, target) {
|
|
943
|
-
return asset.per_platform[target];
|
|
944
|
-
}
|
|
945
942
|
function resolveVariantMedia(refs, target, fallback) {
|
|
946
943
|
return (refs ?? []).flatMap((ref) => {
|
|
947
944
|
const asset = resourceFor(ref, fallback);
|
|
@@ -955,7 +952,7 @@ function resolveVariantMedia(refs, target, fallback) {
|
|
|
955
952
|
const alt = ref.alt_text_override ?? asset.alt_text ?? void 0;
|
|
956
953
|
const width = asset.source?.width ?? void 0;
|
|
957
954
|
const height = asset.source?.height ?? void 0;
|
|
958
|
-
const rendition =
|
|
955
|
+
const rendition = asset.per_platform[target];
|
|
959
956
|
if (asset.status === "ready" && rendition?.status === "ready" && rendition.url) {
|
|
960
957
|
return [
|
|
961
958
|
{
|