@streamlayer/react-ui 1.14.3 → 1.16.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 (93) hide show
  1. package/lib/app/app/Advertisement/index.js +1 -1
  2. package/lib/app/app/Features/FeatureProvider.js +1 -1
  3. package/lib/app/app/Features/Gamification/Leaderboard.js +9 -8
  4. package/lib/app/app/Features/Gamification/Question.js +1 -1
  5. package/lib/app/app/Features/Gamification/QuestionsList.js +3 -3
  6. package/lib/app/app/Features/Gamification/Tabs.js +2 -2
  7. package/lib/app/app/Features/Gamification/index.js +1 -1
  8. package/lib/app/app/InApp/index.d.ts +4 -0
  9. package/lib/app/app/InApp/index.js +31 -0
  10. package/lib/app/app/Insight/index.js +1 -1
  11. package/lib/app/app/Navigation/index.js +1 -1
  12. package/lib/app/app/Notifications/Onboarding/index.js +79 -73
  13. package/lib/app/app/Notifications/index.js +1 -1
  14. package/lib/app/app/Points/index.js +5 -5
  15. package/lib/app/app/index.js +17 -17
  16. package/lib/app/app/story/index.d.ts +0 -1
  17. package/lib/app/app/story/index.js +39 -50
  18. package/lib/app/app/story/styles.d.ts +1 -0
  19. package/lib/app/app/story/styles.js +9 -4
  20. package/lib/app/app/story/video.js +28 -25
  21. package/lib/app/app/useApp.d.ts +1 -2
  22. package/lib/app/app/useApp.js +1 -1
  23. package/lib/app/login/demo.js +1 -1
  24. package/lib/app/masters/Features/FeatureProvider.js +1 -1
  25. package/lib/app/masters/Features/Gamification/Leaderboard.js +4 -3
  26. package/lib/app/masters/Features/Gamification/Question.js +1 -1
  27. package/lib/app/masters/Features/Gamification/QuestionsList.js +3 -3
  28. package/lib/app/masters/Features/Gamification/Tabs.js +4 -4
  29. package/lib/app/masters/Features/Gamification/index.js +1 -1
  30. package/lib/app/masters/Navigation/MastersNavigation/index.js +4 -4
  31. package/lib/app/masters/Notifications/Onboarding/index.js +5 -5
  32. package/lib/app/masters/Notifications/index.js +1 -1
  33. package/lib/app/masters/Points/index.js +5 -5
  34. package/lib/app/masters/masters.js +16 -16
  35. package/lib/app/masters/useMastersApp.js +7 -7
  36. package/lib/app/masters/useSdkScroll.js +7 -7
  37. package/lib/app/useSdkFeature.js +1 -1
  38. package/lib/app/useSdkScroll.js +7 -7
  39. package/lib/assets/style.css +1 -1
  40. package/lib/ui/close-btn/index.d.ts +1 -1
  41. package/lib/ui/gamification/constants.d.ts +1 -0
  42. package/lib/ui/gamification/constants.js +11 -2
  43. package/lib/ui/gamification/points/index.js +7 -7
  44. package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +7 -0
  45. package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +61 -0
  46. package/lib/ui/gamification/question/inapp/notification/index.d.ts +6 -0
  47. package/lib/ui/gamification/question/inapp/notification/index.js +38 -0
  48. package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -0
  49. package/lib/ui/gamification/question/inapp/notification/styles.js +40 -0
  50. package/lib/ui/gamification/question/inapp/notification/tweet/index.d.ts +2 -0
  51. package/lib/ui/gamification/question/inapp/notification/tweet/index.js +24 -0
  52. package/lib/ui/gamification/question/inapp/notification/tweet/styles.d.ts +4 -0
  53. package/lib/ui/gamification/question/inapp/notification/tweet/styles.js +24 -0
  54. package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +5 -0
  55. package/lib/ui/gamification/question/inapp/onboarding/index.js +50 -0
  56. package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +9 -0
  57. package/lib/ui/gamification/question/inapp/onboarding/styles.js +51 -0
  58. package/lib/ui/gamification/question/inapp/prediction-result/frames/content.d.ts +6 -0
  59. package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +57 -0
  60. package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +12 -0
  61. package/lib/ui/gamification/question/inapp/prediction-result/frames/index.js +59 -0
  62. package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.d.ts +1 -0
  63. package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.js +34 -0
  64. package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.d.ts +1 -0
  65. package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.js +19 -0
  66. package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.d.ts +3 -0
  67. package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.js +26 -0
  68. package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.d.ts +4 -0
  69. package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.js +38 -0
  70. package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.d.ts +3 -0
  71. package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.js +33 -0
  72. package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +3 -0
  73. package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.js +20 -0
  74. package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +9 -0
  75. package/lib/ui/gamification/question/inapp/prediction-result/index.js +7 -0
  76. package/lib/ui/gamification/question/inapp/prediction-result/styles.d.ts +1 -0
  77. package/lib/ui/gamification/question/inapp/prediction-result/styles.js +9 -0
  78. package/lib/ui/gamification/question/index.d.ts +10 -1
  79. package/lib/ui/gamification/question/index.js +45 -36
  80. package/lib/ui/icons/index.d.ts +2 -3
  81. package/lib/ui/icons/index.js +72 -63
  82. package/lib/ui/questions/twitter/account/index.js +17 -17
  83. package/lib/ui/questions/twitter/index.d.ts +1 -0
  84. package/lib/ui/questions/twitter/index.js +2 -1
  85. package/lib/ui/theme/constants.d.ts +6 -0
  86. package/lib/ui/theme/constants.js +20 -14
  87. package/lib/ui/theme/index.d.ts +1 -0
  88. package/lib/ui/theme/index.js +4 -4
  89. package/lib/ui/theme/theme.js +2 -2
  90. package/lib/utils/debug/components/eventInput.js +1 -1
  91. package/lib/utils/decorators/container.js +10 -6
  92. package/lib/utils/decorators/styles.js +7 -2
  93. package/package.json +20 -15
@@ -1,76 +1,65 @@
1
- import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
- import { styled as s } from "@linaria/react";
3
- import { useEffect as p } from "react";
4
- import { StreamLayerProvider as m, useStreamLayer as c, StreamLayerSDKEvent as f } from "@streamlayer/react";
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import { styled as a } from "@linaria/react";
3
+ import { StreamLayerProvider as l, StreamLayerSDKEvent as d, useStreamLayer as c, useStreamLayerUI as m } from "@streamlayer/react";
5
4
  import { App as u } from "../index.js";
6
- import { StreamLayerThemeProvider as y } from "../../../ui/theme/index.js";
7
- import { useStreamLayerDebug as h } from "../../../utils/debug/index.js";
8
- import { Video as k } from "./video.js";
9
- const a = () => {
5
+ import { useStreamLayerDebug as f } from "../../../utils/debug/index.js";
6
+ import { Video as y } from "./video.js";
7
+ const s = () => {
10
8
  console.log("deep link handled cb");
11
9
  }, v = () => {
12
10
  console.log("video player handled cb");
13
- }, A = ({
14
- event: o
11
+ }, h = ({
12
+ withSidebarNotification: n
15
13
  }) => {
16
- const e = c();
17
- return p(() => {
18
- e && e.openFeature(12);
19
- }, [e, o]), e ? /* @__PURE__ */ t(y, {
20
- customTheme: "dark",
21
- children: [/* @__PURE__ */ r(f, {
22
- event: o
23
- }), /* @__PURE__ */ r(u, {
24
- sdk: e,
25
- event: o,
26
- onDeepLinkHandled: a
27
- })]
28
- }) : null;
29
- }, S = /* @__PURE__ */ s("div")({
14
+ const r = c(), e = m();
15
+ return !r || !e.app && !e.appNotification || !e.app && e.appNotification && !n ? null : /* @__PURE__ */ o(u, {
16
+ sdk: r,
17
+ onDeepLinkHandled: s
18
+ });
19
+ }, A = /* @__PURE__ */ a("div")({
30
20
  name: "Container",
31
21
  class: "c1a4qh28",
32
22
  propsAsIs: !1
33
- }), C = /* @__PURE__ */ s("div")({
23
+ }), S = /* @__PURE__ */ a("div")({
34
24
  name: "Body",
35
25
  class: "b9h8kuk",
36
26
  propsAsIs: !1
37
- }), L = /* @__PURE__ */ s("div")({
27
+ }), k = /* @__PURE__ */ a("div")({
38
28
  name: "AppContainer",
39
29
  class: "a1wkro2j",
40
30
  propsAsIs: !1
41
- }), I = ({
42
- sdkKey: o,
43
- eventId: e,
44
- production: d,
45
- darkMode: i,
46
- friendsTab: l
31
+ }), P = ({
32
+ sdkKey: n,
33
+ eventId: r,
34
+ production: e,
35
+ friendsTab: p
47
36
  }) => {
48
- const n = h({
49
- sdkKey: o,
50
- eventId: e,
51
- production: d
37
+ const t = f({
38
+ sdkKey: n,
39
+ eventId: r,
40
+ production: e
52
41
  });
53
- return /* @__PURE__ */ r(m, {
54
- sdkKey: n.sdkKey,
55
- production: n.env === "production",
42
+ return /* @__PURE__ */ i(l, {
43
+ sdkKey: t.sdkKey,
44
+ production: t.env === "production",
56
45
  autoEnable: !0,
57
- onDeepLinkHandled: a,
46
+ onDeepLinkHandled: s,
58
47
  videoPlayerController: v,
59
48
  withAd: !1,
60
- friendsTab: l,
61
- children: /* @__PURE__ */ t(C, {
62
- className: i ? "dark" : "",
63
- children: [/* @__PURE__ */ r(k, {}), /* @__PURE__ */ r(S, {
64
- children: /* @__PURE__ */ r(L, {
65
- className: "StreamLayerSDK",
66
- children: /* @__PURE__ */ r(A, {
67
- event: n.event
49
+ friendsTab: p,
50
+ children: [/* @__PURE__ */ i(S, {
51
+ children: [/* @__PURE__ */ o(y, {}), /* @__PURE__ */ o(A, {
52
+ children: /* @__PURE__ */ o(k, {
53
+ children: /* @__PURE__ */ o(h, {
54
+ withSidebarNotification: !1
68
55
  })
69
56
  })
70
57
  })]
71
- })
58
+ }), /* @__PURE__ */ o(d, {
59
+ event: t.event
60
+ })]
72
61
  });
73
62
  };
74
63
  export {
75
- I as AppStory
64
+ P as AppStory
76
65
  };
@@ -2,3 +2,4 @@ export declare const PointsContainer: import('@linaria/react').StyledComponent<i
2
2
  export declare const VideoPlayerWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
3
  export declare const VideoFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
4
  export declare const LinkToLogin: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLAnchorElement> & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
5
+ export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -3,11 +3,11 @@ const o = /* @__PURE__ */ s("div")({
3
3
  name: "PointsContainer",
4
4
  class: "p10yam33",
5
5
  propsAsIs: !1
6
- }), e = /* @__PURE__ */ s("div")({
6
+ }), n = /* @__PURE__ */ s("div")({
7
7
  name: "VideoPlayerWrap",
8
8
  class: "v13be41a",
9
9
  propsAsIs: !1
10
- }), n = /* @__PURE__ */ s("div")({
10
+ }), e = /* @__PURE__ */ s("div")({
11
11
  name: "VideoFrame",
12
12
  class: "v18d3gas",
13
13
  propsAsIs: !1
@@ -15,10 +15,15 @@ const o = /* @__PURE__ */ s("div")({
15
15
  name: "LinkToLogin",
16
16
  class: "l1aq3x2u",
17
17
  propsAsIs: !1
18
+ }), r = /* @__PURE__ */ s("div")({
19
+ name: "NotificationContainer",
20
+ class: "n6hlblg",
21
+ propsAsIs: !1
18
22
  });
19
23
  export {
20
24
  i as LinkToLogin,
25
+ r as NotificationContainer,
21
26
  o as PointsContainer,
22
- n as VideoFrame,
23
- e as VideoPlayerWrap
27
+ e as VideoFrame,
28
+ n as VideoPlayerWrap
24
29
  };
@@ -1,32 +1,35 @@
1
- import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import { useState as n, useCallback as m, useEffect as s } from "react";
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import { useState as l, useCallback as m, useEffect as s } from "react";
3
3
  import { useStreamLayer as d } from "@streamlayer/react";
4
- import { StreamLayerSDKPoints as p } from "../Points/index.js";
5
- import { StreamLayerThemeProvider as u } from "../../../ui/theme/index.js";
6
- import { VideoFrame as c, PointsContainer as h, VideoPlayerWrap as f, LinkToLogin as y } from "./styles.js";
7
- const S = () => {
8
- const e = d(), [t, i] = n(!0), o = m(({ muted: a }) => {
9
- i(a);
4
+ import { StreamLayerSDKNotification as p } from "../InApp/index.js";
5
+ import { StreamLayerSDKPoints as c } from "../Points/index.js";
6
+ import { VideoFrame as u, PointsContainer as f, VideoPlayerWrap as h, NotificationContainer as y, LinkToLogin as g } from "./styles.js";
7
+ const P = () => {
8
+ const e = d(), [i, a] = l(!0), o = m(({ muted: n }) => {
9
+ a(n);
10
10
  }, []);
11
11
  return s(() => (e == null || e.addVideoPlayerController(o), () => {
12
12
  e == null || e.removeVideoPlayerController(o);
13
- }), [e, o]), /* @__PURE__ */ l(c, { "data-testid": "video-frame", children: [
14
- e && /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(p, { sdk: e }) }) }),
15
- /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(
16
- "video",
17
- {
18
- src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
19
- muted: t,
20
- width: "100%",
21
- height: "100%",
22
- autoplay: "autoplay",
23
- loop: !0,
24
- playsInline: !0,
25
- playing: !0
26
- }
27
- ) }),
13
+ }), [e, o]), /* @__PURE__ */ t(u, { "data-testid": "video-frame", children: [
14
+ e && /* @__PURE__ */ r(f, { children: /* @__PURE__ */ r(c, { sdk: e }) }),
15
+ /* @__PURE__ */ t(h, { children: [
16
+ /* @__PURE__ */ r(
17
+ "video",
18
+ {
19
+ src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
20
+ muted: i,
21
+ width: "100%",
22
+ height: "100%",
23
+ autoplay: "autoplay",
24
+ loop: !0,
25
+ playsInline: !0,
26
+ playing: !0
27
+ }
28
+ ),
29
+ e && /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(p, { sdk: e }) })
30
+ ] }),
28
31
  /* @__PURE__ */ r(
29
- y,
32
+ g,
30
33
  {
31
34
  href: "./iframe.html?args=&globals=viewport:appDesktop&id=app-login--login&viewMode=story",
32
35
  rel: "noreferrer",
@@ -36,5 +39,5 @@ const S = () => {
36
39
  ] });
37
40
  };
38
41
  export {
39
- S as Video
42
+ P as Video
40
43
  };
@@ -1,7 +1,6 @@
1
1
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
- import { FeatureType } from '@streamlayer/sdk-web-types';
3
2
  export declare const useAppApp: (sdk: StreamLayerSDK) => {
4
3
  sdkReady: boolean;
5
- activeFeature: FeatureType | undefined;
4
+ activeFeature: any;
6
5
  isLogged: boolean;
7
6
  };
@@ -1,5 +1,5 @@
1
- import { useStore as o } from "@nanostores/react";
2
1
  import { useEffect as S } from "react";
2
+ import { useStore as o } from "@streamlayer/react-polyfills";
3
3
  import { FeatureType as s } from "@streamlayer/sdk-web-types";
4
4
  const A = (e) => {
5
5
  const u = o(e.status), a = o(e.sdkStore.slStreamId), c = o(e.userId()), r = o(e.getActiveFeature()), n = u === "ready" && !!a.data;
@@ -1,5 +1,5 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { useStore as a } from "@nanostores/react";
2
+ import { useStore as a } from "@streamlayer/react-polyfills";
3
3
  import "@streamlayer/sdk-web-anonymous-auth";
4
4
  import { Login as s } from "./index.js";
5
5
  const y = ({ sdk: o }) => a(o.getUserStore()).data ? /* @__PURE__ */ i("div", { children: [
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { styled as u } from "@linaria/react";
3
- import { useStore as o } from "@nanostores/react";
3
+ import { useStore as o } from "@streamlayer/react-polyfills";
4
4
  import { FeatureStatus as p } from "@streamlayer/sdk-web-interfaces";
5
5
  const i = /* @__PURE__ */ u("div")({
6
6
  name: "LoadingContainer",
@@ -1,12 +1,13 @@
1
1
  import { jsx as r, jsxs as f, Fragment as L } from "react/jsx-runtime";
2
2
  import { styled as h } from "@linaria/react";
3
- import { useStore as i } from "@nanostores/react";
4
3
  import { useClipboardCopy as k } from "../../../useClipboardCopy.js";
5
4
  import { useRef as u } from "react";
5
+ import { useStore as i } from "@streamlayer/react-polyfills";
6
6
  import { InviteLink as I } from "../../../../ui/gamification/invite-link/index.js";
7
7
  import "react-virtualized-auto-sizer";
8
8
  import "react-window";
9
9
  import "react-window-infinite-loader";
10
+ import "@storybook/blocks";
10
11
  import "../../../../ui/icons/index.js";
11
12
  import "../../../../ui/gamification/leaderboard/list-item/styles.js";
12
13
  /* empty css */
@@ -16,7 +17,7 @@ const b = /* @__PURE__ */ h("div")({
16
17
  name: "InviteLinkContainer",
17
18
  class: "ij36hcn",
18
19
  propsAsIs: !1
19
- }), q = ({
20
+ }), z = ({
20
21
  gamification: e,
21
22
  scrollNode: s,
22
23
  scrollStore: p
@@ -51,5 +52,5 @@ const b = /* @__PURE__ */ h("div")({
51
52
  });
52
53
  };
53
54
  export {
54
- q as Leaderboard
55
+ z as Leaderboard
55
56
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
2
  import { styled as l } from "@linaria/react";
3
- import { useStore as n } from "@nanostores/react";
4
3
  import { useMastersContext as a } from "../../useMastersContext.js";
4
+ import { useStore as n } from "@streamlayer/react-polyfills";
5
5
  import { QuestionType as m } from "@streamlayer/sdk-web-types";
6
6
  import { VoteHeader as c } from "../../../../ui/gamification/detail/header/index.js";
7
7
  import { Sponsor as p } from "../../../../ui/gamification/detail/sponsor/index.js";
@@ -1,9 +1,9 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { useStore as i } from "@nanostores/react";
3
- import { useMastersContext as n } from "../../useMastersContext.js";
2
+ import { useMastersContext as i } from "../../useMastersContext.js";
3
+ import { useStore as n } from "@streamlayer/react-polyfills";
4
4
  import { QuestionList as m } from "../../../../ui/gamification/question/list/index.js";
5
5
  const a = ({ store: t, openQuestion: r }) => {
6
- const { sdk: o } = n(), e = i(t);
6
+ const { sdk: o } = i(), e = n(t);
7
7
  return /* @__PURE__ */ s(m, { openQuestion: r, questions: e.data, controlVideo: o == null ? void 0 : o.controlVideoPlayer });
8
8
  };
9
9
  export {
@@ -1,20 +1,20 @@
1
1
  import { jsxs as h, jsx as e, Fragment as x } from "react/jsx-runtime";
2
- import { useStore as u } from "@nanostores/react";
3
2
  import { TabsContainer as D, TabsNavContainer as T, SDKWhiteContainer as v, UserSummaryContainer as C, SDKContentContainer as A, LeaderboardContainer as I } from "../../styles.js";
4
3
  import { scrollIntoAppView as P } from "../../useSdkScroll.js";
5
- import { useState as S, useTransition as V, useEffect as E } from "react";
4
+ import { useState as S, useEffect as V } from "react";
5
+ import { useStore as u, useTransition as E } from "@streamlayer/react-polyfills";
6
6
  import { ActivePages as a, Tabs as K } from "../../../../ui/gamification/tabs/index.js";
7
7
  import { Leaderboard as L } from "./Leaderboard.js";
8
8
  import { QuestionsList as F } from "./QuestionsList.js";
9
9
  import { UserSummary as O } from "./UserSummary.js";
10
10
  const q = ({ gamification: s, className: f, scrollStore: t, scrollNode: l, appNode: c, style: b, responsiveStore: n }) => {
11
- const { tabsShown: d } = u(t, { keys: ["tabsShown"] }), [i, w] = S(a.HOME), [, y] = V(), { sdkInDesktopView: m, screen: g } = u(n, { keys: ["sdkInDesktopView"] }), k = (r) => {
11
+ const { tabsShown: d } = u(t, { keys: ["tabsShown"] }), [i, w] = S(a.HOME), [, y] = E(), { sdkInDesktopView: m, screen: g } = u(n, { keys: ["sdkInDesktopView"] }), k = (r) => {
12
12
  y(() => {
13
13
  var p;
14
14
  w(r), m === !1 && (((p = c.current) == null ? void 0 : p.getBoundingClientRect().y) || 0) < 0 && P(c, g.size, { behavior: "instant" });
15
15
  });
16
16
  };
17
- E(() => t.subscribe((r) => {
17
+ V(() => t.subscribe((r) => {
18
18
  if (r.scrollPosition === 0) {
19
19
  t.setKey("tabsShown", !0);
20
20
  return;
@@ -1,8 +1,8 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
2
  import { styled as m } from "@linaria/react";
3
- import { useStore as a } from "@nanostores/react";
4
3
  import { SDKWhiteContainer as h } from "../../styles.js";
5
4
  import { useHideTransition as C } from "../../../../hooks/showIn.js";
5
+ import { useStore as a } from "@streamlayer/react-polyfills";
6
6
  import { VoteHeader as k } from "../../../../ui/gamification/detail/header/index.js";
7
7
  import { UserStatistics as S } from "../../../../ui/gamification/user-statistics/index.js";
8
8
  import { ModalPortal as U } from "../../../../ui/modal/index.js";
@@ -1,14 +1,14 @@
1
1
  import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
- import { useStore as B } from "@nanostores/react";
3
- import { forwardRef as l } from "react";
2
+ import { forwardRef as B } from "react";
3
+ import { useStore as l } from "@streamlayer/react-polyfills";
4
4
  import { ChannelsButton as c, ChannelsButtonId as t } from "../../../../ui/navigation/button/Channels.js";
5
5
  import { FeaturedGroupsButton as x, FeaturedGroupsButtonId as n } from "../../../../ui/navigation/button/FeaturedGroups.js";
6
6
  import { LeaderBoardButtonId as S } from "../../../../ui/navigation/button/LeaderBoard.js";
7
7
  import { Navigation as I, NavigationItems as h } from "../../../../ui/navigation/masters.js";
8
8
  import { BREAKPOINTS as d } from "../../../../ui/theme/constants.js";
9
- const z = l(
9
+ const z = B(
10
10
  ({ activeOverlay: o, setActiveOverlay: e, scrollToTop: i, sdkReady: u, className: a, responsiveStore: f }, p) => {
11
- const { screen: m } = B(f, { keys: ["screen"] });
11
+ const { screen: m } = l(f, { keys: ["screen"] });
12
12
  return /* @__PURE__ */ s(I, { className: a, children: [
13
13
  /* @__PURE__ */ s(h, { children: [
14
14
  /* @__PURE__ */ r(
@@ -1,9 +1,9 @@
1
1
  import { jsx as t, jsxs as Z, Fragment as w } from "react/jsx-runtime";
2
2
  import { styled as v } from "@linaria/react";
3
- import { useStore as I } from "@nanostores/react";
4
3
  import { scrollIntoAppView as F } from "../../useSdkScroll.js";
5
4
  import { useImagesPreload as T } from "../../../useImagesPreload.js";
6
- import { useRef as A, useState as S, useMemo as x, useLayoutEffect as _, useEffect as B } from "react";
5
+ import { useRef as A, useState as I, useMemo as S, useLayoutEffect as _, useEffect as B } from "react";
6
+ import { useStore as x } from "@streamlayer/react-polyfills";
7
7
  import { FeatureType as j } from "@streamlayer/sdk-web-types";
8
8
  import { OnboardingUI as E } from "../../../../ui/gamification/onboarding/index.js";
9
9
  import { ModalPortal as G } from "../../../../ui/modal/index.js";
@@ -48,7 +48,7 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
48
48
  sdk: a
49
49
  }) => {
50
50
  var d, o, m, h, g, V, L;
51
- const p = I(c.friends.getStore()), [u, e] = S(void 0), f = x(() => {
51
+ const p = x(c.friends.getStore()), [u, e] = I(void 0), f = S(() => {
52
52
  var n, b;
53
53
  const C = a.getInviter();
54
54
  return C ? (b = (n = p.data) == null ? void 0 : n.find(({
@@ -104,11 +104,11 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
104
104
  responsiveStore: p
105
105
  }) => {
106
106
  var L;
107
- const u = A(null), e = r.data.onboarding, [f, d] = S(e == null ? void 0 : e.instantOpen), o = l.getFeature(j.GAMES), m = x(() => H == null ? void 0 : H.map(({
107
+ const u = A(null), e = r.data.onboarding, [f, d] = I(e == null ? void 0 : e.instantOpen), o = l.getFeature(j.GAMES), m = S(() => H == null ? void 0 : H.map(({
108
108
  graphicSrc: C
109
109
  }) => C), []), {
110
110
  screen: h
111
- } = I(p, {
111
+ } = x(p, {
112
112
  keys: ["screen"]
113
113
  });
114
114
  (L = e == null ? void 0 : e.titleCard) != null && L.media && (e.titleCard.media.sponsorLogo = R), _(() => {
@@ -1,10 +1,10 @@
1
1
  import { jsxs as f, Fragment as D, jsx as c } from "react/jsx-runtime";
2
2
  import { cx as N } from "@linaria/core";
3
- import { useStore as g } from "@nanostores/react";
4
3
  import { useMastersContext as T } from "../useMastersContext.js";
5
4
  import { scrollIntoAppView as q } from "../useSdkScroll.js";
6
5
  import { useState as p, useMemo as E, useEffect as h, useRef as O, useCallback as w } from "react";
7
6
  import { r as b } from "../../../index-B1QdimmR.js";
7
+ import { useStore as g } from "@streamlayer/react-polyfills";
8
8
  import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
9
9
  import { NotificationType as a } from "@streamlayer/sdk-web-notifications";
10
10
  import { QuestionTypeData as R } from "../../../ui/gamification/constants.js";
@@ -1,12 +1,12 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { useStore as i } from "@nanostores/react";
3
- import { useState as c, useEffect as f } from "react";
2
+ import { useState as i, useEffect as c } from "react";
3
+ import { useStore as f } from "@streamlayer/react-polyfills";
4
4
  import { FeatureStatus as p } from "@streamlayer/sdk-web-interfaces";
5
5
  import { FeatureType as S } from "@streamlayer/sdk-web-types";
6
6
  import { Points as l } from "../../../ui/gamification/points/index.js";
7
7
  const a = ({ gamification: e }) => {
8
- const s = e.userSummary.$store, [r, u] = c(0);
9
- return f(() => {
8
+ const s = e.userSummary.$store, [r, u] = i(0);
9
+ return c(() => {
10
10
  const m = s.subscribe((t) => {
11
11
  var o;
12
12
  (o = t == null ? void 0 : t.summary) != null && o.points && u(t.summary.points);
@@ -18,7 +18,7 @@ const a = ({ gamification: e }) => {
18
18
  e.status.get() === p.Suspended && e.openFeature();
19
19
  } });
20
20
  }, h = ({ sdk: e }) => {
21
- if (!i(e.featuresList.getStore()))
21
+ if (!f(e.featuresList.getStore()))
22
22
  return null;
23
23
  const r = e.getFeature(S.GAMES);
24
24
  return r ? /* @__PURE__ */ n(a, { gamification: r }) : null;
@@ -1,10 +1,10 @@
1
1
  import { jsx as n, jsxs as v } from "react/jsx-runtime";
2
- import { useStore as C } from "@nanostores/react";
3
- import { SDKContainer as x, SDKScrollContainer as A } from "./styles.js";
4
- import { useSdkScroll as F } from "./useSdkScroll.js";
5
- import { useSdkFeature as M } from "../useSdkFeature.js";
6
- import { useAnalyticsListener as d, newTabLinkListener as b, appScrollListener as D, appClickListener as I } from "../../hooks/analytics.js";
7
- import { useRef as S, useMemo as B, useEffect as T } from "react";
2
+ import { SDKContainer as C, SDKScrollContainer as x } from "./styles.js";
3
+ import { useSdkScroll as A } from "./useSdkScroll.js";
4
+ import { useSdkFeature as F } from "../useSdkFeature.js";
5
+ import { useAnalyticsListener as d, newTabLinkListener as M, appScrollListener as b, appClickListener as D } from "../../hooks/analytics.js";
6
+ import { useRef as S, useMemo as I, useEffect as B } from "react";
7
+ import { useStore as T } from "@streamlayer/react-polyfills";
8
8
  import { resetCss as p } from "../../ui/theme/theme.js";
9
9
  import { ActiveFeature as j, StandaloneFeature as k } from "./Features/index.js";
10
10
  import { MastersNavigation as E } from "./Navigation/MastersNavigation/index.js";
@@ -17,7 +17,7 @@ import { ChannelsButtonId as P } from "../../ui/navigation/button/Channels.js";
17
17
  import { LeaderBoardButtonId as G } from "../../ui/navigation/button/LeaderBoard.js";
18
18
  import { FeaturedGroupsButtonId as V } from "../../ui/navigation/button/FeaturedGroups.js";
19
19
  const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, responsiveStore: o }) => {
20
- const [, r] = M(e);
20
+ const [, r] = F(e);
21
21
  return /* @__PURE__ */ n(
22
22
  j,
23
23
  {
@@ -31,7 +31,7 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
31
31
  }
32
32
  );
33
33
  }, Y = ({ sdk: e, className: i, appNode: l, responsiveStore: t }) => {
34
- const s = C(e.featuresList.getStore());
34
+ const s = T(e.featuresList.getStore());
35
35
  return s ? Array.from(s, (o) => {
36
36
  const r = e.getFeature(o);
37
37
  return r ? /* @__PURE__ */ n(
@@ -47,22 +47,22 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
47
47
  ) : null;
48
48
  }) : null;
49
49
  }, ie = ({ sdk: e, overlays: i, children: l }) => {
50
- const t = S(null), s = S(null), [o] = w(t), [r, f] = F(t, o), { sdkEnabled: a, sdkReady: c, activeOverlay: m, activateAndLoadOverlay: h, activateEventWithId: N, deactivate: g, isLogged: y } = O(e);
51
- d(t, { enabled: a, event: "click", listener: b }), d(r, {
50
+ const t = S(null), s = S(null), [o] = w(t), [r, f] = A(t, o), { sdkEnabled: a, sdkReady: c, activeOverlay: m, activateAndLoadOverlay: h, activateEventWithId: N, deactivate: g, isLogged: y } = O(e);
51
+ d(t, { enabled: a, event: "click", listener: M }), d(r, {
52
52
  enabled: a,
53
53
  event: "scrollend",
54
- listener: D,
54
+ listener: b,
55
55
  useDomNode: !0
56
56
  }), d(r, {
57
57
  enabled: a,
58
58
  event: "click",
59
- listener: I,
59
+ listener: D,
60
60
  useDomNode: !0
61
61
  });
62
- const L = B(() => ({ sdk: e }), [e]);
63
- return T(() => {
62
+ const L = I(() => ({ sdk: e }), [e]);
63
+ return B(() => {
64
64
  import("./Features/Gamification/gamification-feature.js");
65
- }, []), /* @__PURE__ */ n(R.Provider, { value: L, children: /* @__PURE__ */ v(x, { ref: t, children: [
65
+ }, []), /* @__PURE__ */ n(R.Provider, { value: L, children: /* @__PURE__ */ v(C, { ref: t, children: [
66
66
  a && /* @__PURE__ */ n(
67
67
  E,
68
68
  {
@@ -78,7 +78,7 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
78
78
  responsiveStore: o
79
79
  }
80
80
  ),
81
- /* @__PURE__ */ v(A, { className: "sl-hide-on-modal", ref: r, "data-nav": a.toString(), children: [
81
+ /* @__PURE__ */ v(x, { className: "sl-hide-on-modal", ref: r, "data-nav": a.toString(), children: [
82
82
  c && /* @__PURE__ */ n(
83
83
  K,
84
84
  {
@@ -1,11 +1,11 @@
1
- import { useStore as c } from "@nanostores/react";
2
- import { useRef as z, useState as d, useCallback as v, useEffect as l } from "react";
1
+ import { useRef as z, useState as d, useCallback as v, useEffect as c } from "react";
2
+ import { useStore as l } from "@streamlayer/react-polyfills";
3
3
  import { FeatureType as p } from "@streamlayer/sdk-web-types";
4
4
  import "./Navigation/MastersNavigation/index.js";
5
5
  import { FeaturedGroupsButtonId as f } from "../../ui/navigation/button/FeaturedGroups.js";
6
6
  import { ChannelsButtonId as i } from "../../ui/navigation/button/Channels.js";
7
7
  const C = (e) => {
8
- const m = z(""), [E, a] = d(!1), g = c(e.status), F = c(e.sdkStore.slStreamId), n = c(e.userId()), A = c(e.getActiveFeature()), o = g === "ready" && !!F.data, [S, r] = d(f), s = v(
8
+ const m = z(""), [E, a] = d(!1), g = l(e.status), F = l(e.sdkStore.slStreamId), n = l(e.userId()), A = l(e.getActiveFeature()), o = g === "ready" && !!F.data, [S, r] = d(f), s = v(
9
9
  (t, u) => {
10
10
  r(u), t && e.createEventSession(t), u === f ? window.requestAnimationFrame(() => {
11
11
  e.openFeature(p.GAMES);
@@ -13,9 +13,9 @@ const C = (e) => {
13
13
  },
14
14
  [e]
15
15
  );
16
- l(() => {
16
+ c(() => {
17
17
  !o && S === f && (r(i), e.closeFeature(!0));
18
- }, [o, S, e]), l(() => {
18
+ }, [o, S, e]), c(() => {
19
19
  A === p.GAMES ? r(f) : A === p.UNSET && r(i);
20
20
  const t = e.getFeature(p.GAMES);
21
21
  t && (t.closeQuestion(), t.closeUser());
@@ -43,7 +43,7 @@ const C = (e) => {
43
43
  ), I = v(() => {
44
44
  a(!1), e.disableApp();
45
45
  }, [e]);
46
- return l(() => {
46
+ return c(() => {
47
47
  if (!n) {
48
48
  o && (r(i), e.disableApp());
49
49
  return;
@@ -54,7 +54,7 @@ const C = (e) => {
54
54
  });
55
55
  return;
56
56
  }
57
- }, [n]), l(() => () => {
57
+ }, [n]), c(() => () => {
58
58
  a(!1), e.disableApp();
59
59
  }, [a, e]), {
60
60
  sdkEnabled: E,
@@ -1,6 +1,6 @@
1
- import { useStore as S } from "@nanostores/react";
2
- import h from "lodash.throttle";
3
- import { useRef as m, useState as b, useEffect as g } from "react";
1
+ import S from "lodash.throttle";
2
+ import { useRef as m, useState as h, useEffect as b } from "react";
3
+ import { useStore as g } from "@streamlayer/react-polyfills";
4
4
  import { BREAKPOINTS as c } from "../../ui/theme/constants.js";
5
5
  import { m as v } from "../../index-CZvwzN5o.js";
6
6
  const C = (o, e, n) => {
@@ -10,19 +10,19 @@ const C = (o, e, n) => {
10
10
  ...n
11
11
  });
12
12
  }, T = 15, D = (o, e) => {
13
- const n = m(null), t = m(0), [s] = b(
13
+ const n = m(null), t = m(0), [s] = h(
14
14
  v({
15
15
  scrollPosition: 0,
16
16
  tabsShown: !0,
17
17
  scrollDirection: "forward"
18
18
  })
19
- ), i = S(e);
20
- return g(() => {
19
+ ), i = g(e);
20
+ return b(() => {
21
21
  const l = window.innerWidth < c.xl ? window : n.current;
22
22
  if (!l)
23
23
  return () => {
24
24
  };
25
- const f = h((d) => {
25
+ const f = S((d) => {
26
26
  var a;
27
27
  const u = d.target;
28
28
  if (!u)
@@ -1,5 +1,5 @@
1
- import { useStore as f } from "@nanostores/react";
2
1
  import { useState as c, useEffect as l } from "react";
2
+ import { useStore as f } from "@streamlayer/react-polyfills";
3
3
  import { FeatureStatus as a } from "@streamlayer/sdk-web-interfaces";
4
4
  const p = (t) => {
5
5
  const r = f(t.getActiveFeature()), n = f(t.streamStore()), [i, u] = c(null);