@streamlayer/web-os 0.3.8 → 0.3.9
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.
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index2.js +28 -76
- package/lib/classic/cjs/classic.js +1 -1
- package/lib/classic/cjs/classic2.js +2 -20
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/gamification-feature2.js +1 -1
- package/lib/classic/cjs/gamification-feature3.js +1 -1
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index2.js +2 -21
- package/lib/classic/cjs/index3.js +1 -19
- package/lib/classic/es/classic.js +4 -3
- package/lib/classic/es/classic2.js +10126 -18793
- package/lib/classic/es/gamification-feature.js +2 -2
- package/lib/classic/es/gamification-feature2.js +2 -2
- package/lib/classic/es/gamification-feature3.js +10 -9
- package/lib/classic/es/index.js +4 -3
- package/lib/classic/es/index2.js +9469 -18142
- package/lib/classic/es/index3.js +237 -5670
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/gamification-feature2.js +27 -26
- package/lib/es/index.js +6 -5
- package/lib/es/index2.js +13705 -27812
- package/package.json +19 -17
|
@@ -1,10 +1,11 @@
|
|
|
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
|
|
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 f, u, r as L, S as K, O as D, g as q, h as O, D as P, w as _, p as ss, j as es, l as as, k as ns, m as ls, n as ts, o as is, q as os, C as rs } from "./index2.js";
|
|
3
3
|
import "@nanostores/react";
|
|
4
4
|
import { useRef as G, useState as Z, useCallback as x, useEffect as R } from "react";
|
|
5
5
|
import "nanostores";
|
|
6
6
|
import "@noriginmedia/norigin-spatial-navigation";
|
|
7
7
|
import "react-countdown-circle-timer";
|
|
8
|
+
import { createPortal as cs } from "react-dom";
|
|
8
9
|
import "react-countup";
|
|
9
10
|
import "lodash.throttle";
|
|
10
11
|
import ds from "react-infinite-scroller";
|
|
@@ -108,11 +109,11 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
|
|
|
108
109
|
name: "Ranks",
|
|
109
110
|
class: "r1mqo824",
|
|
110
111
|
propsAsIs: !1
|
|
111
|
-
}),
|
|
112
|
+
}), Us = /* @__PURE__ */ a("div")({
|
|
112
113
|
name: "Statistics",
|
|
113
114
|
class: "sxareh6",
|
|
114
115
|
propsAsIs: !1
|
|
115
|
-
}),
|
|
116
|
+
}), $s = /* @__PURE__ */ a("div")({
|
|
116
117
|
name: "AvatarPlaceholder",
|
|
117
118
|
class: "amcu48h",
|
|
118
119
|
propsAsIs: !1
|
|
@@ -137,7 +138,7 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
|
|
|
137
138
|
/* @__PURE__ */ s(gs, { children: /* @__PURE__ */ s(W, { loading: e, children: /* @__PURE__ */ i(Cs, { children: [
|
|
138
139
|
/* @__PURE__ */ i(fs, { children: [
|
|
139
140
|
l && /* @__PURE__ */ s(Gs, { alt: "avatar", src: l }),
|
|
140
|
-
!l && /* @__PURE__ */ s(
|
|
141
|
+
!l && /* @__PURE__ */ s($s, { children: U(o || "") })
|
|
141
142
|
] }),
|
|
142
143
|
/* @__PURE__ */ i(Zs, { children: [
|
|
143
144
|
/* @__PURE__ */ s(Xs, { children: o }),
|
|
@@ -146,7 +147,7 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
|
|
|
146
147
|
/* @__PURE__ */ i(Ns, { children: [
|
|
147
148
|
/* @__PURE__ */ s(Ys, { alt: "rank-icon", src: Ls }),
|
|
148
149
|
/* @__PURE__ */ i(E, { children: [
|
|
149
|
-
|
|
150
|
+
$(t),
|
|
150
151
|
/* @__PURE__ */ s(N, { children: "PTS" })
|
|
151
152
|
] })
|
|
152
153
|
] }),
|
|
@@ -172,7 +173,7 @@ const ps = /* @__PURE__ */ T("CjZzdHJlYW1sYXllci9hbmFseXRpY3MvdjEvaW52aXRhdGlvbn
|
|
|
172
173
|
/* @__PURE__ */ s(W, { loading: e, style: { width: "100%" }, children: /* @__PURE__ */ s(y, { indicator: r || 0, title: "Friends rank" }) }),
|
|
173
174
|
/* @__PURE__ */ s(W, { loading: e, style: { width: "100%" }, children: /* @__PURE__ */ s(y, { indicator: d || 0, title: "Global rank" }) })
|
|
174
175
|
] }),
|
|
175
|
-
/* @__PURE__ */ s(W, { loading: e, children: /* @__PURE__ */ i(
|
|
176
|
+
/* @__PURE__ */ s(W, { loading: e, children: /* @__PURE__ */ i(Us, { children: [
|
|
176
177
|
/* @__PURE__ */ s(I, { indicator: p || 0, title: "Win streak" }),
|
|
177
178
|
/* @__PURE__ */ s(I, { indicator: c || 0, title: "Correct" }),
|
|
178
179
|
/* @__PURE__ */ s(I, { indicator: m || 0, title: "Incorrect" }),
|
|
@@ -235,7 +236,7 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
235
236
|
if (r && (d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText) {
|
|
236
237
|
n.current && (clearTimeout(n.current), o(null));
|
|
237
238
|
try {
|
|
238
|
-
await navigator.clipboard.writeText(r), e.current && (o(
|
|
239
|
+
await navigator.clipboard.writeText(r), e.current && (o(cs(/* @__PURE__ */ s(js, {}), e.current)), n.current = setTimeout(() => {
|
|
239
240
|
o(null);
|
|
240
241
|
}, 1e3));
|
|
241
242
|
} catch (p) {
|
|
@@ -331,13 +332,13 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
331
332
|
}) => /* @__PURE__ */ i(ne, { "data-name": o, style: d, children: [
|
|
332
333
|
/* @__PURE__ */ s(le, { children: e || 0 }),
|
|
333
334
|
/* @__PURE__ */ i(oe, { children: [
|
|
334
|
-
n ? /* @__PURE__ */ s(te, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(ie, { children:
|
|
335
|
+
n ? /* @__PURE__ */ s(te, { alt: "leaderboard-item-avatar", src: n }) : /* @__PURE__ */ s(ie, { children: U(l || "") }),
|
|
335
336
|
/* @__PURE__ */ i(re, { children: [
|
|
336
337
|
/* @__PURE__ */ s(ce, { children: l || "" }),
|
|
337
338
|
r && /* @__PURE__ */ s(pe, { name: "icon-star" })
|
|
338
339
|
] })
|
|
339
340
|
] }),
|
|
340
|
-
/* @__PURE__ */ s("div", { children:
|
|
341
|
+
/* @__PURE__ */ s("div", { children: $(t) })
|
|
341
342
|
] }), be = /* @__PURE__ */ a("div")({
|
|
342
343
|
name: "Container",
|
|
343
344
|
class: "c16btbfp",
|
|
@@ -492,16 +493,16 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
492
493
|
})
|
|
493
494
|
}), b]
|
|
494
495
|
});
|
|
495
|
-
}, ke = () => L,
|
|
496
|
+
}, ke = () => L, Ue = /* @__PURE__ */ a(ke())({
|
|
496
497
|
name: "Container",
|
|
497
498
|
class: "cll3md7",
|
|
498
499
|
propsAsIs: !0
|
|
499
|
-
}),
|
|
500
|
+
}), $e = () => K, fe = /* @__PURE__ */ a($e())({
|
|
500
501
|
name: "ActionBtn",
|
|
501
502
|
class: "a10g1iik",
|
|
502
503
|
propsAsIs: !0
|
|
503
|
-
}), Le = ({ questionId: e, ...n }) => /* @__PURE__ */ i(
|
|
504
|
-
/* @__PURE__ */ s(
|
|
504
|
+
}), Le = ({ questionId: e, ...n }) => /* @__PURE__ */ i(Ue, { "data-a": "intr", "data-name": e, children: [
|
|
505
|
+
/* @__PURE__ */ s(D, { questionId: e, ...n }),
|
|
505
506
|
/* @__PURE__ */ s(fe, { "data-a": "intr", "data-name": e, children: "View Insight" })
|
|
506
507
|
] }), xe = () => L, Be = /* @__PURE__ */ a(xe())({
|
|
507
508
|
name: "Container",
|
|
@@ -517,7 +518,7 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
517
518
|
propsAsIs: !1
|
|
518
519
|
}), Me = ({ ...e }) => /* @__PURE__ */ i(Be, { "data-a": "intr", "data-name": e.tweetId, children: [
|
|
519
520
|
e.title && /* @__PURE__ */ s(Qe, { children: e.title }),
|
|
520
|
-
/* @__PURE__ */ s(
|
|
521
|
+
/* @__PURE__ */ s(q, { ...e }),
|
|
521
522
|
/* @__PURE__ */ s(Je, { "data-a": "intr", "data-name": e.tweetId, children: "View Insight" })
|
|
522
523
|
] }), k = /* @__PURE__ */ a("div")({
|
|
523
524
|
name: "QuestionsContainer",
|
|
@@ -525,12 +526,12 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
525
526
|
propsAsIs: !1
|
|
526
527
|
}), ze = ({ questions: e, openQuestion: n, controlVideo: l }) => e ? /* @__PURE__ */ s(k, { "data-a": "intr", onClick: (t) => {
|
|
527
528
|
const r = t.target.getAttribute("data-name");
|
|
528
|
-
r && (
|
|
529
|
+
r && (_(), n(r, { openedFrom: "list" }));
|
|
529
530
|
}, children: e == null ? void 0 : e.map((t) => {
|
|
530
531
|
var r, d, p;
|
|
531
532
|
if (t.type === "question" && ((r = t.attributes) == null ? void 0 : r.attributes.case) === "question") {
|
|
532
533
|
const c = t.attributes.attributes.value;
|
|
533
|
-
return /* @__PURE__ */ s(
|
|
534
|
+
return /* @__PURE__ */ s(O, { ...c }, c.questionId);
|
|
534
535
|
}
|
|
535
536
|
if (t.type === "insight" && ((d = t.attributes) == null ? void 0 : d.attributes.case) === "insight") {
|
|
536
537
|
const c = t.attributes.attributes.value;
|
|
@@ -541,8 +542,8 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
541
542
|
return /* @__PURE__ */ s(Me, { controlVideo: l, ...c, tweetId: m }, m);
|
|
542
543
|
}
|
|
543
544
|
return null;
|
|
544
|
-
}) }) : /* @__PURE__ */ s(k, { children: Array.from({ length: 5 }).map((t, r) => /* @__PURE__ */ s(
|
|
545
|
-
const { sdk: l } =
|
|
545
|
+
}) }) : /* @__PURE__ */ s(k, { children: Array.from({ length: 5 }).map((t, r) => /* @__PURE__ */ s(P, {}, r)) }), we = ({ store: e, openQuestion: n }) => {
|
|
546
|
+
const { sdk: l } = ss(), o = u(e);
|
|
546
547
|
return /* @__PURE__ */ s(ze, { openQuestion: n, questions: o.data, controlVideo: l == null ? void 0 : l.controlVideoPlayer });
|
|
547
548
|
}, Te = ({ userSummary: e }) => {
|
|
548
549
|
var n;
|
|
@@ -556,7 +557,7 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
556
557
|
};
|
|
557
558
|
}, [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
559
|
}, 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] =
|
|
560
|
+
const { tabsShown: p } = u(l, { keys: ["tabsShown"] }), c = u(e.friendsTabEnabled), [m, b] = Z(v.HOME), [, g] = es(), { sdkInDesktopView: X, screen: Q } = u(d, { keys: ["sdkInDesktopView"] }), M = (A) => {
|
|
560
561
|
g(() => {
|
|
561
562
|
var S;
|
|
562
563
|
b(A), X === !1 && (((S = t.current) == null ? void 0 : S.getBoundingClientRect().y) || 0) < 0 && bs(t, Q.size, { behavior: "instant" });
|
|
@@ -572,9 +573,9 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
572
573
|
c || b(v.HOME);
|
|
573
574
|
}, [c]);
|
|
574
575
|
let V = "0px";
|
|
575
|
-
return X ? V = p ? "0px" : "calc(0px - var(--header-height))" : V = p ? "var(--header-height)" : "0px", /* @__PURE__ */ i(
|
|
576
|
+
return X ? V = p ? "0px" : "calc(0px - var(--header-height))" : V = p ? "var(--header-height)" : "0px", /* @__PURE__ */ i(as, { className: ns(n, "SL-Tabs", "sl-hide-on-modal"), style: r, children: [
|
|
576
577
|
c && /* @__PURE__ */ s(
|
|
577
|
-
|
|
578
|
+
ls,
|
|
578
579
|
{
|
|
579
580
|
style: {
|
|
580
581
|
top: V
|
|
@@ -583,12 +584,12 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
583
584
|
}
|
|
584
585
|
),
|
|
585
586
|
m === v.HOME && /* @__PURE__ */ i(C, { children: [
|
|
586
|
-
/* @__PURE__ */ s(
|
|
587
|
-
/* @__PURE__ */ s(
|
|
587
|
+
/* @__PURE__ */ s(ts, { children: /* @__PURE__ */ s(is, { children: /* @__PURE__ */ s(Te, { userSummary: e.userSummary }) }) }),
|
|
588
|
+
/* @__PURE__ */ s(os, { style: { flex: 1 }, children: /* @__PURE__ */ s(we, { openQuestion: e.openQuestion, store: e.feedList.getStore() }) })
|
|
588
589
|
] }),
|
|
589
|
-
m === v.LEADERBOARD && /* @__PURE__ */ s(
|
|
590
|
+
m === v.LEADERBOARD && /* @__PURE__ */ s(rs, { children: /* @__PURE__ */ s(Fe, { scrollStore: l, scrollNode: o, gamification: e }) })
|
|
590
591
|
] });
|
|
591
|
-
},
|
|
592
|
+
}, la = ({
|
|
592
593
|
gamification: e,
|
|
593
594
|
scrollStore: n,
|
|
594
595
|
className: l,
|
|
@@ -604,5 +605,5 @@ const F = ({ title: e, active: n, onClick: l }) => /* @__PURE__ */ s(Qs, { "data
|
|
|
604
605
|
responsiveStore: r
|
|
605
606
|
});
|
|
606
607
|
export {
|
|
607
|
-
|
|
608
|
+
la as default
|
|
608
609
|
};
|
package/lib/es/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { v as
|
|
2
|
+
import { v as y, x as S, y as L, z as v } from "./index2.js";
|
|
3
3
|
import "nanostores";
|
|
4
4
|
import "react";
|
|
5
5
|
import "@nanostores/react";
|
|
6
6
|
import "lodash.throttle";
|
|
7
|
+
import "react-dom";
|
|
7
8
|
import "react-countup";
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
y as StreamLayerProvider,
|
|
11
|
+
S as StreamLayerSDKTv,
|
|
12
|
+
L as useStreamLayer,
|
|
13
|
+
v as useStreamLayerUI
|
|
13
14
|
};
|