@streamlayer/react 1.9.8 → 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 (74) hide show
  1. package/lib/app/app.d.ts +3 -2
  2. package/lib/app/notification.d.ts +5 -0
  3. package/lib/app/provider.d.ts +1 -1
  4. package/lib/cjs/advertisement.js +1 -1
  5. package/lib/cjs/auth.js +1 -1
  6. package/lib/cjs/gamification-feature.js +1 -1
  7. package/lib/cjs/index.js +1 -1
  8. package/lib/cjs/insight.js +1 -1
  9. package/lib/cjs/masters.js +1 -1
  10. package/lib/cjs/masters2.js +3 -3
  11. package/lib/cjs/notification.js +1 -0
  12. package/lib/cjs/points.js +1 -1
  13. package/lib/cjs/provider.js +195 -0
  14. package/lib/cjs/useStreamLayerApp2.js +12 -12
  15. package/lib/classic/app/advertisement.d.ts +18 -0
  16. package/lib/classic/app/app.d.ts +19 -0
  17. package/lib/classic/app/auth.d.ts +4 -0
  18. package/lib/classic/app/event.d.ts +4 -0
  19. package/lib/classic/app/insight.d.ts +13 -0
  20. package/lib/classic/app/masters.d.ts +28 -0
  21. package/lib/classic/app/notification.d.ts +5 -0
  22. package/lib/classic/app/points.d.ts +3 -0
  23. package/lib/classic/app/provider.d.ts +43 -0
  24. package/lib/classic/app/useStreamLayerApp.d.ts +19 -0
  25. package/lib/classic/cjs/advertisement.js +1 -0
  26. package/lib/classic/cjs/auth.js +1 -0
  27. package/lib/classic/cjs/gamification-feature.js +1 -0
  28. package/lib/classic/cjs/gamification-feature2.js +1 -0
  29. package/lib/classic/cjs/index.js +1 -0
  30. package/lib/classic/cjs/insight.js +1 -0
  31. package/lib/classic/cjs/masters.js +1 -0
  32. package/lib/classic/cjs/masters2.js +9 -0
  33. package/lib/classic/cjs/notification.js +1 -0
  34. package/lib/classic/cjs/points.js +1 -0
  35. package/lib/classic/cjs/provider.js +195 -0
  36. package/lib/classic/cjs/useStreamLayerApp.js +1 -0
  37. package/lib/classic/cjs/useStreamLayerApp2.js +17 -0
  38. package/lib/classic/es/advertisement.js +755 -0
  39. package/lib/classic/es/auth.js +11 -0
  40. package/lib/classic/es/gamification-feature.js +4 -0
  41. package/lib/classic/es/gamification-feature2.js +4 -0
  42. package/lib/classic/es/index.js +16 -0
  43. package/lib/classic/es/insight.js +75 -0
  44. package/lib/classic/es/masters.js +8 -0
  45. package/lib/classic/es/masters2.js +1066 -0
  46. package/lib/classic/es/notification.js +468 -0
  47. package/lib/classic/es/points.js +59 -0
  48. package/lib/classic/es/provider.js +24526 -0
  49. package/lib/classic/es/useStreamLayerApp.js +5 -0
  50. package/lib/classic/es/useStreamLayerApp2.js +18023 -0
  51. package/lib/classic/index.d.ts +14 -0
  52. package/lib/classic/masters.d.ts +5 -0
  53. package/lib/classic/style.css +1 -0
  54. package/lib/dist/cjs/gamification-feature2.js +1 -1
  55. package/lib/dist/cjs/masters.js +70 -62
  56. package/lib/dist/es/gamification-feature2.js +21 -21
  57. package/lib/dist/es/index.js +3 -3
  58. package/lib/dist/es/masters.js +10484 -10391
  59. package/lib/dist/style.css +1 -1
  60. package/lib/es/advertisement.js +32 -32
  61. package/lib/es/auth.js +1 -1
  62. package/lib/es/gamification-feature.js +1 -1
  63. package/lib/es/index.js +10 -6
  64. package/lib/es/insight.js +15 -15
  65. package/lib/es/masters.js +1 -1
  66. package/lib/es/masters2.js +31 -31
  67. package/lib/es/notification.js +468 -0
  68. package/lib/es/points.js +13 -13
  69. package/lib/es/{index2.js → provider.js} +6936 -6848
  70. package/lib/es/useStreamLayerApp2.js +1106 -1078
  71. package/lib/index.d.ts +2 -1
  72. package/lib/style.css +1 -1
  73. package/package.json +54 -13
  74. package/lib/cjs/index2.js +0 -187
@@ -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, a as F, l as O, c as P, b as R, d as V, e as Q, f as H, n as K, g as U } from "./masters.js";
3
+ import { useRef as j, useState as w, useEffect as v } 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 = j(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] = F(), { 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) => {
@@ -87,21 +87,21 @@ const j = (e, t, o) => {
87
87
  a || m(h.HOME);
88
88
  }, [a]);
89
89
  let f = "0px";
90
- return S ? f = p ? "0px" : "calc(0px - var(--header-height))" : f = p ? "var(--header-height)" : "0px", /* @__PURE__ */ g(F, { className: O(t, "SL-Tabs"), style: i, children: [
90
+ return S ? f = p ? "0px" : "calc(0px - var(--header-height))" : f = p ? "var(--header-height)" : "0px", /* @__PURE__ */ g(O, { className: P(t, "SL-Tabs"), style: i, children: [
91
91
  a && /* @__PURE__ */ s(
92
- P,
92
+ R,
93
93
  {
94
94
  style: {
95
95
  top: f
96
96
  },
97
- children: /* @__PURE__ */ s(R, { activePage: d, toggleActivePage: C })
97
+ children: /* @__PURE__ */ s(V, { activePage: d, toggleActivePage: C })
98
98
  }
99
99
  ),
100
100
  d === h.HOME && /* @__PURE__ */ g(k, { children: [
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() }) })
101
+ /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(J, { userSummary: e.userSummary }) }) }),
102
+ /* @__PURE__ */ s(K, { 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(U, { children: /* @__PURE__ */ s(_, { scrollStore: o, scrollNode: r, gamification: e }) })
105
105
  ] });
106
106
  }, oe = ({
107
107
  gamification: e,
@@ -1,9 +1,9 @@
1
1
  import "react/jsx-runtime";
2
- import { h as s, i as m, j as o, g as i } from "./masters.js";
2
+ import { i as s, j as o, o as m, h as i } from "./masters.js";
3
3
  import "react";
4
4
  export {
5
5
  s as MastersStreamLayerProvider,
6
- m as MastersStreamLayerSDKReact,
7
- o as StreamLayerLogin,
6
+ o as MastersStreamLayerSDKReact,
7
+ m as StreamLayerLogin,
8
8
  i as StreamLayerSDKPoints
9
9
  };