@streamlayer/react-ui 0.51.0 → 0.52.1

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 (44) hide show
  1. package/lib/index.js +32 -30
  2. package/lib/ui/app/Features/FeatureProvider.d.ts +1 -0
  3. package/lib/ui/app/Features/FeatureProvider.js +6 -10
  4. package/lib/ui/app/Features/Gamification/Question.js +3 -2
  5. package/lib/ui/app/Features/Gamification/index.d.ts +1 -0
  6. package/lib/ui/app/Features/Gamification/index.js +16 -18
  7. package/lib/ui/app/Features/Highlights/index.d.ts +1 -0
  8. package/lib/ui/app/Features/Highlights/index.js +15 -11
  9. package/lib/ui/app/Features/index.d.ts +1 -0
  10. package/lib/ui/app/Features/index.js +12 -8
  11. package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +1 -0
  12. package/lib/ui/app/Navigation/MastersNavigation/index.js +10 -10
  13. package/lib/ui/app/masters.d.ts +1 -2
  14. package/lib/ui/app/masters.js +30 -33
  15. package/lib/ui/app/styles.js +14 -7
  16. package/lib/ui/app/useMastersApp.d.ts +4 -4
  17. package/lib/ui/app/useMastersApp.js +17 -17
  18. package/lib/ui/demo/DemoPoints.js +5 -3
  19. package/lib/ui/demo/Gamification.js +16 -15
  20. package/lib/ui/demo/Highlights.js +3 -2
  21. package/lib/ui/demo/components/Insight.d.ts +1 -0
  22. package/lib/ui/demo/components/Insight.js +10 -9
  23. package/lib/ui/demo/components/Insights.d.ts +1 -0
  24. package/lib/ui/demo/components/Insights.js +7 -7
  25. package/lib/ui/demo/components/Question.js +8 -7
  26. package/lib/ui/demo/components/index.js +15 -14
  27. package/lib/ui/demo/index.js +3 -2
  28. package/lib/ui/gamification/detailed-insight/index.d.ts +1 -0
  29. package/lib/ui/gamification/detailed-insight/index.js +14 -13
  30. package/lib/ui/gamification/insight-list/index.d.ts +1 -0
  31. package/lib/ui/gamification/insight-list/index.js +4 -4
  32. package/lib/ui/gamification/points/index.js +11 -9
  33. package/lib/ui/gamification/vote/index.js +40 -40
  34. package/lib/ui/gamification/vote/styles.js +5 -5
  35. package/lib/ui/gamification/vote/vote-option/index.d.ts +3 -1
  36. package/lib/ui/gamification/vote/vote-option/index.js +57 -36
  37. package/lib/ui/gamification/vote/vote-option/styles.js +7 -5
  38. package/lib/ui/icons/index.d.ts +1 -0
  39. package/lib/ui/icons/index.js +13 -12
  40. package/lib/ui/theme/index.js +2 -2
  41. package/lib/ui/theme/masters.js +3 -2
  42. package/lib/ui/theme/theme.d.ts +4 -0
  43. package/lib/ui/theme/theme.js +24 -19
  44. package/package.json +13 -13
package/lib/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import { QuestionInApp as ko } from "./ui/notifications/notification/question-inapp/index.js";
2
- import { Login as wo } from "./ui/login/index.js";
3
- import { Onboarding as Bo } from "./ui/gamification/onboarding/index.js";
4
- import { ActivePages as Eo, Tab as Fo, Tabs as Go } from "./ui/gamification/tabs/index.js";
5
- import { LeaderboardItemDetail as Jo } from "./ui/gamification/leaderboard-item-detail/index.js";
6
- import { Question as Mo } from "./ui/gamification/question/index.js";
7
- import { QuestionList as Ro } from "./ui/gamification/question/list/index.js";
8
- import { UserStatistics as Xo } from "./ui/gamification/user-statistics/index.js";
9
- import { Vote as Zo } from "./ui/gamification/vote/index.js";
10
- import { Demo as $o } from "./ui/demo/index.js";
11
- import { Points as rr } from "./ui/gamification/points/index.js";
12
- import { StreamLayerThemeProvider as mr } from "./ui/theme/index.js";
13
- import { ThemeVariables as ir, theme as er, themeStr as fr } from "./ui/theme/theme.js";
1
+ import { QuestionInApp as jr } from "./ui/notifications/notification/question-inapp/index.js";
2
+ import { Login as qr } from "./ui/login/index.js";
3
+ import { Onboarding as zr } from "./ui/gamification/onboarding/index.js";
4
+ import { ActivePages as Er, Tab as Fr, Tabs as Gr } from "./ui/gamification/tabs/index.js";
5
+ import { LeaderboardItemDetail as Jr } from "./ui/gamification/leaderboard-item-detail/index.js";
6
+ import { Question as Mr } from "./ui/gamification/question/index.js";
7
+ import { QuestionList as Rr } from "./ui/gamification/question/list/index.js";
8
+ import { UserStatistics as Xr } from "./ui/gamification/user-statistics/index.js";
9
+ import { Vote as Zr } from "./ui/gamification/vote/index.js";
10
+ import { Demo as $r } from "./ui/demo/index.js";
11
+ import { Points as oo } from "./ui/gamification/points/index.js";
12
+ import { StreamLayerThemeProvider as mo } from "./ui/theme/index.js";
13
+ import { ThemeVariables as io, resetCss as eo, theme as so, themeStr as fo } from "./ui/theme/theme.js";
14
14
  import "react/jsx-runtime";
15
15
  import "react";
16
16
  import "./icon-exit-d3f9fc80.js";
@@ -50,6 +50,7 @@ import "./ui/gamification/user-statistics/components/rank/styles.js";
50
50
  import "./ui/gamification/user-statistics/components/statistic/index.js";
51
51
  import "./ui/gamification/user-statistics/components/statistic/styles.js";
52
52
  import "./ui/gamification/user-statistics/styles.js";
53
+ import "./ui/app/styles.js";
53
54
  import "./ui/gamification/vote/feedback/index.js";
54
55
  import "./ui/gamification/vote/feedback/styles.js";
55
56
  import "./ui/gamification/vote/styles.js";
@@ -96,21 +97,22 @@ import "./ui/gamification/points/styles.js";
96
97
  import "./ui/theme/breakpoints.js";
97
98
  import "@linaria/core";
98
99
  export {
99
- Eo as ActivePages,
100
- $o as Demo,
101
- Jo as LeaderboardItemDetail,
102
- wo as Login,
103
- Bo as Onboarding,
104
- rr as Points,
105
- Mo as Question,
106
- ko as QuestionInApp,
107
- Ro as QuestionList,
108
- mr as StreamLayerThemeProvider,
109
- Fo as Tab,
110
- Go as Tabs,
111
- ir as ThemeVariables,
112
- Xo as UserStatistics,
113
- Zo as Vote,
114
- er as theme,
115
- fr as themeStr
100
+ Er as ActivePages,
101
+ $r as Demo,
102
+ Jr as LeaderboardItemDetail,
103
+ qr as Login,
104
+ zr as Onboarding,
105
+ oo as Points,
106
+ Mr as Question,
107
+ jr as QuestionInApp,
108
+ Rr as QuestionList,
109
+ mo as StreamLayerThemeProvider,
110
+ Fr as Tab,
111
+ Gr as Tabs,
112
+ io as ThemeVariables,
113
+ Xr as UserStatistics,
114
+ Zr as Vote,
115
+ eo as resetCss,
116
+ so as theme,
117
+ fo as themeStr
116
118
  };
@@ -6,4 +6,5 @@ export declare const FeatureProvider: React.FC<{
6
6
  feature: Features;
7
7
  children: React.ReactNode;
8
8
  sdk: StreamLayerSDK;
9
+ className?: string;
9
10
  }>;
@@ -1,13 +1,9 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useStore as e } from "@nanostores/react";
3
- import { FeatureStatus as u } from "@streamlayer/sdk-web-interfaces";
4
- const c = ({
5
- feature: i,
6
- sdk: o,
7
- children: n
8
- }) => {
9
- const d = e(i.status), { slStreamId: r } = e(o.sdkStore);
10
- return r != null && r.loading ? /* @__PURE__ */ t("div", { children: "event is loading..." }) : r != null && r.data ? d !== u.Ready ? /* @__PURE__ */ t("div", { children: "wait feature..." }) : n : /* @__PURE__ */ t("div", { children: "event is forbidden..." });
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useStore as i } from "@nanostores/react";
3
+ import { FeatureStatus as f } from "@streamlayer/sdk-web-interfaces";
4
+ const c = ({ feature: o, sdk: n, children: d, className: t }) => {
5
+ const u = i(o.status), { slStreamId: r } = i(n.sdkStore);
6
+ return r != null && r.loading ? /* @__PURE__ */ e("div", { className: t, children: "event is loading..." }) : r != null && r.data ? u !== f.Ready ? /* @__PURE__ */ e("div", { className: t, children: "wait feature..." }) : d : /* @__PURE__ */ e("div", { className: t, children: "event is forbidden..." });
11
7
  };
12
8
  export {
13
9
  c as FeatureProvider
@@ -8,6 +8,7 @@ import "../../../gamification/constants.js";
8
8
  import "../../../gamification/detail/header/styles.js";
9
9
  import "../../../icons/index.js";
10
10
  import "react";
11
+ import "../../styles.js";
11
12
  import "../../../gamification/vote/feedback/index.js";
12
13
  import "../../../gamification/vote/feedback/styles.js";
13
14
  import "../../../gamification/vote/styles.js";
@@ -27,7 +28,7 @@ const x = l.div`
27
28
  align-items: center;
28
29
  justify-content: flex-start;
29
30
  flex-direction: column;
30
- `, B = ({ openedQuestion: r, closeQuestion: m, vote: i }) => {
31
+ `, D = ({ openedQuestion: r, closeQuestion: m, vote: i }) => {
31
32
  var o;
32
33
  return /* @__PURE__ */ p(x, { children: [
33
34
  /* @__PURE__ */ t(f, { close: m, type: (r == null ? void 0 : r.type) || c.UNSET }),
@@ -36,5 +37,5 @@ const x = l.div`
36
37
  ] });
37
38
  };
38
39
  export {
39
- B as Question
40
+ D as Question
40
41
  };
@@ -4,4 +4,5 @@ import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
4
4
  export declare const GamificationOverlay: React.FC<{
5
5
  gamification: GamificationClass;
6
6
  sdk: StreamLayerSDK;
7
+ className?: string;
7
8
  }>;
@@ -1,10 +1,10 @@
1
- import { jsxs as m, Fragment as p, jsx as r } from "react/jsx-runtime";
2
- import { styled as e } from "@linaria/react";
3
- import { useStore as n } from "@nanostores/react";
4
- import { SDKScrollContainer as s } from "../../styles.js";
5
- import { ShowIn as l } from "../../../show-in/index.js";
6
- import { Question as a } from "./Question.js";
7
- import { Tabs as d } from "./Tabs.js";
1
+ import { jsxs as p, Fragment as e, jsx as r } from "react/jsx-runtime";
2
+ import { styled as n } from "@linaria/react";
3
+ import { useStore as s } from "@nanostores/react";
4
+ import { SDKScrollContainer as l } from "../../styles.js";
5
+ import { ShowIn as d } from "../../../show-in/index.js";
6
+ import { Question as u } from "./Question.js";
7
+ import { Tabs as a } from "./Tabs.js";
8
8
  import "@streamlayer/sdk-web-types";
9
9
  import "../../../gamification/detail/header/index.js";
10
10
  import "../../../gamification/constants.js";
@@ -52,28 +52,26 @@ import "../../../gamification/user-statistics/components/rank/styles.js";
52
52
  import "../../../gamification/user-statistics/components/statistic/index.js";
53
53
  import "../../../gamification/user-statistics/components/statistic/styles.js";
54
54
  import "../../../gamification/user-statistics/styles.js";
55
- const u = e(l)`
55
+ const c = n(d)`
56
56
  position: absolute;
57
57
  inset: 0;
58
58
  top: var(--header-height);
59
59
  background: var(--color-neutrals-white);
60
60
  z-index: 3;
61
- `, ho = ({
62
- gamification: o
63
- }) => {
64
- const { loading: i, data: t } = n(o.openedQuestion);
65
- return /* @__PURE__ */ m(p, { children: [
66
- (i || t) && /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
67
- a,
61
+ `, fo = ({ gamification: o, className: t }) => {
62
+ const { loading: m, data: i } = s(o.openedQuestion);
63
+ return /* @__PURE__ */ p(e, { children: [
64
+ (m || i) && /* @__PURE__ */ r(c, { className: t, children: /* @__PURE__ */ r(
65
+ u,
68
66
  {
69
67
  closeQuestion: o.closeQuestion,
70
68
  vote: o.submitAnswer,
71
- openedQuestion: t
69
+ openedQuestion: i
72
70
  }
73
71
  ) }),
74
- /* @__PURE__ */ r(s, { "data-nav": "true", style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ r(d, { gamification: o }) })
72
+ /* @__PURE__ */ r(l, { className: t, "data-nav": "true", style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ r(a, { gamification: o }) })
75
73
  ] });
76
74
  };
77
75
  export {
78
- ho as GamificationOverlay
76
+ fo as GamificationOverlay
79
77
  };
@@ -4,4 +4,5 @@ import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
4
4
  export declare const HighlightsOverlay: React.FC<{
5
5
  highlights: Highlights;
6
6
  sdk: StreamLayerSDK;
7
+ className?: string;
7
8
  }>;
@@ -1,7 +1,7 @@
1
- import { jsxs as i, Fragment as e, jsx as r } from "react/jsx-runtime";
2
- import { useStore as m } from "@nanostores/react";
3
- import { Insight as p } from "../../../demo/components/Insight.js";
4
- import { Insights as s } from "../../../demo/components/Insights.js";
1
+ import { jsxs as e, Fragment as m, jsx as i } from "react/jsx-runtime";
2
+ import { useStore as p } from "@nanostores/react";
3
+ import { Insight as s } from "../../../demo/components/Insight.js";
4
+ import { Insights as n } from "../../../demo/components/Insights.js";
5
5
  import "../../../gamification/detailed-insight/index.js";
6
6
  import "../../../gamification/common-header/index.js";
7
7
  import "../../../../icon-exit-d3f9fc80.js";
@@ -13,13 +13,17 @@ import "../../../gamification/insight/index.js";
13
13
  import "@streamlayer/sdk-web-types";
14
14
  import "../../../gamification/insight/styles.js";
15
15
  import "../../../gamification/insight-list/styles.js";
16
- const y = ({ highlights: o }) => {
17
- const t = m(o.openedInsight);
18
- return /* @__PURE__ */ i(e, { children: [
19
- !t && o.insights && /* @__PURE__ */ r(s, { highlights: o, store: o.insights.getStore() }),
20
- t && /* @__PURE__ */ r(
21
- p,
16
+ const O = ({
17
+ highlights: o,
18
+ className: r
19
+ }) => {
20
+ const t = p(o.openedInsight);
21
+ return /* @__PURE__ */ e(m, { children: [
22
+ !t && o.insights && /* @__PURE__ */ i(n, { className: r, highlights: o, store: o.insights.getStore() }),
23
+ t && /* @__PURE__ */ i(
24
+ s,
22
25
  {
26
+ className: r,
23
27
  openedInsight: t,
24
28
  closeHighlights: o.closeFeature,
25
29
  closeInsight: o.closeHighlight
@@ -28,5 +32,5 @@ const y = ({ highlights: o }) => {
28
32
  ] });
29
33
  };
30
34
  export {
31
- y as HighlightsOverlay
35
+ O as HighlightsOverlay
32
36
  };
@@ -5,4 +5,5 @@ import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
5
5
  export declare const ActiveFeature: React.FC<{
6
6
  sdk: StreamLayerSDK;
7
7
  feature: Features | null;
8
+ className?: string;
8
9
  }>;
@@ -1,9 +1,9 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useMemo as p } from "react";
3
- import { FeatureType as o } from "@streamlayer/sdk-web-types";
4
- import { FeatureProvider as m } from "./FeatureProvider.js";
5
- import { GamificationOverlay as e } from "./Gamification/index.js";
6
- import { HighlightsOverlay as n } from "./Highlights/index.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useMemo as e } from "react";
3
+ import { FeatureType as m } from "@streamlayer/sdk-web-types";
4
+ import { FeatureProvider as p } from "./FeatureProvider.js";
5
+ import { GamificationOverlay as n } from "./Gamification/index.js";
6
+ import { HighlightsOverlay as g } from "./Highlights/index.js";
7
7
  import "@nanostores/react";
8
8
  import "@streamlayer/sdk-web-interfaces";
9
9
  import "@linaria/react";
@@ -64,7 +64,11 @@ import "../../gamification/insight-list/index.js";
64
64
  import "../../gamification/insight/index.js";
65
65
  import "../../gamification/insight/styles.js";
66
66
  import "../../gamification/insight-list/styles.js";
67
- const xr = ({ sdk: i, feature: r }) => p(() => r ? r.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ t(m, { sdk: i, feature: r, children: /* @__PURE__ */ t(e, { gamification: r, sdk: i }) }) : r.featureConfig.get().type === o.HIGHLIGHTS ? /* @__PURE__ */ t(m, { sdk: i, feature: r, children: /* @__PURE__ */ t(n, { highlights: r, sdk: i }) }) : null : null, [i, r]);
67
+ const Ir = ({
68
+ sdk: i,
69
+ feature: r,
70
+ className: t
71
+ }) => e(() => r ? r.featureConfig.get().type === m.GAMES ? /* @__PURE__ */ o(p, { className: t, sdk: i, feature: r, children: /* @__PURE__ */ o(n, { className: t, gamification: r, sdk: i }) }) : r.featureConfig.get().type === m.HIGHLIGHTS ? /* @__PURE__ */ o(p, { className: t, sdk: i, feature: r, children: /* @__PURE__ */ o(g, { className: t, highlights: r, sdk: i }) }) : null : null, [i, r]);
68
72
  export {
69
- xr as ActiveFeature
73
+ Ir as ActiveFeature
70
74
  };
@@ -8,4 +8,5 @@ export declare const MastersNavigation: React.FC<{
8
8
  activeOverlay: AvailableOverlays;
9
9
  setActiveOverlay: (overlay: AvailableOverlays) => void;
10
10
  sdkReady: boolean;
11
+ className?: string;
11
12
  }>;
@@ -1,18 +1,18 @@
1
- import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
- import { ChannelsButton as a, ChannelsButtonId as i } from "../../../navigation/button/Channels.js";
3
- import { FeaturedGroupsButton as u, FeaturedGroupsButtonId as n } from "../../../navigation/button/FeaturedGroups.js";
4
- import { LeaderBoardButton as s, LeaderBoardButtonId as m } from "../../../navigation/button/LeaderBoard.js";
5
- import { Navigation as e } from "../../../navigation/masters.js";
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 n } from "../../../navigation/button/FeaturedGroups.js";
4
+ import { LeaderBoardButton as e, LeaderBoardButtonId as m } from "../../../navigation/button/LeaderBoard.js";
5
+ import { Navigation as B } from "../../../navigation/masters.js";
6
6
  import "@linaria/react";
7
7
  import "../../../icons/index.js";
8
8
  import "react";
9
9
  import "../../../navigation/button/index.js";
10
10
  import "../../../navigation/button/styles.js";
11
11
  import "../../../navigation/index.js";
12
- const F = ({ activeOverlay: o, setActiveOverlay: t, sdkReady: p }) => /* @__PURE__ */ d(e, { children: [
13
- /* @__PURE__ */ r(a, { active: o === i, onClick: () => t(i) }),
12
+ const G = ({ activeOverlay: o, setActiveOverlay: t, sdkReady: p, className: d }) => /* @__PURE__ */ a(B, { className: d, children: [
13
+ /* @__PURE__ */ r(u, { active: o === i, onClick: () => t(i) }),
14
14
  /* @__PURE__ */ r(
15
- u,
15
+ s,
16
16
  {
17
17
  active: o === n,
18
18
  disabled: !p,
@@ -22,7 +22,7 @@ const F = ({ activeOverlay: o, setActiveOverlay: t, sdkReady: p }) => /* @__PURE
22
22
  }
23
23
  ),
24
24
  /* @__PURE__ */ r(
25
- s,
25
+ e,
26
26
  {
27
27
  active: o === m,
28
28
  onClick: () => t(m)
@@ -33,5 +33,5 @@ export {
33
33
  i as ChannelsButtonId,
34
34
  n as FeaturedGroupsButtonId,
35
35
  m as LeaderBoardButtonId,
36
- F as MastersNavigation
36
+ G as MastersNavigation
37
37
  };
@@ -2,12 +2,11 @@
2
2
  import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
3
  export type Overlays = {};
4
4
  export type MastersAppChildrenProps = {
5
- enableSdk: () => void;
5
+ enableSdk: (event: string) => void;
6
6
  disableSdk: () => void;
7
7
  };
8
8
  export type MastersAppProps = {
9
9
  sdk: StreamLayerSDK;
10
- event: string;
11
10
  overlays?: Overlays;
12
11
  children: (methods: MastersAppChildrenProps) => React.ReactNode;
13
12
  };
@@ -1,14 +1,13 @@
1
- import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
- import { StreamLayerThemeProvider as f } from "../theme/index.js";
1
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
+ import { resetCss as e } from "../theme/theme.js";
3
3
  import { ActiveFeature as v } from "./Features/index.js";
4
4
  import { MastersNavigation as S } from "./Navigation/MastersNavigation/index.js";
5
- import { SDKContainer as y, SDKScrollContainer as e } from "./styles.js";
6
- import { useMastersApp as h } from "./useMastersApp.js";
7
- import { useSdkFeature as k } from "./useSdkFeature.js";
8
- import { ChannelsButtonId as b } from "../navigation/button/Channels.js";
9
- import { LeaderBoardButtonId as a } from "../navigation/button/LeaderBoard.js";
10
- import { FeaturedGroupsButtonId as A } from "../navigation/button/FeaturedGroups.js";
11
- import "../theme/theme.js";
5
+ import { SDKContainer as y, SDKScrollContainer as a } from "./styles.js";
6
+ import { useMastersApp as k } from "./useMastersApp.js";
7
+ import { useSdkFeature as b } from "./useSdkFeature.js";
8
+ import { ChannelsButtonId as A } from "../navigation/button/Channels.js";
9
+ import { LeaderBoardButtonId as n } from "../navigation/button/LeaderBoard.js";
10
+ import { FeaturedGroupsButtonId as B } from "../navigation/button/FeaturedGroups.js";
12
11
  import "@linaria/core";
13
12
  import "../theme/constants.js";
14
13
  import "react";
@@ -78,42 +77,40 @@ import "../navigation/masters.js";
78
77
  import "../navigation/index.js";
79
78
  import "../navigation/button/index.js";
80
79
  import "../navigation/button/styles.js";
81
- const g = ({ sdk: o }) => {
82
- const [, m] = k(o);
83
- return /* @__PURE__ */ r(v, { feature: m, sdk: o });
84
- }, Xt = ({ sdk: o, overlays: m, children: p, event: n }) => {
85
- const { sdkEnabled: i, sdkReady: d, activeOverlay: t, activateAndLoadOverlay: s, enableSdk: l, disableSdk: c } = h(
86
- o,
87
- n
88
- );
89
- return /* @__PURE__ */ r(f, { style: { height: "100%" }, children: /* @__PURE__ */ u(y, { children: [
90
- i && /* @__PURE__ */ r(
80
+ const C = ({ sdk: r, className: m }) => {
81
+ const [, p] = b(r);
82
+ return /* @__PURE__ */ i(v, { className: m, feature: p, sdk: r });
83
+ }, Wt = ({ sdk: r, overlays: m, children: p }) => {
84
+ const { sdkEnabled: o, sdkReady: s, activeOverlay: t, activateAndLoadOverlay: d, enableSdk: l, disableSdk: c } = k(r);
85
+ return /* @__PURE__ */ f(y, { children: [
86
+ o && /* @__PURE__ */ i(
91
87
  S,
92
88
  {
93
- sdkReady: d,
89
+ sdkReady: s,
94
90
  activeOverlay: t,
95
- setActiveOverlay: s
91
+ className: e,
92
+ setActiveOverlay: (u) => d("", u)
96
93
  }
97
94
  ),
98
- /* @__PURE__ */ r(
99
- e,
95
+ /* @__PURE__ */ i(
96
+ a,
100
97
  {
101
- "data-nav": i.toString(),
102
- style: { display: !i || t === b ? "block" : "none" },
98
+ "data-nav": o.toString(),
99
+ style: { display: !o || t === A ? "block" : "none" },
103
100
  children: p && p({ enableSdk: l, disableSdk: c })
104
101
  }
105
102
  ),
106
- /* @__PURE__ */ r(
107
- e,
103
+ /* @__PURE__ */ i(
104
+ a,
108
105
  {
109
- "data-nav": i.toString(),
110
- style: { display: t === a ? "block" : "none" },
111
- children: m && t === a && m[t]
106
+ "data-nav": o.toString(),
107
+ style: { display: t === n ? "block" : "none" },
108
+ children: m && t === n && m[t]
112
109
  }
113
110
  ),
114
- i && t === A && /* @__PURE__ */ r(g, { sdk: o })
115
- ] }) });
111
+ o && t === B && /* @__PURE__ */ i(C, { className: e, sdk: r })
112
+ ] });
116
113
  };
117
114
  export {
118
- Xt as MastersApp
115
+ Wt as MastersApp
119
116
  };
@@ -1,10 +1,12 @@
1
- import { styled as n } from "@linaria/react";
2
- const i = n.div`
1
+ import { styled as t } from "@linaria/react";
2
+ const i = t.div`
3
3
  height: 100%;
4
4
  background: transparent;
5
5
  font-family: var(--font-regular);
6
6
  position: relative;
7
- `, r = n.div`
7
+ min-width: 324px;
8
+ `, r = t.div`
9
+ width: 100%;
8
10
  overflow-y: auto;
9
11
  height: 100%;
10
12
  transition: transform;
@@ -15,17 +17,22 @@ const i = n.div`
15
17
  height: calc(100% - var(--header-height));
16
18
  transform: translateY(var(--header-height));
17
19
  }
18
- `, t = n.div`
20
+
21
+ &[data-question-header='true'] {
22
+ height: calc(100% - var(--question-headers-height));
23
+ transform: translateY(var(--question-headers-height));
24
+ }
25
+ `, a = t.div`
19
26
  display: flex;
20
27
  flex-direction: column;
21
28
  padding: var(--container-padding);
22
29
  gap: var(--container-padding);
23
- `, o = n(t)`
30
+ `, e = t(a)`
24
31
  background-color: var(--color-neutrals-white);
25
32
  `;
26
33
  export {
27
34
  i as SDKContainer,
28
- t as SDKContentContainer,
35
+ a as SDKContentContainer,
29
36
  r as SDKScrollContainer,
30
- o as SDKWhiteContainer
37
+ e as SDKWhiteContainer
31
38
  };
@@ -6,16 +6,16 @@ import { AvailableOverlays } from './Navigation/MastersNavigation';
6
6
  * - On activate Channels or Leaderboard button, the SDK is disabled and the FG+ overlay is closed.
7
7
  * - On sdk status change, if sdk disabled (f.e some errors occurred), the SDK is disabled and the FG+ overlay is closed.
8
8
  * @param sdk - The StreamLayerSDK instance to use.
9
- * @param event - The name of the event to create a session for.
10
9
  * @returns An object containing various functions and state values for managing the SDK and app overlays.
11
10
  * @returns disableSdk - A function that disables the SDK and closes the FG+ overlay.
12
11
  * @returns enableSdk - A function that initializes the SDK and opens the FG+ overlay.
12
+ * With event (The id of the event to create a session for.) as a parameter.
13
13
  */
14
- export declare const useMastersApp: (sdk: StreamLayerSDK, event: string) => {
14
+ export declare const useMastersApp: (sdk: StreamLayerSDK) => {
15
15
  sdkEnabled: boolean;
16
16
  sdkReady: boolean;
17
17
  activeOverlay: any;
18
- activateAndLoadOverlay: (overlay: AvailableOverlays) => void;
19
- enableSdk: () => void;
18
+ activateAndLoadOverlay: (event: string, overlay: AvailableOverlays) => void;
19
+ enableSdk: (event: string) => void;
20
20
  disableSdk: () => void;
21
21
  };
@@ -3,7 +3,7 @@ import { useState as u, useCallback as f, useEffect as S } from "react";
3
3
  import { FeatureType as b } from "@streamlayer/sdk-web-types";
4
4
  import "react/jsx-runtime";
5
5
  import { ChannelsButtonId as l } from "../navigation/button/Channels.js";
6
- import { FeaturedGroupsButtonId as r } from "../navigation/button/FeaturedGroups.js";
6
+ import { FeaturedGroupsButtonId as o } from "../navigation/button/FeaturedGroups.js";
7
7
  import "../navigation/button/LeaderBoard.js";
8
8
  import "../navigation/masters.js";
9
9
  import "@linaria/react";
@@ -11,34 +11,34 @@ import "../icons/index.js";
11
11
  import "../navigation/button/index.js";
12
12
  import "../navigation/button/styles.js";
13
13
  import "../navigation/index.js";
14
- const R = (e, s) => {
15
- const [m, n] = u(!1), o = d(e.status) === "ready", [a, p] = u(r), i = f(
16
- (t) => {
17
- p(t), t === r ? (e.createEventSession(s), e.openFeature(b.GAMES)) : e.closeFeature();
14
+ const R = (t) => {
15
+ const [m, n] = u(!1), a = d(t.status) === "ready", [i, p] = u(o), s = f(
16
+ (e, r) => {
17
+ p(r), r === o ? (e && t.createEventSession(e), t.openFeature(b.GAMES)) : t.closeFeature();
18
18
  },
19
- [s, e]
19
+ [t]
20
20
  );
21
21
  return S(() => {
22
- !o && a === r && (p(l), e.closeFeature());
23
- }, [o, a, e]), {
22
+ !a && i === o && (p(l), t.closeFeature());
23
+ }, [a, i, t]), {
24
24
  sdkEnabled: m,
25
- sdkReady: o,
26
- activeOverlay: a,
27
- activateAndLoadOverlay: i,
28
- enableSdk: () => {
29
- e.initializeApp().then(({ enabled: t, err: c }) => {
25
+ sdkReady: a,
26
+ activeOverlay: i,
27
+ activateAndLoadOverlay: s,
28
+ enableSdk: (e) => {
29
+ t.initializeApp().then(({ enabled: r, err: c }) => {
30
30
  if (n(!0), c) {
31
- i(l);
31
+ s(e, l);
32
32
  return;
33
33
  }
34
- if (t) {
35
- i(r);
34
+ if (r) {
35
+ s(e, o);
36
36
  return;
37
37
  }
38
38
  });
39
39
  },
40
40
  disableSdk: () => {
41
- n(!1), e.disableApp();
41
+ n(!1), t.disableApp();
42
42
  }
43
43
  };
44
44
  };
@@ -3,12 +3,14 @@ import { FeatureType as s } from "@streamlayer/sdk-web-types";
3
3
  import { useStore as p } from "@nanostores/react";
4
4
  import { styled as u } from "@linaria/react";
5
5
  import { Points as a } from "../gamification/points/index.js";
6
+ import "../theme/theme.js";
7
+ import "@linaria/core";
8
+ import "../theme/constants.js";
6
9
  import "../../utils/common.js";
7
10
  import "../gamification/points/styles.js";
8
11
  import "../icons/index.js";
9
12
  import "react";
10
13
  import "../theme/breakpoints.js";
11
- import "../theme/constants.js";
12
14
  const d = u.div`
13
15
  position: fixed;
14
16
  top: 0;
@@ -17,10 +19,10 @@ const d = u.div`
17
19
  var m, i, e, n;
18
20
  const t = p(o);
19
21
  return ((i = (m = t.data) == null ? void 0 : m.summary) == null ? void 0 : i.points) === void 0 ? null : /* @__PURE__ */ r(d, { children: ((n = (e = t.data) == null ? void 0 : e.summary) == null ? void 0 : n.points) && /* @__PURE__ */ r(a, { points: t.data.summary.points }) });
20
- }, F = ({ sdk: o }) => {
22
+ }, A = ({ sdk: o }) => {
21
23
  const t = o.getFeature(s.GAMES);
22
24
  return t != null && t.userSummary ? /* @__PURE__ */ r(f, { store: t.userSummary.getStore() }) : null;
23
25
  };
24
26
  export {
25
- F as DemoPoints
27
+ A as DemoPoints
26
28
  };