@streamlayer/react-ui 0.84.0 → 0.85.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 (40) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/index-39a0b9b6.js +1168 -0
  3. package/lib/index-ba93b6b2.js +19529 -0
  4. package/lib/styles_hxnaic-4ed993c7.js +1 -0
  5. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +3 -1
  6. package/lib/ui/app/Features/Gamification/Leaderboard.js +18 -21
  7. package/lib/ui/app/Features/Gamification/Tabs.d.ts +4 -0
  8. package/lib/ui/app/Features/Gamification/Tabs.js +40 -78
  9. package/lib/ui/app/Features/Gamification/gamification-feature.js +7 -5
  10. package/lib/ui/app/Features/Gamification/index.d.ts +4 -0
  11. package/lib/ui/app/Features/Gamification/index.js +44 -40
  12. package/lib/ui/app/Features/index.d.ts +4 -0
  13. package/lib/ui/app/Features/index.js +19 -14
  14. package/lib/ui/app/Navigation/MastersNavigation/index.js +1 -1
  15. package/lib/ui/app/Notifications/index.d.ts +4 -0
  16. package/lib/ui/app/Notifications/index.js +105 -53
  17. package/lib/ui/app/Notifications/styles.d.ts +1 -0
  18. package/lib/ui/app/Notifications/styles.js +17 -8
  19. package/lib/ui/app/masters.js +60 -47
  20. package/lib/ui/app/useMastersApp.js +1 -1
  21. package/lib/ui/app/useSdkScroll.d.ts +9 -0
  22. package/lib/ui/app/useSdkScroll.js +93 -0
  23. package/lib/ui/gamification/leaderboard/index.d.ts +1 -1
  24. package/lib/ui/gamification/leaderboard/index.js +24 -20
  25. package/lib/ui/gamification/leaderboard/static.d.ts +14 -0
  26. package/lib/ui/gamification/leaderboard/static.js +36 -0
  27. package/lib/ui/gamification/leaderboard/styles.js +3 -2
  28. package/lib/ui/gamification/question/notification/pill/index.d.ts +2 -0
  29. package/lib/ui/gamification/question/notification/pill/index.js +7 -7
  30. package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +1 -1
  31. package/lib/ui/gamification/vote/index.js +22 -22
  32. package/lib/ui/gamification/vote/vote-option/index.js +18 -18
  33. package/lib/ui/gamification/vote/vote-option/styles.js +2 -2
  34. package/lib/ui/gamification/vote/win-bar/index.js +19 -19
  35. package/lib/ui/gamification/vote/win-bar/styles.js +6 -6
  36. package/lib/ui/navigation/masters.js +1 -1
  37. package/lib/ui/show-in/index.js +2 -2
  38. package/lib/ui/theme/theme.js +19 -18
  39. package/package.json +8 -6
  40. /package/lib/{masters_k70xsy-4ed993c7.js → masters_1wv7w2k-4ed993c7.js} +0 -0
@@ -0,0 +1 @@
1
+
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import type { Gamification } from '@streamlayer/feature-gamification';
3
+ import { ScrollStore } from '../../../app/useSdkScroll';
3
4
  export declare const Leaderboard: React.FC<{
4
5
  gamification: Gamification;
5
- hideTabs: (hide: boolean) => void;
6
+ scrollNode: React.MutableRefObject<HTMLDivElement | null>;
7
+ scrollStore: ScrollStore;
6
8
  }>;
@@ -1,37 +1,34 @@
1
- import { jsx as l } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import { useStore as i } from "@nanostores/react";
3
- import n from "lodash.throttle";
4
- import { useRef as p, useCallback as c } from "react";
5
- import { LeaderboardList as f } from "../../../gamification/leaderboard/index.js";
6
- import { Friends as d } from "./Friends.js";
7
3
  import "react-virtualized-auto-sizer";
8
4
  import "react-window";
9
5
  import "react-window-infinite-loader";
10
- import "../../../gamification/leaderboard/list-item/index.js";
11
- import "../../../../utils/common.js";
12
- import "../../../gamification/leaderboard/list-item/styles.js";
13
6
  import "@linaria/react";
7
+ import "react";
14
8
  import "../../../icons/index.js";
15
- import "../../../gamification/leaderboard/styles.js";
9
+ import "../../../gamification/leaderboard/list-item/styles.js";
10
+ import "../../../../styles_hxnaic-4ed993c7.js";
11
+ import { LeaderboardStaticList as s } from "../../../gamification/leaderboard/static.js";
12
+ import { Friends as d } from "./Friends.js";
13
+ import "react-infinite-scroller";
14
+ import "../../../gamification/leaderboard/list-item/index.js";
15
+ import "../../../../utils/common.js";
16
16
  import "../../../gamification/onboarding/slides/onboarding-invite-card/index.js";
17
17
  import "../../../gamification/onboarding/slides/onboarding-invite-card/styles.js";
18
- const F = ({ gamification: r, hideTabs: o }) => {
19
- const { data: e } = i(r.leaderboardList.$store), s = p(0), m = c(
20
- n((t) => {
21
- Math.abs(s.current - t.scrollOffset) < 112 || (s.current = t.scrollOffset, o(t.scrollOffset !== 0 && t.scrollDirection === "forward"));
22
- }, 200),
23
- [o]
24
- );
25
- return e != null && e.length ? /* @__PURE__ */ l(
26
- f,
18
+ const F = ({ gamification: r, scrollNode: o, scrollStore: p }) => {
19
+ const { data: e, hasMore: m } = i(r.leaderboardList.$store);
20
+ return e != null && e.length ? /* @__PURE__ */ t(
21
+ s,
27
22
  {
28
- fetchMore: r.leaderboardList.fetchMore,
29
23
  items: e,
30
- onScroll: m,
24
+ scrollNode: o,
25
+ scrollStore: p,
26
+ fetchMore: r.leaderboardList.fetchMore,
27
+ hasMore: m,
31
28
  openItemDetail: r.openUser,
32
29
  currentUserId: r.currentUserId.get()
33
30
  }
34
- ) : /* @__PURE__ */ l(d, { deepLink: r.deepLink });
31
+ ) : /* @__PURE__ */ t(d, { deepLink: r.deepLink });
35
32
  };
36
33
  export {
37
34
  F as Leaderboard
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { type Gamification } from '@streamlayer/feature-gamification';
3
+ import { ScrollStore } from '../../../app/useSdkScroll';
3
4
  export declare const Tabs: React.FC<{
4
5
  gamification: Gamification;
6
+ scrollStore: ScrollStore;
7
+ scrollNode: React.MutableRefObject<HTMLDivElement | null>;
8
+ className?: string;
5
9
  }>;
@@ -1,23 +1,23 @@
1
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
- import S from "lodash.throttle";
3
- import { useState as d, useRef as u, useTransition as E, useCallback as y, useEffect as C } from "react";
4
- import { SDKWhiteContainer as f, SDKScrollContainer as D, SDKContentContainer as L } from "../../styles.js";
5
- import { ActivePages as s, Tabs as A } from "../../../gamification/tabs/index.js";
6
- import { Leaderboard as P } from "./Leaderboard.js";
7
- import { QuestionsList as R } from "./QuestionsList.js";
8
- import { UserSummary as w } from "./UserSummary.js";
1
+ import { jsxs as a, jsx as t, Fragment as T } from "react/jsx-runtime";
2
+ import { useState as d, useTransition as b, useEffect as y } from "react";
3
+ import { SDKWhiteContainer as m, SDKContentContainer as x } from "../../styles.js";
4
+ import { ActivePages as e, Tabs as v } from "../../../gamification/tabs/index.js";
5
+ import { Leaderboard as D } from "./Leaderboard.js";
6
+ import { QuestionsList as A } from "./QuestionsList.js";
7
+ import { UserSummary as E } from "./UserSummary.js";
9
8
  import "@linaria/react";
10
9
  import "../../../gamification/tabs/styles.js";
11
10
  import "@nanostores/react";
12
- import "../../../gamification/leaderboard/index.js";
13
11
  import "react-virtualized-auto-sizer";
14
12
  import "react-window";
15
13
  import "react-window-infinite-loader";
14
+ import "../../../icons/index.js";
15
+ import "../../../gamification/leaderboard/list-item/styles.js";
16
+ import "../../../../styles_hxnaic-4ed993c7.js";
17
+ import "../../../gamification/leaderboard/static.js";
18
+ import "react-infinite-scroller";
16
19
  import "../../../gamification/leaderboard/list-item/index.js";
17
20
  import "../../../../utils/common.js";
18
- import "../../../gamification/leaderboard/list-item/styles.js";
19
- import "../../../icons/index.js";
20
- import "../../../gamification/leaderboard/styles.js";
21
21
  import "./Friends.js";
22
22
  import "../../../gamification/onboarding/slides/onboarding-invite-card/index.js";
23
23
  import "../../../gamification/onboarding/slides/onboarding-invite-card/styles.js";
@@ -47,76 +47,38 @@ import "../../../gamification/user-statistics/components/rank/styles.js";
47
47
  import "../../../gamification/user-statistics/components/statistic/index.js";
48
48
  import "../../../gamification/user-statistics/components/statistic/styles.js";
49
49
  import "../../../gamification/user-statistics/styles.js";
50
- const Lr = ({
51
- gamification: i
52
- }) => {
53
- const [h, b] = d(!1), [o, T] = d(s.HOME), m = u(null), e = u(0), [g, l] = E(), v = (r) => {
54
- l(() => T(r));
55
- }, p = (r) => {
56
- l(() => b(r));
57
- }, c = y(S(() => {
58
- const r = m.current;
59
- if (!r)
60
- return;
61
- const {
62
- scrollTop: n
63
- } = r;
64
- if (n === 0) {
65
- e.current = 0, p(!1);
50
+ const xt = ({ gamification: i, className: c, scrollStore: r, scrollNode: u }) => {
51
+ const [f, l] = d(!1), [p, h] = d(e.HOME), [, n] = b(), g = (o) => {
52
+ n(() => h(o));
53
+ }, s = (o) => {
54
+ n(() => l(o));
55
+ };
56
+ return y(() => r.listen((o) => {
57
+ if (o.scrollPosition === 0) {
58
+ s(!1), r.setKey("tabsShown", !1);
66
59
  return;
67
60
  }
68
- if (Math.abs(e.current - n) < 112)
69
- return;
70
- const x = e.current < n ? "forward" : "backward";
71
- e.current = n, p(x === "forward");
72
- }, 200), []);
73
- return C(() => {
74
- const r = m.current;
75
- return r ? (o === s.HOME && r.addEventListener("scroll", c), () => {
76
- r.removeEventListener("scroll", c);
77
- }) : () => {
78
- };
79
- }, [o, c]), /* @__PURE__ */ a("div", {
80
- style: {
81
- height: "100%",
82
- display: "flex",
83
- flexDirection: "column",
84
- overflow: "hidden"
85
- },
86
- children: [g, /* @__PURE__ */ t(f, {
87
- style: {
88
- paddingBottom: "4px",
89
- transition: "margin-top 0.2s ease-in-out",
90
- marginTop: h ? "-56px" : "0px"
91
- },
92
- children: /* @__PURE__ */ t(A, {
93
- activePage: o,
94
- toggleActivePage: v
95
- })
96
- }), o === s.HOME && /* @__PURE__ */ a(D, {
97
- ref: m,
98
- children: [/* @__PURE__ */ t(f, {
61
+ s(o.scrollDirection === "forward"), r.setKey("tabsShown", o.scrollDirection !== "forward");
62
+ }), [r]), /* @__PURE__ */ a("div", { className: c, children: [
63
+ /* @__PURE__ */ t(
64
+ m,
65
+ {
99
66
  style: {
100
- paddingTop: "12px"
67
+ paddingBottom: "8px",
68
+ position: "sticky",
69
+ transition: "top calc(var(--animation-duration) / 2) var(--animation-function)",
70
+ top: f ? "-60px" : "0px"
101
71
  },
102
- children: /* @__PURE__ */ t(w, {
103
- userSummary: i.userSummary
104
- })
105
- }), /* @__PURE__ */ t(L, {
106
- children: /* @__PURE__ */ t(R, {
107
- openQuestion: i.openQuestion,
108
- store: i.feedList.getStore()
109
- })
110
- })]
111
- }), o === s.LEADERBOARD && /* @__PURE__ */ t("div", {
112
- className: "c1bp9dj2",
113
- children: /* @__PURE__ */ t(P, {
114
- gamification: i,
115
- hideTabs: p
116
- })
117
- })]
118
- });
72
+ children: /* @__PURE__ */ t(v, { activePage: p, toggleActivePage: g })
73
+ }
74
+ ),
75
+ p === e.HOME && /* @__PURE__ */ a(T, { children: [
76
+ /* @__PURE__ */ t(m, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ t(E, { userSummary: i.userSummary }) }),
77
+ /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(A, { openQuestion: i.openQuestion, store: i.feedList.getStore() }) })
78
+ ] }),
79
+ p === e.LEADERBOARD && /* @__PURE__ */ t(m, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ t(D, { scrollStore: r, scrollNode: u, gamification: i }) })
80
+ ] });
119
81
  };
120
82
  export {
121
- Lr as Tabs
83
+ xt as Tabs
122
84
  };
@@ -2,13 +2,15 @@ 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 "../../../../index-ba93b6b2.js";
6
+ import "../../../../index-39a0b9b6.js";
7
+ import "react";
5
8
  import "../../styles.js";
6
9
  import "../../../gamification/detail/header/index.js";
7
10
  import "@streamlayer/sdk-web-types";
8
11
  import "../../../gamification/constants.js";
9
12
  import "../../../gamification/detail/header/styles.js";
10
13
  import "../../../icons/index.js";
11
- import "react";
12
14
  import "../../../gamification/user-statistics/index.js";
13
15
  import "../../../../utils/common.js";
14
16
  import "../../../gamification/user-statistics/components/rank/index.js";
@@ -48,17 +50,17 @@ import "../../../questions/twitter/account/styles.js";
48
50
  import "../../../questions/twitter/styles.js";
49
51
  import "../../../gamification/vote/twitter-details/styles.js";
50
52
  import "./Tabs.js";
51
- import "lodash.throttle";
52
53
  import "../../../gamification/tabs/index.js";
53
54
  import "../../../gamification/tabs/styles.js";
54
55
  import "./Leaderboard.js";
55
- import "../../../gamification/leaderboard/index.js";
56
56
  import "react-virtualized-auto-sizer";
57
57
  import "react-window";
58
58
  import "react-window-infinite-loader";
59
- import "../../../gamification/leaderboard/list-item/index.js";
60
59
  import "../../../gamification/leaderboard/list-item/styles.js";
61
- import "../../../gamification/leaderboard/styles.js";
60
+ import "../../../../styles_hxnaic-4ed993c7.js";
61
+ import "../../../gamification/leaderboard/static.js";
62
+ import "react-infinite-scroller";
63
+ import "../../../gamification/leaderboard/list-item/index.js";
62
64
  import "./Friends.js";
63
65
  import "../../../gamification/onboarding/slides/onboarding-invite-card/index.js";
64
66
  import "../../../gamification/onboarding/slides/onboarding-invite-card/styles.js";
@@ -1,6 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { type Gamification as GamificationClass } from '@streamlayer/feature-gamification';
3
+ import { ScrollStore } from '../../../app/useSdkScroll';
3
4
  export declare const GamificationOverlay: React.FC<{
4
5
  gamification: GamificationClass;
5
6
  className?: string;
7
+ scrollStore: ScrollStore;
8
+ appNode: React.MutableRefObject<HTMLDivElement | null>;
9
+ scrollNode: React.MutableRefObject<HTMLDivElement | null>;
6
10
  }>;
@@ -1,17 +1,19 @@
1
- import { jsxs as m, Fragment as a, jsx as o } from "react/jsx-runtime";
2
- import { styled as s } from "@linaria/react";
3
- import { useStore as e } from "@nanostores/react";
4
- import { SDKWhiteContainer as c, SDKScrollContainer as l } from "../../styles.js";
5
- import { VoteHeader as d } from "../../../gamification/detail/header/index.js";
6
- import { UserStatistics as u } from "../../../gamification/user-statistics/index.js";
7
- import { ShowIn as h } from "../../../show-in/index.js";
8
- import { Question as f } from "./Question.js";
1
+ import { jsxs as e, Fragment as d, jsx as t } from "react/jsx-runtime";
2
+ import { styled as a } from "@linaria/react";
3
+ import { useStore as n } from "@nanostores/react";
4
+ import { r as s } from "../../../../index-ba93b6b2.js";
5
+ import { SDKWhiteContainer as f } from "../../styles.js";
6
+ import { VoteHeader as h } from "../../../gamification/detail/header/index.js";
7
+ import { UserStatistics as x } from "../../../gamification/user-statistics/index.js";
8
+ import { ShowIn as U } from "../../../show-in/index.js";
9
+ import { Question as C } from "./Question.js";
9
10
  import { Tabs as S } from "./Tabs.js";
11
+ import "../../../../index-39a0b9b6.js";
12
+ import "react";
10
13
  import "@streamlayer/sdk-web-types";
11
14
  import "../../../gamification/constants.js";
12
15
  import "../../../gamification/detail/header/styles.js";
13
16
  import "../../../icons/index.js";
14
- import "react";
15
17
  import "../../../../utils/common.js";
16
18
  import "../../../gamification/user-statistics/components/rank/index.js";
17
19
  import "../../../gamification/user-statistics/components/rank/styles.js";
@@ -47,17 +49,17 @@ import "../../../questions/twitter/account/index.js";
47
49
  import "../../../questions/twitter/account/styles.js";
48
50
  import "../../../questions/twitter/styles.js";
49
51
  import "../../../gamification/vote/twitter-details/styles.js";
50
- import "lodash.throttle";
51
52
  import "../../../gamification/tabs/index.js";
52
53
  import "../../../gamification/tabs/styles.js";
53
54
  import "./Leaderboard.js";
54
- import "../../../gamification/leaderboard/index.js";
55
55
  import "react-virtualized-auto-sizer";
56
56
  import "react-window";
57
57
  import "react-window-infinite-loader";
58
- import "../../../gamification/leaderboard/list-item/index.js";
59
58
  import "../../../gamification/leaderboard/list-item/styles.js";
60
- import "../../../gamification/leaderboard/styles.js";
59
+ import "../../../../styles_hxnaic-4ed993c7.js";
60
+ import "../../../gamification/leaderboard/static.js";
61
+ import "react-infinite-scroller";
62
+ import "../../../gamification/leaderboard/list-item/index.js";
61
63
  import "./Friends.js";
62
64
  import "../../../gamification/onboarding/slides/onboarding-invite-card/index.js";
63
65
  import "../../../gamification/onboarding/slides/onboarding-invite-card/styles.js";
@@ -73,53 +75,55 @@ import "../../../button/index.js";
73
75
  import "../../../button/styles.js";
74
76
  import "../../../gamification/question/list/styles.js";
75
77
  import "./UserSummary.js";
76
- const C = () => h, n = /* @__PURE__ */ s(C())({
78
+ const I = () => U, c = /* @__PURE__ */ a(I())({
77
79
  name: "OpenedContainer",
78
80
  class: "oar61gl",
79
81
  propsAsIs: !0
80
- }), U = /* @__PURE__ */ s("div")({
82
+ }), O = /* @__PURE__ */ a("div")({
81
83
  name: "UserContainer",
82
84
  class: "u14zaal4",
83
85
  propsAsIs: !1
84
- }), x = ({
86
+ }), Q = ({
85
87
  correct: r,
86
- incorrect: t
88
+ incorrect: m
87
89
  }) => {
88
- const i = r + t;
89
- return i === 0 ? 0 : Math.round(r / i * 100);
90
- }, Wr = ({
90
+ const o = r + m;
91
+ return o === 0 ? 0 : Math.round(r / o * 100);
92
+ }, Br = ({
91
93
  gamification: r,
92
- className: t
94
+ scrollStore: m,
95
+ className: o,
96
+ appNode: i,
97
+ scrollNode: l
93
98
  }) => {
94
- const i = e(r.openedQuestion.$store), p = e(r.openedUser);
95
- return /* @__PURE__ */ m(a, {
96
- children: [i && /* @__PURE__ */ o(n, {
97
- className: t,
98
- children: /* @__PURE__ */ o(f, {
99
+ const u = n(r.openedQuestion.$store), p = n(r.openedUser);
100
+ return /* @__PURE__ */ e(d, {
101
+ children: [u && i.current && s.createPortal(/* @__PURE__ */ t(c, {
102
+ className: o,
103
+ children: /* @__PURE__ */ t(C, {
99
104
  gamification: r
100
105
  })
101
- }), p && /* @__PURE__ */ o(n, {
102
- className: t,
103
- children: /* @__PURE__ */ m(U, {
104
- children: [/* @__PURE__ */ o(d, {
106
+ }), i.current), p && i.current && s.createPortal(/* @__PURE__ */ t(c, {
107
+ className: o,
108
+ children: /* @__PURE__ */ e(O, {
109
+ children: [/* @__PURE__ */ t(h, {
105
110
  label: "Friend's Rank",
106
111
  close: r.closeUser
107
- }), /* @__PURE__ */ o(c, {
108
- children: /* @__PURE__ */ o(u, {
112
+ }), /* @__PURE__ */ t(f, {
113
+ children: /* @__PURE__ */ t(x, {
109
114
  ...p,
110
- successRate: x(p)
115
+ successRate: Q(p)
111
116
  })
112
117
  })]
113
118
  })
114
- }), /* @__PURE__ */ o(l, {
115
- className: t,
116
- "data-nav": "true",
117
- children: /* @__PURE__ */ o(S, {
118
- gamification: r
119
- })
119
+ }), i.current), /* @__PURE__ */ t(S, {
120
+ scrollStore: m,
121
+ scrollNode: l,
122
+ className: o,
123
+ gamification: r
120
124
  })]
121
125
  });
122
126
  };
123
127
  export {
124
- Wr as GamificationOverlay
128
+ Br as GamificationOverlay
125
129
  };
@@ -1,9 +1,13 @@
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 { ScrollStore } from '../../app/useSdkScroll';
4
5
  /** render feature by type */
5
6
  export declare const ActiveFeature: React.FC<{
6
7
  sdk: StreamLayerSDK;
7
8
  feature: Features | null;
9
+ scrollStore: ScrollStore;
10
+ appNode: React.MutableRefObject<HTMLDivElement | null>;
11
+ scrollNode: React.MutableRefObject<HTMLDivElement | null>;
8
12
  className?: string;
9
13
  }>;
@@ -1,23 +1,28 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { lazy as o, useMemo as l, Suspense as m } from "react";
3
- import { FeatureType as p } from "@streamlayer/sdk-web-types";
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { lazy as l, useMemo as u, Suspense as f } from "react";
3
+ import { FeatureType as a } from "@streamlayer/sdk-web-types";
4
4
  import { FeatureProvider as c } from "./FeatureProvider.js";
5
5
  import "@nanostores/react";
6
6
  import "@streamlayer/sdk-web-interfaces";
7
- const u = o(() => import("./Gamification/gamification-feature.js")), s = ({
8
- sdk: e,
9
- feature: t,
10
- className: i
11
- }) => {
12
- const n = l(() => t && t.featureConfig.get().type === p.GAMES ? /* @__PURE__ */ r(c, { className: i, sdk: e, feature: t, children: /* @__PURE__ */ r(u, { className: i, gamification: t, sdk: e }) }) : null, [e, t, i]);
13
- return /* @__PURE__ */ r(
14
- m,
7
+ const g = l(() => import("./Gamification/gamification-feature.js")), x = ({ sdk: e, feature: t, className: r, scrollStore: n, appNode: o, scrollNode: m }) => {
8
+ const p = u(() => t && t.featureConfig.get().type === a.GAMES ? /* @__PURE__ */ i(c, { className: r, sdk: e, feature: t, children: /* @__PURE__ */ i(
9
+ g,
15
10
  {
16
- fallback: /* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
17
- children: n
11
+ appNode: o,
12
+ scrollStore: n,
13
+ scrollNode: m,
14
+ className: r,
15
+ gamification: t
16
+ }
17
+ ) }) : null, [e, t, r, n, m, o]);
18
+ return /* @__PURE__ */ i(
19
+ f,
20
+ {
21
+ fallback: /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
22
+ children: p
18
23
  }
19
24
  );
20
25
  };
21
26
  export {
22
- s as ActiveFeature
27
+ x as ActiveFeature
23
28
  };
@@ -11,7 +11,7 @@ import "../../../navigation/button/styles.js";
11
11
  import "../../../../LeaderBoard_16p26hz-4ed993c7.js";
12
12
  import "../../../navigation/index.js";
13
13
  import "../../../../index_4nhkck-4ed993c7.js";
14
- import "../../../../masters_k70xsy-4ed993c7.js";
14
+ import "../../../../masters_1wv7w2k-4ed993c7.js";
15
15
  const b = ({ activeOverlay: o, setActiveOverlay: t, sdkReady: p, className: d }) => /* @__PURE__ */ a(B, { className: d, children: [
16
16
  /* @__PURE__ */ r(u, { active: o === i, onClick: () => t(i) }),
17
17
  /* @__PURE__ */ r(
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
+ import { ScrollStore } from '../../app/useSdkScroll';
3
4
  export declare const SDKNotifications: React.FC<{
4
5
  sdk: StreamLayerSDK;
6
+ scrollNode: React.MutableRefObject<HTMLDivElement | null>;
7
+ appNode: React.MutableRefObject<HTMLDivElement | null>;
8
+ scrollStore: ScrollStore;
5
9
  }>;