@streamlayer/react-ui 1.28.3 → 1.29.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.
Files changed (27) hide show
  1. package/lib/app/app/Layout/styles.d.ts +1 -0
  2. package/lib/app/app/Layout/styles.js +33 -24
  3. package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +2 -0
  4. package/lib/app/webos/ExposedPauseAd/PauseAd.js +92 -70
  5. package/lib/app/webos/ExposedPauseAd/styles.d.ts +1 -1
  6. package/lib/app/webos/ExposedPauseAd/styles.js +5 -5
  7. package/lib/app/webos/index.d.ts +4 -0
  8. package/lib/app/webos/index.js +38 -36
  9. package/lib/app/webos/story.js +29 -25
  10. package/lib/app/webos/ui/Sidebar/PromoAction.js +38 -34
  11. package/lib/app/webos/ui/Sidebar/index.js +24 -24
  12. package/lib/app/webos/ui/Sidebar/styles.d.ts +1 -0
  13. package/lib/app/webos/ui/Sidebar/styles.js +120 -115
  14. package/lib/assets/style.css +1 -1
  15. package/lib/{index-DXvAPWiE.js → index-l-eyvmpL.js} +296 -281
  16. package/lib/ui/advertisement/notification/index.js +24 -24
  17. package/lib/ui/advertisement/notification/lower-third/index.js +48 -40
  18. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +8 -7
  19. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.d.ts +9 -0
  20. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +44 -0
  21. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +240 -6
  22. package/lib/{useVastAds-CakWRNKN.js → vast-client.min-B0NUra1B.js} +358 -594
  23. package/package.json +17 -17
  24. package/lib/app/webos/ui/Layout/index.d.ts +0 -21
  25. package/lib/app/webos/ui/Layout/index.js +0 -78
  26. package/lib/app/webos/ui/Layout/styles.d.ts +0 -11
  27. package/lib/app/webos/ui/Layout/styles.js +0 -59
@@ -1,53 +1,57 @@
1
- import { jsxs as n, jsx as c, Fragment as P } from "react/jsx-runtime";
2
- import { withFocusable as H } from "../../useTvButton.js";
3
- import { PromotionButtonType as r, PromotionType as _ } from "@streamlayer/sdk-web-types";
4
- import { QRBlock as u, QR as E, QRDescBlock as A, LearnMore as O, QRHint as C, SendToUserButton as a, EnvelopeIcon as x, SendToUserText as Q } from "./styles.js";
5
- const W = H(a), i = ({ promotion: e, onClose: M }) => {
6
- var d, R, h, N, s, B, S, b, I, D, f, L, U;
7
- const l = e.buttonType, y = e.coupon, t = (d = e.banner) == null ? void 0 : d.url, T = e.type;
8
- return l === r.BASIC ? /* @__PURE__ */ n(u, { children: [
9
- t && /* @__PURE__ */ c(E, { value: t }),
10
- /* @__PURE__ */ n(A, { children: [
11
- /* @__PURE__ */ c(O, { children: "LEARN MORE" }),
12
- /* @__PURE__ */ c(C, { children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
1
+ import { jsxs as t, jsx as c, Fragment as P } from "react/jsx-runtime";
2
+ import { withFocusable as F } from "../../useTvButton.js";
3
+ import { PromotionButtonType as n, PromotionType as _ } from "@streamlayer/sdk-web-types";
4
+ import { QRBlock as u, QR as E, QRDescBlock as A, LearnMore as a, QRHint as O, EnvelopeIcon as x, SendToUserText as H, SendToUserButton as Q } from "./styles.js";
5
+ const C = F(Q), w = ({ promotion: e, onClose: M }) => {
6
+ var d, R, s, h, N, b, B, S, I, D, f, L, U;
7
+ const r = e.buttonType, y = e.coupon, l = (d = e.banner) == null ? void 0 : d.url, T = e.type;
8
+ return r === n.BASIC ? /* @__PURE__ */ t(u, { children: [
9
+ l && /* @__PURE__ */ c(E, { value: l }),
10
+ /* @__PURE__ */ t(A, { children: [
11
+ /* @__PURE__ */ c(a, { children: "LEARN MORE" }),
12
+ /* @__PURE__ */ c(O, { children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
13
13
  ] })
14
- ] }) : l === r.ADD_TO_WALLET ? /* @__PURE__ */ n(u, { children: [
14
+ ] }) : r === n.ADD_TO_WALLET ? /* @__PURE__ */ t(u, { children: [
15
15
  /* @__PURE__ */ c(E, { value: y }),
16
- /* @__PURE__ */ n(A, { children: [
17
- /* @__PURE__ */ c(O, { style: { fontSize: 18, fontWeight: 400 }, children: "ADD TO APPLE WALLET" }),
18
- /* @__PURE__ */ c(C, { style: { fontSize: 17 }, children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
16
+ /* @__PURE__ */ t(A, { children: [
17
+ /* @__PURE__ */ c(a, { style: { fontSize: 18, fontWeight: 400 }, children: "ADD TO APPLE WALLET" }),
18
+ /* @__PURE__ */ c(O, { style: { fontSize: 17 }, children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
19
19
  ] })
20
- ] }) : l === r.SEND_TO_USER && T !== _.INGAME_IAB11_LBAR ? /* @__PURE__ */ n(P, { children: [
21
- /* @__PURE__ */ n(
22
- a,
20
+ ] }) : r === n.SEND_TO_USER && T !== _.INGAME_IAB11_LBAR ? /* @__PURE__ */ t(P, { children: [
21
+ /* @__PURE__ */ t(
22
+ C,
23
23
  {
24
- backgroundColor: (h = (R = e == null ? void 0 : e.banner) == null ? void 0 : R.ctaButton) == null ? void 0 : h.color,
25
- textColor: (s = (N = e == null ? void 0 : e.banner) == null ? void 0 : N.ctaButton) == null ? void 0 : s.textColor,
24
+ backgroundColor: (s = (R = e == null ? void 0 : e.banner) == null ? void 0 : R.ctaButton) == null ? void 0 : s.color,
25
+ textColor: (N = (h = e == null ? void 0 : e.banner) == null ? void 0 : h.ctaButton) == null ? void 0 : N.textColor,
26
+ autoFocus: !0,
27
+ webos: !0,
26
28
  children: [
27
29
  /* @__PURE__ */ c(x, {}),
28
30
  "SEND INFO TO ACCOUNT EMAIL"
29
31
  ]
30
32
  }
31
33
  ),
32
- /* @__PURE__ */ n(u, { children: [
33
- t && /* @__PURE__ */ c(E, { value: t }),
34
- /* @__PURE__ */ n(A, { children: [
35
- /* @__PURE__ */ c(O, { children: "LEARN MORE" }),
36
- /* @__PURE__ */ c(C, { children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
34
+ /* @__PURE__ */ t(u, { children: [
35
+ l && /* @__PURE__ */ c(E, { value: l }),
36
+ /* @__PURE__ */ t(A, { children: [
37
+ /* @__PURE__ */ c(a, { children: "LEARN MORE" }),
38
+ /* @__PURE__ */ c(O, { children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
37
39
  ] })
38
40
  ] })
39
- ] }) : l === r.SEND_TO_USER && T === _.INGAME_IAB11_LBAR ? /* @__PURE__ */ n(
40
- a,
41
+ ] }) : r === n.SEND_TO_USER && T === _.INGAME_IAB11_LBAR ? /* @__PURE__ */ t(
42
+ C,
41
43
  {
42
- backgroundColor: (S = (B = e == null ? void 0 : e.banner) == null ? void 0 : B.ctaButton) == null ? void 0 : S.color,
43
- textColor: (I = (b = e == null ? void 0 : e.banner) == null ? void 0 : b.ctaButton) == null ? void 0 : I.textColor,
44
+ backgroundColor: (B = (b = e == null ? void 0 : e.banner) == null ? void 0 : b.ctaButton) == null ? void 0 : B.color,
45
+ textColor: (I = (S = e == null ? void 0 : e.banner) == null ? void 0 : S.ctaButton) == null ? void 0 : I.textColor,
46
+ webos: !0,
47
+ autoFocus: !0,
44
48
  children: [
45
49
  /* @__PURE__ */ c(x, {}),
46
- /* @__PURE__ */ c(Q, { children: "SEND INFO TO ACCOUNT EMAIL" })
50
+ /* @__PURE__ */ c(H, { children: "SEND INFO TO ACCOUNT EMAIL" })
47
51
  ]
48
52
  }
49
- ) : l === r.RETURN_TO_VIDEO ? /* @__PURE__ */ c(
50
- W,
53
+ ) : r === n.RETURN_TO_VIDEO ? /* @__PURE__ */ c(
54
+ C,
51
55
  {
52
56
  webos: !0,
53
57
  autoFocus: !0,
@@ -59,5 +63,5 @@ const W = H(a), i = ({ promotion: e, onClose: M }) => {
59
63
  ) : null;
60
64
  };
61
65
  export {
62
- i as PromoAction
66
+ w as PromoAction
63
67
  };
@@ -1,16 +1,16 @@
1
1
  import { jsx as d, jsxs as l, Fragment as F } from "react/jsx-runtime";
2
2
  import { updateAllLayouts as ee } from "@noriginmedia/norigin-spatial-navigation";
3
3
  import { withFocusable as oe } from "../../useTvButton.js";
4
- import { useRef as T, useState as I, useEffect as h } from "react";
4
+ import { useRef as k, useState as I, useEffect as h } from "react";
5
5
  import { eventBus as p } from "@streamlayer/sdk-web-interfaces";
6
6
  import { PromotionType as r, AutoPlayVideo as te, PlayVideoMuted as de } from "@streamlayer/sdk-web-types";
7
- import { SvgIcon as W } from "../../../../ui/icons/index.js";
7
+ import { SvgIcon as T } from "../../../../ui/icons/index.js";
8
8
  import { PromoAction as ae } from "./PromoAction.js";
9
- import { Container as ne, Header as ie, BrandBlock as re, LogoIcon as le, BrandText as pe, BrandNameContainer as se, BrandName as ce, Sponsored as ye, CloseIcon as me, VideoBlock as ue, VideoWrapper as he, FocusableVideo as Ae, VideoStatus as O, Title as Be, Description as Ie, CloseButton as be } from "./styles.js";
10
- const Me = oe(be, {
9
+ import { Wrap as ne, Container as ie, Header as re, BrandBlock as le, LogoIcon as pe, BrandText as se, BrandNameContainer as ce, BrandName as ye, Sponsored as me, CloseIcon as ue, VideoBlock as he, VideoWrapper as Ae, FocusableVideo as Be, VideoStatus as O, Title as Ie, Description as be, CloseButton as Me } from "./styles.js";
10
+ const Re = oe(Me, {
11
11
  isFocusBoundary: !0
12
- }), Le = (j) => {
13
- var N, _, w, P, S, g, L, C, G, D, v, x, U, k;
12
+ }), Ce = (j) => {
13
+ var N, _, w, P, S, g, L, C, G, D, x, U, v, W;
14
14
  const {
15
15
  promotion: e,
16
16
  open: c,
@@ -23,7 +23,7 @@ const Me = oe(be, {
23
23
  isEventFired: o,
24
24
  fireEvent: t,
25
25
  muted: $
26
- } = j, q = T(null), B = T(null), [M, z] = I(0), K = e.type === r.INGAME_IAB11_LBAR ? M : M / 2, R = !!((_ = (N = e.banner) == null ? void 0 : N.video) != null && _.url), y = e.autoPlayVideo === te.ENABLED, V = e.playVideoMuted === de.ENABLED, Q = V && y, J = e.type === r.INGAME_IAB11_LBAR || e.type === r.INGAME_IAB11 || e.type === r.INGAME_IAB11_SIDEBAR, [f, X] = I(!0), [Y, Z] = I(void 0);
26
+ } = j, q = k(null), B = k(null), [M, z] = I(0), K = e.type === r.INGAME_IAB11_LBAR ? M : M / 2, R = !!((_ = (N = e.banner) == null ? void 0 : N.video) != null && _.url), y = e.autoPlayVideo === te.ENABLED, V = e.playVideoMuted === de.ENABLED, Q = V && y, J = e.type === r.INGAME_IAB11_LBAR || e.type === r.INGAME_IAB11 || e.type === r.INGAME_IAB11_SIDEBAR, [f, X] = I(!0), [Y, Z] = I(void 0);
27
27
  let m = (w = e.banner) == null ? void 0 : w.url;
28
28
  return m && !m.startsWith("http") && (m = `https://${m}`), h(() => {
29
29
  if (!B.current) return;
@@ -40,17 +40,17 @@ const Me = oe(be, {
40
40
  i && e.type && A && A();
41
41
  }, [i, e.type, A]), h(() => () => {
42
42
  s == null || s({ muted: !1 });
43
- }, [s]), /* @__PURE__ */ d("div", { children: /* @__PURE__ */ l(ne, { ref: B, children: [
44
- /* @__PURE__ */ l(ie, { children: [
45
- e.logoMode === 1 && /* @__PURE__ */ l(re, { children: [
46
- /* @__PURE__ */ d(le, { src: (P = e.sponsor) == null ? void 0 : P.logo, alt: "Logo" }),
47
- /* @__PURE__ */ l(pe, { children: [
48
- /* @__PURE__ */ d(se, { children: /* @__PURE__ */ d(ce, { children: (S = e.sponsor) == null ? void 0 : S.name }) }),
49
- /* @__PURE__ */ d(ye, { children: "SPONSORED" })
43
+ }, [s]), /* @__PURE__ */ d(ne, { children: /* @__PURE__ */ l(ie, { ref: B, children: [
44
+ /* @__PURE__ */ l(re, { children: [
45
+ e.logoMode === 1 && /* @__PURE__ */ l(le, { children: [
46
+ /* @__PURE__ */ d(pe, { src: (P = e.sponsor) == null ? void 0 : P.logo, alt: "Logo" }),
47
+ /* @__PURE__ */ l(se, { children: [
48
+ /* @__PURE__ */ d(ce, { children: /* @__PURE__ */ d(ye, { children: (S = e.sponsor) == null ? void 0 : S.name }) }),
49
+ /* @__PURE__ */ d(me, { children: "SPONSORED" })
50
50
  ] })
51
51
  ] }),
52
52
  e.logoMode === 2 && e.type === r.INGAME_IAB11_LBAR && /* @__PURE__ */ d("img", { src: (g = e.sponsor) == null ? void 0 : g.logo, alt: "Video paused preview", style: { height: "56px" } }),
53
- /* @__PURE__ */ d(Me, { options: { focusKey: "close-ad-button" }, webos: !0, onClick: b, "data-close-btn": "true", children: /* @__PURE__ */ d(me, {}) })
53
+ /* @__PURE__ */ d(Re, { options: { focusKey: "close-ad-button" }, webos: !0, onClick: b, "data-close-btn": "true", children: /* @__PURE__ */ d(ue, {}) })
54
54
  ] }),
55
55
  e.logoMode === 2 && e.type !== r.INGAME_IAB11_LBAR && /* @__PURE__ */ d(
56
56
  "img",
@@ -65,7 +65,7 @@ const Me = oe(be, {
65
65
  }
66
66
  }
67
67
  ),
68
- ((C = e.banner) == null ? void 0 : C.imageUrl) && /* @__PURE__ */ d(ue, { style: { height: K }, children: /* @__PURE__ */ d(
68
+ ((C = e.banner) == null ? void 0 : C.imageUrl) && /* @__PURE__ */ d(he, { style: { height: K }, children: /* @__PURE__ */ d(
69
69
  "img",
70
70
  {
71
71
  src: (G = e.banner) == null ? void 0 : G.imageUrl,
@@ -73,12 +73,12 @@ const Me = oe(be, {
73
73
  style: { width: "100%", height: "100%", objectFit: "cover" }
74
74
  }
75
75
  ) }),
76
- ((D = e.banner) == null ? void 0 : D.video) && /* @__PURE__ */ l(he, { children: [
76
+ ((D = e.banner) == null ? void 0 : D.video) && /* @__PURE__ */ l(Ae, { children: [
77
77
  /* @__PURE__ */ d(
78
- Ae,
78
+ Be,
79
79
  {
80
80
  source: e.banner.video.url,
81
- poster: (x = (v = e.banner) == null ? void 0 : v.video) == null ? void 0 : x.thumbnailUrl,
81
+ poster: (U = (x = e.banner) == null ? void 0 : x.video) == null ? void 0 : U.thumbnailUrl,
82
82
  webos: !0,
83
83
  aspectRatio: J ? "1/1" : "2/1",
84
84
  ref: q,
@@ -155,21 +155,21 @@ const Me = oe(be, {
155
155
  }
156
156
  ),
157
157
  H && !f && /* @__PURE__ */ l(O, { children: [
158
- /* @__PURE__ */ d(W, { name: "icon-pause" }),
158
+ /* @__PURE__ */ d(T, { name: "icon-pause" }),
159
159
  "PAUSED"
160
160
  ] }),
161
161
  Y && Q && /* @__PURE__ */ l(O, { children: [
162
- /* @__PURE__ */ d(W, { name: "iconMute" }),
162
+ /* @__PURE__ */ d(T, { name: "iconMute" }),
163
163
  "MUTED"
164
164
  ] })
165
165
  ] }),
166
166
  e.type !== r.INGAME_IAB11 && e.type !== r.INGAME_IAB11_LBAR && e.type !== r.INGAME_IAB11_SIDEBAR && /* @__PURE__ */ l(F, { children: [
167
- /* @__PURE__ */ d(Be, { children: (U = e.banner) == null ? void 0 : U.title }),
168
- /* @__PURE__ */ d(Ie, { children: (k = e.banner) == null ? void 0 : k.body })
167
+ /* @__PURE__ */ d(Ie, { children: (v = e.banner) == null ? void 0 : v.title }),
168
+ /* @__PURE__ */ d(be, { children: (W = e.banner) == null ? void 0 : W.body })
169
169
  ] }),
170
170
  /* @__PURE__ */ d(ae, { promotion: e, onClose: b })
171
171
  ] }) });
172
172
  };
173
173
  export {
174
- Le as TVSidebar
174
+ Ce as TVSidebar
175
175
  };
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ export declare const Wrap: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
3
  export declare const Container: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
4
  export declare const Header: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
5
  export declare const BrandBlock: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;