@streamlayer/react 1.3.4 → 1.4.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.
- package/lib/app/insight.d.ts +8 -0
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/insight.js +1 -0
- package/lib/cjs/masters2.js +1 -1
- package/lib/cjs/provider.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +10 -10
- package/lib/dist/cjs/masters.js +46 -46
- package/lib/dist/es/masters.js +3444 -3432
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +123 -116
- package/lib/es/index2.js +34 -33
- package/lib/es/insight.js +69 -0
- package/lib/es/masters2.js +12 -12
- package/lib/es/provider.js +3 -3
- package/lib/es/useStreamLayerApp2.js +1322 -1309
- package/lib/style.css +1 -1
- package/package.json +18 -13
package/lib/es/index2.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var fe = Object.defineProperty;
|
|
2
2
|
var ke = (e, s, n) => s in e ? fe(e, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[s] = n;
|
|
3
3
|
var m = (e, s, n) => ke(e, typeof s != "symbol" ? s + "" : s, n);
|
|
4
|
-
import {
|
|
5
|
-
import { a4 as P, u, F as ye, s as h, T as re, i as Ne, p as be, b as Se, N as Ie, k as Ee, M as Ae, f as
|
|
4
|
+
import { h as w, i as G, d as x, S as C } from "./useStreamLayerApp2.js";
|
|
5
|
+
import { a4 as P, u, F as ye, s as h, T as re, i as Ne, p as be, b as Se, N as Ie, k as Ee, M as Ae, f as we, S as Ce, C as $e, g as De, O as le, m as q, l as Le, h as Te, j as Oe, n as de, o as xe, q as Re, r as Ve, t as Q, w as Pe, y as ce, x as U, z as qe, A as H, I as O, a as pe, D as _e, E as Fe, G as Ke, e as Me, H as R, J as j, K as Qe, P as Ue, R as ze, c as ue, V as We, W as Be, L as _, _ as Ge, v as F, $ as He, a0 as je, X as Xe, Y as Ye, Z as Ze, a5 as Je, a2 as he, a3 as X } from "./provider.js";
|
|
6
6
|
import { jsx as t, jsxs as g, Fragment as L } from "react/jsx-runtime";
|
|
7
7
|
import { createContext as es, useContext as z, useRef as D, useState as E, useEffect as k, useTransition as ss, lazy as ns, useMemo as $, Suspense as ts, forwardRef as os, useLayoutEffect as is, useCallback as V } from "react";
|
|
8
8
|
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
|
@@ -46,7 +46,7 @@ var Y;
|
|
|
46
46
|
(function(e) {
|
|
47
47
|
e.Init = "init", e.Ready = "ready", e.Connecting = "connecting", e.Connected = "connected", e.Disconnected = "disconnected", e.Failed = "failed", e.Reconnect = "reconnect", e.Reconnecting = "reconnecting";
|
|
48
48
|
})(Y || (Y = {}));
|
|
49
|
-
|
|
49
|
+
w.Unknown, w.Internal, w.DeadlineExceeded, w.ResourceExhausted, w.FailedPrecondition, w.Unavailable, w.DataLoss;
|
|
50
50
|
P("grpc:retry");
|
|
51
51
|
G(10, { description: "Number of attempts to retry" }), G(3e4, { description: "Max delay between retries in milliseconds" });
|
|
52
52
|
var I;
|
|
@@ -106,8 +106,8 @@ var te;
|
|
|
106
106
|
})(te || (te = {}));
|
|
107
107
|
x.POLL, x.PREDICTION, x.TRIVIA;
|
|
108
108
|
const ds = {
|
|
109
|
-
[
|
|
110
|
-
},
|
|
109
|
+
[C.GAMES]: !0
|
|
110
|
+
}, K = /* @__PURE__ */ h("div")({
|
|
111
111
|
name: "LoadingContainer",
|
|
112
112
|
class: "lclc0ej",
|
|
113
113
|
propsAsIs: !1
|
|
@@ -121,17 +121,17 @@ const ds = {
|
|
|
121
121
|
const r = u(e.status), l = u(s.sdkStore.slStreamId);
|
|
122
122
|
if (!a) {
|
|
123
123
|
if (l != null && l.loading && !l.data)
|
|
124
|
-
return /* @__PURE__ */ t(
|
|
124
|
+
return /* @__PURE__ */ t(K, {
|
|
125
125
|
className: o,
|
|
126
126
|
children: "Event is loading..."
|
|
127
127
|
});
|
|
128
128
|
if (!(l != null && l.data))
|
|
129
|
-
return /* @__PURE__ */ t(
|
|
129
|
+
return /* @__PURE__ */ t(K, {
|
|
130
130
|
className: o,
|
|
131
131
|
children: "Event is forbidden..."
|
|
132
132
|
});
|
|
133
133
|
if (r !== ye.Ready)
|
|
134
|
-
return /* @__PURE__ */ t(
|
|
134
|
+
return /* @__PURE__ */ t(K, {
|
|
135
135
|
className: o,
|
|
136
136
|
children: "Wait feature..."
|
|
137
137
|
});
|
|
@@ -226,11 +226,11 @@ const ds = {
|
|
|
226
226
|
key: d
|
|
227
227
|
} = u(e.leaderboardList.$store), {
|
|
228
228
|
data: i
|
|
229
|
-
} = u(e.deepLink.$store), [c, p] =
|
|
229
|
+
} = u(e.deepLink.$store), [c, p] = we(o);
|
|
230
230
|
return !a.length && !l ? /* @__PURE__ */ t(gs, {
|
|
231
231
|
deepLink: i
|
|
232
232
|
}) : /* @__PURE__ */ g(L, {
|
|
233
|
-
children: [/* @__PURE__ */ t(
|
|
233
|
+
children: [/* @__PURE__ */ t(Ce, {
|
|
234
234
|
items: a,
|
|
235
235
|
scrollNode: s,
|
|
236
236
|
scrollStore: n,
|
|
@@ -265,7 +265,7 @@ const ds = {
|
|
|
265
265
|
const { tabsShown: d } = u(n, { keys: ["tabsShown"] }), [i, c] = E(q.HOME), [, p] = ss(), { sdkInDesktopView: v, screen: f } = u(l, { keys: ["sdkInDesktopView"] }), N = (S) => {
|
|
266
266
|
p(() => {
|
|
267
267
|
var y;
|
|
268
|
-
c(S), v === !1 && (((y = a.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 &&
|
|
268
|
+
c(S), v === !1 && (((y = a.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && Q(a, f.size, { behavior: "instant" });
|
|
269
269
|
});
|
|
270
270
|
};
|
|
271
271
|
k(() => n.subscribe((S) => {
|
|
@@ -364,9 +364,9 @@ const ds = {
|
|
|
364
364
|
useContainer: !l,
|
|
365
365
|
children: c
|
|
366
366
|
});
|
|
367
|
-
},
|
|
368
|
-
const d = $(() => s && s.featureConfig.get().type ===
|
|
369
|
-
|
|
367
|
+
}, ws = ns(() => import("./gamification-feature.js")), Cs = ({ sdk: e, feature: s, className: n, scrollStore: o, appNode: a, scrollNode: r, responsiveStore: l }) => {
|
|
368
|
+
const d = $(() => s && s.featureConfig.get().type === C.GAMES ? /* @__PURE__ */ t(cs, { className: n, sdk: e, feature: s, children: /* @__PURE__ */ t(
|
|
369
|
+
ws,
|
|
370
370
|
{
|
|
371
371
|
appNode: a,
|
|
372
372
|
scrollStore: o,
|
|
@@ -383,7 +383,7 @@ const ds = {
|
|
|
383
383
|
children: d
|
|
384
384
|
}
|
|
385
385
|
);
|
|
386
|
-
}, $s = ({ feature: e, className: s, appNode: n, responsiveStore: o }) => e && e.featureConfig.get().type ===
|
|
386
|
+
}, $s = ({ feature: e, className: s, appNode: n, responsiveStore: o }) => e && e.featureConfig.get().type === C.GAMES ? /* @__PURE__ */ t(
|
|
387
387
|
As,
|
|
388
388
|
{
|
|
389
389
|
className: s,
|
|
@@ -405,7 +405,7 @@ const ds = {
|
|
|
405
405
|
}, [o, a]), d = $(() => [...l.filter(({
|
|
406
406
|
enableSdkButton: i,
|
|
407
407
|
type: c
|
|
408
|
-
}) => c ===
|
|
408
|
+
}) => c === C.GAMES || i).map((i) => ({
|
|
409
409
|
id: i.type,
|
|
410
410
|
onClick: () => e.openFeature(i.type),
|
|
411
411
|
disabled: !(i.type in ds),
|
|
@@ -425,7 +425,7 @@ const ds = {
|
|
|
425
425
|
onClick: () => e.closeFeature(),
|
|
426
426
|
label: "Channels",
|
|
427
427
|
active: r === 0
|
|
428
|
-
}, "Channels"), ...d.map((i) => i.id ===
|
|
428
|
+
}, "Channels"), ...d.map((i) => i.id === C.GAMES ? /* @__PURE__ */ t(O, {
|
|
429
429
|
...i,
|
|
430
430
|
active: i.id === r,
|
|
431
431
|
label: "StreamLayer +",
|
|
@@ -478,11 +478,11 @@ const ds = {
|
|
|
478
478
|
name: "Subtitle",
|
|
479
479
|
class: "s1eftsbu",
|
|
480
480
|
propsAsIs: !1
|
|
481
|
-
}),
|
|
481
|
+
}), Ks = /* @__PURE__ */ h("div")({
|
|
482
482
|
name: "Description",
|
|
483
483
|
class: "d8uezec",
|
|
484
484
|
propsAsIs: !1
|
|
485
|
-
}),
|
|
485
|
+
}), Ms = /* @__PURE__ */ h("button")({
|
|
486
486
|
name: "ActionButton",
|
|
487
487
|
class: "a1h1bk90",
|
|
488
488
|
propsAsIs: !1
|
|
@@ -495,10 +495,10 @@ const ds = {
|
|
|
495
495
|
/* @__PURE__ */ t(_s, { children: "PRESENTS" })
|
|
496
496
|
] }),
|
|
497
497
|
((d = n == null ? void 0 : n.titleCard) == null ? void 0 : d.title) && /* @__PURE__ */ t(Fs, { children: (i = n == null ? void 0 : n.titleCard) == null ? void 0 : i.title }),
|
|
498
|
-
((c = n == null ? void 0 : n.titleCard) == null ? void 0 : c.subtitle) && /* @__PURE__ */ t(
|
|
499
|
-
/* @__PURE__ */ t(
|
|
498
|
+
((c = n == null ? void 0 : n.titleCard) == null ? void 0 : c.subtitle) && /* @__PURE__ */ t(Ks, { children: (p = n == null ? void 0 : n.titleCard) == null ? void 0 : p.subtitle }),
|
|
499
|
+
/* @__PURE__ */ t(Ms, { onClick: s, children: "Play Now" })
|
|
500
500
|
] });
|
|
501
|
-
},
|
|
501
|
+
}, M = [{
|
|
502
502
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_0.png",
|
|
503
503
|
tagline: "",
|
|
504
504
|
headline: /* @__PURE__ */ g(L, {
|
|
@@ -516,7 +516,7 @@ const ds = {
|
|
|
516
516
|
}, {
|
|
517
517
|
graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_5.png",
|
|
518
518
|
headline: "Compete against friends on the leaderboard"
|
|
519
|
-
}],
|
|
519
|
+
}], Qs = /* @__PURE__ */ h("div")({
|
|
520
520
|
name: "OnboardingContainer",
|
|
521
521
|
class: "o1xni1kr",
|
|
522
522
|
propsAsIs: !1
|
|
@@ -551,7 +551,7 @@ const ds = {
|
|
|
551
551
|
return () => {
|
|
552
552
|
A();
|
|
553
553
|
};
|
|
554
|
-
}, [e.$store]), /* @__PURE__ */ t(
|
|
554
|
+
}, [e.$store]), /* @__PURE__ */ t(Qs, {
|
|
555
555
|
children: /* @__PURE__ */ t(Fe, {
|
|
556
556
|
loading: a,
|
|
557
557
|
rules: [{
|
|
@@ -568,7 +568,7 @@ const ds = {
|
|
|
568
568
|
rulesTitle: (d = s.rules) == null ? void 0 : d.heading,
|
|
569
569
|
termsTitle: "Terms and Conditions",
|
|
570
570
|
termsText: (i = s.rules) == null ? void 0 : i.terms,
|
|
571
|
-
steps:
|
|
571
|
+
steps: M,
|
|
572
572
|
primaryColor: (c = s.inviteCard) == null ? void 0 : c.iconColor,
|
|
573
573
|
inviteLink: b,
|
|
574
574
|
inviteCardTitle: (p = s.inviteCard) == null ? void 0 : p.heading,
|
|
@@ -592,7 +592,7 @@ const ds = {
|
|
|
592
592
|
sdkInDesktopView: r,
|
|
593
593
|
responsiveStore: l
|
|
594
594
|
}) => {
|
|
595
|
-
const d = D(null), i = s.data.onboarding, [c, p] = E(i == null ? void 0 : i.instantOpen), v = e.getFeature(
|
|
595
|
+
const d = D(null), i = s.data.onboarding, [c, p] = E(i == null ? void 0 : i.instantOpen), v = e.getFeature(C.GAMES), f = $(() => M == null ? void 0 : M.map(({
|
|
596
596
|
graphicSrc: y
|
|
597
597
|
}) => y), []), {
|
|
598
598
|
screen: N
|
|
@@ -642,7 +642,7 @@ const ds = {
|
|
|
642
642
|
close: s.close,
|
|
643
643
|
action: () => {
|
|
644
644
|
var y;
|
|
645
|
-
p(!0), (((y = a.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 &&
|
|
645
|
+
p(!0), (((y = a.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && Q(a, N.size, {
|
|
646
646
|
behavior: "smooth"
|
|
647
647
|
});
|
|
648
648
|
},
|
|
@@ -667,7 +667,7 @@ const ds = {
|
|
|
667
667
|
name: "NotificationRefreshing",
|
|
668
668
|
class: "n192d1q8",
|
|
669
669
|
propsAsIs: !1
|
|
670
|
-
}), Zs = () =>
|
|
670
|
+
}), Zs = () => Ke, Js = /* @__PURE__ */ h(Zs())({
|
|
671
671
|
name: "Pill",
|
|
672
672
|
class: "p1lha68t",
|
|
673
673
|
propsAsIs: !0
|
|
@@ -719,7 +719,7 @@ const ds = {
|
|
|
719
719
|
})
|
|
720
720
|
}), /* @__PURE__ */ t(Ys, {}, s.id)]
|
|
721
721
|
})]
|
|
722
|
-
}) : s.type === R.QUESTION_RESOLVED && (r = (a = s.data) == null ? void 0 : a.question) != null && r.predictionResult ? /* @__PURE__ */ t(
|
|
722
|
+
}) : s.type === R.QUESTION_RESOLVED && (r = (a = s.data) == null ? void 0 : a.question) != null && r.predictionResult ? /* @__PURE__ */ t(Qe, {
|
|
723
723
|
style: {
|
|
724
724
|
height: s.hiding ? 0 : c
|
|
725
725
|
},
|
|
@@ -769,7 +769,7 @@ const ds = {
|
|
|
769
769
|
r.get().sdkInDesktopView ? (N = a.current) == null || N.scrollTo({
|
|
770
770
|
top: 0,
|
|
771
771
|
behavior: "smooth"
|
|
772
|
-
}) :
|
|
772
|
+
}) : Q(n, c.size, {
|
|
773
773
|
behavior: "smooth"
|
|
774
774
|
}), s(null);
|
|
775
775
|
},
|
|
@@ -785,7 +785,7 @@ const ds = {
|
|
|
785
785
|
}) => {
|
|
786
786
|
const [l] = E(e.getNotificationsStore()), d = u(l), [i, c] = E(null), p = $(() => e.getActiveNotification(), [e, d]);
|
|
787
787
|
return k(() => {
|
|
788
|
-
p &&
|
|
788
|
+
p && Me.emit("notification", {
|
|
789
789
|
action: "rendered",
|
|
790
790
|
payload: {
|
|
791
791
|
questionId: p.data.questionId,
|
|
@@ -819,7 +819,7 @@ const ds = {
|
|
|
819
819
|
}, an = (e) => {
|
|
820
820
|
const s = D(""), [n, o] = E(!1), a = u(e.status), r = u(e.sdkStore.slStreamId), l = u(e.userId()), d = u(e.getActiveFeature()), i = a === "ready" && !!r.data;
|
|
821
821
|
k(() => {
|
|
822
|
-
const v = e.getFeature(
|
|
822
|
+
const v = e.getFeature(C.GAMES);
|
|
823
823
|
v && (v.closeQuestion(), v.closeUser());
|
|
824
824
|
}, [d, e]);
|
|
825
825
|
const c = V(
|
|
@@ -860,7 +860,7 @@ const ds = {
|
|
|
860
860
|
}, rn = ({ sdk: e, className: s, scrollStore: n, appNode: o, scrollNode: a, responsiveStore: r }) => {
|
|
861
861
|
const [, l] = je(e);
|
|
862
862
|
return /* @__PURE__ */ t(
|
|
863
|
-
|
|
863
|
+
Cs,
|
|
864
864
|
{
|
|
865
865
|
className: s,
|
|
866
866
|
scrollNode: a,
|
|
@@ -953,6 +953,7 @@ export {
|
|
|
953
953
|
gn as E,
|
|
954
954
|
an as F,
|
|
955
955
|
kn as S,
|
|
956
|
+
vs as a,
|
|
956
957
|
cn as d,
|
|
957
958
|
fn as u
|
|
958
959
|
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as l, useRef as h } from "react";
|
|
3
|
+
import { u as p, x as f, s as S } from "./provider.js";
|
|
4
|
+
import { F as g, a as v, u as y, d as I } from "./index2.js";
|
|
5
|
+
import { S as Q, Q as x } from "./useStreamLayerApp2.js";
|
|
6
|
+
const E = () => v, L = /* @__PURE__ */ S(E())({
|
|
7
|
+
name: "QuestionWrap",
|
|
8
|
+
class: "q10hhsxv",
|
|
9
|
+
propsAsIs: !0
|
|
10
|
+
}), H = ({
|
|
11
|
+
gamification: e,
|
|
12
|
+
persistent: s,
|
|
13
|
+
hideHeader: r,
|
|
14
|
+
insightId: t
|
|
15
|
+
}) => {
|
|
16
|
+
const a = h(""), o = p(e.openedQuestion.$store);
|
|
17
|
+
return l(() => t ? (!s || e.isOpenedQuestion(t) || (a.current = t, e.getFeedItem(t).then((i) => {
|
|
18
|
+
a.current === t && e.openQuestion(t, i);
|
|
19
|
+
})), () => {
|
|
20
|
+
a.current = "";
|
|
21
|
+
}) : e.feedList.getStore().subscribe(({
|
|
22
|
+
data: i
|
|
23
|
+
}) => {
|
|
24
|
+
if (i) {
|
|
25
|
+
const u = i, d = u == null ? void 0 : u.find(({
|
|
26
|
+
type: m,
|
|
27
|
+
attributes: c
|
|
28
|
+
}) => m === "insight" && (c == null ? void 0 : c.status) === x.ACTIVE);
|
|
29
|
+
d && (!s || e.isOpenedQuestion(d.id) || e.openQuestion(d.id, d));
|
|
30
|
+
}
|
|
31
|
+
}), [e, s, t]), o ? /* @__PURE__ */ n(f, {
|
|
32
|
+
style: {
|
|
33
|
+
height: "100%"
|
|
34
|
+
},
|
|
35
|
+
children: /* @__PURE__ */ n(L, {
|
|
36
|
+
hideHeader: r,
|
|
37
|
+
gamification: e,
|
|
38
|
+
hideSponsor: !0
|
|
39
|
+
})
|
|
40
|
+
}) : null;
|
|
41
|
+
}, b = ({
|
|
42
|
+
sdk: e,
|
|
43
|
+
event: s,
|
|
44
|
+
persistent: r,
|
|
45
|
+
insightId: t,
|
|
46
|
+
hideHeader: a
|
|
47
|
+
}) => {
|
|
48
|
+
const {
|
|
49
|
+
deactivate: o
|
|
50
|
+
} = g(e);
|
|
51
|
+
if (l(() => {
|
|
52
|
+
s ? e.createEventSession(s) : o();
|
|
53
|
+
}, [s, o, e]), !p(e.featuresList.getStore()))
|
|
54
|
+
return null;
|
|
55
|
+
const i = e.getFeature(Q.GAMES);
|
|
56
|
+
return i ? /* @__PURE__ */ n(H, {
|
|
57
|
+
insightId: t,
|
|
58
|
+
persistent: r,
|
|
59
|
+
hideHeader: a,
|
|
60
|
+
gamification: i
|
|
61
|
+
}) : null;
|
|
62
|
+
}, O = ({ event: e, hideHeader: s, persistent: r }) => {
|
|
63
|
+
const t = y();
|
|
64
|
+
return t ? /* @__PURE__ */ n("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ n(I, { children: /* @__PURE__ */ n(b, { sdk: t, event: e, hideHeader: s, persistent: r }) }) }) : null;
|
|
65
|
+
};
|
|
66
|
+
export {
|
|
67
|
+
O as StreamLayerSDKInsight,
|
|
68
|
+
b as StreamLayerSDKInsightUI
|
|
69
|
+
};
|
package/lib/es/masters2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n, jsxs as L, Fragment as E } from "react/jsx-runtime";
|
|
2
|
-
import { u as C, F as r2, s as u, T as j, i as i2, p as a2, b as l2, N as d2, k as c2, M as p2, f as u2, S as C2, C as v2, g as h2, O as K, m as x, l as m2, h as g2, j as L2, n as X, o as f2, q as S2, r as y2, t as U, w as k2,
|
|
3
|
-
import { createContext as z2, useContext as s2, useRef as $, useState as b, useEffect as k, useTransition as q2, lazy as
|
|
4
|
-
import {
|
|
2
|
+
import { u as C, F as r2, s as u, T as j, i as i2, p as a2, b as l2, N as d2, k as c2, M as p2, f as u2, S as C2, C as v2, g as h2, O as K, m as x, l as m2, h as g2, j as L2, n as X, o as f2, q as S2, r as y2, t as U, w as k2, y as J, x as _, I as e2, a as P, z as N2, A as b2, B as z, D as A2, E as I2, G as $2, e as E2, H as T, J as q, K as V2, P as w2, R as R2, c as H2, U as Z, V as T2, W as x2, L as F, X as F2, Y as D2, Z as M2, _ as O2, v as D, $ as U2, a0 as _2, a1 as P2, a2 as B2, a3 as G2 } from "./provider.js";
|
|
3
|
+
import { createContext as z2, useContext as s2, useRef as $, useState as b, useEffect as k, useTransition as q2, lazy as Z2, useMemo as H, Suspense as Q2, forwardRef as Y2, useLayoutEffect as W2, useCallback as R, Component as j2 } from "react";
|
|
4
|
+
import { d as K2, S as I } from "./useStreamLayerApp2.js";
|
|
5
5
|
const M = /* @__PURE__ */ u("div")({
|
|
6
6
|
name: "LoadingContainer",
|
|
7
7
|
class: "l7wseip",
|
|
@@ -183,7 +183,7 @@ const M = /* @__PURE__ */ u("div")({
|
|
|
183
183
|
] }),
|
|
184
184
|
d === x.LEADERBOARD && /* @__PURE__ */ n(y2, { children: /* @__PURE__ */ n(i0, { scrollStore: t, scrollNode: o, gamification: e }) })
|
|
185
185
|
] });
|
|
186
|
-
}, c0 = () => _,
|
|
186
|
+
}, c0 = () => _, Q = /* @__PURE__ */ u(c0())({
|
|
187
187
|
name: "OpenedContainer",
|
|
188
188
|
class: "o1seszvt",
|
|
189
189
|
propsAsIs: !0
|
|
@@ -227,14 +227,14 @@ const M = /* @__PURE__ */ u("div")({
|
|
|
227
227
|
} = k2();
|
|
228
228
|
if (!t.current || !i && !r)
|
|
229
229
|
return null;
|
|
230
|
-
const c = i ? /* @__PURE__ */ n(
|
|
230
|
+
const c = i ? /* @__PURE__ */ n(Q, {
|
|
231
231
|
className: s,
|
|
232
232
|
hiding: p,
|
|
233
233
|
onAnimationEnd: d,
|
|
234
234
|
children: /* @__PURE__ */ n(t0, {
|
|
235
235
|
gamification: e
|
|
236
236
|
})
|
|
237
|
-
}) : r ? /* @__PURE__ */ n(
|
|
237
|
+
}) : r ? /* @__PURE__ */ n(Q, {
|
|
238
238
|
className: s,
|
|
239
239
|
hiding: p,
|
|
240
240
|
onAnimationEnd: d,
|
|
@@ -255,7 +255,7 @@ const M = /* @__PURE__ */ u("div")({
|
|
|
255
255
|
useContainer: !a,
|
|
256
256
|
children: c
|
|
257
257
|
});
|
|
258
|
-
}, v0 =
|
|
258
|
+
}, v0 = Z2(() => import("./gamification-feature2.js")), h0 = ({ sdk: e, feature: s, className: t, scrollStore: o, appNode: i, scrollNode: r, responsiveStore: a }) => {
|
|
259
259
|
const p = H(() => s && s.featureConfig.get().type === I.GAMES ? /* @__PURE__ */ n(X2, { className: t, sdk: e, feature: s, children: /* @__PURE__ */ n(
|
|
260
260
|
v0,
|
|
261
261
|
{
|
|
@@ -268,7 +268,7 @@ const M = /* @__PURE__ */ u("div")({
|
|
|
268
268
|
}
|
|
269
269
|
) }) : null, [e, s, t, a, o, r, i]);
|
|
270
270
|
return /* @__PURE__ */ n(
|
|
271
|
-
|
|
271
|
+
Q2,
|
|
272
272
|
{
|
|
273
273
|
fallback: /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
|
|
274
274
|
children: p
|
|
@@ -563,7 +563,7 @@ const M = /* @__PURE__ */ u("div")({
|
|
|
563
563
|
name: "NotificationRefreshing",
|
|
564
564
|
class: "n13rok4i",
|
|
565
565
|
propsAsIs: !1
|
|
566
|
-
}),
|
|
566
|
+
}), Z0 = () => $2, Q0 = /* @__PURE__ */ u(Z0())({
|
|
567
567
|
name: "Pill",
|
|
568
568
|
class: "pht79xf",
|
|
569
569
|
propsAsIs: !0
|
|
@@ -659,7 +659,7 @@ const M = /* @__PURE__ */ u("div")({
|
|
|
659
659
|
r.get().sdkInDesktopView ? h < 50 && s(null) : h > -50 && s(null);
|
|
660
660
|
}, [h, r, s]);
|
|
661
661
|
const f = r.get().sdkInDesktopView ? t : o;
|
|
662
|
-
return !e || !f.current ? null : w2.createPortal(/* @__PURE__ */ n(
|
|
662
|
+
return !e || !f.current ? null : w2.createPortal(/* @__PURE__ */ n(Q0, {
|
|
663
663
|
title: e.type === T.QUESTION_RESOLVED ? "Prediction result" : `New ${((d = R2[(p = e.data) == null ? void 0 : p.questionType]) == null ? void 0 : d.label) || "notification"}`,
|
|
664
664
|
onClick: () => {
|
|
665
665
|
var S;
|
|
@@ -805,10 +805,10 @@ const M = /* @__PURE__ */ u("div")({
|
|
|
805
805
|
${e}
|
|
806
806
|
--color-${s.toLowerCase().replaceAll("_", "-")}: ${t};
|
|
807
807
|
`, "");
|
|
808
|
-
`${s1}${w.REGULAR}${w.REGULAR}${w.COLOR}${w.SERIF}${w.WEIGHT_DEFAULT}${
|
|
808
|
+
`${s1}${w.REGULAR}${w.REGULAR}${w.COLOR}${w.SERIF}${w.WEIGHT_DEFAULT}${Z.down("xl")`
|
|
809
809
|
--header-offset: 56px;
|
|
810
810
|
--watch-live-header: 46px;
|
|
811
|
-
`}${
|
|
811
|
+
`}${Z.intermediate("xl", "lg")`
|
|
812
812
|
--header-offset: 76px;
|
|
813
813
|
`}`;
|
|
814
814
|
const t1 = "m1ojpy2l", n1 = ({ children: e, style: s }) => /* @__PURE__ */ n("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ n("div", { className: t1, style: s, children: e }) }), o1 = ({ sdk: e, className: s, scrollStore: t, appNode: o, scrollNode: i, responsiveStore: r }) => {
|
package/lib/es/provider.js
CHANGED
|
@@ -4,7 +4,7 @@ var fs = (c, p, m) => Ik(c, typeof p != "symbol" ? p + "" : p, m);
|
|
|
4
4
|
import * as _ from "react";
|
|
5
5
|
import Pa, { useCallback as lr, useSyncExternalStore as _k, useState as Rt, useEffect as Wt, useRef as Zn, useMemo as li, useLayoutEffect as lv, Component as sv, createElement as Pk, PureComponent as Nk, createContext as Mk } from "react";
|
|
6
6
|
import { jsx as x, jsxs as Q, Fragment as ci } from "react/jsx-runtime";
|
|
7
|
-
import { p as Ak, S as bp,
|
|
7
|
+
import { p as Ak, S as bp, d as $e, e as Nu, Q as Nc, I as uv, g as zk, f as Cp, u as Ok } from "./useStreamLayerApp2.js";
|
|
8
8
|
var wp = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
9
9
|
function cv(c) {
|
|
10
10
|
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
@@ -23226,7 +23226,7 @@ export {
|
|
|
23226
23226
|
y7 as u,
|
|
23227
23227
|
NP as v,
|
|
23228
23228
|
BS as w,
|
|
23229
|
-
|
|
23230
|
-
|
|
23229
|
+
I7 as x,
|
|
23230
|
+
DP as y,
|
|
23231
23231
|
QP as z
|
|
23232
23232
|
};
|