@streamlayer/react 1.24.7 → 1.24.8-pre.84ab1b9
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 +4 -0
- package/lib/app/pause-ad.d.ts +17 -0
- package/lib/cjs/advertisement.js +1491 -1441
- package/lib/cjs/auth.js +80 -80
- package/lib/cjs/bet-pack.js +279 -242
- package/lib/cjs/index.js +1828 -1770
- package/lib/cjs/insight.js +682 -620
- package/lib/cjs/masters.js +1401 -1362
- package/lib/cjs/notification.js +292 -261
- package/lib/cjs/pause-ad.js +592 -362
- package/lib/cjs/points.js +179 -148
- package/lib/cjs/polymarket.js +153 -152
- package/lib/cjs/style.css +1 -1
- package/lib/cjs/useStreamLayerApp.js +142 -148
- package/lib/dist/cjs/index.js +1401 -1362
- package/lib/dist/es/index.js +1401 -1362
- package/lib/es/Question.js +75 -72
- package/lib/es/advertisement.js +9236 -8213
- 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-DHRXtbBc.js} +35 -33
- package/lib/es/{index-D8wyDNJD.js → index-BW1YFKTb.js} +35 -35
- 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 +362 -153
- 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 +5169 -4933
- package/lib/es/utils.js +86 -41
- package/lib/source.css +1 -1
- package/package.json +14 -14
package/lib/es/utils.js
CHANGED
|
@@ -1,22 +1,63 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
const
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useMemo as l, useEffect as u } from "react";
|
|
3
|
+
const f = `
|
|
4
4
|
.sl-hide-on-modal {
|
|
5
5
|
height: 0 !important;
|
|
6
6
|
opacity: 0 !important;
|
|
7
7
|
overflow: hidden !important;
|
|
8
8
|
transition: none;
|
|
9
9
|
}
|
|
10
|
-
`,
|
|
11
|
-
containerId:
|
|
12
|
-
url:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
`, g = ({
|
|
11
|
+
containerId: r = "SlLayoutContainer",
|
|
12
|
+
url: i,
|
|
13
|
+
isOverlay: s = !1,
|
|
14
|
+
hiding: e = !1
|
|
15
|
+
}) => {
|
|
16
|
+
const t = r || "SlLayoutContainer", a = e ? "fade-sl-bg-out 750ms cubic-bezier(0.66, 0, 0.34, 1) forwards" : "fade-sl-bg-in 750ms cubic-bezier(0.66, 0, 0.34, 1) forwards";
|
|
17
|
+
return s ? `
|
|
18
|
+
.PromoOverlayContainer {
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.PromoOverlayContainer::before {
|
|
23
|
+
content: '';
|
|
24
|
+
display: block;
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 0;
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
background-color: #1a1a1a;
|
|
30
|
+
background-size: cover !important;
|
|
31
|
+
background-position: center !important;
|
|
32
|
+
background-repeat: no-repeat !important;
|
|
33
|
+
background-image: ${i} !important;
|
|
34
|
+
z-index: 0;
|
|
35
|
+
|
|
36
|
+
opacity: ${e ? 1 : 0};
|
|
37
|
+
animation: ${a};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.PromoOverlayContainer > div {
|
|
41
|
+
position: relative;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes fade-sl-bg-in {
|
|
46
|
+
from { opacity: 0; }
|
|
47
|
+
to { opacity: 1; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes fade-sl-bg-out {
|
|
51
|
+
from { opacity: 1; }
|
|
52
|
+
to { opacity: 0; }
|
|
53
|
+
}
|
|
54
|
+
` : `
|
|
55
|
+
#${t},
|
|
56
|
+
#${t} .StreamLayerSDK>.StreamLayerSDKTheme > * {
|
|
16
57
|
--color-sdk-container-bg: transparent !important;
|
|
17
58
|
}
|
|
18
59
|
|
|
19
|
-
#${
|
|
60
|
+
#${t}::before {
|
|
20
61
|
content: '';
|
|
21
62
|
display: block;
|
|
22
63
|
position: absolute;
|
|
@@ -27,50 +68,54 @@ const u = `
|
|
|
27
68
|
background-size: cover !important;
|
|
28
69
|
background-position: center !important;
|
|
29
70
|
background-repeat: no-repeat !important;
|
|
30
|
-
background-image: ${
|
|
71
|
+
background-image: ${i} !important;
|
|
31
72
|
z-index: 0;
|
|
32
73
|
|
|
33
|
-
opacity: 0;
|
|
34
|
-
animation:
|
|
74
|
+
opacity: ${e ? 1 : 0};
|
|
75
|
+
animation: ${a};
|
|
35
76
|
}
|
|
36
77
|
|
|
37
|
-
#${
|
|
78
|
+
#${t} > div {
|
|
38
79
|
position: relative;
|
|
39
80
|
z-index: 1;
|
|
40
81
|
}
|
|
41
82
|
|
|
42
83
|
@keyframes fade-sl-bg-in {
|
|
43
|
-
from {
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
to {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
84
|
+
from { opacity: 0; }
|
|
85
|
+
to { opacity: 1; }
|
|
49
86
|
}
|
|
50
87
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
88
|
+
@keyframes fade-sl-bg-out {
|
|
89
|
+
from { opacity: 1; }
|
|
90
|
+
to { opacity: 0; }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
${f}
|
|
94
|
+
`;
|
|
95
|
+
}, k = ({
|
|
96
|
+
containerId: r,
|
|
97
|
+
landscapeUrl: i,
|
|
98
|
+
portraitUrl: s,
|
|
99
|
+
isOverlay: e = !1,
|
|
100
|
+
hiding: t = !1
|
|
56
101
|
}) => {
|
|
57
|
-
const [a,
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
}, [
|
|
61
|
-
return
|
|
62
|
-
if (
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
102
|
+
const [a, c] = m(!1), n = l(() => {
|
|
103
|
+
const o = window.innerWidth, d = window.innerHeight;
|
|
104
|
+
return c(!1), o > d ? i : s;
|
|
105
|
+
}, [i, s]);
|
|
106
|
+
return u(() => {
|
|
107
|
+
if (n) {
|
|
108
|
+
const o = new Image();
|
|
109
|
+
o.onload = function() {
|
|
110
|
+
c(!0);
|
|
111
|
+
}, o.src = n;
|
|
67
112
|
}
|
|
68
|
-
}, [
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
-
}, [
|
|
113
|
+
}, [n]), l(() => {
|
|
114
|
+
const o = n ? `url("${n}")` : void 0;
|
|
115
|
+
return o && a ? /* @__PURE__ */ p("style", { children: g({ containerId: r, url: o, hiding: t, isOverlay: e }) }) : (console.log("bg empty", { url: o, loaded: a }), null);
|
|
116
|
+
}, [r, n, a, t, e]);
|
|
72
117
|
};
|
|
73
118
|
export {
|
|
74
|
-
|
|
75
|
-
|
|
119
|
+
f,
|
|
120
|
+
k
|
|
76
121
|
};
|