@streamlayer/react 0.0.1-debug.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 (106) hide show
  1. package/README.md +6 -0
  2. package/lib/app/advertisement.d.ts +19 -0
  3. package/lib/app/app.d.ts +23 -0
  4. package/lib/app/auth.d.ts +4 -0
  5. package/lib/app/bet-pack.d.ts +10 -0
  6. package/lib/app/event.d.ts +6 -0
  7. package/lib/app/insight.d.ts +13 -0
  8. package/lib/app/masters.d.ts +23 -0
  9. package/lib/app/notification.d.ts +5 -0
  10. package/lib/app/pause-ad.d.ts +38 -0
  11. package/lib/app/points.d.ts +3 -0
  12. package/lib/app/provider.d.ts +49 -0
  13. package/lib/app/useStreamLayerApp.d.ts +23 -0
  14. package/lib/cjs/advertisement.js +219 -0
  15. package/lib/cjs/auth.js +1 -0
  16. package/lib/cjs/bet-pack.js +1 -0
  17. package/lib/cjs/gamification-feature.js +1 -0
  18. package/lib/cjs/gamification-feature2.js +1 -0
  19. package/lib/cjs/index-l-eyvmpL.js +5 -0
  20. package/lib/cjs/index.js +1 -0
  21. package/lib/cjs/index2.js +5 -0
  22. package/lib/cjs/insight.js +1 -0
  23. package/lib/cjs/masters.js +1 -0
  24. package/lib/cjs/masters2.js +13 -0
  25. package/lib/cjs/notification.js +1 -0
  26. package/lib/cjs/pause-ad.js +1 -0
  27. package/lib/cjs/points.js +1 -0
  28. package/lib/cjs/provider.js +84 -0
  29. package/lib/cjs/useStreamLayerApp.js +1 -0
  30. package/lib/cjs/useStreamLayerApp2.js +16 -0
  31. package/lib/cjs/vast-client.min-B0NUra1B.js +1 -0
  32. package/lib/classic/app/advertisement.d.ts +19 -0
  33. package/lib/classic/app/app.d.ts +23 -0
  34. package/lib/classic/app/auth.d.ts +4 -0
  35. package/lib/classic/app/bet-pack.d.ts +10 -0
  36. package/lib/classic/app/event.d.ts +6 -0
  37. package/lib/classic/app/insight.d.ts +13 -0
  38. package/lib/classic/app/masters.d.ts +23 -0
  39. package/lib/classic/app/notification.d.ts +5 -0
  40. package/lib/classic/app/pause-ad.d.ts +38 -0
  41. package/lib/classic/app/points.d.ts +3 -0
  42. package/lib/classic/app/provider.d.ts +49 -0
  43. package/lib/classic/app/useStreamLayerApp.d.ts +23 -0
  44. package/lib/classic/cjs/advertisement.js +219 -0
  45. package/lib/classic/cjs/auth.js +1 -0
  46. package/lib/classic/cjs/bet-pack.js +5 -0
  47. package/lib/classic/cjs/gamification-feature.js +1 -0
  48. package/lib/classic/cjs/index-l-eyvmpL.js +5 -0
  49. package/lib/classic/cjs/index.js +1 -0
  50. package/lib/classic/cjs/insight.js +1 -0
  51. package/lib/classic/cjs/notification.js +1 -0
  52. package/lib/classic/cjs/pause-ad.js +1 -0
  53. package/lib/classic/cjs/points.js +1 -0
  54. package/lib/classic/cjs/provider.js +68 -0
  55. package/lib/classic/cjs/useStreamLayerApp.js +1 -0
  56. package/lib/classic/cjs/useStreamLayerApp2.js +16 -0
  57. package/lib/classic/cjs/vast-client.min-B0NUra1B.js +1 -0
  58. package/lib/classic/es/advertisement.js +34410 -0
  59. package/lib/classic/es/auth.js +11 -0
  60. package/lib/classic/es/bet-pack.js +3427 -0
  61. package/lib/classic/es/gamification-feature.js +4 -0
  62. package/lib/classic/es/index-l-eyvmpL.js +3758 -0
  63. package/lib/classic/es/index.js +19 -0
  64. package/lib/classic/es/insight.js +82 -0
  65. package/lib/classic/es/notification.js +1008 -0
  66. package/lib/classic/es/pause-ad.js +253 -0
  67. package/lib/classic/es/points.js +76 -0
  68. package/lib/classic/es/provider.js +7264 -0
  69. package/lib/classic/es/useStreamLayerApp.js +5 -0
  70. package/lib/classic/es/useStreamLayerApp2.js +8282 -0
  71. package/lib/classic/es/vast-client.min-B0NUra1B.js +1060 -0
  72. package/lib/classic/index.d.ts +5 -0
  73. package/lib/classic/masters.d.ts +8 -0
  74. package/lib/dist/cjs/gamification-feature.js +1 -0
  75. package/lib/dist/cjs/gamification-feature2.js +1 -0
  76. package/lib/dist/cjs/index.js +1 -0
  77. package/lib/dist/cjs/masters.js +76 -0
  78. package/lib/dist/cjs/package.json +1 -0
  79. package/lib/dist/es/gamification-feature.js +4 -0
  80. package/lib/dist/es/gamification-feature2.js +285 -0
  81. package/lib/dist/es/index.js +15 -0
  82. package/lib/dist/es/masters.js +18614 -0
  83. package/lib/dist/es/package.json +1 -0
  84. package/lib/dist/style.css +1 -0
  85. package/lib/es/advertisement.js +34410 -0
  86. package/lib/es/auth.js +11 -0
  87. package/lib/es/bet-pack.js +19 -0
  88. package/lib/es/gamification-feature.js +4 -0
  89. package/lib/es/gamification-feature2.js +4 -0
  90. package/lib/es/index-l-eyvmpL.js +3758 -0
  91. package/lib/es/index.js +19 -0
  92. package/lib/es/index2.js +3415 -0
  93. package/lib/es/insight.js +82 -0
  94. package/lib/es/masters.js +9 -0
  95. package/lib/es/masters2.js +873 -0
  96. package/lib/es/notification.js +1008 -0
  97. package/lib/es/pause-ad.js +253 -0
  98. package/lib/es/points.js +76 -0
  99. package/lib/es/provider.js +7685 -0
  100. package/lib/es/useStreamLayerApp.js +5 -0
  101. package/lib/es/useStreamLayerApp2.js +8282 -0
  102. package/lib/es/vast-client.min-B0NUra1B.js +1060 -0
  103. package/lib/index.d.ts +5 -0
  104. package/lib/masters.d.ts +8 -0
  105. package/lib/style.css +1 -0
  106. package/package.json +158 -0
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,4 @@
1
+ import { C as f } from "./masters.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,285 @@
1
+ import { jsx as s, jsxs as p, Fragment as y } from "react/jsx-runtime";
2
+ import { A as C, s as r, B as b, f as M, I as D, a as L, b as T, M as E, u as m, T as P, p as R, k as F, z, c as B, l as U, d as O, S as j, m as q, e as H, n as V, g as Q } from "./masters.js";
3
+ import { useCallback as K, useRef as W, useState as S, useEffect as f } from "react";
4
+ import "nanostores";
5
+ import "react-countdown-circle-timer";
6
+ import "react-dom";
7
+ import "react-countup";
8
+ import "lodash.throttle";
9
+ import _ from "react-infinite-scroller";
10
+ const G = (e, t, a) => {
11
+ const n = t >= C.lg && t < C.xl ? 75 : 52;
12
+ e.current && window.scrollTo({
13
+ top: e.current.offsetTop - n,
14
+ ...a
15
+ });
16
+ }, J = /* @__PURE__ */ r("div")({
17
+ name: "Container",
18
+ class: "c115qtkr",
19
+ propsAsIs: !1
20
+ }), X = /* @__PURE__ */ r("div")({
21
+ name: "STabs",
22
+ class: "sxnslc8",
23
+ propsAsIs: !1
24
+ }), Y = /* @__PURE__ */ r("button")({
25
+ name: "Button",
26
+ class: "b1umzux0",
27
+ propsAsIs: !1
28
+ }), Z = /* @__PURE__ */ r("span")({
29
+ name: "Title",
30
+ class: "tspsaas",
31
+ propsAsIs: !1
32
+ });
33
+ var v = /* @__PURE__ */ ((e) => (e.HOME = "home", e.LEADERBOARD = "leaderboard", e))(v || {});
34
+ const $ = ({ title: e, active: t, onClick: a }) => /* @__PURE__ */ s(Y, { "data-a": "intr", onClick: a, "data-selected": t, children: /* @__PURE__ */ s(Z, { "data-a": "intr", children: e }) }), ee = ({ activePage: e = "home", toggleActivePage: t }) => /* @__PURE__ */ s(J, { children: /* @__PURE__ */ p(X, { "data-position": e === "home" ? "left" : "right", children: [
35
+ /* @__PURE__ */ s($, { title: "Home", active: e === "home", onClick: () => t(
36
+ "home"
37
+ /* HOME */
38
+ ) }),
39
+ /* @__PURE__ */ s(
40
+ $,
41
+ {
42
+ title: "Friends",
43
+ active: e === "leaderboard",
44
+ onClick: () => t(
45
+ "leaderboard"
46
+ /* LEADERBOARD */
47
+ )
48
+ }
49
+ )
50
+ ] }) }), se = /* @__PURE__ */ r("div")({
51
+ name: "Container",
52
+ class: "c1ux29ft",
53
+ propsAsIs: !1
54
+ }), ae = () => b, te = /* @__PURE__ */ r(ae())({
55
+ name: "FriendsIcon",
56
+ class: "f10ncfg2",
57
+ propsAsIs: !0
58
+ }), re = /* @__PURE__ */ r("div")({
59
+ name: "Content",
60
+ class: "c1yc07bd",
61
+ propsAsIs: !1
62
+ }), ne = /* @__PURE__ */ r("div")({
63
+ name: "Title",
64
+ class: "tj6cq7w",
65
+ propsAsIs: !1
66
+ }), oe = /* @__PURE__ */ r("div")({
67
+ name: "Description",
68
+ class: "d1ag78xo",
69
+ propsAsIs: !1
70
+ }), ie = () => b, ce = /* @__PURE__ */ r(ie())({
71
+ name: "ArrowInviteIcon",
72
+ class: "awohrz6",
73
+ propsAsIs: !0
74
+ }), le = ({ title: e, description: t, onClick: a, className: n }) => {
75
+ const [o] = M({
76
+ type: "invitation",
77
+ action: "sent",
78
+ payload: {
79
+ from: D.TITLE_CARD
80
+ }
81
+ });
82
+ return /* @__PURE__ */ p(se, { "data-a": "intr", onClick: o(a), className: n, children: [
83
+ /* @__PURE__ */ s(te, { name: "icon-friends" }),
84
+ /* @__PURE__ */ p(re, { children: [
85
+ /* @__PURE__ */ s(ne, { children: e }),
86
+ /* @__PURE__ */ s(oe, { children: t })
87
+ ] }),
88
+ /* @__PURE__ */ s(ce, { name: "icon-copy" })
89
+ ] });
90
+ }, de = /* @__PURE__ */ r("div")({
91
+ name: "Container",
92
+ class: "culdu4a",
93
+ propsAsIs: !1
94
+ }), pe = /* @__PURE__ */ r("div")({
95
+ name: "Position",
96
+ class: "pwf8e69",
97
+ propsAsIs: !1
98
+ }), me = /* @__PURE__ */ r("img")({
99
+ name: "Avatar",
100
+ class: "atf4yh4",
101
+ propsAsIs: !1
102
+ }), ue = /* @__PURE__ */ r("div")({
103
+ name: "AvatarPlaceholder",
104
+ class: "a1dg29ja",
105
+ propsAsIs: !1
106
+ }), he = /* @__PURE__ */ r("div")({
107
+ name: "Content",
108
+ class: "c10a68rc",
109
+ propsAsIs: !1
110
+ }), ve = /* @__PURE__ */ r("div")({
111
+ name: "NameContainer",
112
+ class: "nc4kck5",
113
+ propsAsIs: !1
114
+ }), Ie = /* @__PURE__ */ r("span")({
115
+ name: "Name",
116
+ class: "njsrqgr",
117
+ propsAsIs: !1
118
+ }), ge = () => b, fe = /* @__PURE__ */ r(ge())({
119
+ name: "CurrentUserBadge",
120
+ class: "c17uc4zr",
121
+ propsAsIs: !0
122
+ }), be = ({
123
+ friendsRank: e,
124
+ avatar: t,
125
+ name: a,
126
+ userId: n,
127
+ points: o,
128
+ isCurrentUser: i,
129
+ style: d
130
+ }) => /* @__PURE__ */ p(de, { "data-name": n, style: d, children: [
131
+ /* @__PURE__ */ s(pe, { children: e || 0 }),
132
+ /* @__PURE__ */ p(he, { children: [
133
+ t ? /* @__PURE__ */ s(me, { alt: "leaderboard-item-avatar", src: t }) : /* @__PURE__ */ s(ue, { children: L(a || "") }),
134
+ /* @__PURE__ */ p(ve, { children: [
135
+ /* @__PURE__ */ s(Ie, { children: a || "" }),
136
+ i && /* @__PURE__ */ s(fe, { name: "icon-star" })
137
+ ] })
138
+ ] }),
139
+ /* @__PURE__ */ s("div", { children: T(o) })
140
+ ] }), Ae = /* @__PURE__ */ r("div")({
141
+ name: "Container",
142
+ class: "c16btbfp",
143
+ propsAsIs: !1
144
+ }), ke = ({
145
+ items: e,
146
+ currentUserId: t,
147
+ openItemDetail: a,
148
+ fetchMore: n,
149
+ scrollNode: o,
150
+ hasMore: i
151
+ }) => {
152
+ const d = K((c) => {
153
+ const l = c.target.getAttribute("data-name");
154
+ l && a(l);
155
+ }, [a]);
156
+ return /* @__PURE__ */ s(_, {
157
+ loadMore: n,
158
+ initialLoad: !1,
159
+ hasMore: i,
160
+ useWindow: !1,
161
+ getScrollParent: () => o.current,
162
+ children: /* @__PURE__ */ s(Ae, {
163
+ "data-a": "intr",
164
+ onClick: d,
165
+ children: e.map((c) => /* @__PURE__ */ s(be, {
166
+ ...c,
167
+ isCurrentUser: !!t && t === c.userId
168
+ }, c.userId))
169
+ })
170
+ });
171
+ }, Ce = /* @__PURE__ */ r("div")({
172
+ name: "InviteFriendsContainer",
173
+ class: "i1c9dygq",
174
+ propsAsIs: !1
175
+ }), $e = ({
176
+ deepLink: e
177
+ }) => /* @__PURE__ */ s(Ce, {
178
+ children: /* @__PURE__ */ s(E, {
179
+ inviteLink: e,
180
+ inviteCardTitle: "It’s More Fun With Friends",
181
+ inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
182
+ })
183
+ }), ye = /* @__PURE__ */ r("div")({
184
+ name: "InviteLinkContainer",
185
+ class: "i1odbhm4",
186
+ propsAsIs: !1
187
+ }), Se = ({
188
+ gamification: e,
189
+ scrollNode: t,
190
+ scrollStore: a
191
+ }) => {
192
+ const n = W(null), {
193
+ data: o,
194
+ hasMore: i,
195
+ loading: d,
196
+ key: c
197
+ } = m(e.leaderboardList.$store), {
198
+ data: l
199
+ } = m(e.deepLink.$store), [u, I] = P(n);
200
+ return !o.length && !d ? /* @__PURE__ */ s($e, {
201
+ deepLink: l
202
+ }) : /* @__PURE__ */ p(y, {
203
+ children: [/* @__PURE__ */ s(ke, {
204
+ items: o,
205
+ scrollNode: t,
206
+ scrollStore: a,
207
+ fetchMore: e.leaderboardList.fetchMore,
208
+ hasMore: i,
209
+ openItemDetail: e.openUser,
210
+ currentUserId: e.currentUserId.get()
211
+ }, c), l && /* @__PURE__ */ s(ye, {
212
+ ref: n,
213
+ children: /* @__PURE__ */ s(le, {
214
+ "data-a": "intr",
215
+ onClick: () => u(l),
216
+ title: "Invite Friends",
217
+ description: "Challenge them now!"
218
+ })
219
+ }), I]
220
+ });
221
+ }, Ne = ({ store: e, openQuestion: t }) => {
222
+ const { sdk: a } = R(), n = m(e);
223
+ return /* @__PURE__ */ s(F, { openQuestion: t, questions: n.data, controlVideo: a == null ? void 0 : a.controlVideoPlayer });
224
+ }, we = ({ userSummary: e }) => {
225
+ var t;
226
+ const [a, n] = S(void 0);
227
+ return f(() => {
228
+ const o = e.$store.subscribe((i) => {
229
+ i && n(i);
230
+ });
231
+ return () => {
232
+ o();
233
+ };
234
+ }, [e]), /* @__PURE__ */ s(z, { loading: !(a != null && a.summary), ...a == null ? void 0 : a.summary, successRate: (t = a == null ? void 0 : a.percentage) == null ? void 0 : t.correct });
235
+ }, xe = ({ gamification: e, className: t, scrollStore: a, scrollNode: n, appNode: o, style: i, responsiveStore: d }) => {
236
+ const { tabsShown: c } = m(a, { keys: ["tabsShown"] }), l = m(e.friendsTabEnabled), [u, I] = S(v.HOME), [, N] = B(), { sdkInDesktopView: A, screen: w } = m(d, { keys: ["sdkInDesktopView"] }), x = (h) => {
237
+ N(() => {
238
+ var k;
239
+ I(h), A === !1 && (((k = o.current) == null ? void 0 : k.getBoundingClientRect().y) || 0) < 0 && G(o, w.size, { behavior: "instant" });
240
+ });
241
+ };
242
+ f(() => a.subscribe((h) => {
243
+ if (h.scrollPosition === 0) {
244
+ a.setKey("tabsShown", !0);
245
+ return;
246
+ }
247
+ d.get().sdkInDesktopView ? a.setKey("tabsShown", h.scrollDirection === "backward") : a.setKey("tabsShown", h.scrollDirection === "forward");
248
+ }), [a, d]), f(() => {
249
+ l || I(v.HOME);
250
+ }, [l]);
251
+ let g = "0px";
252
+ return A ? g = c ? "0px" : "calc(0px - var(--header-height))" : g = c ? "var(--header-height)" : "0px", /* @__PURE__ */ p(U, { className: O(t, "SL-Tabs", "sl-hide-on-modal"), style: i, children: [
253
+ l && /* @__PURE__ */ s(
254
+ j,
255
+ {
256
+ style: {
257
+ top: g
258
+ },
259
+ children: /* @__PURE__ */ s(ee, { activePage: u, toggleActivePage: x })
260
+ }
261
+ ),
262
+ u === v.HOME && /* @__PURE__ */ p(y, { children: [
263
+ /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(H, { children: /* @__PURE__ */ s(we, { userSummary: e.userSummary }) }) }),
264
+ /* @__PURE__ */ s(V, { style: { flex: 1 }, children: /* @__PURE__ */ s(Ne, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
265
+ ] }),
266
+ u === v.LEADERBOARD && /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(Se, { scrollStore: a, scrollNode: n, gamification: e }) })
267
+ ] });
268
+ }, Be = ({
269
+ gamification: e,
270
+ scrollStore: t,
271
+ className: a,
272
+ appNode: n,
273
+ scrollNode: o,
274
+ responsiveStore: i
275
+ }) => /* @__PURE__ */ s(xe, {
276
+ appNode: n,
277
+ scrollStore: t,
278
+ scrollNode: o,
279
+ className: a,
280
+ gamification: e,
281
+ responsiveStore: i
282
+ });
283
+ export {
284
+ Be as default
285
+ };
@@ -0,0 +1,15 @@
1
+ import "react/jsx-runtime";
2
+ import "lodash.throttle";
3
+ import "react";
4
+ import "nanostores";
5
+ import { h as S, j as p, o as L, r as y, i as n, q as P } from "./masters.js";
6
+ import "react-dom";
7
+ import "react-countup";
8
+ export {
9
+ S as BetPackStandalone,
10
+ p as MastersStreamLayerProvider,
11
+ L as MastersStreamLayerSDKReact,
12
+ y as StreamLayerLogin,
13
+ n as StreamLayerSDKPoints,
14
+ P as useStreamLayer
15
+ };