@streamlayer/react-ui 1.10.0 → 1.11.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/app/Features/Gamification/Tabs.js +13 -13
- package/lib/app/app/Features/Gamification/index.js +66 -62
- package/lib/app/app/Navigation/index.d.ts +4 -0
- package/lib/app/app/Navigation/index.js +88 -48
- package/lib/app/app/index.js +58 -55
- package/lib/app/app/story/index.js +27 -24
- package/lib/app/app/useApp.d.ts +2 -0
- package/lib/app/app/useApp.js +8 -7
- package/lib/app/app/useAppContext.d.ts +2 -0
- package/lib/app/app/useAppContext.js +6 -5
- package/lib/app/login/index.js +18 -18
- package/lib/assets/style.css +1 -1
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
- package/lib/ui/navigation/index.d.ts +5 -3
- package/lib/ui/navigation/index.js +11 -12
- package/lib/ui/navigation/masters.js +1 -1
- package/lib/ui/navigation/styles.d.ts +5 -0
- package/lib/ui/navigation/styles.js +16 -0
- package/lib/ui/theme/theme.js +8 -10
- package/lib/ui/video-player/index.js +15 -15
- package/package.json +14 -14
- package/lib/app/app/Navigation/SDKPillNode.d.ts +0 -1
- package/lib/app/app/Navigation/SDKPillNode.js +0 -9
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
export declare const Navigation: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
|
+
export declare const NavigationItems: {
|
|
3
|
+
__wyw_meta: unknown;
|
|
4
|
+
} & import('react').FC<{
|
|
5
|
+
children: React.ReactElement<import('./button').ButtonProps>[];
|
|
4
6
|
className?: string;
|
|
5
7
|
}>;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const n = /* @__PURE__ */
|
|
4
|
-
name: "
|
|
5
|
-
class: "
|
|
1
|
+
import { styled as a } from "@linaria/react";
|
|
2
|
+
import { Navigation as s } from "./styles.js";
|
|
3
|
+
const n = /* @__PURE__ */ a("div")({
|
|
4
|
+
name: "Navigation",
|
|
5
|
+
class: "n6tbwuy",
|
|
6
6
|
propsAsIs: !1
|
|
7
|
-
}),
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
className: s,
|
|
12
|
-
children: t
|
|
7
|
+
}), t = () => s, e = /* @__PURE__ */ a(t())({
|
|
8
|
+
name: "NavigationItems",
|
|
9
|
+
class: "n1up4z7v",
|
|
10
|
+
propsAsIs: !0
|
|
13
11
|
});
|
|
14
12
|
export {
|
|
15
|
-
|
|
13
|
+
n as Navigation,
|
|
14
|
+
e as NavigationItems
|
|
16
15
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { styled as r } from "@linaria/react";
|
|
3
|
+
const n = /* @__PURE__ */ r("div")({
|
|
4
|
+
name: "Buttons",
|
|
5
|
+
class: "b5o8qbl",
|
|
6
|
+
propsAsIs: !1
|
|
7
|
+
}), i = ({
|
|
8
|
+
children: o,
|
|
9
|
+
className: s
|
|
10
|
+
}) => /* @__PURE__ */ t(n, {
|
|
11
|
+
className: s,
|
|
12
|
+
children: o
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
i as Navigation
|
|
16
|
+
};
|
package/lib/ui/theme/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { breakpoints as
|
|
2
|
+
import { breakpoints as n } from "./breakpoints.js";
|
|
3
3
|
import { colors as p, colorsAdvertisement as s, FONT as e } from "./constants.js";
|
|
4
4
|
const l = `
|
|
5
5
|
${p}
|
|
@@ -20,7 +20,6 @@ const l = `
|
|
|
20
20
|
|
|
21
21
|
--header-offset: 0px;
|
|
22
22
|
--header-height: 68px;
|
|
23
|
-
--watch-live-header: 0px;
|
|
24
23
|
--animation-duration: 0.5s;
|
|
25
24
|
--animation-function: ease;
|
|
26
25
|
--container-padding: 16px;
|
|
@@ -46,12 +45,11 @@ const l = `
|
|
|
46
45
|
--promo-animation-duration: 0.5s;
|
|
47
46
|
--promo-animation-function: ease-in;
|
|
48
47
|
|
|
49
|
-
${
|
|
48
|
+
${n.down("xl")`
|
|
50
49
|
--header-offset: 0px;
|
|
51
|
-
--watch-live-header: 46px;
|
|
52
50
|
`}
|
|
53
51
|
|
|
54
|
-
${
|
|
52
|
+
${n.intermediate("xl", "lg")`
|
|
55
53
|
--header-offset: 0px;
|
|
56
54
|
`}
|
|
57
55
|
|
|
@@ -87,7 +85,7 @@ const l = `
|
|
|
87
85
|
--adv-sponsor-logo-size: 28px;
|
|
88
86
|
--adv-sponsor-font-size: 12px;
|
|
89
87
|
}
|
|
90
|
-
`, m = "StreamLayerCSSReset",
|
|
88
|
+
`, m = "StreamLayerCSSReset", g = "ttkj0ah", c = () => /* @__PURE__ */ i("table", {
|
|
91
89
|
children: /* @__PURE__ */ t("table", {
|
|
92
90
|
children: [/* @__PURE__ */ i("thead", {
|
|
93
91
|
children: /* @__PURE__ */ t("tr", {
|
|
@@ -98,8 +96,8 @@ const l = `
|
|
|
98
96
|
})]
|
|
99
97
|
})
|
|
100
98
|
}), /* @__PURE__ */ i("tbody", {
|
|
101
|
-
children: l.split(";").map((
|
|
102
|
-
const a =
|
|
99
|
+
children: l.split(";").map((d) => {
|
|
100
|
+
const a = d.trim(), [o, r] = a.split(":");
|
|
103
101
|
return /* @__PURE__ */ t("tr", {
|
|
104
102
|
children: [/* @__PURE__ */ i("td", {
|
|
105
103
|
children: o
|
|
@@ -112,8 +110,8 @@ const l = `
|
|
|
112
110
|
})
|
|
113
111
|
});
|
|
114
112
|
export {
|
|
115
|
-
|
|
113
|
+
c as ThemeVariables,
|
|
116
114
|
m as resetCss,
|
|
117
|
-
|
|
115
|
+
g as theme,
|
|
118
116
|
l as themeStr
|
|
119
117
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as H, jsx as
|
|
1
|
+
import { jsxs as H, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { cx as L } from "@linaria/core";
|
|
3
3
|
import { useRef as S, useState as d, useCallback as y, useEffect as P } from "react";
|
|
4
4
|
import { eventBus as C } from "@streamlayer/sdk-web-interfaces";
|
|
5
5
|
import { SvgIcon as h } from "../icons/index.js";
|
|
6
6
|
import { Container as M, ToggleIconPause as j, HideControls as k, Player as A, Poster as B, Control as F } from "./styles.js";
|
|
7
7
|
const N = (s) => {
|
|
8
|
-
for (const
|
|
9
|
-
|
|
8
|
+
for (const r of s)
|
|
9
|
+
r.isIntersecting ? r.target instanceof HTMLVideoElement && r.target.autoplay && r.target.play() : r.target instanceof HTMLVideoElement && !r.target.paused && r.target.pause();
|
|
10
10
|
}, E = new IntersectionObserver(N, { threshold: 0.5 }), m = /* @__PURE__ */ new Set(), q = (s) => {
|
|
11
11
|
E.observe(s), m.add(s);
|
|
12
12
|
}, z = (s) => {
|
|
@@ -16,18 +16,18 @@ const N = (s) => {
|
|
|
16
16
|
s instanceof HTMLVideoElement && !s.paused && s.pause();
|
|
17
17
|
}, X = ({
|
|
18
18
|
poster: s,
|
|
19
|
-
source:
|
|
19
|
+
source: r,
|
|
20
20
|
aspectRatio: p,
|
|
21
|
-
controlVideo:
|
|
22
|
-
onPlay:
|
|
21
|
+
controlVideo: n,
|
|
22
|
+
onPlay: o,
|
|
23
23
|
autoPlay: I,
|
|
24
24
|
hideControls: u
|
|
25
25
|
}) => {
|
|
26
26
|
const e = S(null), [c, l] = d(!1), [g, f] = d(!0), O = y(() => {
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
|
|
30
|
-
}, [
|
|
27
|
+
n == null || n({ muted: !0 });
|
|
28
|
+
}, [n]), a = y(() => {
|
|
29
|
+
n == null || n({ muted: !1 });
|
|
30
|
+
}, [n]), T = (t) => {
|
|
31
31
|
t.stopPropagation();
|
|
32
32
|
const v = e == null ? void 0 : e.current;
|
|
33
33
|
if (v) {
|
|
@@ -64,14 +64,14 @@ const N = (s) => {
|
|
|
64
64
|
className: L(c && j, u && k),
|
|
65
65
|
style: p ? { aspectRatio: p } : {},
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ i(
|
|
68
68
|
A,
|
|
69
69
|
{
|
|
70
70
|
ref: e,
|
|
71
|
-
src:
|
|
71
|
+
src: r,
|
|
72
72
|
autoPlay: I,
|
|
73
73
|
onPlay: () => {
|
|
74
|
-
|
|
74
|
+
O(), l(!0), f(!1), o == null || o();
|
|
75
75
|
},
|
|
76
76
|
onPause: () => {
|
|
77
77
|
a(), l(!1);
|
|
@@ -84,8 +84,8 @@ const N = (s) => {
|
|
|
84
84
|
playsInline: !0
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
!u && /* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ i(B, { src: s, style: { visibility: g ? "visible" : "hidden" } }),
|
|
88
|
+
!u && /* @__PURE__ */ i(F, { children: c ? /* @__PURE__ */ i(h, { name: "icon-pause" }) : /* @__PURE__ */ i(h, { name: "icon-play" }) })
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -59,18 +59,18 @@
|
|
|
59
59
|
"react-virtualized-auto-sizer": "^1.0.24",
|
|
60
60
|
"react-window": "^1.8.10",
|
|
61
61
|
"react-window-infinite-loader": "^1.0.9",
|
|
62
|
-
"@streamlayer/feature-gamification": "^1.
|
|
63
|
-
"@streamlayer/sdk-web": "^1.
|
|
64
|
-
"@streamlayer/sdk-web-analytics": "^1.4.
|
|
65
|
-
"@streamlayer/sdk-web-anonymous-auth": "^1.1.
|
|
66
|
-
"@streamlayer/sdk-web-api": "^1.6.
|
|
67
|
-
"@streamlayer/sdk-web-core": "^1.
|
|
68
|
-
"@streamlayer/sdk-web-features": "^1.0.
|
|
69
|
-
"@streamlayer/sdk-web-interfaces": "^1.2.
|
|
70
|
-
"@streamlayer/sdk-web-logger": "^1.0.
|
|
71
|
-
"@streamlayer/sdk-web-notifications": "^1.2.
|
|
72
|
-
"@streamlayer/sdk-web-storage": "^1.0.
|
|
73
|
-
"@streamlayer/sdk-web-types": "^1.7.
|
|
62
|
+
"@streamlayer/feature-gamification": "^1.8.1",
|
|
63
|
+
"@streamlayer/sdk-web": "^1.5.1",
|
|
64
|
+
"@streamlayer/sdk-web-analytics": "^1.4.2",
|
|
65
|
+
"@streamlayer/sdk-web-anonymous-auth": "^1.1.2",
|
|
66
|
+
"@streamlayer/sdk-web-api": "^1.6.2",
|
|
67
|
+
"@streamlayer/sdk-web-core": "^1.6.1",
|
|
68
|
+
"@streamlayer/sdk-web-features": "^1.0.23",
|
|
69
|
+
"@streamlayer/sdk-web-interfaces": "^1.2.2",
|
|
70
|
+
"@streamlayer/sdk-web-logger": "^1.0.23",
|
|
71
|
+
"@streamlayer/sdk-web-notifications": "^1.2.2",
|
|
72
|
+
"@streamlayer/sdk-web-storage": "^1.0.23",
|
|
73
|
+
"@streamlayer/sdk-web-types": "^1.7.2"
|
|
74
74
|
},
|
|
75
75
|
"nx": {
|
|
76
76
|
"implicitDependencies": [
|
|
@@ -111,6 +111,6 @@
|
|
|
111
111
|
"vite-plugin-svgr": "^4.2.0",
|
|
112
112
|
"vite-svg-loader": "^5.1.0",
|
|
113
113
|
"vite-tsconfig-paths": "^5.0.1",
|
|
114
|
-
"@streamlayer/react": "^1.
|
|
114
|
+
"@streamlayer/react": "^1.8.1"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SDKPillNode: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|