@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260527052314 → 0.8.1-dev.20260527055155

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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  HlsPlayer_default
4
- } from "./chunk-2YXREMBN.mjs";
4
+ } from "./chunk-GG2OSSQZ.mjs";
5
5
  export {
6
6
  HlsPlayer_default as default
7
7
  };
@@ -310,7 +310,7 @@ var HlsPlayer = React.memo(
310
310
  "video",
311
311
  {
312
312
  ref: videoRef,
313
- className: "w-full h-full object-contain",
313
+ className: "w-full h-full object-cover",
314
314
  poster: fallbackPoster,
315
315
  controls: showControls && (isMobile || isPlaying),
316
316
  muted: startsMuted,
package/dist/index.js CHANGED
@@ -474,7 +474,7 @@ var init_HlsPlayer = __esm({
474
474
  "video",
475
475
  {
476
476
  ref: videoRef,
477
- className: "w-full h-full object-contain",
477
+ className: "w-full h-full object-cover",
478
478
  poster: fallbackPoster,
479
479
  controls: showControls && (isMobile || isPlaying),
480
480
  muted: startsMuted,
@@ -5269,11 +5269,11 @@ var parseMaybeNumber = (value) => {
5269
5269
  return Number.isFinite(n) ? n : void 0;
5270
5270
  };
5271
5271
  var ImageGalleryNode = (props) => {
5272
- const resolveImageUrl = (imageUrl2) => {
5273
- if (!imageUrl2) return "";
5274
- if (imageUrl2.startsWith("http")) return imageUrl2;
5272
+ const resolveImageUrl = (imageUrl) => {
5273
+ if (!imageUrl) return "";
5274
+ if (imageUrl.startsWith("http")) return imageUrl;
5275
5275
  const base = props.assetBaseUrl.replace(/\/$/, "");
5276
- const path = imageUrl2.replace(/^\//, "");
5276
+ const path = imageUrl.replace(/^\//, "");
5277
5277
  return `${base}/${path}`;
5278
5278
  };
5279
5279
  const resolvePosterUrl = (posterUrl) => {
@@ -5282,48 +5282,42 @@ var ImageGalleryNode = (props) => {
5282
5282
  };
5283
5283
  const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
5284
5284
  const hlsImages = rawImages.filter(
5285
- (img2) => resolveImageUrl(img2.imageUrl).endsWith(".m3u8")
5285
+ (img) => resolveImageUrl(img.imageUrl).endsWith(".m3u8")
5286
5286
  );
5287
5287
  const staticImages = rawImages.filter(
5288
- (img2) => !resolveImageUrl(img2.imageUrl).endsWith(".m3u8")
5288
+ (img) => !resolveImageUrl(img.imageUrl).endsWith(".m3u8")
5289
5289
  );
5290
5290
  const hlsSources = [
5291
5291
  ...DEVICE_ORDER.flatMap((deviceKey) => {
5292
- const img2 = hlsImages.find((i) => i.device === deviceKey);
5293
- if (!img2) return [];
5294
- const src = resolveImageUrl(img2.imageUrl);
5292
+ const img = hlsImages.find((i) => i.device === deviceKey);
5293
+ if (!img) return [];
5294
+ const src = resolveImageUrl(img.imageUrl);
5295
5295
  if (!src) return [];
5296
- const media = deviceToMediaQuery(img2.device);
5297
- const posterUrl = resolvePosterUrl(img2.posterUrl);
5296
+ const media = deviceToMediaQuery(img.device);
5297
+ const posterUrl = resolvePosterUrl(img.posterUrl);
5298
5298
  return [{ src, ...media ? { media } : {}, ...posterUrl ? { posterUrl } : {} }];
5299
5299
  }),
5300
- ...hlsImages.filter((img2) => !img2.device).map((img2) => {
5301
- const src = resolveImageUrl(img2.imageUrl);
5302
- const posterUrl = resolvePosterUrl(img2.posterUrl);
5300
+ ...hlsImages.filter((img) => !img.device).map((img) => {
5301
+ const src = resolveImageUrl(img.imageUrl);
5302
+ const posterUrl = resolvePosterUrl(img.posterUrl);
5303
5303
  return { src, ...posterUrl ? { posterUrl } : {} };
5304
5304
  }).filter((s) => !!s.src)
5305
5305
  ];
5306
- const primaryHls = hlsImages.find((img2) => !img2.device) ?? hlsImages[0];
5306
+ const primaryHls = hlsImages.find((img) => !img.device) ?? hlsImages[0];
5307
5307
  const hlsIntrinsicWidth = primaryHls ? parseMaybeNumber(primaryHls.intrinsicWidth)?.toString() : void 0;
5308
5308
  const hlsIntrinsicHeight = primaryHls ? parseMaybeNumber(primaryHls.intrinsicHeight)?.toString() : void 0;
5309
- const staticSources = staticImages.filter((img2) => !!img2.device);
5310
- const staticFallback = staticImages.find((img2) => !img2.device) ?? staticImages[0] ?? null;
5309
+ const hlsStyles = {};
5310
+ if (primaryHls?.height) hlsStyles.height = primaryHls.height;
5311
+ if (primaryHls?.width) hlsStyles.width = primaryHls.width;
5312
+ if (primaryHls?.borderRadius) hlsStyles.borderRadius = primaryHls.borderRadius;
5313
+ const staticSources = staticImages.filter((img) => !!img.device);
5314
+ const staticFallback = staticImages.find((img) => !img.device) ?? staticImages[0] ?? null;
5311
5315
  const FormatClass = {
5312
5316
  center: "justify-center",
5313
5317
  left: "justify-start",
5314
5318
  right: "justify-end"
5315
5319
  };
5316
5320
  const formatClasses = FormatClass[props.node.format || ""] || "";
5317
- const img = staticFallback;
5318
- const imageUrl = resolveImageUrl(img.imageUrl);
5319
- if (!imageUrl) return null;
5320
- const intrinsicWidth = parseMaybeNumber(img.intrinsicWidth);
5321
- const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
5322
- const alt = img.title || "Gallery image";
5323
- const styles = {};
5324
- if (img.height) styles.height = img.height;
5325
- if (img.width) styles.width = img.width;
5326
- if (img.borderRadius) styles.borderRadius = img.borderRadius;
5327
5321
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
5328
5322
  hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5329
5323
  HlsPlayer3,
@@ -5337,12 +5331,12 @@ var ImageGalleryNode = (props) => {
5337
5331
  placementCode: primaryHls?.placementCode ?? "",
5338
5332
  apiBaseUrl: props.apiBaseUrl,
5339
5333
  session: props.session,
5340
- styles
5334
+ styles: hlsStyles
5341
5335
  }
5342
5336
  ) }),
5343
5337
  staticFallback && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("picture", { children: [
5344
5338
  DEVICE_ORDER.map((deviceKey) => {
5345
- const match = staticSources.find((img2) => img2.device === deviceKey);
5339
+ const match = staticSources.find((img) => img.device === deviceKey);
5346
5340
  if (!match) return null;
5347
5341
  const srcUrl = resolveImageUrl(match.imageUrl);
5348
5342
  if (!srcUrl) return null;
@@ -5358,7 +5352,17 @@ var ImageGalleryNode = (props) => {
5358
5352
  deviceKey
5359
5353
  );
5360
5354
  }),
5361
- /* @__PURE__ */ (() => {
5355
+ (() => {
5356
+ const img = staticFallback;
5357
+ const imageUrl = resolveImageUrl(img.imageUrl);
5358
+ if (!imageUrl) return null;
5359
+ const intrinsicWidth = parseMaybeNumber(img.intrinsicWidth);
5360
+ const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
5361
+ const alt = img.title || "Gallery image";
5362
+ const styles = {};
5363
+ if (img.height) styles.height = img.height;
5364
+ if (img.width) styles.width = img.width;
5365
+ if (img.borderRadius) styles.borderRadius = img.borderRadius;
5362
5366
  return (
5363
5367
  // eslint-disable-next-line @next/next/no-img-element
5364
5368
  /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HlsPlayer_default
3
- } from "./chunk-2YXREMBN.mjs";
3
+ } from "./chunk-GG2OSSQZ.mjs";
4
4
  import {
5
5
  Button_default,
6
6
  ClientButton_default,
@@ -2049,7 +2049,7 @@ import React30 from "react";
2049
2049
  // src/components/pageRenderingEngine/nodes/ImageNode.tsx
2050
2050
  import dynamic3 from "next/dynamic";
2051
2051
  import { jsx as jsx39 } from "react/jsx-runtime";
2052
- var HlsPlayer = dynamic3(() => import("./HlsPlayer-3GPS6EL2.mjs"), { ssr: false });
2052
+ var HlsPlayer = dynamic3(() => import("./HlsPlayer-TJGNEU53.mjs"), { ssr: false });
2053
2053
  var getNestedValue = (obj, path) => {
2054
2054
  if (!obj || !path) return void 0;
2055
2055
  return path.split(".").reduce((current, key) => {
@@ -3709,7 +3709,7 @@ var Pagination_default = Pagination;
3709
3709
  // src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
3710
3710
  import dynamic7 from "next/dynamic";
3711
3711
  import { Fragment as Fragment7, jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
3712
- var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-3GPS6EL2.mjs"), { ssr: false });
3712
+ var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-TJGNEU53.mjs"), { ssr: false });
3713
3713
  var deviceToMediaQuery = (device) => {
3714
3714
  switch (device) {
3715
3715
  case "sm":
@@ -3732,11 +3732,11 @@ var parseMaybeNumber = (value) => {
3732
3732
  return Number.isFinite(n) ? n : void 0;
3733
3733
  };
3734
3734
  var ImageGalleryNode = (props) => {
3735
- const resolveImageUrl = (imageUrl2) => {
3736
- if (!imageUrl2) return "";
3737
- if (imageUrl2.startsWith("http")) return imageUrl2;
3735
+ const resolveImageUrl = (imageUrl) => {
3736
+ if (!imageUrl) return "";
3737
+ if (imageUrl.startsWith("http")) return imageUrl;
3738
3738
  const base = props.assetBaseUrl.replace(/\/$/, "");
3739
- const path = imageUrl2.replace(/^\//, "");
3739
+ const path = imageUrl.replace(/^\//, "");
3740
3740
  return `${base}/${path}`;
3741
3741
  };
3742
3742
  const resolvePosterUrl = (posterUrl) => {
@@ -3745,48 +3745,42 @@ var ImageGalleryNode = (props) => {
3745
3745
  };
3746
3746
  const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
3747
3747
  const hlsImages = rawImages.filter(
3748
- (img2) => resolveImageUrl(img2.imageUrl).endsWith(".m3u8")
3748
+ (img) => resolveImageUrl(img.imageUrl).endsWith(".m3u8")
3749
3749
  );
3750
3750
  const staticImages = rawImages.filter(
3751
- (img2) => !resolveImageUrl(img2.imageUrl).endsWith(".m3u8")
3751
+ (img) => !resolveImageUrl(img.imageUrl).endsWith(".m3u8")
3752
3752
  );
3753
3753
  const hlsSources = [
3754
3754
  ...DEVICE_ORDER.flatMap((deviceKey) => {
3755
- const img2 = hlsImages.find((i) => i.device === deviceKey);
3756
- if (!img2) return [];
3757
- const src = resolveImageUrl(img2.imageUrl);
3755
+ const img = hlsImages.find((i) => i.device === deviceKey);
3756
+ if (!img) return [];
3757
+ const src = resolveImageUrl(img.imageUrl);
3758
3758
  if (!src) return [];
3759
- const media = deviceToMediaQuery(img2.device);
3760
- const posterUrl = resolvePosterUrl(img2.posterUrl);
3759
+ const media = deviceToMediaQuery(img.device);
3760
+ const posterUrl = resolvePosterUrl(img.posterUrl);
3761
3761
  return [{ src, ...media ? { media } : {}, ...posterUrl ? { posterUrl } : {} }];
3762
3762
  }),
3763
- ...hlsImages.filter((img2) => !img2.device).map((img2) => {
3764
- const src = resolveImageUrl(img2.imageUrl);
3765
- const posterUrl = resolvePosterUrl(img2.posterUrl);
3763
+ ...hlsImages.filter((img) => !img.device).map((img) => {
3764
+ const src = resolveImageUrl(img.imageUrl);
3765
+ const posterUrl = resolvePosterUrl(img.posterUrl);
3766
3766
  return { src, ...posterUrl ? { posterUrl } : {} };
3767
3767
  }).filter((s) => !!s.src)
3768
3768
  ];
3769
- const primaryHls = hlsImages.find((img2) => !img2.device) ?? hlsImages[0];
3769
+ const primaryHls = hlsImages.find((img) => !img.device) ?? hlsImages[0];
3770
3770
  const hlsIntrinsicWidth = primaryHls ? parseMaybeNumber(primaryHls.intrinsicWidth)?.toString() : void 0;
3771
3771
  const hlsIntrinsicHeight = primaryHls ? parseMaybeNumber(primaryHls.intrinsicHeight)?.toString() : void 0;
3772
- const staticSources = staticImages.filter((img2) => !!img2.device);
3773
- const staticFallback = staticImages.find((img2) => !img2.device) ?? staticImages[0] ?? null;
3772
+ const hlsStyles = {};
3773
+ if (primaryHls?.height) hlsStyles.height = primaryHls.height;
3774
+ if (primaryHls?.width) hlsStyles.width = primaryHls.width;
3775
+ if (primaryHls?.borderRadius) hlsStyles.borderRadius = primaryHls.borderRadius;
3776
+ const staticSources = staticImages.filter((img) => !!img.device);
3777
+ const staticFallback = staticImages.find((img) => !img.device) ?? staticImages[0] ?? null;
3774
3778
  const FormatClass = {
3775
3779
  center: "justify-center",
3776
3780
  left: "justify-start",
3777
3781
  right: "justify-end"
3778
3782
  };
3779
3783
  const formatClasses = FormatClass[props.node.format || ""] || "";
3780
- const img = staticFallback;
3781
- const imageUrl = resolveImageUrl(img.imageUrl);
3782
- if (!imageUrl) return null;
3783
- const intrinsicWidth = parseMaybeNumber(img.intrinsicWidth);
3784
- const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
3785
- const alt = img.title || "Gallery image";
3786
- const styles = {};
3787
- if (img.height) styles.height = img.height;
3788
- if (img.width) styles.width = img.width;
3789
- if (img.borderRadius) styles.borderRadius = img.borderRadius;
3790
3784
  return /* @__PURE__ */ jsxs31(Fragment7, { children: [
3791
3785
  hlsSources.length > 0 && /* @__PURE__ */ jsx58(Fragment7, { children: /* @__PURE__ */ jsx58(
3792
3786
  HlsPlayer2,
@@ -3800,12 +3794,12 @@ var ImageGalleryNode = (props) => {
3800
3794
  placementCode: primaryHls?.placementCode ?? "",
3801
3795
  apiBaseUrl: props.apiBaseUrl,
3802
3796
  session: props.session,
3803
- styles
3797
+ styles: hlsStyles
3804
3798
  }
3805
3799
  ) }),
3806
3800
  staticFallback && /* @__PURE__ */ jsx58(Fragment7, { children: /* @__PURE__ */ jsxs31("picture", { children: [
3807
3801
  DEVICE_ORDER.map((deviceKey) => {
3808
- const match = staticSources.find((img2) => img2.device === deviceKey);
3802
+ const match = staticSources.find((img) => img.device === deviceKey);
3809
3803
  if (!match) return null;
3810
3804
  const srcUrl = resolveImageUrl(match.imageUrl);
3811
3805
  if (!srcUrl) return null;
@@ -3821,7 +3815,17 @@ var ImageGalleryNode = (props) => {
3821
3815
  deviceKey
3822
3816
  );
3823
3817
  }),
3824
- /* @__PURE__ */ (() => {
3818
+ (() => {
3819
+ const img = staticFallback;
3820
+ const imageUrl = resolveImageUrl(img.imageUrl);
3821
+ if (!imageUrl) return null;
3822
+ const intrinsicWidth = parseMaybeNumber(img.intrinsicWidth);
3823
+ const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
3824
+ const alt = img.title || "Gallery image";
3825
+ const styles = {};
3826
+ if (img.height) styles.height = img.height;
3827
+ if (img.width) styles.width = img.width;
3828
+ if (img.borderRadius) styles.borderRadius = img.borderRadius;
3825
3829
  return (
3826
3830
  // eslint-disable-next-line @next/next/no-img-element
3827
3831
  /* @__PURE__ */ jsx58(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acoustte-digital-services/digitalstore-controls-dev",
3
- "version": "0.8.1-dev.20260527052314",
3
+ "version": "0.8.1-dev.20260527055155",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",