@streamlayer/react-ui 0.91.0 → 0.92.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 (59) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/index-keh7OLCY.js +67 -0
  3. package/lib/ui/app/Features/Gamification/Friends.d.ts +2 -1
  4. package/lib/ui/app/Features/Gamification/Friends.js +6 -6
  5. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +3 -2
  6. package/lib/ui/app/Features/Gamification/Leaderboard.js +26 -24
  7. package/lib/ui/app/Features/Gamification/Question.js +1 -1
  8. package/lib/ui/app/Features/Gamification/Tabs.d.ts +7 -2
  9. package/lib/ui/app/Features/Gamification/Tabs.js +35 -28
  10. package/lib/ui/app/Features/Gamification/gamification-feature.js +1 -1
  11. package/lib/ui/app/Features/Gamification/index.d.ts +6 -2
  12. package/lib/ui/app/Features/Gamification/index.js +81 -44
  13. package/lib/ui/app/Features/index.d.ts +6 -2
  14. package/lib/ui/app/Features/index.js +13 -11
  15. package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +3 -2
  16. package/lib/ui/app/Navigation/MastersNavigation/index.js +34 -30
  17. package/lib/ui/app/Navigation/index.js +6 -7
  18. package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -1
  19. package/lib/ui/app/Notifications/Onboarding/index.js +53 -46
  20. package/lib/ui/app/Notifications/index.d.ts +6 -2
  21. package/lib/ui/app/Notifications/index.js +114 -90
  22. package/lib/ui/app/masters.d.ts +7 -0
  23. package/lib/ui/app/masters.js +67 -51
  24. package/lib/ui/app/useClipboardCopy.d.ts +2 -1
  25. package/lib/ui/app/useMastersApp.js +15 -14
  26. package/lib/ui/app/useSdkResponsive.d.ts +14 -0
  27. package/lib/ui/app/useSdkResponsive.js +46 -0
  28. package/lib/ui/app/useSdkScroll.d.ts +3 -1
  29. package/lib/ui/app/useSdkScroll.js +28 -85
  30. package/lib/ui/gamification/leaderboard/static.d.ts +2 -1
  31. package/lib/ui/gamification/onboarding/index.d.ts +4 -0
  32. package/lib/ui/gamification/onboarding/index.js +56 -40
  33. package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +7 -0
  34. package/lib/ui/gamification/onboarding/invitingUser/index.js +16 -0
  35. package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -0
  36. package/lib/ui/gamification/onboarding/invitingUser/styles.js +24 -0
  37. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +2 -1
  38. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +1 -1
  39. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +2 -0
  40. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +18 -12
  41. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +7 -0
  42. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +10 -0
  43. package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +5 -0
  44. package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.js +24 -0
  45. package/lib/ui/gamification/vote/index.js +43 -43
  46. package/lib/ui/gamification/vote/styles.d.ts +1 -0
  47. package/lib/ui/gamification/vote/styles.js +17 -11
  48. package/lib/ui/gamification/vote/vote-option/index.js +20 -20
  49. package/lib/ui/navigation/button/LeaderBoard.js +5 -6
  50. package/lib/ui/navigation/index.js +6 -7
  51. package/lib/ui/navigation/masters.js +3 -5
  52. package/lib/ui/questions/insight/index.js +24 -25
  53. package/lib/utils/createDemo.js +12 -13
  54. package/lib/utils/debug/components/copyLogs.js +10 -9
  55. package/package.json +13 -13
  56. package/lib/LeaderBoard_fzzlxb-w40geAFS.js +0 -1
  57. package/lib/index_ej4hfx-w40geAFS.js +0 -1
  58. package/lib/masters_m6itlr-w40geAFS.js +0 -1
  59. package/lib/utils/useStreamLayerApp.js +0 -25
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
+ import { HeaderNodeRef, type AppNodeRef } from '../../../../app/masters';
2
3
  import { icons } from '../../../../icons';
3
4
  export type OnboardingInviteCardProps = {
4
- appNode: React.MutableRefObject<HTMLDivElement | null>;
5
+ renderToNode: AppNodeRef | HeaderNodeRef;
5
6
  inviteLink?: string;
6
7
  inviteCardTitle?: string;
7
8
  inviteCardSubtext?: string;
@@ -8,7 +8,7 @@ import "../../../copyNotification/index.js";
8
8
  import "../../../copyNotification/styles.js";
9
9
  import "@linaria/react";
10
10
  const E = ({
11
- appNode: t,
11
+ renderToNode: t,
12
12
  inviteLink: r,
13
13
  socialLinks: i,
14
14
  inviteCardTitle: c,
@@ -3,7 +3,9 @@ import { icons } from '../../../../icons';
3
3
  type OnboardingRulesProps = {
4
4
  rules?: OnboardingRule[];
5
5
  rulesTitle?: string;
6
+ termsText?: string;
6
7
  primaryColor?: string;
8
+ openTerms: () => void;
7
9
  };
8
10
  export type OnboardingRule = {
9
11
  label: string;
@@ -1,18 +1,24 @@
1
- import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
- import { SvgIcon as l } from "../../../../icons/index.js";
3
- import { Container as c, Content as a, Title as h, RulesList as s, RulesItem as p, RuleIcon as R, RuleText as u, TermsButton as x } from "./styles.js";
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import { SvgIcon as a } from "../../../../icons/index.js";
3
+ import { Container as h, Content as s, Title as p, RulesList as C, RulesItem as R, RuleIcon as u, RuleText as x, TermsButton as T } from "./styles.js";
4
4
  import "@linaria/react";
5
5
  import "react";
6
- const b = ({ rules: e, rulesTitle: t, primaryColor: i }) => /* @__PURE__ */ o(c, { children: [
7
- /* @__PURE__ */ o(a, { children: [
8
- /* @__PURE__ */ n(h, { children: t }),
9
- /* @__PURE__ */ n(s, { children: e == null ? void 0 : e.map(({ label: d, icon: r }, m) => /* @__PURE__ */ o(p, { children: [
10
- r && /* @__PURE__ */ n(R, { style: { backgroundColor: i }, children: /* @__PURE__ */ n(l, { name: r, "data-icon": r }) }),
11
- /* @__PURE__ */ n(u, { children: d })
12
- ] }, m)) })
6
+ const k = ({
7
+ rules: e,
8
+ rulesTitle: t,
9
+ termsText: i,
10
+ primaryColor: d,
11
+ openTerms: l
12
+ }) => /* @__PURE__ */ r(h, { children: [
13
+ /* @__PURE__ */ r(s, { children: [
14
+ /* @__PURE__ */ n(p, { children: t }),
15
+ /* @__PURE__ */ n(C, { children: e == null ? void 0 : e.map(({ label: m, icon: o }, c) => /* @__PURE__ */ r(R, { children: [
16
+ o && /* @__PURE__ */ n(u, { style: { backgroundColor: d }, children: /* @__PURE__ */ n(a, { name: o, "data-icon": o }) }),
17
+ /* @__PURE__ */ n(x, { children: m })
18
+ ] }, c)) })
13
19
  ] }),
14
- /* @__PURE__ */ n(x, { children: "See Terms and Conditions" })
20
+ i && /* @__PURE__ */ n(T, { onClick: l, children: "See Terms and Conditions" })
15
21
  ] });
16
22
  export {
17
- b as OnboardingRules
23
+ k as OnboardingRules
18
24
  };
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ type OnboardingTermsProps = {
3
+ termsTitle?: string;
4
+ termsText?: string;
5
+ };
6
+ export declare const OnboardingTerms: React.FC<OnboardingTermsProps>;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
+ import { Container as o, Content as t, Title as l, ScrollingText as c } from "./styles.js";
3
+ import "@linaria/react";
4
+ const h = ({ termsTitle: n, termsText: e }) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ i(t, { children: [
5
+ /* @__PURE__ */ r(l, { children: n }),
6
+ /* @__PURE__ */ r(c, { children: e })
7
+ ] }) });
8
+ export {
9
+ h as OnboardingTerms
10
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
+ export declare const ScrollingText: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -0,0 +1,24 @@
1
+ import { styled as s } from "@linaria/react";
2
+ const t = /* @__PURE__ */ s("div")({
3
+ name: "Container",
4
+ class: "cj0g35h",
5
+ propsAsIs: !1
6
+ }), e = /* @__PURE__ */ s("div")({
7
+ name: "Content",
8
+ class: "c1xkhrbn",
9
+ propsAsIs: !1
10
+ }), o = /* @__PURE__ */ s("div")({
11
+ name: "Title",
12
+ class: "tifzb8b",
13
+ propsAsIs: !1
14
+ }), l = /* @__PURE__ */ s("div")({
15
+ name: "ScrollingText",
16
+ class: "stduw5c",
17
+ propsAsIs: !1
18
+ });
19
+ export {
20
+ t as Container,
21
+ e as Content,
22
+ l as ScrollingText,
23
+ o as Title
24
+ };
@@ -1,16 +1,16 @@
1
- import { jsx as m, jsxs as N, Fragment as z } from "react/jsx-runtime";
2
- import { useState as d, useEffect as G, useCallback as p, useMemo as f } from "react";
3
- import { QuestionType as c, QuestionStatus as V } from "@streamlayer/sdk-web-types";
4
- import { SDKScrollContainer as J } from "../../app/styles.js";
5
- import { ExpiredAlert as U } from "./expired-alert/index.js";
6
- import { Feedback as X } from "./feedback/index.js";
7
- import { Container as Z, Content as _, Title as $, Options as Q } from "./styles.js";
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";
8
7
  import { VotingOption as tt } from "./vote-option/index.js";
9
8
  import { WinBar as rt } from "./win-bar/index.js";
10
- import "@linaria/react";
11
9
  import "../../icons/index.js";
10
+ import "@linaria/react";
12
11
  import "./expired-alert/styles.js";
13
12
  import "./feedback/styles.js";
13
+ import "../../app/styles.js";
14
14
  import "../../animated-counter/index.js";
15
15
  import "react-countup";
16
16
  import "./vote-option/styles.js";
@@ -18,86 +18,86 @@ 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: C, vote: w, close: v }) => {
21
+ const wt = ({ openedQuestion: t, isLoading: I, vote: w, close: v }) => {
22
22
  var g, k;
23
- const P = t.subject, a = t.type, o = t.status, E = (g = t.options) == null ? void 0 : g.options, I = t.marketClosed, [R, b] = d(!1), [h, L] = d(!1), [u, O] = d(!0), [n, M] = d(!1), [x, q] = d(""), y = t == null ? void 0 : t.id;
24
- G(() => {
25
- a === c.PREDICTION ? I && O(!1) : o === V.RESOLVED && O(!1);
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);
26
26
  }, []);
27
27
  const j = p((e) => {
28
28
  L(e), b(!0);
29
29
  }, []), D = p(
30
30
  async (e) => {
31
- if (y) {
32
- const T = e.currentTarget.value;
33
- q(T), await w(y, T);
31
+ if (h) {
32
+ const u = e.currentTarget.value;
33
+ q(u), await w(h, u);
34
34
  }
35
35
  },
36
- [y, q, w]
36
+ [h, q, w]
37
37
  ), B = p(() => {
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
- ), s = f(
42
+ ), a = f(
43
43
  () => !!(t != null && t.answers.find((e) => e.correct === !0)),
44
44
  [t]
45
45
  ), i = f(
46
46
  () => t == null ? void 0 : t.answers.find((e) => e.correct === !0),
47
47
  [t]
48
48
  ), W = f(() => t ? t.answers.map((e) => {
49
- var T;
49
+ var u;
50
50
  return {
51
51
  ...e,
52
52
  questionVoted: !!r,
53
53
  youSelected: x === e.id,
54
- isLoading: C,
55
- hasCorrectAnswer: s,
54
+ isLoading: I,
55
+ hasCorrectAnswer: a,
56
56
  questionType: t.type,
57
57
  answerTimeExpired: n,
58
58
  questionStatus: o,
59
- imageMode: (T = t.appearance) == null ? void 0 : T.images,
59
+ imageMode: (u = t.appearance) == null ? void 0 : u.images,
60
60
  onVote: D
61
61
  };
62
62
  }) : [], [
63
- s,
63
+ a,
64
64
  n,
65
- C,
65
+ I,
66
66
  t,
67
67
  r,
68
68
  o,
69
69
  D,
70
70
  x
71
- ]), F = E && (E.case === "trivia" || E.case === "prediction") ? E.value : void 0, l = o === V.RESOLVED && a === c.TRIVIA && !r && !u, S = a === c.TRIVIA && h && R && u, A = f(() => a === c.PREDICTION ? !!(r && !s || r && s && (i != null && i.youVoted)) : !0, [a, r, s, i]), Y = f(() => {
72
- if (a === c.PREDICTION && r && (!s || s && (i != null && i.youVoted)))
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)))
73
73
  return r.points;
74
74
  if (!(l || n))
75
- return o === V.RESOLVED ? 0 : r ? r.correct ? r.points : 0 : i == null ? void 0 : i.points;
75
+ return o === C.RESOLVED ? 0 : r ? r.correct ? r.points : 0 : i == null ? void 0 : i.points;
76
76
  }, [
77
77
  n,
78
78
  r,
79
79
  i,
80
80
  o,
81
81
  l,
82
- a,
83
- s
84
- ]), H = f(() => a === c.PREDICTION && r ? s ? s && (i != null && i.youVoted) ? "You won" : "" : "To win" : l || n ? "Time expired" : a === c.POLL ? "Time remaining" : r ? "You won" : "To win", [n, a, r, l, s, i]), K = r || l || S || a === c.TRIVIA && o === V.RESOLVED && u;
85
- return /* @__PURE__ */ m(J, { "data-question-header": "true", children: /* @__PURE__ */ m(Z, { children: /* @__PURE__ */ N(_, { children: [
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
86
  /* @__PURE__ */ m(
87
- X,
87
+ U,
88
88
  {
89
89
  feedbackMessages: F,
90
90
  questionVoted: !!r,
91
91
  questionVotedCorrectly: r == null ? void 0 : r.correct,
92
- questionType: a,
93
- hasCorrectAnswer: s,
92
+ questionType: s,
93
+ hasCorrectAnswer: a,
94
94
  questionStatus: o,
95
95
  showExpiredNotification: l,
96
96
  showClosedNotificationTrivia: S,
97
97
  votedInCurrentRender: R,
98
- votedAfterQuestionClosed: h,
99
- enteredAnActiveQuestion: u,
100
- marketClosed: I
98
+ votedAfterQuestionClosed: y,
99
+ enteredAnActiveQuestion: T,
100
+ marketClosed: d
101
101
  }
102
102
  ),
103
103
  A && /* @__PURE__ */ m(
@@ -107,27 +107,27 @@ const wt = ({ openedQuestion: t, isLoading: C, vote: w, close: v }) => {
107
107
  points: Y,
108
108
  onTimerExpired: B,
109
109
  questionType: t.type,
110
- isTimer: !C,
110
+ isTimer: !I,
111
111
  isPlayingTimer: !r,
112
- timerDuration: K ? 0 : Number(((k = t == null ? void 0 : t.appearance) == null ? void 0 : k.autoHideInterval) || "30")
112
+ timerDuration: z ? 0 : Number(((k = t == null ? void 0 : t.appearance) == null ? void 0 : k.autoHideInterval) || "30")
113
113
  }
114
114
  ),
115
115
  n ? /* @__PURE__ */ m(
116
- U,
116
+ K,
117
117
  {
118
118
  title: "More to come...",
119
119
  description: "Watch for additional enhanced stream interactive experience."
120
120
  }
121
- ) : /* @__PURE__ */ N(z, { children: [
121
+ ) : /* @__PURE__ */ N(G, { children: [
122
122
  /* @__PURE__ */ m($, { style: A ? {} : { marginTop: 0 }, children: P }),
123
123
  /* @__PURE__ */ m(Q, { children: W.map((e) => /* @__PURE__ */ m(
124
124
  tt,
125
125
  {
126
126
  ...e,
127
127
  markThatVoted: j,
128
- votedAfterQuestionClosed: h,
129
- enteredAnActiveQuestion: u,
130
- marketClosed: I
128
+ votedAfterQuestionClosed: y,
129
+ enteredAnActiveQuestion: T,
130
+ marketClosed: d
131
131
  },
132
132
  e.id
133
133
  )) })
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const QuestionScrollContainer: any;
3
4
  export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
5
  export declare const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
6
  export declare const Options: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,24 +1,30 @@
1
1
  import { styled as s } from "@linaria/react";
2
- const t = /* @__PURE__ */ s("div")({
2
+ import { SDKScrollContainer as o } from "../../app/styles.js";
3
+ const l = /* @__PURE__ */ s("div")({
3
4
  name: "Container",
4
5
  class: "c14ielyq",
5
6
  propsAsIs: !1
6
- }), o = /* @__PURE__ */ s("div")({
7
+ }), n = () => o, a = /* @__PURE__ */ s(n())({
8
+ name: "QuestionScrollContainer",
9
+ class: "q1tlqx57",
10
+ propsAsIs: !0
11
+ }), c = /* @__PURE__ */ s("div")({
7
12
  name: "Content",
8
- class: "c1tlqx57",
13
+ class: "c1hq58md",
9
14
  propsAsIs: !1
10
- }), e = /* @__PURE__ */ s("div")({
15
+ }), i = /* @__PURE__ */ s("div")({
11
16
  name: "Title",
12
- class: "t1hq58md",
17
+ class: "t1c8nxcx",
13
18
  propsAsIs: !1
14
- }), a = /* @__PURE__ */ s("div")({
19
+ }), r = /* @__PURE__ */ s("div")({
15
20
  name: "Options",
16
- class: "o1c8nxcx",
21
+ class: "oiozuc3",
17
22
  propsAsIs: !1
18
23
  });
19
24
  export {
20
- t as Container,
21
- o as Content,
22
- a as Options,
23
- e as Title
25
+ l as Container,
26
+ c as Content,
27
+ r as Options,
28
+ a as QuestionScrollContainer,
29
+ i as Title
24
30
  };
@@ -1,5 +1,5 @@
1
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";
2
+ import { QuestionImages as a, QuestionType as i, QuestionStatus as T } from "@streamlayer/sdk-web-types";
3
3
  import { AnimatedCounter as P } from "../../../animated-counter/index.js";
4
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";
5
5
  import "react-countup";
@@ -28,51 +28,51 @@ const f = {
28
28
  correct: n,
29
29
  hasCorrectAnswer: r,
30
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;
31
+ }) => t === i.TRIVIA ? c && n : t === i.PREDICTION ? c && n && r || o === T.RESOLVED && n : !1, rt = (t) => {
32
+ var R;
33
33
  const {
34
34
  // option props
35
35
  id: c,
36
36
  icon: n,
37
37
  text: r,
38
38
  percentageDecimal: o,
39
- points: S,
39
+ points: D,
40
40
  // extra props
41
- onVote: T,
42
- markThatVoted: O,
43
- youSelected: E,
41
+ onVote: S,
42
+ markThatVoted: w,
43
+ youSelected: h,
44
44
  questionVoted: s,
45
45
  imageMode: C,
46
- answerTimeExpired: w,
47
- questionStatus: u,
46
+ answerTimeExpired: O,
47
+ questionStatus: E,
48
48
  isLoading: g,
49
49
  questionType: d,
50
50
  correct: A,
51
51
  hasCorrectAnswer: k,
52
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;
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
56
  return /* @__PURE__ */ l(
57
57
  U,
58
58
  {
59
59
  value: c,
60
- "data-selected": E,
60
+ "data-selected": h,
61
61
  "data-answer-state": I,
62
- disabled: s || g || w || m && !R || m && R && v,
63
- "data-is-not-checked": s && !E && I !== "incorrect",
62
+ disabled: s || g || O || m && !p || m && p && v,
63
+ "data-is-not-checked": s && !h && I !== "incorrect",
64
64
  onClick: (Q) => {
65
- O(
66
- d === i.PREDICTION ? p : u === h.RESOLVED
67
- ), T(Q);
65
+ w(
66
+ d === i.PREDICTION ? u : E === T.RESOLVED
67
+ ), S(Q);
68
68
  },
69
69
  children: [
70
70
  /* @__PURE__ */ e($, { "data-answer-state": I, style: { width: `${N ? o : 0}%` } }),
71
71
  /* @__PURE__ */ l(M, { children: [
72
- n && C && ((D = f[C]) == null ? void 0 : D.call(f, n)),
72
+ n && C && ((R = f[C]) == null ? void 0 : R.call(f, n)),
73
73
  /* @__PURE__ */ e(W, { children: r }),
74
74
  L && /* @__PURE__ */ l("div", { children: [
75
- /* @__PURE__ */ e(P, { value: S }),
75
+ /* @__PURE__ */ e(P, { value: D }),
76
76
  /* @__PURE__ */ e(y, { children: "pts" })
77
77
  ] }),
78
78
  N && /* @__PURE__ */ l(z, { children: [
@@ -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,13 +1,11 @@
1
1
  import { styled as o } from "@linaria/react";
2
- import { Navigation as t } from "./index.js";
3
- import "../../masters_m6itlr-w40geAFS.js";
2
+ import { Navigation as a } 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 t = () => a, p = /* @__PURE__ */ o(t())({
7
5
  name: "Navigation",
8
6
  class: "n19lpak2",
9
7
  propsAsIs: !0
10
8
  });
11
9
  export {
12
- n as Navigation
10
+ p as Navigation
13
11
  };
@@ -1,44 +1,43 @@
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 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";
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,
9
+ const E = ({
10
+ created: o,
11
+ title: e,
12
+ isPickHistory: u,
14
13
  instantView: r,
15
14
  notification: d
16
15
  }) => {
17
- const l = g(() => {
18
- if (m) {
19
- const p = new Date(m);
20
- if (v(p))
16
+ const l = f(() => {
17
+ if (o) {
18
+ const p = new Date(o);
19
+ if (D(p))
21
20
  return {
22
- date: b(p),
23
- time: x(p)
21
+ date: c(p),
22
+ time: v(p)
24
23
  };
25
24
  }
26
25
  return null;
27
- }, [m]), u = (r == null ? void 0 : r.image) || c;
28
- return /* @__PURE__ */ e(C, { children: [
29
- l && /* @__PURE__ */ e(T, { children: [
26
+ }, [o]);
27
+ return /* @__PURE__ */ h(b, { children: [
28
+ l && /* @__PURE__ */ h(x, { children: [
30
29
  l.date,
31
30
  " · ",
32
31
  l.time
33
32
  ] }),
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 })
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 })
39
38
  ] })
40
39
  ] });
41
40
  };
42
41
  export {
43
- G as InsightContent
42
+ E as InsightContent
44
43
  };
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as g, Fragment as y } from "react/jsx-runtime";
2
2
  import { useMemo as u, useState as i, useEffect as E } from "react";
3
- import { anonymous as l } from "@streamlayer/sdk-web-anonymous-auth";
4
- import { Developer as D } from "./debug/components/developer.js";
5
- import { DeveloperStorage as w } from "./storage.js";
6
- import { useStreamLayerApp as x } from "./useStreamLayerApp.js";
3
+ import { useStreamLayerApp as l } from "@streamlayer/react/useStreamLayerApp";
4
+ import { anonymous as D } from "@streamlayer/sdk-web-anonymous-auth";
5
+ import { Developer as w } from "./debug/components/developer.js";
6
+ import { DeveloperStorage as x } from "./storage.js";
7
7
  import "@linaria/react";
8
8
  import "./debug/components/bypassLogin.js";
9
9
  import "./debug/components/copyLogs.js";
@@ -14,36 +14,35 @@ import "@nanostores/react";
14
14
  import "@streamlayer/sdk-web-core";
15
15
  import "./debug/components/sdkKey.js";
16
16
  import "@streamlayer/sdk-web-storage";
17
- import "@streamlayer/sdk-web";
18
17
  function K({
19
18
  Component: o,
20
19
  Story: r,
21
20
  args: n,
22
21
  autoEnable: a
23
22
  }) {
24
- const m = u(() => new w(), []), [p, f] = i(m.getEnv()), [c, v] = i(m.getSdkKey() || "set-sdk-key"), [s, k] = i(m.getEvent() || ""), S = u(() => {
23
+ const s = u(() => new x(), []), [p, f] = i(s.getEnv()), [c, v] = i(s.getSdkKey() || "set-sdk-key"), [m, k] = i(s.getEvent() || ""), S = u(() => {
25
24
  const d = /* @__PURE__ */ new Set();
26
- return d.add(l), d;
27
- }, []), t = x(c, S, p === "production", a);
25
+ return d.add(D), d;
26
+ }, []), t = l(c, S, p === "production", a);
28
27
  return E(() => {
29
- s && t && t.createEventSession(s);
28
+ m && t && t.createEventSession(m);
30
29
  }, [t]), /* @__PURE__ */ g(y, { children: [
31
30
  t ? /* @__PURE__ */ e(o, { Story: r, sdk: t, args: n }) : /* @__PURE__ */ e("div", { children: "wait sdk..." }),
32
31
  /* @__PURE__ */ e(
33
- D,
32
+ w,
34
33
  {
35
34
  sdk: t,
36
35
  sdkKey: c,
37
36
  setSdkKey: v,
38
37
  env: p,
39
38
  setEnv: f,
40
- event: s,
39
+ event: m,
41
40
  setEvent: k
42
41
  }
43
42
  )
44
43
  ] });
45
44
  }
46
- function P(o, r = !0) {
45
+ function O(o, r = !0) {
47
46
  return {
48
47
  decorators: [
49
48
  (n) => /* @__PURE__ */ e(K, { Story: n, Component: o, autoEnable: r })
@@ -51,5 +50,5 @@ function P(o, r = !0) {
51
50
  };
52
51
  }
53
52
  export {
54
- P as createDemo
53
+ O as createDemo
55
54
  };