@pronto-tools-and-more/components 15.37.0 → 15.39.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/main.js
CHANGED
@@ -1461,16 +1461,25 @@ var Image = ({
|
|
1461
1461
|
className,
|
1462
1462
|
width,
|
1463
1463
|
resize,
|
1464
|
-
style
|
1464
|
+
style,
|
1465
|
+
ContentImageContext
|
1465
1466
|
}) => {
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1467
|
+
if (!ContentImageContext) {
|
1468
|
+
const webp = webP;
|
1469
|
+
const actualWidth = width || defaultWidth;
|
1470
|
+
const resizeString = resize ? JSON.stringify(resize) : void 0;
|
1471
|
+
const optimizedSrc = `$functions.getOptimizedImageSrc("${src}", ${webp}, ${actualWidth}, ${resizeString})`;
|
1472
|
+
return (
|
1473
|
+
//@ts-ignore
|
1474
|
+
/* @__PURE__ */ React.createElement("img", { src: optimizedSrc, alt, loading, className, style })
|
1475
|
+
);
|
1476
|
+
}
|
1477
|
+
const json = {
|
1478
|
+
type: "content-featured-image",
|
1479
|
+
contextKey: ContentImageContext,
|
1480
|
+
class: className
|
1481
|
+
};
|
1482
|
+
return /* @__PURE__ */ React.createElement(JsonComponent, { json });
|
1474
1483
|
};
|
1475
1484
|
|
1476
1485
|
// src/parts/Language/Language.ts
|
@@ -1,9 +1,10 @@
|
|
1
|
-
export declare const Image: ({ src, alt, loading, className, width, resize, style, }: {
|
2
|
-
src
|
1
|
+
export declare const Image: ({ src, alt, loading, className, width, resize, style, ContentImageContext }: {
|
2
|
+
src?: string;
|
3
3
|
alt?: string;
|
4
4
|
className?: string;
|
5
5
|
loading?: "lazy";
|
6
6
|
width?: number;
|
7
7
|
resize?: string;
|
8
8
|
style?: string;
|
9
|
+
ContentImageContext?: string;
|
9
10
|
}) => import("react").JSX.Element;
|