@pronto-tools-and-more/components 15.38.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
- const webp = webP;
1467
- const actualWidth = width || defaultWidth;
1468
- const resizeString = resize ? JSON.stringify(resize) : void 0;
1469
- const optimizedSrc = `$functions.getOptimizedImageSrc("${src}", ${webp}, ${actualWidth}, ${resizeString})`;
1470
- return (
1471
- //@ts-ignore
1472
- /* @__PURE__ */ React.createElement("img", { src: optimizedSrc, alt, loading, className, style })
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
@@ -13,4 +13,5 @@ export interface IArticleListItem {
13
13
  readonly primaryCategoryLanguage?: string;
14
14
  readonly access?: string;
15
15
  readonly language: string;
16
+ readonly contextKey?: string;
16
17
  }
@@ -1,9 +1,10 @@
1
- export declare const Image: ({ src, alt, loading, className, width, resize, style, }: {
2
- src: string;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "15.38.0",
3
+ "version": "15.39.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",