@streamlayer/react-ui 1.14.3 → 1.16.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 (93) hide show
  1. package/lib/app/app/Advertisement/index.js +1 -1
  2. package/lib/app/app/Features/FeatureProvider.js +1 -1
  3. package/lib/app/app/Features/Gamification/Leaderboard.js +9 -8
  4. package/lib/app/app/Features/Gamification/Question.js +1 -1
  5. package/lib/app/app/Features/Gamification/QuestionsList.js +3 -3
  6. package/lib/app/app/Features/Gamification/Tabs.js +2 -2
  7. package/lib/app/app/Features/Gamification/index.js +1 -1
  8. package/lib/app/app/InApp/index.d.ts +4 -0
  9. package/lib/app/app/InApp/index.js +31 -0
  10. package/lib/app/app/Insight/index.js +1 -1
  11. package/lib/app/app/Navigation/index.js +1 -1
  12. package/lib/app/app/Notifications/Onboarding/index.js +79 -73
  13. package/lib/app/app/Notifications/index.js +1 -1
  14. package/lib/app/app/Points/index.js +5 -5
  15. package/lib/app/app/index.js +17 -17
  16. package/lib/app/app/story/index.d.ts +0 -1
  17. package/lib/app/app/story/index.js +39 -50
  18. package/lib/app/app/story/styles.d.ts +1 -0
  19. package/lib/app/app/story/styles.js +9 -4
  20. package/lib/app/app/story/video.js +28 -25
  21. package/lib/app/app/useApp.d.ts +1 -2
  22. package/lib/app/app/useApp.js +1 -1
  23. package/lib/app/login/demo.js +1 -1
  24. package/lib/app/masters/Features/FeatureProvider.js +1 -1
  25. package/lib/app/masters/Features/Gamification/Leaderboard.js +4 -3
  26. package/lib/app/masters/Features/Gamification/Question.js +1 -1
  27. package/lib/app/masters/Features/Gamification/QuestionsList.js +3 -3
  28. package/lib/app/masters/Features/Gamification/Tabs.js +4 -4
  29. package/lib/app/masters/Features/Gamification/index.js +1 -1
  30. package/lib/app/masters/Navigation/MastersNavigation/index.js +4 -4
  31. package/lib/app/masters/Notifications/Onboarding/index.js +5 -5
  32. package/lib/app/masters/Notifications/index.js +1 -1
  33. package/lib/app/masters/Points/index.js +5 -5
  34. package/lib/app/masters/masters.js +16 -16
  35. package/lib/app/masters/useMastersApp.js +7 -7
  36. package/lib/app/masters/useSdkScroll.js +7 -7
  37. package/lib/app/useSdkFeature.js +1 -1
  38. package/lib/app/useSdkScroll.js +7 -7
  39. package/lib/assets/style.css +1 -1
  40. package/lib/ui/close-btn/index.d.ts +1 -1
  41. package/lib/ui/gamification/constants.d.ts +1 -0
  42. package/lib/ui/gamification/constants.js +11 -2
  43. package/lib/ui/gamification/points/index.js +7 -7
  44. package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +7 -0
  45. package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +61 -0
  46. package/lib/ui/gamification/question/inapp/notification/index.d.ts +6 -0
  47. package/lib/ui/gamification/question/inapp/notification/index.js +38 -0
  48. package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -0
  49. package/lib/ui/gamification/question/inapp/notification/styles.js +40 -0
  50. package/lib/ui/gamification/question/inapp/notification/tweet/index.d.ts +2 -0
  51. package/lib/ui/gamification/question/inapp/notification/tweet/index.js +24 -0
  52. package/lib/ui/gamification/question/inapp/notification/tweet/styles.d.ts +4 -0
  53. package/lib/ui/gamification/question/inapp/notification/tweet/styles.js +24 -0
  54. package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +5 -0
  55. package/lib/ui/gamification/question/inapp/onboarding/index.js +50 -0
  56. package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +9 -0
  57. package/lib/ui/gamification/question/inapp/onboarding/styles.js +51 -0
  58. package/lib/ui/gamification/question/inapp/prediction-result/frames/content.d.ts +6 -0
  59. package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +57 -0
  60. package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +12 -0
  61. package/lib/ui/gamification/question/inapp/prediction-result/frames/index.js +59 -0
  62. package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.d.ts +1 -0
  63. package/lib/ui/gamification/question/inapp/prediction-result/frames/lines.js +34 -0
  64. package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.d.ts +1 -0
  65. package/lib/ui/gamification/question/inapp/prediction-result/frames/step1.js +19 -0
  66. package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.d.ts +3 -0
  67. package/lib/ui/gamification/question/inapp/prediction-result/frames/step2.js +26 -0
  68. package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.d.ts +4 -0
  69. package/lib/ui/gamification/question/inapp/prediction-result/frames/step3.js +38 -0
  70. package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.d.ts +3 -0
  71. package/lib/ui/gamification/question/inapp/prediction-result/frames/step4.js +33 -0
  72. package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +3 -0
  73. package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.js +20 -0
  74. package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +9 -0
  75. package/lib/ui/gamification/question/inapp/prediction-result/index.js +7 -0
  76. package/lib/ui/gamification/question/inapp/prediction-result/styles.d.ts +1 -0
  77. package/lib/ui/gamification/question/inapp/prediction-result/styles.js +9 -0
  78. package/lib/ui/gamification/question/index.d.ts +10 -1
  79. package/lib/ui/gamification/question/index.js +45 -36
  80. package/lib/ui/icons/index.d.ts +2 -3
  81. package/lib/ui/icons/index.js +72 -63
  82. package/lib/ui/questions/twitter/account/index.js +17 -17
  83. package/lib/ui/questions/twitter/index.d.ts +1 -0
  84. package/lib/ui/questions/twitter/index.js +2 -1
  85. package/lib/ui/theme/constants.d.ts +6 -0
  86. package/lib/ui/theme/constants.js +20 -14
  87. package/lib/ui/theme/index.d.ts +1 -0
  88. package/lib/ui/theme/index.js +4 -4
  89. package/lib/ui/theme/theme.js +2 -2
  90. package/lib/utils/debug/components/eventInput.js +1 -1
  91. package/lib/utils/decorators/container.js +10 -6
  92. package/lib/utils/decorators/styles.js +7 -2
  93. package/package.json +20 -15
@@ -1,9 +1,9 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { cx as b } from "@linaria/core";
3
3
  import { styled as L } from "@linaria/react";
4
- import { useStore as g } from "@nanostores/react";
5
4
  import { useAnalyticsListener as P } from "../../../hooks/analytics.js";
6
5
  import { useEffect as w, useRef as I } from "react";
6
+ import { useStore as g } from "@streamlayer/react-polyfills";
7
7
  import { eventBus as A } from "@streamlayer/sdk-web-interfaces";
8
8
  import { FeatureType as E, NotificationPromotionMode as T, PromotionType as U } from "@streamlayer/sdk-web-types";
9
9
  import { AdvertisementUI as N } from "../../../ui/advertisement/index.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { styled as u } from "@linaria/react";
3
- import { useStore as i } from "@nanostores/react";
3
+ import { useStore as i } from "@streamlayer/react-polyfills";
4
4
  import { FeatureStatus as c } from "@streamlayer/sdk-web-interfaces";
5
5
  const o = /* @__PURE__ */ u("div")({
6
6
  name: "LoadingContainer",
@@ -1,12 +1,13 @@
1
1
  import { jsx as r, jsxs as f, Fragment as L } from "react/jsx-runtime";
2
2
  import { styled as h } from "@linaria/react";
3
- import { useStore as i } from "@nanostores/react";
4
3
  import { useClipboardCopy as k } from "../../../useClipboardCopy.js";
5
4
  import { useRef as u } from "react";
5
+ import { useStore as n } from "@streamlayer/react-polyfills";
6
6
  import { InviteLink as I } from "../../../../ui/gamification/invite-link/index.js";
7
7
  import "react-virtualized-auto-sizer";
8
8
  import "react-window";
9
9
  import "react-window-infinite-loader";
10
+ import "@storybook/blocks";
10
11
  import "../../../../ui/icons/index.js";
11
12
  import "../../../../ui/gamification/leaderboard/list-item/styles.js";
12
13
  /* empty css */
@@ -16,24 +17,24 @@ const C = /* @__PURE__ */ h("div")({
16
17
  name: "InviteLinkContainer",
17
18
  class: "i1odbhm4",
18
19
  propsAsIs: !1
19
- }), q = ({
20
+ }), z = ({
20
21
  gamification: e,
21
22
  scrollNode: s,
22
23
  scrollStore: p
23
24
  }) => {
24
25
  const t = u(null), {
25
- data: n,
26
+ data: i,
26
27
  hasMore: d,
27
28
  loading: m,
28
29
  key: l
29
- } = i(e.leaderboardList.$store), {
30
+ } = n(e.leaderboardList.$store), {
30
31
  data: o
31
- } = i(e.deepLink.$store), [a, c] = k(t);
32
- return !n.length && !m ? /* @__PURE__ */ r(y, {
32
+ } = n(e.deepLink.$store), [a, c] = k(t);
33
+ return !i.length && !m ? /* @__PURE__ */ r(y, {
33
34
  deepLink: o
34
35
  }) : /* @__PURE__ */ f(L, {
35
36
  children: [/* @__PURE__ */ r(b, {
36
- items: n,
37
+ items: i,
37
38
  scrollNode: s,
38
39
  scrollStore: p,
39
40
  fetchMore: e.leaderboardList.fetchMore,
@@ -51,5 +52,5 @@ const C = /* @__PURE__ */ h("div")({
51
52
  });
52
53
  };
53
54
  export {
54
- q as Leaderboard
55
+ z as Leaderboard
55
56
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as y, jsx as e } from "react/jsx-runtime";
2
2
  import { styled as v } from "@linaria/react";
3
- import { useStore as d } from "@nanostores/react";
4
3
  import { useAppContext as T } from "../../useAppContext.js";
4
+ import { useStore as d } from "@streamlayer/react-polyfills";
5
5
  import { QuestionType as V } from "@streamlayer/sdk-web-types";
6
6
  import { VoteHeader as h } from "../../../../ui/gamification/detail/header/index.js";
7
7
  import { Sponsor as x } from "../../../../ui/gamification/detail/sponsor/index.js";
@@ -1,9 +1,9 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { useStore as i } from "@nanostores/react";
3
- import { useAppContext as n } from "../../useAppContext.js";
2
+ import { useAppContext as i } from "../../useAppContext.js";
3
+ import { useStore as n } from "@streamlayer/react-polyfills";
4
4
  import { QuestionList as m } from "../../../../ui/gamification/question/list/index.js";
5
5
  const a = ({ store: t, openQuestion: r }) => {
6
- const { sdk: o } = n(), e = i(t);
6
+ const { sdk: o } = i(), e = n(t);
7
7
  return /* @__PURE__ */ s(m, { openQuestion: r, questions: e.data, controlVideo: o == null ? void 0 : o.controlVideoPlayer });
8
8
  };
9
9
  export {
@@ -1,9 +1,9 @@
1
1
  import { jsxs as f, jsx as e, Fragment as D } from "react/jsx-runtime";
2
2
  import { cx as C } from "@linaria/core";
3
- import { useStore as c } from "@nanostores/react";
4
3
  import { TabsContainer as S, TabsNavContainer as E, SDKSummaryContainer as v, UserSummaryContainer as A, SDKContentContainer as I, LeaderboardContainer as L } from "../../styles.js";
5
4
  import { scrollIntoAppView as P } from "../../../useSdkScroll.js";
6
- import { useState as V, useTransition as K, useEffect as l } from "react";
5
+ import { useState as V, useEffect as l } from "react";
6
+ import { useStore as c, useTransition as K } from "@streamlayer/react-polyfills";
7
7
  import { ActivePages as n, Tabs as F } from "../../../../ui/gamification/tabs/index.js";
8
8
  import { Leaderboard as O } from "./Leaderboard.js";
9
9
  import { QuestionsList as H } from "./QuestionsList.js";
@@ -1,10 +1,10 @@
1
1
  import { jsx as o, jsxs as x } from "react/jsx-runtime";
2
2
  import { cx as l } from "@linaria/core";
3
3
  import { styled as f } from "@linaria/react";
4
- import { useStore as c } from "@nanostores/react";
5
4
  import { SDKWhiteContainer as k } from "../../styles.js";
6
5
  import { useAppContext as v } from "../../useAppContext.js";
7
6
  import { useHideTransition as S } from "../../../../hooks/showIn.js";
7
+ import { useStore as c } from "@streamlayer/react-polyfills";
8
8
  import { VoteHeader as U } from "../../../../ui/gamification/detail/header/index.js";
9
9
  import { UserStatistics as I } from "../../../../ui/gamification/user-statistics/index.js";
10
10
  import { ModalPortal as y } from "../../../../ui/modal/index.js";
@@ -0,0 +1,4 @@
1
+ import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
+ export declare const StreamLayerSDKNotification: React.FC<{
3
+ sdk: StreamLayerSDK;
4
+ }>;
@@ -0,0 +1,31 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { useState as p, useMemo as c, useEffect as s } from "react";
3
+ import { useStore as u } from "@streamlayer/react-polyfills";
4
+ import { eventBus as f } from "@streamlayer/sdk-web-interfaces";
5
+ import { NotificationType as n } from "@streamlayer/sdk-web-notifications";
6
+ import { FeatureType as m, QuestionType as d } from "@streamlayer/sdk-web-types";
7
+ import { InAppNotification as l } from "../../../ui/gamification/question/inapp/notification/index.js";
8
+ import { InAppOnboarding as y } from "../../../ui/gamification/question/inapp/onboarding/index.js";
9
+ import { InAppPredictionResult as I } from "../../../ui/gamification/question/inapp/prediction-result/index.js";
10
+ const R = ({ sdk: o }) => {
11
+ const [r] = p(o.getNotificationsStore()), a = u(r), e = o.getFeature(m.GAMES), t = c(() => o.getActiveNotification(), [o, a]);
12
+ return s(() => {
13
+ t && f.emit("notification", {
14
+ action: "rendered",
15
+ payload: {
16
+ questionId: t.data.questionId,
17
+ questionType: t.data.questionType
18
+ }
19
+ });
20
+ }, [t]), t && t.type === n.QUESTION_RESOLVED ? t.data.question && t.data.questionType === d.PREDICTION ? /* @__PURE__ */ i(
21
+ I,
22
+ {
23
+ action: t.action,
24
+ close: t.close,
25
+ ...t.data.question
26
+ }
27
+ ) : null : t && t.type === n.ONBOARDING ? t.data.onboarding ? /* @__PURE__ */ i(y, { open: e == null ? void 0 : e.openFeature, close: t.close, ...t.data.onboarding }) : null : t && /* @__PURE__ */ i(l, { ...t.data, action: t.action });
28
+ };
29
+ export {
30
+ R as StreamLayerSDKNotification
31
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsx as d } from "react/jsx-runtime";
2
2
  import { styled as i } from "@linaria/react";
3
- import { useStore as Q } from "@nanostores/react";
4
3
  import { useRef as l, useEffect as m } from "react";
4
+ import { useStore as Q } from "@streamlayer/react-polyfills";
5
5
  import { FeatureType as S } from "@streamlayer/sdk-web-types";
6
6
  import { Question as y } from "../Features/Gamification/Question.js";
7
7
  const I = () => y, b = /* @__PURE__ */ i(I())({
@@ -1,8 +1,8 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import { cx as S } from "@linaria/core";
3
3
  import { styled as n } from "@linaria/react";
4
- import { useStore as v } from "@nanostores/react";
5
4
  import { forwardRef as y, useMemo as u } from "react";
5
+ import { useStore as v } from "@streamlayer/react-polyfills";
6
6
  import { AvailableFeatures as b } from "@streamlayer/sdk-web-features";
7
7
  import { FeatureType as C } from "@streamlayer/sdk-web-types";
8
8
  import { SvgIcon as h } from "../../../ui/icons/index.js";
@@ -1,19 +1,19 @@
1
- import { jsx as r, jsxs as L, Fragment as x } from "react/jsx-runtime";
2
- import { styled as I } from "@linaria/react";
3
- import { useStore as T } from "@nanostores/react";
4
- import { useImagesPreload as O } from "../../../useImagesPreload.js";
5
- import { scrollIntoAppView as _ } from "../../../useSdkScroll.js";
6
- import { useRef as E, useState as A, useMemo as F, useLayoutEffect as M, useEffect as R } from "react";
7
- import { FeatureType as V } from "@streamlayer/sdk-web-types";
8
- import { OnboardingUI as W } from "../../../../ui/gamification/onboarding/index.js";
9
- import { ModalPortal as $ } from "../../../../ui/modal/index.js";
10
- import { ShowIn as j } from "../../../../ui/show-in/index.js";
11
- import { Onboarding as w } from "./Notification/index.js";
1
+ import { jsx as n, jsxs as w, Fragment as O } from "react/jsx-runtime";
2
+ import { styled as y } from "@linaria/react";
3
+ import { useImagesPreload as _ } from "../../../useImagesPreload.js";
4
+ import { scrollIntoAppView as E } from "../../../useSdkScroll.js";
5
+ import { useRef as M, useState as T, useMemo as A, useLayoutEffect as R, useEffect as V } from "react";
6
+ import { useStore as F } from "@streamlayer/react-polyfills";
7
+ import { FeatureType as W } from "@streamlayer/sdk-web-types";
8
+ import { OnboardingUI as $ } from "../../../../ui/gamification/onboarding/index.js";
9
+ import { ModalPortal as j } from "../../../../ui/modal/index.js";
10
+ import { ShowIn as P } from "../../../../ui/show-in/index.js";
11
+ import { Onboarding as L } from "./Notification/index.js";
12
12
  const C = [{
13
13
  graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",
14
14
  tagline: "",
15
- headline: /* @__PURE__ */ L(x, {
16
- children: ["Welcome to ", /* @__PURE__ */ r("br", {}), " Live Challenge"]
15
+ headline: /* @__PURE__ */ w(O, {
16
+ children: ["Welcome to ", /* @__PURE__ */ n("br", {}), " Live Challenge"]
17
17
  })
18
18
  }, {
19
19
  graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",
@@ -21,43 +21,48 @@ const C = [{
21
21
  }, {
22
22
  graphicSrc: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",
23
23
  headline: "Win points and play against friends."
24
- }], P = /* @__PURE__ */ I("div")({
24
+ }], q = /* @__PURE__ */ y("div")({
25
25
  name: "OnboardingContainer",
26
26
  class: "o1xni1kr",
27
27
  propsAsIs: !1
28
- }), q = () => j, z = /* @__PURE__ */ I(q())({
28
+ }), z = () => P, D = /* @__PURE__ */ y(z())({
29
29
  name: "OnboardingNotificationContainer",
30
30
  class: "o1vnouv7",
31
31
  propsAsIs: !0
32
- }), S = /* @__PURE__ */ I("div")({
32
+ }), x = /* @__PURE__ */ y("div")({
33
33
  name: "InnerContainer",
34
34
  class: "i59uefw",
35
35
  propsAsIs: !1
36
- }), D = ({
36
+ }), G = /* @__PURE__ */ y("div")({
37
+ name: "OnboardingOverlap",
38
+ class: "ovnr8ov",
39
+ propsAsIs: !1
40
+ }), U = ({
37
41
  deepLink: l,
38
42
  onboardingOpts: e,
39
43
  notification: o,
40
- gamification: m,
44
+ gamification: p,
41
45
  loading: s,
42
- sdk: d
46
+ sdk: d,
47
+ throttled: I
43
48
  }) => {
44
- var c, a, b, h, f, v, i;
45
- const p = T(m.friends.getStore()), [g, t] = A(void 0), y = F(() => {
46
- var u, k;
47
- const n = d.getInviter();
48
- return n ? (k = (u = p.data) == null ? void 0 : u.find(({
49
+ var a, b, h, f, v, t, u;
50
+ const c = F(p.friends.getStore()), [r, k] = T(void 0), g = A(() => {
51
+ var m, S;
52
+ const i = d.getInviter();
53
+ return i ? (S = (m = c.data) == null ? void 0 : m.find(({
49
54
  slId: B
50
- }) => B === n)) == null ? void 0 : k.name : "";
51
- }, [p.data, d]);
52
- return R(() => {
53
- const n = l.$store.subscribe((u) => {
54
- u && t(u.data);
55
+ }) => B === i)) == null ? void 0 : S.name : "";
56
+ }, [c.data, d]);
57
+ return V(() => {
58
+ const i = l.$store.subscribe((m) => {
59
+ m && k(m.data);
55
60
  });
56
61
  return () => {
57
- n();
62
+ i();
58
63
  };
59
- }, [l.$store]), /* @__PURE__ */ r(P, {
60
- children: /* @__PURE__ */ r(W, {
64
+ }, [l.$store]), /* @__PURE__ */ w(q, {
65
+ children: [/* @__PURE__ */ n($, {
61
66
  loading: s,
62
67
  rules: [{
63
68
  label: "Answer as many questions as you like.",
@@ -69,94 +74,95 @@ const C = [{
69
74
  label: "Top the leader board and best your friends.",
70
75
  icon: "icon-trophy"
71
76
  }],
72
- rulesBtnLabel: (c = e.rules) == null ? void 0 : c.buttonLabel,
73
- rulesTitle: (a = e.rules) == null ? void 0 : a.heading,
77
+ rulesBtnLabel: (a = e.rules) == null ? void 0 : a.buttonLabel,
78
+ rulesTitle: (b = e.rules) == null ? void 0 : b.heading,
74
79
  termsTitle: "Terms and Conditions",
75
- termsText: (b = e.rules) == null ? void 0 : b.terms,
80
+ termsText: (h = e.rules) == null ? void 0 : h.terms,
76
81
  steps: C,
77
- primaryColor: (h = e.inviteCard) == null ? void 0 : h.iconColor,
78
- inviteLink: g,
79
- inviteCardTitle: (f = e.inviteCard) == null ? void 0 : f.heading,
80
- inviteCardSubtext: (v = e.inviteCard) == null ? void 0 : v.subtext,
81
- inviteCardBtnLabel: (i = e.inviteCard) == null ? void 0 : i.buttonLabel,
82
+ primaryColor: (f = e.inviteCard) == null ? void 0 : f.iconColor,
83
+ inviteLink: r,
84
+ inviteCardTitle: (v = e.inviteCard) == null ? void 0 : v.heading,
85
+ inviteCardSubtext: (t = e.inviteCard) == null ? void 0 : t.subtext,
86
+ inviteCardBtnLabel: (u = e.inviteCard) == null ? void 0 : u.buttonLabel,
82
87
  onClose: () => {
83
- var n;
84
- (n = o.close) == null || n.call(o);
88
+ var i;
89
+ (i = o.close) == null || i.call(o);
85
90
  },
86
- gamification: m,
91
+ gamification: p,
87
92
  sdk: d,
88
- inviterName: y
89
- })
93
+ inviterName: g
94
+ }), I && /* @__PURE__ */ n(G, {})]
90
95
  });
91
- }, ne = ({
96
+ }, te = ({
92
97
  sdk: l,
93
98
  notification: e,
94
99
  saveHeight: o,
95
- style: m,
100
+ style: p,
96
101
  appNode: s,
97
102
  sdkInDesktopView: d,
98
- responsiveStore: p
103
+ responsiveStore: I
99
104
  }) => {
100
- const g = E(null), t = e.data.onboarding, [y, c] = A(t == null ? void 0 : t.instantOpen), a = l.getFeature(V.GAMES), b = F(() => C == null ? void 0 : C.map(({
101
- graphicSrc: i
102
- }) => i), []), {
105
+ const c = M(null), r = e.data.onboarding, [k, g] = T(r == null ? void 0 : r.instantOpen), a = l.getFeature(W.GAMES), b = A(() => C == null ? void 0 : C.map(({
106
+ graphicSrc: t
107
+ }) => t), []), {
103
108
  screen: h
104
- } = T(p, {
109
+ } = F(I, {
105
110
  keys: ["screen"]
106
111
  });
107
- M(() => {
108
- var i;
109
- o(((i = g.current) == null ? void 0 : i.getBoundingClientRect().height) || 0);
112
+ R(() => {
113
+ var t;
114
+ o(((t = c.current) == null ? void 0 : t.getBoundingClientRect().height) || 0);
110
115
  }, [o]);
111
116
  const {
112
117
  loading: f,
113
118
  throttled: v
114
- } = O(b);
115
- return y && a && t && s.current && !v ? /* @__PURE__ */ r($, {
119
+ } = _(b);
120
+ return k && a && r && s.current ? /* @__PURE__ */ n(j, {
116
121
  container: s,
117
122
  useContainer: !d,
118
- children: /* @__PURE__ */ r(D, {
123
+ children: /* @__PURE__ */ n(U, {
124
+ throttled: v,
119
125
  notification: e,
120
- setOpened: c,
126
+ setOpened: g,
121
127
  gamification: a,
122
- onboardingOpts: t,
128
+ onboardingOpts: r,
123
129
  deepLink: a.deepLink,
124
130
  loading: f,
125
131
  renderToNode: s,
126
132
  sdk: l
127
133
  })
128
- }) : /* @__PURE__ */ L(x, {
129
- children: [/* @__PURE__ */ r(S, {
130
- ref: g,
134
+ }) : /* @__PURE__ */ w(O, {
135
+ children: [/* @__PURE__ */ n(x, {
136
+ ref: c,
131
137
  style: {
132
138
  position: "absolute",
133
139
  visibility: "hidden"
134
140
  },
135
- children: /* @__PURE__ */ r(w, {
141
+ children: /* @__PURE__ */ n(L, {
136
142
  close: () => {
137
143
  },
138
144
  action: () => {
139
145
  },
140
- onboarding: t
146
+ onboarding: r
141
147
  })
142
- }), /* @__PURE__ */ r(z, {
143
- style: m,
148
+ }), /* @__PURE__ */ n(D, {
149
+ style: p,
144
150
  hiding: e.hiding,
145
- children: /* @__PURE__ */ r(S, {
146
- children: /* @__PURE__ */ r(w, {
151
+ children: /* @__PURE__ */ n(x, {
152
+ children: /* @__PURE__ */ n(L, {
147
153
  close: e.close,
148
154
  action: () => {
149
- var n;
150
- c(!0), (((n = s.current) == null ? void 0 : n.getBoundingClientRect().y) || 0) < 0 && _(s, h.size, {
155
+ var u;
156
+ g(!0), (((u = s.current) == null ? void 0 : u.getBoundingClientRect().y) || 0) < 0 && E(s, h.size, {
151
157
  behavior: "smooth"
152
158
  });
153
159
  },
154
- onboarding: t
160
+ onboarding: r
155
161
  })
156
162
  })
157
163
  })]
158
164
  });
159
165
  };
160
166
  export {
161
- ne as Onboarding
167
+ te as Onboarding
162
168
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as k, Fragment as b, jsx as u } from "react/jsx-runtime";
2
2
  import { cx as V } from "@linaria/core";
3
- import { useStore as y } from "@nanostores/react";
4
3
  import { useAppContext as O } from "../useAppContext.js";
5
4
  import { scrollIntoAppView as T } from "../../useSdkScroll.js";
6
5
  import { useState as I, useMemo as D, useEffect as a, useRef as E, useCallback as w } from "react";
7
6
  import { r as R } from "../../../index-B1QdimmR.js";
7
+ import { useStore as y } from "@streamlayer/react-polyfills";
8
8
  import { eventBus as q } from "@streamlayer/sdk-web-interfaces";
9
9
  import { NotificationType as p } from "@streamlayer/sdk-web-notifications";
10
10
  import { QuestionTypeData as C } from "../../../ui/gamification/constants.js";
@@ -1,12 +1,12 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { useStore as f } from "@nanostores/react";
3
- import { useState as c, useEffect as l } from "react";
2
+ import { useState as f, useEffect as c } from "react";
3
+ import { useStore as l } from "@streamlayer/react-polyfills";
4
4
  import { FeatureStatus as u } from "@streamlayer/sdk-web-interfaces";
5
5
  import { FeatureType as p } from "@streamlayer/sdk-web-types";
6
6
  import { Points as S } from "../../../ui/gamification/points/index.js";
7
7
  const a = ({ gamification: e }) => {
8
- const s = e.userSummary.$store, [r, m] = c(0);
9
- return l(() => {
8
+ const s = e.userSummary.$store, [r, m] = f(0);
9
+ return c(() => {
10
10
  const i = s.subscribe((t) => {
11
11
  var o;
12
12
  (o = t == null ? void 0 : t.summary) != null && o.points && m(t.summary.points);
@@ -18,7 +18,7 @@ const a = ({ gamification: e }) => {
18
18
  e.status.get() === u.Suspended ? e.openFeature() : e.status.get() === u.Ready && e.closeFeature(!1);
19
19
  } });
20
20
  }, k = ({ sdk: e }) => {
21
- if (!f(e.featuresList.getStore()))
21
+ if (!l(e.featuresList.getStore()))
22
22
  return null;
23
23
  const r = e.getFeature(p.GAMES);
24
24
  return r ? /* @__PURE__ */ n(a, { gamification: r }) : null;
@@ -1,12 +1,12 @@
1
1
  import { jsx as l, jsxs as f } from "react/jsx-runtime";
2
2
  import { cx as v } from "@linaria/core";
3
- import { useStore as N } from "@nanostores/react";
4
- import { SDKContainer as A, SDKScrollContainer as F } from "./styles.js";
5
- import { useSdkFeature as x } from "../useSdkFeature.js";
6
- import { useSdkResponsive as D } from "../useSdkResponsive.js";
7
- import { useSdkScroll as L } from "../useSdkScroll.js";
8
- import { useAnalyticsListener as u, newTabLinkListener as g, appScrollListener as C, appClickListener as b } from "../../hooks/analytics.js";
9
- import { useRef as p, useMemo as y, useEffect as K } from "react";
3
+ import { SDKContainer as N, SDKScrollContainer as A } from "./styles.js";
4
+ import { useSdkFeature as F } from "../useSdkFeature.js";
5
+ import { useSdkResponsive as x } from "../useSdkResponsive.js";
6
+ import { useSdkScroll as D } from "../useSdkScroll.js";
7
+ import { useAnalyticsListener as u, newTabLinkListener as L, appScrollListener as g, appClickListener as C } from "../../hooks/analytics.js";
8
+ import { useRef as p, useMemo as b, useEffect as y } from "react";
9
+ import { useStore as K } from "@streamlayer/react-polyfills";
10
10
  import { resetCss as c } from "../../ui/theme/theme.js";
11
11
  import { ActiveFeature as j, StandaloneFeature as R } from "./Features/index.js";
12
12
  import { SDKNavigation as w, SDKHeader as E } from "./Navigation/index.js";
@@ -21,7 +21,7 @@ const M = ({
21
21
  scrollNode: s,
22
22
  responsiveStore: t
23
23
  }) => {
24
- const [, a] = x(e);
24
+ const [, a] = F(e);
25
25
  return /* @__PURE__ */ l(j, {
26
26
  className: n,
27
27
  scrollNode: s,
@@ -37,7 +37,7 @@ const M = ({
37
37
  appNode: r,
38
38
  responsiveStore: i
39
39
  }) => {
40
- const s = N(e.featuresList.getStore());
40
+ const s = K(e.featuresList.getStore());
41
41
  return s ? Array.from(s, (t) => {
42
42
  const a = e.getFeature(t);
43
43
  return a ? /* @__PURE__ */ l(R, {
@@ -52,7 +52,7 @@ const M = ({
52
52
  sdk: e,
53
53
  topNavigation: n
54
54
  }) => {
55
- const r = p(null), i = p(null), [s] = D(r), [t, a] = L(r, s), {
55
+ const r = p(null), i = p(null), [s] = x(r), [t, a] = D(r, s), {
56
56
  sdkReady: d,
57
57
  activeFeature: m,
58
58
  isLogged: S
@@ -60,27 +60,27 @@ const M = ({
60
60
  u(r, {
61
61
  enabled: o,
62
62
  event: "click",
63
- listener: g
63
+ listener: L
64
64
  }), u(t, {
65
65
  enabled: o,
66
66
  event: "scrollend",
67
- listener: C,
67
+ listener: g,
68
68
  useDomNode: !0
69
69
  }), u(t, {
70
70
  enabled: o,
71
71
  event: "click",
72
- listener: b,
72
+ listener: C,
73
73
  useDomNode: !0
74
74
  });
75
- const h = y(() => ({
75
+ const h = b(() => ({
76
76
  sdk: e,
77
77
  topNavigation: n
78
78
  }), [e, n]);
79
- return K(() => {
79
+ return y(() => {
80
80
  import("./Features/Gamification/gamification-feature.js");
81
81
  }, []), /* @__PURE__ */ l(I.Provider, {
82
82
  value: h,
83
- children: /* @__PURE__ */ f(A, {
83
+ children: /* @__PURE__ */ f(N, {
84
84
  ref: r,
85
85
  className: n ? "" : "c10llmat",
86
86
  children: [o && n && /* @__PURE__ */ l(w, {
@@ -91,7 +91,7 @@ const M = ({
91
91
  className: v(c, "sl-hide-on-modal"),
92
92
  sdk: e,
93
93
  ref: i
94
- }), /* @__PURE__ */ f(F, {
94
+ }), /* @__PURE__ */ f(A, {
95
95
  className: "sl-hide-on-modal",
96
96
  ref: t,
97
97
  "data-nav": (!!m && o).toString(),
@@ -1,5 +1,4 @@
1
1
  import { DebugProps } from '../../../utils/debug';
2
2
  export declare const AppStory: React.FC<DebugProps & {
3
- darkMode?: boolean;
4
3
  friendsTab?: 'enabled' | 'disabled' | 'activatedGame';
5
4
  }>;