@streamlayer/react 0.40.1 → 0.40.3
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/masters.js +1 -1
- package/lib/cjs/masters2.js +47 -47
- package/lib/cjs/useSdkFeature.js +1 -1
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/index.js +199 -1
- package/lib/dist/es/index.js +43362 -7
- package/lib/dist/index.d.ts +119 -27
- package/lib/dist/style.css +1 -1
- package/lib/es/gamification-feature.js +10 -1355
- package/lib/es/index2.js +48 -35
- package/lib/es/masters.js +8 -6
- package/lib/es/masters2.js +12872 -11449
- package/lib/es/useSdkFeature.js +145 -80
- package/lib/es/useStreamLayerApp.js +18 -9
- package/lib/style.css +1 -1
- package/package.json +13 -13
- package/lib/dist/cjs/gamification-feature.js +0 -1
- package/lib/dist/cjs/masters.js +0 -200
- package/lib/dist/es/gamification-feature.js +0 -1626
- package/lib/dist/es/masters.js +0 -43234
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
|
};
|
package/lib/es/masters.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "./index2.js";
|
|
3
|
-
import { M as
|
|
3
|
+
import { M as v, a as x } from "./masters2.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "./useStreamLayerApp.js";
|
|
6
6
|
import "@streamlayer/sdk-web";
|
|
7
|
-
import "@streamlayer/sdk-web-types";
|
|
8
7
|
import "@nanostores/react";
|
|
9
|
-
import "@streamlayer/sdk-web-
|
|
8
|
+
import "@streamlayer/sdk-web-types";
|
|
10
9
|
import "./useSdkFeature.js";
|
|
11
10
|
import "react-countup";
|
|
12
|
-
import "@streamlayer/sdk-web-
|
|
11
|
+
import "@streamlayer/sdk-web-interfaces";
|
|
12
|
+
import "react-countdown-circle-timer";
|
|
13
13
|
import "lodash.throttle";
|
|
14
|
+
import "react-infinite-scroller";
|
|
15
|
+
import "@streamlayer/sdk-web-notifications";
|
|
14
16
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
v as MastersStreamLayerProvider,
|
|
18
|
+
x as MastersStreamLayerSDKReact
|
|
17
19
|
};
|