@streamlayer/react-ui 1.29.0 → 1.31.0

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,8 +1,8 @@
1
1
  import { jsxs as C, jsx as n } from "react/jsx-runtime";
2
2
  import { cx as B } from "@linaria/core";
3
- import { u as x } from "../../../index-T1iiS0ZO.js";
4
3
  import E from "lodash.throttle";
5
4
  import { forwardRef as $, useRef as w, useCallback as k, useEffect as m, useState as O } from "react";
5
+ import { useStore as x } from "@streamlayer/react-polyfills";
6
6
  import { Container as P, ContentContainer as T, VideoContainer as A, VideoBox as H, VideoPlayer as j, Banner as D, Notification as I, Overlay as q, Sidebar as F, SideBarOverlay as G } from "./styles.js";
7
7
  const J = () => {
8
8
  const [c, s] = O("desktop");
@@ -1,9 +1,9 @@
1
1
  import { jsx as L, jsxs as G } from "react/jsx-runtime";
2
2
  import { ConnectError as N, Code as Q } from "@connectrpc/connect";
3
- import { u as q } from "../../../../index-T1iiS0ZO.js";
4
- import V from "lodash.throttle";
5
- import { useRef as H, useMemo as X, useCallback as Y, useEffect as j, useState as U } from "react";
6
- import { f as _, g as J, m as k, h as K, i as R, j as W, C as Z, k as F } from "../../../../styles-BfnMua4o.js";
3
+ import q from "lodash.throttle";
4
+ import { useRef as H, useMemo as V, useCallback as X, useEffect as j, useState as Y } from "react";
5
+ import { f as U, g as _, m as k, h as J, i as R, j as K, C as W, k as F } from "../../../../styles-BfnMua4o.js";
6
+ import { useStore as Z } from "@streamlayer/react-polyfills";
7
7
  import { EmergencyScreen as E } from "./EmergencyScreen/index.js";
8
8
  import { EndScreen as ee } from "./EndScreen/index.js";
9
9
  import { LoaderScreen as te } from "./LoaderScreen/index.js";
@@ -13,8 +13,8 @@ import { StartScreen as ie } from "./StartScreen/index.js";
13
13
  function le(p, e, h, d) {
14
14
  return p.params.createElements && Object.keys(d).forEach((r) => {
15
15
  if (!h[r] && h.auto === !0) {
16
- let i = _(p.el, `.${d[r]}`)[0];
17
- i || (i = J("div", d[r]), i.className = d[r], p.el.append(i)), h[r] = i, e[r] = i;
16
+ let i = U(p.el, `.${d[r]}`)[0];
17
+ i || (i = _("div", d[r]), i.className = d[r], p.el.append(i)), h[r] = i, e[r] = i;
18
18
  }
19
19
  }), h;
20
20
  }
@@ -64,7 +64,7 @@ function ne(p) {
64
64
  el: null,
65
65
  bullets: []
66
66
  };
67
- let f, m = 0;
67
+ let u, m = 0;
68
68
  function y() {
69
69
  return !e.params.pagination.el || !e.pagination.el || Array.isArray(e.pagination.el) && e.pagination.el.length === 0;
70
70
  }
@@ -103,19 +103,19 @@ function ne(p) {
103
103
  if (e.params.loop ? (b = e.previousRealIndex || 0, n = e.params.slidesPerGroup > 1 ? Math.floor(e.realIndex / e.params.slidesPerGroup) : e.realIndex) : typeof e.snapIndex < "u" ? (n = e.snapIndex, b = e.previousSnapIndex) : (b = e.previousIndex || 0, n = e.activeIndex || 0), a.type === "bullets" && e.pagination.bullets && e.pagination.bullets.length > 0) {
104
104
  const c = e.pagination.bullets;
105
105
  let x, v, O;
106
- if (a.dynamicBullets && (f = K(c[0], e.isHorizontal() ? "width" : "height"), s.forEach((u) => {
107
- u.style[e.isHorizontal() ? "width" : "height"] = `${f * (a.dynamicMainBullets + 4)}px`;
108
- }), a.dynamicMainBullets > 1 && b !== void 0 && (m += n - (b || 0), m > a.dynamicMainBullets - 1 ? m = a.dynamicMainBullets - 1 : m < 0 && (m = 0)), x = Math.max(n - m, 0), v = x + (Math.min(c.length, a.dynamicMainBullets) - 1), O = (v + x) / 2), c.forEach((u) => {
106
+ if (a.dynamicBullets && (u = J(c[0], e.isHorizontal() ? "width" : "height"), s.forEach((f) => {
107
+ f.style[e.isHorizontal() ? "width" : "height"] = `${u * (a.dynamicMainBullets + 4)}px`;
108
+ }), a.dynamicMainBullets > 1 && b !== void 0 && (m += n - (b || 0), m > a.dynamicMainBullets - 1 ? m = a.dynamicMainBullets - 1 : m < 0 && (m = 0)), x = Math.max(n - m, 0), v = x + (Math.min(c.length, a.dynamicMainBullets) - 1), O = (v + x) / 2), c.forEach((f) => {
109
109
  const g = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((C) => `${a.bulletActiveClass}${C}`)].map((C) => typeof C == "string" && C.includes(" ") ? C.split(" ") : C).flat();
110
- u.classList.remove(...g);
110
+ f.classList.remove(...g);
111
111
  }), s.length > 1)
112
- c.forEach((u) => {
113
- const g = R(u);
114
- g === n ? u.classList.add(...a.bulletActiveClass.split(" ")) : e.isElement && u.setAttribute("part", "bullet"), a.dynamicBullets && (g >= x && g <= v && u.classList.add(...`${a.bulletActiveClass}-main`.split(" ")), g === x && A(u, "prev"), g === v && A(u, "next"));
112
+ c.forEach((f) => {
113
+ const g = R(f);
114
+ g === n ? f.classList.add(...a.bulletActiveClass.split(" ")) : e.isElement && f.setAttribute("part", "bullet"), a.dynamicBullets && (g >= x && g <= v && f.classList.add(...`${a.bulletActiveClass}-main`.split(" ")), g === x && A(f, "prev"), g === v && A(f, "next"));
115
115
  });
116
116
  else {
117
- const u = c[n];
118
- if (u && u.classList.add(...a.bulletActiveClass.split(" ")), e.isElement && c.forEach((g, C) => {
117
+ const f = c[n];
118
+ if (f && f.classList.add(...a.bulletActiveClass.split(" ")), e.isElement && c.forEach((g, C) => {
119
119
  g.setAttribute("part", C === n ? "bullet-active" : "bullet");
120
120
  }), a.dynamicBullets) {
121
121
  const g = c[x], C = c[v];
@@ -125,7 +125,7 @@ function ne(p) {
125
125
  }
126
126
  }
127
127
  if (a.dynamicBullets) {
128
- const u = Math.min(c.length, a.dynamicMainBullets + 4), g = (f * u - f) / 2 - O * f, C = t ? "right" : "left";
128
+ const f = Math.min(c.length, a.dynamicMainBullets + 4), g = (u * f - u) / 2 - O * u, C = t ? "right" : "left";
129
129
  c.forEach((M) => {
130
130
  M.style[e.isHorizontal() ? C : "top"] = `${g}px`;
131
131
  });
@@ -140,9 +140,9 @@ function ne(p) {
140
140
  let v;
141
141
  a.progressbarOpposite ? v = e.isHorizontal() ? "vertical" : "horizontal" : v = e.isHorizontal() ? "horizontal" : "vertical";
142
142
  const O = (n + 1) / T;
143
- let u = 1, g = 1;
144
- v === "horizontal" ? u = O : g = O, c.querySelectorAll(P(a.progressbarFillClass)).forEach((C) => {
145
- C.style.transform = `translate3d(0,0,0) scaleX(${u}) scaleY(${g})`, C.style.transitionDuration = `${e.params.speed}ms`;
143
+ let f = 1, g = 1;
144
+ v === "horizontal" ? f = O : g = O, c.querySelectorAll(P(a.progressbarFillClass)).forEach((C) => {
145
+ C.style.transform = `translate3d(0,0,0) scaleX(${f}) scaleY(${g})`, C.style.transitionDuration = `${e.params.speed}ms`;
146
146
  });
147
147
  }
148
148
  a.type === "custom" && a.renderCustom ? (c.innerHTML = a.renderCustom(e, n + 1, T), x === 0 && r("paginationRender", c)) : (x === 0 && r("paginationRender", c), r("paginationUpdate", c)), e.params.watchOverflow && e.enabled && c.classList[e.isLocked ? "add" : "remove"](a.lockClass);
@@ -172,7 +172,7 @@ function ne(p) {
172
172
  const t = e.params.pagination;
173
173
  if (!t.el) return;
174
174
  let a;
175
- typeof t.el == "string" && e.isElement && (a = e.el.querySelector(t.el)), !a && typeof t.el == "string" && (a = [...document.querySelectorAll(t.el)]), a || (a = t.el), !(!a || a.length === 0) && (e.params.uniqueNavElements && typeof t.el == "string" && Array.isArray(a) && a.length > 1 && (a = [...e.el.querySelectorAll(t.el)], a.length > 1 && (a = a.find((s) => W(s, ".swiper")[0] === e.el))), Array.isArray(a) && a.length === 1 && (a = a[0]), Object.assign(e.pagination, {
175
+ typeof t.el == "string" && e.isElement && (a = e.el.querySelector(t.el)), !a && typeof t.el == "string" && (a = [...document.querySelectorAll(t.el)]), a || (a = t.el), !(!a || a.length === 0) && (e.params.uniqueNavElements && typeof t.el == "string" && Array.isArray(a) && a.length > 1 && (a = [...e.el.querySelectorAll(t.el)], a.length > 1 && (a = a.find((s) => K(s, ".swiper")[0] === e.el))), Array.isArray(a) && a.length === 1 && (a = a[0]), Object.assign(e.pagination, {
176
176
  el: a
177
177
  }), a = k(a), a.forEach((s) => {
178
178
  t.type === "bullets" && t.clickable && s.classList.add(...(t.clickableClass || "").split(" ")), s.classList.add(t.modifierClass + t.type), s.classList.add(e.isHorizontal() ? t.horizontalClass : t.verticalClass), t.type === "bullets" && t.dynamicBullets && (s.classList.add(`${t.modifierClass}${t.type}-dynamic`), m = 0, t.dynamicMainBullets < 1 && (t.dynamicMainBullets = 1)), t.type === "progressbar" && t.progressbarOpposite && s.classList.add(t.progressbarOppositeClass), t.clickable && s.addEventListener("click", z), e.enabled || s.classList.add(t.lockClass);
@@ -243,13 +243,13 @@ function ne(p) {
243
243
  });
244
244
  }
245
245
  const re = ({ data: p, gamification: e, onEvent: h, swipeable: d, autoplay: r }) => {
246
- const i = H(), f = H(), { listOfQuestions: m, countQuestionsAvailable: y } = X(() => {
246
+ const i = H(), u = H(), { listOfQuestions: m, countQuestionsAvailable: y } = V(() => {
247
247
  const l = p ? Object.values(p) : [];
248
248
  return {
249
249
  listOfQuestions: l,
250
250
  countQuestionsAvailable: l.filter(({ marketClosed: o }) => !o).length
251
251
  };
252
- }, [p]), A = Y(
252
+ }, [p]), A = X(
253
253
  async (l, o) => {
254
254
  try {
255
255
  await e.betPackVote(l, o), h({
@@ -262,7 +262,7 @@ const re = ({ data: p, gamification: e, onEvent: h, swipeable: d, autoplay: r })
262
262
  } finally {
263
263
  i.current && clearTimeout(i.current), r && (i.current = setTimeout(() => {
264
264
  var $;
265
- ($ = f.current) == null || $.slideNext();
265
+ ($ = u.current) == null || $.slideNext();
266
266
  }, 2e3));
267
267
  }
268
268
  },
@@ -273,11 +273,11 @@ const re = ({ data: p, gamification: e, onEvent: h, swipeable: d, autoplay: r })
273
273
  payload: {
274
274
  next: () => {
275
275
  var l;
276
- return (l = f.current) == null ? void 0 : l.slideNext();
276
+ return (l = u.current) == null ? void 0 : l.slideNext();
277
277
  },
278
278
  prev: () => {
279
279
  var l;
280
- return (l = f.current) == null ? void 0 : l.slidePrev();
280
+ return (l = u.current) == null ? void 0 : l.slidePrev();
281
281
  },
282
282
  current: 0,
283
283
  canNext: !0,
@@ -313,11 +313,11 @@ const re = ({ data: p, gamification: e, onEvent: h, swipeable: d, autoplay: r })
313
313
  return;
314
314
  }
315
315
  e.closeQuestion();
316
- }, [z, S] = U(1.1);
316
+ }, [z, S] = Y(1.1);
317
317
  return j(() => {
318
- const l = V(() => {
318
+ const l = q(() => {
319
319
  var w;
320
- const o = (w = f.current) == null ? void 0 : w.size;
320
+ const o = (w = u.current) == null ? void 0 : w.size;
321
321
  if (!o)
322
322
  return;
323
323
  const D = 1 + 30 / (o / 100) / 100 * 2;
@@ -327,7 +327,7 @@ const re = ({ data: p, gamification: e, onEvent: h, swipeable: d, autoplay: r })
327
327
  window.removeEventListener("resize", l);
328
328
  };
329
329
  }, []), /* @__PURE__ */ G(
330
- Z,
330
+ W,
331
331
  {
332
332
  slidesPerView: z,
333
333
  spaceBetween: 12,
@@ -343,23 +343,23 @@ const re = ({ data: p, gamification: e, onEvent: h, swipeable: d, autoplay: r })
343
343
  i.current && clearTimeout(i.current);
344
344
  },
345
345
  onSwiper: (l) => {
346
- f.current = l;
346
+ u.current = l;
347
347
  },
348
348
  children: [
349
- /* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(ie, { sliderRef: f, countQuestionsAvailable: y }) }),
349
+ /* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(ie, { sliderRef: u, countQuestionsAvailable: y }) }),
350
350
  m.map((l) => l ? /* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(se, { children: /* @__PURE__ */ L(ae, { question: l, vote: A }) }, l.id) }) : null),
351
351
  /* @__PURE__ */ L(F, { children: /* @__PURE__ */ L(ee, { onEvent: h }) })
352
352
  ]
353
353
  }
354
354
  );
355
355
  }, ye = ({ gamification: p, autoplay: e, overlay: h, swipeable: d, onEvent: r }) => {
356
- const i = q(p.betPack.getStore()), { error: f, loading: m, data: y } = i;
357
- return m || !Object.hasOwn(i, "data") ? /* @__PURE__ */ L(te, {}) : f ? /* @__PURE__ */ L(
356
+ const i = Z(p.betPack.getStore()), { error: u, loading: m, data: y } = i;
357
+ return m || !Object.hasOwn(i, "data") ? /* @__PURE__ */ L(te, {}) : u ? /* @__PURE__ */ L(
358
358
  E,
359
359
  {
360
360
  onEvent: r,
361
361
  actionFn: () => r({ type: "slHardRefresh" }),
362
- description: f instanceof N && f.code !== Q.InvalidArgument ? `The event ID was not
362
+ description: u instanceof N && u.code !== Q.InvalidArgument ? `The event ID was not
363
363
  specified or is invalid.` : `The server is unable to
364
364
  handle this request.`
365
365
  }
@@ -1,117 +1,117 @@
1
- import { jsx as e, jsxs as y } from "react/jsx-runtime";
2
- import { cx as B } from "@linaria/core";
3
- import { useFocusable as L } from "@noriginmedia/norigin-spatial-navigation";
4
- import { useState as x, useRef as k, useEffect as P } from "react";
1
+ import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
+ import { cx as L } from "@linaria/core";
3
+ import { useFocusable as D } from "@noriginmedia/norigin-spatial-navigation";
4
+ import { useState as x, useRef as k, useEffect as h } from "react";
5
5
  import { useStore as G } from "@streamlayer/react-polyfills";
6
- import { eventBus as g } from "@streamlayer/sdk-web-interfaces";
7
- import { useLoadGAMStatic as b } from "../../../ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js";
8
- import { PauseAdOverlay as M, PauseAdContent as D, PauseAdGradientLeft as F, PauseAdGradientRight as I, PauseAdGradientBottom as j, PauseAdTopLeft as K, PauseAdTitle as N, PauseAdCaption as $, PauseAdBottomLeft as O, PauseAdPlayButton as V, PauseAdSidebar as _, ExternalAdContainer as w } from "./styles.js";
9
- const q = ({ vastUrl: t }) => {
10
- var d;
11
- const [, n] = b(), u = G(n, { keys: [t] });
12
- return (d = u == null ? void 0 : u[t]) != null && d.imageSrc ? u[t].adUrl ? /* @__PURE__ */ e("a", { href: u[t].adUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(w, { src: u[t].imageSrc }) }) : /* @__PURE__ */ e(w, { src: u[t].imageSrc }) : null;
13
- }, z = ({ isClosing: t, title: n, caption: u, onPlay: d, onClose: s, vastUrl: a, options: r }) => {
14
- const { ref: o, focusSelf: f } = L({
6
+ import { eventBus as S } from "@streamlayer/sdk-web-interfaces";
7
+ import { useLoadGAMStatic as B } from "../../../ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js";
8
+ import { PauseAdOverlay as M, PauseAdContent as F, PauseAdGradientLeft as I, PauseAdGradientRight as j, PauseAdGradientBottom as K, PauseAdTopLeft as N, PauseAdTitle as $, PauseAdCaption as O, PauseAdBottomLeft as V, PauseAdPlayButton as _, PauseAdSidebar as q, ExternalAdContainer as b } from "./styles.js";
9
+ const z = ({ vastUrl: t }) => {
10
+ var n;
11
+ const [, d] = B(), u = G(d, { keys: [t] });
12
+ return (n = u == null ? void 0 : u[t]) != null && n.imageSrc ? u[t].adUrl ? /* @__PURE__ */ e("a", { href: u[t].adUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(b, { src: u[t].imageSrc }) }) : /* @__PURE__ */ e(b, { src: u[t].imageSrc }) : null;
13
+ }, H = ({ isClosing: t, title: d, caption: u, onPlay: n, onClose: o, vastUrl: a, options: r }) => {
14
+ const f = (r == null ? void 0 : r.showPauseButton) ?? !0, { ref: s, focusSelf: m } = D({
15
15
  focusKey: "sl-pause-ad-play",
16
- onEnterRelease: d,
16
+ onEnterRelease: n,
17
17
  isFocusBoundary: !0,
18
18
  forceFocus: !0
19
19
  });
20
- return P(() => {
21
- o.current && f();
22
- }, [o, f]), P(() => {
23
- const A = (m) => {
24
- const l = m.keyCode;
25
- if (l === 461 || l === 10009 || l === 27) {
26
- m.preventDefault(), m.stopPropagation(), m.stopImmediatePropagation(), s == null || s();
20
+ return h(() => {
21
+ s.current && m();
22
+ }, [s, m]), h(() => {
23
+ const P = (l) => {
24
+ const p = l.keyCode;
25
+ if (p === 461 || p === 10009 || p === 27) {
26
+ l.preventDefault(), l.stopPropagation(), l.stopImmediatePropagation(), o == null || o();
27
27
  return;
28
28
  }
29
29
  };
30
- return window.addEventListener("keydown", A, { capture: !0 }), () => window.removeEventListener("keydown", A, { capture: !0 });
31
- }, [s]), /* @__PURE__ */ e(M, { className: B(t && "pause-ad-closing"), children: /* @__PURE__ */ y(D, { children: [
32
- /* @__PURE__ */ e(F, {}),
30
+ return window.addEventListener("keydown", P, { capture: !0 }), () => window.removeEventListener("keydown", P, { capture: !0 });
31
+ }, [o]), /* @__PURE__ */ e(M, { className: L(t && "pause-ad-closing"), children: /* @__PURE__ */ g(F, { children: [
33
32
  /* @__PURE__ */ e(I, {}),
34
33
  /* @__PURE__ */ e(j, {}),
35
- /* @__PURE__ */ y(K, { children: [
36
- /* @__PURE__ */ e(N, { children: n }),
37
- /* @__PURE__ */ e($, { children: u })
34
+ /* @__PURE__ */ e(K, {}),
35
+ /* @__PURE__ */ g(N, { children: [
36
+ /* @__PURE__ */ e($, { children: d }),
37
+ /* @__PURE__ */ e(O, { children: u })
38
38
  ] }),
39
- (r == null ? void 0 : r.showPauseButton) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
40
- V,
39
+ f && /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
40
+ _,
41
41
  {
42
- ref: o,
43
- onClick: d,
44
- onMouseEnter: () => o.current.focus(),
42
+ ref: s,
43
+ onClick: n,
44
+ onMouseEnter: () => s.current.focus(),
45
45
  "aria-label": "Resume playback"
46
46
  }
47
47
  ) }),
48
- /* @__PURE__ */ y(_, { children: [
49
- a && /* @__PURE__ */ e(q, { vastUrl: a }),
48
+ /* @__PURE__ */ g(q, { children: [
49
+ a && /* @__PURE__ */ e(z, { vastUrl: a }),
50
50
  /* @__PURE__ */ e("span", { children: "ADVERTISEMENT" })
51
51
  ] })
52
52
  ] }) });
53
- }, R = ({
53
+ }, U = ({
54
54
  showPauseAd: t,
55
- vastUrls: n,
55
+ vastUrls: d,
56
56
  title: u,
57
- caption: d,
58
- onPlay: s,
57
+ caption: n,
58
+ onPlay: o,
59
59
  onClose: a,
60
60
  onRender: r,
61
- options: o
61
+ options: f
62
62
  }) => {
63
- const [f, A] = x(!1), [m, l] = x(!1), c = k(), i = n == null ? void 0 : n[0].url, h = k(i);
64
- h.current = i;
65
- const [S, T] = b();
66
- return P(() => {
63
+ const s = (f == null ? void 0 : f.pauseAdDelay) ?? 5e3, [m, P] = x(!1), [l, p] = x(!1), c = k(), i = d == null ? void 0 : d[0].url, y = k(i);
64
+ y.current = i;
65
+ const [T, E] = B();
66
+ return h(() => {
67
67
  if (t && i) {
68
- g.emit("exposedPauseAd", {
68
+ S.emit("exposedPauseAd", {
69
69
  action: "enabled",
70
70
  payload: {}
71
- }), S(i).then((p) => {
72
- h.current === i && (p == null ? void 0 : p.success) !== !0 && (clearTimeout(c.current), a == null || a());
71
+ }), T(i).then((A) => {
72
+ y.current === i && (A == null ? void 0 : A.success) !== !0 && (clearTimeout(c.current), a == null || a());
73
73
  }).catch(() => {
74
- h.current === i && (clearTimeout(c.current), a == null || a());
74
+ y.current === i && (clearTimeout(c.current), a == null || a());
75
75
  });
76
- const E = () => {
77
- var p;
78
- (p = T.get()[h.current]) != null && p.imageSrc ? (clearTimeout(c.current), l(!1), A(!0), g.emit("exposedPauseAd", {
76
+ const w = () => {
77
+ var A;
78
+ (A = E.get()[y.current]) != null && A.imageSrc ? (clearTimeout(c.current), p(!1), P(!0), S.emit("exposedPauseAd", {
79
79
  action: "rendered",
80
80
  payload: {}
81
81
  })) : c.current = setTimeout(() => {
82
- E();
82
+ w();
83
83
  }, 200);
84
84
  };
85
85
  c.current = setTimeout(() => {
86
- E();
87
- }, 5e3);
86
+ w();
87
+ }, s);
88
88
  } else
89
- g.emit("exposedPauseAd", {
89
+ S.emit("exposedPauseAd", {
90
90
  action: "disabled",
91
91
  payload: {}
92
- }), l(!0), c.current = setTimeout(() => {
93
- A(!1);
92
+ }), p(!0), c.current = setTimeout(() => {
93
+ P(!1);
94
94
  }, 400);
95
95
  return () => {
96
96
  c.current && clearTimeout(c.current);
97
97
  };
98
- }, [T, S, a, t, i]), P(() => {
99
- r == null || r({ rendered: f });
100
- }, [f, r]), P(() => () => {
98
+ }, [E, T, a, s, t, i]), h(() => {
99
+ r == null || r({ rendered: m });
100
+ }, [m, r]), h(() => () => {
101
101
  r == null || r({ rendered: !1 });
102
- }, [r]), f ? /* @__PURE__ */ e(
103
- z,
102
+ }, [r]), m ? /* @__PURE__ */ e(
103
+ H,
104
104
  {
105
105
  onClose: a,
106
- isClosing: m,
106
+ isClosing: l,
107
107
  title: u,
108
- caption: d,
109
- onPlay: s,
108
+ caption: n,
109
+ onPlay: o,
110
110
  vastUrl: i,
111
- options: o
111
+ options: f
112
112
  }
113
113
  ) : null;
114
114
  };
115
115
  export {
116
- R as PauseAd
116
+ U as PauseAd
117
117
  };
@@ -3,6 +3,7 @@ import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
3
  import { PauseAdProps } from './ExposedPauseAd/PauseAd';
4
4
  export type StreamLayerSDKTvOptions = {
5
5
  showPauseButton?: boolean;
6
+ pauseAdDelay?: number;
6
7
  };
7
8
  export type StreamLayerSDKTvProps = {
8
9
  persistent?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.29.0",
3
+ "version": "1.31.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -20,6 +20,11 @@
20
20
  "default": "./lib/app/webos/index.js",
21
21
  "types": "./lib/app/webos/index.d.ts"
22
22
  },
23
+ "./pause-ad": {
24
+ "import": "./lib/app/webos/ExposedPauseAd/PauseAd.js",
25
+ "default": "./lib/app/webos/ExposedPauseAd/PauseAd.js",
26
+ "types": "./lib/app/webos/ExposedPauseAd/PauseAd.d.ts"
27
+ },
23
28
  "./webos/withTVRemote": {
24
29
  "import": "./lib/app/webos/withTVRemote.js",
25
30
  "default": "./lib/app/webos/withTVRemote.js",
@@ -80,19 +85,19 @@
80
85
  "@noriginmedia/norigin-spatial-navigation": "^2.3.0",
81
86
  "react-window-infinite-loader": "^1.0.9",
82
87
  "uuid": "^11.1.0",
83
- "@streamlayer/feature-gamification": "^1.22.0",
84
- "@streamlayer/react-polyfills": "^0.1.35",
85
- "@streamlayer/sdk-web-analytics": "^1.12.0",
86
- "@streamlayer/sdk-web-anonymous-auth": "^1.2.0",
87
- "@streamlayer/sdk-web": "^1.15.0",
88
- "@streamlayer/sdk-web-api": "^1.13.0",
89
- "@streamlayer/sdk-web-core": "^1.16.0",
90
- "@streamlayer/sdk-web-interfaces": "^1.7.8",
91
- "@streamlayer/sdk-web-features": "^1.0.75",
92
- "@streamlayer/sdk-web-logger": "^1.0.75",
93
- "@streamlayer/sdk-web-notifications": "^1.3.37",
94
- "@streamlayer/sdk-web-storage": "^1.0.75",
95
- "@streamlayer/sdk-web-types": "^1.15.0"
88
+ "@streamlayer/feature-gamification": "^1.22.2",
89
+ "@streamlayer/react-polyfills": "^0.1.37",
90
+ "@streamlayer/sdk-web": "^1.15.2",
91
+ "@streamlayer/sdk-web-analytics": "^1.12.2",
92
+ "@streamlayer/sdk-web-anonymous-auth": "^1.2.2",
93
+ "@streamlayer/sdk-web-api": "^1.13.2",
94
+ "@streamlayer/sdk-web-core": "^1.16.2",
95
+ "@streamlayer/sdk-web-features": "^1.0.77",
96
+ "@streamlayer/sdk-web-interfaces": "^1.7.10",
97
+ "@streamlayer/sdk-web-logger": "^1.0.77",
98
+ "@streamlayer/sdk-web-notifications": "^1.3.39",
99
+ "@streamlayer/sdk-web-storage": "^1.0.77",
100
+ "@streamlayer/sdk-web-types": "^1.15.2"
96
101
  },
97
102
  "nx": {
98
103
  "implicitDependencies": [
@@ -133,7 +138,7 @@
133
138
  "vite-plugin-svgr": "^4.2.0",
134
139
  "vite-svg-loader": "^5.1.0",
135
140
  "vite-tsconfig-paths": "^5.0.1",
136
- "@streamlayer/react": "^1.19.0"
141
+ "@streamlayer/react": "^1.20.0"
137
142
  },
138
143
  "dependencies": {
139
144
  "@dailymotion/vast-client": "^6.4.2",
@@ -1,17 +0,0 @@
1
- import { useCallback as r, useSyncExternalStore as y } from "react";
2
- function f(e, t, u) {
3
- let n = new Set(t).add(void 0);
4
- return e.listen((i, s, l) => {
5
- n.has(l) && u(i, s, l);
6
- });
7
- }
8
- function S(e, t = {}) {
9
- let u = r(
10
- (i) => t.keys ? f(e, t.keys, i) : e.listen(i),
11
- [t.keys, e]
12
- ), n = e.get.bind(e);
13
- return y(u, n, n);
14
- }
15
- export {
16
- S as u
17
- };