meno-core 1.0.43 → 1.0.44
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/build-static.js +2 -2
- package/dist/chunks/{chunk-5RFOQU7L.js → chunk-3XXLBUYA.js} +3 -16
- package/dist/chunks/chunk-3XXLBUYA.js.map +7 -0
- package/dist/chunks/{chunk-JPOTVYM3.js → chunk-5TJA272J.js} +2 -2
- package/dist/chunks/{chunk-U5BZ6DDD.js → chunk-G3WIPJN3.js} +2 -2
- package/dist/entries/server-router.js +2 -2
- package/dist/lib/server/index.js +3 -3
- package/lib/server/ssr/ssrRenderer.test.ts +8 -7
- package/lib/server/ssr/ssrRenderer.ts +4 -21
- package/package.json +1 -1
- package/dist/chunks/chunk-5RFOQU7L.js.map +0 -7
- /package/dist/chunks/{chunk-JPOTVYM3.js.map → chunk-5TJA272J.js.map} +0 -0
- /package/dist/chunks/{chunk-U5BZ6DDD.js.map → chunk-G3WIPJN3.js.map} +0 -0
package/dist/build-static.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
hashContent,
|
|
10
10
|
injectTrackingScript,
|
|
11
11
|
isCMSPage
|
|
12
|
-
} from "./chunks/chunk-
|
|
13
|
-
import "./chunks/chunk-
|
|
12
|
+
} from "./chunks/chunk-G3WIPJN3.js";
|
|
13
|
+
import "./chunks/chunk-3XXLBUYA.js";
|
|
14
14
|
import "./chunks/chunk-YEJVSNVF.js";
|
|
15
15
|
import "./chunks/chunk-5Z5VQRTJ.js";
|
|
16
16
|
import "./chunks/chunk-WQFG7PAH.js";
|
|
@@ -2756,12 +2756,7 @@ function renderImageElement(propsWithStyleAndAttrs, classAttr, attrs, ctx) {
|
|
|
2756
2756
|
const fetchpriority = imgProps.fetchpriority;
|
|
2757
2757
|
let width = imgProps.width;
|
|
2758
2758
|
let height = imgProps.height;
|
|
2759
|
-
const originalHeight = height;
|
|
2760
2759
|
const metadata = src ? ctx.imageMetadataMap?.get(src) : void 0;
|
|
2761
|
-
if (metadata) {
|
|
2762
|
-
if (width === void 0 && metadata.width) width = metadata.width;
|
|
2763
|
-
if (height === void 0 && metadata.height) height = metadata.height;
|
|
2764
|
-
}
|
|
2765
2760
|
const sizesAttr = sizes || DEFAULT_SIZES;
|
|
2766
2761
|
if (fetchpriority === "high" && metadata && ctx.preloadImages) {
|
|
2767
2762
|
if (metadata.avifSrcset && ctx.imageFormat !== "webp") {
|
|
@@ -2785,14 +2780,6 @@ function renderImageElement(propsWithStyleAndAttrs, classAttr, attrs, ctx) {
|
|
|
2785
2780
|
if (loading) imgAttrs += ` loading="${escapeHtml(String(loading))}"`;
|
|
2786
2781
|
if (width !== void 0) imgAttrs += ` width="${escapeHtml(String(width))}"`;
|
|
2787
2782
|
if (height !== void 0) imgAttrs += ` height="${escapeHtml(String(height))}"`;
|
|
2788
|
-
const needsHeightAuto = originalHeight === void 0 && height !== void 0;
|
|
2789
|
-
let blurStyle = "";
|
|
2790
|
-
if (metadata?.blurHash) {
|
|
2791
|
-
const heightAuto = needsHeightAuto ? "height: auto; " : "";
|
|
2792
|
-
blurStyle = ` style="${heightAuto}background-image: url(${escapeHtml(metadata.blurHash)}); background-size: cover;" onload="this.style.backgroundImage=''"`;
|
|
2793
|
-
} else if (needsHeightAuto) {
|
|
2794
|
-
blurStyle = ` style="height: auto;"`;
|
|
2795
|
-
}
|
|
2796
2783
|
if (metadata?.avifSrcset && ctx.imageFormat !== "webp") {
|
|
2797
2784
|
const imgClassPrefixes = [
|
|
2798
2785
|
"objf-",
|
|
@@ -2822,13 +2809,13 @@ function renderImageElement(propsWithStyleAndAttrs, classAttr, attrs, ctx) {
|
|
|
2822
2809
|
}
|
|
2823
2810
|
const pictureClassAttr = pictureClasses.length > 0 ? ` class="${escapeHtml(pictureClasses.join(" "))}"` : "";
|
|
2824
2811
|
const imgClassAttr = imgClasses.length > 0 ? ` class="${escapeHtml(imgClasses.join(" "))}"` : "";
|
|
2825
|
-
return `<picture${pictureClassAttr}><source type="image/avif" srcset="${escapeHtml(metadata.avifSrcset)}" sizes="${escapeHtml(sizesAttr)}" /><source type="image/webp" srcset="${escapeHtml(metadata.srcset)}" sizes="${escapeHtml(sizesAttr)}" /><img${imgClassAttr}${imgAttrs}${
|
|
2812
|
+
return `<picture${pictureClassAttr}><source type="image/avif" srcset="${escapeHtml(metadata.avifSrcset)}" sizes="${escapeHtml(sizesAttr)}" /><source type="image/webp" srcset="${escapeHtml(metadata.srcset)}" sizes="${escapeHtml(sizesAttr)}" /><img${imgClassAttr}${imgAttrs}${attrs} /></picture>`;
|
|
2826
2813
|
}
|
|
2827
2814
|
if (metadata?.srcset) {
|
|
2828
2815
|
imgAttrs += ` srcset="${escapeHtml(metadata.srcset)}"`;
|
|
2829
2816
|
imgAttrs += ` sizes="${escapeHtml(sizesAttr)}"`;
|
|
2830
2817
|
}
|
|
2831
|
-
return `<img${classAttr}${imgAttrs}${
|
|
2818
|
+
return `<img${classAttr}${imgAttrs}${attrs} />`;
|
|
2832
2819
|
}
|
|
2833
2820
|
function renderLocaleList(node, ctx) {
|
|
2834
2821
|
const { slugMappings, pagePath, i18nConfig, locale } = ctx;
|
|
@@ -5977,4 +5964,4 @@ export {
|
|
|
5977
5964
|
FileSystemCMSProvider,
|
|
5978
5965
|
migrateTemplatesDirectory
|
|
5979
5966
|
};
|
|
5980
|
-
//# sourceMappingURL=chunk-
|
|
5967
|
+
//# sourceMappingURL=chunk-3XXLBUYA.js.map
|