@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.
Files changed (88) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/{useClipboardCopy-E5rEe6It.js → index-jRXrW6ie.js} +1513 -1537
  3. package/lib/index.js +5 -4
  4. package/lib/ui/app/Features/Gamification/Friends.js +6 -5
  5. package/lib/ui/app/Features/Gamification/Leaderboard.js +4 -3
  6. package/lib/ui/app/Features/Gamification/Question.js +19 -21
  7. package/lib/ui/app/Features/Gamification/QuestionsList.js +1 -1
  8. package/lib/ui/app/Features/Gamification/Tabs.js +42 -39
  9. package/lib/ui/app/Features/Gamification/gamification-feature.js +11 -6
  10. package/lib/ui/app/Features/Gamification/index.js +72 -84
  11. package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +2 -0
  12. package/lib/ui/app/Navigation/MastersNavigation/index.js +43 -35
  13. package/lib/ui/app/Notifications/Onboarding/index.d.ts +3 -2
  14. package/lib/ui/app/Notifications/Onboarding/index.js +114 -86
  15. package/lib/ui/app/Notifications/index.js +115 -108
  16. package/lib/ui/app/Points/index.js +6 -5
  17. package/lib/ui/app/masters.js +41 -31
  18. package/lib/ui/app/styles.d.ts +1 -0
  19. package/lib/ui/app/styles.js +6 -1
  20. package/lib/ui/app/useClipboardCopy.js +26 -5
  21. package/lib/ui/app/useImagesPreload.d.ts +4 -0
  22. package/lib/ui/app/useImagesPreload.js +23 -0
  23. package/lib/ui/app/useMastersApp.js +42 -35
  24. package/lib/ui/app/useSdkResponsive.d.ts +1 -1
  25. package/lib/ui/app/useSdkResponsive.js +23 -23
  26. package/lib/ui/app/useSdkScroll.d.ts +1 -0
  27. package/lib/ui/app/useSdkScroll.js +32 -23
  28. package/lib/ui/gamification/detail/header/index.js +11 -11
  29. package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
  30. package/lib/ui/gamification/detail/header/styles.js +11 -11
  31. package/lib/ui/gamification/onboarding/index.d.ts +2 -1
  32. package/lib/ui/gamification/onboarding/index.js +55 -43
  33. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
  34. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
  35. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
  36. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
  37. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +14 -13
  38. package/lib/ui/gamification/points/index.js +5 -4
  39. package/lib/ui/gamification/question/insight/index.js +4 -5
  40. package/lib/ui/gamification/question/list/index.js +14 -14
  41. package/lib/ui/gamification/question/notification/index.js +3 -2
  42. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +17 -17
  43. package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
  44. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
  45. package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
  46. package/lib/ui/gamification/question/notification/tweet/index.js +10 -7
  47. package/lib/ui/gamification/question/twitter/index.js +16 -33
  48. package/lib/ui/gamification/question/twitter/styles.d.ts +0 -1
  49. package/lib/ui/gamification/question/twitter/styles.js +7 -12
  50. package/lib/ui/gamification/vote/index.js +57 -56
  51. package/lib/ui/gamification/vote/insight-details/index.js +5 -6
  52. package/lib/ui/gamification/vote/twitter-details/index.js +13 -29
  53. package/lib/ui/gamification/vote/twitter-details/styles.d.ts +0 -1
  54. package/lib/ui/gamification/vote/twitter-details/styles.js +3 -8
  55. package/lib/ui/gamification/vote/vote-option/index.js +61 -57
  56. package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
  57. package/lib/ui/gamification/vote/win-bar/index.js +21 -20
  58. package/lib/ui/modal/index.d.ts +9 -0
  59. package/lib/ui/modal/index.js +34 -0
  60. package/lib/ui/navigation/button/FeaturedGroups.d.ts +3 -1
  61. package/lib/ui/navigation/button/FeaturedGroups.js +11 -11
  62. package/lib/ui/navigation/masters.d.ts +2 -1
  63. package/lib/ui/navigation/masters.js +9 -4
  64. package/lib/ui/questions/insight/index.d.ts +2 -3
  65. package/lib/ui/questions/insight/index.js +13 -35
  66. package/lib/ui/questions/insight/styles.d.ts +0 -1
  67. package/lib/ui/questions/insight/styles.js +9 -14
  68. package/lib/ui/questions/twitter/account/index.d.ts +2 -1
  69. package/lib/ui/questions/twitter/account/index.js +24 -18
  70. package/lib/ui/questions/twitter/account/styles.d.ts +1 -1
  71. package/lib/ui/questions/twitter/account/styles.js +2 -2
  72. package/lib/ui/questions/twitter/index.d.ts +2 -2
  73. package/lib/ui/questions/twitter/index.js +31 -9
  74. package/lib/ui/questions/twitter/styles.d.ts +1 -0
  75. package/lib/ui/questions/twitter/styles.js +8 -3
  76. package/lib/ui/skeleton/index.d.ts +7 -0
  77. package/lib/ui/skeleton/index.js +7 -0
  78. package/lib/ui/skeleton/styles.d.ts +2 -0
  79. package/lib/ui/skeleton/styles.js +9 -0
  80. package/lib/ui/theme/breakpoints.d.ts +4 -1
  81. package/lib/ui/theme/breakpoints.js +24 -12
  82. package/lib/ui/theme/constants.d.ts +4 -0
  83. package/lib/ui/theme/constants.js +6 -2
  84. package/lib/ui/theme/index.js +4 -3
  85. package/lib/ui/theme/theme.js +29 -21
  86. package/lib/utils/common.js +22 -8
  87. package/lib/utils/decorators/container.js +4 -3
  88. package/package.json +18 -18
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- export declare const Navigation: import("@linaria/react").WYWEvalMeta & import("react").FC<{
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 o } from "@linaria/react";
2
- import { Navigation as a } from "./index.js";
1
+ import { styled as a } from "@linaria/react";
2
+ import { Navigation as s } from "./index.js";
3
3
  import "react/jsx-runtime";
4
- const t = () => a, p = /* @__PURE__ */ o(t())({
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, FeedItem } from '@streamlayer/sdk-web-types';
2
+ import { InsightHistory } from '@streamlayer/sdk-web-types';
3
3
  export type InsightContentProps = InsightHistory & {
4
- created?: FeedItem['created'];
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 h, jsx as m } from "react/jsx-runtime";
2
- import { useMemo as f } from "react";
3
- import { VideoPlayer as g } from "../../video-player/index.js";
4
- import { isValidDate as D, formatDate as c, formatTime as v } from "../../../utils/common.js";
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 E = ({
10
- created: o,
11
- title: e,
12
- isPickHistory: u,
13
- instantView: r,
14
- notification: d
15
- }) => {
16
- const l = f(() => {
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
- E as InsightContent
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 a = /* @__PURE__ */ s("div")({
2
+ const n = /* @__PURE__ */ s("div")({
3
3
  name: "Container",
4
4
  class: "cgn5uen",
5
5
  propsAsIs: !1
6
- }), n = /* @__PURE__ */ s("div")({
6
+ }), t = /* @__PURE__ */ s("div")({
7
7
  name: "Content",
8
8
  class: "c1px8nt6",
9
9
  propsAsIs: !1
10
- }), t = /* @__PURE__ */ s("h3")({
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("div")({
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: "i1gfjeu5",
20
+ class: "id3lh3p",
25
21
  propsAsIs: !1
26
22
  });
27
23
  export {
28
- a as Container,
29
- n as Content,
30
- p as DateWrap,
24
+ n as Container,
25
+ t as Content,
31
26
  o as Description,
32
- c as Image,
33
- t as Title
27
+ p as Image,
28
+ a as Title
34
29
  };
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  export type AccountProps = {
3
3
  image: string;
4
- name: string;
4
+ name: string | undefined;
5
5
  userName: string;
6
6
  verified: boolean;
7
+ createdTweet?: string;
7
8
  };
8
9
  export declare const Account: React.FC<AccountProps>;
@@ -1,25 +1,31 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { SvgIcon as c } from "../../../icons/index.js";
3
- import { Container as m, ImageContainer as a, Image as d, TwitterIcon as l, Details as p, Name as s, UserName as h } from "./styles.js";
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 j = ({ image: e, name: n, userName: i, verified: o }) => /* @__PURE__ */ r(m, { children: [
7
- e && /* @__PURE__ */ r(a, { children: [
8
- /* @__PURE__ */ t(d, { src: e }),
9
- /* @__PURE__ */ t(l, { name: "twitter" })
10
- ] }),
11
- /* @__PURE__ */ r(p, { children: [
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
- i && /* @__PURE__ */ r(h, { children: [
18
- "@",
19
- i
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
- j as Account
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 UserName: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
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: "UserName",
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 UserName
41
+ g as UserNameAndDate
42
42
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { TweetHistory, FeedItem } from '@streamlayer/sdk-web-types';
2
+ import { TweetHistory } from '@streamlayer/sdk-web-types';
3
3
  export type TwitterContentProps = TweetHistory & {
4
- created?: FeedItem['created'];
4
+ isDetail?: boolean;
5
5
  };
6
6
  export declare const TwitterContent: React.FC<TwitterContentProps>;
@@ -1,14 +1,36 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { Account as s } from "./account/index.js";
3
- import { Container as m, Details as p, Body as c } from "./styles.js";
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 "react";
8
+ import "../../video-player/styles.js";
9
+ import "../../../utils/common.js";
7
10
  import "./account/styles.js";
8
- const a = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), d = (r) => r == null ? void 0 : r.replace(a, ""), j = ({ image: r, body: o, account: i, accountVerified: t }) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ n(p, { children: [
9
- /* @__PURE__ */ e(s, { image: r, name: i, userName: i, verified: t }),
10
- /* @__PURE__ */ e(c, { children: d(o) })
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
- j as TwitterContent
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
- }), t = /* @__PURE__ */ s("div")({
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
- t as Body,
20
+ n as Body,
17
21
  e as Container,
18
- o as Details
22
+ o as Details,
23
+ t as Image
19
24
  };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export type SkeletonProps = {
3
+ style?: React.CSSProperties;
4
+ children?: React.ReactNode;
5
+ loading: boolean;
6
+ };
7
+ export declare const Skeleton: React.FC<SkeletonProps>;
@@ -0,0 +1,7 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Container as m } from "./styles.js";
3
+ import "@linaria/react";
4
+ const f = ({ children: r, style: o, loading: t }) => t ? /* @__PURE__ */ e(m, { style: o, children: r }) : r;
5
+ export {
6
+ f as Skeleton
7
+ };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -0,0 +1,9 @@
1
+ import { styled as s } from "@linaria/react";
2
+ const e = /* @__PURE__ */ s("div")({
3
+ name: "Container",
4
+ class: "cqg02m",
5
+ propsAsIs: !1
6
+ });
7
+ export {
8
+ e as Container
9
+ };
@@ -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 i = (t) => (n) => `
3
- @media (${t}) {
4
- ${n}
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
- `, o = {
7
- up: (t) => {
8
- const n = e[t];
9
- return i(`min-width: ${n}px`);
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
- down: (t) => {
12
- const n = e[t] - 1;
13
- return i(`max-width: ${n}px`);
23
+ orientation: (n) => {
24
+ const t = a[n];
25
+ return r(`orientation: ${t}`);
14
26
  }
15
27
  };
16
28
  export {
17
- o as breakpoints
29
+ s as breakpoints
18
30
  };
@@ -86,4 +86,8 @@ export declare const BREAKPOINTS: {
86
86
  xl: number;
87
87
  xxl: number;
88
88
  };
89
+ export declare const ORIENTATION: {
90
+ landscape: string;
91
+ portrait: string;
92
+ };
89
93
  export declare const colors: string;
@@ -60,7 +60,10 @@ const N = {
60
60
  lg: 992,
61
61
  xl: 1200,
62
62
  xxl: 1400
63
- }, G = Object.keys(E).reduce((A, R) => {
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 colors
78
+ G as ORIENTATION,
79
+ B as colors
76
80
  };
@@ -1,7 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { theme as a } from "./theme.js";
2
+ import { theme as o } from "./theme.js";
3
+ import "./breakpoints.js";
3
4
  import "./constants.js";
4
- const s = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a, style: m, children: r }) });
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
- s as StreamLayerThemeProvider
7
+ p as StreamLayerThemeProvider
7
8
  };
@@ -1,36 +1,44 @@
1
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { colors as l, FONT as t } from "./constants.js";
3
- const s = `
4
- ${l}
5
- --font-family: ${t.REGULAR};
6
- --font-regular: ${t.REGULAR};
7
- --font-color: ${t.COLOR};
8
- --font-serif: ${t.SERIF};
9
- --font-weight-default: ${t.WEIGHT_DEFAULT};
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
- `, c = "StreamLayerCSSReset", m = "ttkj0ah", f = () => /* @__PURE__ */ e("table", {
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__ */ e("thead", {
27
+ children: [/* @__PURE__ */ t("thead", {
20
28
  children: /* @__PURE__ */ r("tr", {
21
- children: [/* @__PURE__ */ e("th", {
29
+ children: [/* @__PURE__ */ t("th", {
22
30
  children: "name"
23
- }), /* @__PURE__ */ e("th", {
31
+ }), /* @__PURE__ */ t("th", {
24
32
  children: "value"
25
33
  })]
26
34
  })
27
- }), /* @__PURE__ */ e("tbody", {
28
- children: s.split(";").map((i) => {
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__ */ e("td", {
39
+ children: [/* @__PURE__ */ t("td", {
32
40
  children: o
33
- }), /* @__PURE__ */ e("td", {
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
- f as ThemeVariables,
43
- c as resetCss,
44
- m as theme,
45
- s as themeStr
50
+ x as ThemeVariables,
51
+ m as resetCss,
52
+ p as theme,
53
+ h as themeStr
46
54
  };
@@ -1,15 +1,29 @@
1
- const o = (t) => t.split(/\s+/).map((e) => e[0]).join("").toUpperCase(), i = (t) => t ? t.toLocaleString("en-US") : "0", a = (t) => t.toLocaleDateString("en-US", {
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
- }), n = (t) => t.toLocaleTimeString("en-US", {
5
+ }), N = (t) => t.toLocaleTimeString("en-US", {
6
6
  hour: "2-digit",
7
7
  minute: "2-digit"
8
- }), r = (t) => !isNaN(t.getTime());
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
- o as abbreviate,
11
- a as formatDate,
12
- i as formatDecimals,
13
- n as formatTime,
14
- r as isValidDate
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 h = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(e, {}) }), a = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(e, {}) }) }) });
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
- a as container,
10
- h as theme
10
+ l as container,
11
+ a as theme
11
12
  };