@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.
- package/lib/app/app/Advertisement/index.d.ts +8 -0
- package/lib/app/app/Advertisement/index.js +38 -0
- package/lib/{ui → app}/app/Features/FeatureProvider.d.ts +2 -2
- package/lib/{ui → app}/app/Features/FeatureProvider.js +10 -10
- package/lib/{ui → app}/app/Features/Gamification/Friends.d.ts +0 -1
- package/lib/{ui → app}/app/Features/Gamification/Friends.js +2 -2
- package/lib/app/app/Features/Gamification/Leaderboard.d.ts +9 -0
- package/lib/app/app/Features/Gamification/Leaderboard.js +55 -0
- package/lib/{ui → app}/app/Features/Gamification/Question.d.ts +1 -1
- package/lib/app/app/Features/Gamification/Question.js +69 -0
- package/lib/{ui → app}/app/Features/Gamification/QuestionsList.d.ts +2 -2
- package/lib/app/app/Features/Gamification/QuestionsList.js +11 -0
- package/lib/app/app/Features/Gamification/Tabs.d.ts +14 -0
- package/lib/{ui → app}/app/Features/Gamification/Tabs.js +12 -12
- package/lib/{ui → app}/app/Features/Gamification/UserSummary.d.ts +2 -2
- package/lib/{ui → app}/app/Features/Gamification/UserSummary.js +1 -1
- package/lib/{ui → app}/app/Features/Gamification/gamification-feature.d.ts +1 -0
- package/lib/{ui → app}/app/Features/Gamification/index.d.ts +5 -5
- package/lib/app/app/Features/Gamification/index.js +88 -0
- package/lib/{ui → app}/app/Features/index.d.ts +5 -5
- package/lib/app/app/Navigation/index.d.ts +6 -0
- package/lib/app/app/Navigation/index.js +64 -0
- package/lib/{ui → app}/app/Notifications/Onboarding/Notification/index.d.ts +2 -2
- package/lib/app/app/Notifications/Onboarding/Notification/styles.d.ts +9 -0
- package/lib/app/app/Notifications/Onboarding/Notification/styles.js +50 -0
- package/lib/app/app/Notifications/Onboarding/index.d.ts +14 -0
- package/lib/app/app/Notifications/Onboarding/index.js +168 -0
- package/lib/app/app/Notifications/index.d.ts +13 -0
- package/lib/{ui → app}/app/Notifications/index.js +24 -24
- package/lib/app/app/Notifications/styles.d.ts +9 -0
- package/lib/app/app/Notifications/styles.js +31 -0
- package/lib/app/app/Points/index.d.ts +5 -0
- package/lib/{ui → app}/app/Points/index.js +1 -1
- package/lib/app/app/index.d.ts +11 -0
- package/lib/app/app/index.js +101 -0
- package/lib/app/app/story/content.d.ts +3 -0
- package/lib/app/app/story/content.js +14 -0
- package/lib/app/app/story/index.d.ts +8 -0
- package/lib/app/app/story/index.js +96 -0
- package/lib/app/app/story/login.d.ts +1 -0
- package/lib/app/app/story/login.js +34 -0
- package/lib/app/app/story/video.d.ts +8 -0
- package/lib/app/app/story/video.js +96 -0
- package/lib/app/app/useApp.d.ts +20 -0
- package/lib/app/app/useApp.js +48 -0
- package/lib/app/app/useAppContext.d.ts +8 -0
- package/lib/app/app/useAppContext.js +8 -0
- package/lib/app/index.d.ts +6 -0
- package/lib/app/login/demo.d.ts +5 -0
- package/lib/{ui → app}/login/index.d.ts +0 -1
- package/lib/{ui → app}/login/index.js +1 -1
- package/lib/app/login/styles.d.ts +7 -0
- package/lib/app/login/styles.js +39 -0
- package/lib/app/masters/Features/FeatureProvider.d.ts +11 -0
- package/lib/app/masters/Features/FeatureProvider.js +38 -0
- package/lib/app/masters/Features/Gamification/Friends.d.ts +3 -0
- package/lib/app/masters/Features/Gamification/Friends.js +19 -0
- package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +9 -0
- package/lib/{ui/app → app/masters}/Features/Gamification/Leaderboard.js +10 -10
- package/lib/app/masters/Features/Gamification/Question.d.ts +5 -0
- package/lib/{ui/app → app/masters}/Features/Gamification/Question.js +15 -15
- package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +6 -0
- package/lib/{ui/app → app/masters}/Features/Gamification/QuestionsList.js +1 -1
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +14 -0
- package/lib/app/masters/Features/Gamification/Tabs.js +44 -0
- package/lib/app/masters/Features/Gamification/UserSummary.d.ts +5 -0
- package/lib/app/masters/Features/Gamification/UserSummary.js +18 -0
- package/lib/app/masters/Features/Gamification/gamification-feature.d.ts +3 -0
- package/lib/app/masters/Features/Gamification/gamification-feature.js +4 -0
- package/lib/app/masters/Features/Gamification/index.d.ts +23 -0
- package/lib/{ui/app → app/masters}/Features/Gamification/index.js +28 -28
- package/lib/app/masters/Features/index.d.ts +24 -0
- package/lib/app/masters/Features/index.js +37 -0
- package/lib/{ui/app → app/masters}/Navigation/MastersNavigation/index.d.ts +6 -6
- package/lib/{ui/app → app/masters}/Navigation/MastersNavigation/index.js +5 -5
- package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +8 -0
- package/lib/app/masters/Notifications/Onboarding/Notification/index.js +18 -0
- package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +9 -0
- package/lib/{ui/app → app/masters}/Notifications/Onboarding/Notification/styles.js +16 -16
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +14 -0
- package/lib/{ui/app → app/masters}/Notifications/Onboarding/index.js +87 -90
- package/lib/app/masters/Notifications/index.d.ts +13 -0
- package/lib/app/masters/Notifications/index.js +164 -0
- package/lib/app/masters/Notifications/styles.d.ts +9 -0
- package/lib/{ui/app → app/masters}/Notifications/styles.js +11 -11
- package/lib/app/masters/Points/index.d.ts +5 -0
- package/lib/app/masters/Points/index.js +28 -0
- package/lib/app/masters/masters.d.ts +14 -0
- package/lib/{ui/app → app/masters}/masters.js +33 -31
- package/lib/{ui/app → app/masters}/useMastersApp.d.ts +2 -1
- package/lib/app/masters/useMastersApp.js +71 -0
- package/lib/app/masters/useMastersContext.d.ts +8 -0
- package/lib/app/styles.d.ts +20 -0
- package/lib/{ui/app → app}/styles.js +13 -13
- package/lib/app/useClipboardCopy.d.ts +3 -0
- package/lib/{ui/app → app}/useClipboardCopy.js +2 -2
- package/lib/{ui/app → app}/useSdkFeature.d.ts +2 -1
- package/lib/{ui/app → app}/useSdkResponsive.d.ts +3 -1
- package/lib/{ui/app → app}/useSdkResponsive.js +2 -2
- package/lib/{ui/app → app}/useSdkScroll.d.ts +3 -2
- package/lib/{ui/app → app}/useSdkScroll.js +2 -2
- package/lib/assets/style.css +1 -1
- package/lib/hooks/showIn.js +1 -1
- package/lib/{index-Bicco-Aq.js → index-B1QdimmR.js} +7737 -8219
- package/lib/index.d.ts +1 -4
- package/lib/index.js +4 -4
- package/lib/ui/advertisement/banner/index.d.ts +6 -0
- package/lib/ui/advertisement/banner/index.js +27 -0
- package/lib/ui/advertisement/index.d.ts +9 -0
- package/lib/ui/advertisement/index.js +31 -0
- package/lib/ui/advertisement/mock.d.ts +3 -0
- package/lib/ui/advertisement/mock.js +33 -0
- package/lib/ui/advertisement/overlay/index.d.ts +5 -0
- package/lib/ui/advertisement/overlay/index.js +21 -0
- package/lib/ui/advertisement/sidebar/index.d.ts +6 -0
- package/lib/ui/advertisement/sidebar/index.js +23 -0
- package/lib/ui/animated-counter/index.d.ts +1 -1
- package/lib/ui/button/index.d.ts +0 -1
- package/lib/ui/button/styles.d.ts +2 -3
- package/lib/ui/gamification/constants.d.ts +1 -0
- package/lib/ui/gamification/copyNotification/index.d.ts +0 -1
- package/lib/ui/gamification/copyNotification/styles.d.ts +3 -4
- package/lib/ui/gamification/detail/header/index.d.ts +1 -1
- package/lib/ui/gamification/detail/header/styles.d.ts +4 -5
- package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -1
- package/lib/ui/gamification/detail/sponsor/index.js +13 -7
- package/lib/ui/gamification/insight/index.d.ts +1 -1
- package/lib/ui/gamification/insight/styles.d.ts +8 -9
- package/lib/ui/gamification/insight-list/index.d.ts +1 -1
- package/lib/ui/gamification/insight-list/styles.d.ts +2 -3
- package/lib/ui/gamification/invite-link/index.d.ts +0 -1
- package/lib/ui/gamification/invite-link/index.js +13 -13
- package/lib/ui/gamification/invite-link/styles.d.ts +5 -6
- package/lib/ui/gamification/invite-link/styles.js +11 -11
- package/lib/ui/gamification/leaderboard/index.d.ts +1 -1
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +2 -2
- package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -8
- package/lib/ui/gamification/leaderboard/static.d.ts +3 -3
- package/lib/ui/gamification/leaderboard/styles.d.ts +1 -2
- package/lib/ui/gamification/leaderboard/styles.js +1 -1
- package/lib/ui/gamification/onboarding/index.d.ts +3 -3
- package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +0 -1
- package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -6
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +10 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +6 -6
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +9 -10
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/styles.d.ts +8 -9
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +0 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +4 -5
- package/lib/ui/gamification/onboarding/styles.d.ts +5 -6
- package/lib/ui/gamification/points/index.d.ts +0 -1
- package/lib/ui/gamification/points/styles.d.ts +5 -6
- package/lib/ui/gamification/question/index.d.ts +2 -2
- package/lib/ui/gamification/question/index.js +26 -26
- package/lib/ui/gamification/question/insight/index.d.ts +1 -1
- package/lib/ui/gamification/question/insight/styles.d.ts +2 -3
- package/lib/ui/gamification/question/list/index.d.ts +2 -2
- package/lib/ui/gamification/question/list/styles.d.ts +1 -2
- package/lib/ui/gamification/question/notification/index.d.ts +2 -2
- package/lib/ui/gamification/question/notification/insight/index.d.ts +2 -2
- package/lib/ui/gamification/question/notification/insight/styles.d.ts +7 -8
- package/lib/ui/gamification/question/notification/pill/index.d.ts +0 -1
- package/lib/ui/gamification/question/notification/pill/styles.d.ts +3 -4
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.d.ts +0 -1
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/styles.d.ts +58 -31
- package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +3 -2
- package/lib/ui/gamification/question/notification/prediction-result/index.js +55 -54
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +11 -10
- package/lib/ui/gamification/question/notification/styles.d.ts +6 -7
- package/lib/ui/gamification/question/notification/tweet/index.d.ts +3 -3
- package/lib/ui/gamification/question/notification/tweet/styles.d.ts +4 -5
- package/lib/ui/gamification/question/styles.d.ts +14 -14
- package/lib/ui/gamification/question/styles.js +48 -43
- package/lib/ui/gamification/question/twitter/index.d.ts +2 -2
- package/lib/ui/gamification/question/twitter/styles.d.ts +3 -4
- package/lib/ui/gamification/tabs/index.d.ts +0 -1
- package/lib/ui/gamification/tabs/styles.d.ts +4 -5
- package/lib/ui/gamification/user-statistics/components/rank/index.d.ts +0 -1
- package/lib/ui/gamification/user-statistics/components/rank/styles.d.ts +3 -4
- package/lib/ui/gamification/user-statistics/components/statistic/index.d.ts +0 -1
- package/lib/ui/gamification/user-statistics/components/statistic/styles.d.ts +3 -4
- package/lib/ui/gamification/user-statistics/index.d.ts +0 -1
- package/lib/ui/gamification/user-statistics/styles.d.ts +17 -18
- package/lib/ui/gamification/vote/alert/index.d.ts +2 -1
- package/lib/ui/gamification/vote/alert/styles.d.ts +3 -4
- package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
- package/lib/ui/gamification/vote/feedback/styles.d.ts +8 -9
- package/lib/ui/gamification/vote/index.d.ts +1 -1
- package/lib/ui/gamification/vote/insight-details/index.d.ts +1 -1
- package/lib/ui/gamification/vote/insight-details/styles.d.ts +2 -3
- package/lib/ui/gamification/vote/styles.d.ts +4 -5
- package/lib/ui/gamification/vote/styles.js +1 -1
- package/lib/ui/gamification/vote/twitter-details/index.d.ts +2 -2
- package/lib/ui/gamification/vote/twitter-details/styles.d.ts +2 -3
- package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -1
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +19 -16
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -1
- package/lib/ui/gamification/vote/win-bar/styles.d.ts +6 -7
- package/lib/ui/icons/index.d.ts +1 -1
- package/lib/ui/icons/index.js +107 -47
- package/lib/ui/lottie/index.d.ts +0 -1
- package/lib/ui/modal/index.d.ts +0 -1
- package/lib/ui/modal/index.js +1 -1
- package/lib/ui/navigation/button/Channels.d.ts +1 -1
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
- package/lib/ui/navigation/button/LeaderBoard.d.ts +1 -1
- package/lib/ui/navigation/button/index.d.ts +1 -1
- package/lib/ui/navigation/button/styles.d.ts +6 -7
- package/lib/ui/navigation/index.d.ts +1 -1
- package/lib/ui/navigation/masters.d.ts +6 -5
- package/lib/ui/questions/insight/index.d.ts +1 -1
- package/lib/ui/questions/insight/styles.d.ts +6 -7
- package/lib/ui/questions/twitter/account/index.d.ts +0 -1
- package/lib/ui/questions/twitter/account/styles.d.ts +6 -7
- package/lib/ui/questions/twitter/index.d.ts +1 -1
- package/lib/ui/questions/twitter/styles.d.ts +14 -11
- package/lib/ui/show-in/index.d.ts +2 -1
- package/lib/ui/skeleton/index.d.ts +0 -1
- package/lib/ui/skeleton/styles.d.ts +1 -2
- package/lib/ui/slide-in/index.d.ts +11 -0
- package/lib/ui/slide-in/index.js +29 -0
- package/lib/ui/theme/MastersColors.d.ts +1 -0
- package/lib/ui/theme/MastersColors.js +15 -0
- package/lib/ui/theme/ThemeColors.js +1 -1
- package/lib/ui/theme/breakpoints.d.ts +1 -0
- package/lib/ui/theme/constants.d.ts +12 -59
- package/lib/ui/theme/constants.js +26 -55
- package/lib/ui/theme/index.d.ts +0 -1
- package/lib/ui/theme/masters-theme.d.ts +5 -0
- package/lib/ui/theme/masters-theme.js +64 -0
- package/lib/ui/theme/masters.d.ts +4 -0
- package/lib/ui/theme/masters.js +6 -0
- package/lib/ui/theme/theme.d.ts +1 -1
- package/lib/ui/theme/theme.js +2 -2
- package/lib/ui/timer/index.d.ts +3 -2
- package/lib/ui/timer/index.js +32 -32
- package/lib/ui/video-player/index.d.ts +0 -1
- package/lib/ui/video-player/styles.d.ts +5 -6
- package/lib/utils/debug/storage.js +1 -1
- package/lib/utils/storage.js +1 -1
- package/package.json +48 -38
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +0 -9
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +0 -14
- package/lib/ui/app/Navigation/index.d.ts +0 -9
- package/lib/ui/app/Navigation/index.js +0 -30
- package/lib/ui/app/Notifications/Onboarding/Notification/styles.d.ts +0 -10
- package/lib/ui/app/Notifications/Onboarding/index.d.ts +0 -14
- package/lib/ui/app/Notifications/index.d.ts +0 -13
- package/lib/ui/app/Notifications/styles.d.ts +0 -8
- package/lib/ui/app/Points/index.d.ts +0 -5
- package/lib/ui/app/masters.d.ts +0 -20
- package/lib/ui/app/styles.d.ts +0 -15
- package/lib/ui/app/useClipboardCopy.d.ts +0 -3
- package/lib/ui/app/useMastersApp.js +0 -68
- package/lib/ui/app/useMastersContext.d.ts +0 -8
- package/lib/ui/login/demo.d.ts +0 -6
- package/lib/ui/login/styles.d.ts +0 -8
- package/lib/ui/login/styles.js +0 -39
- /package/lib/{ui → app}/app/Features/Gamification/gamification-feature.js +0 -0
- /package/lib/{ui → app}/app/Features/index.js +0 -0
- /package/lib/{ui → app}/app/Notifications/Onboarding/Notification/index.js +0 -0
- /package/lib/{styles_z07sl8-l0sNRNKZ.js → app/index.js} +0 -0
- /package/lib/{ui → app}/login/demo.js +0 -0
- /package/lib/{ui/app → app/masters}/useMastersContext.js +0 -0
- /package/lib/{ui/app → app}/useImagesPreload.d.ts +0 -0
- /package/lib/{ui/app → app}/useImagesPreload.js +0 -0
- /package/lib/{ui/app → app}/useSdkFeature.js +0 -0
|
@@ -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
|
+
}>;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { jsxs as f, Fragment as D, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { cx as N } from "@linaria/core";
|
|
3
|
+
import { useStore as g } from "@nanostores/react";
|
|
4
|
+
import { useMastersContext as T } from "../useMastersContext.js";
|
|
5
|
+
import { scrollIntoAppView as q } from "../../useSdkScroll.js";
|
|
6
|
+
import { useState as p, useMemo as E, useEffect as h, useRef as O, useCallback as w } from "react";
|
|
7
|
+
import { r as b } from "../../../index-B1QdimmR.js";
|
|
8
|
+
import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
|
|
9
|
+
import { NotificationType as a } 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
|
+
import { Onboarding as x } from "./Onboarding/index.js";
|
|
14
|
+
import { HiddenContainer as A, Container as B, InnerContainer as H, NotificationRefreshing as Q, Pill as U } from "./styles.js";
|
|
15
|
+
const j = (n) => {
|
|
16
|
+
const [t, u] = p(0), i = O(null), d = w((r) => {
|
|
17
|
+
i.current = r;
|
|
18
|
+
}, []);
|
|
19
|
+
h(() => {
|
|
20
|
+
var l;
|
|
21
|
+
const r = (l = i.current) == null ? void 0 : l.getBoundingClientRect();
|
|
22
|
+
r && u(r.height);
|
|
23
|
+
}, [n]);
|
|
24
|
+
const o = w((r) => {
|
|
25
|
+
u(r);
|
|
26
|
+
}, []);
|
|
27
|
+
return [d, t, o];
|
|
28
|
+
}, z = ({
|
|
29
|
+
sdk: n,
|
|
30
|
+
notification: t,
|
|
31
|
+
appNode: u,
|
|
32
|
+
responsiveStore: i
|
|
33
|
+
}) => {
|
|
34
|
+
var s, e;
|
|
35
|
+
const {
|
|
36
|
+
sdkInDesktopView: d
|
|
37
|
+
} = g(i, {
|
|
38
|
+
keys: ["sdkInDesktopView"]
|
|
39
|
+
}), {
|
|
40
|
+
sdk: o
|
|
41
|
+
} = T(), [r, l, m] = j(t.id);
|
|
42
|
+
return t.type === a.QUESTION ? /* @__PURE__ */ f(D, {
|
|
43
|
+
children: [/* @__PURE__ */ c(A, {
|
|
44
|
+
ref: r,
|
|
45
|
+
children: /* @__PURE__ */ c(V, {
|
|
46
|
+
...t
|
|
47
|
+
})
|
|
48
|
+
}), /* @__PURE__ */ f(B, {
|
|
49
|
+
style: {
|
|
50
|
+
height: t.hiding ? 0 : l
|
|
51
|
+
},
|
|
52
|
+
hiding: t.hiding,
|
|
53
|
+
children: [/* @__PURE__ */ c(H, {
|
|
54
|
+
style: {
|
|
55
|
+
height: "100%"
|
|
56
|
+
},
|
|
57
|
+
children: /* @__PURE__ */ c(V, {
|
|
58
|
+
...t,
|
|
59
|
+
controlVideo: o == null ? void 0 : o.controlVideoPlayer
|
|
60
|
+
})
|
|
61
|
+
}), /* @__PURE__ */ c(Q, {}, t.id)]
|
|
62
|
+
})]
|
|
63
|
+
}) : t.type === a.QUESTION_RESOLVED && ((e = (s = t.data) == null ? void 0 : s.question) != null && e.predictionResult) ? /* @__PURE__ */ c(P, {
|
|
64
|
+
style: {
|
|
65
|
+
height: t.hiding ? 0 : l
|
|
66
|
+
},
|
|
67
|
+
saveHeight: m,
|
|
68
|
+
close: t.close,
|
|
69
|
+
hiding: t.hiding,
|
|
70
|
+
...t.data.question,
|
|
71
|
+
mastersApp: !0
|
|
72
|
+
}) : t.type === a.ONBOARDING ? /* @__PURE__ */ c(x, {
|
|
73
|
+
style: {
|
|
74
|
+
height: t.hiding ? 0 : l
|
|
75
|
+
},
|
|
76
|
+
saveHeight: m,
|
|
77
|
+
sdk: n,
|
|
78
|
+
notification: t,
|
|
79
|
+
sdkInDesktopView: d,
|
|
80
|
+
appNode: u,
|
|
81
|
+
responsiveStore: i
|
|
82
|
+
}) : null;
|
|
83
|
+
}, F = "p1co32q0", L = ({
|
|
84
|
+
pill: n,
|
|
85
|
+
setPill: t,
|
|
86
|
+
appNode: u,
|
|
87
|
+
headerNode: i,
|
|
88
|
+
scrollNode: d,
|
|
89
|
+
responsiveStore: o,
|
|
90
|
+
scrollStore: r
|
|
91
|
+
}) => {
|
|
92
|
+
var k, y;
|
|
93
|
+
const {
|
|
94
|
+
screen: l
|
|
95
|
+
} = g(o, {
|
|
96
|
+
keys: ["screen"]
|
|
97
|
+
}), {
|
|
98
|
+
tabsShown: m,
|
|
99
|
+
scrollPosition: s
|
|
100
|
+
} = g(r, {
|
|
101
|
+
keys: ["tabsShown", "scrollPosition"]
|
|
102
|
+
});
|
|
103
|
+
h(() => {
|
|
104
|
+
o.get().sdkInDesktopView ? s < 50 && t(null) : s > -50 && t(null);
|
|
105
|
+
}, [s, o, t]);
|
|
106
|
+
const e = o.get().sdkInDesktopView ? u : i;
|
|
107
|
+
return !n || !e.current ? null : b.createPortal(/* @__PURE__ */ c(U, {
|
|
108
|
+
title: n.type === a.QUESTION_RESOLVED ? "Prediction result" : `New ${((y = R[(k = n.data) == null ? void 0 : k.questionType]) == null ? void 0 : y.label) || "notification"}`,
|
|
109
|
+
onClick: () => {
|
|
110
|
+
var I;
|
|
111
|
+
o.get().sdkInDesktopView ? (I = d.current) == null || I.scrollTo({
|
|
112
|
+
top: 0,
|
|
113
|
+
behavior: "smooth"
|
|
114
|
+
}) : q(u, l.size, {
|
|
115
|
+
behavior: "smooth"
|
|
116
|
+
}), t(null);
|
|
117
|
+
},
|
|
118
|
+
className: N(m && F, "sl-pill-button")
|
|
119
|
+
}), e.current);
|
|
120
|
+
}, it = ({
|
|
121
|
+
sdk: n,
|
|
122
|
+
headerNode: t,
|
|
123
|
+
scrollNode: u,
|
|
124
|
+
responsiveStore: i,
|
|
125
|
+
appNode: d,
|
|
126
|
+
scrollStore: o
|
|
127
|
+
}) => {
|
|
128
|
+
const [r] = p(n.getNotificationsStore()), l = g(r), [m, s] = p(null), e = E(() => n.getActiveNotification(), [n, l]);
|
|
129
|
+
return h(() => {
|
|
130
|
+
e && C.emit("notification", {
|
|
131
|
+
action: "rendered",
|
|
132
|
+
payload: {
|
|
133
|
+
questionId: e.data.questionId,
|
|
134
|
+
questionType: e.data.questionType
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}, [e]), h(() => {
|
|
138
|
+
e && (i.get().sdkInDesktopView || i.get().sdkInView) && (!i.get().sdkInDesktopView && i.get().sdkInView && s(e), i.get().sdkInDesktopView && window.requestAnimationFrame(() => {
|
|
139
|
+
o.get().scrollPosition !== 0 && s(e);
|
|
140
|
+
}));
|
|
141
|
+
}, [e]), h(() => {
|
|
142
|
+
e || s(null);
|
|
143
|
+
}, [e]), /* @__PURE__ */ f(D, {
|
|
144
|
+
children: [!m && e && /* @__PURE__ */ c(z, {
|
|
145
|
+
headerNode: t,
|
|
146
|
+
appNode: d,
|
|
147
|
+
sdk: n,
|
|
148
|
+
notification: e,
|
|
149
|
+
responsiveStore: i
|
|
150
|
+
}), m && /* @__PURE__ */ c(L, {
|
|
151
|
+
pill: m,
|
|
152
|
+
setPill: s,
|
|
153
|
+
appNode: d,
|
|
154
|
+
notification: e,
|
|
155
|
+
headerNode: t,
|
|
156
|
+
scrollNode: u,
|
|
157
|
+
scrollStore: o,
|
|
158
|
+
responsiveStore: i
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
export {
|
|
163
|
+
it as SDKNotifications
|
|
164
|
+
};
|
|
@@ -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;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
import { Pill as n } from "
|
|
3
|
-
import { ShowIn as o } from "
|
|
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
4
|
const e = () => o, l = /* @__PURE__ */ s(e())({
|
|
5
5
|
name: "Container",
|
|
6
|
-
class: "
|
|
6
|
+
class: "c1f0y7nw",
|
|
7
7
|
propsAsIs: !0
|
|
8
|
-
}),
|
|
8
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
9
9
|
name: "InnerContainer",
|
|
10
|
-
class: "
|
|
10
|
+
class: "i1qa3p7a",
|
|
11
11
|
propsAsIs: !1
|
|
12
|
-
}),
|
|
12
|
+
}), i = () => t, m = /* @__PURE__ */ s(i())({
|
|
13
13
|
name: "HiddenContainer",
|
|
14
|
-
class: "
|
|
14
|
+
class: "hrthymv",
|
|
15
15
|
propsAsIs: !0
|
|
16
16
|
}), f = /* @__PURE__ */ s("div")({
|
|
17
17
|
name: "NotificationRefreshing",
|
|
18
|
-
class: "
|
|
18
|
+
class: "n13rok4i",
|
|
19
19
|
propsAsIs: !1
|
|
20
|
-
}),
|
|
20
|
+
}), r = () => n, I = /* @__PURE__ */ s(r())({
|
|
21
21
|
name: "Pill",
|
|
22
|
-
class: "
|
|
22
|
+
class: "pht79xf",
|
|
23
23
|
propsAsIs: !0
|
|
24
24
|
});
|
|
25
25
|
export {
|
|
26
26
|
l as Container,
|
|
27
27
|
m as HiddenContainer,
|
|
28
|
-
|
|
28
|
+
t as InnerContainer,
|
|
29
29
|
f as NotificationRefreshing,
|
|
30
30
|
I as Pill
|
|
31
31
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as i } from "@nanostores/react";
|
|
3
|
+
import { useState as c, useEffect as f } from "react";
|
|
4
|
+
import { FeatureStatus as p } from "@streamlayer/sdk-web-interfaces";
|
|
5
|
+
import { FeatureType as S } from "@streamlayer/sdk-web-types";
|
|
6
|
+
import { Points as l } from "../../../ui/gamification/points/index.js";
|
|
7
|
+
const a = ({ gamification: e }) => {
|
|
8
|
+
const s = e.userSummary.$store, [r, u] = c(0);
|
|
9
|
+
return f(() => {
|
|
10
|
+
const m = s.subscribe((t) => {
|
|
11
|
+
var o;
|
|
12
|
+
(o = t == null ? void 0 : t.summary) != null && o.points && u(t.summary.points);
|
|
13
|
+
});
|
|
14
|
+
return () => {
|
|
15
|
+
m();
|
|
16
|
+
};
|
|
17
|
+
}, [s]), /* @__PURE__ */ n(l, { points: r, onClick: () => {
|
|
18
|
+
e.status.get() === p.Suspended && e.openFeature();
|
|
19
|
+
} });
|
|
20
|
+
}, h = ({ sdk: e }) => {
|
|
21
|
+
if (!i(e.featuresList.getStore()))
|
|
22
|
+
return null;
|
|
23
|
+
const r = e.getFeature(S.GAMES);
|
|
24
|
+
return r ? /* @__PURE__ */ n(a, { gamification: r }) : null;
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
h as StreamLayerSDKPoints
|
|
28
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
|
+
|
|
3
|
+
export { StreamLayerMastersThemeProvider } from '../../ui/theme/masters';
|
|
4
|
+
export type Overlays = {};
|
|
5
|
+
export type MastersAppChildrenProps = {
|
|
6
|
+
activateEventWithId: (event: string) => void;
|
|
7
|
+
deactivate: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type MastersAppProps = {
|
|
10
|
+
sdk: StreamLayerSDK;
|
|
11
|
+
overlays?: Overlays;
|
|
12
|
+
children: (methods: MastersAppChildrenProps) => React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export declare const MastersApp: React.FC<MastersAppProps>;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { jsx as n, jsxs as v } from "react/jsx-runtime";
|
|
2
2
|
import { useStore as C } from "@nanostores/react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
3
|
+
import { SDKContainer as x, SDKScrollContainer as A } from "../styles.js";
|
|
4
|
+
import { useSdkFeature as F } from "../useSdkFeature.js";
|
|
5
|
+
import { useSdkResponsive as M } from "../useSdkResponsive.js";
|
|
6
|
+
import { useSdkScroll as b } from "../useSdkScroll.js";
|
|
7
|
+
import { useAnalyticsListener as d, newTabLinkListener as D, appScrollListener as I, appClickListener as B } from "../../hooks/analytics.js";
|
|
8
|
+
import { useRef as S, useMemo as T, useEffect as j } from "react";
|
|
9
|
+
import { resetCss as p } from "../../ui/theme/theme.js";
|
|
10
|
+
import { ActiveFeature as k, StandaloneFeature as E } from "./Features/index.js";
|
|
11
|
+
import { MastersNavigation as K } from "./Navigation/MastersNavigation/index.js";
|
|
12
|
+
import { SDKNotifications as O } from "./Notifications/index.js";
|
|
13
|
+
import { useMastersApp as R } from "./useMastersApp.js";
|
|
14
|
+
import { MastersContext as w } from "./useMastersContext.js";
|
|
15
|
+
import { StreamLayerMastersThemeProvider as ce } from "../../ui/theme/masters.js";
|
|
16
|
+
import { ChannelsButtonId as P } from "../../ui/navigation/button/Channels.js";
|
|
17
|
+
import { LeaderBoardButtonId as G } from "../../ui/navigation/button/LeaderBoard.js";
|
|
18
|
+
import { FeaturedGroupsButtonId as V } from "../../ui/navigation/button/FeaturedGroups.js";
|
|
18
19
|
const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, responsiveStore: o }) => {
|
|
19
|
-
const [, r] =
|
|
20
|
+
const [, r] = F(e);
|
|
20
21
|
return /* @__PURE__ */ n(
|
|
21
|
-
|
|
22
|
+
k,
|
|
22
23
|
{
|
|
23
24
|
className: i,
|
|
24
25
|
scrollNode: s,
|
|
@@ -34,7 +35,7 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
|
|
|
34
35
|
return s ? Array.from(s, (o) => {
|
|
35
36
|
const r = e.getFeature(o);
|
|
36
37
|
return r ? /* @__PURE__ */ n(
|
|
37
|
-
|
|
38
|
+
E,
|
|
38
39
|
{
|
|
39
40
|
className: i,
|
|
40
41
|
appNode: l,
|
|
@@ -46,24 +47,24 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
|
|
|
46
47
|
) : null;
|
|
47
48
|
}) : null;
|
|
48
49
|
}, ie = ({ sdk: e, overlays: i, children: l }) => {
|
|
49
|
-
const t = S(null), s = S(null), [o] =
|
|
50
|
-
d(t, { enabled: a, event: "click", listener:
|
|
50
|
+
const t = S(null), s = S(null), [o] = M(t), [r, f] = b(t, o), { sdkEnabled: a, sdkReady: c, activeOverlay: m, activateAndLoadOverlay: h, activateEventWithId: N, deactivate: g, isLogged: y } = R(e);
|
|
51
|
+
d(t, { enabled: a, event: "click", listener: D }), d(r, {
|
|
51
52
|
enabled: a,
|
|
52
53
|
event: "scrollend",
|
|
53
|
-
listener:
|
|
54
|
+
listener: I,
|
|
54
55
|
useDomNode: !0
|
|
55
56
|
}), d(r, {
|
|
56
57
|
enabled: a,
|
|
57
58
|
event: "click",
|
|
58
|
-
listener:
|
|
59
|
+
listener: B,
|
|
59
60
|
useDomNode: !0
|
|
60
61
|
});
|
|
61
|
-
const L =
|
|
62
|
-
return
|
|
62
|
+
const L = T(() => ({ sdk: e }), [e]);
|
|
63
|
+
return j(() => {
|
|
63
64
|
import("./Features/Gamification/gamification-feature.js");
|
|
64
|
-
}, []), /* @__PURE__ */ n(
|
|
65
|
+
}, []), /* @__PURE__ */ n(w.Provider, { value: L, children: /* @__PURE__ */ v(x, { ref: t, children: [
|
|
65
66
|
a && /* @__PURE__ */ n(
|
|
66
|
-
|
|
67
|
+
K,
|
|
67
68
|
{
|
|
68
69
|
ref: s,
|
|
69
70
|
sdkReady: c,
|
|
@@ -77,9 +78,9 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
|
|
|
77
78
|
responsiveStore: o
|
|
78
79
|
}
|
|
79
80
|
),
|
|
80
|
-
/* @__PURE__ */ v(
|
|
81
|
+
/* @__PURE__ */ v(A, { className: "sl-hide-on-modal", ref: r, "data-nav": a.toString(), children: [
|
|
81
82
|
c && /* @__PURE__ */ n(
|
|
82
|
-
|
|
83
|
+
O,
|
|
83
84
|
{
|
|
84
85
|
sdk: e,
|
|
85
86
|
scrollNode: r,
|
|
@@ -89,8 +90,8 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
|
|
|
89
90
|
responsiveStore: o
|
|
90
91
|
}
|
|
91
92
|
),
|
|
92
|
-
/* @__PURE__ */ n("div", { style: !a || m ===
|
|
93
|
-
i && m ===
|
|
93
|
+
/* @__PURE__ */ n("div", { style: !a || m === P ? {} : { display: "none" }, children: l && l({ activateEventWithId: N, deactivate: g }) }),
|
|
94
|
+
i && m === G && i[m],
|
|
94
95
|
c && m === V && /* @__PURE__ */ n(
|
|
95
96
|
W,
|
|
96
97
|
{
|
|
@@ -114,5 +115,6 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
|
|
|
114
115
|
] }) });
|
|
115
116
|
};
|
|
116
117
|
export {
|
|
117
|
-
ie as MastersApp
|
|
118
|
+
ie as MastersApp,
|
|
119
|
+
ce as StreamLayerMastersThemeProvider
|
|
118
120
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
2
|
import { AvailableOverlays } from './Navigation/MastersNavigation';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* A hook that provides functionality for managing the StreamLayerSDK in the Masters app.
|
|
5
6
|
* - On activate FG+ button, the SDK is initialized and the FG+ overlay is opened.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useStore as c } from "@nanostores/react";
|
|
2
|
+
import { useRef as z, useState as d, useCallback as v, useEffect as l } from "react";
|
|
3
|
+
import { FeatureType as p } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import "./Navigation/MastersNavigation/index.js";
|
|
5
|
+
import { FeaturedGroupsButtonId as f } from "../../ui/navigation/button/FeaturedGroups.js";
|
|
6
|
+
import { ChannelsButtonId as i } from "../../ui/navigation/button/Channels.js";
|
|
7
|
+
const C = (e) => {
|
|
8
|
+
const m = z(""), [E, a] = d(!1), g = c(e.status), F = c(e.sdkStore.slStreamId), n = c(e.userId()), A = c(e.getActiveFeature()), o = g === "ready" && !!F.data, [S, r] = d(f), s = v(
|
|
9
|
+
(t, u) => {
|
|
10
|
+
r(u), t && e.createEventSession(t), u === f ? window.requestAnimationFrame(() => {
|
|
11
|
+
e.openFeature(p.GAMES);
|
|
12
|
+
}) : e.closeFeature(!1);
|
|
13
|
+
},
|
|
14
|
+
[e]
|
|
15
|
+
);
|
|
16
|
+
l(() => {
|
|
17
|
+
!o && S === f && (r(i), e.closeFeature(!0));
|
|
18
|
+
}, [o, S, e]), l(() => {
|
|
19
|
+
A === p.GAMES ? r(f) : A === p.UNSET && r(i);
|
|
20
|
+
const t = e.getFeature(p.GAMES);
|
|
21
|
+
t && (t.closeQuestion(), t.closeUser());
|
|
22
|
+
}, [A, e]);
|
|
23
|
+
const b = v(
|
|
24
|
+
(t) => {
|
|
25
|
+
m.current = t, a(!0), e.initializeApp({ skipOrganizationSettings: !0 }).then(({ enabled: u, err: h }) => {
|
|
26
|
+
if (h) {
|
|
27
|
+
s(t, i);
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (u) {
|
|
31
|
+
e.isUserAuthorized().then((y) => {
|
|
32
|
+
if (y) {
|
|
33
|
+
s(t, i);
|
|
34
|
+
return;
|
|
35
|
+
} else
|
|
36
|
+
e.disableApp();
|
|
37
|
+
});
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
[s, e]
|
|
43
|
+
), I = v(() => {
|
|
44
|
+
a(!1), e.disableApp();
|
|
45
|
+
}, [e]);
|
|
46
|
+
return l(() => {
|
|
47
|
+
if (!n) {
|
|
48
|
+
o && (r(i), e.disableApp());
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (n && m.current && E) {
|
|
52
|
+
e.initializeApp({ skipOrganizationSettings: !0 }).then(() => {
|
|
53
|
+
e.createEventSession(m.current);
|
|
54
|
+
});
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
}, [n]), l(() => () => {
|
|
58
|
+
a(!1), e.disableApp();
|
|
59
|
+
}, [a, e]), {
|
|
60
|
+
sdkEnabled: E,
|
|
61
|
+
sdkReady: o,
|
|
62
|
+
activeOverlay: S,
|
|
63
|
+
activateAndLoadOverlay: s,
|
|
64
|
+
activateEventWithId: b,
|
|
65
|
+
deactivate: I,
|
|
66
|
+
isLogged: !!n
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
C as useMastersApp
|
|
71
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const SDKContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const SDKScrollContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const SDKContentContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const SDKWhiteContainer: {
|
|
5
|
+
__wyw_meta: unknown;
|
|
6
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
7
|
+
as?: import('react').ElementType;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const TabsContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
10
|
+
export declare const LeaderboardContainer: {
|
|
11
|
+
__wyw_meta: unknown;
|
|
12
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
13
|
+
as?: import('react').ElementType;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const TabsNavContainer: {
|
|
16
|
+
__wyw_meta: unknown;
|
|
17
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
18
|
+
as?: import('react').ElementType;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const UserSummaryContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
const i = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "SDKContainer",
|
|
4
|
-
class: "
|
|
4
|
+
class: "s2j5adf",
|
|
5
5
|
propsAsIs: !1
|
|
6
6
|
}), c = /* @__PURE__ */ s("div")({
|
|
7
7
|
name: "SDKScrollContainer",
|
|
8
|
-
class: "
|
|
8
|
+
class: "st9ayqn",
|
|
9
9
|
propsAsIs: !1
|
|
10
10
|
}), a = /* @__PURE__ */ s("div")({
|
|
11
11
|
name: "SDKContentContainer",
|
|
12
|
-
class: "
|
|
12
|
+
class: "s6rlym7",
|
|
13
13
|
propsAsIs: !1
|
|
14
14
|
}), e = () => a, n = /* @__PURE__ */ s(e())({
|
|
15
15
|
name: "SDKWhiteContainer",
|
|
16
|
-
class: "
|
|
16
|
+
class: "s1trfff0",
|
|
17
17
|
propsAsIs: !0
|
|
18
|
-
}),
|
|
18
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
19
19
|
name: "TabsContainer",
|
|
20
|
-
class: "
|
|
20
|
+
class: "t87r8je",
|
|
21
21
|
propsAsIs: !1
|
|
22
|
-
}), o = () => n,
|
|
22
|
+
}), o = () => n, p = /* @__PURE__ */ s(o())({
|
|
23
23
|
name: "LeaderboardContainer",
|
|
24
|
-
class: "
|
|
24
|
+
class: "l1aiq1lq",
|
|
25
25
|
propsAsIs: !0
|
|
26
|
-
}),
|
|
26
|
+
}), r = () => n, C = /* @__PURE__ */ s(r())({
|
|
27
27
|
name: "TabsNavContainer",
|
|
28
|
-
class: "
|
|
28
|
+
class: "t1o5m8d1",
|
|
29
29
|
propsAsIs: !0
|
|
30
30
|
}), m = /* @__PURE__ */ s("div")({
|
|
31
31
|
name: "UserSummaryContainer",
|
|
32
|
-
class: "
|
|
32
|
+
class: "uqh0y7s",
|
|
33
33
|
propsAsIs: !1
|
|
34
34
|
});
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
p as LeaderboardContainer,
|
|
37
37
|
i as SDKContainer,
|
|
38
38
|
a as SDKContentContainer,
|
|
39
39
|
c as SDKScrollContainer,
|
|
40
40
|
n as SDKWhiteContainer,
|
|
41
|
-
|
|
41
|
+
l as TabsContainer,
|
|
42
42
|
C as TabsNavContainer,
|
|
43
43
|
m as UserSummaryContainer
|
|
44
44
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as l, useState as s, useCallback as p, useEffect as f } from "react";
|
|
3
|
-
import { r as m } from "
|
|
4
|
-
import { CopyNotification as b } from "../gamification/copyNotification/index.js";
|
|
3
|
+
import { r as m } from "../index-B1QdimmR.js";
|
|
4
|
+
import { CopyNotification as b } from "../ui/gamification/copyNotification/index.js";
|
|
5
5
|
const T = (r) => {
|
|
6
6
|
const t = l(), [i, o] = s(null), a = p(
|
|
7
7
|
async (e) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Features } from '@streamlayer/sdk-web-features';
|
|
2
|
-
import {
|
|
2
|
+
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
3
3
|
import { FeatureType } from '@streamlayer/sdk-web-types';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* A hook that manages the active feature of a StreamLayerSDK instance.
|
|
6
7
|
* @param sdk - The StreamLayerSDK instance to manage the feature for.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { AppNodeRef } from '.';
|
|
1
2
|
import { MapStore } from 'nanostores';
|
|
2
|
-
import { BREAKPOINTS } from '../theme/constants';
|
|
3
|
+
import { BREAKPOINTS } from '../ui/theme/constants';
|
|
4
|
+
|
|
3
5
|
type BREAKPOINTS_KEYS = keyof typeof BREAKPOINTS;
|
|
4
6
|
type ResponsiveData = {
|
|
5
7
|
screen: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import c from "lodash.throttle";
|
|
2
2
|
import { useState as m, useEffect as u } from "react";
|
|
3
|
-
import { BREAKPOINTS as r } from "../theme/constants.js";
|
|
4
|
-
import { m as l } from "
|
|
3
|
+
import { BREAKPOINTS as r } from "../ui/theme/constants.js";
|
|
4
|
+
import { m as l } from "../index-CZvwzN5o.js";
|
|
5
5
|
const d = Object.keys(r), i = () => {
|
|
6
6
|
const n = window.innerWidth;
|
|
7
7
|
let e = "sm";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ScrollNodeRef, AppNodeRef } from '.';
|
|
1
2
|
import { MapStore } from 'nanostores';
|
|
2
|
-
import {
|
|
3
|
-
|
|
3
|
+
import { ResponsiveStore } from './useSdkResponsive';
|
|
4
|
+
|
|
4
5
|
type ScrollData = {
|
|
5
6
|
scrollPosition: number;
|
|
6
7
|
tabsShown?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useStore as S } from "@nanostores/react";
|
|
2
2
|
import h from "lodash.throttle";
|
|
3
3
|
import { useRef as m, useState as b, useEffect as g } from "react";
|
|
4
|
-
import { BREAKPOINTS as c } from "../theme/constants.js";
|
|
5
|
-
import { m as v } from "
|
|
4
|
+
import { BREAKPOINTS as c } from "../ui/theme/constants.js";
|
|
5
|
+
import { m as v } from "../index-CZvwzN5o.js";
|
|
6
6
|
const C = (o, e, n) => {
|
|
7
7
|
const t = e >= c.lg && e < c.xl ? 75 : 52;
|
|
8
8
|
o.current && window.scrollTo({
|