@streamlayer/react-ui 1.32.3 → 1.33.1

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 (154) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +1 -1
  2. package/lib/app/app/Advertisement/index.js +14 -15
  3. package/lib/app/app/Banner/index.d.ts +1 -1
  4. package/lib/app/app/Features/FeatureProvider.d.ts +2 -2
  5. package/lib/app/app/Features/Gamification/Leaderboard.d.ts +1 -1
  6. package/lib/app/app/Features/Gamification/Leaderboard.js +46 -36
  7. package/lib/app/app/Features/Gamification/Question.d.ts +2 -2
  8. package/lib/app/app/Features/Gamification/Question.js +42 -42
  9. package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +19 -25
  10. package/lib/app/app/Features/Gamification/QuestionsList.d.ts +1 -1
  11. package/lib/app/app/Features/Gamification/Tabs.d.ts +1 -1
  12. package/lib/app/app/Features/Gamification/UserSummary.d.ts +1 -1
  13. package/lib/app/app/Features/Gamification/index.d.ts +2 -2
  14. package/lib/app/app/Features/Gamification/index.js +29 -28
  15. package/lib/app/app/Features/index.d.ts +2 -2
  16. package/lib/app/app/InApp/index.d.ts +1 -1
  17. package/lib/app/app/Insight/index.d.ts +2 -2
  18. package/lib/app/app/Layout/index.d.ts +1 -1
  19. package/lib/app/app/Navigation/index.d.ts +1 -1
  20. package/lib/app/app/Notifications/Onboarding/Notification/index.d.ts +2 -2
  21. package/lib/app/app/Notifications/Onboarding/index.d.ts +2 -2
  22. package/lib/app/app/Notifications/Onboarding/index.js +45 -42
  23. package/lib/app/app/Notifications/index.d.ts +1 -1
  24. package/lib/app/app/Points/index.d.ts +1 -1
  25. package/lib/app/app/index.d.ts +1 -1
  26. package/lib/app/app/story/index.js +24 -24
  27. package/lib/app/app/story/insight/index.js +14 -15
  28. package/lib/app/app/story/insight/video.js +3 -3
  29. package/lib/app/app/story/promotion/content.js +5 -5
  30. package/lib/app/app/story/promotion/index.d.ts +1 -0
  31. package/lib/app/app/story/promotion/index.js +24 -25
  32. package/lib/app/app/story/promotion/video.d.ts +0 -1
  33. package/lib/app/app/story/promotion/video.js +41 -43
  34. package/lib/app/app/story/promotion-notification/index.js +15 -16
  35. package/lib/app/app/story/promotion-notification/video.d.ts +0 -1
  36. package/lib/app/app/story/promotion-notification/video.js +22 -30
  37. package/lib/app/app/story/settings/index.js +6 -6
  38. package/lib/app/app/story/settings/login.js +1 -1
  39. package/lib/app/app/story/video.js +28 -28
  40. package/lib/app/app/useApp.d.ts +1 -1
  41. package/lib/app/app/useAppContext.d.ts +1 -1
  42. package/lib/app/login/demo.js +19 -18
  43. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +0 -1
  44. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +17 -17
  45. package/lib/app/masters/BetPack/BetPackContent/QuestionScreen/index.d.ts +2 -2
  46. package/lib/app/masters/BetPack/BetPackContent/index.d.ts +1 -1
  47. package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +1 -1
  48. package/lib/app/masters/BetPack/index.d.ts +1 -1
  49. package/lib/app/masters/Features/FeatureProvider.d.ts +2 -2
  50. package/lib/app/masters/Features/Gamification/Question.d.ts +1 -1
  51. package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +1 -1
  52. package/lib/app/masters/Features/Gamification/Tabs.d.ts +1 -1
  53. package/lib/app/masters/Features/Gamification/UserSummary.d.ts +1 -1
  54. package/lib/app/masters/Features/Gamification/index.d.ts +1 -1
  55. package/lib/app/masters/Features/index.d.ts +2 -2
  56. package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +2 -2
  57. package/lib/app/masters/Notifications/Onboarding/index.d.ts +2 -2
  58. package/lib/app/masters/Notifications/Onboarding/index.js +42 -39
  59. package/lib/app/masters/Notifications/index.d.ts +1 -1
  60. package/lib/app/masters/Points/index.d.ts +1 -1
  61. package/lib/app/masters/masters.d.ts +2 -1
  62. package/lib/app/masters/masters.js +34 -32
  63. package/lib/app/masters/provider.d.ts +4 -0
  64. package/lib/app/masters/provider.js +23 -0
  65. package/lib/app/masters/story/components.js +48 -52
  66. package/lib/app/masters/story/index.js +16 -15
  67. package/lib/app/masters/useMastersApp.d.ts +1 -1
  68. package/lib/app/masters/useMastersContext.d.ts +1 -1
  69. package/lib/app/tgl/index.d.ts +1 -0
  70. package/lib/app/tgl/index.js +19 -20
  71. package/lib/app/tgl/video.d.ts +0 -1
  72. package/lib/app/tgl/video.js +40 -42
  73. package/lib/app/useSdkFeature.d.ts +3 -3
  74. package/lib/app/webos/Advertisement/AdvertisementUI.d.ts +1 -1
  75. package/lib/app/webos/Advertisement/index.d.ts +1 -1
  76. package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +1 -1
  77. package/lib/app/webos/ExposedPauseAd/PauseAd.js +68 -68
  78. package/lib/app/webos/Question/index.d.ts +1 -1
  79. package/lib/app/webos/index.d.ts +1 -1
  80. package/lib/app/webos/story.js +26 -26
  81. package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +1 -1
  82. package/lib/app/webos/ui/Sidebar/index.d.ts +2 -2
  83. package/lib/app/webos/ui/Sidebar/styles.js +82 -888
  84. package/lib/app/webos/ui/insight/index.d.ts +1 -1
  85. package/lib/assets/style.css +1 -1
  86. package/lib/core/app.d.ts +7 -0
  87. package/lib/core/app.js +14 -0
  88. package/lib/core/event.d.ts +6 -0
  89. package/lib/core/event.js +5 -0
  90. package/lib/core/hooks.d.ts +16 -0
  91. package/lib/core/hooks.js +8 -0
  92. package/lib/core/provider.d.ts +49 -0
  93. package/lib/core/provider.js +9 -0
  94. package/lib/hooks/analytics.d.ts +1 -1
  95. package/lib/hooks-B0Qttldg.js +99 -0
  96. package/lib/index.d.ts +0 -1
  97. package/lib/index.js +2 -4
  98. package/lib/ui/advertisement/banner/index.d.ts +3 -3
  99. package/lib/ui/advertisement/index.d.ts +1 -1
  100. package/lib/ui/advertisement/mock.d.ts +1 -1
  101. package/lib/ui/advertisement/notification/index.d.ts +1 -1
  102. package/lib/ui/advertisement/notification/lower-third/index.d.ts +1 -1
  103. package/lib/ui/advertisement/notification/lower-third/index.js +34 -30
  104. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +100 -33212
  105. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +13 -13
  106. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.d.ts +1 -1
  107. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +63 -204
  108. package/lib/ui/advertisement/overlay/index.d.ts +2 -2
  109. package/lib/ui/close-btn/index.d.ts +1 -1
  110. package/lib/ui/gamification/constants.d.ts +1 -1
  111. package/lib/ui/gamification/detail/header/index.d.ts +1 -1
  112. package/lib/ui/gamification/insight/index.d.ts +1 -1
  113. package/lib/ui/gamification/insight-list/index.d.ts +1 -1
  114. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +1 -1
  115. package/lib/ui/gamification/leaderboard/static.d.ts +1 -1
  116. package/lib/ui/gamification/onboarding/index.d.ts +2 -2
  117. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +2 -2
  118. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +1 -1
  119. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +1 -1
  120. package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +1 -1
  121. package/lib/ui/gamification/question/inapp/notification/index.d.ts +1 -1
  122. package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +1 -1
  123. package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +1 -1
  124. package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +1 -1
  125. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +1 -1
  126. package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +1 -1
  127. package/lib/ui/gamification/question/index.d.ts +1 -1
  128. package/lib/ui/gamification/question/list/index.d.ts +1 -1
  129. package/lib/ui/gamification/question/notification/index.d.ts +1 -1
  130. package/lib/ui/gamification/question/notification/insight/index.d.ts +2 -2
  131. package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +1 -1
  132. package/lib/ui/gamification/question/notification/tweet/index.d.ts +1 -1
  133. package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
  134. package/lib/ui/gamification/vote/index.d.ts +1 -1
  135. package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -1
  136. package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -1
  137. package/lib/ui/icons/index.d.ts +198 -66
  138. package/lib/ui/navigation/button/index.d.ts +1 -1
  139. package/lib/ui/questions/insight/index.d.ts +1 -1
  140. package/lib/ui/questions/twitter/index.d.ts +1 -1
  141. package/lib/ui/video-player/index.js +26 -23
  142. package/lib/useStreamLayerApp.d.ts +23 -0
  143. package/lib/useStreamLayerApp.js +167 -0
  144. package/lib/utils/debug/components/bypassLogin.d.ts +1 -1
  145. package/lib/utils/debug/components/developer.d.ts +1 -1
  146. package/lib/utils/debug/components/eventInput.d.ts +1 -1
  147. package/lib/utils/debug/index.js +8 -8
  148. package/lib/utils/debug/storage.d.ts +1 -1
  149. package/lib/utils/storage.d.ts +1 -1
  150. package/package.json +42 -35
  151. package/lib/index-l-eyvmpL.js +0 -3758
  152. package/lib/utils/createDemo.d.ts +0 -12
  153. package/lib/utils/createDemo.js +0 -49
  154. package/lib/vast-client.min-B0NUra1B.js +0 -1060
@@ -1,71 +1,69 @@
1
- import { jsxs as d, Fragment as g, jsx as r } from "react/jsx-runtime";
2
- import { useRef as v, useState as y, useCallback as V, useEffect as x } from "react";
3
- import { useStreamLayer as P } from "@streamlayer/react";
4
- import { StreamLayerSDKAdvertisement as l } from "../../Advertisement/index.js";
5
- import { Layout as b } from "../../Layout/index.js";
6
- import { PromoButton as w, VideoFrame as F } from "./styles.js";
7
- const D = ({ isMobileScreen: o, skipAutoClose: a, sidebar: u, banner: p, event: m, promotionId: n, layoutMode: i }) => {
8
- const e = P(), c = v(null), [h, f] = y(!1), s = V(({ muted: t }) => {
9
- f(t);
1
+ import { jsxs as p, Fragment as y, jsx as t } from "react/jsx-runtime";
2
+ import { u as V } from "../../../../hooks-B0Qttldg.js";
3
+ import { useRef as x, useState as P, useCallback as b, useEffect as w } from "react";
4
+ import { StreamLayerSDKAdvertisement as i } from "../../Advertisement/index.js";
5
+ import { Layout as F } from "../../Layout/index.js";
6
+ import { PromoButton as L, VideoFrame as j } from "./styles.js";
7
+ const K = ({ isMobileScreen: a, skipAutoClose: n, sidebar: l, banner: h, promotionId: r, layoutMode: s }) => {
8
+ const e = V(), u = x(null), [g, v] = P(!1), m = b(({ muted: o }) => {
9
+ v(o ?? !1);
10
10
  }, []);
11
- return x(() => (e == null || e.addVideoPlayerController(s), () => {
12
- e == null || e.removeVideoPlayerController(s);
13
- }), [e, s]), /* @__PURE__ */ d(g, { children: [
14
- n && /* @__PURE__ */ d(w, { onClick: () => {
15
- var t;
16
- (t = c.current) == null || t.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
17
- e == null || e.getFeature(12).background.advertisement.show(n);
11
+ return w(() => (e == null || e.addVideoPlayerController(m), () => {
12
+ e == null || e.removeVideoPlayerController(m);
13
+ }), [e, m]), /* @__PURE__ */ p(y, { children: [
14
+ r && /* @__PURE__ */ p(L, { onClick: () => {
15
+ var o;
16
+ (o = u.current) == null || o.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
17
+ var c, d, f;
18
+ r && ((f = (d = (c = e == null ? void 0 : e.getFeature(12)) == null ? void 0 : c.background) == null ? void 0 : d.advertisement) == null || f.show(r));
18
19
  }, 200);
19
20
  }, children: [
20
21
  "open promotion: ",
21
- n
22
+ r
22
23
  ] }),
23
- /* @__PURE__ */ r(F, { ref: c, "data-testid": "video-frame", children: e && /* @__PURE__ */ r(
24
- b,
24
+ /* @__PURE__ */ t(j, { ref: u, "data-testid": "video-frame", children: e && /* @__PURE__ */ t(
25
+ F,
25
26
  {
26
27
  sdk: e,
27
- sidebar: /* @__PURE__ */ r(
28
- l,
28
+ sidebar: /* @__PURE__ */ t(
29
+ i,
29
30
  {
30
- isMobileScreen: o,
31
- event: m,
31
+ isMobileScreen: a,
32
32
  sdk: e,
33
- sidebar: u,
34
- layoutMode: i,
35
- skipAutoClose: a,
33
+ sidebar: l,
34
+ layoutMode: s,
35
+ skipAutoClose: n,
36
36
  externalAd: !0,
37
37
  persistent: !0
38
38
  }
39
39
  ),
40
- banner: /* @__PURE__ */ r(
41
- l,
40
+ banner: /* @__PURE__ */ t(
41
+ i,
42
42
  {
43
- isMobileScreen: o,
44
- event: m,
43
+ isMobileScreen: a,
45
44
  sdk: e,
46
- banner: p,
47
- layoutMode: i,
48
- skipAutoClose: a,
45
+ banner: h,
46
+ layoutMode: s,
47
+ skipAutoClose: n,
49
48
  persistent: !0
50
49
  }
51
50
  ),
52
- overlay: /* @__PURE__ */ r(
53
- l,
51
+ overlay: /* @__PURE__ */ t(
52
+ i,
54
53
  {
55
- isMobileScreen: o,
56
- event: m,
54
+ isMobileScreen: a,
57
55
  sdk: e,
58
- sidebar: u,
59
- layoutMode: i,
60
- skipAutoClose: a,
56
+ sidebar: l,
57
+ layoutMode: s,
58
+ skipAutoClose: n,
61
59
  persistent: !0
62
60
  }
63
61
  ),
64
- children: /* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
62
+ children: /* @__PURE__ */ t("div", { className: "divAnchor", children: /* @__PURE__ */ t(
65
63
  "video",
66
64
  {
67
65
  src: "https://storage.googleapis.com/gvabox/media/samples/stock.mp4",
68
- muted: h,
66
+ muted: g,
69
67
  width: "100%",
70
68
  height: "100%",
71
69
  autoplay: "autoplay",
@@ -79,5 +77,5 @@ const D = ({ isMobileScreen: o, skipAutoClose: a, sidebar: u, banner: p, event:
79
77
  ] });
80
78
  };
81
79
  export {
82
- D as Video
80
+ K as Video
83
81
  };
@@ -1,38 +1,37 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { styled as r } from "@linaria/react";
3
- import { StreamLayerProvider as d } from "@streamlayer/react";
2
+ import { styled as e } from "@linaria/react";
3
+ import { d as m } from "../../../../hooks-B0Qttldg.js";
4
4
  import { useStreamLayerDebug as a } from "../../../../utils/debug/index.js";
5
5
  import { Video as p } from "./video.js";
6
- const c = /* @__PURE__ */ r("div")({
6
+ const c = /* @__PURE__ */ e("div")({
7
7
  name: "Body",
8
8
  class: "b1ql7fnw",
9
9
  propsAsIs: !1
10
- }), l = /* @__PURE__ */ r("div")({
10
+ }), l = /* @__PURE__ */ e("div")({
11
11
  name: "Main",
12
12
  class: "m18rqnzu",
13
13
  propsAsIs: !1
14
14
  }), h = ({
15
15
  isMobileScreen: t,
16
- promotionId: n,
17
- sdkKey: s,
16
+ promotionId: s,
17
+ sdkKey: n,
18
18
  eventId: i,
19
- production: m
19
+ production: d
20
20
  }) => {
21
- const e = a({
22
- sdkKey: s,
21
+ const r = a({
22
+ sdkKey: n,
23
23
  eventId: i,
24
- production: m
24
+ production: d
25
25
  });
26
26
  return /* @__PURE__ */ o(l, {
27
- children: /* @__PURE__ */ o(d, {
28
- sdkKey: e.sdkKey,
29
- event: e.event,
30
- production: e.env === "production",
27
+ children: /* @__PURE__ */ o(m, {
28
+ sdkKey: r.sdkKey,
29
+ event: r.event,
30
+ production: r.env === "production",
31
31
  autoEnable: !0,
32
32
  children: /* @__PURE__ */ o(c, {
33
33
  children: /* @__PURE__ */ o(p, {
34
- event: e.event,
35
- promotionId: n,
34
+ promotionId: s,
36
35
  isMobileScreen: t
37
36
  })
38
37
  })
@@ -1,5 +1,4 @@
1
1
  export declare const Video: React.FC<{
2
2
  isMobileScreen?: boolean;
3
- event?: string;
4
3
  promotionId?: string;
5
4
  }>;
@@ -1,31 +1,32 @@
1
- import { jsxs as a, Fragment as d, jsx as r } from "react/jsx-runtime";
2
- import { useRef as u, useState as h, useCallback as p, useEffect as f } from "react";
3
- import { useStreamLayer as g } from "@streamlayer/react";
4
- import { StreamLayerSDKAdvertisement as v } from "../../Advertisement/index.js";
5
- import { StreamLayerThemeProvider as y } from "../../../../ui/theme/index.js";
6
- import { PromoButton as P, VideoFrame as V, VideoPlayerWrap as S, AdvBanner as b } from "./styles.js";
7
- const B = ({ isMobileScreen: l, event: m, promotionId: t }) => {
8
- const e = g(), n = u(null), [s, c] = h(!1), i = p(({ muted: o }) => {
9
- c(o);
1
+ import { jsxs as i, Fragment as h, jsx as r } from "react/jsx-runtime";
2
+ import { u as f } from "../../../../hooks-B0Qttldg.js";
3
+ import { useRef as p, useState as g, useCallback as v, useEffect as y } from "react";
4
+ import { StreamLayerSDKAdvertisement as P } from "../../Advertisement/index.js";
5
+ import { StreamLayerThemeProvider as V } from "../../../../ui/theme/index.js";
6
+ import { PromoButton as S, VideoFrame as b, VideoPlayerWrap as x, AdvBanner as C } from "./styles.js";
7
+ const T = ({ isMobileScreen: c, promotionId: o }) => {
8
+ const e = f(), l = p(null), [d, u] = g(!1), a = v(({ muted: t }) => {
9
+ u(t ?? !1);
10
10
  }, []);
11
- return f(() => (e == null || e.addVideoPlayerController(i), () => {
12
- e == null || e.removeVideoPlayerController(i);
13
- }), [e, i]), /* @__PURE__ */ a(d, { children: [
14
- t && /* @__PURE__ */ a(P, { onClick: () => {
15
- var o;
16
- (o = n.current) == null || o.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
17
- e == null || e.getFeature(12).background.advertisement.show(t);
11
+ return y(() => (e == null || e.addVideoPlayerController(a), () => {
12
+ e == null || e.removeVideoPlayerController(a);
13
+ }), [e, a]), /* @__PURE__ */ i(h, { children: [
14
+ o && /* @__PURE__ */ i(S, { onClick: () => {
15
+ var t;
16
+ (t = l.current) == null || t.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
17
+ var n, s, m;
18
+ o && ((m = (s = (n = e == null ? void 0 : e.getFeature(12)) == null ? void 0 : n.background) == null ? void 0 : s.advertisement) == null || m.show(o));
18
19
  }, 200);
19
20
  }, children: [
20
21
  "open promotion: ",
21
- t
22
+ o
22
23
  ] }),
23
- /* @__PURE__ */ r(V, { ref: n, "data-testid": "video-frame", children: /* @__PURE__ */ a(S, { children: [
24
+ /* @__PURE__ */ r(b, { ref: l, "data-testid": "video-frame", children: /* @__PURE__ */ i(x, { children: [
24
25
  /* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
25
26
  "video",
26
27
  {
27
28
  src: "https://storage.googleapis.com/gvabox/media/samples/stock.mp4",
28
- muted: s,
29
+ muted: d,
29
30
  width: "100%",
30
31
  height: "100%",
31
32
  autoplay: "autoplay",
@@ -34,19 +35,10 @@ const B = ({ isMobileScreen: l, event: m, promotionId: t }) => {
34
35
  controls: !0
35
36
  }
36
37
  ) }),
37
- /* @__PURE__ */ r(b, { children: e && /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
38
- v,
39
- {
40
- isMobileScreen: l,
41
- event: m,
42
- sdk: e,
43
- notification: !0,
44
- persistent: !0
45
- }
46
- ) }) })
38
+ /* @__PURE__ */ r(C, { children: e && /* @__PURE__ */ r(V, { children: /* @__PURE__ */ r(P, { isMobileScreen: c, sdk: e, notification: !0, persistent: !0 }) }) })
47
39
  ] }) })
48
40
  ] });
49
41
  };
50
42
  export {
51
- B as Video
43
+ T as Video
52
44
  };
@@ -1,12 +1,12 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { StreamLayerProvider as o } from "@streamlayer/react";
3
- import { useStreamLayerDebug as n, StreamLayerDebug as a } from "../../../../utils/debug/index.js";
4
- import { AppLogin as i } from "./login.js";
2
+ import { d as o } from "../../../../hooks-B0Qttldg.js";
3
+ import { useStreamLayerDebug as a, StreamLayerDebug as n } from "../../../../utils/debug/index.js";
4
+ import { AppLogin as s } from "./login.js";
5
5
  const p = () => {
6
- const r = n();
6
+ const r = a();
7
7
  return /* @__PURE__ */ t(o, { sdkKey: r.sdkKey, production: r.env === "production", autoEnable: !1, children: [
8
- /* @__PURE__ */ e(i, {}),
9
- /* @__PURE__ */ e(a, { ...r, standalone: !0, hideAuth: !0 })
8
+ /* @__PURE__ */ e(s, {}),
9
+ /* @__PURE__ */ e(n, { ...r, standalone: !0, hideAuth: !0 })
10
10
  ] });
11
11
  };
12
12
  export {
@@ -1,6 +1,6 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { u as c } from "../../../../hooks-B0Qttldg.js";
2
3
  import { useState as u, useEffect as h } from "react";
3
- import { useStreamLayer as c } from "@streamlayer/react";
4
4
  import { storage as s } from "@streamlayer/sdk-web-core";
5
5
  const d = ({ token: t, schema: o }) => {
6
6
  const n = c();
@@ -1,44 +1,44 @@
1
1
  import { jsxs as S, jsx as t } from "react/jsx-runtime";
2
+ import { u as V } from "../../../hooks-B0Qttldg.js";
2
3
  import p from "hls.js";
3
- import { useRef as y, useState as h, useCallback as P, useEffect as a } from "react";
4
- import { useStreamLayer as V } from "@streamlayer/react";
4
+ import { useRef as y, useState as h, useCallback as P, useEffect as n } from "react";
5
5
  import { StreamLayerSDKPoints as b } from "../Points/index.js";
6
- import { VideoFrame as w, PointsContainer as v, VideoPlayerWrap as C, LinkToLogin as L, Preload as x, VideoIFrame as k, VideoTag as I } from "./styles.js";
6
+ import { VideoFrame as w, PointsContainer as v, VideoPlayerWrap as C, LinkToLogin as L, Preload as x, VideoIFrame as k, VideoTag as R } from "./styles.js";
7
7
  import { VideoContainer as K, VideoMuteButton as W } from "./styles.js";
8
- const R = ({ muted: l, toggleMute: i }) => {
9
- const e = y(), c = y(), o = V(), [n, u] = h(""), [m, g] = h(!1), s = P(
10
- ({ muted: r }) => {
11
- i(r), e.current.mute = r;
8
+ const T = ({ muted: l, toggleMute: i }) => {
9
+ const r = y(), c = y(), o = V(), [a, u] = h(""), [m, g] = h(!1), s = P(
10
+ ({ muted: e = !1 }) => {
11
+ i(e), r.current && (r.current.mute = e);
12
12
  },
13
13
  [i]
14
14
  );
15
- return a(() => (o == null || o.addVideoPlayerController(s), () => {
15
+ return n(() => (o == null || o.addVideoPlayerController(s), () => {
16
16
  o == null || o.removeVideoPlayerController(s);
17
- }), [o, s]), a(() => o ? o.streamSummary().subscribe((r) => {
17
+ }), [o, s]), n(() => o ? o.streamSummary().subscribe((e) => {
18
18
  var d, f;
19
- (f = (d = r.data) == null ? void 0 : d.summary) != null && f.stream && u(r.data.summary.stream);
19
+ (f = (d = e.data) == null ? void 0 : d.summary) != null && f.stream && u(e.data.summary.stream);
20
20
  }) : () => {
21
- }, [o]), a(() => () => {
21
+ }, [o]), n(() => () => {
22
22
  c.current && clearTimeout(c.current);
23
- }, []), a(() => {
24
- if (n && n.includes("m3u8"))
25
- if (p.isSupported() && e.current) {
26
- const r = new p({
23
+ }, []), n(() => {
24
+ if (a && a.includes("m3u8"))
25
+ if (p.isSupported() && r.current) {
26
+ const e = new p({
27
27
  debug: !1
28
28
  });
29
- r.loadSource(n), r.attachMedia(e.current);
29
+ e.loadSource(a), e.attachMedia(r.current);
30
30
  } else
31
31
  u("");
32
- e.current && (e.current.volume = 0.1, e.current.play().then(() => setInteracted(!0)).catch(() => {
32
+ r.current && (r.current.volume = 0.1, r.current.play().catch(() => {
33
33
  g(!0);
34
34
  }));
35
- }, [n]), a(() => {
36
- var r;
37
- m && ((r = e.current) == null || r.play());
38
- }, [m]), n ? n.includes("player.castr.com") ? /* @__PURE__ */ t(
35
+ }, [a]), n(() => {
36
+ var e;
37
+ m && ((e = r.current) == null || e.play());
38
+ }, [m]), a ? a.includes("player.castr.com") ? /* @__PURE__ */ t(
39
39
  k,
40
40
  {
41
- src: `${n}?loop=on&fullscreen=off&airplay=off&cast=off&pip=off`,
41
+ src: `${a}?loop=on&fullscreen=off&airplay=off&cast=off&pip=off`,
42
42
  width: "100%",
43
43
  height: "100%",
44
44
  frameBorder: "0",
@@ -46,10 +46,10 @@ const R = ({ muted: l, toggleMute: i }) => {
46
46
  allow: "autoplay"
47
47
  }
48
48
  ) : /* @__PURE__ */ t(
49
- I,
49
+ R,
50
50
  {
51
- src: n,
52
- ref: e,
51
+ src: a,
52
+ ref: r,
53
53
  muted: l,
54
54
  autoPlay: !0,
55
55
  loop: !0,
@@ -59,10 +59,10 @@ const R = ({ muted: l, toggleMute: i }) => {
59
59
  }
60
60
  ) : /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t("img", { src: "https://cdn.streamlayer.io/sdk-web-demo/loader.png", alt: "" }) });
61
61
  }, M = ({ muted: l, toggleMute: i }) => {
62
- const e = V();
62
+ const r = V();
63
63
  return /* @__PURE__ */ S(w, { "data-testid": "video-frame", children: [
64
- e && /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(b, { sdk: e }) }),
65
- /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(R, { muted: l, toggleMute: i }) }),
64
+ r && /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(b, { sdk: r }) }),
65
+ /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(T, { muted: l, toggleMute: i }) }),
66
66
  /* @__PURE__ */ t(
67
67
  L,
68
68
  {
@@ -1,4 +1,4 @@
1
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
1
+ import { StreamLayerSDK } from '../../packages/sdk-web-interfaces/src/index.ts';
2
2
  export declare const useAppApp: (sdk: StreamLayerSDK) => {
3
3
  sdkReady: boolean;
4
4
  activeFeature: any;
@@ -1,4 +1,4 @@
1
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
1
+ import { StreamLayerSDK } from '../../packages/sdk-web-interfaces/src/index.ts';
2
2
  export declare const AppContext: import('react').Context<{
3
3
  sdk: StreamLayerSDK | null;
4
4
  topNavigation?: boolean;
@@ -1,16 +1,17 @@
1
- import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
- import { useStreamLayer as i } from "@streamlayer/react";
3
- import { useStore as s } from "@streamlayer/react-polyfills";
4
- import { storage as u } from "@streamlayer/sdk-web-core";
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import { u } from "../../hooks-B0Qttldg.js";
3
+ import { useStore as l } from "@streamlayer/react-polyfills";
4
+ import { storage as c } from "@streamlayer/sdk-web-core";
5
5
  import "@streamlayer/sdk-web-anonymous-auth";
6
- import { Login as l } from "./index.js";
7
- const w = () => {
8
- const o = i();
6
+ import { Login as m } from "./index.js";
7
+ const x = () => {
8
+ var n, e;
9
+ const o = u();
9
10
  if (!o)
10
11
  return null;
11
- o == null || o.closeFeature(12);
12
- const r = s(o.getUserStore());
13
- return r.data ? /* @__PURE__ */ e("div", { children: [
12
+ o == null || o.closeFeature(!1);
13
+ const r = l(o.getUserStore());
14
+ return r.data ? /* @__PURE__ */ i("div", { children: [
14
15
  /* @__PURE__ */ t(
15
16
  "a",
16
17
  {
@@ -22,21 +23,21 @@ const w = () => {
22
23
  }
23
24
  ),
24
25
  /* @__PURE__ */ t("button", { onClick: o.logout, children: "logout" }),
25
- /* @__PURE__ */ e("div", { children: [
26
+ /* @__PURE__ */ i("div", { children: [
26
27
  "current user: ",
27
- r.data.data.attributes.name,
28
- /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("textarea", { style: { width: "100%" }, value: u.getToken(), rows: 10 }) })
28
+ (e = (n = r.data.data) == null ? void 0 : n.attributes) == null ? void 0 : e.name,
29
+ /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("textarea", { style: { width: "100%" }, value: c.getToken(), rows: 10 }) })
29
30
  ] })
30
- ] }) : /* @__PURE__ */ t(l, { login: async (a) => {
31
+ ] }) : /* @__PURE__ */ t(m, { login: async (s) => {
31
32
  try {
32
- await o.authorizationBypass("streamlayer:streamlayer", a);
33
- } catch (n) {
34
- throw console.log("login err", n), n;
33
+ await o.authorizationBypass("streamlayer:streamlayer", s);
34
+ } catch (a) {
35
+ throw console.log("login err", a), a;
35
36
  }
36
37
  }, anonymousLogin: async () => {
37
38
  await o.anonymousAuthorization();
38
39
  }, host: o.host });
39
40
  };
40
41
  export {
41
- w as LoginComponent
42
+ x as LoginComponent
42
43
  };
@@ -1,5 +1,4 @@
1
1
  import { BetPackEventCb } from '../..';
2
2
  export declare const EndScreen: React.FC<{
3
3
  onEvent: BetPackEventCb;
4
- height?: number;
5
4
  }>;
@@ -1,25 +1,25 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { useState as l } from "react";
3
- import { ScreenContainer as t } from "../ScreenContainer/index.js";
4
- import { S as i, a as m, b as p, c, d as o } from "../../../../../styles-BfnMua4o.js";
5
- import { EndScreenSponsorIcon as S, EndScreenMedia as h } from "./styles.js";
6
- const E = ({ onEvent: s, height: r }) => {
7
- const [a, d] = l(
2
+ import { useState as d } from "react";
3
+ import { ScreenContainer as r } from "../ScreenContainer/index.js";
4
+ import { S as t, a as l, b as m, c as i, d as c } from "../../../../../styles-BfnMua4o.js";
5
+ import { EndScreenSponsorIcon as p, EndScreenMedia as h } from "./styles.js";
6
+ const C = ({ onEvent: o }) => {
7
+ const [s, a] = d(
8
8
  0
9
9
  /* FIRST */
10
10
  );
11
- return a === 0 ? /* @__PURE__ */ e(t, { height: r, children: /* @__PURE__ */ n(i, { children: [
12
- /* @__PURE__ */ e(S, {}),
13
- /* @__PURE__ */ n(m, { children: [
14
- /* @__PURE__ */ e(p, { children: "Great picks!" }),
15
- /* @__PURE__ */ e(c, { children: "Stay in the Enhanced Stream for live results, predictions, trivia, polls, and match insights." })
11
+ return s === 0 ? /* @__PURE__ */ e(r, { children: /* @__PURE__ */ n(t, { children: [
12
+ /* @__PURE__ */ e(p, {}),
13
+ /* @__PURE__ */ n(l, { children: [
14
+ /* @__PURE__ */ e(m, { children: "Great picks!" }),
15
+ /* @__PURE__ */ e(i, { children: "Stay in the Enhanced Stream for live results, predictions, trivia, polls, and match insights." })
16
16
  ] }),
17
17
  /* @__PURE__ */ e(
18
- o,
18
+ c,
19
19
  {
20
20
  "data-a": "intr",
21
21
  onClick: () => {
22
- d(
22
+ a(
23
23
  1
24
24
  /* LAST */
25
25
  );
@@ -28,12 +28,12 @@ const E = ({ onEvent: s, height: r }) => {
28
28
  children: "Continue"
29
29
  }
30
30
  )
31
- ] }) }, "end") : /* @__PURE__ */ e(t, { height: r, children: /* @__PURE__ */ n(i, { children: [
31
+ ] }) }, "end") : /* @__PURE__ */ e(r, { children: /* @__PURE__ */ n(t, { children: [
32
32
  /* @__PURE__ */ e(h, { src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/bet_pack_end_screen.png" }),
33
- /* @__PURE__ */ e(c, { children: "Look for more live match insights, predictions and more." }),
34
- /* @__PURE__ */ e(o, { "data-a": "intr", onClick: () => s({ type: "slOpenGameCenter" }), children: "Open Game Center" })
33
+ /* @__PURE__ */ e(i, { children: "Look for more live match insights, predictions and more." }),
34
+ /* @__PURE__ */ e(c, { "data-a": "intr", onClick: () => o({ type: "slOpenGameCenter" }), children: "Open Game Center" })
35
35
  ] }) }, "end");
36
36
  };
37
37
  export {
38
- E as EndScreen
38
+ C as EndScreen
39
39
  };
@@ -1,5 +1,5 @@
1
- import { Gamification } from '@streamlayer/feature-gamification';
2
- import { ExtendedQuestion } from '@streamlayer/sdk-web-types';
1
+ import { Gamification } from '../../../../../packages/feature-gamification/src/index.ts';
2
+ import { ExtendedQuestion } from '../../../../../packages/sdk-web-types/src/index.ts';
3
3
  export declare const QuestionScreen: React.FC<{
4
4
  question: ExtendedQuestion;
5
5
  vote: Gamification['submitAnswer'];
@@ -1,4 +1,4 @@
1
- import { Gamification } from '@streamlayer/feature-gamification';
1
+ import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
2
2
  import { BetPackEventCb } from '../';
3
3
  export declare const BetPackContent: React.FC<{
4
4
  gamification: Gamification;
@@ -1,4 +1,4 @@
1
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
1
+ import { StreamLayerSDK } from '../../../../packages/sdk-web-interfaces/src/index.ts';
2
2
  import { AllowedMessageType } from '../utils';
3
3
  export type BetPackOverlayProps = {
4
4
  sdk: StreamLayerSDK;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
+ import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
3
3
  import { AllowedMessageType } from './utils';
4
4
  export { BetPackOverlay, type BetPackOverlayProps } from './BetPackOverlay';
5
5
  export type BetPackEventCb = (event: {
@@ -1,5 +1,5 @@
1
- import { Features } from '@streamlayer/sdk-web-features';
2
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
1
+ import { Features } from '../../../packages/sdk-web-features/src/index.ts';
2
+ import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
3
3
  /** Here we check data, render loaders, load data and perform some side effects for the active feature */
4
4
  export declare const FeatureProvider: React.FC<{
5
5
  feature: Features;
@@ -1,4 +1,4 @@
1
- import { Gamification } from '@streamlayer/feature-gamification';
1
+ import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
2
2
  export declare const Question: React.FC<{
3
3
  gamification: Gamification;
4
4
  }>;
@@ -1,4 +1,4 @@
1
- import { Gamification } from '@streamlayer/feature-gamification';
1
+ import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
2
2
  export declare const QuestionsList: React.FC<{
3
3
  store: ReturnType<Exclude<Gamification['feedList'], undefined>['getStore']>;
4
4
  openQuestion: (questionId: string) => void;
@@ -1,4 +1,4 @@
1
- import { Gamification } from '@streamlayer/feature-gamification';
1
+ import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
2
2
  export declare const Tabs: React.FC<{
3
3
  gamification: Gamification;
4
4
  className?: string;
@@ -1,4 +1,4 @@
1
- import { Gamification } from '@streamlayer/feature-gamification';
1
+ import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
2
2
  export declare const UserSummary: React.FC<{
3
3
  userSummary: Exclude<Gamification['userSummary'], undefined>;
4
4
  }>;
@@ -1,6 +1,6 @@
1
1
  import { AppNodeRef } from '../../..';
2
2
  import { ResponsiveStore } from '../../useSdkResponsive';
3
- import { Gamification as GamificationClass } from '@streamlayer/feature-gamification';
3
+ import { Gamification as GamificationClass } from '../../../../packages/feature-gamification/src/index.ts';
4
4
  export declare const GamificationOverlay: React.FC<{
5
5
  gamification: GamificationClass;
6
6
  className?: string;
@@ -1,6 +1,6 @@
1
1
  import { AppNodeRef } from '../..';
2
- import { Features } from '@streamlayer/sdk-web-features';
3
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
+ import { Features } from '../../../packages/sdk-web-features/src/index.ts';
3
+ import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
4
4
  import { ResponsiveStore } from '../useSdkResponsive';
5
5
  /** render feature by type */
6
6
  export declare const ActiveFeature: React.FC<{
@@ -1,5 +1,5 @@
1
- import { Notification } from '@streamlayer/sdk-web-notifications';
2
- import { GameSettings } from '@streamlayer/sdk-web-types';
1
+ import { Notification } from '../../../../../packages/sdk-web-notifications/src/index.ts';
2
+ import { GameSettings } from '../../../../../packages/sdk-web-types/src/index.ts';
3
3
  export declare const Onboarding: React.FC<{
4
4
  close: Notification['close'];
5
5
  action: Notification['action'];
@@ -1,7 +1,7 @@
1
1
  import { AppNodeRef } from '../../..';
2
2
  import { ResponsiveStore } from '../../useSdkResponsive';
3
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
4
- import { Notification } from '@streamlayer/sdk-web-notifications';
3
+ import { StreamLayerSDK } from '../../../../packages/sdk-web-interfaces/src/index.ts';
4
+ import { Notification } from '../../../../packages/sdk-web-notifications/src/index.ts';
5
5
  export declare const Onboarding: React.FC<{
6
6
  sdk: StreamLayerSDK;
7
7
  notification: Notification;