@streamlayer/react 1.24.4 → 1.24.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/Question.js +1 -1
- package/lib/cjs/advertisement.js +26 -26
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -1
- package/lib/cjs/{index-ByUNFvMk.js → index-CfSdnrfA.js} +1 -1
- package/lib/cjs/index10.js +1 -1
- package/lib/cjs/index11.js +1 -1
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +4 -1
- package/lib/cjs/index14.js +1 -4
- package/lib/cjs/index15.js +1 -1
- package/lib/cjs/index16.js +2 -2
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index4.js +3 -3
- package/lib/cjs/index6.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index9.js +2 -2
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters2.js +3 -3
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +1 -1
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +13 -13
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +26 -26
- package/lib/classic/cjs/bet-pack.js +3 -3
- package/lib/classic/cjs/feature.js +1 -1
- package/lib/classic/cjs/{index-ByUNFvMk.js → index-CfSdnrfA.js} +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -1
- package/lib/classic/cjs/index13.js +1 -1
- package/lib/classic/cjs/index2.js +2 -2
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index7.js +2 -2
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +13 -13
- package/lib/classic/es/Question.js +313 -198
- package/lib/classic/es/advertisement.js +1988 -1955
- package/lib/classic/es/bet-pack.js +12 -13
- package/lib/classic/es/feature.js +188 -37
- package/lib/{es/index-ByUNFvMk.js → classic/es/index-CfSdnrfA.js} +1 -1
- package/lib/classic/es/index10.js +309 -2580
- package/lib/classic/es/index11.js +2580 -305
- package/lib/classic/es/index12.js +12 -12
- package/lib/classic/es/index13.js +2 -2
- package/lib/classic/es/index2.js +129 -121
- package/lib/classic/es/index5.js +0 -1
- package/lib/classic/es/index7.js +2 -2
- package/lib/classic/es/index8.js +1 -1
- package/lib/classic/es/index9.js +1 -1
- package/lib/classic/es/insight.js +1 -1
- package/lib/classic/es/notification2.js +137 -138
- package/lib/classic/es/pause-ad.js +124 -149
- package/lib/classic/es/points.js +3 -4
- package/lib/classic/es/polymarket.js +1 -1
- package/lib/classic/es/useStreamLayerApp2.js +2932 -2876
- package/lib/classic/source.css +1 -1
- package/lib/dist/cjs/{index-ByUNFvMk.js → index-CfSdnrfA.js} +1 -1
- package/lib/dist/cjs/masters.js +31 -31
- package/lib/dist/es/{index-ByUNFvMk.js → index-CfSdnrfA.js} +1 -1
- package/lib/dist/es/masters.js +7958 -7773
- package/lib/dist/index.d.ts +2 -0
- package/lib/es/Question.js +66 -65
- package/lib/es/advertisement.js +1988 -1955
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/feature.js +188 -37
- package/lib/{classic/es/index-ByUNFvMk.js → es/index-CfSdnrfA.js} +1 -1
- package/lib/es/index10.js +1 -1
- package/lib/es/index11.js +12 -12
- package/lib/es/index12.js +366 -2579
- package/lib/es/index13.js +789 -234
- package/lib/es/index14.js +293 -792
- package/lib/es/index15.js +2580 -305
- package/lib/es/index16.js +41 -42
- package/lib/es/index2.js +279 -271
- package/lib/es/index4.js +15 -16
- package/lib/es/index6.js +0 -1
- package/lib/es/index7.js +1 -1
- package/lib/es/index9.js +2 -2
- package/lib/es/insight.js +1 -1
- package/lib/es/masters2.js +194 -183
- package/lib/es/notification.js +22 -23
- package/lib/es/pause-ad.js +124 -149
- package/lib/es/points.js +20 -21
- package/lib/es/polymarket.js +1 -1
- package/lib/es/storage.js +1 -1
- package/lib/es/useStreamLayerApp2.js +2932 -2876
- package/lib/source.css +1 -1
- package/lib/style.css +1 -1
- package/package.json +72 -53
- package/lib/cjs/sl-types.js +0 -1
- package/lib/classic/cjs/sl-types.js +0 -1
- package/lib/classic/es/sl-types.js +0 -156
- package/lib/es/sl-types.js +0 -156
package/lib/dist/index.d.ts
CHANGED
|
@@ -341,8 +341,10 @@ declare module "../../sdk-web-interfaces/src/store/api" {
|
|
|
341
341
|
*/
|
|
342
342
|
export class ApiStore<StoreValue, StoreInstance extends FetcherStore<StoreValue, any> = FetcherStore<StoreValue, any>> extends AbstractStore<StoreInstance> {
|
|
343
343
|
private readonly atomStore;
|
|
344
|
+
private pendingGetValue;
|
|
344
345
|
constructor(store: StoreInstance, name: string, atomPicker?: (val: FetcherValue<StoreValue, unknown>, prevVal?: string) => string | undefined);
|
|
345
346
|
getAtomStore: () => WritableAtom<string | undefined>;
|
|
347
|
+
isEnabled: () => boolean;
|
|
346
348
|
getValue: () => Promise<StoreValue | undefined>;
|
|
347
349
|
getValues: () => FetcherValue<StoreValue, any>;
|
|
348
350
|
setValue: (value?: StoreInstance["value"]) => void;
|
package/lib/es/Question.js
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { s as l, u as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { O as C, d as
|
|
5
|
-
import { Q as V, Z as
|
|
6
|
-
import { y as
|
|
7
|
-
import { Q as A, A as
|
|
8
|
-
const j =
|
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { s as l, u as p } from "./feature.js";
|
|
3
|
+
import { createContext as E, useContext as N, useRef as k, useEffect as q, useState as $ } from "react";
|
|
4
|
+
import { O as C, d as D, f as L, a as R } from "./index12.js";
|
|
5
|
+
import { Q as V, Z as F } from "./index13.js";
|
|
6
|
+
import { y as P } from "./utils.js";
|
|
7
|
+
import { Q as A, A as Q } from "./useStreamLayerApp2.js";
|
|
8
|
+
const j = E({
|
|
9
9
|
sdk: null,
|
|
10
10
|
topNavigation: !1
|
|
11
|
-
}),
|
|
11
|
+
}), H = () => N(j), O = /* @__PURE__ */ l("div")({
|
|
12
12
|
name: "QuestionAdvertisementContainer",
|
|
13
13
|
class: "qwludgs",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}),
|
|
15
|
+
}), Z = /* @__PURE__ */ l("div")({
|
|
16
16
|
name: "QuestionAdvertisementText",
|
|
17
17
|
class: "qvce6pv",
|
|
18
18
|
propsAsIs: !1
|
|
19
|
-
}),
|
|
19
|
+
}), _ = /* @__PURE__ */ l("div")({
|
|
20
20
|
name: "QuestionAdvertisementImage",
|
|
21
21
|
class: "qsid7hx",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
-
}),
|
|
23
|
+
}), B = ({
|
|
24
24
|
sponsorLogo: e,
|
|
25
25
|
id: a,
|
|
26
|
-
|
|
27
|
-
setAdShowed: t
|
|
26
|
+
setAdShowed: n
|
|
28
27
|
}) => {
|
|
29
|
-
const
|
|
30
|
-
return
|
|
31
|
-
|
|
28
|
+
const s = k();
|
|
29
|
+
return q(() => (s.current = setTimeout(() => {
|
|
30
|
+
n(!0);
|
|
32
31
|
}, 5e3), () => {
|
|
33
|
-
clearTimeout(
|
|
34
|
-
}), [
|
|
35
|
-
children: [/* @__PURE__ */
|
|
32
|
+
clearTimeout(s.current);
|
|
33
|
+
}), [n, a]), /* @__PURE__ */ m(O, {
|
|
34
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
36
35
|
children: "PRESENTED BY"
|
|
37
|
-
}), /* @__PURE__ */
|
|
38
|
-
children: /* @__PURE__ */
|
|
36
|
+
}), /* @__PURE__ */ t(_, {
|
|
37
|
+
children: /* @__PURE__ */ t("img", {
|
|
39
38
|
src: e,
|
|
40
39
|
alt: "ad-sponsor-logo"
|
|
41
40
|
})
|
|
42
41
|
})]
|
|
43
42
|
});
|
|
44
|
-
},
|
|
43
|
+
}, h = /* @__PURE__ */ l("div")({
|
|
45
44
|
name: "QuestionContainer",
|
|
46
45
|
class: "q14ckf9e",
|
|
47
46
|
propsAsIs: !1
|
|
@@ -51,78 +50,80 @@ const j = S({
|
|
|
51
50
|
webos: n
|
|
52
51
|
}) => {
|
|
53
52
|
const {
|
|
54
|
-
sdk:
|
|
55
|
-
} =
|
|
56
|
-
return e?.attributes?.attributes.case === "insight" ? /* @__PURE__ */
|
|
53
|
+
sdk: s
|
|
54
|
+
} = H();
|
|
55
|
+
return e?.attributes?.attributes.case === "insight" ? /* @__PURE__ */ t(L, {
|
|
57
56
|
...e.attributes.attributes.value,
|
|
58
57
|
muted: a,
|
|
59
|
-
controlVideo:
|
|
60
|
-
webos: n
|
|
61
|
-
|
|
58
|
+
controlVideo: s?.controlVideoPlayer,
|
|
59
|
+
webos: n,
|
|
60
|
+
questionId: e.id,
|
|
61
|
+
fireEvent: e.fireEvent,
|
|
62
|
+
isEventFired: e.isEventFired
|
|
63
|
+
}) : e?.attributes?.attributes.case === "tweet" ? /* @__PURE__ */ t(R, {
|
|
62
64
|
...e.attributes.attributes.value,
|
|
63
65
|
muted: a,
|
|
64
|
-
controlVideo:
|
|
66
|
+
controlVideo: s?.controlVideoPlayer
|
|
65
67
|
}) : null;
|
|
66
68
|
}, z = ({
|
|
67
69
|
extendedQuestion: e,
|
|
68
70
|
vote: a,
|
|
69
71
|
close: n,
|
|
70
|
-
webos:
|
|
72
|
+
webos: s
|
|
71
73
|
}) => {
|
|
72
74
|
const {
|
|
73
|
-
loading:
|
|
74
|
-
data:
|
|
75
|
+
loading: u,
|
|
76
|
+
data: r
|
|
75
77
|
} = e;
|
|
76
|
-
return
|
|
77
|
-
webos:
|
|
78
|
+
return r ? /* @__PURE__ */ t(V, {
|
|
79
|
+
webos: s,
|
|
78
80
|
vote: a,
|
|
79
81
|
close: n,
|
|
80
|
-
openedQuestion:
|
|
81
|
-
isLoading: !!
|
|
82
|
-
}) : /* @__PURE__ */
|
|
82
|
+
openedQuestion: r,
|
|
83
|
+
isLoading: !!u
|
|
84
|
+
}) : /* @__PURE__ */ t(F, {});
|
|
83
85
|
}, oe = ({
|
|
84
86
|
gamification: e,
|
|
85
87
|
sdk: a,
|
|
86
88
|
muted: n,
|
|
87
|
-
skipAutoClose:
|
|
88
|
-
hideSponsor:
|
|
89
|
-
className:
|
|
90
|
-
hideHeader:
|
|
91
|
-
webos:
|
|
89
|
+
skipAutoClose: s,
|
|
90
|
+
hideSponsor: u,
|
|
91
|
+
className: r,
|
|
92
|
+
hideHeader: w,
|
|
93
|
+
webos: c
|
|
92
94
|
}) => {
|
|
93
|
-
const i =
|
|
94
|
-
containerId:
|
|
95
|
-
landscapeUrl:
|
|
96
|
-
portraitUrl:
|
|
95
|
+
const i = p(e.openedQuestion.$store), o = p(e.openedQuestion.$extendedStore), [T, I] = $(!1), U = p(a.options), f = i?.attributes?.type === A.FACTOID, b = i?.attributes?.backgroundImage, d = o.data?.backgroundImage, S = f ? b?.landscapeUrl ?? d?.landscapeUrl : d?.landscapeUrl, x = f ? b?.portraitUrl ?? d?.portraitUrl : d?.portraitUrl, v = P({
|
|
96
|
+
containerId: U.containerId,
|
|
97
|
+
landscapeUrl: S,
|
|
98
|
+
portraitUrl: x
|
|
97
99
|
});
|
|
98
|
-
if (!i)
|
|
100
|
+
if (!i || !o.data)
|
|
99
101
|
return null;
|
|
100
|
-
const
|
|
101
|
-
return o.data && o.data.adUnit ===
|
|
102
|
-
className:
|
|
103
|
-
children: [
|
|
102
|
+
const g = i.type, y = o.data?.options?.options.case === "factoid" ? o.data.options.options.value.closeTimer : void 0;
|
|
103
|
+
return o.data && (o.data.adUnit === Q.STANDART || o.data.promotion?.adUnit === Q.STANDART) && !T ? /* @__PURE__ */ m(h, {
|
|
104
|
+
className: r,
|
|
105
|
+
children: [v, /* @__PURE__ */ t(B, {
|
|
104
106
|
id: o.data.id,
|
|
105
|
-
|
|
106
|
-
setAdShowed: T,
|
|
107
|
+
setAdShowed: I,
|
|
107
108
|
sponsorLogo: o.data.promotion?.sponsor?.logo || o.data.sponsorship?.logo || ""
|
|
108
109
|
})]
|
|
109
|
-
}) : /* @__PURE__ */
|
|
110
|
-
className:
|
|
111
|
-
children: [
|
|
112
|
-
closeTimer:
|
|
110
|
+
}) : /* @__PURE__ */ m(h, {
|
|
111
|
+
className: r,
|
|
112
|
+
children: [v, !w && /* @__PURE__ */ t(C, {
|
|
113
|
+
closeTimer: s ? void 0 : y,
|
|
113
114
|
close: e.closeQuestion,
|
|
114
115
|
type: i.attributes?.type || A.UNSET,
|
|
115
|
-
webos:
|
|
116
|
-
}),
|
|
117
|
-
webos:
|
|
116
|
+
webos: c
|
|
117
|
+
}), g === "question" && /* @__PURE__ */ t(z, {
|
|
118
|
+
webos: c,
|
|
118
119
|
vote: e.submitAnswer,
|
|
119
120
|
close: e.closeQuestion,
|
|
120
121
|
extendedQuestion: o
|
|
121
|
-
}),
|
|
122
|
+
}), g !== "question" && /* @__PURE__ */ t(Y, {
|
|
122
123
|
muted: n,
|
|
123
124
|
openedQuestion: i,
|
|
124
|
-
webos:
|
|
125
|
-
}), !
|
|
125
|
+
webos: c
|
|
126
|
+
}), !u && /* @__PURE__ */ t(D, {
|
|
126
127
|
sponsorLogo: o.data?.promotion?.sponsor?.logo || o.data?.sponsorship?.logo
|
|
127
128
|
})]
|
|
128
129
|
});
|
|
@@ -130,5 +131,5 @@ const j = S({
|
|
|
130
131
|
export {
|
|
131
132
|
oe as _,
|
|
132
133
|
j as e,
|
|
133
|
-
|
|
134
|
+
H as p
|
|
134
135
|
};
|