@streamlayer/web-os 0.3.1 → 0.3.3

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