@streamlayer/react 0.39.1 → 0.40.0
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/provider.d.ts +2 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/index2.js +7 -7
- package/lib/cjs/masters2.js +41 -41
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +65 -65
- package/lib/dist/es/gamification-feature.js +573 -554
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +12167 -12049
- package/lib/dist/index.d.ts +30 -4
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +581 -562
- package/lib/es/index2.js +44 -41
- package/lib/es/masters2.js +7678 -7588
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +13 -12
package/lib/es/index2.js
CHANGED
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { useStreamLayerApp as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
1
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as G, useMemo as d, useEffect as O } from "react";
|
|
3
|
+
import { useStreamLayerApp as c } from "./useStreamLayerApp.js";
|
|
4
|
+
var f = /* @__PURE__ */ ((R) => (R[R.UNSET = 0] = "UNSET", R[R.CONNECTED = 1] = "CONNECTED", R[R.READY = 2] = "READY", R))(f || {});
|
|
5
|
+
const B = G({
|
|
6
6
|
status: 0,
|
|
7
7
|
sdk: null
|
|
8
|
-
}),
|
|
8
|
+
}), P = ({
|
|
9
9
|
sdkKey: R,
|
|
10
10
|
plugins: E,
|
|
11
|
-
children:
|
|
12
|
-
production:
|
|
11
|
+
children: A,
|
|
12
|
+
production: n = !0,
|
|
13
13
|
autoEnable: s = !0,
|
|
14
|
-
onDeepLinkHandled:
|
|
14
|
+
onDeepLinkHandled: _,
|
|
15
|
+
videoPlayerController: r
|
|
15
16
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
sdk:
|
|
17
|
+
const e = c(R, E, n, s), S = d(() => e ? (r && e.addVideoPlayerController(r), _ && e.addDeepLinkHandler(_), {
|
|
18
|
+
sdk: e,
|
|
18
19
|
status: 2
|
|
19
20
|
/* READY */
|
|
20
|
-
}) : { status: 1, sdk: null }, [
|
|
21
|
-
return
|
|
22
|
-
|
|
21
|
+
}) : { status: 1, sdk: null }, [e]);
|
|
22
|
+
return O(() => () => {
|
|
23
|
+
_ && (e == null || e.removeDeepLinkHandler(_)), r && (e == null || e.removeVideoPlayerController(r));
|
|
24
|
+
}, [e]), /* @__PURE__ */ T(B.Provider, { value: S, children: A });
|
|
25
|
+
}, D = {
|
|
23
26
|
BG_TRANSPARENT: "rgba(0,0,0, .8)",
|
|
24
27
|
BG_TRANSPARENT_VOTE_CONTAINER: "rgba(10, 14, 19, 0.8)",
|
|
25
28
|
BG_TRANSPARENT_ITEM: "rgba(0, 0, 0, 0.7)",
|
|
@@ -48,7 +51,7 @@ const D = S({
|
|
|
48
51
|
GREY_PRIMARY: "#909395",
|
|
49
52
|
DIVIDER_COLOR_SECONDARY: "#53565a",
|
|
50
53
|
GREEN_PRIMARY_BTN: "#009B77"
|
|
51
|
-
},
|
|
54
|
+
}, Y = {
|
|
52
55
|
PRIMARY_GREEN1: "#107D57",
|
|
53
56
|
PRIMARY_GREEN2: "#006747",
|
|
54
57
|
PRIMARY_GREEN3: "#1C4932",
|
|
@@ -70,65 +73,65 @@ const D = S({
|
|
|
70
73
|
NEUTRALS_GRAY8: "#53565A",
|
|
71
74
|
NEUTRALS_GRAY9: "#25282A",
|
|
72
75
|
NEUTRALS_BLACK: "#000000"
|
|
73
|
-
}, o = Object.assign({},
|
|
76
|
+
}, o = Object.assign({}, D, Y), t = {
|
|
74
77
|
REGULAR: "'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",
|
|
75
78
|
SERIF: "'Tiempos', 'Tiempos Text', Times New Roman, serif",
|
|
76
79
|
COLOR: "#fff",
|
|
77
80
|
WEIGHT_DEFAULT: "500"
|
|
78
|
-
},
|
|
81
|
+
}, N = {
|
|
79
82
|
xs: 324,
|
|
80
83
|
sm: 576,
|
|
81
84
|
md: 768,
|
|
82
85
|
lg: 992,
|
|
83
86
|
xl: 1215,
|
|
84
87
|
xxl: 1440
|
|
85
|
-
},
|
|
88
|
+
}, C = {
|
|
86
89
|
landscape: "landscape",
|
|
87
90
|
portrait: "portrait"
|
|
88
91
|
}, l = Object.keys(o).reduce((R, E) => {
|
|
89
|
-
const
|
|
92
|
+
const A = o[E];
|
|
90
93
|
return `
|
|
91
94
|
${R}
|
|
92
|
-
--color-${E.toLowerCase().replaceAll("_", "-")}: ${
|
|
95
|
+
--color-${E.toLowerCase().replaceAll("_", "-")}: ${A};
|
|
93
96
|
`;
|
|
94
|
-
}, ""),
|
|
97
|
+
}, ""), a = (R) => (E) => `
|
|
95
98
|
@media only screen and (${R}) {
|
|
96
99
|
${E}
|
|
97
100
|
}
|
|
98
|
-
`,
|
|
101
|
+
`, p = (R, E) => (A) => `
|
|
99
102
|
@media only screen and (${R}) and (${E}) {
|
|
100
|
-
${
|
|
103
|
+
${A}
|
|
101
104
|
}
|
|
102
|
-
`,
|
|
105
|
+
`, i = {
|
|
103
106
|
up: (R) => {
|
|
104
|
-
const E =
|
|
105
|
-
return
|
|
107
|
+
const E = N[R];
|
|
108
|
+
return a(`min-width: ${E}px`);
|
|
106
109
|
},
|
|
107
110
|
down: (R) => {
|
|
108
|
-
const E =
|
|
109
|
-
return
|
|
111
|
+
const E = N[R] - 1;
|
|
112
|
+
return a(`max-width: ${E}px`);
|
|
110
113
|
},
|
|
111
114
|
intermediate: (R, E) => {
|
|
112
|
-
const
|
|
113
|
-
return
|
|
115
|
+
const A = N[R] - 1, n = N[E];
|
|
116
|
+
return p(`max-width: ${A}px`, `min-width: ${n}px`);
|
|
114
117
|
},
|
|
115
118
|
orientation: (R) => {
|
|
116
|
-
const E =
|
|
117
|
-
return
|
|
119
|
+
const E = C[R];
|
|
120
|
+
return a(`orientation: ${E}`);
|
|
118
121
|
}
|
|
119
122
|
};
|
|
120
|
-
`${l}${t.REGULAR}${t.REGULAR}${t.COLOR}${t.SERIF}${t.WEIGHT_DEFAULT}${
|
|
123
|
+
`${l}${t.REGULAR}${t.REGULAR}${t.COLOR}${t.SERIF}${t.WEIGHT_DEFAULT}${i.down("xl")`
|
|
121
124
|
--header-offset: 56px;
|
|
122
|
-
`}${
|
|
125
|
+
`}${i.intermediate("xl", "lg")`
|
|
123
126
|
--header-offset: 76px;
|
|
124
127
|
`}`;
|
|
125
|
-
const
|
|
128
|
+
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 }) });
|
|
126
129
|
export {
|
|
127
130
|
o as E,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
N as O,
|
|
132
|
+
P as S,
|
|
133
|
+
B as a,
|
|
134
|
+
f as b,
|
|
135
|
+
U as m,
|
|
136
|
+
u as p
|
|
134
137
|
};
|