@streamlayer/react 1.0.0 → 1.1.1
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/advertisement.d.ts +1 -0
- package/lib/app/app.d.ts +2 -2
- package/lib/app/auth.d.ts +0 -1
- package/lib/app/masters.d.ts +2 -1
- package/lib/app/provider.d.ts +4 -4
- package/lib/app/useStreamLayerApp.d.ts +8 -7
- package/lib/cjs/app.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/index2.js +58 -51
- package/lib/cjs/masters2.js +3 -3
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +15 -15
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/gamification-feature2.js +1 -1
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +93 -86
- package/lib/dist/es/gamification-feature.js +1 -1
- package/lib/dist/es/gamification-feature2.js +18 -18
- package/lib/dist/es/index.js +1 -1
- package/lib/dist/es/masters.js +31757 -35298
- package/lib/dist/index.d.ts +222 -135
- package/lib/dist/style.css +1 -1
- package/lib/es/app.js +438 -414
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/gamification-feature2.js +1 -1
- package/lib/es/index2.js +10224 -10665
- package/lib/es/masters2.js +393 -432
- package/lib/es/points.js +13 -13
- package/lib/es/useStreamLayerApp2.js +8732 -11851
- package/lib/style.css +1 -1
- package/package.json +45 -40
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { M as
|
|
3
|
-
import { useRef as T, useState as
|
|
4
|
-
const U = /* @__PURE__ */
|
|
1
|
+
import { jsx as s, jsxs as v, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { M as C, s as b, u as d, T as x, S as $, C as L, p as D, k as M, O as E, m as f, l as A, a as F, b as R, n as V, c as q, d as O, e as P, f as Q } from "./masters.js";
|
|
3
|
+
import { useRef as T, useState as k, useEffect as I, useTransition as K } from "react";
|
|
4
|
+
const U = /* @__PURE__ */ b("div")({
|
|
5
5
|
name: "InviteFriendsContainer",
|
|
6
|
-
class: "
|
|
6
|
+
class: "i1c9dygq",
|
|
7
7
|
propsAsIs: !1
|
|
8
8
|
}), j = ({
|
|
9
9
|
deepLink: o
|
|
10
10
|
}) => /* @__PURE__ */ s(U, {
|
|
11
|
-
children: /* @__PURE__ */ s(
|
|
11
|
+
children: /* @__PURE__ */ s(C, {
|
|
12
12
|
inviteLink: o,
|
|
13
13
|
inviteCardTitle: "It’s More Fun With Friends",
|
|
14
14
|
inviteCardSubtext: "Invite and compete against your friends for the top spot on the leaderboard."
|
|
15
15
|
})
|
|
16
|
-
}), B = /* @__PURE__ */
|
|
16
|
+
}), B = /* @__PURE__ */ b("div")({
|
|
17
17
|
name: "InviteLinkContainer",
|
|
18
|
-
class: "
|
|
18
|
+
class: "i1odbhm4",
|
|
19
19
|
propsAsIs: !1
|
|
20
20
|
}), H = ({
|
|
21
21
|
gamification: o,
|
|
@@ -29,10 +29,10 @@ const U = /* @__PURE__ */ k("div")({
|
|
|
29
29
|
key: p
|
|
30
30
|
} = d(o.leaderboardList.$store), {
|
|
31
31
|
data: a
|
|
32
|
-
} = d(o.deepLink.$store), [u, m] =
|
|
32
|
+
} = d(o.deepLink.$store), [u, m] = x(r);
|
|
33
33
|
return !n.length && !l ? /* @__PURE__ */ s(j, {
|
|
34
34
|
deepLink: a
|
|
35
|
-
}) : /* @__PURE__ */
|
|
35
|
+
}) : /* @__PURE__ */ v(S, {
|
|
36
36
|
children: [/* @__PURE__ */ s($, {
|
|
37
37
|
items: n,
|
|
38
38
|
scrollNode: t,
|
|
@@ -55,7 +55,7 @@ const U = /* @__PURE__ */ k("div")({
|
|
|
55
55
|
return /* @__PURE__ */ s(M, { openQuestion: t, questions: r.data, controlVideo: e == null ? void 0 : e.controlVideoPlayer });
|
|
56
56
|
}, W = ({ userSummary: o }) => {
|
|
57
57
|
var t;
|
|
58
|
-
const [e, r] =
|
|
58
|
+
const [e, r] = k(void 0);
|
|
59
59
|
return I(() => {
|
|
60
60
|
const n = o.$store.subscribe((i) => {
|
|
61
61
|
i && r(i);
|
|
@@ -63,12 +63,12 @@ const U = /* @__PURE__ */ k("div")({
|
|
|
63
63
|
return () => {
|
|
64
64
|
n();
|
|
65
65
|
};
|
|
66
|
-
}, [o]), /* @__PURE__ */ s(
|
|
66
|
+
}, [o]), /* @__PURE__ */ s(E, { loading: !(e != null && e.summary), ...e == null ? void 0 : e.summary, successRate: (t = e == null ? void 0 : e.percentage) == null ? void 0 : t.correct });
|
|
67
67
|
}, _ = ({ gamification: o, className: t, scrollStore: e, scrollNode: r, appNode: n, style: i, responsiveStore: l }) => {
|
|
68
|
-
const { tabsShown: p } = d(e, { keys: ["tabsShown"] }), [a, u] =
|
|
68
|
+
const { tabsShown: p } = d(e, { keys: ["tabsShown"] }), [a, u] = k(f.HOME), [, m] = K(), { sdkInDesktopView: g, screen: N } = d(l, { keys: ["sdkInDesktopView"] }), w = (c) => {
|
|
69
69
|
m(() => {
|
|
70
|
-
var
|
|
71
|
-
u(c), g === !1 && (((
|
|
70
|
+
var y;
|
|
71
|
+
u(c), g === !1 && (((y = n.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && Q(n, N.size, { behavior: "instant" });
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
74
|
I(() => e.subscribe((c) => {
|
|
@@ -79,7 +79,7 @@ const U = /* @__PURE__ */ k("div")({
|
|
|
79
79
|
l.get().sdkInDesktopView ? e.setKey("tabsShown", c.scrollDirection === "backward") : e.setKey("tabsShown", c.scrollDirection === "forward");
|
|
80
80
|
}), [e, l]);
|
|
81
81
|
let h = "0px";
|
|
82
|
-
return g ? h = p ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : h = p ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */
|
|
82
|
+
return g ? h = p ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : h = p ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ v(A, { className: t, style: i, children: [
|
|
83
83
|
/* @__PURE__ */ s(
|
|
84
84
|
F,
|
|
85
85
|
{
|
|
@@ -89,11 +89,11 @@ const U = /* @__PURE__ */ k("div")({
|
|
|
89
89
|
children: /* @__PURE__ */ s(R, { activePage: a, toggleActivePage: w })
|
|
90
90
|
}
|
|
91
91
|
),
|
|
92
|
-
a ===
|
|
92
|
+
a === f.HOME && /* @__PURE__ */ v(S, { children: [
|
|
93
93
|
/* @__PURE__ */ s(V, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ s(q, { children: /* @__PURE__ */ s(W, { userSummary: o.userSummary }) }) }),
|
|
94
94
|
/* @__PURE__ */ s(O, { style: { flex: 1 }, children: /* @__PURE__ */ s(z, { openQuestion: o.openQuestion, store: o.feedList.getStore() }) })
|
|
95
95
|
] }),
|
|
96
|
-
a ===
|
|
96
|
+
a === f.LEADERBOARD && /* @__PURE__ */ s(P, { children: /* @__PURE__ */ s(H, { scrollStore: e, scrollNode: r, gamification: o }) })
|
|
97
97
|
] });
|
|
98
98
|
}, Y = ({
|
|
99
99
|
gamification: o,
|
package/lib/dist/es/index.js
CHANGED