@streamlayer/react-ui 0.67.0 → 0.67.2

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 (80) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/ui/app/Features/FeatureProvider.js +1 -1
  3. package/lib/ui/app/Features/Gamification/Leaderboard.js +3 -2
  4. package/lib/ui/app/Features/Gamification/Question.js +11 -11
  5. package/lib/ui/app/Features/Gamification/Tabs.js +45 -14
  6. package/lib/ui/app/Features/Gamification/gamification-feature.d.ts +2 -0
  7. package/lib/ui/app/Features/Gamification/gamification-feature.js +67 -0
  8. package/lib/ui/app/Features/Gamification/index.d.ts +0 -1
  9. package/lib/ui/app/Features/Gamification/index.js +12 -12
  10. package/lib/ui/app/Features/index.js +1 -1
  11. package/lib/ui/app/Navigation/MastersNavigation/index.js +3 -3
  12. package/lib/ui/app/Navigation/index.js +13 -13
  13. package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +13 -13
  14. package/lib/ui/app/Notifications/Onboarding/index.js +5 -5
  15. package/lib/ui/app/Notifications/styles.js +3 -3
  16. package/lib/ui/app/masters.js +30 -28
  17. package/lib/ui/app/styles.js +10 -10
  18. package/lib/ui/app/useMastersApp.js +51 -35
  19. package/lib/ui/button/styles.js +2 -2
  20. package/lib/ui/gamification/detail/header/styles.js +12 -12
  21. package/lib/ui/gamification/detail/sponsor/index.js +6 -6
  22. package/lib/ui/gamification/insight/styles.js +20 -20
  23. package/lib/ui/gamification/insight-list/styles.js +4 -4
  24. package/lib/ui/gamification/invite-link/styles.js +8 -8
  25. package/lib/ui/gamification/leaderboard/index.js +25 -24
  26. package/lib/ui/gamification/leaderboard/list-item/styles.js +18 -18
  27. package/lib/ui/gamification/leaderboard/styles.d.ts +2 -0
  28. package/lib/ui/gamification/leaderboard/styles.js +9 -0
  29. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +8 -8
  30. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +26 -26
  31. package/lib/ui/gamification/onboarding/slides/onboarding-rules/styles.js +12 -12
  32. package/lib/ui/gamification/onboarding/styles.js +23 -23
  33. package/lib/ui/gamification/points/index.d.ts +1 -1
  34. package/lib/ui/gamification/points/styles.js +10 -10
  35. package/lib/ui/gamification/question/insight/styles.js +2 -2
  36. package/lib/ui/gamification/question/list/styles.js +3 -3
  37. package/lib/ui/gamification/question/notification/insight/styles.js +11 -11
  38. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/styles.js +42 -42
  39. package/lib/ui/gamification/question/notification/prediction-result/styles.js +20 -20
  40. package/lib/ui/gamification/question/notification/styles.js +15 -15
  41. package/lib/ui/gamification/question/notification/tweet/styles.js +11 -11
  42. package/lib/ui/gamification/question/styles.js +34 -34
  43. package/lib/ui/gamification/question/twitter/styles.js +6 -6
  44. package/lib/ui/gamification/tabs/styles.js +4 -4
  45. package/lib/ui/gamification/user-statistics/components/rank/styles.js +7 -7
  46. package/lib/ui/gamification/user-statistics/components/statistic/styles.js +5 -5
  47. package/lib/ui/gamification/user-statistics/styles.js +33 -33
  48. package/lib/ui/gamification/vote/expired-alert/styles.js +7 -7
  49. package/lib/ui/gamification/vote/feedback/styles.js +22 -22
  50. package/lib/ui/gamification/vote/insight-details/styles.js +4 -4
  51. package/lib/ui/gamification/vote/styles.js +10 -10
  52. package/lib/ui/gamification/vote/twitter-details/styles.js +3 -3
  53. package/lib/ui/gamification/vote/vote-option/styles.js +22 -22
  54. package/lib/ui/gamification/vote/win-bar/styles.js +9 -9
  55. package/lib/ui/icons/index.js +8 -8
  56. package/lib/ui/login/styles.js +21 -21
  57. package/lib/ui/navigation/button/Channels.js +7 -7
  58. package/lib/ui/navigation/button/FeaturedGroups.js +4 -4
  59. package/lib/ui/navigation/button/LeaderBoard.js +9 -9
  60. package/lib/ui/navigation/button/styles.js +7 -7
  61. package/lib/ui/navigation/index.js +2 -2
  62. package/lib/ui/navigation/masters.js +6 -6
  63. package/lib/ui/questions/insight/styles.js +5 -5
  64. package/lib/ui/questions/twitter/account/styles.js +12 -12
  65. package/lib/ui/questions/twitter/styles.js +8 -8
  66. package/lib/ui/show-in/index.js +14 -14
  67. package/lib/ui/theme/masters.js +1 -1
  68. package/lib/ui/theme/theme.js +19 -19
  69. package/lib/ui/timer/index.js +15 -15
  70. package/lib/ui/video-player/styles.js +8 -8
  71. package/lib/utils/debug/components/bypassLogin.js +9 -9
  72. package/lib/utils/debug/components/developer.js +21 -21
  73. package/lib/utils/debug/components/envToggle.js +14 -14
  74. package/lib/utils/debug/components/eventInput.js +4 -4
  75. package/lib/utils/debug/components/styles.js +3 -3
  76. package/lib/utils/decorators/styles.js +3 -3
  77. package/package.json +9 -9
  78. /package/lib/{LeaderBoard_p8tnz3-4ed993c7.js → LeaderBoard_16p26hz-4ed993c7.js} +0 -0
  79. /package/lib/{index_1ujx5m0-4ed993c7.js → index_4nhkck-4ed993c7.js} +0 -0
  80. /package/lib/{masters_18kvgvj-4ed993c7.js → masters_k70xsy-4ed993c7.js} +0 -0
@@ -1,12 +1,12 @@
1
1
  import { jsxs as m, Fragment as a, jsx as o } from "react/jsx-runtime";
2
2
  import { styled as s } from "@linaria/react";
3
3
  import { useStore as e } from "@nanostores/react";
4
- import { SDKWhiteContainer as d, SDKScrollContainer as l } from "../../styles.js";
5
- import { VoteHeader as c } from "../../../gamification/detail/header/index.js";
4
+ import { SDKWhiteContainer as c, SDKScrollContainer as l } from "../../styles.js";
5
+ import { VoteHeader as d } from "../../../gamification/detail/header/index.js";
6
6
  import { UserStatistics as u } from "../../../gamification/user-statistics/index.js";
7
7
  import { ShowIn as h } from "../../../show-in/index.js";
8
8
  import { Question as f } from "./Question.js";
9
- import { Tabs as C } from "./Tabs.js";
9
+ import { Tabs as S } from "./Tabs.js";
10
10
  import "../../../gamification/constants.js";
11
11
  import "@streamlayer/sdk-web-types";
12
12
  import "../../../gamification/detail/header/styles.js";
@@ -47,6 +47,7 @@ import "react-window";
47
47
  import "react-window-infinite-loader";
48
48
  import "../../../gamification/leaderboard/list-item/index.js";
49
49
  import "../../../gamification/leaderboard/list-item/styles.js";
50
+ import "../../../gamification/leaderboard/styles.js";
50
51
  import "./Friends.js";
51
52
  import "../../../gamification/onboarding/slides/onboarding-invite-card/index.js";
52
53
  import "../../../gamification/onboarding/slides/onboarding-invite-card/styles.js";
@@ -60,13 +61,13 @@ import "../../../gamification/question/insight/index.js";
60
61
  import "../../../gamification/question/insight/styles.js";
61
62
  import "../../../gamification/question/list/styles.js";
62
63
  import "./UserSummary.js";
63
- const S = () => h, n = /* @__PURE__ */ s(S())({
64
+ const C = () => h, n = /* @__PURE__ */ s(C())({
64
65
  name: "OpenedContainer",
65
- class: "OpenedContainer_oar61gl",
66
+ class: "oar61gl",
66
67
  propsAsIs: !0
67
68
  }), U = /* @__PURE__ */ s("div")({
68
69
  name: "UserContainer",
69
- class: "UserContainer_u14zaal4",
70
+ class: "u14zaal4",
70
71
  propsAsIs: !1
71
72
  }), x = ({
72
73
  correct: r,
@@ -74,7 +75,7 @@ const S = () => h, n = /* @__PURE__ */ s(S())({
74
75
  }) => {
75
76
  const i = r + t;
76
77
  return i === 0 ? 0 : Math.round(r / i * 100);
77
- }, yr = ({
78
+ }, Dr = ({
78
79
  gamification: r,
79
80
  className: t
80
81
  }) => {
@@ -88,10 +89,10 @@ const S = () => h, n = /* @__PURE__ */ s(S())({
88
89
  }), p && /* @__PURE__ */ o(n, {
89
90
  className: t,
90
91
  children: /* @__PURE__ */ m(U, {
91
- children: [/* @__PURE__ */ o(c, {
92
+ children: [/* @__PURE__ */ o(d, {
92
93
  label: "Friend's Rank",
93
94
  close: r.closeUser
94
- }), /* @__PURE__ */ o(d, {
95
+ }), /* @__PURE__ */ o(c, {
95
96
  children: /* @__PURE__ */ o(u, {
96
97
  ...p,
97
98
  successRate: x(p)
@@ -101,13 +102,12 @@ const S = () => h, n = /* @__PURE__ */ s(S())({
101
102
  }), /* @__PURE__ */ o(l, {
102
103
  className: t,
103
104
  "data-nav": "true",
104
- children: /* @__PURE__ */ o(C, {
105
+ children: /* @__PURE__ */ o(S, {
105
106
  gamification: r
106
107
  })
107
108
  })]
108
109
  });
109
110
  };
110
111
  export {
111
- yr as GamificationOverlay,
112
- yr as default
112
+ Dr as GamificationOverlay
113
113
  };
@@ -4,7 +4,7 @@ import { FeatureType as p } 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/index.js")), s = ({
7
+ const u = o(() => import("./Gamification/gamification-feature.js")), s = ({
8
8
  sdk: e,
9
9
  feature: t,
10
10
  className: i
@@ -8,10 +8,10 @@ import "../../../icons/index.js";
8
8
  import "react";
9
9
  import "../../../navigation/button/index.js";
10
10
  import "../../../navigation/button/styles.js";
11
- import "../../../../LeaderBoard_p8tnz3-4ed993c7.js";
11
+ import "../../../../LeaderBoard_16p26hz-4ed993c7.js";
12
12
  import "../../../navigation/index.js";
13
- import "../../../../index_1ujx5m0-4ed993c7.js";
14
- import "../../../../masters_18kvgvj-4ed993c7.js";
13
+ import "../../../../index_4nhkck-4ed993c7.js";
14
+ import "../../../../masters_k70xsy-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,33 +1,33 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { useStore as e } from "@nanostores/react";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { useStore as s } from "@nanostores/react";
3
3
  import { useMemo as m } 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_1ujx5m0-4ed993c7.js";
8
+ import "../../../index_4nhkck-4ed993c7.js";
9
9
  import "../../navigation/button/styles.js";
10
- const B = ({ customOverlays: n, activeButton: s, sdk: t }) => {
11
- const { streamSettings: i, organizationSettings: r } = e(t.sdkStore), a = m(() => {
12
- const o = (i == null ? void 0 : i.data) || (r == null ? void 0 : r.data);
10
+ const h = ({ customOverlays: p, activeButton: e, sdk: i }) => {
11
+ const t = s(i.sdkStore.organizationSettings), r = s(i.sdkStore.streamSettings), a = m(() => {
12
+ const o = (r == null ? void 0 : r.data) || (t == null ? void 0 : t.data);
13
13
  return o != null && o.overlays ? o.overlays : [];
14
- }, [r, i]), c = m(
14
+ }, [t, r]), c = m(
15
15
  () => [
16
16
  ...a.filter(({ enableSdkButton: o }) => o).map((o) => ({
17
17
  id: o.type,
18
- onClick: () => t.openFeature(o.type),
18
+ onClick: () => i.openFeature(o.type),
19
19
  disabled: !(o.type in d),
20
20
  label: o.name,
21
- icon: /* @__PURE__ */ p("img", { src: o.icon, alt: "" }),
21
+ icon: /* @__PURE__ */ n("img", { src: o.icon, alt: "" }),
22
22
  /** multiplied by 10 to add the ability to insert custom buttons between our buttons */
23
23
  position: o.position * 10
24
24
  })),
25
- ...Object.values(n).map(({ button: o }) => o)
25
+ ...Object.values(p).map(({ button: o }) => o)
26
26
  ].sort((o, l) => o.position - l.position),
27
- [a, t, n]
27
+ [a, i, p]
28
28
  );
29
- return /* @__PURE__ */ p(v, { children: c.map((o) => /* @__PURE__ */ p(b, { ...o, active: o.id === s })) });
29
+ return /* @__PURE__ */ n(v, { children: c.map((o) => /* @__PURE__ */ n(b, { ...o, active: o.id === e })) });
30
30
  };
31
31
  export {
32
- B as SDKNavigation
32
+ h as SDKNavigation
33
33
  };
@@ -2,48 +2,48 @@ import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as o } from "../../../../icons/index.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
- const p = /* @__PURE__ */ s("div")({
5
+ const a = /* @__PURE__ */ s("div")({
6
6
  name: "Container",
7
- class: "Container_cocfo2g",
7
+ class: "cocfo2g",
8
8
  propsAsIs: !1
9
- }), a = /* @__PURE__ */ s("div")({
9
+ }), l = /* @__PURE__ */ s("div")({
10
10
  name: "CloseIconWrap",
11
- class: "CloseIconWrap_c1pdhxdk",
11
+ class: "c1pdhxdk",
12
12
  propsAsIs: !1
13
13
  }), t = () => o, r = /* @__PURE__ */ s(t())({
14
14
  name: "CloseIcon",
15
- class: "CloseIcon_c1funj3r",
15
+ class: "c1funj3r",
16
16
  propsAsIs: !0
17
17
  }), i = /* @__PURE__ */ s("div")({
18
18
  name: "Title",
19
- class: "Title_t1okg06y",
19
+ class: "t1okg06y",
20
20
  propsAsIs: !1
21
21
  }), m = /* @__PURE__ */ s("img")({
22
22
  name: "SponsorLogo",
23
- class: "SponsorLogo_sb1n923",
23
+ class: "sb1n923",
24
24
  propsAsIs: !1
25
25
  }), I = /* @__PURE__ */ s("div")({
26
26
  name: "PresentsTitle",
27
- class: "PresentsTitle_p1stllxd",
27
+ class: "p1stllxd",
28
28
  propsAsIs: !1
29
29
  }), f = /* @__PURE__ */ s("div")({
30
30
  name: "Subtitle",
31
- class: "Subtitle_s13kvdzw",
31
+ class: "s13kvdzw",
32
32
  propsAsIs: !1
33
33
  }), d = /* @__PURE__ */ s("div")({
34
34
  name: "Description",
35
- class: "Description_dfvmv3t",
35
+ class: "dfvmv3t",
36
36
  propsAsIs: !1
37
37
  }), A = /* @__PURE__ */ s("button")({
38
38
  name: "ActionButton",
39
- class: "ActionButton_ay8e3j9",
39
+ class: "ay8e3j9",
40
40
  propsAsIs: !1
41
41
  });
42
42
  export {
43
43
  A as ActionButton,
44
44
  r as CloseIcon,
45
- a as CloseIconWrap,
46
- p as Container,
45
+ l as CloseIconWrap,
46
+ a as Container,
47
47
  d as Description,
48
48
  I as PresentsTitle,
49
49
  m as SponsorLogo,
@@ -4,8 +4,8 @@ import { useStore as g } from "@nanostores/react";
4
4
  import { useState as y } from "react";
5
5
  import { FeatureType as k } from "@streamlayer/sdk-web-types";
6
6
  import { Onboarding as w } from "../../../gamification/onboarding/index.js";
7
- import { ShowIn as C } from "../../../show-in/index.js";
8
- import { Onboarding as f } from "./Notification/index.js";
7
+ import { ShowIn as f } from "../../../show-in/index.js";
8
+ import { Onboarding as C } from "./Notification/index.js";
9
9
  import "react-virtualized-auto-sizer";
10
10
  import "../../../gamification/onboarding/slides/onboarding-instructions/index.js";
11
11
  import "../../../lottie/index.js";
@@ -21,9 +21,9 @@ import "../../../button/index.js";
21
21
  import "../../../button/styles.js";
22
22
  import "@linaria/core";
23
23
  import "./Notification/styles.js";
24
- const v = () => C, S = /* @__PURE__ */ u(v())({
24
+ const v = () => f, S = /* @__PURE__ */ u(v())({
25
25
  name: "OnboardingContainer",
26
- class: "OnboardingContainer_o9squag",
26
+ class: "o9squag",
27
27
  propsAsIs: !0
28
28
  }), L = ({
29
29
  hiding: n,
@@ -105,7 +105,7 @@ const v = () => C, S = /* @__PURE__ */ u(v())({
105
105
  }) : /* @__PURE__ */ o(p, {
106
106
  hiding: a,
107
107
  children: /* @__PURE__ */ o("div", {
108
- children: /* @__PURE__ */ o(f, {
108
+ children: /* @__PURE__ */ o(C, {
109
109
  close: e.close,
110
110
  action: () => i(!0),
111
111
  onboarding: t
@@ -2,11 +2,11 @@ import { styled as o } from "@linaria/react";
2
2
  import { ShowIn as t } from "../../show-in/index.js";
3
3
  import "react/jsx-runtime";
4
4
  import "@linaria/core";
5
- const r = () => t, c = /* @__PURE__ */ o(r())({
5
+ const r = () => t, m = /* @__PURE__ */ o(r())({
6
6
  name: "Container",
7
- class: "Container_ctckejh",
7
+ class: "ctckejh",
8
8
  propsAsIs: !0
9
9
  });
10
10
  export {
11
- c as Container
11
+ m as Container
12
12
  };
@@ -1,4 +1,5 @@
1
- import { jsxs as y, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as v, jsx as t } from "react/jsx-runtime";
2
+ import { useEffect as y } from "react";
2
3
  import { resetCss as a } from "../theme/theme.js";
3
4
  import { ActiveFeature as S } from "./Features/index.js";
4
5
  import { MastersNavigation as g } from "./Navigation/MastersNavigation/index.js";
@@ -8,9 +9,8 @@ import { useMastersApp as k } from "./useMastersApp.js";
8
9
  import { useSdkFeature as A } from "./useSdkFeature.js";
9
10
  import { ChannelsButtonId as C } from "../navigation/button/Channels.js";
10
11
  import { LeaderBoardButtonId as s } from "../navigation/button/LeaderBoard.js";
11
- import { FeaturedGroupsButtonId as d } from "../navigation/button/FeaturedGroups.js";
12
+ import { FeaturedGroupsButtonId as x } from "../navigation/button/FeaturedGroups.js";
12
13
  import "../theme/constants.js";
13
- import "react";
14
14
  import "@streamlayer/sdk-web-types";
15
15
  import "./Features/FeatureProvider.js";
16
16
  import "@nanostores/react";
@@ -18,8 +18,8 @@ import "@streamlayer/sdk-web-interfaces";
18
18
  import "../navigation/masters.js";
19
19
  import "@linaria/react";
20
20
  import "../navigation/index.js";
21
- import "../../index_1ujx5m0-4ed993c7.js";
22
- import "../../masters_18kvgvj-4ed993c7.js";
21
+ import "../../index_4nhkck-4ed993c7.js";
22
+ import "../../masters_k70xsy-4ed993c7.js";
23
23
  import "@streamlayer/sdk-web-notifications";
24
24
  import "../gamification/question/notification/index.js";
25
25
  import "../gamification/constants.js";
@@ -57,44 +57,46 @@ import "./Notifications/Onboarding/Notification/index.js";
57
57
  import "./Notifications/Onboarding/Notification/styles.js";
58
58
  import "./Notifications/styles.js";
59
59
  import "../navigation/button/styles.js";
60
- import "../../LeaderBoard_p8tnz3-4ed993c7.js";
60
+ import "../../LeaderBoard_16p26hz-4ed993c7.js";
61
61
  import "../navigation/button/index.js";
62
- const x = ({ sdk: i, className: m }) => {
63
- const [, p] = A(i);
64
- return /* @__PURE__ */ o(S, { className: m, feature: p, sdk: i });
65
- }, Lt = ({ sdk: i, overlays: m, children: p }) => {
66
- const { sdkEnabled: t, sdkReady: l, activeOverlay: r, activateAndLoadOverlay: c, enableSdk: f, disableSdk: u, isLogged: e } = k(i);
67
- return /* @__PURE__ */ y(b, { children: [
68
- t && /* @__PURE__ */ o(
62
+ const B = ({ sdk: r, className: i }) => {
63
+ const [, m] = A(r);
64
+ return /* @__PURE__ */ t(S, { className: i, feature: m, sdk: r });
65
+ }, Mt = ({ sdk: r, overlays: i, children: m }) => {
66
+ const { sdkEnabled: p, sdkReady: e, activeOverlay: o, activateAndLoadOverlay: d, enableSdk: l, disableSdk: c, isLogged: f } = k(r);
67
+ return y(() => {
68
+ import("./Features/Gamification/gamification-feature.js");
69
+ }, []), /* @__PURE__ */ v(b, { children: [
70
+ p && /* @__PURE__ */ t(
69
71
  g,
70
72
  {
71
- sdkReady: l,
72
- activeOverlay: r,
73
+ sdkReady: e,
74
+ activeOverlay: o,
73
75
  className: a,
74
- setActiveOverlay: (v) => c("", v)
76
+ setActiveOverlay: (u) => d("", u)
75
77
  }
76
78
  ),
77
- t && /* @__PURE__ */ o(h, { sdk: i }),
78
- /* @__PURE__ */ o(
79
+ e && /* @__PURE__ */ t(h, { sdk: r }),
80
+ /* @__PURE__ */ t(
79
81
  n,
80
82
  {
81
- "data-nav": t.toString(),
82
- style: { display: !t || r === C ? "block" : "none" },
83
- children: p && p({ enableSdk: f, disableSdk: u })
83
+ "data-nav": p.toString(),
84
+ style: { display: !p || o === C ? "block" : "none" },
85
+ children: m && m({ enableSdk: l, disableSdk: c })
84
86
  }
85
87
  ),
86
- /* @__PURE__ */ o(
88
+ /* @__PURE__ */ t(
87
89
  n,
88
90
  {
89
- "data-nav": t.toString(),
90
- style: { display: r === s ? "block" : "none" },
91
- children: m && r === s && m[r]
91
+ "data-nav": p.toString(),
92
+ style: { display: o === s ? "block" : "none" },
93
+ children: i && o === s && i[o]
92
94
  }
93
95
  ),
94
- e && t && r === d && /* @__PURE__ */ o(x, { className: a, sdk: i }),
95
- !e && t && r === d && /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "You are not logged in." })
96
+ e && o === x && /* @__PURE__ */ t(B, { className: a, sdk: r }),
97
+ !f && /* @__PURE__ */ t("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "You are not logged in." })
96
98
  ] });
97
99
  };
98
100
  export {
99
- Lt as MastersApp
101
+ Mt as MastersApp
100
102
  };
@@ -1,24 +1,24 @@
1
- import { styled as n } from "@linaria/react";
2
- const e = /* @__PURE__ */ n("div")({
1
+ import { styled as s } from "@linaria/react";
2
+ const e = /* @__PURE__ */ s("div")({
3
3
  name: "SDKContainer",
4
- class: "SDKContainer_stu11h7",
4
+ class: "stu11h7",
5
5
  propsAsIs: !1
6
- }), r = /* @__PURE__ */ n("div")({
6
+ }), r = /* @__PURE__ */ s("div")({
7
7
  name: "SDKScrollContainer",
8
- class: "SDKScrollContainer_s1ucohr1",
8
+ class: "s1ucohr1",
9
9
  propsAsIs: !1
10
- }), s = /* @__PURE__ */ n("div")({
10
+ }), n = /* @__PURE__ */ s("div")({
11
11
  name: "SDKContentContainer",
12
- class: "SDKContentContainer_s1el4wvm",
12
+ class: "s1el4wvm",
13
13
  propsAsIs: !1
14
- }), o = () => s, a = /* @__PURE__ */ n(o())({
14
+ }), o = () => n, a = /* @__PURE__ */ s(o())({
15
15
  name: "SDKWhiteContainer",
16
- class: "SDKWhiteContainer_s1oe3036",
16
+ class: "s1oe3036",
17
17
  propsAsIs: !0
18
18
  });
19
19
  export {
20
20
  e as SDKContainer,
21
- s as SDKContentContainer,
21
+ n as SDKContentContainer,
22
22
  r as SDKScrollContainer,
23
23
  a as SDKWhiteContainer
24
24
  };
@@ -1,48 +1,64 @@
1
- import { useStore as u } from "@nanostores/react";
2
- import { useState as l, useCallback as b, useEffect as A } from "react";
3
- import { FeatureType as v } from "@streamlayer/sdk-web-types";
1
+ import { useStore as m } from "@nanostores/react";
2
+ import { useRef as y, useState as d, useCallback as F, useEffect as A } from "react";
3
+ import { FeatureType as z } from "@streamlayer/sdk-web-types";
4
4
  import "react/jsx-runtime";
5
- import { ChannelsButtonId as m } from "../navigation/button/Channels.js";
6
- import { FeaturedGroupsButtonId as o } from "../navigation/button/FeaturedGroups.js";
5
+ import { ChannelsButtonId as c } from "../navigation/button/Channels.js";
6
+ import { FeaturedGroupsButtonId as r } from "../navigation/button/FeaturedGroups.js";
7
7
  import "@linaria/react";
8
8
  import "../icons/index.js";
9
9
  import "../navigation/button/styles.js";
10
- import "../../LeaderBoard_p8tnz3-4ed993c7.js";
11
- import "../../index_1ujx5m0-4ed993c7.js";
12
- import "../../masters_18kvgvj-4ed993c7.js";
10
+ import "../../LeaderBoard_16p26hz-4ed993c7.js";
11
+ import "../../index_4nhkck-4ed993c7.js";
12
+ import "../../masters_k70xsy-4ed993c7.js";
13
13
  import "../navigation/button/index.js";
14
- const T = (e) => {
15
- const [c, n] = l(!1), d = u(e.status), { data: f } = u(e.getUserStore()), a = d === "ready", [i, p] = l(o), s = b(
16
- (t, r) => {
17
- p(r), r === o ? (t && e.createEventSession(t), e.openFeature(v.GAMES)) : e.closeFeature();
14
+ const q = (e) => {
15
+ const s = y(""), [l, f] = d(!1), S = m(e.status), i = m(e.userId()), o = S === "ready", [n, u] = d(r), p = F(
16
+ (t, a) => {
17
+ u(a), a === r ? (t && e.createEventSession(t), e.openFeature(z.GAMES)) : e.closeFeature();
18
18
  },
19
19
  [e]
20
20
  );
21
+ A(() => {
22
+ !o && n === r && (u(c), e.closeFeature());
23
+ }, [o, n, e]);
24
+ const b = (t) => {
25
+ s.current = t, e.initializeApp().then(({ enabled: a, err: E }) => {
26
+ if (f(!0), E) {
27
+ p(t, c);
28
+ return;
29
+ }
30
+ if (a) {
31
+ e.isUserAuthorized().then((h) => {
32
+ if (h) {
33
+ p(t, r);
34
+ return;
35
+ } else
36
+ e.disableApp();
37
+ });
38
+ return;
39
+ }
40
+ });
41
+ }, v = () => {
42
+ f(!1), e.disableApp();
43
+ };
21
44
  return A(() => {
22
- !a && i === o && (p(m), e.closeFeature());
23
- }, [a, i, e]), {
24
- sdkEnabled: c,
25
- sdkReady: a,
26
- activeOverlay: i,
27
- activateAndLoadOverlay: s,
28
- enableSdk: (t) => {
29
- e.initializeApp().then(({ enabled: r, err: S }) => {
30
- if (n(!0), S) {
31
- s(t, m);
32
- return;
33
- }
34
- if (r) {
35
- s(t, o);
36
- return;
37
- }
38
- });
39
- },
40
- disableSdk: () => {
41
- n(!1), e.disableApp();
42
- },
43
- isLogged: !!f
45
+ if (!i) {
46
+ o && n === r && (u(c), e.disableApp());
47
+ return;
48
+ }
49
+ i && s.current && l && e.initializeApp().then(() => {
50
+ e.createEventSession(s.current);
51
+ });
52
+ }, [i]), {
53
+ sdkEnabled: l,
54
+ sdkReady: o,
55
+ activeOverlay: n,
56
+ activateAndLoadOverlay: p,
57
+ enableSdk: b,
58
+ disableSdk: v,
59
+ isLogged: !!i
44
60
  };
45
61
  };
46
62
  export {
47
- T as useMastersApp
63
+ q as useMastersApp
48
64
  };
@@ -1,11 +1,11 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  const o = /* @__PURE__ */ s("button")({
3
3
  name: "SButton",
4
- class: "SButton_s1nve60q",
4
+ class: "s1nve60q",
5
5
  propsAsIs: !1
6
6
  }), n = /* @__PURE__ */ s("span")({
7
7
  name: "ButtonLabel",
8
- class: "ButtonLabel_b1xoswwx",
8
+ class: "b1xoswwx",
9
9
  propsAsIs: !1
10
10
  });
11
11
  export {
@@ -4,34 +4,34 @@ import "react/jsx-runtime";
4
4
  import "react";
5
5
  const l = /* @__PURE__ */ s("div")({
6
6
  name: "Container",
7
- class: "Container_c1vwopgc",
7
+ class: "c1vwopgc",
8
8
  propsAsIs: !1
9
- }), i = /* @__PURE__ */ s("div")({
9
+ }), r = /* @__PURE__ */ s("div")({
10
10
  name: "QuestionTypeWrap",
11
- class: "QuestionTypeWrap_qyktpt0",
11
+ class: "qyktpt0",
12
12
  propsAsIs: !1
13
- }), e = () => o, r = /* @__PURE__ */ s(e())({
13
+ }), e = () => o, i = /* @__PURE__ */ s(e())({
14
14
  name: "QuestionTypeIcon",
15
- class: "QuestionTypeIcon_q951jdx",
15
+ class: "q951jdx",
16
16
  propsAsIs: !0
17
17
  }), u = /* @__PURE__ */ s("span")({
18
18
  name: "QuestionTypeTitle",
19
- class: "QuestionTypeTitle_qss5f0e",
19
+ class: "qss5f0e",
20
20
  propsAsIs: !1
21
- }), y = /* @__PURE__ */ s("button")({
21
+ }), m = /* @__PURE__ */ s("button")({
22
22
  name: "CloseButton",
23
- class: "CloseButton_c1ao1jtv",
23
+ class: "c1ao1jtv",
24
24
  propsAsIs: !1
25
25
  }), t = () => o, I = /* @__PURE__ */ s(t())({
26
26
  name: "CloseIcon",
27
- class: "CloseIcon_cvsl7l3",
27
+ class: "cvsl7l3",
28
28
  propsAsIs: !0
29
29
  });
30
30
  export {
31
- y as CloseButton,
31
+ m as CloseButton,
32
32
  I as CloseIcon,
33
33
  l as Container,
34
- r as QuestionTypeIcon,
34
+ i as QuestionTypeIcon,
35
35
  u as QuestionTypeTitle,
36
- i as QuestionTypeWrap
36
+ r as QuestionTypeWrap
37
37
  };
@@ -1,16 +1,16 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { styled as r } from "@linaria/react";
3
- const p = /* @__PURE__ */ r("div")({
2
+ import { styled as p } from "@linaria/react";
3
+ const r = /* @__PURE__ */ p("div")({
4
4
  name: "SponsorLogoWrap",
5
- class: "SponsorLogoWrap_s8p5v5z",
5
+ class: "s8p5v5z",
6
6
  propsAsIs: !1
7
- }), n = /* @__PURE__ */ r("img")({
7
+ }), n = /* @__PURE__ */ p("img")({
8
8
  name: "SponsorLogo",
9
- class: "SponsorLogo_s755yti",
9
+ class: "s755yti",
10
10
  propsAsIs: !1
11
11
  }), c = ({
12
12
  sponsorLogo: o
13
- }) => o && /* @__PURE__ */ s(p, {
13
+ }) => o && /* @__PURE__ */ s(r, {
14
14
  children: /* @__PURE__ */ s(n, {
15
15
  alt: "sponsor-logo",
16
16
  src: o
@@ -1,44 +1,44 @@
1
1
  import { styled as s } from "@linaria/react";
2
- const t = /* @__PURE__ */ s("div")({
2
+ const e = /* @__PURE__ */ s("div")({
3
3
  name: "Container",
4
- class: "Container_cygkmjj",
4
+ class: "cygkmjj",
5
5
  propsAsIs: !1
6
- }), e = /* @__PURE__ */ s("div")({
6
+ }), o = /* @__PURE__ */ s("div")({
7
7
  name: "Content",
8
- class: "Content_c71yvf9",
8
+ class: "c71yvf9",
9
9
  propsAsIs: !1
10
- }), o = /* @__PURE__ */ s("div")({
10
+ }), t = /* @__PURE__ */ s("div")({
11
11
  name: "Graphic",
12
- class: "Graphic_gao3b2f",
12
+ class: "gao3b2f",
13
13
  propsAsIs: !1
14
- }), c = /* @__PURE__ */ s("img")({
14
+ }), a = /* @__PURE__ */ s("img")({
15
15
  name: "InsightIconDefault",
16
- class: "InsightIconDefault_i1k4eec3",
16
+ class: "i1k4eec3",
17
17
  propsAsIs: !1
18
- }), a = /* @__PURE__ */ s("img")({
18
+ }), c = /* @__PURE__ */ s("img")({
19
19
  name: "InsightIconCircle",
20
- class: "InsightIconCircle_i1uhyahn",
20
+ class: "i1uhyahn",
21
21
  propsAsIs: !1
22
22
  }), i = /* @__PURE__ */ s("img")({
23
23
  name: "InsightIconAbsolute",
24
- class: "InsightIconAbsolute_i2ernmy",
24
+ class: "i2ernmy",
25
25
  propsAsIs: !1
26
26
  }), l = /* @__PURE__ */ s("div")({
27
27
  name: "Title",
28
- class: "Title_t12j99pr",
28
+ class: "t12j99pr",
29
29
  propsAsIs: !1
30
- }), I = /* @__PURE__ */ s("img")({
30
+ }), p = /* @__PURE__ */ s("img")({
31
31
  name: "NextIcon",
32
- class: "NextIcon_n1uwonpi",
32
+ class: "n1uwonpi",
33
33
  propsAsIs: !1
34
34
  });
35
35
  export {
36
- t as Container,
37
- e as Content,
38
- o as Graphic,
36
+ e as Container,
37
+ o as Content,
38
+ t as Graphic,
39
39
  i as InsightIconAbsolute,
40
- a as InsightIconCircle,
41
- c as InsightIconDefault,
42
- I as NextIcon,
40
+ c as InsightIconCircle,
41
+ a as InsightIconDefault,
42
+ p as NextIcon,
43
43
  l as Title
44
44
  };