@streamlayer/react 1.0.0 → 1.1.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,4 +1,4 @@
1
- import { E as f } from "./masters.js";
1
+ import { z as f } from "./masters.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,21 +1,21 @@
1
- import { jsx as s, jsxs as f, Fragment as y } from "react/jsx-runtime";
2
- import { M as x, s as k, u as d, T as C, S as $, g as L, p as D, k as M, O as A, m as v, a as E, C as F, b as R, n as V, c as q, d as O, l as P, e as Q } from "./masters.js";
3
- import { useRef as T, useState as b, useEffect as I, useTransition as K } from "react";
4
- const U = /* @__PURE__ */ k("div")({
1
+ import { jsx as s, jsxs as v, Fragment as S } from "react/jsx-runtime";
2
+ import { M as C, s as b, u as d, T as x, S as $, C as L, p as D, k as M, O as E, m as f, l as A, a as F, b as R, n as V, c as q, d as O, e as P, f as Q } from "./masters.js";
3
+ import { useRef as T, useState as k, useEffect as I, useTransition as K } from "react";
4
+ const U = /* @__PURE__ */ b("div")({
5
5
  name: "InviteFriendsContainer",
6
- class: "i1d1hf8u",
6
+ class: "i1c9dygq",
7
7
  propsAsIs: !1
8
8
  }), j = ({
9
9
  deepLink: o
10
10
  }) => /* @__PURE__ */ s(U, {
11
- children: /* @__PURE__ */ s(x, {
11
+ children: /* @__PURE__ */ s(C, {
12
12
  inviteLink: o,
13
13
  inviteCardTitle: "It’s More Fun With Friends",
14
14
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
15
15
  })
16
- }), B = /* @__PURE__ */ k("div")({
16
+ }), B = /* @__PURE__ */ b("div")({
17
17
  name: "InviteLinkContainer",
18
- class: "i9tvant",
18
+ class: "i1odbhm4",
19
19
  propsAsIs: !1
20
20
  }), H = ({
21
21
  gamification: o,
@@ -29,10 +29,10 @@ const U = /* @__PURE__ */ k("div")({
29
29
  key: p
30
30
  } = d(o.leaderboardList.$store), {
31
31
  data: a
32
- } = d(o.deepLink.$store), [u, m] = C(r);
32
+ } = d(o.deepLink.$store), [u, m] = x(r);
33
33
  return !n.length && !l ? /* @__PURE__ */ s(j, {
34
34
  deepLink: a
35
- }) : /* @__PURE__ */ f(y, {
35
+ }) : /* @__PURE__ */ v(S, {
36
36
  children: [/* @__PURE__ */ s($, {
37
37
  items: n,
38
38
  scrollNode: t,
@@ -55,7 +55,7 @@ const U = /* @__PURE__ */ k("div")({
55
55
  return /* @__PURE__ */ s(M, { openQuestion: t, questions: r.data, controlVideo: e == null ? void 0 : e.controlVideoPlayer });
56
56
  }, W = ({ userSummary: o }) => {
57
57
  var t;
58
- const [e, r] = b(void 0);
58
+ const [e, r] = k(void 0);
59
59
  return I(() => {
60
60
  const n = o.$store.subscribe((i) => {
61
61
  i && r(i);
@@ -63,12 +63,12 @@ const U = /* @__PURE__ */ k("div")({
63
63
  return () => {
64
64
  n();
65
65
  };
66
- }, [o]), /* @__PURE__ */ s(A, { loading: !(e != null && e.summary), ...e == null ? void 0 : e.summary, successRate: (t = e == null ? void 0 : e.percentage) == null ? void 0 : t.correct });
66
+ }, [o]), /* @__PURE__ */ s(E, { loading: !(e != null && e.summary), ...e == null ? void 0 : e.summary, successRate: (t = e == null ? void 0 : e.percentage) == null ? void 0 : t.correct });
67
67
  }, _ = ({ gamification: o, className: t, scrollStore: e, scrollNode: r, appNode: n, style: i, responsiveStore: l }) => {
68
- const { tabsShown: p } = d(e, { keys: ["tabsShown"] }), [a, u] = b(v.HOME), [, m] = K(), { sdkInDesktopView: g, screen: N } = d(l, { keys: ["sdkInDesktopView"] }), w = (c) => {
68
+ const { tabsShown: p } = d(e, { keys: ["tabsShown"] }), [a, u] = k(f.HOME), [, m] = K(), { sdkInDesktopView: g, screen: N } = d(l, { keys: ["sdkInDesktopView"] }), w = (c) => {
69
69
  m(() => {
70
- var S;
71
- u(c), g === !1 && (((S = n.current) == null ? void 0 : S.getBoundingClientRect().y) || 0) < 0 && Q(n, N.size, { behavior: "instant" });
70
+ var y;
71
+ u(c), g === !1 && (((y = n.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && Q(n, N.size, { behavior: "instant" });
72
72
  });
73
73
  };
74
74
  I(() => e.subscribe((c) => {
@@ -79,7 +79,7 @@ const U = /* @__PURE__ */ k("div")({
79
79
  l.get().sdkInDesktopView ? e.setKey("tabsShown", c.scrollDirection === "backward") : e.setKey("tabsShown", c.scrollDirection === "forward");
80
80
  }), [e, l]);
81
81
  let h = "0px";
82
- return g ? h = p ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : h = p ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ f(E, { className: t, style: i, children: [
82
+ return g ? h = p ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : h = p ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ v(A, { className: t, style: i, children: [
83
83
  /* @__PURE__ */ s(
84
84
  F,
85
85
  {
@@ -89,11 +89,11 @@ const U = /* @__PURE__ */ k("div")({
89
89
  children: /* @__PURE__ */ s(R, { activePage: a, toggleActivePage: w })
90
90
  }
91
91
  ),
92
- a === v.HOME && /* @__PURE__ */ f(y, { children: [
92
+ a === f.HOME && /* @__PURE__ */ v(S, { children: [
93
93
  /* @__PURE__ */ s(V, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(W, { userSummary: o.userSummary }) }) }),
94
94
  /* @__PURE__ */ s(O, { style: { flex: 1 }, children: /* @__PURE__ */ s(z, { openQuestion: o.openQuestion, store: o.feedList.getStore() }) })
95
95
  ] }),
96
- a === v.LEADERBOARD && /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(H, { scrollStore: e, scrollNode: r, gamification: o }) })
96
+ a === f.LEADERBOARD && /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(H, { scrollStore: e, scrollNode: r, gamification: o }) })
97
97
  ] });
98
98
  }, Y = ({
99
99
  gamification: o,
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
- import { h as s, i as m, j as o, f as i } from "./masters.js";
3
2
  import "react";
3
+ import { h as s, i as m, j as o, g as i } from "./masters.js";
4
4
  export {
5
5
  s as MastersStreamLayerProvider,
6
6
  m as MastersStreamLayerSDKReact,