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

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-F6CXFHUE.mjs";
4
+ } from "./chunk-2YXREMBN.mjs";
5
5
  export {
6
6
  HlsPlayer_default as default
7
7
  };
@@ -36,7 +36,8 @@ var HlsPlayer = React.memo(
36
36
  showControls = true,
37
37
  loop = false,
38
38
  playOptions = "autoplay",
39
- placementCode = ""
39
+ placementCode = "",
40
+ styles
40
41
  }) => {
41
42
  const containerRef = useRef(null);
42
43
  const videoRef = useRef(null);
@@ -299,7 +300,8 @@ var HlsPlayer = React.memo(
299
300
  "div",
300
301
  {
301
302
  ref: containerRef,
302
- className: "relative w-full aspect-video bg-black",
303
+ className: "relative w-full overflow-hidden aspect-video bg-black",
304
+ style: styles,
303
305
  onMouseEnter: handleMouseEnter,
304
306
  onMouseLeave: handleMouseLeave,
305
307
  onMouseMove: handleMouseMove,
package/dist/index.js CHANGED
@@ -200,7 +200,8 @@ var init_HlsPlayer = __esm({
200
200
  showControls = true,
201
201
  loop = false,
202
202
  playOptions = "autoplay",
203
- placementCode = ""
203
+ placementCode = "",
204
+ styles
204
205
  }) => {
205
206
  const containerRef = (0, import_react4.useRef)(null);
206
207
  const videoRef = (0, import_react4.useRef)(null);
@@ -463,7 +464,8 @@ var init_HlsPlayer = __esm({
463
464
  "div",
464
465
  {
465
466
  ref: containerRef,
466
- className: "relative w-full aspect-video bg-black",
467
+ className: "relative w-full overflow-hidden aspect-video bg-black",
468
+ style: styles,
467
469
  onMouseEnter: handleMouseEnter,
468
470
  onMouseLeave: handleMouseLeave,
469
471
  onMouseMove: handleMouseMove,
@@ -5267,11 +5269,11 @@ var parseMaybeNumber = (value) => {
5267
5269
  return Number.isFinite(n) ? n : void 0;
5268
5270
  };
5269
5271
  var ImageGalleryNode = (props) => {
5270
- const resolveImageUrl = (imageUrl) => {
5271
- if (!imageUrl) return "";
5272
- if (imageUrl.startsWith("http")) return imageUrl;
5272
+ const resolveImageUrl = (imageUrl2) => {
5273
+ if (!imageUrl2) return "";
5274
+ if (imageUrl2.startsWith("http")) return imageUrl2;
5273
5275
  const base = props.assetBaseUrl.replace(/\/$/, "");
5274
- const path = imageUrl.replace(/^\//, "");
5276
+ const path = imageUrl2.replace(/^\//, "");
5275
5277
  return `${base}/${path}`;
5276
5278
  };
5277
5279
  const resolvePosterUrl = (posterUrl) => {
@@ -5280,38 +5282,48 @@ var ImageGalleryNode = (props) => {
5280
5282
  };
5281
5283
  const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
5282
5284
  const hlsImages = rawImages.filter(
5283
- (img) => resolveImageUrl(img.imageUrl).endsWith(".m3u8")
5285
+ (img2) => resolveImageUrl(img2.imageUrl).endsWith(".m3u8")
5284
5286
  );
5285
5287
  const staticImages = rawImages.filter(
5286
- (img) => !resolveImageUrl(img.imageUrl).endsWith(".m3u8")
5288
+ (img2) => !resolveImageUrl(img2.imageUrl).endsWith(".m3u8")
5287
5289
  );
5288
5290
  const hlsSources = [
5289
5291
  ...DEVICE_ORDER.flatMap((deviceKey) => {
5290
- const img = hlsImages.find((i) => i.device === deviceKey);
5291
- if (!img) return [];
5292
- const src = resolveImageUrl(img.imageUrl);
5292
+ const img2 = hlsImages.find((i) => i.device === deviceKey);
5293
+ if (!img2) return [];
5294
+ const src = resolveImageUrl(img2.imageUrl);
5293
5295
  if (!src) return [];
5294
- const media = deviceToMediaQuery(img.device);
5295
- const posterUrl = resolvePosterUrl(img.posterUrl);
5296
+ const media = deviceToMediaQuery(img2.device);
5297
+ const posterUrl = resolvePosterUrl(img2.posterUrl);
5296
5298
  return [{ src, ...media ? { media } : {}, ...posterUrl ? { posterUrl } : {} }];
5297
5299
  }),
5298
- ...hlsImages.filter((img) => !img.device).map((img) => {
5299
- const src = resolveImageUrl(img.imageUrl);
5300
- const posterUrl = resolvePosterUrl(img.posterUrl);
5300
+ ...hlsImages.filter((img2) => !img2.device).map((img2) => {
5301
+ const src = resolveImageUrl(img2.imageUrl);
5302
+ const posterUrl = resolvePosterUrl(img2.posterUrl);
5301
5303
  return { src, ...posterUrl ? { posterUrl } : {} };
5302
5304
  }).filter((s) => !!s.src)
5303
5305
  ];
5304
- const primaryHls = hlsImages.find((img) => !img.device) ?? hlsImages[0];
5306
+ const primaryHls = hlsImages.find((img2) => !img2.device) ?? hlsImages[0];
5305
5307
  const hlsIntrinsicWidth = primaryHls ? parseMaybeNumber(primaryHls.intrinsicWidth)?.toString() : void 0;
5306
5308
  const hlsIntrinsicHeight = primaryHls ? parseMaybeNumber(primaryHls.intrinsicHeight)?.toString() : void 0;
5307
- const staticSources = staticImages.filter((img) => !!img.device);
5308
- const staticFallback = staticImages.find((img) => !img.device) ?? staticImages[0] ?? null;
5309
+ const staticSources = staticImages.filter((img2) => !!img2.device);
5310
+ const staticFallback = staticImages.find((img2) => !img2.device) ?? staticImages[0] ?? null;
5309
5311
  const FormatClass = {
5310
5312
  center: "justify-center",
5311
5313
  left: "justify-start",
5312
5314
  right: "justify-end"
5313
5315
  };
5314
5316
  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;
5315
5327
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
5316
5328
  hlsSources.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5317
5329
  HlsPlayer3,
@@ -5324,12 +5336,13 @@ var ImageGalleryNode = (props) => {
5324
5336
  playOptions: primaryHls?.playOptions ?? "",
5325
5337
  placementCode: primaryHls?.placementCode ?? "",
5326
5338
  apiBaseUrl: props.apiBaseUrl,
5327
- session: props.session
5339
+ session: props.session,
5340
+ styles
5328
5341
  }
5329
5342
  ) }),
5330
5343
  staticFallback && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_jsx_runtime69.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("picture", { children: [
5331
5344
  DEVICE_ORDER.map((deviceKey) => {
5332
- const match = staticSources.find((img) => img.device === deviceKey);
5345
+ const match = staticSources.find((img2) => img2.device === deviceKey);
5333
5346
  if (!match) return null;
5334
5347
  const srcUrl = resolveImageUrl(match.imageUrl);
5335
5348
  if (!srcUrl) return null;
@@ -5345,17 +5358,7 @@ var ImageGalleryNode = (props) => {
5345
5358
  deviceKey
5346
5359
  );
5347
5360
  }),
5348
- (() => {
5349
- const img = staticFallback;
5350
- const imageUrl = resolveImageUrl(img.imageUrl);
5351
- if (!imageUrl) return null;
5352
- const intrinsicWidth = parseMaybeNumber(img.intrinsicWidth);
5353
- const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
5354
- const alt = img.title || "Gallery image";
5355
- const styles = {};
5356
- if (img.height) styles.height = img.height;
5357
- if (img.width) styles.width = img.width;
5358
- if (img.borderRadius) styles.borderRadius = img.borderRadius;
5361
+ /* @__PURE__ */ (() => {
5359
5362
  return (
5360
5363
  // eslint-disable-next-line @next/next/no-img-element
5361
5364
  /* @__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-F6CXFHUE.mjs";
3
+ } from "./chunk-2YXREMBN.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-G27NMG7A.mjs"), { ssr: false });
2052
+ var HlsPlayer = dynamic3(() => import("./HlsPlayer-3GPS6EL2.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-G27NMG7A.mjs"), { ssr: false });
3712
+ var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-3GPS6EL2.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 = (imageUrl) => {
3736
- if (!imageUrl) return "";
3737
- if (imageUrl.startsWith("http")) return imageUrl;
3735
+ const resolveImageUrl = (imageUrl2) => {
3736
+ if (!imageUrl2) return "";
3737
+ if (imageUrl2.startsWith("http")) return imageUrl2;
3738
3738
  const base = props.assetBaseUrl.replace(/\/$/, "");
3739
- const path = imageUrl.replace(/^\//, "");
3739
+ const path = imageUrl2.replace(/^\//, "");
3740
3740
  return `${base}/${path}`;
3741
3741
  };
3742
3742
  const resolvePosterUrl = (posterUrl) => {
@@ -3745,38 +3745,48 @@ var ImageGalleryNode = (props) => {
3745
3745
  };
3746
3746
  const rawImages = Array.isArray(props.node.images) ? props.node.images : [];
3747
3747
  const hlsImages = rawImages.filter(
3748
- (img) => resolveImageUrl(img.imageUrl).endsWith(".m3u8")
3748
+ (img2) => resolveImageUrl(img2.imageUrl).endsWith(".m3u8")
3749
3749
  );
3750
3750
  const staticImages = rawImages.filter(
3751
- (img) => !resolveImageUrl(img.imageUrl).endsWith(".m3u8")
3751
+ (img2) => !resolveImageUrl(img2.imageUrl).endsWith(".m3u8")
3752
3752
  );
3753
3753
  const hlsSources = [
3754
3754
  ...DEVICE_ORDER.flatMap((deviceKey) => {
3755
- const img = hlsImages.find((i) => i.device === deviceKey);
3756
- if (!img) return [];
3757
- const src = resolveImageUrl(img.imageUrl);
3755
+ const img2 = hlsImages.find((i) => i.device === deviceKey);
3756
+ if (!img2) return [];
3757
+ const src = resolveImageUrl(img2.imageUrl);
3758
3758
  if (!src) return [];
3759
- const media = deviceToMediaQuery(img.device);
3760
- const posterUrl = resolvePosterUrl(img.posterUrl);
3759
+ const media = deviceToMediaQuery(img2.device);
3760
+ const posterUrl = resolvePosterUrl(img2.posterUrl);
3761
3761
  return [{ src, ...media ? { media } : {}, ...posterUrl ? { posterUrl } : {} }];
3762
3762
  }),
3763
- ...hlsImages.filter((img) => !img.device).map((img) => {
3764
- const src = resolveImageUrl(img.imageUrl);
3765
- const posterUrl = resolvePosterUrl(img.posterUrl);
3763
+ ...hlsImages.filter((img2) => !img2.device).map((img2) => {
3764
+ const src = resolveImageUrl(img2.imageUrl);
3765
+ const posterUrl = resolvePosterUrl(img2.posterUrl);
3766
3766
  return { src, ...posterUrl ? { posterUrl } : {} };
3767
3767
  }).filter((s) => !!s.src)
3768
3768
  ];
3769
- const primaryHls = hlsImages.find((img) => !img.device) ?? hlsImages[0];
3769
+ const primaryHls = hlsImages.find((img2) => !img2.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((img) => !!img.device);
3773
- const staticFallback = staticImages.find((img) => !img.device) ?? staticImages[0] ?? null;
3772
+ const staticSources = staticImages.filter((img2) => !!img2.device);
3773
+ const staticFallback = staticImages.find((img2) => !img2.device) ?? staticImages[0] ?? null;
3774
3774
  const FormatClass = {
3775
3775
  center: "justify-center",
3776
3776
  left: "justify-start",
3777
3777
  right: "justify-end"
3778
3778
  };
3779
3779
  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;
3780
3790
  return /* @__PURE__ */ jsxs31(Fragment7, { children: [
3781
3791
  hlsSources.length > 0 && /* @__PURE__ */ jsx58(Fragment7, { children: /* @__PURE__ */ jsx58(
3782
3792
  HlsPlayer2,
@@ -3789,12 +3799,13 @@ var ImageGalleryNode = (props) => {
3789
3799
  playOptions: primaryHls?.playOptions ?? "",
3790
3800
  placementCode: primaryHls?.placementCode ?? "",
3791
3801
  apiBaseUrl: props.apiBaseUrl,
3792
- session: props.session
3802
+ session: props.session,
3803
+ styles
3793
3804
  }
3794
3805
  ) }),
3795
3806
  staticFallback && /* @__PURE__ */ jsx58(Fragment7, { children: /* @__PURE__ */ jsxs31("picture", { children: [
3796
3807
  DEVICE_ORDER.map((deviceKey) => {
3797
- const match = staticSources.find((img) => img.device === deviceKey);
3808
+ const match = staticSources.find((img2) => img2.device === deviceKey);
3798
3809
  if (!match) return null;
3799
3810
  const srcUrl = resolveImageUrl(match.imageUrl);
3800
3811
  if (!srcUrl) return null;
@@ -3810,17 +3821,7 @@ var ImageGalleryNode = (props) => {
3810
3821
  deviceKey
3811
3822
  );
3812
3823
  }),
3813
- (() => {
3814
- const img = staticFallback;
3815
- const imageUrl = resolveImageUrl(img.imageUrl);
3816
- if (!imageUrl) return null;
3817
- const intrinsicWidth = parseMaybeNumber(img.intrinsicWidth);
3818
- const intrinsicHeight = parseMaybeNumber(img.intrinsicHeight);
3819
- const alt = img.title || "Gallery image";
3820
- const styles = {};
3821
- if (img.height) styles.height = img.height;
3822
- if (img.width) styles.width = img.width;
3823
- if (img.borderRadius) styles.borderRadius = img.borderRadius;
3824
+ /* @__PURE__ */ (() => {
3824
3825
  return (
3825
3826
  // eslint-disable-next-line @next/next/no-img-element
3826
3827
  /* @__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.20260526122912",
3
+ "version": "0.8.1-dev.20260527052314",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",