@streamlayer/react-ui 1.11.4 → 1.12.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/Advertisement/index.d.ts +1 -0
- package/lib/app/app/Advertisement/index.js +86 -67
- package/lib/app/app/Features/Gamification/Tabs.js +13 -13
- package/lib/app/app/Navigation/index.js +70 -64
- package/lib/app/app/Notifications/Onboarding/index.js +66 -72
- package/lib/app/app/Notifications/index.d.ts +1 -0
- package/lib/app/app/Notifications/index.js +76 -72
- package/lib/app/app/index.js +28 -27
- package/lib/app/app/story/index.d.ts +3 -1
- package/lib/app/app/story/index.js +29 -26
- package/lib/app/app/story/promotion/video.js +34 -34
- package/lib/app/app/styles.d.ts +5 -0
- package/lib/app/app/styles.js +25 -20
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/index.d.ts +3 -0
- package/lib/ui/advertisement/index.js +25 -19
- package/lib/ui/advertisement/mock.d.ts +1 -0
- package/lib/ui/advertisement/mock.js +39 -5
- package/lib/ui/advertisement/overlay/externalAd/controls.d.ts +5 -0
- package/lib/ui/advertisement/overlay/externalAd/controls.js +33 -0
- package/lib/ui/advertisement/overlay/externalAd/index.d.ts +2 -0
- package/lib/ui/advertisement/overlay/externalAd/index.js +121 -0
- package/lib/ui/advertisement/overlay/index.d.ts +7 -2
- package/lib/ui/advertisement/overlay/index.js +67 -58
- package/lib/ui/close-btn/index.d.ts +1 -0
- package/lib/ui/close-btn/index.js +25 -23
- package/lib/ui/gamification/question/insight/styles.d.ts +10 -2
- package/lib/ui/gamification/question/insight/styles.js +8 -7
- package/lib/ui/gamification/question/notification/prediction-result/index.js +84 -64
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +2 -0
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +36 -26
- package/lib/ui/gamification/question/twitter/styles.d.ts +5 -1
- package/lib/ui/gamification/question/twitter/styles.js +9 -8
- package/lib/ui/gamification/vote/alert/index.js +7 -8
- package/lib/ui/gamification/vote/alert/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/alert/styles.js +12 -6
- package/lib/ui/gamification/vote/vote-option/index.js +59 -58
- package/lib/ui/icons/index.d.ts +1 -0
- package/lib/ui/icons/index.js +45 -44
- package/lib/ui/skeleton/index.d.ts +1 -1
- package/lib/ui/theme/constants.d.ts +32 -1
- package/lib/ui/theme/constants.js +50 -17
- package/lib/ui/theme/masters-theme.js +9 -4
- package/lib/ui/theme/theme.js +16 -9
- package/lib/ui/video-player/index.d.ts +2 -0
- package/lib/ui/video-player/index.js +57 -56
- package/package.json +14 -14
|
@@ -1,62 +1,65 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { StreamLayerProvider as
|
|
5
|
-
import { App as
|
|
6
|
-
import { StreamLayerThemeProvider as
|
|
7
|
-
import { useStreamLayerDebug as
|
|
8
|
-
import { Video as
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { styled as s } from "@linaria/react";
|
|
3
|
+
import { useEffect as l } from "react";
|
|
4
|
+
import { StreamLayerProvider as p, useStreamLayer as m, StreamLayerSDKEvent as c } from "@streamlayer/react";
|
|
5
|
+
import { App as f } from "../index.js";
|
|
6
|
+
import { StreamLayerThemeProvider as u } from "../../../ui/theme/index.js";
|
|
7
|
+
import { useStreamLayerDebug as y } from "../../../utils/debug/index.js";
|
|
8
|
+
import { Video as h } from "./video.js";
|
|
9
9
|
const a = () => {
|
|
10
10
|
console.log("deep link handled cb");
|
|
11
|
-
},
|
|
11
|
+
}, k = () => {
|
|
12
12
|
console.log("video player handled cb");
|
|
13
13
|
}, v = ({
|
|
14
14
|
event: o
|
|
15
15
|
}) => {
|
|
16
|
-
const e =
|
|
17
|
-
return
|
|
16
|
+
const e = m();
|
|
17
|
+
return l(() => {
|
|
18
18
|
e && e.openFeature(12);
|
|
19
|
-
}, [e, o]), e ? /* @__PURE__ */
|
|
20
|
-
|
|
19
|
+
}, [e, o]), e ? /* @__PURE__ */ t(u, {
|
|
20
|
+
customTheme: "dark",
|
|
21
|
+
children: [/* @__PURE__ */ r(c, {
|
|
21
22
|
event: o
|
|
22
|
-
}), /* @__PURE__ */ r(
|
|
23
|
+
}), /* @__PURE__ */ r(f, {
|
|
23
24
|
sdk: e,
|
|
24
25
|
event: o,
|
|
25
26
|
onDeepLinkHandled: a
|
|
26
27
|
})]
|
|
27
28
|
}) : null;
|
|
28
|
-
}, A = /* @__PURE__ */
|
|
29
|
+
}, A = /* @__PURE__ */ s("div")({
|
|
29
30
|
name: "Container",
|
|
30
31
|
class: "c1a4qh28",
|
|
31
32
|
propsAsIs: !1
|
|
32
|
-
}), S = /* @__PURE__ */
|
|
33
|
+
}), S = /* @__PURE__ */ s("div")({
|
|
33
34
|
name: "Body",
|
|
34
35
|
class: "b9h8kuk",
|
|
35
36
|
propsAsIs: !1
|
|
36
|
-
}),
|
|
37
|
+
}), C = /* @__PURE__ */ s("div")({
|
|
37
38
|
name: "AppContainer",
|
|
38
39
|
class: "a1wkro2j",
|
|
39
40
|
propsAsIs: !1
|
|
40
|
-
}),
|
|
41
|
+
}), E = ({
|
|
41
42
|
sdkKey: o,
|
|
42
43
|
eventId: e,
|
|
43
|
-
production: d
|
|
44
|
+
production: d,
|
|
45
|
+
darkMode: i
|
|
44
46
|
}) => {
|
|
45
|
-
const n =
|
|
47
|
+
const n = y({
|
|
46
48
|
sdkKey: o,
|
|
47
49
|
eventId: e,
|
|
48
50
|
production: d
|
|
49
51
|
});
|
|
50
|
-
return /* @__PURE__ */ r(
|
|
52
|
+
return /* @__PURE__ */ r(p, {
|
|
51
53
|
sdkKey: n.sdkKey,
|
|
52
54
|
production: n.env === "production",
|
|
53
55
|
autoEnable: !0,
|
|
54
56
|
onDeepLinkHandled: a,
|
|
55
|
-
videoPlayerController:
|
|
57
|
+
videoPlayerController: k,
|
|
56
58
|
withAd: !1,
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
children: /* @__PURE__ */ t(S, {
|
|
60
|
+
className: i ? "dark" : "",
|
|
61
|
+
children: [/* @__PURE__ */ r(h, {}), /* @__PURE__ */ r(A, {
|
|
62
|
+
children: /* @__PURE__ */ r(C, {
|
|
60
63
|
className: "StreamLayerSDK",
|
|
61
64
|
children: /* @__PURE__ */ r(v, {
|
|
62
65
|
event: n.event
|
|
@@ -67,5 +70,5 @@ const a = () => {
|
|
|
67
70
|
});
|
|
68
71
|
};
|
|
69
72
|
export {
|
|
70
|
-
|
|
73
|
+
E as AppStory
|
|
71
74
|
};
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useStreamLayer as
|
|
4
|
-
import { StreamLayerSDKAdvertisement as
|
|
1
|
+
import { jsxs as a, Fragment as g, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as y, useState as x, useCallback as P, useEffect as V } from "react";
|
|
3
|
+
import { useStreamLayer as A } from "@streamlayer/react";
|
|
4
|
+
import { StreamLayerSDKAdvertisement as d } from "../../Advertisement/index.js";
|
|
5
5
|
import { StreamLayerThemeProvider as h } from "../../../../ui/theme/index.js";
|
|
6
|
-
import { PromoButton as
|
|
7
|
-
const
|
|
8
|
-
const e =
|
|
6
|
+
import { PromoButton as C, VideoFrame as w, AdvSidebar as F, VideoPlayerWrap as L, AdvBanner as S, AdvContent as T } from "./styles.js";
|
|
7
|
+
const K = ({ isMobileScreen: o, skipAutoClose: n, sidebar: l, banner: p, event: m, promotionId: s, layoutMode: t }) => {
|
|
8
|
+
const e = A(), u = y(null), [f, v] = x(!1), c = P(({ muted: i }) => {
|
|
9
9
|
v(i);
|
|
10
10
|
}, []);
|
|
11
|
-
return
|
|
12
|
-
e == null || e.removeVideoPlayerController(
|
|
13
|
-
}), [e,
|
|
14
|
-
|
|
11
|
+
return V(() => (e == null || e.addVideoPlayerController(c), () => {
|
|
12
|
+
e == null || e.removeVideoPlayerController(c);
|
|
13
|
+
}), [e, c]), /* @__PURE__ */ a(g, { children: [
|
|
14
|
+
s && /* @__PURE__ */ a(C, { onClick: () => {
|
|
15
15
|
var i;
|
|
16
16
|
(i = u.current) == null || i.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
|
|
17
|
-
e == null || e.getFeature(12).background.advertisement.show(
|
|
17
|
+
e == null || e.getFeature(12).background.advertisement.show(s);
|
|
18
18
|
}, 200);
|
|
19
19
|
}, children: [
|
|
20
20
|
"open promotion: ",
|
|
21
|
-
|
|
21
|
+
s
|
|
22
22
|
] }),
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */ r("p", { children: "On desktop, the width limit is 344px, and for mobile screens, it is 300px as designed." }),
|
|
25
|
-
/* @__PURE__ */ n(F, { ref: u, "data-testid": "video-frame", children: [
|
|
23
|
+
/* @__PURE__ */ a(w, { ref: u, "data-testid": "video-frame", children: [
|
|
26
24
|
/* @__PURE__ */ r(
|
|
27
|
-
|
|
25
|
+
F,
|
|
28
26
|
{
|
|
29
27
|
style: {
|
|
30
28
|
...t === "cover" ? { position: "absolute" } : {},
|
|
31
|
-
...
|
|
29
|
+
...l === "left" ? { left: 0 } : { right: 0, order: 3 },
|
|
32
30
|
...o ? { maxWidth: "calc(300px + env(safe-area-inset-left))" } : {}
|
|
33
31
|
},
|
|
34
32
|
children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
|
|
35
|
-
|
|
33
|
+
d,
|
|
36
34
|
{
|
|
37
35
|
isMobileScreen: o,
|
|
38
|
-
event:
|
|
36
|
+
event: m,
|
|
39
37
|
sdk: e,
|
|
40
|
-
sidebar:
|
|
38
|
+
sidebar: l,
|
|
41
39
|
layoutMode: t,
|
|
42
|
-
skipAutoClose:
|
|
40
|
+
skipAutoClose: n,
|
|
41
|
+
skipTypeCheck: !0,
|
|
42
|
+
externalAd: !0,
|
|
43
43
|
persistent: !0
|
|
44
44
|
}
|
|
45
45
|
) })
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ a(L, { children: [
|
|
49
49
|
/* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
|
|
50
50
|
"video",
|
|
51
51
|
{
|
|
52
|
-
src: "https://storage.googleapis.com/
|
|
52
|
+
src: "https://storage.googleapis.com/gvabox/media/samples/stock.mp4",
|
|
53
53
|
muted: f,
|
|
54
54
|
width: "100%",
|
|
55
55
|
height: "100%",
|
|
@@ -60,21 +60,21 @@ const E = ({ isMobileScreen: o, skipAutoClose: a, sidebar: s, banner: p, event:
|
|
|
60
60
|
}
|
|
61
61
|
) }),
|
|
62
62
|
/* @__PURE__ */ r(
|
|
63
|
-
|
|
63
|
+
S,
|
|
64
64
|
{
|
|
65
65
|
style: {
|
|
66
66
|
...t === "cover" ? { position: "absolute" } : {},
|
|
67
67
|
...p === "top" ? { top: 0, order: -1 } : { bottom: 0 }
|
|
68
68
|
},
|
|
69
69
|
children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
|
|
70
|
-
|
|
70
|
+
d,
|
|
71
71
|
{
|
|
72
72
|
isMobileScreen: o,
|
|
73
|
-
event:
|
|
73
|
+
event: m,
|
|
74
74
|
sdk: e,
|
|
75
75
|
banner: p,
|
|
76
76
|
layoutMode: t,
|
|
77
|
-
skipAutoClose:
|
|
77
|
+
skipAutoClose: n,
|
|
78
78
|
persistent: !0
|
|
79
79
|
}
|
|
80
80
|
) })
|
|
@@ -82,20 +82,20 @@ const E = ({ isMobileScreen: o, skipAutoClose: a, sidebar: s, banner: p, event:
|
|
|
82
82
|
)
|
|
83
83
|
] })
|
|
84
84
|
] }),
|
|
85
|
-
/* @__PURE__ */ r(
|
|
86
|
-
|
|
85
|
+
/* @__PURE__ */ r(T, { children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
|
|
86
|
+
d,
|
|
87
87
|
{
|
|
88
88
|
isMobileScreen: o,
|
|
89
|
-
event:
|
|
89
|
+
event: m,
|
|
90
90
|
sdk: e,
|
|
91
|
-
sidebar:
|
|
91
|
+
sidebar: l,
|
|
92
92
|
layoutMode: t,
|
|
93
|
-
skipAutoClose:
|
|
93
|
+
skipAutoClose: n,
|
|
94
94
|
persistent: !0
|
|
95
95
|
}
|
|
96
96
|
) }) })
|
|
97
97
|
] });
|
|
98
98
|
};
|
|
99
99
|
export {
|
|
100
|
-
|
|
100
|
+
K as Video
|
|
101
101
|
};
|
package/lib/app/app/styles.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export declare const SDKWhiteContainer: {
|
|
|
6
6
|
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
7
7
|
as?: React.ElementType;
|
|
8
8
|
}>;
|
|
9
|
+
export declare const SDKSummaryContainer: {
|
|
10
|
+
__wyw_meta: unknown;
|
|
11
|
+
} & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
}>;
|
|
9
14
|
export declare const TabsContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
10
15
|
export declare const LeaderboardContainer: {
|
|
11
16
|
__wyw_meta: unknown;
|
package/lib/app/app/styles.js
CHANGED
|
@@ -1,44 +1,49 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const p = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "SDKContainer",
|
|
4
4
|
class: "sopqfe6",
|
|
5
5
|
propsAsIs: !1
|
|
6
|
-
}),
|
|
6
|
+
}), c = /* @__PURE__ */ s("div")({
|
|
7
7
|
name: "SDKScrollContainer",
|
|
8
8
|
class: "s102vcph",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), n = /* @__PURE__ */ s("div")({
|
|
11
11
|
name: "SDKContentContainer",
|
|
12
12
|
class: "s1meqjjv",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
-
}),
|
|
14
|
+
}), e = () => n, a = /* @__PURE__ */ s(e())({
|
|
15
15
|
name: "SDKWhiteContainer",
|
|
16
16
|
class: "s1burm22",
|
|
17
17
|
propsAsIs: !0
|
|
18
|
-
}),
|
|
18
|
+
}), r = () => a, m = /* @__PURE__ */ s(r())({
|
|
19
|
+
name: "SDKSummaryContainer",
|
|
20
|
+
class: "sm5r3j5",
|
|
21
|
+
propsAsIs: !0
|
|
22
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
19
23
|
name: "TabsContainer",
|
|
20
|
-
class: "
|
|
24
|
+
class: "tysxwr6",
|
|
21
25
|
propsAsIs: !1
|
|
22
|
-
}), o = () => n,
|
|
26
|
+
}), o = () => n, C = /* @__PURE__ */ s(o())({
|
|
23
27
|
name: "LeaderboardContainer",
|
|
24
|
-
class: "
|
|
28
|
+
class: "l9er3b1",
|
|
25
29
|
propsAsIs: !0
|
|
26
|
-
}),
|
|
30
|
+
}), t = () => a, S = /* @__PURE__ */ s(t())({
|
|
27
31
|
name: "TabsNavContainer",
|
|
28
|
-
class: "
|
|
32
|
+
class: "t19dtrb3",
|
|
29
33
|
propsAsIs: !0
|
|
30
|
-
}),
|
|
34
|
+
}), d = /* @__PURE__ */ s("div")({
|
|
31
35
|
name: "UserSummaryContainer",
|
|
32
|
-
class: "
|
|
36
|
+
class: "u1552n3j",
|
|
33
37
|
propsAsIs: !1
|
|
34
38
|
});
|
|
35
39
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
C as LeaderboardContainer,
|
|
41
|
+
p as SDKContainer,
|
|
42
|
+
n as SDKContentContainer,
|
|
43
|
+
c as SDKScrollContainer,
|
|
44
|
+
m as SDKSummaryContainer,
|
|
45
|
+
a as SDKWhiteContainer,
|
|
46
|
+
l as TabsContainer,
|
|
47
|
+
S as TabsNavContainer,
|
|
48
|
+
d as UserSummaryContainer
|
|
44
49
|
};
|