@streamlayer/react-ui 1.32.4 → 1.33.2

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 (67) hide show
  1. package/lib/app/app/Advertisement/index.js +14 -15
  2. package/lib/app/app/Features/Gamification/Leaderboard.js +46 -36
  3. package/lib/app/app/Features/Gamification/Question.js +42 -42
  4. package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +19 -25
  5. package/lib/app/app/Features/Gamification/index.js +29 -28
  6. package/lib/app/app/Notifications/Onboarding/index.js +45 -42
  7. package/lib/app/app/story/index.js +24 -24
  8. package/lib/app/app/story/insight/index.js +14 -15
  9. package/lib/app/app/story/insight/video.js +3 -3
  10. package/lib/app/app/story/promotion/content.js +5 -5
  11. package/lib/app/app/story/promotion/index.d.ts +1 -0
  12. package/lib/app/app/story/promotion/index.js +24 -25
  13. package/lib/app/app/story/promotion/video.d.ts +0 -1
  14. package/lib/app/app/story/promotion/video.js +41 -43
  15. package/lib/app/app/story/promotion-notification/index.js +15 -16
  16. package/lib/app/app/story/promotion-notification/video.d.ts +0 -1
  17. package/lib/app/app/story/promotion-notification/video.js +22 -30
  18. package/lib/app/app/story/settings/index.js +6 -6
  19. package/lib/app/app/story/settings/login.js +1 -1
  20. package/lib/app/app/story/video.js +28 -28
  21. package/lib/app/login/demo.js +19 -18
  22. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +0 -1
  23. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +17 -17
  24. package/lib/app/masters/Notifications/Onboarding/index.js +42 -39
  25. package/lib/app/masters/masters.d.ts +1 -0
  26. package/lib/app/masters/masters.js +34 -32
  27. package/lib/app/masters/provider.d.ts +4 -0
  28. package/lib/app/masters/provider.js +23 -0
  29. package/lib/app/masters/story/components.js +48 -52
  30. package/lib/app/masters/story/index.js +16 -15
  31. package/lib/app/tgl/index.d.ts +1 -0
  32. package/lib/app/tgl/index.js +19 -20
  33. package/lib/app/tgl/video.d.ts +0 -1
  34. package/lib/app/tgl/video.js +40 -42
  35. package/lib/app/webos/ExposedPauseAd/PauseAd.js +68 -68
  36. package/lib/app/webos/story.js +26 -26
  37. package/lib/app/webos/ui/Sidebar/styles.js +82 -888
  38. package/lib/assets/style.css +1 -1
  39. package/lib/core/app.d.ts +7 -0
  40. package/lib/core/app.js +14 -0
  41. package/lib/core/event.d.ts +6 -0
  42. package/lib/core/event.js +5 -0
  43. package/lib/core/hooks.d.ts +16 -0
  44. package/lib/core/hooks.js +8 -0
  45. package/lib/core/provider.d.ts +49 -0
  46. package/lib/core/provider.js +9 -0
  47. package/lib/hooks-B0Qttldg.js +99 -0
  48. package/lib/index.d.ts +0 -1
  49. package/lib/index.js +2 -4
  50. package/lib/ui/advertisement/banner/index.d.ts +2 -2
  51. package/lib/ui/advertisement/notification/lower-third/index.js +34 -30
  52. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +100 -33212
  53. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +13 -13
  54. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +63 -204
  55. package/lib/ui/gamification/leaderboard/static.d.ts +1 -1
  56. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +1 -1
  57. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +1 -1
  58. package/lib/ui/icons/index.d.ts +198 -66
  59. package/lib/ui/video-player/index.js +26 -23
  60. package/lib/useStreamLayerApp.d.ts +23 -0
  61. package/lib/useStreamLayerApp.js +167 -0
  62. package/lib/utils/debug/index.js +8 -8
  63. package/package.json +42 -35
  64. package/lib/index-l-eyvmpL.js +0 -3758
  65. package/lib/utils/createDemo.d.ts +0 -12
  66. package/lib/utils/createDemo.js +0 -49
  67. package/lib/vast-client.min-B0NUra1B.js +0 -1060
@@ -1,34 +1,35 @@
1
1
  import { jsxs as p, jsx as n } from "react/jsx-runtime";
2
2
  import { cx as d } from "@linaria/core";
3
- import { SDKContainer as A, mobileSdkContainer as h, SDKScrollContainer as x } from "./styles.js";
4
- import { useSdkScroll as y } from "./useSdkScroll.js";
5
- import { useSdkFeature as P } from "../useSdkFeature.js";
3
+ import { SDKContainer as x, mobileSdkContainer as y, SDKScrollContainer as A } from "./styles.js";
4
+ import { useSdkScroll as P } from "./useSdkScroll.js";
5
+ import { useSdkFeature as h } from "../useSdkFeature.js";
6
6
  import { useAnalyticsListener as F, newTabLinkListener as N } from "../../hooks/analytics.js";
7
- import { useState as C, useMemo as E, useCallback as L, useRef as S, useEffect as v } from "react";
7
+ import { useState as L, useMemo as M, useCallback as C, useRef as S, useEffect as v } from "react";
8
8
  import { useStore as u } from "@streamlayer/react-polyfills";
9
9
  import { FeatureType as b } from "@streamlayer/sdk-web-types";
10
10
  import { resetCss as f } from "../../ui/theme/theme.js";
11
- import { BetPackOverlay as M } from "./BetPack/index.js";
11
+ import { BetPackOverlay as E } from "./BetPack/index.js";
12
12
  import { ActiveFeature as B, StandaloneFeature as D } from "./Features/index.js";
13
13
  import { SDKHeader as I } from "./Header/index.js";
14
14
  import { SDKNotifications as K } from "./Notifications/index.js";
15
15
  import { MastersContext as g } from "./useMastersContext.js";
16
16
  import { useSdkResponsive as w } from "./useSdkResponsive.js";
17
17
  import { StreamLayerMastersThemeProvider as ne } from "../../ui/theme/masters.js";
18
- const G = ({ sdk: e, className: t }) => {
19
- const [, r] = P(e);
20
- return /* @__PURE__ */ n(B, { className: t, feature: r, sdk: e });
21
- }, O = ({ sdk: e, className: t, appNode: r, responsiveStore: l, useContainer: m }) => {
22
- const c = u(e.featuresList.getStore());
23
- return c ? Array.from(c, (a) => {
18
+ import { MastersStreamLayerProvider as se } from "./provider.js";
19
+ const G = ({ sdk: e, className: r }) => {
20
+ const [, t] = h(e);
21
+ return /* @__PURE__ */ n(B, { className: r, feature: t, sdk: e });
22
+ }, O = ({ sdk: e, className: r, appNode: t, responsiveStore: l, useContainer: c }) => {
23
+ const m = u(e.featuresList.getStore());
24
+ return m ? Array.from(m, (a) => {
24
25
  const s = e.getFeature(a);
25
26
  return s ? /* @__PURE__ */ n(
26
27
  D,
27
28
  {
28
- useContainer: m,
29
+ useContainer: c,
29
30
  responsiveStore: l,
30
- className: t,
31
- appNode: r,
31
+ className: r,
32
+ appNode: t,
32
33
  feature: s,
33
34
  sdk: e
34
35
  },
@@ -36,31 +37,31 @@ const G = ({ sdk: e, className: t }) => {
36
37
  ) : null;
37
38
  }) : null;
38
39
  }, R = (e) => {
39
- const t = S(null);
40
- return F(t, { enabled: !0, event: "click", listener: N }), /* @__PURE__ */ n(M, { ref: t, ...e });
41
- }, j = ({ sdk: e, useContainer: t }) => {
42
- const r = S(null), l = u(e.status), m = u(e.sdkStore.slStreamId), c = S(null), [a] = w(r), [s, i] = y(r, a, t), o = l === "ready" && !!m.data;
40
+ const r = S(null);
41
+ return F(r, { enabled: !0, event: "click", listener: N }), /* @__PURE__ */ n(E, { ref: r, ...e });
42
+ }, j = ({ sdk: e, useContainer: r }) => {
43
+ const t = S(null), l = u(e.status), c = u(e.sdkStore.slStreamId), m = S(null), [a] = w(t), [s, i] = P(t, a, r), o = l === "ready" && !!c.data;
43
44
  return v(() => {
44
45
  window.requestAnimationFrame(() => {
45
46
  e.initializeApp().then(() => {
46
47
  e.openFeature(b.GAMES);
47
48
  });
48
49
  });
49
- }, [e]), F(r, { enabled: !0, event: "click", listener: N }), v(() => {
50
+ }, [e]), F(t, { enabled: !0, event: "click", listener: N }), v(() => {
50
51
  import("./Features/Gamification/gamification-feature.js");
51
- }, []), /* @__PURE__ */ p(A, { className: d("SDKContainer", !t && h), ref: r, children: [
52
- /* @__PURE__ */ n(I, { className: d(f), ref: c }),
53
- /* @__PURE__ */ p(x, { className: "sl-hide-on-modal", ref: s, children: [
52
+ }, []), /* @__PURE__ */ p(x, { className: d("SDKContainer", !r && y), ref: t, children: [
53
+ /* @__PURE__ */ n(I, { className: d(f), ref: m }),
54
+ /* @__PURE__ */ p(A, { className: "sl-hide-on-modal", ref: s, children: [
54
55
  o && /* @__PURE__ */ n(
55
56
  K,
56
57
  {
57
58
  sdk: e,
58
59
  scrollNode: s,
59
- headerNode: c,
60
- appNode: r,
60
+ headerNode: m,
61
+ appNode: t,
61
62
  scrollStore: i,
62
63
  responsiveStore: a,
63
- useContainer: t
64
+ useContainer: r
64
65
  }
65
66
  ),
66
67
  o && /* @__PURE__ */ n(G, { className: f, sdk: e }),
@@ -68,17 +69,17 @@ const G = ({ sdk: e, className: t }) => {
68
69
  O,
69
70
  {
70
71
  responsiveStore: a,
71
- appNode: r,
72
+ appNode: t,
72
73
  className: f,
73
74
  sdk: e,
74
- useContainer: t
75
+ useContainer: r
75
76
  }
76
77
  )
77
78
  ] })
78
79
  ] });
79
- }, te = ({ sdk: e, betPack: t, useContainer: r }) => {
80
- const [l, m] = C(t), a = !!u(e.userId()), s = E(() => ({ sdk: e }), [e]), i = L(() => {
81
- m(!1);
80
+ }, re = ({ sdk: e, betPack: r, useContainer: t }) => {
81
+ const [l, c] = L(r), a = !!u(e.userId()), s = M(() => ({ sdk: e }), [e]), i = C(() => {
82
+ c(!1);
82
83
  const o = e == null ? void 0 : e.getFeature(b.GAMES);
83
84
  o == null || o.closeQuestion();
84
85
  }, [e]);
@@ -92,10 +93,11 @@ const G = ({ sdk: e, className: t }) => {
92
93
  close: () => i()
93
94
  }
94
95
  ),
95
- !l && /* @__PURE__ */ n(j, { sdk: e, useContainer: r })
96
+ !l && /* @__PURE__ */ n(j, { sdk: e, useContainer: t })
96
97
  ] });
97
98
  };
98
99
  export {
99
- te as MastersApp,
100
+ re as MastersApp,
101
+ se as MastersStreamLayerProvider,
100
102
  ne as StreamLayerMastersThemeProvider
101
103
  };
@@ -0,0 +1,4 @@
1
+ import { StreamLayerProps } from '../../core/provider';
2
+ export declare const MastersStreamLayerProvider: React.FC<Omit<StreamLayerProps, 'autoEnable' | 'friendsTab' | 'hideFriends'> & {
3
+ children: React.ReactNode;
4
+ }>;
@@ -0,0 +1,23 @@
1
+ import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
+ import { d as m, e as u } from "../../hooks-B0Qttldg.js";
3
+ const S = ({ sdkKey: r, plugins: e, children: a, event: t, onDeepLinkHandled: s, videoPlayerController: i, production: d = !0 }) => /* @__PURE__ */ o(
4
+ m,
5
+ {
6
+ sdkKey: r,
7
+ plugins: e,
8
+ production: d,
9
+ autoEnable: !0,
10
+ onDeepLinkHandled: s,
11
+ videoPlayerController: i,
12
+ friendsTab: "disabled",
13
+ skipOnboarding: !0,
14
+ hideFriends: !0,
15
+ children: [
16
+ /* @__PURE__ */ n(u, { event: t }),
17
+ a
18
+ ]
19
+ }
20
+ );
21
+ export {
22
+ S as MastersStreamLayerProvider
23
+ };
@@ -1,96 +1,95 @@
1
1
  import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { styled as s } from "@linaria/react";
3
- import { useState as d, useCallback as v, useEffect as b } from "react";
4
- import { useStreamLayer as h } from "@streamlayer/react";
5
- import { StreamLayerLogin as g } from "@streamlayer/react/auth";
2
+ import { styled as o } from "@linaria/react";
3
+ import { u as d } from "../../../hooks-B0Qttldg.js";
4
+ import { useState as u, useCallback as v, useEffect as b } from "react";
6
5
  import { storage as a } from "@streamlayer/sdk-web-core";
7
- import { StreamLayerSDKPoints as y } from "../Points/index.js";
8
- import { StreamLayerMastersThemeProvider as k } from "../../../ui/theme/masters.js";
9
- const A = /* @__PURE__ */ s("div")({
6
+ import { StreamLayerSDKPoints as g } from "../Points/index.js";
7
+ import { StreamLayerMastersThemeProvider as y } from "../../../ui/theme/masters.js";
8
+ const k = /* @__PURE__ */ o("div")({
10
9
  name: "PointsContainer",
11
10
  class: "p1ibyybw",
12
11
  propsAsIs: !1
13
- }), M = /* @__PURE__ */ s("div")({
12
+ }), w = /* @__PURE__ */ o("div")({
14
13
  name: "Container",
15
14
  class: "cwn5esv",
16
15
  propsAsIs: !1
17
- }), H = /* @__PURE__ */ s("div")({
16
+ }), F = /* @__PURE__ */ o("div")({
18
17
  name: "HostAppContent",
19
18
  class: "h1wlm0i9",
20
19
  propsAsIs: !1
21
- }), U = /* @__PURE__ */ s("div")({
20
+ }), M = /* @__PURE__ */ o("div")({
22
21
  name: "AppContainer",
23
22
  class: "al0jzb8",
24
23
  propsAsIs: !1
25
- }), D = /* @__PURE__ */ s("div")({
24
+ }), H = /* @__PURE__ */ o("div")({
26
25
  name: "MobileHeader",
27
26
  class: "m1pnv6pj",
28
27
  propsAsIs: !1
29
- }), E = /* @__PURE__ */ s("div")({
28
+ }), U = /* @__PURE__ */ o("div")({
30
29
  name: "Body",
31
30
  class: "b1brtptg",
32
31
  propsAsIs: !1
33
- }), C = /* @__PURE__ */ s("div")({
32
+ }), A = /* @__PURE__ */ o("div")({
34
33
  name: "VideoFrame",
35
34
  class: "v19mta0g",
36
35
  propsAsIs: !1
37
- }), T = /* @__PURE__ */ s("video")({
36
+ }), C = /* @__PURE__ */ o("video")({
38
37
  name: "VideoPlayer",
39
38
  class: "v17i6v46",
40
39
  propsAsIs: !1
41
- }), I = /* @__PURE__ */ s("div")({
40
+ }), T = /* @__PURE__ */ o("div")({
42
41
  name: "LoginContainer",
43
42
  class: "lf71eub",
44
43
  propsAsIs: !1
45
- }), z = /* @__PURE__ */ s("button")({
44
+ }), D = /* @__PURE__ */ o("button")({
46
45
  name: "BackToTop",
47
46
  class: "b1xvh1fy",
48
47
  propsAsIs: !1
49
- }), K = /* @__PURE__ */ s("a")({
48
+ }), E = /* @__PURE__ */ o("a")({
50
49
  name: "BackToTopLink",
51
50
  class: "b1jcte5i",
52
51
  propsAsIs: !1
53
- }), N = () => {
54
- const o = h(), [r, i] = d(!1), t = v(({
55
- muted: c
52
+ }), z = () => {
53
+ const s = d(), [r, i] = u(!1), t = v(({
54
+ muted: l
56
55
  }) => {
57
- i(c);
56
+ i(l ?? !1);
58
57
  }, []);
59
- return b(() => (o == null || o.addVideoPlayerController(t), () => {
60
- o == null || o.removeVideoPlayerController(t);
61
- }), [o, t]), /* @__PURE__ */ n(C, {
62
- children: [o && /* @__PURE__ */ e(k, {
63
- children: /* @__PURE__ */ e(A, {
64
- children: /* @__PURE__ */ e(y, {
65
- sdk: o
58
+ return b(() => (s == null || s.addVideoPlayerController(t), () => {
59
+ s == null || s.removeVideoPlayerController(t);
60
+ }), [s, t]), /* @__PURE__ */ n(A, {
61
+ children: [s && /* @__PURE__ */ e(y, {
62
+ children: /* @__PURE__ */ e(k, {
63
+ children: /* @__PURE__ */ e(g, {
64
+ sdk: s
66
65
  })
67
66
  })
68
- }), /* @__PURE__ */ e(I, {
69
- children: /* @__PURE__ */ e(L, {
67
+ }), /* @__PURE__ */ e(T, {
68
+ children: /* @__PURE__ */ e(I, {
70
69
  hideUser: !0
71
70
  })
72
- }), /* @__PURE__ */ e(T, {
71
+ }), /* @__PURE__ */ e(C, {
73
72
  src: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
74
73
  muted: r,
75
74
  controls: !0
76
75
  })]
77
76
  });
78
- }, L = ({
79
- hideUser: o
77
+ }, I = ({
78
+ hideUser: s
80
79
  }) => {
81
- var l;
82
- const [r, i] = d({
80
+ var c;
81
+ const [r, i] = u({
83
82
  token: a.getExternalToken(),
84
83
  schema: a.getSchema()
85
- }), t = h();
84
+ }), t = d();
86
85
  return /* @__PURE__ */ n("div", {
87
86
  children: [/* @__PURE__ */ n("form", {
88
87
  className: "auth-form",
89
88
  onSubmit: (m) => {
90
89
  m.preventDefault();
91
- const p = new FormData(m.currentTarget), u = p.get("token"), f = p.get("schema");
90
+ const p = new FormData(m.currentTarget), h = p.get("token"), f = p.get("schema");
92
91
  i({
93
- token: u,
92
+ token: h,
94
93
  schema: f
95
94
  });
96
95
  },
@@ -102,7 +101,7 @@ const A = /* @__PURE__ */ s("div")({
102
101
  type: "text",
103
102
  id: "token",
104
103
  name: "token",
105
- placeholder: "..." + ((l = a.getExternalToken()) == null ? void 0 : l.slice(-8))
104
+ placeholder: "..." + ((c = a.getExternalToken()) == null ? void 0 : c.slice(-8))
106
105
  })]
107
106
  }), /* @__PURE__ */ n("div", {
108
107
  children: [/* @__PURE__ */ e("label", {
@@ -120,13 +119,10 @@ const A = /* @__PURE__ */ s("div")({
120
119
  children: "submit"
121
120
  })
122
121
  })]
123
- }), /* @__PURE__ */ e(g, {
124
- token: r.token,
125
- schema: r.schema
126
122
  }), /* @__PURE__ */ e("button", {
127
123
  onClick: () => t == null ? void 0 : t.logout(),
128
124
  children: "logout"
129
- }), !o && /* @__PURE__ */ n("div", {
125
+ }), !s && /* @__PURE__ */ n("div", {
130
126
  children: [/* @__PURE__ */ e("div", {
131
127
  children: "user"
132
128
  }), /* @__PURE__ */ e("textarea", {
@@ -139,13 +135,13 @@ const A = /* @__PURE__ */ s("div")({
139
135
  });
140
136
  };
141
137
  export {
142
- U as AppContainer,
143
- z as BackToTop,
144
- K as BackToTopLink,
145
- E as Body,
146
- M as Container,
147
- H as HostAppContent,
148
- L as MastersLogin,
149
- D as MobileHeader,
150
- N as Video
138
+ M as AppContainer,
139
+ D as BackToTop,
140
+ E as BackToTopLink,
141
+ U as Body,
142
+ w as Container,
143
+ F as HostAppContent,
144
+ I as MastersLogin,
145
+ H as MobileHeader,
146
+ z as Video
151
147
  };
@@ -1,23 +1,24 @@
1
1
  import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { useState as l, Fragment as c } from "react";
3
- import { MastersStreamLayerProvider as s, useStreamLayer as a } from "@streamlayer/react/masters";
4
- import { MastersApp as p } from "../masters.js";
2
+ import { u as l } from "../../../hooks-B0Qttldg.js";
3
+ import { useState as s, Fragment as a } from "react";
4
+ import { MastersApp as c } from "../masters.js";
5
+ import { MastersStreamLayerProvider as p } from "../provider.js";
5
6
  import { StreamLayerMastersThemeProvider as m } from "../../../ui/theme/masters.js";
6
7
  import { useStreamLayerDebug as h } from "../../../utils/debug/index.js";
7
- import { MobileHeader as u, Body as y, Container as k, AppContainer as T, HostAppContent as f, BackToTop as v, BackToTopLink as C } from "./components.js";
8
+ import { MobileHeader as u, Body as y, Container as k, AppContainer as f, HostAppContent as T, BackToTop as v, BackToTopLink as C } from "./components.js";
8
9
  const L = ({ betPack: o }) => {
9
- const r = a();
10
- return r ? /* @__PURE__ */ e(m, { style: { height: "100%" }, children: /* @__PURE__ */ e(p, { sdk: r, betPack: o, useContainer: !0 }) }) : null;
10
+ const r = l();
11
+ return r ? /* @__PURE__ */ e(m, { style: { height: "100%" }, children: /* @__PURE__ */ e(c, { sdk: r, betPack: o, useContainer: !0 }) }) : null;
11
12
  }, S = () => {
12
13
  console.log("deep link handled cb");
13
14
  }, g = () => {
14
15
  console.log("video player handled cb");
15
- }, H = ({ betPack: o }) => {
16
- const r = h(), [n, t] = l(0), i = () => {
17
- t(n + 1);
16
+ }, K = ({ betPack: o }) => {
17
+ const r = h(), [t, n] = s(0), i = () => {
18
+ n(t + 1);
18
19
  };
19
- return /* @__PURE__ */ e(c, { children: /* @__PURE__ */ d(
20
- s,
20
+ return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ d(
21
+ p,
21
22
  {
22
23
  sdkKey: r.sdkKey,
23
24
  production: r.env === "production",
@@ -26,14 +27,14 @@ const L = ({ betPack: o }) => {
26
27
  event: r.event,
27
28
  children: [
28
29
  /* @__PURE__ */ e(u, { onClick: () => i(), children: "header" }),
29
- /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(T, { className: "StreamLayerSDK", children: /* @__PURE__ */ e(L, { betPack: o }) }) }) }) }),
30
- /* @__PURE__ */ e(f, { style: { height: 3e3 }, children: "...host app content..." }),
30
+ /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(f, { className: "StreamLayerSDK", children: /* @__PURE__ */ e(L, { betPack: o }) }) }) }) }),
31
+ /* @__PURE__ */ e(T, { style: { height: 3e3 }, children: "...host app content..." }),
31
32
  /* @__PURE__ */ e(v, { onClick: () => document.documentElement.scrollTop = 0, children: "BackToTop" }),
32
33
  /* @__PURE__ */ e(C, { href: "#", children: "BackToTop Link" })
33
34
  ]
34
35
  }
35
- ) }, n);
36
+ ) }, t);
36
37
  };
37
38
  export {
38
- H as MastersStory
39
+ K as MastersStory
39
40
  };
@@ -8,4 +8,5 @@ export declare const TGLStory: React.FC<{
8
8
  persistent?: boolean;
9
9
  sidebar: 'left' | 'right';
10
10
  banner: 'top' | 'bottom';
11
+ layoutMode?: 'cover' | 'side-by-side';
11
12
  }>;
@@ -1,49 +1,48 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
2
  import { styled as o } from "@linaria/react";
3
- import { StreamLayerProvider as l } from "@streamlayer/react";
3
+ import { d as l } from "../../hooks-B0Qttldg.js";
4
4
  import { useStreamLayerDebug as u } from "../../utils/debug/index.js";
5
- import { Video as v } from "./video.js";
6
- const f = /* @__PURE__ */ o("div")({
5
+ import { Video as f } from "./video.js";
6
+ const b = /* @__PURE__ */ o("div")({
7
7
  name: "Body",
8
8
  class: "b1ssmzei",
9
9
  propsAsIs: !1
10
- }), b = /* @__PURE__ */ o("div")({
10
+ }), v = /* @__PURE__ */ o("div")({
11
11
  name: "Main",
12
12
  class: "me6bye3",
13
13
  propsAsIs: !1
14
14
  }), k = ({
15
15
  isMobileScreen: s,
16
16
  persistent: t,
17
- insightId: n,
18
- promotionId: i,
19
- sdkKey: d,
17
+ insightId: i,
18
+ promotionId: d,
19
+ sdkKey: n,
20
20
  eventId: m,
21
21
  sidebar: a,
22
22
  production: p,
23
23
  banner: c,
24
24
  layoutMode: y = "side-by-side"
25
25
  }) => {
26
- const e = u({
27
- sdkKey: d,
26
+ const r = u({
27
+ sdkKey: n,
28
28
  eventId: m,
29
29
  production: p
30
30
  });
31
- return /* @__PURE__ */ r(b, {
32
- children: /* @__PURE__ */ r(l, {
33
- sdkKey: e.sdkKey,
34
- event: e.event,
35
- production: e.env === "production",
31
+ return /* @__PURE__ */ e(v, {
32
+ children: /* @__PURE__ */ e(l, {
33
+ sdkKey: r.sdkKey,
34
+ event: r.event,
35
+ production: r.env === "production",
36
36
  autoEnable: !0,
37
- children: /* @__PURE__ */ r(f, {
38
- children: /* @__PURE__ */ r(v, {
39
- event: e.event,
37
+ children: /* @__PURE__ */ e(b, {
38
+ children: /* @__PURE__ */ e(f, {
40
39
  banner: c,
41
40
  sidebar: a,
42
41
  layoutMode: y,
43
- promotionId: i,
42
+ promotionId: d,
44
43
  isMobileScreen: s,
45
44
  persistent: t,
46
- insightId: n
45
+ insightId: i
47
46
  })
48
47
  })
49
48
  })
@@ -4,7 +4,6 @@ export declare const Video: React.FC<{
4
4
  layoutMode: 'cover' | 'side-by-side';
5
5
  isMobileScreen?: boolean;
6
6
  persistent?: boolean;
7
- event?: string;
8
7
  promotionId?: string;
9
8
  insightId?: string;
10
9
  }>;
@@ -1,58 +1,58 @@
1
- import { jsxs as o, Fragment as P, jsx as r } from "react/jsx-runtime";
2
- import { useRef as V, useState as T, useCallback as w, useEffect as x } from "react";
3
- import { useStreamLayer as A } from "@streamlayer/react";
1
+ import { jsxs as t, Fragment as T, jsx as r } from "react/jsx-runtime";
2
+ import { u as w } from "../../hooks-B0Qttldg.js";
3
+ import { useRef as x, useState as A, useCallback as S, useEffect as F } from "react";
4
4
  import { StreamLayerSDKAdvertisement as s } from "../app/Advertisement/index.js";
5
- import { StreamLayerSDKInsight as g } from "../app/Insight/index.js";
6
- import { StreamLayerThemeProvider as h } from "../../ui/theme/index.js";
7
- import { PromoButton as S, VideoFrame as F, AdvSidebar as L, customTheme as u, VideoPlayerWrap as k, AdvBanner as R, AdvContent as b } from "./styles.js";
8
- const O = ({ isMobileScreen: m, sidebar: l, banner: p, event: n, persistent: t, insightId: f, promotionId: c, layoutMode: a }) => {
9
- const e = A(), v = V(null), [y, C] = T(!0), d = w(({ muted: i }) => {
10
- C(i);
5
+ import { StreamLayerSDKInsight as C } from "../app/Insight/index.js";
6
+ import { StreamLayerThemeProvider as d } from "../../ui/theme/index.js";
7
+ import { PromoButton as L, VideoFrame as k, AdvSidebar as R, customTheme as h, VideoPlayerWrap as b, AdvBanner as j, AdvContent as B } from "./styles.js";
8
+ const z = ({ isMobileScreen: l, sidebar: n, banner: u, persistent: o, insightId: p, promotionId: m, layoutMode: a }) => {
9
+ const e = w(), f = x(null), [P, V] = A(!0), c = S(({ muted: i }) => {
10
+ V(i ?? !1);
11
11
  }, []);
12
- return x(() => (e == null || e.addVideoPlayerController(d), () => {
13
- e == null || e.removeVideoPlayerController(d);
14
- }), [e, d]), /* @__PURE__ */ o(P, { children: [
15
- c && /* @__PURE__ */ o(S, { onClick: () => {
12
+ return F(() => (e == null || e.addVideoPlayerController(c), () => {
13
+ e == null || e.removeVideoPlayerController(c);
14
+ }), [e, c]), /* @__PURE__ */ t(T, { children: [
15
+ m && /* @__PURE__ */ t(L, { onClick: () => {
16
16
  var i;
17
- (i = v.current) == null || i.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
18
- e == null || e.getFeature(12).background.advertisement.show(c);
17
+ (i = f.current) == null || i.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
18
+ var v, g, y;
19
+ m && ((y = (g = (v = e == null ? void 0 : e.getFeature(12)) == null ? void 0 : v.background) == null ? void 0 : g.advertisement) == null || y.show(m));
19
20
  }, 200);
20
21
  }, children: [
21
22
  "open promotion: ",
22
- c
23
+ m
23
24
  ] }),
24
- /* @__PURE__ */ o(F, { ref: v, "data-testid": "video-frame", children: [
25
+ /* @__PURE__ */ t(k, { ref: f, "data-testid": "video-frame", children: [
25
26
  /* @__PURE__ */ r(
26
- L,
27
+ R,
27
28
  {
28
29
  style: {
29
30
  ...a === "cover" ? { position: "absolute" } : {},
30
- ...l === "left" ? { left: 0 } : { right: 0, order: 3 },
31
- ...m ? { maxWidth: "calc(300px + env(safe-area-inset-left))" } : {}
31
+ ...n === "left" ? { left: 0 } : { right: 0, order: 3 },
32
+ ...l ? { maxWidth: "calc(300px + env(safe-area-inset-left))" } : {}
32
33
  },
33
- children: e && /* @__PURE__ */ o(h, { customTheme: u, children: [
34
+ children: e && /* @__PURE__ */ t(d, { customTheme: h, children: [
34
35
  /* @__PURE__ */ r(
35
36
  s,
36
37
  {
37
- isMobileScreen: m,
38
- event: n,
38
+ isMobileScreen: l,
39
39
  sdk: e,
40
- sidebar: l,
40
+ sidebar: n,
41
41
  layoutMode: a,
42
- persistent: t,
42
+ persistent: o,
43
43
  skipTypeCheck: !0
44
44
  }
45
45
  ),
46
- /* @__PURE__ */ r(g, { insightId: f, sdk: e, persistent: t })
46
+ /* @__PURE__ */ r(C, { insightId: p, sdk: e, persistent: o })
47
47
  ] })
48
48
  }
49
49
  ),
50
- /* @__PURE__ */ o(k, { children: [
50
+ /* @__PURE__ */ t(b, { children: [
51
51
  /* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
52
52
  "video",
53
53
  {
54
54
  src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
55
- muted: y,
55
+ muted: P,
56
56
  width: "100%",
57
57
  height: "100%",
58
58
  autoplay: "autoplay",
@@ -62,44 +62,42 @@ const O = ({ isMobileScreen: m, sidebar: l, banner: p, event: n, persistent: t,
62
62
  }
63
63
  ) }),
64
64
  /* @__PURE__ */ r(
65
- R,
65
+ j,
66
66
  {
67
67
  style: {
68
68
  ...a === "cover" ? { position: "absolute" } : {},
69
- ...p === "top" ? { top: 0, order: -1 } : { bottom: 0 }
69
+ ...u === "top" ? { top: 0, order: -1 } : { bottom: 0 }
70
70
  },
71
- children: e && /* @__PURE__ */ r(h, { customTheme: u, children: /* @__PURE__ */ r(
71
+ children: e && /* @__PURE__ */ r(d, { customTheme: h, children: /* @__PURE__ */ r(
72
72
  s,
73
73
  {
74
- isMobileScreen: m,
75
- event: n,
74
+ isMobileScreen: l,
76
75
  sdk: e,
77
- banner: p,
76
+ banner: u,
78
77
  layoutMode: a,
79
- persistent: t
78
+ persistent: o
80
79
  }
81
80
  ) })
82
81
  }
83
82
  )
84
83
  ] })
85
84
  ] }),
86
- /* @__PURE__ */ r(b, { children: e && /* @__PURE__ */ o(h, { customTheme: u, children: [
85
+ /* @__PURE__ */ r(B, { children: e && /* @__PURE__ */ t(d, { customTheme: h, children: [
87
86
  /* @__PURE__ */ r(
88
87
  s,
89
88
  {
90
- isMobileScreen: m,
91
- event: n,
89
+ isMobileScreen: l,
92
90
  sdk: e,
93
- sidebar: l,
91
+ sidebar: n,
94
92
  layoutMode: a,
95
- persistent: t,
93
+ persistent: o,
96
94
  skipTypeCheck: !0
97
95
  }
98
96
  ),
99
- /* @__PURE__ */ r(g, { insightId: f, sdk: e, persistent: t })
97
+ /* @__PURE__ */ r(C, { insightId: p, sdk: e, persistent: o })
100
98
  ] }) })
101
99
  ] });
102
100
  };
103
101
  export {
104
- O as Video
102
+ z as Video
105
103
  };