@streamlayer/react 1.9.8 → 1.10.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,34 +1,34 @@
1
1
  import { jsx as s, jsxs as g, Fragment as k } from "react/jsx-runtime";
2
- import { N as y, M as $, s as I, u as l, T as L, S as M, C as D, p as T, k as E, O as A, m as h, l as F, c as O, a as P, b as R, d as V, e as Q, n as q, f as H } from "./masters.js";
3
- import { useRef as K, useState as N, useEffect as v, useTransition as U } from "react";
4
- const j = (e, t, o) => {
2
+ import { A as y, M as $, s as I, u as l, T as L, S as M, C as D, p as T, k as E, O as A, m as h, l as F, c as O, a as P, b as R, d as V, e as Q, n as H, f as K } from "./masters.js";
3
+ import { useRef as U, useState as w, useEffect as v, useTransition as j } from "react";
4
+ const q = (e, t, o) => {
5
5
  const r = t >= y.lg && t < y.xl ? 75 : 52;
6
6
  e.current && window.scrollTo({
7
7
  top: e.current.offsetTop - r,
8
8
  ...o
9
9
  });
10
- }, B = /* @__PURE__ */ I("div")({
10
+ }, z = /* @__PURE__ */ I("div")({
11
11
  name: "InviteFriendsContainer",
12
12
  class: "i1c9dygq",
13
13
  propsAsIs: !1
14
- }), W = ({
14
+ }), B = ({
15
15
  deepLink: e
16
- }) => /* @__PURE__ */ s(B, {
16
+ }) => /* @__PURE__ */ s(z, {
17
17
  children: /* @__PURE__ */ s($, {
18
18
  inviteLink: e,
19
19
  inviteCardTitle: "It’s More Fun With Friends",
20
20
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
21
21
  })
22
- }), _ = /* @__PURE__ */ I("div")({
22
+ }), W = /* @__PURE__ */ I("div")({
23
23
  name: "InviteLinkContainer",
24
24
  class: "i1odbhm4",
25
25
  propsAsIs: !1
26
- }), z = ({
26
+ }), _ = ({
27
27
  gamification: e,
28
28
  scrollNode: t,
29
29
  scrollStore: o
30
30
  }) => {
31
- const r = K(null), {
31
+ const r = U(null), {
32
32
  data: n,
33
33
  hasMore: i,
34
34
  loading: c,
@@ -36,7 +36,7 @@ const j = (e, t, o) => {
36
36
  } = l(e.leaderboardList.$store), {
37
37
  data: a
38
38
  } = l(e.deepLink.$store), [d, m] = L(r);
39
- return !n.length && !c ? /* @__PURE__ */ s(W, {
39
+ return !n.length && !c ? /* @__PURE__ */ s(B, {
40
40
  deepLink: a
41
41
  }) : /* @__PURE__ */ g(k, {
42
42
  children: [/* @__PURE__ */ s(M, {
@@ -47,7 +47,7 @@ const j = (e, t, o) => {
47
47
  hasMore: i,
48
48
  openItemDetail: e.openUser,
49
49
  currentUserId: e.currentUserId.get()
50
- }, p), a && /* @__PURE__ */ s(_, {
50
+ }, p), a && /* @__PURE__ */ s(W, {
51
51
  ref: r,
52
52
  children: /* @__PURE__ */ s(D, {
53
53
  onClick: () => d(a),
@@ -61,7 +61,7 @@ const j = (e, t, o) => {
61
61
  return /* @__PURE__ */ s(E, { openQuestion: t, questions: r.data, controlVideo: o == null ? void 0 : o.controlVideoPlayer });
62
62
  }, J = ({ userSummary: e }) => {
63
63
  var t;
64
- const [o, r] = N(void 0);
64
+ const [o, r] = w(void 0);
65
65
  return v(() => {
66
66
  const n = e.$store.subscribe((i) => {
67
67
  i && r(i);
@@ -71,10 +71,10 @@ const j = (e, t, o) => {
71
71
  };
72
72
  }, [e]), /* @__PURE__ */ s(A, { loading: !(o != null && o.summary), ...o == null ? void 0 : o.summary, successRate: (t = o == null ? void 0 : o.percentage) == null ? void 0 : t.correct });
73
73
  }, X = ({ gamification: e, className: t, scrollStore: o, scrollNode: r, appNode: n, style: i, responsiveStore: c }) => {
74
- const { tabsShown: p } = l(o, { keys: ["tabsShown"] }), a = l(e.friendsTabEnabled), [d, m] = N(h.HOME), [, w] = U(), { sdkInDesktopView: S, screen: x } = l(c, { keys: ["sdkInDesktopView"] }), C = (u) => {
75
- w(() => {
74
+ const { tabsShown: p } = l(o, { keys: ["tabsShown"] }), a = l(e.friendsTabEnabled), [d, m] = w(h.HOME), [, N] = j(), { sdkInDesktopView: S, screen: x } = l(c, { keys: ["sdkInDesktopView"] }), C = (u) => {
75
+ N(() => {
76
76
  var b;
77
- m(u), S === !1 && (((b = n.current) == null ? void 0 : b.getBoundingClientRect().y) || 0) < 0 && j(n, x.size, { behavior: "instant" });
77
+ m(u), S === !1 && (((b = n.current) == null ? void 0 : b.getBoundingClientRect().y) || 0) < 0 && q(n, x.size, { behavior: "instant" });
78
78
  });
79
79
  };
80
80
  v(() => o.subscribe((u) => {
@@ -99,9 +99,9 @@ const j = (e, t, o) => {
99
99
  ),
100
100
  d === h.HOME && /* @__PURE__ */ g(k, { children: [
101
101
  /* @__PURE__ */ s(V, { children: /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(J, { userSummary: e.userSummary }) }) }),
102
- /* @__PURE__ */ s(q, { style: { flex: 1 }, children: /* @__PURE__ */ s(G, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
102
+ /* @__PURE__ */ s(H, { style: { flex: 1 }, children: /* @__PURE__ */ s(G, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
103
103
  ] }),
104
- d === h.LEADERBOARD && /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(z, { scrollStore: o, scrollNode: r, gamification: e }) })
104
+ d === h.LEADERBOARD && /* @__PURE__ */ s(K, { children: /* @__PURE__ */ s(_, { scrollStore: o, scrollNode: r, gamification: e }) })
105
105
  ] });
106
106
  }, oe = ({
107
107
  gamification: e,