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