@streamlayer/react-ui 0.93.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/{useClipboardCopy-E5rEe6It.js → index-jRXrW6ie.js} +1513 -1537
- package/lib/ui/app/Features/Gamification/Friends.js +6 -5
- package/lib/ui/app/Features/Gamification/Leaderboard.js +4 -3
- package/lib/ui/app/Features/Gamification/Question.js +19 -21
- package/lib/ui/app/Features/Gamification/QuestionsList.js +1 -1
- package/lib/ui/app/Features/Gamification/Tabs.js +36 -37
- package/lib/ui/app/Features/Gamification/gamification-feature.js +12 -10
- package/lib/ui/app/Features/Gamification/index.js +73 -89
- package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +3 -0
- package/lib/ui/app/Navigation/MastersNavigation/index.js +43 -35
- package/lib/ui/app/Notifications/Onboarding/index.d.ts +3 -2
- package/lib/ui/app/Notifications/Onboarding/index.js +97 -80
- package/lib/ui/app/Notifications/index.js +114 -112
- package/lib/ui/app/masters.js +48 -40
- package/lib/ui/app/useClipboardCopy.js +26 -5
- package/lib/ui/app/useMastersApp.js +42 -35
- package/lib/ui/app/useSdkResponsive.d.ts +1 -1
- package/lib/ui/app/useSdkResponsive.js +25 -25
- package/lib/ui/app/useSdkScroll.js +16 -15
- package/lib/ui/gamification/onboarding/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/index.js +11 -10
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +14 -13
- package/lib/ui/gamification/question/insight/index.js +3 -4
- package/lib/ui/gamification/question/list/index.js +14 -14
- package/lib/ui/gamification/question/notification/index.js +3 -2
- 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/question/notification/tweet/index.js +10 -7
- package/lib/ui/gamification/question/twitter/index.js +16 -33
- package/lib/ui/gamification/question/twitter/styles.d.ts +0 -1
- package/lib/ui/gamification/question/twitter/styles.js +7 -12
- package/lib/ui/gamification/vote/feedback/index.js +5 -5
- package/lib/ui/gamification/vote/insight-details/index.js +5 -6
- package/lib/ui/gamification/vote/twitter-details/index.js +13 -29
- package/lib/ui/gamification/vote/twitter-details/styles.d.ts +0 -1
- package/lib/ui/gamification/vote/twitter-details/styles.js +3 -8
- package/lib/ui/modal/index.d.ts +9 -0
- package/lib/ui/modal/index.js +34 -0
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +3 -1
- package/lib/ui/navigation/button/FeaturedGroups.js +11 -11
- package/lib/ui/questions/insight/index.d.ts +1 -2
- package/lib/ui/questions/insight/index.js +13 -29
- package/lib/ui/questions/insight/styles.d.ts +0 -1
- package/lib/ui/questions/insight/styles.js +9 -14
- package/lib/ui/questions/twitter/account/index.d.ts +2 -1
- package/lib/ui/questions/twitter/account/index.js +24 -18
- package/lib/ui/questions/twitter/account/styles.d.ts +1 -1
- package/lib/ui/questions/twitter/account/styles.js +2 -2
- package/lib/ui/questions/twitter/index.d.ts +2 -2
- package/lib/ui/questions/twitter/index.js +62 -9
- package/lib/ui/questions/twitter/styles.d.ts +9 -0
- package/lib/ui/questions/twitter/styles.js +31 -6
- 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/common.js +22 -8
- package/lib/utils/debug/components/developer.js +62 -43
- package/package.json +14 -14
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import { jsxs as o, jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { SvgIcon as
|
|
2
|
+
import { SvgIcon as p } from "../../../icons/index.js";
|
|
3
3
|
import { InsightContent as b } from "../../../questions/insight/index.js";
|
|
4
4
|
import { Container as k, WebLinkBtn as c } from "./styles.js";
|
|
5
5
|
import "@linaria/react";
|
|
6
6
|
import "react";
|
|
7
7
|
import "../../../video-player/index.js";
|
|
8
8
|
import "../../../video-player/styles.js";
|
|
9
|
-
import "../../../../utils/common.js";
|
|
10
9
|
import "../../../questions/insight/styles.js";
|
|
11
|
-
const
|
|
12
|
-
/* @__PURE__ */ m(b, { instantView: r, ...
|
|
10
|
+
const j = ({ instantView: r, ...l }) => /* @__PURE__ */ o(k, { children: [
|
|
11
|
+
/* @__PURE__ */ m(b, { instantView: r, ...l, isDetail: !0 }),
|
|
13
12
|
(r == null ? void 0 : r.webLink) && /* @__PURE__ */ o(c, { href: r == null ? void 0 : r.webLink.url, target: "_blank", children: [
|
|
14
13
|
r == null ? void 0 : r.webLink.label,
|
|
15
|
-
/* @__PURE__ */ m(
|
|
14
|
+
/* @__PURE__ */ m(p, { name: "icon-external-link" })
|
|
16
15
|
] })
|
|
17
16
|
] });
|
|
18
17
|
export {
|
|
19
|
-
|
|
18
|
+
j as InsightDetails
|
|
20
19
|
};
|
|
@@ -1,35 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import "../../../questions/twitter/account/index.js";
|
|
1
|
+
import { jsxs as r, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { TwitterContent as o } from "../../../questions/twitter/index.js";
|
|
3
|
+
import { Container as m, Quote as e } from "./styles.js";
|
|
4
|
+
import "../../../video-player/index.js";
|
|
5
|
+
import "react";
|
|
7
6
|
import "../../../icons/index.js";
|
|
8
7
|
import "@linaria/react";
|
|
8
|
+
import "../../../video-player/styles.js";
|
|
9
|
+
import "../../../questions/twitter/account/index.js";
|
|
10
|
+
import "../../../../utils/common.js";
|
|
9
11
|
import "../../../questions/twitter/account/styles.js";
|
|
10
12
|
import "../../../questions/twitter/styles.js";
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (f(r))
|
|
16
|
-
return {
|
|
17
|
-
date: l(r),
|
|
18
|
-
time: p(r)
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
return null;
|
|
22
|
-
}, [t]);
|
|
23
|
-
return /* @__PURE__ */ m(s, { children: [
|
|
24
|
-
e && /* @__PURE__ */ m(d, { children: [
|
|
25
|
-
e.date,
|
|
26
|
-
" · ",
|
|
27
|
-
e.time
|
|
28
|
-
] }),
|
|
29
|
-
i.title && /* @__PURE__ */ o(u, { children: i.title }),
|
|
30
|
-
/* @__PURE__ */ o(a, { ...i })
|
|
31
|
-
] });
|
|
32
|
-
};
|
|
13
|
+
const w = (t) => /* @__PURE__ */ r(m, { children: [
|
|
14
|
+
t.title && /* @__PURE__ */ i(e, { children: t.title }),
|
|
15
|
+
/* @__PURE__ */ i(o, { ...t, isDetail: !0 })
|
|
16
|
+
] });
|
|
33
17
|
export {
|
|
34
|
-
|
|
18
|
+
w as TwitterDetails
|
|
35
19
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
-
export declare const DateTime: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
3
|
export declare const Quote: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLQuoteElement> & import("react").BlockquoteHTMLAttributes<HTMLQuoteElement> & Record<never, unknown>>;
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const e = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "Container",
|
|
4
4
|
class: "c1dcxmvf",
|
|
5
5
|
propsAsIs: !1
|
|
6
|
-
}), a = /* @__PURE__ */ s("div")({
|
|
7
|
-
name: "DateTime",
|
|
8
|
-
class: "db4q22c",
|
|
9
|
-
propsAsIs: !1
|
|
10
6
|
}), t = /* @__PURE__ */ s("blockquote")({
|
|
11
7
|
name: "Quote",
|
|
12
|
-
class: "
|
|
8
|
+
class: "qb4q22c",
|
|
13
9
|
propsAsIs: !1
|
|
14
10
|
});
|
|
15
11
|
export {
|
|
16
|
-
|
|
17
|
-
a as DateTime,
|
|
12
|
+
e as Container,
|
|
18
13
|
t as Quote
|
|
19
14
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type ModalProps = {
|
|
3
|
+
Modal: React.ReactNode;
|
|
4
|
+
container: React.MutableRefObject<HTMLDivElement | null>;
|
|
5
|
+
fixedView: boolean;
|
|
6
|
+
useContainer: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const createModal: ({ Modal, container, fixedView, useContainer }: ModalProps) => import("react").ReactPortal | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cx as l } from "@linaria/core";
|
|
3
|
+
import { styled as m } from "@linaria/react";
|
|
4
|
+
import { r as n } from "../../index-jRXrW6ie.js";
|
|
5
|
+
import "../../index-uEuzH3jr.js";
|
|
6
|
+
import "react";
|
|
7
|
+
const c = /* @__PURE__ */ m("div")({
|
|
8
|
+
name: "StaticContainer",
|
|
9
|
+
class: "svm502q",
|
|
10
|
+
propsAsIs: !1
|
|
11
|
+
}), i = "fd3gza8", d = `
|
|
12
|
+
body {
|
|
13
|
+
overflow: hidden !important;
|
|
14
|
+
}
|
|
15
|
+
`, p = `
|
|
16
|
+
.sl-hide-on-modal {
|
|
17
|
+
display: none !important;
|
|
18
|
+
}
|
|
19
|
+
`, C = ({
|
|
20
|
+
Modal: o,
|
|
21
|
+
container: t,
|
|
22
|
+
fixedView: r,
|
|
23
|
+
useContainer: s
|
|
24
|
+
}) => t.current ? s ? n.createPortal(/* @__PURE__ */ a(c, {
|
|
25
|
+
className: l(r && i),
|
|
26
|
+
children: [o, r && /* @__PURE__ */ e("style", {
|
|
27
|
+
children: d
|
|
28
|
+
}), !r && /* @__PURE__ */ e("style", {
|
|
29
|
+
children: p
|
|
30
|
+
})]
|
|
31
|
+
}), t.current, "modal-node") : n.createPortal(o, t.current, "modal-node") : null;
|
|
32
|
+
export {
|
|
33
|
+
C as createModal
|
|
34
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ButtonProps } from '.';
|
|
3
3
|
export declare const FeaturedGroupsButtonId = "featuredGroups";
|
|
4
|
-
export declare const FeaturedGroupsButton: React.FC<Omit<ButtonProps, 'label' | 'id' | 'icon'
|
|
4
|
+
export declare const FeaturedGroupsButton: React.FC<Omit<ButtonProps, 'label' | 'id' | 'icon'> & {
|
|
5
|
+
labelFull: boolean;
|
|
6
|
+
}>;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { SvgIcon as
|
|
4
|
-
import { Button as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { styled as r } from "@linaria/react";
|
|
3
|
+
import { SvgIcon as u } from "../../icons/index.js";
|
|
4
|
+
import { Button as n } from "./index.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./styles.js";
|
|
7
|
-
const
|
|
7
|
+
const s = () => u, a = /* @__PURE__ */ r(s())({
|
|
8
8
|
name: "ButtonIcon",
|
|
9
9
|
class: "b11des7c",
|
|
10
10
|
propsAsIs: !0
|
|
11
|
-
}),
|
|
11
|
+
}), f = "featuredGroups", G = (t) => {
|
|
12
12
|
var o;
|
|
13
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ e(n, {
|
|
14
14
|
...t,
|
|
15
|
-
label: "FG+",
|
|
15
|
+
label: t.labelFull ? "Featured Groups +" : "FG+",
|
|
16
16
|
id: "featuredGroups",
|
|
17
|
-
icon: /* @__PURE__ */
|
|
17
|
+
icon: /* @__PURE__ */ e(a, {
|
|
18
18
|
name: "icon-btn-feature-groups",
|
|
19
19
|
"data-selected": (o = t.active) == null ? void 0 : o.toString()
|
|
20
20
|
})
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
G as FeaturedGroupsButton,
|
|
25
|
+
f as FeaturedGroupsButtonId
|
|
26
26
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { InsightHistory
|
|
2
|
+
import { InsightHistory } from '@streamlayer/sdk-web-types';
|
|
3
3
|
export type InsightContentProps = InsightHistory & {
|
|
4
|
-
created?: FeedItem['created'];
|
|
5
4
|
isDetail?: boolean;
|
|
6
5
|
};
|
|
7
6
|
export declare const InsightContent: React.FC<InsightContentProps>;
|
|
@@ -1,37 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { Container as C, DateWrap as I, Image as j, Content as B, Title as M, Description as P } from "./styles.js";
|
|
1
|
+
import { jsxs as c, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { VideoPlayer as u } from "../../video-player/index.js";
|
|
3
|
+
import { Container as v, Image as b, Content as x, Title as C, Description as I } from "./styles.js";
|
|
4
|
+
import "react";
|
|
6
5
|
import "../../icons/index.js";
|
|
7
6
|
import "@linaria/react";
|
|
8
7
|
import "../../video-player/styles.js";
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
20
|
-
}, [d]), u = r == null ? void 0 : r.heading, c = r == null ? void 0 : r.body, g = u || c, y = o == null ? void 0 : o.title, D = o == null ? void 0 : o.body;
|
|
21
|
-
return /* @__PURE__ */ e(C, { children: [
|
|
22
|
-
l && /* @__PURE__ */ e(I, { children: [
|
|
23
|
-
l.date,
|
|
24
|
-
" · ",
|
|
25
|
-
l.time
|
|
26
|
-
] }),
|
|
27
|
-
(r == null ? void 0 : r.video) && /* @__PURE__ */ m(v, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
28
|
-
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ m(j, { src: r == null ? void 0 : r.image }),
|
|
29
|
-
/* @__PURE__ */ e(B, { children: [
|
|
30
|
-
/* @__PURE__ */ m(M, { children: h && g ? u : y }),
|
|
31
|
-
/* @__PURE__ */ m(P, { children: h && g ? c : D })
|
|
8
|
+
const q = ({ instantView: r, isDetail: l, notification: o }) => {
|
|
9
|
+
const m = r == null ? void 0 : r.heading, p = r == null ? void 0 : r.body, h = m || p, g = o == null ? void 0 : o.title, y = o == null ? void 0 : o.body;
|
|
10
|
+
return /* @__PURE__ */ c(v, { children: [
|
|
11
|
+
(r == null ? void 0 : r.video) && /* @__PURE__ */ d(u, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
12
|
+
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ d(b, { src: r == null ? void 0 : r.image }),
|
|
13
|
+
/* @__PURE__ */ c(x, { children: [
|
|
14
|
+
/* @__PURE__ */ d(C, { children: l && h ? m : g }),
|
|
15
|
+
/* @__PURE__ */ d(I, { children: l && h ? p : y })
|
|
32
16
|
] })
|
|
33
17
|
] });
|
|
34
18
|
};
|
|
35
19
|
export {
|
|
36
|
-
|
|
20
|
+
q as InsightContent
|
|
37
21
|
};
|
|
@@ -3,5 +3,4 @@ export declare const Container: import("@linaria/react").StyledComponent<import(
|
|
|
3
3
|
export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
4
|
export declare const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLHeadingElement> & import("react").HTMLAttributes<HTMLHeadingElement> & Record<never, unknown>>;
|
|
5
5
|
export declare const Description: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
-
export declare const DateWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
6
|
export declare const Image: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const n = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "Container",
|
|
4
4
|
class: "cgn5uen",
|
|
5
5
|
propsAsIs: !1
|
|
6
|
-
}),
|
|
6
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
7
7
|
name: "Content",
|
|
8
8
|
class: "c1px8nt6",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), a = /* @__PURE__ */ s("h3")({
|
|
11
11
|
name: "Title",
|
|
12
12
|
class: "t5et2jt",
|
|
13
13
|
propsAsIs: !1
|
|
@@ -15,20 +15,15 @@ const a = /* @__PURE__ */ s("div")({
|
|
|
15
15
|
name: "Description",
|
|
16
16
|
class: "d1i2kpk2",
|
|
17
17
|
propsAsIs: !1
|
|
18
|
-
}), p = /* @__PURE__ */ s("
|
|
19
|
-
name: "DateWrap",
|
|
20
|
-
class: "dd3lh3p",
|
|
21
|
-
propsAsIs: !1
|
|
22
|
-
}), c = /* @__PURE__ */ s("img")({
|
|
18
|
+
}), p = /* @__PURE__ */ s("img")({
|
|
23
19
|
name: "Image",
|
|
24
|
-
class: "
|
|
20
|
+
class: "id3lh3p",
|
|
25
21
|
propsAsIs: !1
|
|
26
22
|
});
|
|
27
23
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
p as DateWrap,
|
|
24
|
+
n as Container,
|
|
25
|
+
t as Content,
|
|
31
26
|
o as Description,
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
p as Image,
|
|
28
|
+
a as Title
|
|
34
29
|
};
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { SvgIcon as
|
|
3
|
-
import {
|
|
2
|
+
import { SvgIcon as a } from "../../../icons/index.js";
|
|
3
|
+
import { getTimeUntilNow as l } from "../../../../utils/common.js";
|
|
4
|
+
import { Container as p, ImageContainer as s, Image as d, TwitterIcon as f, Details as h, Name as D, UserNameAndDate as I } from "./styles.js";
|
|
4
5
|
import "@linaria/react";
|
|
5
6
|
import "react";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* @__PURE__ */ r(s, { children: [
|
|
13
|
-
n,
|
|
14
|
-
" ",
|
|
15
|
-
o && /* @__PURE__ */ t(c, { name: "icon-twitter-verified" })
|
|
7
|
+
const C = ({ image: i, name: o, userName: e, verified: c, createdTweet: n }) => {
|
|
8
|
+
const m = n && l(n);
|
|
9
|
+
return /* @__PURE__ */ r(p, { children: [
|
|
10
|
+
i && /* @__PURE__ */ r(s, { children: [
|
|
11
|
+
/* @__PURE__ */ t(d, { src: i }),
|
|
12
|
+
/* @__PURE__ */ t(f, { name: "twitter" })
|
|
16
13
|
] }),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
/* @__PURE__ */ r(h, { children: [
|
|
15
|
+
o && /* @__PURE__ */ r(D, { children: [
|
|
16
|
+
o,
|
|
17
|
+
" ",
|
|
18
|
+
c && /* @__PURE__ */ t(a, { name: "icon-twitter-verified" })
|
|
19
|
+
] }),
|
|
20
|
+
e && /* @__PURE__ */ r(I, { children: [
|
|
21
|
+
"@",
|
|
22
|
+
e,
|
|
23
|
+
" ",
|
|
24
|
+
m && `・ ${m}`
|
|
25
|
+
] })
|
|
20
26
|
] })
|
|
21
|
-
] })
|
|
22
|
-
|
|
27
|
+
] });
|
|
28
|
+
};
|
|
23
29
|
export {
|
|
24
|
-
|
|
30
|
+
C as Account
|
|
25
31
|
};
|
|
@@ -5,4 +5,4 @@ export declare const Image: import("@linaria/react").StyledComponent<import("rea
|
|
|
5
5
|
export declare const TwitterIcon: any;
|
|
6
6
|
export declare const Details: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
7
|
export declare const Name: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const UserNameAndDate: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -27,7 +27,7 @@ const m = /* @__PURE__ */ s("div")({
|
|
|
27
27
|
class: "nrxa4k8",
|
|
28
28
|
propsAsIs: !1
|
|
29
29
|
}), g = /* @__PURE__ */ s("div")({
|
|
30
|
-
name: "
|
|
30
|
+
name: "UserNameAndDate",
|
|
31
31
|
class: "u1p051g3",
|
|
32
32
|
propsAsIs: !1
|
|
33
33
|
});
|
|
@@ -38,5 +38,5 @@ export {
|
|
|
38
38
|
c as ImageContainer,
|
|
39
39
|
I as Name,
|
|
40
40
|
p as TwitterIcon,
|
|
41
|
-
g as
|
|
41
|
+
g as UserNameAndDate
|
|
42
42
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TweetHistory
|
|
2
|
+
import { TweetHistory } from '@streamlayer/sdk-web-types';
|
|
3
3
|
export type TwitterContentProps = TweetHistory & {
|
|
4
|
-
|
|
4
|
+
isDetail?: boolean;
|
|
5
5
|
};
|
|
6
6
|
export declare const TwitterContent: React.FC<TwitterContentProps>;
|
|
@@ -1,14 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as t, jsx as n, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { VideoPlayer as j } from "../../video-player/index.js";
|
|
3
|
+
import { Account as k } from "./account/index.js";
|
|
4
|
+
import { Container as x, Details as B, Body as E, ImagesContainer as c, ImageFullSize as i, ImageHalfSize as e, ImagesBlock as m } from "./styles.js";
|
|
5
|
+
import "react";
|
|
4
6
|
import "../../icons/index.js";
|
|
5
7
|
import "@linaria/react";
|
|
6
|
-
import "
|
|
8
|
+
import "../../video-player/styles.js";
|
|
9
|
+
import "../../../utils/common.js";
|
|
7
10
|
import "./account/styles.js";
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const N = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), R = (o) => o == null ? void 0 : o.replace(N, ""), G = ({
|
|
12
|
+
image: o,
|
|
13
|
+
body: C,
|
|
14
|
+
account: z,
|
|
15
|
+
accountVerified: F,
|
|
16
|
+
tweet: s,
|
|
17
|
+
isDetail: a
|
|
18
|
+
}) => {
|
|
19
|
+
var h, g, H, U, f, u, v, I, y;
|
|
20
|
+
const r = (g = (h = s == null ? void 0 : s.meta) == null ? void 0 : h.extendedEntities) == null ? void 0 : g.media, l = r == null ? void 0 : r.find(({ type: p }) => p === "photo"), d = (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(
|
|
21
|
+
({ contentType: p }) => p === "video/mp4"
|
|
22
|
+
)) == null ? void 0 : u.url;
|
|
23
|
+
return /* @__PURE__ */ t(x, { children: [
|
|
24
|
+
/* @__PURE__ */ t(B, { children: [
|
|
25
|
+
/* @__PURE__ */ n(
|
|
26
|
+
k,
|
|
27
|
+
{
|
|
28
|
+
image: o,
|
|
29
|
+
name: (v = s == null ? void 0 : s.meta) == null ? void 0 : v.accountName,
|
|
30
|
+
userName: z,
|
|
31
|
+
verified: F,
|
|
32
|
+
createdTweet: s == null ? void 0 : s.date
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ n(E, { children: R(C) }),
|
|
36
|
+
!a && l && /* @__PURE__ */ n(c, { children: /* @__PURE__ */ n(i, { src: r == null ? void 0 : r[0].mediaUrlHttps }) }),
|
|
37
|
+
a && l && /* @__PURE__ */ t(T, { children: [
|
|
38
|
+
(r == null ? void 0 : r.length) === 1 && /* @__PURE__ */ n(c, { children: /* @__PURE__ */ n(i, { src: r[0].mediaUrlHttps }) }),
|
|
39
|
+
(r == null ? void 0 : r.length) === 2 && /* @__PURE__ */ t(c, { children: [
|
|
40
|
+
/* @__PURE__ */ n(e, { src: r[0].mediaUrlHttps }),
|
|
41
|
+
/* @__PURE__ */ n(e, { src: r[1].mediaUrlHttps })
|
|
42
|
+
] }),
|
|
43
|
+
(r == null ? void 0 : r.length) === 3 && /* @__PURE__ */ t(c, { children: [
|
|
44
|
+
/* @__PURE__ */ n(e, { src: r[0].mediaUrlHttps }),
|
|
45
|
+
/* @__PURE__ */ t(m, { children: [
|
|
46
|
+
/* @__PURE__ */ n(i, { src: r[1].mediaUrlHttps }),
|
|
47
|
+
/* @__PURE__ */ n(i, { src: r[2].mediaUrlHttps })
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
(r == null ? void 0 : r.length) === 4 && /* @__PURE__ */ t(c, { children: [
|
|
51
|
+
/* @__PURE__ */ t(m, { children: [
|
|
52
|
+
/* @__PURE__ */ n(i, { src: r[0].mediaUrlHttps }),
|
|
53
|
+
/* @__PURE__ */ n(i, { src: r[1].mediaUrlHttps })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ t(m, { children: [
|
|
56
|
+
/* @__PURE__ */ n(i, { src: r[2].mediaUrlHttps }),
|
|
57
|
+
/* @__PURE__ */ n(i, { src: r[3].mediaUrlHttps })
|
|
58
|
+
] })
|
|
59
|
+
] })
|
|
60
|
+
] })
|
|
61
|
+
] }),
|
|
62
|
+
!l && (((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") && d && /* @__PURE__ */ n(j, { source: d, poster: r[0].mediaUrlHttps })
|
|
63
|
+
] });
|
|
64
|
+
};
|
|
12
65
|
export {
|
|
13
|
-
|
|
66
|
+
G as TwitterContent
|
|
14
67
|
};
|
|
@@ -2,3 +2,12 @@
|
|
|
2
2
|
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
3
|
export declare const Details: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
4
|
export declare const Body: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const ImagesContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const ImagesBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const Image: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
8
|
+
export declare const ImageFullSize: import("@linaria/react").WYWEvalMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown> & {
|
|
9
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const ImageHalfSize: import("@linaria/react").WYWEvalMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown> & {
|
|
12
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
|
+
}>;
|
|
@@ -1,19 +1,44 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
|
-
const
|
|
2
|
+
const l = /* @__PURE__ */ s("div")({
|
|
3
3
|
name: "Container",
|
|
4
4
|
class: "c1kzqw87",
|
|
5
5
|
propsAsIs: !1
|
|
6
|
-
}),
|
|
6
|
+
}), t = /* @__PURE__ */ s("div")({
|
|
7
7
|
name: "Details",
|
|
8
8
|
class: "d9r1hf9",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), i = /* @__PURE__ */ s("div")({
|
|
11
11
|
name: "Body",
|
|
12
12
|
class: "bezygt5",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
+
}), m = /* @__PURE__ */ s("div")({
|
|
15
|
+
name: "ImagesContainer",
|
|
16
|
+
class: "i1y8f7ym",
|
|
17
|
+
propsAsIs: !1
|
|
18
|
+
}), c = /* @__PURE__ */ s("div")({
|
|
19
|
+
name: "ImagesBlock",
|
|
20
|
+
class: "i18gwonx",
|
|
21
|
+
propsAsIs: !1
|
|
22
|
+
}), e = /* @__PURE__ */ s("img")({
|
|
23
|
+
name: "Image",
|
|
24
|
+
class: "i3g0xjd",
|
|
25
|
+
propsAsIs: !1
|
|
26
|
+
}), a = () => e, p = /* @__PURE__ */ s(a())({
|
|
27
|
+
name: "ImageFullSize",
|
|
28
|
+
class: "io8rt7p",
|
|
29
|
+
propsAsIs: !0
|
|
30
|
+
}), o = () => e, r = /* @__PURE__ */ s(o())({
|
|
31
|
+
name: "ImageHalfSize",
|
|
32
|
+
class: "i4hn3ox",
|
|
33
|
+
propsAsIs: !0
|
|
14
34
|
});
|
|
15
35
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
36
|
+
i as Body,
|
|
37
|
+
l as Container,
|
|
38
|
+
t as Details,
|
|
39
|
+
e as Image,
|
|
40
|
+
p as ImageFullSize,
|
|
41
|
+
r as ImageHalfSize,
|
|
42
|
+
c as ImagesBlock,
|
|
43
|
+
m as ImagesContainer
|
|
19
44
|
};
|