@streamlayer/react-ui 1.9.0 → 1.11.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 (87) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +1 -0
  2. package/lib/app/app/Advertisement/index.js +78 -67
  3. package/lib/app/app/Features/Gamification/Question.d.ts +1 -0
  4. package/lib/app/app/Features/Gamification/Question.js +43 -41
  5. package/lib/app/app/Features/Gamification/Tabs.js +22 -21
  6. package/lib/app/app/Features/Gamification/index.js +66 -62
  7. package/lib/app/app/Insight/index.d.ts +2 -0
  8. package/lib/app/app/Insight/index.js +28 -24
  9. package/lib/app/app/Navigation/index.d.ts +4 -0
  10. package/lib/app/app/Navigation/index.js +88 -48
  11. package/lib/app/app/Notifications/index.js +125 -113
  12. package/lib/app/app/Points/index.js +16 -16
  13. package/lib/app/app/index.d.ts +1 -0
  14. package/lib/app/app/index.js +84 -83
  15. package/lib/app/app/story/index.js +27 -24
  16. package/lib/app/app/story/insight/index.d.ts +1 -0
  17. package/lib/app/app/story/insight/index.js +29 -26
  18. package/lib/app/app/story/insight/video.d.ts +1 -0
  19. package/lib/app/app/story/insight/video.js +13 -13
  20. package/lib/app/app/story/promotion/content.d.ts +3 -1
  21. package/lib/app/app/story/promotion/content.js +13 -10
  22. package/lib/app/app/story/promotion/index.d.ts +1 -0
  23. package/lib/app/app/story/promotion/index.js +34 -30
  24. package/lib/app/app/story/promotion/video.d.ts +1 -0
  25. package/lib/app/app/story/promotion/video.js +34 -31
  26. package/lib/app/app/styles.js +44 -0
  27. package/lib/app/app/useApp.d.ts +2 -14
  28. package/lib/app/app/useApp.js +14 -43
  29. package/lib/app/app/useAppContext.d.ts +2 -0
  30. package/lib/app/app/useAppContext.js +6 -5
  31. package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +1 -1
  32. package/lib/app/masters/Features/Gamification/Tabs.d.ts +2 -2
  33. package/lib/app/masters/Features/Gamification/Tabs.js +2 -2
  34. package/lib/app/masters/Features/Gamification/index.d.ts +2 -2
  35. package/lib/app/masters/Features/Gamification/index.js +1 -1
  36. package/lib/app/masters/Features/index.d.ts +2 -2
  37. package/lib/app/masters/Navigation/MastersNavigation/index.d.ts +1 -1
  38. package/lib/app/masters/Notifications/Onboarding/index.d.ts +1 -1
  39. package/lib/app/masters/Notifications/Onboarding/index.js +4 -4
  40. package/lib/app/masters/Notifications/index.d.ts +2 -2
  41. package/lib/app/masters/Notifications/index.js +1 -1
  42. package/lib/app/masters/masters.js +23 -23
  43. package/lib/app/masters/styles.d.ts +20 -0
  44. package/lib/app/{styles.js → masters/styles.js} +15 -15
  45. package/lib/app/masters/useSdkResponsive.d.ts +15 -0
  46. package/lib/app/masters/useSdkResponsive.js +45 -0
  47. package/lib/app/masters/useSdkScroll.d.ts +12 -0
  48. package/lib/app/masters/useSdkScroll.js +50 -0
  49. package/lib/app/useSdkResponsive.d.ts +1 -0
  50. package/lib/app/useSdkResponsive.js +27 -29
  51. package/lib/app/useSdkScroll.js +25 -24
  52. package/lib/assets/style.css +1 -1
  53. package/lib/ui/advertisement/banner/index.js +14 -11
  54. package/lib/ui/advertisement/index.d.ts +3 -0
  55. package/lib/ui/advertisement/index.js +31 -10
  56. package/lib/ui/advertisement/notification/index.d.ts +1 -0
  57. package/lib/ui/advertisement/notification/index.js +30 -27
  58. package/lib/ui/advertisement/notification/lower-third/index.d.ts +9 -0
  59. package/lib/ui/advertisement/notification/lower-third/index.js +37 -0
  60. package/lib/ui/advertisement/notification/lower-third/styles.d.ts +16 -0
  61. package/lib/ui/advertisement/notification/lower-third/styles.js +64 -0
  62. package/lib/ui/advertisement/overlay/index.d.ts +2 -0
  63. package/lib/ui/advertisement/overlay/index.js +58 -43
  64. package/lib/ui/advertisement/overlay/styles.d.ts +0 -2
  65. package/lib/ui/advertisement/overlay/styles.js +41 -52
  66. package/lib/ui/close-btn/index.d.ts +7 -0
  67. package/lib/ui/close-btn/index.js +47 -0
  68. package/lib/ui/gamification/detail/header/index.d.ts +2 -1
  69. package/lib/ui/gamification/detail/header/index.js +16 -15
  70. package/lib/ui/gamification/vote/styles.js +1 -1
  71. package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
  72. package/lib/ui/navigation/index.d.ts +5 -3
  73. package/lib/ui/navigation/index.js +11 -12
  74. package/lib/ui/navigation/masters.js +1 -1
  75. package/lib/ui/navigation/styles.d.ts +5 -0
  76. package/lib/ui/navigation/styles.js +16 -0
  77. package/lib/ui/questions/insight/index.js +21 -20
  78. package/lib/ui/theme/masters-theme.js +36 -13
  79. package/lib/ui/theme/theme.js +25 -26
  80. package/lib/ui/timer/index.d.ts +3 -1
  81. package/lib/ui/timer/index.js +54 -32
  82. package/lib/ui/video-player/index.d.ts +2 -0
  83. package/lib/ui/video-player/index.js +62 -51
  84. package/lib/ui/video-player/styles.d.ts +1 -0
  85. package/lib/ui/video-player/styles.js +7 -6
  86. package/package.json +15 -15
  87. /package/lib/app/{styles.d.ts → app/styles.d.ts} +0 -0
@@ -1,19 +1,19 @@
1
- import { jsxs as n, Fragment as v, jsx as r } from "react/jsx-runtime";
2
- import { useRef as g, useState as V, useCallback as y, useEffect as w } from "react";
3
- import { useStreamLayer as x } from "@streamlayer/react";
4
- import { StreamLayerSDKAdvertisement as m } from "../../Advertisement/index.js";
5
- import { StreamLayerThemeProvider as c } from "../../../../ui/theme/index.js";
6
- import { PromoButton as P, VideoFrame as A, AdvSidebar as C, VideoPlayerWrap as b, AdvBanner as F, AdvContent as S } from "./styles.js";
7
- const D = ({ isMobileScreen: o, sidebar: s, banner: h, event: a, promotionId: l, layoutMode: t }) => {
8
- const e = x(), p = g(null), [u, f] = V(!0), d = y(({ muted: i }) => {
9
- f(i);
1
+ import { jsxs as n, Fragment as g, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as V, useState as y, useCallback as w, useEffect as x } from "react";
3
+ import { useStreamLayer as P } from "@streamlayer/react";
4
+ import { StreamLayerSDKAdvertisement as c } from "../../Advertisement/index.js";
5
+ import { StreamLayerThemeProvider as h } from "../../../../ui/theme/index.js";
6
+ import { PromoButton as b, VideoFrame as F, AdvSidebar as S, VideoPlayerWrap as A, AdvBanner as B, AdvContent as C } from "./styles.js";
7
+ const E = ({ isMobileScreen: o, skipAutoClose: a, sidebar: s, banner: p, event: d, promotionId: l, layoutMode: t }) => {
8
+ const e = P(), u = V(null), [f, v] = y(!0), m = w(({ muted: i }) => {
9
+ v(i);
10
10
  }, []);
11
- return w(() => (e == null || e.addVideoPlayerController(d), () => {
12
- e == null || e.removeVideoPlayerController(d);
13
- }), [e, d]), /* @__PURE__ */ n(v, { children: [
14
- l && /* @__PURE__ */ n(P, { onClick: () => {
11
+ return x(() => (e == null || e.addVideoPlayerController(m), () => {
12
+ e == null || e.removeVideoPlayerController(m);
13
+ }), [e, m]), /* @__PURE__ */ n(g, { children: [
14
+ l && /* @__PURE__ */ n(b, { onClick: () => {
15
15
  var i;
16
- (i = p.current) == null || i.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
16
+ (i = u.current) == null || i.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
17
17
  e == null || e.getFeature(12).background.advertisement.show(l);
18
18
  }, 200);
19
19
  }, children: [
@@ -22,34 +22,35 @@ const D = ({ isMobileScreen: o, sidebar: s, banner: h, event: a, promotionId: l,
22
22
  ] }),
23
23
  /* @__PURE__ */ r("h3", { children: "Sidebar On Video View and Banner" }),
24
24
  /* @__PURE__ */ r("p", { children: "On desktop, the width limit is 344px, and for mobile screens, it is 300px as designed." }),
25
- /* @__PURE__ */ n(A, { ref: p, "data-testid": "video-frame", children: [
25
+ /* @__PURE__ */ n(F, { ref: u, "data-testid": "video-frame", children: [
26
26
  /* @__PURE__ */ r(
27
- C,
27
+ S,
28
28
  {
29
29
  style: {
30
30
  ...t === "cover" ? { position: "absolute" } : {},
31
31
  ...s === "left" ? { left: 0 } : { right: 0, order: 3 },
32
32
  ...o ? { maxWidth: "calc(300px + env(safe-area-inset-left))" } : {}
33
33
  },
34
- children: e && /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(
35
- m,
34
+ children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
35
+ c,
36
36
  {
37
37
  isMobileScreen: o,
38
- event: a,
38
+ event: d,
39
39
  sdk: e,
40
40
  sidebar: s,
41
41
  layoutMode: t,
42
+ skipAutoClose: a,
42
43
  persistent: !0
43
44
  }
44
45
  ) })
45
46
  }
46
47
  ),
47
- /* @__PURE__ */ n(b, { children: [
48
+ /* @__PURE__ */ n(A, { children: [
48
49
  /* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
49
50
  "video",
50
51
  {
51
52
  src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
52
- muted: u,
53
+ muted: f,
53
54
  width: "100%",
54
55
  height: "100%",
55
56
  autoplay: "autoplay",
@@ -59,20 +60,21 @@ const D = ({ isMobileScreen: o, sidebar: s, banner: h, event: a, promotionId: l,
59
60
  }
60
61
  ) }),
61
62
  /* @__PURE__ */ r(
62
- F,
63
+ B,
63
64
  {
64
65
  style: {
65
66
  ...t === "cover" ? { position: "absolute" } : {},
66
- ...h === "top" ? { top: 0, order: -1 } : { bottom: 0 }
67
+ ...p === "top" ? { top: 0, order: -1 } : { bottom: 0 }
67
68
  },
68
- children: e && /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(
69
- m,
69
+ children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
70
+ c,
70
71
  {
71
72
  isMobileScreen: o,
72
- event: a,
73
+ event: d,
73
74
  sdk: e,
74
- banner: h,
75
+ banner: p,
75
76
  layoutMode: t,
77
+ skipAutoClose: a,
76
78
  persistent: !0
77
79
  }
78
80
  ) })
@@ -80,19 +82,20 @@ const D = ({ isMobileScreen: o, sidebar: s, banner: h, event: a, promotionId: l,
80
82
  )
81
83
  ] })
82
84
  ] }),
83
- /* @__PURE__ */ r(S, { children: e && /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(
84
- m,
85
+ /* @__PURE__ */ r(C, { children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
86
+ c,
85
87
  {
86
88
  isMobileScreen: o,
87
- event: a,
89
+ event: d,
88
90
  sdk: e,
89
91
  sidebar: s,
90
92
  layoutMode: t,
93
+ skipAutoClose: a,
91
94
  persistent: !0
92
95
  }
93
96
  ) }) })
94
97
  ] });
95
98
  };
96
99
  export {
97
- D as Video
100
+ E as Video
98
101
  };
@@ -0,0 +1,44 @@
1
+ import { styled as s } from "@linaria/react";
2
+ const i = /* @__PURE__ */ s("div")({
3
+ name: "SDKContainer",
4
+ class: "sopqfe6",
5
+ propsAsIs: !1
6
+ }), p = /* @__PURE__ */ s("div")({
7
+ name: "SDKScrollContainer",
8
+ class: "s102vcph",
9
+ propsAsIs: !1
10
+ }), e = /* @__PURE__ */ s("div")({
11
+ name: "SDKContentContainer",
12
+ class: "s1meqjjv",
13
+ propsAsIs: !1
14
+ }), a = () => e, n = /* @__PURE__ */ s(a())({
15
+ name: "SDKWhiteContainer",
16
+ class: "s1burm22",
17
+ propsAsIs: !0
18
+ }), c = /* @__PURE__ */ s("div")({
19
+ name: "TabsContainer",
20
+ class: "tm5r3j5",
21
+ propsAsIs: !1
22
+ }), o = () => n, l = /* @__PURE__ */ s(o())({
23
+ name: "LeaderboardContainer",
24
+ class: "lysxwr6",
25
+ propsAsIs: !0
26
+ }), r = () => n, C = /* @__PURE__ */ s(r())({
27
+ name: "TabsNavContainer",
28
+ class: "t9er3b1",
29
+ propsAsIs: !0
30
+ }), m = /* @__PURE__ */ s("div")({
31
+ name: "UserSummaryContainer",
32
+ class: "u19dtrb3",
33
+ propsAsIs: !1
34
+ });
35
+ export {
36
+ l as LeaderboardContainer,
37
+ i as SDKContainer,
38
+ e as SDKContentContainer,
39
+ p as SDKScrollContainer,
40
+ n as SDKWhiteContainer,
41
+ c as TabsContainer,
42
+ C as TabsNavContainer,
43
+ m as UserSummaryContainer
44
+ };
@@ -1,19 +1,7 @@
1
1
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
- /**
3
- * A hook that provides functionality for managing the StreamLayerSDK in the App app.
4
- * - On activate FG+ button, the SDK is initialized and the FG+ overlay is opened.
5
- * - On activate Channels or Leaderboard button, the SDK is disabled and the FG+ overlay is closed.
6
- * - On sdk status change, if sdk disabled (f.e some errors occurred), the SDK is disabled and the FG+ overlay is closed.
7
- * @param sdk - The StreamLayerSDK instance to use.
8
- * @returns An object containing various functions and state values for managing the SDK and app overlays.
9
- * @returns deactivate - A function that disables the SDK and closes the FG+ overlay.
10
- * @returns activateEventWithId - A function that initializes the SDK and opens the FG+ overlay.
11
- * With event (The id of the event to create a session for.) as a parameter.
12
- */
2
+ import { FeatureType } from '@streamlayer/sdk-web-types';
13
3
  export declare const useAppApp: (sdk: StreamLayerSDK) => {
14
- sdkEnabled: boolean;
15
4
  sdkReady: boolean;
16
- activateEventWithId: (event: string) => void;
17
- deactivate: () => void;
5
+ activeFeature: FeatureType | undefined;
18
6
  isLogged: boolean;
19
7
  };
@@ -1,48 +1,19 @@
1
- import { useStore as n } from "@nanostores/react";
2
- import { useRef as m, useState as b, useEffect as s, useCallback as c } from "react";
3
- import { FeatureType as E } from "@streamlayer/sdk-web-types";
4
- const F = (e) => {
5
- const a = m(""), [o, r] = b(!1), p = n(e.status), l = n(e.sdkStore.slStreamId), i = n(e.userId()), f = n(e.getActiveFeature()), u = p === "ready" && !!l.data;
6
- s(() => {
7
- const t = e.getFeature(E.GAMES);
8
- t && (t.closeQuestion(), t.closeUser());
9
- }, [f, e]);
10
- const A = c(
11
- (t) => {
12
- a.current = t, r(!0), e.initializeApp({ skipOrganizationSettings: !0 }).then(({ enabled: v, err: d }) => {
13
- if (!d && v) {
14
- e.isUserAuthorized().then((g) => {
15
- g || e.disableApp();
16
- });
17
- return;
18
- }
19
- });
20
- },
21
- [e]
22
- ), S = c(() => {
23
- r(!1), e.disableApp();
24
- }, [e]);
25
- return s(() => {
26
- if (!i) {
27
- u && e.disableApp();
28
- return;
29
- }
30
- if (i && a.current && o) {
31
- e.initializeApp({ skipOrganizationSettings: !0 }).then(() => {
32
- e.createEventSession(a.current);
33
- });
34
- return;
35
- }
36
- }, [i]), s(() => () => {
37
- r(!1), e.disableApp();
1
+ import { useStore as o } from "@nanostores/react";
2
+ import { useEffect as S } from "react";
3
+ import { FeatureType as s } from "@streamlayer/sdk-web-types";
4
+ const A = (e) => {
5
+ const u = o(e.status), a = o(e.sdkStore.slStreamId), c = o(e.userId()), r = o(e.getActiveFeature()), n = u === "ready" && !!a.data;
6
+ return S(() => {
7
+ const t = e.getFeature(s.GAMES);
8
+ t && r !== s.GAMES && (t.closeQuestion(), t.closeUser()), t == null || t.openedQuestionId.subscribe((p) => {
9
+ p && r !== s.GAMES && e.openFeature(s.GAMES);
10
+ });
38
11
  }, [r, e]), {
39
- sdkEnabled: o,
40
- sdkReady: u,
41
- activateEventWithId: A,
42
- deactivate: S,
43
- isLogged: !!i
12
+ sdkReady: n,
13
+ activeFeature: r,
14
+ isLogged: !!c
44
15
  };
45
16
  };
46
17
  export {
47
- F as useAppApp
18
+ A as useAppApp
48
19
  };
@@ -1,7 +1,9 @@
1
1
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
2
  export declare const AppContext: import('react').Context<{
3
3
  sdk: StreamLayerSDK | null;
4
+ topNavigation?: boolean;
4
5
  }>;
5
6
  export declare const useAppContext: () => {
6
7
  sdk: StreamLayerSDK | null;
8
+ topNavigation?: boolean;
7
9
  };
@@ -1,8 +1,9 @@
1
- import { createContext as t, useContext as e } from "react";
2
- const o = t({
3
- sdk: null
4
- }), p = () => e(o);
1
+ import { createContext as t, useContext as o } from "react";
2
+ const e = t({
3
+ sdk: null,
4
+ topNavigation: !1
5
+ }), p = () => o(e);
5
6
  export {
6
- o as AppContext,
7
+ e as AppContext,
7
8
  p as useAppContext
8
9
  };
@@ -1,5 +1,5 @@
1
1
  import { ScrollNodeRef } from '../../..';
2
- import { ScrollStore } from '../../../useSdkScroll';
2
+ import { ScrollStore } from '../../useSdkScroll';
3
3
  import { Gamification } from '@streamlayer/feature-gamification';
4
4
  export declare const Leaderboard: React.FC<{
5
5
  gamification: Gamification;
@@ -1,6 +1,6 @@
1
1
  import { AppNodeRef, ScrollNodeRef } from '../../..';
2
- import { ResponsiveStore } from '../../../useSdkResponsive';
3
- import { ScrollStore } from '../../../useSdkScroll';
2
+ import { ResponsiveStore } from '../../useSdkResponsive';
3
+ import { ScrollStore } from '../../useSdkScroll';
4
4
  import { Gamification } from '@streamlayer/feature-gamification';
5
5
  export declare const Tabs: React.FC<{
6
6
  appNode: AppNodeRef;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as h, jsx as e, Fragment as x } from "react/jsx-runtime";
2
2
  import { useStore as u } from "@nanostores/react";
3
- import { TabsContainer as D, TabsNavContainer as T, SDKWhiteContainer as v, UserSummaryContainer as C, SDKContentContainer as A, LeaderboardContainer as I } from "../../../styles.js";
4
- import { scrollIntoAppView as P } from "../../../useSdkScroll.js";
3
+ import { TabsContainer as D, TabsNavContainer as T, SDKWhiteContainer as v, UserSummaryContainer as C, SDKContentContainer as A, LeaderboardContainer as I } from "../../styles.js";
4
+ import { scrollIntoAppView as P } from "../../useSdkScroll.js";
5
5
  import { useState as S, useTransition as V, useEffect as E } from "react";
6
6
  import { ActivePages as a, Tabs as K } from "../../../../ui/gamification/tabs/index.js";
7
7
  import { Leaderboard as L } from "./Leaderboard.js";
@@ -1,6 +1,6 @@
1
1
  import { AppNodeRef, ScrollNodeRef } from '../../..';
2
- import { ResponsiveStore } from '../../../useSdkResponsive';
3
- import { ScrollStore } from '../../../useSdkScroll';
2
+ import { ResponsiveStore } from '../../useSdkResponsive';
3
+ import { ScrollStore } from '../../useSdkScroll';
4
4
  import { Gamification as GamificationClass } from '@streamlayer/feature-gamification';
5
5
  export declare const GamificationOverlay: React.FC<{
6
6
  gamification: GamificationClass;
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
2
  import { styled as m } from "@linaria/react";
3
3
  import { useStore as a } from "@nanostores/react";
4
- import { SDKWhiteContainer as h } from "../../../styles.js";
4
+ import { SDKWhiteContainer as h } from "../../styles.js";
5
5
  import { useHideTransition as C } from "../../../../hooks/showIn.js";
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";
@@ -1,6 +1,6 @@
1
1
  import { AppNodeRef, ScrollNodeRef } from '../..';
2
- import { ResponsiveStore } from '../../useSdkResponsive';
3
- import { ScrollStore } from '../../useSdkScroll';
2
+ import { ResponsiveStore } from '../useSdkResponsive';
3
+ import { ScrollStore } from '../useSdkScroll';
4
4
  import { Features } from '@streamlayer/sdk-web-features';
5
5
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
6
6
  /** render feature by type */
@@ -1,4 +1,4 @@
1
- import { ResponsiveStore } from '../../../useSdkResponsive';
1
+ import { ResponsiveStore } from '../../useSdkResponsive';
2
2
  import { ChannelsButtonId } from '../../../../ui/navigation/button/Channels';
3
3
  import { FeaturedGroupsButtonId } from '../../../../ui/navigation/button/FeaturedGroups';
4
4
  import { LeaderBoardButtonId } from '../../../../ui/navigation/button/LeaderBoard';
@@ -1,5 +1,5 @@
1
1
  import { AppNodeRef } from '../../..';
2
- import { ResponsiveStore } from '../../../useSdkResponsive';
2
+ import { ResponsiveStore } from '../../useSdkResponsive';
3
3
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
4
4
  import { Notification } from '@streamlayer/sdk-web-notifications';
5
5
  export declare const Onboarding: React.FC<{
@@ -1,8 +1,8 @@
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
3
  import { useStore as I } from "@nanostores/react";
4
- import { useImagesPreload as F } from "../../../useImagesPreload.js";
5
- import { scrollIntoAppView as T } from "../../../useSdkScroll.js";
4
+ import { scrollIntoAppView as F } from "../../useSdkScroll.js";
5
+ import { useImagesPreload as T } from "../../../useImagesPreload.js";
6
6
  import { useRef as A, useState as S, useMemo as x, useLayoutEffect as _, useEffect as B } from "react";
7
7
  import { FeatureType as j } from "@streamlayer/sdk-web-types";
8
8
  import { OnboardingUI as E } from "../../../../ui/gamification/onboarding/index.js";
@@ -118,7 +118,7 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
118
118
  const {
119
119
  loading: g,
120
120
  throttled: V
121
- } = F(m);
121
+ } = T(m);
122
122
  return f && o && e && s.current && !V ? /* @__PURE__ */ t(G, {
123
123
  container: s,
124
124
  useContainer: !a,
@@ -153,7 +153,7 @@ const R = "data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200
153
153
  close: r.close,
154
154
  action: () => {
155
155
  var n;
156
- d(!0), (((n = s.current) == null ? void 0 : n.getBoundingClientRect().y) || 0) < 0 && T(s, h.size, {
156
+ d(!0), (((n = s.current) == null ? void 0 : n.getBoundingClientRect().y) || 0) < 0 && F(s, h.size, {
157
157
  behavior: "smooth"
158
158
  });
159
159
  },
@@ -1,6 +1,6 @@
1
1
  import { AppNodeRef, ScrollNodeRef, HeaderNodeRef } from '../..';
2
- import { ResponsiveStore } from '../../useSdkResponsive';
3
- import { ScrollStore } from '../../useSdkScroll';
2
+ import { ResponsiveStore } from '../useSdkResponsive';
3
+ import { ScrollStore } from '../useSdkScroll';
4
4
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
5
5
  export declare const SDKNotifications: React.FC<{
6
6
  sdk: StreamLayerSDK;
@@ -2,7 +2,7 @@ import { jsxs as f, Fragment as D, jsx as c } from "react/jsx-runtime";
2
2
  import { cx as N } from "@linaria/core";
3
3
  import { useStore as g } from "@nanostores/react";
4
4
  import { useMastersContext as T } from "../useMastersContext.js";
5
- import { scrollIntoAppView as q } from "../../useSdkScroll.js";
5
+ import { scrollIntoAppView as q } from "../useSdkScroll.js";
6
6
  import { useState as p, useMemo as E, useEffect as h, useRef as O, useCallback as w } from "react";
7
7
  import { r as b } from "../../../index-B1QdimmR.js";
8
8
  import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
@@ -1,25 +1,25 @@
1
1
  import { jsx as n, jsxs as v } from "react/jsx-runtime";
2
2
  import { useStore as C } from "@nanostores/react";
3
- import { SDKContainer as x, SDKScrollContainer as A } from "../styles.js";
4
- import { useSdkFeature as F } from "../useSdkFeature.js";
5
- import { useSdkResponsive as M } from "../useSdkResponsive.js";
6
- import { useSdkScroll as b } from "../useSdkScroll.js";
7
- import { useAnalyticsListener as d, newTabLinkListener as D, appScrollListener as I, appClickListener as B } from "../../hooks/analytics.js";
8
- import { useRef as S, useMemo as T, useEffect as j } from "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";
9
8
  import { resetCss as p } from "../../ui/theme/theme.js";
10
- import { ActiveFeature as k, StandaloneFeature as E } from "./Features/index.js";
11
- import { MastersNavigation as K } from "./Navigation/MastersNavigation/index.js";
12
- import { SDKNotifications as O } from "./Notifications/index.js";
13
- import { useMastersApp as R } from "./useMastersApp.js";
14
- import { MastersContext as w } from "./useMastersContext.js";
9
+ import { ActiveFeature as j, StandaloneFeature as k } from "./Features/index.js";
10
+ import { MastersNavigation as E } from "./Navigation/MastersNavigation/index.js";
11
+ import { SDKNotifications as K } from "./Notifications/index.js";
12
+ import { useMastersApp as O } from "./useMastersApp.js";
13
+ import { MastersContext as R } from "./useMastersContext.js";
14
+ import { useSdkResponsive as w } from "./useSdkResponsive.js";
15
15
  import { StreamLayerMastersThemeProvider as ce } from "../../ui/theme/masters.js";
16
16
  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] = F(e);
20
+ const [, r] = M(e);
21
21
  return /* @__PURE__ */ n(
22
- k,
22
+ j,
23
23
  {
24
24
  className: i,
25
25
  scrollNode: s,
@@ -35,7 +35,7 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
35
35
  return s ? Array.from(s, (o) => {
36
36
  const r = e.getFeature(o);
37
37
  return r ? /* @__PURE__ */ n(
38
- E,
38
+ k,
39
39
  {
40
40
  className: i,
41
41
  appNode: l,
@@ -47,24 +47,24 @@ 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] = M(t), [r, f] = b(t, o), { sdkEnabled: a, sdkReady: c, activeOverlay: m, activateAndLoadOverlay: h, activateEventWithId: N, deactivate: g, isLogged: y } = R(e);
51
- d(t, { enabled: a, event: "click", listener: D }), d(r, {
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, {
52
52
  enabled: a,
53
53
  event: "scrollend",
54
- listener: I,
54
+ listener: D,
55
55
  useDomNode: !0
56
56
  }), d(r, {
57
57
  enabled: a,
58
58
  event: "click",
59
- listener: B,
59
+ listener: I,
60
60
  useDomNode: !0
61
61
  });
62
- const L = T(() => ({ sdk: e }), [e]);
63
- return j(() => {
62
+ const L = B(() => ({ sdk: e }), [e]);
63
+ return T(() => {
64
64
  import("./Features/Gamification/gamification-feature.js");
65
- }, []), /* @__PURE__ */ n(w.Provider, { value: L, children: /* @__PURE__ */ v(x, { ref: t, children: [
65
+ }, []), /* @__PURE__ */ n(R.Provider, { value: L, children: /* @__PURE__ */ v(x, { ref: t, children: [
66
66
  a && /* @__PURE__ */ n(
67
- K,
67
+ E,
68
68
  {
69
69
  ref: s,
70
70
  sdkReady: c,
@@ -80,7 +80,7 @@ const W = ({ sdk: e, className: i, scrollStore: l, appNode: t, scrollNode: s, re
80
80
  ),
81
81
  /* @__PURE__ */ v(A, { className: "sl-hide-on-modal", ref: r, "data-nav": a.toString(), children: [
82
82
  c && /* @__PURE__ */ n(
83
- O,
83
+ K,
84
84
  {
85
85
  sdk: e,
86
86
  scrollNode: r,
@@ -0,0 +1,20 @@
1
+ export declare const SDKContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
+ export declare const SDKScrollContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const SDKContentContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare const SDKWhiteContainer: {
5
+ __wyw_meta: unknown;
6
+ } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
7
+ as?: React.ElementType;
8
+ }>;
9
+ export declare const TabsContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
10
+ export declare const LeaderboardContainer: {
11
+ __wyw_meta: unknown;
12
+ } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
13
+ as?: React.ElementType;
14
+ }>;
15
+ export declare const TabsNavContainer: {
16
+ __wyw_meta: unknown;
17
+ } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
18
+ as?: React.ElementType;
19
+ }>;
20
+ export declare const UserSummaryContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,44 +1,44 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  const i = /* @__PURE__ */ s("div")({
3
3
  name: "SDKContainer",
4
- class: "s2j5adf",
4
+ class: "s8zgqze",
5
5
  propsAsIs: !1
6
- }), c = /* @__PURE__ */ s("div")({
6
+ }), p = /* @__PURE__ */ s("div")({
7
7
  name: "SDKScrollContainer",
8
- class: "st9ayqn",
8
+ class: "s6t897k",
9
9
  propsAsIs: !1
10
10
  }), a = /* @__PURE__ */ s("div")({
11
11
  name: "SDKContentContainer",
12
- class: "s6rlym7",
12
+ class: "sw7pkvp",
13
13
  propsAsIs: !1
14
14
  }), e = () => a, n = /* @__PURE__ */ s(e())({
15
15
  name: "SDKWhiteContainer",
16
- class: "s1trfff0",
16
+ class: "s14gkn7u",
17
17
  propsAsIs: !0
18
- }), l = /* @__PURE__ */ s("div")({
18
+ }), c = /* @__PURE__ */ s("div")({
19
19
  name: "TabsContainer",
20
- class: "t87r8je",
20
+ class: "t1yxstm9",
21
21
  propsAsIs: !1
22
- }), o = () => n, p = /* @__PURE__ */ s(o())({
22
+ }), o = () => n, l = /* @__PURE__ */ s(o())({
23
23
  name: "LeaderboardContainer",
24
- class: "l1aiq1lq",
24
+ class: "ldpty1s",
25
25
  propsAsIs: !0
26
- }), r = () => n, C = /* @__PURE__ */ s(r())({
26
+ }), t = () => n, C = /* @__PURE__ */ s(t())({
27
27
  name: "TabsNavContainer",
28
- class: "t1o5m8d1",
28
+ class: "t136a59y",
29
29
  propsAsIs: !0
30
30
  }), m = /* @__PURE__ */ s("div")({
31
31
  name: "UserSummaryContainer",
32
- class: "uqh0y7s",
32
+ class: "u11vnm9m",
33
33
  propsAsIs: !1
34
34
  });
35
35
  export {
36
- p as LeaderboardContainer,
36
+ l as LeaderboardContainer,
37
37
  i as SDKContainer,
38
38
  a as SDKContentContainer,
39
- c as SDKScrollContainer,
39
+ p as SDKScrollContainer,
40
40
  n as SDKWhiteContainer,
41
- l as TabsContainer,
41
+ c as TabsContainer,
42
42
  C as TabsNavContainer,
43
43
  m as UserSummaryContainer
44
44
  };
@@ -0,0 +1,15 @@
1
+ import { AppNodeRef } from '..';
2
+ import { MapStore } from 'nanostores';
3
+ import { BREAKPOINTS } from '../../ui/theme/constants';
4
+ type BREAKPOINTS_KEYS = keyof typeof BREAKPOINTS;
5
+ type ResponsiveData = {
6
+ screen: {
7
+ name: BREAKPOINTS_KEYS;
8
+ size: (typeof BREAKPOINTS)[BREAKPOINTS_KEYS];
9
+ };
10
+ sdkInView: boolean;
11
+ sdkInDesktopView: boolean;
12
+ };
13
+ export type ResponsiveStore = MapStore<ResponsiveData>;
14
+ export declare const useSdkResponsive: (appNode: AppNodeRef) => [ResponsiveStore];
15
+ export {};