@inf-monkeys-tech/monkeys-design 2.0.345 → 2.0.346
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/components/capabilities/index.js +2 -2
- package/dist/components/capabilities/index.js.map +1 -1
- package/dist/components/capabilities/index.mjs +2 -2
- package/dist/components/capabilities/index.mjs.map +1 -1
- package/dist/sources/{1ee25eab8c0449da53d715fac4eb97142e9a32f8714e5684592fe0422f191197.tsx → 3198394827c6ba4350d51f92dd963ec4ea7a2820fece44668577b054d3d79380.tsx} +7 -2
- package/package.json +1 -1
|
@@ -720,6 +720,10 @@ export function GalleryFieldPresentation({
|
|
|
720
720
|
typeof model.galleryCoverMinHeight === "number"
|
|
721
721
|
? model.galleryCoverMinHeight
|
|
722
722
|
: undefined;
|
|
723
|
+
const placeholder = object(mediaValue) && mediaValue.placeholder === "neutral";
|
|
724
|
+
const placeholderRatio = object(mediaValue) && typeof mediaValue.aspectRatio === "string"
|
|
725
|
+
&& /^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(mediaValue.aspectRatio)
|
|
726
|
+
? mediaValue.aspectRatio.replace(":", "/") : "4/3";
|
|
723
727
|
const modelMedia = galleryModelMedia(row);
|
|
724
728
|
if (modelMedia) return (
|
|
725
729
|
<div className="relative w-full overflow-hidden bg-muted" style={{ aspectRatio: aspectRatio ?? '4/3', minHeight }}>
|
|
@@ -749,11 +753,12 @@ export function GalleryFieldPresentation({
|
|
|
749
753
|
...svgPreviewSurface(resolved.src),
|
|
750
754
|
}}
|
|
751
755
|
/>
|
|
752
|
-
) : minHeight ? (
|
|
756
|
+
) : minHeight || placeholder ? (
|
|
753
757
|
<div
|
|
754
758
|
aria-hidden="true"
|
|
759
|
+
data-gallery-missing-media={placeholder ? true : undefined}
|
|
755
760
|
className="w-full bg-muted"
|
|
756
|
-
style={{ aspectRatio, minHeight }}
|
|
761
|
+
style={{ aspectRatio: aspectRatio ?? (placeholder ? placeholderRatio : undefined), minHeight: minHeight || undefined }}
|
|
757
762
|
/>
|
|
758
763
|
) : null;
|
|
759
764
|
}
|