@streamlayer/react-ui 0.98.1 → 0.100.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/hooks/showIn.js +45 -0
- package/lib/{index-jRXrW6ie.js → index-Bicco-Aq.js} +1 -1
- package/lib/{index-z0QjLiEL.js → index-CZvwzN5o.js} +1 -1
- package/lib/index.js +4 -8
- package/lib/ui/app/Features/Gamification/Friends.js +10 -23
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Leaderboard.js +37 -54
- package/lib/ui/app/Features/Gamification/Question.js +33 -65
- package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Tabs.js +30 -97
- package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
- package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
- package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/index.js +68 -143
- package/lib/ui/app/Features/index.d.ts +1 -2
- package/lib/ui/app/Features/index.js +20 -109
- package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
- package/lib/ui/app/Navigation/index.js +9 -12
- package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
- package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
- package/lib/ui/app/Notifications/Onboarding/index.js +45 -72
- package/lib/ui/app/Notifications/index.js +96 -148
- package/lib/ui/app/Notifications/styles.js +10 -15
- package/lib/ui/app/Points/index.js +18 -26
- package/lib/ui/app/masters.js +71 -190
- package/lib/ui/app/useClipboardCopy.js +11 -15
- package/lib/ui/app/useMastersApp.js +34 -44
- package/lib/ui/app/useSdkResponsive.js +18 -19
- package/lib/ui/app/useSdkScroll.js +28 -26
- package/lib/ui/button/index.js +3 -4
- package/lib/ui/gamification/copyNotification/index.js +5 -7
- package/lib/ui/gamification/detail/header/index.js +15 -18
- package/lib/ui/gamification/detail/header/styles.js +12 -14
- package/lib/ui/gamification/detail/sponsor/index.js +2 -3
- package/lib/ui/gamification/insight/index.js +5 -6
- package/lib/ui/gamification/insight-list/index.js +3 -6
- package/lib/ui/gamification/invite-link/index.js +11 -17
- package/lib/ui/gamification/invite-link/styles.js +13 -15
- package/lib/ui/gamification/leaderboard/index.js +21 -28
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
- package/lib/ui/gamification/leaderboard/list-item/index.js +17 -20
- package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
- package/lib/ui/gamification/leaderboard/static.js +34 -31
- package/lib/ui/gamification/leaderboard/styles.js +1 -1
- package/lib/ui/gamification/onboarding/index.js +51 -73
- package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
- package/lib/ui/gamification/onboarding/styles.js +14 -17
- package/lib/ui/gamification/points/index.js +9 -15
- package/lib/ui/gamification/points/styles.js +12 -14
- package/lib/ui/gamification/question/index.d.ts +1 -3
- package/lib/ui/gamification/question/index.js +29 -34
- package/lib/ui/gamification/question/insight/index.d.ts +0 -1
- package/lib/ui/gamification/question/insight/index.js +7 -15
- package/lib/ui/gamification/question/list/index.js +20 -57
- package/lib/ui/gamification/question/notification/index.js +22 -35
- package/lib/ui/gamification/question/notification/insight/index.js +12 -17
- package/lib/ui/gamification/question/notification/pill/index.js +7 -9
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
- package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
- package/lib/ui/gamification/question/notification/styles.js +17 -19
- package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
- package/lib/ui/gamification/question/styles.js +32 -34
- package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
- package/lib/ui/gamification/question/twitter/index.js +8 -20
- package/lib/ui/gamification/question/twitter/styles.js +4 -6
- package/lib/ui/gamification/tabs/index.js +6 -7
- package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
- package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
- package/lib/ui/gamification/user-statistics/index.js +2 -6
- package/lib/ui/gamification/vote/alert/index.d.ts +8 -0
- package/lib/ui/gamification/vote/alert/index.js +11 -0
- package/lib/ui/gamification/vote/{expired-alert → alert}/styles.js +7 -7
- package/lib/ui/gamification/vote/feedback/index.js +29 -33
- package/lib/ui/gamification/vote/feedback/styles.js +20 -23
- package/lib/ui/gamification/vote/index.d.ts +1 -0
- package/lib/ui/gamification/vote/index.js +123 -117
- package/lib/ui/gamification/vote/insight-details/index.js +9 -16
- package/lib/ui/gamification/vote/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/styles.js +14 -8
- package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
- package/lib/ui/gamification/vote/vote-option/index.js +38 -41
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/styles.js +35 -32
- package/lib/ui/gamification/vote/win-bar/index.js +29 -37
- package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
- package/lib/ui/login/demo.d.ts +1 -0
- package/lib/ui/login/demo.js +5 -17
- package/lib/ui/login/index.js +29 -35
- package/lib/ui/modal/index.js +31 -32
- package/lib/ui/navigation/button/Channels.js +5 -8
- package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
- package/lib/ui/navigation/button/LeaderBoard.js +8 -11
- package/lib/ui/navigation/button/index.js +10 -11
- package/lib/ui/navigation/masters.js +2 -3
- package/lib/ui/questions/insight/index.js +14 -19
- package/lib/ui/questions/twitter/account/index.js +13 -15
- package/lib/ui/questions/twitter/account/styles.js +14 -16
- package/lib/ui/questions/twitter/index.js +31 -38
- package/lib/ui/show-in/index.d.ts +1 -0
- package/lib/ui/show-in/index.js +12 -10
- package/lib/ui/skeleton/index.js +3 -4
- package/lib/ui/theme/index.js +3 -5
- package/lib/ui/video-player/index.js +44 -38
- package/lib/utils/createDemo.js +18 -28
- package/lib/utils/debug/components/copyLogs.js +2 -3
- package/lib/utils/debug/components/developer.js +20 -24
- package/lib/utils/debug/components/eventInput.js +9 -10
- package/lib/utils/debug/components/sdkKey.js +9 -10
- package/lib/utils/debug/index.js +17 -28
- package/lib/utils/debug/storage.js +32 -14
- package/lib/utils/decorators/container.js +5 -9
- package/lib/utils/storage.js +32 -14
- package/package.json +25 -26
- package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
- package/lib/ui/gamification/vote/expired-alert/index.js +0 -13
- /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
- /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
- /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
package/lib/ui/modal/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { jsxs as p, jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { r as a } from "../../index-
|
|
5
|
-
import { BREAKPOINTS as
|
|
6
|
-
|
|
7
|
-
const y = /* @__PURE__ */ h("div")({
|
|
1
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { styled as w } from "@linaria/react";
|
|
3
|
+
import { useState as c, useEffect as d } from "react";
|
|
4
|
+
import { r as a } from "../../index-Bicco-Aq.js";
|
|
5
|
+
import { BREAKPOINTS as u } from "../theme/constants.js";
|
|
6
|
+
const h = /* @__PURE__ */ w("div")({
|
|
8
7
|
name: "StaticContainer",
|
|
9
8
|
class: "svm502q",
|
|
10
9
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
10
|
+
}), y = `
|
|
12
11
|
.sl-hide-on-modal {
|
|
13
12
|
height: 0 !important;
|
|
14
13
|
opacity: 0 !important;
|
|
@@ -18,43 +17,43 @@ const y = /* @__PURE__ */ h("div")({
|
|
|
18
17
|
.sl-pill-button {
|
|
19
18
|
display: none !important;
|
|
20
19
|
}
|
|
21
|
-
`,
|
|
22
|
-
|
|
20
|
+
`, m = () => window.innerWidth >= u.lg && window.innerWidth < u.xl ? 76 : 53, f = (o) => {
|
|
21
|
+
var e;
|
|
22
|
+
const t = m();
|
|
23
|
+
return Math.round((((e = o.current) == null ? void 0 : e.getBoundingClientRect().y) || 0) - t) <= 0;
|
|
24
|
+
}, x = ({
|
|
25
|
+
children: o,
|
|
23
26
|
container: t,
|
|
24
|
-
useContainer:
|
|
27
|
+
useContainer: e
|
|
25
28
|
}) => {
|
|
26
|
-
const [l] =
|
|
27
|
-
|
|
28
|
-
const e = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
|
|
29
|
-
return (((r = t.current) == null ? void 0 : r.getBoundingClientRect().y) || 0) - e < 0;
|
|
30
|
-
}), [o, s] = w(!1);
|
|
31
|
-
return m(() => {
|
|
29
|
+
const [l] = c(() => f(t)), [n, s] = c(!1);
|
|
30
|
+
return d(() => {
|
|
32
31
|
if (!t.current || !l)
|
|
33
32
|
return s(!0), () => {
|
|
34
33
|
};
|
|
35
|
-
const
|
|
34
|
+
const r = window.scrollY;
|
|
36
35
|
return s(!0), () => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
top: e
|
|
36
|
+
f(t) && window.scrollTo({
|
|
37
|
+
top: r,
|
|
38
|
+
behavior: "instant"
|
|
41
39
|
});
|
|
42
40
|
};
|
|
43
|
-
}, []),
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
41
|
+
}, []), d(() => {
|
|
42
|
+
if (n && t.current && l) {
|
|
43
|
+
const r = m();
|
|
46
44
|
window.scrollTo({
|
|
47
|
-
top: t.current.offsetTop -
|
|
45
|
+
top: t.current.offsetTop - r,
|
|
46
|
+
behavior: "instant"
|
|
48
47
|
});
|
|
49
48
|
}
|
|
50
|
-
}, [
|
|
51
|
-
children: [
|
|
52
|
-
children:
|
|
53
|
-
}), /* @__PURE__ */
|
|
49
|
+
}, [n]), !t.current || !n ? null : e ? a.createPortal(/* @__PURE__ */ p(h, {
|
|
50
|
+
children: [o, /* @__PURE__ */ i("style", {
|
|
51
|
+
children: y
|
|
52
|
+
}), /* @__PURE__ */ i("style", {
|
|
54
53
|
children: O
|
|
55
54
|
})]
|
|
56
|
-
}), t.current, "modal-node") : a.createPortal(
|
|
55
|
+
}), t.current, "modal-node") : a.createPortal(o, t.current, "modal-node");
|
|
57
56
|
};
|
|
58
57
|
export {
|
|
59
|
-
|
|
58
|
+
x as ModalPortal
|
|
60
59
|
};
|
|
@@ -2,26 +2,23 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { styled as e } from "@linaria/react";
|
|
3
3
|
import { SvgIcon as s } from "../../icons/index.js";
|
|
4
4
|
import { Button as c } from "./index.js";
|
|
5
|
-
|
|
6
|
-
import "@linaria/core";
|
|
7
|
-
import "./styles.js";
|
|
8
|
-
const r = () => s, a = /* @__PURE__ */ e(r())({
|
|
5
|
+
const a = () => s, l = /* @__PURE__ */ e(a())({
|
|
9
6
|
name: "ButtonIcon",
|
|
10
7
|
class: "b1whzxvd",
|
|
11
8
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
9
|
+
}), d = "channels", p = (n) => {
|
|
13
10
|
var t;
|
|
14
11
|
return /* @__PURE__ */ o(c, {
|
|
15
12
|
...n,
|
|
16
13
|
id: "channels",
|
|
17
14
|
label: "Channels",
|
|
18
|
-
icon: /* @__PURE__ */ o(
|
|
15
|
+
icon: /* @__PURE__ */ o(l, {
|
|
19
16
|
name: "icon-btn-channels",
|
|
20
17
|
"data-selected": (t = n.active) == null ? void 0 : t.toString()
|
|
21
18
|
})
|
|
22
19
|
});
|
|
23
20
|
};
|
|
24
21
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
p as ChannelsButton,
|
|
23
|
+
d as ChannelsButtonId
|
|
27
24
|
};
|
|
@@ -2,14 +2,11 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import { styled as r } from "@linaria/react";
|
|
3
3
|
import { SvgIcon as u } from "../../icons/index.js";
|
|
4
4
|
import { Button as n } from "./index.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import "@linaria/core";
|
|
7
|
-
import "./styles.js";
|
|
8
5
|
const s = () => u, a = /* @__PURE__ */ r(s())({
|
|
9
6
|
name: "ButtonIcon",
|
|
10
7
|
class: "b11des7c",
|
|
11
8
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
9
|
+
}), i = "featuredGroups", l = (t) => {
|
|
13
10
|
var o;
|
|
14
11
|
return /* @__PURE__ */ e(n, {
|
|
15
12
|
...t,
|
|
@@ -22,6 +19,6 @@ const s = () => u, a = /* @__PURE__ */ r(s())({
|
|
|
22
19
|
});
|
|
23
20
|
};
|
|
24
21
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
l as FeaturedGroupsButton,
|
|
23
|
+
i as FeaturedGroupsButtonId
|
|
27
24
|
};
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as r } from "@linaria/react";
|
|
3
3
|
import { SvgIcon as a } from "../../icons/index.js";
|
|
4
4
|
import { Button as d } from "./index.js";
|
|
5
|
-
|
|
6
|
-
import "@linaria/core";
|
|
7
|
-
import "./styles.js";
|
|
8
|
-
const n = () => a, m = /* @__PURE__ */ e(n())({
|
|
5
|
+
const n = () => a, c = /* @__PURE__ */ r(n())({
|
|
9
6
|
name: "ButtonIcon",
|
|
10
7
|
class: "b180jd7l",
|
|
11
8
|
propsAsIs: !0
|
|
12
|
-
}),
|
|
9
|
+
}), B = "leaderboard", b = (o) => {
|
|
13
10
|
var t;
|
|
14
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ e(d, {
|
|
15
12
|
...o,
|
|
16
13
|
label: "Leader Board",
|
|
17
14
|
id: "leaderboard",
|
|
18
|
-
icon: /* @__PURE__ */
|
|
15
|
+
icon: /* @__PURE__ */ e(c, {
|
|
19
16
|
name: "icon-btn-leaderboard",
|
|
20
17
|
"data-selected": (t = o.active) == null ? void 0 : t.toString()
|
|
21
18
|
})
|
|
22
19
|
});
|
|
23
20
|
};
|
|
24
21
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
b as LeaderBoardButton,
|
|
23
|
+
B as LeaderBoardButtonId
|
|
27
24
|
};
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { SButton as s, SelectedButton as u, HoverIconState as
|
|
4
|
-
|
|
5
|
-
const I = ({ disabled: n, active: r, onClick: a, label: c, icon: o, id: t }) => /* @__PURE__ */ e(
|
|
1
|
+
import { jsx as t, jsxs as l, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { cx as m } from "@linaria/core";
|
|
3
|
+
import { SButton as s, SelectedButton as u, HoverIconState as h, HoverIconLeaderboardState as p, ButtonIcon as B, ButtonLabel as f } from "./styles.js";
|
|
4
|
+
const I = ({ disabled: n, active: r, onClick: a, label: c, icon: o, id: e }) => /* @__PURE__ */ t(
|
|
6
5
|
s,
|
|
7
6
|
{
|
|
8
7
|
onClick: a,
|
|
9
8
|
disabled: n,
|
|
10
|
-
className:
|
|
9
|
+
className: m(
|
|
11
10
|
r && u,
|
|
12
|
-
!r && (
|
|
13
|
-
!r &&
|
|
11
|
+
!r && (e === "channels" || e === "featuredGroups") && h,
|
|
12
|
+
!r && e === "leaderboard" && p
|
|
14
13
|
),
|
|
15
|
-
children: /* @__PURE__ */ l(
|
|
16
|
-
o && /* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
14
|
+
children: /* @__PURE__ */ l(d, { children: [
|
|
15
|
+
o && /* @__PURE__ */ t(B, { children: o }),
|
|
16
|
+
/* @__PURE__ */ t(f, { children: c })
|
|
18
17
|
] })
|
|
19
18
|
}
|
|
20
19
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { styled as a } from "@linaria/react";
|
|
2
2
|
import { Navigation as s } from "./index.js";
|
|
3
|
-
|
|
4
|
-
const p = /* @__PURE__ */ a("div")({
|
|
3
|
+
const n = /* @__PURE__ */ a("div")({
|
|
5
4
|
name: "Navigation",
|
|
6
5
|
class: "n19lpak2",
|
|
7
6
|
propsAsIs: !1
|
|
@@ -11,6 +10,6 @@ const p = /* @__PURE__ */ a("div")({
|
|
|
11
10
|
propsAsIs: !0
|
|
12
11
|
});
|
|
13
12
|
export {
|
|
14
|
-
|
|
13
|
+
n as Navigation,
|
|
15
14
|
e as NavigationItems
|
|
16
15
|
};
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { QuestionImages as I } from "@streamlayer/sdk-web-types";
|
|
3
3
|
import { VideoPlayer as e } from "../../video-player/index.js";
|
|
4
4
|
import { Container as v, ImageContainer as C, Image as b, Content as x, Title as D, Description as T } from "./styles.js";
|
|
5
|
-
|
|
6
|
-
import "react";
|
|
7
|
-
import "../../icons/index.js";
|
|
8
|
-
import "@linaria/react";
|
|
9
|
-
import "../../video-player/styles.js";
|
|
10
|
-
const R = ({
|
|
5
|
+
const M = ({
|
|
11
6
|
instantView: r,
|
|
12
|
-
isDetail:
|
|
13
|
-
notification:
|
|
14
|
-
controlVideo:
|
|
7
|
+
isDetail: l,
|
|
8
|
+
notification: d,
|
|
9
|
+
controlVideo: p
|
|
15
10
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
(r == null ? void 0 : r.video) && /* @__PURE__ */
|
|
11
|
+
const m = r == null ? void 0 : r.heading, h = r == null ? void 0 : r.body, g = m || h, u = d == null ? void 0 : d.title, y = d == null ? void 0 : d.body;
|
|
12
|
+
return /* @__PURE__ */ c(v, { children: [
|
|
13
|
+
(r == null ? void 0 : r.video) && /* @__PURE__ */ o(
|
|
19
14
|
e,
|
|
20
15
|
{
|
|
21
16
|
source: r.video.url,
|
|
22
17
|
poster: r.video.thumbnailUrl,
|
|
23
|
-
controlVideo:
|
|
18
|
+
controlVideo: p
|
|
24
19
|
}
|
|
25
20
|
),
|
|
26
|
-
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
21
|
+
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ o(C, { "data-rounded": r.imageMode === I.ROUNDED, children: /* @__PURE__ */ o(b, { src: r == null ? void 0 : r.image }) }),
|
|
22
|
+
/* @__PURE__ */ c(x, { children: [
|
|
23
|
+
/* @__PURE__ */ o(D, { children: l && g ? m : u }),
|
|
24
|
+
/* @__PURE__ */ o(T, { children: l && g ? h : y })
|
|
30
25
|
] })
|
|
31
26
|
] });
|
|
32
27
|
};
|
|
33
28
|
export {
|
|
34
|
-
|
|
29
|
+
M as InsightContent
|
|
35
30
|
};
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { SvgIcon as a } from "../../../icons/index.js";
|
|
3
3
|
import { getTimeUntilNow as l } from "../../../../utils/common.js";
|
|
4
|
-
import { Container as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
i && /* @__PURE__ */ r(s, { children: [
|
|
11
|
-
/* @__PURE__ */ t(d, { src: i }),
|
|
4
|
+
import { Container as s, ImageContainer as d, Image as p, TwitterIcon as f, Details as h, Name as D, UserNameAndDate as I } from "./styles.js";
|
|
5
|
+
const v = ({ image: e, name: i, userName: n, verified: m, createdTweet: o }) => {
|
|
6
|
+
const c = o && l(o);
|
|
7
|
+
return /* @__PURE__ */ r(s, { children: [
|
|
8
|
+
e && /* @__PURE__ */ r(d, { children: [
|
|
9
|
+
/* @__PURE__ */ t(p, { src: e }),
|
|
12
10
|
/* @__PURE__ */ t(f, { name: "twitter" })
|
|
13
11
|
] }),
|
|
14
12
|
/* @__PURE__ */ r(h, { children: [
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
i && /* @__PURE__ */ r(D, { children: [
|
|
14
|
+
i,
|
|
17
15
|
" ",
|
|
18
|
-
|
|
16
|
+
m && /* @__PURE__ */ t(a, { name: "icon-twitter-verified" })
|
|
19
17
|
] }),
|
|
20
|
-
|
|
18
|
+
n && /* @__PURE__ */ r(I, { children: [
|
|
21
19
|
"@",
|
|
22
|
-
|
|
20
|
+
n,
|
|
23
21
|
" ",
|
|
24
|
-
|
|
22
|
+
c && `・ ${c}`
|
|
25
23
|
] })
|
|
26
24
|
] })
|
|
27
25
|
] });
|
|
28
26
|
};
|
|
29
27
|
export {
|
|
30
|
-
|
|
28
|
+
v as Account
|
|
31
29
|
};
|
|
@@ -1,42 +1,40 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
import { SvgIcon as e } from "../../../icons/index.js";
|
|
3
|
-
|
|
4
|
-
import "react";
|
|
5
|
-
const m = /* @__PURE__ */ s("div")({
|
|
3
|
+
const t = /* @__PURE__ */ s("div")({
|
|
6
4
|
name: "Container",
|
|
7
5
|
class: "cjq447q",
|
|
8
6
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
7
|
+
}), r = /* @__PURE__ */ s("div")({
|
|
10
8
|
name: "ImageContainer",
|
|
11
9
|
class: "i14egogb",
|
|
12
10
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
11
|
+
}), c = /* @__PURE__ */ s("img")({
|
|
14
12
|
name: "Image",
|
|
15
13
|
class: "i2g9g4l",
|
|
16
14
|
propsAsIs: !1
|
|
17
|
-
}), a = () => e,
|
|
15
|
+
}), a = () => e, m = /* @__PURE__ */ s(a())({
|
|
18
16
|
name: "TwitterIcon",
|
|
19
17
|
class: "t1c454nm",
|
|
20
18
|
propsAsIs: !0
|
|
21
|
-
}),
|
|
19
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
22
20
|
name: "Details",
|
|
23
21
|
class: "d11nigc3",
|
|
24
22
|
propsAsIs: !1
|
|
25
|
-
}),
|
|
23
|
+
}), p = /* @__PURE__ */ s("div")({
|
|
26
24
|
name: "Name",
|
|
27
25
|
class: "nrxa4k8",
|
|
28
26
|
propsAsIs: !1
|
|
29
|
-
}),
|
|
27
|
+
}), l = /* @__PURE__ */ s("div")({
|
|
30
28
|
name: "UserNameAndDate",
|
|
31
29
|
class: "u1p051g3",
|
|
32
30
|
propsAsIs: !1
|
|
33
31
|
});
|
|
34
32
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
t as Container,
|
|
34
|
+
i as Details,
|
|
35
|
+
c as Image,
|
|
36
|
+
r as ImageContainer,
|
|
37
|
+
p as Name,
|
|
38
|
+
m as TwitterIcon,
|
|
39
|
+
l as UserNameAndDate
|
|
42
40
|
};
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as n, Fragment as j } from "react/jsx-runtime";
|
|
2
2
|
import { VideoPlayer as k } from "../../video-player/index.js";
|
|
3
3
|
import { Account as x } from "./account/index.js";
|
|
4
|
-
import { Container as B, Details as E, Body as N, ImagesContainer as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import "../../icons/index.js";
|
|
8
|
-
import "@linaria/react";
|
|
9
|
-
import "../../video-player/styles.js";
|
|
10
|
-
import "../../../utils/common.js";
|
|
11
|
-
import "./account/styles.js";
|
|
12
|
-
const R = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), S = (o) => o == null ? void 0 : o.replace(R, ""), K = ({
|
|
13
|
-
image: o,
|
|
4
|
+
import { Container as B, Details as E, Body as N, ImagesContainer as i, ImageFullSize as l, ImageHalfSize as p, ImagesBlock as a } from "./styles.js";
|
|
5
|
+
const R = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), S = (t) => t == null ? void 0 : t.replace(R, ""), V = ({
|
|
6
|
+
image: t,
|
|
14
7
|
body: C,
|
|
15
8
|
account: z,
|
|
16
9
|
accountVerified: F,
|
|
17
10
|
tweet: s,
|
|
18
|
-
isDetail:
|
|
11
|
+
isDetail: d,
|
|
19
12
|
controlVideo: T
|
|
20
13
|
}) => {
|
|
21
|
-
var
|
|
22
|
-
const r = (g = (
|
|
23
|
-
({ contentType:
|
|
14
|
+
var m, g, H, U, f, u, v, I, y;
|
|
15
|
+
const r = (g = (m = s == null ? void 0 : s.meta) == null ? void 0 : m.extendedEntities) == null ? void 0 : g.media, o = r == null ? void 0 : r.find(({ type: e }) => e === "photo"), h = (u = (f = (U = (H = r == null ? void 0 : r[0]) == null ? void 0 : H.videoInfo) == null ? void 0 : U.variants) == null ? void 0 : f.find(
|
|
16
|
+
({ contentType: e }) => e === "video/mp4"
|
|
24
17
|
)) == null ? void 0 : u.url;
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ c(B, { children: [
|
|
19
|
+
/* @__PURE__ */ c(E, { children: [
|
|
27
20
|
/* @__PURE__ */ n(
|
|
28
21
|
x,
|
|
29
22
|
{
|
|
30
|
-
image:
|
|
23
|
+
image: t,
|
|
31
24
|
name: (v = s == null ? void 0 : s.meta) == null ? void 0 : v.accountName,
|
|
32
25
|
userName: z,
|
|
33
26
|
verified: F,
|
|
@@ -35,35 +28,35 @@ const R = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), S = (o) => o == null ?
|
|
|
35
28
|
}
|
|
36
29
|
),
|
|
37
30
|
/* @__PURE__ */ n(N, { children: S(C) }),
|
|
38
|
-
!
|
|
39
|
-
|
|
40
|
-
(r == null ? void 0 : r.length) === 1 && /* @__PURE__ */ n(
|
|
41
|
-
(r == null ? void 0 : r.length) === 2 && /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */ n(
|
|
43
|
-
/* @__PURE__ */ n(
|
|
31
|
+
!d && o && /* @__PURE__ */ n(i, { children: /* @__PURE__ */ n(l, { src: r == null ? void 0 : r[0].mediaUrlHttps }) }),
|
|
32
|
+
d && o && /* @__PURE__ */ c(j, { children: [
|
|
33
|
+
(r == null ? void 0 : r.length) === 1 && /* @__PURE__ */ n(i, { children: /* @__PURE__ */ n(l, { src: r[0].mediaUrlHttps }) }),
|
|
34
|
+
(r == null ? void 0 : r.length) === 2 && /* @__PURE__ */ c(i, { children: [
|
|
35
|
+
/* @__PURE__ */ n(p, { src: r[0].mediaUrlHttps }),
|
|
36
|
+
/* @__PURE__ */ n(p, { src: r[1].mediaUrlHttps })
|
|
44
37
|
] }),
|
|
45
|
-
(r == null ? void 0 : r.length) === 3 && /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ n(
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ n(
|
|
49
|
-
/* @__PURE__ */ n(
|
|
38
|
+
(r == null ? void 0 : r.length) === 3 && /* @__PURE__ */ c(i, { children: [
|
|
39
|
+
/* @__PURE__ */ n(p, { src: r[0].mediaUrlHttps }),
|
|
40
|
+
/* @__PURE__ */ c(a, { children: [
|
|
41
|
+
/* @__PURE__ */ n(l, { src: r[1].mediaUrlHttps }),
|
|
42
|
+
/* @__PURE__ */ n(l, { src: r[2].mediaUrlHttps })
|
|
50
43
|
] })
|
|
51
44
|
] }),
|
|
52
|
-
(r == null ? void 0 : r.length) === 4 && /* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */ n(
|
|
55
|
-
/* @__PURE__ */ n(
|
|
45
|
+
(r == null ? void 0 : r.length) === 4 && /* @__PURE__ */ c(i, { children: [
|
|
46
|
+
/* @__PURE__ */ c(a, { children: [
|
|
47
|
+
/* @__PURE__ */ n(l, { src: r[0].mediaUrlHttps }),
|
|
48
|
+
/* @__PURE__ */ n(l, { src: r[1].mediaUrlHttps })
|
|
56
49
|
] }),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */ n(
|
|
59
|
-
/* @__PURE__ */ n(
|
|
50
|
+
/* @__PURE__ */ c(a, { children: [
|
|
51
|
+
/* @__PURE__ */ n(l, { src: r[2].mediaUrlHttps }),
|
|
52
|
+
/* @__PURE__ */ n(l, { src: r[3].mediaUrlHttps })
|
|
60
53
|
] })
|
|
61
54
|
] })
|
|
62
55
|
] })
|
|
63
56
|
] }),
|
|
64
|
-
!
|
|
57
|
+
!o && (((I = r == null ? void 0 : r[0]) == null ? void 0 : I.type) === "video" || ((y = r == null ? void 0 : r[0]) == null ? void 0 : y.type) === "animated_gif") && h && /* @__PURE__ */ n(k, { source: h, poster: r[0].mediaUrlHttps, controlVideo: T })
|
|
65
58
|
] });
|
|
66
59
|
};
|
|
67
60
|
export {
|
|
68
|
-
|
|
61
|
+
V as TwitterContent
|
|
69
62
|
};
|
package/lib/ui/show-in/index.js
CHANGED
|
@@ -9,12 +9,14 @@ const w = /* @__PURE__ */ p("div")({
|
|
|
9
9
|
}), f = "sx17qu6", d = "h1692c5m", x = ({
|
|
10
10
|
children: r,
|
|
11
11
|
style: e,
|
|
12
|
-
className:
|
|
12
|
+
className: n,
|
|
13
13
|
enabled: o = !0,
|
|
14
|
-
hiding: s
|
|
14
|
+
hiding: s,
|
|
15
|
+
onAnimationEnd: t
|
|
15
16
|
}) => /* @__PURE__ */ c(w, {
|
|
16
17
|
style: e,
|
|
17
|
-
className: h(
|
|
18
|
+
className: h(n, o && f, o && s && d),
|
|
19
|
+
onAnimationEnd: t,
|
|
18
20
|
children: r
|
|
19
21
|
}), y = () => x, C = /* @__PURE__ */ p(y())({
|
|
20
22
|
name: "GrowingContainer",
|
|
@@ -23,25 +25,25 @@ const w = /* @__PURE__ */ p("div")({
|
|
|
23
25
|
}), G = ({
|
|
24
26
|
children: r,
|
|
25
27
|
style: e,
|
|
26
|
-
enabled:
|
|
28
|
+
enabled: n,
|
|
27
29
|
animate: o,
|
|
28
30
|
...s
|
|
29
31
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
const m =
|
|
32
|
-
return
|
|
32
|
+
const t = l(null), u = a(() => {
|
|
33
|
+
const m = t == null ? void 0 : t.current, i = m && window.getComputedStyle(m), g = i == null ? void 0 : i.getPropertyValue("height");
|
|
34
|
+
return n ? {
|
|
33
35
|
height: o ? g : 0
|
|
34
36
|
} : {};
|
|
35
|
-
}, [
|
|
37
|
+
}, [n, o]);
|
|
36
38
|
return /* @__PURE__ */ c(C, {
|
|
37
39
|
...s,
|
|
38
|
-
enabled:
|
|
40
|
+
enabled: n && o,
|
|
39
41
|
style: {
|
|
40
42
|
...e,
|
|
41
43
|
...u
|
|
42
44
|
},
|
|
43
45
|
children: /* @__PURE__ */ c("div", {
|
|
44
|
-
ref:
|
|
46
|
+
ref: t,
|
|
45
47
|
children: r
|
|
46
48
|
})
|
|
47
49
|
});
|
package/lib/ui/skeleton/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Container as
|
|
3
|
-
|
|
4
|
-
const f = ({ children: r, style: o, loading: t }) => t ? /* @__PURE__ */ e(m, { style: o, children: r }) : r;
|
|
2
|
+
import { Container as n } from "./styles.js";
|
|
3
|
+
const i = ({ children: r, style: o, loading: t }) => t ? /* @__PURE__ */ e(n, { style: o, children: r }) : r;
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
i as Skeleton
|
|
7
6
|
};
|
package/lib/ui/theme/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { theme as
|
|
3
|
-
|
|
4
|
-
import "./constants.js";
|
|
5
|
-
const p = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: o, style: m, children: r }) });
|
|
2
|
+
import { theme as a } from "./theme.js";
|
|
3
|
+
const i = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a, style: m, children: r }) });
|
|
6
4
|
export {
|
|
7
|
-
|
|
5
|
+
i as StreamLayerThemeProvider
|
|
8
6
|
};
|