@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
@@ -10,7 +10,7 @@ const e = /* @__PURE__ */ o("div")({
10
10
  name: "MediaImgBottom",
11
11
  class: "m58gin0",
12
12
  propsAsIs: !0
13
- }), g = () => e, i = /* @__PURE__ */ o(g())({
13
+ }), g = () => e, t = /* @__PURE__ */ o(g())({
14
14
  name: "MediaImgSolid",
15
15
  class: "m1atm8do",
16
16
  propsAsIs: !0
@@ -30,21 +30,22 @@ const e = /* @__PURE__ */ o("div")({
30
30
  name: "VideoIcon",
31
31
  class: "v1kofb47",
32
32
  propsAsIs: !1
33
- }), v = {
34
- [s.UNSET]: i,
35
- [s.NONE]: i,
33
+ }), S = {
34
+ [s.UNSET]: t,
35
+ [s.NONE]: t,
36
36
  [s.ROUNDED]: u,
37
37
  [s.CENTERED]: N,
38
- [s.TRANSPARENT]: l
38
+ [s.TRANSPARENT]: l,
39
+ [s.SOLID]: t
39
40
  }, h = ({
40
41
  src: a,
41
- imageMode: t = s.UNSET,
42
+ imageMode: i = s.UNSET,
42
43
  withVideo: m,
43
44
  fromInsight: c
44
45
  }) => {
45
- if (t === s.NONE)
46
+ if (i === s.NONE)
46
47
  return null;
47
- const d = c ? A : v[t];
48
+ const d = c ? A : S[i];
48
49
  return /* @__PURE__ */ r(d, {
49
50
  children: [/* @__PURE__ */ n("img", {
50
51
  src: a,
@@ -4,4 +4,10 @@ export declare const NotificationContainer: import('@linaria/react').StyledCompo
4
4
  export declare const Body: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
5
  export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
6
  export declare const Button: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
7
- export declare const StyledChevronRight: any;
7
+ export declare const StyledChevronRight: {
8
+ __wyw_meta: unknown;
9
+ } & import('react').FC<{
10
+ name: keyof typeof import('../../../../icons').icons;
11
+ style?: React.CSSProperties;
12
+ className?: string;
13
+ }>;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as s, jsx as i } from "react/jsx-runtime";
2
- import { NotificationContainer as p, IconContainer as h, Icon as l, Body as d, Title as m, TitleIcon as o, Description as f, Button as C, Close as k } from "./styles.js";
3
- const I = ({
4
- open: e,
5
- close: r,
2
+ import { NotificationContainer as p, IconContainer as h, Icon as l, Body as m, Title as d, TitleIcon as o, Description as f, Button as k, Close as C } from "./styles.js";
3
+ const u = ({
4
+ open: a,
5
+ close: e,
6
6
  ...t
7
7
  }) => {
8
8
  var n, c;
@@ -11,7 +11,7 @@ const I = ({
11
11
  {
12
12
  "data-a": "intr",
13
13
  onClick: () => {
14
- e == null || e(), t && (t.instantOpen = !0);
14
+ a == null || a(), t && t.markIstantOpen();
15
15
  },
16
16
  children: [
17
17
  /* @__PURE__ */ s(h, { children: [
@@ -24,21 +24,21 @@ const I = ({
24
24
  }
25
25
  )
26
26
  ] }),
27
- /* @__PURE__ */ s(d, { children: [
28
- /* @__PURE__ */ s(m, { children: [
27
+ /* @__PURE__ */ s(m, { children: [
28
+ /* @__PURE__ */ s(d, { children: [
29
29
  /* @__PURE__ */ i(o, { name: "icon-trophy-solid" }),
30
30
  (n = t == null ? void 0 : t.titleCard) == null ? void 0 : n.title
31
31
  ] }),
32
32
  /* @__PURE__ */ s(f, { children: [
33
33
  /* @__PURE__ */ i("span", { children: (c = t == null ? void 0 : t.titleCard) == null ? void 0 : c.subtitle }),
34
- /* @__PURE__ */ i(C, { name: "inapp-button", children: "Play Now" })
34
+ /* @__PURE__ */ i(k, { name: "inapp-button", children: "Play Now" })
35
35
  ] })
36
36
  ] }),
37
37
  /* @__PURE__ */ i(
38
- k,
38
+ C,
39
39
  {
40
- close: (a) => {
41
- a == null || a.stopPropagation(), r == null || r();
40
+ close: (r) => {
41
+ r == null || r.stopPropagation(), e == null || e();
42
42
  }
43
43
  }
44
44
  )
@@ -47,5 +47,5 @@ const I = ({
47
47
  );
48
48
  };
49
49
  export {
50
- I as InAppOnboarding
50
+ u as InAppOnboarding
51
51
  };
@@ -1,8 +1,24 @@
1
1
  export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
2
  export declare const Icon: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
3
3
  export declare const IconContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
- export declare const TitleIcon: any;
5
- export declare const Close: any;
4
+ export declare const TitleIcon: {
5
+ __wyw_meta: unknown;
6
+ } & import('react').FC<{
7
+ name: keyof typeof import('../../../../icons').icons;
8
+ style?: React.CSSProperties;
9
+ className?: string;
10
+ }>;
11
+ export declare const Close: {
12
+ __wyw_meta: unknown;
13
+ } & import('react').FC<{
14
+ close?: (e?: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
15
+ duration?: number;
16
+ autoClose?: any;
17
+ isPlaying?: boolean;
18
+ skipIcon?: boolean;
19
+ className?: string;
20
+ timerClassName?: string;
21
+ }>;
6
22
  export declare const Body: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
7
23
  export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
24
  export declare const Description: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import { styled as s } from "@linaria/react";
3
- import { useState as r, useCallback as u, useMemo as b } from "react";
3
+ import { useState as r, useCallback as u, useEffect as b } from "react";
4
4
  import { SvgIcon as a } from "../../../../../icons/index.js";
5
5
  const v = /* @__PURE__ */ s("div")({
6
6
  name: "Container",
@@ -33,16 +33,16 @@ const v = /* @__PURE__ */ s("div")({
33
33
  }), q = ({
34
34
  step: d,
35
35
  children: p,
36
- answer: m,
37
- state: l = "pending"
36
+ answer: l,
37
+ state: m = "pending"
38
38
  }) => {
39
- const [I, f] = r(0), [o] = r(() => new ResizeObserver((n) => {
39
+ const [f, I] = r(0), [o] = r(() => new ResizeObserver((n) => {
40
40
  window.requestAnimationFrame(() => {
41
41
  var t, c;
42
- f((c = (t = n == null ? void 0 : n[0]) == null ? void 0 : t.contentRect) == null ? void 0 : c.width);
42
+ I(((c = (t = n == null ? void 0 : n[0]) == null ? void 0 : t.contentRect) == null ? void 0 : c.width) ?? 0);
43
43
  });
44
44
  })), h = u((n) => {
45
- n || o.disconnect(), o.observe(n);
45
+ n ? o.observe(n) : o.disconnect();
46
46
  }, [o]);
47
47
  return b(() => () => {
48
48
  o.disconnect();
@@ -53,18 +53,18 @@ const v = /* @__PURE__ */ s("div")({
53
53
  })
54
54
  }), /* @__PURE__ */ e(w, {
55
55
  style: {
56
- minWidth: `${I}px`
56
+ minWidth: `${f}px`
57
57
  },
58
58
  children: /* @__PURE__ */ e(z, {
59
59
  children: p
60
60
  }, d)
61
61
  }), /* @__PURE__ */ e(P, {
62
62
  ref: h,
63
- className: l,
63
+ className: m,
64
64
  children: /* @__PURE__ */ i("div", {
65
65
  children: [/* @__PURE__ */ e(k, {
66
66
  name: "icon-check"
67
- }), "Your Pick: ", m]
67
+ }), "Your Pick: ", l]
68
68
  })
69
69
  })]
70
70
  });
@@ -1,3 +1,9 @@
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 Body: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
- export declare const FeedbackIcon: any;
3
+ export declare const FeedbackIcon: {
4
+ __wyw_meta: unknown;
5
+ } & import('react').FC<{
6
+ name: keyof typeof import('../../../../../icons').icons;
7
+ style?: React.CSSProperties;
8
+ className?: string;
9
+ }>;
@@ -0,0 +1,5 @@
1
+ export declare const Content: React.FC<{
2
+ children: React.ReactNode;
3
+ step: number;
4
+ state: 'correct' | 'incorrect' | 'pending';
5
+ }>;
@@ -0,0 +1,49 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { styled as e } from "@linaria/react";
3
+ import { useState as f, useEffect as m } from "react";
4
+ const h = /* @__PURE__ */ e("div")({
5
+ name: "Container",
6
+ class: "cwa9tgs",
7
+ propsAsIs: !1
8
+ }), l = /* @__PURE__ */ e("div")({
9
+ name: "BodyContainer",
10
+ class: "b1xx7swj",
11
+ propsAsIs: !1
12
+ }), w = /* @__PURE__ */ e("div")({
13
+ name: "Body",
14
+ class: "b1a21en",
15
+ propsAsIs: !1
16
+ }), C = ({
17
+ step: n,
18
+ children: i,
19
+ state: c = "pending"
20
+ }) => {
21
+ const [d, a] = f(0);
22
+ return m(() => {
23
+ const p = new ResizeObserver((t) => {
24
+ window.requestAnimationFrame(() => {
25
+ var o, r;
26
+ const x = ((r = (o = t == null ? void 0 : t[0]) == null ? void 0 : o.contentRect) == null ? void 0 : r.width) ?? 0;
27
+ a(x);
28
+ });
29
+ });
30
+ return () => {
31
+ p.disconnect();
32
+ };
33
+ }, []), /* @__PURE__ */ s(h, {
34
+ style: {
35
+ padding: `${n === 3 && c === "incorrect" || n === 1 ? "5px 100px" : "5px 40px"}`
36
+ },
37
+ children: /* @__PURE__ */ s(l, {
38
+ style: {
39
+ minWidth: `${d}px`
40
+ },
41
+ children: /* @__PURE__ */ s(w, {
42
+ children: i
43
+ }, n)
44
+ })
45
+ });
46
+ };
47
+ export {
48
+ C as Content
49
+ };
@@ -0,0 +1,12 @@
1
+ import { NotificationData } from '@streamlayer/sdk-web-notifications';
2
+ export declare const PredictionResultSteps: React.FC<NotificationData['question'] & {
3
+ close?: () => void;
4
+ action?: () => void;
5
+ setStep?: (step: number) => void;
6
+ hiding?: boolean;
7
+ step: number;
8
+ }>;
9
+ export declare const PredictionResult: React.FC<NotificationData['question'] & {
10
+ close?: () => void;
11
+ action?: () => void;
12
+ }>;
@@ -0,0 +1,56 @@
1
+ import { jsx as r, jsxs as h } from "react/jsx-runtime";
2
+ import { useEffect as e, useState as p } from "react";
3
+ import { Content as x } from "./content.js";
4
+ import { Lines as T } from "./lines.js";
5
+ import { Step1 as g } from "./step1.js";
6
+ import { Step2 as j } from "./step2.js";
7
+ import { CorrectStep as P, InCorrectStep as R } from "./step3.js";
8
+ import { Container as C, Body as S } from "./styles.js";
9
+ const c = {
10
+ 1: 3e3,
11
+ 2: 4e3,
12
+ 3: 4e3
13
+ }, y = ({ close: m, action: u, setStep: f, votedAnswer: n, correct: t, correctAnswerTitle: o, questionTitle: l, step: i }) => {
14
+ if (e(() => {
15
+ if (f) {
16
+ const k = setTimeout(() => {
17
+ c[i + 1] && (t || i < 3) ? f(i + 1) : m == null || m();
18
+ }, c[i]);
19
+ return () => {
20
+ k && clearTimeout(k);
21
+ };
22
+ }
23
+ return () => {
24
+ };
25
+ }, [f, i, m, t]), i === 1)
26
+ return /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(S, { children: /* @__PURE__ */ r(g, {}) }) });
27
+ let a = "pending";
28
+ return i === 3 && (a = t ? "correct" : "incorrect"), /* @__PURE__ */ r(C, { "data-a": "intr", onClick: () => u == null ? void 0 : u(), children: /* @__PURE__ */ h(S, { children: [
29
+ i !== 1 && /* @__PURE__ */ r(T, {}, i),
30
+ /* @__PURE__ */ h(x, { state: a, step: i, children: [
31
+ i === 2 && /* @__PURE__ */ r(j, { title: l || "unknown", answer: (n == null ? void 0 : n.title) || "unknown" }),
32
+ i === 3 && t && /* @__PURE__ */ r(P, { answer: (n == null ? void 0 : n.title) || "unknown" }),
33
+ i === 3 && !t && /* @__PURE__ */ r(R, { title: o || "unknown", answer: (n == null ? void 0 : n.title) || "unknown" })
34
+ ] })
35
+ ] }) });
36
+ }, F = ({ close: m, action: u, votedAnswer: f, correct: n, correctAnswerTitle: t, questionTitle: o }) => {
37
+ const [l, i] = p(1);
38
+ return /* @__PURE__ */ r(
39
+ y,
40
+ {
41
+ close: m,
42
+ action: u,
43
+ votedAnswer: f,
44
+ correct: n,
45
+ correctAnswerTitle: t,
46
+ questionTitle: o,
47
+ setStep: i,
48
+ step: l,
49
+ title: ""
50
+ }
51
+ );
52
+ };
53
+ export {
54
+ F as PredictionResult,
55
+ y as PredictionResultSteps
56
+ };
@@ -0,0 +1 @@
1
+ export declare const Lines: React.FC;
@@ -0,0 +1,34 @@
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { styled as n } from "@linaria/react";
3
+ const o = /* @__PURE__ */ n("div")({
4
+ name: "Container",
5
+ class: "c1nd5cu8",
6
+ propsAsIs: !1
7
+ }), e = /* @__PURE__ */ n("div")({
8
+ name: "Line",
9
+ class: "lgbipw0",
10
+ propsAsIs: !1
11
+ }), r = () => e, c = /* @__PURE__ */ n(r())({
12
+ name: "Line1",
13
+ class: "l1anth16",
14
+ propsAsIs: !0
15
+ }), t = () => e, p = /* @__PURE__ */ n(t())({
16
+ name: "Line2",
17
+ class: "l193yd7v",
18
+ propsAsIs: !0
19
+ }), l = () => e, a = /* @__PURE__ */ n(l())({
20
+ name: "Line3",
21
+ class: "lhbflsp",
22
+ propsAsIs: !0
23
+ }), L = () => /* @__PURE__ */ i(o, {
24
+ children: [/* @__PURE__ */ s(c, {
25
+ children: /* @__PURE__ */ s("div", {})
26
+ }), /* @__PURE__ */ s(p, {
27
+ children: /* @__PURE__ */ s("div", {})
28
+ }), /* @__PURE__ */ s(a, {
29
+ children: /* @__PURE__ */ s("div", {})
30
+ })]
31
+ });
32
+ export {
33
+ L as Lines
34
+ };
@@ -0,0 +1 @@
1
+ export declare const Step1: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { styled as n } from "@linaria/react";
3
+ import { SvgIcon as s } from "../../../../../icons/index.js";
4
+ const t = /* @__PURE__ */ n("div")({
5
+ name: "Container",
6
+ class: "c1lvd429",
7
+ propsAsIs: !1
8
+ }), e = () => s, i = /* @__PURE__ */ n(e())({
9
+ name: "PredictionIcon",
10
+ class: "p1n4m87t",
11
+ propsAsIs: !0
12
+ }), a = () => /* @__PURE__ */ o(t, {
13
+ children: [/* @__PURE__ */ r(i, {
14
+ name: "icon-prediction"
15
+ }), " Prediction results are in!"]
16
+ });
17
+ export {
18
+ a as Step1
19
+ };
@@ -0,0 +1,4 @@
1
+ export declare const Step2: React.FC<{
2
+ title: string;
3
+ answer: string;
4
+ }>;
@@ -0,0 +1,34 @@
1
+ import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
+ import { styled as s } from "@linaria/react";
3
+ import { SvgIcon as c } from "../../../../../icons/index.js";
4
+ const t = () => c, i = /* @__PURE__ */ s(t())({
5
+ name: "CheckIcon",
6
+ class: "c126r8f9",
7
+ propsAsIs: !0
8
+ }), p = /* @__PURE__ */ s("div")({
9
+ name: "Answer",
10
+ class: "a1o2rpgl",
11
+ propsAsIs: !1
12
+ }), a = /* @__PURE__ */ s("div")({
13
+ name: "Container",
14
+ class: "cej6ci1",
15
+ propsAsIs: !1
16
+ }), l = /* @__PURE__ */ s("div")({
17
+ name: "Title",
18
+ class: "tob24mr",
19
+ propsAsIs: !1
20
+ }), I = ({
21
+ title: n,
22
+ answer: r
23
+ }) => /* @__PURE__ */ e(a, {
24
+ children: [/* @__PURE__ */ o(l, {
25
+ children: n
26
+ }), /* @__PURE__ */ e(p, {
27
+ children: [/* @__PURE__ */ o(i, {
28
+ name: "icon-prediction"
29
+ }), "Your Pick: ", r]
30
+ })]
31
+ });
32
+ export {
33
+ I as Step2
34
+ };
@@ -0,0 +1,7 @@
1
+ export declare const CorrectStep: React.FC<{
2
+ answer: string;
3
+ }>;
4
+ export declare const InCorrectStep: React.FC<{
5
+ title: string;
6
+ answer: string;
7
+ }>;
@@ -0,0 +1,43 @@
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import { styled as e } from "@linaria/react";
3
+ import { SvgIcon as i } from "../../../../../icons/index.js";
4
+ const o = /* @__PURE__ */ e("div")({
5
+ name: "Container",
6
+ class: "c1lesal4",
7
+ propsAsIs: !1
8
+ }), c = /* @__PURE__ */ e("div")({
9
+ name: "Title",
10
+ class: "tv66n4w",
11
+ propsAsIs: !1
12
+ }), a = () => i, p = /* @__PURE__ */ e(a())({
13
+ name: "CorrectIcon",
14
+ class: "cx0vlv2",
15
+ propsAsIs: !0
16
+ }), t = /* @__PURE__ */ e("div")({
17
+ name: "Answer",
18
+ class: "akfh4v5",
19
+ propsAsIs: !1
20
+ }), v = ({
21
+ answer: s
22
+ }) => /* @__PURE__ */ r(o, {
23
+ children: [/* @__PURE__ */ n(c, {
24
+ children: "Congratulations! You answered correctly."
25
+ }), /* @__PURE__ */ r(t, {
26
+ children: [/* @__PURE__ */ n(p, {
27
+ name: "icon-correct"
28
+ }), "Your Pick: ", s]
29
+ })]
30
+ }), C = ({
31
+ title: s,
32
+ answer: l
33
+ }) => /* @__PURE__ */ r(o, {
34
+ children: [/* @__PURE__ */ r(c, {
35
+ children: ["Better luck next time!", /* @__PURE__ */ n("br", {}), "Correct: ", s]
36
+ }), /* @__PURE__ */ r(t, {
37
+ children: ["Your Pick: ", l]
38
+ })]
39
+ });
40
+ export {
41
+ v as CorrectStep,
42
+ C as InCorrectStep
43
+ };
@@ -0,0 +1,9 @@
1
+ export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
+ export declare const Body: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const FeedbackIcon: {
4
+ __wyw_meta: unknown;
5
+ } & import('react').FC<{
6
+ name: keyof typeof import('../../../../../icons').icons;
7
+ style?: React.CSSProperties;
8
+ className?: string;
9
+ }>;
@@ -0,0 +1,20 @@
1
+ import { styled as s } from "@linaria/react";
2
+ import { SvgIcon as o } from "../../../../../icons/index.js";
3
+ const a = /* @__PURE__ */ s("div")({
4
+ name: "Container",
5
+ class: "cmox3ot",
6
+ propsAsIs: !1
7
+ }), t = /* @__PURE__ */ s("div")({
8
+ name: "Body",
9
+ class: "bqq1ix4",
10
+ propsAsIs: !1
11
+ }), e = () => o, r = /* @__PURE__ */ s(e())({
12
+ name: "FeedbackIcon",
13
+ class: "fcw6a1l",
14
+ propsAsIs: !0
15
+ });
16
+ export {
17
+ t as Body,
18
+ a as Container,
19
+ r as FeedbackIcon
20
+ };
@@ -0,0 +1,10 @@
1
+ import { Notification as NotificationProps } from '@streamlayer/sdk-web-notifications';
2
+ type InAppProps = NotificationProps['data'] & {
3
+ action: NotificationProps['action'];
4
+ };
5
+ export declare const InAppPredictionResultAd: React.FC<Exclude<InAppProps['question'], undefined> & {
6
+ action?: () => void;
7
+ close?: () => void;
8
+ inApp?: InAppProps['inApp'];
9
+ }>;
10
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
+ import { useState as d, useRef as g, useEffect as h } from "react";
3
+ import { PredictionResult as L } from "./frames/index.js";
4
+ import { NotificationContainer as A, LogoImgContainer as I, LogoImg as m, NotificationInterstitialContainer as C, NotificationContent as N } from "./styles.js";
5
+ const w = ({ sponsorLogo: r, onClick: t }) => /* @__PURE__ */ o(C, { onClick: t, children: /* @__PURE__ */ o(N, { withoutPadding: !0, children: /* @__PURE__ */ o(m, { src: r }) }) }), j = (r) => {
6
+ var n, c, a, e, l;
7
+ const [t, i] = d(!1), p = g();
8
+ return h(() => {
9
+ var f;
10
+ return (f = r == null ? void 0 : r.inApp) != null && f.sponsorLogo && (i(!0), p.current = setTimeout(() => {
11
+ i(!1);
12
+ }, 5e3)), () => clearTimeout(p.current);
13
+ }, [(n = r == null ? void 0 : r.inApp) == null ? void 0 : n.sponsorLogo]), (c = r == null ? void 0 : r.inApp) != null && c.sponsorLogo && t ? /* @__PURE__ */ o(w, { sponsorLogo: (a = r.inApp) == null ? void 0 : a.sponsorLogo, onClick: () => i(!1) }) : /* @__PURE__ */ o(A, { children: /* @__PURE__ */ s("div", { children: [
14
+ ((e = r == null ? void 0 : r.inApp) == null ? void 0 : e.sponsorLogo) && /* @__PURE__ */ o(I, { children: /* @__PURE__ */ o(m, { src: (l = r == null ? void 0 : r.inApp) == null ? void 0 : l.sponsorLogo }) }),
15
+ /* @__PURE__ */ o(L, { ...r })
16
+ ] }) });
17
+ };
18
+ export {
19
+ j as InAppPredictionResultAd
20
+ };
@@ -0,0 +1,11 @@
1
+ export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
+ export declare const NotificationContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & {
3
+ withoutPadding?: boolean;
4
+ }>;
5
+ export declare const LogoImg: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
6
+ export declare const NotificationInterstitialContainer: {
7
+ __wyw_meta: unknown;
8
+ } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
9
+ as?: React.ElementType;
10
+ }>;
11
+ export declare const LogoImgContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -0,0 +1,34 @@
1
+ import { styled as o } from "@linaria/react";
2
+ const s = /* @__PURE__ */ o("div")({
3
+ name: "NotificationContainer",
4
+ class: "nn0nqh6",
5
+ propsAsIs: !1
6
+ }), t = () => ({
7
+ withoutPadding: n
8
+ }) => n ? "0px" : "1rem", e = /* @__PURE__ */ o("div")({
9
+ name: "NotificationContent",
10
+ class: "n1bcdf3j",
11
+ propsAsIs: !1,
12
+ vars: {
13
+ "n1bcdf3j-0": [t()]
14
+ }
15
+ }), c = /* @__PURE__ */ o("img")({
16
+ name: "LogoImg",
17
+ class: "l8jorbq",
18
+ propsAsIs: !1
19
+ }), i = () => s, r = /* @__PURE__ */ o(i())({
20
+ name: "NotificationInterstitialContainer",
21
+ class: "nf920y3",
22
+ propsAsIs: !0
23
+ }), p = /* @__PURE__ */ o("div")({
24
+ name: "LogoImgContainer",
25
+ class: "lzsmehn",
26
+ propsAsIs: !1
27
+ });
28
+ export {
29
+ c as LogoImg,
30
+ p as LogoImgContainer,
31
+ s as NotificationContainer,
32
+ e as NotificationContent,
33
+ r as NotificationInterstitialContainer
34
+ };
@@ -1,5 +1,14 @@
1
1
  export declare const MIN_CONTENT_HEIGHT = 118;
2
- export declare const Container: any;
2
+ export declare const Container: {
3
+ __wyw_meta: unknown;
4
+ } & import('react').FC<{
5
+ children: React.ReactNode | React.ReactNode[];
6
+ style?: React.CSSProperties;
7
+ className?: string;
8
+ enabled?: boolean;
9
+ hiding?: boolean;
10
+ onAnimationEnd?: React.AnimationEventHandler;
11
+ }>;
3
12
  export declare const InnerContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
13
  export declare const Content: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
14
  export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -11,8 +20,32 @@ export declare const PointsTitle: {
11
20
  export declare const Subtitle: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
21
  export declare const SubtitleFG: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
13
22
  export declare const AnswerText: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
14
- export declare const FeedbackIcon: any;
15
- export declare const FeedbackIconCorrect: any;
16
- export declare const FeedbackIconIncorrect: any;
23
+ export declare const FeedbackIcon: {
24
+ __wyw_meta: unknown;
25
+ } & import('react').FC<{
26
+ name: keyof typeof import('../../../../icons').icons;
27
+ style?: React.CSSProperties;
28
+ className?: string;
29
+ }>;
30
+ export declare const FeedbackIconCorrect: {
31
+ __wyw_meta: unknown;
32
+ } & import('react').FC<{
33
+ name: keyof typeof import('../../../../icons').icons;
34
+ style?: React.CSSProperties;
35
+ className?: string;
36
+ }>;
37
+ export declare const FeedbackIconIncorrect: {
38
+ __wyw_meta: unknown;
39
+ } & import('react').FC<{
40
+ name: keyof typeof import('../../../../icons').icons;
41
+ style?: React.CSSProperties;
42
+ className?: string;
43
+ }>;
17
44
  export declare const CloseIconWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
18
- export declare const CloseIcon: any;
45
+ export declare const CloseIcon: {
46
+ __wyw_meta: unknown;
47
+ } & import('react').FC<{
48
+ name: keyof typeof import('../../../../icons').icons;
49
+ style?: React.CSSProperties;
50
+ className?: string;
51
+ }>;