@streamlayer/react-ui 1.18.1 → 1.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/lib/app/app/Notifications/index.js +1 -1
  2. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +12 -8
  3. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +42 -14
  4. package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.d.ts +12 -0
  5. package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.js +40 -20
  6. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +8 -4
  7. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.d.ts +4 -0
  8. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/useDynamicParentFont.js +27 -0
  9. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +21 -19
  10. package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +1 -0
  11. package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.js +22 -17
  12. package/lib/app/masters/BetPack/BetPackContent/index.js +88 -62
  13. package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +1 -0
  14. package/lib/app/masters/BetPack/BetPackContent/styles.js +8 -7
  15. package/lib/app/masters/BetPack/index.js +59 -53
  16. package/lib/app/masters/Features/Gamification/Question.js +3 -3
  17. package/lib/app/masters/Features/Gamification/Tabs.d.ts +0 -7
  18. package/lib/app/masters/Features/Gamification/Tabs.js +9 -42
  19. package/lib/app/masters/Features/Gamification/UserSummary.js +15 -14
  20. package/lib/app/masters/Features/Gamification/index.d.ts +1 -6
  21. package/lib/app/masters/Features/Gamification/index.js +37 -76
  22. package/lib/app/masters/Features/index.d.ts +1 -6
  23. package/lib/app/masters/Features/index.js +15 -25
  24. package/lib/app/masters/Header/index.d.ts +3 -0
  25. package/lib/app/masters/Header/index.js +38 -0
  26. package/lib/app/masters/Notifications/index.js +1 -1
  27. package/lib/app/masters/masters.d.ts +1 -0
  28. package/lib/app/masters/masters.js +75 -92
  29. package/lib/app/masters/story/index.d.ts +1 -0
  30. package/lib/app/masters/story/index.js +21 -22
  31. package/lib/app/masters/styles.d.ts +0 -10
  32. package/lib/app/masters/styles.js +13 -23
  33. package/lib/app/masters/useSdkResponsive.js +1 -1
  34. package/lib/app/masters/useSdkScroll.js +1 -1
  35. package/lib/app/useClipboardCopy.js +1 -1
  36. package/lib/app/useSdkResponsive.js +1 -1
  37. package/lib/app/useSdkScroll.js +1 -1
  38. package/lib/assets/style.css +1 -1
  39. package/lib/index-BEm7B1u1.js +72 -0
  40. package/lib/index-DALxy-8N.js +5437 -0
  41. package/lib/ui/gamification/user-statistics/index.d.ts +1 -0
  42. package/lib/ui/gamification/user-statistics/index.js +47 -39
  43. package/lib/ui/gamification/user-statistics/styles.d.ts +2 -0
  44. package/lib/ui/gamification/user-statistics/styles.js +34 -24
  45. package/lib/ui/gamification/vote/feedback/index.d.ts +1 -0
  46. package/lib/ui/gamification/vote/feedback/index.js +60 -47
  47. package/lib/ui/gamification/vote/feedback/styles.d.ts +12 -0
  48. package/lib/ui/gamification/vote/feedback/styles.js +47 -27
  49. package/lib/ui/gamification/vote/index.js +145 -136
  50. package/lib/ui/gamification/vote/styles.d.ts +3 -1
  51. package/lib/ui/gamification/vote/styles.js +42 -32
  52. package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -0
  53. package/lib/ui/gamification/vote/vote-option/index.js +59 -60
  54. package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
  55. package/lib/ui/gamification/vote/vote-option/styles.js +16 -11
  56. package/lib/ui/icons/index.d.ts +3 -0
  57. package/lib/ui/icons/index.js +69 -51
  58. package/lib/ui/loader/index.js +4 -3
  59. package/lib/ui/modal/index.js +1 -1
  60. package/lib/ui/theme/masters-theme.js +152 -32
  61. package/lib/ui/theme/theme.js +66 -20
  62. package/package.json +16 -15
  63. package/lib/app/masters/Features/Gamification/Friends.d.ts +0 -3
  64. package/lib/app/masters/Features/Gamification/Friends.js +0 -19
  65. package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +0 -8
  66. package/lib/app/masters/Features/Gamification/Leaderboard.js +0 -56
  67. package/lib/index-B1QdimmR.js +0 -19047
  68. package/lib/index-CZvwzN5o.js +0 -75
  69. package/lib/index-xuotMAFm.js +0 -118
@@ -1,84 +1,90 @@
1
- import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
- import { useState as p, useCallback as y, memo as H, useMemo as k, useRef as B, useEffect as A } from "react";
3
- import { useStore as g } from "@streamlayer/react-polyfills";
4
- import { FeatureType as N } from "@streamlayer/sdk-web-types";
5
- import { BetPackContent as b } from "./BetPackContent/index.js";
6
- import { EmergencyScreen as L } from "./BetPackContent/EmergencyScreen/index.js";
7
- import { LoaderScreen as z } from "./BetPackContent/LoaderScreen/index.js";
8
- import { BetPackContainer as F } from "./styles.js";
9
- import { defaultEventHandler as I } from "./utils.js";
10
- import { cx as x } from "@linaria/core";
11
- import { SvgIcon as P } from "../../../ui/icons/index.js";
12
- import { Container as O, Header as R, HeaderTitle as j, CloseButton as E, Main as T, Footer as G, SlideSwitchButton as v, IconArrowPrev as M, buttonAvailable as w, IconArrowNext as U } from "./BetPackOverlay/styles.js";
13
- const re = ({ sdk: m, onEvent: i, close: f, isMobile: o }) => {
14
- const [t, h] = p(), [e, a] = p(), c = y(
1
+ import { jsxs as f, jsx as r } from "react/jsx-runtime";
2
+ import { cx as p } from "@linaria/core";
3
+ import C from "lodash.throttle";
4
+ import { useState as g, useCallback as S, memo as H, useMemo as B, useRef as N, useEffect as A } from "react";
5
+ import { useStore as P } from "@streamlayer/react-polyfills";
6
+ import { FeatureType as b } from "@streamlayer/sdk-web-types";
7
+ import { BetPackContent as L } from "./BetPackContent/index.js";
8
+ import { EmergencyScreen as z } from "./BetPackContent/EmergencyScreen/index.js";
9
+ import { LoaderScreen as F } from "./BetPackContent/LoaderScreen/index.js";
10
+ import { BetPackContainer as I } from "./styles.js";
11
+ import { defaultEventHandler as O } from "./utils.js";
12
+ import { SvgIcon as x } from "../../../ui/icons/index.js";
13
+ import { Container as R, Header as j, HeaderTitle as E, CloseButton as M, Main as T, Footer as G, SlideSwitchButton as v, IconArrowPrev as U, buttonAvailable as y, IconArrowNext as Y } from "./BetPackOverlay/styles.js";
14
+ const ne = ({ sdk: l, onEvent: o, close: u, isMobile: c }) => {
15
+ const [t, h] = g(), [e, a] = g(), i = S(
15
16
  (n) => {
16
17
  if (n.type === "slBetPackReady") {
17
- const { next: s, prev: d, current: l, canNext: S, canPrev: C } = n.payload || {};
18
- h({ next: s, prev: d }), a({ current: l, canNext: S, canPrev: C });
18
+ const { next: s, prev: d, current: m, canNext: k, canPrev: w } = n.payload || {};
19
+ h({ next: s, prev: d }), a({
20
+ current: m,
21
+ canPrev: w,
22
+ canNext: k
23
+ });
19
24
  }
20
25
  if (n.type === "slBetPackChangeCard") {
21
- const { current: s, canNext: d, canPrev: l } = n.payload || {};
22
- a({ current: s, canNext: d, canPrev: l });
26
+ const { current: s, canNext: d, canPrev: m } = n.payload || {};
27
+ a({ current: s, canNext: d, canPrev: m });
23
28
  }
24
- i == null || i(n);
29
+ o == null || o(n);
25
30
  },
26
- [i]
31
+ [o]
27
32
  );
28
- return /* @__PURE__ */ u(O, { children: [
29
- /* @__PURE__ */ u(R, { children: [
30
- /* @__PURE__ */ u(j, { children: [
31
- /* @__PURE__ */ r(P, { name: "icon-trophy-bet-pack" }),
33
+ return /* @__PURE__ */ f(R, { children: [
34
+ /* @__PURE__ */ f(j, { children: [
35
+ /* @__PURE__ */ f(E, { children: [
36
+ /* @__PURE__ */ r(x, { name: "icon-trophy-bet-pack" }),
32
37
  "LiveMatch Experience",
33
38
  " "
34
39
  ] }),
35
- /* @__PURE__ */ r(E, { onClick: f, children: /* @__PURE__ */ r(P, { name: "icon-close-btn-gray" }) })
40
+ /* @__PURE__ */ r(M, { onClick: u, children: /* @__PURE__ */ r(x, { name: "icon-close-btn-gray" }) })
36
41
  ] }),
37
42
  /* @__PURE__ */ r(T, { children: /* @__PURE__ */ r(
38
- Y,
43
+ q,
39
44
  {
40
- sdk: m,
41
- onEvent: c,
42
- swipeable: !!o,
43
- centerPadding: o ? "18px" : "50px",
44
- heightOffset: o ? 0 : 35
45
+ sdk: l,
46
+ onEvent: i,
47
+ swipeable: !!c,
48
+ centerPadding: c ? "18px" : "30px",
49
+ heightOffset: c ? 0 : 48
45
50
  }
46
51
  ) }),
47
- !o && /* @__PURE__ */ u(G, { children: [
48
- /* @__PURE__ */ r(v, { onClick: t == null ? void 0 : t.prev, disabled: !(e != null && e.canPrev), children: /* @__PURE__ */ r(M, { name: "iconArrowPrev", className: x((e == null ? void 0 : e.canPrev) && w) }) }),
49
- /* @__PURE__ */ r(v, { onClick: t == null ? void 0 : t.next, disabled: !(e != null && e.canNext), children: /* @__PURE__ */ r(U, { name: "iconArrowPrev", className: x((e == null ? void 0 : e.canNext) && w) }) })
52
+ !c && /* @__PURE__ */ f(G, { children: [
53
+ /* @__PURE__ */ r(v, { onClick: t == null ? void 0 : t.prev, disabled: !(e != null && e.canPrev), children: /* @__PURE__ */ r(U, { name: "iconArrowPrev", className: p((e == null ? void 0 : e.canPrev) && y) }) }),
54
+ /* @__PURE__ */ r(v, { onClick: t == null ? void 0 : t.next, disabled: !(e != null && e.canNext), children: /* @__PURE__ */ r(Y, { name: "iconArrowPrev", className: p((e == null ? void 0 : e.canNext) && y) }) })
50
55
  ] })
51
56
  ] });
52
- }, Y = H(({ sdk: m, swipeable: i = !0, heightOffset: f = 65, onEvent: o = I, centerPadding: t }) => {
53
- const h = g(m.featuresList.getStore()), e = k(() => m.getFeature(N.GAMES), [h]), a = g(m.getUserStore()), c = B(null), [n, s] = p(), d = y(() => {
54
- c.current && s(c.current.clientHeight);
57
+ }, q = H(({ sdk: l, swipeable: o = !0, heightOffset: u = 65, onEvent: c = O, centerPadding: t }) => {
58
+ const h = P(l.featuresList.getStore()), e = B(() => l.getFeature(b.GAMES), [h]), a = P(l.getUserStore()), i = N(null), [n, s] = g(), d = S(() => {
59
+ i.current && s(i.current.clientHeight);
55
60
  }, []);
56
61
  return A(() => {
57
- const l = () => {
58
- c.current && s(c.current.clientHeight);
62
+ const m = C(() => {
63
+ i.current && s(i.current.clientHeight);
64
+ }, 200);
65
+ return window.addEventListener("resize", m), () => {
66
+ window.removeEventListener("resize", m);
59
67
  };
60
- return window.addEventListener("resize", l), () => {
61
- window.removeEventListener("resize", l);
62
- };
63
- }, []), a.data ? e ? /* @__PURE__ */ r(F, { ref: c, children: /* @__PURE__ */ r(
64
- b,
68
+ }, []), a.data ? e ? /* @__PURE__ */ r(I, { ref: i, className: p("betPack", o && "isMobile"), children: /* @__PURE__ */ r(
69
+ L,
65
70
  {
66
71
  gamification: e,
67
- onEvent: o,
68
- swipeable: i,
72
+ onEvent: c,
73
+ swipeable: o,
69
74
  centerPadding: t,
70
75
  changeHeightOnInit: d,
71
- height: n ? n - f : void 0
76
+ height: n ? n - u : void 0
72
77
  }
73
78
  ) }) : /* @__PURE__ */ r("div", { children: "no gamification" }) : a.error && !a.loading ? /* @__PURE__ */ r(
74
- L,
79
+ z,
75
80
  {
76
- actionFn: () => o({ type: "slHardRefresh" }),
77
- description: "You are not authorized to view this resource."
81
+ actionFn: () => c({ type: "slHardRefresh" }),
82
+ description: `You are not authorized to
83
+ view this resource.`
78
84
  }
79
- ) : /* @__PURE__ */ r(z, {});
85
+ ) : /* @__PURE__ */ r(F, {});
80
86
  });
81
87
  export {
82
- Y as BetPack,
83
- re as BetPackOverlay
88
+ q as BetPack,
89
+ ne as BetPackOverlay
84
90
  };
@@ -41,7 +41,7 @@ const h = /* @__PURE__ */ l("div")({
41
41
  openedQuestion: i,
42
42
  isLoading: !!o
43
43
  }) : /* @__PURE__ */ e(b, {});
44
- }, A = ({
44
+ }, H = ({
45
45
  gamification: t
46
46
  }) => {
47
47
  var i;
@@ -60,10 +60,10 @@ const h = /* @__PURE__ */ l("div")({
60
60
  }), o !== "question" && /* @__PURE__ */ e(x, {
61
61
  openedQuestion: r
62
62
  }), /* @__PURE__ */ e(p, {
63
- mastersLogo: !0
63
+ mastersApp: !0
64
64
  })]
65
65
  });
66
66
  };
67
67
  export {
68
- A as Question
68
+ H as Question
69
69
  };
@@ -1,13 +1,6 @@
1
- import { AppNodeRef, ScrollNodeRef } from '../../..';
2
- import { ResponsiveStore } from '../../useSdkResponsive';
3
- import { ScrollStore } from '../../useSdkScroll';
4
1
  import { Gamification } from '@streamlayer/feature-gamification';
5
2
  export declare const Tabs: React.FC<{
6
- appNode: AppNodeRef;
7
3
  gamification: Gamification;
8
- scrollStore: ScrollStore;
9
- scrollNode: ScrollNodeRef;
10
- responsiveStore: ResponsiveStore;
11
4
  className?: string;
12
5
  style?: React.CSSProperties;
13
6
  }>;
@@ -1,44 +1,11 @@
1
- import { jsxs as h, jsx as e, Fragment as x } from "react/jsx-runtime";
2
- import { TabsContainer as D, TabsNavContainer as T, SDKWhiteContainer as v, UserSummaryContainer as C, SDKContentContainer as A, LeaderboardContainer as I } from "../../styles.js";
3
- import { scrollIntoAppView as P } from "../../useSdkScroll.js";
4
- import { useState as S, useEffect as V } from "react";
5
- import { useStore as u, useTransition as E } from "@streamlayer/react-polyfills";
6
- import { ActivePages as a, Tabs as K } from "../../../../ui/gamification/tabs/index.js";
7
- import { Leaderboard as L } from "./Leaderboard.js";
8
- import { QuestionsList as F } from "./QuestionsList.js";
9
- import { UserSummary as O } from "./UserSummary.js";
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] = E(), { sdkInDesktopView: m, screen: g } = u(n, { keys: ["sdkInDesktopView"] }), k = (r) => {
12
- y(() => {
13
- var p;
14
- w(r), m === !1 && (((p = c.current) == null ? void 0 : p.getBoundingClientRect().y) || 0) < 0 && P(c, g.size, { behavior: "instant" });
15
- });
16
- };
17
- V(() => t.subscribe((r) => {
18
- if (r.scrollPosition === 0) {
19
- t.setKey("tabsShown", !0);
20
- return;
21
- }
22
- n.get().sdkInDesktopView ? t.setKey("tabsShown", r.scrollDirection === "backward") : t.setKey("tabsShown", r.scrollDirection === "forward");
23
- }), [t, n]);
24
- let o = "0px";
25
- return m ? o = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : o = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ h(D, { className: f, style: b, children: [
26
- /* @__PURE__ */ e(
27
- T,
28
- {
29
- style: {
30
- top: o
31
- },
32
- children: /* @__PURE__ */ e(K, { activePage: i, toggleActivePage: k })
33
- }
34
- ),
35
- i === a.HOME && /* @__PURE__ */ h(x, { children: [
36
- /* @__PURE__ */ e(v, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(O, { userSummary: s.userSummary }) }) }),
37
- /* @__PURE__ */ e(A, { style: { flex: 1 }, children: /* @__PURE__ */ e(F, { openQuestion: s.openQuestion, store: s.feedList.getStore() }) })
38
- ] }),
39
- i === a.LEADERBOARD && /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(L, { scrollStore: t, scrollNode: l, gamification: s }) })
40
- ] });
41
- };
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { TabsContainer as s, SDKWhiteContainer as m, UserSummaryContainer as i, SDKContentContainer as p } from "../../styles.js";
3
+ import { QuestionsList as u } from "./QuestionsList.js";
4
+ import { UserSummary as a } from "./UserSummary.js";
5
+ const h = ({ gamification: r, className: t, style: o }) => /* @__PURE__ */ n(s, { className: t, style: o, children: [
6
+ /* @__PURE__ */ e(m, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(a, { userSummary: r.userSummary }) }) }),
7
+ /* @__PURE__ */ e(p, { style: { flex: 1 }, children: /* @__PURE__ */ e(u, { openQuestion: r.openQuestion, store: r.feedList.getStore() }) })
8
+ ] });
42
9
  export {
43
- q as Tabs
10
+ h as Tabs
44
11
  };
@@ -1,18 +1,19 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { useState as i, useEffect as n } from "react";
3
- import { UserStatistics as a } from "../../../../ui/gamification/user-statistics/index.js";
4
- const b = ({ userSummary: r }) => {
5
- var e;
6
- const [t, s] = i(void 0);
7
- return n(() => {
8
- const c = r.$store.subscribe((o) => {
9
- o && s(o);
10
- });
11
- return () => {
12
- c();
13
- };
14
- }, [r]), /* @__PURE__ */ m(a, { loading: !(t != null && t.summary), ...t == null ? void 0 : t.summary, successRate: (e = t == null ? void 0 : t.percentage) == null ? void 0 : e.correct });
2
+ import { useStore as e } from "@streamlayer/react-polyfills";
3
+ import { UserStatistics as s } from "../../../../ui/gamification/user-statistics/index.js";
4
+ const n = ({ userSummary: o }) => {
5
+ var t;
6
+ const r = e(o.$store);
7
+ return /* @__PURE__ */ m(
8
+ s,
9
+ {
10
+ hideFriendsRank: !0,
11
+ loading: !(r != null && r.summary),
12
+ ...r == null ? void 0 : r.summary,
13
+ successRate: (t = r == null ? void 0 : r.percentage) == null ? void 0 : t.correct
14
+ }
15
+ );
15
16
  };
16
17
  export {
17
- b as UserSummary
18
+ n as UserSummary
18
19
  };
@@ -1,14 +1,9 @@
1
- import { AppNodeRef, ScrollNodeRef } from '../../..';
1
+ import { AppNodeRef } from '../../..';
2
2
  import { ResponsiveStore } from '../../useSdkResponsive';
3
- import { ScrollStore } from '../../useSdkScroll';
4
3
  import { Gamification as GamificationClass } from '@streamlayer/feature-gamification';
5
4
  export declare const GamificationOverlay: React.FC<{
6
5
  gamification: GamificationClass;
7
6
  className?: string;
8
- scrollStore: ScrollStore;
9
- responsiveStore: ResponsiveStore;
10
- appNode: AppNodeRef;
11
- scrollNode: ScrollNodeRef;
12
7
  }>;
13
8
  /**
14
9
  * Standalone version of the gamification overlay
@@ -1,88 +1,49 @@
1
- import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { styled as m } from "@linaria/react";
3
- import { SDKWhiteContainer as h } from "../../styles.js";
4
- import { useHideTransition as C } from "../../../../hooks/showIn.js";
5
- import { useStore as a } from "@streamlayer/react-polyfills";
6
- import { VoteHeader as k } from "../../../../ui/gamification/detail/header/index.js";
7
- import { UserStatistics as S } from "../../../../ui/gamification/user-statistics/index.js";
8
- import { ModalPortal as U } from "../../../../ui/modal/index.js";
9
- import { ShowIn as y } from "../../../../ui/show-in/index.js";
10
- import { Question as I } from "./Question.js";
11
- import { Tabs as v } from "./Tabs.js";
12
- const x = () => y, p = /* @__PURE__ */ m(x())({
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { styled as u } from "@linaria/react";
3
+ import { useHideTransition as c } from "../../../../hooks/showIn.js";
4
+ import { useStore as t } from "@streamlayer/react-polyfills";
5
+ import { ModalPortal as d } from "../../../../ui/modal/index.js";
6
+ import { ShowIn as l } from "../../../../ui/show-in/index.js";
7
+ import { Question as f } from "./Question.js";
8
+ import { Tabs as k } from "./Tabs.js";
9
+ const h = () => l, y = /* @__PURE__ */ u(h())({
13
10
  name: "OpenedContainer",
14
11
  class: "o1seszvt",
15
12
  propsAsIs: !0
16
- }), O = /* @__PURE__ */ m("div")({
17
- name: "UserContainer",
18
- class: "u1pbry50",
19
- propsAsIs: !1
20
- }), b = ({
21
- correct: e,
22
- incorrect: r
23
- }) => {
24
- const o = e + r;
25
- return o === 0 ? 0 : Math.round(e / o * 100);
26
- }, z = ({
27
- gamification: e,
28
- scrollStore: r,
29
- className: o,
30
- appNode: i,
31
- scrollNode: s,
32
- responsiveStore: t
33
- }) => /* @__PURE__ */ n(v, {
34
- appNode: i,
35
- scrollStore: r,
36
- scrollNode: s,
37
- className: o,
38
- gamification: e,
39
- responsiveStore: t
40
- }), E = ({
41
- gamification: e,
42
- className: r,
43
- appNode: o,
13
+ }), A = ({
14
+ gamification: o,
15
+ className: e
16
+ }) => /* @__PURE__ */ n(k, {
17
+ className: e,
18
+ gamification: o
19
+ }), D = ({
20
+ gamification: o,
21
+ className: e,
22
+ appNode: r,
44
23
  responsiveStore: i
45
24
  }) => {
46
- const s = a(e.openedQuestion.$store), t = a(e.openedUser), {
47
- sdkInDesktopView: d
48
- } = a(i, {
25
+ const s = t(o.openedQuestion.$store), {
26
+ sdkInDesktopView: m
27
+ } = t(i, {
49
28
  keys: ["sdkInDesktopView"]
50
29
  }), {
51
- hiding: c,
52
- onAnimationEnd: l
53
- } = C();
54
- if (!o.current || !s && !t)
55
- return null;
56
- const u = s ? /* @__PURE__ */ n(p, {
57
- className: r,
58
- hiding: c,
59
- onAnimationEnd: l,
60
- children: /* @__PURE__ */ n(I, {
61
- gamification: e
62
- })
63
- }) : t ? /* @__PURE__ */ n(p, {
64
- className: r,
65
- hiding: c,
66
- onAnimationEnd: l,
67
- children: /* @__PURE__ */ f(O, {
68
- children: [/* @__PURE__ */ n(k, {
69
- label: "Friend's Rank",
70
- close: e.closeUser
71
- }), /* @__PURE__ */ n(h, {
72
- children: /* @__PURE__ */ n(S, {
73
- ...t,
74
- successRate: b(t)
75
- })
76
- })]
30
+ hiding: a,
31
+ onAnimationEnd: p
32
+ } = c();
33
+ return !r.current || !s ? null : /* @__PURE__ */ n(d, {
34
+ container: r,
35
+ useContainer: !m,
36
+ children: /* @__PURE__ */ n(y, {
37
+ className: e,
38
+ hiding: a,
39
+ onAnimationEnd: p,
40
+ children: /* @__PURE__ */ n(f, {
41
+ gamification: o
42
+ })
77
43
  })
78
- }) : null;
79
- return /* @__PURE__ */ n(U, {
80
- container: o,
81
- useContainer: !d,
82
- children: u
83
44
  });
84
45
  };
85
46
  export {
86
- z as GamificationOverlay,
87
- E as GamificationOverlayStandalone
47
+ A as GamificationOverlay,
48
+ D as GamificationOverlayStandalone
88
49
  };
@@ -1,16 +1,11 @@
1
- import { AppNodeRef, ScrollNodeRef } from '../..';
1
+ import { AppNodeRef } from '../..';
2
2
  import { ResponsiveStore } from '../useSdkResponsive';
3
- import { ScrollStore } from '../useSdkScroll';
4
3
  import { Features } from '@streamlayer/sdk-web-features';
5
4
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
6
5
  /** render feature by type */
7
6
  export declare const ActiveFeature: React.FC<{
8
7
  sdk: StreamLayerSDK;
9
8
  feature: Features | null;
10
- scrollStore: ScrollStore;
11
- responsiveStore: ResponsiveStore;
12
- appNode: AppNodeRef;
13
- scrollNode: ScrollNodeRef;
14
9
  className?: string;
15
10
  }>;
16
11
  /** render feature by type */
@@ -1,37 +1,27 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { lazy as f, useMemo as c, Suspense as g } from "react";
3
- import { FeatureType as m } from "@streamlayer/sdk-web-types";
4
- import { FeatureProvider as p } from "./FeatureProvider.js";
5
- import { GamificationOverlayStandalone as y } from "./Gamification/index.js";
6
- const d = f(() => import("./Gamification/gamification-feature.js")), x = ({ sdk: i, feature: t, className: n, scrollStore: e, appNode: o, scrollNode: a, responsiveStore: l }) => {
7
- const u = c(() => t && t.featureConfig.get().type === m.GAMES ? /* @__PURE__ */ r(p, { className: n, sdk: i, feature: t, children: /* @__PURE__ */ r(
8
- d,
9
- {
10
- appNode: o,
11
- scrollStore: e,
12
- scrollNode: a,
13
- className: n,
14
- responsiveStore: l,
15
- gamification: t
16
- }
17
- ) }) : null, [i, t, n, l, e, a, o]);
2
+ import { lazy as l, useMemo as a, Suspense as m } from "react";
3
+ import { FeatureType as o } from "@streamlayer/sdk-web-types";
4
+ import { FeatureProvider as u } from "./FeatureProvider.js";
5
+ import { GamificationOverlayStandalone as f } from "./Gamification/index.js";
6
+ const c = l(() => import("./Gamification/gamification-feature.js")), h = ({ sdk: e, feature: t, className: i }) => {
7
+ const n = a(() => t && t.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ r(u, { className: i, sdk: e, feature: t, children: /* @__PURE__ */ r(c, { className: i, gamification: t }) }) : null, [e, t, i]);
18
8
  return /* @__PURE__ */ r(
19
- g,
9
+ m,
20
10
  {
21
11
  fallback: /* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
22
- children: u
12
+ children: n
23
13
  }
24
14
  );
25
- }, A = ({ feature: i, className: t, appNode: n, responsiveStore: e }) => i && i.featureConfig.get().type === m.GAMES ? /* @__PURE__ */ r(
26
- y,
15
+ }, v = ({ feature: e, className: t, appNode: i, responsiveStore: n }) => e && e.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ r(
16
+ f,
27
17
  {
28
18
  className: t,
29
- appNode: n,
30
- responsiveStore: e,
31
- gamification: i
19
+ appNode: i,
20
+ responsiveStore: n,
21
+ gamification: e
32
22
  }
33
23
  ) : null;
34
24
  export {
35
- x as ActiveFeature,
36
- A as StandaloneFeature
25
+ h as ActiveFeature,
26
+ v as StandaloneFeature
37
27
  };
@@ -0,0 +1,3 @@
1
+ export declare const SDKHeader: import('react').ForwardRefExoticComponent<{
2
+ className?: string;
3
+ } & import('react').RefAttributes<HTMLDivElement | null>>;
@@ -0,0 +1,38 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { cx as a } from "@linaria/core";
3
+ import { styled as s } from "@linaria/react";
4
+ import { forwardRef as t } from "react";
5
+ import { SvgIcon as c } from "../../../ui/icons/index.js";
6
+ const i = /* @__PURE__ */ s("div")({
7
+ name: "Navigation",
8
+ class: "n1o1tw60",
9
+ propsAsIs: !1
10
+ }), m = /* @__PURE__ */ s("div")({
11
+ name: "Container",
12
+ class: "co2rstw",
13
+ propsAsIs: !1
14
+ }), p = /* @__PURE__ */ s("div")({
15
+ name: "Title",
16
+ class: "t1bqnx9c",
17
+ propsAsIs: !1
18
+ }), l = () => c, d = /* @__PURE__ */ s(l())({
19
+ name: "HeaderIcon",
20
+ class: "hlc2pcy",
21
+ propsAsIs: !0
22
+ }), f = "h1aqxe8k", g = t(({
23
+ className: o
24
+ }, n) => /* @__PURE__ */ r(i, {
25
+ className: a(o, f),
26
+ children: [/* @__PURE__ */ e(m, {
27
+ children: /* @__PURE__ */ r(p, {
28
+ children: [/* @__PURE__ */ e(d, {
29
+ name: "icon-trivia-transparent"
30
+ }), "Game Center"]
31
+ })
32
+ }), /* @__PURE__ */ e("div", {
33
+ ref: n
34
+ })]
35
+ }));
36
+ export {
37
+ g as SDKHeader
38
+ };
@@ -3,7 +3,7 @@ import { cx as N } from "@linaria/core";
3
3
  import { useMastersContext as T } from "../useMastersContext.js";
4
4
  import { scrollIntoAppView as q } from "../useSdkScroll.js";
5
5
  import { useState as p, useMemo as E, useEffect as h, useRef as O, useCallback as w } from "react";
6
- import { r as b } from "../../../index-B1QdimmR.js";
6
+ import { r as b } from "../../../index-DALxy-8N.js";
7
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";
@@ -7,5 +7,6 @@ export type MastersAppChildrenProps = {
7
7
  };
8
8
  export type MastersAppProps = {
9
9
  sdk: StreamLayerSDK;
10
+ betPack?: boolean;
10
11
  };
11
12
  export declare const MastersApp: React.FC<MastersAppProps>;