@streamlayer/react-ui 0.100.5 → 1.1.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 (270) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +8 -0
  2. package/lib/app/app/Advertisement/index.js +38 -0
  3. package/lib/{ui → app}/app/Features/FeatureProvider.d.ts +2 -2
  4. package/lib/{ui → app}/app/Features/FeatureProvider.js +10 -10
  5. package/lib/{ui → app}/app/Features/Gamification/Friends.d.ts +0 -1
  6. package/lib/{ui → app}/app/Features/Gamification/Friends.js +2 -2
  7. package/lib/app/app/Features/Gamification/Leaderboard.d.ts +9 -0
  8. package/lib/app/app/Features/Gamification/Leaderboard.js +55 -0
  9. package/lib/{ui → 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/Features/Gamification/QuestionsList.d.ts +2 -2
  12. package/lib/app/app/Features/Gamification/QuestionsList.js +11 -0
  13. package/lib/app/app/Features/Gamification/Tabs.d.ts +14 -0
  14. package/lib/{ui → app}/app/Features/Gamification/Tabs.js +12 -12
  15. package/lib/{ui → app}/app/Features/Gamification/UserSummary.d.ts +2 -2
  16. package/lib/{ui → app}/app/Features/Gamification/UserSummary.js +1 -1
  17. package/lib/{ui → app}/app/Features/Gamification/gamification-feature.d.ts +1 -0
  18. package/lib/{ui → app}/app/Features/Gamification/index.d.ts +5 -5
  19. package/lib/app/app/Features/Gamification/index.js +88 -0
  20. package/lib/{ui → app}/app/Features/index.d.ts +5 -5
  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/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/app/app/Notifications/Onboarding/index.d.ts +14 -0
  27. package/lib/app/app/Notifications/Onboarding/index.js +168 -0
  28. package/lib/app/app/Notifications/index.d.ts +13 -0
  29. package/lib/{ui → app}/app/Notifications/index.js +24 -24
  30. package/lib/app/app/Notifications/styles.d.ts +9 -0
  31. package/lib/app/app/Notifications/styles.js +31 -0
  32. package/lib/app/app/Points/index.d.ts +5 -0
  33. package/lib/{ui → app}/app/Points/index.js +1 -1
  34. package/lib/app/app/index.d.ts +11 -0
  35. package/lib/app/app/index.js +101 -0
  36. package/lib/app/app/story/content.d.ts +3 -0
  37. package/lib/app/app/story/content.js +14 -0
  38. package/lib/app/app/story/index.d.ts +8 -0
  39. package/lib/app/app/story/index.js +96 -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/video.d.ts +8 -0
  43. package/lib/app/app/story/video.js +96 -0
  44. package/lib/app/app/useApp.d.ts +20 -0
  45. package/lib/app/app/useApp.js +48 -0
  46. package/lib/app/app/useAppContext.d.ts +8 -0
  47. package/lib/app/app/useAppContext.js +8 -0
  48. package/lib/app/index.d.ts +6 -0
  49. package/lib/app/login/demo.d.ts +5 -0
  50. package/lib/{ui → app}/login/index.d.ts +0 -1
  51. package/lib/{ui → app}/login/index.js +1 -1
  52. package/lib/app/login/styles.d.ts +7 -0
  53. package/lib/app/login/styles.js +39 -0
  54. package/lib/app/masters/Features/FeatureProvider.d.ts +11 -0
  55. package/lib/app/masters/Features/FeatureProvider.js +38 -0
  56. package/lib/app/masters/Features/Gamification/Friends.d.ts +3 -0
  57. package/lib/app/masters/Features/Gamification/Friends.js +19 -0
  58. package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +9 -0
  59. package/lib/{ui/app → app/masters}/Features/Gamification/Leaderboard.js +10 -10
  60. package/lib/app/masters/Features/Gamification/Question.d.ts +5 -0
  61. package/lib/{ui/app → app/masters}/Features/Gamification/Question.js +15 -15
  62. package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +6 -0
  63. package/lib/{ui/app → app/masters}/Features/Gamification/QuestionsList.js +1 -1
  64. package/lib/app/masters/Features/Gamification/Tabs.d.ts +14 -0
  65. package/lib/app/masters/Features/Gamification/Tabs.js +44 -0
  66. package/lib/app/masters/Features/Gamification/UserSummary.d.ts +5 -0
  67. package/lib/app/masters/Features/Gamification/UserSummary.js +18 -0
  68. package/lib/app/masters/Features/Gamification/gamification-feature.d.ts +3 -0
  69. package/lib/app/masters/Features/Gamification/gamification-feature.js +4 -0
  70. package/lib/app/masters/Features/Gamification/index.d.ts +23 -0
  71. package/lib/{ui/app → app/masters}/Features/Gamification/index.js +28 -28
  72. package/lib/app/masters/Features/index.d.ts +24 -0
  73. package/lib/app/masters/Features/index.js +37 -0
  74. package/lib/{ui/app → app/masters}/Navigation/MastersNavigation/index.d.ts +6 -6
  75. package/lib/{ui/app → app/masters}/Navigation/MastersNavigation/index.js +5 -5
  76. package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +8 -0
  77. package/lib/app/masters/Notifications/Onboarding/Notification/index.js +18 -0
  78. package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +9 -0
  79. package/lib/{ui/app → app/masters}/Notifications/Onboarding/Notification/styles.js +16 -16
  80. package/lib/app/masters/Notifications/Onboarding/index.d.ts +14 -0
  81. package/lib/{ui/app → app/masters}/Notifications/Onboarding/index.js +87 -90
  82. package/lib/app/masters/Notifications/index.d.ts +13 -0
  83. package/lib/app/masters/Notifications/index.js +164 -0
  84. package/lib/app/masters/Notifications/styles.d.ts +9 -0
  85. package/lib/{ui/app → app/masters}/Notifications/styles.js +11 -11
  86. package/lib/app/masters/Points/index.d.ts +5 -0
  87. package/lib/app/masters/Points/index.js +28 -0
  88. package/lib/app/masters/masters.d.ts +14 -0
  89. package/lib/{ui/app → app/masters}/masters.js +33 -31
  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/app/useClipboardCopy.d.ts +3 -0
  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 -4
  106. package/lib/index.js +4 -4
  107. package/lib/ui/advertisement/banner/index.d.ts +6 -0
  108. package/lib/ui/advertisement/banner/index.js +27 -0
  109. package/lib/ui/advertisement/index.d.ts +9 -0
  110. package/lib/ui/advertisement/index.js +31 -0
  111. package/lib/ui/advertisement/mock.d.ts +3 -0
  112. package/lib/ui/advertisement/mock.js +33 -0
  113. package/lib/ui/advertisement/overlay/index.d.ts +5 -0
  114. package/lib/ui/advertisement/overlay/index.js +21 -0
  115. package/lib/ui/advertisement/sidebar/index.d.ts +6 -0
  116. package/lib/ui/advertisement/sidebar/index.js +23 -0
  117. package/lib/ui/animated-counter/index.d.ts +1 -1
  118. package/lib/ui/button/index.d.ts +0 -1
  119. package/lib/ui/button/styles.d.ts +2 -3
  120. package/lib/ui/gamification/constants.d.ts +1 -0
  121. package/lib/ui/gamification/copyNotification/index.d.ts +0 -1
  122. package/lib/ui/gamification/copyNotification/styles.d.ts +3 -4
  123. package/lib/ui/gamification/detail/header/index.d.ts +1 -1
  124. package/lib/ui/gamification/detail/header/styles.d.ts +4 -5
  125. package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -1
  126. package/lib/ui/gamification/detail/sponsor/index.js +13 -7
  127. package/lib/ui/gamification/insight/index.d.ts +1 -1
  128. package/lib/ui/gamification/insight/styles.d.ts +8 -9
  129. package/lib/ui/gamification/insight-list/index.d.ts +1 -1
  130. package/lib/ui/gamification/insight-list/styles.d.ts +2 -3
  131. package/lib/ui/gamification/invite-link/index.d.ts +0 -1
  132. package/lib/ui/gamification/invite-link/index.js +13 -13
  133. package/lib/ui/gamification/invite-link/styles.d.ts +5 -6
  134. package/lib/ui/gamification/invite-link/styles.js +11 -11
  135. package/lib/ui/gamification/leaderboard/index.d.ts +1 -1
  136. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +2 -2
  137. package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -8
  138. package/lib/ui/gamification/leaderboard/static.d.ts +3 -3
  139. package/lib/ui/gamification/leaderboard/styles.d.ts +1 -2
  140. package/lib/ui/gamification/leaderboard/styles.js +1 -1
  141. package/lib/ui/gamification/onboarding/index.d.ts +3 -3
  142. package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +0 -1
  143. package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -6
  144. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -0
  145. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +10 -11
  146. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +1 -1
  147. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +6 -6
  148. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +9 -10
  149. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +1 -1
  150. package/lib/ui/gamification/onboarding/slides/onboarding-rules/styles.d.ts +8 -9
  151. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +0 -1
  152. package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +4 -5
  153. package/lib/ui/gamification/onboarding/styles.d.ts +5 -6
  154. package/lib/ui/gamification/points/index.d.ts +0 -1
  155. package/lib/ui/gamification/points/styles.d.ts +5 -6
  156. package/lib/ui/gamification/question/index.d.ts +2 -2
  157. package/lib/ui/gamification/question/index.js +26 -26
  158. package/lib/ui/gamification/question/insight/index.d.ts +1 -1
  159. package/lib/ui/gamification/question/insight/styles.d.ts +2 -3
  160. package/lib/ui/gamification/question/list/index.d.ts +2 -2
  161. package/lib/ui/gamification/question/list/styles.d.ts +1 -2
  162. package/lib/ui/gamification/question/notification/index.d.ts +2 -2
  163. package/lib/ui/gamification/question/notification/insight/index.d.ts +2 -2
  164. package/lib/ui/gamification/question/notification/insight/styles.d.ts +7 -8
  165. package/lib/ui/gamification/question/notification/pill/index.d.ts +0 -1
  166. package/lib/ui/gamification/question/notification/pill/styles.d.ts +3 -4
  167. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.d.ts +0 -1
  168. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/styles.d.ts +58 -31
  169. package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +3 -2
  170. package/lib/ui/gamification/question/notification/prediction-result/index.js +55 -54
  171. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +11 -10
  172. package/lib/ui/gamification/question/notification/styles.d.ts +6 -7
  173. package/lib/ui/gamification/question/notification/tweet/index.d.ts +3 -3
  174. package/lib/ui/gamification/question/notification/tweet/styles.d.ts +4 -5
  175. package/lib/ui/gamification/question/styles.d.ts +14 -14
  176. package/lib/ui/gamification/question/styles.js +48 -43
  177. package/lib/ui/gamification/question/twitter/index.d.ts +2 -2
  178. package/lib/ui/gamification/question/twitter/styles.d.ts +3 -4
  179. package/lib/ui/gamification/tabs/index.d.ts +0 -1
  180. package/lib/ui/gamification/tabs/styles.d.ts +4 -5
  181. package/lib/ui/gamification/user-statistics/components/rank/index.d.ts +0 -1
  182. package/lib/ui/gamification/user-statistics/components/rank/styles.d.ts +3 -4
  183. package/lib/ui/gamification/user-statistics/components/statistic/index.d.ts +0 -1
  184. package/lib/ui/gamification/user-statistics/components/statistic/styles.d.ts +3 -4
  185. package/lib/ui/gamification/user-statistics/index.d.ts +0 -1
  186. package/lib/ui/gamification/user-statistics/styles.d.ts +17 -18
  187. package/lib/ui/gamification/vote/alert/index.d.ts +2 -1
  188. package/lib/ui/gamification/vote/alert/styles.d.ts +3 -4
  189. package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
  190. package/lib/ui/gamification/vote/feedback/styles.d.ts +8 -9
  191. package/lib/ui/gamification/vote/index.d.ts +1 -1
  192. package/lib/ui/gamification/vote/insight-details/index.d.ts +1 -1
  193. package/lib/ui/gamification/vote/insight-details/styles.d.ts +2 -3
  194. package/lib/ui/gamification/vote/styles.d.ts +4 -5
  195. package/lib/ui/gamification/vote/styles.js +1 -1
  196. package/lib/ui/gamification/vote/twitter-details/index.d.ts +2 -2
  197. package/lib/ui/gamification/vote/twitter-details/styles.d.ts +2 -3
  198. package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -1
  199. package/lib/ui/gamification/vote/vote-option/styles.d.ts +19 -16
  200. package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -1
  201. package/lib/ui/gamification/vote/win-bar/styles.d.ts +6 -7
  202. package/lib/ui/icons/index.d.ts +1 -1
  203. package/lib/ui/icons/index.js +107 -47
  204. package/lib/ui/lottie/index.d.ts +0 -1
  205. package/lib/ui/modal/index.d.ts +0 -1
  206. package/lib/ui/modal/index.js +1 -1
  207. package/lib/ui/navigation/button/Channels.d.ts +1 -1
  208. package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
  209. package/lib/ui/navigation/button/LeaderBoard.d.ts +1 -1
  210. package/lib/ui/navigation/button/index.d.ts +1 -1
  211. package/lib/ui/navigation/button/styles.d.ts +6 -7
  212. package/lib/ui/navigation/index.d.ts +1 -1
  213. package/lib/ui/navigation/masters.d.ts +6 -5
  214. package/lib/ui/questions/insight/index.d.ts +1 -1
  215. package/lib/ui/questions/insight/styles.d.ts +6 -7
  216. package/lib/ui/questions/twitter/account/index.d.ts +0 -1
  217. package/lib/ui/questions/twitter/account/styles.d.ts +6 -7
  218. package/lib/ui/questions/twitter/index.d.ts +1 -1
  219. package/lib/ui/questions/twitter/styles.d.ts +14 -11
  220. package/lib/ui/show-in/index.d.ts +2 -1
  221. package/lib/ui/skeleton/index.d.ts +0 -1
  222. package/lib/ui/skeleton/styles.d.ts +1 -2
  223. package/lib/ui/slide-in/index.d.ts +11 -0
  224. package/lib/ui/slide-in/index.js +29 -0
  225. package/lib/ui/theme/MastersColors.d.ts +1 -0
  226. package/lib/ui/theme/MastersColors.js +15 -0
  227. package/lib/ui/theme/ThemeColors.js +1 -1
  228. package/lib/ui/theme/breakpoints.d.ts +1 -0
  229. package/lib/ui/theme/constants.d.ts +12 -59
  230. package/lib/ui/theme/constants.js +26 -55
  231. package/lib/ui/theme/index.d.ts +0 -1
  232. package/lib/ui/theme/masters-theme.d.ts +5 -0
  233. package/lib/ui/theme/masters-theme.js +64 -0
  234. package/lib/ui/theme/masters.d.ts +4 -0
  235. package/lib/ui/theme/masters.js +6 -0
  236. package/lib/ui/theme/theme.d.ts +1 -1
  237. package/lib/ui/theme/theme.js +2 -2
  238. package/lib/ui/timer/index.d.ts +3 -2
  239. package/lib/ui/timer/index.js +32 -32
  240. package/lib/ui/video-player/index.d.ts +0 -1
  241. package/lib/ui/video-player/styles.d.ts +5 -6
  242. package/lib/utils/debug/storage.js +1 -1
  243. package/lib/utils/storage.js +1 -1
  244. package/package.json +48 -38
  245. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +0 -9
  246. package/lib/ui/app/Features/Gamification/Tabs.d.ts +0 -14
  247. package/lib/ui/app/Navigation/index.d.ts +0 -9
  248. package/lib/ui/app/Navigation/index.js +0 -30
  249. package/lib/ui/app/Notifications/Onboarding/Notification/styles.d.ts +0 -10
  250. package/lib/ui/app/Notifications/Onboarding/index.d.ts +0 -14
  251. package/lib/ui/app/Notifications/index.d.ts +0 -13
  252. package/lib/ui/app/Notifications/styles.d.ts +0 -8
  253. package/lib/ui/app/Points/index.d.ts +0 -5
  254. package/lib/ui/app/masters.d.ts +0 -20
  255. package/lib/ui/app/styles.d.ts +0 -15
  256. package/lib/ui/app/useClipboardCopy.d.ts +0 -3
  257. package/lib/ui/app/useMastersApp.js +0 -68
  258. package/lib/ui/app/useMastersContext.d.ts +0 -8
  259. package/lib/ui/login/demo.d.ts +0 -6
  260. package/lib/ui/login/styles.d.ts +0 -8
  261. package/lib/ui/login/styles.js +0 -39
  262. /package/lib/{ui → app}/app/Features/Gamification/gamification-feature.js +0 -0
  263. /package/lib/{ui → app}/app/Features/index.js +0 -0
  264. /package/lib/{ui → app}/app/Notifications/Onboarding/Notification/index.js +0 -0
  265. /package/lib/{styles_z07sl8-l0sNRNKZ.js → app/index.js} +0 -0
  266. /package/lib/{ui → app}/login/demo.js +0 -0
  267. /package/lib/{ui/app → app/masters}/useMastersContext.js +0 -0
  268. /package/lib/{ui/app → app}/useImagesPreload.d.ts +0 -0
  269. /package/lib/{ui/app → app}/useImagesPreload.js +0 -0
  270. /package/lib/{ui/app → app}/useSdkFeature.js +0 -0
@@ -0,0 +1,14 @@
1
+ import { AppNodeRef } from '../../..';
2
+ import { ResponsiveStore } from '../../../useSdkResponsive';
3
+ import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
4
+ import { Notification } from '@streamlayer/sdk-web-notifications';
5
+
6
+ export declare const Onboarding: React.FC<{
7
+ sdk: StreamLayerSDK;
8
+ notification: Notification;
9
+ saveHeight: (height: number) => void;
10
+ appNode: AppNodeRef;
11
+ sdkInDesktopView?: boolean;
12
+ style?: React.CSSProperties;
13
+ responsiveStore: ResponsiveStore;
14
+ }>;
@@ -0,0 +1,168 @@
1
+ import { jsx as r, jsxs as x, Fragment as L } from "react/jsx-runtime";
2
+ import { styled as w } from "@linaria/react";
3
+ import { useStore as T } from "@nanostores/react";
4
+ import { useImagesPreload as B } from "../../../useImagesPreload.js";
5
+ import { scrollIntoAppView as O } from "../../../useSdkScroll.js";
6
+ import { useRef as E, useState as A, useMemo as _, useLayoutEffect as M, useEffect as P } from "react";
7
+ import { FeatureType as R } from "@streamlayer/sdk-web-types";
8
+ import { OnboardingUI as V } from "../../../../ui/gamification/onboarding/index.js";
9
+ import { ModalPortal as W } from "../../../../ui/modal/index.js";
10
+ import { ShowIn as $ } from "../../../../ui/show-in/index.js";
11
+ import { Onboarding as S } from "./Notification/index.js";
12
+ const C = [{
13
+ graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_0.png",
14
+ tagline: "",
15
+ headline: /* @__PURE__ */ x(L, {
16
+ children: ["Welcome to ", /* @__PURE__ */ r("br", {}), " StreamLayer +"]
17
+ })
18
+ }, {
19
+ graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_2.png",
20
+ headline: "Get real-time insights"
21
+ }, {
22
+ graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_3.png",
23
+ headline: "Predictions, trivia & polls synced to match play"
24
+ }, {
25
+ graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_4.png",
26
+ headline: "Win points for every answer you get right"
27
+ }, {
28
+ graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_5.png",
29
+ headline: "Compete against friends on the leaderboard"
30
+ }], j = /* @__PURE__ */ w("div")({
31
+ name: "OnboardingContainer",
32
+ class: "o1xni1kr",
33
+ propsAsIs: !1
34
+ }), G = () => $, q = /* @__PURE__ */ w(G())({
35
+ name: "OnboardingNotificationContainer",
36
+ class: "o1vnouv7",
37
+ propsAsIs: !0
38
+ }), k = /* @__PURE__ */ w("div")({
39
+ name: "InnerContainer",
40
+ class: "i59uefw",
41
+ propsAsIs: !1
42
+ }), z = ({
43
+ deepLink: l,
44
+ onboardingOpts: e,
45
+ notification: o,
46
+ gamification: p,
47
+ loading: i,
48
+ sdk: d
49
+ }) => {
50
+ var c, a, h, b, f, y, s;
51
+ const u = T(p.friends.getStore()), [g, t] = A(void 0), v = _(() => {
52
+ var m, I;
53
+ const n = d.getInviter();
54
+ return n ? (I = (m = u.data) == null ? void 0 : m.find(({
55
+ slId: F
56
+ }) => F === n)) == null ? void 0 : I.name : "";
57
+ }, [u.data, d]);
58
+ return P(() => {
59
+ const n = l.$store.subscribe((m) => {
60
+ m && t(m.data);
61
+ });
62
+ return () => {
63
+ n();
64
+ };
65
+ }, [l.$store]), /* @__PURE__ */ r(j, {
66
+ children: /* @__PURE__ */ r(V, {
67
+ loading: i,
68
+ rules: [{
69
+ label: "Answer as many questions as you like.",
70
+ icon: "icon-btn-feature-groups"
71
+ }, {
72
+ label: "Win points for each correct trivia or prediction answer.",
73
+ icon: "icon-thumb-up"
74
+ }, {
75
+ label: "Top the leader board and best your friends.",
76
+ icon: "icon-trophy"
77
+ }],
78
+ rulesBtnLabel: (c = e.rules) == null ? void 0 : c.buttonLabel,
79
+ rulesTitle: (a = e.rules) == null ? void 0 : a.heading,
80
+ termsTitle: "Terms and Conditions",
81
+ termsText: (h = e.rules) == null ? void 0 : h.terms,
82
+ steps: C,
83
+ primaryColor: (b = e.inviteCard) == null ? void 0 : b.iconColor,
84
+ inviteLink: g,
85
+ inviteCardTitle: (f = e.inviteCard) == null ? void 0 : f.heading,
86
+ inviteCardSubtext: (y = e.inviteCard) == null ? void 0 : y.subtext,
87
+ inviteCardBtnLabel: (s = e.inviteCard) == null ? void 0 : s.buttonLabel,
88
+ onClose: () => {
89
+ var n;
90
+ (n = o.close) == null || n.call(o);
91
+ },
92
+ gamification: p,
93
+ sdk: d,
94
+ inviterName: v
95
+ })
96
+ });
97
+ }, ne = ({
98
+ sdk: l,
99
+ notification: e,
100
+ saveHeight: o,
101
+ style: p,
102
+ appNode: i,
103
+ sdkInDesktopView: d,
104
+ responsiveStore: u
105
+ }) => {
106
+ const g = E(null), t = e.data.onboarding, [v, c] = A(t == null ? void 0 : t.instantOpen), a = l.getFeature(R.GAMES), h = _(() => C == null ? void 0 : C.map(({
107
+ graphicSrc: s
108
+ }) => s), []), {
109
+ screen: b
110
+ } = T(u, {
111
+ keys: ["screen"]
112
+ });
113
+ M(() => {
114
+ var s;
115
+ o(((s = g.current) == null ? void 0 : s.getBoundingClientRect().height) || 0);
116
+ }, [o]);
117
+ const {
118
+ loading: f,
119
+ throttled: y
120
+ } = B(h);
121
+ return v && a && t && i.current && !y ? /* @__PURE__ */ r(W, {
122
+ container: i,
123
+ useContainer: !d,
124
+ children: /* @__PURE__ */ r(z, {
125
+ notification: e,
126
+ setOpened: c,
127
+ gamification: a,
128
+ onboardingOpts: t,
129
+ deepLink: a.deepLink,
130
+ loading: f,
131
+ renderToNode: i,
132
+ sdk: l
133
+ })
134
+ }) : /* @__PURE__ */ x(L, {
135
+ children: [/* @__PURE__ */ r(k, {
136
+ ref: g,
137
+ style: {
138
+ position: "absolute",
139
+ visibility: "hidden"
140
+ },
141
+ children: /* @__PURE__ */ r(S, {
142
+ close: () => {
143
+ },
144
+ action: () => {
145
+ },
146
+ onboarding: t
147
+ })
148
+ }), /* @__PURE__ */ r(q, {
149
+ style: p,
150
+ hiding: e.hiding,
151
+ children: /* @__PURE__ */ r(k, {
152
+ children: /* @__PURE__ */ r(S, {
153
+ close: e.close,
154
+ action: () => {
155
+ var n;
156
+ c(!0), (((n = i.current) == null ? void 0 : n.getBoundingClientRect().y) || 0) < 0 && O(i, b.size, {
157
+ behavior: "smooth"
158
+ });
159
+ },
160
+ onboarding: t
161
+ })
162
+ })
163
+ })]
164
+ });
165
+ };
166
+ export {
167
+ ne as Onboarding
168
+ };
@@ -0,0 +1,13 @@
1
+ import { AppNodeRef, ScrollNodeRef, HeaderNodeRef } from '../..';
2
+ import { ResponsiveStore } from '../../useSdkResponsive';
3
+ import { ScrollStore } from '../../useSdkScroll';
4
+ import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
5
+
6
+ export declare const SDKNotifications: React.FC<{
7
+ sdk: StreamLayerSDK;
8
+ scrollNode: ScrollNodeRef;
9
+ appNode: AppNodeRef;
10
+ headerNode: HeaderNodeRef;
11
+ scrollStore: ScrollStore;
12
+ responsiveStore: ResponsiveStore;
13
+ }>;
@@ -1,19 +1,19 @@
1
- import { jsxs as f, Fragment as D, jsx as c } from "react/jsx-runtime";
1
+ import { jsxs as a, Fragment as D, jsx as c } from "react/jsx-runtime";
2
2
  import { cx as N } from "@linaria/core";
3
3
  import { useStore as g } from "@nanostores/react";
4
- import { useState as p, useMemo as T, useEffect as h, useRef as E, useCallback as w } from "react";
5
- import { r as O } from "../../../index-Bicco-Aq.js";
6
- import { eventBus as b } from "@streamlayer/sdk-web-interfaces";
7
- import { NotificationType as a } from "@streamlayer/sdk-web-notifications";
8
- import { useMastersContext as q } from "../useMastersContext.js";
9
- import { scrollIntoAppView as C } from "../useSdkScroll.js";
10
- import { QuestionTypeData as R } from "../../gamification/constants.js";
11
- import { Notification as V } from "../../gamification/question/notification/index.js";
12
- import { PredictionResult as P } from "../../gamification/question/notification/prediction-result/index.js";
4
+ import { useAppContext as T } from "../useAppContext.js";
5
+ import { scrollIntoAppView as E } from "../../useSdkScroll.js";
6
+ import { useState as p, useMemo as O, useEffect as h, useRef as b, useCallback as w } from "react";
7
+ import { r as q } from "../../../index-B1QdimmR.js";
8
+ import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
9
+ import { NotificationType as f } from "@streamlayer/sdk-web-notifications";
10
+ import { QuestionTypeData as R } from "../../../ui/gamification/constants.js";
11
+ import { Notification as V } from "../../../ui/gamification/question/notification/index.js";
12
+ import { PredictionResult as P } from "../../../ui/gamification/question/notification/prediction-result/index.js";
13
13
  import { Onboarding as x } from "./Onboarding/index.js";
14
14
  import { HiddenContainer as A, Container as B, InnerContainer as H, NotificationRefreshing as Q, Pill as U } from "./styles.js";
15
15
  const j = (o) => {
16
- const [t, u] = p(0), i = E(null), d = w((r) => {
16
+ const [t, u] = p(0), i = b(null), d = w((r) => {
17
17
  i.current = r;
18
18
  }, []);
19
19
  h(() => {
@@ -38,14 +38,14 @@ const j = (o) => {
38
38
  keys: ["sdkInDesktopView"]
39
39
  }), {
40
40
  sdk: n
41
- } = q(), [r, l, m] = j(t.id);
42
- return t.type === a.QUESTION ? /* @__PURE__ */ f(D, {
41
+ } = T(), [r, l, m] = j(t.id);
42
+ return t.type === f.QUESTION ? /* @__PURE__ */ a(D, {
43
43
  children: [/* @__PURE__ */ c(A, {
44
44
  ref: r,
45
45
  children: /* @__PURE__ */ c(V, {
46
46
  ...t
47
47
  })
48
- }), /* @__PURE__ */ f(B, {
48
+ }), /* @__PURE__ */ a(B, {
49
49
  style: {
50
50
  height: t.hiding ? 0 : l
51
51
  },
@@ -60,7 +60,7 @@ const j = (o) => {
60
60
  })
61
61
  }), /* @__PURE__ */ c(Q, {}, t.id)]
62
62
  })]
63
- }) : t.type === a.QUESTION_RESOLVED && ((e = (s = t.data) == null ? void 0 : s.question) != null && e.predictionResult) ? /* @__PURE__ */ c(P, {
63
+ }) : t.type === f.QUESTION_RESOLVED && ((e = (s = t.data) == null ? void 0 : s.question) != null && e.predictionResult) ? /* @__PURE__ */ c(P, {
64
64
  style: {
65
65
  height: t.hiding ? 0 : l
66
66
  },
@@ -68,7 +68,7 @@ const j = (o) => {
68
68
  close: t.close,
69
69
  hiding: t.hiding,
70
70
  ...t.data.question
71
- }) : t.type === a.ONBOARDING ? /* @__PURE__ */ c(x, {
71
+ }) : t.type === f.ONBOARDING ? /* @__PURE__ */ c(x, {
72
72
  style: {
73
73
  height: t.hiding ? 0 : l
74
74
  },
@@ -79,7 +79,7 @@ const j = (o) => {
79
79
  appNode: u,
80
80
  responsiveStore: i
81
81
  }) : null;
82
- }, F = "p1d7yse1", L = ({
82
+ }, F = "p7vfi6t", L = ({
83
83
  pill: o,
84
84
  setPill: t,
85
85
  appNode: u,
@@ -88,7 +88,7 @@ const j = (o) => {
88
88
  responsiveStore: n,
89
89
  scrollStore: r
90
90
  }) => {
91
- var y, k;
91
+ var k, y;
92
92
  const {
93
93
  screen: l
94
94
  } = g(n, {
@@ -103,14 +103,14 @@ const j = (o) => {
103
103
  n.get().sdkInDesktopView ? s < 50 && t(null) : s > -50 && t(null);
104
104
  }, [s, n, t]);
105
105
  const e = n.get().sdkInDesktopView ? u : i;
106
- return !o || !e.current ? null : O.createPortal(/* @__PURE__ */ c(U, {
107
- title: o.type === a.QUESTION_RESOLVED ? "Prediction result" : `New ${((k = R[(y = o.data) == null ? void 0 : y.questionType]) == null ? void 0 : k.label) || "notification"}`,
106
+ return !o || !e.current ? null : q.createPortal(/* @__PURE__ */ c(U, {
107
+ title: o.type === f.QUESTION_RESOLVED ? "Prediction result" : `New ${((y = R[(k = o.data) == null ? void 0 : k.questionType]) == null ? void 0 : y.label) || "notification"}`,
108
108
  onClick: () => {
109
109
  var I;
110
110
  n.get().sdkInDesktopView ? (I = d.current) == null || I.scrollTo({
111
111
  top: 0,
112
112
  behavior: "smooth"
113
- }) : C(u, l.size, {
113
+ }) : E(u, l.size, {
114
114
  behavior: "smooth"
115
115
  }), t(null);
116
116
  },
@@ -124,9 +124,9 @@ const j = (o) => {
124
124
  appNode: d,
125
125
  scrollStore: n
126
126
  }) => {
127
- const [r] = p(o.getNotificationsStore()), l = g(r), [m, s] = p(null), e = T(() => o.getActiveNotification(), [o, l]);
127
+ const [r] = p(o.getNotificationsStore()), l = g(r), [m, s] = p(null), e = O(() => o.getActiveNotification(), [o, l]);
128
128
  return h(() => {
129
- e && b.emit("notification", {
129
+ e && C.emit("notification", {
130
130
  action: "rendered",
131
131
  payload: {
132
132
  questionId: e.data.questionId,
@@ -139,7 +139,7 @@ const j = (o) => {
139
139
  }));
140
140
  }, [e]), h(() => {
141
141
  e || s(null);
142
- }, [e]), /* @__PURE__ */ f(D, {
142
+ }, [e]), /* @__PURE__ */ a(D, {
143
143
  children: [!m && e && /* @__PURE__ */ c(z, {
144
144
  headerNode: t,
145
145
  appNode: d,
@@ -0,0 +1,9 @@
1
+ export declare const Container: any;
2
+ export declare const InnerContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const HiddenContainer: {
4
+ __wyw_meta: unknown;
5
+ } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
6
+ as?: import('react').ElementType;
7
+ }>;
8
+ export declare const NotificationRefreshing: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
9
+ export declare const Pill: any;
@@ -0,0 +1,31 @@
1
+ import { styled as s } from "@linaria/react";
2
+ import { Pill as n } from "../../../ui/gamification/question/notification/pill/index.js";
3
+ import { ShowIn as o } from "../../../ui/show-in/index.js";
4
+ const e = () => o, c = /* @__PURE__ */ s(e())({
5
+ name: "Container",
6
+ class: "c8ol1ve",
7
+ propsAsIs: !0
8
+ }), t = /* @__PURE__ */ s("div")({
9
+ name: "InnerContainer",
10
+ class: "iqfywam",
11
+ propsAsIs: !1
12
+ }), i = () => t, m = /* @__PURE__ */ s(i())({
13
+ name: "HiddenContainer",
14
+ class: "hokmtod",
15
+ propsAsIs: !0
16
+ }), f = /* @__PURE__ */ s("div")({
17
+ name: "NotificationRefreshing",
18
+ class: "n192d1q8",
19
+ propsAsIs: !1
20
+ }), r = () => n, d = /* @__PURE__ */ s(r())({
21
+ name: "Pill",
22
+ class: "p1lha68t",
23
+ propsAsIs: !0
24
+ });
25
+ export {
26
+ c as Container,
27
+ m as HiddenContainer,
28
+ t as InnerContainer,
29
+ f as NotificationRefreshing,
30
+ d as Pill
31
+ };
@@ -0,0 +1,5 @@
1
+ import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
+
3
+ export declare const StreamLayerSDKPoints: React.FC<{
4
+ sdk: StreamLayerSDK;
5
+ }>;
@@ -3,7 +3,7 @@ import { useStore as i } from "@nanostores/react";
3
3
  import { useState as c, useEffect as f } from "react";
4
4
  import { FeatureStatus as p } from "@streamlayer/sdk-web-interfaces";
5
5
  import { FeatureType as S } from "@streamlayer/sdk-web-types";
6
- import { Points as l } from "../../gamification/points/index.js";
6
+ import { Points as l } from "../../../ui/gamification/points/index.js";
7
7
  const a = ({ gamification: e }) => {
8
8
  const s = e.userSummary.$store, [r, u] = c(0);
9
9
  return f(() => {
@@ -0,0 +1,11 @@
1
+ import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
+
3
+ export type AppAppChildrenProps = {
4
+ activateEventWithId: (event: string) => void;
5
+ deactivate: () => void;
6
+ };
7
+ export type AppAppProps = {
8
+ sdk: StreamLayerSDK;
9
+ event?: string;
10
+ };
11
+ export declare const App: React.FC<AppAppProps>;
@@ -0,0 +1,101 @@
1
+ import { jsx as i, jsxs as d } from "react/jsx-runtime";
2
+ import { useStore as h } from "@nanostores/react";
3
+ import { SDKContainer as A, SDKScrollContainer as C } from "../styles.js";
4
+ import { useSdkFeature as L } from "../useSdkFeature.js";
5
+ import { useSdkResponsive as x } from "../useSdkResponsive.js";
6
+ import { useSdkScroll as D } from "../useSdkScroll.js";
7
+ import { useAnalyticsListener as m, newTabLinkListener as F, appScrollListener as b, appClickListener as y } from "../../hooks/analytics.js";
8
+ import { useRef as S, useEffect as v, useMemo as E } from "react";
9
+ import { resetCss as u } from "../../ui/theme/theme.js";
10
+ import { ActiveFeature as K, StandaloneFeature as j } from "./Features/index.js";
11
+ import { SDKNavigation as R } from "./Navigation/index.js";
12
+ import { SDKNotifications as w } from "./Notifications/index.js";
13
+ import { useAppApp as I } from "./useApp.js";
14
+ import { AppContext as M } from "./useAppContext.js";
15
+ const P = ({ sdk: e, className: n, scrollStore: t, appNode: a, scrollNode: o, responsiveStore: r }) => {
16
+ const [, s] = L(e);
17
+ return /* @__PURE__ */ i(
18
+ K,
19
+ {
20
+ className: n,
21
+ scrollNode: o,
22
+ appNode: a,
23
+ scrollStore: t,
24
+ feature: s,
25
+ responsiveStore: r,
26
+ sdk: e
27
+ }
28
+ );
29
+ }, V = ({ sdk: e, className: n, appNode: t, responsiveStore: a }) => {
30
+ const o = h(e.featuresList.getStore());
31
+ return o ? Array.from(o, (r) => {
32
+ const s = e.getFeature(r);
33
+ return s ? /* @__PURE__ */ i(
34
+ j,
35
+ {
36
+ className: n,
37
+ appNode: t,
38
+ feature: s,
39
+ responsiveStore: a,
40
+ sdk: e
41
+ },
42
+ r
43
+ ) : null;
44
+ }) : null;
45
+ }, Z = ({ sdk: e, event: n }) => {
46
+ const t = S(null), a = S(null), [o] = x(t), [r, s] = D(t, o), { sdkEnabled: l, sdkReady: c, activateEventWithId: p, deactivate: f, isLogged: N } = I(e);
47
+ v(() => {
48
+ n ? (e.createEventSession(n), p(n)) : f();
49
+ }, [n, p, f, e]), m(t, { enabled: l, event: "click", listener: F }), m(r, {
50
+ enabled: l,
51
+ event: "scrollend",
52
+ listener: b,
53
+ useDomNode: !0
54
+ }), m(r, {
55
+ enabled: l,
56
+ event: "click",
57
+ listener: y,
58
+ useDomNode: !0
59
+ });
60
+ const g = E(() => ({ sdk: e }), [e]);
61
+ return v(() => {
62
+ import("./Features/Gamification/gamification-feature.js");
63
+ }, []), /* @__PURE__ */ i(M.Provider, { value: g, children: /* @__PURE__ */ d(A, { ref: t, children: [
64
+ l && /* @__PURE__ */ i(R, { className: u, sdk: e, ref: a }),
65
+ /* @__PURE__ */ d(C, { className: "sl-hide-on-modal", ref: r, "data-nav": l.toString(), children: [
66
+ c && /* @__PURE__ */ i(
67
+ w,
68
+ {
69
+ sdk: e,
70
+ scrollNode: r,
71
+ headerNode: a,
72
+ appNode: t,
73
+ scrollStore: s,
74
+ responsiveStore: o
75
+ }
76
+ ),
77
+ c && /* @__PURE__ */ i(
78
+ P,
79
+ {
80
+ scrollStore: s,
81
+ responsiveStore: o,
82
+ scrollNode: r,
83
+ appNode: t,
84
+ className: u,
85
+ sdk: e
86
+ }
87
+ ),
88
+ c && /* @__PURE__ */ i(V, { responsiveStore: o, appNode: t, className: u, sdk: e })
89
+ ] }),
90
+ l && !N && /* @__PURE__ */ i(
91
+ "div",
92
+ {
93
+ style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" },
94
+ children: "You are not logged in."
95
+ }
96
+ )
97
+ ] }) });
98
+ };
99
+ export {
100
+ Z as App
101
+ };
@@ -0,0 +1,3 @@
1
+ export declare const Content: React.FC<{
2
+ event?: string;
3
+ }>;
@@ -0,0 +1,14 @@
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import { useStreamLayer as o } from "@streamlayer/react";
3
+ import { StreamLayerSDKAdvertisement as i } from "../Advertisement/index.js";
4
+ const c = ({ event: e }) => {
5
+ const t = o();
6
+ return t ? /* @__PURE__ */ n("div", { children: [
7
+ /* @__PURE__ */ r("div", { children: "content 1" }),
8
+ /* @__PURE__ */ r(i, { event: e, sdk: t }),
9
+ /* @__PURE__ */ r("div", { children: "content 2" })
10
+ ] }) : null;
11
+ };
12
+ export {
13
+ c as Content
14
+ };
@@ -0,0 +1,8 @@
1
+ export declare const AppStory: React.FC<{
2
+ hideSdk?: boolean;
3
+ hideLogin?: boolean;
4
+ hidePoints?: boolean;
5
+ settings?: boolean;
6
+ sidebar: 'left' | 'right';
7
+ banner: 'top' | 'bottom';
8
+ }>;
@@ -0,0 +1,96 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { styled as i } from "@linaria/react";
3
+ import { useRef as h, useEffect as k } from "react";
4
+ import { StreamLayerProvider as c, useStreamLayer as A } from "@streamlayer/react";
5
+ import { App as S } from "../index.js";
6
+ import { StreamLayerThemeProvider as b } from "../../../ui/theme/index.js";
7
+ import { useStreamLayerDebug as C, StreamLayerDebug as g } from "../../../utils/debug/index.js";
8
+ import { Content as L } from "./content.js";
9
+ import { AppLogin as F } from "./login.js";
10
+ import { Video as P } from "./video.js";
11
+ const l = () => {
12
+ console.log("deep link handled cb");
13
+ }, d = () => {
14
+ console.log("video player handled cb");
15
+ }, q = ({
16
+ event: t
17
+ }) => {
18
+ const o = A();
19
+ return k(() => {
20
+ o && o.openFeature(12);
21
+ }, [o]), o ? /* @__PURE__ */ e(b, {
22
+ children: /* @__PURE__ */ e(S, {
23
+ sdk: o,
24
+ event: t,
25
+ onDeepLinkHandled: l
26
+ })
27
+ }) : null;
28
+ }, x = /* @__PURE__ */ i("div")({
29
+ name: "Container",
30
+ class: "c1a4qh28",
31
+ propsAsIs: !1
32
+ }), K = /* @__PURE__ */ i("div")({
33
+ name: "Body",
34
+ class: "b9h8kuk",
35
+ propsAsIs: !1
36
+ }), R = /* @__PURE__ */ i("div")({
37
+ name: "AppContainer",
38
+ class: "a1wkro2j",
39
+ propsAsIs: !1
40
+ }), T = ({
41
+ settings: t,
42
+ hideSdk: o,
43
+ hideLogin: u,
44
+ hidePoints: p,
45
+ sidebar: m,
46
+ banner: f
47
+ }) => {
48
+ const r = C(), a = h();
49
+ if (t)
50
+ return /* @__PURE__ */ s(c, {
51
+ sdkKey: r.sdkKey,
52
+ production: r.env === "production",
53
+ autoEnable: !1,
54
+ onDeepLinkHandled: l,
55
+ videoPlayerController: d,
56
+ children: [/* @__PURE__ */ e(F, {}), /* @__PURE__ */ e(g, {
57
+ ...r,
58
+ standalone: !0,
59
+ hideAuth: !0
60
+ })]
61
+ });
62
+ const v = () => {
63
+ const n = a.current, y = n.requestFullscreen || n.webkitRequestFullScreen || n.mozRequestFullScreen || n.msRequestFullscreen;
64
+ document.fullscreenElement ? document.exitFullscreen() : y.call(n);
65
+ };
66
+ return /* @__PURE__ */ s(c, {
67
+ sdkKey: r.sdkKey,
68
+ production: r.env === "production",
69
+ autoEnable: !0,
70
+ onDeepLinkHandled: l,
71
+ videoPlayerController: d,
72
+ children: [/* @__PURE__ */ s(K, {
73
+ ref: a,
74
+ children: [/* @__PURE__ */ e(P, {
75
+ event: r.event,
76
+ hideLogin: u,
77
+ toggleFullscreen: v,
78
+ banner: f,
79
+ sidebar: m,
80
+ hidePoints: p
81
+ }), !o && /* @__PURE__ */ e(x, {
82
+ children: /* @__PURE__ */ e(R, {
83
+ className: "StreamLayerSDK",
84
+ children: /* @__PURE__ */ e(q, {
85
+ event: r.event
86
+ })
87
+ })
88
+ })]
89
+ }), /* @__PURE__ */ e(L, {
90
+ event: r.event
91
+ })]
92
+ });
93
+ };
94
+ export {
95
+ T as AppStory
96
+ };
@@ -0,0 +1 @@
1
+ export declare const AppLogin: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { useState as h, useEffect as u } from "react";
3
+ import { useStreamLayer as i } from "@streamlayer/react";
4
+ import { storage as s } from "@streamlayer/sdk-web-core";
5
+ const d = ({ token: o, schema: n }) => {
6
+ const t = i();
7
+ return u(() => {
8
+ o && n && t && t.authorizationBypass(n, o);
9
+ }, [o, n, t]), null;
10
+ }, x = () => {
11
+ const [o, n] = h({ token: s.getExternalToken(), schema: s.getSchema() }), t = i();
12
+ return /* @__PURE__ */ r("div", { children: [
13
+ /* @__PURE__ */ r("form", { className: "auth-form", onSubmit: (a) => {
14
+ a.preventDefault();
15
+ const c = new FormData(a.currentTarget), m = c.get("token"), l = c.get("schema");
16
+ n({ token: m, schema: l });
17
+ }, children: [
18
+ /* @__PURE__ */ r("div", { children: [
19
+ /* @__PURE__ */ e("label", { htmlFor: "token", children: "token" }),
20
+ /* @__PURE__ */ e("input", { type: "text", id: "token", name: "token", placeholder: s.getExternalToken() })
21
+ ] }),
22
+ /* @__PURE__ */ r("div", { children: [
23
+ /* @__PURE__ */ e("label", { htmlFor: "schema", children: "schema" }),
24
+ /* @__PURE__ */ e("input", { type: "text", id: "schema", name: "schema", placeholder: s.getSchema() })
25
+ ] }),
26
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("button", { type: "submit", children: "submit" }) })
27
+ ] }),
28
+ /* @__PURE__ */ e(d, { token: o.token, schema: o.schema }),
29
+ /* @__PURE__ */ e("button", { onClick: () => t == null ? void 0 : t.logout(), children: "logout" })
30
+ ] });
31
+ };
32
+ export {
33
+ x as AppLogin
34
+ };
@@ -0,0 +1,8 @@
1
+ export declare const VideoPlayer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLVideoElement> & import('react').VideoHTMLAttributes<HTMLVideoElement> & Record<never, unknown>>;
2
+ export declare const Video: React.FC<{
3
+ sidebar: 'left' | 'right';
4
+ banner: 'top' | 'bottom';
5
+ hidePoints?: boolean;
6
+ hideLogin?: boolean;
7
+ event?: string;
8
+ }>;