@streamlayer/web-os 0.3.6 → 0.3.7

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,10 +1,17 @@
1
1
  import { jsxs as i, jsx as s, Fragment as C } from "react/jsx-runtime";
2
- import { t as z, e as w, f as T, a as H, b as j, A as Y, s as a, i as W, I as U, c as $, B as h, D as K, d as f, g as D, u, r as L, S as q, O, h as P, R as _, j as ss, w as es, p as as, k as ns, l as ls, m as ts, n as is, o as cs, q as os, v as rs, C as ds } from "./index2.js";
2
+ import { t as z, e as w, f as T, a as H, b as j, A as Y, s as a, i as W, I as $, c as U, B as h, D as K, d as f, u, r as L, S as D, O as q, g as O, R as P, h as _, w as ss, p as es, j as as, l as ns, k as ls, m as ts, n as is, o as os, q as rs, C as cs } from "./index2.js";
3
+ import "@nanostores/react";
3
4
  import { useRef as G, useState as Z, useCallback as x, useEffect as R } from "react";
5
+ import "nanostores";
6
+ import "@noriginmedia/norigin-spatial-navigation";
7
+ import "react-countdown-circle-timer";
8
+ import "react-countup";
9
+ import "lodash.throttle";
10
+ import ds from "react-infinite-scroller";
4
11
  const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbnMvaW52aXRhdGlvbnMucHJvdG8SJHN0cmVhbWxheWVyLmFuYWx5dGljcy52MS5pbnZpdGF0aW9ucyLhAgoXVG90YWxJbnZpdGF0aW9uc1JlcXVlc3QSYAoGZmlsdGVyGAEgASgLMlAuc3RyZWFtbGF5ZXIuYW5hbHl0aWNzLnYxLmludml0YXRpb25zLlRvdGFsSW52aXRhdGlvbnNSZXF1ZXN0LlRvdGFsUmVxdWVzdEZpbHRlchrjAQoSVG90YWxSZXF1ZXN0RmlsdGVyEjcKBnBlcmlvZBgBIAEoCzInLnN0cmVhbWxheWVyLmFuYWx5dGljcy52MS5jb21tb24uUGVyaW9kEhEKCWV2ZW50X2lkcxgCIAMoBBJMCgpjY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b3J5Eh0KGUlOVklUQVRJT05fQ0FURUdPUllfVU5TRVQQABIgChxJTlZJVEFUSU9OX0NBVEVHT1JZX1dBVENISU5HEAESIQodSU5WSVRBVElPTl9DQVRFR09SWV9NRVNTQUdJTkcQAhIfChtJTlZJVEFUSU9OX0NBVEVHT1JZX1ZPSUNJTkcQAxIdChlJTlZJVEFUSU9OX0NBVEVHT1JZX0dBTUVTEAQqZQoOSW52aXRhdGlvbkZyb20SGQoVSU5WSVRBVElPTl9GUk9NX1VOU0VUEAASHgoaSU5WSVRBVElPTl9GUk9NX1RJVExFX0NBUkQQARIYChRJTlZJVEFUSU9OX0ZST01fTUVOVRACQrYBCihjb20uc3RyZWFtbGF5ZXIuYW5hbHl0aWNzLmludml0YXRpb25zLnYxQhtTdHJlYW1MYXllckludml0YXRpb25zUHJvdG9QAVpiZ2l0aHViLmNvbS9zdHJlYW1sYXllci9zbC1wcm90b2ZpbGVzLy5idWlsZC9nby9zdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbnM7c2xfaW52aXRhdGlvbnOiAgZTTF9BUEliBnByb3RvMw", [H, j]), ms = /* @__PURE__ */ w(ps, 1), B = /* @__PURE__ */ z(ms), bs = (e, n, l) => {
5
- const c = n >= Y.lg && n < Y.xl ? 75 : 52;
12
+ const o = n >= Y.lg && n < Y.xl ? 75 : 52;
6
13
  e.current && window.scrollTo({
7
- top: e.current.offsetTop - c,
14
+ top: e.current.offsetTop - o,
8
15
  ...l
9
16
  });
10
17
  }, us = /* @__PURE__ */ a("div")({
@@ -61,11 +68,11 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
61
68
  name: "UserInfo",
62
69
  class: "u10d4koz",
63
70
  propsAsIs: !1
64
- }), Ss = /* @__PURE__ */ a("div")({
71
+ }), Xs = /* @__PURE__ */ a("div")({
65
72
  name: "UserName",
66
73
  class: "u1q6roj0",
67
74
  propsAsIs: !1
68
- }), Xs = /* @__PURE__ */ a("div")({
75
+ }), Ss = /* @__PURE__ */ a("div")({
69
76
  name: "UserRating",
70
77
  class: "ui0m425",
71
78
  propsAsIs: !1
@@ -101,11 +108,11 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
101
108
  name: "Ranks",
102
109
  class: "r1mqo824",
103
110
  propsAsIs: !1
104
- }), Us = /* @__PURE__ */ a("div")({
111
+ }), $s = /* @__PURE__ */ a("div")({
105
112
  name: "Statistics",
106
113
  class: "sxareh6",
107
114
  propsAsIs: !1
108
- }), $s = /* @__PURE__ */ a("div")({
115
+ }), Us = /* @__PURE__ */ a("div")({
109
116
  name: "AvatarPlaceholder",
110
117
  class: "amcu48h",
111
118
  propsAsIs: !1
@@ -117,12 +124,12 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
117
124
  loading: e,
118
125
  hideFriendsRank: n,
119
126
  avatar: l,
120
- name: c,
127
+ name: o,
121
128
  points: t,
122
- friendsRank: o,
129
+ friendsRank: r,
123
130
  rank: d,
124
131
  streak: p,
125
- correct: r,
132
+ correct: c,
126
133
  incorrect: m,
127
134
  inTop: b,
128
135
  successRate: g
@@ -130,16 +137,16 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
130
137
  /* @__PURE__ */ s(gs, { children: /* @__PURE__ */ s(W, { loading: e, children: /* @__PURE__ */ i(Cs, { children: [
131
138
  /* @__PURE__ */ i(fs, { children: [
132
139
  l && /* @__PURE__ */ s(Gs, { alt: "avatar", src: l }),
133
- !l && /* @__PURE__ */ s($s, { children: U(c || "") })
140
+ !l && /* @__PURE__ */ s(Us, { children: $(o || "") })
134
141
  ] }),
135
142
  /* @__PURE__ */ i(Zs, { children: [
136
- /* @__PURE__ */ s(Ss, { children: c }),
137
- /* @__PURE__ */ i(Xs, { children: [
143
+ /* @__PURE__ */ s(Xs, { children: o }),
144
+ /* @__PURE__ */ i(Ss, { children: [
138
145
  /* @__PURE__ */ i(ys, { children: [
139
146
  /* @__PURE__ */ i(Ns, { children: [
140
147
  /* @__PURE__ */ s(Ys, { alt: "rank-icon", src: Ls }),
141
148
  /* @__PURE__ */ i(E, { children: [
142
- $(t),
149
+ U(t),
143
150
  /* @__PURE__ */ s(N, { children: "PTS" })
144
151
  ] })
145
152
  ] }),
@@ -162,12 +169,12 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
162
169
  ] }) }) }),
163
170
  /* @__PURE__ */ i(Vs, { children: [
164
171
  !n && /* @__PURE__ */ i(ks, { children: [
165
- /* @__PURE__ */ s(W, { loading: e, style: { width: "100%" }, children: /* @__PURE__ */ s(y, { indicator: o || 0, title: "Friends rank" }) }),
172
+ /* @__PURE__ */ s(W, { loading: e, style: { width: "100%" }, children: /* @__PURE__ */ s(y, { indicator: r || 0, title: "Friends rank" }) }),
166
173
  /* @__PURE__ */ s(W, { loading: e, style: { width: "100%" }, children: /* @__PURE__ */ s(y, { indicator: d || 0, title: "Global rank" }) })
167
174
  ] }),
168
- /* @__PURE__ */ s(W, { loading: e, children: /* @__PURE__ */ i(Us, { children: [
175
+ /* @__PURE__ */ s(W, { loading: e, children: /* @__PURE__ */ i($s, { children: [
169
176
  /* @__PURE__ */ s(I, { indicator: p || 0, title: "Win streak" }),
170
- /* @__PURE__ */ s(I, { indicator: r || 0, title: "Correct" }),
177
+ /* @__PURE__ */ s(I, { indicator: c || 0, title: "Correct" }),
171
178
  /* @__PURE__ */ s(I, { indicator: m || 0, title: "Incorrect" }),
172
179
  /* @__PURE__ */ s(I, { indicator: `${g || 0}%`, title: "Succ. rate" })
173
180
  ] }) })
@@ -222,14 +229,14 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
222
229
  /* @__PURE__ */ s(h, { name: "iconCopySuccess" }),
223
230
  /* @__PURE__ */ s(Hs, { children: "Link Copied to Clipboard" })
224
231
  ] }) }), J = (e) => {
225
- const n = G(), [l, c] = Z(null), t = x(
226
- async (o) => {
232
+ const n = G(), [l, o] = Z(null), t = x(
233
+ async (r) => {
227
234
  var d;
228
- if (o && (d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText) {
229
- n.current && (clearTimeout(n.current), c(null));
235
+ if (r && (d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText) {
236
+ n.current && (clearTimeout(n.current), o(null));
230
237
  try {
231
- await navigator.clipboard.writeText(o), e.current && (c(K.createPortal(/* @__PURE__ */ s(js, {}), e.current)), n.current = setTimeout(() => {
232
- c(null);
238
+ await navigator.clipboard.writeText(r), e.current && (o(K.createPortal(/* @__PURE__ */ s(js, {}), e.current)), n.current = setTimeout(() => {
239
+ o(null);
233
240
  }, 1e3));
234
241
  } catch (p) {
235
242
  console.error("Unable to copy to clipboard", p);
@@ -265,7 +272,7 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
265
272
  name: "ArrowInviteIcon",
266
273
  class: "awohrz6",
267
274
  propsAsIs: !0
268
- }), ae = ({ title: e, description: n, onClick: l, className: c }) => {
275
+ }), ae = ({ title: e, description: n, onClick: l, className: o }) => {
269
276
  const [t] = f({
270
277
  type: "invitation",
271
278
  action: "sent",
@@ -273,7 +280,7 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
273
280
  from: B.TITLE_CARD
274
281
  }
275
282
  });
276
- return /* @__PURE__ */ i(Ks, { "data-a": "intr", onClick: t(l), className: c, children: [
283
+ return /* @__PURE__ */ i(Ks, { "data-a": "intr", onClick: t(l), className: o, children: [
277
284
  /* @__PURE__ */ s(qs, { name: "icon-friends" }),
278
285
  /* @__PURE__ */ i(Os, { children: [
279
286
  /* @__PURE__ */ s(Ps, { children: e }),
@@ -297,15 +304,15 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
297
304
  name: "AvatarPlaceholder",
298
305
  class: "a1dg29ja",
299
306
  propsAsIs: !1
300
- }), ce = /* @__PURE__ */ a("div")({
307
+ }), oe = /* @__PURE__ */ a("div")({
301
308
  name: "Content",
302
309
  class: "c10a68rc",
303
310
  propsAsIs: !1
304
- }), oe = /* @__PURE__ */ a("div")({
311
+ }), re = /* @__PURE__ */ a("div")({
305
312
  name: "NameContainer",
306
313
  class: "nc4kck5",
307
314
  propsAsIs: !1
308
- }), re = /* @__PURE__ */ a("span")({
315
+ }), ce = /* @__PURE__ */ a("span")({
309
316
  name: "Name",
310
317
  class: "njsrqgr",
311
318
  propsAsIs: !1
@@ -317,20 +324,20 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
317
324
  friendsRank: e,
318
325
  avatar: n,
319
326
  name: l,
320
- userId: c,
327
+ userId: o,
321
328
  points: t,
322
- isCurrentUser: o,
329
+ isCurrentUser: r,
323
330
  style: d
324
- }) => /* @__PURE__ */ i(ne, { "data-name": c, style: d, children: [
331
+ }) => /* @__PURE__ */ i(ne, { "data-name": o, style: d, children: [
325
332
  /* @__PURE__ */ s(le, { children: e || 0 }),
326
- /* @__PURE__ */ i(ce, { children: [
327
- n ? /* @__PURE__ */ s(te, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(ie, { children: U(l || "") }),
328
- /* @__PURE__ */ i(oe, { children: [
329
- /* @__PURE__ */ s(re, { children: l || "" }),
330
- o && /* @__PURE__ */ s(pe, { name: "icon-star" })
333
+ /* @__PURE__ */ i(oe, { children: [
334
+ n ? /* @__PURE__ */ s(te, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(ie, { children: $(l || "") }),
335
+ /* @__PURE__ */ i(re, { children: [
336
+ /* @__PURE__ */ s(ce, { children: l || "" }),
337
+ r && /* @__PURE__ */ s(pe, { name: "icon-star" })
331
338
  ] })
332
339
  ] }),
333
- /* @__PURE__ */ s("div", { children: $(t) })
340
+ /* @__PURE__ */ s("div", { children: U(t) })
334
341
  ] }), be = /* @__PURE__ */ a("div")({
335
342
  name: "Container",
336
343
  class: "c16btbfp",
@@ -339,18 +346,18 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
339
346
  items: e,
340
347
  currentUserId: n,
341
348
  openItemDetail: l,
342
- fetchMore: c,
349
+ fetchMore: o,
343
350
  scrollNode: t,
344
- hasMore: o
351
+ hasMore: r
345
352
  }) => {
346
353
  const d = x((p) => {
347
- const r = p.target.getAttribute("data-name");
348
- r && l(r);
354
+ const c = p.target.getAttribute("data-name");
355
+ c && l(c);
349
356
  }, [l]);
350
- return /* @__PURE__ */ s(D, {
351
- loadMore: c,
357
+ return /* @__PURE__ */ s(ds, {
358
+ loadMore: o,
352
359
  initialLoad: !1,
353
- hasMore: o,
360
+ hasMore: r,
354
361
  useWindow: !1,
355
362
  getScrollParent: () => t.current,
356
363
  children: /* @__PURE__ */ s(be, {
@@ -402,7 +409,7 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
402
409
  name: "LinkAddress",
403
410
  class: "lvi87q4",
404
411
  propsAsIs: !1
405
- }), Se = () => h, Xe = /* @__PURE__ */ a(Se())({
412
+ }), Xe = () => h, Se = /* @__PURE__ */ a(Xe())({
406
413
  name: "LinkIcon",
407
414
  class: "l1pqlvw3",
408
415
  propsAsIs: !0
@@ -410,10 +417,10 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
410
417
  inviteLink: e,
411
418
  inviteCardTitle: n,
412
419
  inviteCardSubtext: l,
413
- primaryColor: c,
420
+ primaryColor: o,
414
421
  className: t
415
422
  }) => {
416
- const o = G(null), [d, p] = J(o), [r] = f({
423
+ const r = G(null), [d, p] = J(r), [c] = f({
417
424
  type: "invitation",
418
425
  action: "sent",
419
426
  payload: {
@@ -421,17 +428,17 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
421
428
  }
422
429
  });
423
430
  return /* @__PURE__ */ i(he, { className: t, children: [
424
- /* @__PURE__ */ s(Ae, { style: { backgroundColor: c }, children: /* @__PURE__ */ s(We, { name: "invite-game-icon" }) }),
431
+ /* @__PURE__ */ s(Ae, { style: { backgroundColor: o }, children: /* @__PURE__ */ s(We, { name: "invite-game-icon" }) }),
425
432
  /* @__PURE__ */ i(Ie, { children: [
426
433
  /* @__PURE__ */ s(Re, { children: n || "" }),
427
434
  /* @__PURE__ */ s(ge, { children: l || "" })
428
435
  ] }),
429
- e && /* @__PURE__ */ i(Ve, { ref: o, "data-a": "intr", onClick: r(() => d(e)), children: [
436
+ e && /* @__PURE__ */ i(Ve, { ref: r, "data-a": "intr", onClick: c(() => d(e)), children: [
430
437
  /* @__PURE__ */ i(Ce, { children: [
431
438
  /* @__PURE__ */ s(Ge, { children: "Invite link" }),
432
439
  /* @__PURE__ */ s(Ze, { children: e })
433
440
  ] }),
434
- /* @__PURE__ */ s(Xe, { name: "icon-copy" })
441
+ /* @__PURE__ */ s(Se, { name: "icon-copy" })
435
442
  ] }),
436
443
  p
437
444
  ] });
@@ -456,45 +463,45 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
456
463
  scrollNode: n,
457
464
  scrollStore: l
458
465
  }) => {
459
- const c = G(null), {
466
+ const o = G(null), {
460
467
  data: t,
461
- hasMore: o,
468
+ hasMore: r,
462
469
  loading: d,
463
470
  key: p
464
471
  } = u(e.leaderboardList.$store), {
465
- data: r
466
- } = u(e.deepLink.$store), [m, b] = J(c);
472
+ data: c
473
+ } = u(e.deepLink.$store), [m, b] = J(o);
467
474
  return !t.length && !d ? /* @__PURE__ */ s(Ee, {
468
- deepLink: r
475
+ deepLink: c
469
476
  }) : /* @__PURE__ */ i(C, {
470
477
  children: [/* @__PURE__ */ s(ue, {
471
478
  items: t,
472
479
  scrollNode: n,
473
480
  scrollStore: l,
474
481
  fetchMore: e.leaderboardList.fetchMore,
475
- hasMore: o,
482
+ hasMore: r,
476
483
  openItemDetail: e.openUser,
477
484
  currentUserId: e.currentUserId.get()
478
- }, p), r && /* @__PURE__ */ s(Ne, {
479
- ref: c,
485
+ }, p), c && /* @__PURE__ */ s(Ne, {
486
+ ref: o,
480
487
  children: /* @__PURE__ */ s(ae, {
481
488
  "data-a": "intr",
482
- onClick: () => m(r),
489
+ onClick: () => m(c),
483
490
  title: "Invite Friends",
484
491
  description: "Challenge them now!"
485
492
  })
486
493
  }), b]
487
494
  });
488
- }, ke = () => L, Ue = /* @__PURE__ */ a(ke())({
495
+ }, ke = () => L, $e = /* @__PURE__ */ a(ke())({
489
496
  name: "Container",
490
497
  class: "cll3md7",
491
498
  propsAsIs: !0
492
- }), $e = () => q, fe = /* @__PURE__ */ a($e())({
499
+ }), Ue = () => D, fe = /* @__PURE__ */ a(Ue())({
493
500
  name: "ActionBtn",
494
501
  class: "a10g1iik",
495
502
  propsAsIs: !0
496
- }), Le = ({ questionId: e, ...n }) => /* @__PURE__ */ i(Ue, { "data-a": "intr", "data-name": e, children: [
497
- /* @__PURE__ */ s(O, { questionId: e, ...n }),
503
+ }), Le = ({ questionId: e, ...n }) => /* @__PURE__ */ i($e, { "data-a": "intr", "data-name": e, children: [
504
+ /* @__PURE__ */ s(q, { questionId: e, ...n }),
498
505
  /* @__PURE__ */ s(fe, { "data-a": "intr", "data-name": e, children: "View Insight" })
499
506
  ] }), xe = () => L, Be = /* @__PURE__ */ a(xe())({
500
507
  name: "Container",
@@ -510,49 +517,49 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
510
517
  propsAsIs: !1
511
518
  }), Me = ({ ...e }) => /* @__PURE__ */ i(Be, { "data-a": "intr", "data-name": e.tweetId, children: [
512
519
  e.title && /* @__PURE__ */ s(Qe, { children: e.title }),
513
- /* @__PURE__ */ s(P, { ...e }),
520
+ /* @__PURE__ */ s(O, { ...e }),
514
521
  /* @__PURE__ */ s(Je, { "data-a": "intr", "data-name": e.tweetId, children: "View Insight" })
515
522
  ] }), k = /* @__PURE__ */ a("div")({
516
523
  name: "QuestionsContainer",
517
524
  class: "qvghv3l",
518
525
  propsAsIs: !1
519
526
  }), ze = ({ questions: e, openQuestion: n, controlVideo: l }) => e ? /* @__PURE__ */ s(k, { "data-a": "intr", onClick: (t) => {
520
- const o = t.target.getAttribute("data-name");
521
- o && (es(), n(o, { openedFrom: "list" }));
527
+ const r = t.target.getAttribute("data-name");
528
+ r && (ss(), n(r, { openedFrom: "list" }));
522
529
  }, children: e == null ? void 0 : e.map((t) => {
523
- var o, d, p;
524
- if (t.type === "question" && ((o = t.attributes) == null ? void 0 : o.attributes.case) === "question") {
525
- const r = t.attributes.attributes.value;
526
- return /* @__PURE__ */ s(_, { ...r }, r.questionId);
530
+ var r, d, p;
531
+ if (t.type === "question" && ((r = t.attributes) == null ? void 0 : r.attributes.case) === "question") {
532
+ const c = t.attributes.attributes.value;
533
+ return /* @__PURE__ */ s(P, { ...c }, c.questionId);
527
534
  }
528
535
  if (t.type === "insight" && ((d = t.attributes) == null ? void 0 : d.attributes.case) === "insight") {
529
- const r = t.attributes.attributes.value;
530
- return /* @__PURE__ */ s(Le, { controlVideo: l, ...r }, r.questionId);
536
+ const c = t.attributes.attributes.value;
537
+ return /* @__PURE__ */ s(Le, { controlVideo: l, ...c }, c.questionId);
531
538
  }
532
539
  if (t.type === "tweet" && ((p = t.attributes) == null ? void 0 : p.attributes.case) === "tweet") {
533
- const r = t.attributes.attributes.value, m = t.attributes.id;
534
- return /* @__PURE__ */ s(Me, { controlVideo: l, ...r, tweetId: m }, m);
540
+ const c = t.attributes.attributes.value, m = t.attributes.id;
541
+ return /* @__PURE__ */ s(Me, { controlVideo: l, ...c, tweetId: m }, m);
535
542
  }
536
543
  return null;
537
- }) }) : /* @__PURE__ */ s(k, { children: Array.from({ length: 5 }).map((t, o) => /* @__PURE__ */ s(ss, {}, o)) }), we = ({ store: e, openQuestion: n }) => {
538
- const { sdk: l } = as(), c = u(e);
539
- return /* @__PURE__ */ s(ze, { openQuestion: n, questions: c.data, controlVideo: l == null ? void 0 : l.controlVideoPlayer });
544
+ }) }) : /* @__PURE__ */ s(k, { children: Array.from({ length: 5 }).map((t, r) => /* @__PURE__ */ s(_, {}, r)) }), we = ({ store: e, openQuestion: n }) => {
545
+ const { sdk: l } = es(), o = u(e);
546
+ return /* @__PURE__ */ s(ze, { openQuestion: n, questions: o.data, controlVideo: l == null ? void 0 : l.controlVideoPlayer });
540
547
  }, Te = ({ userSummary: e }) => {
541
548
  var n;
542
- const [l, c] = Z(void 0);
549
+ const [l, o] = Z(void 0);
543
550
  return R(() => {
544
- const t = e.$store.subscribe((o) => {
545
- o && c(o);
551
+ const t = e.$store.subscribe((r) => {
552
+ r && o(r);
546
553
  });
547
554
  return () => {
548
555
  t();
549
556
  };
550
557
  }, [e]), /* @__PURE__ */ s(xs, { loading: !(l != null && l.summary), ...l == null ? void 0 : l.summary, successRate: (n = l == null ? void 0 : l.percentage) == null ? void 0 : n.correct });
551
- }, He = ({ gamification: e, className: n, scrollStore: l, scrollNode: c, appNode: t, style: o, responsiveStore: d }) => {
552
- const { tabsShown: p } = u(l, { keys: ["tabsShown"] }), r = u(e.friendsTabEnabled), [m, b] = Z(v.HOME), [, g] = ns(), { sdkInDesktopView: S, screen: Q } = u(d, { keys: ["sdkInDesktopView"] }), M = (A) => {
558
+ }, He = ({ gamification: e, className: n, scrollStore: l, scrollNode: o, appNode: t, style: r, responsiveStore: d }) => {
559
+ const { tabsShown: p } = u(l, { keys: ["tabsShown"] }), c = u(e.friendsTabEnabled), [m, b] = Z(v.HOME), [, g] = as(), { sdkInDesktopView: X, screen: Q } = u(d, { keys: ["sdkInDesktopView"] }), M = (A) => {
553
560
  g(() => {
554
- var X;
555
- b(A), S === !1 && (((X = t.current) == null ? void 0 : X.getBoundingClientRect().y) || 0) < 0 && bs(t, Q.size, { behavior: "instant" });
561
+ var S;
562
+ b(A), X === !1 && (((S = t.current) == null ? void 0 : S.getBoundingClientRect().y) || 0) < 0 && bs(t, Q.size, { behavior: "instant" });
556
563
  });
557
564
  };
558
565
  R(() => l.subscribe((A) => {
@@ -562,12 +569,12 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
562
569
  }
563
570
  d.get().sdkInDesktopView ? l.setKey("tabsShown", A.scrollDirection === "backward") : l.setKey("tabsShown", A.scrollDirection === "forward");
564
571
  }), [l, d]), R(() => {
565
- r || b(v.HOME);
566
- }, [r]);
572
+ c || b(v.HOME);
573
+ }, [c]);
567
574
  let V = "0px";
568
- return S ? V = p ? "0px" : "calc(0px - var(--header-height))" : V = p ? "var(--header-height)" : "0px", /* @__PURE__ */ i(ls, { className: ts(n, "SL-Tabs", "sl-hide-on-modal"), style: o, children: [
569
- r && /* @__PURE__ */ s(
570
- is,
575
+ return X ? V = p ? "0px" : "calc(0px - var(--header-height))" : V = p ? "var(--header-height)" : "0px", /* @__PURE__ */ i(ns, { className: ls(n, "SL-Tabs", "sl-hide-on-modal"), style: r, children: [
576
+ c && /* @__PURE__ */ s(
577
+ ts,
571
578
  {
572
579
  style: {
573
580
  top: V
@@ -576,26 +583,26 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
576
583
  }
577
584
  ),
578
585
  m === v.HOME && /* @__PURE__ */ i(C, { children: [
579
- /* @__PURE__ */ s(cs, { children: /* @__PURE__ */ s(os, { children: /* @__PURE__ */ s(Te, { userSummary: e.userSummary }) }) }),
586
+ /* @__PURE__ */ s(is, { children: /* @__PURE__ */ s(os, { children: /* @__PURE__ */ s(Te, { userSummary: e.userSummary }) }) }),
580
587
  /* @__PURE__ */ s(rs, { style: { flex: 1 }, children: /* @__PURE__ */ s(we, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
581
588
  ] }),
582
- m === v.LEADERBOARD && /* @__PURE__ */ s(ds, { children: /* @__PURE__ */ s(Fe, { scrollStore: l, scrollNode: c, gamification: e }) })
589
+ m === v.LEADERBOARD && /* @__PURE__ */ s(cs, { children: /* @__PURE__ */ s(Fe, { scrollStore: l, scrollNode: o, gamification: e }) })
583
590
  ] });
584
- }, qe = ({
591
+ }, na = ({
585
592
  gamification: e,
586
593
  scrollStore: n,
587
594
  className: l,
588
- appNode: c,
595
+ appNode: o,
589
596
  scrollNode: t,
590
- responsiveStore: o
597
+ responsiveStore: r
591
598
  }) => /* @__PURE__ */ s(He, {
592
- appNode: c,
599
+ appNode: o,
593
600
  scrollStore: n,
594
601
  scrollNode: t,
595
602
  className: l,
596
603
  gamification: e,
597
- responsiveStore: o
604
+ responsiveStore: r
598
605
  });
599
606
  export {
600
- qe as default
607
+ na as default
601
608
  };
package/lib/es/index.js CHANGED
@@ -1,9 +1,13 @@
1
1
  import "react/jsx-runtime";
2
- import { x as t, y as s, z as o, E as y } from "./index2.js";
2
+ import { v as s, x as y, y as S, z as L } from "./index2.js";
3
+ import "nanostores";
3
4
  import "react";
5
+ import "@nanostores/react";
6
+ import "lodash.throttle";
7
+ import "react-countup";
4
8
  export {
5
- t as StreamLayerProvider,
6
- s as StreamLayerSDKTv,
7
- o as useStreamLayer,
8
- y as useStreamLayerUI
9
+ s as StreamLayerProvider,
10
+ y as StreamLayerSDKTv,
11
+ S as useStreamLayer,
12
+ L as useStreamLayerUI
9
13
  };