@streamlayer/react-ui 1.26.0 → 1.27.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/app/Advertisement/index.d.ts +1 -0
- package/lib/app/app/Advertisement/index.js +125 -92
- package/lib/app/app/Banner/index.d.ts +6 -0
- package/lib/app/app/Banner/index.js +6 -0
- package/lib/app/app/Features/Gamification/Question.d.ts +4 -0
- package/lib/app/app/Features/Gamification/Question.js +79 -50
- package/lib/app/app/Features/Gamification/QuestionAdvertisement.d.ts +6 -0
- package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +46 -0
- package/lib/app/app/Features/Gamification/Tabs.js +12 -12
- package/lib/app/app/Features/Gamification/index.d.ts +3 -0
- package/lib/app/app/Features/Gamification/index.js +56 -52
- package/lib/app/app/Features/index.d.ts +1 -0
- package/lib/app/app/Features/index.js +6 -4
- package/lib/app/app/InApp/index.d.ts +1 -0
- package/lib/app/app/InApp/index.js +44 -17
- package/lib/app/app/Insight/index.d.ts +3 -0
- package/lib/app/app/Insight/index.js +33 -30
- package/lib/app/app/Layout/index.d.ts +17 -0
- package/lib/app/app/Layout/index.js +105 -0
- package/lib/app/app/Layout/styles.d.ts +12 -0
- package/lib/app/app/Layout/styles.js +64 -0
- package/lib/app/app/Notifications/Onboarding/Notification/styles.d.ts +7 -1
- package/lib/app/app/Notifications/styles.d.ts +18 -2
- package/lib/app/app/index.d.ts +1 -0
- package/lib/app/app/index.js +91 -85
- package/lib/app/app/story/index.js +56 -58
- package/lib/app/app/story/promotion/index.js +31 -36
- package/lib/app/app/story/promotion/styles.d.ts +3 -1
- package/lib/app/app/story/promotion/video.js +63 -81
- package/lib/app/app/story/promotion-notification/styles.d.ts +3 -1
- package/lib/app/app/story/styles.d.ts +5 -1
- package/lib/app/app/story/styles.js +36 -16
- package/lib/app/app/story/video.d.ts +5 -1
- package/lib/app/app/story/video.js +70 -33
- package/lib/app/app/useApp.d.ts +1 -2
- package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +7 -1
- package/lib/app/masters/BetPack/BetPackContent/index.js +175 -187
- package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +84 -84
- package/lib/app/masters/BetPack/BetPackOverlay/styles.d.ts +14 -2
- package/lib/app/masters/Features/Gamification/Question.js +19 -17
- package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +7 -1
- package/lib/app/masters/Notifications/styles.d.ts +18 -2
- package/lib/app/masters/masters.d.ts +4 -1
- package/lib/app/masters/useMastersApp.d.ts +1 -1
- package/lib/app/tgl/styles.d.ts +3 -1
- package/lib/app/{tvos → webos/Advertisement}/AdvertisementUI.d.ts +7 -1
- package/lib/app/webos/Advertisement/AdvertisementUI.js +63 -0
- package/lib/app/{tvos/Advertisement.d.ts → webos/Advertisement/index.d.ts} +3 -1
- package/lib/app/webos/Advertisement/index.js +119 -0
- package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +15 -0
- package/lib/app/webos/ExposedPauseAd/PauseAd.js +93 -0
- package/lib/app/webos/ExposedPauseAd/styles.d.ts +12 -0
- package/lib/app/webos/ExposedPauseAd/styles.js +64 -0
- package/lib/app/webos/Question/index.d.ts +9 -0
- package/lib/app/webos/Question/index.js +56 -0
- package/lib/app/webos/index.d.ts +24 -0
- package/lib/app/webos/index.js +65 -0
- package/lib/app/webos/story.d.ts +9 -0
- package/lib/app/webos/story.js +74 -0
- package/lib/app/webos/styles.js +4 -0
- package/lib/app/webos/ui/Layout/index.js +78 -0
- package/lib/app/{tvos → webos}/ui/Layout/styles.js +25 -25
- package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +7 -0
- package/lib/app/webos/ui/Sidebar/PromoAction.js +63 -0
- package/lib/app/{tvos → webos}/ui/Sidebar/index.d.ts +6 -0
- package/lib/app/webos/ui/Sidebar/index.js +176 -0
- package/lib/app/{tvos → webos}/ui/Sidebar/styles.d.ts +7 -3
- package/lib/app/{tvos → webos}/ui/Sidebar/styles.js +175 -170
- package/lib/app/webos/ui/insight/index.d.ts +9 -0
- package/lib/app/webos/ui/insight/index.js +100 -0
- package/lib/app/webos/ui/insight/styles.d.ts +12 -0
- package/lib/app/webos/ui/insight/styles.js +51 -0
- package/lib/app/webos/useTvButton.d.ts +9 -0
- package/lib/app/webos/useTvButton.js +23 -0
- package/lib/assets/style.css +1 -1
- package/lib/hooks/analytics.d.ts +14 -0
- package/lib/hooks/showIn.d.ts +9 -0
- package/lib/hooks/useKeyboardNavigation.d.ts +15 -0
- package/lib/hooks/useKeyboardNavigation.js +74 -0
- package/lib/index-T1iiS0ZO.js +17 -0
- package/lib/ui/advertisement/banner/index.d.ts +3 -0
- package/lib/ui/advertisement/banner/index.js +29 -17
- package/lib/ui/advertisement/banner/styles.d.ts +5 -1
- package/lib/ui/advertisement/index.d.ts +4 -1
- package/lib/ui/advertisement/index.js +56 -44
- package/lib/ui/advertisement/notification/index.d.ts +2 -0
- package/lib/ui/advertisement/notification/index.js +50 -34
- package/lib/ui/advertisement/notification/lower-third/index.d.ts +2 -0
- package/lib/ui/advertisement/notification/lower-third/index.js +42 -26
- package/lib/ui/advertisement/notification/lower-third/styles.d.ts +11 -0
- package/lib/ui/advertisement/notification/lower-third/styles.js +39 -24
- package/lib/ui/advertisement/notification/styles.d.ts +18 -1
- package/lib/ui/advertisement/notification/styles.js +48 -33
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.d.ts +2 -2
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +1 -1
- package/lib/ui/advertisement/overlay/index.d.ts +4 -1
- package/lib/ui/advertisement/overlay/index.js +135 -77
- package/lib/ui/gamification/detail/header/index.d.ts +2 -0
- package/lib/ui/gamification/detail/header/index.js +19 -16
- package/lib/ui/gamification/detail/header/styles.d.ts +15 -3
- package/lib/ui/gamification/detail/header/styles.js +1 -1
- package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -0
- package/lib/ui/gamification/detail/sponsor/index.js +25 -13
- package/lib/ui/gamification/invite-link/styles.d.ts +14 -2
- package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +14 -2
- package/lib/ui/gamification/onboarding/styles.d.ts +10 -2
- package/lib/ui/gamification/points/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +48 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +94 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/index.js +99 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.d.ts +42 -0
- package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.js +117 -0
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +9 -8
- package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/onboarding/index.js +12 -12
- package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +18 -2
- package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +9 -9
- package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +7 -1
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.d.ts +5 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.js +49 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +12 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.js +56 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.d.ts +1 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.js +19 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.d.ts +4 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.js +34 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.d.ts +7 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.js +43 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.d.ts +9 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +10 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/index.js +20 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.d.ts +11 -0
- package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.js +34 -0
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +38 -5
- package/lib/ui/gamification/question/notification/styles.d.ts +14 -2
- package/lib/ui/gamification/question/styles.d.ts +26 -4
- package/lib/ui/gamification/vote/alert/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/feedback/styles.d.ts +19 -2
- package/lib/ui/gamification/vote/feedbackAlert/index.d.ts +9 -0
- package/lib/ui/gamification/vote/feedbackAlert/index.js +11 -0
- package/lib/ui/gamification/vote/feedbackAlert/styles.d.ts +11 -0
- package/lib/ui/gamification/vote/feedbackAlert/styles.js +30 -0
- package/lib/ui/gamification/vote/index.d.ts +3 -1
- package/lib/ui/gamification/vote/index.js +160 -130
- package/lib/ui/gamification/vote/insight-details/index.js +8 -7
- package/lib/ui/gamification/vote/insight-details/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/styles.d.ts +29 -4
- package/lib/ui/gamification/vote/vote-option/index.d.ts +3 -0
- package/lib/ui/gamification/vote/vote-option/index.js +72 -64
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +7 -1
- package/lib/ui/gamification/vote/win-bar/styles.d.ts +19 -2
- package/lib/ui/icons/index.d.ts +1 -0
- package/lib/ui/icons/index.js +80 -79
- package/lib/ui/modal/index.js +12 -17
- package/lib/ui/questions/insight/index.d.ts +4 -1
- package/lib/ui/questions/insight/index.js +29 -26
- package/lib/ui/questions/twitter/account/styles.d.ts +7 -1
- package/lib/ui/questions/twitter/index.d.ts +1 -0
- package/lib/ui/questions/twitter/index.js +27 -19
- package/lib/ui/theme/constants.d.ts +2 -0
- package/lib/ui/theme/constants.js +2 -0
- package/lib/ui/theme/masters-theme.js +1 -0
- package/lib/ui/theme/utils.d.ts +10 -0
- package/lib/ui/theme/utils.js +77 -0
- package/lib/ui/video-player/index.d.ts +10 -2
- package/lib/ui/video-player/index.js +189 -110
- package/lib/ui/video-player/styles.d.ts +36 -0
- package/lib/ui/video-player/styles.js +59 -11
- package/lib/utils/common.d.ts +6 -0
- package/lib/utils/createDemo.d.ts +12 -0
- package/lib/utils/debug/components/bypassLogin.d.ts +6 -0
- package/lib/utils/debug/components/copyLogs.d.ts +1 -0
- package/lib/utils/debug/components/developer.d.ts +14 -0
- package/lib/utils/debug/components/envToggle.d.ts +6 -0
- package/lib/utils/debug/components/eventInput.d.ts +8 -0
- package/lib/utils/debug/components/sdkKey.d.ts +6 -0
- package/lib/utils/debug/components/styles.d.ts +1 -0
- package/lib/utils/debug/index.d.ts +36 -0
- package/lib/utils/debug/storage.d.ts +14 -0
- package/lib/utils/decorators/container.d.ts +6 -0
- package/lib/utils/decorators/container.js +5 -5
- package/lib/utils/decorators/masters.d.ts +2 -0
- package/lib/utils/decorators/styles.d.ts +2 -0
- package/lib/utils/login.d.ts +3 -0
- package/lib/utils/storage.d.ts +14 -0
- package/package.json +27 -20
- package/lib/app/tvos/Advertisement.js +0 -88
- package/lib/app/tvos/AdvertisementUI.js +0 -40
- package/lib/app/tvos/index.d.ts +0 -16
- package/lib/app/tvos/index.js +0 -23
- package/lib/app/tvos/story.d.ts +0 -6
- package/lib/app/tvos/story.js +0 -34
- package/lib/app/tvos/styles.js +0 -4
- package/lib/app/tvos/ui/Layout/index.js +0 -76
- package/lib/app/tvos/ui/Sidebar/PromoAction.d.ts +0 -2
- package/lib/app/tvos/ui/Sidebar/PromoAction.js +0 -62
- package/lib/app/tvos/ui/Sidebar/index.js +0 -114
- /package/lib/app/{tvos → webos}/styles.d.ts +0 -0
- /package/lib/app/{tvos → webos}/ui/Layout/index.d.ts +0 -0
- /package/lib/app/{tvos → webos}/ui/Layout/styles.d.ts +0 -0
package/lib/ui/modal/index.js
CHANGED
|
@@ -3,31 +3,26 @@ import { styled as y } from "@linaria/react";
|
|
|
3
3
|
import { useState as d, useEffect as a } from "react";
|
|
4
4
|
import { r as u } from "../../index-DALxy-8N.js";
|
|
5
5
|
import { BREAKPOINTS as m } from "../theme/constants.js";
|
|
6
|
-
|
|
6
|
+
import { hideContentStyles as O } from "../theme/utils.js";
|
|
7
|
+
const S = /* @__PURE__ */ y("div")({
|
|
7
8
|
name: "StaticContainer",
|
|
8
9
|
class: "svm502q",
|
|
9
10
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
11
|
-
.sl-hide-on-modal {
|
|
12
|
-
height: 0 !important;
|
|
13
|
-
opacity: 0 !important;
|
|
14
|
-
overflow: hidden !important;
|
|
15
|
-
}
|
|
16
|
-
`, C = `
|
|
11
|
+
}), C = `
|
|
17
12
|
.sl-pill-button {
|
|
18
13
|
display: none !important;
|
|
19
14
|
}
|
|
20
15
|
`, p = () => window.innerWidth >= m.md && window.innerWidth < m.lg ? 76 : 53, f = (e) => {
|
|
21
|
-
var
|
|
16
|
+
var r;
|
|
22
17
|
const t = p();
|
|
23
|
-
return Math.round((((
|
|
24
|
-
},
|
|
18
|
+
return Math.round((((r = e.current) == null ? void 0 : r.getBoundingClientRect().y) || 0) - t) <= 0;
|
|
19
|
+
}, R = ({
|
|
25
20
|
children: e,
|
|
26
21
|
container: t,
|
|
27
|
-
useContainer:
|
|
22
|
+
useContainer: r,
|
|
28
23
|
staticStyles: w
|
|
29
24
|
}) => {
|
|
30
|
-
const [s] = d(() => f(t)), [
|
|
25
|
+
const [s] = d(() => f(t)), [n, i] = d(!1);
|
|
31
26
|
return a(() => {
|
|
32
27
|
if (!t.current || !s)
|
|
33
28
|
return i(!0), () => {
|
|
@@ -40,17 +35,17 @@ const O = /* @__PURE__ */ y("div")({
|
|
|
40
35
|
});
|
|
41
36
|
};
|
|
42
37
|
}, []), a(() => {
|
|
43
|
-
if (
|
|
38
|
+
if (n && t.current && s) {
|
|
44
39
|
const o = p();
|
|
45
40
|
window.scrollTo({
|
|
46
41
|
top: t.current.offsetTop - o,
|
|
47
42
|
behavior: "instant"
|
|
48
43
|
});
|
|
49
44
|
}
|
|
50
|
-
}, [
|
|
45
|
+
}, [n]), !t.current || !n ? null : r ? u.createPortal(/* @__PURE__ */ c(S, {
|
|
51
46
|
className: "StaticContainer",
|
|
52
47
|
children: [e, /* @__PURE__ */ l("style", {
|
|
53
|
-
children:
|
|
48
|
+
children: O
|
|
54
49
|
}), /* @__PURE__ */ l("style", {
|
|
55
50
|
children: C
|
|
56
51
|
})]
|
|
@@ -61,5 +56,5 @@ const O = /* @__PURE__ */ y("div")({
|
|
|
61
56
|
}), t.current, "modal-node");
|
|
62
57
|
};
|
|
63
58
|
export {
|
|
64
|
-
|
|
59
|
+
R as ModalPortal
|
|
65
60
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { InsightHistory } from '@streamlayer/sdk-web-types';
|
|
1
|
+
import { InsightHistory, Promotion } from '@streamlayer/sdk-web-types';
|
|
2
2
|
import { VideoPlayerProps } from '../../video-player';
|
|
3
3
|
export type InsightContentProps = InsightHistory & {
|
|
4
4
|
isDetail?: boolean;
|
|
5
|
+
muted?: boolean;
|
|
6
|
+
webos?: boolean;
|
|
7
|
+
adPromotion?: Promotion;
|
|
5
8
|
controlVideo: VideoPlayerProps['controlVideo'];
|
|
6
9
|
};
|
|
7
10
|
export declare const InsightContent: React.FC<InsightContentProps>;
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { AutoPlayVideo as
|
|
3
|
-
import { VideoPlayer as
|
|
4
|
-
import { Container as
|
|
5
|
-
const
|
|
6
|
-
instantView:
|
|
1
|
+
import { jsxs as g, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { AutoPlayVideo as v, QuestionImages as P } from "@streamlayer/sdk-web-types";
|
|
3
|
+
import { VideoPlayer as b } from "../../video-player/index.js";
|
|
4
|
+
import { Container as x, contentContainerClassName as y, ImageContainer as B, Image as D, Content as E, Title as T, Description as j } from "./styles.js";
|
|
5
|
+
const O = ({
|
|
6
|
+
instantView: r,
|
|
7
7
|
isDetail: l,
|
|
8
|
-
notification:
|
|
9
|
-
controlVideo:
|
|
8
|
+
notification: o,
|
|
9
|
+
controlVideo: p,
|
|
10
|
+
muted: C
|
|
10
11
|
}) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
var e, h;
|
|
13
|
+
const m = r == null ? void 0 : r.heading, u = r == null ? void 0 : r.body, c = m || u, I = o == null ? void 0 : o.title, N = o == null ? void 0 : o.body;
|
|
14
|
+
return /* @__PURE__ */ g(x, { children: [
|
|
15
|
+
((e = r == null ? void 0 : r.video) == null ? void 0 : e.url) && /* @__PURE__ */ d(
|
|
16
|
+
b,
|
|
15
17
|
{
|
|
16
|
-
className:
|
|
17
|
-
source:
|
|
18
|
-
poster:
|
|
19
|
-
controlVideo:
|
|
20
|
-
|
|
18
|
+
className: y,
|
|
19
|
+
source: r.video.url,
|
|
20
|
+
poster: r.video.thumbnailUrl,
|
|
21
|
+
controlVideo: p,
|
|
22
|
+
muted: C,
|
|
23
|
+
autoPlay: l && r.autoPlayVideo === v.ENABLED
|
|
21
24
|
}
|
|
22
25
|
),
|
|
23
|
-
(
|
|
24
|
-
|
|
26
|
+
(r == null ? void 0 : r.image) && !((h = r == null ? void 0 : r.video) != null && h.url) && /* @__PURE__ */ d(
|
|
27
|
+
B,
|
|
25
28
|
{
|
|
26
|
-
className:
|
|
27
|
-
"data-rounded":
|
|
28
|
-
children: /* @__PURE__ */ d(
|
|
29
|
+
className: y,
|
|
30
|
+
"data-rounded": r.imageMode === P.ROUNDED,
|
|
31
|
+
children: /* @__PURE__ */ d(D, { src: r == null ? void 0 : r.image })
|
|
29
32
|
}
|
|
30
33
|
),
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */ d(
|
|
33
|
-
/* @__PURE__ */ d(
|
|
34
|
+
/* @__PURE__ */ g(E, { children: [
|
|
35
|
+
/* @__PURE__ */ d(T, { children: l && c ? m : I }),
|
|
36
|
+
/* @__PURE__ */ d(j, { children: l && c ? u : N })
|
|
34
37
|
] })
|
|
35
38
|
] });
|
|
36
39
|
};
|
|
37
40
|
export {
|
|
38
|
-
|
|
41
|
+
O as InsightContent
|
|
39
42
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
2
2
|
export declare const ImageContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export declare const Image: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
4
|
-
export declare const TwitterIcon:
|
|
4
|
+
export declare const TwitterIcon: {
|
|
5
|
+
__wyw_meta: unknown;
|
|
6
|
+
} & import('react').FC<{
|
|
7
|
+
name: keyof typeof import('../../../icons').icons;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
className?: string;
|
|
10
|
+
}>;
|
|
5
11
|
export declare const Details: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
12
|
export declare const Name: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
13
|
export declare const UserNameAndDate: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -3,6 +3,7 @@ import { VideoPlayerProps } from '../../video-player';
|
|
|
3
3
|
export declare const sanitizeContent: (text: string) => string;
|
|
4
4
|
export type TwitterContentProps = TweetHistory & {
|
|
5
5
|
isDetail?: boolean;
|
|
6
|
+
muted?: boolean;
|
|
6
7
|
controlVideo: VideoPlayerProps['controlVideo'];
|
|
7
8
|
};
|
|
8
9
|
export declare const TwitterContent: React.FC<TwitterContentProps>;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsxs as o, jsx as s, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { VideoPlayer as
|
|
4
|
-
import { Account as
|
|
5
|
-
import { Container as
|
|
6
|
-
const
|
|
7
|
-
({ image: c, body: y,
|
|
1
|
+
import { jsxs as o, jsx as s, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { memo as x, useMemo as B } from "react";
|
|
3
|
+
import { VideoPlayer as E } from "../../video-player/index.js";
|
|
4
|
+
import { Account as L } from "./account/index.js";
|
|
5
|
+
import { Container as N, Details as R, Body as S, ImagesContainer as l, ImageFullSize as t, ImageHalfSize as p, ImagesBlock as a } from "./styles.js";
|
|
6
|
+
const A = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), D = (c) => c == null ? void 0 : c.replace(A, ""), b = x(
|
|
7
|
+
({ image: c, body: y, muted: C, account: z, accountVerified: F, tweet: n, isDetail: d, controlVideo: T }) => {
|
|
8
8
|
var h, g, H, U, f;
|
|
9
|
-
const r = (g = (h = n == null ? void 0 : n.meta) == null ? void 0 : h.extendedEntities) == null ? void 0 : g.media, i = r == null ? void 0 : r.find(({ type: e }) => e === "photo"), m =
|
|
9
|
+
const r = (g = (h = n == null ? void 0 : n.meta) == null ? void 0 : h.extendedEntities) == null ? void 0 : g.media, i = r == null ? void 0 : r.find(({ type: e }) => e === "photo"), m = B(() => {
|
|
10
10
|
var e, u, v, I;
|
|
11
|
-
return (I = (v = (u = (e = r == null ? void 0 : r[0]) == null ? void 0 : e.videoInfo) == null ? void 0 : u.variants) == null ? void 0 : v.findLast(({ contentType:
|
|
11
|
+
return (I = (v = (u = (e = r == null ? void 0 : r[0]) == null ? void 0 : e.videoInfo) == null ? void 0 : u.variants) == null ? void 0 : v.findLast(({ contentType: j }) => j === "video/mp4")) == null ? void 0 : I.url;
|
|
12
12
|
}, [r]);
|
|
13
|
-
return /* @__PURE__ */ o(
|
|
14
|
-
/* @__PURE__ */ o(
|
|
13
|
+
return /* @__PURE__ */ o(N, { children: [
|
|
14
|
+
/* @__PURE__ */ o(R, { children: [
|
|
15
15
|
/* @__PURE__ */ s(
|
|
16
|
-
|
|
16
|
+
L,
|
|
17
17
|
{
|
|
18
18
|
image: c,
|
|
19
19
|
name: (H = n == null ? void 0 : n.meta) == null ? void 0 : H.accountName,
|
|
20
|
-
userName:
|
|
21
|
-
verified:
|
|
20
|
+
userName: z,
|
|
21
|
+
verified: F,
|
|
22
22
|
createdTweet: n == null ? void 0 : n.date
|
|
23
23
|
}
|
|
24
24
|
),
|
|
25
|
-
/* @__PURE__ */ s(
|
|
25
|
+
/* @__PURE__ */ s(S, { children: D(y) }),
|
|
26
26
|
!d && i && /* @__PURE__ */ s(l, { children: /* @__PURE__ */ s(t, { src: r == null ? void 0 : r[0].mediaUrlHttps }) }),
|
|
27
|
-
d && i && /* @__PURE__ */ o(
|
|
27
|
+
d && i && /* @__PURE__ */ o(k, { children: [
|
|
28
28
|
(r == null ? void 0 : r.length) === 1 && /* @__PURE__ */ s(l, { children: /* @__PURE__ */ s(t, { src: r[0].mediaUrlHttps }) }),
|
|
29
29
|
(r == null ? void 0 : r.length) === 2 && /* @__PURE__ */ o(l, { children: [
|
|
30
30
|
/* @__PURE__ */ s(p, { src: r[0].mediaUrlHttps }),
|
|
@@ -49,11 +49,19 @@ const S = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), A = (c) => c == null ?
|
|
|
49
49
|
] })
|
|
50
50
|
] })
|
|
51
51
|
] }),
|
|
52
|
-
!i && (((U = r == null ? void 0 : r[0]) == null ? void 0 : U.type) === "video" || ((f = r == null ? void 0 : r[0]) == null ? void 0 : f.type) === "animated_gif") && m && /* @__PURE__ */ s(
|
|
52
|
+
!i && (((U = r == null ? void 0 : r[0]) == null ? void 0 : U.type) === "video" || ((f = r == null ? void 0 : r[0]) == null ? void 0 : f.type) === "animated_gif") && m && /* @__PURE__ */ s(
|
|
53
|
+
E,
|
|
54
|
+
{
|
|
55
|
+
muted: C,
|
|
56
|
+
source: m,
|
|
57
|
+
poster: r[0].mediaUrlHttps,
|
|
58
|
+
controlVideo: T
|
|
59
|
+
}
|
|
60
|
+
)
|
|
53
61
|
] });
|
|
54
62
|
}
|
|
55
63
|
);
|
|
56
64
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
65
|
+
b as TwitterContent,
|
|
66
|
+
D as sanitizeContent
|
|
59
67
|
};
|
|
@@ -10,6 +10,7 @@ export declare const COLORS: {
|
|
|
10
10
|
SECONDARY_TEXT: string;
|
|
11
11
|
QUESTION_TYPE_ICON: string;
|
|
12
12
|
QUESTION_BODY_TEXT: string;
|
|
13
|
+
PRESENTED_BY_TEXT: string;
|
|
13
14
|
SUCCESS: string;
|
|
14
15
|
UNSUCCESS: string;
|
|
15
16
|
SECONDARY_RED1: string;
|
|
@@ -52,6 +53,7 @@ export declare const COLORS: {
|
|
|
52
53
|
VOTE_BTN_SELECTED_BORDER: string;
|
|
53
54
|
VOTE_BTN_NOT_SELECTED_BORDER: string;
|
|
54
55
|
VOTE_BTN_SELECTED_BG: string;
|
|
56
|
+
VOTE_BTN_SELECTED_BG_AD_UNIT: string;
|
|
55
57
|
VOTE_BTN_NOT_SELECTED_BG: string;
|
|
56
58
|
VOTE_BTN_NOT_SELECTED_BG_UNSET: string;
|
|
57
59
|
VOTED_ANSWER_BG: string;
|
|
@@ -12,6 +12,7 @@ const R = {
|
|
|
12
12
|
SECONDARY_TEXT: "rgba(10, 14, 19, 0.70)",
|
|
13
13
|
QUESTION_TYPE_ICON: "#1D7BFF",
|
|
14
14
|
QUESTION_BODY_TEXT: "#090E13",
|
|
15
|
+
PRESENTED_BY_TEXT: "#090E13",
|
|
15
16
|
SUCCESS: "#107D57",
|
|
16
17
|
UNSUCCESS: "#DF2F3B",
|
|
17
18
|
SECONDARY_RED1: "#DF2F3B",
|
|
@@ -54,6 +55,7 @@ const R = {
|
|
|
54
55
|
VOTE_BTN_SELECTED_BORDER: "#25282A",
|
|
55
56
|
VOTE_BTN_NOT_SELECTED_BORDER: "#E8E8E8",
|
|
56
57
|
VOTE_BTN_SELECTED_BG: "#FFFFFF",
|
|
58
|
+
VOTE_BTN_SELECTED_BG_AD_UNIT: "#FFFFFF",
|
|
57
59
|
VOTE_BTN_NOT_SELECTED_BG: "#FFFFFF",
|
|
58
60
|
VOTE_BTN_NOT_SELECTED_BG_UNSET: "rgb(196, 196, 196)",
|
|
59
61
|
VOTED_ANSWER_BG: "#FFFFFF",
|
|
@@ -187,6 +187,7 @@ const _ = {
|
|
|
187
187
|
--display-question-container: initial;
|
|
188
188
|
--justify-content-question-container: initial;
|
|
189
189
|
--color-question-body-text: #006747;
|
|
190
|
+
--color-presented-by-text: #006747;
|
|
190
191
|
--nav-border: 1px solid var(--color-neutrals-gray3);
|
|
191
192
|
`, f = "m1ojpy2l";
|
|
192
193
|
export {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const hideContentStyles = "\n .sl-hide-on-modal {\n height: 0 !important;\n opacity: 0 !important;\n overflow: hidden !important;\n transition: none;\n }\n";
|
|
2
|
+
export declare const getContainerBgStyles: ({ containerId, url, }: {
|
|
3
|
+
containerId?: string;
|
|
4
|
+
url: string;
|
|
5
|
+
}) => string;
|
|
6
|
+
export declare const useAdvertisementBackground: ({ containerId, landscapeUrl, portraitUrl, }: {
|
|
7
|
+
containerId?: string;
|
|
8
|
+
landscapeUrl?: string;
|
|
9
|
+
portraitUrl?: string;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as l, useMemo as s, useEffect as m } from "react";
|
|
3
|
+
const u = `
|
|
4
|
+
.sl-hide-on-modal {
|
|
5
|
+
height: 0 !important;
|
|
6
|
+
opacity: 0 !important;
|
|
7
|
+
overflow: hidden !important;
|
|
8
|
+
transition: none;
|
|
9
|
+
}
|
|
10
|
+
`, p = ({
|
|
11
|
+
containerId: t = "SlLayoutContainer",
|
|
12
|
+
url: n
|
|
13
|
+
}) => `
|
|
14
|
+
#${t || "SlLayoutContainer"},
|
|
15
|
+
#${t || "SlLayoutContainer"} .StreamLayerSDK>.StreamLayerSDKTheme > * {
|
|
16
|
+
--color-sdk-container-bg: transparent !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
#${t || "SlLayoutContainer"}::before {
|
|
20
|
+
content: '';
|
|
21
|
+
display: block;
|
|
22
|
+
position: absolute;
|
|
23
|
+
inset: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
background-color: #1a1a1a;
|
|
27
|
+
background-size: cover !important;
|
|
28
|
+
background-position: center !important;
|
|
29
|
+
background-repeat: no-repeat !important;
|
|
30
|
+
background-image: ${n} !important;
|
|
31
|
+
z-index: 0;
|
|
32
|
+
|
|
33
|
+
opacity: 0;
|
|
34
|
+
animation: fade-sl-bg-in 0.3s linear forwards;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#${t || "SlLayoutContainer"} > div {
|
|
38
|
+
position: relative;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes fade-sl-bg-in {
|
|
43
|
+
from {
|
|
44
|
+
opacity: 0;
|
|
45
|
+
}
|
|
46
|
+
to {
|
|
47
|
+
opacity: 1;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
${u}
|
|
52
|
+
`, y = ({
|
|
53
|
+
containerId: t,
|
|
54
|
+
landscapeUrl: n,
|
|
55
|
+
portraitUrl: i
|
|
56
|
+
}) => {
|
|
57
|
+
const [r, a] = l(!1), o = s(() => {
|
|
58
|
+
const e = window.innerWidth, c = window.innerHeight;
|
|
59
|
+
return a(!1), e > c ? n : i;
|
|
60
|
+
}, [n, i]);
|
|
61
|
+
return m(() => {
|
|
62
|
+
if (o) {
|
|
63
|
+
const e = new Image();
|
|
64
|
+
e.src = o, e.onload = function() {
|
|
65
|
+
a(!0);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}, [o]), s(() => {
|
|
69
|
+
const e = o ? `url("${o}")` : void 0;
|
|
70
|
+
return e && r ? /* @__PURE__ */ d("style", { children: p({ containerId: t, url: e }) }) : null;
|
|
71
|
+
}, [t, o, r]);
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
p as getContainerBgStyles,
|
|
75
|
+
u as hideContentStyles,
|
|
76
|
+
y as useAdvertisementBackground
|
|
77
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
type ControlVideoProps = {
|
|
2
3
|
muted: boolean;
|
|
3
4
|
};
|
|
@@ -8,8 +9,15 @@ export type VideoPlayerProps = {
|
|
|
8
9
|
aspectRatio?: string;
|
|
9
10
|
onPlay?: () => void;
|
|
10
11
|
onPause?: () => void;
|
|
12
|
+
onReplay?: () => void;
|
|
13
|
+
onEnd?: () => void;
|
|
14
|
+
onRender?: () => void;
|
|
15
|
+
onMute?: (muted?: boolean) => void;
|
|
16
|
+
onQuartile?: (quartile: 25 | 50 | 75) => void;
|
|
11
17
|
autoPlay?: boolean;
|
|
12
|
-
|
|
18
|
+
playMuted?: boolean;
|
|
19
|
+
muted?: boolean;
|
|
20
|
+
webos?: boolean;
|
|
13
21
|
className?: string;
|
|
14
22
|
};
|
|
15
23
|
export type ControlVideoCb = VideoPlayerProps['controlVideo'];
|
|
@@ -41,5 +49,5 @@ export declare const pauseAllVideos: () => void;
|
|
|
41
49
|
* @param {string} props.source - The path to the video source.
|
|
42
50
|
* @returns {JSX.Element} The rendered VideoPlayer component.
|
|
43
51
|
*/
|
|
44
|
-
export declare const VideoPlayer: React.
|
|
52
|
+
export declare const VideoPlayer: React.ForwardRefExoticComponent<VideoPlayerProps & React.RefAttributes<HTMLVideoElement | null>>;
|
|
45
53
|
export {};
|