@streamlayer/react-ui 0.91.1 → 0.93.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/assets/style.css +1 -1
- package/lib/index-keh7OLCY.js +67 -0
- package/lib/index.js +5 -4
- package/lib/ui/app/Features/Gamification/Friends.d.ts +2 -1
- package/lib/ui/app/Features/Gamification/Friends.js +6 -6
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +3 -2
- package/lib/ui/app/Features/Gamification/Leaderboard.js +26 -24
- package/lib/ui/app/Features/Gamification/Question.js +1 -1
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +7 -2
- package/lib/ui/app/Features/Gamification/Tabs.js +42 -31
- package/lib/ui/app/Features/Gamification/gamification-feature.js +5 -2
- package/lib/ui/app/Features/Gamification/index.d.ts +6 -2
- package/lib/ui/app/Features/Gamification/index.js +86 -45
- package/lib/ui/app/Features/index.d.ts +6 -2
- package/lib/ui/app/Features/index.js +13 -11
- package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +3 -2
- package/lib/ui/app/Navigation/MastersNavigation/index.js +37 -31
- package/lib/ui/app/Navigation/index.js +6 -7
- package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -1
- package/lib/ui/app/Notifications/Onboarding/index.js +91 -73
- package/lib/ui/app/Notifications/index.d.ts +6 -2
- package/lib/ui/app/Notifications/index.js +120 -91
- package/lib/ui/app/Points/index.js +6 -5
- package/lib/ui/app/masters.d.ts +7 -0
- package/lib/ui/app/masters.js +73 -51
- package/lib/ui/app/styles.d.ts +1 -0
- package/lib/ui/app/styles.js +6 -1
- package/lib/ui/app/useClipboardCopy.d.ts +2 -1
- package/lib/ui/app/useImagesPreload.d.ts +4 -0
- package/lib/ui/app/useImagesPreload.js +23 -0
- package/lib/ui/app/useMastersApp.js +15 -14
- package/lib/ui/app/useSdkResponsive.d.ts +14 -0
- package/lib/ui/app/useSdkResponsive.js +46 -0
- package/lib/ui/app/useSdkScroll.d.ts +4 -1
- package/lib/ui/app/useSdkScroll.js +36 -85
- package/lib/ui/gamification/detail/header/index.js +11 -11
- package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
- package/lib/ui/gamification/detail/header/styles.js +11 -11
- package/lib/ui/gamification/leaderboard/static.d.ts +2 -1
- package/lib/ui/gamification/onboarding/index.d.ts +5 -0
- package/lib/ui/gamification/onboarding/index.js +69 -42
- package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +7 -0
- package/lib/ui/gamification/onboarding/invitingUser/index.js +16 -0
- package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -0
- package/lib/ui/gamification/onboarding/invitingUser/styles.js +24 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +2 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +2 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +18 -12
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +7 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +10 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +5 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.js +24 -0
- package/lib/ui/gamification/points/index.js +5 -4
- package/lib/ui/gamification/question/insight/index.js +5 -5
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +17 -17
- package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
- package/lib/ui/gamification/vote/index.js +55 -54
- package/lib/ui/gamification/vote/insight-details/index.js +1 -1
- package/lib/ui/gamification/vote/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/styles.js +17 -11
- package/lib/ui/gamification/vote/vote-option/index.js +62 -58
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
- package/lib/ui/gamification/vote/win-bar/index.js +21 -20
- package/lib/ui/navigation/button/LeaderBoard.js +5 -6
- package/lib/ui/navigation/index.js +6 -7
- package/lib/ui/navigation/masters.d.ts +2 -1
- package/lib/ui/navigation/masters.js +9 -6
- package/lib/ui/questions/insight/index.d.ts +1 -1
- package/lib/ui/questions/insight/index.js +18 -25
- package/lib/ui/skeleton/index.d.ts +7 -0
- package/lib/ui/skeleton/index.js +7 -0
- package/lib/ui/skeleton/styles.d.ts +2 -0
- package/lib/ui/skeleton/styles.js +9 -0
- package/lib/ui/theme/breakpoints.d.ts +4 -1
- package/lib/ui/theme/breakpoints.js +24 -12
- package/lib/ui/theme/constants.d.ts +4 -0
- package/lib/ui/theme/constants.js +6 -2
- package/lib/ui/theme/index.js +4 -3
- package/lib/ui/theme/theme.js +29 -21
- package/lib/utils/createDemo.js +12 -13
- package/lib/utils/debug/components/copyLogs.js +10 -9
- package/lib/utils/decorators/container.js +4 -3
- package/package.json +18 -18
- package/lib/LeaderBoard_fzzlxb-w40geAFS.js +0 -1
- package/lib/index_ej4hfx-w40geAFS.js +0 -1
- package/lib/masters_m6itlr-w40geAFS.js +0 -1
- package/lib/utils/useStreamLayerApp.js +0 -25
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type Gamification } from '@streamlayer/feature-gamification';
|
|
3
|
+
import type { AppNodeRef, HeaderNodeRef, ScrollNodeRef } from '../../masters';
|
|
4
|
+
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
5
|
import { ScrollStore } from '../../useSdkScroll';
|
|
4
6
|
export declare const Tabs: React.FC<{
|
|
5
|
-
appNode:
|
|
7
|
+
appNode: AppNodeRef;
|
|
6
8
|
gamification: Gamification;
|
|
7
9
|
scrollStore: ScrollStore;
|
|
8
|
-
scrollNode:
|
|
10
|
+
scrollNode: ScrollNodeRef;
|
|
11
|
+
headerNode: HeaderNodeRef;
|
|
12
|
+
responsiveStore: ResponsiveStore;
|
|
9
13
|
className?: string;
|
|
14
|
+
style?: React.CSSProperties;
|
|
10
15
|
}>;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { jsxs as f, jsx as r, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as A } from "@nanostores/react";
|
|
3
|
+
import { useState as h, useTransition as D, useEffect as P } from "react";
|
|
4
|
+
import { TabsContainer as k, TabsNavContainer as E, SDKWhiteContainer as I, UserSummaryContainer as L, SDKContentContainer as V, LeaderboardContainer as K } from "../../styles.js";
|
|
5
|
+
import { scrollIntoAppView as B } from "../../useSdkScroll.js";
|
|
6
|
+
import { ActivePages as n, Tabs as F } from "../../../gamification/tabs/index.js";
|
|
7
|
+
import { Leaderboard as O } from "./Leaderboard.js";
|
|
8
|
+
import { QuestionsList as Q } from "./QuestionsList.js";
|
|
9
|
+
import { UserSummary as R } from "./UserSummary.js";
|
|
8
10
|
import "@linaria/react";
|
|
11
|
+
import "lodash.throttle";
|
|
12
|
+
import "../../../theme/constants.js";
|
|
13
|
+
import "../../../../index-keh7OLCY.js";
|
|
14
|
+
import "../../../../index-uEuzH3jr.js";
|
|
9
15
|
import "../../../gamification/tabs/styles.js";
|
|
10
|
-
import "@nanostores/react";
|
|
11
16
|
import "../../../../useClipboardCopy-E5rEe6It.js";
|
|
12
|
-
import "../../../../index-uEuzH3jr.js";
|
|
13
17
|
import "../../../gamification/copyNotification/index.js";
|
|
14
18
|
import "../../../icons/index.js";
|
|
15
19
|
import "../../../gamification/copyNotification/styles.js";
|
|
@@ -53,43 +57,50 @@ import "../../../gamification/user-statistics/components/rank/styles.js";
|
|
|
53
57
|
import "../../../gamification/user-statistics/components/statistic/index.js";
|
|
54
58
|
import "../../../gamification/user-statistics/components/statistic/styles.js";
|
|
55
59
|
import "../../../gamification/user-statistics/styles.js";
|
|
56
|
-
const
|
|
57
|
-
const [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
const qr = ({ gamification: i, className: u, scrollStore: o, scrollNode: b, appNode: e, style: g, responsiveStore: T, headerNode: y }) => {
|
|
61
|
+
const [a, v] = h(!1), [m, w] = h(n.HOME), [, l] = D(), { sdkInScrollView: p } = A(T, { keys: ["sdkInScrollView"] }), x = (t) => {
|
|
62
|
+
l(() => {
|
|
63
|
+
var c;
|
|
64
|
+
w(t), p === !1 && (((c = e.current) == null ? void 0 : c.getBoundingClientRect().y) || 0) < 0 && B(e, { behavior: "instant" });
|
|
65
|
+
});
|
|
66
|
+
}, d = (t) => {
|
|
67
|
+
l(() => v(t));
|
|
61
68
|
};
|
|
62
|
-
|
|
63
|
-
if (
|
|
64
|
-
|
|
69
|
+
P(() => o.listen((t) => {
|
|
70
|
+
if (t.scrollPosition === 0) {
|
|
71
|
+
d(!1), o.setKey("tabsShown", !1);
|
|
65
72
|
return;
|
|
66
73
|
}
|
|
67
|
-
|
|
68
|
-
}), [o])
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
d(t.scrollDirection === "forward"), o.setKey("tabsShown", t.scrollDirection !== "forward");
|
|
75
|
+
}), [o]);
|
|
76
|
+
let s = "0px";
|
|
77
|
+
p ? s = a ? "calc(8px - var(--header-height) - var(--header-offset))" : "0px" : s = a ? "calc(var(--header-height) + var(--header-offset))" : "0px";
|
|
78
|
+
const C = p ? e : y;
|
|
79
|
+
return /* @__PURE__ */ f(k, { className: u, style: g, children: [
|
|
80
|
+
/* @__PURE__ */ r(
|
|
81
|
+
E,
|
|
71
82
|
{
|
|
72
83
|
style: {
|
|
73
|
-
top:
|
|
84
|
+
top: s
|
|
74
85
|
},
|
|
75
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ r(F, { activePage: m, toggleActivePage: x })
|
|
76
87
|
}
|
|
77
88
|
),
|
|
78
|
-
m ===
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
89
|
+
m === n.HOME && /* @__PURE__ */ f(S, { children: [
|
|
90
|
+
/* @__PURE__ */ r(I, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(R, { userSummary: i.userSummary }) }) }),
|
|
91
|
+
/* @__PURE__ */ r(V, { style: { flex: 1 }, children: /* @__PURE__ */ r(Q, { openQuestion: i.openQuestion, store: i.feedList.getStore() }) })
|
|
81
92
|
] }),
|
|
82
|
-
m ===
|
|
83
|
-
|
|
93
|
+
m === n.LEADERBOARD && /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(
|
|
94
|
+
O,
|
|
84
95
|
{
|
|
85
|
-
|
|
96
|
+
renderClipBoardNode: C,
|
|
86
97
|
scrollStore: o,
|
|
87
|
-
scrollNode:
|
|
98
|
+
scrollNode: b,
|
|
88
99
|
gamification: i
|
|
89
100
|
}
|
|
90
101
|
) })
|
|
91
102
|
] });
|
|
92
103
|
};
|
|
93
104
|
export {
|
|
94
|
-
|
|
105
|
+
qr as Tabs
|
|
95
106
|
};
|
|
@@ -2,13 +2,17 @@ import { GamificationOverlay as o } from "./index.js";
|
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "@linaria/react";
|
|
4
4
|
import "@nanostores/react";
|
|
5
|
-
import "../../../../useClipboardCopy-E5rEe6It.js";
|
|
6
5
|
import "react";
|
|
6
|
+
import "../../../../useClipboardCopy-E5rEe6It.js";
|
|
7
7
|
import "../../../../index-uEuzH3jr.js";
|
|
8
8
|
import "../../../gamification/copyNotification/index.js";
|
|
9
9
|
import "../../../icons/index.js";
|
|
10
10
|
import "../../../gamification/copyNotification/styles.js";
|
|
11
11
|
import "../../styles.js";
|
|
12
|
+
import "../../useSdkScroll.js";
|
|
13
|
+
import "lodash.throttle";
|
|
14
|
+
import "../../../theme/constants.js";
|
|
15
|
+
import "../../../../index-keh7OLCY.js";
|
|
12
16
|
import "../../../gamification/detail/header/index.js";
|
|
13
17
|
import "@streamlayer/sdk-web-types";
|
|
14
18
|
import "../../../gamification/constants.js";
|
|
@@ -37,7 +41,6 @@ import "../../../gamification/vote/vote-option/styles.js";
|
|
|
37
41
|
import "../../../gamification/vote/win-bar/index.js";
|
|
38
42
|
import "../../../timer/index.js";
|
|
39
43
|
import "react-countdown-circle-timer";
|
|
40
|
-
import "../../../theme/constants.js";
|
|
41
44
|
import "../../../gamification/vote/win-bar/styles.js";
|
|
42
45
|
import "../../../gamification/vote/insight-details/index.js";
|
|
43
46
|
import "../../../questions/insight/index.js";
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type Gamification as GamificationClass } from '@streamlayer/feature-gamification';
|
|
3
|
+
import type { AppNodeRef, ScrollNodeRef, HeaderNodeRef } from '../../masters';
|
|
4
|
+
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
5
|
import { ScrollStore } from '../../useSdkScroll';
|
|
4
6
|
export declare const GamificationOverlay: React.FC<{
|
|
5
7
|
gamification: GamificationClass;
|
|
6
8
|
className?: string;
|
|
7
9
|
scrollStore: ScrollStore;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
responsiveStore: ResponsiveStore;
|
|
11
|
+
appNode: AppNodeRef;
|
|
12
|
+
scrollNode: ScrollNodeRef;
|
|
13
|
+
headerNode: HeaderNodeRef;
|
|
10
14
|
}>;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useStore as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import "
|
|
1
|
+
import { jsxs as d, jsx as t, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { styled as S } from "@linaria/react";
|
|
3
|
+
import { useStore as f } from "@nanostores/react";
|
|
4
|
+
import { useRef as v, useMemo as x, useEffect as R } from "react";
|
|
5
|
+
import { r as y } from "../../../../useClipboardCopy-E5rEe6It.js";
|
|
6
|
+
import { SDKWhiteContainer as F } from "../../styles.js";
|
|
7
|
+
import { scrollIntoAppView as O } from "../../useSdkScroll.js";
|
|
8
|
+
import { VoteHeader as T } from "../../../gamification/detail/header/index.js";
|
|
9
|
+
import { UserStatistics as A } from "../../../gamification/user-statistics/index.js";
|
|
10
|
+
import { ShowIn as P } from "../../../show-in/index.js";
|
|
11
|
+
import { Question as Q } from "./Question.js";
|
|
12
|
+
import { Tabs as j } from "./Tabs.js";
|
|
12
13
|
import "../../../../index-uEuzH3jr.js";
|
|
13
14
|
import "../../../gamification/copyNotification/index.js";
|
|
14
15
|
import "../../../icons/index.js";
|
|
15
16
|
import "../../../gamification/copyNotification/styles.js";
|
|
17
|
+
import "lodash.throttle";
|
|
18
|
+
import "../../../theme/constants.js";
|
|
19
|
+
import "../../../../index-keh7OLCY.js";
|
|
16
20
|
import "@streamlayer/sdk-web-types";
|
|
17
21
|
import "../../../gamification/constants.js";
|
|
18
22
|
import "../../../gamification/detail/header/styles.js";
|
|
@@ -37,7 +41,6 @@ import "../../../gamification/vote/vote-option/styles.js";
|
|
|
37
41
|
import "../../../gamification/vote/win-bar/index.js";
|
|
38
42
|
import "../../../timer/index.js";
|
|
39
43
|
import "react-countdown-circle-timer";
|
|
40
|
-
import "../../../theme/constants.js";
|
|
41
44
|
import "../../../gamification/vote/win-bar/styles.js";
|
|
42
45
|
import "../../../gamification/vote/insight-details/index.js";
|
|
43
46
|
import "../../../questions/insight/index.js";
|
|
@@ -79,56 +82,94 @@ import "../../../button/index.js";
|
|
|
79
82
|
import "../../../button/styles.js";
|
|
80
83
|
import "../../../gamification/question/list/styles.js";
|
|
81
84
|
import "./UserSummary.js";
|
|
82
|
-
const
|
|
85
|
+
const D = () => P, I = /* @__PURE__ */ S(D())({
|
|
83
86
|
name: "OpenedContainer",
|
|
84
87
|
class: "oar61gl",
|
|
85
88
|
propsAsIs: !0
|
|
86
|
-
}),
|
|
89
|
+
}), E = /* @__PURE__ */ S("div")({
|
|
87
90
|
name: "UserContainer",
|
|
88
91
|
class: "u14zaal4",
|
|
89
92
|
propsAsIs: !1
|
|
90
|
-
}),
|
|
93
|
+
}), M = ({
|
|
91
94
|
correct: r,
|
|
92
|
-
incorrect:
|
|
95
|
+
incorrect: s
|
|
93
96
|
}) => {
|
|
94
|
-
const o = r +
|
|
97
|
+
const o = r + s;
|
|
95
98
|
return o === 0 ? 0 : Math.round(r / o * 100);
|
|
96
|
-
},
|
|
99
|
+
}, z = `
|
|
100
|
+
body {
|
|
101
|
+
overflow: hidden
|
|
102
|
+
}
|
|
103
|
+
`, wt = ({
|
|
97
104
|
gamification: r,
|
|
98
|
-
scrollStore:
|
|
105
|
+
scrollStore: s,
|
|
99
106
|
className: o,
|
|
100
107
|
appNode: i,
|
|
101
|
-
scrollNode:
|
|
108
|
+
scrollNode: k,
|
|
109
|
+
headerNode: l,
|
|
110
|
+
responsiveStore: a
|
|
102
111
|
}) => {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
112
|
+
const c = f(r.openedQuestion.$store), m = f(r.openedUser), {
|
|
113
|
+
sdkInScrollView: e
|
|
114
|
+
} = f(a, {
|
|
115
|
+
keys: ["sdkInScrollView"]
|
|
116
|
+
}), p = v(0), [C, w] = x(() => {
|
|
117
|
+
var h;
|
|
118
|
+
const u = e ? i : l, n = (((h = i.current) == null ? void 0 : h.getBoundingClientRect().y) || 0) < 0;
|
|
119
|
+
if ((c || m) && u.current) {
|
|
120
|
+
n && (p.current = window.scrollY);
|
|
121
|
+
const U = () => (R(() => {
|
|
122
|
+
const V = setTimeout(() => {
|
|
123
|
+
O(i, {
|
|
124
|
+
behavior: "instant"
|
|
125
|
+
});
|
|
126
|
+
}, 1e3);
|
|
127
|
+
return () => {
|
|
128
|
+
clearTimeout(V), p.current !== 0 && (window.scroll({
|
|
129
|
+
top: p.current
|
|
130
|
+
}), p.current = 0);
|
|
131
|
+
};
|
|
132
|
+
}, []), /* @__PURE__ */ t("style", {
|
|
133
|
+
children: z
|
|
134
|
+
}));
|
|
135
|
+
return [n, c ? y.createPortal(/* @__PURE__ */ d(I, {
|
|
136
|
+
className: o,
|
|
137
|
+
children: [/* @__PURE__ */ t(Q, {
|
|
138
|
+
gamification: r
|
|
139
|
+
}), n && !e && /* @__PURE__ */ t(U, {})]
|
|
140
|
+
}), u.current) : m ? y.createPortal(/* @__PURE__ */ t(I, {
|
|
141
|
+
className: o,
|
|
142
|
+
children: /* @__PURE__ */ d(E, {
|
|
143
|
+
children: [/* @__PURE__ */ t(T, {
|
|
144
|
+
label: "Friend's Rank",
|
|
145
|
+
close: r.closeUser
|
|
146
|
+
}), /* @__PURE__ */ t(F, {
|
|
147
|
+
children: /* @__PURE__ */ t(A, {
|
|
148
|
+
...m,
|
|
149
|
+
successRate: M(m)
|
|
150
|
+
})
|
|
151
|
+
})]
|
|
152
|
+
})
|
|
153
|
+
}), u.current) : null];
|
|
154
|
+
}
|
|
155
|
+
return [n, null];
|
|
156
|
+
}, [i, o, r, l, c, m, e]);
|
|
157
|
+
return /* @__PURE__ */ d(b, {
|
|
158
|
+
children: [w, /* @__PURE__ */ t(j, {
|
|
124
159
|
appNode: i,
|
|
125
|
-
|
|
126
|
-
|
|
160
|
+
headerNode: l,
|
|
161
|
+
scrollStore: s,
|
|
162
|
+
scrollNode: k,
|
|
127
163
|
className: o,
|
|
128
|
-
gamification: r
|
|
164
|
+
gamification: r,
|
|
165
|
+
responsiveStore: a,
|
|
166
|
+
style: !e && !C && w !== null ? {
|
|
167
|
+
height: "0",
|
|
168
|
+
overflow: "hidden"
|
|
169
|
+
} : {}
|
|
129
170
|
})]
|
|
130
171
|
});
|
|
131
172
|
};
|
|
132
173
|
export {
|
|
133
|
-
|
|
174
|
+
wt as GamificationOverlay
|
|
134
175
|
};
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Features } from '@streamlayer/sdk-web-features';
|
|
3
3
|
import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
4
|
+
import type { AppNodeRef, ScrollNodeRef, HeaderNodeRef } from '../masters';
|
|
5
|
+
import { ResponsiveStore } from '../useSdkResponsive';
|
|
4
6
|
import { ScrollStore } from '../useSdkScroll';
|
|
5
7
|
/** render feature by type */
|
|
6
8
|
export declare const ActiveFeature: React.FC<{
|
|
7
9
|
sdk: StreamLayerSDK;
|
|
8
10
|
feature: Features | null;
|
|
9
11
|
scrollStore: ScrollStore;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
responsiveStore: ResponsiveStore;
|
|
13
|
+
appNode: AppNodeRef;
|
|
14
|
+
scrollNode: ScrollNodeRef;
|
|
15
|
+
headerNode: HeaderNodeRef;
|
|
12
16
|
className?: string;
|
|
13
17
|
}>;
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { lazy as
|
|
3
|
-
import { FeatureType as
|
|
4
|
-
import { FeatureProvider as
|
|
2
|
+
import { lazy as f, useMemo as c, Suspense as a } from "react";
|
|
3
|
+
import { FeatureType as g } from "@streamlayer/sdk-web-types";
|
|
4
|
+
import { FeatureProvider as y } from "./FeatureProvider.js";
|
|
5
5
|
import "@nanostores/react";
|
|
6
6
|
import "@streamlayer/sdk-web-interfaces";
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
7
|
+
const h = f(() => import("./Gamification/gamification-feature.js")), A = ({ sdk: n, feature: t, className: r, scrollStore: e, appNode: o, scrollNode: m, headerNode: l, responsiveStore: p }) => {
|
|
8
|
+
const u = c(() => t && t.featureConfig.get().type === g.GAMES ? /* @__PURE__ */ i(y, { className: r, sdk: n, feature: t, children: /* @__PURE__ */ i(
|
|
9
|
+
h,
|
|
10
10
|
{
|
|
11
11
|
appNode: o,
|
|
12
|
-
scrollStore:
|
|
12
|
+
scrollStore: e,
|
|
13
13
|
scrollNode: m,
|
|
14
|
+
headerNode: l,
|
|
14
15
|
className: r,
|
|
16
|
+
responsiveStore: p,
|
|
15
17
|
gamification: t
|
|
16
18
|
}
|
|
17
|
-
) }) : null, [
|
|
19
|
+
) }) : null, [n, t, r, p, e, m, o, l]);
|
|
18
20
|
return /* @__PURE__ */ i(
|
|
19
|
-
|
|
21
|
+
a,
|
|
20
22
|
{
|
|
21
23
|
fallback: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
22
|
-
children:
|
|
24
|
+
children: u
|
|
23
25
|
}
|
|
24
26
|
);
|
|
25
27
|
};
|
|
26
28
|
export {
|
|
27
|
-
|
|
29
|
+
A as ActiveFeature
|
|
28
30
|
};
|
|
@@ -4,9 +4,10 @@ import { FeaturedGroupsButtonId } from '../../../navigation/button/FeaturedGroup
|
|
|
4
4
|
import { LeaderBoardButtonId } from '../../../navigation/button/LeaderBoard';
|
|
5
5
|
export { ChannelsButtonId, LeaderBoardButtonId, FeaturedGroupsButtonId };
|
|
6
6
|
export type AvailableOverlays = typeof ChannelsButtonId | typeof LeaderBoardButtonId | typeof FeaturedGroupsButtonId;
|
|
7
|
-
|
|
7
|
+
type MastersNavigationProps = {
|
|
8
8
|
activeOverlay: AvailableOverlays;
|
|
9
9
|
setActiveOverlay: (overlay: AvailableOverlays) => void;
|
|
10
10
|
sdkReady: boolean;
|
|
11
11
|
className?: string;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
export declare const MastersNavigation: import("react").ForwardRefExoticComponent<MastersNavigationProps & import("react").RefAttributes<HTMLDivElement | null>>;
|
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as d } from "react";
|
|
3
|
+
import { ChannelsButton as s, ChannelsButtonId as n } from "../../../navigation/button/Channels.js";
|
|
4
|
+
import { FeaturedGroupsButton as u, FeaturedGroupsButtonId as m } from "../../../navigation/button/FeaturedGroups.js";
|
|
5
|
+
import { LeaderBoardButtonId as b } from "../../../navigation/button/LeaderBoard.js";
|
|
6
|
+
import { Navigation as f, NavigationItems as B } from "../../../navigation/masters.js";
|
|
6
7
|
import "@linaria/react";
|
|
7
8
|
import "../../../icons/index.js";
|
|
8
|
-
import "react";
|
|
9
9
|
import "../../../navigation/button/index.js";
|
|
10
10
|
import "../../../navigation/button/styles.js";
|
|
11
|
-
import "../../../../LeaderBoard_fzzlxb-w40geAFS.js";
|
|
12
11
|
import "../../../navigation/index.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
const v = d(
|
|
13
|
+
({ activeOverlay: t, setActiveOverlay: r, sdkReady: a, className: e }, p) => /* @__PURE__ */ i(f, { className: e, children: [
|
|
14
|
+
/* @__PURE__ */ i(B, { children: [
|
|
15
|
+
/* @__PURE__ */ o(
|
|
16
|
+
s,
|
|
17
|
+
{
|
|
18
|
+
active: t === n,
|
|
19
|
+
onClick: () => r(n)
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ o(
|
|
23
|
+
u,
|
|
24
|
+
{
|
|
25
|
+
active: t === m,
|
|
26
|
+
disabled: !a,
|
|
27
|
+
onClick: () => {
|
|
28
|
+
r(m);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ o(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
ref: p
|
|
24
37
|
}
|
|
25
|
-
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
e,
|
|
29
|
-
{
|
|
30
|
-
active: o === n,
|
|
31
|
-
onClick: () => t(n)
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
] });
|
|
38
|
+
)
|
|
39
|
+
] })
|
|
40
|
+
);
|
|
35
41
|
export {
|
|
36
|
-
|
|
42
|
+
n as ChannelsButtonId,
|
|
37
43
|
m as FeaturedGroupsButtonId,
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
b as LeaderBoardButtonId,
|
|
45
|
+
v as MastersNavigation
|
|
40
46
|
};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useStore as s } from "@nanostores/react";
|
|
3
|
-
import { useMemo as
|
|
3
|
+
import { useMemo as e } from "react";
|
|
4
4
|
import { AvailableFeatures as d } from "@streamlayer/sdk-web-features";
|
|
5
5
|
import { Navigation as v } from "../../navigation/index.js";
|
|
6
6
|
import { Button as b } from "../../navigation/button/index.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
|
-
import "../../../index_ej4hfx-w40geAFS.js";
|
|
9
8
|
import "../../navigation/button/styles.js";
|
|
10
|
-
const
|
|
11
|
-
const t = s(i.sdkStore.organizationSettings), r = s(i.sdkStore.streamSettings), a =
|
|
9
|
+
const N = ({ customOverlays: p, activeButton: m, sdk: i }) => {
|
|
10
|
+
const t = s(i.sdkStore.organizationSettings), r = s(i.sdkStore.streamSettings), a = e(() => {
|
|
12
11
|
const o = (r == null ? void 0 : r.data) || (t == null ? void 0 : t.data);
|
|
13
12
|
return o != null && o.overlays ? o.overlays : [];
|
|
14
|
-
}, [t, r]), c =
|
|
13
|
+
}, [t, r]), c = e(
|
|
15
14
|
() => [
|
|
16
15
|
...a.filter(({ enableSdkButton: o }) => o).map((o) => ({
|
|
17
16
|
id: o.type,
|
|
@@ -26,8 +25,8 @@ const h = ({ customOverlays: p, activeButton: e, sdk: i }) => {
|
|
|
26
25
|
].sort((o, l) => o.position - l.position),
|
|
27
26
|
[a, i, p]
|
|
28
27
|
);
|
|
29
|
-
return /* @__PURE__ */ n(v, { children: c.map((o) => /* @__PURE__ */ n(b, { ...o, active: o.id ===
|
|
28
|
+
return /* @__PURE__ */ n(v, { children: c.map((o) => /* @__PURE__ */ n(b, { ...o, active: o.id === m })) });
|
|
30
29
|
};
|
|
31
30
|
export {
|
|
32
|
-
|
|
31
|
+
N as SDKNavigation
|
|
33
32
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
3
3
|
import { type Notification } from '@streamlayer/sdk-web-notifications';
|
|
4
|
+
import { HeaderNodeRef, type AppNodeRef } from '../../masters';
|
|
4
5
|
export declare const Onboarding: React.FC<{
|
|
5
6
|
sdk: StreamLayerSDK;
|
|
6
7
|
notification: Notification;
|
|
7
8
|
saveHeight: (height: number) => void;
|
|
8
|
-
|
|
9
|
+
renderToNode: AppNodeRef | HeaderNodeRef;
|
|
9
10
|
style?: React.CSSProperties;
|
|
10
11
|
}>;
|