@streamlayer/react 1.24.7 → 1.24.8-pre.11da316
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/advertisement.d.ts +5 -0
- package/lib/cjs/advertisement.js +1486 -1436
- package/lib/cjs/auth.js +33 -33
- package/lib/cjs/bet-pack.js +232 -195
- package/lib/cjs/index.js +1765 -1707
- package/lib/cjs/insight.js +631 -569
- package/lib/cjs/masters.js +1346 -1307
- package/lib/cjs/notification.js +237 -206
- package/lib/cjs/pause-ad.js +62 -62
- package/lib/cjs/points.js +128 -97
- package/lib/cjs/polymarket.js +98 -97
- package/lib/cjs/style.css +1 -1
- package/lib/cjs/useStreamLayerApp.js +95 -101
- package/lib/dist/cjs/index.js +1346 -1307
- package/lib/dist/es/index.js +1346 -1307
- package/lib/es/Question.js +75 -72
- package/lib/es/advertisement.js +9139 -8159
- package/lib/es/analytics.js +35 -31
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/{hooks-n9ax4LRT.js → hooks-42q2i9Iw.js} +25 -23
- package/lib/es/{index-D8wyDNJD.js → index-sWgEw6jy.js} +1 -1
- package/lib/es/index.js +2 -2
- package/lib/es/index10.js +6 -6
- package/lib/es/index12.js +116 -128
- package/lib/es/index13.js +100 -96
- package/lib/es/index14.js +15 -15
- package/lib/es/index16.js +382 -383
- package/lib/es/index2.js +55 -56
- package/lib/es/index4.js +3 -3
- package/lib/es/index5.js +275 -3
- package/lib/es/index6.js +4 -7
- package/lib/es/index7.js +5 -284
- package/lib/es/index8.js +8 -237
- package/lib/es/index9.js +237 -8
- package/lib/es/insight.js +3 -3
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +29 -29
- package/lib/es/notification.js +28 -28
- package/lib/es/pause-ad.js +21 -21
- package/lib/es/points.js +9 -9
- package/lib/es/polymarket.js +40 -40
- package/lib/es/storage.js +18 -18
- package/lib/es/style.css +1 -1
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +5098 -4862
- package/lib/es/utils.js +86 -41
- package/lib/source.css +1 -1
- package/package.json +14 -14
package/lib/es/Question.js
CHANGED
|
@@ -1,135 +1,138 @@
|
|
|
1
1
|
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { s as
|
|
3
|
-
import { createContext as E, useContext as N, useRef as
|
|
4
|
-
import { O as
|
|
2
|
+
import { s as u, u as c } from "./feature.js";
|
|
3
|
+
import { createContext as E, useContext as N, useRef as $, useEffect as q, useState as C } from "react";
|
|
4
|
+
import { O as D, d as L, f as O, a as R } from "./index12.js";
|
|
5
5
|
import { Q as V, Z as F } from "./index13.js";
|
|
6
|
-
import {
|
|
7
|
-
import { Q
|
|
6
|
+
import { k as P } from "./utils.js";
|
|
7
|
+
import { Q, A as T } from "./useStreamLayerApp2.js";
|
|
8
8
|
const j = E({
|
|
9
9
|
sdk: null,
|
|
10
10
|
topNavigation: !1
|
|
11
|
-
}),
|
|
11
|
+
}), M = () => N(j), Z = /* @__PURE__ */ u("div")({
|
|
12
12
|
name: "QuestionAdvertisementContainer",
|
|
13
13
|
class: "qwludgs",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
15
|
+
}), B = /* @__PURE__ */ u("div")({
|
|
16
16
|
name: "QuestionAdvertisementText",
|
|
17
17
|
class: "qvce6pv",
|
|
18
18
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
19
|
+
}), H = /* @__PURE__ */ u("div")({
|
|
20
20
|
name: "QuestionAdvertisementImage",
|
|
21
21
|
class: "qsid7hx",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}),
|
|
23
|
+
}), Y = ({
|
|
24
24
|
sponsorLogo: e,
|
|
25
|
-
id:
|
|
26
|
-
setAdShowed:
|
|
25
|
+
id: s,
|
|
26
|
+
setAdShowed: a
|
|
27
27
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
return q(() => (
|
|
30
|
-
|
|
28
|
+
const i = $();
|
|
29
|
+
return q(() => (i.current = setTimeout(() => {
|
|
30
|
+
a(!0);
|
|
31
31
|
}, 5e3), () => {
|
|
32
|
-
clearTimeout(
|
|
33
|
-
}), [
|
|
34
|
-
children: [/* @__PURE__ */ t(
|
|
32
|
+
clearTimeout(i.current);
|
|
33
|
+
}), [a, s]), /* @__PURE__ */ m(Z, {
|
|
34
|
+
children: [/* @__PURE__ */ t(B, {
|
|
35
35
|
children: "PRESENTED BY"
|
|
36
|
-
}), /* @__PURE__ */ t(
|
|
36
|
+
}), /* @__PURE__ */ t(H, {
|
|
37
37
|
children: /* @__PURE__ */ t("img", {
|
|
38
38
|
src: e,
|
|
39
39
|
alt: "ad-sponsor-logo"
|
|
40
40
|
})
|
|
41
41
|
})]
|
|
42
42
|
});
|
|
43
|
-
}, h = /* @__PURE__ */
|
|
43
|
+
}, h = /* @__PURE__ */ u("div")({
|
|
44
44
|
name: "QuestionContainer",
|
|
45
45
|
class: "q14ckf9e",
|
|
46
46
|
propsAsIs: !1
|
|
47
|
-
}),
|
|
47
|
+
}), _ = ({
|
|
48
48
|
openedQuestion: e,
|
|
49
|
-
muted:
|
|
50
|
-
webos:
|
|
49
|
+
muted: s,
|
|
50
|
+
webos: a,
|
|
51
|
+
factoidMode: i
|
|
51
52
|
}) => {
|
|
52
53
|
const {
|
|
53
|
-
sdk:
|
|
54
|
-
} =
|
|
55
|
-
return e?.attributes?.attributes.case === "insight" ? /* @__PURE__ */ t(
|
|
54
|
+
sdk: n
|
|
55
|
+
} = M();
|
|
56
|
+
return e?.attributes?.attributes.case === "insight" ? /* @__PURE__ */ t(O, {
|
|
56
57
|
...e.attributes.attributes.value,
|
|
57
|
-
muted:
|
|
58
|
-
controlVideo:
|
|
59
|
-
webos:
|
|
58
|
+
muted: s,
|
|
59
|
+
controlVideo: n?.controlVideoPlayer,
|
|
60
|
+
webos: a,
|
|
60
61
|
questionId: e.id,
|
|
61
62
|
fireEvent: e.fireEvent,
|
|
62
|
-
isEventFired: e.isEventFired
|
|
63
|
+
isEventFired: e.isEventFired,
|
|
64
|
+
mode: i
|
|
63
65
|
}) : e?.attributes?.attributes.case === "tweet" ? /* @__PURE__ */ t(R, {
|
|
64
66
|
...e.attributes.attributes.value,
|
|
65
|
-
muted:
|
|
66
|
-
controlVideo:
|
|
67
|
+
muted: s,
|
|
68
|
+
controlVideo: n?.controlVideoPlayer
|
|
67
69
|
}) : null;
|
|
68
70
|
}, z = ({
|
|
69
71
|
extendedQuestion: e,
|
|
70
|
-
vote:
|
|
71
|
-
close:
|
|
72
|
-
webos:
|
|
72
|
+
vote: s,
|
|
73
|
+
close: a,
|
|
74
|
+
webos: i
|
|
73
75
|
}) => {
|
|
74
76
|
const {
|
|
75
|
-
loading:
|
|
76
|
-
data:
|
|
77
|
+
loading: n,
|
|
78
|
+
data: d
|
|
77
79
|
} = e;
|
|
78
|
-
return
|
|
79
|
-
webos:
|
|
80
|
-
vote:
|
|
81
|
-
close:
|
|
82
|
-
openedQuestion:
|
|
83
|
-
isLoading: !!
|
|
80
|
+
return d ? /* @__PURE__ */ t(V, {
|
|
81
|
+
webos: i,
|
|
82
|
+
vote: s,
|
|
83
|
+
close: a,
|
|
84
|
+
openedQuestion: d,
|
|
85
|
+
isLoading: !!n
|
|
84
86
|
}) : /* @__PURE__ */ t(F, {});
|
|
85
|
-
},
|
|
87
|
+
}, te = ({
|
|
86
88
|
gamification: e,
|
|
87
|
-
sdk:
|
|
88
|
-
muted:
|
|
89
|
-
skipAutoClose:
|
|
90
|
-
hideSponsor:
|
|
91
|
-
className:
|
|
89
|
+
sdk: s,
|
|
90
|
+
muted: a,
|
|
91
|
+
skipAutoClose: i,
|
|
92
|
+
hideSponsor: n,
|
|
93
|
+
className: d,
|
|
92
94
|
hideHeader: w,
|
|
93
|
-
webos:
|
|
95
|
+
webos: p
|
|
94
96
|
}) => {
|
|
95
|
-
const
|
|
96
|
-
containerId:
|
|
97
|
-
landscapeUrl:
|
|
98
|
-
portraitUrl:
|
|
97
|
+
const r = c(e.openedQuestion.$store), o = c(e.openedQuestion.$extendedStore), [I, U] = C(!1), S = c(s.options), f = r?.attributes?.type === Q.FACTOID, b = r?.attributes?.backgroundImage, l = o.data?.backgroundImage, x = f ? b?.landscapeUrl ?? l?.landscapeUrl : l?.landscapeUrl, k = f ? b?.portraitUrl ?? l?.portraitUrl : l?.portraitUrl, v = P({
|
|
98
|
+
containerId: S.containerId,
|
|
99
|
+
landscapeUrl: x,
|
|
100
|
+
portraitUrl: k
|
|
99
101
|
});
|
|
100
|
-
if (!
|
|
102
|
+
if (!r || !o.data)
|
|
101
103
|
return null;
|
|
102
|
-
const g =
|
|
103
|
-
return o.data && (o.data.adUnit ===
|
|
104
|
-
className:
|
|
105
|
-
children: [v, /* @__PURE__ */ t(
|
|
104
|
+
const g = r.type, A = o.data?.options?.options.case === "factoid" ? o.data.options.options.value : void 0, y = A?.closeTimer;
|
|
105
|
+
return o.data && (o.data.adUnit === T.STANDART || o.data.promotion?.adUnit === T.STANDART) && !I ? /* @__PURE__ */ m(h, {
|
|
106
|
+
className: d,
|
|
107
|
+
children: [v, /* @__PURE__ */ t(Y, {
|
|
106
108
|
id: o.data.id,
|
|
107
|
-
setAdShowed:
|
|
109
|
+
setAdShowed: U,
|
|
108
110
|
sponsorLogo: o.data.promotion?.sponsor?.logo || o.data.sponsorship?.logo || ""
|
|
109
111
|
})]
|
|
110
112
|
}) : /* @__PURE__ */ m(h, {
|
|
111
|
-
className:
|
|
112
|
-
children: [v, !w && /* @__PURE__ */ t(
|
|
113
|
-
closeTimer:
|
|
113
|
+
className: d,
|
|
114
|
+
children: [v, !w && /* @__PURE__ */ t(D, {
|
|
115
|
+
closeTimer: i ? void 0 : y,
|
|
114
116
|
close: e.closeQuestion,
|
|
115
|
-
type:
|
|
116
|
-
webos:
|
|
117
|
+
type: r.attributes?.type || Q.UNSET,
|
|
118
|
+
webos: p
|
|
117
119
|
}), g === "question" && /* @__PURE__ */ t(z, {
|
|
118
|
-
webos:
|
|
120
|
+
webos: p,
|
|
119
121
|
vote: e.submitAnswer,
|
|
120
122
|
close: e.closeQuestion,
|
|
121
123
|
extendedQuestion: o
|
|
122
|
-
}), g !== "question" && /* @__PURE__ */ t(
|
|
123
|
-
muted:
|
|
124
|
-
openedQuestion:
|
|
125
|
-
webos:
|
|
126
|
-
|
|
124
|
+
}), g !== "question" && /* @__PURE__ */ t(_, {
|
|
125
|
+
muted: a,
|
|
126
|
+
openedQuestion: r,
|
|
127
|
+
webos: p,
|
|
128
|
+
factoidMode: A?.mode
|
|
129
|
+
}), !n && /* @__PURE__ */ t(L, {
|
|
127
130
|
sponsorLogo: o.data?.promotion?.sponsor?.logo || o.data?.sponsorship?.logo
|
|
128
131
|
})]
|
|
129
132
|
});
|
|
130
133
|
};
|
|
131
134
|
export {
|
|
132
|
-
oe as _,
|
|
133
135
|
j as e,
|
|
134
|
-
|
|
136
|
+
M as p,
|
|
137
|
+
te as t
|
|
135
138
|
};
|