@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,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
  };
@@ -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 { AvailableOverlays } from './Navigation/MastersNavigation';
3
3
  /**
4
4
  * A hook that provides functionality for managing the StreamLayerSDK in the Masters app.
@@ -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 MastersContext: import('react').Context<{
3
3
  sdk: StreamLayerSDK | null;
4
4
  }>;
@@ -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
  };
@@ -1,6 +1,6 @@
1
- import { Features } from '@streamlayer/sdk-web-features';
2
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
- import { FeatureType } from '@streamlayer/sdk-web-types';
1
+ import { Features } from '../packages/sdk-web-features/src/index.ts';
2
+ import { StreamLayerSDK } from '../packages/sdk-web-interfaces/src/index.ts';
3
+ import { FeatureType } from '../packages/sdk-web-types/src/index.ts';
4
4
  /**
5
5
  * A hook that manages the active feature of a StreamLayerSDK instance.
6
6
  * @param sdk - The StreamLayerSDK instance to manage the feature for.
@@ -1,4 +1,4 @@
1
- import { Advertisement } from '@streamlayer/feature-gamification';
1
+ import { Advertisement } from '../../../packages/feature-gamification/src/index.ts';
2
2
  import { ControlVideoCb } from '../../../ui/video-player';
3
3
  export declare const AdvertisementUI: React.FC<{
4
4
  advertisement: Exclude<Advertisement['data'], undefined>;
@@ -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 type StreamLayerSDKAdvertisementProps = {
3
3
  persistent?: boolean;
4
4
  sidebar?: 'left' | 'right';
@@ -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 { StreamLayerSDKTvOptions } from '..';
3
3
  export interface PauseAdProps {
4
4
  vastUrls: Array<{
@@ -1,26 +1,26 @@
1
- import { jsx as a, jsxs as x } from "react/jsx-runtime";
2
- import { cx as F } from "@linaria/core";
3
- import { useFocusable as G } from "@noriginmedia/norigin-spatial-navigation";
4
- import { useState as w, useRef as L, useCallback as B, useEffect as P } from "react";
5
- import { useStore as I } from "@streamlayer/react-polyfills";
6
- import { eventBus as S } from "@streamlayer/sdk-web-interfaces";
7
- import { useLoadGAMStatic as C } from "../../../ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js";
8
- import { PauseAdOverlay as N, PauseAdContent as j, PauseAdTopLeft as K, PauseAdTitle as O, PauseAdCaption as V, PauseAdBottomLeft as $, PauseAdPlayButton as _, PauseAdSidebarGradient as q, PauseAdSidebar as z, PauseAdTitleDescription as H, ExternalAdContainer as D } from "./styles.js";
9
- const J = ({ vastUrl: r, isDesktop: n }) => {
10
- var u;
11
- const [, y] = C(), e = I(y, { keys: [r] });
12
- return P(() => {
13
- e && e[r] && e[r].imageSrc && e[r].id && S.emit("exposedPauseAd", {
1
+ import { jsx as u, jsxs as b } from "react/jsx-runtime";
2
+ import { cx as G } from "@linaria/core";
3
+ import { useFocusable as I } from "@noriginmedia/norigin-spatial-navigation";
4
+ import { useState as B, useRef as E, useCallback as C, useEffect as y } from "react";
5
+ import { useStore as N } from "@streamlayer/react-polyfills";
6
+ import { eventBus as g } from "@streamlayer/sdk-web-interfaces";
7
+ import { useLoadGAMStatic as M } from "../../../ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js";
8
+ import { PauseAdOverlay as j, PauseAdContent as K, PauseAdTopLeft as O, PauseAdTitle as V, PauseAdCaption as $, PauseAdBottomLeft as _, PauseAdPlayButton as q, PauseAdSidebarGradient as z, PauseAdSidebar as H, PauseAdTitleDescription as J, ExternalAdContainer as D } from "./styles.js";
9
+ const Q = ({ vastUrl: r, isDesktop: o }) => {
10
+ var a;
11
+ const [, h] = M(), e = N(h, { keys: [r] });
12
+ return y(() => {
13
+ e && e[r] && e[r].imageSrc && e[r].id && g.emit("exposedPauseAd", {
14
14
  action: "rendered",
15
15
  payload: {
16
16
  id: e[r].id
17
17
  }
18
18
  });
19
- }, [e, r]), (u = e == null ? void 0 : e[r]) != null && u.imageSrc ? !e[r].adUrl || !n ? /* @__PURE__ */ a(D, { src: e[r].imageSrc }) : /* @__PURE__ */ a(
19
+ }, [e, r]), (a = e == null ? void 0 : e[r]) != null && a.imageSrc ? !e[r].adUrl || !o ? /* @__PURE__ */ u(D, { src: e[r].imageSrc }) : /* @__PURE__ */ u(
20
20
  "a",
21
21
  {
22
22
  onClick: () => {
23
- S.emit("exposedPauseAd", {
23
+ g.emit("exposedPauseAd", {
24
24
  action: "navigated",
25
25
  payload: {
26
26
  id: e[r].id
@@ -30,101 +30,101 @@ const J = ({ vastUrl: r, isDesktop: n }) => {
30
30
  href: e[r].adUrl,
31
31
  target: "_blank",
32
32
  rel: "noopener noreferrer",
33
- children: /* @__PURE__ */ a(D, { src: e[r].imageSrc })
33
+ children: /* @__PURE__ */ u(D, { src: e[r].imageSrc })
34
34
  }
35
35
  ) : null;
36
- }, Q = ({ isClosing: r, title: n, caption: y, onPlay: e, onClose: u, vastUrl: f, options: t, isDesktop: m }) => {
37
- const T = (t == null ? void 0 : t.showPauseButton) ?? !0, { ref: d, focusSelf: p } = G({
36
+ }, W = ({ isClosing: r, title: o, caption: h, onPlay: e, onClose: a, vastUrl: f, options: t, isDesktop: m }) => {
37
+ const T = (t == null ? void 0 : t.showPauseButton) ?? !0, { ref: s, focusSelf: p } = I({
38
38
  focusKey: "sl-pause-ad-play",
39
39
  onEnterRelease: e,
40
40
  isFocusBoundary: !0,
41
41
  forceFocus: !0
42
42
  });
43
- return P(() => {
44
- d.current && p();
45
- }, [d, p]), P(() => {
46
- if (!u)
43
+ return y(() => {
44
+ s.current && p();
45
+ }, [s, p]), y(() => {
46
+ if (!a)
47
47
  return () => {
48
48
  };
49
- const h = (A) => {
50
- const s = A.keyCode;
51
- if (s === 461 || s === 10009 || s === 27 || s === 8) {
52
- A.preventDefault(), A.stopPropagation(), A.stopImmediatePropagation(), u();
49
+ const S = (A) => {
50
+ const d = A.keyCode;
51
+ if (d === 461 || d === 10009 || d === 27 || d === 8) {
52
+ A.preventDefault(), A.stopPropagation(), A.stopImmediatePropagation(), a();
53
53
  return;
54
54
  }
55
55
  };
56
- return window.addEventListener("keydown", h, { capture: !0 }), () => window.removeEventListener("keydown", h, { capture: !0 });
57
- }, [u]), /* @__PURE__ */ a(N, { className: F("SL_PauseAdOverlay", r && "pause-ad-closing"), children: /* @__PURE__ */ x(j, { children: [
58
- /* @__PURE__ */ x(K, { children: [
59
- /* @__PURE__ */ a(O, { children: n }),
60
- /* @__PURE__ */ a(V, { children: y })
56
+ return window.addEventListener("keydown", S, { capture: !0 }), () => window.removeEventListener("keydown", S, { capture: !0 });
57
+ }, [a]), /* @__PURE__ */ u(j, { className: G("SL_PauseAdOverlay", r && "pause-ad-closing"), children: /* @__PURE__ */ b(K, { children: [
58
+ /* @__PURE__ */ b(O, { children: [
59
+ /* @__PURE__ */ u(V, { children: o }),
60
+ /* @__PURE__ */ u($, { children: h })
61
61
  ] }),
62
- T && /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(
63
- _,
62
+ T && /* @__PURE__ */ u(_, { children: /* @__PURE__ */ u(
63
+ q,
64
64
  {
65
- ref: d,
65
+ ref: s,
66
66
  onClick: e,
67
- onMouseEnter: () => d.current.focus(),
67
+ onMouseEnter: () => s.current.focus(),
68
68
  "aria-label": "Resume playback"
69
69
  }
70
70
  ) }),
71
- /* @__PURE__ */ a(q, { className: "SL_PauseAdSidebar", children: /* @__PURE__ */ x(z, { children: [
72
- f && /* @__PURE__ */ a(J, { isDesktop: m, vastUrl: f }),
73
- /* @__PURE__ */ a(H, { children: "ADVERTISEMENT" })
71
+ /* @__PURE__ */ u(z, { className: "SL_PauseAdSidebar", children: /* @__PURE__ */ b(H, { children: [
72
+ f && /* @__PURE__ */ u(Q, { isDesktop: m, vastUrl: f }),
73
+ /* @__PURE__ */ u(J, { children: "ADVERTISEMENT" })
74
74
  ] }) })
75
75
  ] }) });
76
- }, re = ({ showPauseAd: r, vastUrls: n, title: y, caption: e, sdk: u, onClose: f, onRender: t, options: m, isDesktop: T }) => {
77
- const d = (m == null ? void 0 : m.pauseAdDelay) ?? 5e3, [p, h] = w(!1), [A, s] = w(!1), c = L(), i = n == null ? void 0 : n[0].url, g = L(i);
78
- g.current = i;
79
- const [b, E] = C(), o = B(() => {
80
- f && (S.emit("exposedPauseAd", {
76
+ }, te = ({ showPauseAd: r, vastUrls: o, title: h, caption: e, sdk: a, onClose: f, onRender: t, options: m, isDesktop: T }) => {
77
+ const s = (m == null ? void 0 : m.pauseAdDelay) ?? 5e3, [p, S] = B(!1), [A, d] = B(!1), c = E(), i = o == null ? void 0 : o[0].url, P = E(i), x = E("");
78
+ P.current = i;
79
+ const [k, w] = M(), n = C(() => {
80
+ f && (x.current = P.current, g.emit("exposedPauseAd", {
81
81
  action: "closed",
82
82
  payload: {}
83
83
  }), f());
84
- }, [f]), M = B(() => {
85
- u.controlVideoPlayer({ play: !0 });
86
- }, [u]);
87
- return P(() => {
84
+ }, [f]), F = C(() => {
85
+ a.controlVideoPlayer({ play: !0 });
86
+ }, [a]);
87
+ return y(() => {
88
88
  if (r && i) {
89
- S.emit("exposedPauseAd", {
89
+ g.emit("exposedPauseAd", {
90
90
  action: "enabled",
91
91
  payload: {}
92
- }), b(i).then((l) => {
93
- g.current === i && (l == null ? void 0 : l.success) !== !0 && (clearTimeout(c.current), o == null || o());
92
+ }), k(i).then((l) => {
93
+ P.current === i && (l == null ? void 0 : l.success) !== !0 && (clearTimeout(c.current), n == null || n());
94
94
  }).catch(() => {
95
- g.current === i && (clearTimeout(c.current), o == null || o());
95
+ P.current === i && (clearTimeout(c.current), n == null || n());
96
96
  });
97
- const k = () => {
98
- const l = E.get()[g.current];
99
- l != null && l.imageSrc ? (clearTimeout(c.current), s(!1), h(!0)) : c.current = setTimeout(() => {
100
- k();
97
+ const L = () => {
98
+ const l = w.get()[P.current];
99
+ l != null && l.imageSrc ? (clearTimeout(c.current), d(!1), S(!0)) : c.current = setTimeout(() => {
100
+ L();
101
101
  }, 200);
102
102
  };
103
103
  c.current = setTimeout(() => {
104
- k();
105
- }, d);
104
+ L();
105
+ }, s);
106
106
  } else
107
- S.emit("exposedPauseAd", {
107
+ x.current !== P.current && (x.current = "", g.emit("exposedPauseAd", {
108
108
  action: "disabled",
109
109
  payload: {}
110
- }), s(!0), c.current = setTimeout(() => {
111
- h(!1);
110
+ })), d(!0), c.current = setTimeout(() => {
111
+ S(!1);
112
112
  }, 400);
113
113
  return () => {
114
114
  c.current && clearTimeout(c.current);
115
115
  };
116
- }, [E, b, o, d, r, i]), P(() => {
116
+ }, [w, k, n, s, r, i]), y(() => {
117
117
  t == null || t({ rendered: p });
118
- }, [p, t]), P(() => () => {
118
+ }, [p, t]), y(() => () => {
119
119
  t == null || t({ rendered: !1 });
120
- }, [t]), p ? /* @__PURE__ */ a(
121
- Q,
120
+ }, [t]), p ? /* @__PURE__ */ u(
121
+ W,
122
122
  {
123
- onClose: o,
123
+ onClose: n,
124
124
  isClosing: A,
125
- title: y,
125
+ title: h,
126
126
  caption: e,
127
- onPlay: M,
127
+ onPlay: F,
128
128
  vastUrl: i,
129
129
  options: m,
130
130
  isDesktop: T
@@ -132,5 +132,5 @@ const J = ({ vastUrl: r, isDesktop: n }) => {
132
132
  ) : null;
133
133
  };
134
134
  export {
135
- re as PauseAd
135
+ te as PauseAd
136
136
  };
@@ -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 type StreamLayerSDKQuestionProps = {
3
3
  persistent?: boolean;
4
4
  skipAutoClose?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'react';
2
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
+ import { StreamLayerSDK } from '../../packages/sdk-web-interfaces/src/index.ts';
3
3
  import { StreamLayerSDKAdvertisementWebOS } from './Advertisement';
4
4
  import { PauseAd, PauseAdProps } from './ExposedPauseAd/PauseAd';
5
5
  import { StreamLayerSDKQuestionWebOS } from './Question';