@streamlayer/react-ui 0.92.0 → 0.94.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/index.js +5 -4
- 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 +42 -39
- package/lib/ui/app/Features/Gamification/gamification-feature.js +11 -6
- package/lib/ui/app/Features/Gamification/index.js +72 -84
- package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +2 -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 +114 -86
- package/lib/ui/app/Notifications/index.js +115 -108
- package/lib/ui/app/Points/index.js +6 -5
- package/lib/ui/app/masters.js +41 -31
- package/lib/ui/app/styles.d.ts +1 -0
- package/lib/ui/app/styles.js +6 -1
- package/lib/ui/app/useClipboardCopy.js +26 -5
- package/lib/ui/app/useImagesPreload.d.ts +4 -0
- package/lib/ui/app/useImagesPreload.js +23 -0
- package/lib/ui/app/useMastersApp.js +42 -35
- package/lib/ui/app/useSdkResponsive.d.ts +1 -1
- package/lib/ui/app/useSdkResponsive.js +23 -23
- package/lib/ui/app/useSdkScroll.d.ts +1 -0
- package/lib/ui/app/useSdkScroll.js +32 -23
- package/lib/ui/gamification/detail/header/index.js +11 -11
- package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
- package/lib/ui/gamification/detail/header/styles.js +11 -11
- package/lib/ui/gamification/onboarding/index.d.ts +2 -1
- package/lib/ui/gamification/onboarding/index.js +55 -43
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +14 -13
- package/lib/ui/gamification/points/index.js +5 -4
- package/lib/ui/gamification/question/insight/index.js +4 -5
- 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/prediction-result/animation-lines/index.js +17 -17
- package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
- 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/index.js +57 -56
- 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/gamification/vote/vote-option/index.js +61 -57
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
- package/lib/ui/gamification/vote/win-bar/index.js +21 -20
- 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/navigation/masters.d.ts +2 -1
- package/lib/ui/navigation/masters.js +9 -4
- package/lib/ui/questions/insight/index.d.ts +2 -3
- package/lib/ui/questions/insight/index.js +13 -35
- 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 +31 -9
- package/lib/ui/questions/twitter/styles.d.ts +1 -0
- package/lib/ui/questions/twitter/styles.js +8 -3
- package/lib/ui/skeleton/index.d.ts +7 -0
- package/lib/ui/skeleton/index.js +7 -0
- package/lib/ui/skeleton/styles.d.ts +2 -0
- package/lib/ui/skeleton/styles.js +9 -0
- package/lib/ui/theme/breakpoints.d.ts +4 -1
- package/lib/ui/theme/breakpoints.js +24 -12
- package/lib/ui/theme/constants.d.ts +4 -0
- package/lib/ui/theme/constants.js +6 -2
- package/lib/ui/theme/index.js +4 -3
- package/lib/ui/theme/theme.js +29 -21
- package/lib/utils/common.js +22 -8
- package/lib/utils/decorators/container.js +4 -3
- package/package.json +18 -18
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Navigation: import("@linaria/react").
|
|
2
|
+
export declare const Navigation: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const NavigationItems: import("@linaria/react").WYWEvalMeta & import("react").FC<{
|
|
3
4
|
children: import("react").ReactElement<import("./button").ButtonProps, string | import("react").JSXElementConstructor<any>>[];
|
|
4
5
|
className?: string | undefined;
|
|
5
6
|
}>;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { styled as
|
|
2
|
-
import { Navigation as
|
|
1
|
+
import { styled as a } from "@linaria/react";
|
|
2
|
+
import { Navigation as s } from "./index.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ a("div")({
|
|
5
5
|
name: "Navigation",
|
|
6
6
|
class: "n19lpak2",
|
|
7
|
+
propsAsIs: !1
|
|
8
|
+
}), o = () => s, e = /* @__PURE__ */ a(o())({
|
|
9
|
+
name: "NavigationItems",
|
|
10
|
+
class: "n1w473c2",
|
|
7
11
|
propsAsIs: !0
|
|
8
12
|
});
|
|
9
13
|
export {
|
|
10
|
-
p as Navigation
|
|
14
|
+
p as Navigation,
|
|
15
|
+
e as NavigationItems
|
|
11
16
|
};
|
|
@@ -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
|
-
|
|
5
|
-
isPickHistory?: boolean;
|
|
4
|
+
isDetail?: boolean;
|
|
6
5
|
};
|
|
7
6
|
export declare const InsightContent: React.FC<InsightContentProps>;
|
|
@@ -1,43 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { Container as b, DateWrap as x, Image as C, Content as T, Title as j, Description as y } 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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (o) {
|
|
18
|
-
const p = new Date(o);
|
|
19
|
-
if (D(p))
|
|
20
|
-
return {
|
|
21
|
-
date: c(p),
|
|
22
|
-
time: v(p)
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return null;
|
|
26
|
-
}, [o]);
|
|
27
|
-
return /* @__PURE__ */ h(b, { children: [
|
|
28
|
-
l && /* @__PURE__ */ h(x, { children: [
|
|
29
|
-
l.date,
|
|
30
|
-
" · ",
|
|
31
|
-
l.time
|
|
32
|
-
] }),
|
|
33
|
-
(r == null ? void 0 : r.video) && /* @__PURE__ */ m(g, { source: r.video.url, poster: r.video.thumbnailUrl }),
|
|
34
|
-
(r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ m(C, { src: r == null ? void 0 : r.image }),
|
|
35
|
-
/* @__PURE__ */ h(T, { children: [
|
|
36
|
-
/* @__PURE__ */ m(j, { children: u ? e : r == null ? void 0 : r.heading }),
|
|
37
|
-
/* @__PURE__ */ m(y, { children: u ? d == null ? void 0 : d.body : r == null ? void 0 : r.body })
|
|
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 })
|
|
38
16
|
] })
|
|
39
17
|
] });
|
|
40
18
|
};
|
|
41
19
|
export {
|
|
42
|
-
|
|
20
|
+
q as InsightContent
|
|
43
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,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { VideoPlayer as v } from "../../video-player/index.js";
|
|
3
|
+
import { Account as y } from "./account/index.js";
|
|
4
|
+
import { Container as C, Details as T, Body as U, Image as j } 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 x = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), D = (i) => i == null ? void 0 : i.replace(x, ""), L = ({ image: i, body: f, account: h, accountVerified: u, tweet: o }) => {
|
|
12
|
+
var s, m, t, a, c, e, d;
|
|
13
|
+
const r = (m = (s = o == null ? void 0 : o.meta) == null ? void 0 : s.extendedEntities) == null ? void 0 : m.media, p = (e = (c = (a = (t = r == null ? void 0 : r[0]) == null ? void 0 : t.videoInfo) == null ? void 0 : a.variants) == null ? void 0 : c.find(
|
|
14
|
+
({ contentType: g }) => g === "video/mp4"
|
|
15
|
+
)) == null ? void 0 : e.url;
|
|
16
|
+
return /* @__PURE__ */ l(C, { children: [
|
|
17
|
+
/* @__PURE__ */ l(T, { children: [
|
|
18
|
+
/* @__PURE__ */ n(
|
|
19
|
+
y,
|
|
20
|
+
{
|
|
21
|
+
image: i,
|
|
22
|
+
name: (d = o == null ? void 0 : o.meta) == null ? void 0 : d.accountName,
|
|
23
|
+
userName: h,
|
|
24
|
+
verified: u,
|
|
25
|
+
createdTweet: o == null ? void 0 : o.date
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ n(U, { children: D(f) }),
|
|
29
|
+
(r == null ? void 0 : r.length) && r[0].type === "photo" && /* @__PURE__ */ n(j, { src: r[0].mediaUrlHttps })
|
|
30
|
+
] }),
|
|
31
|
+
(r == null ? void 0 : r.length) && (r[0].type === "video" || r[0].type === "animated_gif") && p && /* @__PURE__ */ n(v, { source: p, poster: r[0].mediaUrlHttps })
|
|
32
|
+
] });
|
|
33
|
+
};
|
|
12
34
|
export {
|
|
13
|
-
|
|
35
|
+
L as TwitterContent
|
|
14
36
|
};
|
|
@@ -2,3 +2,4 @@
|
|
|
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 Image: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
@@ -7,13 +7,18 @@ const e = /* @__PURE__ */ s("div")({
|
|
|
7
7
|
name: "Details",
|
|
8
8
|
class: "d9r1hf9",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), n = /* @__PURE__ */ s("div")({
|
|
11
11
|
name: "Body",
|
|
12
12
|
class: "bezygt5",
|
|
13
13
|
propsAsIs: !1
|
|
14
|
+
}), t = /* @__PURE__ */ s("img")({
|
|
15
|
+
name: "Image",
|
|
16
|
+
class: "i1y8f7ym",
|
|
17
|
+
propsAsIs: !1
|
|
14
18
|
});
|
|
15
19
|
export {
|
|
16
|
-
|
|
20
|
+
n as Body,
|
|
17
21
|
e as Container,
|
|
18
|
-
o as Details
|
|
22
|
+
o as Details,
|
|
23
|
+
t as Image
|
|
19
24
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { BREAKPOINTS } from './constants';
|
|
1
|
+
import { BREAKPOINTS, ORIENTATION } from './constants';
|
|
2
2
|
export type Breakpoints = keyof typeof BREAKPOINTS;
|
|
3
|
+
export type Orientation = keyof typeof ORIENTATION;
|
|
3
4
|
export declare const breakpoints: {
|
|
4
5
|
up: (key: Breakpoints) => (styles: TemplateStringsArray) => string;
|
|
5
6
|
down: (key: Breakpoints) => (styles: TemplateStringsArray) => string;
|
|
7
|
+
intermediate: (down: Breakpoints, up: Breakpoints) => (styles: TemplateStringsArray) => string;
|
|
8
|
+
orientation: (key: Orientation) => (styles: TemplateStringsArray) => string;
|
|
6
9
|
};
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import { BREAKPOINTS as e } from "./constants.js";
|
|
2
|
-
const
|
|
3
|
-
@media (${
|
|
4
|
-
${
|
|
1
|
+
import { BREAKPOINTS as e, ORIENTATION as a } from "./constants.js";
|
|
2
|
+
const r = (n) => (t) => `
|
|
3
|
+
@media only screen and (${n}) {
|
|
4
|
+
${t}
|
|
5
5
|
}
|
|
6
|
-
`,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
`, d = (n, t) => (i) => `
|
|
7
|
+
@media only screen and (${n}) and (${t}) {
|
|
8
|
+
${i}
|
|
9
|
+
}
|
|
10
|
+
`, s = {
|
|
11
|
+
up: (n) => {
|
|
12
|
+
const t = e[n];
|
|
13
|
+
return r(`min-width: ${t}px`);
|
|
14
|
+
},
|
|
15
|
+
down: (n) => {
|
|
16
|
+
const t = e[n] - 1;
|
|
17
|
+
return r(`max-width: ${t}px`);
|
|
18
|
+
},
|
|
19
|
+
intermediate: (n, t) => {
|
|
20
|
+
const i = e[n] - 1, o = e[t];
|
|
21
|
+
return d(`max-width: ${i}px`, `min-width: ${o}px`);
|
|
10
22
|
},
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
return
|
|
23
|
+
orientation: (n) => {
|
|
24
|
+
const t = a[n];
|
|
25
|
+
return r(`orientation: ${t}`);
|
|
14
26
|
}
|
|
15
27
|
};
|
|
16
28
|
export {
|
|
17
|
-
|
|
29
|
+
s as breakpoints
|
|
18
30
|
};
|
|
@@ -60,7 +60,10 @@ const N = {
|
|
|
60
60
|
lg: 992,
|
|
61
61
|
xl: 1200,
|
|
62
62
|
xxl: 1400
|
|
63
|
-
}, G =
|
|
63
|
+
}, G = {
|
|
64
|
+
landscape: "landscape",
|
|
65
|
+
portrait: "portrait"
|
|
66
|
+
}, B = Object.keys(E).reduce((A, R) => {
|
|
64
67
|
const _ = E[R];
|
|
65
68
|
return `
|
|
66
69
|
${A}
|
|
@@ -72,5 +75,6 @@ export {
|
|
|
72
75
|
E as COLORS,
|
|
73
76
|
S as FONT,
|
|
74
77
|
T as MASTERS_COLORS,
|
|
75
|
-
G as
|
|
78
|
+
G as ORIENTATION,
|
|
79
|
+
B as colors
|
|
76
80
|
};
|
package/lib/ui/theme/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { theme as
|
|
2
|
+
import { theme as o } from "./theme.js";
|
|
3
|
+
import "./breakpoints.js";
|
|
3
4
|
import "./constants.js";
|
|
4
|
-
const
|
|
5
|
+
const p = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: o, style: m, children: r }) });
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
p as StreamLayerThemeProvider
|
|
7
8
|
};
|
package/lib/ui/theme/theme.js
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
--font-
|
|
7
|
-
--font-
|
|
8
|
-
--font-
|
|
9
|
-
--font-
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { breakpoints as d } from "./breakpoints.js";
|
|
3
|
+
import { colors as s, FONT as e } from "./constants.js";
|
|
4
|
+
const h = `
|
|
5
|
+
${s}
|
|
6
|
+
--font-family: ${e.REGULAR};
|
|
7
|
+
--font-regular: ${e.REGULAR};
|
|
8
|
+
--font-color: ${e.COLOR};
|
|
9
|
+
--font-serif: ${e.SERIF};
|
|
10
|
+
--font-weight-default: ${e.WEIGHT_DEFAULT};
|
|
10
11
|
|
|
12
|
+
--header-offset: 0px;
|
|
11
13
|
--header-height: 68px;
|
|
12
14
|
--animation-duration: 0.5s;
|
|
13
15
|
--animation-function: ease;
|
|
14
16
|
--container-padding: 16px;
|
|
15
17
|
--border-radius: 8px;
|
|
16
18
|
--pill-offset: 0px;
|
|
17
|
-
|
|
19
|
+
--max-width: 600px;
|
|
20
|
+
--max-notifications-width: 400px;
|
|
21
|
+
|
|
22
|
+
${d.down("xl")`
|
|
23
|
+
--header-offset: 56px;
|
|
24
|
+
`}
|
|
25
|
+
`, m = "StreamLayerCSSReset", p = "ttkj0ah", x = () => /* @__PURE__ */ t("table", {
|
|
18
26
|
children: /* @__PURE__ */ r("table", {
|
|
19
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ t("thead", {
|
|
20
28
|
children: /* @__PURE__ */ r("tr", {
|
|
21
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ t("th", {
|
|
22
30
|
children: "name"
|
|
23
|
-
}), /* @__PURE__ */
|
|
31
|
+
}), /* @__PURE__ */ t("th", {
|
|
24
32
|
children: "value"
|
|
25
33
|
})]
|
|
26
34
|
})
|
|
27
|
-
}), /* @__PURE__ */
|
|
28
|
-
children:
|
|
35
|
+
}), /* @__PURE__ */ t("tbody", {
|
|
36
|
+
children: h.split(";").map((i) => {
|
|
29
37
|
const n = i.trim(), [o, a] = n.split(":");
|
|
30
38
|
return /* @__PURE__ */ r("tr", {
|
|
31
|
-
children: [/* @__PURE__ */
|
|
39
|
+
children: [/* @__PURE__ */ t("td", {
|
|
32
40
|
children: o
|
|
33
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ t("td", {
|
|
34
42
|
children: a
|
|
35
43
|
})]
|
|
36
44
|
}, n);
|
|
@@ -39,8 +47,8 @@ const s = `
|
|
|
39
47
|
})
|
|
40
48
|
});
|
|
41
49
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
x as ThemeVariables,
|
|
51
|
+
m as resetCss,
|
|
52
|
+
p as theme,
|
|
53
|
+
h as themeStr
|
|
46
54
|
};
|
package/lib/utils/common.js
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
const
|
|
1
|
+
const I = (t) => t.split(/\s+/).map((n) => n[0]).join("").toUpperCase(), s = (t) => t ? t.toLocaleString("en-US") : "0", S = (t) => t.toLocaleDateString("en-US", {
|
|
2
2
|
weekday: "short",
|
|
3
3
|
month: "short",
|
|
4
4
|
day: "numeric"
|
|
5
|
-
}),
|
|
5
|
+
}), N = (t) => t.toLocaleTimeString("en-US", {
|
|
6
6
|
hour: "2-digit",
|
|
7
7
|
minute: "2-digit"
|
|
8
|
-
}),
|
|
8
|
+
}), c = (t) => !isNaN(t.getTime()), L = (t) => {
|
|
9
|
+
const o = new Date(t);
|
|
10
|
+
if (!o)
|
|
11
|
+
return "";
|
|
12
|
+
const r = /* @__PURE__ */ new Date(), e = Math.floor(r.getTime() - o.getTime());
|
|
13
|
+
return e < 6e4 ? `${Math.floor(e / 1e3)}s` : e < 36e5 ? `${Math.floor(e / 6e4)}m` : e < 864e5 ? `${Math.floor(e / 36e5)}h` : o.getFullYear() === r.getFullYear() ? `${o.toLocaleDateString("en-US", {
|
|
14
|
+
month: "short",
|
|
15
|
+
day: "numeric"
|
|
16
|
+
})}` : `${o.toLocaleDateString("en-US", {
|
|
17
|
+
month: "2-digit",
|
|
18
|
+
day: "2-digit",
|
|
19
|
+
year: "2-digit"
|
|
20
|
+
})}`;
|
|
21
|
+
};
|
|
9
22
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
I as abbreviate,
|
|
24
|
+
S as formatDate,
|
|
25
|
+
s as formatDecimals,
|
|
26
|
+
N as formatTime,
|
|
27
|
+
L as getTimeUntilNow,
|
|
28
|
+
c as isValidDate
|
|
15
29
|
};
|
|
@@ -2,10 +2,11 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { StreamLayerThemeProvider as o } from "../../ui/theme/index.js";
|
|
3
3
|
import { AppContainer as t } from "./styles.js";
|
|
4
4
|
import "../../ui/theme/theme.js";
|
|
5
|
+
import "../../ui/theme/breakpoints.js";
|
|
5
6
|
import "../../ui/theme/constants.js";
|
|
6
7
|
import "@linaria/react";
|
|
7
|
-
const
|
|
8
|
+
const a = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(e, {}) }), l = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(e, {}) }) }) });
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
l as container,
|
|
11
|
+
a as theme
|
|
11
12
|
};
|