@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,163 +1,88 @@
1
- import { jsx as o, jsxs as u } from "react/jsx-runtime";
2
- import { styled as a } from "@linaria/react";
3
- import { useStore as s } from "@nanostores/react";
4
- import { SDKWhiteContainer as d } from "../../styles.js";
5
- import { VoteHeader as f } from "../../../gamification/detail/header/index.js";
6
- import { UserStatistics as h } from "../../../gamification/user-statistics/index.js";
7
- import { ModalPortal as C } from "../../../modal/index.js";
8
- import { ShowIn as k } from "../../../show-in/index.js";
9
- import { Question as S } from "./Question.js";
10
- import { Tabs as U } from "./Tabs.js";
11
- import "@streamlayer/sdk-web-types";
12
- import "../../../gamification/constants.js";
13
- import "../../../gamification/detail/header/styles.js";
14
- import "../../../icons/index.js";
15
- import "react";
16
- import "../../../skeleton/index.js";
17
- import "../../../skeleton/styles.js";
18
- import "../../../../utils/common.js";
19
- import "../../../gamification/user-statistics/components/rank/index.js";
20
- import "../../../gamification/user-statistics/components/rank/styles.js";
21
- import "../../../gamification/user-statistics/components/statistic/index.js";
22
- import "../../../gamification/user-statistics/components/statistic/styles.js";
23
- import "../../../gamification/user-statistics/styles.js";
24
- import "../../../../index-jRXrW6ie.js";
25
- import "../../../../index-uEuzH3jr.js";
26
- import "../../../theme/constants.js";
27
- import "@linaria/core";
28
- import "../../useMastersContext.js";
29
- import "../../../gamification/detail/sponsor/index.js";
30
- import "../../../gamification/vote/index.js";
31
- import "../../../gamification/vote/expired-alert/index.js";
32
- import "../../../gamification/vote/expired-alert/styles.js";
33
- import "../../../gamification/vote/feedback/index.js";
34
- import "../../../gamification/vote/feedback/styles.js";
35
- import "../../../gamification/vote/styles.js";
36
- import "../../../gamification/vote/vote-option/index.js";
37
- import "../../../animated-counter/index.js";
38
- import "react-countup";
39
- import "../../../gamification/vote/vote-option/styles.js";
40
- import "../../../gamification/vote/win-bar/index.js";
41
- import "../../../timer/index.js";
42
- import "react-countdown-circle-timer";
43
- import "../../../gamification/vote/win-bar/styles.js";
44
- import "../../../gamification/vote/insight-details/index.js";
45
- import "../../../questions/insight/index.js";
46
- import "../../../video-player/index.js";
47
- import "../../../video-player/styles.js";
48
- import "../../../questions/insight/styles.js";
49
- import "../../../gamification/vote/insight-details/styles.js";
50
- import "../../../gamification/vote/twitter-details/index.js";
51
- import "../../../questions/twitter/index.js";
52
- import "../../../questions/twitter/account/index.js";
53
- import "../../../questions/twitter/account/styles.js";
54
- import "../../../questions/twitter/styles.js";
55
- import "../../../gamification/vote/twitter-details/styles.js";
56
- import "../../useSdkScroll.js";
57
- import "lodash.throttle";
58
- import "../../../../index-z0QjLiEL.js";
59
- import "../../../gamification/tabs/index.js";
60
- import "../../../gamification/tabs/styles.js";
61
- import "./Leaderboard.js";
62
- import "../../useClipboardCopy.js";
63
- import "../../../gamification/copyNotification/index.js";
64
- import "../../../gamification/copyNotification/styles.js";
65
- import "../../../gamification/invite-link/index.js";
66
- import "../../../../hooks/analytics.js";
67
- import "@streamlayer/sdk-web-interfaces";
68
- import "../../../gamification/invite-link/styles.js";
69
- import "react-virtualized-auto-sizer";
70
- import "react-window";
71
- import "react-window-infinite-loader";
72
- import "../../../gamification/leaderboard/list-item/styles.js";
73
- import "../../../../styles_z07sl8-w40geAFS.js";
74
- import "../../../gamification/leaderboard/static.js";
75
- import "react-infinite-scroller";
76
- import "../../../gamification/leaderboard/list-item/index.js";
77
- import "./Friends.js";
78
- import "../../../gamification/onboarding/slides/onboarding-invite-card/index.js";
79
- import "../../../gamification/onboarding/slides/onboarding-invite-card/styles.js";
80
- import "./QuestionsList.js";
81
- import "../../../gamification/question/list/index.js";
82
- import "../../../gamification/question/index.js";
83
- import "../../../gamification/question/styles.js";
84
- import "../../../gamification/question/insight/index.js";
85
- import "../../../gamification/question/insight/styles.js";
86
- import "../../../gamification/question/twitter/index.js";
87
- import "../../../gamification/question/twitter/styles.js";
88
- import "../../../button/index.js";
89
- import "../../../button/styles.js";
90
- import "../../../gamification/question/list/styles.js";
91
- import "./UserSummary.js";
92
- const I = () => k, l = /* @__PURE__ */ a(I())({
1
+ import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
+ import { styled as p } from "@linaria/react";
3
+ import { useStore as a } from "@nanostores/react";
4
+ import { useHideTransition as h } from "../../../../hooks/showIn.js";
5
+ import { SDKWhiteContainer as C } from "../../styles.js";
6
+ import { VoteHeader as k } from "../../../gamification/detail/header/index.js";
7
+ import { UserStatistics as S } from "../../../gamification/user-statistics/index.js";
8
+ import { ModalPortal as U } from "../../../modal/index.js";
9
+ import { ShowIn as I } from "../../../show-in/index.js";
10
+ import { Question as x } from "./Question.js";
11
+ import { Tabs as y } from "./Tabs.js";
12
+ const O = () => I, m = /* @__PURE__ */ p(O())({
93
13
  name: "OpenedContainer",
94
14
  class: "oar61gl",
95
15
  propsAsIs: !0
96
- }), x = /* @__PURE__ */ a("div")({
16
+ }), v = /* @__PURE__ */ p("div")({
97
17
  name: "UserContainer",
98
18
  class: "u14zaal4",
99
19
  propsAsIs: !1
100
- }), y = ({
101
- correct: r,
102
- incorrect: i
20
+ }), w = ({
21
+ correct: e,
22
+ incorrect: r
103
23
  }) => {
104
- const t = r + i;
105
- return t === 0 ? 0 : Math.round(r / t * 100);
106
- }, eo = ({
107
- gamification: r,
108
- scrollStore: i,
109
- className: t,
110
- appNode: e,
111
- scrollNode: m,
112
- headerNode: p,
113
- responsiveStore: n
114
- }) => /* @__PURE__ */ o(U, {
115
- appNode: e,
116
- headerNode: p,
117
- scrollStore: i,
118
- scrollNode: m,
119
- className: t,
120
- gamification: r,
121
- responsiveStore: n
122
- }), no = ({
123
- gamification: r,
124
- className: i,
125
- appNode: t,
126
- responsiveStore: e
24
+ const o = e + r;
25
+ return o === 0 ? 0 : Math.round(e / o * 100);
26
+ }, z = ({
27
+ gamification: e,
28
+ scrollStore: r,
29
+ className: o,
30
+ appNode: i,
31
+ scrollNode: s,
32
+ responsiveStore: t
33
+ }) => /* @__PURE__ */ n(y, {
34
+ appNode: i,
35
+ scrollStore: r,
36
+ scrollNode: s,
37
+ className: o,
38
+ gamification: e,
39
+ responsiveStore: t
40
+ }), E = ({
41
+ gamification: e,
42
+ className: r,
43
+ appNode: o,
44
+ responsiveStore: i
127
45
  }) => {
128
- const m = s(r.openedQuestion.$store), p = s(r.openedUser), {
129
- sdkInDesktopView: n
130
- } = s(e, {
46
+ const s = a(e.openedQuestion.$store), t = a(e.openedUser), {
47
+ sdkInDesktopView: d
48
+ } = a(i, {
131
49
  keys: ["sdkInDesktopView"]
132
- });
133
- if (!t.current || !m && !p)
50
+ }), {
51
+ hiding: l,
52
+ onAnimationEnd: c
53
+ } = h();
54
+ if (!o.current || !s && !t)
134
55
  return null;
135
- const c = m ? /* @__PURE__ */ o(l, {
136
- className: i,
137
- children: /* @__PURE__ */ o(S, {
138
- gamification: r
56
+ const u = s ? /* @__PURE__ */ n(m, {
57
+ className: r,
58
+ hiding: l,
59
+ onAnimationEnd: c,
60
+ children: /* @__PURE__ */ n(x, {
61
+ gamification: e
139
62
  })
140
- }) : p ? /* @__PURE__ */ o(l, {
141
- className: i,
142
- children: /* @__PURE__ */ u(x, {
143
- children: [/* @__PURE__ */ o(f, {
63
+ }) : t ? /* @__PURE__ */ n(m, {
64
+ className: r,
65
+ hiding: l,
66
+ onAnimationEnd: c,
67
+ children: /* @__PURE__ */ f(v, {
68
+ children: [/* @__PURE__ */ n(k, {
144
69
  label: "Friend's Rank",
145
- close: r.closeUser
146
- }), /* @__PURE__ */ o(d, {
147
- children: /* @__PURE__ */ o(h, {
148
- ...p,
149
- successRate: y(p)
70
+ close: e.closeUser
71
+ }), /* @__PURE__ */ n(C, {
72
+ children: /* @__PURE__ */ n(S, {
73
+ ...t,
74
+ successRate: w(t)
150
75
  })
151
76
  })]
152
77
  })
153
78
  }) : null;
154
- return /* @__PURE__ */ o(C, {
155
- container: t,
156
- useContainer: !n,
157
- children: c
79
+ return /* @__PURE__ */ n(U, {
80
+ container: o,
81
+ useContainer: !d,
82
+ children: u
158
83
  });
159
84
  };
160
85
  export {
161
- eo as GamificationOverlay,
162
- no as GamificationOverlayStandalone
86
+ z as GamificationOverlay,
87
+ E as GamificationOverlayStandalone
163
88
  };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Features } from '@streamlayer/sdk-web-features';
3
3
  import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
4
- import type { AppNodeRef, ScrollNodeRef, HeaderNodeRef } from '../masters';
4
+ import type { AppNodeRef, ScrollNodeRef } from '../masters';
5
5
  import { ResponsiveStore } from '../useSdkResponsive';
6
6
  import { ScrollStore } from '../useSdkScroll';
7
7
  /** render feature by type */
@@ -12,7 +12,6 @@ export declare const ActiveFeature: React.FC<{
12
12
  responsiveStore: ResponsiveStore;
13
13
  appNode: AppNodeRef;
14
14
  scrollNode: ScrollNodeRef;
15
- headerNode: HeaderNodeRef;
16
15
  className?: string;
17
16
  }>;
18
17
  /** render feature by type */
@@ -1,126 +1,37 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  import { lazy as f, useMemo as c, Suspense as g } from "react";
3
- import { FeatureType as a } from "@streamlayer/sdk-web-types";
4
- import { FeatureProvider as y } from "./FeatureProvider.js";
5
- import { GamificationOverlayStandalone as d } from "./Gamification/index.js";
6
- import "@linaria/react";
7
- import "@nanostores/react";
8
- import "@streamlayer/sdk-web-interfaces";
9
- import "../styles.js";
10
- import "../../gamification/detail/header/index.js";
11
- import "../../gamification/constants.js";
12
- import "../../gamification/detail/header/styles.js";
13
- import "../../icons/index.js";
14
- import "../../gamification/user-statistics/index.js";
15
- import "../../skeleton/index.js";
16
- import "../../skeleton/styles.js";
17
- import "../../../utils/common.js";
18
- import "../../gamification/user-statistics/components/rank/index.js";
19
- import "../../gamification/user-statistics/components/rank/styles.js";
20
- import "../../gamification/user-statistics/components/statistic/index.js";
21
- import "../../gamification/user-statistics/components/statistic/styles.js";
22
- import "../../gamification/user-statistics/styles.js";
23
- import "../../modal/index.js";
24
- import "../../../index-jRXrW6ie.js";
25
- import "../../../index-uEuzH3jr.js";
26
- import "../../theme/constants.js";
27
- import "../../show-in/index.js";
28
- import "@linaria/core";
29
- import "./Gamification/Question.js";
30
- import "../useMastersContext.js";
31
- import "../../gamification/detail/sponsor/index.js";
32
- import "../../gamification/vote/index.js";
33
- import "../../gamification/vote/expired-alert/index.js";
34
- import "../../gamification/vote/expired-alert/styles.js";
35
- import "../../gamification/vote/feedback/index.js";
36
- import "../../gamification/vote/feedback/styles.js";
37
- import "../../gamification/vote/styles.js";
38
- import "../../gamification/vote/vote-option/index.js";
39
- import "../../animated-counter/index.js";
40
- import "react-countup";
41
- import "../../gamification/vote/vote-option/styles.js";
42
- import "../../gamification/vote/win-bar/index.js";
43
- import "../../timer/index.js";
44
- import "react-countdown-circle-timer";
45
- import "../../gamification/vote/win-bar/styles.js";
46
- import "../../gamification/vote/insight-details/index.js";
47
- import "../../questions/insight/index.js";
48
- import "../../video-player/index.js";
49
- import "../../video-player/styles.js";
50
- import "../../questions/insight/styles.js";
51
- import "../../gamification/vote/insight-details/styles.js";
52
- import "../../gamification/vote/twitter-details/index.js";
53
- import "../../questions/twitter/index.js";
54
- import "../../questions/twitter/account/index.js";
55
- import "../../questions/twitter/account/styles.js";
56
- import "../../questions/twitter/styles.js";
57
- import "../../gamification/vote/twitter-details/styles.js";
58
- import "./Gamification/Tabs.js";
59
- import "../useSdkScroll.js";
60
- import "lodash.throttle";
61
- import "../../../index-z0QjLiEL.js";
62
- import "../../gamification/tabs/index.js";
63
- import "../../gamification/tabs/styles.js";
64
- import "./Gamification/Leaderboard.js";
65
- import "../useClipboardCopy.js";
66
- import "../../gamification/copyNotification/index.js";
67
- import "../../gamification/copyNotification/styles.js";
68
- import "../../gamification/invite-link/index.js";
69
- import "../../../hooks/analytics.js";
70
- import "../../gamification/invite-link/styles.js";
71
- import "react-virtualized-auto-sizer";
72
- import "react-window";
73
- import "react-window-infinite-loader";
74
- import "../../gamification/leaderboard/list-item/styles.js";
75
- import "../../../styles_z07sl8-w40geAFS.js";
76
- import "../../gamification/leaderboard/static.js";
77
- import "react-infinite-scroller";
78
- import "../../gamification/leaderboard/list-item/index.js";
79
- import "./Gamification/Friends.js";
80
- import "../../gamification/onboarding/slides/onboarding-invite-card/index.js";
81
- import "../../gamification/onboarding/slides/onboarding-invite-card/styles.js";
82
- import "./Gamification/QuestionsList.js";
83
- import "../../gamification/question/list/index.js";
84
- import "../../gamification/question/index.js";
85
- import "../../gamification/question/styles.js";
86
- import "../../gamification/question/insight/index.js";
87
- import "../../gamification/question/insight/styles.js";
88
- import "../../gamification/question/twitter/index.js";
89
- import "../../gamification/question/twitter/styles.js";
90
- import "../../button/index.js";
91
- import "../../button/styles.js";
92
- import "../../gamification/question/list/styles.js";
93
- import "./Gamification/UserSummary.js";
94
- const h = f(() => import("./Gamification/gamification-feature.js")), ri = ({ sdk: i, feature: t, className: r, scrollStore: m, appNode: p, scrollNode: n, headerNode: e, responsiveStore: l }) => {
95
- const u = c(() => t && t.featureConfig.get().type === a.GAMES ? /* @__PURE__ */ o(y, { className: r, sdk: i, feature: t, children: /* @__PURE__ */ o(
96
- h,
3
+ import { FeatureType as m } from "@streamlayer/sdk-web-types";
4
+ import { FeatureProvider as p } from "./FeatureProvider.js";
5
+ import { GamificationOverlayStandalone as y } from "./Gamification/index.js";
6
+ const d = f(() => import("./Gamification/gamification-feature.js")), x = ({ sdk: i, feature: t, className: n, scrollStore: e, appNode: o, scrollNode: a, responsiveStore: l }) => {
7
+ const u = c(() => t && t.featureConfig.get().type === m.GAMES ? /* @__PURE__ */ r(p, { className: n, sdk: i, feature: t, children: /* @__PURE__ */ r(
8
+ d,
97
9
  {
98
- appNode: p,
99
- scrollStore: m,
100
- scrollNode: n,
101
- headerNode: e,
102
- className: r,
10
+ appNode: o,
11
+ scrollStore: e,
12
+ scrollNode: a,
13
+ className: n,
103
14
  responsiveStore: l,
104
15
  gamification: t
105
16
  }
106
- ) }) : null, [i, t, r, l, m, n, p, e]);
107
- return /* @__PURE__ */ o(
17
+ ) }) : null, [i, t, n, l, e, a, o]);
18
+ return /* @__PURE__ */ r(
108
19
  g,
109
20
  {
110
- fallback: /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
21
+ fallback: /* @__PURE__ */ r("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%" }, children: "page loading..." }),
111
22
  children: u
112
23
  }
113
24
  );
114
- }, oi = ({ feature: i, className: t, appNode: r, responsiveStore: m }) => i && i.featureConfig.get().type === a.GAMES ? /* @__PURE__ */ o(
115
- d,
25
+ }, A = ({ feature: i, className: t, appNode: n, responsiveStore: e }) => i && i.featureConfig.get().type === m.GAMES ? /* @__PURE__ */ r(
26
+ y,
116
27
  {
117
28
  className: t,
118
- appNode: r,
119
- responsiveStore: m,
29
+ appNode: n,
30
+ responsiveStore: e,
120
31
  gamification: i
121
32
  }
122
33
  ) : null;
123
34
  export {
124
- ri as ActiveFeature,
125
- oi as StandaloneFeature
35
+ x as ActiveFeature,
36
+ A as StandaloneFeature
126
37
  };
@@ -2,46 +2,40 @@ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
2
  import { useStore as B } from "@nanostores/react";
3
3
  import { forwardRef as l } from "react";
4
4
  import { ChannelsButton as c, ChannelsButtonId as t } from "../../../navigation/button/Channels.js";
5
- import { FeaturedGroupsButton as x, FeaturedGroupsButtonId as i } from "../../../navigation/button/FeaturedGroups.js";
6
- import { LeaderBoardButtonId as P } from "../../../navigation/button/LeaderBoard.js";
5
+ import { FeaturedGroupsButton as x, FeaturedGroupsButtonId as n } from "../../../navigation/button/FeaturedGroups.js";
6
+ import { LeaderBoardButtonId as S } from "../../../navigation/button/LeaderBoard.js";
7
7
  import { Navigation as I, NavigationItems as h } from "../../../navigation/masters.js";
8
- import { BREAKPOINTS as p } from "../../../theme/constants.js";
9
- import "@linaria/react";
10
- import "../../../icons/index.js";
11
- import "../../../navigation/button/index.js";
12
- import "@linaria/core";
13
- import "../../../navigation/button/styles.js";
14
- import "../../../navigation/index.js";
15
- const K = l(
16
- ({ activeOverlay: o, setActiveOverlay: m, scrollToTop: n, sdkReady: d, className: u, responsiveStore: a }, f) => {
17
- const { screen: e } = B(a, { keys: ["screen"] });
18
- return /* @__PURE__ */ s(I, { className: u, children: [
8
+ import { BREAKPOINTS as d } from "../../../theme/constants.js";
9
+ const z = l(
10
+ ({ activeOverlay: o, setActiveOverlay: e, scrollToTop: i, sdkReady: u, className: a, responsiveStore: f }, p) => {
11
+ const { screen: m } = B(f, { keys: ["screen"] });
12
+ return /* @__PURE__ */ s(I, { className: a, children: [
19
13
  /* @__PURE__ */ s(h, { children: [
20
14
  /* @__PURE__ */ r(
21
15
  c,
22
16
  {
23
17
  active: o === t,
24
18
  onClick: () => {
25
- m(t), o !== t && n();
19
+ e(t), o !== t && i();
26
20
  }
27
21
  }
28
22
  ),
29
23
  /* @__PURE__ */ r(
30
24
  x,
31
25
  {
32
- active: o === i,
33
- disabled: !d,
26
+ active: o === n,
27
+ disabled: !u,
34
28
  onClick: () => {
35
- m(i), o !== i && n();
29
+ e(n), o !== n && i();
36
30
  },
37
- labelFull: e.size >= p.md && e.size < p.xl
31
+ labelFull: m.size >= d.md && m.size < d.xl
38
32
  }
39
33
  )
40
34
  ] }),
41
35
  /* @__PURE__ */ r(
42
36
  "div",
43
37
  {
44
- ref: f
38
+ ref: p
45
39
  }
46
40
  )
47
41
  ] });
@@ -49,7 +43,7 @@ const K = l(
49
43
  );
50
44
  export {
51
45
  t as ChannelsButtonId,
52
- i as FeaturedGroupsButtonId,
53
- P as LeaderBoardButtonId,
54
- K as MastersNavigation
46
+ n as FeaturedGroupsButtonId,
47
+ S as LeaderBoardButtonId,
48
+ z as MastersNavigation
55
49
  };
@@ -1,19 +1,16 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { useStore as s } from "@nanostores/react";
3
- import { useMemo as m } from "react";
3
+ import { useMemo as e } from "react";
4
4
  import { AvailableFeatures as d } from "@streamlayer/sdk-web-features";
5
5
  import { Navigation as v } from "../../navigation/index.js";
6
6
  import { Button as b } from "../../navigation/button/index.js";
7
- import "@linaria/react";
8
- import "@linaria/core";
9
- import "../../navigation/button/styles.js";
10
- const h = ({ customOverlays: p, activeButton: e, sdk: i }) => {
11
- const t = s(i.sdkStore.organizationSettings), r = s(i.sdkStore.streamSettings), a = m(() => {
7
+ const x = ({ customOverlays: a, activeButton: c, sdk: i }) => {
8
+ const t = s(i.sdkStore.organizationSettings), r = s(i.sdkStore.streamSettings), p = e(() => {
12
9
  const o = (r == null ? void 0 : r.data) || (t == null ? void 0 : t.data);
13
10
  return o != null && o.overlays ? o.overlays : [];
14
- }, [t, r]), c = m(
11
+ }, [t, r]), m = e(
15
12
  () => [
16
- ...a.filter(({ enableSdkButton: o }) => o).map((o) => ({
13
+ ...p.filter(({ enableSdkButton: o }) => o).map((o) => ({
17
14
  id: o.type,
18
15
  onClick: () => i.openFeature(o.type),
19
16
  disabled: !(o.type in d),
@@ -22,12 +19,12 @@ const h = ({ customOverlays: p, activeButton: e, sdk: i }) => {
22
19
  /** multiplied by 10 to add the ability to insert custom buttons between our buttons */
23
20
  position: o.position * 10
24
21
  })),
25
- ...Object.values(p).map(({ button: o }) => o)
22
+ ...Object.values(a).map(({ button: o }) => o)
26
23
  ].sort((o, l) => o.position - l.position),
27
- [a, i, p]
24
+ [p, i, a]
28
25
  );
29
- return /* @__PURE__ */ n(v, { children: c.map((o) => /* @__PURE__ */ n(b, { ...o, active: o.id === e })) });
26
+ return /* @__PURE__ */ n(v, { children: m.map((o) => /* @__PURE__ */ n(b, { ...o, active: o.id === c })) });
30
27
  };
31
28
  export {
32
- h as SDKNavigation
29
+ x as SDKNavigation
33
30
  };
@@ -1,21 +1,18 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { Container as x, CloseIconWrap as L, CloseIcon as P, Title as T, SponsorLogo as f, PresentsTitle as j, Subtitle as k, Description as E, ActionButton as I } from "./styles.js";
3
- import "@linaria/react";
4
- import "../../../../icons/index.js";
5
- import "react";
6
- const D = ({ close: u, action: S, onboarding: t }) => {
7
- var l, s, c, p, C, m, h, i;
8
- return /* @__PURE__ */ r(x, { children: [
9
- /* @__PURE__ */ e(L, { onClick: u, children: /* @__PURE__ */ e(P, { name: "icon-cross" }) }),
10
- ((s = (l = t == null ? void 0 : t.titleCard) == null ? void 0 : l.media) == null ? void 0 : s.sponsorLogo) && /* @__PURE__ */ r(T, { children: [
11
- /* @__PURE__ */ e(f, { alt: "sponsor-logo", src: (p = (c = t == null ? void 0 : t.titleCard) == null ? void 0 : c.media) == null ? void 0 : p.sponsorLogo }),
12
- /* @__PURE__ */ e(j, { children: "PRESENTS" })
1
+ import { jsxs as S, jsx as e } from "react/jsx-runtime";
2
+ import { Container as L, CloseIconWrap as P, CloseIcon as T, Title as f, SponsorLogo as j, PresentsTitle as k, Subtitle as r, Description as E, ActionButton as I } from "./styles.js";
3
+ const y = ({ close: i, action: x, onboarding: t }) => {
4
+ var l, s, c, C, p, h, m, u;
5
+ return /* @__PURE__ */ S(L, { children: [
6
+ /* @__PURE__ */ e(P, { onClick: i, children: /* @__PURE__ */ e(T, { name: "icon-cross" }) }),
7
+ ((s = (l = t == null ? void 0 : t.titleCard) == null ? void 0 : l.media) == null ? void 0 : s.sponsorLogo) && /* @__PURE__ */ S(f, { children: [
8
+ /* @__PURE__ */ e(j, { alt: "sponsor-logo", src: (C = (c = t == null ? void 0 : t.titleCard) == null ? void 0 : c.media) == null ? void 0 : C.sponsorLogo }),
9
+ /* @__PURE__ */ e(k, { children: "PRESENTS" })
13
10
  ] }),
14
- ((C = t == null ? void 0 : t.titleCard) == null ? void 0 : C.title) && /* @__PURE__ */ e(k, { children: (m = t == null ? void 0 : t.titleCard) == null ? void 0 : m.title }),
15
- ((h = t == null ? void 0 : t.titleCard) == null ? void 0 : h.subtitle) && /* @__PURE__ */ e(E, { children: (i = t == null ? void 0 : t.titleCard) == null ? void 0 : i.subtitle }),
16
- /* @__PURE__ */ e(I, { onClick: S, children: "Play Now" })
11
+ ((p = t == null ? void 0 : t.titleCard) == null ? void 0 : p.title) && /* @__PURE__ */ e(r, { children: (h = t == null ? void 0 : t.titleCard) == null ? void 0 : h.title }),
12
+ ((m = t == null ? void 0 : t.titleCard) == null ? void 0 : m.subtitle) && /* @__PURE__ */ e(E, { children: (u = t == null ? void 0 : t.titleCard) == null ? void 0 : u.subtitle }),
13
+ /* @__PURE__ */ e(I, { onClick: x, children: "Play Now" })
17
14
  ] });
18
15
  };
19
16
  export {
20
- D as Onboarding
17
+ y as Onboarding
21
18
  };
@@ -1,52 +1,50 @@
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 a = /* @__PURE__ */ s("div")({
3
+ const c = /* @__PURE__ */ s("div")({
6
4
  name: "Container",
7
5
  class: "cocfo2g",
8
6
  propsAsIs: !1
9
- }), l = /* @__PURE__ */ s("div")({
7
+ }), a = /* @__PURE__ */ s("div")({
10
8
  name: "CloseIconWrap",
11
9
  class: "c1pdhxdk",
12
10
  propsAsIs: !1
13
- }), t = () => o, r = /* @__PURE__ */ s(t())({
11
+ }), n = () => o, l = /* @__PURE__ */ s(n())({
14
12
  name: "CloseIcon",
15
13
  class: "c1funj3r",
16
14
  propsAsIs: !0
17
- }), i = /* @__PURE__ */ s("div")({
15
+ }), p = /* @__PURE__ */ s("div")({
18
16
  name: "Title",
19
17
  class: "t1okg06y",
20
18
  propsAsIs: !1
21
- }), m = /* @__PURE__ */ s("img")({
19
+ }), r = /* @__PURE__ */ s("img")({
22
20
  name: "SponsorLogo",
23
21
  class: "sb1n923",
24
22
  propsAsIs: !1
25
- }), I = /* @__PURE__ */ s("div")({
23
+ }), i = /* @__PURE__ */ s("div")({
26
24
  name: "PresentsTitle",
27
25
  class: "p1stllxd",
28
26
  propsAsIs: !1
29
- }), f = /* @__PURE__ */ s("div")({
27
+ }), m = /* @__PURE__ */ s("div")({
30
28
  name: "Subtitle",
31
29
  class: "s13kvdzw",
32
30
  propsAsIs: !1
33
- }), d = /* @__PURE__ */ s("div")({
31
+ }), I = /* @__PURE__ */ s("div")({
34
32
  name: "Description",
35
33
  class: "dfvmv3t",
36
34
  propsAsIs: !1
37
- }), A = /* @__PURE__ */ s("button")({
35
+ }), f = /* @__PURE__ */ s("button")({
38
36
  name: "ActionButton",
39
37
  class: "ay8e3j9",
40
38
  propsAsIs: !1
41
39
  });
42
40
  export {
43
- A as ActionButton,
44
- r as CloseIcon,
45
- l as CloseIconWrap,
46
- a as Container,
47
- d as Description,
48
- I as PresentsTitle,
49
- m as SponsorLogo,
50
- f as Subtitle,
51
- i as Title
41
+ f as ActionButton,
42
+ l as CloseIcon,
43
+ a as CloseIconWrap,
44
+ c as Container,
45
+ I as Description,
46
+ i as PresentsTitle,
47
+ r as SponsorLogo,
48
+ m as Subtitle,
49
+ p as Title
52
50
  };