@streamlayer/react 0.40.1 → 0.40.2
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/useStreamLayerApp.d.ts +9 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index2.js +9 -9
- package/lib/cjs/masters2.js +28 -28
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +41 -41
- package/lib/dist/es/gamification-feature.js +336 -326
- package/lib/dist/es/masters.js +5821 -5777
- package/lib/dist/index.d.ts +18 -3
- package/lib/es/gamification-feature.js +316 -306
- package/lib/es/index2.js +48 -35
- package/lib/es/masters2.js +2154 -2147
- package/lib/es/useStreamLayerApp.js +18 -9
- package/package.json +6 -6
package/lib/es/index2.js
CHANGED
|
@@ -1,28 +1,41 @@
|
|
|
1
1
|
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
2
|
+
import { createContext as d, useMemo as O, useEffect as a } from "react";
|
|
3
3
|
import { useStreamLayerApp as c } from "./useStreamLayerApp.js";
|
|
4
|
-
var
|
|
5
|
-
const
|
|
4
|
+
var B = /* @__PURE__ */ ((R) => (R[R.UNSET = 0] = "UNSET", R[R.CONNECTED = 1] = "CONNECTED", R[R.READY = 2] = "READY", R))(B || {});
|
|
5
|
+
const Y = d({
|
|
6
6
|
status: 0,
|
|
7
7
|
sdk: null
|
|
8
8
|
}), P = ({
|
|
9
9
|
sdkKey: R,
|
|
10
10
|
plugins: E,
|
|
11
|
-
children:
|
|
11
|
+
children: t,
|
|
12
12
|
production: n = !0,
|
|
13
|
-
autoEnable:
|
|
14
|
-
onDeepLinkHandled:
|
|
15
|
-
videoPlayerController:
|
|
13
|
+
autoEnable: S = !0,
|
|
14
|
+
onDeepLinkHandled: A,
|
|
15
|
+
videoPlayerController: _
|
|
16
16
|
}) => {
|
|
17
|
-
const e = c(
|
|
17
|
+
const e = c({
|
|
18
|
+
sdkKey: R,
|
|
19
|
+
plugins: E,
|
|
20
|
+
production: n,
|
|
21
|
+
autoEnable: S,
|
|
22
|
+
onDeepLinkHandled: A,
|
|
23
|
+
videoPlayerController: _
|
|
24
|
+
}), G = O(() => e ? {
|
|
18
25
|
sdk: e,
|
|
19
26
|
status: 2
|
|
20
27
|
/* READY */
|
|
21
|
-
}
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
}, [e]),
|
|
25
|
-
|
|
28
|
+
} : { status: 1, sdk: null }, [e]);
|
|
29
|
+
return a(() => () => {
|
|
30
|
+
A && (e == null || e.removeDeepLinkHandler(A)), _ && (e == null || e.removeVideoPlayerController(_));
|
|
31
|
+
}, [e]), a(() => {
|
|
32
|
+
console.log("StreamLayerProvider mounted with props:", {
|
|
33
|
+
sdkKey: !!R,
|
|
34
|
+
onDeepLinkHandled: !!A,
|
|
35
|
+
videoPlayerController: !!_
|
|
36
|
+
});
|
|
37
|
+
}, [R, A, _]), /* @__PURE__ */ T(Y.Provider, { value: G, children: t });
|
|
38
|
+
}, f = {
|
|
26
39
|
BG_TRANSPARENT: "rgba(0,0,0, .8)",
|
|
27
40
|
BG_TRANSPARENT_VOTE_CONTAINER: "rgba(10, 14, 19, 0.8)",
|
|
28
41
|
BG_TRANSPARENT_ITEM: "rgba(0, 0, 0, 0.7)",
|
|
@@ -51,7 +64,7 @@ const B = G({
|
|
|
51
64
|
GREY_PRIMARY: "#909395",
|
|
52
65
|
DIVIDER_COLOR_SECONDARY: "#53565a",
|
|
53
66
|
GREEN_PRIMARY_BTN: "#009B77"
|
|
54
|
-
},
|
|
67
|
+
}, D = {
|
|
55
68
|
PRIMARY_GREEN1: "#107D57",
|
|
56
69
|
PRIMARY_GREEN2: "#006747",
|
|
57
70
|
PRIMARY_GREEN3: "#1C4932",
|
|
@@ -73,7 +86,7 @@ const B = G({
|
|
|
73
86
|
NEUTRALS_GRAY8: "#53565A",
|
|
74
87
|
NEUTRALS_GRAY9: "#25282A",
|
|
75
88
|
NEUTRALS_BLACK: "#000000"
|
|
76
|
-
},
|
|
89
|
+
}, s = Object.assign({}, f, D), r = {
|
|
77
90
|
REGULAR: "'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",
|
|
78
91
|
SERIF: "'Tiempos', 'Tiempos Text', Times New Roman, serif",
|
|
79
92
|
COLOR: "#fff",
|
|
@@ -85,53 +98,53 @@ const B = G({
|
|
|
85
98
|
lg: 992,
|
|
86
99
|
xl: 1215,
|
|
87
100
|
xxl: 1440
|
|
88
|
-
},
|
|
101
|
+
}, m = {
|
|
89
102
|
landscape: "landscape",
|
|
90
103
|
portrait: "portrait"
|
|
91
|
-
},
|
|
92
|
-
const
|
|
104
|
+
}, p = Object.keys(s).reduce((R, E) => {
|
|
105
|
+
const t = s[E];
|
|
93
106
|
return `
|
|
94
107
|
${R}
|
|
95
|
-
--color-${E.toLowerCase().replaceAll("_", "-")}: ${
|
|
108
|
+
--color-${E.toLowerCase().replaceAll("_", "-")}: ${t};
|
|
96
109
|
`;
|
|
97
|
-
}, ""),
|
|
110
|
+
}, ""), o = (R) => (E) => `
|
|
98
111
|
@media only screen and (${R}) {
|
|
99
112
|
${E}
|
|
100
113
|
}
|
|
101
|
-
`,
|
|
114
|
+
`, C = (R, E) => (t) => `
|
|
102
115
|
@media only screen and (${R}) and (${E}) {
|
|
103
|
-
${
|
|
116
|
+
${t}
|
|
104
117
|
}
|
|
105
118
|
`, i = {
|
|
106
119
|
up: (R) => {
|
|
107
120
|
const E = N[R];
|
|
108
|
-
return
|
|
121
|
+
return o(`min-width: ${E}px`);
|
|
109
122
|
},
|
|
110
123
|
down: (R) => {
|
|
111
124
|
const E = N[R] - 1;
|
|
112
|
-
return
|
|
125
|
+
return o(`max-width: ${E}px`);
|
|
113
126
|
},
|
|
114
127
|
intermediate: (R, E) => {
|
|
115
|
-
const
|
|
116
|
-
return
|
|
128
|
+
const t = N[R] - 1, n = N[E];
|
|
129
|
+
return C(`max-width: ${t}px`, `min-width: ${n}px`);
|
|
117
130
|
},
|
|
118
131
|
orientation: (R) => {
|
|
119
|
-
const E =
|
|
120
|
-
return
|
|
132
|
+
const E = m[R];
|
|
133
|
+
return o(`orientation: ${E}`);
|
|
121
134
|
}
|
|
122
135
|
};
|
|
123
|
-
`${
|
|
136
|
+
`${p}${r.REGULAR}${r.REGULAR}${r.COLOR}${r.SERIF}${r.WEIGHT_DEFAULT}${i.down("xl")`
|
|
124
137
|
--header-offset: 56px;
|
|
125
138
|
`}${i.intermediate("xl", "lg")`
|
|
126
139
|
--header-offset: 76px;
|
|
127
140
|
`}`;
|
|
128
|
-
const
|
|
141
|
+
const u = "StreamLayerCSSReset", F = "ttkj0ah", U = ({ children: R, style: E }) => /* @__PURE__ */ T("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ T("div", { className: F, style: E, children: R }) });
|
|
129
142
|
export {
|
|
130
|
-
|
|
143
|
+
s as E,
|
|
131
144
|
N as O,
|
|
132
145
|
P as S,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
146
|
+
Y as a,
|
|
147
|
+
B as b,
|
|
148
|
+
u as m,
|
|
149
|
+
U as p
|
|
137
150
|
};
|