@streamlayer/react-ui 0.94.0 → 0.95.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/assets/style.css +1 -1
- package/lib/ui/app/Features/Gamification/Tabs.js +27 -27
- package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +1 -0
- package/lib/ui/app/Navigation/MastersNavigation/index.js +29 -27
- package/lib/ui/app/Notifications/Onboarding/index.js +1 -1
- package/lib/ui/app/masters.js +28 -24
- package/lib/ui/app/useSdkScroll.js +5 -5
- package/lib/ui/gamification/question/notification/insight/index.d.ts +5 -3
- package/lib/ui/gamification/question/notification/insight/index.js +12 -17
- package/lib/ui/gamification/question/notification/insight/styles.d.ts +1 -0
- package/lib/ui/gamification/question/notification/insight/styles.js +15 -10
- package/lib/ui/gamification/vote/feedback/index.js +5 -5
- package/lib/ui/questions/twitter/index.js +52 -21
- package/lib/ui/questions/twitter/styles.d.ts +8 -0
- package/lib/ui/questions/twitter/styles.js +29 -9
- package/lib/ui/theme/constants.d.ts +1 -0
- package/lib/ui/theme/constants.js +3 -2
- package/lib/ui/theme/theme.js +26 -22
- package/lib/ui/video-player/index.js +44 -20
- package/lib/utils/debug/components/developer.js +62 -43
- package/package.json +14 -14
|
@@ -1,30 +1,54 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { SvgIcon as
|
|
4
|
-
import { Container as
|
|
1
|
+
import { jsxs as y, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as m, useState as b, useEffect as P } from "react";
|
|
3
|
+
import { SvgIcon as h } from "../icons/index.js";
|
|
4
|
+
import { Container as O, Player as w, Poster as E, Control as I } from "./styles.js";
|
|
5
5
|
import "@linaria/react";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
const S = (r, c) => {
|
|
7
|
+
for (const e of r)
|
|
8
|
+
e.isIntersecting || e.target instanceof HTMLVideoElement && !e.target.paused && (c.unobserve(e.target), e.target.pause());
|
|
9
|
+
}, v = new IntersectionObserver(S, { threshold: 0.5 }), a = /* @__PURE__ */ new Set(), V = (r) => {
|
|
10
|
+
v.observe(r), a.add(r);
|
|
11
|
+
}, i = (r) => {
|
|
12
|
+
v.unobserve(r), a.delete(r);
|
|
13
|
+
}, H = ({ poster: r, source: c }) => {
|
|
14
|
+
const e = m(null), [l, u] = b(!1), [f, d] = b(!0), g = () => {
|
|
15
|
+
const s = e == null ? void 0 : e.current;
|
|
16
|
+
if (s)
|
|
17
|
+
if (l)
|
|
18
|
+
s.pause(), e.current && i(e.current);
|
|
19
|
+
else {
|
|
20
|
+
const n = e == null ? void 0 : e.current;
|
|
21
|
+
if (!n)
|
|
22
|
+
return;
|
|
23
|
+
for (const t of a)
|
|
24
|
+
t !== n && t instanceof HTMLVideoElement && !t.paused && (t.pause(), i(t));
|
|
25
|
+
V(n), n.play().catch((t) => console.log(t)), d(!1);
|
|
26
|
+
}
|
|
27
|
+
}, p = () => {
|
|
28
|
+
var s;
|
|
29
|
+
e.current && i(e.current), (s = e == null ? void 0 : e.current) == null || s.load(), d(!0);
|
|
30
|
+
};
|
|
31
|
+
return P(() => {
|
|
32
|
+
e.current && i(e.current);
|
|
33
|
+
}, []), /* @__PURE__ */ y(O, { onClick: g, children: [
|
|
34
|
+
/* @__PURE__ */ o(
|
|
35
|
+
w,
|
|
14
36
|
{
|
|
15
|
-
ref:
|
|
16
|
-
src:
|
|
37
|
+
ref: e,
|
|
38
|
+
src: c,
|
|
39
|
+
onPlay: () => u(!0),
|
|
40
|
+
onPause: () => u(!1),
|
|
17
41
|
onEnded: () => {
|
|
18
|
-
|
|
19
|
-
(r = t == null ? void 0 : t.current) == null || r.load(), n(!1), o(!0);
|
|
42
|
+
u(!1), p();
|
|
20
43
|
},
|
|
21
|
-
style: { visibility:
|
|
44
|
+
style: { visibility: f ? "hidden" : "visible" },
|
|
45
|
+
playsInline: !0
|
|
22
46
|
}
|
|
23
47
|
),
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ o(E, { src: r, style: { visibility: f ? "visible" : "hidden" } }),
|
|
49
|
+
/* @__PURE__ */ o(I, { children: !l && /* @__PURE__ */ o(h, { name: "icon-play" }) })
|
|
26
50
|
] });
|
|
27
51
|
};
|
|
28
52
|
export {
|
|
29
|
-
|
|
53
|
+
H as VideoPlayer
|
|
30
54
|
};
|
|
@@ -1,65 +1,84 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { DeveloperStorage as
|
|
5
|
-
import { BypassLogin as
|
|
6
|
-
import { CopyLogs as
|
|
7
|
-
import { EnvToggle as
|
|
8
|
-
import { EventInput as
|
|
9
|
-
import { SdkKey as
|
|
1
|
+
import { jsxs as m, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { styled as n } from "@linaria/react";
|
|
3
|
+
import { useMemo as b, useState as h } from "react";
|
|
4
|
+
import { DeveloperStorage as q } from "../../storage.js";
|
|
5
|
+
import { BypassLogin as u } from "./bypassLogin.js";
|
|
6
|
+
import { CopyLogs as D } from "./copyLogs.js";
|
|
7
|
+
import { EnvToggle as I } from "./envToggle.js";
|
|
8
|
+
import { EventInput as B } from "./eventInput.js";
|
|
9
|
+
import { SdkKey as v } from "./sdkKey.js";
|
|
10
10
|
import "@streamlayer/sdk-web-storage";
|
|
11
11
|
import "./styles.js";
|
|
12
12
|
import "@nanostores/react";
|
|
13
13
|
import "@streamlayer/sdk-web-core";
|
|
14
|
-
const
|
|
14
|
+
const A = /* @__PURE__ */ n("div")({
|
|
15
15
|
name: "DeveloperContainer",
|
|
16
16
|
class: "d1sqxt7l",
|
|
17
17
|
propsAsIs: !1
|
|
18
|
-
}),
|
|
18
|
+
}), x = /* @__PURE__ */ n("div")({
|
|
19
19
|
name: "DeveloperItems",
|
|
20
20
|
class: "d1a3478s",
|
|
21
21
|
propsAsIs: !1
|
|
22
|
-
}),
|
|
22
|
+
}), L = /* @__PURE__ */ n("button")({
|
|
23
23
|
name: "BurgerBtn",
|
|
24
24
|
class: "butjcq8",
|
|
25
25
|
propsAsIs: !1
|
|
26
|
-
}),
|
|
27
|
-
sdk:
|
|
28
|
-
sdkKey:
|
|
26
|
+
}), P = ({
|
|
27
|
+
sdk: r,
|
|
28
|
+
sdkKey: s,
|
|
29
29
|
setSdkKey: p,
|
|
30
|
-
env:
|
|
31
|
-
setEnv:
|
|
32
|
-
event:
|
|
33
|
-
setEvent:
|
|
34
|
-
hideAuth:
|
|
30
|
+
env: i,
|
|
31
|
+
setEnv: t,
|
|
32
|
+
event: a,
|
|
33
|
+
setEvent: l,
|
|
34
|
+
hideAuth: c,
|
|
35
|
+
standalone: f = !1
|
|
35
36
|
}) => {
|
|
36
|
-
const
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
children: [/* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
const e = b(() => new q(), []), [g, C] = h(f);
|
|
38
|
+
return f ? /* @__PURE__ */ m(x, {
|
|
39
|
+
children: [t && /* @__PURE__ */ o(I, {
|
|
40
|
+
env: i,
|
|
41
|
+
setEnv: t,
|
|
42
|
+
storage: e
|
|
43
|
+
}), p && /* @__PURE__ */ o(v, {
|
|
44
|
+
sdkKey: s,
|
|
45
|
+
setSdkKey: p,
|
|
46
|
+
storage: e
|
|
47
|
+
}), r && /* @__PURE__ */ o(B, {
|
|
48
|
+
sdk: r,
|
|
49
|
+
storage: e,
|
|
50
|
+
event: a,
|
|
51
|
+
setEvent: l
|
|
52
|
+
}), !c && r && /* @__PURE__ */ o(u, {
|
|
53
|
+
sdk: r,
|
|
54
|
+
storage: e
|
|
55
|
+
}), /* @__PURE__ */ o(D, {})]
|
|
56
|
+
}) : /* @__PURE__ */ m(A, {
|
|
57
|
+
children: [/* @__PURE__ */ m(L, {
|
|
58
|
+
"data-opened": g.toString(),
|
|
59
|
+
onClick: () => C((j) => !j),
|
|
41
60
|
children: [/* @__PURE__ */ o("span", {}), /* @__PURE__ */ o("span", {}), /* @__PURE__ */ o("span", {})]
|
|
42
|
-
}),
|
|
43
|
-
children: [
|
|
44
|
-
env:
|
|
45
|
-
setEnv:
|
|
46
|
-
storage:
|
|
47
|
-
}), p && /* @__PURE__ */ o(
|
|
48
|
-
sdkKey:
|
|
61
|
+
}), g && /* @__PURE__ */ m(x, {
|
|
62
|
+
children: [t && /* @__PURE__ */ o(I, {
|
|
63
|
+
env: i,
|
|
64
|
+
setEnv: t,
|
|
65
|
+
storage: e
|
|
66
|
+
}), p && /* @__PURE__ */ o(v, {
|
|
67
|
+
sdkKey: s,
|
|
49
68
|
setSdkKey: p,
|
|
50
|
-
storage:
|
|
51
|
-
}),
|
|
52
|
-
sdk:
|
|
53
|
-
storage:
|
|
54
|
-
event:
|
|
55
|
-
setEvent:
|
|
56
|
-
}), !
|
|
57
|
-
sdk:
|
|
58
|
-
storage:
|
|
59
|
-
}), /* @__PURE__ */ o(
|
|
69
|
+
storage: e
|
|
70
|
+
}), r && /* @__PURE__ */ o(B, {
|
|
71
|
+
sdk: r,
|
|
72
|
+
storage: e,
|
|
73
|
+
event: a,
|
|
74
|
+
setEvent: l
|
|
75
|
+
}), !c && r && /* @__PURE__ */ o(u, {
|
|
76
|
+
sdk: r,
|
|
77
|
+
storage: e
|
|
78
|
+
}), /* @__PURE__ */ o(D, {})]
|
|
60
79
|
})]
|
|
61
80
|
});
|
|
62
81
|
};
|
|
63
82
|
export {
|
|
64
|
-
|
|
83
|
+
P as Developer
|
|
65
84
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.95.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@lottiefiles/react-lottie-player": "*",
|
|
39
|
-
"@streamlayer/sl-eslib": "^5.
|
|
39
|
+
"@streamlayer/sl-eslib": "^5.67.0",
|
|
40
40
|
"@types/lodash.throttle": "^4.1.9",
|
|
41
41
|
"lodash.throttle": "^4.1.1",
|
|
42
42
|
"react-infinite-scroller": "^1.2.6",
|
|
43
43
|
"react-virtualized-auto-sizer": "^1.0.21",
|
|
44
44
|
"react-window": "^1.8.10",
|
|
45
45
|
"react-window-infinite-loader": "^1.0.9",
|
|
46
|
-
"@streamlayer/feature-gamification": "^0.
|
|
47
|
-
"@streamlayer/sdk-web": "^0.31.
|
|
48
|
-
"@streamlayer/sdk-web-
|
|
49
|
-
"@streamlayer/sdk-web-
|
|
50
|
-
"@streamlayer/sdk-web-core": "^0.
|
|
51
|
-
"@streamlayer/sdk-web-features": "^0.11.
|
|
52
|
-
"@streamlayer/sdk-web-interfaces": "^0.20.
|
|
53
|
-
"@streamlayer/sdk-web-logger": "^0.5.
|
|
54
|
-
"@streamlayer/sdk-web-notifications": "^0.13.
|
|
55
|
-
"@streamlayer/sdk-web-storage": "^0.4.
|
|
56
|
-
"@streamlayer/sdk-web-types": "^0.22.
|
|
46
|
+
"@streamlayer/feature-gamification": "^0.37.0",
|
|
47
|
+
"@streamlayer/sdk-web": "^0.31.1",
|
|
48
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.11.36",
|
|
49
|
+
"@streamlayer/sdk-web-api": "^0.21.1",
|
|
50
|
+
"@streamlayer/sdk-web-core": "^0.20.0",
|
|
51
|
+
"@streamlayer/sdk-web-features": "^0.11.18",
|
|
52
|
+
"@streamlayer/sdk-web-interfaces": "^0.20.3",
|
|
53
|
+
"@streamlayer/sdk-web-logger": "^0.5.14",
|
|
54
|
+
"@streamlayer/sdk-web-notifications": "^0.13.9",
|
|
55
|
+
"@streamlayer/sdk-web-storage": "^0.4.1",
|
|
56
|
+
"@streamlayer/sdk-web-types": "^0.22.1"
|
|
57
57
|
},
|
|
58
58
|
"nx": {
|
|
59
59
|
"implicitDependencies": [
|
|
@@ -94,6 +94,6 @@
|
|
|
94
94
|
"vite-plugin-svgr": "^4.2.0",
|
|
95
95
|
"vite-svg-loader": "^5.1.0",
|
|
96
96
|
"vite-tsconfig-paths": "^4.3.1",
|
|
97
|
-
"@streamlayer/react": "^0.
|
|
97
|
+
"@streamlayer/react": "^0.39.0"
|
|
98
98
|
}
|
|
99
99
|
}
|