@streamlayer/react-ui 0.91.0 → 0.92.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/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 +35 -28
- package/lib/ui/app/Features/Gamification/gamification-feature.js +1 -1
- package/lib/ui/app/Features/Gamification/index.d.ts +6 -2
- package/lib/ui/app/Features/Gamification/index.js +81 -44
- 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 +34 -30
- 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 +53 -46
- package/lib/ui/app/Notifications/index.d.ts +6 -2
- package/lib/ui/app/Notifications/index.js +114 -90
- package/lib/ui/app/masters.d.ts +7 -0
- package/lib/ui/app/masters.js +67 -51
- package/lib/ui/app/useClipboardCopy.d.ts +2 -1
- 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 +3 -1
- package/lib/ui/app/useSdkScroll.js +28 -85
- package/lib/ui/gamification/leaderboard/static.d.ts +2 -1
- package/lib/ui/gamification/onboarding/index.d.ts +4 -0
- package/lib/ui/gamification/onboarding/index.js +56 -40
- 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-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/vote/index.js +43 -43
- 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 +20 -20
- package/lib/ui/navigation/button/LeaderBoard.js +5 -6
- package/lib/ui/navigation/index.js +6 -7
- package/lib/ui/navigation/masters.js +3 -5
- package/lib/ui/questions/insight/index.js +24 -25
- package/lib/utils/createDemo.js +12 -13
- package/lib/utils/debug/components/copyLogs.js +10 -9
- package/package.json +13 -13
- 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,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { jsxs as f, jsx as t, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { useStore as D } from "@nanostores/react";
|
|
3
|
+
import { useState as u, useTransition as P, useEffect as A } from "react";
|
|
4
|
+
import { TabsContainer as E, TabsNavContainer as L, SDKWhiteContainer as K, SDKContentContainer as k, LeaderboardContainer as I } from "../../styles.js";
|
|
5
|
+
import { ActivePages as s, Tabs as O } from "../../../gamification/tabs/index.js";
|
|
6
|
+
import { Leaderboard as Q } from "./Leaderboard.js";
|
|
7
|
+
import { QuestionsList as V } from "./QuestionsList.js";
|
|
8
|
+
import { UserSummary as j } from "./UserSummary.js";
|
|
8
9
|
import "@linaria/react";
|
|
9
10
|
import "../../../gamification/tabs/styles.js";
|
|
10
|
-
import "@nanostores/react";
|
|
11
11
|
import "../../../../useClipboardCopy-E5rEe6It.js";
|
|
12
12
|
import "../../../../index-uEuzH3jr.js";
|
|
13
13
|
import "../../../gamification/copyNotification/index.js";
|
|
@@ -53,43 +53,50 @@ import "../../../gamification/user-statistics/components/rank/styles.js";
|
|
|
53
53
|
import "../../../gamification/user-statistics/components/statistic/index.js";
|
|
54
54
|
import "../../../gamification/user-statistics/components/statistic/styles.js";
|
|
55
55
|
import "../../../gamification/user-statistics/styles.js";
|
|
56
|
-
const
|
|
57
|
-
const [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
const Ht = ({ gamification: i, className: b, scrollStore: o, scrollNode: h, appNode: n, style: T, responsiveStore: x, headerNode: y }) => {
|
|
57
|
+
const [a, g] = u(!1), [e, S] = u(s.HOME), [, l] = P(), { sdkInScrollView: m } = D(x, { keys: ["sdkInScrollView"] }), w = (r) => {
|
|
58
|
+
l(() => {
|
|
59
|
+
var c;
|
|
60
|
+
S(r), m === !1 && ((c = n.current) == null || c.scrollIntoView({ behavior: "instant" }));
|
|
61
|
+
});
|
|
62
|
+
}, d = (r) => {
|
|
63
|
+
l(() => g(r));
|
|
61
64
|
};
|
|
62
|
-
|
|
65
|
+
A(() => o.listen((r) => {
|
|
63
66
|
if (r.scrollPosition === 0) {
|
|
64
|
-
|
|
67
|
+
d(!1), o.setKey("tabsShown", !1);
|
|
65
68
|
return;
|
|
66
69
|
}
|
|
67
|
-
|
|
68
|
-
}), [o])
|
|
70
|
+
d(r.scrollDirection === "forward"), o.setKey("tabsShown", r.scrollDirection !== "forward");
|
|
71
|
+
}), [o]);
|
|
72
|
+
let p = "0px";
|
|
73
|
+
m ? p = a ? "-60px" : "0px" : p = a ? "0px" : "68px";
|
|
74
|
+
const C = m ? n : y;
|
|
75
|
+
return /* @__PURE__ */ f(E, { className: b, style: T, children: [
|
|
69
76
|
/* @__PURE__ */ t(
|
|
70
|
-
|
|
77
|
+
L,
|
|
71
78
|
{
|
|
72
79
|
style: {
|
|
73
|
-
top:
|
|
80
|
+
top: p
|
|
74
81
|
},
|
|
75
|
-
children: /* @__PURE__ */ t(
|
|
82
|
+
children: /* @__PURE__ */ t(O, { activePage: e, toggleActivePage: w })
|
|
76
83
|
}
|
|
77
84
|
),
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */ t(
|
|
80
|
-
/* @__PURE__ */ t(
|
|
85
|
+
e === s.HOME && /* @__PURE__ */ f(v, { children: [
|
|
86
|
+
/* @__PURE__ */ t(K, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ t(j, { userSummary: i.userSummary }) }),
|
|
87
|
+
/* @__PURE__ */ t(k, { style: { flex: 1 }, children: /* @__PURE__ */ t(V, { openQuestion: i.openQuestion, store: i.feedList.getStore() }) })
|
|
81
88
|
] }),
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
e === s.LEADERBOARD && /* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(
|
|
90
|
+
Q,
|
|
84
91
|
{
|
|
85
|
-
|
|
92
|
+
renderClipBoardNode: C,
|
|
86
93
|
scrollStore: o,
|
|
87
|
-
scrollNode:
|
|
94
|
+
scrollNode: h,
|
|
88
95
|
gamification: i
|
|
89
96
|
}
|
|
90
97
|
) })
|
|
91
98
|
] });
|
|
92
99
|
};
|
|
93
100
|
export {
|
|
94
|
-
|
|
101
|
+
Ht as Tabs
|
|
95
102
|
};
|
|
@@ -2,8 +2,8 @@ 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";
|
|
@@ -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,14 +1,14 @@
|
|
|
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 R } from "react/jsx-runtime";
|
|
2
|
+
import { styled as k } from "@linaria/react";
|
|
3
|
+
import { useStore as f } from "@nanostores/react";
|
|
4
|
+
import { useRef as b, useMemo as v, useEffect as F } from "react";
|
|
5
|
+
import { r as I } from "../../../../useClipboardCopy-E5rEe6It.js";
|
|
6
|
+
import { SDKWhiteContainer as O } from "../../styles.js";
|
|
7
|
+
import { VoteHeader as T } from "../../../gamification/detail/header/index.js";
|
|
8
|
+
import { UserStatistics as P } from "../../../gamification/user-statistics/index.js";
|
|
9
|
+
import { ShowIn as Q } from "../../../show-in/index.js";
|
|
10
|
+
import { Question as j } from "./Question.js";
|
|
11
|
+
import { Tabs as A } from "./Tabs.js";
|
|
12
12
|
import "../../../../index-uEuzH3jr.js";
|
|
13
13
|
import "../../../gamification/copyNotification/index.js";
|
|
14
14
|
import "../../../icons/index.js";
|
|
@@ -79,56 +79,93 @@ import "../../../button/index.js";
|
|
|
79
79
|
import "../../../button/styles.js";
|
|
80
80
|
import "../../../gamification/question/list/styles.js";
|
|
81
81
|
import "./UserSummary.js";
|
|
82
|
-
const
|
|
82
|
+
const D = () => Q, S = /* @__PURE__ */ k(D())({
|
|
83
83
|
name: "OpenedContainer",
|
|
84
84
|
class: "oar61gl",
|
|
85
85
|
propsAsIs: !0
|
|
86
|
-
}),
|
|
86
|
+
}), E = /* @__PURE__ */ k("div")({
|
|
87
87
|
name: "UserContainer",
|
|
88
88
|
class: "u14zaal4",
|
|
89
89
|
propsAsIs: !1
|
|
90
|
-
}),
|
|
90
|
+
}), M = ({
|
|
91
91
|
correct: r,
|
|
92
|
-
incorrect:
|
|
92
|
+
incorrect: s
|
|
93
93
|
}) => {
|
|
94
|
-
const o = r +
|
|
94
|
+
const o = r + s;
|
|
95
95
|
return o === 0 ? 0 : Math.round(r / o * 100);
|
|
96
|
-
},
|
|
96
|
+
}, z = `
|
|
97
|
+
body {
|
|
98
|
+
overflow: hidden
|
|
99
|
+
}
|
|
100
|
+
`, dt = ({
|
|
97
101
|
gamification: r,
|
|
98
|
-
scrollStore:
|
|
102
|
+
scrollStore: s,
|
|
99
103
|
className: o,
|
|
100
104
|
appNode: i,
|
|
101
|
-
scrollNode:
|
|
105
|
+
scrollNode: C,
|
|
106
|
+
headerNode: l,
|
|
107
|
+
responsiveStore: a
|
|
102
108
|
}) => {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
})
|
|
121
|
-
}
|
|
122
|
-
})
|
|
123
|
-
|
|
109
|
+
const c = f(r.openedQuestion.$store), e = f(r.openedUser), {
|
|
110
|
+
sdkInScrollView: m
|
|
111
|
+
} = f(a, {
|
|
112
|
+
keys: ["sdkInScrollView"]
|
|
113
|
+
}), p = b(0), [U, w] = v(() => {
|
|
114
|
+
var h;
|
|
115
|
+
const u = m ? i : l, n = (((h = i.current) == null ? void 0 : h.getBoundingClientRect().y) || 0) < 0;
|
|
116
|
+
if ((c || e) && u.current) {
|
|
117
|
+
n && (p.current = window.scrollY);
|
|
118
|
+
const V = () => (F(() => {
|
|
119
|
+
const x = setTimeout(() => {
|
|
120
|
+
var y;
|
|
121
|
+
(y = i.current) == null || y.scrollIntoView();
|
|
122
|
+
}, 1e3);
|
|
123
|
+
return () => {
|
|
124
|
+
clearTimeout(x), p.current !== 0 && (window.scroll({
|
|
125
|
+
top: p.current
|
|
126
|
+
}), p.current = 0);
|
|
127
|
+
};
|
|
128
|
+
}, []), /* @__PURE__ */ t("style", {
|
|
129
|
+
children: z
|
|
130
|
+
}));
|
|
131
|
+
return [n, c ? I.createPortal(/* @__PURE__ */ d(S, {
|
|
132
|
+
className: o,
|
|
133
|
+
children: [/* @__PURE__ */ t(j, {
|
|
134
|
+
gamification: r
|
|
135
|
+
}), n && !m && /* @__PURE__ */ t(V, {})]
|
|
136
|
+
}), u.current) : e ? I.createPortal(/* @__PURE__ */ t(S, {
|
|
137
|
+
className: o,
|
|
138
|
+
children: /* @__PURE__ */ d(E, {
|
|
139
|
+
children: [/* @__PURE__ */ t(T, {
|
|
140
|
+
label: "Friend's Rank",
|
|
141
|
+
close: r.closeUser
|
|
142
|
+
}), /* @__PURE__ */ t(O, {
|
|
143
|
+
children: /* @__PURE__ */ t(P, {
|
|
144
|
+
...e,
|
|
145
|
+
successRate: M(e)
|
|
146
|
+
})
|
|
147
|
+
})]
|
|
148
|
+
})
|
|
149
|
+
}), u.current) : null];
|
|
150
|
+
}
|
|
151
|
+
return [n, null];
|
|
152
|
+
}, [i, o, r, l, c, e, m]);
|
|
153
|
+
return /* @__PURE__ */ d(R, {
|
|
154
|
+
children: [w, /* @__PURE__ */ t(A, {
|
|
124
155
|
appNode: i,
|
|
125
|
-
|
|
126
|
-
|
|
156
|
+
headerNode: l,
|
|
157
|
+
scrollStore: s,
|
|
158
|
+
scrollNode: C,
|
|
127
159
|
className: o,
|
|
128
|
-
gamification: r
|
|
160
|
+
gamification: r,
|
|
161
|
+
responsiveStore: a,
|
|
162
|
+
style: !m && !U && w !== null ? {
|
|
163
|
+
height: "0",
|
|
164
|
+
overflow: "hidden"
|
|
165
|
+
} : {}
|
|
129
166
|
})]
|
|
130
167
|
});
|
|
131
168
|
};
|
|
132
169
|
export {
|
|
133
|
-
|
|
170
|
+
dt as GamificationOverlay
|
|
134
171
|
};
|
|
@@ -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,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as e } from "react";
|
|
3
|
+
import { ChannelsButton as s, ChannelsButtonId as i } 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 } 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
|
-
active: o === m,
|
|
21
|
-
disabled: !p,
|
|
22
|
-
onClick: () => {
|
|
23
|
-
t(m);
|
|
12
|
+
const F = e(
|
|
13
|
+
({ activeOverlay: r, setActiveOverlay: t, sdkReady: n, className: p }, a) => /* @__PURE__ */ d(f, { className: p, children: [
|
|
14
|
+
/* @__PURE__ */ o(
|
|
15
|
+
s,
|
|
16
|
+
{
|
|
17
|
+
active: r === i,
|
|
18
|
+
onClick: () => t(i)
|
|
24
19
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
),
|
|
21
|
+
/* @__PURE__ */ o(
|
|
22
|
+
u,
|
|
23
|
+
{
|
|
24
|
+
active: r === m,
|
|
25
|
+
disabled: !n,
|
|
26
|
+
onClick: () => {
|
|
27
|
+
t(m);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ o(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
ref: a
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] })
|
|
38
|
+
);
|
|
35
39
|
export {
|
|
36
40
|
i as ChannelsButtonId,
|
|
37
41
|
m as FeaturedGroupsButtonId,
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
b as LeaderBoardButtonId,
|
|
43
|
+
F as MastersNavigation
|
|
40
44
|
};
|
|
@@ -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
|
}>;
|