@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.
Files changed (59) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/index-keh7OLCY.js +67 -0
  3. package/lib/ui/app/Features/Gamification/Friends.d.ts +2 -1
  4. package/lib/ui/app/Features/Gamification/Friends.js +6 -6
  5. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +3 -2
  6. package/lib/ui/app/Features/Gamification/Leaderboard.js +26 -24
  7. package/lib/ui/app/Features/Gamification/Question.js +1 -1
  8. package/lib/ui/app/Features/Gamification/Tabs.d.ts +7 -2
  9. package/lib/ui/app/Features/Gamification/Tabs.js +35 -28
  10. package/lib/ui/app/Features/Gamification/gamification-feature.js +1 -1
  11. package/lib/ui/app/Features/Gamification/index.d.ts +6 -2
  12. package/lib/ui/app/Features/Gamification/index.js +81 -44
  13. package/lib/ui/app/Features/index.d.ts +6 -2
  14. package/lib/ui/app/Features/index.js +13 -11
  15. package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +3 -2
  16. package/lib/ui/app/Navigation/MastersNavigation/index.js +34 -30
  17. package/lib/ui/app/Navigation/index.js +6 -7
  18. package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -1
  19. package/lib/ui/app/Notifications/Onboarding/index.js +53 -46
  20. package/lib/ui/app/Notifications/index.d.ts +6 -2
  21. package/lib/ui/app/Notifications/index.js +114 -90
  22. package/lib/ui/app/masters.d.ts +7 -0
  23. package/lib/ui/app/masters.js +67 -51
  24. package/lib/ui/app/useClipboardCopy.d.ts +2 -1
  25. package/lib/ui/app/useMastersApp.js +15 -14
  26. package/lib/ui/app/useSdkResponsive.d.ts +14 -0
  27. package/lib/ui/app/useSdkResponsive.js +46 -0
  28. package/lib/ui/app/useSdkScroll.d.ts +3 -1
  29. package/lib/ui/app/useSdkScroll.js +28 -85
  30. package/lib/ui/gamification/leaderboard/static.d.ts +2 -1
  31. package/lib/ui/gamification/onboarding/index.d.ts +4 -0
  32. package/lib/ui/gamification/onboarding/index.js +56 -40
  33. package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +7 -0
  34. package/lib/ui/gamification/onboarding/invitingUser/index.js +16 -0
  35. package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -0
  36. package/lib/ui/gamification/onboarding/invitingUser/styles.js +24 -0
  37. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +2 -1
  38. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +1 -1
  39. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +2 -0
  40. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +18 -12
  41. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +7 -0
  42. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +10 -0
  43. package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +5 -0
  44. package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.js +24 -0
  45. package/lib/ui/gamification/vote/index.js +43 -43
  46. package/lib/ui/gamification/vote/styles.d.ts +1 -0
  47. package/lib/ui/gamification/vote/styles.js +17 -11
  48. package/lib/ui/gamification/vote/vote-option/index.js +20 -20
  49. package/lib/ui/navigation/button/LeaderBoard.js +5 -6
  50. package/lib/ui/navigation/index.js +6 -7
  51. package/lib/ui/navigation/masters.js +3 -5
  52. package/lib/ui/questions/insight/index.js +24 -25
  53. package/lib/utils/createDemo.js +12 -13
  54. package/lib/utils/debug/components/copyLogs.js +10 -9
  55. package/package.json +13 -13
  56. package/lib/LeaderBoard_fzzlxb-w40geAFS.js +0 -1
  57. package/lib/index_ej4hfx-w40geAFS.js +0 -1
  58. package/lib/masters_m6itlr-w40geAFS.js +0 -1
  59. package/lib/utils/useStreamLayerApp.js +0 -25
@@ -1,13 +1,13 @@
1
- import { jsxs as n, jsx as t, Fragment as T } from "react/jsx-runtime";
2
- import { useState as a, useTransition as g, useEffect as y } from "react";
3
- import { TabsContainer as x, TabsNavContainer as C, SDKWhiteContainer as D, SDKContentContainer as v, LeaderboardContainer as A } from "../../styles.js";
4
- import { ActivePages as p, Tabs as E } from "../../../gamification/tabs/index.js";
5
- import { Leaderboard as L } from "./Leaderboard.js";
6
- import { QuestionsList as P } from "./QuestionsList.js";
7
- import { UserSummary as S } from "./UserSummary.js";
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 Kt = ({ gamification: i, className: d, scrollStore: o, scrollNode: c, appNode: f }) => {
57
- const [l, u] = a(!1), [m, b] = a(p.HOME), [, e] = g(), h = (r) => {
58
- e(() => b(r));
59
- }, s = (r) => {
60
- e(() => u(r));
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
- return y(() => o.listen((r) => {
65
+ A(() => o.listen((r) => {
63
66
  if (r.scrollPosition === 0) {
64
- s(!1), o.setKey("tabsShown", !1);
67
+ d(!1), o.setKey("tabsShown", !1);
65
68
  return;
66
69
  }
67
- s(r.scrollDirection === "forward"), o.setKey("tabsShown", r.scrollDirection !== "forward");
68
- }), [o]), /* @__PURE__ */ n(x, { className: d, children: [
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
- C,
77
+ L,
71
78
  {
72
79
  style: {
73
- top: l ? "-60px" : "0px"
80
+ top: p
74
81
  },
75
- children: /* @__PURE__ */ t(E, { activePage: m, toggleActivePage: h })
82
+ children: /* @__PURE__ */ t(O, { activePage: e, toggleActivePage: w })
76
83
  }
77
84
  ),
78
- m === p.HOME && /* @__PURE__ */ n(T, { children: [
79
- /* @__PURE__ */ t(D, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ t(S, { userSummary: i.userSummary }) }),
80
- /* @__PURE__ */ t(v, { style: { flex: 1 }, children: /* @__PURE__ */ t(P, { openQuestion: i.openQuestion, store: i.feedList.getStore() }) })
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
- m === p.LEADERBOARD && /* @__PURE__ */ t(A, { children: /* @__PURE__ */ t(
83
- L,
89
+ e === s.LEADERBOARD && /* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(
90
+ Q,
84
91
  {
85
- appNode: f,
92
+ renderClipBoardNode: C,
86
93
  scrollStore: o,
87
- scrollNode: c,
94
+ scrollNode: h,
88
95
  gamification: i
89
96
  }
90
97
  ) })
91
98
  ] });
92
99
  };
93
100
  export {
94
- Kt as Tabs
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
- appNode: React.MutableRefObject<HTMLDivElement | null>;
9
- scrollNode: React.MutableRefObject<HTMLDivElement | null>;
10
+ responsiveStore: ResponsiveStore;
11
+ appNode: AppNodeRef;
12
+ scrollNode: ScrollNodeRef;
13
+ headerNode: HeaderNodeRef;
10
14
  }>;
@@ -1,14 +1,14 @@
1
- import { jsxs as e, Fragment as d, jsx as t } from "react/jsx-runtime";
2
- import { styled as l } from "@linaria/react";
3
- import { useStore as n } from "@nanostores/react";
4
- import { r as s } from "../../../../useClipboardCopy-E5rEe6It.js";
5
- import { SDKWhiteContainer as f } from "../../styles.js";
6
- import { VoteHeader as h } from "../../../gamification/detail/header/index.js";
7
- import { UserStatistics as U } from "../../../gamification/user-statistics/index.js";
8
- import { ShowIn as x } from "../../../show-in/index.js";
9
- import { Question as C } from "./Question.js";
10
- import { Tabs as S } from "./Tabs.js";
11
- import "react";
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 I = () => x, c = /* @__PURE__ */ l(I())({
82
+ const D = () => Q, S = /* @__PURE__ */ k(D())({
83
83
  name: "OpenedContainer",
84
84
  class: "oar61gl",
85
85
  propsAsIs: !0
86
- }), O = /* @__PURE__ */ l("div")({
86
+ }), E = /* @__PURE__ */ k("div")({
87
87
  name: "UserContainer",
88
88
  class: "u14zaal4",
89
89
  propsAsIs: !1
90
- }), Q = ({
90
+ }), M = ({
91
91
  correct: r,
92
- incorrect: m
92
+ incorrect: s
93
93
  }) => {
94
- const o = r + m;
94
+ const o = r + s;
95
95
  return o === 0 ? 0 : Math.round(r / o * 100);
96
- }, Yr = ({
96
+ }, z = `
97
+ body {
98
+ overflow: hidden
99
+ }
100
+ `, dt = ({
97
101
  gamification: r,
98
- scrollStore: m,
102
+ scrollStore: s,
99
103
  className: o,
100
104
  appNode: i,
101
- scrollNode: a
105
+ scrollNode: C,
106
+ headerNode: l,
107
+ responsiveStore: a
102
108
  }) => {
103
- const u = n(r.openedQuestion.$store), p = n(r.openedUser);
104
- return /* @__PURE__ */ e(d, {
105
- children: [u && i.current && s.createPortal(/* @__PURE__ */ t(c, {
106
- className: o,
107
- children: /* @__PURE__ */ t(C, {
108
- gamification: r
109
- })
110
- }), i.current), p && i.current && s.createPortal(/* @__PURE__ */ t(c, {
111
- className: o,
112
- children: /* @__PURE__ */ e(O, {
113
- children: [/* @__PURE__ */ t(h, {
114
- label: "Friend's Rank",
115
- close: r.closeUser
116
- }), /* @__PURE__ */ t(f, {
117
- children: /* @__PURE__ */ t(U, {
118
- ...p,
119
- successRate: Q(p)
120
- })
121
- })]
122
- })
123
- }), i.current), /* @__PURE__ */ t(S, {
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
- scrollStore: m,
126
- scrollNode: a,
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
- Yr as GamificationOverlay
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
- appNode: React.MutableRefObject<HTMLDivElement | null>;
11
- scrollNode: React.MutableRefObject<HTMLDivElement | null>;
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 l, useMemo as u, Suspense as f } from "react";
3
- import { FeatureType as a } from "@streamlayer/sdk-web-types";
4
- import { FeatureProvider as c } from "./FeatureProvider.js";
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 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,
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: n,
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, [e, t, r, n, m, o]);
19
+ ) }) : null, [n, t, r, p, e, m, o, l]);
18
20
  return /* @__PURE__ */ i(
19
- f,
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: p
24
+ children: u
23
25
  }
24
26
  );
25
27
  };
26
28
  export {
27
- x as ActiveFeature
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
- export declare const MastersNavigation: React.FC<{
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 a, jsx as r } from "react/jsx-runtime";
2
- import { ChannelsButton as u, ChannelsButtonId as i } from "../../../navigation/button/Channels.js";
3
- import { FeaturedGroupsButton as s, FeaturedGroupsButtonId as m } from "../../../navigation/button/FeaturedGroups.js";
4
- import { LeaderBoardButton as e, LeaderBoardButtonId as n } from "../../../navigation/button/LeaderBoard.js";
5
- import { Navigation as B } from "../../../navigation/masters.js";
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
- import "../../../../index_ej4hfx-w40geAFS.js";
14
- import "../../../../masters_m6itlr-w40geAFS.js";
15
- const b = ({ activeOverlay: o, setActiveOverlay: t, sdkReady: p, className: d }) => /* @__PURE__ */ a(B, { className: d, children: [
16
- /* @__PURE__ */ r(u, { active: o === i, onClick: () => t(i) }),
17
- /* @__PURE__ */ r(
18
- s,
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
- /* @__PURE__ */ r(
28
- e,
29
- {
30
- active: o === n,
31
- onClick: () => t(n)
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
- n as LeaderBoardButtonId,
39
- b as MastersNavigation
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 m } from "react";
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 h = ({ customOverlays: p, activeButton: e, sdk: i }) => {
11
- const t = s(i.sdkStore.organizationSettings), r = s(i.sdkStore.streamSettings), a = m(() => {
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 = m(
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 === e })) });
28
+ return /* @__PURE__ */ n(v, { children: c.map((o) => /* @__PURE__ */ n(b, { ...o, active: o.id === m })) });
30
29
  };
31
30
  export {
32
- h as SDKNavigation
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
- appNode: React.MutableRefObject<HTMLDivElement | null>;
9
+ renderToNode: AppNodeRef | HeaderNodeRef;
9
10
  style?: React.CSSProperties;
10
11
  }>;