@streamlayer/react-ui 0.92.0 → 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 (53) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/index.js +5 -4
  3. package/lib/ui/app/Features/Gamification/Tabs.js +36 -32
  4. package/lib/ui/app/Features/Gamification/gamification-feature.js +4 -1
  5. package/lib/ui/app/Features/Gamification/index.js +42 -38
  6. package/lib/ui/app/Navigation/MastersNavigation/index.js +27 -25
  7. package/lib/ui/app/Notifications/Onboarding/index.js +91 -80
  8. package/lib/ui/app/Notifications/index.js +65 -60
  9. package/lib/ui/app/Points/index.js +6 -5
  10. package/lib/ui/app/masters.js +8 -2
  11. package/lib/ui/app/styles.d.ts +1 -0
  12. package/lib/ui/app/styles.js +6 -1
  13. package/lib/ui/app/useImagesPreload.d.ts +4 -0
  14. package/lib/ui/app/useImagesPreload.js +23 -0
  15. package/lib/ui/app/useSdkResponsive.js +11 -11
  16. package/lib/ui/app/useSdkScroll.d.ts +1 -0
  17. package/lib/ui/app/useSdkScroll.js +29 -21
  18. package/lib/ui/gamification/detail/header/index.js +11 -11
  19. package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
  20. package/lib/ui/gamification/detail/header/styles.js +11 -11
  21. package/lib/ui/gamification/onboarding/index.d.ts +1 -0
  22. package/lib/ui/gamification/onboarding/index.js +54 -43
  23. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
  24. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
  25. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
  26. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
  27. package/lib/ui/gamification/points/index.js +5 -4
  28. package/lib/ui/gamification/question/insight/index.js +5 -5
  29. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +17 -17
  30. package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
  31. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
  32. package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
  33. package/lib/ui/gamification/vote/index.js +57 -56
  34. package/lib/ui/gamification/vote/insight-details/index.js +1 -1
  35. package/lib/ui/gamification/vote/vote-option/index.js +61 -57
  36. package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
  37. package/lib/ui/gamification/vote/win-bar/index.js +21 -20
  38. package/lib/ui/navigation/masters.d.ts +2 -1
  39. package/lib/ui/navigation/masters.js +9 -4
  40. package/lib/ui/questions/insight/index.d.ts +1 -1
  41. package/lib/ui/questions/insight/index.js +21 -27
  42. package/lib/ui/skeleton/index.d.ts +7 -0
  43. package/lib/ui/skeleton/index.js +7 -0
  44. package/lib/ui/skeleton/styles.d.ts +2 -0
  45. package/lib/ui/skeleton/styles.js +9 -0
  46. package/lib/ui/theme/breakpoints.d.ts +4 -1
  47. package/lib/ui/theme/breakpoints.js +24 -12
  48. package/lib/ui/theme/constants.d.ts +4 -0
  49. package/lib/ui/theme/constants.js +6 -2
  50. package/lib/ui/theme/index.js +4 -3
  51. package/lib/ui/theme/theme.js +29 -21
  52. package/lib/utils/decorators/container.js +4 -3
  53. package/package.json +18 -18
@@ -1,10 +1,10 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as o } from "../../../../icons/index.js";
3
- import { ShowIn as t } from "../../../../show-in/index.js";
3
+ import { ShowIn as e } from "../../../../show-in/index.js";
4
4
  import "react/jsx-runtime";
5
5
  import "react";
6
6
  import "@linaria/core";
7
- const u = 118, e = () => t, f = /* @__PURE__ */ s(e())({
7
+ const d = 118, n = () => e, f = /* @__PURE__ */ s(n())({
8
8
  name: "Container",
9
9
  class: "c10131zw",
10
10
  propsAsIs: !0
@@ -12,15 +12,15 @@ const u = 118, e = () => t, f = /* @__PURE__ */ s(e())({
12
12
  name: "InnerContainer",
13
13
  class: "ir6k2eo",
14
14
  propsAsIs: !1
15
- }), d = /* @__PURE__ */ s("div")({
15
+ }), v = /* @__PURE__ */ s("div")({
16
16
  name: "Content",
17
17
  class: "c1hwoq9l",
18
18
  propsAsIs: !1
19
- }), n = /* @__PURE__ */ s("div")({
19
+ }), t = /* @__PURE__ */ s("div")({
20
20
  name: "Title",
21
21
  class: "t4ujo4g",
22
22
  propsAsIs: !1
23
- }), c = () => n, v = /* @__PURE__ */ s(c())({
23
+ }), c = () => t, u = /* @__PURE__ */ s(c())({
24
24
  name: "PointsTitle",
25
25
  class: "p1pjil1h",
26
26
  propsAsIs: !0
@@ -40,8 +40,8 @@ const u = 118, e = () => t, f = /* @__PURE__ */ s(e())({
40
40
  name: "FeedbackIcon",
41
41
  class: "frcvk3t",
42
42
  propsAsIs: !0
43
- }), S = /* @__PURE__ */ s("button")({
44
- name: "CloseButton",
43
+ }), S = /* @__PURE__ */ s("div")({
44
+ name: "CloseIconWrap",
45
45
  class: "c33p82r",
46
46
  propsAsIs: !1
47
47
  }), a = () => o, _ = /* @__PURE__ */ s(a())({
@@ -51,15 +51,15 @@ const u = 118, e = () => t, f = /* @__PURE__ */ s(e())({
51
51
  });
52
52
  export {
53
53
  x as AnswerText,
54
- S as CloseButton,
55
54
  _ as CloseIcon,
55
+ S as CloseIconWrap,
56
56
  f as Container,
57
- d as Content,
57
+ v as Content,
58
58
  w as FeedbackIcon,
59
59
  C as InnerContainer,
60
- u as MIN_CONTENT_HEIGHT,
61
- v as PointsTitle,
60
+ d as MIN_CONTENT_HEIGHT,
61
+ u as PointsTitle,
62
62
  T as Subtitle,
63
63
  b as SubtitleFG,
64
- n as Title
64
+ t as Title
65
65
  };
@@ -1,11 +1,11 @@
1
- import { jsx as m, jsxs as N, Fragment as G } from "react/jsx-runtime";
2
- import { useState as E, useEffect as J, useCallback as p, useMemo as f } from "react";
3
- import { QuestionType as c, QuestionStatus as C } from "@streamlayer/sdk-web-types";
4
- import { ExpiredAlert as K } from "./expired-alert/index.js";
5
- import { Feedback as U } from "./feedback/index.js";
6
- import { QuestionScrollContainer as X, Container as Z, Content as _, Title as $, Options as Q } from "./styles.js";
7
- import { VotingOption as tt } from "./vote-option/index.js";
8
- import { WinBar as rt } from "./win-bar/index.js";
1
+ import { jsx as n, jsxs as k, Fragment as J } from "react/jsx-runtime";
2
+ import { useState as I, useEffect as K, useCallback as R, useMemo as f } from "react";
3
+ import { QuestionType as o, QuestionStatus as E } from "@streamlayer/sdk-web-types";
4
+ import { ExpiredAlert as U } from "./expired-alert/index.js";
5
+ import { Feedback as X } from "./feedback/index.js";
6
+ import { QuestionScrollContainer as Z, Container as _, Content as $, Title as Q, Options as tt } from "./styles.js";
7
+ import { VotingOption as rt } from "./vote-option/index.js";
8
+ import { WinBar as it } from "./win-bar/index.js";
9
9
  import "../../icons/index.js";
10
10
  import "@linaria/react";
11
11
  import "./expired-alert/styles.js";
@@ -18,28 +18,28 @@ import "../../timer/index.js";
18
18
  import "react-countdown-circle-timer";
19
19
  import "../../theme/constants.js";
20
20
  import "./win-bar/styles.js";
21
- const wt = ({ openedQuestion: t, isLoading: I, vote: w, close: v }) => {
22
- var g, k;
23
- const P = t.subject, s = t.type, o = t.status, V = (g = t.options) == null ? void 0 : g.options, d = t.marketClosed, [R, b] = E(!1), [y, L] = E(!1), [T, O] = E(!0), [n, M] = E(!1), [x, q] = E(""), h = t == null ? void 0 : t.id;
24
- J(() => {
25
- s === c.PREDICTION ? d && O(!1) : o === C.RESOLVED && O(!1);
21
+ const vt = ({ openedQuestion: t, isLoading: C, vote: p, close: v }) => {
22
+ var P, g;
23
+ const A = t.subject, a = t.type, m = t.status, V = (P = t.options) == null ? void 0 : P.options, d = t.marketClosed, [O, b] = I(!1), [y, L] = I(!1), [T, w] = I(!0), [c, M] = I(!1), [x, D] = I(""), h = t == null ? void 0 : t.id;
24
+ K(() => {
25
+ a === o.PREDICTION ? d && w(!1) : m === E.RESOLVED && w(!1);
26
26
  }, []);
27
- const j = p((e) => {
27
+ const j = R((e) => {
28
28
  L(e), b(!0);
29
- }, []), D = p(
29
+ }, []), q = R(
30
30
  async (e) => {
31
31
  if (h) {
32
32
  const u = e.currentTarget.value;
33
- q(u), await w(h, u);
33
+ D(u), await p(h, u);
34
34
  }
35
35
  },
36
- [h, q, w]
37
- ), B = p(() => {
36
+ [h, D, p]
37
+ ), B = R(() => {
38
38
  M(!0), setTimeout(v, 3e3);
39
39
  }, [v]), r = f(
40
40
  () => t == null ? void 0 : t.answers.find((e) => e.youVoted === !0),
41
41
  [t]
42
- ), a = f(
42
+ ), s = f(
43
43
  () => !!(t != null && t.answers.find((e) => e.correct === !0)),
44
44
  [t]
45
45
  ), i = f(
@@ -51,77 +51,78 @@ const wt = ({ openedQuestion: t, isLoading: I, vote: w, close: v }) => {
51
51
  ...e,
52
52
  questionVoted: !!r,
53
53
  youSelected: x === e.id,
54
- isLoading: I,
55
- hasCorrectAnswer: a,
54
+ isLoading: C,
55
+ hasCorrectAnswer: s,
56
56
  questionType: t.type,
57
- answerTimeExpired: n,
58
- questionStatus: o,
57
+ answerTimeExpired: c,
58
+ questionStatus: m,
59
59
  imageMode: (u = t.appearance) == null ? void 0 : u.images,
60
- onVote: D
60
+ onVote: q
61
61
  };
62
62
  }) : [], [
63
- a,
64
- n,
65
- I,
63
+ s,
64
+ c,
65
+ C,
66
66
  t,
67
67
  r,
68
- o,
69
- D,
68
+ m,
69
+ q,
70
70
  x
71
- ]), F = V && (V.case === "trivia" || V.case === "prediction") ? V.value : void 0, l = o === C.RESOLVED && s === c.TRIVIA && !r && !T, S = s === c.TRIVIA && y && R && T, A = f(() => s === c.PREDICTION ? !!(r && !a || r && a && (i != null && i.youVoted)) : !0, [s, r, a, i]), Y = f(() => {
72
- if (s === c.PREDICTION && r && (!a || a && (i != null && i.youVoted)))
71
+ ]), F = V && (V.case === "trivia" || V.case === "prediction") ? V.value : void 0, l = m === E.RESOLVED && a === o.TRIVIA && !r && !T, S = a === o.TRIVIA && y && O && T, N = f(() => a === o.PREDICTION ? !!(r && !s || r && s && (i != null && i.youVoted)) : !0, [a, r, s, i]), Y = f(() => {
72
+ if (a === o.PREDICTION && r && (!s || s && (i != null && i.youVoted)))
73
73
  return r.points;
74
- if (!(l || n))
75
- return o === C.RESOLVED ? 0 : r ? r.correct ? r.points : 0 : i == null ? void 0 : i.points;
74
+ if (!(l || c))
75
+ return m === E.RESOLVED ? 0 : r ? r.correct ? r.points : 0 : i == null ? void 0 : i.points;
76
76
  }, [
77
- n,
77
+ c,
78
78
  r,
79
79
  i,
80
- o,
80
+ m,
81
81
  l,
82
- s,
83
- a
84
- ]), H = f(() => s === c.PREDICTION && r ? a ? a && (i != null && i.youVoted) ? "You won" : "" : "To win" : l || n ? "Time expired" : s === c.POLL ? "Time remaining" : r ? "You won" : "To win", [n, s, r, l, a, i]), z = r || l || S || s === c.TRIVIA && o === C.RESOLVED && T;
85
- return /* @__PURE__ */ m(X, { children: /* @__PURE__ */ m(Z, { children: /* @__PURE__ */ N(_, { children: [
86
- /* @__PURE__ */ m(
87
- U,
82
+ a,
83
+ s
84
+ ]), H = f(() => a === o.PREDICTION && r ? s ? s && (i != null && i.youVoted) ? "You won" : "" : "To win" : l || c ? "Time expired" : a === o.POLL ? "Time remaining" : r ? "You won" : "To win", [c, a, r, l, s, i]), z = (a === o.TRIVIA || a === o.PREDICTION) && r && s && (i == null ? void 0 : i.youVoted), G = r || l || S || a === o.TRIVIA && m === E.RESOLVED && T;
85
+ return /* @__PURE__ */ n(Z, { children: /* @__PURE__ */ n(_, { children: /* @__PURE__ */ k($, { children: [
86
+ /* @__PURE__ */ n(
87
+ X,
88
88
  {
89
89
  feedbackMessages: F,
90
90
  questionVoted: !!r,
91
91
  questionVotedCorrectly: r == null ? void 0 : r.correct,
92
- questionType: s,
93
- hasCorrectAnswer: a,
94
- questionStatus: o,
92
+ questionType: a,
93
+ hasCorrectAnswer: s,
94
+ questionStatus: m,
95
95
  showExpiredNotification: l,
96
96
  showClosedNotificationTrivia: S,
97
- votedInCurrentRender: R,
97
+ votedInCurrentRender: O,
98
98
  votedAfterQuestionClosed: y,
99
99
  enteredAnActiveQuestion: T,
100
100
  marketClosed: d
101
101
  }
102
102
  ),
103
- A && /* @__PURE__ */ m(
104
- rt,
103
+ N && /* @__PURE__ */ n(
104
+ it,
105
105
  {
106
106
  title: H,
107
107
  points: Y,
108
108
  onTimerExpired: B,
109
109
  questionType: t.type,
110
- isTimer: !I,
110
+ isTimer: !C,
111
111
  isPlayingTimer: !r,
112
- timerDuration: z ? 0 : Number(((k = t == null ? void 0 : t.appearance) == null ? void 0 : k.autoHideInterval) || "30")
112
+ animatePoints: z,
113
+ timerDuration: G ? 0 : Number(((g = t == null ? void 0 : t.appearance) == null ? void 0 : g.autoHideInterval) || "30")
113
114
  }
114
115
  ),
115
- n ? /* @__PURE__ */ m(
116
- K,
116
+ c ? /* @__PURE__ */ n(
117
+ U,
117
118
  {
118
119
  title: "More to come...",
119
120
  description: "Watch for additional enhanced stream interactive experience."
120
121
  }
121
- ) : /* @__PURE__ */ N(G, { children: [
122
- /* @__PURE__ */ m($, { style: A ? {} : { marginTop: 0 }, children: P }),
123
- /* @__PURE__ */ m(Q, { children: W.map((e) => /* @__PURE__ */ m(
124
- tt,
122
+ ) : /* @__PURE__ */ k(J, { children: [
123
+ /* @__PURE__ */ n(Q, { style: N ? {} : { marginTop: 0 }, children: A }),
124
+ /* @__PURE__ */ n(tt, { children: W.map((e) => /* @__PURE__ */ n(
125
+ rt,
125
126
  {
126
127
  ...e,
127
128
  markThatVoted: j,
@@ -135,5 +136,5 @@ const wt = ({ openedQuestion: t, isLoading: I, vote: w, close: v }) => {
135
136
  ] }) }) });
136
137
  };
137
138
  export {
138
- wt as Vote
139
+ vt as Vote
139
140
  };
@@ -9,7 +9,7 @@ import "../../../video-player/styles.js";
9
9
  import "../../../../utils/common.js";
10
10
  import "../../../questions/insight/styles.js";
11
11
  const C = ({ instantView: r, ...p }) => /* @__PURE__ */ o(k, { children: [
12
- /* @__PURE__ */ m(b, { instantView: r, ...p }),
12
+ /* @__PURE__ */ m(b, { instantView: r, ...p, isDetail: !0 }),
13
13
  (r == null ? void 0 : r.webLink) && /* @__PURE__ */ o(c, { href: r == null ? void 0 : r.webLink.url, target: "_blank", children: [
14
14
  r == null ? void 0 : r.webLink.label,
15
15
  /* @__PURE__ */ m(l, { name: "icon-external-link" })
@@ -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 T } 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 === T.RESOLVED && n : !1, rt = (t) => {
32
- var R;
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: D,
36
+ icon: r,
37
+ text: i,
38
+ percentageDecimal: e,
39
+ points: T,
40
40
  // extra props
41
- onVote: S,
42
- markThatVoted: w,
41
+ onVote: A,
42
+ markThatVoted: D,
43
43
  youSelected: h,
44
44
  questionVoted: s,
45
- imageMode: C,
46
- answerTimeExpired: O,
47
- questionStatus: E,
48
- isLoading: g,
45
+ imageMode: E,
46
+ answerTimeExpired: w,
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: p,
54
- marketClosed: u
55
- } = t, I = H(t), x = J({ questionType: d, questionVoted: s, correct: A, hasCorrectAnswer: k, questionStatus: E }), m = u && d === i.PREDICTION, N = s || m, L = d === i.PREDICTION && !s && !u;
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
64
  "data-selected": h,
61
- "data-answer-state": I,
62
- disabled: s || g || O || m && !p || m && p && v,
63
- "data-is-not-checked": s && !h && I !== "incorrect",
64
- onClick: (Q) => {
65
- w(
66
- d === i.PREDICTION ? u : E === T.RESOLVED
67
- ), S(Q);
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 && ((R = f[C]) == null ? void 0 : R.call(f, n)),
73
- /* @__PURE__ */ e(W, { children: r }),
74
- L && /* @__PURE__ */ l("div", { children: [
75
- /* @__PURE__ */ e(P, { value: D }),
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
  };
@@ -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
  };
@@ -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,43 +1,37 @@
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 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 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))
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))
20
14
  return {
21
- date: c(p),
22
- time: v(p)
15
+ date: f(p),
16
+ time: x(p)
23
17
  };
24
18
  }
25
19
  return null;
26
- }, [o]);
27
- return /* @__PURE__ */ h(b, { children: [
28
- l && /* @__PURE__ */ h(x, { children: [
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: [
29
23
  l.date,
30
24
  " · ",
31
25
  l.time
32
26
  ] }),
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 })
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 })
38
32
  ] })
39
33
  ] });
40
34
  };
41
35
  export {
42
- E as InsightContent
36
+ G as InsightContent
43
37
  };
@@ -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
  };