@streamlayer/react-ui 1.9.0 → 1.10.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 (78) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +1 -0
  2. package/lib/app/app/Advertisement/index.js +78 -67
  3. package/lib/app/app/Features/Gamification/Question.d.ts +1 -0
  4. package/lib/app/app/Features/Gamification/Question.js +43 -41
  5. package/lib/app/app/Features/Gamification/Tabs.js +23 -22
  6. package/lib/app/app/Features/Gamification/index.js +1 -1
  7. package/lib/app/app/Insight/index.d.ts +2 -0
  8. package/lib/app/app/Insight/index.js +28 -24
  9. package/lib/app/app/Navigation/SDKPillNode.d.ts +1 -0
  10. package/lib/app/app/Navigation/SDKPillNode.js +9 -0
  11. package/lib/app/app/Notifications/index.js +125 -113
  12. package/lib/app/app/Points/index.js +16 -16
  13. package/lib/app/app/index.d.ts +1 -0
  14. package/lib/app/app/index.js +84 -86
  15. package/lib/app/app/story/insight/index.d.ts +1 -0
  16. package/lib/app/app/story/insight/index.js +29 -26
  17. package/lib/app/app/story/insight/video.d.ts +1 -0
  18. package/lib/app/app/story/insight/video.js +13 -13
  19. package/lib/app/app/story/promotion/content.d.ts +3 -1
  20. package/lib/app/app/story/promotion/content.js +13 -10
  21. package/lib/app/app/story/promotion/index.d.ts +1 -0
  22. package/lib/app/app/story/promotion/index.js +34 -30
  23. package/lib/app/app/story/promotion/video.d.ts +1 -0
  24. package/lib/app/app/story/promotion/video.js +34 -31
  25. package/lib/app/app/styles.js +44 -0
  26. package/lib/app/app/useApp.d.ts +0 -14
  27. package/lib/app/app/useApp.js +14 -44
  28. package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +1 -1
  29. package/lib/app/masters/Features/Gamification/Tabs.d.ts +2 -2
  30. package/lib/app/masters/Features/Gamification/Tabs.js +2 -2
  31. package/lib/app/masters/Features/Gamification/index.d.ts +2 -2
  32. package/lib/app/masters/Features/Gamification/index.js +1 -1
  33. package/lib/app/masters/Features/index.d.ts +2 -2
  34. package/lib/app/masters/Navigation/MastersNavigation/index.d.ts +1 -1
  35. package/lib/app/masters/Notifications/Onboarding/index.d.ts +1 -1
  36. package/lib/app/masters/Notifications/Onboarding/index.js +4 -4
  37. package/lib/app/masters/Notifications/index.d.ts +2 -2
  38. package/lib/app/masters/Notifications/index.js +1 -1
  39. package/lib/app/masters/masters.js +23 -23
  40. package/lib/app/masters/styles.d.ts +20 -0
  41. package/lib/app/{styles.js → masters/styles.js} +15 -15
  42. package/lib/app/masters/useSdkResponsive.d.ts +15 -0
  43. package/lib/app/masters/useSdkResponsive.js +45 -0
  44. package/lib/app/masters/useSdkScroll.d.ts +12 -0
  45. package/lib/app/masters/useSdkScroll.js +50 -0
  46. package/lib/app/useSdkResponsive.d.ts +1 -0
  47. package/lib/app/useSdkResponsive.js +27 -29
  48. package/lib/app/useSdkScroll.js +25 -24
  49. package/lib/assets/style.css +1 -1
  50. package/lib/ui/advertisement/banner/index.js +14 -11
  51. package/lib/ui/advertisement/index.d.ts +3 -0
  52. package/lib/ui/advertisement/index.js +31 -10
  53. package/lib/ui/advertisement/notification/index.d.ts +1 -0
  54. package/lib/ui/advertisement/notification/index.js +30 -27
  55. package/lib/ui/advertisement/notification/lower-third/index.d.ts +9 -0
  56. package/lib/ui/advertisement/notification/lower-third/index.js +37 -0
  57. package/lib/ui/advertisement/notification/lower-third/styles.d.ts +16 -0
  58. package/lib/ui/advertisement/notification/lower-third/styles.js +64 -0
  59. package/lib/ui/advertisement/overlay/index.d.ts +2 -0
  60. package/lib/ui/advertisement/overlay/index.js +58 -43
  61. package/lib/ui/advertisement/overlay/styles.d.ts +0 -2
  62. package/lib/ui/advertisement/overlay/styles.js +41 -52
  63. package/lib/ui/close-btn/index.d.ts +7 -0
  64. package/lib/ui/close-btn/index.js +47 -0
  65. package/lib/ui/gamification/detail/header/index.d.ts +2 -1
  66. package/lib/ui/gamification/detail/header/index.js +16 -15
  67. package/lib/ui/gamification/vote/styles.js +1 -1
  68. package/lib/ui/questions/insight/index.js +21 -20
  69. package/lib/ui/theme/masters-theme.js +36 -13
  70. package/lib/ui/theme/theme.js +22 -21
  71. package/lib/ui/timer/index.d.ts +3 -1
  72. package/lib/ui/timer/index.js +54 -32
  73. package/lib/ui/video-player/index.d.ts +2 -0
  74. package/lib/ui/video-player/index.js +62 -51
  75. package/lib/ui/video-player/styles.d.ts +1 -0
  76. package/lib/ui/video-player/styles.js +7 -6
  77. package/package.json +15 -15
  78. /package/lib/app/{styles.d.ts → app/styles.d.ts} +0 -0
@@ -8,6 +8,7 @@ export type StreamLayerSDKAdvertisementProps = {
8
8
  sidebar?: 'left' | 'right';
9
9
  banner?: 'top' | 'bottom';
10
10
  layoutMode?: 'cover' | 'side-by-side';
11
+ skipAutoClose?: boolean;
11
12
  };
12
13
  export declare const StreamLayerSDKAdvertisement: React.FC<StreamLayerSDKAdvertisementProps & {
13
14
  sdk: StreamLayerSDK;
@@ -1,99 +1,110 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { styled as p } from "@linaria/react";
3
- import { useStore as f } from "@nanostores/react";
4
- import { useAnalyticsListener as v } from "../../../hooks/analytics.js";
5
- import { useRef as y } from "react";
6
- import { eventBus as c } from "@streamlayer/sdk-web-interfaces";
7
- import { FeatureType as A, PromotionType as g } from "@streamlayer/sdk-web-types";
8
- import { AdvertisementUI as b } from "../../../ui/advertisement/index.js";
9
- const S = /* @__PURE__ */ p("div")({
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { cx as b } from "@linaria/core";
3
+ import { styled as g } from "@linaria/react";
4
+ import { useStore as A } from "@nanostores/react";
5
+ import { useAnalyticsListener as h } from "../../../hooks/analytics.js";
6
+ import { useRef as L } from "react";
7
+ import { eventBus as v } from "@streamlayer/sdk-web-interfaces";
8
+ import { FeatureType as I, NotificationPromotionMode as w, PromotionType as T } from "@streamlayer/sdk-web-types";
9
+ import { AdvertisementUI as U } from "../../../ui/advertisement/index.js";
10
+ const N = /* @__PURE__ */ g("div")({
10
11
  name: "AdvertisementUIWrap",
11
12
  class: "aa6pjif",
12
13
  propsAsIs: !1
13
- }), h = (n) => {
14
- const t = n.target;
15
- if (t instanceof HTMLAnchorElement && t.target === "_blank") {
16
- const r = t.getAttribute("data-promo-id") || "", i = t.getAttribute("data-promo-type") || g.UNSET;
17
- t.getAttribute("data-analytics") === "button" && c.emit("advertisement", {
14
+ }), W = (r) => {
15
+ const e = r.target;
16
+ if (e instanceof HTMLAnchorElement && e.target === "_blank") {
17
+ const o = e.getAttribute("data-promo-id") || "", i = e.getAttribute("data-promo-type") || T.UNSET;
18
+ e.getAttribute("data-analytics") === "button" && v.emit("advertisement", {
18
19
  action: "buttonSelect",
19
20
  payload: {
20
- advertisementId: r,
21
- advertisementType: i
21
+ id: o,
22
+ type: i
22
23
  }
23
- }), t.getAttribute("data-analytics") === "banner" && c.emit("advertisement", {
24
+ }), e.getAttribute("data-analytics") === "banner" && v.emit("advertisement", {
24
25
  action: "bannerSelect",
25
26
  payload: {
26
- advertisementId: r,
27
- advertisementType: i
27
+ id: o,
28
+ type: i
28
29
  }
29
30
  });
30
31
  }
31
- }, I = ({
32
- gamification: n,
33
- layoutMode: t,
34
- skipTypeCheck: r,
35
- sidebar: i,
36
- banner: o,
37
- notification: m,
32
+ }, E = ({
33
+ gamification: r,
34
+ layoutMode: e,
35
+ skipAutoClose: o,
36
+ skipTypeCheck: i,
37
+ sidebar: n,
38
+ banner: a,
39
+ notification: d,
38
40
  isMobileScreen: l,
39
- persistent: d
41
+ persistent: c
40
42
  }) => {
41
- const a = y(null), e = f(n.advertisement.$store);
42
- v(a, {
43
- enabled: !!e.data,
43
+ var f, p, u;
44
+ const s = L(null), t = A(r.advertisement.$store);
45
+ h(s, {
46
+ enabled: !!t.data,
44
47
  event: "click",
45
- listener: h
48
+ listener: W
46
49
  });
47
- const u = !o && !i;
48
- return e.data === void 0 || !d && e.isViewed ? null : /* @__PURE__ */ s(S, {
49
- ref: a,
50
+ const y = !a && !n;
51
+ if (t.data === void 0 || !c && t.isViewed)
52
+ return null;
53
+ const S = ((u = (p = (f = t == null ? void 0 : t.data) == null ? void 0 : f.notification) == null ? void 0 : p.promotion) == null ? void 0 : u.mode) === w.LOWER_THIRD;
54
+ return /* @__PURE__ */ m(N, {
55
+ ref: s,
50
56
  style: {
51
- height: u ? "auto" : "100%"
57
+ height: y ? "auto" : "100%"
52
58
  },
53
- className: l ? "mobile-view" : "",
54
- children: /* @__PURE__ */ s(b, {
55
- skipTypeCheck: r,
56
- sidebar: i,
57
- banner: o,
58
- advertisement: e.data,
59
- close: e.close,
60
- layoutMode: t,
61
- isNotification: m
59
+ className: b("SL-AdvertisementUIWrap", l && "mobile-view", S && "SL-AdvertisementUIWrap--lower-third"),
60
+ children: /* @__PURE__ */ m(U, {
61
+ skipTypeCheck: i,
62
+ sidebar: n,
63
+ banner: a,
64
+ advertisement: t.data,
65
+ close: t.close,
66
+ markAsViewed: r.advertisement.markAsViewed,
67
+ open: r.advertisement.open,
68
+ layoutMode: e,
69
+ isNotification: d,
70
+ skipAutoClose: o
62
71
  })
63
72
  });
64
- }, D = ({
65
- sdk: n,
66
- sidebar: t,
67
- banner: r,
68
- skipTypeCheck: i,
69
- layoutMode: o,
70
- isMobileScreen: m,
73
+ }, H = ({
74
+ sdk: r,
75
+ sidebar: e,
76
+ banner: o,
77
+ skipAutoClose: i,
78
+ skipTypeCheck: n,
79
+ layoutMode: a,
80
+ isMobileScreen: d,
71
81
  persistent: l,
72
- notification: d
82
+ notification: c
73
83
  }) => {
74
- const a = f(n.featuresList.getStore());
75
- if (t && r)
76
- return /* @__PURE__ */ s("div", {
84
+ const s = A(r.featuresList.getStore());
85
+ if (e && o)
86
+ return /* @__PURE__ */ m("div", {
77
87
  style: {
78
88
  color: "red"
79
89
  },
80
90
  children: "define either sidebar or banner, not both."
81
91
  });
82
- if (!a)
92
+ if (!s)
83
93
  return null;
84
- const e = n.getFeature(A.GAMES);
85
- return e ? /* @__PURE__ */ s(I, {
86
- gamification: e,
87
- sidebar: t,
88
- banner: r,
89
- layoutMode: o,
90
- isMobileScreen: m,
94
+ const t = r.getFeature(I.GAMES);
95
+ return t ? /* @__PURE__ */ m(E, {
96
+ gamification: t,
97
+ sidebar: e,
98
+ banner: o,
99
+ layoutMode: a,
100
+ isMobileScreen: d,
91
101
  persistent: l,
92
- notification: d,
93
- skipTypeCheck: i
102
+ notification: c,
103
+ skipTypeCheck: n,
104
+ skipAutoClose: i
94
105
  }) : null;
95
106
  };
96
107
  export {
97
- S as AdvertisementUIWrap,
98
- D as StreamLayerSDKAdvertisement
108
+ N as AdvertisementUIWrap,
109
+ H as StreamLayerSDKAdvertisement
99
110
  };
@@ -3,5 +3,6 @@ export declare const Question: React.FC<{
3
3
  gamification: Gamification;
4
4
  hideSponsor?: boolean;
5
5
  className?: string;
6
+ skipAutoClose?: boolean;
6
7
  hideHeader?: boolean;
7
8
  }>;
@@ -1,73 +1,75 @@
1
- import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
- import { styled as f } from "@linaria/react";
3
- import { useStore as m } from "@nanostores/react";
4
- import { useAppContext as b } from "../../useAppContext.js";
5
- import { QuestionType as y } from "@streamlayer/sdk-web-types";
6
- import { VoteHeader as V } from "../../../../ui/gamification/detail/header/index.js";
7
- import { Sponsor as d } from "../../../../ui/gamification/detail/sponsor/index.js";
8
- import { Vote as h, VoteSkeleton as x } from "../../../../ui/gamification/vote/index.js";
9
- import { InsightDetails as S } from "../../../../ui/gamification/vote/insight-details/index.js";
10
- import { TwitterDetails as g } from "../../../../ui/gamification/vote/twitter-details/index.js";
11
- const q = /* @__PURE__ */ f("div")({
1
+ import { jsxs as y, jsx as e } from "react/jsx-runtime";
2
+ import { styled as v } from "@linaria/react";
3
+ import { useStore as d } from "@nanostores/react";
4
+ import { useAppContext as T } from "../../useAppContext.js";
5
+ import { QuestionType as V } from "@streamlayer/sdk-web-types";
6
+ import { VoteHeader as h } from "../../../../ui/gamification/detail/header/index.js";
7
+ import { Sponsor as x } from "../../../../ui/gamification/detail/sponsor/index.js";
8
+ import { Vote as S, VoteSkeleton as g } from "../../../../ui/gamification/vote/index.js";
9
+ import { InsightDetails as q } from "../../../../ui/gamification/vote/insight-details/index.js";
10
+ import { TwitterDetails as D } from "../../../../ui/gamification/vote/twitter-details/index.js";
11
+ const w = /* @__PURE__ */ v("div")({
12
12
  name: "QuestionContainer",
13
13
  class: "q14ckf9e",
14
14
  propsAsIs: !1
15
- }), v = ({
15
+ }), A = ({
16
16
  openedQuestion: t
17
17
  }) => {
18
- var s, i;
18
+ var r, s;
19
19
  const {
20
20
  sdk: o
21
- } = b();
22
- return ((s = t == null ? void 0 : t.attributes) == null ? void 0 : s.attributes.case) === "insight" ? /* @__PURE__ */ r(S, {
21
+ } = T();
22
+ return ((r = t == null ? void 0 : t.attributes) == null ? void 0 : r.attributes.case) === "insight" ? /* @__PURE__ */ e(q, {
23
23
  ...t.attributes.attributes.value,
24
24
  controlVideo: o == null ? void 0 : o.controlVideoPlayer
25
- }) : ((i = t == null ? void 0 : t.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ r(g, {
25
+ }) : ((s = t == null ? void 0 : t.attributes) == null ? void 0 : s.attributes.case) === "tweet" ? /* @__PURE__ */ e(D, {
26
26
  ...t.attributes.attributes.value,
27
27
  controlVideo: o == null ? void 0 : o.controlVideoPlayer
28
28
  }) : null;
29
- }, D = ({
29
+ }, C = ({
30
30
  extendedQuestion: t,
31
31
  vote: o,
32
- close: s
32
+ close: r
33
33
  }) => {
34
34
  const {
35
- loading: i,
36
- data: e
35
+ loading: s,
36
+ data: i
37
37
  } = t;
38
- return e ? /* @__PURE__ */ r(h, {
38
+ return i ? /* @__PURE__ */ e(S, {
39
39
  vote: o,
40
- close: s,
41
- openedQuestion: e,
42
- isLoading: !!i
43
- }) : /* @__PURE__ */ r(x, {});
44
- }, E = ({
40
+ close: r,
41
+ openedQuestion: i,
42
+ isLoading: !!s
43
+ }) : /* @__PURE__ */ e(g, {});
44
+ }, z = ({
45
45
  gamification: t,
46
- hideSponsor: o,
46
+ skipAutoClose: o,
47
+ hideSponsor: r,
47
48
  className: s,
48
49
  hideHeader: i
49
50
  }) => {
50
- var u, a, c;
51
- const e = m(t.openedQuestion.$store), n = m(t.openedQuestion.$extendedStore);
52
- if (!e)
51
+ var u, c, m, p, f;
52
+ const n = d(t.openedQuestion.$store), l = d(t.openedQuestion.$extendedStore);
53
+ if (!n)
53
54
  return null;
54
- const l = e.type;
55
- return /* @__PURE__ */ p(q, {
55
+ const a = n.type, b = ((c = (u = l.data) == null ? void 0 : u.options) == null ? void 0 : c.options.case) === "factoid" ? l.data.options.options.value.closeTimer : void 0;
56
+ return /* @__PURE__ */ y(w, {
56
57
  className: s,
57
- children: [!i && /* @__PURE__ */ r(V, {
58
+ children: [!i && /* @__PURE__ */ e(h, {
59
+ closeTimer: o ? void 0 : b,
58
60
  close: t.closeQuestion,
59
- type: ((u = e.attributes) == null ? void 0 : u.type) || y.UNSET
60
- }), l === "question" && /* @__PURE__ */ r(D, {
61
+ type: ((m = n.attributes) == null ? void 0 : m.type) || V.UNSET
62
+ }), a === "question" && /* @__PURE__ */ e(C, {
61
63
  vote: t.submitAnswer,
62
64
  close: t.closeQuestion,
63
- extendedQuestion: n
64
- }), l !== "question" && /* @__PURE__ */ r(v, {
65
- openedQuestion: e
66
- }), !o && /* @__PURE__ */ r(d, {
67
- sponsorLogo: (c = (a = n.data) == null ? void 0 : a.sponsorship) == null ? void 0 : c.logo
65
+ extendedQuestion: l
66
+ }), a !== "question" && /* @__PURE__ */ e(A, {
67
+ openedQuestion: n
68
+ }), !r && /* @__PURE__ */ e(x, {
69
+ sponsorLogo: (f = (p = l.data) == null ? void 0 : p.sponsorship) == null ? void 0 : f.logo
68
70
  })]
69
71
  });
70
72
  };
71
73
  export {
72
- E as Question
74
+ z as Question
73
75
  };
@@ -1,30 +1,31 @@
1
- import { jsxs as h, jsx as e, Fragment as x } from "react/jsx-runtime";
2
- import { useStore as u } from "@nanostores/react";
3
- import { TabsContainer as D, TabsNavContainer as T, SDKWhiteContainer as v, UserSummaryContainer as C, SDKContentContainer as A, LeaderboardContainer as I } from "../../../styles.js";
4
- import { scrollIntoAppView as P } from "../../../useSdkScroll.js";
5
- import { useState as S, useTransition as V, useEffect as E } from "react";
1
+ import { jsxs as h, jsx as e, Fragment as T } from "react/jsx-runtime";
2
+ import { cx as x } from "@linaria/core";
3
+ import { useStore as p } from "@nanostores/react";
4
+ import { TabsContainer as D, TabsNavContainer as v, SDKWhiteContainer as C, UserSummaryContainer as S, SDKContentContainer as A, LeaderboardContainer as I } from "../../styles.js";
5
+ import { scrollIntoAppView as L } from "../../../useSdkScroll.js";
6
+ import { useState as P, useTransition as V, useEffect as E } from "react";
6
7
  import { ActivePages as a, Tabs as K } from "../../../../ui/gamification/tabs/index.js";
7
- import { Leaderboard as L } from "./Leaderboard.js";
8
- import { QuestionsList as F } from "./QuestionsList.js";
9
- import { UserSummary as O } from "./UserSummary.js";
10
- const q = ({ gamification: s, className: f, scrollStore: t, scrollNode: l, appNode: c, style: b, responsiveStore: n }) => {
11
- const { tabsShown: d } = u(t, { keys: ["tabsShown"] }), [i, w] = S(a.HOME), [, y] = V(), { sdkInDesktopView: m, screen: g } = u(n, { keys: ["sdkInDesktopView"] }), k = (r) => {
8
+ import { Leaderboard as F } from "./Leaderboard.js";
9
+ import { QuestionsList as O } from "./QuestionsList.js";
10
+ import { UserSummary as Q } from "./UserSummary.js";
11
+ const G = ({ gamification: r, className: u, scrollStore: t, scrollNode: l, appNode: c, style: b, responsiveStore: n }) => {
12
+ const { tabsShown: m } = p(t, { keys: ["tabsShown"] }), [i, w] = P(a.HOME), [, y] = V(), { sdkInDesktopView: d, screen: g } = p(n, { keys: ["sdkInDesktopView"] }), k = (s) => {
12
13
  y(() => {
13
- var p;
14
- w(r), m === !1 && (((p = c.current) == null ? void 0 : p.getBoundingClientRect().y) || 0) < 0 && P(c, g.size, { behavior: "instant" });
14
+ var f;
15
+ w(s), d === !1 && (((f = c.current) == null ? void 0 : f.getBoundingClientRect().y) || 0) < 0 && L(c, g.size, { behavior: "instant" });
15
16
  });
16
17
  };
17
- E(() => t.subscribe((r) => {
18
- if (r.scrollPosition === 0) {
18
+ E(() => t.subscribe((s) => {
19
+ if (s.scrollPosition === 0) {
19
20
  t.setKey("tabsShown", !0);
20
21
  return;
21
22
  }
22
- n.get().sdkInDesktopView ? t.setKey("tabsShown", r.scrollDirection === "backward") : t.setKey("tabsShown", r.scrollDirection === "forward");
23
+ n.get().sdkInDesktopView ? t.setKey("tabsShown", s.scrollDirection === "backward") : t.setKey("tabsShown", s.scrollDirection === "forward");
23
24
  }), [t, n]);
24
25
  let o = "0px";
25
- return m ? o = d ? "0px" : "calc(8px - var(--header-height) - var(--header-offset))" : o = d ? "calc(var(--header-height) + var(--header-offset) - 2px)" : "0px", /* @__PURE__ */ h(D, { className: f, style: b, children: [
26
+ return d ? o = m ? "0px" : "calc(var(--header-height) - var(--header-offset))" : o = m ? "calc(var(--header-height) + var(--header-offset))" : "0px", /* @__PURE__ */ h(D, { className: x(u, "SL-Tabs"), style: b, children: [
26
27
  /* @__PURE__ */ e(
27
- T,
28
+ v,
28
29
  {
29
30
  style: {
30
31
  top: o
@@ -32,13 +33,13 @@ const q = ({ gamification: s, className: f, scrollStore: t, scrollNode: l, appNo
32
33
  children: /* @__PURE__ */ e(K, { activePage: i, toggleActivePage: k })
33
34
  }
34
35
  ),
35
- i === a.HOME && /* @__PURE__ */ h(x, { children: [
36
- /* @__PURE__ */ e(v, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(O, { userSummary: s.userSummary }) }) }),
37
- /* @__PURE__ */ e(A, { style: { flex: 1 }, children: /* @__PURE__ */ e(F, { openQuestion: s.openQuestion, store: s.feedList.getStore() }) })
36
+ i === a.HOME && /* @__PURE__ */ h(T, { children: [
37
+ /* @__PURE__ */ e(C, { style: { paddingTop: "8px" }, children: /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e(Q, { userSummary: r.userSummary }) }) }),
38
+ /* @__PURE__ */ e(A, { style: { flex: 1 }, children: /* @__PURE__ */ e(O, { openQuestion: r.openQuestion, store: r.feedList.getStore() }) })
38
39
  ] }),
39
- i === a.LEADERBOARD && /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(L, { scrollStore: t, scrollNode: l, gamification: s }) })
40
+ i === a.LEADERBOARD && /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(F, { scrollStore: t, scrollNode: l, gamification: r }) })
40
41
  ] });
41
42
  };
42
43
  export {
43
- q as Tabs
44
+ G as Tabs
44
45
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
2
  import { styled as m } from "@linaria/react";
3
3
  import { useStore as l } from "@nanostores/react";
4
- import { SDKWhiteContainer as h } from "../../../styles.js";
4
+ import { SDKWhiteContainer as h } from "../../styles.js";
5
5
  import { useHideTransition as C } from "../../../../hooks/showIn.js";
6
6
  import { VoteHeader as k } from "../../../../ui/gamification/detail/header/index.js";
7
7
  import { UserStatistics as S } from "../../../../ui/gamification/user-statistics/index.js";
@@ -6,11 +6,13 @@ export declare const QuestionWrap: {
6
6
  gamification: Gamification;
7
7
  hideSponsor?: boolean;
8
8
  className?: string;
9
+ skipAutoClose?: boolean;
9
10
  hideHeader?: boolean;
10
11
  }>;
11
12
  export type StreamLayerSDKInsightProps = {
12
13
  hideHeader?: boolean;
13
14
  persistent?: boolean;
15
+ skipAutoClose?: boolean;
14
16
  };
15
17
  export declare const StreamLayerSDKInsight: React.FC<StreamLayerSDKInsightProps & {
16
18
  sdk: StreamLayerSDK;
@@ -1,23 +1,24 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { styled as Q } from "@linaria/react";
3
- import { useStore as d } from "@nanostores/react";
4
- import { useRef as i, useEffect as l } from "react";
5
- import { FeatureType as m } from "@streamlayer/sdk-web-types";
6
- import { Question as S } from "../Features/Gamification/Question.js";
7
- const y = () => S, I = /* @__PURE__ */ Q(y())({
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { styled as i } from "@linaria/react";
3
+ import { useStore as Q } from "@nanostores/react";
4
+ import { useRef as l, useEffect as m } from "react";
5
+ import { FeatureType as S } from "@streamlayer/sdk-web-types";
6
+ import { Question as y } from "../Features/Gamification/Question.js";
7
+ const I = () => y, b = /* @__PURE__ */ i(I())({
8
8
  name: "QuestionWrap",
9
9
  class: "q10hhsxv",
10
10
  propsAsIs: !0
11
- }), b = ({
11
+ }), v = ({
12
12
  gamification: e,
13
13
  persistent: o,
14
- hideHeader: p,
14
+ skipAutoClose: p,
15
+ hideHeader: f,
15
16
  insightId: r
16
17
  }) => {
17
- const t = i(""), n = d(e.openedQuestion.$store);
18
- return l(() => r ? (!o || e.isOpenedQuestion(r) || (t.current = r, e.getFeedItem(r).then((u) => {
19
- var f;
20
- t.current === r && ((f = u == null ? void 0 : u.attributes) == null ? void 0 : f.attributes.case) === "insight" && e.openQuestion(r, u);
18
+ const t = l(""), n = Q(e.openedQuestion.$store);
19
+ return m(() => r ? (!o || e.isOpenedQuestion(r) || (t.current = r, e.getFeedItem(r).then((u) => {
20
+ var c;
21
+ t.current === r && ((c = u == null ? void 0 : u.attributes) == null ? void 0 : c.attributes.case) === "insight" && e.openQuestion(r, u);
21
22
  })), () => {
22
23
  t.current = "";
23
24
  }) : (e.activeQuestionId.subscribe(({
@@ -26,28 +27,31 @@ const y = () => S, I = /* @__PURE__ */ Q(y())({
26
27
  var u;
27
28
  s && ((u = s.feedItem) == null ? void 0 : u.type) === "insight" && (!o || e.isOpenedQuestion(s.feedItem.id) || (t.current = s.feedItem.id, e.openQuestion(s.feedItem.id, s.feedItem))), !s && t.current && (e.closeQuestion(t.current), t.current = "");
28
29
  }), () => {
29
- }), [e, o, r]), n ? /* @__PURE__ */ c(I, {
30
- hideHeader: p,
30
+ }), [e, o, r]), n ? /* @__PURE__ */ d(b, {
31
+ skipAutoClose: p,
32
+ hideHeader: f,
31
33
  gamification: e,
32
34
  hideSponsor: !0
33
35
  }) : null;
34
- }, h = ({
36
+ }, A = ({
35
37
  sdk: e,
36
38
  persistent: o,
37
- insightId: p,
39
+ skipAutoClose: p,
40
+ insightId: f,
38
41
  hideHeader: r
39
42
  }) => {
40
- if (!d(e.featuresList.getStore()))
43
+ if (!Q(e.featuresList.getStore()))
41
44
  return null;
42
- const n = e.getFeature(m.GAMES);
43
- return n ? /* @__PURE__ */ c(b, {
44
- insightId: p,
45
+ const n = e.getFeature(S.GAMES);
46
+ return n ? /* @__PURE__ */ d(v, {
47
+ insightId: f,
45
48
  persistent: o,
46
49
  hideHeader: r,
47
- gamification: n
50
+ gamification: n,
51
+ skipAutoClose: p
48
52
  }) : null;
49
53
  };
50
54
  export {
51
- I as QuestionWrap,
52
- h as StreamLayerSDKInsight
55
+ b as QuestionWrap,
56
+ A as StreamLayerSDKInsight
53
57
  };
@@ -0,0 +1 @@
1
+ export declare const SDKPillNode: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -0,0 +1,9 @@
1
+ import { styled as s } from "@linaria/react";
2
+ const l = /* @__PURE__ */ s("div")({
3
+ name: "SDKPillNode",
4
+ class: "sze5zj7",
5
+ propsAsIs: !1
6
+ });
7
+ export {
8
+ l as SDKPillNode
9
+ };