@streamlayer/react 1.13.1 → 1.14.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 (54) hide show
  1. package/lib/app/provider.d.ts +1 -0
  2. package/lib/app/useStreamLayerApp.d.ts +2 -1
  3. package/lib/cjs/advertisement.js +223 -1
  4. package/lib/cjs/bet-pack.js +1 -1
  5. package/lib/cjs/gamification-feature2.js +1 -1
  6. package/lib/cjs/index2.js +5 -5
  7. package/lib/cjs/masters2.js +3 -8
  8. package/lib/cjs/notification.js +1 -1
  9. package/lib/cjs/points.js +1 -1
  10. package/lib/cjs/provider.js +16 -28
  11. package/lib/cjs/useStreamLayerApp2.js +11 -11
  12. package/lib/classic/app/provider.d.ts +1 -0
  13. package/lib/classic/app/useStreamLayerApp.d.ts +2 -1
  14. package/lib/classic/cjs/advertisement.js +223 -1
  15. package/lib/classic/cjs/bet-pack.js +1 -1
  16. package/lib/classic/cjs/gamification-feature2.js +1 -1
  17. package/lib/classic/cjs/index2.js +5 -5
  18. package/lib/classic/cjs/masters2.js +3 -8
  19. package/lib/classic/cjs/notification.js +1 -1
  20. package/lib/classic/cjs/points.js +1 -1
  21. package/lib/classic/cjs/provider.js +16 -28
  22. package/lib/classic/cjs/useStreamLayerApp2.js +11 -11
  23. package/lib/classic/es/advertisement.js +40824 -557
  24. package/lib/classic/es/bet-pack.js +1 -1
  25. package/lib/classic/es/gamification-feature2.js +1 -1
  26. package/lib/classic/es/index.js +4 -4
  27. package/lib/classic/es/index2.js +1125 -1088
  28. package/lib/classic/es/masters2.js +385 -439
  29. package/lib/classic/es/notification.js +205 -191
  30. package/lib/classic/es/points.js +39 -32
  31. package/lib/classic/es/provider.js +3852 -3908
  32. package/lib/classic/es/useStreamLayerApp.js +1 -1
  33. package/lib/classic/es/useStreamLayerApp2.js +3422 -3355
  34. package/lib/classic/style.css +1 -1
  35. package/lib/dist/cjs/gamification-feature.js +1 -1
  36. package/lib/dist/cjs/gamification-feature2.js +1 -1
  37. package/lib/dist/cjs/masters.js +29 -46
  38. package/lib/dist/es/gamification-feature.js +1 -1
  39. package/lib/dist/es/gamification-feature2.js +46 -46
  40. package/lib/dist/es/masters.js +8856 -8843
  41. package/lib/dist/style.css +1 -1
  42. package/lib/es/advertisement.js +40824 -557
  43. package/lib/es/bet-pack.js +1 -1
  44. package/lib/es/gamification-feature2.js +1 -1
  45. package/lib/es/index.js +4 -4
  46. package/lib/es/index2.js +1125 -1088
  47. package/lib/es/masters2.js +385 -439
  48. package/lib/es/notification.js +205 -191
  49. package/lib/es/points.js +39 -32
  50. package/lib/es/provider.js +3955 -4011
  51. package/lib/es/useStreamLayerApp.js +1 -1
  52. package/lib/es/useStreamLayerApp2.js +3422 -3355
  53. package/lib/style.css +1 -1
  54. package/package.json +16 -16
@@ -1,4 +1,4 @@
1
- import { A as f } from "./masters.js";
1
+ import { G as f } from "./masters.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,32 +1,32 @@
1
1
  import { jsx as s, jsxs as p, Fragment as S } from "react/jsx-runtime";
2
- import { a as C, s as r, Z as b, g as M, I as D, b as L, c as T, d as E, M as P, u as m, T as R, p as F, k as z, z as U, e as O, l as j, f as q, S as B, m as H, h as V, n as Q, C as K } from "./masters.js";
2
+ import { A as C, s as a, u as b, f as M, I as D, a as L, b as T, c as E, M as P, d as m, T as R, p as F, k as z, z as U, e as O, l as j, g as q, S as B, m as H, h as V, n as Q, C as K } from "./masters.js";
3
3
  import { useCallback as W, useRef as _, useState as y, useEffect as f } from "react";
4
- const Z = (e, a, n) => {
5
- const o = a >= C.lg && a < C.xl ? 75 : 52;
4
+ const G = (e, r, n) => {
5
+ const o = r >= C.lg && r < C.xl ? 75 : 52;
6
6
  e.current && window.scrollTo({
7
7
  top: e.current.offsetTop - o,
8
8
  ...n
9
9
  });
10
- }, G = /* @__PURE__ */ r("div")({
10
+ }, J = /* @__PURE__ */ a("div")({
11
11
  name: "Container",
12
12
  class: "c115qtkr",
13
13
  propsAsIs: !1
14
- }), J = /* @__PURE__ */ r("div")({
14
+ }), X = /* @__PURE__ */ a("div")({
15
15
  name: "STabs",
16
16
  class: "sxnslc8",
17
17
  propsAsIs: !1
18
- }), X = /* @__PURE__ */ r("button")({
18
+ }), Y = /* @__PURE__ */ a("button")({
19
19
  name: "Button",
20
20
  class: "b1umzux0",
21
21
  propsAsIs: !1
22
- }), Y = /* @__PURE__ */ r("span")({
22
+ }), Z = /* @__PURE__ */ a("span")({
23
23
  name: "Title",
24
24
  class: "tspsaas",
25
25
  propsAsIs: !1
26
26
  });
27
27
  var v = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(v || {});
28
- const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClick: n, "data-selected": a, children: /* @__PURE__ */ s(Y, { children: e }) }), ee = ({ activePage: e = "home", toggleActivePage: a }) => /* @__PURE__ */ s(G, { children: /* @__PURE__ */ p(J, { "data-position": e === "home" ? "left" : "right", children: [
29
- /* @__PURE__ */ s($, { title: "Home", active: e === "home", onClick: () => a(
28
+ const $ = ({ title: e, active: r, onClick: n }) => /* @__PURE__ */ s(Y, { onClick: n, "data-selected": r, children: /* @__PURE__ */ s(Z, { children: e }) }), ee = ({ activePage: e = "home", toggleActivePage: r }) => /* @__PURE__ */ s(J, { children: /* @__PURE__ */ p(X, { "data-position": e === "home" ? "left" : "right", children: [
29
+ /* @__PURE__ */ s($, { title: "Home", active: e === "home", onClick: () => r(
30
30
  "home"
31
31
  /* HOME */
32
32
  ) }),
@@ -35,37 +35,37 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
35
35
  {
36
36
  title: "Friends",
37
37
  active: e === "leaderboard",
38
- onClick: () => a(
38
+ onClick: () => r(
39
39
  "leaderboard"
40
40
  /* LEADERBOARD */
41
41
  )
42
42
  }
43
43
  )
44
- ] }) }), se = /* @__PURE__ */ r("div")({
44
+ ] }) }), se = /* @__PURE__ */ a("div")({
45
45
  name: "Container",
46
46
  class: "c1ux29ft",
47
47
  propsAsIs: !1
48
- }), ne = () => b, ae = /* @__PURE__ */ r(ne())({
48
+ }), ne = () => b, re = /* @__PURE__ */ a(ne())({
49
49
  name: "FriendsIcon",
50
50
  class: "f10ncfg2",
51
51
  propsAsIs: !0
52
- }), re = /* @__PURE__ */ r("div")({
52
+ }), ae = /* @__PURE__ */ a("div")({
53
53
  name: "Content",
54
54
  class: "c1yc07bd",
55
55
  propsAsIs: !1
56
- }), oe = /* @__PURE__ */ r("div")({
56
+ }), oe = /* @__PURE__ */ a("div")({
57
57
  name: "Title",
58
58
  class: "tj6cq7w",
59
59
  propsAsIs: !1
60
- }), te = /* @__PURE__ */ r("div")({
60
+ }), te = /* @__PURE__ */ a("div")({
61
61
  name: "Description",
62
62
  class: "d1ag78xo",
63
63
  propsAsIs: !1
64
- }), ie = () => b, ce = /* @__PURE__ */ r(ie())({
64
+ }), ie = () => b, ce = /* @__PURE__ */ a(ie())({
65
65
  name: "ArrowInviteIcon",
66
66
  class: "awohrz6",
67
67
  propsAsIs: !0
68
- }), le = ({ title: e, description: a, onClick: n, className: o }) => {
68
+ }), le = ({ title: e, description: r, onClick: n, className: o }) => {
69
69
  const [t] = M({
70
70
  type: "invitation",
71
71
  action: "sent",
@@ -74,48 +74,48 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
74
74
  }
75
75
  });
76
76
  return /* @__PURE__ */ p(se, { onClick: t(n), className: o, children: [
77
- /* @__PURE__ */ s(ae, { name: "icon-friends" }),
78
- /* @__PURE__ */ p(re, { children: [
77
+ /* @__PURE__ */ s(re, { name: "icon-friends" }),
78
+ /* @__PURE__ */ p(ae, { children: [
79
79
  /* @__PURE__ */ s(oe, { children: e }),
80
- /* @__PURE__ */ s(te, { children: a })
80
+ /* @__PURE__ */ s(te, { children: r })
81
81
  ] }),
82
82
  /* @__PURE__ */ s(ce, { name: "icon-copy" })
83
83
  ] });
84
- }, de = /* @__PURE__ */ r("div")({
84
+ }, de = /* @__PURE__ */ a("div")({
85
85
  name: "Container",
86
86
  class: "culdu4a",
87
87
  propsAsIs: !1
88
- }), pe = /* @__PURE__ */ r("div")({
88
+ }), pe = /* @__PURE__ */ a("div")({
89
89
  name: "Position",
90
90
  class: "pwf8e69",
91
91
  propsAsIs: !1
92
- }), me = /* @__PURE__ */ r("img")({
92
+ }), me = /* @__PURE__ */ a("img")({
93
93
  name: "Avatar",
94
94
  class: "atf4yh4",
95
95
  propsAsIs: !1
96
- }), ue = /* @__PURE__ */ r("div")({
96
+ }), ue = /* @__PURE__ */ a("div")({
97
97
  name: "AvatarPlaceholder",
98
98
  class: "a1dg29ja",
99
99
  propsAsIs: !1
100
- }), he = /* @__PURE__ */ r("div")({
100
+ }), he = /* @__PURE__ */ a("div")({
101
101
  name: "Content",
102
102
  class: "c10a68rc",
103
103
  propsAsIs: !1
104
- }), ve = /* @__PURE__ */ r("div")({
104
+ }), ve = /* @__PURE__ */ a("div")({
105
105
  name: "NameContainer",
106
106
  class: "nc4kck5",
107
107
  propsAsIs: !1
108
- }), Ie = /* @__PURE__ */ r("span")({
108
+ }), Ie = /* @__PURE__ */ a("span")({
109
109
  name: "Name",
110
110
  class: "njsrqgr",
111
111
  propsAsIs: !1
112
- }), ge = () => b, fe = /* @__PURE__ */ r(ge())({
112
+ }), ge = () => b, fe = /* @__PURE__ */ a(ge())({
113
113
  name: "CurrentUserBadge",
114
114
  class: "c17uc4zr",
115
115
  propsAsIs: !0
116
116
  }), be = ({
117
117
  friendsRank: e,
118
- avatar: a,
118
+ avatar: r,
119
119
  name: n,
120
120
  userId: o,
121
121
  points: t,
@@ -124,20 +124,20 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
124
124
  }) => /* @__PURE__ */ p(de, { "data-name": o, style: d, children: [
125
125
  /* @__PURE__ */ s(pe, { children: e || 0 }),
126
126
  /* @__PURE__ */ p(he, { children: [
127
- a ? /* @__PURE__ */ s(me, { alt: "leaderboard-item-avatar", src: a }) : /* @__PURE__ */ s(ue, { children: L(n || "") }),
127
+ r ? /* @__PURE__ */ s(me, { alt: "leaderboard-item-avatar", src: r }) : /* @__PURE__ */ s(ue, { children: L(n || "") }),
128
128
  /* @__PURE__ */ p(ve, { children: [
129
129
  /* @__PURE__ */ s(Ie, { children: n || "" }),
130
130
  i && /* @__PURE__ */ s(fe, { name: "icon-star" })
131
131
  ] })
132
132
  ] }),
133
133
  /* @__PURE__ */ s("div", { children: T(t) })
134
- ] }), Ae = /* @__PURE__ */ r("div")({
134
+ ] }), Ae = /* @__PURE__ */ a("div")({
135
135
  name: "Container",
136
136
  class: "c16btbfp",
137
137
  propsAsIs: !1
138
138
  }), ke = ({
139
139
  items: e,
140
- currentUserId: a,
140
+ currentUserId: r,
141
141
  openItemDetail: n,
142
142
  fetchMore: o,
143
143
  scrollNode: t,
@@ -157,11 +157,11 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
157
157
  onClick: d,
158
158
  children: e.map((c) => /* @__PURE__ */ s(be, {
159
159
  ...c,
160
- isCurrentUser: !!a && a === c.userId
160
+ isCurrentUser: !!r && r === c.userId
161
161
  }, c.userId))
162
162
  })
163
163
  });
164
- }, Ce = /* @__PURE__ */ r("div")({
164
+ }, Ce = /* @__PURE__ */ a("div")({
165
165
  name: "InviteFriendsContainer",
166
166
  class: "i1c9dygq",
167
167
  propsAsIs: !1
@@ -173,13 +173,13 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
173
173
  inviteCardTitle: "It’s More Fun With Friends",
174
174
  inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
175
175
  })
176
- }), Se = /* @__PURE__ */ r("div")({
176
+ }), Se = /* @__PURE__ */ a("div")({
177
177
  name: "InviteLinkContainer",
178
178
  class: "i1odbhm4",
179
179
  propsAsIs: !1
180
180
  }), ye = ({
181
181
  gamification: e,
182
- scrollNode: a,
182
+ scrollNode: r,
183
183
  scrollStore: n
184
184
  }) => {
185
185
  const o = _(null), {
@@ -195,7 +195,7 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
195
195
  }) : /* @__PURE__ */ p(S, {
196
196
  children: [/* @__PURE__ */ s(ke, {
197
197
  items: t,
198
- scrollNode: a,
198
+ scrollNode: r,
199
199
  scrollStore: n,
200
200
  fetchMore: e.leaderboardList.fetchMore,
201
201
  hasMore: i,
@@ -210,11 +210,11 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
210
210
  })
211
211
  }), I]
212
212
  });
213
- }, Ne = ({ store: e, openQuestion: a }) => {
213
+ }, Ne = ({ store: e, openQuestion: r }) => {
214
214
  const { sdk: n } = F(), o = m(e);
215
- return /* @__PURE__ */ s(z, { openQuestion: a, questions: o.data, controlVideo: n == null ? void 0 : n.controlVideoPlayer });
215
+ return /* @__PURE__ */ s(z, { openQuestion: r, questions: o.data, controlVideo: n == null ? void 0 : n.controlVideoPlayer });
216
216
  }, we = ({ userSummary: e }) => {
217
- var a;
217
+ var r;
218
218
  const [n, o] = y(void 0);
219
219
  return f(() => {
220
220
  const t = e.$store.subscribe((i) => {
@@ -223,12 +223,12 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
223
223
  return () => {
224
224
  t();
225
225
  };
226
- }, [e]), /* @__PURE__ */ s(U, { loading: !(n != null && n.summary), ...n == null ? void 0 : n.summary, successRate: (a = n == null ? void 0 : n.percentage) == null ? void 0 : a.correct });
227
- }, xe = ({ gamification: e, className: a, scrollStore: n, scrollNode: o, appNode: t, style: i, responsiveStore: d }) => {
226
+ }, [e]), /* @__PURE__ */ s(U, { loading: !(n != null && n.summary), ...n == null ? void 0 : n.summary, successRate: (r = n == null ? void 0 : n.percentage) == null ? void 0 : r.correct });
227
+ }, xe = ({ gamification: e, className: r, scrollStore: n, scrollNode: o, appNode: t, style: i, responsiveStore: d }) => {
228
228
  const { tabsShown: c } = m(n, { keys: ["tabsShown"] }), l = m(e.friendsTabEnabled), [u, I] = y(v.HOME), [, N] = O(), { sdkInDesktopView: A, screen: w } = m(d, { keys: ["sdkInDesktopView"] }), x = (h) => {
229
229
  N(() => {
230
230
  var k;
231
- I(h), A === !1 && (((k = t.current) == null ? void 0 : k.getBoundingClientRect().y) || 0) < 0 && Z(t, w.size, { behavior: "instant" });
231
+ I(h), A === !1 && (((k = t.current) == null ? void 0 : k.getBoundingClientRect().y) || 0) < 0 && G(t, w.size, { behavior: "instant" });
232
232
  });
233
233
  };
234
234
  f(() => n.subscribe((h) => {
@@ -241,7 +241,7 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
241
241
  l || I(v.HOME);
242
242
  }, [l]);
243
243
  let g = "0px";
244
- return A ? g = c ? "0px" : "calc(0px - var(--header-height))" : g = c ? "var(--header-height)" : "0px", /* @__PURE__ */ p(j, { className: q(a, "SL-Tabs"), style: i, children: [
244
+ return A ? g = c ? "0px" : "calc(0px - var(--header-height))" : g = c ? "var(--header-height)" : "0px", /* @__PURE__ */ p(j, { className: q(r, "SL-Tabs"), style: i, children: [
245
245
  l && /* @__PURE__ */ s(
246
246
  B,
247
247
  {
@@ -259,14 +259,14 @@ const $ = ({ title: e, active: a, onClick: n }) => /* @__PURE__ */ s(X, { onClic
259
259
  ] });
260
260
  }, Te = ({
261
261
  gamification: e,
262
- scrollStore: a,
262
+ scrollStore: r,
263
263
  className: n,
264
264
  appNode: o,
265
265
  scrollNode: t,
266
266
  responsiveStore: i
267
267
  }) => /* @__PURE__ */ s(xe, {
268
268
  appNode: o,
269
- scrollStore: a,
269
+ scrollStore: r,
270
270
  scrollNode: t,
271
271
  className: n,
272
272
  gamification: e,