@streamlayer/react-ui 1.28.2 → 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 (39) 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/Advertisement/AdvertisementUI.d.ts +0 -1
  4. package/lib/app/webos/Advertisement/AdvertisementUI.js +13 -15
  5. package/lib/app/webos/Advertisement/index.js +10 -11
  6. package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +2 -0
  7. package/lib/app/webos/ExposedPauseAd/PauseAd.js +92 -70
  8. package/lib/app/webos/ExposedPauseAd/styles.d.ts +1 -1
  9. package/lib/app/webos/ExposedPauseAd/styles.js +5 -5
  10. package/lib/app/webos/index.d.ts +4 -0
  11. package/lib/app/webos/index.js +38 -36
  12. package/lib/app/webos/story.js +47 -36
  13. package/lib/app/webos/ui/Sidebar/PromoAction.js +38 -34
  14. package/lib/app/webos/ui/Sidebar/index.d.ts +0 -1
  15. package/lib/app/webos/ui/Sidebar/index.js +70 -71
  16. package/lib/app/webos/ui/Sidebar/styles.d.ts +1 -0
  17. package/lib/app/webos/ui/Sidebar/styles.js +120 -115
  18. package/lib/app/webos/ui/insight/index.js +43 -77
  19. package/lib/assets/style.css +1 -1
  20. package/lib/{index-DXvAPWiE.js → index-l-eyvmpL.js} +296 -281
  21. package/lib/ui/advertisement/notification/index.js +24 -24
  22. package/lib/ui/advertisement/notification/lower-third/index.js +48 -40
  23. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +8 -7
  24. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.d.ts +9 -0
  25. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +44 -0
  26. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +240 -6
  27. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.js +62 -52
  28. package/lib/ui/video-player/index.d.ts +1 -0
  29. package/lib/ui/video-player/index.js +138 -125
  30. package/lib/ui/video-player/styles.d.ts +1 -0
  31. package/lib/ui/video-player/styles.js +32 -27
  32. package/lib/{useVastAds-CakWRNKN.js → vast-client.min-B0NUra1B.js} +358 -594
  33. package/package.json +17 -17
  34. package/lib/app/webos/ui/Layout/index.d.ts +0 -21
  35. package/lib/app/webos/ui/Layout/index.js +0 -78
  36. package/lib/app/webos/ui/Layout/styles.d.ts +0 -11
  37. package/lib/app/webos/ui/Layout/styles.js +0 -59
  38. package/lib/hooks/useKeyboardNavigation.d.ts +0 -15
  39. package/lib/hooks/useKeyboardNavigation.js +0 -74
@@ -1,3 +1,4 @@
1
+ export declare const breakpoints: (value: string) => string;
1
2
  export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
3
  export declare const ContentContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
4
  export declare const Sidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,64 +1,73 @@
1
1
  import { styled as s } from "@linaria/react";
2
- const e = /* @__PURE__ */ s("div")({
2
+ const n = (a) => `
3
+ @media only screen and (max-width: 1024px) {
4
+ ${a}
5
+ }
6
+
7
+ @media only screen and (max-width: 1366px) and (orientation: landscape) {
8
+ ${a}
9
+ }
10
+ `, o = /* @__PURE__ */ s("div")({
3
11
  name: "Container",
4
12
  class: "c6rz41d",
5
13
  propsAsIs: !1
6
- }), n = /* @__PURE__ */ s("div")({
14
+ }), i = /* @__PURE__ */ s("div")({
7
15
  name: "ContentContainer",
8
16
  class: "clv6awu",
9
17
  propsAsIs: !1
10
- }), o = /* @__PURE__ */ s("div")({
18
+ }), t = /* @__PURE__ */ s("div")({
11
19
  name: "Sidebar",
12
20
  class: "ssfv9z7",
13
21
  propsAsIs: !1
14
- }), i = /* @__PURE__ */ s("div")({
22
+ }), r = /* @__PURE__ */ s("div")({
15
23
  name: "SideBarOverlay",
16
24
  class: "sweyrp8",
17
25
  propsAsIs: !1
18
- }), r = /* @__PURE__ */ s("div")({
26
+ }), p = /* @__PURE__ */ s("div")({
19
27
  name: "Banner",
20
28
  class: "b5w8mb1",
21
29
  propsAsIs: !1
22
- }), t = /* @__PURE__ */ s("div")({
30
+ }), l = /* @__PURE__ */ s("div")({
23
31
  name: "VideoContainer",
24
32
  class: "v1uhtlpt",
25
33
  propsAsIs: !1
26
- }), p = /* @__PURE__ */ s("div")({
34
+ }), c = /* @__PURE__ */ s("div")({
27
35
  name: "VideoBox",
28
36
  class: "v7viet2",
29
37
  propsAsIs: !1
30
- }), l = /* @__PURE__ */ s("div")({
38
+ }), d = /* @__PURE__ */ s("div")({
31
39
  name: "VideoPlayer",
32
40
  class: "v9y7cje",
33
41
  propsAsIs: !1
34
- }), c = /* @__PURE__ */ s("div")({
42
+ }), m = /* @__PURE__ */ s("div")({
35
43
  name: "Overlay",
36
44
  class: "opmmtyi",
37
45
  propsAsIs: !1
38
- }), d = /* @__PURE__ */ s("div")({
46
+ }), v = /* @__PURE__ */ s("div")({
39
47
  name: "Notification",
40
48
  class: "nk5geky",
41
49
  propsAsIs: !1
42
- }), v = /* @__PURE__ */ s("div")({
50
+ }), f = /* @__PURE__ */ s("div")({
43
51
  name: "PointsContainer",
44
52
  class: "p17bxk8w",
45
53
  propsAsIs: !1
46
- }), m = /* @__PURE__ */ s("div")({
54
+ }), A = /* @__PURE__ */ s("div")({
47
55
  name: "InApp",
48
56
  class: "i1h25kze",
49
57
  propsAsIs: !1
50
58
  });
51
59
  export {
52
- r as Banner,
53
- e as Container,
54
- n as ContentContainer,
55
- m as InApp,
56
- d as Notification,
57
- c as Overlay,
58
- v as PointsContainer,
59
- i as SideBarOverlay,
60
- o as Sidebar,
61
- p as VideoBox,
62
- t as VideoContainer,
63
- l as VideoPlayer
60
+ p as Banner,
61
+ o as Container,
62
+ i as ContentContainer,
63
+ A as InApp,
64
+ v as Notification,
65
+ m as Overlay,
66
+ f as PointsContainer,
67
+ r as SideBarOverlay,
68
+ t as Sidebar,
69
+ c as VideoBox,
70
+ l as VideoContainer,
71
+ d as VideoPlayer,
72
+ n as breakpoints
64
73
  };
@@ -17,6 +17,5 @@ export declare const AdvertisementUI: React.FC<{
17
17
  fireEvent: Advertisement['fireEvent'];
18
18
  muted?: boolean;
19
19
  toggleMute: (flag: boolean) => void;
20
- isMuted?: boolean;
21
20
  isNotification?: boolean;
22
21
  }>;
@@ -1,9 +1,9 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { TVSidebar as S } from "../ui/Sidebar/index.js";
3
- import { Banner as b } from "../../../ui/advertisement/banner/index.js";
4
- import { Notification as g } from "../../../ui/advertisement/notification/index.js";
5
- import { Sidebar as s } from "../../../ui/advertisement/sidebar/index.js";
6
- const B = ({
2
+ import { TVSidebar as N } from "../ui/Sidebar/index.js";
3
+ import { Banner as S } from "../../../ui/advertisement/banner/index.js";
4
+ import { Notification as b } from "../../../ui/advertisement/notification/index.js";
5
+ import { Sidebar as g } from "../../../ui/advertisement/sidebar/index.js";
6
+ const A = ({
7
7
  advertisement: o,
8
8
  close: t,
9
9
  skipAutoClose: p,
@@ -18,10 +18,9 @@ const B = ({
18
18
  fireEvent: u,
19
19
  muted: I,
20
20
  toggleMute: h,
21
- isMuted: q,
22
- isNotification: N
23
- }) => o.promotion ? N && o.notification ? /* @__PURE__ */ r(
24
- g,
21
+ isNotification: q
22
+ }) => o.promotion ? q && o.notification ? /* @__PURE__ */ r(
23
+ b,
25
24
  {
26
25
  open: () => i == null ? void 0 : i({ fromNotification: !0 }),
27
26
  notification: o.notification,
@@ -29,8 +28,8 @@ const B = ({
29
28
  close: t,
30
29
  webos: !0
31
30
  }
32
- ) : n ? /* @__PURE__ */ r(s, { className: "PromoSidebarContainer", direction: n, hiding: !1, children: /* @__PURE__ */ r(
33
- S,
31
+ ) : n ? /* @__PURE__ */ r(g, { className: "PromoSidebarContainer", direction: n, hiding: !1, children: /* @__PURE__ */ r(
32
+ N,
34
33
  {
35
34
  markAsViewed: c,
36
35
  promotionId: o.question.id,
@@ -44,11 +43,10 @@ const B = ({
44
43
  isEventFired: m,
45
44
  fireEvent: u,
46
45
  muted: I,
47
- toggleMute: h,
48
- isMuted: q
46
+ toggleMute: h
49
47
  }
50
48
  ) }) : f ? /* @__PURE__ */ r(
51
- b,
49
+ S,
52
50
  {
53
51
  promotionId: o.question.id,
54
52
  hiding: !1,
@@ -59,5 +57,5 @@ const B = ({
59
57
  }
60
58
  ) : null : null;
61
59
  export {
62
- B as AdvertisementUI
60
+ A as AdvertisementUI
63
61
  };
@@ -1,15 +1,15 @@
1
- import { jsxs as M, jsx as P } from "react/jsx-runtime";
2
- import { cx as T } from "@linaria/core";
3
- import { styled as V } from "@linaria/react";
4
- import { useAnalyticsListener as x } from "../../../hooks/analytics.js";
5
- import { useHideTransition as F } from "../../../hooks/showIn.js";
1
+ import { jsxs as T, jsx as P } from "react/jsx-runtime";
2
+ import { cx as V } from "@linaria/core";
3
+ import { styled as x } from "@linaria/react";
4
+ import { useAnalyticsListener as F } from "../../../hooks/analytics.js";
5
+ import { useHideTransition as M } from "../../../hooks/showIn.js";
6
6
  import { forwardRef as O, useEffect as B, useRef as j } from "react";
7
7
  import { useStore as u } from "@streamlayer/react-polyfills";
8
8
  import { eventBus as E } from "@streamlayer/sdk-web-interfaces";
9
9
  import { PromotionType as q, FeatureType as D } from "@streamlayer/sdk-web-types";
10
10
  import { useAdvertisementBackground as H } from "../../../ui/theme/utils.js";
11
11
  import { AdvertisementUI as K } from "./AdvertisementUI.js";
12
- const N = /* @__PURE__ */ V("div")({
12
+ const N = /* @__PURE__ */ x("div")({
13
13
  name: "AdvertisementUIWrap",
14
14
  class: "a17b2u9w",
15
15
  propsAsIs: !1
@@ -45,8 +45,8 @@ const N = /* @__PURE__ */ V("div")({
45
45
  var p, f, g, v, A, b, S, y, U, I;
46
46
  const e = u(t.advertisement.$store), {
47
47
  finished: c
48
- } = F();
49
- x(d, {
48
+ } = M();
49
+ F(d, {
50
50
  enabled: !!e.data,
51
51
  event: "click",
52
52
  listener: R
@@ -59,12 +59,12 @@ const N = /* @__PURE__ */ V("div")({
59
59
  landscapeUrl: W,
60
60
  portraitUrl: h
61
61
  });
62
- return e.data === void 0 || !m && e.isViewed ? null : /* @__PURE__ */ M(N, {
62
+ return e.data === void 0 || !m && e.isViewed ? null : /* @__PURE__ */ T(N, {
63
63
  ref: d,
64
64
  style: {
65
65
  height: k ? "auto" : "100%"
66
66
  },
67
- className: T("SL-AdvertisementUIWrap", "SL-AdvertisementWebOs", "SL-AdvertisementUIWrap--lower-third"),
67
+ className: V("SL-AdvertisementUIWrap", "SL-AdvertisementWebOs", "SL-AdvertisementUIWrap--lower-third"),
68
68
  children: [!n && w, /* @__PURE__ */ P(K, {
69
69
  sidebar: s,
70
70
  banner: i,
@@ -74,7 +74,6 @@ const N = /* @__PURE__ */ V("div")({
74
74
  }),
75
75
  toggleMute: e.toggleMute || (() => {
76
76
  }),
77
- isMuted: e.isMuted,
78
77
  close: e.close,
79
78
  isEventFired: e.isEventFired,
80
79
  fireEvent: e.fireEvent,
@@ -1,3 +1,4 @@
1
+ import { StreamLayerSDKTvOptions } from '..';
1
2
  export interface PauseAdProps {
2
3
  vastUrls: Array<{
3
4
  template?: 'default';
@@ -11,5 +12,6 @@ export interface PauseAdProps {
11
12
  onRender?: (params: {
12
13
  rendered: boolean;
13
14
  }) => void;
15
+ options?: StreamLayerSDKTvOptions;
14
16
  }
15
17
  export declare const PauseAd: React.FC<PauseAdProps>;
@@ -1,95 +1,117 @@
1
- import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
- import { cx as E } from "@linaria/core";
3
- import { useFocusable as x } from "@noriginmedia/norigin-spatial-navigation";
4
- import { useState as A, useRef as y, useEffect as d } from "react";
5
- import { eventBus as P } from "@streamlayer/sdk-web-interfaces";
6
- import { useGAMPlayer as T } from "../../../ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js";
7
- import { PauseAdOverlay as b, PauseAdContent as g, PauseAdGradientLeft as w, PauseAdGradientRight as k, PauseAdGradientBottom as B, PauseAdTopLeft as L, PauseAdTitle as S, PauseAdCaption as C, PauseAdBottomLeft as G, PauseAdPlayButton as D, PauseAdSidebar as F, ExternalAdContainer as I } from "./styles.js";
8
- const M = ({ vastUrl: a }) => {
9
- const r = y(null), [, , u] = T(r, a);
10
- return d(() => {
11
- u && u();
12
- }, [u]), /* @__PURE__ */ t(I, { ref: r });
13
- }, j = ({ isClosing: a, title: r, caption: u, onPlay: f, onClose: s, vastUrl: m }) => {
14
- const { ref: e, focusSelf: o } = x({
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";
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({
15
15
  focusKey: "sl-pause-ad-play",
16
- onEnterRelease: f,
16
+ onEnterRelease: d,
17
17
  isFocusBoundary: !0,
18
18
  forceFocus: !0
19
19
  });
20
- return d(() => {
21
- e.current && o();
22
- }, [e, o]), d(() => {
23
- const l = (n) => {
24
- const i = n.keyCode;
25
- if (i === 461 || i === 10009 || i === 27) {
26
- n.preventDefault(), n.stopPropagation(), n.stopImmediatePropagation(), s == null || s();
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();
27
27
  return;
28
28
  }
29
29
  };
30
- return window.addEventListener("keydown", l, { capture: !0 }), () => window.removeEventListener("keydown", l, { capture: !0 });
31
- }, [s]), /* @__PURE__ */ t(b, { className: E(a && "pause-ad-closing"), children: /* @__PURE__ */ p(g, { children: [
32
- /* @__PURE__ */ t(w, {}),
33
- /* @__PURE__ */ t(k, {}),
34
- /* @__PURE__ */ t(B, {}),
35
- /* @__PURE__ */ p(L, { children: [
36
- /* @__PURE__ */ t(S, { children: r }),
37
- /* @__PURE__ */ t(C, { children: u })
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, {}),
33
+ /* @__PURE__ */ e(I, {}),
34
+ /* @__PURE__ */ e(j, {}),
35
+ /* @__PURE__ */ y(K, { children: [
36
+ /* @__PURE__ */ e(N, { children: n }),
37
+ /* @__PURE__ */ e($, { children: u })
38
38
  ] }),
39
- /* @__PURE__ */ t(G, { children: /* @__PURE__ */ t(
40
- D,
39
+ (r == null ? void 0 : r.showPauseButton) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
40
+ V,
41
41
  {
42
- ref: e,
43
- onClick: f,
44
- onMouseEnter: () => e.current.focus(),
42
+ ref: o,
43
+ onClick: d,
44
+ onMouseEnter: () => o.current.focus(),
45
45
  "aria-label": "Resume playback"
46
46
  }
47
47
  ) }),
48
- /* @__PURE__ */ p(F, { children: [
49
- m && /* @__PURE__ */ t(M, { vastUrl: m }),
50
- /* @__PURE__ */ t("span", { children: "ADVERTISEMENT" })
48
+ /* @__PURE__ */ y(_, { children: [
49
+ a && /* @__PURE__ */ e(q, { vastUrl: a }),
50
+ /* @__PURE__ */ e("span", { children: "ADVERTISEMENT" })
51
51
  ] })
52
52
  ] }) });
53
- }, H = ({
54
- showPauseAd: a,
55
- vastUrls: r,
53
+ }, R = ({
54
+ showPauseAd: t,
55
+ vastUrls: n,
56
56
  title: u,
57
- caption: f,
57
+ caption: d,
58
58
  onPlay: s,
59
- onClose: m,
60
- onRender: e
59
+ onClose: a,
60
+ onRender: r,
61
+ options: o
61
62
  }) => {
62
- const [o, l] = A(!1), [n, i] = A(!1), c = y();
63
- d(() => (c.current && clearTimeout(c.current), a ? (P.emit("exposedPauseAd", {
64
- action: "enabled",
65
- payload: {}
66
- }), c.current = setTimeout(() => {
67
- i(!1), l(!0);
68
- }, 5e3)) : (P.emit("exposedPauseAd", {
69
- action: "disabled",
70
- payload: {}
71
- }), i(!0), c.current = setTimeout(() => {
72
- l(!1);
73
- }, 400)), () => {
74
- c.current && clearTimeout(c.current);
75
- }), [a]), d(() => {
76
- e == null || e({ rendered: o });
77
- }, [o, e]), d(() => () => {
78
- e == null || e({ rendered: !1 });
79
- }, [e]);
80
- const h = r == null ? void 0 : r[0].url;
81
- return o ? /* @__PURE__ */ t(
82
- j,
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(() => {
67
+ if (t && i) {
68
+ g.emit("exposedPauseAd", {
69
+ action: "enabled",
70
+ payload: {}
71
+ }), S(i).then((p) => {
72
+ h.current === i && (p == null ? void 0 : p.success) !== !0 && (clearTimeout(c.current), a == null || a());
73
+ }).catch(() => {
74
+ h.current === i && (clearTimeout(c.current), a == null || a());
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", {
79
+ action: "rendered",
80
+ payload: {}
81
+ })) : c.current = setTimeout(() => {
82
+ E();
83
+ }, 200);
84
+ };
85
+ c.current = setTimeout(() => {
86
+ E();
87
+ }, 5e3);
88
+ } else
89
+ g.emit("exposedPauseAd", {
90
+ action: "disabled",
91
+ payload: {}
92
+ }), l(!0), c.current = setTimeout(() => {
93
+ A(!1);
94
+ }, 400);
95
+ return () => {
96
+ c.current && clearTimeout(c.current);
97
+ };
98
+ }, [T, S, a, t, i]), P(() => {
99
+ r == null || r({ rendered: f });
100
+ }, [f, r]), P(() => () => {
101
+ r == null || r({ rendered: !1 });
102
+ }, [r]), f ? /* @__PURE__ */ e(
103
+ z,
83
104
  {
84
- onClose: m,
85
- isClosing: n,
105
+ onClose: a,
106
+ isClosing: m,
86
107
  title: u,
87
- caption: f,
108
+ caption: d,
88
109
  onPlay: s,
89
- vastUrl: h
110
+ vastUrl: i,
111
+ options: o
90
112
  }
91
113
  ) : null;
92
114
  };
93
115
  export {
94
- H as PauseAd
116
+ R as PauseAd
95
117
  };
@@ -9,4 +9,4 @@ export declare const PauseAdCaption: import('@linaria/react').StyledComponent<im
9
9
  export declare const PauseAdBottomLeft: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
10
10
  export declare const PauseAdPlayButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
11
11
  export declare const PauseAdSidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
- export declare const ExternalAdContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
+ export declare const ExternalAdContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
@@ -15,11 +15,11 @@ const e = /* @__PURE__ */ s("div")({
15
15
  name: "PauseAdGradientRight",
16
16
  class: "p1kh2yb0",
17
17
  propsAsIs: !1
18
- }), d = /* @__PURE__ */ s("div")({
18
+ }), p = /* @__PURE__ */ s("div")({
19
19
  name: "PauseAdGradientBottom",
20
20
  class: "pl8f94x",
21
21
  propsAsIs: !1
22
- }), p = /* @__PURE__ */ s("div")({
22
+ }), d = /* @__PURE__ */ s("div")({
23
23
  name: "PauseAdTopLeft",
24
24
  class: "p1m6zmrt",
25
25
  propsAsIs: !1
@@ -43,7 +43,7 @@ const e = /* @__PURE__ */ s("div")({
43
43
  name: "PauseAdSidebar",
44
44
  class: "p1dpvfl1",
45
45
  propsAsIs: !1
46
- }), c = /* @__PURE__ */ s("div")({
46
+ }), c = /* @__PURE__ */ s("img")({
47
47
  name: "ExternalAdContainer",
48
48
  class: "ezfmabr",
49
49
  propsAsIs: !1
@@ -53,12 +53,12 @@ export {
53
53
  r as PauseAdBottomLeft,
54
54
  A as PauseAdCaption,
55
55
  t as PauseAdContent,
56
- d as PauseAdGradientBottom,
56
+ p as PauseAdGradientBottom,
57
57
  o as PauseAdGradientLeft,
58
58
  n as PauseAdGradientRight,
59
59
  e as PauseAdOverlay,
60
60
  i as PauseAdPlayButton,
61
61
  u as PauseAdSidebar,
62
62
  l as PauseAdTitle,
63
- p as PauseAdTopLeft
63
+ d as PauseAdTopLeft
64
64
  };
@@ -1,6 +1,9 @@
1
1
  import { Component } from 'react';
2
2
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
3
  import { PauseAdProps } from './ExposedPauseAd/PauseAd';
4
+ export type StreamLayerSDKTvOptions = {
5
+ showPauseButton?: boolean;
6
+ };
4
7
  export type StreamLayerSDKTvProps = {
5
8
  persistent?: boolean;
6
9
  children: React.ReactNode;
@@ -11,6 +14,7 @@ export type StreamLayerSDKTvProps = {
11
14
  onRenderPauseAd?: (params: {
12
15
  rendered: boolean;
13
16
  }) => void;
17
+ options?: StreamLayerSDKTvOptions;
14
18
  };
15
19
  export declare class StreamLayerSDKTv extends Component<StreamLayerSDKTvProps, {
16
20
  hasError: boolean;
@@ -1,46 +1,48 @@
1
- import { jsx as t, jsxs as b } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
2
  import { init as y } from "@noriginmedia/norigin-spatial-navigation";
3
- import { Layout as v } from "../app/Layout/index.js";
4
- import { Component as D, useCallback as u } from "react";
5
- import { useStore as d } from "@streamlayer/react-polyfills";
6
- import { StreamLayerSDKAdvertisementWebOS as m } from "./Advertisement/index.js";
7
- import { PauseAd as L } from "./ExposedPauseAd/PauseAd.js";
8
- import { StreamLayerSDKQuestionWebOS as S } from "./Question/index.js";
3
+ import { Layout as b } from "../app/Layout/index.js";
4
+ import { Component as D, useCallback as c } from "react";
5
+ import { useStore as x } from "@streamlayer/react-polyfills";
6
+ import { StreamLayerSDKAdvertisementWebOS as u } from "./Advertisement/index.js";
7
+ import { PauseAd as v } from "./ExposedPauseAd/PauseAd.js";
8
+ import { StreamLayerSDKQuestionWebOS as s } from "./Question/index.js";
9
9
  y({
10
10
  shouldFocusDOMNode: !0
11
11
  });
12
- const K = ({
13
- persistent: o,
14
- children: e,
12
+ const L = ({
13
+ persistent: e,
14
+ children: o,
15
15
  sdk: r,
16
- showPauseAd: p,
17
- pauseAdVastUrl: c,
18
- onClosePauseAd: a,
19
- onRenderPauseAd: s
16
+ showPauseAd: l,
17
+ pauseAdVastUrl: m,
18
+ onClosePauseAd: n,
19
+ onRenderPauseAd: f,
20
+ options: S
20
21
  }) => {
21
- const i = d(r.uiState), f = u(() => {
22
- a == null || a();
23
- }, [a]), h = u(() => {
22
+ const a = x(r.uiState), p = c(() => {
23
+ n == null || n();
24
+ }, [n]), h = c(() => {
24
25
  r.controlVideoPlayer({ play: !0 });
25
- }, [r]), l = i.appSidebar || i.promotionSidebar || i.promotionOverlay;
26
- return /* @__PURE__ */ b(
27
- v,
26
+ }, [r]);
27
+ return /* @__PURE__ */ d(
28
+ b,
28
29
  {
29
30
  sdk: r,
30
- sidebar: ({ promo: n }) => n ? /* @__PURE__ */ t(m, { sdk: r, persistent: o, sidebar: "right" }) : /* @__PURE__ */ t(S, { sdk: r, persistent: o }),
31
- notification: ({ promo: n }) => n ? /* @__PURE__ */ t(m, { sdk: r, notification: !0, persistent: o }) : /* @__PURE__ */ t(S, { notification: !0, sdk: r, persistent: o }),
32
- banner: /* @__PURE__ */ t(m, { sdk: r, persistent: o, banner: "bottom" }),
31
+ sidebar: ({ promo: i }) => a.exposedPauseAd ? null : i ? /* @__PURE__ */ t(u, { sdk: r, persistent: e, sidebar: "right" }) : /* @__PURE__ */ t(s, { sdk: r, persistent: e }),
32
+ notification: ({ promo: i }) => a.exposedPauseAd ? null : i ? /* @__PURE__ */ t(u, { sdk: r, notification: !0, persistent: e }) : /* @__PURE__ */ t(s, { notification: !0, sdk: r, persistent: e }),
33
+ banner: a.exposedPauseAd ? null : /* @__PURE__ */ t(u, { sdk: r, persistent: e, banner: "bottom" }),
33
34
  webos: !0,
34
35
  children: [
35
- e,
36
- c && !l && /* @__PURE__ */ t(
37
- L,
36
+ o,
37
+ m && /* @__PURE__ */ t(
38
+ v,
38
39
  {
39
- showPauseAd: p,
40
- vastUrls: c,
41
- onClose: f,
42
- onRender: s,
43
- onPlay: h
40
+ showPauseAd: l,
41
+ vastUrls: m,
42
+ onClose: p,
43
+ onRender: f,
44
+ onPlay: h,
45
+ options: S
44
46
  }
45
47
  )
46
48
  ]
@@ -48,17 +50,17 @@ const K = ({
48
50
  );
49
51
  };
50
52
  class W extends D {
51
- constructor(e) {
52
- super(e), this.state = { hasError: !1 };
53
+ constructor(o) {
54
+ super(o), this.state = { hasError: !1 };
53
55
  }
54
56
  static getDerivedStateFromError() {
55
57
  return { hasError: !0 };
56
58
  }
57
- componentDidCatch(e, r) {
58
- console.error("StreamLayerSDKTv error:", e, r.componentStack);
59
+ componentDidCatch(o, r) {
60
+ console.error("StreamLayerSDKTv error:", o, r.componentStack);
59
61
  }
60
62
  render() {
61
- return this.state.hasError ? this.props.children : /* @__PURE__ */ t(K, { ...this.props });
63
+ return this.state.hasError ? this.props.children : /* @__PURE__ */ t(L, { ...this.props });
62
64
  }
63
65
  }
64
66
  export {