@acoustte-digital-services/digitalstore-controls-dev 0.8.1-dev.20260525045412 → 0.8.1-dev.20260525110354

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-BYK57CMC.mjs";
4
+ } from "./chunk-F6CXFHUE.mjs";
5
5
  export {
6
6
  HlsPlayer_default as default
7
7
  };
@@ -174,17 +174,11 @@ var HlsPlayer = React.memo(
174
174
  useEffect(() => {
175
175
  if (!isInView) return;
176
176
  if (isPlayOnHover) return;
177
- if (playOptions === "autoplay") {
178
- initHls(
179
- /* autoPlayAfterLoad */
180
- true
181
- );
182
- } else {
183
- initHls(
184
- /* autoPlayAfterLoad */
185
- false
186
- );
187
- }
177
+ if (playOptions !== "autoplay") return;
178
+ initHls(
179
+ /* autoPlayAfterLoad */
180
+ true
181
+ );
188
182
  return () => {
189
183
  if (hlsRef.current) {
190
184
  hlsRef.current.destroy();
@@ -192,7 +186,7 @@ var HlsPlayer = React.memo(
192
186
  }
193
187
  hlsInitializedRef.current = false;
194
188
  };
195
- }, [JSON.stringify(resolvedSources), isPlayOnHover, isInView]);
189
+ }, [JSON.stringify(resolvedSources), isPlayOnHover, isInView, playOptions]);
196
190
  const handlePlayPause = useCallback(() => {
197
191
  const v = videoRef.current;
198
192
  if (!v) return;
@@ -321,10 +315,10 @@ var HlsPlayer = React.memo(
321
315
  autoPlay: playOptions === "autoplay",
322
316
  loop,
323
317
  playsInline: true,
324
- preload: isPlayOnHover ? "none" : "auto",
318
+ preload: playOptions === "autoplay" ? "auto" : "none",
325
319
  onClick: handleVideoClick,
326
320
  onDoubleClick: handleVideoDoubleClick,
327
- children: !isPlayOnHover && resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ jsx(
321
+ children: playOptions === "autoplay" && resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ jsx(
328
322
  "source",
329
323
  {
330
324
  src,
package/dist/index.js CHANGED
@@ -338,17 +338,11 @@ var init_HlsPlayer = __esm({
338
338
  (0, import_react4.useEffect)(() => {
339
339
  if (!isInView) return;
340
340
  if (isPlayOnHover) return;
341
- if (playOptions === "autoplay") {
342
- initHls(
343
- /* autoPlayAfterLoad */
344
- true
345
- );
346
- } else {
347
- initHls(
348
- /* autoPlayAfterLoad */
349
- false
350
- );
351
- }
341
+ if (playOptions !== "autoplay") return;
342
+ initHls(
343
+ /* autoPlayAfterLoad */
344
+ true
345
+ );
352
346
  return () => {
353
347
  if (hlsRef.current) {
354
348
  hlsRef.current.destroy();
@@ -356,7 +350,7 @@ var init_HlsPlayer = __esm({
356
350
  }
357
351
  hlsInitializedRef.current = false;
358
352
  };
359
- }, [JSON.stringify(resolvedSources), isPlayOnHover, isInView]);
353
+ }, [JSON.stringify(resolvedSources), isPlayOnHover, isInView, playOptions]);
360
354
  const handlePlayPause = (0, import_react4.useCallback)(() => {
361
355
  const v = videoRef.current;
362
356
  if (!v) return;
@@ -485,10 +479,10 @@ var init_HlsPlayer = __esm({
485
479
  autoPlay: playOptions === "autoplay",
486
480
  loop,
487
481
  playsInline: true,
488
- preload: isPlayOnHover ? "none" : "auto",
482
+ preload: playOptions === "autoplay" ? "auto" : "none",
489
483
  onClick: handleVideoClick,
490
484
  onDoubleClick: handleVideoDoubleClick,
491
- children: !isPlayOnHover && resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
485
+ children: playOptions === "autoplay" && resolvedSources.map(({ src, media }, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
492
486
  "source",
493
487
  {
494
488
  src,
@@ -3532,7 +3526,10 @@ var ImageNode = (props) => {
3532
3526
  } else if (props.dataitem && props.node.datafield) {
3533
3527
  const image = getNestedValue(props.dataitem, props.node.datafield);
3534
3528
  if (typeof image === "string") {
3535
- assets = JSON.parse(image);
3529
+ const trimmed = image.trim();
3530
+ if (trimmed) {
3531
+ assets = JSON.parse(trimmed);
3532
+ }
3536
3533
  } else if (Array.isArray(image)) {
3537
3534
  assets = image;
3538
3535
  } else if (image && typeof image === "object") {
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HlsPlayer_default
3
- } from "./chunk-BYK57CMC.mjs";
3
+ } from "./chunk-F6CXFHUE.mjs";
4
4
  import {
5
5
  Button_default,
6
6
  ClientButton_default,
@@ -1975,7 +1975,7 @@ import React28 from "react";
1975
1975
  // src/components/pageRenderingEngine/nodes/ImageNode.tsx
1976
1976
  import dynamic3 from "next/dynamic";
1977
1977
  import { jsx as jsx38 } from "react/jsx-runtime";
1978
- var HlsPlayer = dynamic3(() => import("./HlsPlayer-OPTPF5PZ.mjs"), { ssr: false });
1978
+ var HlsPlayer = dynamic3(() => import("./HlsPlayer-G27NMG7A.mjs"), { ssr: false });
1979
1979
  var getNestedValue = (obj, path) => {
1980
1980
  if (!obj || !path) return void 0;
1981
1981
  return path.split(".").reduce((current, key) => {
@@ -1997,7 +1997,10 @@ var ImageNode = (props) => {
1997
1997
  } else if (props.dataitem && props.node.datafield) {
1998
1998
  const image = getNestedValue(props.dataitem, props.node.datafield);
1999
1999
  if (typeof image === "string") {
2000
- assets = JSON.parse(image);
2000
+ const trimmed = image.trim();
2001
+ if (trimmed) {
2002
+ assets = JSON.parse(trimmed);
2003
+ }
2001
2004
  } else if (Array.isArray(image)) {
2002
2005
  assets = image;
2003
2006
  } else if (image && typeof image === "object") {
@@ -3632,7 +3635,7 @@ var Pagination_default = Pagination;
3632
3635
  // src/components/pageRenderingEngine/nodes/ImageGalleryNode.tsx
3633
3636
  import dynamic7 from "next/dynamic";
3634
3637
  import { Fragment as Fragment7, jsx as jsx57, jsxs as jsxs31 } from "react/jsx-runtime";
3635
- var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-OPTPF5PZ.mjs"), { ssr: false });
3638
+ var HlsPlayer2 = dynamic7(() => import("./HlsPlayer-G27NMG7A.mjs"), { ssr: false });
3636
3639
  var deviceToMediaQuery = (device) => {
3637
3640
  switch (device) {
3638
3641
  case "sm":
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.20260525045412",
3
+ "version": "0.8.1-dev.20260525110354",
4
4
  "description": "Reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",