@alpaca-headless/alpaca-headless-nextjs 1.0.2791 → 1.0.2792

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.
@@ -28,7 +28,7 @@ const mediaProtection_1 = require("../mediaProtection");
28
28
  // }
29
29
  // };
30
30
  const Picture = (_a) => {
31
- var _b, _c, _d, _e, _f, _g, _h, _j;
31
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
32
32
  var { field, imageParams, sources, defaultVariant, renderJsonLinkedData } = _a, otherProps = __rest(_a, ["field", "imageParams", "sources", "defaultVariant", "renderJsonLinkedData"]);
33
33
  if (!field)
34
34
  return null;
@@ -88,7 +88,7 @@ const Picture = (_a) => {
88
88
  }
89
89
  }
90
90
  return ((0, jsx_runtime_1.jsx)("source", { srcSet: srcSet, media: source.media }, source.variant + source.media));
91
- }), (0, jsx_runtime_1.jsx)("img", Object.assign({}, attrs, { alt: (_g = field.value) === null || _g === void 0 ? void 0 : _g.alt }))] }), video && (0, jsx_runtime_1.jsx)("video", Object.assign({}, videoAttr)), renderJsonLinkedData ? (0, jsx_runtime_1.jsx)("script", { type: "application/ld+json", dangerouslySetInnerHTML: {
91
+ }), (0, jsx_runtime_1.jsx)("img", Object.assign({}, attrs, { alt: (_g = field.value) === null || _g === void 0 ? void 0 : _g.alt }))] }), renderJsonLinkedData && !video ? (0, jsx_runtime_1.jsx)("script", { type: "application/ld+json", dangerouslySetInnerHTML: {
92
92
  __html: JSON.stringify({
93
93
  "@context": "http://schema.org",
94
94
  "@type": "ImageObject",
@@ -96,6 +96,14 @@ const Picture = (_a) => {
96
96
  "description": (_h = field.value) === null || _h === void 0 ? void 0 : _h.alt,
97
97
  "name": (_j = field.value) === null || _j === void 0 ? void 0 : _j.name
98
98
  })
99
+ } }) : null, video && (0, jsx_runtime_1.jsx)("video", Object.assign({}, videoAttr)), renderJsonLinkedData && video ? (0, jsx_runtime_1.jsx)("script", { type: "application/ld+json", dangerouslySetInnerHTML: {
100
+ __html: JSON.stringify({
101
+ "@context": "http://schema.org",
102
+ "@type": "VideoObject",
103
+ "contentUrl": img === null || img === void 0 ? void 0 : img.src,
104
+ "description": (_k = field.value) === null || _k === void 0 ? void 0 : _k.alt,
105
+ "name": (_l = field.value) === null || _l === void 0 ? void 0 : _l.name
106
+ })
99
107
  } }) : null] }));
100
108
  }
101
109
  };
@@ -25,7 +25,7 @@ import { hashImageUrl } from "../mediaProtection";
25
25
  // }
26
26
  // };
27
27
  export const Picture = (_a) => {
28
- var _b, _c, _d, _e, _f, _g, _h, _j;
28
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
29
29
  var { field, imageParams, sources, defaultVariant, renderJsonLinkedData } = _a, otherProps = __rest(_a, ["field", "imageParams", "sources", "defaultVariant", "renderJsonLinkedData"]);
30
30
  if (!field)
31
31
  return null;
@@ -85,7 +85,7 @@ export const Picture = (_a) => {
85
85
  }
86
86
  }
87
87
  return (_jsx("source", { srcSet: srcSet, media: source.media }, source.variant + source.media));
88
- }), _jsx("img", Object.assign({}, attrs, { alt: (_g = field.value) === null || _g === void 0 ? void 0 : _g.alt }))] }), video && _jsx("video", Object.assign({}, videoAttr)), renderJsonLinkedData ? _jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: {
88
+ }), _jsx("img", Object.assign({}, attrs, { alt: (_g = field.value) === null || _g === void 0 ? void 0 : _g.alt }))] }), renderJsonLinkedData && !video ? _jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: {
89
89
  __html: JSON.stringify({
90
90
  "@context": "http://schema.org",
91
91
  "@type": "ImageObject",
@@ -93,6 +93,14 @@ export const Picture = (_a) => {
93
93
  "description": (_h = field.value) === null || _h === void 0 ? void 0 : _h.alt,
94
94
  "name": (_j = field.value) === null || _j === void 0 ? void 0 : _j.name
95
95
  })
96
+ } }) : null, video && _jsx("video", Object.assign({}, videoAttr)), renderJsonLinkedData && video ? _jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: {
97
+ __html: JSON.stringify({
98
+ "@context": "http://schema.org",
99
+ "@type": "VideoObject",
100
+ "contentUrl": img === null || img === void 0 ? void 0 : img.src,
101
+ "description": (_k = field.value) === null || _k === void 0 ? void 0 : _k.alt,
102
+ "name": (_l = field.value) === null || _l === void 0 ? void 0 : _l.name
103
+ })
96
104
  } }) : null] }));
97
105
  }
98
106
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpaca-headless/alpaca-headless-nextjs",
3
- "version": "1.0.2791",
3
+ "version": "1.0.2792",
4
4
  "description": "Alpaca Headless NextJs Integration",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",