@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20261021091207 → 0.8.1-dev.20261026095918

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/index.js CHANGED
@@ -9394,7 +9394,7 @@ var ImageGalleryNode = (props) => {
9394
9394
  }
9395
9395
  if (typeof fieldValue === "object" && fieldValue !== null) {
9396
9396
  const asset = fieldValue;
9397
- if (!asset.assetUrl) {
9397
+ if (!asset.assetUrl && !asset.posterUrl) {
9398
9398
  return void 0;
9399
9399
  }
9400
9400
  return {
@@ -9408,6 +9408,10 @@ var ImageGalleryNode = (props) => {
9408
9408
  }
9409
9409
  return void 0;
9410
9410
  }
9411
+ const resolvePosterUrl = (posterUrl) => {
9412
+ if (!posterUrl) return void 0;
9413
+ return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
9414
+ };
9411
9415
  const resolveImage = (image) => {
9412
9416
  let imageUrl = image.imageUrl;
9413
9417
  let posterUrl = image.posterUrl;
@@ -9423,20 +9427,17 @@ var ImageGalleryNode = (props) => {
9423
9427
  intrinsicHeight = resolvedAsset.intrinsicHeight ?? intrinsicHeight;
9424
9428
  }
9425
9429
  }
9426
- if (!imageUrl) {
9430
+ const effectiveMediaUrl = imageUrl || posterUrl;
9431
+ if (!effectiveMediaUrl) {
9427
9432
  return void 0;
9428
9433
  }
9429
9434
  return {
9430
- imageUrl: imageUrl.startsWith("http") ? imageUrl : AssetUtility_default.resolveUrl(props.assetBaseUrl, imageUrl),
9431
- posterUrl: posterUrl ? AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl) : void 0,
9435
+ imageUrl: effectiveMediaUrl.startsWith("http") ? effectiveMediaUrl : AssetUtility_default.resolveUrl(props.assetBaseUrl, effectiveMediaUrl),
9436
+ posterUrl: resolvePosterUrl(posterUrl),
9432
9437
  intrinsicWidth,
9433
9438
  intrinsicHeight
9434
9439
  };
9435
9440
  };
9436
- const resolvePosterUrl = (posterUrl) => {
9437
- if (!posterUrl) return void 0;
9438
- return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
9439
- };
9440
9441
  const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
9441
9442
  const hlsImages = rawImages.filter((img) => {
9442
9443
  const resolved = resolveImage(img);
@@ -9481,6 +9482,24 @@ var ImageGalleryNode = (props) => {
9481
9482
  hlsStyles.aspectRatio = videoWidth && videoHeight ? `${videoWidth} / ${videoHeight}` : "16 / 9";
9482
9483
  if (primaryHls?.borderRadius)
9483
9484
  hlsStyles.borderRadius = primaryHls.borderRadius;
9485
+ const hlsFallback = hlsImages.find((img) => !img.device) ?? null;
9486
+ if (!hlsFallback) {
9487
+ let display = "none";
9488
+ switch (props.device) {
9489
+ case "sm":
9490
+ display = hlsImages.some((img) => img.device === "sm") ? "block" : "none";
9491
+ break;
9492
+ case "md":
9493
+ display = hlsImages.some((img) => img.device === "md") ? "block" : "none";
9494
+ break;
9495
+ case "lg":
9496
+ display = hlsImages.some((img) => img.device === "lg") ? "block" : "none";
9497
+ break;
9498
+ default:
9499
+ display = "block";
9500
+ }
9501
+ hlsStyles.display = display;
9502
+ }
9484
9503
  const staticSources = staticImages.filter((img) => !!img.device);
9485
9504
  const staticFallback = staticImages.find((img) => !img.device) ?? null;
9486
9505
  const FormatClass = {
@@ -9490,7 +9509,7 @@ var ImageGalleryNode = (props) => {
9490
9509
  };
9491
9510
  const formatClasses = FormatClass[props.node.format || ""] || "";
9492
9511
  return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
9493
- hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_jsx_runtime84.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { style: hlsStyles, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
9512
+ hlsSources.length > 0 && hlsStyles.display !== "none" && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_jsx_runtime84.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { style: hlsStyles, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
9494
9513
  HlsPlayer4,
9495
9514
  {
9496
9515
  sources: hlsSources,
package/dist/index.mjs CHANGED
@@ -1662,7 +1662,7 @@ var ImageGalleryNode = (props) => {
1662
1662
  }
1663
1663
  if (typeof fieldValue === "object" && fieldValue !== null) {
1664
1664
  const asset = fieldValue;
1665
- if (!asset.assetUrl) {
1665
+ if (!asset.assetUrl && !asset.posterUrl) {
1666
1666
  return void 0;
1667
1667
  }
1668
1668
  return {
@@ -1676,6 +1676,10 @@ var ImageGalleryNode = (props) => {
1676
1676
  }
1677
1677
  return void 0;
1678
1678
  }
1679
+ const resolvePosterUrl = (posterUrl) => {
1680
+ if (!posterUrl) return void 0;
1681
+ return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
1682
+ };
1679
1683
  const resolveImage = (image) => {
1680
1684
  let imageUrl = image.imageUrl;
1681
1685
  let posterUrl = image.posterUrl;
@@ -1691,20 +1695,17 @@ var ImageGalleryNode = (props) => {
1691
1695
  intrinsicHeight = resolvedAsset.intrinsicHeight ?? intrinsicHeight;
1692
1696
  }
1693
1697
  }
1694
- if (!imageUrl) {
1698
+ const effectiveMediaUrl = imageUrl || posterUrl;
1699
+ if (!effectiveMediaUrl) {
1695
1700
  return void 0;
1696
1701
  }
1697
1702
  return {
1698
- imageUrl: imageUrl.startsWith("http") ? imageUrl : AssetUtility_default.resolveUrl(props.assetBaseUrl, imageUrl),
1699
- posterUrl: posterUrl ? AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl) : void 0,
1703
+ imageUrl: effectiveMediaUrl.startsWith("http") ? effectiveMediaUrl : AssetUtility_default.resolveUrl(props.assetBaseUrl, effectiveMediaUrl),
1704
+ posterUrl: resolvePosterUrl(posterUrl),
1700
1705
  intrinsicWidth,
1701
1706
  intrinsicHeight
1702
1707
  };
1703
1708
  };
1704
- const resolvePosterUrl = (posterUrl) => {
1705
- if (!posterUrl) return void 0;
1706
- return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
1707
- };
1708
1709
  const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
1709
1710
  const hlsImages = rawImages.filter((img) => {
1710
1711
  const resolved = resolveImage(img);
@@ -1749,6 +1750,24 @@ var ImageGalleryNode = (props) => {
1749
1750
  hlsStyles.aspectRatio = videoWidth && videoHeight ? `${videoWidth} / ${videoHeight}` : "16 / 9";
1750
1751
  if (primaryHls?.borderRadius)
1751
1752
  hlsStyles.borderRadius = primaryHls.borderRadius;
1753
+ const hlsFallback = hlsImages.find((img) => !img.device) ?? null;
1754
+ if (!hlsFallback) {
1755
+ let display = "none";
1756
+ switch (props.device) {
1757
+ case "sm":
1758
+ display = hlsImages.some((img) => img.device === "sm") ? "block" : "none";
1759
+ break;
1760
+ case "md":
1761
+ display = hlsImages.some((img) => img.device === "md") ? "block" : "none";
1762
+ break;
1763
+ case "lg":
1764
+ display = hlsImages.some((img) => img.device === "lg") ? "block" : "none";
1765
+ break;
1766
+ default:
1767
+ display = "block";
1768
+ }
1769
+ hlsStyles.display = display;
1770
+ }
1752
1771
  const staticSources = staticImages.filter((img) => !!img.device);
1753
1772
  const staticFallback = staticImages.find((img) => !img.device) ?? null;
1754
1773
  const FormatClass = {
@@ -1758,7 +1777,7 @@ var ImageGalleryNode = (props) => {
1758
1777
  };
1759
1778
  const formatClasses = FormatClass[props.node.format || ""] || "";
1760
1779
  return /* @__PURE__ */ jsxs13(Fragment5, { children: [
1761
- hlsSources.length > 0 && /* @__PURE__ */ jsx35(Fragment5, { children: /* @__PURE__ */ jsx35("div", { style: hlsStyles, children: /* @__PURE__ */ jsx35(
1780
+ hlsSources.length > 0 && hlsStyles.display !== "none" && /* @__PURE__ */ jsx35(Fragment5, { children: /* @__PURE__ */ jsx35("div", { style: hlsStyles, children: /* @__PURE__ */ jsx35(
1762
1781
  HlsPlayer3,
1763
1782
  {
1764
1783
  sources: hlsSources,
package/dist/server.js CHANGED
@@ -6986,7 +6986,7 @@ var ImageGalleryNode = (props) => {
6986
6986
  }
6987
6987
  if (typeof fieldValue === "object" && fieldValue !== null) {
6988
6988
  const asset = fieldValue;
6989
- if (!asset.assetUrl) {
6989
+ if (!asset.assetUrl && !asset.posterUrl) {
6990
6990
  return void 0;
6991
6991
  }
6992
6992
  return {
@@ -7000,6 +7000,10 @@ var ImageGalleryNode = (props) => {
7000
7000
  }
7001
7001
  return void 0;
7002
7002
  }
7003
+ const resolvePosterUrl = (posterUrl) => {
7004
+ if (!posterUrl) return void 0;
7005
+ return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
7006
+ };
7003
7007
  const resolveImage = (image) => {
7004
7008
  let imageUrl = image.imageUrl;
7005
7009
  let posterUrl = image.posterUrl;
@@ -7015,20 +7019,17 @@ var ImageGalleryNode = (props) => {
7015
7019
  intrinsicHeight = resolvedAsset.intrinsicHeight ?? intrinsicHeight;
7016
7020
  }
7017
7021
  }
7018
- if (!imageUrl) {
7022
+ const effectiveMediaUrl = imageUrl || posterUrl;
7023
+ if (!effectiveMediaUrl) {
7019
7024
  return void 0;
7020
7025
  }
7021
7026
  return {
7022
- imageUrl: imageUrl.startsWith("http") ? imageUrl : AssetUtility_default.resolveUrl(props.assetBaseUrl, imageUrl),
7023
- posterUrl: posterUrl ? AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl) : void 0,
7027
+ imageUrl: effectiveMediaUrl.startsWith("http") ? effectiveMediaUrl : AssetUtility_default.resolveUrl(props.assetBaseUrl, effectiveMediaUrl),
7028
+ posterUrl: resolvePosterUrl(posterUrl),
7024
7029
  intrinsicWidth,
7025
7030
  intrinsicHeight
7026
7031
  };
7027
7032
  };
7028
- const resolvePosterUrl = (posterUrl) => {
7029
- if (!posterUrl) return void 0;
7030
- return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
7031
- };
7032
7033
  const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
7033
7034
  const hlsImages = rawImages.filter((img) => {
7034
7035
  const resolved = resolveImage(img);
@@ -7073,6 +7074,24 @@ var ImageGalleryNode = (props) => {
7073
7074
  hlsStyles.aspectRatio = videoWidth && videoHeight ? `${videoWidth} / ${videoHeight}` : "16 / 9";
7074
7075
  if (primaryHls?.borderRadius)
7075
7076
  hlsStyles.borderRadius = primaryHls.borderRadius;
7077
+ const hlsFallback = hlsImages.find((img) => !img.device) ?? null;
7078
+ if (!hlsFallback) {
7079
+ let display = "none";
7080
+ switch (props.device) {
7081
+ case "sm":
7082
+ display = hlsImages.some((img) => img.device === "sm") ? "block" : "none";
7083
+ break;
7084
+ case "md":
7085
+ display = hlsImages.some((img) => img.device === "md") ? "block" : "none";
7086
+ break;
7087
+ case "lg":
7088
+ display = hlsImages.some((img) => img.device === "lg") ? "block" : "none";
7089
+ break;
7090
+ default:
7091
+ display = "block";
7092
+ }
7093
+ hlsStyles.display = display;
7094
+ }
7076
7095
  const staticSources = staticImages.filter((img) => !!img.device);
7077
7096
  const staticFallback = staticImages.find((img) => !img.device) ?? null;
7078
7097
  const FormatClass = {
@@ -7082,7 +7101,7 @@ var ImageGalleryNode = (props) => {
7082
7101
  };
7083
7102
  const formatClasses = FormatClass[props.node.format || ""] || "";
7084
7103
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
7085
- hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { style: hlsStyles, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7104
+ hlsSources.length > 0 && hlsStyles.display !== "none" && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { style: hlsStyles, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
7086
7105
  HlsPlayer4,
7087
7106
  {
7088
7107
  sources: hlsSources,
package/dist/server.mjs CHANGED
@@ -1618,7 +1618,7 @@ var ImageGalleryNode = (props) => {
1618
1618
  }
1619
1619
  if (typeof fieldValue === "object" && fieldValue !== null) {
1620
1620
  const asset = fieldValue;
1621
- if (!asset.assetUrl) {
1621
+ if (!asset.assetUrl && !asset.posterUrl) {
1622
1622
  return void 0;
1623
1623
  }
1624
1624
  return {
@@ -1632,6 +1632,10 @@ var ImageGalleryNode = (props) => {
1632
1632
  }
1633
1633
  return void 0;
1634
1634
  }
1635
+ const resolvePosterUrl = (posterUrl) => {
1636
+ if (!posterUrl) return void 0;
1637
+ return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
1638
+ };
1635
1639
  const resolveImage = (image) => {
1636
1640
  let imageUrl = image.imageUrl;
1637
1641
  let posterUrl = image.posterUrl;
@@ -1647,20 +1651,17 @@ var ImageGalleryNode = (props) => {
1647
1651
  intrinsicHeight = resolvedAsset.intrinsicHeight ?? intrinsicHeight;
1648
1652
  }
1649
1653
  }
1650
- if (!imageUrl) {
1654
+ const effectiveMediaUrl = imageUrl || posterUrl;
1655
+ if (!effectiveMediaUrl) {
1651
1656
  return void 0;
1652
1657
  }
1653
1658
  return {
1654
- imageUrl: imageUrl.startsWith("http") ? imageUrl : AssetUtility_default.resolveUrl(props.assetBaseUrl, imageUrl),
1655
- posterUrl: posterUrl ? AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl) : void 0,
1659
+ imageUrl: effectiveMediaUrl.startsWith("http") ? effectiveMediaUrl : AssetUtility_default.resolveUrl(props.assetBaseUrl, effectiveMediaUrl),
1660
+ posterUrl: resolvePosterUrl(posterUrl),
1656
1661
  intrinsicWidth,
1657
1662
  intrinsicHeight
1658
1663
  };
1659
1664
  };
1660
- const resolvePosterUrl = (posterUrl) => {
1661
- if (!posterUrl) return void 0;
1662
- return AssetUtility_default.resolveUrl(props.assetBaseUrl, posterUrl);
1663
- };
1664
1665
  const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
1665
1666
  const hlsImages = rawImages.filter((img) => {
1666
1667
  const resolved = resolveImage(img);
@@ -1705,6 +1706,24 @@ var ImageGalleryNode = (props) => {
1705
1706
  hlsStyles.aspectRatio = videoWidth && videoHeight ? `${videoWidth} / ${videoHeight}` : "16 / 9";
1706
1707
  if (primaryHls?.borderRadius)
1707
1708
  hlsStyles.borderRadius = primaryHls.borderRadius;
1709
+ const hlsFallback = hlsImages.find((img) => !img.device) ?? null;
1710
+ if (!hlsFallback) {
1711
+ let display = "none";
1712
+ switch (props.device) {
1713
+ case "sm":
1714
+ display = hlsImages.some((img) => img.device === "sm") ? "block" : "none";
1715
+ break;
1716
+ case "md":
1717
+ display = hlsImages.some((img) => img.device === "md") ? "block" : "none";
1718
+ break;
1719
+ case "lg":
1720
+ display = hlsImages.some((img) => img.device === "lg") ? "block" : "none";
1721
+ break;
1722
+ default:
1723
+ display = "block";
1724
+ }
1725
+ hlsStyles.display = display;
1726
+ }
1708
1727
  const staticSources = staticImages.filter((img) => !!img.device);
1709
1728
  const staticFallback = staticImages.find((img) => !img.device) ?? null;
1710
1729
  const FormatClass = {
@@ -1714,7 +1733,7 @@ var ImageGalleryNode = (props) => {
1714
1733
  };
1715
1734
  const formatClasses = FormatClass[props.node.format || ""] || "";
1716
1735
  return /* @__PURE__ */ jsxs13(Fragment5, { children: [
1717
- hlsSources.length > 0 && /* @__PURE__ */ jsx35(Fragment5, { children: /* @__PURE__ */ jsx35("div", { style: hlsStyles, children: /* @__PURE__ */ jsx35(
1736
+ hlsSources.length > 0 && hlsStyles.display !== "none" && /* @__PURE__ */ jsx35(Fragment5, { children: /* @__PURE__ */ jsx35("div", { style: hlsStyles, children: /* @__PURE__ */ jsx35(
1718
1737
  HlsPlayer3,
1719
1738
  {
1720
1739
  sources: hlsSources,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clyrex-digital/clyrex-controls-dev",
3
- "version": "0.8.1-dev.20261021091207",
3
+ "version": "0.8.1-dev.20261026095918",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",