@streamlayer/react-ui 0.91.1 → 0.93.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 (94) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/index-keh7OLCY.js +67 -0
  3. package/lib/index.js +5 -4
  4. package/lib/ui/app/Features/Gamification/Friends.d.ts +2 -1
  5. package/lib/ui/app/Features/Gamification/Friends.js +6 -6
  6. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +3 -2
  7. package/lib/ui/app/Features/Gamification/Leaderboard.js +26 -24
  8. package/lib/ui/app/Features/Gamification/Question.js +1 -1
  9. package/lib/ui/app/Features/Gamification/Tabs.d.ts +7 -2
  10. package/lib/ui/app/Features/Gamification/Tabs.js +42 -31
  11. package/lib/ui/app/Features/Gamification/gamification-feature.js +5 -2
  12. package/lib/ui/app/Features/Gamification/index.d.ts +6 -2
  13. package/lib/ui/app/Features/Gamification/index.js +86 -45
  14. package/lib/ui/app/Features/index.d.ts +6 -2
  15. package/lib/ui/app/Features/index.js +13 -11
  16. package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +3 -2
  17. package/lib/ui/app/Navigation/MastersNavigation/index.js +37 -31
  18. package/lib/ui/app/Navigation/index.js +6 -7
  19. package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -1
  20. package/lib/ui/app/Notifications/Onboarding/index.js +91 -73
  21. package/lib/ui/app/Notifications/index.d.ts +6 -2
  22. package/lib/ui/app/Notifications/index.js +120 -91
  23. package/lib/ui/app/Points/index.js +6 -5
  24. package/lib/ui/app/masters.d.ts +7 -0
  25. package/lib/ui/app/masters.js +73 -51
  26. package/lib/ui/app/styles.d.ts +1 -0
  27. package/lib/ui/app/styles.js +6 -1
  28. package/lib/ui/app/useClipboardCopy.d.ts +2 -1
  29. package/lib/ui/app/useImagesPreload.d.ts +4 -0
  30. package/lib/ui/app/useImagesPreload.js +23 -0
  31. package/lib/ui/app/useMastersApp.js +15 -14
  32. package/lib/ui/app/useSdkResponsive.d.ts +14 -0
  33. package/lib/ui/app/useSdkResponsive.js +46 -0
  34. package/lib/ui/app/useSdkScroll.d.ts +4 -1
  35. package/lib/ui/app/useSdkScroll.js +36 -85
  36. package/lib/ui/gamification/detail/header/index.js +11 -11
  37. package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
  38. package/lib/ui/gamification/detail/header/styles.js +11 -11
  39. package/lib/ui/gamification/leaderboard/static.d.ts +2 -1
  40. package/lib/ui/gamification/onboarding/index.d.ts +5 -0
  41. package/lib/ui/gamification/onboarding/index.js +69 -42
  42. package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +7 -0
  43. package/lib/ui/gamification/onboarding/invitingUser/index.js +16 -0
  44. package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -0
  45. package/lib/ui/gamification/onboarding/invitingUser/styles.js +24 -0
  46. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
  47. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
  48. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
  49. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
  50. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +2 -1
  51. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +1 -1
  52. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +2 -0
  53. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +18 -12
  54. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +7 -0
  55. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +10 -0
  56. package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +5 -0
  57. package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.js +24 -0
  58. package/lib/ui/gamification/points/index.js +5 -4
  59. package/lib/ui/gamification/question/insight/index.js +5 -5
  60. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +17 -17
  61. package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
  62. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
  63. package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
  64. package/lib/ui/gamification/vote/index.js +55 -54
  65. package/lib/ui/gamification/vote/insight-details/index.js +1 -1
  66. package/lib/ui/gamification/vote/styles.d.ts +1 -0
  67. package/lib/ui/gamification/vote/styles.js +17 -11
  68. package/lib/ui/gamification/vote/vote-option/index.js +62 -58
  69. package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
  70. package/lib/ui/gamification/vote/win-bar/index.js +21 -20
  71. package/lib/ui/navigation/button/LeaderBoard.js +5 -6
  72. package/lib/ui/navigation/index.js +6 -7
  73. package/lib/ui/navigation/masters.d.ts +2 -1
  74. package/lib/ui/navigation/masters.js +9 -6
  75. package/lib/ui/questions/insight/index.d.ts +1 -1
  76. package/lib/ui/questions/insight/index.js +18 -25
  77. package/lib/ui/skeleton/index.d.ts +7 -0
  78. package/lib/ui/skeleton/index.js +7 -0
  79. package/lib/ui/skeleton/styles.d.ts +2 -0
  80. package/lib/ui/skeleton/styles.js +9 -0
  81. package/lib/ui/theme/breakpoints.d.ts +4 -1
  82. package/lib/ui/theme/breakpoints.js +24 -12
  83. package/lib/ui/theme/constants.d.ts +4 -0
  84. package/lib/ui/theme/constants.js +6 -2
  85. package/lib/ui/theme/index.js +4 -3
  86. package/lib/ui/theme/theme.js +29 -21
  87. package/lib/utils/createDemo.js +12 -13
  88. package/lib/utils/debug/components/copyLogs.js +10 -9
  89. package/lib/utils/decorators/container.js +4 -3
  90. package/package.json +18 -18
  91. package/lib/LeaderBoard_fzzlxb-w40geAFS.js +0 -1
  92. package/lib/index_ej4hfx-w40geAFS.js +0 -1
  93. package/lib/masters_m6itlr-w40geAFS.js +0 -1
  94. package/lib/utils/useStreamLayerApp.js +0 -25
@@ -1,83 +1,87 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { QuestionImages as a, QuestionType as i, QuestionStatus as h } from "@streamlayer/sdk-web-types";
3
- import { AnimatedCounter as P } from "../../../animated-counter/index.js";
4
- import { IconDefault as B, IconContainer as V, IconWrap as b, IconCircle as j, ButtonContainer as U, ButtonPct as $, ButtonBody as M, Title as W, Pts as y, Indicators as z, CheckIcon as F, Percentage as G } from "./styles.js";
1
+ import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
+ import { useState as b, useLayoutEffect as j } from "react";
3
+ import { QuestionImages as a, QuestionType as o, QuestionStatus as S } from "@streamlayer/sdk-web-types";
4
+ import { AnimatedCounter as U } from "../../../animated-counter/index.js";
5
+ import { IconDefault as $, IconContainer as y, IconWrap as F, IconCircle as M, ButtonContainer as W, ButtonPct as z, ButtonBody as G, Title as H, Pts as J, Indicators as K, CheckIcon as X, Percentage as Y } from "./styles.js";
5
6
  import "react-countup";
6
7
  import "@linaria/react";
7
8
  import "../../../icons/index.js";
8
- import "react";
9
- const f = {
10
- [a.CENTERED]: (t) => /* @__PURE__ */ e(B, { alt: "option-icon", src: t }),
11
- [a.TRANSPARENT]: (t) => /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(b, { style: { backgroundImage: `url(${t})` } }) }),
12
- [a.ROUNDED]: (t) => /* @__PURE__ */ e(j, { alt: "option-icon", src: t }),
9
+ const I = {
10
+ [a.CENTERED]: (t) => /* @__PURE__ */ n($, { alt: "option-icon", src: t }),
11
+ [a.TRANSPARENT]: (t) => /* @__PURE__ */ n(y, { children: /* @__PURE__ */ n(F, { style: { backgroundImage: `url(${t})` } }) }),
12
+ [a.ROUNDED]: (t) => /* @__PURE__ */ n(M, { alt: "option-icon", src: t }),
13
13
  [a.NONE]: () => null,
14
14
  [a.UNSET]: () => null
15
- }, H = ({ questionType: t, hasCorrectAnswer: c, correct: n, youVoted: r, questionVoted: o }) => {
16
- if (t === i.POLL && r)
15
+ }, Z = ({ questionType: t, hasCorrectAnswer: c, correct: r, youVoted: i, questionVoted: e }) => {
16
+ if (t === o.POLL && i)
17
17
  return "correct";
18
- if (t === i.PREDICTION) {
19
- if (c && o)
20
- return r ? n ? "correct" : "incorrect" : "unset";
21
- if (r)
18
+ if (t === o.PREDICTION) {
19
+ if (c && e)
20
+ return i ? r ? "correct" : "incorrect" : "unset";
21
+ if (i)
22
22
  return "correct";
23
23
  }
24
- return t === i.TRIVIA && o && r ? n ? "correct" : "incorrect" : "unset";
25
- }, J = ({
24
+ return t === o.TRIVIA && e && i ? r ? "correct" : "incorrect" : "unset";
25
+ }, _ = ({
26
26
  questionType: t,
27
27
  questionVoted: c,
28
- correct: n,
29
- hasCorrectAnswer: r,
30
- questionStatus: o
31
- }) => t === i.TRIVIA ? c && n : t === i.PREDICTION ? c && n && r || o === h.RESOLVED && n : !1, rt = (t) => {
32
- var D;
28
+ correct: r,
29
+ hasCorrectAnswer: i,
30
+ questionStatus: e
31
+ }) => t === o.TRIVIA ? c && r : t === o.PREDICTION ? c && r && i || e === S.RESOLVED && r : !1, st = (t) => {
32
+ var N;
33
33
  const {
34
34
  // option props
35
35
  id: c,
36
- icon: n,
37
- text: r,
38
- percentageDecimal: o,
39
- points: S,
36
+ icon: r,
37
+ text: i,
38
+ percentageDecimal: e,
39
+ points: T,
40
40
  // extra props
41
- onVote: T,
42
- markThatVoted: O,
43
- youSelected: E,
41
+ onVote: A,
42
+ markThatVoted: D,
43
+ youSelected: h,
44
44
  questionVoted: s,
45
- imageMode: C,
45
+ imageMode: E,
46
46
  answerTimeExpired: w,
47
- questionStatus: u,
48
- isLoading: g,
47
+ questionStatus: C,
48
+ isLoading: O,
49
49
  questionType: d,
50
- correct: A,
50
+ correct: g,
51
51
  hasCorrectAnswer: k,
52
- votedAfterQuestionClosed: v,
53
- enteredAnActiveQuestion: R,
54
- marketClosed: p
55
- } = t, I = H(t), x = J({ questionType: d, questionVoted: s, correct: A, hasCorrectAnswer: k, questionStatus: u }), m = p && d === i.PREDICTION, N = s || m, L = d === i.PREDICTION && !s && u !== h.RESOLVED;
56
- return /* @__PURE__ */ l(
57
- U,
52
+ votedAfterQuestionClosed: x,
53
+ enteredAnActiveQuestion: P,
54
+ marketClosed: l
55
+ } = t, [L, p] = b(e), m = Z(t), v = _({ questionType: d, questionVoted: s, correct: g, hasCorrectAnswer: k, questionStatus: C }), f = l && d === o.PREDICTION, R = s || f, Q = d === o.PREDICTION && !s && !l, B = s && !h && m !== "incorrect";
56
+ return j(() => {
57
+ e > 0 && (p(0), requestAnimationFrame(() => {
58
+ p(e);
59
+ }));
60
+ }, [e]), /* @__PURE__ */ u(
61
+ W,
58
62
  {
59
63
  value: c,
60
- "data-selected": E,
61
- "data-answer-state": I,
62
- disabled: s || g || w || m && !R || m && R && v,
63
- "data-is-not-checked": s && !E && I !== "incorrect",
64
- onClick: (Q) => {
65
- O(
66
- d === i.PREDICTION ? p : u === h.RESOLVED
67
- ), T(Q);
64
+ "data-selected": h,
65
+ "data-answer-state": m,
66
+ disabled: s || O || w || f && !P || f && P && x,
67
+ "data-is-not-checked": B,
68
+ onClick: (V) => {
69
+ D(
70
+ d === o.PREDICTION ? l : C === S.RESOLVED
71
+ ), A(V);
68
72
  },
69
73
  children: [
70
- /* @__PURE__ */ e($, { "data-answer-state": I, style: { width: `${N ? o : 0}%` } }),
71
- /* @__PURE__ */ l(M, { children: [
72
- n && C && ((D = f[C]) == null ? void 0 : D.call(f, n)),
73
- /* @__PURE__ */ e(W, { children: r }),
74
- L && /* @__PURE__ */ l("div", { children: [
75
- /* @__PURE__ */ e(P, { value: S }),
76
- /* @__PURE__ */ e(y, { children: "pts" })
74
+ /* @__PURE__ */ n(z, { "data-answer-state": m, style: { width: `${R ? L : 0}%` } }),
75
+ /* @__PURE__ */ u(G, { children: [
76
+ r && E && ((N = I[E]) == null ? void 0 : N.call(I, r)),
77
+ /* @__PURE__ */ n(H, { children: i }),
78
+ Q && /* @__PURE__ */ u("div", { children: [
79
+ T,
80
+ /* @__PURE__ */ n(J, { children: "pts" })
77
81
  ] }),
78
- N && /* @__PURE__ */ l(z, { children: [
79
- x && /* @__PURE__ */ e(F, { name: "selected" }),
80
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(P, { value: o, suffix: "%" }) })
82
+ R && /* @__PURE__ */ u(K, { children: [
83
+ v && /* @__PURE__ */ n(X, { name: "selected" }),
84
+ /* @__PURE__ */ n(Y, { children: /* @__PURE__ */ n(U, { value: e, suffix: "%" }) })
81
85
  ] })
82
86
  ] })
83
87
  ]
@@ -85,5 +89,5 @@ const f = {
85
89
  );
86
90
  };
87
91
  export {
88
- rt as VotingOption
92
+ st as VotingOption
89
93
  };
@@ -5,6 +5,7 @@ interface WinBarProps {
5
5
  points?: number;
6
6
  isPlayingTimer?: boolean;
7
7
  isTimer?: boolean;
8
+ animatePoints?: boolean;
8
9
  questionType?: QuestionType;
9
10
  timerDuration?: number;
10
11
  onTimerExpired?: () => void;
@@ -1,35 +1,36 @@
1
- import { jsxs as i, jsx as r, Fragment as d } from "react/jsx-runtime";
2
- import { QuestionType as t } from "@streamlayer/sdk-web-types";
3
- import { AnimatedCounter as l } from "../../../animated-counter/index.js";
4
- import { Timer as s } from "../../../timer/index.js";
5
- import { WinBarContainer as h, Content as P, Title as C, WinIcon as f, Points as u, PointsCount as I, PointsUnits as T } from "./styles.js";
1
+ import { jsxs as i, jsx as r, Fragment as p } from "react/jsx-runtime";
2
+ import { QuestionType as o } from "@streamlayer/sdk-web-types";
3
+ import { AnimatedCounter as s } from "../../../animated-counter/index.js";
4
+ import { Timer as h } from "../../../timer/index.js";
5
+ import { WinBarContainer as P, Content as C, Title as f, WinIcon as u, Points as I, PointsCount as y, PointsUnits as T } from "./styles.js";
6
6
  import "react-countup";
7
7
  import "@linaria/react";
8
8
  import "react";
9
9
  import "react-countdown-circle-timer";
10
10
  import "../../../theme/constants.js";
11
11
  import "../../../icons/index.js";
12
- const N = ({
13
- title: o,
14
- points: e,
12
+ const R = ({
13
+ title: e,
14
+ points: n,
15
15
  isPlayingTimer: m,
16
16
  isTimer: c,
17
- questionType: n,
18
- timerDuration: p,
19
- onTimerExpired: a
20
- }) => /* @__PURE__ */ i(h, { style: { justifyContent: n === t.PREDICTION ? "center" : "space-between" }, children: [
21
- /* @__PURE__ */ i(P, { children: [
22
- o && /* @__PURE__ */ r(C, { children: o }),
23
- e !== void 0 && n !== t.POLL && /* @__PURE__ */ i(d, { children: [
24
- /* @__PURE__ */ r(f, { name: "icon-trophy" }),
25
- /* @__PURE__ */ i(u, { children: [
26
- /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(l, { value: e }) }),
17
+ animatePoints: a,
18
+ questionType: t,
19
+ timerDuration: d,
20
+ onTimerExpired: l
21
+ }) => /* @__PURE__ */ i(P, { style: { justifyContent: t === o.PREDICTION ? "center" : "space-between" }, children: [
22
+ /* @__PURE__ */ i(C, { children: [
23
+ e && /* @__PURE__ */ r(f, { children: e }),
24
+ n !== void 0 && t !== o.POLL && /* @__PURE__ */ i(p, { children: [
25
+ /* @__PURE__ */ r(u, { name: "icon-trophy" }),
26
+ /* @__PURE__ */ i(I, { children: [
27
+ /* @__PURE__ */ r(y, { children: a ? /* @__PURE__ */ r(s, { value: n, delay: 0.3 }) : n }),
27
28
  /* @__PURE__ */ r(T, { children: "PTS" })
28
29
  ] })
29
30
  ] })
30
31
  ] }),
31
- c && n !== t.PREDICTION && /* @__PURE__ */ r(s, { isPlaying: m, onTimerExpired: a, duration: p })
32
+ c && t !== o.PREDICTION && /* @__PURE__ */ r(h, { isPlaying: m, onTimerExpired: l, duration: d })
32
33
  ] });
33
34
  export {
34
- N as WinBar
35
+ R as WinBar
35
36
  };
@@ -2,26 +2,25 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import { styled as e } from "@linaria/react";
3
3
  import { SvgIcon as a } from "../../icons/index.js";
4
4
  import { Button as d } from "./index.js";
5
- import "../../../LeaderBoard_fzzlxb-w40geAFS.js";
6
5
  import "react";
7
6
  import "./styles.js";
8
- const n = () => a, m = /* @__PURE__ */ e(n())({
7
+ const n = () => a, c = /* @__PURE__ */ e(n())({
9
8
  name: "ButtonIcon",
10
9
  class: "b180jd7l",
11
10
  propsAsIs: !0
12
- }), u = "leaderboard", I = (o) => {
11
+ }), b = "leaderboard", u = (o) => {
13
12
  var t;
14
13
  return /* @__PURE__ */ r(d, {
15
14
  ...o,
16
15
  label: "Leader Board",
17
16
  id: "leaderboard",
18
- icon: /* @__PURE__ */ r(m, {
17
+ icon: /* @__PURE__ */ r(c, {
19
18
  name: "icon-btn-leaderboard",
20
19
  "data-selected": (t = o.active) == null ? void 0 : t.toString()
21
20
  })
22
21
  });
23
22
  };
24
23
  export {
25
- I as LeaderBoardButton,
26
- u as LeaderBoardButtonId
24
+ u as LeaderBoardButton,
25
+ b as LeaderBoardButtonId
27
26
  };
@@ -1,17 +1,16 @@
1
- import { jsx as s } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { styled as r } from "@linaria/react";
3
- import "../../index_ej4hfx-w40geAFS.js";
4
3
  const n = /* @__PURE__ */ r("div")({
5
4
  name: "Buttons",
6
5
  class: "b6tbwuy",
7
6
  propsAsIs: !1
8
- }), a = ({
7
+ }), i = ({
9
8
  children: t,
10
- className: o
11
- }) => /* @__PURE__ */ s(n, {
12
- className: o,
9
+ className: s
10
+ }) => /* @__PURE__ */ o(n, {
11
+ className: s,
13
12
  children: t
14
13
  });
15
14
  export {
16
- a as Navigation
15
+ i as Navigation
17
16
  };
@@ -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,13 +1,16 @@
1
- import { styled as o } from "@linaria/react";
2
- import { Navigation as t } from "./index.js";
3
- import "../../masters_m6itlr-w40geAFS.js";
1
+ import { styled as a } from "@linaria/react";
2
+ import { Navigation as s } from "./index.js";
4
3
  import "react/jsx-runtime";
5
- import "../../index_ej4hfx-w40geAFS.js";
6
- const i = () => t, n = /* @__PURE__ */ o(i())({
4
+ const p = /* @__PURE__ */ a("div")({
7
5
  name: "Navigation",
8
6
  class: "n19lpak2",
7
+ propsAsIs: !1
8
+ }), o = () => s, e = /* @__PURE__ */ a(o())({
9
+ name: "NavigationItems",
10
+ class: "n1w473c2",
9
11
  propsAsIs: !0
10
12
  });
11
13
  export {
12
- n as Navigation
14
+ p as Navigation,
15
+ e as NavigationItems
13
16
  };
@@ -2,6 +2,6 @@
2
2
  import { InsightHistory, FeedItem } from '@streamlayer/sdk-web-types';
3
3
  export type InsightContentProps = InsightHistory & {
4
4
  created?: FeedItem['created'];
5
- isPickHistory?: boolean;
5
+ isDetail?: boolean;
6
6
  };
7
7
  export declare const InsightContent: React.FC<InsightContentProps>;
@@ -1,41 +1,34 @@
1
- import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
- import { useMemo as g } from "react";
3
- import { VideoPlayer as D } from "../../video-player/index.js";
4
- import { isValidDate as v, formatDate as b, formatTime as x } from "../../../utils/common.js";
5
- import { Container as C, DateWrap as T, Image as j, Content as y, Title as I, Description as U } from "./styles.js";
1
+ import { jsxs as e, jsx as m } from "react/jsx-runtime";
2
+ import { useMemo as T } from "react";
3
+ import { VideoPlayer as v } from "../../video-player/index.js";
4
+ import { isValidDate as b, formatDate as f, formatTime as x } from "../../../utils/common.js";
5
+ import { Container as C, DateWrap as I, Image as j, Content as B, Title as M, Description as P } from "./styles.js";
6
6
  import "../../icons/index.js";
7
7
  import "@linaria/react";
8
8
  import "../../video-player/styles.js";
9
- const G = ({
10
- created: m,
11
- image: c,
12
- title: f,
13
- isPickHistory: h,
14
- instantView: r,
15
- notification: d
16
- }) => {
17
- const l = g(() => {
18
- if (m) {
19
- const p = new Date(m);
20
- if (v(p))
9
+ const G = ({ created: d, instantView: r, isDetail: h, notification: o }) => {
10
+ const l = T(() => {
11
+ if (d) {
12
+ const p = new Date(d);
13
+ if (b(p))
21
14
  return {
22
- date: b(p),
15
+ date: f(p),
23
16
  time: x(p)
24
17
  };
25
18
  }
26
19
  return null;
27
- }, [m]), u = (r == null ? void 0 : r.image) || c;
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;
28
21
  return /* @__PURE__ */ e(C, { children: [
29
- l && /* @__PURE__ */ e(T, { children: [
22
+ l && /* @__PURE__ */ e(I, { children: [
30
23
  l.date,
31
24
  " · ",
32
25
  l.time
33
26
  ] }),
34
- (r == null ? void 0 : r.video) && /* @__PURE__ */ o(D, { source: r.video.url, poster: r.video.thumbnailUrl }),
35
- u && !(r != null && r.video) && /* @__PURE__ */ o(j, { src: u }),
36
- /* @__PURE__ */ e(y, { children: [
37
- /* @__PURE__ */ o(I, { children: h ? f : r == null ? void 0 : r.heading }),
38
- /* @__PURE__ */ o(U, { children: h ? d == null ? void 0 : d.body : r == null ? void 0 : r.body })
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 })
39
32
  ] })
40
33
  ] });
41
34
  };
@@ -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
  };