@streamlayer/react-ui 1.26.1 → 1.27.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 (205) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +1 -0
  2. package/lib/app/app/Advertisement/index.js +125 -92
  3. package/lib/app/app/Banner/index.d.ts +6 -0
  4. package/lib/app/app/Banner/index.js +6 -0
  5. package/lib/app/app/Features/Gamification/Question.d.ts +4 -0
  6. package/lib/app/app/Features/Gamification/Question.js +79 -50
  7. package/lib/app/app/Features/Gamification/QuestionAdvertisement.d.ts +6 -0
  8. package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +46 -0
  9. package/lib/app/app/Features/Gamification/Tabs.js +12 -12
  10. package/lib/app/app/Features/Gamification/index.d.ts +3 -0
  11. package/lib/app/app/Features/Gamification/index.js +56 -52
  12. package/lib/app/app/Features/index.d.ts +1 -0
  13. package/lib/app/app/Features/index.js +6 -4
  14. package/lib/app/app/InApp/index.d.ts +1 -0
  15. package/lib/app/app/InApp/index.js +44 -17
  16. package/lib/app/app/Insight/index.d.ts +3 -0
  17. package/lib/app/app/Insight/index.js +33 -30
  18. package/lib/app/app/Layout/index.d.ts +17 -0
  19. package/lib/app/app/Layout/index.js +105 -0
  20. package/lib/app/app/Layout/styles.d.ts +12 -0
  21. package/lib/app/app/Layout/styles.js +64 -0
  22. package/lib/app/app/Notifications/Onboarding/Notification/styles.d.ts +7 -1
  23. package/lib/app/app/Notifications/styles.d.ts +18 -2
  24. package/lib/app/app/index.d.ts +1 -0
  25. package/lib/app/app/index.js +91 -85
  26. package/lib/app/app/story/index.js +56 -58
  27. package/lib/app/app/story/promotion/index.js +31 -36
  28. package/lib/app/app/story/promotion/styles.d.ts +3 -1
  29. package/lib/app/app/story/promotion/video.js +63 -81
  30. package/lib/app/app/story/promotion-notification/styles.d.ts +3 -1
  31. package/lib/app/app/story/styles.d.ts +5 -1
  32. package/lib/app/app/story/styles.js +36 -16
  33. package/lib/app/app/story/video.d.ts +5 -1
  34. package/lib/app/app/story/video.js +70 -33
  35. package/lib/app/app/useApp.d.ts +1 -2
  36. package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +7 -1
  37. package/lib/app/masters/BetPack/BetPackContent/index.js +175 -187
  38. package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +84 -84
  39. package/lib/app/masters/BetPack/BetPackOverlay/styles.d.ts +14 -2
  40. package/lib/app/masters/Features/Gamification/Question.js +19 -17
  41. package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +7 -1
  42. package/lib/app/masters/Notifications/styles.d.ts +18 -2
  43. package/lib/app/masters/masters.d.ts +4 -1
  44. package/lib/app/masters/useMastersApp.d.ts +1 -1
  45. package/lib/app/tgl/styles.d.ts +3 -1
  46. package/lib/app/{tvos → webos/Advertisement}/AdvertisementUI.d.ts +7 -1
  47. package/lib/app/webos/Advertisement/AdvertisementUI.js +63 -0
  48. package/lib/app/{tvos/Advertisement.d.ts → webos/Advertisement/index.d.ts} +3 -1
  49. package/lib/app/webos/Advertisement/index.js +119 -0
  50. package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +15 -0
  51. package/lib/app/webos/ExposedPauseAd/PauseAd.js +93 -0
  52. package/lib/app/webos/ExposedPauseAd/styles.d.ts +12 -0
  53. package/lib/app/webos/ExposedPauseAd/styles.js +64 -0
  54. package/lib/app/webos/Question/index.d.ts +9 -0
  55. package/lib/app/webos/Question/index.js +56 -0
  56. package/lib/app/webos/index.d.ts +24 -0
  57. package/lib/app/webos/index.js +65 -0
  58. package/lib/app/webos/story.d.ts +9 -0
  59. package/lib/app/webos/story.js +74 -0
  60. package/lib/app/webos/styles.js +4 -0
  61. package/lib/app/webos/ui/Layout/index.js +78 -0
  62. package/lib/app/{tvos → webos}/ui/Layout/styles.js +25 -25
  63. package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +7 -0
  64. package/lib/app/webos/ui/Sidebar/PromoAction.js +63 -0
  65. package/lib/app/{tvos → webos}/ui/Sidebar/index.d.ts +6 -0
  66. package/lib/app/webos/ui/Sidebar/index.js +176 -0
  67. package/lib/app/{tvos → webos}/ui/Sidebar/styles.d.ts +7 -3
  68. package/lib/app/{tvos → webos}/ui/Sidebar/styles.js +175 -170
  69. package/lib/app/webos/ui/insight/index.d.ts +9 -0
  70. package/lib/app/webos/ui/insight/index.js +100 -0
  71. package/lib/app/webos/ui/insight/styles.d.ts +12 -0
  72. package/lib/app/webos/ui/insight/styles.js +51 -0
  73. package/lib/app/webos/useTvButton.d.ts +9 -0
  74. package/lib/app/webos/useTvButton.js +23 -0
  75. package/lib/assets/style.css +1 -1
  76. package/lib/hooks/analytics.d.ts +14 -0
  77. package/lib/hooks/showIn.d.ts +9 -0
  78. package/lib/hooks/useKeyboardNavigation.d.ts +15 -0
  79. package/lib/hooks/useKeyboardNavigation.js +74 -0
  80. package/lib/index-T1iiS0ZO.js +17 -0
  81. package/lib/ui/advertisement/banner/index.d.ts +3 -0
  82. package/lib/ui/advertisement/banner/index.js +29 -17
  83. package/lib/ui/advertisement/banner/styles.d.ts +5 -1
  84. package/lib/ui/advertisement/index.d.ts +4 -1
  85. package/lib/ui/advertisement/index.js +56 -44
  86. package/lib/ui/advertisement/notification/index.d.ts +2 -0
  87. package/lib/ui/advertisement/notification/index.js +50 -34
  88. package/lib/ui/advertisement/notification/lower-third/index.d.ts +2 -0
  89. package/lib/ui/advertisement/notification/lower-third/index.js +42 -26
  90. package/lib/ui/advertisement/notification/lower-third/styles.d.ts +11 -0
  91. package/lib/ui/advertisement/notification/lower-third/styles.js +39 -24
  92. package/lib/ui/advertisement/notification/styles.d.ts +18 -1
  93. package/lib/ui/advertisement/notification/styles.js +48 -33
  94. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.d.ts +2 -2
  95. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +1 -1
  96. package/lib/ui/advertisement/overlay/index.d.ts +4 -1
  97. package/lib/ui/advertisement/overlay/index.js +135 -77
  98. package/lib/ui/gamification/detail/header/index.d.ts +2 -0
  99. package/lib/ui/gamification/detail/header/index.js +19 -16
  100. package/lib/ui/gamification/detail/header/styles.d.ts +15 -3
  101. package/lib/ui/gamification/detail/header/styles.js +1 -1
  102. package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -0
  103. package/lib/ui/gamification/detail/sponsor/index.js +25 -13
  104. package/lib/ui/gamification/invite-link/styles.d.ts +14 -2
  105. package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -1
  106. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +14 -2
  107. package/lib/ui/gamification/onboarding/styles.d.ts +10 -2
  108. package/lib/ui/gamification/points/styles.d.ts +7 -1
  109. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +48 -0
  110. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +94 -0
  111. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +9 -0
  112. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.js +99 -0
  113. package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.d.ts +42 -0
  114. package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.js +117 -0
  115. package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +9 -8
  116. package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -1
  117. package/lib/ui/gamification/question/inapp/onboarding/index.js +12 -12
  118. package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +18 -2
  119. package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +9 -9
  120. package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +7 -1
  121. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.d.ts +5 -0
  122. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.js +49 -0
  123. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +12 -0
  124. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.js +56 -0
  125. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.d.ts +1 -0
  126. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.js +34 -0
  127. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.d.ts +1 -0
  128. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.js +19 -0
  129. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.d.ts +4 -0
  130. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.js +34 -0
  131. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.d.ts +7 -0
  132. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.js +43 -0
  133. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.d.ts +9 -0
  134. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.js +20 -0
  135. package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +10 -0
  136. package/lib/ui/gamification/question/inapp/prediction-result-ad/index.js +20 -0
  137. package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.d.ts +11 -0
  138. package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.js +34 -0
  139. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +38 -5
  140. package/lib/ui/gamification/question/notification/styles.d.ts +14 -2
  141. package/lib/ui/gamification/question/styles.d.ts +26 -4
  142. package/lib/ui/gamification/vote/alert/styles.d.ts +7 -1
  143. package/lib/ui/gamification/vote/feedback/styles.d.ts +19 -2
  144. package/lib/ui/gamification/vote/feedbackAlert/index.d.ts +9 -0
  145. package/lib/ui/gamification/vote/feedbackAlert/index.js +11 -0
  146. package/lib/ui/gamification/vote/feedbackAlert/styles.d.ts +11 -0
  147. package/lib/ui/gamification/vote/feedbackAlert/styles.js +30 -0
  148. package/lib/ui/gamification/vote/index.d.ts +3 -1
  149. package/lib/ui/gamification/vote/index.js +160 -130
  150. package/lib/ui/gamification/vote/insight-details/index.js +8 -7
  151. package/lib/ui/gamification/vote/insight-details/styles.d.ts +7 -1
  152. package/lib/ui/gamification/vote/styles.d.ts +29 -4
  153. package/lib/ui/gamification/vote/vote-option/index.d.ts +3 -0
  154. package/lib/ui/gamification/vote/vote-option/index.js +72 -64
  155. package/lib/ui/gamification/vote/vote-option/styles.d.ts +7 -1
  156. package/lib/ui/gamification/vote/win-bar/styles.d.ts +19 -2
  157. package/lib/ui/icons/index.d.ts +1 -0
  158. package/lib/ui/icons/index.js +80 -79
  159. package/lib/ui/modal/index.js +12 -17
  160. package/lib/ui/questions/insight/index.d.ts +4 -1
  161. package/lib/ui/questions/insight/index.js +29 -26
  162. package/lib/ui/questions/twitter/account/styles.d.ts +7 -1
  163. package/lib/ui/questions/twitter/index.d.ts +1 -0
  164. package/lib/ui/questions/twitter/index.js +27 -19
  165. package/lib/ui/theme/constants.d.ts +2 -0
  166. package/lib/ui/theme/constants.js +2 -0
  167. package/lib/ui/theme/masters-theme.js +1 -0
  168. package/lib/ui/theme/utils.d.ts +10 -0
  169. package/lib/ui/theme/utils.js +77 -0
  170. package/lib/ui/video-player/index.d.ts +10 -2
  171. package/lib/ui/video-player/index.js +189 -110
  172. package/lib/ui/video-player/styles.d.ts +36 -0
  173. package/lib/ui/video-player/styles.js +59 -11
  174. package/lib/utils/common.d.ts +6 -0
  175. package/lib/utils/createDemo.d.ts +12 -0
  176. package/lib/utils/debug/components/bypassLogin.d.ts +6 -0
  177. package/lib/utils/debug/components/copyLogs.d.ts +1 -0
  178. package/lib/utils/debug/components/developer.d.ts +14 -0
  179. package/lib/utils/debug/components/envToggle.d.ts +6 -0
  180. package/lib/utils/debug/components/eventInput.d.ts +8 -0
  181. package/lib/utils/debug/components/sdkKey.d.ts +6 -0
  182. package/lib/utils/debug/components/styles.d.ts +1 -0
  183. package/lib/utils/debug/index.d.ts +36 -0
  184. package/lib/utils/debug/storage.d.ts +14 -0
  185. package/lib/utils/decorators/container.d.ts +6 -0
  186. package/lib/utils/decorators/container.js +5 -5
  187. package/lib/utils/decorators/masters.d.ts +2 -0
  188. package/lib/utils/decorators/styles.d.ts +2 -0
  189. package/lib/utils/login.d.ts +3 -0
  190. package/lib/utils/storage.d.ts +14 -0
  191. package/package.json +27 -20
  192. package/lib/app/tvos/Advertisement.js +0 -88
  193. package/lib/app/tvos/AdvertisementUI.js +0 -40
  194. package/lib/app/tvos/index.d.ts +0 -16
  195. package/lib/app/tvos/index.js +0 -23
  196. package/lib/app/tvos/story.d.ts +0 -6
  197. package/lib/app/tvos/story.js +0 -34
  198. package/lib/app/tvos/styles.js +0 -4
  199. package/lib/app/tvos/ui/Layout/index.js +0 -76
  200. package/lib/app/tvos/ui/Sidebar/PromoAction.d.ts +0 -2
  201. package/lib/app/tvos/ui/Sidebar/PromoAction.js +0 -62
  202. package/lib/app/tvos/ui/Sidebar/index.js +0 -114
  203. /package/lib/app/{tvos → webos}/styles.d.ts +0 -0
  204. /package/lib/app/{tvos → webos}/ui/Layout/index.d.ts +0 -0
  205. /package/lib/app/{tvos → webos}/ui/Layout/styles.d.ts +0 -0
@@ -1,92 +1,96 @@
1
- import { jsx as o, jsxs as x } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as v } from "react/jsx-runtime";
2
2
  import { cx as l } from "@linaria/core";
3
- import { styled as f } from "@linaria/react";
4
- import { SDKWhiteContainer as k } from "../../styles.js";
5
- import { useAppContext as v } from "../../useAppContext.js";
6
- import { useHideTransition as S } from "../../../../hooks/showIn.js";
7
- import { useStore as c } from "@streamlayer/react-polyfills";
8
- import { VoteHeader as U } from "../../../../ui/gamification/detail/header/index.js";
9
- import { UserStatistics as I } from "../../../../ui/gamification/user-statistics/index.js";
10
- import { ModalPortal as y } from "../../../../ui/modal/index.js";
11
- import { ShowIn as A } from "../../../../ui/show-in/index.js";
12
- import { Question as O } from "./Question.js";
13
- import { Tabs as b } from "./Tabs.js";
14
- const w = () => A, u = /* @__PURE__ */ f(w())({
3
+ import { styled as h } from "@linaria/react";
4
+ import { SDKWhiteContainer as S } from "../../styles.js";
5
+ import { useAppContext as U } from "../../useAppContext.js";
6
+ import { useHideTransition as Q } from "../../../../hooks/showIn.js";
7
+ import { useStore as i } from "@streamlayer/react-polyfills";
8
+ import { VoteHeader as y } from "../../../../ui/gamification/detail/header/index.js";
9
+ import { UserStatistics as A } from "../../../../ui/gamification/user-statistics/index.js";
10
+ import { ModalPortal as O } from "../../../../ui/modal/index.js";
11
+ import { ShowIn as b } from "../../../../ui/show-in/index.js";
12
+ import { Question as w } from "./Question.js";
13
+ import { Tabs as D } from "./Tabs.js";
14
+ const H = () => b, u = /* @__PURE__ */ h(H())({
15
15
  name: "OpenedContainer",
16
16
  class: "ouvguos",
17
17
  propsAsIs: !0
18
- }), d = "t1eu4lbg", D = /* @__PURE__ */ f("div")({
18
+ }), f = "t1eu4lbg", R = /* @__PURE__ */ h("div")({
19
19
  name: "UserContainer",
20
20
  class: "uuv2xqo",
21
21
  propsAsIs: !1
22
- }), H = ({
22
+ }), V = ({
23
23
  correct: e,
24
24
  incorrect: t
25
25
  }) => {
26
26
  const n = e + t;
27
27
  return n === 0 ? 0 : Math.round(e / n * 100);
28
- }, P = ({
28
+ }, g = ({
29
29
  gamification: e,
30
30
  scrollStore: t,
31
31
  className: n,
32
- appNode: a,
33
- scrollNode: r,
34
- responsiveStore: s
35
- }) => /* @__PURE__ */ o(b, {
36
- appNode: a,
32
+ appNode: r,
33
+ scrollNode: p,
34
+ responsiveStore: a
35
+ }) => /* @__PURE__ */ o(D, {
36
+ appNode: r,
37
37
  scrollStore: t,
38
- scrollNode: r,
38
+ scrollNode: p,
39
39
  className: n,
40
40
  gamification: e,
41
- responsiveStore: s
42
- }), W = ({
41
+ responsiveStore: a
42
+ }), z = ({
43
43
  gamification: e,
44
- className: t,
45
- appNode: n,
44
+ muted: t,
45
+ sdk: n,
46
+ className: r,
47
+ appNode: p,
46
48
  responsiveStore: a
47
49
  }) => {
48
50
  const {
49
- topNavigation: r
50
- } = v(), s = c(e.openedQuestion.$store), i = c(e.openedUser), {
51
- sdkInDesktopView: h
52
- } = c(a, {
51
+ topNavigation: c
52
+ } = U(), C = i(e.openedQuestionId), x = i(e.openedQuestion.$store), s = i(e.openedUser), {
53
+ sdkInDesktopView: I
54
+ } = i(a, {
53
55
  keys: ["sdkInDesktopView"]
54
56
  }), {
55
57
  hiding: m,
56
- onAnimationEnd: p
57
- } = S();
58
- if (!n.current || !s && !i)
58
+ onAnimationEnd: d
59
+ } = Q();
60
+ if (!C && !s)
59
61
  return null;
60
- const C = s ? /* @__PURE__ */ o(u, {
61
- className: l(t, !r && d),
62
+ const k = x ? /* @__PURE__ */ o(u, {
63
+ className: l(r, !c && f),
62
64
  hiding: m,
63
- onAnimationEnd: p,
64
- children: /* @__PURE__ */ o(O, {
65
+ onAnimationEnd: d,
66
+ children: /* @__PURE__ */ o(w, {
67
+ muted: t,
68
+ sdk: n,
65
69
  gamification: e
66
70
  })
67
- }) : i ? /* @__PURE__ */ o(u, {
68
- className: l(t, !r && d),
71
+ }) : s ? /* @__PURE__ */ o(u, {
72
+ className: l(r, !c && f),
69
73
  hiding: m,
70
- onAnimationEnd: p,
71
- children: /* @__PURE__ */ x(D, {
72
- children: [/* @__PURE__ */ o(U, {
74
+ onAnimationEnd: d,
75
+ children: /* @__PURE__ */ v(R, {
76
+ children: [/* @__PURE__ */ o(y, {
73
77
  label: "Friend's Rank",
74
78
  close: e.closeUser
75
- }), /* @__PURE__ */ o(k, {
76
- children: /* @__PURE__ */ o(I, {
77
- ...i,
78
- successRate: H(i)
79
+ }), /* @__PURE__ */ o(S, {
80
+ children: /* @__PURE__ */ o(A, {
81
+ ...s,
82
+ successRate: V(s)
79
83
  })
80
84
  })]
81
85
  })
82
86
  }) : null;
83
- return /* @__PURE__ */ o(y, {
84
- container: n,
85
- useContainer: !h,
86
- children: C
87
+ return /* @__PURE__ */ o(O, {
88
+ container: p,
89
+ useContainer: !I,
90
+ children: k
87
91
  });
88
92
  };
89
93
  export {
90
- P as GamificationOverlay,
91
- W as GamificationOverlayStandalone
94
+ g as GamificationOverlay,
95
+ z as GamificationOverlayStandalone
92
96
  };
@@ -20,4 +20,5 @@ export declare const StandaloneFeature: React.FC<{
20
20
  responsiveStore: ResponsiveStore;
21
21
  appNode: AppNodeRef;
22
22
  className?: string;
23
+ muted?: boolean;
23
24
  }>;
@@ -22,12 +22,14 @@ const d = f(() => import("./Gamification/gamification-feature.js")), x = ({ sdk:
22
22
  children: u
23
23
  }
24
24
  );
25
- }, A = ({ feature: i, className: t, appNode: n, responsiveStore: e }) => i && i.featureConfig.get().type === m.GAMES ? /* @__PURE__ */ r(
25
+ }, A = ({ feature: i, sdk: t, muted: n, className: e, appNode: o, responsiveStore: a }) => i && i.featureConfig.get().type === m.GAMES ? /* @__PURE__ */ r(
26
26
  y,
27
27
  {
28
- className: t,
29
- appNode: n,
30
- responsiveStore: e,
28
+ className: e,
29
+ appNode: o,
30
+ muted: n,
31
+ sdk: t,
32
+ responsiveStore: a,
31
33
  gamification: i
32
34
  }
33
35
  ) : null;
@@ -1,4 +1,5 @@
1
1
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
2
  export declare const StreamLayerSDKNotification: React.FC<{
3
3
  sdk: StreamLayerSDK;
4
+ webos?: boolean;
4
5
  }>;
@@ -1,31 +1,58 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { useState as p, useMemo as c, useEffect as s } from "react";
3
- import { useStore as u } from "@streamlayer/react-polyfills";
4
- import { eventBus as f } from "@streamlayer/sdk-web-interfaces";
5
- import { NotificationType as n } from "@streamlayer/sdk-web-notifications";
6
- import { FeatureType as m, QuestionType as d } from "@streamlayer/sdk-web-types";
7
- import { InAppNotification as l } from "../../../ui/gamification/question/inapp/notification/index.js";
8
- import { InAppOnboarding as y } from "../../../ui/gamification/question/inapp/onboarding/index.js";
9
- import { InAppPredictionResult as I } from "../../../ui/gamification/question/inapp/prediction-result/index.js";
10
- const R = ({ sdk: o }) => {
11
- const [r] = p(o.getNotificationsStore()), a = u(r), e = o.getFeature(m.GAMES), t = c(() => o.getActiveNotification(), [o, a]);
12
- return s(() => {
13
- t && f.emit("notification", {
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useState as I, useMemo as T, useEffect as y } from "react";
3
+ import { useStore as S } from "@streamlayer/react-polyfills";
4
+ import { eventBus as q } from "@streamlayer/sdk-web-interfaces";
5
+ import { NotificationType as f } from "@streamlayer/sdk-web-notifications";
6
+ import { FeatureType as O, QuestionType as R, AdUnit as m } from "@streamlayer/sdk-web-types";
7
+ import { InAppNotification as g } from "../../../ui/gamification/question/inapp/notification/index.js";
8
+ import { InAppNotification as D } from "../../../ui/gamification/question/inapp/notification/AdNotification/index.js";
9
+ import { InAppOnboarding as E } from "../../../ui/gamification/question/inapp/onboarding/index.js";
10
+ import { InAppPredictionResult as b } from "../../../ui/gamification/question/inapp/prediction-result/index.js";
11
+ import { InAppPredictionResultAd as U } from "../../../ui/gamification/question/inapp/prediction-result-ad/index.js";
12
+ const K = ({ sdk: i, webos: A }) => {
13
+ var e, a, r, p, c, s, d, u;
14
+ const [l] = I(i.getNotificationsStore()), N = S(l), n = i.getFeature(O.GAMES), t = T(() => i.getActiveNotification(), [i, N]);
15
+ return y(() => {
16
+ t && q.emit("notification", {
14
17
  action: "rendered",
15
18
  payload: {
16
19
  questionId: t.data.questionId,
17
20
  questionType: t.data.questionType
18
21
  }
19
22
  });
20
- }, [t]), t && t.type === n.QUESTION_RESOLVED ? t.data.question && t.data.questionType === d.PREDICTION ? /* @__PURE__ */ i(
21
- I,
23
+ }, [t]), t && t.type === f.QUESTION_RESOLVED ? t.data.question && t.data.questionType === R.PREDICTION ? t && ((e = t.data.inApp) == null ? void 0 : e.adUnit) === m.STANDART ? /* @__PURE__ */ o(
24
+ U,
25
+ {
26
+ action: t.action,
27
+ close: t.close,
28
+ ...t.data.question,
29
+ inApp: t.data.inApp
30
+ }
31
+ ) : /* @__PURE__ */ o(
32
+ b,
22
33
  {
23
34
  action: t.action,
24
35
  close: t.close,
25
36
  ...t.data.question
26
37
  }
27
- ) : null : t && t.type === n.ONBOARDING ? t.data.onboarding ? /* @__PURE__ */ i(y, { open: e == null ? void 0 : e.openFeature, close: t.close, ...t.data.onboarding }) : null : t && /* @__PURE__ */ i(l, { ...t.data, action: t.action });
38
+ ) : null : t && t.type === f.ONBOARDING ? t.data.onboarding ? /* @__PURE__ */ o(
39
+ E,
40
+ {
41
+ open: n == null ? void 0 : n.openOnboarding,
42
+ close: t.close,
43
+ ...t.data.onboarding
44
+ }
45
+ ) : null : t && ((a = t.data.inApp) == null ? void 0 : a.adUnit) === m.STANDART ? /* @__PURE__ */ o(
46
+ D,
47
+ {
48
+ ...t.data,
49
+ action: t.action,
50
+ close: t.close,
51
+ color: ((c = (p = (r = t == null ? void 0 : t.data) == null ? void 0 : r.inApp) == null ? void 0 : p.notification) == null ? void 0 : c.indicatorColor) || ((u = (d = (s = t == null ? void 0 : t.data) == null ? void 0 : s.inApp) == null ? void 0 : d.appearance) == null ? void 0 : u.primaryColor),
52
+ webos: A
53
+ }
54
+ ) : t && /* @__PURE__ */ o(g, { ...t.data, action: t.action });
28
55
  };
29
56
  export {
30
- R as StreamLayerSDKNotification
57
+ K as StreamLayerSDKNotification
31
58
  };
@@ -4,10 +4,13 @@ export declare const QuestionWrap: {
4
4
  __wyw_meta: unknown;
5
5
  } & import('react').FC<{
6
6
  gamification: Gamification;
7
+ sdk: StreamLayerSDK;
7
8
  hideSponsor?: boolean;
8
9
  className?: string;
9
10
  skipAutoClose?: boolean;
10
11
  hideHeader?: boolean;
12
+ muted?: boolean;
13
+ webos?: boolean;
11
14
  }>;
12
15
  export type StreamLayerSDKInsightProps = {
13
16
  hideHeader?: boolean;
@@ -1,57 +1,60 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { styled as i } from "@linaria/react";
3
- import { useRef as l, useEffect as m } from "react";
4
- import { useStore as Q } from "@streamlayer/react-polyfills";
5
- import { FeatureType as S } from "@streamlayer/sdk-web-types";
6
- import { Question as y } from "../Features/Gamification/Question.js";
7
- const I = () => y, b = /* @__PURE__ */ i(I())({
1
+ import { jsx as Q } from "react/jsx-runtime";
2
+ import { styled as l } from "@linaria/react";
3
+ import { useRef as m, useEffect as S } from "react";
4
+ import { useStore as d } from "@streamlayer/react-polyfills";
5
+ import { FeatureType as y } from "@streamlayer/sdk-web-types";
6
+ import { Question as I } from "../Features/Gamification/Question.js";
7
+ const b = () => I, v = /* @__PURE__ */ l(b())({
8
8
  name: "QuestionWrap",
9
9
  class: "q10hhsxv",
10
10
  propsAsIs: !0
11
- }), v = ({
11
+ }), w = ({
12
12
  gamification: e,
13
+ sdk: n,
13
14
  persistent: o,
14
15
  skipAutoClose: p,
15
16
  hideHeader: f,
16
- insightId: r
17
+ insightId: t
17
18
  }) => {
18
- const t = l(""), n = Q(e.openedQuestion.$store);
19
- return m(() => r ? (!o || e.isOpenedQuestion(r) || (t.current = r, e.getFeedItem(r).then((u) => {
19
+ const r = m(""), i = d(e.openedQuestion.$store);
20
+ return S(() => t ? (!o || e.isOpenedQuestion(t) || (r.current = t, e.getFeedItem(t).then((u) => {
20
21
  var c;
21
- t.current === r && ((c = u == null ? void 0 : u.attributes) == null ? void 0 : c.attributes.case) === "insight" && e.openQuestion(r, u);
22
+ r.current === t && ((c = u == null ? void 0 : u.attributes) == null ? void 0 : c.attributes.case) === "insight" && e.openQuestion(t, u);
22
23
  })), () => {
23
- t.current = "";
24
+ r.current = "";
24
25
  }) : (e.activeQuestionId.subscribe(({
25
26
  data: s
26
27
  }) => {
27
28
  var u;
28
- s && ((u = s.feedItem) == null ? void 0 : u.type) === "insight" && (!o || e.isOpenedQuestion(s.feedItem.id) || (t.current = s.feedItem.id, e.openQuestion(s.feedItem.id, s.feedItem))), !s && t.current && (e.closeQuestion(t.current), t.current = "");
29
+ s && ((u = s.feedItem) == null ? void 0 : u.type) === "insight" && (!o || e.isOpenedQuestion(s.feedItem.id) || (r.current = s.feedItem.id, e.openQuestion(s.feedItem.id, s.feedItem))), !s && r.current && (e.closeQuestion(r.current), r.current = "");
29
30
  }), () => {
30
- }), [e, o, r]), n ? /* @__PURE__ */ d(b, {
31
+ }), [e, o, t]), i ? /* @__PURE__ */ Q(v, {
32
+ sdk: n,
31
33
  skipAutoClose: p,
32
34
  hideHeader: f,
33
35
  gamification: e,
34
36
  hideSponsor: !0
35
37
  }) : null;
36
- }, A = ({
38
+ }, D = ({
37
39
  sdk: e,
38
- persistent: o,
39
- skipAutoClose: p,
40
- insightId: f,
41
- hideHeader: r
40
+ persistent: n,
41
+ skipAutoClose: o,
42
+ insightId: p,
43
+ hideHeader: f
42
44
  }) => {
43
- if (!Q(e.featuresList.getStore()))
45
+ if (!d(e.featuresList.getStore()))
44
46
  return null;
45
- const n = e.getFeature(S.GAMES);
46
- return n ? /* @__PURE__ */ d(v, {
47
- insightId: f,
48
- persistent: o,
49
- hideHeader: r,
50
- gamification: n,
51
- skipAutoClose: p
47
+ const r = e.getFeature(y.GAMES);
48
+ return r ? /* @__PURE__ */ Q(w, {
49
+ insightId: p,
50
+ sdk: e,
51
+ persistent: n,
52
+ hideHeader: f,
53
+ gamification: r,
54
+ skipAutoClose: o
52
55
  }) : null;
53
56
  };
54
57
  export {
55
- b as QuestionWrap,
56
- A as StreamLayerSDKInsight
58
+ v as QuestionWrap,
59
+ D as StreamLayerSDKInsight
57
60
  };
@@ -0,0 +1,17 @@
1
+ import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
+ export type LayoutProps = {
3
+ sdk: StreamLayerSDK;
4
+ sidebar?: React.ReactNode | (({ promo, app }: {
5
+ promo: boolean;
6
+ app: boolean;
7
+ }) => React.ReactNode);
8
+ banner?: React.ReactNode;
9
+ children?: React.ReactNode;
10
+ overlay?: React.ReactNode;
11
+ notification?: React.ReactNode | (({ promo, app }: {
12
+ promo: boolean;
13
+ app: boolean;
14
+ }) => React.ReactNode);
15
+ webos?: boolean;
16
+ };
17
+ export declare const Layout: import('react').ForwardRefExoticComponent<LayoutProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,105 @@
1
+ import { jsxs as C, jsx as n } from "react/jsx-runtime";
2
+ import { cx as B } from "@linaria/core";
3
+ import { u as x } from "../../../index-T1iiS0ZO.js";
4
+ import E from "lodash.throttle";
5
+ import { forwardRef as $, useRef as w, useCallback as k, useEffect as m, useState as O } from "react";
6
+ import { Container as P, ContentContainer as T, VideoContainer as A, VideoBox as H, VideoPlayer as j, Banner as D, Notification as I, Overlay as q, Sidebar as F, SideBarOverlay as G } from "./styles.js";
7
+ const J = () => {
8
+ const [c, s] = O("desktop");
9
+ return m(() => {
10
+ const t = E(() => {
11
+ const o = window.innerWidth, a = window.innerHeight, y = o > a ? "landscape" : "portrait";
12
+ s(o < 1024 && y === "portrait" ? "mobile" : "desktop");
13
+ }, 200);
14
+ return window.addEventListener("resize", t), () => {
15
+ window.removeEventListener("resize", t);
16
+ };
17
+ }, []), c;
18
+ }, R = ({ delay: c, children: s }) => {
19
+ const t = w(null), [o, a] = O(!1);
20
+ return m(() => (t.current && clearTimeout(t.current), t.current = setTimeout(() => a(!0), c), () => {
21
+ t.current && clearTimeout(t.current);
22
+ }), [c]), o ? s : null;
23
+ }, Z = $(function({ sdk: s, sidebar: t, overlay: o, notification: a, banner: y, children: W, webos: r }, z) {
24
+ const e = x(s.uiState), { containerId: L } = x(s.options), h = w(null), i = w(null), g = k(() => {
25
+ if (!i.current || !h.current)
26
+ return;
27
+ const { width: u, height: f } = i.current.getBoundingClientRect(), { width: S, height: v } = h.current.getBoundingClientRect();
28
+ (u > S || f > v) && (i.current.style.width === "100%" ? (i.current.style.height = "100%", i.current.style.width = "auto") : (i.current.style.width = "100%", i.current.style.height = "auto"));
29
+ }, []);
30
+ m(() => {
31
+ const u = h.current;
32
+ if (u) {
33
+ const f = new ResizeObserver((S) => {
34
+ for (const v of S)
35
+ v.contentBoxSize && g();
36
+ });
37
+ return f.observe(u), () => {
38
+ f.disconnect();
39
+ };
40
+ }
41
+ return () => {
42
+ };
43
+ }, [g]), m(g);
44
+ const b = J(), p = e.exposedPauseAd, d = !p && (e.promotionSidebar || e.app || e.appSidebar), N = !p && e.promotionOverlay, l = !p && (e.promotionBanner || e.appBanner), V = !p && (e.promotionNotification || e.onboardingNotification || e.appNotification);
45
+ return /* @__PURE__ */ C(
46
+ P,
47
+ {
48
+ id: L || "SlLayoutContainer",
49
+ className: B("Container", r && "SL-ContainerWebOs"),
50
+ ref: z,
51
+ children: [
52
+ /* @__PURE__ */ C(
53
+ T,
54
+ {
55
+ className: "ContentContainer",
56
+ style: {
57
+ width: d ? `calc(100% - var(${r ? "--sidebar-width-webos" : "--sidebar-width"}))` : "100%"
58
+ },
59
+ children: [
60
+ /* @__PURE__ */ n(
61
+ A,
62
+ {
63
+ className: B("VideoContainer", d && "WithSidebar", l && "WithBanner"),
64
+ ref: h,
65
+ style: {
66
+ height: l ? `calc(100% - var(${r ? "--banner-height-webos" : "--banner-height"}))` : "100%"
67
+ },
68
+ children: /* @__PURE__ */ n(H, { ref: i, className: "VideoBox", children: /* @__PURE__ */ n(j, { className: "VideoPlayer", children: W }) })
69
+ }
70
+ ),
71
+ /* @__PURE__ */ n(
72
+ D,
73
+ {
74
+ className: "Banner",
75
+ style: {
76
+ height: l ? `var(${r ? "--banner-height-webos" : "--banner-height"})` : "0px",
77
+ padding: l ? `var(${r ? "--banner-padding-webos" : "--banner-padding"})` : "0px"
78
+ },
79
+ children: l && y
80
+ }
81
+ ),
82
+ V && /* @__PURE__ */ n(R, { delay: r ? 1e3 : 0, children: /* @__PURE__ */ n(I, { children: typeof a == "function" ? a({ promo: !!e.promotionNotification, app: !!e.appNotification }) : a }) }),
83
+ N && b === "desktop" && /* @__PURE__ */ n(q, { className: "Overlay", children: o })
84
+ ]
85
+ }
86
+ ),
87
+ b === "desktop" && /* @__PURE__ */ n(R, { delay: r ? 1e3 : 0, children: /* @__PURE__ */ n(
88
+ F,
89
+ {
90
+ style: {
91
+ width: d ? `var(${r ? "--sidebar-width-webos" : "--sidebar-width"})` : "0px",
92
+ ...r ? { height: "100%" } : {}
93
+ },
94
+ className: "Sidebar",
95
+ children: d && (typeof t == "function" ? t({ promo: !!e.promotionSidebar, app: !!e.appSidebar }) : t)
96
+ }
97
+ ) }),
98
+ (d || N) && b === "mobile" && /* @__PURE__ */ n(G, { className: "Demo-SideBarOverlay", children: o })
99
+ ]
100
+ }
101
+ );
102
+ });
103
+ export {
104
+ Z as Layout
105
+ };
@@ -0,0 +1,12 @@
1
+ export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
+ export declare const ContentContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const Sidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare const SideBarOverlay: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
+ export declare const Banner: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
+ export declare const VideoContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
7
+ export declare const VideoBox: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
+ export declare const VideoPlayer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
9
+ export declare const Overlay: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
10
+ export declare const Notification: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
11
+ export declare const PointsContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
+ export declare const InApp: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -0,0 +1,64 @@
1
+ import { styled as s } from "@linaria/react";
2
+ const e = /* @__PURE__ */ s("div")({
3
+ name: "Container",
4
+ class: "c6rz41d",
5
+ propsAsIs: !1
6
+ }), n = /* @__PURE__ */ s("div")({
7
+ name: "ContentContainer",
8
+ class: "clv6awu",
9
+ propsAsIs: !1
10
+ }), o = /* @__PURE__ */ s("div")({
11
+ name: "Sidebar",
12
+ class: "ssfv9z7",
13
+ propsAsIs: !1
14
+ }), i = /* @__PURE__ */ s("div")({
15
+ name: "SideBarOverlay",
16
+ class: "sweyrp8",
17
+ propsAsIs: !1
18
+ }), r = /* @__PURE__ */ s("div")({
19
+ name: "Banner",
20
+ class: "b5w8mb1",
21
+ propsAsIs: !1
22
+ }), t = /* @__PURE__ */ s("div")({
23
+ name: "VideoContainer",
24
+ class: "v1uhtlpt",
25
+ propsAsIs: !1
26
+ }), p = /* @__PURE__ */ s("div")({
27
+ name: "VideoBox",
28
+ class: "v7viet2",
29
+ propsAsIs: !1
30
+ }), l = /* @__PURE__ */ s("div")({
31
+ name: "VideoPlayer",
32
+ class: "v9y7cje",
33
+ propsAsIs: !1
34
+ }), c = /* @__PURE__ */ s("div")({
35
+ name: "Overlay",
36
+ class: "opmmtyi",
37
+ propsAsIs: !1
38
+ }), d = /* @__PURE__ */ s("div")({
39
+ name: "Notification",
40
+ class: "nk5geky",
41
+ propsAsIs: !1
42
+ }), v = /* @__PURE__ */ s("div")({
43
+ name: "PointsContainer",
44
+ class: "p17bxk8w",
45
+ propsAsIs: !1
46
+ }), m = /* @__PURE__ */ s("div")({
47
+ name: "InApp",
48
+ class: "i1h25kze",
49
+ propsAsIs: !1
50
+ });
51
+ export {
52
+ r as Banner,
53
+ e as Container,
54
+ n as ContentContainer,
55
+ m as InApp,
56
+ d as Notification,
57
+ c as Overlay,
58
+ v as PointsContainer,
59
+ i as SideBarOverlay,
60
+ o as Sidebar,
61
+ p as VideoBox,
62
+ t as VideoContainer,
63
+ l as VideoPlayer
64
+ };
@@ -1,6 +1,12 @@
1
1
  export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
2
  export declare const CloseIconWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
- export declare const CloseIcon: any;
3
+ export declare const CloseIcon: {
4
+ __wyw_meta: unknown;
5
+ } & import('react').FC<{
6
+ name: keyof typeof import('../../../../../ui/icons').icons;
7
+ style?: React.CSSProperties;
8
+ className?: string;
9
+ }>;
4
10
  export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
11
  export declare const SponsorLogo: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
6
12
  export declare const PresentsTitle: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,4 +1,13 @@
1
- export declare const Container: any;
1
+ export declare const Container: {
2
+ __wyw_meta: unknown;
3
+ } & import('react').FC<{
4
+ children: React.ReactNode | React.ReactNode[];
5
+ style?: React.CSSProperties;
6
+ className?: string;
7
+ enabled?: boolean;
8
+ hiding?: boolean;
9
+ onAnimationEnd?: React.AnimationEventHandler;
10
+ }>;
2
11
  export declare const InnerContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
12
  export declare const HiddenContainer: {
4
13
  __wyw_meta: unknown;
@@ -6,4 +15,11 @@ export declare const HiddenContainer: {
6
15
  as?: React.ElementType;
7
16
  }>;
8
17
  export declare const NotificationRefreshing: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
9
- export declare const Pill: any;
18
+ export declare const Pill: {
19
+ __wyw_meta: unknown;
20
+ } & import('react').FC<{
21
+ title?: string;
22
+ onClick: () => void;
23
+ className?: string;
24
+ style?: React.CSSProperties;
25
+ }>;
@@ -8,5 +8,6 @@ export type AppAppProps = {
8
8
  event?: string;
9
9
  topNavigation?: boolean;
10
10
  enabled?: boolean;
11
+ muted?: boolean;
11
12
  };
12
13
  export declare const App: React.FC<AppAppProps>;