@streamlayer/react-ui 1.0.0 → 1.2.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 (284) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +10 -0
  2. package/lib/app/app/Advertisement/index.js +89 -0
  3. package/lib/{ui/app/masters → app/app}/Features/FeatureProvider.d.ts +2 -2
  4. package/lib/{ui/app → app}/app/Features/FeatureProvider.js +8 -8
  5. package/lib/{ui/app → app}/app/Features/Gamification/Friends.d.ts +0 -1
  6. package/lib/{ui/app → app}/app/Features/Gamification/Friends.js +2 -2
  7. package/lib/{ui/app → app}/app/Features/Gamification/Leaderboard.d.ts +3 -3
  8. package/lib/{ui/app → app}/app/Features/Gamification/Leaderboard.js +16 -16
  9. package/lib/{ui/app/masters → app/app}/Features/Gamification/Question.d.ts +1 -1
  10. package/lib/app/app/Features/Gamification/Question.js +69 -0
  11. package/lib/{ui/app → app}/app/Features/Gamification/QuestionsList.d.ts +2 -2
  12. package/lib/{ui/app → app}/app/Features/Gamification/QuestionsList.js +1 -1
  13. package/lib/{ui/app/masters → app/app}/Features/Gamification/Tabs.d.ts +3 -3
  14. package/lib/{ui/app → app}/app/Features/Gamification/Tabs.js +12 -12
  15. package/lib/{ui/app → app}/app/Features/Gamification/UserSummary.d.ts +2 -2
  16. package/lib/{ui/app/masters → app/app}/Features/Gamification/UserSummary.js +1 -1
  17. package/lib/{ui/app → app}/app/Features/Gamification/gamification-feature.d.ts +1 -0
  18. package/lib/{ui/app → app}/app/Features/Gamification/index.d.ts +3 -3
  19. package/lib/{ui/app/masters → app/app}/Features/Gamification/index.js +29 -29
  20. package/lib/{ui/app/masters → app/app}/Features/index.d.ts +4 -4
  21. package/lib/app/app/Navigation/index.d.ts +6 -0
  22. package/lib/app/app/Navigation/index.js +64 -0
  23. package/lib/{ui/app → app}/app/Notifications/Onboarding/Notification/index.d.ts +2 -2
  24. package/lib/app/app/Notifications/Onboarding/Notification/styles.d.ts +9 -0
  25. package/lib/app/app/Notifications/Onboarding/Notification/styles.js +50 -0
  26. package/lib/{ui/app/masters → app/app}/Notifications/Onboarding/index.d.ts +4 -4
  27. package/lib/app/app/Notifications/Onboarding/index.js +168 -0
  28. package/lib/{ui/app → app}/app/Notifications/index.d.ts +3 -3
  29. package/lib/{ui/app → app}/app/Notifications/index.js +27 -27
  30. package/lib/app/app/Notifications/styles.d.ts +9 -0
  31. package/lib/app/app/Notifications/styles.js +31 -0
  32. package/lib/{ui/app/app/Navigation → app/app/Points}/index.d.ts +2 -2
  33. package/lib/{ui/app → app}/app/Points/index.js +1 -1
  34. package/lib/{ui/app → app}/app/index.d.ts +2 -2
  35. package/lib/{ui/app → app}/app/index.js +32 -32
  36. package/lib/app/app/story/content.d.ts +4 -0
  37. package/lib/app/app/story/content.js +30 -0
  38. package/lib/app/app/story/index.d.ts +10 -0
  39. package/lib/app/app/story/index.js +113 -0
  40. package/lib/app/app/story/login.d.ts +1 -0
  41. package/lib/app/app/story/login.js +34 -0
  42. package/lib/app/app/story/styles.d.ts +9 -0
  43. package/lib/app/app/story/styles.js +49 -0
  44. package/lib/app/app/story/useResponsive.d.ts +1 -0
  45. package/lib/app/app/story/useResponsive.js +15 -0
  46. package/lib/app/app/story/video.d.ts +10 -0
  47. package/lib/app/app/story/video.js +67 -0
  48. package/lib/{ui/app → app}/app/useApp.d.ts +2 -1
  49. package/lib/{ui/app → app}/app/useApp.js +20 -17
  50. package/lib/app/app/useAppContext.d.ts +8 -0
  51. package/lib/{ui/app → app}/index.d.ts +0 -1
  52. package/lib/app/login/demo.d.ts +5 -0
  53. package/lib/{ui → app}/login/index.d.ts +0 -1
  54. package/lib/{ui → app}/login/index.js +1 -1
  55. package/lib/app/login/styles.d.ts +7 -0
  56. package/lib/app/login/styles.js +39 -0
  57. package/lib/{ui/app/app → app/masters}/Features/FeatureProvider.d.ts +2 -2
  58. package/lib/{ui/app → app}/masters/Features/FeatureProvider.js +8 -8
  59. package/lib/{ui/app → app}/masters/Features/Gamification/Friends.d.ts +0 -1
  60. package/lib/app/masters/Features/Gamification/Friends.js +19 -0
  61. package/lib/{ui/app → app}/masters/Features/Gamification/Leaderboard.d.ts +3 -3
  62. package/lib/{ui/app → app}/masters/Features/Gamification/Leaderboard.js +10 -10
  63. package/lib/{ui/app/app → app/masters}/Features/Gamification/Question.d.ts +1 -1
  64. package/lib/{ui/app → app}/masters/Features/Gamification/Question.js +11 -11
  65. package/lib/{ui/app → app}/masters/Features/Gamification/QuestionsList.d.ts +2 -2
  66. package/lib/{ui/app → app}/masters/Features/Gamification/QuestionsList.js +1 -1
  67. package/lib/{ui/app/app → app/masters}/Features/Gamification/Tabs.d.ts +3 -3
  68. package/lib/{ui/app → app}/masters/Features/Gamification/Tabs.js +12 -12
  69. package/lib/{ui/app → app}/masters/Features/Gamification/UserSummary.d.ts +2 -2
  70. package/lib/{ui/app/app → app/masters}/Features/Gamification/UserSummary.js +1 -1
  71. package/lib/{ui/app → app}/masters/Features/Gamification/gamification-feature.d.ts +1 -0
  72. package/lib/{ui/app → app}/masters/Features/Gamification/index.d.ts +3 -3
  73. package/lib/app/masters/Features/Gamification/index.js +88 -0
  74. package/lib/{ui/app/app → app/masters}/Features/index.d.ts +4 -4
  75. package/lib/{ui/app → app}/masters/Navigation/MastersNavigation/index.d.ts +5 -5
  76. package/lib/{ui/app → app}/masters/Navigation/MastersNavigation/index.js +5 -5
  77. package/lib/{ui/app → app}/masters/Notifications/Onboarding/Notification/index.d.ts +2 -2
  78. package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +9 -0
  79. package/lib/{ui/app/app → app/masters}/Notifications/Onboarding/Notification/styles.js +16 -16
  80. package/lib/{ui/app/app → app/masters}/Notifications/Onboarding/index.d.ts +4 -4
  81. package/lib/{mastersLogoSolid-B4Dz-vm1.js → app/masters/Notifications/Onboarding/index.js} +166 -2
  82. package/lib/{ui/app → app}/masters/Notifications/index.d.ts +3 -3
  83. package/lib/{ui/app → app}/masters/Notifications/index.js +48 -47
  84. package/lib/app/masters/Notifications/styles.d.ts +9 -0
  85. package/lib/{ui/app/app → app/masters}/Notifications/styles.js +10 -10
  86. package/lib/app/masters/Points/index.d.ts +5 -0
  87. package/lib/{ui/app → app}/masters/Points/index.js +1 -1
  88. package/lib/{ui/app → app}/masters/masters.d.ts +3 -3
  89. package/lib/{ui/app → app}/masters/masters.js +20 -20
  90. package/lib/{ui/app → app}/masters/useMastersApp.d.ts +2 -1
  91. package/lib/app/masters/useMastersApp.js +71 -0
  92. package/lib/app/masters/useMastersContext.d.ts +8 -0
  93. package/lib/app/styles.d.ts +20 -0
  94. package/lib/{ui/app → app}/styles.js +13 -13
  95. package/lib/{ui/app → app}/useClipboardCopy.d.ts +3 -3
  96. package/lib/{ui/app → app}/useClipboardCopy.js +2 -2
  97. package/lib/{ui/app → app}/useSdkFeature.d.ts +2 -1
  98. package/lib/{ui/app → app}/useSdkResponsive.d.ts +3 -1
  99. package/lib/{ui/app → app}/useSdkResponsive.js +2 -2
  100. package/lib/{ui/app → app}/useSdkScroll.d.ts +3 -2
  101. package/lib/{ui/app → app}/useSdkScroll.js +2 -2
  102. package/lib/assets/style.css +1 -1
  103. package/lib/hooks/showIn.js +1 -1
  104. package/lib/{index-Bicco-Aq.js → index-B1QdimmR.js} +7737 -8219
  105. package/lib/index.d.ts +1 -1
  106. package/lib/index.js +1 -1
  107. package/lib/ui/advertisement/banner/index.d.ts +8 -0
  108. package/lib/ui/advertisement/banner/index.js +32 -0
  109. package/lib/ui/advertisement/index.d.ts +10 -0
  110. package/lib/ui/advertisement/index.js +19 -0
  111. package/lib/ui/advertisement/mock.d.ts +4 -0
  112. package/lib/ui/advertisement/mock.js +67 -0
  113. package/lib/ui/advertisement/overlay/index.d.ts +7 -0
  114. package/lib/ui/advertisement/overlay/index.js +74 -0
  115. package/lib/ui/advertisement/overlay/styles.d.ts +18 -0
  116. package/lib/ui/advertisement/overlay/styles.js +95 -0
  117. package/lib/ui/advertisement/sidebar/index.d.ts +7 -0
  118. package/lib/ui/advertisement/sidebar/index.js +25 -0
  119. package/lib/ui/animated-counter/index.d.ts +1 -1
  120. package/lib/ui/button/index.d.ts +0 -1
  121. package/lib/ui/button/styles.d.ts +2 -3
  122. package/lib/ui/gamification/constants.d.ts +1 -0
  123. package/lib/ui/gamification/copyNotification/index.d.ts +0 -1
  124. package/lib/ui/gamification/copyNotification/styles.d.ts +3 -4
  125. package/lib/ui/gamification/detail/header/index.d.ts +1 -1
  126. package/lib/ui/gamification/detail/header/styles.d.ts +4 -5
  127. package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -1
  128. package/lib/ui/gamification/detail/sponsor/index.js +13 -7
  129. package/lib/ui/gamification/insight/index.d.ts +1 -1
  130. package/lib/ui/gamification/insight/styles.d.ts +8 -9
  131. package/lib/ui/gamification/insight-list/index.d.ts +1 -1
  132. package/lib/ui/gamification/insight-list/styles.d.ts +2 -3
  133. package/lib/ui/gamification/invite-link/index.d.ts +0 -1
  134. package/lib/ui/gamification/invite-link/index.js +13 -13
  135. package/lib/ui/gamification/invite-link/styles.d.ts +5 -6
  136. package/lib/ui/gamification/invite-link/styles.js +11 -11
  137. package/lib/ui/gamification/leaderboard/index.d.ts +1 -1
  138. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +2 -2
  139. package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -8
  140. package/lib/ui/gamification/leaderboard/static.d.ts +3 -3
  141. package/lib/ui/gamification/leaderboard/styles.d.ts +1 -2
  142. package/lib/ui/gamification/leaderboard/styles.js +1 -1
  143. package/lib/ui/gamification/onboarding/index.d.ts +3 -3
  144. package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +0 -1
  145. package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -6
  146. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -0
  147. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +10 -11
  148. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +1 -1
  149. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +6 -6
  150. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +9 -10
  151. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +1 -1
  152. package/lib/ui/gamification/onboarding/slides/onboarding-rules/styles.d.ts +8 -9
  153. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +0 -1
  154. package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +4 -5
  155. package/lib/ui/gamification/onboarding/styles.d.ts +5 -6
  156. package/lib/ui/gamification/points/index.d.ts +0 -1
  157. package/lib/ui/gamification/points/styles.d.ts +5 -6
  158. package/lib/ui/gamification/question/index.d.ts +2 -2
  159. package/lib/ui/gamification/question/index.js +27 -26
  160. package/lib/ui/gamification/question/insight/index.d.ts +1 -1
  161. package/lib/ui/gamification/question/insight/styles.d.ts +2 -3
  162. package/lib/ui/gamification/question/list/index.d.ts +2 -2
  163. package/lib/ui/gamification/question/list/styles.d.ts +1 -2
  164. package/lib/ui/gamification/question/notification/index.d.ts +2 -2
  165. package/lib/ui/gamification/question/notification/insight/index.d.ts +2 -2
  166. package/lib/ui/gamification/question/notification/insight/styles.d.ts +7 -8
  167. package/lib/ui/gamification/question/notification/pill/index.d.ts +0 -1
  168. package/lib/ui/gamification/question/notification/pill/styles.d.ts +3 -4
  169. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.d.ts +0 -1
  170. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/styles.d.ts +58 -31
  171. package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +3 -2
  172. package/lib/ui/gamification/question/notification/prediction-result/index.js +55 -54
  173. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +11 -10
  174. package/lib/ui/gamification/question/notification/styles.d.ts +6 -7
  175. package/lib/ui/gamification/question/notification/tweet/index.d.ts +3 -3
  176. package/lib/ui/gamification/question/notification/tweet/styles.d.ts +4 -5
  177. package/lib/ui/gamification/question/styles.d.ts +14 -14
  178. package/lib/ui/gamification/question/styles.js +48 -43
  179. package/lib/ui/gamification/question/twitter/index.d.ts +2 -2
  180. package/lib/ui/gamification/question/twitter/styles.d.ts +3 -4
  181. package/lib/ui/gamification/tabs/index.d.ts +0 -1
  182. package/lib/ui/gamification/tabs/styles.d.ts +4 -5
  183. package/lib/ui/gamification/user-statistics/components/rank/index.d.ts +0 -1
  184. package/lib/ui/gamification/user-statistics/components/rank/styles.d.ts +3 -4
  185. package/lib/ui/gamification/user-statistics/components/statistic/index.d.ts +0 -1
  186. package/lib/ui/gamification/user-statistics/components/statistic/styles.d.ts +3 -4
  187. package/lib/ui/gamification/user-statistics/index.d.ts +0 -1
  188. package/lib/ui/gamification/user-statistics/styles.d.ts +17 -18
  189. package/lib/ui/gamification/vote/alert/index.d.ts +2 -1
  190. package/lib/ui/gamification/vote/alert/styles.d.ts +3 -4
  191. package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
  192. package/lib/ui/gamification/vote/feedback/styles.d.ts +8 -9
  193. package/lib/ui/gamification/vote/index.d.ts +1 -1
  194. package/lib/ui/gamification/vote/insight-details/index.d.ts +1 -1
  195. package/lib/ui/gamification/vote/insight-details/styles.d.ts +2 -3
  196. package/lib/ui/gamification/vote/styles.d.ts +4 -5
  197. package/lib/ui/gamification/vote/styles.js +1 -1
  198. package/lib/ui/gamification/vote/twitter-details/index.d.ts +2 -2
  199. package/lib/ui/gamification/vote/twitter-details/styles.d.ts +2 -3
  200. package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -1
  201. package/lib/ui/gamification/vote/vote-option/index.js +6 -6
  202. package/lib/ui/gamification/vote/vote-option/styles.d.ts +19 -16
  203. package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -1
  204. package/lib/ui/gamification/vote/win-bar/styles.d.ts +6 -7
  205. package/lib/ui/icons/index.d.ts +1 -1
  206. package/lib/ui/icons/index.js +108 -47
  207. package/lib/ui/lottie/index.d.ts +0 -1
  208. package/lib/ui/modal/index.d.ts +0 -1
  209. package/lib/ui/modal/index.js +1 -1
  210. package/lib/ui/navigation/button/Channels.d.ts +1 -1
  211. package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
  212. package/lib/ui/navigation/button/LeaderBoard.d.ts +1 -1
  213. package/lib/ui/navigation/button/index.d.ts +1 -1
  214. package/lib/ui/navigation/button/styles.d.ts +6 -7
  215. package/lib/ui/navigation/index.d.ts +1 -1
  216. package/lib/ui/navigation/masters.d.ts +6 -5
  217. package/lib/ui/questions/insight/index.d.ts +1 -1
  218. package/lib/ui/questions/insight/styles.d.ts +6 -7
  219. package/lib/ui/questions/twitter/account/index.d.ts +0 -1
  220. package/lib/ui/questions/twitter/account/styles.d.ts +6 -7
  221. package/lib/ui/questions/twitter/index.d.ts +1 -1
  222. package/lib/ui/questions/twitter/styles.d.ts +14 -11
  223. package/lib/ui/show-in/index.d.ts +2 -1
  224. package/lib/ui/skeleton/index.d.ts +0 -1
  225. package/lib/ui/skeleton/styles.d.ts +1 -2
  226. package/lib/ui/slide-in/index.d.ts +11 -0
  227. package/lib/ui/slide-in/index.js +24 -0
  228. package/lib/ui/theme/ThemeColors.js +1 -1
  229. package/lib/ui/theme/ThemeColorsAdvertisement.d.ts +1 -0
  230. package/lib/ui/theme/ThemeColorsAdvertisement.js +15 -0
  231. package/lib/ui/theme/breakpoints.d.ts +1 -0
  232. package/lib/ui/theme/constants.d.ts +23 -59
  233. package/lib/ui/theme/constants.js +41 -56
  234. package/lib/ui/theme/index.d.ts +0 -1
  235. package/lib/ui/theme/masters-theme.d.ts +4 -24
  236. package/lib/ui/theme/masters-theme.js +26 -58
  237. package/lib/ui/theme/masters.d.ts +0 -1
  238. package/lib/ui/theme/theme.d.ts +1 -1
  239. package/lib/ui/theme/theme.js +14 -11
  240. package/lib/ui/timer/index.d.ts +3 -2
  241. package/lib/ui/timer/index.js +32 -32
  242. package/lib/ui/video-player/index.d.ts +1 -1
  243. package/lib/ui/video-player/index.js +70 -62
  244. package/lib/ui/video-player/styles.d.ts +5 -6
  245. package/lib/utils/debug/storage.js +1 -1
  246. package/lib/utils/storage.js +1 -1
  247. package/package.json +47 -41
  248. package/lib/styles_z07sl8-l0sNRNKZ.js +0 -1
  249. package/lib/ui/app/app/Features/Gamification/Question.js +0 -69
  250. package/lib/ui/app/app/Features/Gamification/index.js +0 -88
  251. package/lib/ui/app/app/Navigation/index.js +0 -42
  252. package/lib/ui/app/app/Notifications/Onboarding/Notification/styles.d.ts +0 -10
  253. package/lib/ui/app/app/Notifications/Onboarding/index.js +0 -172
  254. package/lib/ui/app/app/Notifications/styles.d.ts +0 -8
  255. package/lib/ui/app/app/Points/index.d.ts +0 -5
  256. package/lib/ui/app/app/useAppContext.d.ts +0 -8
  257. package/lib/ui/app/masters/Features/Gamification/Friends.js +0 -19
  258. package/lib/ui/app/masters/Navigation/index.d.ts +0 -9
  259. package/lib/ui/app/masters/Navigation/index.js +0 -30
  260. package/lib/ui/app/masters/Notifications/Onboarding/Notification/styles.d.ts +0 -10
  261. package/lib/ui/app/masters/Notifications/Onboarding/Notification/styles.js +0 -50
  262. package/lib/ui/app/masters/Notifications/Onboarding/index.js +0 -172
  263. package/lib/ui/app/masters/Notifications/styles.d.ts +0 -8
  264. package/lib/ui/app/masters/Notifications/styles.js +0 -31
  265. package/lib/ui/app/masters/Points/index.d.ts +0 -5
  266. package/lib/ui/app/masters/useMastersApp.js +0 -68
  267. package/lib/ui/app/masters/useMastersContext.d.ts +0 -8
  268. package/lib/ui/app/styles.d.ts +0 -15
  269. package/lib/ui/login/demo.d.ts +0 -6
  270. package/lib/ui/login/styles.d.ts +0 -8
  271. package/lib/ui/login/styles.js +0 -39
  272. /package/lib/{ui/app → app}/app/Features/Gamification/gamification-feature.js +0 -0
  273. /package/lib/{ui/app → app}/app/Features/index.js +0 -0
  274. /package/lib/{ui/app → app}/app/Notifications/Onboarding/Notification/index.js +0 -0
  275. /package/lib/{ui/app → app}/app/useAppContext.js +0 -0
  276. /package/lib/{ui/app → app}/index.js +0 -0
  277. /package/lib/{ui → app}/login/demo.js +0 -0
  278. /package/lib/{ui/app → app}/masters/Features/Gamification/gamification-feature.js +0 -0
  279. /package/lib/{ui/app → app}/masters/Features/index.js +0 -0
  280. /package/lib/{ui/app → app}/masters/Notifications/Onboarding/Notification/index.js +0 -0
  281. /package/lib/{ui/app → app}/masters/useMastersContext.js +0 -0
  282. /package/lib/{ui/app → app}/useImagesPreload.d.ts +0 -0
  283. /package/lib/{ui/app → app}/useImagesPreload.js +0 -0
  284. /package/lib/{ui/app → app}/useSdkFeature.js +0 -0
@@ -1,7 +1,8 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
2
  import { breakpoints as n } from "./breakpoints.js";
3
- import { colors as h, FONT as t } from "./constants.js";
3
+ import { colors as s, colorsAdvertisement as h, FONT as t } from "./constants.js";
4
4
  const l = `
5
+ ${s}
5
6
  ${h}
6
7
  --font-family: ${t.REGULAR};
7
8
  --font-regular: ${t.REGULAR};
@@ -10,9 +11,11 @@ const l = `
10
11
  --font-weight-default: ${t.WEIGHT_DEFAULT};
11
12
 
12
13
  --header-offset: 0px;
13
- --header-height: 0px;
14
+ --header-height: 68px;
14
15
  --watch-live-header: 0px;
15
16
  --animation-duration: 0.5s;
17
+ --promo-animation-duration: 0.5s;
18
+ --promo-animation-function: ease-in;
16
19
  --animation-function: ease;
17
20
  --container-padding: 16px;
18
21
  --border-radius: 8px;
@@ -21,14 +24,14 @@ const l = `
21
24
  --max-notifications-width: 400px;
22
25
 
23
26
  ${n.down("xl")`
24
- --header-offset: 56px;
27
+ --header-offset: 0px;
25
28
  --watch-live-header: 46px;
26
29
  `}
27
30
 
28
31
  ${n.intermediate("xl", "lg")`
29
- --header-offset: 76px;
32
+ --header-offset: 0px;
30
33
  `}
31
- `, p = "StreamLayerCSSReset", m = "ttkj0ah", x = () => /* @__PURE__ */ e("table", {
34
+ `, f = "StreamLayerCSSReset", x = "ttkj0ah", u = () => /* @__PURE__ */ e("table", {
32
35
  children: /* @__PURE__ */ r("table", {
33
36
  children: [/* @__PURE__ */ e("thead", {
34
37
  children: /* @__PURE__ */ r("tr", {
@@ -39,11 +42,11 @@ const l = `
39
42
  })]
40
43
  })
41
44
  }), /* @__PURE__ */ e("tbody", {
42
- children: l.split(";").map((a) => {
43
- const i = a.trim(), [o, d] = i.split(":");
45
+ children: l.split(";").map((o) => {
46
+ const i = o.trim(), [a, d] = i.split(":");
44
47
  return /* @__PURE__ */ r("tr", {
45
48
  children: [/* @__PURE__ */ e("td", {
46
- children: o
49
+ children: a
47
50
  }), /* @__PURE__ */ e("td", {
48
51
  children: d
49
52
  })]
@@ -53,8 +56,8 @@ const l = `
53
56
  })
54
57
  });
55
58
  export {
56
- x as ThemeVariables,
57
- p as resetCss,
58
- m as theme,
59
+ u as ThemeVariables,
60
+ f as resetCss,
61
+ x as theme,
59
62
  l as themeStr
60
63
  };
@@ -1,9 +1,10 @@
1
- import React from 'react';
1
+ import { default as React } from 'react';
2
+
2
3
  interface TimerProps {
3
4
  isPlaying?: boolean;
4
5
  duration?: number;
5
6
  onTimerExpired?: () => void;
6
7
  }
7
- export declare const RemainingTime: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
+ export declare const RemainingTime: import('@linaria/react').StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
9
  export declare const Timer: React.FC<TimerProps>;
9
10
  export {};
@@ -1,45 +1,45 @@
1
- import { jsx as R } from "react/jsx-runtime";
2
- import { styled as _ } from "@linaria/react";
3
- import { useState as c, useEffect as a, useCallback as n } from "react";
4
- import { CountdownCircleTimer as N } from "react-countdown-circle-timer";
5
- import { COLORS as t } from "../theme/constants.js";
6
- const D = [t.PRIMARY_GREEN1, t.SECONDARY_RED1, t.SECONDARY_RED1, t.NEUTRALS_GRAY3], T = [10, 10, 1, 0], Y = /* @__PURE__ */ _("div")({
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { styled as M } from "@linaria/react";
3
+ import { useState as c, useEffect as _, useCallback as n } from "react";
4
+ import { CountdownCircleTimer as h } from "react-countdown-circle-timer";
5
+ import { TIMER_COLORS as p, TIMER_GREEN as E, TIMER_RED as S, TIMER_GRAY as g } from "../theme/constants.js";
6
+ const k = [10, 10, 1, 0], O = /* @__PURE__ */ M("div")({
7
7
  name: "RemainingTime",
8
8
  class: "r165427",
9
9
  propsAsIs: !1
10
- }), h = t.SECONDARY_GREEN6, l = t.SECONDARY_RED3, m = t.NEUTRALS_GRAY3, G = ({
10
+ }), u = E, l = S, m = g, L = ({
11
11
  isPlaying: i = !0,
12
- duration: o = 30,
13
- onTimerExpired: e
12
+ duration: t = 30,
13
+ onTimerExpired: s
14
14
  }) => {
15
- const [C, s] = c(o > 10 ? h : l), [E, S] = c(2);
16
- a(() => {
17
- o === 0 && (S(0), s(m));
15
+ const [R, o] = c(t > 10 ? u : l), [f, a] = c(2);
16
+ _(() => {
17
+ t === 0 && (a(0), o(m));
18
+ }, [t]);
19
+ const C = ({
20
+ remainingTime: e
21
+ }) => /* @__PURE__ */ r(O, {
22
+ children: t === 0 ? 0 : e
23
+ }), T = n(() => {
24
+ s == null || s(), o(m);
25
+ }, [s, o]), I = n((e) => {
26
+ e === 10 && o(l);
18
27
  }, [o]);
19
- const f = ({
20
- remainingTime: r
21
- }) => /* @__PURE__ */ R(Y, {
22
- children: o === 0 ? 0 : r
23
- }), A = n(() => {
24
- e == null || e(), s(m);
25
- }, [e, s]), O = n((r) => {
26
- r === 10 && s(l);
27
- }, [s]);
28
- return /* @__PURE__ */ R(N, {
28
+ return /* @__PURE__ */ r(h, {
29
29
  isPlaying: i,
30
- duration: o,
31
- colors: D,
32
- colorsTime: T,
30
+ duration: t,
31
+ colors: p,
32
+ colorsTime: k,
33
33
  size: 32,
34
- strokeWidth: E,
34
+ strokeWidth: f,
35
35
  trailStrokeWidth: 2,
36
- trailColor: C,
37
- onComplete: A,
38
- onUpdate: O,
39
- children: f
36
+ trailColor: R,
37
+ onComplete: T,
38
+ onUpdate: I,
39
+ children: C
40
40
  });
41
41
  };
42
42
  export {
43
- Y as RemainingTime,
44
- G as Timer
43
+ O as RemainingTime,
44
+ L as Timer
45
45
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type ControlVideoProps = {
3
2
  muted: boolean;
4
3
  };
@@ -6,6 +5,7 @@ export type VideoPlayerProps = {
6
5
  poster?: string;
7
6
  source?: string;
8
7
  controlVideo?: (props: ControlVideoProps) => void;
8
+ aspectRatio?: string;
9
9
  };
10
10
  export declare const pauseAllVideos: () => void;
11
11
  /**
@@ -1,77 +1,85 @@
1
- import { jsxs as x, jsx as n } from "react/jsx-runtime";
2
- import { cx as C } from "@linaria/core";
3
- import { useRef as E, useState as g, useCallback as v, useEffect as d } from "react";
4
- import { eventBus as S } from "@streamlayer/sdk-web-interfaces";
5
- import { SvgIcon as y } from "../icons/index.js";
6
- import { Container as T, ToggleIconPause as L, Player as j, Poster as k, Control as H } from "./styles.js";
7
- const M = (s, a) => {
1
+ import { jsxs as C, jsx as o } from "react/jsx-runtime";
2
+ import { cx as E } from "@linaria/core";
3
+ import { useRef as S, useState as v, useCallback as d, useEffect as y } from "react";
4
+ import { eventBus as T } from "@streamlayer/sdk-web-interfaces";
5
+ import { SvgIcon as P } from "../icons/index.js";
6
+ import { Container as L, ToggleIconPause as j, Player as k, Poster as H, Control as M } from "./styles.js";
7
+ const A = (s, a) => {
8
8
  for (const t of s)
9
9
  t.isIntersecting || t.target instanceof HTMLVideoElement && !t.target.paused && (a.unobserve(t.target), t.target.pause());
10
- }, P = new IntersectionObserver(M, { threshold: 0.5 }), f = /* @__PURE__ */ new Set(), A = (s) => {
11
- P.observe(s), f.add(s);
12
- }, o = (s) => {
13
- P.unobserve(s), f.delete(s);
14
- }, B = () => {
15
- for (const s of f)
16
- s instanceof HTMLVideoElement && !s.paused && (s.pause(), o(s));
17
- }, J = ({ poster: s, source: a, controlVideo: t }) => {
18
- const e = E(null), [u, c] = g(!1), [m, p] = g(!0), h = v(() => {
19
- t == null || t({ muted: !0 });
20
- }, [t]), i = v(() => {
21
- t == null || t({ muted: !1 });
22
- }, [t]), I = (r) => {
23
- r.stopPropagation();
24
- const b = e == null ? void 0 : e.current;
25
- if (b) {
26
- if (u)
27
- b.pause(), e.current && o(e.current);
10
+ }, h = new IntersectionObserver(A, { threshold: 0.5 }), m = /* @__PURE__ */ new Set(), B = (s) => {
11
+ h.observe(s), m.add(s);
12
+ }, i = (s) => {
13
+ h.unobserve(s), m.delete(s);
14
+ }, F = () => {
15
+ for (const s of m)
16
+ s instanceof HTMLVideoElement && !s.paused && (s.pause(), i(s));
17
+ }, K = ({ poster: s, source: a, aspectRatio: t, controlVideo: r }) => {
18
+ const e = S(null), [c, l] = v(!1), [p, b] = v(!0), I = d(() => {
19
+ r == null || r({ muted: !0 });
20
+ }, [r]), u = d(() => {
21
+ r == null || r({ muted: !1 });
22
+ }, [r]), O = (n) => {
23
+ n.stopPropagation();
24
+ const g = e == null ? void 0 : e.current;
25
+ if (g) {
26
+ if (c)
27
+ g.pause(), e.current && i(e.current);
28
28
  else {
29
- const l = e == null ? void 0 : e.current;
30
- if (!l)
29
+ const f = e == null ? void 0 : e.current;
30
+ if (!f)
31
31
  return;
32
- B(), A(l), l.play().catch((w) => console.log(w)), p(!1);
32
+ F(), B(f), f.play().catch((x) => console.log(x)), b(!1);
33
33
  }
34
- S.emit("interactions", {
34
+ T.emit("interactions", {
35
35
  action: "tap",
36
36
  payload: {}
37
37
  });
38
38
  }
39
- }, O = () => {
40
- var r;
41
- e.current && o(e.current), (r = e == null ? void 0 : e.current) == null || r.load(), p(!0);
39
+ }, w = () => {
40
+ var n;
41
+ e.current && i(e.current), (n = e == null ? void 0 : e.current) == null || n.load(), b(!0);
42
42
  };
43
- return d(() => {
44
- e.current && o(e.current);
45
- }, []), d(() => {
46
- const r = e == null ? void 0 : e.current;
43
+ return y(() => {
44
+ e.current && i(e.current);
45
+ }, []), y(() => {
46
+ const n = e == null ? void 0 : e.current;
47
47
  return () => {
48
- r && (r.paused || i(), o(r));
48
+ n && (n.paused || u(), i(n));
49
49
  };
50
- }, [i]), /* @__PURE__ */ x(T, { onClick: I, className: C(u && L), children: [
51
- /* @__PURE__ */ n(
52
- j,
53
- {
54
- ref: e,
55
- src: a,
56
- onPlay: () => {
57
- h(), c(!0);
58
- },
59
- onPause: () => {
60
- i(), c(!1);
61
- },
62
- onEnded: () => {
63
- i(), c(!1), O();
64
- },
65
- style: { visibility: m ? "hidden" : "visible" },
66
- controls: !1,
67
- playsInline: !0
68
- }
69
- ),
70
- /* @__PURE__ */ n(k, { src: s, style: { visibility: m ? "visible" : "hidden" } }),
71
- /* @__PURE__ */ n(H, { children: u ? /* @__PURE__ */ n(y, { name: "icon-pause" }) : /* @__PURE__ */ n(y, { name: "icon-play" }) })
72
- ] });
50
+ }, [u]), /* @__PURE__ */ C(
51
+ L,
52
+ {
53
+ onClick: O,
54
+ className: E(c && j),
55
+ style: t ? { aspectRatio: t } : {},
56
+ children: [
57
+ /* @__PURE__ */ o(
58
+ k,
59
+ {
60
+ ref: e,
61
+ src: a,
62
+ onPlay: () => {
63
+ I(), l(!0);
64
+ },
65
+ onPause: () => {
66
+ u(), l(!1);
67
+ },
68
+ onEnded: () => {
69
+ u(), l(!1), w();
70
+ },
71
+ style: { visibility: p ? "hidden" : "visible" },
72
+ controls: !1,
73
+ playsInline: !0
74
+ }
75
+ ),
76
+ /* @__PURE__ */ o(H, { src: s, style: { visibility: p ? "visible" : "hidden" } }),
77
+ /* @__PURE__ */ o(M, { children: c ? /* @__PURE__ */ o(P, { name: "icon-pause" }) : /* @__PURE__ */ o(P, { name: "icon-play" }) })
78
+ ]
79
+ }
80
+ );
73
81
  };
74
82
  export {
75
- J as VideoPlayer,
76
- B as pauseAllVideos
83
+ K as VideoPlayer,
84
+ F as pauseAllVideos
77
85
  };
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
- export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
- export declare const Player: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLVideoElement> & import("react").VideoHTMLAttributes<HTMLVideoElement> & Record<never, unknown>>;
4
- export declare const Poster: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
5
- export declare const Control: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
- export declare const ToggleIconPause: import("@linaria/core").LinariaClassName;
1
+ export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
+ export declare const Player: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLVideoElement> & import('react').VideoHTMLAttributes<HTMLVideoElement> & Record<never, unknown>>;
3
+ export declare const Poster: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
4
+ export declare const Control: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
+ export declare const ToggleIconPause: import('@linaria/core').LinariaClassName;
@@ -1,6 +1,6 @@
1
1
  var n = Object.defineProperty;
2
2
  var i = (s, r, e) => r in s ? n(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
3
- var t = (s, r, e) => (i(s, typeof r != "symbol" ? r + "" : r, e), e);
3
+ var t = (s, r, e) => i(s, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { Storage as h } from "@streamlayer/sdk-web-storage";
5
5
  class d extends h {
6
6
  constructor() {
@@ -1,6 +1,6 @@
1
1
  var n = Object.defineProperty;
2
2
  var i = (s, r, e) => r in s ? n(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
3
- var t = (s, r, e) => (i(s, typeof r != "symbol" ? r + "" : r, e), e);
3
+ var t = (s, r, e) => i(s, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { Storage as h } from "@streamlayer/sdk-web-storage";
5
5
  class d extends h {
6
6
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -11,19 +11,24 @@
11
11
  "types": "./lib/index.d.ts"
12
12
  },
13
13
  "./masters": {
14
- "import": "./lib/ui/app/masters/masters.js",
15
- "default": "./lib/ui/app/masters/masters.js",
16
- "types": "./lib/ui/app/masters/masters.d.ts"
14
+ "import": "./lib/app/masters/masters.js",
15
+ "default": "./lib/app/masters/masters.js",
16
+ "types": "./lib/app/masters/masters.d.ts"
17
17
  },
18
18
  "./mastersPoints": {
19
- "import": "./lib/ui/app/masters/Points/index.js",
20
- "default": "./lib/ui/app/masters/Points/index.js",
21
- "types": "./lib/ui/app/masters/Points/index.d.ts"
19
+ "import": "./lib/app/masters/Points/index.js",
20
+ "default": "./lib/app/masters/Points/index.js",
21
+ "types": "./lib/app/masters/Points/index.d.ts"
22
22
  },
23
23
  "./points": {
24
- "import": "./lib/ui/app/app/Points/index.js",
25
- "default": "./lib/ui/app/app/Points/index.js",
26
- "types": "./lib/ui/app/app/Points/index.d.ts"
24
+ "import": "./lib/app/app/Points/index.js",
25
+ "default": "./lib/app/app/Points/index.js",
26
+ "types": "./lib/app/app/Points/index.d.ts"
27
+ },
28
+ "./advertisement": {
29
+ "import": "./lib/app/app/Advertisement/index.js",
30
+ "default": "./lib/app/app/Advertisement/index.js",
31
+ "types": "./lib/app/app/Advertisement/index.d.ts"
27
32
  },
28
33
  "./*": {
29
34
  "import": "./lib/*/index.js",
@@ -40,8 +45,8 @@
40
45
  "package.json"
41
46
  ],
42
47
  "peerDependencies": {
43
- "@lottiefiles/react-lottie-player": "^3.5.3",
44
- "@streamlayer/sl-eslib": "^5.85.0",
48
+ "@lottiefiles/react-lottie-player": "^3.5.4",
49
+ "@streamlayer/sl-eslib": "^5.104.1",
45
50
  "@types/lodash.throttle": "^4.1.9",
46
51
  "lodash.throttle": "^4.1.1",
47
52
  "nanoid": "3.3.7",
@@ -49,18 +54,18 @@
49
54
  "react-virtualized-auto-sizer": "^1.0.24",
50
55
  "react-window": "^1.8.10",
51
56
  "react-window-infinite-loader": "^1.0.9",
52
- "@streamlayer/feature-gamification": "^1.0.0",
53
- "@streamlayer/sdk-web-analytics": "^1.0.0",
54
- "@streamlayer/sdk-web": "^1.0.0",
55
- "@streamlayer/sdk-web-api": "^1.0.0",
56
- "@streamlayer/sdk-web-core": "^1.0.0",
57
- "@streamlayer/sdk-web-anonymous-auth": "^1.0.0",
58
- "@streamlayer/sdk-web-features": "^1.0.0",
59
- "@streamlayer/sdk-web-interfaces": "^1.0.0",
60
- "@streamlayer/sdk-web-logger": "^1.0.0",
61
- "@streamlayer/sdk-web-notifications": "^1.0.0",
62
- "@streamlayer/sdk-web-storage": "^1.0.0",
63
- "@streamlayer/sdk-web-types": "^1.0.0"
57
+ "@streamlayer/feature-gamification": "^1.2.0",
58
+ "@streamlayer/sdk-web": "^1.0.2",
59
+ "@streamlayer/sdk-web-analytics": "^1.0.2",
60
+ "@streamlayer/sdk-web-anonymous-auth": "^1.0.2",
61
+ "@streamlayer/sdk-web-api": "^1.1.1",
62
+ "@streamlayer/sdk-web-core": "^1.0.2",
63
+ "@streamlayer/sdk-web-features": "^1.0.2",
64
+ "@streamlayer/sdk-web-interfaces": "^1.0.2",
65
+ "@streamlayer/sdk-web-logger": "^1.0.2",
66
+ "@streamlayer/sdk-web-notifications": "^1.0.2",
67
+ "@streamlayer/sdk-web-storage": "^1.0.2",
68
+ "@streamlayer/sdk-web-types": "^1.1.1"
64
69
  },
65
70
  "nx": {
66
71
  "implicitDependencies": [
@@ -73,33 +78,34 @@
73
78
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
74
79
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
75
80
  "@linaria/babel-preset": "^5.0.4",
76
- "@linaria/core": "^6.0.0",
77
- "@linaria/react": "^6.0.0",
81
+ "@linaria/core": "^6.2.0",
82
+ "@linaria/react": "^6.2.1",
78
83
  "@nanostores/react": "^0.7.2",
79
- "@storybook/addon-docs": "^8.0.4",
80
- "@storybook/addon-viewport": "^8.0.4",
81
- "@storybook/blocks": "^8.0.4",
82
- "@storybook/jest": "~0.2.3",
83
- "@storybook/react": "^8.0.4",
84
- "@storybook/testing-library": "~0.2.2",
84
+ "@storybook/addon-docs": "^8.1.11",
85
+ "@storybook/addon-viewport": "^8.1.11",
86
+ "@storybook/blocks": "^8.1.11",
87
+ "@storybook/jest": "^0.2.3",
88
+ "@storybook/react": "^8.1.11",
89
+ "@storybook/testing-library": "^0.2.2",
85
90
  "@types/react-infinite-scroller": "^1.2.5",
86
91
  "@types/react-window": "^1.8.8",
87
92
  "@types/react-window-infinite-loader": "^1.0.9",
88
- "@wyw-in-js/vite": "^0.2.2",
93
+ "@wyw-in-js/vite": "^0.5.3",
89
94
  "esbuild-plugin-babel": "^0.2.3",
90
- "glob": "^10.3.10",
91
- "react": "18.2.0",
95
+ "glob": "^10.4.2",
96
+ "react": "18.3.1",
92
97
  "react-auth-code-input": "^3.2.1",
93
98
  "react-countdown-circle-timer": "^3.2.1",
94
- "react-countup": "^6.5.0",
95
- "react-phone-number-input": "^3.3.9",
99
+ "react-countup": "^6.5.3",
100
+ "react-phone-number-input": "^3.4.3",
96
101
  "rollup-plugin-node-polyfills": "^0.2.1",
97
- "tslib": "^2.6.2",
98
- "vite": "5.2.6",
99
- "vite-plugin-node-polyfills": "^0.21.0",
102
+ "screenfull": "^6.0.2",
103
+ "tslib": "^2.6.3",
104
+ "vite": "5.3.2",
105
+ "vite-plugin-node-polyfills": "^0.22.0",
100
106
  "vite-plugin-svgr": "^4.2.0",
101
107
  "vite-svg-loader": "^5.1.0",
102
108
  "vite-tsconfig-paths": "^4.3.2",
103
- "@streamlayer/react": "^1.0.0"
109
+ "@streamlayer/react": "^1.1.1"
104
110
  }
105
111
  }
@@ -1 +0,0 @@
1
-
@@ -1,69 +0,0 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
- import { styled as l } from "@linaria/react";
3
- import { useStore as n } from "@nanostores/react";
4
- import { QuestionType as a } from "@streamlayer/sdk-web-types";
5
- import { useAppContext as m } from "../../useAppContext.js";
6
- import { VoteHeader as c } from "../../../../gamification/detail/header/index.js";
7
- import { Sponsor as p } from "../../../../gamification/detail/sponsor/index.js";
8
- import { Vote as f, VoteSkeleton as b } from "../../../../gamification/vote/index.js";
9
- import { InsightDetails as y } from "../../../../gamification/vote/insight-details/index.js";
10
- import { TwitterDetails as V } from "../../../../gamification/vote/twitter-details/index.js";
11
- const x = /* @__PURE__ */ l("div")({
12
- name: "QuestionContainer",
13
- class: "qfnqmpg",
14
- propsAsIs: !1
15
- }), d = ({
16
- openedQuestion: t
17
- }) => {
18
- var s, o;
19
- const {
20
- sdk: r
21
- } = m();
22
- return ((s = t == null ? void 0 : t.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ e(y, {
23
- ...t.attributes.attributes.value,
24
- controlVideo: r == null ? void 0 : r.controlVideoPlayer
25
- }) : ((o = t == null ? void 0 : t.attributes) == null ? void 0 : o.attributes.case) === "tweet" ? /* @__PURE__ */ e(V, {
26
- ...t.attributes.attributes.value,
27
- controlVideo: r == null ? void 0 : r.controlVideoPlayer
28
- }) : null;
29
- }, h = ({
30
- extendedQuestion: t,
31
- vote: r,
32
- close: s
33
- }) => {
34
- const {
35
- loading: o,
36
- data: i
37
- } = t;
38
- return i ? /* @__PURE__ */ e(f, {
39
- vote: r,
40
- close: s,
41
- openedQuestion: i,
42
- isLoading: !!o
43
- }) : /* @__PURE__ */ e(b, {});
44
- }, j = ({
45
- gamification: t
46
- }) => {
47
- var i;
48
- const r = n(t.openedQuestion.$store), s = n(t.openedQuestion.$extendedStore);
49
- if (!r)
50
- return null;
51
- const o = r.type;
52
- return /* @__PURE__ */ u(x, {
53
- children: [/* @__PURE__ */ e(c, {
54
- close: t.closeQuestion,
55
- type: ((i = r.attributes) == null ? void 0 : i.type) || a.UNSET
56
- }), o === "question" && /* @__PURE__ */ e(h, {
57
- vote: t.submitAnswer,
58
- close: t.closeQuestion,
59
- extendedQuestion: s
60
- }), o !== "question" && /* @__PURE__ */ e(d, {
61
- openedQuestion: r
62
- }), /* @__PURE__ */ e(p, {
63
- sponsorLogo: ""
64
- })]
65
- });
66
- };
67
- export {
68
- j as Question
69
- };
@@ -1,88 +0,0 @@
1
- import { jsx as o, jsxs as f } from "react/jsx-runtime";
2
- import { styled as m } from "@linaria/react";
3
- import { useStore as c } from "@nanostores/react";
4
- import { useHideTransition as h } from "../../../../../hooks/showIn.js";
5
- import { SDKWhiteContainer as C } from "../../../styles.js";
6
- import { VoteHeader as k } from "../../../../gamification/detail/header/index.js";
7
- import { UserStatistics as S } from "../../../../gamification/user-statistics/index.js";
8
- import { ModalPortal as U } from "../../../../modal/index.js";
9
- import { ShowIn as y } from "../../../../show-in/index.js";
10
- import { Question as I } from "./Question.js";
11
- import { Tabs as x } from "./Tabs.js";
12
- const O = () => y, p = /* @__PURE__ */ m(O())({
13
- name: "OpenedContainer",
14
- class: "o1o2cpiy",
15
- propsAsIs: !0
16
- }), b = /* @__PURE__ */ m("div")({
17
- name: "UserContainer",
18
- class: "u1ob6f8q",
19
- propsAsIs: !1
20
- }), v = ({
21
- correct: e,
22
- incorrect: r
23
- }) => {
24
- const n = e + r;
25
- return n === 0 ? 0 : Math.round(e / n * 100);
26
- }, q = ({
27
- gamification: e,
28
- scrollStore: r,
29
- className: n,
30
- appNode: i,
31
- scrollNode: s,
32
- responsiveStore: t
33
- }) => /* @__PURE__ */ o(x, {
34
- appNode: i,
35
- scrollStore: r,
36
- scrollNode: s,
37
- className: n,
38
- gamification: e,
39
- responsiveStore: t
40
- }), E = ({
41
- gamification: e,
42
- className: r,
43
- appNode: n,
44
- responsiveStore: i
45
- }) => {
46
- const s = c(e.openedQuestion.$store), t = c(e.openedUser), {
47
- sdkInDesktopView: d
48
- } = c(i, {
49
- keys: ["sdkInDesktopView"]
50
- }), {
51
- hiding: a,
52
- onAnimationEnd: l
53
- } = h();
54
- if (!n.current || !s && !t)
55
- return null;
56
- const u = s ? /* @__PURE__ */ o(p, {
57
- className: r,
58
- hiding: a,
59
- onAnimationEnd: l,
60
- children: /* @__PURE__ */ o(I, {
61
- gamification: e
62
- })
63
- }) : t ? /* @__PURE__ */ o(p, {
64
- className: r,
65
- hiding: a,
66
- onAnimationEnd: l,
67
- children: /* @__PURE__ */ f(b, {
68
- children: [/* @__PURE__ */ o(k, {
69
- label: "Friend's Rank",
70
- close: e.closeUser
71
- }), /* @__PURE__ */ o(C, {
72
- children: /* @__PURE__ */ o(S, {
73
- ...t,
74
- successRate: v(t)
75
- })
76
- })]
77
- })
78
- }) : null;
79
- return /* @__PURE__ */ o(U, {
80
- container: n,
81
- useContainer: !d,
82
- children: u
83
- });
84
- };
85
- export {
86
- q as GamificationOverlay,
87
- E as GamificationOverlayStandalone
88
- };