@streamlayer/react 1.14.5 → 1.14.6
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/index2.js +4 -8
- package/lib/cjs/masters2.js +3 -3
- package/lib/cjs/provider.js +12 -12
- package/lib/cjs/useStreamLayerApp2.js +1 -1
- package/lib/classic/cjs/index2.js +4 -8
- package/lib/classic/cjs/masters2.js +3 -3
- package/lib/classic/cjs/provider.js +12 -12
- package/lib/classic/cjs/useStreamLayerApp2.js +1 -1
- package/lib/classic/es/advertisement.js +2 -2
- package/lib/classic/es/index.js +1 -1
- package/lib/classic/es/index2.js +3141 -2636
- package/lib/classic/es/masters2.js +30 -30
- package/lib/classic/es/notification.js +41 -41
- package/lib/classic/es/provider.js +35 -38
- package/lib/classic/es/useStreamLayerApp2.js +14 -14
- package/lib/classic/style.css +1 -1
- package/lib/dist/cjs/masters.js +38 -42
- package/lib/dist/es/masters.js +12952 -12445
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +2 -2
- package/lib/es/index.js +1 -1
- package/lib/es/index2.js +3141 -2636
- package/lib/es/masters2.js +30 -30
- package/lib/es/notification.js +41 -41
- package/lib/es/provider.js +35 -38
- package/lib/es/useStreamLayerApp2.js +14 -14
- package/lib/style.css +1 -1
- package/package.json +14 -16
package/lib/es/masters2.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as s, jsxs as f, Fragment as y } from "react/jsx-runtime";
|
|
2
|
-
import { s as c,
|
|
3
|
-
import { useRef as I, useState as _, useEffect as h, createContext as y2, useContext as t2, lazy as w2, useMemo as R, Suspense as D2, forwardRef as
|
|
2
|
+
import { s as c, l as Y, a as u, A as S, g as V, F as a2, m as l2, n as d2, p as c2, o as p2, f as C2, H as u2, q as m2, r as f2, t as g2, v as j, w as P, j as w, k as X, I as h2, x as v2, y as E2, e as L2, N as k, B as M, C as S2, D as _2, E as T2, R as N2, G as N, J as z, K as J, L as e2, c as x, M as I2, O as b2, S as R2, Q as A2, T as k2 } from "./provider.js";
|
|
3
|
+
import { useRef as I, useState as _, useEffect as h, createContext as y2, useContext as t2, lazy as w2, useMemo as R, Suspense as D2, forwardRef as F2, useLayoutEffect as x2, useCallback as $, Component as O2 } from "react";
|
|
4
4
|
import { e as B2 } from "./index2.js";
|
|
5
|
-
import { Q as
|
|
6
|
-
const
|
|
5
|
+
import { Q as V2, S as A } from "./useStreamLayerApp2.js";
|
|
6
|
+
const $2 = /* @__PURE__ */ c("div")({
|
|
7
7
|
name: "SDKContainer",
|
|
8
8
|
class: "s8zgqze",
|
|
9
9
|
propsAsIs: !1
|
|
@@ -46,7 +46,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
46
46
|
if (!r)
|
|
47
47
|
return () => {
|
|
48
48
|
};
|
|
49
|
-
const d =
|
|
49
|
+
const d = V((l) => {
|
|
50
50
|
var C;
|
|
51
51
|
const p = l.target;
|
|
52
52
|
if (!p)
|
|
@@ -143,7 +143,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
143
143
|
return /* @__PURE__ */ f(Q2, {
|
|
144
144
|
children: [/* @__PURE__ */ s(l2, {
|
|
145
145
|
close: t.closeQuestion,
|
|
146
|
-
type: ((e = n.attributes) == null ? void 0 : e.type) ||
|
|
146
|
+
type: ((e = n.attributes) == null ? void 0 : e.type) || V2.UNSET
|
|
147
147
|
}), o === "question" && /* @__PURE__ */ s(W2, {
|
|
148
148
|
vote: t.submitAnswer,
|
|
149
149
|
close: t.closeQuestion,
|
|
@@ -237,7 +237,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
237
237
|
name: "Title",
|
|
238
238
|
class: "t1bqnx9c",
|
|
239
239
|
propsAsIs: !1
|
|
240
|
-
}), d0 = "hlc2pcy", c0 =
|
|
240
|
+
}), d0 = "hlc2pcy", c0 = F2(({
|
|
241
241
|
className: t
|
|
242
242
|
}, e) => /* @__PURE__ */ f(r0, {
|
|
243
243
|
className: w(t, d0),
|
|
@@ -337,7 +337,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
337
337
|
sdk: a
|
|
338
338
|
}) => {
|
|
339
339
|
var r, d, l, C, p, m, v;
|
|
340
|
-
const E = u(i.friends.getStore()), [D,
|
|
340
|
+
const E = u(i.friends.getStore()), [D, F] = _(void 0), L = R(() => {
|
|
341
341
|
var T, b;
|
|
342
342
|
const G = a.getInviter();
|
|
343
343
|
return G ? (b = (T = E.data) == null ? void 0 : T.find(({
|
|
@@ -346,7 +346,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
346
346
|
}, [E.data, a]);
|
|
347
347
|
return h(() => {
|
|
348
348
|
const T = t.$store.subscribe((b) => {
|
|
349
|
-
b &&
|
|
349
|
+
b && F(b.data);
|
|
350
350
|
});
|
|
351
351
|
return () => {
|
|
352
352
|
T();
|
|
@@ -399,15 +399,15 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
399
399
|
} = u(a, {
|
|
400
400
|
keys: ["screen"]
|
|
401
401
|
});
|
|
402
|
-
(r = l == null ? void 0 : l.titleCard) != null && r.media && (l.titleCard.media.sponsorLogo = S0),
|
|
402
|
+
(r = l == null ? void 0 : l.titleCard) != null && r.media && (l.titleCard.media.sponsorLogo = S0), x2(() => {
|
|
403
403
|
var L;
|
|
404
404
|
n(((L = d.current) == null ? void 0 : L.getBoundingClientRect().height) || 0);
|
|
405
405
|
}, [n]);
|
|
406
406
|
const {
|
|
407
407
|
loading: D,
|
|
408
|
-
throttled:
|
|
408
|
+
throttled: F
|
|
409
409
|
} = h2(v);
|
|
410
|
-
return C && m && l && o.current && !
|
|
410
|
+
return C && m && l && o.current && !F ? /* @__PURE__ */ s(j, {
|
|
411
411
|
container: o,
|
|
412
412
|
useContainer: !1,
|
|
413
413
|
children: /* @__PURE__ */ s(I0, {
|
|
@@ -466,12 +466,12 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
466
466
|
name: "NotificationRefreshing",
|
|
467
467
|
class: "n13rok4i",
|
|
468
468
|
propsAsIs: !1
|
|
469
|
-
}), D0 = () => E2,
|
|
469
|
+
}), D0 = () => E2, F0 = /* @__PURE__ */ c(D0())({
|
|
470
470
|
name: "Pill",
|
|
471
471
|
class: "pht79xf",
|
|
472
472
|
propsAsIs: !0
|
|
473
|
-
}),
|
|
474
|
-
const [e, n] = _(0), i = I(null), o =
|
|
473
|
+
}), x0 = (t) => {
|
|
474
|
+
const [e, n] = _(0), i = I(null), o = $((r) => {
|
|
475
475
|
i.current = r;
|
|
476
476
|
}, []);
|
|
477
477
|
h(() => {
|
|
@@ -479,7 +479,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
479
479
|
const d = (r = i.current) == null ? void 0 : r.getBoundingClientRect();
|
|
480
480
|
d && n(d.height);
|
|
481
481
|
}, [t]);
|
|
482
|
-
const a =
|
|
482
|
+
const a = $((r) => {
|
|
483
483
|
n(r);
|
|
484
484
|
}, []);
|
|
485
485
|
return [o, e, a];
|
|
@@ -492,7 +492,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
492
492
|
var o, a;
|
|
493
493
|
const {
|
|
494
494
|
sdk: r
|
|
495
|
-
} = U(), [d, l, C] =
|
|
495
|
+
} = U(), [d, l, C] = x0(e.id);
|
|
496
496
|
return e.type === k.QUESTION ? /* @__PURE__ */ f(y, {
|
|
497
497
|
children: [/* @__PURE__ */ s(y0, {
|
|
498
498
|
ref: d,
|
|
@@ -533,7 +533,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
533
533
|
appNode: n,
|
|
534
534
|
responsiveStore: i
|
|
535
535
|
}) : null;
|
|
536
|
-
}, B0 = "p1co32q0",
|
|
536
|
+
}, B0 = "p1co32q0", V0 = ({
|
|
537
537
|
pill: t,
|
|
538
538
|
setPill: e,
|
|
539
539
|
appNode: n,
|
|
@@ -557,7 +557,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
557
557
|
a.get().sdkInDesktopView ? m < 50 && e(null) : m > -50 && e(null);
|
|
558
558
|
}, [m, a, e]);
|
|
559
559
|
const v = a.get().sdkInDesktopView ? n : i;
|
|
560
|
-
return !t || !v.current ? null : _2.createPortal(/* @__PURE__ */ s(
|
|
560
|
+
return !t || !v.current ? null : _2.createPortal(/* @__PURE__ */ s(F0, {
|
|
561
561
|
title: t.type === k.QUESTION_RESOLVED ? "Prediction result" : `New ${((l = T2[(d = t.data) == null ? void 0 : d.questionType]) == null ? void 0 : l.label) || "notification"}`,
|
|
562
562
|
onClick: () => {
|
|
563
563
|
var E;
|
|
@@ -570,7 +570,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
570
570
|
},
|
|
571
571
|
className: w(p && B0, "sl-pill-button")
|
|
572
572
|
}), v.current);
|
|
573
|
-
},
|
|
573
|
+
}, $0 = ({
|
|
574
574
|
sdk: t,
|
|
575
575
|
headerNode: e,
|
|
576
576
|
scrollNode: n,
|
|
@@ -600,7 +600,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
600
600
|
sdk: t,
|
|
601
601
|
notification: p,
|
|
602
602
|
responsiveStore: i
|
|
603
|
-
}), l && /* @__PURE__ */ s(
|
|
603
|
+
}), l && /* @__PURE__ */ s(V0, {
|
|
604
604
|
pill: l,
|
|
605
605
|
setPill: C,
|
|
606
606
|
appNode: o,
|
|
@@ -638,9 +638,9 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
638
638
|
});
|
|
639
639
|
});
|
|
640
640
|
return h(() => {
|
|
641
|
-
const n =
|
|
641
|
+
const n = V(() => {
|
|
642
642
|
e.setKey("sdkInView", Z(t));
|
|
643
|
-
}, 200), i =
|
|
643
|
+
}, 200), i = V(() => {
|
|
644
644
|
const o = B();
|
|
645
645
|
e.setKey("screen", o), e.setKey("sdkInDesktopView", W(o.size));
|
|
646
646
|
}, 200);
|
|
@@ -731,7 +731,7 @@ const V2 = /* @__PURE__ */ c("div")({
|
|
|
731
731
|
--watch-live-header: 0px;
|
|
732
732
|
`}${z.intermediate("xl", "lg")`
|
|
733
733
|
--header-offset: 0px;
|
|
734
|
-
`}
|
|
734
|
+
`}`;
|
|
735
735
|
const G0 = "m1ojpy2l", M0 = ({ children: t, style: e }) => /* @__PURE__ */ s("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ s("div", { className: w("masters-theme", G0), style: e, children: t }) }), z0 = ({ sdk: t, className: e }) => {
|
|
736
736
|
const [, n] = I2(t);
|
|
737
737
|
return /* @__PURE__ */ s(i0, { className: e, feature: n, sdk: t });
|
|
@@ -764,11 +764,11 @@ const G0 = "m1ojpy2l", M0 = ({ children: t, style: e }) => /* @__PURE__ */ s("di
|
|
|
764
764
|
});
|
|
765
765
|
}, [t]), J(e, { enabled: !0, event: "click", listener: e2 }), h(() => {
|
|
766
766
|
import("./gamification-feature2.js");
|
|
767
|
-
}, []), /* @__PURE__ */ f(
|
|
768
|
-
/* @__PURE__ */ s(c0, { className: w(
|
|
767
|
+
}, []), /* @__PURE__ */ f($2, { ref: e, children: [
|
|
768
|
+
/* @__PURE__ */ s(c0, { className: w(x), ref: o }),
|
|
769
769
|
/* @__PURE__ */ f(H2, { className: "sl-hide-on-modal", ref: r, children: [
|
|
770
770
|
l && /* @__PURE__ */ s(
|
|
771
|
-
|
|
771
|
+
$0,
|
|
772
772
|
{
|
|
773
773
|
sdk: t,
|
|
774
774
|
scrollNode: r,
|
|
@@ -778,12 +778,12 @@ const G0 = "m1ojpy2l", M0 = ({ children: t, style: e }) => /* @__PURE__ */ s("di
|
|
|
778
778
|
responsiveStore: a
|
|
779
779
|
}
|
|
780
780
|
),
|
|
781
|
-
l && /* @__PURE__ */ s(z0, { className:
|
|
782
|
-
l && /* @__PURE__ */ s(K0, { responsiveStore: a, appNode: e, className:
|
|
781
|
+
l && /* @__PURE__ */ s(z0, { className: x, sdk: t }),
|
|
782
|
+
l && /* @__PURE__ */ s(K0, { responsiveStore: a, appNode: e, className: x, sdk: t })
|
|
783
783
|
] })
|
|
784
784
|
] });
|
|
785
785
|
}, Z0 = ({ sdk: t, betPack: e }) => {
|
|
786
|
-
const [n, i] = _(e), o = !!u(t.userId()), a = R(() => ({ sdk: t }), [t]), r =
|
|
786
|
+
const [n, i] = _(e), o = !!u(t.userId()), a = R(() => ({ sdk: t }), [t]), r = $(() => {
|
|
787
787
|
i(!1);
|
|
788
788
|
const d = t == null ? void 0 : t.getFeature(A.GAMES);
|
|
789
789
|
d == null || d.closeQuestion();
|
package/lib/es/notification.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { k as u, s,
|
|
2
|
-
import {
|
|
1
|
+
import { k as u, s, X as L, Z as O, _ as R, E as B, $ as P, V as Q, d as V, a as U, e as F, N as k, u as W, b as _, W as G, h as K } from "./provider.js";
|
|
2
|
+
import { j as m, Q as A, k as Y, S as X } from "./useStreamLayerApp2.js";
|
|
3
3
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
4
|
-
import { useState as y, useCallback as
|
|
4
|
+
import { useState as y, useCallback as Z, useMemo as E, useEffect as x } from "react";
|
|
5
5
|
const $ = /* @__PURE__ */ s("div")({
|
|
6
6
|
name: "Media",
|
|
7
7
|
class: "m1bcvojl",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), H = () => $, J = /* @__PURE__ */ s(H())({
|
|
10
10
|
name: "MediaImgBottom",
|
|
11
11
|
class: "m58gin0",
|
|
12
12
|
propsAsIs: !0
|
|
13
|
-
}), ee = () => $,
|
|
13
|
+
}), ee = () => $, N = /* @__PURE__ */ s(ee())({
|
|
14
14
|
name: "MediaImgSolid",
|
|
15
15
|
class: "m1atm8do",
|
|
16
16
|
propsAsIs: !0
|
|
@@ -31,12 +31,12 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
31
31
|
class: "v1kofb47",
|
|
32
32
|
propsAsIs: !1
|
|
33
33
|
}), re = {
|
|
34
|
-
[m.UNSET]:
|
|
35
|
-
[m.NONE]:
|
|
34
|
+
[m.UNSET]: N,
|
|
35
|
+
[m.NONE]: N,
|
|
36
36
|
[m.ROUNDED]: ne,
|
|
37
37
|
[m.CENTERED]: oe,
|
|
38
|
-
[m.TRANSPARENT]:
|
|
39
|
-
},
|
|
38
|
+
[m.TRANSPARENT]: J
|
|
39
|
+
}, b = ({
|
|
40
40
|
src: t,
|
|
41
41
|
imageMode: o = m.UNSET,
|
|
42
42
|
withVideo: i,
|
|
@@ -117,7 +117,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
117
117
|
{
|
|
118
118
|
questionTypeData: i,
|
|
119
119
|
questionType: o,
|
|
120
|
-
questionStatus:
|
|
120
|
+
questionStatus: Y.UNSET
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
123
|
t && /* @__PURE__ */ e(pe, { children: t })
|
|
@@ -132,8 +132,8 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
132
132
|
o === A.TWEET && n != null && n.tweetMedia && (h = n.tweetMedia.image), v === m.NONE && (h = "");
|
|
133
133
|
const f = i.useMediaFromContent && (a == null ? void 0 : a.image), T = o === A.TWEET && ((d = n == null ? void 0 : n.tweetMedia) == null ? void 0 : d.video) || o === A.FACTOID && (a == null ? void 0 : a.video);
|
|
134
134
|
return /* @__PURE__ */ e(de, { className: "SL_InApp", onClick: t, children: /* @__PURE__ */ c(le, { style: h ? {} : { paddingLeft: "1.5rem" }, children: [
|
|
135
|
-
h && !f && /* @__PURE__ */ e(
|
|
136
|
-
f && /* @__PURE__ */ e(
|
|
135
|
+
h && !f && /* @__PURE__ */ e(b, { src: h, imageMode: v, withVideo: !!T }),
|
|
136
|
+
f && /* @__PURE__ */ e(b, { src: f, fromInsight: !0, withVideo: !!T }),
|
|
137
137
|
o === A.TWEET ? /* @__PURE__ */ e(ge, { tweet: n }) : /* @__PURE__ */ e(fe, { questionTypeData: l, questionType: o, title: p }),
|
|
138
138
|
/* @__PURE__ */ e(me, { name: "inapp-button", children: r || "Open" }),
|
|
139
139
|
/* @__PURE__ */ e(Ie, { name: "chevronRight" })
|
|
@@ -142,15 +142,15 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
142
142
|
name: "NotificationContainer",
|
|
143
143
|
class: "n11jcrxe",
|
|
144
144
|
propsAsIs: !1
|
|
145
|
-
}),
|
|
145
|
+
}), C = /* @__PURE__ */ s("img")({
|
|
146
146
|
name: "Icon",
|
|
147
147
|
class: "i1vmpt6u",
|
|
148
148
|
propsAsIs: !1
|
|
149
|
-
}),
|
|
149
|
+
}), Ne = /* @__PURE__ */ s("div")({
|
|
150
150
|
name: "IconContainer",
|
|
151
151
|
class: "i180665s",
|
|
152
152
|
propsAsIs: !1
|
|
153
|
-
}),
|
|
153
|
+
}), be = () => u, Ce = /* @__PURE__ */ s(be())({
|
|
154
154
|
name: "TitleIcon",
|
|
155
155
|
class: "t16zzzei",
|
|
156
156
|
propsAsIs: !0
|
|
@@ -187,10 +187,10 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
187
187
|
t == null || t(), i && (i.instantOpen = !0);
|
|
188
188
|
},
|
|
189
189
|
children: [
|
|
190
|
-
/* @__PURE__ */ c(
|
|
191
|
-
/* @__PURE__ */ e(
|
|
190
|
+
/* @__PURE__ */ c(Ne, { children: [
|
|
191
|
+
/* @__PURE__ */ e(C, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
|
|
192
192
|
/* @__PURE__ */ e(
|
|
193
|
-
|
|
193
|
+
C,
|
|
194
194
|
{
|
|
195
195
|
className: "on-dark",
|
|
196
196
|
src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"
|
|
@@ -199,7 +199,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
199
199
|
] }),
|
|
200
200
|
/* @__PURE__ */ c(Se, { children: [
|
|
201
201
|
/* @__PURE__ */ c(Ee, { children: [
|
|
202
|
-
/* @__PURE__ */ e(
|
|
202
|
+
/* @__PURE__ */ e(Ce, { name: "icon-trophy-solid" }),
|
|
203
203
|
(a = i == null ? void 0 : i.titleCard) == null ? void 0 : a.title
|
|
204
204
|
] }),
|
|
205
205
|
/* @__PURE__ */ c(xe, { children: [
|
|
@@ -242,11 +242,11 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
242
242
|
name: "Body",
|
|
243
243
|
class: "barrbyu",
|
|
244
244
|
propsAsIs: !1
|
|
245
|
-
}),
|
|
245
|
+
}), Ve = /* @__PURE__ */ s("div")({
|
|
246
246
|
name: "Subtitle",
|
|
247
247
|
class: "sz7237i",
|
|
248
248
|
propsAsIs: !1
|
|
249
|
-
}),
|
|
249
|
+
}), Ue = ({
|
|
250
250
|
step: t,
|
|
251
251
|
children: o,
|
|
252
252
|
answer: i,
|
|
@@ -257,7 +257,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
257
257
|
var I, v;
|
|
258
258
|
d((v = (I = p == null ? void 0 : p[0]) == null ? void 0 : I.contentRect) == null ? void 0 : v.width);
|
|
259
259
|
});
|
|
260
|
-
})), r =
|
|
260
|
+
})), r = Z((p) => {
|
|
261
261
|
p || l.disconnect(), l.observe(p);
|
|
262
262
|
}, [l]);
|
|
263
263
|
return E(() => () => {
|
|
@@ -274,7 +274,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
274
274
|
children: /* @__PURE__ */ e(Qe, {
|
|
275
275
|
children: o
|
|
276
276
|
}, t)
|
|
277
|
-
}), /* @__PURE__ */ e(
|
|
277
|
+
}), /* @__PURE__ */ e(Ve, {
|
|
278
278
|
ref: r,
|
|
279
279
|
className: a,
|
|
280
280
|
children: /* @__PURE__ */ c("div", {
|
|
@@ -292,35 +292,35 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
292
292
|
name: "Line",
|
|
293
293
|
class: "l16t1zr7",
|
|
294
294
|
propsAsIs: !1
|
|
295
|
-
}), We = () => g,
|
|
295
|
+
}), We = () => g, _e = /* @__PURE__ */ s(We())({
|
|
296
296
|
name: "Line1",
|
|
297
297
|
class: "le78kvg",
|
|
298
298
|
propsAsIs: !0
|
|
299
|
-
}),
|
|
299
|
+
}), Ge = () => g, Ke = /* @__PURE__ */ s(Ge())({
|
|
300
300
|
name: "Line2",
|
|
301
301
|
class: "l1o7966d",
|
|
302
302
|
propsAsIs: !0
|
|
303
|
-
}),
|
|
303
|
+
}), Ye = () => g, Xe = /* @__PURE__ */ s(Ye())({
|
|
304
304
|
name: "Line3",
|
|
305
305
|
class: "lu9lyxq",
|
|
306
306
|
propsAsIs: !0
|
|
307
|
-
}),
|
|
308
|
-
children: [/* @__PURE__ */ e(
|
|
307
|
+
}), Ze = () => /* @__PURE__ */ c(Fe, {
|
|
308
|
+
children: [/* @__PURE__ */ e(_e, {
|
|
309
309
|
children: /* @__PURE__ */ e("div", {})
|
|
310
|
-
}), /* @__PURE__ */ e(
|
|
310
|
+
}), /* @__PURE__ */ e(Ke, {
|
|
311
311
|
children: /* @__PURE__ */ e("div", {})
|
|
312
|
-
}), /* @__PURE__ */ e(
|
|
312
|
+
}), /* @__PURE__ */ e(Xe, {
|
|
313
313
|
children: /* @__PURE__ */ e("div", {})
|
|
314
314
|
})]
|
|
315
|
-
}),
|
|
315
|
+
}), He = /* @__PURE__ */ s("div")({
|
|
316
316
|
name: "Container",
|
|
317
317
|
class: "c10jy6zf",
|
|
318
318
|
propsAsIs: !1
|
|
319
|
-
}),
|
|
319
|
+
}), Je = () => u, es = /* @__PURE__ */ s(Je())({
|
|
320
320
|
name: "CheckIcon",
|
|
321
321
|
class: "c1c7scay",
|
|
322
322
|
propsAsIs: !0
|
|
323
|
-
}), ss = () => /* @__PURE__ */ c(
|
|
323
|
+
}), ss = () => /* @__PURE__ */ c(He, {
|
|
324
324
|
children: [/* @__PURE__ */ e(es, {
|
|
325
325
|
name: "icon-check"
|
|
326
326
|
}), " Prediction results are in!"]
|
|
@@ -390,7 +390,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
390
390
|
points: t
|
|
391
391
|
}) => /* @__PURE__ */ c(ps, {
|
|
392
392
|
children: [/* @__PURE__ */ c(ms, {
|
|
393
|
-
children: ["You won ", /* @__PURE__ */ e(
|
|
393
|
+
children: ["You won ", /* @__PURE__ */ e(V, {
|
|
394
394
|
delay: 0.5,
|
|
395
395
|
prefix: "+",
|
|
396
396
|
suffix: " points",
|
|
@@ -428,8 +428,8 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
428
428
|
return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(ss, {}) }) });
|
|
429
429
|
let p = "pending";
|
|
430
430
|
return (r === 3 || r === 4) && (p = n ? "correct" : "incorrect"), /* @__PURE__ */ e(w, { onClick: () => o == null ? void 0 : o(), children: /* @__PURE__ */ c(q, { children: [
|
|
431
|
-
r !== 1 && /* @__PURE__ */ e(
|
|
432
|
-
/* @__PURE__ */ c(
|
|
431
|
+
r !== 1 && /* @__PURE__ */ e(Ze, {}, r),
|
|
432
|
+
/* @__PURE__ */ c(Ue, { state: p, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
|
|
433
433
|
r === 2 && /* @__PURE__ */ e(is, { title: l || "unknown" }),
|
|
434
434
|
r === 3 && n && /* @__PURE__ */ e(ls, {}),
|
|
435
435
|
r === 3 && !n && /* @__PURE__ */ e(ds, { title: d || "unknown" }),
|
|
@@ -457,7 +457,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
457
457
|
class: "n1i4h28u",
|
|
458
458
|
propsAsIs: !1
|
|
459
459
|
}), ys = (t) => /* @__PURE__ */ e($s, { children: /* @__PURE__ */ e(As, { ...t }) }), fs = ({ sdk: t }) => {
|
|
460
|
-
const [o] = y(t.getNotificationsStore()), i =
|
|
460
|
+
const [o] = y(t.getNotificationsStore()), i = U(o), a = t.getFeature(X.GAMES), n = E(() => t.getActiveNotification(), [t, i]);
|
|
461
461
|
return x(() => {
|
|
462
462
|
n && F.emit("notification", {
|
|
463
463
|
action: "rendered",
|
|
@@ -474,11 +474,11 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
474
474
|
...n.data.question
|
|
475
475
|
}
|
|
476
476
|
) : null : n && n.type === k.ONBOARDING ? n.data.onboarding ? /* @__PURE__ */ e(je, { open: a == null ? void 0 : a.openFeature, close: n.close, ...n.data.onboarding }) : null : n && /* @__PURE__ */ e(Te, { ...n.data, action: n.action });
|
|
477
|
-
},
|
|
478
|
-
const o = W(), i =
|
|
479
|
-
return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(
|
|
477
|
+
}, bs = ({ theme: t }) => {
|
|
478
|
+
const o = W(), i = _(), a = G();
|
|
479
|
+
return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(K, { customTheme: t ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ e(fs, { sdk: o }) }) }) : null;
|
|
480
480
|
};
|
|
481
481
|
export {
|
|
482
|
-
|
|
482
|
+
bs as StreamLayerSDKNotification,
|
|
483
483
|
fs as StreamLayerSDKNotificationUI
|
|
484
484
|
};
|
package/lib/es/provider.js
CHANGED
|
@@ -4,7 +4,7 @@ var K = (e, t, n) => m4(e, typeof t != "symbol" ? t + "" : t, n);
|
|
|
4
4
|
import { jsx as c, jsxs as b, Fragment as oe } from "react/jsx-runtime";
|
|
5
5
|
import * as m from "react";
|
|
6
6
|
import He, { useCallback as ie, useSyncExternalStore as C4, useState as F, useEffect as P, useRef as Q, createContext as b3, useContext as ct, useLayoutEffect as ui, useMemo as we, Component as L3, createElement as v4, PureComponent as g4, lazy as y4, Suspense as w4, forwardRef as E3 } from "react";
|
|
7
|
-
import { p as b4, S as Te,
|
|
7
|
+
import { p as b4, S as Te, a as Y1, h as fa, Q as $, i as L4, j as nt, k as Ot, A as E4, I as k3, l as k4, m as Y2, n as I4 } from "./useStreamLayerApp2.js";
|
|
8
8
|
var X2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
9
9
|
function I3(e) {
|
|
10
10
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -10937,62 +10937,59 @@ const DC = {
|
|
|
10937
10937
|
] });
|
|
10938
10938
|
};
|
|
10939
10939
|
export {
|
|
10940
|
-
|
|
10940
|
+
jC as $,
|
|
10941
10941
|
xe as A,
|
|
10942
|
-
|
|
10943
|
-
|
|
10942
|
+
o3 as B,
|
|
10943
|
+
am as C,
|
|
10944
10944
|
lr as D,
|
|
10945
|
-
|
|
10945
|
+
dr as E,
|
|
10946
10946
|
Ht as F,
|
|
10947
|
-
|
|
10947
|
+
Me as G,
|
|
10948
10948
|
Xu as H,
|
|
10949
10949
|
lm as I,
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10950
|
+
Aa as J,
|
|
10951
|
+
Z6 as K,
|
|
10952
|
+
U6 as L,
|
|
10953
|
+
p6 as M,
|
|
10954
10954
|
Pt as N,
|
|
10955
|
-
|
|
10955
|
+
QC as O,
|
|
10956
10956
|
qC as P,
|
|
10957
|
-
|
|
10957
|
+
mt as Q,
|
|
10958
10958
|
_6 as R,
|
|
10959
10959
|
HC as S,
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10960
|
+
ci as T,
|
|
10961
|
+
D6 as U,
|
|
10962
|
+
x7 as V,
|
|
10963
|
+
PC as W,
|
|
10964
|
+
Td as X,
|
|
10965
10965
|
ca as Y,
|
|
10966
|
-
|
|
10967
|
-
|
|
10966
|
+
Md as Z,
|
|
10967
|
+
uf as _,
|
|
10968
10968
|
B as a,
|
|
10969
|
-
|
|
10970
|
-
uf as a1,
|
|
10971
|
-
jC as a2,
|
|
10972
|
-
WC as a3,
|
|
10969
|
+
WC as a0,
|
|
10973
10970
|
OC as b,
|
|
10974
10971
|
en as c,
|
|
10975
10972
|
oa as d,
|
|
10976
10973
|
cr as e,
|
|
10977
|
-
|
|
10978
|
-
|
|
10974
|
+
Ju as f,
|
|
10975
|
+
d0 as g,
|
|
10979
10976
|
RC as h,
|
|
10980
|
-
|
|
10981
|
-
|
|
10977
|
+
Jt as i,
|
|
10978
|
+
Re as j,
|
|
10982
10979
|
H as k,
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10980
|
+
A3 as l,
|
|
10981
|
+
N3 as m,
|
|
10982
|
+
wc as n,
|
|
10983
|
+
Hd as o,
|
|
10987
10984
|
yd as p,
|
|
10988
|
-
|
|
10989
|
-
|
|
10985
|
+
Lf as q,
|
|
10986
|
+
P3 as r,
|
|
10990
10987
|
d as s,
|
|
10991
|
-
|
|
10988
|
+
V3 as t,
|
|
10992
10989
|
NC as u,
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10990
|
+
Bs as v,
|
|
10991
|
+
n2 as w,
|
|
10992
|
+
Km as x,
|
|
10993
|
+
CC as y,
|
|
10997
10994
|
Bd as z
|
|
10998
10995
|
};
|
|
@@ -18435,7 +18435,7 @@ const OE = ({
|
|
|
18435
18435
|
f = !0;
|
|
18436
18436
|
};
|
|
18437
18437
|
const _ = bE(e, n, a, {
|
|
18438
|
-
version: "1.14.
|
|
18438
|
+
version: "1.14.6",
|
|
18439
18439
|
onDeepLinkHandled: s,
|
|
18440
18440
|
videoPlayerController: o,
|
|
18441
18441
|
onContentActivate: r,
|
|
@@ -18460,24 +18460,24 @@ const OE = ({
|
|
|
18460
18460
|
};
|
|
18461
18461
|
export {
|
|
18462
18462
|
_s as A,
|
|
18463
|
-
|
|
18463
|
+
$ as C,
|
|
18464
18464
|
ja as I,
|
|
18465
18465
|
Am as N,
|
|
18466
18466
|
Dm as P,
|
|
18467
18467
|
M as Q,
|
|
18468
18468
|
W as S,
|
|
18469
|
-
|
|
18470
|
-
|
|
18471
|
-
|
|
18472
|
-
|
|
18473
|
-
|
|
18474
|
-
|
|
18475
|
-
|
|
18476
|
-
|
|
18477
|
-
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
|
|
18469
|
+
U as a,
|
|
18470
|
+
Qa as b,
|
|
18471
|
+
wm as c,
|
|
18472
|
+
Rm as d,
|
|
18473
|
+
vm as e,
|
|
18474
|
+
ie as f,
|
|
18475
|
+
Pm as g,
|
|
18476
|
+
Oo as h,
|
|
18477
|
+
Cm as i,
|
|
18478
|
+
_t as j,
|
|
18479
|
+
Z as k,
|
|
18480
|
+
rr as l,
|
|
18481
18481
|
Wt as m,
|
|
18482
18482
|
OE as n,
|
|
18483
18483
|
hl as p,
|