@streamlayer/react-ui 0.72.0 → 0.74.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.
@@ -1,9 +1,9 @@
1
1
  import { useStore as m } from "@nanostores/react";
2
- import { useRef as y, useState as d, useCallback as F, useEffect as A } from "react";
3
- import { FeatureType as z } from "@streamlayer/sdk-web-types";
2
+ import { useRef as y, useState as v, useCallback as F, useEffect as d } from "react";
3
+ import { FeatureType as I } from "@streamlayer/sdk-web-types";
4
4
  import "react/jsx-runtime";
5
5
  import { ChannelsButtonId as c } from "../navigation/button/Channels.js";
6
- import { FeaturedGroupsButtonId as n } from "../navigation/button/FeaturedGroups.js";
6
+ import { FeaturedGroupsButtonId as a } from "../navigation/button/FeaturedGroups.js";
7
7
  import "@linaria/react";
8
8
  import "../icons/index.js";
9
9
  import "../navigation/button/styles.js";
@@ -11,26 +11,26 @@ import "../../LeaderBoard_16p26hz-4ed993c7.js";
11
11
  import "../../index_4nhkck-4ed993c7.js";
12
12
  import "../../masters_k70xsy-4ed993c7.js";
13
13
  import "../navigation/button/index.js";
14
- const q = (e) => {
15
- const a = y(""), [l, f] = d(!1), S = m(e.status), r = m(e.userId()), i = S === "ready", [s, u] = d(n), p = F(
14
+ const j = (e) => {
15
+ const n = y(""), [f, l] = v(!1), A = m(e.status), r = m(e.userId()), i = A === "ready", [s, u] = v(a), p = F(
16
16
  (t, o) => {
17
- u(o), o === n ? (t && e.createEventSession(t), e.openFeature(z.GAMES)) : e.closeFeature();
17
+ u(o), o === a ? (t && e.createEventSession(t), e.openFeature(I.GAMES)) : e.closeFeature();
18
18
  },
19
19
  [e]
20
20
  );
21
- A(() => {
22
- !i && s === n && (u(c), e.closeFeature());
21
+ d(() => {
22
+ !i && s === a && (u(c), e.closeFeature());
23
23
  }, [i, s, e]);
24
- const b = (t) => {
25
- a.current = t, e.initializeApp().then(({ enabled: o, err: E }) => {
26
- if (f(!0), E) {
24
+ const E = (t) => {
25
+ n.current = t, e.initializeApp().then(({ enabled: o, err: b }) => {
26
+ if (l(!0), b) {
27
27
  p(t, c);
28
28
  return;
29
29
  }
30
30
  if (o) {
31
31
  e.isUserAuthorized().then((h) => {
32
32
  if (h) {
33
- p(t, n);
33
+ p(t, a);
34
34
  return;
35
35
  } else
36
36
  e.disableApp();
@@ -38,27 +38,27 @@ const q = (e) => {
38
38
  return;
39
39
  }
40
40
  });
41
- }, v = () => {
42
- f(!1), e.disableApp();
41
+ }, S = () => {
42
+ l(!1), e.disableApp();
43
43
  };
44
- return A(() => {
44
+ return d(() => {
45
45
  if (!r) {
46
46
  i && (u(c), e.disableApp());
47
47
  return;
48
48
  }
49
- r && a.current && l && e.initializeApp().then(() => {
50
- e.createEventSession(a.current);
49
+ r && n.current && f && e.initializeApp().then(() => {
50
+ e.createEventSession(n.current);
51
51
  });
52
52
  }, [r]), {
53
- sdkEnabled: l,
53
+ sdkEnabled: f,
54
54
  sdkReady: i,
55
55
  activeOverlay: s,
56
56
  activateAndLoadOverlay: p,
57
- enableSdk: b,
58
- disableSdk: v,
57
+ activateEventWithId: E,
58
+ deactivate: S,
59
59
  isLogged: !!r
60
60
  };
61
61
  };
62
62
  export {
63
- q as useMastersApp
63
+ j as useMastersApp
64
64
  };
@@ -1,21 +1,20 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { styled as p } from "@linaria/react";
3
- const r = /* @__PURE__ */ p("div")({
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { styled as s } from "@linaria/react";
3
+ import { SvgIcon as r } from "../../../icons/index.js";
4
+ import "react";
5
+ const p = /* @__PURE__ */ s("div")({
4
6
  name: "SponsorLogoWrap",
5
7
  class: "s8p5v5z",
6
8
  propsAsIs: !1
7
- }), n = /* @__PURE__ */ p("img")({
9
+ }), n = () => r, t = /* @__PURE__ */ s(n())({
8
10
  name: "SponsorLogo",
9
11
  class: "s755yti",
10
- propsAsIs: !1
11
- }), c = ({
12
- sponsorLogo: o
13
- }) => o && /* @__PURE__ */ s(r, {
14
- children: /* @__PURE__ */ s(n, {
15
- alt: "sponsor-logo",
16
- src: o
12
+ propsAsIs: !0
13
+ }), i = () => /* @__PURE__ */ o(p, {
14
+ children: /* @__PURE__ */ o(t, {
15
+ name: "mastersLogo"
17
16
  })
18
17
  });
19
18
  export {
20
- c as Sponsor
19
+ i as Sponsor
21
20
  };
@@ -10,7 +10,7 @@ const l = /* @__PURE__ */ s("div")({
10
10
  name: "IconContainer",
11
11
  class: "i1w4fsni",
12
12
  propsAsIs: !1
13
- }), o = () => n, r = /* @__PURE__ */ s(o())({
13
+ }), a = () => n, r = /* @__PURE__ */ s(a())({
14
14
  name: "InviteGameIcon",
15
15
  class: "i19m85r1",
16
16
  propsAsIs: !0
@@ -26,15 +26,15 @@ const l = /* @__PURE__ */ s("div")({
26
26
  name: "Subtext",
27
27
  class: "s1lhlj9j",
28
28
  propsAsIs: !1
29
- }), L = /* @__PURE__ */ s("div")({
29
+ }), f = /* @__PURE__ */ s("div")({
30
30
  name: "LinkContainer",
31
31
  class: "l1wot35e",
32
32
  propsAsIs: !1
33
- }), d = /* @__PURE__ */ s("div")({
33
+ }), L = /* @__PURE__ */ s("div")({
34
34
  name: "LinkInfo",
35
35
  class: "l1jdw39q",
36
36
  propsAsIs: !1
37
- }), f = /* @__PURE__ */ s("span")({
37
+ }), d = /* @__PURE__ */ s("span")({
38
38
  name: "LinkTitle",
39
39
  class: "l1cr5mk",
40
40
  propsAsIs: !1
@@ -42,7 +42,7 @@ const l = /* @__PURE__ */ s("div")({
42
42
  name: "LinkAddress",
43
43
  class: "lvi87q4",
44
44
  propsAsIs: !1
45
- }), a = () => n, v = /* @__PURE__ */ s(a())({
45
+ }), o = () => n, v = /* @__PURE__ */ s(o())({
46
46
  name: "LinkIcon",
47
47
  class: "l1pqlvw3",
48
48
  propsAsIs: !0
@@ -66,10 +66,10 @@ export {
66
66
  p as IconContainer,
67
67
  r as InviteGameIcon,
68
68
  A as LinkAddress,
69
- L as LinkContainer,
69
+ f as LinkContainer,
70
70
  v as LinkIcon,
71
- d as LinkInfo,
72
- f as LinkTitle,
71
+ L as LinkInfo,
72
+ d as LinkTitle,
73
73
  S as SocialLink,
74
74
  b as SocialLinkLabel,
75
75
  C as SocialLinksContainer,
@@ -45,6 +45,7 @@ export declare const icons: {
45
45
  selected: any;
46
46
  circleClose: any;
47
47
  incorrectVoted: any;
48
+ mastersLogo: any;
48
49
  };
49
50
  export declare const Icon: React.FC<{
50
51
  name: keyof typeof icons;