@streamlayer/react 0.37.0 → 0.38.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/masters.d.ts +11 -2
- package/lib/app/provider.d.ts +1 -0
- package/lib/cjs/app.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -5
- package/lib/cjs/index2.js +13 -3
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +48 -40
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useSdkFeature.js +1 -1
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/dist/cjs/gamification-feature.js +1 -5
- package/lib/dist/cjs/masters.js +83 -64
- package/lib/dist/es/gamification-feature.js +626 -718
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +24026 -21178
- package/lib/dist/index.d.ts +117 -62
- package/lib/dist/style.css +1 -1
- package/lib/es/app.js +5 -5
- package/lib/es/gamification-feature.js +614 -707
- package/lib/es/index2.js +62 -26
- package/lib/es/masters.js +2 -1
- package/lib/es/masters2.js +7388 -7238
- package/lib/es/points.js +21 -22
- package/lib/es/useSdkFeature.js +112 -97
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +14 -14
- package/lib/cjs/index3.js +0 -1
- package/lib/es/index3.js +0 -19
package/lib/es/index2.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { jsx as N } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { useStreamLayerApp as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
2
|
+
import { createContext as i, useMemo as S } from "react";
|
|
3
|
+
import { useStreamLayerApp as G } from "./useStreamLayerApp.js";
|
|
4
|
+
var d = /* @__PURE__ */ ((R) => (R[R.UNSET = 0] = "UNSET", R[R.CONNECTED = 1] = "CONNECTED", R[R.READY = 2] = "READY", R))(d || {});
|
|
5
|
+
const O = i({
|
|
6
6
|
status: 0,
|
|
7
7
|
sdk: null
|
|
8
8
|
}), I = ({
|
|
9
9
|
sdkKey: R,
|
|
10
10
|
plugins: E,
|
|
11
|
-
children:
|
|
12
|
-
production:
|
|
13
|
-
autoEnable:
|
|
11
|
+
children: e,
|
|
12
|
+
production: _ = !0,
|
|
13
|
+
autoEnable: T = !0,
|
|
14
|
+
onDeepLinkHandled: a
|
|
14
15
|
}) => {
|
|
15
|
-
const
|
|
16
|
-
sdk:
|
|
16
|
+
const t = G(R, E, _, T), s = S(() => t ? (a && t.onDeepLinkHandled(a), {
|
|
17
|
+
sdk: t,
|
|
17
18
|
status: 2
|
|
18
19
|
/* READY */
|
|
19
|
-
} : { status: 1, sdk: null }, [
|
|
20
|
-
return /* @__PURE__ */ N(
|
|
21
|
-
},
|
|
20
|
+
}) : { status: 1, sdk: null }, [t]);
|
|
21
|
+
return /* @__PURE__ */ N(O.Provider, { value: s, children: e });
|
|
22
|
+
}, D = {
|
|
22
23
|
BG_TRANSPARENT: "rgba(0,0,0, .8)",
|
|
23
24
|
BG_TRANSPARENT_VOTE_CONTAINER: "rgba(10, 14, 19, 0.8)",
|
|
24
25
|
BG_TRANSPARENT_ITEM: "rgba(0, 0, 0, 0.7)",
|
|
@@ -47,7 +48,7 @@ const s = G({
|
|
|
47
48
|
GREY_PRIMARY: "#909395",
|
|
48
49
|
DIVIDER_COLOR_SECONDARY: "#53565a",
|
|
49
50
|
GREEN_PRIMARY_BTN: "#009B77"
|
|
50
|
-
},
|
|
51
|
+
}, c = {
|
|
51
52
|
PRIMARY_GREEN1: "#107D57",
|
|
52
53
|
PRIMARY_GREEN2: "#006747",
|
|
53
54
|
PRIMARY_GREEN3: "#1C4932",
|
|
@@ -69,27 +70,62 @@ const s = G({
|
|
|
69
70
|
NEUTRALS_GRAY8: "#53565A",
|
|
70
71
|
NEUTRALS_GRAY9: "#25282A",
|
|
71
72
|
NEUTRALS_BLACK: "#000000"
|
|
72
|
-
},
|
|
73
|
+
}, o = Object.assign({}, D, c), A = {
|
|
74
|
+
REGULAR: "'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",
|
|
75
|
+
SERIF: "'Tiempos', 'Tiempos Text', Times New Roman, serif",
|
|
76
|
+
COLOR: "#fff",
|
|
77
|
+
WEIGHT_DEFAULT: "500"
|
|
78
|
+
}, r = {
|
|
73
79
|
sm: 576,
|
|
74
80
|
md: 768,
|
|
75
81
|
lg: 992,
|
|
76
82
|
xl: 1200,
|
|
77
83
|
xxl: 1400
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
}, B = {
|
|
85
|
+
landscape: "landscape",
|
|
86
|
+
portrait: "portrait"
|
|
87
|
+
}, Y = Object.keys(o).reduce((R, E) => {
|
|
88
|
+
const e = o[E];
|
|
81
89
|
return `
|
|
82
90
|
${R}
|
|
83
|
-
--color-${E.toLowerCase().replaceAll("_", "-")}: ${
|
|
91
|
+
--color-${E.toLowerCase().replaceAll("_", "-")}: ${e};
|
|
84
92
|
`;
|
|
85
|
-
}, "")
|
|
86
|
-
|
|
93
|
+
}, ""), n = (R) => (E) => `
|
|
94
|
+
@media only screen and (${R}) {
|
|
95
|
+
${E}
|
|
96
|
+
}
|
|
97
|
+
`, l = (R, E) => (e) => `
|
|
98
|
+
@media only screen and (${R}) and (${E}) {
|
|
99
|
+
${e}
|
|
100
|
+
}
|
|
101
|
+
`, C = {
|
|
102
|
+
up: (R) => {
|
|
103
|
+
const E = r[R];
|
|
104
|
+
return n(`min-width: ${E}px`);
|
|
105
|
+
},
|
|
106
|
+
down: (R) => {
|
|
107
|
+
const E = r[R] - 1;
|
|
108
|
+
return n(`max-width: ${E}px`);
|
|
109
|
+
},
|
|
110
|
+
intermediate: (R, E) => {
|
|
111
|
+
const e = r[R] - 1, _ = r[E];
|
|
112
|
+
return l(`max-width: ${e}px`, `min-width: ${_}px`);
|
|
113
|
+
},
|
|
114
|
+
orientation: (R) => {
|
|
115
|
+
const E = B[R];
|
|
116
|
+
return n(`orientation: ${E}`);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
`${Y}${A.REGULAR}${A.REGULAR}${A.COLOR}${A.SERIF}${A.WEIGHT_DEFAULT}${C.down("xl")`
|
|
120
|
+
--header-offset: 56px;
|
|
121
|
+
`}`;
|
|
122
|
+
const L = "StreamLayerCSSReset", m = "ttkj0ah", P = ({ children: R, style: E }) => /* @__PURE__ */ N("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ N("div", { className: m, style: E, children: R }) });
|
|
87
123
|
export {
|
|
88
|
-
|
|
89
|
-
|
|
124
|
+
o as E,
|
|
125
|
+
r as O,
|
|
90
126
|
I as S,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
127
|
+
O as a,
|
|
128
|
+
d as b,
|
|
129
|
+
L as m,
|
|
130
|
+
P as p
|
|
95
131
|
};
|
package/lib/es/masters.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "./index2.js";
|
|
3
|
-
import { M as c,
|
|
3
|
+
import { M as c, f as d } from "./masters2.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "./useStreamLayerApp.js";
|
|
6
6
|
import "@streamlayer/sdk-web";
|
|
@@ -8,6 +8,7 @@ import "@streamlayer/sdk-web-types";
|
|
|
8
8
|
import "@nanostores/react";
|
|
9
9
|
import "@streamlayer/sdk-web-interfaces";
|
|
10
10
|
import "./useSdkFeature.js";
|
|
11
|
+
import "react-countup";
|
|
11
12
|
import "@streamlayer/sdk-web-notifications";
|
|
12
13
|
import "lodash.throttle";
|
|
13
14
|
export {
|