@streamlayer/react-ui 1.26.0 → 1.27.0

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
@@ -3,31 +3,26 @@ import { styled as y } from "@linaria/react";
3
3
  import { useState as d, useEffect as a } from "react";
4
4
  import { r as u } from "../../index-DALxy-8N.js";
5
5
  import { BREAKPOINTS as m } from "../theme/constants.js";
6
- const O = /* @__PURE__ */ y("div")({
6
+ import { hideContentStyles as O } from "../theme/utils.js";
7
+ const S = /* @__PURE__ */ y("div")({
7
8
  name: "StaticContainer",
8
9
  class: "svm502q",
9
10
  propsAsIs: !1
10
- }), S = `
11
- .sl-hide-on-modal {
12
- height: 0 !important;
13
- opacity: 0 !important;
14
- overflow: hidden !important;
15
- }
16
- `, C = `
11
+ }), C = `
17
12
  .sl-pill-button {
18
13
  display: none !important;
19
14
  }
20
15
  `, p = () => window.innerWidth >= m.md && window.innerWidth < m.lg ? 76 : 53, f = (e) => {
21
- var n;
16
+ var r;
22
17
  const t = p();
23
- return Math.round((((n = e.current) == null ? void 0 : n.getBoundingClientRect().y) || 0) - t) <= 0;
24
- }, x = ({
18
+ return Math.round((((r = e.current) == null ? void 0 : r.getBoundingClientRect().y) || 0) - t) <= 0;
19
+ }, R = ({
25
20
  children: e,
26
21
  container: t,
27
- useContainer: n,
22
+ useContainer: r,
28
23
  staticStyles: w
29
24
  }) => {
30
- const [s] = d(() => f(t)), [r, i] = d(!1);
25
+ const [s] = d(() => f(t)), [n, i] = d(!1);
31
26
  return a(() => {
32
27
  if (!t.current || !s)
33
28
  return i(!0), () => {
@@ -40,17 +35,17 @@ const O = /* @__PURE__ */ y("div")({
40
35
  });
41
36
  };
42
37
  }, []), a(() => {
43
- if (r && t.current && s) {
38
+ if (n && t.current && s) {
44
39
  const o = p();
45
40
  window.scrollTo({
46
41
  top: t.current.offsetTop - o,
47
42
  behavior: "instant"
48
43
  });
49
44
  }
50
- }, [r]), !t.current || !r ? null : n ? u.createPortal(/* @__PURE__ */ c(O, {
45
+ }, [n]), !t.current || !n ? null : r ? u.createPortal(/* @__PURE__ */ c(S, {
51
46
  className: "StaticContainer",
52
47
  children: [e, /* @__PURE__ */ l("style", {
53
- children: S
48
+ children: O
54
49
  }), /* @__PURE__ */ l("style", {
55
50
  children: C
56
51
  })]
@@ -61,5 +56,5 @@ const O = /* @__PURE__ */ y("div")({
61
56
  }), t.current, "modal-node");
62
57
  };
63
58
  export {
64
- x as ModalPortal
59
+ R as ModalPortal
65
60
  };
@@ -1,7 +1,10 @@
1
- import { InsightHistory } from '@streamlayer/sdk-web-types';
1
+ import { InsightHistory, Promotion } from '@streamlayer/sdk-web-types';
2
2
  import { VideoPlayerProps } from '../../video-player';
3
3
  export type InsightContentProps = InsightHistory & {
4
4
  isDetail?: boolean;
5
+ muted?: boolean;
6
+ webos?: boolean;
7
+ adPromotion?: Promotion;
5
8
  controlVideo: VideoPlayerProps['controlVideo'];
6
9
  };
7
10
  export declare const InsightContent: React.FC<InsightContentProps>;
@@ -1,39 +1,42 @@
1
- import { jsxs as h, jsx as d } from "react/jsx-runtime";
2
- import { AutoPlayVideo as C, QuestionImages as I } from "@streamlayer/sdk-web-types";
3
- import { VideoPlayer as N } from "../../video-player/index.js";
4
- import { Container as v, contentContainerClassName as u, ImageContainer as P, Image as b, Content as x, Title as B, Description as D } from "./styles.js";
5
- const U = ({
6
- instantView: o,
1
+ import { jsxs as g, jsx as d } from "react/jsx-runtime";
2
+ import { AutoPlayVideo as v, QuestionImages as P } from "@streamlayer/sdk-web-types";
3
+ import { VideoPlayer as b } from "../../video-player/index.js";
4
+ import { Container as x, contentContainerClassName as y, ImageContainer as B, Image as D, Content as E, Title as T, Description as j } from "./styles.js";
5
+ const O = ({
6
+ instantView: r,
7
7
  isDetail: l,
8
- notification: r,
9
- controlVideo: g
8
+ notification: o,
9
+ controlVideo: p,
10
+ muted: C
10
11
  }) => {
11
- const m = o == null ? void 0 : o.heading, c = o == null ? void 0 : o.body, e = m || c, y = r == null ? void 0 : r.title, p = r == null ? void 0 : r.body;
12
- return /* @__PURE__ */ h(v, { children: [
13
- (o == null ? void 0 : o.video) && /* @__PURE__ */ d(
14
- N,
12
+ var e, h;
13
+ const m = r == null ? void 0 : r.heading, u = r == null ? void 0 : r.body, c = m || u, I = o == null ? void 0 : o.title, N = o == null ? void 0 : o.body;
14
+ return /* @__PURE__ */ g(x, { children: [
15
+ ((e = r == null ? void 0 : r.video) == null ? void 0 : e.url) && /* @__PURE__ */ d(
16
+ b,
15
17
  {
16
- className: u,
17
- source: o.video.url,
18
- poster: o.video.thumbnailUrl,
19
- controlVideo: g,
20
- autoPlay: l && o.autoPlayVideo === C.ENABLED
18
+ className: y,
19
+ source: r.video.url,
20
+ poster: r.video.thumbnailUrl,
21
+ controlVideo: p,
22
+ muted: C,
23
+ autoPlay: l && r.autoPlayVideo === v.ENABLED
21
24
  }
22
25
  ),
23
- (o == null ? void 0 : o.image) && !(o != null && o.video) && /* @__PURE__ */ d(
24
- P,
26
+ (r == null ? void 0 : r.image) && !((h = r == null ? void 0 : r.video) != null && h.url) && /* @__PURE__ */ d(
27
+ B,
25
28
  {
26
- className: u,
27
- "data-rounded": o.imageMode === I.ROUNDED,
28
- children: /* @__PURE__ */ d(b, { src: o == null ? void 0 : o.image })
29
+ className: y,
30
+ "data-rounded": r.imageMode === P.ROUNDED,
31
+ children: /* @__PURE__ */ d(D, { src: r == null ? void 0 : r.image })
29
32
  }
30
33
  ),
31
- /* @__PURE__ */ h(x, { children: [
32
- /* @__PURE__ */ d(B, { children: l && e ? m : y }),
33
- /* @__PURE__ */ d(D, { children: l && e ? c : p })
34
+ /* @__PURE__ */ g(E, { children: [
35
+ /* @__PURE__ */ d(T, { children: l && c ? m : I }),
36
+ /* @__PURE__ */ d(j, { children: l && c ? u : N })
34
37
  ] })
35
38
  ] });
36
39
  };
37
40
  export {
38
- U as InsightContent
41
+ O as InsightContent
39
42
  };
@@ -1,7 +1,13 @@
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 ImageContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
3
  export declare const Image: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
4
- export declare const TwitterIcon: any;
4
+ export declare const TwitterIcon: {
5
+ __wyw_meta: unknown;
6
+ } & import('react').FC<{
7
+ name: keyof typeof import('../../../icons').icons;
8
+ style?: React.CSSProperties;
9
+ className?: string;
10
+ }>;
5
11
  export declare const Details: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
12
  export declare const Name: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
7
13
  export declare const UserNameAndDate: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -3,6 +3,7 @@ import { VideoPlayerProps } from '../../video-player';
3
3
  export declare const sanitizeContent: (text: string) => string;
4
4
  export type TwitterContentProps = TweetHistory & {
5
5
  isDetail?: boolean;
6
+ muted?: boolean;
6
7
  controlVideo: VideoPlayerProps['controlVideo'];
7
8
  };
8
9
  export declare const TwitterContent: React.FC<TwitterContentProps>;
@@ -1,30 +1,30 @@
1
- import { jsxs as o, jsx as s, Fragment as j } from "react/jsx-runtime";
2
- import { memo as k, useMemo as x } from "react";
3
- import { VideoPlayer as B } from "../../video-player/index.js";
4
- import { Account as E } from "./account/index.js";
5
- import { Container as L, Details as N, Body as R, ImagesContainer as l, ImageFullSize as t, ImageHalfSize as p, ImagesBlock as a } from "./styles.js";
6
- const S = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), A = (c) => c == null ? void 0 : c.replace(S, ""), $ = k(
7
- ({ image: c, body: y, account: C, accountVerified: z, tweet: n, isDetail: d, controlVideo: F }) => {
1
+ import { jsxs as o, jsx as s, Fragment as k } from "react/jsx-runtime";
2
+ import { memo as x, useMemo as B } from "react";
3
+ import { VideoPlayer as E } from "../../video-player/index.js";
4
+ import { Account as L } from "./account/index.js";
5
+ import { Container as N, Details as R, Body as S, ImagesContainer as l, ImageFullSize as t, ImageHalfSize as p, ImagesBlock as a } from "./styles.js";
6
+ const A = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), D = (c) => c == null ? void 0 : c.replace(A, ""), b = x(
7
+ ({ image: c, body: y, muted: C, account: z, accountVerified: F, tweet: n, isDetail: d, controlVideo: T }) => {
8
8
  var h, g, H, U, f;
9
- const r = (g = (h = n == null ? void 0 : n.meta) == null ? void 0 : h.extendedEntities) == null ? void 0 : g.media, i = r == null ? void 0 : r.find(({ type: e }) => e === "photo"), m = x(() => {
9
+ const r = (g = (h = n == null ? void 0 : n.meta) == null ? void 0 : h.extendedEntities) == null ? void 0 : g.media, i = r == null ? void 0 : r.find(({ type: e }) => e === "photo"), m = B(() => {
10
10
  var e, u, v, I;
11
- return (I = (v = (u = (e = r == null ? void 0 : r[0]) == null ? void 0 : e.videoInfo) == null ? void 0 : u.variants) == null ? void 0 : v.findLast(({ contentType: T }) => T === "video/mp4")) == null ? void 0 : I.url;
11
+ return (I = (v = (u = (e = r == null ? void 0 : r[0]) == null ? void 0 : e.videoInfo) == null ? void 0 : u.variants) == null ? void 0 : v.findLast(({ contentType: j }) => j === "video/mp4")) == null ? void 0 : I.url;
12
12
  }, [r]);
13
- return /* @__PURE__ */ o(L, { children: [
14
- /* @__PURE__ */ o(N, { children: [
13
+ return /* @__PURE__ */ o(N, { children: [
14
+ /* @__PURE__ */ o(R, { children: [
15
15
  /* @__PURE__ */ s(
16
- E,
16
+ L,
17
17
  {
18
18
  image: c,
19
19
  name: (H = n == null ? void 0 : n.meta) == null ? void 0 : H.accountName,
20
- userName: C,
21
- verified: z,
20
+ userName: z,
21
+ verified: F,
22
22
  createdTweet: n == null ? void 0 : n.date
23
23
  }
24
24
  ),
25
- /* @__PURE__ */ s(R, { children: A(y) }),
25
+ /* @__PURE__ */ s(S, { children: D(y) }),
26
26
  !d && i && /* @__PURE__ */ s(l, { children: /* @__PURE__ */ s(t, { src: r == null ? void 0 : r[0].mediaUrlHttps }) }),
27
- d && i && /* @__PURE__ */ o(j, { children: [
27
+ d && i && /* @__PURE__ */ o(k, { children: [
28
28
  (r == null ? void 0 : r.length) === 1 && /* @__PURE__ */ s(l, { children: /* @__PURE__ */ s(t, { src: r[0].mediaUrlHttps }) }),
29
29
  (r == null ? void 0 : r.length) === 2 && /* @__PURE__ */ o(l, { children: [
30
30
  /* @__PURE__ */ s(p, { src: r[0].mediaUrlHttps }),
@@ -49,11 +49,19 @@ const S = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), A = (c) => c == null ?
49
49
  ] })
50
50
  ] })
51
51
  ] }),
52
- !i && (((U = r == null ? void 0 : r[0]) == null ? void 0 : U.type) === "video" || ((f = r == null ? void 0 : r[0]) == null ? void 0 : f.type) === "animated_gif") && m && /* @__PURE__ */ s(B, { source: m, poster: r[0].mediaUrlHttps, controlVideo: F })
52
+ !i && (((U = r == null ? void 0 : r[0]) == null ? void 0 : U.type) === "video" || ((f = r == null ? void 0 : r[0]) == null ? void 0 : f.type) === "animated_gif") && m && /* @__PURE__ */ s(
53
+ E,
54
+ {
55
+ muted: C,
56
+ source: m,
57
+ poster: r[0].mediaUrlHttps,
58
+ controlVideo: T
59
+ }
60
+ )
53
61
  ] });
54
62
  }
55
63
  );
56
64
  export {
57
- $ as TwitterContent,
58
- A as sanitizeContent
65
+ b as TwitterContent,
66
+ D as sanitizeContent
59
67
  };
@@ -10,6 +10,7 @@ export declare const COLORS: {
10
10
  SECONDARY_TEXT: string;
11
11
  QUESTION_TYPE_ICON: string;
12
12
  QUESTION_BODY_TEXT: string;
13
+ PRESENTED_BY_TEXT: string;
13
14
  SUCCESS: string;
14
15
  UNSUCCESS: string;
15
16
  SECONDARY_RED1: string;
@@ -52,6 +53,7 @@ export declare const COLORS: {
52
53
  VOTE_BTN_SELECTED_BORDER: string;
53
54
  VOTE_BTN_NOT_SELECTED_BORDER: string;
54
55
  VOTE_BTN_SELECTED_BG: string;
56
+ VOTE_BTN_SELECTED_BG_AD_UNIT: string;
55
57
  VOTE_BTN_NOT_SELECTED_BG: string;
56
58
  VOTE_BTN_NOT_SELECTED_BG_UNSET: string;
57
59
  VOTED_ANSWER_BG: string;
@@ -12,6 +12,7 @@ const R = {
12
12
  SECONDARY_TEXT: "rgba(10, 14, 19, 0.70)",
13
13
  QUESTION_TYPE_ICON: "#1D7BFF",
14
14
  QUESTION_BODY_TEXT: "#090E13",
15
+ PRESENTED_BY_TEXT: "#090E13",
15
16
  SUCCESS: "#107D57",
16
17
  UNSUCCESS: "#DF2F3B",
17
18
  SECONDARY_RED1: "#DF2F3B",
@@ -54,6 +55,7 @@ const R = {
54
55
  VOTE_BTN_SELECTED_BORDER: "#25282A",
55
56
  VOTE_BTN_NOT_SELECTED_BORDER: "#E8E8E8",
56
57
  VOTE_BTN_SELECTED_BG: "#FFFFFF",
58
+ VOTE_BTN_SELECTED_BG_AD_UNIT: "#FFFFFF",
57
59
  VOTE_BTN_NOT_SELECTED_BG: "#FFFFFF",
58
60
  VOTE_BTN_NOT_SELECTED_BG_UNSET: "rgb(196, 196, 196)",
59
61
  VOTED_ANSWER_BG: "#FFFFFF",
@@ -187,6 +187,7 @@ const _ = {
187
187
  --display-question-container: initial;
188
188
  --justify-content-question-container: initial;
189
189
  --color-question-body-text: #006747;
190
+ --color-presented-by-text: #006747;
190
191
  --nav-border: 1px solid var(--color-neutrals-gray3);
191
192
  `, f = "m1ojpy2l";
192
193
  export {
@@ -0,0 +1,10 @@
1
+ export declare const hideContentStyles = "\n .sl-hide-on-modal {\n height: 0 !important;\n opacity: 0 !important;\n overflow: hidden !important;\n transition: none;\n }\n";
2
+ export declare const getContainerBgStyles: ({ containerId, url, }: {
3
+ containerId?: string;
4
+ url: string;
5
+ }) => string;
6
+ export declare const useAdvertisementBackground: ({ containerId, landscapeUrl, portraitUrl, }: {
7
+ containerId?: string;
8
+ landscapeUrl?: string;
9
+ portraitUrl?: string;
10
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,77 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { useState as l, useMemo as s, useEffect as m } from "react";
3
+ const u = `
4
+ .sl-hide-on-modal {
5
+ height: 0 !important;
6
+ opacity: 0 !important;
7
+ overflow: hidden !important;
8
+ transition: none;
9
+ }
10
+ `, p = ({
11
+ containerId: t = "SlLayoutContainer",
12
+ url: n
13
+ }) => `
14
+ #${t || "SlLayoutContainer"},
15
+ #${t || "SlLayoutContainer"} .StreamLayerSDK>.StreamLayerSDKTheme > * {
16
+ --color-sdk-container-bg: transparent !important;
17
+ }
18
+
19
+ #${t || "SlLayoutContainer"}::before {
20
+ content: '';
21
+ display: block;
22
+ position: absolute;
23
+ inset: 0;
24
+ width: 100%;
25
+ height: 100%;
26
+ background-color: #1a1a1a;
27
+ background-size: cover !important;
28
+ background-position: center !important;
29
+ background-repeat: no-repeat !important;
30
+ background-image: ${n} !important;
31
+ z-index: 0;
32
+
33
+ opacity: 0;
34
+ animation: fade-sl-bg-in 0.3s linear forwards;
35
+ }
36
+
37
+ #${t || "SlLayoutContainer"} > div {
38
+ position: relative;
39
+ z-index: 1;
40
+ }
41
+
42
+ @keyframes fade-sl-bg-in {
43
+ from {
44
+ opacity: 0;
45
+ }
46
+ to {
47
+ opacity: 1;
48
+ }
49
+ }
50
+
51
+ ${u}
52
+ `, y = ({
53
+ containerId: t,
54
+ landscapeUrl: n,
55
+ portraitUrl: i
56
+ }) => {
57
+ const [r, a] = l(!1), o = s(() => {
58
+ const e = window.innerWidth, c = window.innerHeight;
59
+ return a(!1), e > c ? n : i;
60
+ }, [n, i]);
61
+ return m(() => {
62
+ if (o) {
63
+ const e = new Image();
64
+ e.src = o, e.onload = function() {
65
+ a(!0);
66
+ };
67
+ }
68
+ }, [o]), s(() => {
69
+ const e = o ? `url("${o}")` : void 0;
70
+ return e && r ? /* @__PURE__ */ d("style", { children: p({ containerId: t, url: e }) }) : null;
71
+ }, [t, o, r]);
72
+ };
73
+ export {
74
+ p as getContainerBgStyles,
75
+ u as hideContentStyles,
76
+ y as useAdvertisementBackground
77
+ };
@@ -1,3 +1,4 @@
1
+ import { default as React } from 'react';
1
2
  type ControlVideoProps = {
2
3
  muted: boolean;
3
4
  };
@@ -8,8 +9,15 @@ export type VideoPlayerProps = {
8
9
  aspectRatio?: string;
9
10
  onPlay?: () => void;
10
11
  onPause?: () => void;
12
+ onReplay?: () => void;
13
+ onEnd?: () => void;
14
+ onRender?: () => void;
15
+ onMute?: (muted?: boolean) => void;
16
+ onQuartile?: (quartile: 25 | 50 | 75) => void;
11
17
  autoPlay?: boolean;
12
- hideControls?: boolean;
18
+ playMuted?: boolean;
19
+ muted?: boolean;
20
+ webos?: boolean;
13
21
  className?: string;
14
22
  };
15
23
  export type ControlVideoCb = VideoPlayerProps['controlVideo'];
@@ -41,5 +49,5 @@ export declare const pauseAllVideos: () => void;
41
49
  * @param {string} props.source - The path to the video source.
42
50
  * @returns {JSX.Element} The rendered VideoPlayer component.
43
51
  */
44
- export declare const VideoPlayer: React.FC<VideoPlayerProps>;
52
+ export declare const VideoPlayer: React.ForwardRefExoticComponent<VideoPlayerProps & React.RefAttributes<HTMLVideoElement | null>>;
45
53
  export {};