@streamlayer/react-ui 0.98.1 → 0.100.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 (129) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/hooks/showIn.js +45 -0
  3. package/lib/{index-jRXrW6ie.js → index-Bicco-Aq.js} +1 -1
  4. package/lib/{index-z0QjLiEL.js → index-CZvwzN5o.js} +1 -1
  5. package/lib/index.js +4 -8
  6. package/lib/ui/app/Features/Gamification/Friends.js +10 -23
  7. package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
  8. package/lib/ui/app/Features/Gamification/Leaderboard.js +37 -54
  9. package/lib/ui/app/Features/Gamification/Question.js +33 -65
  10. package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
  11. package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
  12. package/lib/ui/app/Features/Gamification/Tabs.js +30 -97
  13. package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
  14. package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
  15. package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
  16. package/lib/ui/app/Features/Gamification/index.js +68 -143
  17. package/lib/ui/app/Features/index.d.ts +1 -2
  18. package/lib/ui/app/Features/index.js +20 -109
  19. package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
  20. package/lib/ui/app/Navigation/index.js +9 -12
  21. package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
  22. package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
  23. package/lib/ui/app/Notifications/Onboarding/index.js +45 -72
  24. package/lib/ui/app/Notifications/index.js +96 -148
  25. package/lib/ui/app/Notifications/styles.js +10 -15
  26. package/lib/ui/app/Points/index.js +18 -26
  27. package/lib/ui/app/masters.js +71 -190
  28. package/lib/ui/app/useClipboardCopy.js +11 -15
  29. package/lib/ui/app/useMastersApp.js +34 -44
  30. package/lib/ui/app/useSdkResponsive.js +18 -19
  31. package/lib/ui/app/useSdkScroll.js +28 -26
  32. package/lib/ui/button/index.js +3 -4
  33. package/lib/ui/gamification/copyNotification/index.js +5 -7
  34. package/lib/ui/gamification/detail/header/index.js +15 -18
  35. package/lib/ui/gamification/detail/header/styles.js +12 -14
  36. package/lib/ui/gamification/detail/sponsor/index.js +2 -3
  37. package/lib/ui/gamification/insight/index.js +5 -6
  38. package/lib/ui/gamification/insight-list/index.js +3 -6
  39. package/lib/ui/gamification/invite-link/index.js +11 -17
  40. package/lib/ui/gamification/invite-link/styles.js +13 -15
  41. package/lib/ui/gamification/leaderboard/index.js +21 -28
  42. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
  43. package/lib/ui/gamification/leaderboard/list-item/index.js +17 -20
  44. package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
  45. package/lib/ui/gamification/leaderboard/static.js +34 -31
  46. package/lib/ui/gamification/leaderboard/styles.js +1 -1
  47. package/lib/ui/gamification/onboarding/index.js +51 -73
  48. package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
  49. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
  50. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
  51. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
  52. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
  53. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
  54. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
  55. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
  56. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
  57. package/lib/ui/gamification/onboarding/styles.js +14 -17
  58. package/lib/ui/gamification/points/index.js +9 -15
  59. package/lib/ui/gamification/points/styles.js +12 -14
  60. package/lib/ui/gamification/question/index.d.ts +1 -3
  61. package/lib/ui/gamification/question/index.js +29 -34
  62. package/lib/ui/gamification/question/insight/index.d.ts +0 -1
  63. package/lib/ui/gamification/question/insight/index.js +7 -15
  64. package/lib/ui/gamification/question/list/index.js +20 -57
  65. package/lib/ui/gamification/question/notification/index.js +22 -35
  66. package/lib/ui/gamification/question/notification/insight/index.js +12 -17
  67. package/lib/ui/gamification/question/notification/pill/index.js +7 -9
  68. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
  69. package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
  70. package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
  71. package/lib/ui/gamification/question/notification/styles.js +17 -19
  72. package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
  73. package/lib/ui/gamification/question/styles.js +32 -34
  74. package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
  75. package/lib/ui/gamification/question/twitter/index.js +8 -20
  76. package/lib/ui/gamification/question/twitter/styles.js +4 -6
  77. package/lib/ui/gamification/tabs/index.js +6 -7
  78. package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
  79. package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
  80. package/lib/ui/gamification/user-statistics/index.js +2 -6
  81. package/lib/ui/gamification/vote/alert/index.d.ts +8 -0
  82. package/lib/ui/gamification/vote/alert/index.js +11 -0
  83. package/lib/ui/gamification/vote/{expired-alert → alert}/styles.js +7 -7
  84. package/lib/ui/gamification/vote/feedback/index.js +29 -33
  85. package/lib/ui/gamification/vote/feedback/styles.js +20 -23
  86. package/lib/ui/gamification/vote/index.d.ts +1 -0
  87. package/lib/ui/gamification/vote/index.js +123 -117
  88. package/lib/ui/gamification/vote/insight-details/index.js +9 -16
  89. package/lib/ui/gamification/vote/styles.d.ts +1 -0
  90. package/lib/ui/gamification/vote/styles.js +14 -8
  91. package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
  92. package/lib/ui/gamification/vote/vote-option/index.js +38 -41
  93. package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
  94. package/lib/ui/gamification/vote/vote-option/styles.js +35 -32
  95. package/lib/ui/gamification/vote/win-bar/index.js +29 -37
  96. package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
  97. package/lib/ui/login/demo.d.ts +1 -0
  98. package/lib/ui/login/demo.js +5 -17
  99. package/lib/ui/login/index.js +29 -35
  100. package/lib/ui/modal/index.js +31 -32
  101. package/lib/ui/navigation/button/Channels.js +5 -8
  102. package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
  103. package/lib/ui/navigation/button/LeaderBoard.js +8 -11
  104. package/lib/ui/navigation/button/index.js +10 -11
  105. package/lib/ui/navigation/masters.js +2 -3
  106. package/lib/ui/questions/insight/index.js +14 -19
  107. package/lib/ui/questions/twitter/account/index.js +13 -15
  108. package/lib/ui/questions/twitter/account/styles.js +14 -16
  109. package/lib/ui/questions/twitter/index.js +31 -38
  110. package/lib/ui/show-in/index.d.ts +1 -0
  111. package/lib/ui/show-in/index.js +12 -10
  112. package/lib/ui/skeleton/index.js +3 -4
  113. package/lib/ui/theme/index.js +3 -5
  114. package/lib/ui/video-player/index.js +44 -38
  115. package/lib/utils/createDemo.js +18 -28
  116. package/lib/utils/debug/components/copyLogs.js +2 -3
  117. package/lib/utils/debug/components/developer.js +20 -24
  118. package/lib/utils/debug/components/eventInput.js +9 -10
  119. package/lib/utils/debug/components/sdkKey.js +9 -10
  120. package/lib/utils/debug/index.js +17 -28
  121. package/lib/utils/debug/storage.js +32 -14
  122. package/lib/utils/decorators/container.js +5 -9
  123. package/lib/utils/storage.js +32 -14
  124. package/package.json +25 -26
  125. package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
  126. package/lib/ui/gamification/vote/expired-alert/index.js +0 -13
  127. /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
  128. /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
  129. /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
@@ -1,30 +1,36 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SDKScrollContainer as o } from "../../app/styles.js";
3
+ import { ShowIn as n } from "../../show-in/index.js";
3
4
  const l = /* @__PURE__ */ s("div")({
4
5
  name: "Container",
5
6
  class: "c14ielyq",
6
7
  propsAsIs: !1
7
- }), n = () => o, a = /* @__PURE__ */ s(n())({
8
+ }), t = () => o, i = /* @__PURE__ */ s(t())({
8
9
  name: "QuestionScrollContainer",
9
10
  class: "q1tlqx57",
10
11
  propsAsIs: !0
11
- }), c = /* @__PURE__ */ s("div")({
12
+ }), p = /* @__PURE__ */ s("div")({
12
13
  name: "Content",
13
14
  class: "c1hq58md",
14
15
  propsAsIs: !1
15
- }), i = /* @__PURE__ */ s("div")({
16
+ }), m = /* @__PURE__ */ s("div")({
16
17
  name: "Title",
17
18
  class: "t1c8nxcx",
18
19
  propsAsIs: !1
19
- }), r = /* @__PURE__ */ s("div")({
20
+ }), C = /* @__PURE__ */ s("div")({
20
21
  name: "Options",
21
22
  class: "oiozuc3",
22
23
  propsAsIs: !1
24
+ }), e = () => n, A = /* @__PURE__ */ s(e())({
25
+ name: "AlertContainer",
26
+ class: "apnc44r",
27
+ propsAsIs: !0
23
28
  });
24
29
  export {
30
+ A as AlertContainer,
25
31
  l as Container,
26
- c as Content,
27
- r as Options,
28
- a as QuestionScrollContainer,
29
- i as Title
32
+ p as Content,
33
+ C as Options,
34
+ i as QuestionScrollContainer,
35
+ m as Title
30
36
  };
@@ -1,20 +1,10 @@
1
- import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
- import { TwitterContent as o } from "../../../questions/twitter/index.js";
3
- import { Container as m, Quote as e } from "./styles.js";
4
- import "../../../video-player/index.js";
5
- import "@linaria/core";
6
- import "react";
7
- import "../../../icons/index.js";
8
- import "@linaria/react";
9
- import "../../../video-player/styles.js";
10
- import "../../../questions/twitter/account/index.js";
11
- import "../../../../utils/common.js";
12
- import "../../../questions/twitter/account/styles.js";
13
- import "../../../questions/twitter/styles.js";
14
- const C = (t) => /* @__PURE__ */ r(m, { children: [
15
- t.title && /* @__PURE__ */ i(e, { children: t.title }),
16
- /* @__PURE__ */ i(o, { ...t, isDetail: !0 })
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { TwitterContent as r } from "../../../questions/twitter/index.js";
3
+ import { Container as o, Quote as n } from "./styles.js";
4
+ const a = (t) => /* @__PURE__ */ i(o, { children: [
5
+ t.title && /* @__PURE__ */ e(n, { children: t.title }),
6
+ /* @__PURE__ */ e(r, { ...t, isDetail: !0 })
17
7
  ] });
18
8
  export {
19
- C as TwitterDetails
9
+ a as TwitterDetails
20
10
  };
@@ -1,18 +1,15 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import { useState as j, useLayoutEffect as U } from "react";
3
- import { QuestionImages as a, QuestionType as o, QuestionStatus as S } from "@streamlayer/sdk-web-types";
4
- import { AnimatedCounter as $ } from "../../../animated-counter/index.js";
5
- import { IconDefault as y, IconContainer as F, IconWrap as M, IconCircle as W, ButtonContainer as z, ButtonPct as G, ButtonBody as H, Title as J, Pts as K, Indicators as X, CheckIcon as Y, Percentage as Z } from "./styles.js";
6
- import "react-countup";
7
- import "@linaria/react";
8
- import "../../../icons/index.js";
9
- const E = {
10
- [a.CENTERED]: (t) => /* @__PURE__ */ e(y, { alt: "option-icon", src: t }),
11
- [a.TRANSPARENT]: (t) => /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(M, { style: { backgroundImage: `url(${t})` } }) }),
12
- [a.ROUNDED]: (t) => /* @__PURE__ */ e(W, { alt: "option-icon", src: t }),
3
+ import { QuestionImages as a, QuestionType as o, QuestionStatus as p } from "@streamlayer/sdk-web-types";
4
+ import { AnimatedCounter as W } from "../../../animated-counter/index.js";
5
+ import { IconDefault as $, IconContainer as y, IconWrap as F, IconCircle as M, ButtonContainer as z, ButtonPctWrap as G, ButtonPct as H, ButtonBody as J, Title as K, Pts as X, Indicators as Y, CheckIcon as Z, Percentage as _ } from "./styles.js";
6
+ const h = {
7
+ [a.CENTERED]: (t) => /* @__PURE__ */ e($, { alt: "option-icon", src: t }),
8
+ [a.TRANSPARENT]: (t) => /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(F, { style: { backgroundImage: `url(${t})` } }) }),
9
+ [a.ROUNDED]: (t) => /* @__PURE__ */ e(M, { alt: "option-icon", src: t }),
13
10
  [a.NONE]: () => null,
14
11
  [a.UNSET]: () => null
15
- }, _ = ({ questionType: t, hasCorrectAnswer: c, correct: n, youVoted: r, questionVoted: i }) => {
12
+ }, q = ({ questionType: t, hasCorrectAnswer: c, correct: n, youVoted: r, questionVoted: i }) => {
16
13
  if (t === o.POLL && r)
17
14
  return "correct";
18
15
  if (t === o.PREDICTION) {
@@ -22,14 +19,14 @@ const E = {
22
19
  return "correct";
23
20
  }
24
21
  return t === o.TRIVIA && i && r ? n ? "correct" : "incorrect" : "unset";
25
- }, q = ({
22
+ }, tt = ({
26
23
  questionType: t,
27
24
  questionVoted: c,
28
25
  correct: n,
29
26
  hasCorrectAnswer: r,
30
27
  questionStatus: i
31
- }) => t === o.TRIVIA ? c && n : t === o.PREDICTION ? c && n && r || i === S.RESOLVED && n : !1, at = (t) => {
32
- var N;
28
+ }) => t === o.TRIVIA ? c && n : t === o.PREDICTION ? c && n && r || i === p.RESOLVED && n : !1, ct = (t) => {
29
+ var S;
33
30
  const {
34
31
  // option props
35
32
  id: c,
@@ -40,58 +37,58 @@ const E = {
40
37
  // extra props
41
38
  onVote: w,
42
39
  markThatVoted: A,
43
- onPercentsAnimated: m,
44
- youSelected: h,
40
+ onPercentsAnimated: f,
41
+ youSelected: E,
45
42
  questionVoted: s,
46
43
  imageMode: C,
47
44
  answerTimeExpired: O,
48
- questionStatus: p,
45
+ questionStatus: P,
49
46
  isLoading: g,
50
47
  questionType: d,
51
48
  correct: k,
52
49
  hasCorrectAnswer: v,
53
50
  votedAfterQuestionClosed: x,
54
- enteredAnActiveQuestion: P,
55
- marketClosed: f
56
- } = t, [L, R] = j(0), I = _(t), Q = q({ questionType: d, questionVoted: s, correct: k, hasCorrectAnswer: v, questionStatus: p }), u = f && d === o.PREDICTION, T = s || u, B = d === o.PREDICTION && !s && !f, V = s && !h && I !== "incorrect";
51
+ enteredAnActiveQuestion: R,
52
+ marketClosed: I
53
+ } = t, [L, T] = j(0), m = q(t), B = tt({ questionType: d, questionVoted: s, correct: k, hasCorrectAnswer: v, questionStatus: P }), u = I && d === o.PREDICTION, N = s || u, Q = d === o.PREDICTION && !s && !I, V = s && !E && m !== "incorrect";
57
54
  return U(() => {
58
- R(0), requestAnimationFrame(() => {
59
- R(i);
55
+ T(0), requestAnimationFrame(() => {
56
+ T(i);
60
57
  });
61
58
  }, [i]), /* @__PURE__ */ l(
62
59
  z,
63
60
  {
64
61
  value: c,
65
- "data-selected": h,
66
- "data-answer-state": I,
67
- disabled: s || g || O || u && !P || u && P && x,
62
+ "data-selected": E,
63
+ "data-answer-state": m,
64
+ disabled: s || g || O || u && !R || u && R && x,
68
65
  "data-is-not-checked": V,
69
66
  onClick: (b) => {
70
67
  A(
71
- d === o.PREDICTION ? f : p === S.RESOLVED
68
+ d === o.PREDICTION ? I : P === p.RESOLVED
72
69
  ), w(b);
73
70
  },
74
71
  children: [
75
- /* @__PURE__ */ e(
76
- G,
72
+ /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(
73
+ H,
77
74
  {
78
- "data-answer-state": I,
79
- style: { width: `${T ? L : 0}%` },
75
+ "data-answer-state": m,
76
+ style: { width: `${N ? L : 0}%` },
80
77
  onTransitionEnd: () => {
81
- u || m == null || m();
78
+ u || f == null || f();
82
79
  }
83
80
  }
84
- ),
85
- /* @__PURE__ */ l(H, { children: [
86
- n && C && ((N = E[C]) == null ? void 0 : N.call(E, n)),
87
- /* @__PURE__ */ e(J, { children: r }),
88
- B && /* @__PURE__ */ l("div", { children: [
81
+ ) }),
82
+ /* @__PURE__ */ l(J, { children: [
83
+ n && C && ((S = h[C]) == null ? void 0 : S.call(h, n)),
84
+ /* @__PURE__ */ e(K, { children: r }),
85
+ Q && /* @__PURE__ */ l("div", { children: [
89
86
  D,
90
- /* @__PURE__ */ e(K, { children: "pts" })
87
+ /* @__PURE__ */ e(X, { children: "pts" })
91
88
  ] }),
92
- T && /* @__PURE__ */ l(X, { children: [
93
- Q && /* @__PURE__ */ e(Y, { name: "selected" }),
94
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e($, { value: i, suffix: "%" }) })
89
+ N && /* @__PURE__ */ l(Y, { children: [
90
+ B && /* @__PURE__ */ e(Z, { name: "selected" }),
91
+ /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(W, { value: i, suffix: "%" }) })
95
92
  ] })
96
93
  ] })
97
94
  ]
@@ -99,5 +96,5 @@ const E = {
99
96
  );
100
97
  };
101
98
  export {
102
- at as VotingOption
99
+ ct as VotingOption
103
100
  };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const ButtonContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
3
+ export declare const ButtonPctWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
4
  export declare const ButtonPct: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
5
  export declare const ButtonBody: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
5
6
  export declare const IconContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,72 +1,75 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as o } from "../../../icons/index.js";
3
- import "react/jsx-runtime";
4
- import "react";
5
- const I = /* @__PURE__ */ s("button")({
3
+ const r = /* @__PURE__ */ s("button")({
6
4
  name: "ButtonContainer",
7
5
  class: "b1b6dl8t",
8
6
  propsAsIs: !1
9
- }), i = /* @__PURE__ */ s("div")({
10
- name: "ButtonPct",
7
+ }), l = /* @__PURE__ */ s("div")({
8
+ name: "ButtonPctWrap",
11
9
  class: "b4iik8i",
12
10
  propsAsIs: !1
13
- }), m = /* @__PURE__ */ s("span")({
14
- name: "ButtonBody",
11
+ }), I = /* @__PURE__ */ s("div")({
12
+ name: "ButtonPct",
15
13
  class: "b1gq1lnf",
16
14
  propsAsIs: !1
17
- }), f = /* @__PURE__ */ s("div")({
15
+ }), i = /* @__PURE__ */ s("span")({
16
+ name: "ButtonBody",
17
+ class: "b1j65z51",
18
+ propsAsIs: !1
19
+ }), m = /* @__PURE__ */ s("div")({
18
20
  name: "IconContainer",
19
- class: "i1j65z51",
21
+ class: "i19tpfua",
20
22
  propsAsIs: !1
21
23
  }), u = /* @__PURE__ */ s("div")({
22
24
  name: "IconWrap",
23
- class: "i19tpfua",
25
+ class: "i1tubmma",
24
26
  propsAsIs: !1
25
27
  }), n = /* @__PURE__ */ s("img")({
26
28
  name: "Icon",
27
- class: "i1tubmma",
29
+ class: "i1grrgwj",
28
30
  propsAsIs: !1
29
- }), t = () => n, A = /* @__PURE__ */ s(t())({
31
+ }), t = () => n, f = /* @__PURE__ */ s(t())({
30
32
  name: "IconDefault",
31
- class: "i1grrgwj",
33
+ class: "ibemyq8",
32
34
  propsAsIs: !0
33
- }), a = () => n, d = /* @__PURE__ */ s(a())({
35
+ }), a = () => n, A = /* @__PURE__ */ s(a())({
34
36
  name: "IconCircle",
35
- class: "ibemyq8",
37
+ class: "i1dceht",
36
38
  propsAsIs: !0
37
- }), b = /* @__PURE__ */ s("span")({
39
+ }), d = /* @__PURE__ */ s("span")({
38
40
  name: "Title",
39
- class: "t1dceht",
41
+ class: "t116q4vq",
40
42
  propsAsIs: !1
41
43
  }), B = /* @__PURE__ */ s("span")({
42
44
  name: "Indicators",
43
- class: "i116q4vq",
45
+ class: "i17ajcu2",
44
46
  propsAsIs: !1
45
- }), C = /* @__PURE__ */ s("span")({
47
+ }), b = /* @__PURE__ */ s("span")({
46
48
  name: "Pts",
47
- class: "p17ajcu2",
49
+ class: "pu9kmlb",
48
50
  propsAsIs: !1
49
- }), g = /* @__PURE__ */ s("span")({
51
+ }), C = /* @__PURE__ */ s("span")({
50
52
  name: "Percentage",
51
- class: "pu9kmlb",
53
+ class: "p1j2j0s0",
52
54
  propsAsIs: !1
53
55
  }), c = () => o, P = /* @__PURE__ */ s(c())({
54
56
  name: "CheckIcon",
55
- class: "c1j2j0s0",
57
+ class: "c1mzj1sj",
56
58
  propsAsIs: !0
57
59
  });
58
60
  export {
59
- m as ButtonBody,
60
- I as ButtonContainer,
61
- i as ButtonPct,
61
+ i as ButtonBody,
62
+ r as ButtonContainer,
63
+ I as ButtonPct,
64
+ l as ButtonPctWrap,
62
65
  P as CheckIcon,
63
66
  n as Icon,
64
- d as IconCircle,
65
- f as IconContainer,
66
- A as IconDefault,
67
+ A as IconCircle,
68
+ m as IconContainer,
69
+ f as IconDefault,
67
70
  u as IconWrap,
68
71
  B as Indicators,
69
- g as Percentage,
70
- C as Pts,
71
- b as Title
72
+ C as Percentage,
73
+ b as Pts,
74
+ d as Title
72
75
  };
@@ -1,55 +1,47 @@
1
- import { jsx as r, jsxs as n, Fragment as C } from "react/jsx-runtime";
2
- import { QuestionType as t } from "@streamlayer/sdk-web-types";
3
- import { AnimatedCounter as P } from "../../../animated-counter/index.js";
4
- import { Timer as s } from "../../../timer/index.js";
5
- import { ShowInContainer as I, WinBarContainer as f, Content as u, Title as O, WinIcon as T, Points as j, PointsCount as x, PointsUnits as y } from "./styles.js";
6
- import "react-countup";
7
- import "@linaria/react";
8
- import "react";
9
- import "react-countdown-circle-timer";
10
- import "../../../theme/constants.js";
11
- import "../../../icons/index.js";
12
- import "../../../show-in/index.js";
13
- import "@linaria/core";
14
- const F = ({
15
- title: e,
16
- points: o,
17
- isPlayingTimer: m,
18
- isTimer: a,
1
+ import { jsx as n, jsxs as e, Fragment as P } from "react/jsx-runtime";
2
+ import { QuestionType as i } from "@streamlayer/sdk-web-types";
3
+ import { AnimatedCounter as s } from "../../../animated-counter/index.js";
4
+ import { Timer as I } from "../../../timer/index.js";
5
+ import { ShowInContainer as f, WinBarContainer as p, Content as u, Title as O, WinIcon as T, Points as j, PointsCount as x, PointsUnits as y } from "./styles.js";
6
+ const b = ({
7
+ title: o,
8
+ points: t,
9
+ isPlayingTimer: a,
10
+ isTimer: m,
19
11
  animatePoints: c,
20
- questionType: i,
12
+ questionType: r,
21
13
  timerDuration: d,
22
14
  votedInCurrentRender: l,
23
- percentsAnimated: p,
24
- onTimerExpired: h
25
- }) => /* @__PURE__ */ r(
26
- I,
15
+ percentsAnimated: h,
16
+ onTimerExpired: C
17
+ }) => /* @__PURE__ */ n(
18
+ f,
27
19
  {
28
- enabled: i === t.PREDICTION && l,
29
- animate: p,
30
- children: /* @__PURE__ */ n(
31
- f,
20
+ enabled: r === i.PREDICTION && l,
21
+ animate: h,
22
+ children: /* @__PURE__ */ e(
23
+ p,
32
24
  {
33
25
  style: {
34
- justifyContent: i === t.PREDICTION ? "center" : "space-between"
26
+ justifyContent: r === i.PREDICTION ? "center" : "space-between"
35
27
  },
36
28
  children: [
37
- /* @__PURE__ */ n(u, { children: [
38
- e && /* @__PURE__ */ r(O, { children: e }),
39
- o !== void 0 && i !== t.POLL && /* @__PURE__ */ n(C, { children: [
40
- /* @__PURE__ */ r(T, { name: "icon-trophy" }),
41
- /* @__PURE__ */ n(j, { children: [
42
- /* @__PURE__ */ r(x, { children: c ? /* @__PURE__ */ r(P, { value: o, delay: 0.3 }) : o }),
43
- /* @__PURE__ */ r(y, { children: "PTS" })
29
+ /* @__PURE__ */ e(u, { children: [
30
+ o && /* @__PURE__ */ n(O, { children: o }),
31
+ t !== void 0 && r !== i.POLL && /* @__PURE__ */ e(P, { children: [
32
+ /* @__PURE__ */ n(T, { name: "icon-trophy" }),
33
+ /* @__PURE__ */ e(j, { children: [
34
+ /* @__PURE__ */ n(x, { children: c ? /* @__PURE__ */ n(s, { value: t, delay: 0.3 }) : t }),
35
+ /* @__PURE__ */ n(y, { children: "PTS" })
44
36
  ] })
45
37
  ] })
46
38
  ] }),
47
- a && i !== t.PREDICTION && /* @__PURE__ */ r(s, { isPlaying: m, onTimerExpired: h, duration: d })
39
+ m && r !== i.PREDICTION && /* @__PURE__ */ n(I, { isPlaying: a, onTimerExpired: C, duration: d })
48
40
  ]
49
41
  }
50
42
  )
51
43
  }
52
44
  );
53
45
  export {
54
- F as WinBar
46
+ b as WinBar
55
47
  };
@@ -1,49 +1,46 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as n } from "../../../icons/index.js";
3
3
  import { GrowingShowIn as o } from "../../../show-in/index.js";
4
- import "react/jsx-runtime";
5
- import "react";
6
- import "@linaria/core";
7
- const t = () => o, m = /* @__PURE__ */ s(t())({
4
+ const t = () => o, c = /* @__PURE__ */ s(t())({
8
5
  name: "ShowInContainer",
9
6
  class: "sie6cqo",
10
7
  propsAsIs: !0
11
- }), I = /* @__PURE__ */ s("div")({
8
+ }), r = /* @__PURE__ */ s("div")({
12
9
  name: "WinBarContainer",
13
10
  class: "wgizw4u",
14
11
  propsAsIs: !1
15
- }), f = /* @__PURE__ */ s("div")({
12
+ }), l = /* @__PURE__ */ s("div")({
16
13
  name: "Content",
17
14
  class: "c1l3ucjp",
18
15
  propsAsIs: !1
19
- }), w = /* @__PURE__ */ s("div")({
16
+ }), m = /* @__PURE__ */ s("div")({
20
17
  name: "Title",
21
18
  class: "tx7j799",
22
19
  propsAsIs: !1
23
- }), i = () => n, A = /* @__PURE__ */ s(i())({
20
+ }), a = () => n, I = /* @__PURE__ */ s(a())({
24
21
  name: "WinIcon",
25
22
  class: "w4lwuj0",
26
23
  propsAsIs: !0
27
- }), C = /* @__PURE__ */ s("div")({
24
+ }), f = /* @__PURE__ */ s("div")({
28
25
  name: "Points",
29
26
  class: "po9i64o",
30
27
  propsAsIs: !1
31
- }), u = /* @__PURE__ */ s("span")({
28
+ }), w = /* @__PURE__ */ s("span")({
32
29
  name: "PointsCount",
33
30
  class: "pe5g05h",
34
31
  propsAsIs: !1
35
- }), d = /* @__PURE__ */ s("span")({
32
+ }), A = /* @__PURE__ */ s("span")({
36
33
  name: "PointsUnits",
37
34
  class: "p1hdtpmb",
38
35
  propsAsIs: !1
39
36
  });
40
37
  export {
41
- f as Content,
42
- C as Points,
43
- u as PointsCount,
44
- d as PointsUnits,
45
- m as ShowInContainer,
46
- w as Title,
47
- I as WinBarContainer,
48
- A as WinIcon
38
+ l as Content,
39
+ f as Points,
40
+ w as PointsCount,
41
+ A as PointsUnits,
42
+ c as ShowInContainer,
43
+ m as Title,
44
+ r as WinBarContainer,
45
+ I as WinIcon
49
46
  };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
+ import '@streamlayer/sdk-web-anonymous-auth';
3
4
  export declare const LoginComponent: React.FC<{
4
5
  sdk: StreamLayerSDK;
5
6
  }>;
@@ -1,26 +1,14 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { useStore as m } from "@nanostores/react";
2
+ import { useStore as e } from "@nanostores/react";
3
3
  import "@streamlayer/sdk-web-anonymous-auth";
4
- import { Login as n } from "./index.js";
5
- import "react";
6
- import "react-auth-code-input";
7
- import "react-phone-number-input";
8
- import "../timer/index.js";
9
- import "@linaria/react";
10
- import "react-countdown-circle-timer";
11
- import "../theme/constants.js";
12
- import "../../utils/login.js";
13
- import "@connectrpc/connect";
14
- import "@connectrpc/connect-web";
15
- import "@streamlayer/sl-eslib/users/users_connect";
16
- import "./styles.js";
17
- const j = ({ sdk: o }) => m(o.getUserStore()).data ? /* @__PURE__ */ r("button", { onClick: o.logout, children: "logout" }) : /* @__PURE__ */ r(n, { login: async (i) => {
4
+ import { Login as i } from "./index.js";
5
+ const c = ({ sdk: o }) => e(o.getUserStore()).data ? /* @__PURE__ */ r("button", { onClick: o.logout, children: "logout" }) : /* @__PURE__ */ r(i, { login: async (n) => {
18
6
  try {
19
- await o.authorizationBypass("streamlayer:streamlayer", i);
7
+ await o.authorizationBypass("streamlayer:streamlayer", n);
20
8
  } catch (t) {
21
9
  throw console.log("login err", t), t;
22
10
  }
23
11
  }, anonymousLogin: o.anonymousAuthorization, host: o.host });
24
12
  export {
25
- j as LoginComponent
13
+ c as LoginComponent
26
14
  };
@@ -1,60 +1,54 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as a } from "react";
3
3
  import w from "react-auth-code-input";
4
4
  import P, { isValidPhoneNumber as F, formatPhoneNumberIntl as v } from "react-phone-number-input";
5
5
  import { Timer as D } from "../timer/index.js";
6
6
  import { requestLoginCode as I, register as k, login as S } from "../../utils/login.js";
7
- import { Panel as q, Form as u, FormTitle as p, FormDescription as d, FormInputContainer as x, FormSubmit as m, Digits as E } from "./styles.js";
8
- import "@linaria/react";
9
- import "react-countdown-circle-timer";
10
- import "../theme/constants.js";
11
- import "@connectrpc/connect";
12
- import "@connectrpc/connect-web";
13
- import "@streamlayer/sl-eslib/users/users_connect";
14
- const O = ({ login: s, anonymousLogin: h, host: c }) => {
15
- const [n, g] = a(""), [i, b] = a(""), [l, f] = a(""), y = async (o) => {
16
- o.preventDefault();
7
+ import { Panel as q, Form as m, FormTitle as p, FormDescription as d, FormInputContainer as x, FormSubmit as s, Digits as E } from "./styles.js";
8
+ const z = ({ login: h, anonymousLogin: u, host: c }) => {
9
+ const [o, g] = a(""), [i, b] = a(""), [l, f] = a(""), y = async (t) => {
10
+ t.preventDefault();
17
11
  try {
18
- const r = n.replaceAll("+", "");
12
+ const n = o.replaceAll("+", "");
19
13
  try {
20
- await I(c, r);
14
+ await I(c, n);
21
15
  } catch {
22
- await k(c, r);
16
+ await k(c, n);
23
17
  }
24
- b(r);
25
- } catch (r) {
26
- window.alert(r);
18
+ b(n);
19
+ } catch (n) {
20
+ window.alert(n);
27
21
  }
28
- }, C = async (o) => {
29
- if (o.preventDefault(), i && l)
22
+ }, C = async (t) => {
23
+ if (t.preventDefault(), i && l)
30
24
  try {
31
- const r = await S(c, i, l);
32
- r && s ? await s(r) : console.log("token", r);
33
- } catch (r) {
34
- window.alert(r);
25
+ const n = await S(c, i, l);
26
+ n && h ? await h(n) : console.log("token", n);
27
+ } catch (n) {
28
+ window.alert(n);
35
29
  }
36
30
  };
37
- return /* @__PURE__ */ t(q, { children: [
38
- !i && /* @__PURE__ */ t("div", { children: [
39
- /* @__PURE__ */ t(u, { onSubmit: y, children: [
31
+ return /* @__PURE__ */ r(q, { children: [
32
+ !i && /* @__PURE__ */ r("div", { children: [
33
+ /* @__PURE__ */ r(m, { onSubmit: y, children: [
40
34
  /* @__PURE__ */ e(p, { children: "Enter your phone number" }),
41
35
  /* @__PURE__ */ e(d, { children: "Enter your phone up for number to log in or sign an account." }),
42
- /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(P, { value: n, onChange: (o) => g(`${o}`) }) }),
43
- /* @__PURE__ */ e(m, { disabled: !F(n), type: "submit", children: "request code" })
36
+ /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(P, { value: o, onChange: (t) => g(`${t}`) }) }),
37
+ /* @__PURE__ */ e(s, { disabled: !F(o), type: "submit", children: "request code" })
44
38
  ] }),
45
- h && /* @__PURE__ */ e(m, { style: { display: "block", margin: "auto" }, onClick: h, children: "anonymous login" })
39
+ u && /* @__PURE__ */ e(s, { style: { display: "block", margin: "auto" }, onClick: u, children: "anonymous login" })
46
40
  ] }),
47
- i && /* @__PURE__ */ t(u, { onSubmit: C, children: [
41
+ i && /* @__PURE__ */ r(m, { onSubmit: C, children: [
48
42
  /* @__PURE__ */ e(p, { children: "Enter Verification Code" }),
49
- /* @__PURE__ */ t(d, { children: [
43
+ /* @__PURE__ */ r(d, { children: [
50
44
  "Please enter the verification code ",
51
45
  /* @__PURE__ */ e("br", {}),
52
46
  "sent to ",
53
- /* @__PURE__ */ e("b", { children: v(n) })
47
+ /* @__PURE__ */ e("b", { children: v(o) })
54
48
  ] }),
55
49
  /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(w, { autoFocus: !0, allowedCharacters: "numeric", length: 4, onChange: f }) }),
56
- /* @__PURE__ */ e(m, { disabled: l.length !== 4, type: "submit", children: "login" }),
57
- /* @__PURE__ */ t(d, { children: [
50
+ /* @__PURE__ */ e(s, { disabled: l.length !== 4, type: "submit", children: "login" }),
51
+ /* @__PURE__ */ r(d, { children: [
58
52
  "Didn't get 59 the code? ",
59
53
  /* @__PURE__ */ e("br", {}),
60
54
  "Resend Code in",
@@ -64,5 +58,5 @@ const O = ({ login: s, anonymousLogin: h, host: c }) => {
64
58
  ] });
65
59
  };
66
60
  export {
67
- O as Login
61
+ z as Login
68
62
  };