@streamlayer/react-ui 0.98.0 → 0.99.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 (114) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/hooks/analytics.js +2 -2
  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.js +30 -45
  8. package/lib/ui/app/Features/Gamification/Question.js +31 -63
  9. package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
  10. package/lib/ui/app/Features/Gamification/Tabs.js +25 -82
  11. package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
  12. package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
  13. package/lib/ui/app/Features/Gamification/index.js +58 -141
  14. package/lib/ui/app/Features/index.js +21 -109
  15. package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
  16. package/lib/ui/app/Navigation/index.js +9 -12
  17. package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
  18. package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
  19. package/lib/ui/app/Notifications/Onboarding/index.js +61 -89
  20. package/lib/ui/app/Notifications/index.js +124 -156
  21. package/lib/ui/app/Notifications/styles.js +10 -15
  22. package/lib/ui/app/Points/index.js +18 -26
  23. package/lib/ui/app/masters.js +74 -195
  24. package/lib/ui/app/useClipboardCopy.js +11 -15
  25. package/lib/ui/app/useMastersApp.js +34 -44
  26. package/lib/ui/app/useSdkResponsive.js +18 -19
  27. package/lib/ui/app/useSdkScroll.js +5 -6
  28. package/lib/ui/button/index.js +3 -4
  29. package/lib/ui/gamification/copyNotification/index.js +5 -7
  30. package/lib/ui/gamification/detail/header/index.js +15 -18
  31. package/lib/ui/gamification/detail/header/styles.js +12 -14
  32. package/lib/ui/gamification/detail/sponsor/index.js +2 -3
  33. package/lib/ui/gamification/insight/index.js +5 -6
  34. package/lib/ui/gamification/insight-list/index.js +3 -6
  35. package/lib/ui/gamification/invite-link/index.js +11 -17
  36. package/lib/ui/gamification/invite-link/styles.js +13 -15
  37. package/lib/ui/gamification/leaderboard/index.js +21 -28
  38. package/lib/ui/gamification/leaderboard/list-item/index.js +19 -22
  39. package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
  40. package/lib/ui/gamification/leaderboard/static.js +19 -23
  41. package/lib/ui/gamification/leaderboard/styles.js +1 -1
  42. package/lib/ui/gamification/onboarding/index.js +51 -73
  43. package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
  44. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
  45. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
  46. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
  47. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
  48. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
  49. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
  50. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
  51. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
  52. package/lib/ui/gamification/onboarding/styles.js +14 -17
  53. package/lib/ui/gamification/points/index.js +9 -15
  54. package/lib/ui/gamification/points/styles.js +12 -14
  55. package/lib/ui/gamification/question/index.js +22 -26
  56. package/lib/ui/gamification/question/insight/index.js +7 -15
  57. package/lib/ui/gamification/question/list/index.js +33 -54
  58. package/lib/ui/gamification/question/notification/index.js +22 -35
  59. package/lib/ui/gamification/question/notification/insight/index.js +12 -17
  60. package/lib/ui/gamification/question/notification/pill/index.js +7 -9
  61. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
  62. package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
  63. package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
  64. package/lib/ui/gamification/question/notification/styles.js +17 -19
  65. package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
  66. package/lib/ui/gamification/question/styles.js +32 -34
  67. package/lib/ui/gamification/question/twitter/index.js +8 -20
  68. package/lib/ui/gamification/question/twitter/styles.js +4 -6
  69. package/lib/ui/gamification/tabs/index.js +6 -7
  70. package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
  71. package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
  72. package/lib/ui/gamification/user-statistics/index.js +2 -6
  73. package/lib/ui/gamification/vote/expired-alert/index.js +8 -10
  74. package/lib/ui/gamification/vote/feedback/index.js +35 -39
  75. package/lib/ui/gamification/vote/feedback/styles.d.ts +1 -0
  76. package/lib/ui/gamification/vote/feedback/styles.js +31 -29
  77. package/lib/ui/gamification/vote/index.js +108 -117
  78. package/lib/ui/gamification/vote/insight-details/index.js +9 -16
  79. package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
  80. package/lib/ui/gamification/vote/vote-option/index.js +33 -34
  81. package/lib/ui/gamification/vote/vote-option/styles.js +24 -26
  82. package/lib/ui/gamification/vote/win-bar/index.js +29 -37
  83. package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
  84. package/lib/ui/login/demo.d.ts +1 -0
  85. package/lib/ui/login/demo.js +5 -17
  86. package/lib/ui/login/index.js +29 -35
  87. package/lib/ui/modal/index.d.ts +0 -1
  88. package/lib/ui/modal/index.js +45 -38
  89. package/lib/ui/navigation/button/Channels.js +5 -8
  90. package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
  91. package/lib/ui/navigation/button/LeaderBoard.js +8 -11
  92. package/lib/ui/navigation/button/index.js +10 -11
  93. package/lib/ui/navigation/masters.js +2 -3
  94. package/lib/ui/questions/insight/index.js +14 -19
  95. package/lib/ui/questions/twitter/account/index.js +13 -15
  96. package/lib/ui/questions/twitter/account/styles.js +14 -16
  97. package/lib/ui/questions/twitter/index.js +31 -38
  98. package/lib/ui/skeleton/index.js +3 -4
  99. package/lib/ui/theme/constants.js +1 -1
  100. package/lib/ui/theme/index.js +3 -5
  101. package/lib/ui/theme/theme.js +16 -14
  102. package/lib/ui/video-player/index.js +44 -38
  103. package/lib/utils/createDemo.js +18 -28
  104. package/lib/utils/debug/components/copyLogs.js +2 -3
  105. package/lib/utils/debug/components/developer.js +20 -24
  106. package/lib/utils/debug/components/eventInput.js +9 -10
  107. package/lib/utils/debug/components/sdkKey.js +9 -10
  108. package/lib/utils/debug/index.js +17 -28
  109. package/lib/utils/debug/storage.js +32 -14
  110. package/lib/utils/decorators/container.js +5 -9
  111. package/lib/utils/storage.js +32 -14
  112. package/package.json +25 -25
  113. /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
  114. /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
@@ -2,14 +2,11 @@ import { jsx as e } from "react/jsx-runtime";
2
2
  import { styled as r } from "@linaria/react";
3
3
  import { SvgIcon as u } from "../../icons/index.js";
4
4
  import { Button as n } from "./index.js";
5
- import "react";
6
- import "@linaria/core";
7
- import "./styles.js";
8
5
  const s = () => u, a = /* @__PURE__ */ r(s())({
9
6
  name: "ButtonIcon",
10
7
  class: "b11des7c",
11
8
  propsAsIs: !0
12
- }), G = "featuredGroups", B = (t) => {
9
+ }), i = "featuredGroups", l = (t) => {
13
10
  var o;
14
11
  return /* @__PURE__ */ e(n, {
15
12
  ...t,
@@ -22,6 +19,6 @@ const s = () => u, a = /* @__PURE__ */ r(s())({
22
19
  });
23
20
  };
24
21
  export {
25
- B as FeaturedGroupsButton,
26
- G as FeaturedGroupsButtonId
22
+ l as FeaturedGroupsButton,
23
+ i as FeaturedGroupsButtonId
27
24
  };
@@ -1,27 +1,24 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { styled as e } from "@linaria/react";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { styled as r } from "@linaria/react";
3
3
  import { SvgIcon as a } from "../../icons/index.js";
4
4
  import { Button as d } from "./index.js";
5
- import "react";
6
- import "@linaria/core";
7
- import "./styles.js";
8
- const n = () => a, m = /* @__PURE__ */ e(n())({
5
+ const n = () => a, c = /* @__PURE__ */ r(n())({
9
6
  name: "ButtonIcon",
10
7
  class: "b180jd7l",
11
8
  propsAsIs: !0
12
- }), u = "leaderboard", I = (o) => {
9
+ }), B = "leaderboard", b = (o) => {
13
10
  var t;
14
- return /* @__PURE__ */ r(d, {
11
+ return /* @__PURE__ */ e(d, {
15
12
  ...o,
16
13
  label: "Leader Board",
17
14
  id: "leaderboard",
18
- icon: /* @__PURE__ */ r(m, {
15
+ icon: /* @__PURE__ */ e(c, {
19
16
  name: "icon-btn-leaderboard",
20
17
  "data-selected": (t = o.active) == null ? void 0 : t.toString()
21
18
  })
22
19
  });
23
20
  };
24
21
  export {
25
- I as LeaderBoardButton,
26
- u as LeaderBoardButtonId
22
+ b as LeaderBoardButton,
23
+ B as LeaderBoardButtonId
27
24
  };
@@ -1,20 +1,19 @@
1
- import { jsx as e, jsxs as l, Fragment as m } from "react/jsx-runtime";
2
- import { cx as d } from "@linaria/core";
3
- import { SButton as s, SelectedButton as u, HoverIconState as p, HoverIconLeaderboardState as h, ButtonIcon as B, ButtonLabel as f } from "./styles.js";
4
- import "@linaria/react";
5
- const I = ({ disabled: n, active: r, onClick: a, label: c, icon: o, id: t }) => /* @__PURE__ */ e(
1
+ import { jsx as t, jsxs as l, Fragment as d } from "react/jsx-runtime";
2
+ import { cx as m } from "@linaria/core";
3
+ import { SButton as s, SelectedButton as u, HoverIconState as h, HoverIconLeaderboardState as p, ButtonIcon as B, ButtonLabel as f } from "./styles.js";
4
+ const I = ({ disabled: n, active: r, onClick: a, label: c, icon: o, id: e }) => /* @__PURE__ */ t(
6
5
  s,
7
6
  {
8
7
  onClick: a,
9
8
  disabled: n,
10
- className: d(
9
+ className: m(
11
10
  r && u,
12
- !r && (t === "channels" || t === "featuredGroups") && p,
13
- !r && t === "leaderboard" && h
11
+ !r && (e === "channels" || e === "featuredGroups") && h,
12
+ !r && e === "leaderboard" && p
14
13
  ),
15
- children: /* @__PURE__ */ l(m, { children: [
16
- o && /* @__PURE__ */ e(B, { children: o }),
17
- /* @__PURE__ */ e(f, { children: c })
14
+ children: /* @__PURE__ */ l(d, { children: [
15
+ o && /* @__PURE__ */ t(B, { children: o }),
16
+ /* @__PURE__ */ t(f, { children: c })
18
17
  ] })
19
18
  }
20
19
  );
@@ -1,7 +1,6 @@
1
1
  import { styled as a } from "@linaria/react";
2
2
  import { Navigation as s } from "./index.js";
3
- import "react/jsx-runtime";
4
- const p = /* @__PURE__ */ a("div")({
3
+ const n = /* @__PURE__ */ a("div")({
5
4
  name: "Navigation",
6
5
  class: "n19lpak2",
7
6
  propsAsIs: !1
@@ -11,6 +10,6 @@ const p = /* @__PURE__ */ a("div")({
11
10
  propsAsIs: !0
12
11
  });
13
12
  export {
14
- p as Navigation,
13
+ n as Navigation,
15
14
  e as NavigationItems
16
15
  };
@@ -1,35 +1,30 @@
1
- import { jsxs as g, jsx as d } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
2
  import { QuestionImages as I } from "@streamlayer/sdk-web-types";
3
3
  import { VideoPlayer as e } from "../../video-player/index.js";
4
4
  import { Container as v, ImageContainer as C, Image as b, Content as x, Title as D, Description as T } from "./styles.js";
5
- import "@linaria/core";
6
- import "react";
7
- import "../../icons/index.js";
8
- import "@linaria/react";
9
- import "../../video-player/styles.js";
10
- const R = ({
5
+ const M = ({
11
6
  instantView: r,
12
- isDetail: m,
13
- notification: o,
14
- controlVideo: c
7
+ isDetail: l,
8
+ notification: d,
9
+ controlVideo: p
15
10
  }) => {
16
- const l = r == null ? void 0 : r.heading, p = r == null ? void 0 : r.body, h = l || p, u = o == null ? void 0 : o.title, y = o == null ? void 0 : o.body;
17
- return /* @__PURE__ */ g(v, { children: [
18
- (r == null ? void 0 : r.video) && /* @__PURE__ */ d(
11
+ const m = r == null ? void 0 : r.heading, h = r == null ? void 0 : r.body, g = m || h, u = d == null ? void 0 : d.title, y = d == null ? void 0 : d.body;
12
+ return /* @__PURE__ */ c(v, { children: [
13
+ (r == null ? void 0 : r.video) && /* @__PURE__ */ o(
19
14
  e,
20
15
  {
21
16
  source: r.video.url,
22
17
  poster: r.video.thumbnailUrl,
23
- controlVideo: c
18
+ controlVideo: p
24
19
  }
25
20
  ),
26
- (r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ d(C, { "data-rounded": r.imageMode === I.ROUNDED, children: /* @__PURE__ */ d(b, { src: r == null ? void 0 : r.image }) }),
27
- /* @__PURE__ */ g(x, { children: [
28
- /* @__PURE__ */ d(D, { children: m && h ? l : u }),
29
- /* @__PURE__ */ d(T, { children: m && h ? p : y })
21
+ (r == null ? void 0 : r.image) && !(r != null && r.video) && /* @__PURE__ */ o(C, { "data-rounded": r.imageMode === I.ROUNDED, children: /* @__PURE__ */ o(b, { src: r == null ? void 0 : r.image }) }),
22
+ /* @__PURE__ */ c(x, { children: [
23
+ /* @__PURE__ */ o(D, { children: l && g ? m : u }),
24
+ /* @__PURE__ */ o(T, { children: l && g ? h : y })
30
25
  ] })
31
26
  ] });
32
27
  };
33
28
  export {
34
- R as InsightContent
29
+ M as InsightContent
35
30
  };
@@ -1,31 +1,29 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
2
  import { SvgIcon as a } from "../../../icons/index.js";
3
3
  import { getTimeUntilNow as l } from "../../../../utils/common.js";
4
- import { Container as p, ImageContainer as s, Image as d, TwitterIcon as f, Details as h, Name as D, UserNameAndDate as I } from "./styles.js";
5
- import "@linaria/react";
6
- import "react";
7
- const C = ({ image: i, name: o, userName: e, verified: c, createdTweet: n }) => {
8
- const m = n && l(n);
9
- return /* @__PURE__ */ r(p, { children: [
10
- i && /* @__PURE__ */ r(s, { children: [
11
- /* @__PURE__ */ t(d, { src: i }),
4
+ import { Container as s, ImageContainer as d, Image as p, TwitterIcon as f, Details as h, Name as D, UserNameAndDate as I } from "./styles.js";
5
+ const v = ({ image: e, name: i, userName: n, verified: m, createdTweet: o }) => {
6
+ const c = o && l(o);
7
+ return /* @__PURE__ */ r(s, { children: [
8
+ e && /* @__PURE__ */ r(d, { children: [
9
+ /* @__PURE__ */ t(p, { src: e }),
12
10
  /* @__PURE__ */ t(f, { name: "twitter" })
13
11
  ] }),
14
12
  /* @__PURE__ */ r(h, { children: [
15
- o && /* @__PURE__ */ r(D, { children: [
16
- o,
13
+ i && /* @__PURE__ */ r(D, { children: [
14
+ i,
17
15
  " ",
18
- c && /* @__PURE__ */ t(a, { name: "icon-twitter-verified" })
16
+ m && /* @__PURE__ */ t(a, { name: "icon-twitter-verified" })
19
17
  ] }),
20
- e && /* @__PURE__ */ r(I, { children: [
18
+ n && /* @__PURE__ */ r(I, { children: [
21
19
  "@",
22
- e,
20
+ n,
23
21
  " ",
24
- m && `・ ${m}`
22
+ c && `・ ${c}`
25
23
  ] })
26
24
  ] })
27
25
  ] });
28
26
  };
29
27
  export {
30
- C as Account
28
+ v as Account
31
29
  };
@@ -1,42 +1,40 @@
1
1
  import { styled as s } from "@linaria/react";
2
2
  import { SvgIcon as e } from "../../../icons/index.js";
3
- import "react/jsx-runtime";
4
- import "react";
5
- const m = /* @__PURE__ */ s("div")({
3
+ const t = /* @__PURE__ */ s("div")({
6
4
  name: "Container",
7
5
  class: "cjq447q",
8
6
  propsAsIs: !1
9
- }), c = /* @__PURE__ */ s("div")({
7
+ }), r = /* @__PURE__ */ s("div")({
10
8
  name: "ImageContainer",
11
9
  class: "i14egogb",
12
10
  propsAsIs: !1
13
- }), i = /* @__PURE__ */ s("img")({
11
+ }), c = /* @__PURE__ */ s("img")({
14
12
  name: "Image",
15
13
  class: "i2g9g4l",
16
14
  propsAsIs: !1
17
- }), a = () => e, p = /* @__PURE__ */ s(a())({
15
+ }), a = () => e, m = /* @__PURE__ */ s(a())({
18
16
  name: "TwitterIcon",
19
17
  class: "t1c454nm",
20
18
  propsAsIs: !0
21
- }), l = /* @__PURE__ */ s("div")({
19
+ }), i = /* @__PURE__ */ s("div")({
22
20
  name: "Details",
23
21
  class: "d11nigc3",
24
22
  propsAsIs: !1
25
- }), I = /* @__PURE__ */ s("div")({
23
+ }), p = /* @__PURE__ */ s("div")({
26
24
  name: "Name",
27
25
  class: "nrxa4k8",
28
26
  propsAsIs: !1
29
- }), g = /* @__PURE__ */ s("div")({
27
+ }), l = /* @__PURE__ */ s("div")({
30
28
  name: "UserNameAndDate",
31
29
  class: "u1p051g3",
32
30
  propsAsIs: !1
33
31
  });
34
32
  export {
35
- m as Container,
36
- l as Details,
37
- i as Image,
38
- c as ImageContainer,
39
- I as Name,
40
- p as TwitterIcon,
41
- g as UserNameAndDate
33
+ t as Container,
34
+ i as Details,
35
+ c as Image,
36
+ r as ImageContainer,
37
+ p as Name,
38
+ m as TwitterIcon,
39
+ l as UserNameAndDate
42
40
  };
@@ -1,33 +1,26 @@
1
- import { jsxs as t, jsx as n, Fragment as j } from "react/jsx-runtime";
1
+ import { jsxs as c, jsx as n, Fragment as j } from "react/jsx-runtime";
2
2
  import { VideoPlayer as k } from "../../video-player/index.js";
3
3
  import { Account as x } from "./account/index.js";
4
- import { Container as B, Details as E, Body as N, ImagesContainer as c, ImageFullSize as i, ImageHalfSize as e, ImagesBlock as m } from "./styles.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 "../../../utils/common.js";
11
- import "./account/styles.js";
12
- const R = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), S = (o) => o == null ? void 0 : o.replace(R, ""), K = ({
13
- image: o,
4
+ import { Container as B, Details as E, Body as N, ImagesContainer as i, ImageFullSize as l, ImageHalfSize as p, ImagesBlock as a } from "./styles.js";
5
+ const R = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), S = (t) => t == null ? void 0 : t.replace(R, ""), V = ({
6
+ image: t,
14
7
  body: C,
15
8
  account: z,
16
9
  accountVerified: F,
17
10
  tweet: s,
18
- isDetail: a,
11
+ isDetail: d,
19
12
  controlVideo: T
20
13
  }) => {
21
- var h, g, H, U, f, u, v, I, y;
22
- const r = (g = (h = s == null ? void 0 : s.meta) == null ? void 0 : h.extendedEntities) == null ? void 0 : g.media, l = r == null ? void 0 : r.find(({ type: p }) => p === "photo"), d = (u = (f = (U = (H = r == null ? void 0 : r[0]) == null ? void 0 : H.videoInfo) == null ? void 0 : U.variants) == null ? void 0 : f.find(
23
- ({ contentType: p }) => p === "video/mp4"
14
+ var m, g, H, U, f, u, v, I, y;
15
+ const r = (g = (m = s == null ? void 0 : s.meta) == null ? void 0 : m.extendedEntities) == null ? void 0 : g.media, o = r == null ? void 0 : r.find(({ type: e }) => e === "photo"), h = (u = (f = (U = (H = r == null ? void 0 : r[0]) == null ? void 0 : H.videoInfo) == null ? void 0 : U.variants) == null ? void 0 : f.find(
16
+ ({ contentType: e }) => e === "video/mp4"
24
17
  )) == null ? void 0 : u.url;
25
- return /* @__PURE__ */ t(B, { children: [
26
- /* @__PURE__ */ t(E, { children: [
18
+ return /* @__PURE__ */ c(B, { children: [
19
+ /* @__PURE__ */ c(E, { children: [
27
20
  /* @__PURE__ */ n(
28
21
  x,
29
22
  {
30
- image: o,
23
+ image: t,
31
24
  name: (v = s == null ? void 0 : s.meta) == null ? void 0 : v.accountName,
32
25
  userName: z,
33
26
  verified: F,
@@ -35,35 +28,35 @@ const R = new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"), S = (o) => o == null ?
35
28
  }
36
29
  ),
37
30
  /* @__PURE__ */ n(N, { children: S(C) }),
38
- !a && l && /* @__PURE__ */ n(c, { children: /* @__PURE__ */ n(i, { src: r == null ? void 0 : r[0].mediaUrlHttps }) }),
39
- a && l && /* @__PURE__ */ t(j, { children: [
40
- (r == null ? void 0 : r.length) === 1 && /* @__PURE__ */ n(c, { children: /* @__PURE__ */ n(i, { src: r[0].mediaUrlHttps }) }),
41
- (r == null ? void 0 : r.length) === 2 && /* @__PURE__ */ t(c, { children: [
42
- /* @__PURE__ */ n(e, { src: r[0].mediaUrlHttps }),
43
- /* @__PURE__ */ n(e, { src: r[1].mediaUrlHttps })
31
+ !d && o && /* @__PURE__ */ n(i, { children: /* @__PURE__ */ n(l, { src: r == null ? void 0 : r[0].mediaUrlHttps }) }),
32
+ d && o && /* @__PURE__ */ c(j, { children: [
33
+ (r == null ? void 0 : r.length) === 1 && /* @__PURE__ */ n(i, { children: /* @__PURE__ */ n(l, { src: r[0].mediaUrlHttps }) }),
34
+ (r == null ? void 0 : r.length) === 2 && /* @__PURE__ */ c(i, { children: [
35
+ /* @__PURE__ */ n(p, { src: r[0].mediaUrlHttps }),
36
+ /* @__PURE__ */ n(p, { src: r[1].mediaUrlHttps })
44
37
  ] }),
45
- (r == null ? void 0 : r.length) === 3 && /* @__PURE__ */ t(c, { children: [
46
- /* @__PURE__ */ n(e, { src: r[0].mediaUrlHttps }),
47
- /* @__PURE__ */ t(m, { children: [
48
- /* @__PURE__ */ n(i, { src: r[1].mediaUrlHttps }),
49
- /* @__PURE__ */ n(i, { src: r[2].mediaUrlHttps })
38
+ (r == null ? void 0 : r.length) === 3 && /* @__PURE__ */ c(i, { children: [
39
+ /* @__PURE__ */ n(p, { src: r[0].mediaUrlHttps }),
40
+ /* @__PURE__ */ c(a, { children: [
41
+ /* @__PURE__ */ n(l, { src: r[1].mediaUrlHttps }),
42
+ /* @__PURE__ */ n(l, { src: r[2].mediaUrlHttps })
50
43
  ] })
51
44
  ] }),
52
- (r == null ? void 0 : r.length) === 4 && /* @__PURE__ */ t(c, { children: [
53
- /* @__PURE__ */ t(m, { children: [
54
- /* @__PURE__ */ n(i, { src: r[0].mediaUrlHttps }),
55
- /* @__PURE__ */ n(i, { src: r[1].mediaUrlHttps })
45
+ (r == null ? void 0 : r.length) === 4 && /* @__PURE__ */ c(i, { children: [
46
+ /* @__PURE__ */ c(a, { children: [
47
+ /* @__PURE__ */ n(l, { src: r[0].mediaUrlHttps }),
48
+ /* @__PURE__ */ n(l, { src: r[1].mediaUrlHttps })
56
49
  ] }),
57
- /* @__PURE__ */ t(m, { children: [
58
- /* @__PURE__ */ n(i, { src: r[2].mediaUrlHttps }),
59
- /* @__PURE__ */ n(i, { src: r[3].mediaUrlHttps })
50
+ /* @__PURE__ */ c(a, { children: [
51
+ /* @__PURE__ */ n(l, { src: r[2].mediaUrlHttps }),
52
+ /* @__PURE__ */ n(l, { src: r[3].mediaUrlHttps })
60
53
  ] })
61
54
  ] })
62
55
  ] })
63
56
  ] }),
64
- !l && (((I = r == null ? void 0 : r[0]) == null ? void 0 : I.type) === "video" || ((y = r == null ? void 0 : r[0]) == null ? void 0 : y.type) === "animated_gif") && d && /* @__PURE__ */ n(k, { source: d, poster: r[0].mediaUrlHttps, controlVideo: T })
57
+ !o && (((I = r == null ? void 0 : r[0]) == null ? void 0 : I.type) === "video" || ((y = r == null ? void 0 : r[0]) == null ? void 0 : y.type) === "animated_gif") && h && /* @__PURE__ */ n(k, { source: h, poster: r[0].mediaUrlHttps, controlVideo: T })
65
58
  ] });
66
59
  };
67
60
  export {
68
- K as TwitterContent
61
+ V as TwitterContent
69
62
  };
@@ -1,7 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { Container as m } from "./styles.js";
3
- import "@linaria/react";
4
- const f = ({ children: r, style: o, loading: t }) => t ? /* @__PURE__ */ e(m, { style: o, children: r }) : r;
2
+ import { Container as n } from "./styles.js";
3
+ const i = ({ children: r, style: o, loading: t }) => t ? /* @__PURE__ */ e(n, { style: o, children: r }) : r;
5
4
  export {
6
- f as Skeleton
5
+ i as Skeleton
7
6
  };
@@ -59,7 +59,7 @@ const N = {
59
59
  sm: 576,
60
60
  md: 768,
61
61
  lg: 992,
62
- xl: 1215,
62
+ xl: 1200,
63
63
  xxl: 1440
64
64
  }, G = {
65
65
  landscape: "landscape",
@@ -1,8 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { theme as o } from "./theme.js";
3
- import "./breakpoints.js";
4
- import "./constants.js";
5
- const p = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: o, style: m, children: r }) });
2
+ import { theme as a } from "./theme.js";
3
+ const i = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a, style: m, children: r }) });
6
4
  export {
7
- p as StreamLayerThemeProvider
5
+ i as StreamLayerThemeProvider
8
6
  };
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { breakpoints as i } from "./breakpoints.js";
3
- import { colors as l, FONT as t } from "./constants.js";
4
- const s = `
5
- ${l}
2
+ import { breakpoints as n } from "./breakpoints.js";
3
+ import { colors as h, FONT as t } from "./constants.js";
4
+ const l = `
5
+ ${h}
6
6
  --font-family: ${t.REGULAR};
7
7
  --font-regular: ${t.REGULAR};
8
8
  --font-color: ${t.COLOR};
@@ -11,6 +11,7 @@ const s = `
11
11
 
12
12
  --header-offset: 0px;
13
13
  --header-height: 68px;
14
+ --watch-live-header: 0px;
14
15
  --animation-duration: 0.5s;
15
16
  --animation-function: ease;
16
17
  --container-padding: 16px;
@@ -19,14 +20,15 @@ const s = `
19
20
  --max-width: 600px;
20
21
  --max-notifications-width: 400px;
21
22
 
22
- ${i.down("xl")`
23
+ ${n.down("xl")`
23
24
  --header-offset: 56px;
25
+ --watch-live-header: 46px;
24
26
  `}
25
27
 
26
- ${i.intermediate("xl", "lg")`
28
+ ${n.intermediate("xl", "lg")`
27
29
  --header-offset: 76px;
28
30
  `}
29
- `, m = "StreamLayerCSSReset", p = "ttkj0ah", x = () => /* @__PURE__ */ e("table", {
31
+ `, p = "StreamLayerCSSReset", m = "ttkj0ah", x = () => /* @__PURE__ */ e("table", {
30
32
  children: /* @__PURE__ */ r("table", {
31
33
  children: [/* @__PURE__ */ e("thead", {
32
34
  children: /* @__PURE__ */ r("tr", {
@@ -37,22 +39,22 @@ const s = `
37
39
  })]
38
40
  })
39
41
  }), /* @__PURE__ */ e("tbody", {
40
- children: s.split(";").map((o) => {
41
- const n = o.trim(), [a, d] = n.split(":");
42
+ children: l.split(";").map((a) => {
43
+ const i = a.trim(), [o, d] = i.split(":");
42
44
  return /* @__PURE__ */ r("tr", {
43
45
  children: [/* @__PURE__ */ e("td", {
44
- children: a
46
+ children: o
45
47
  }), /* @__PURE__ */ e("td", {
46
48
  children: d
47
49
  })]
48
- }, n);
50
+ }, i);
49
51
  })
50
52
  })]
51
53
  })
52
54
  });
53
55
  export {
54
56
  x as ThemeVariables,
55
- m as resetCss,
56
- p as theme,
57
- s as themeStr
57
+ p as resetCss,
58
+ m as theme,
59
+ l as themeStr
58
60
  };
@@ -1,71 +1,77 @@
1
- import { jsxs as w, jsx as n } from "react/jsx-runtime";
2
- import { cx as x } from "@linaria/core";
3
- import { useRef as C, useState as p, useCallback as g, useEffect as v } from "react";
4
- import { SvgIcon as d } from "../icons/index.js";
5
- import { Container as E, ToggleIconPause as S, Player as T, Poster as L, Control as j } from "./styles.js";
6
- import "@linaria/react";
7
- const k = (s, o) => {
1
+ import { jsxs as x, jsx as n } from "react/jsx-runtime";
2
+ import { cx as C } from "@linaria/core";
3
+ import { useRef as E, useState as g, useCallback as v, useEffect as d } from "react";
4
+ import { eventBus as S } from "@streamlayer/sdk-web-interfaces";
5
+ import { SvgIcon as y } from "../icons/index.js";
6
+ import { Container as T, ToggleIconPause as L, Player as j, Poster as k, Control as H } from "./styles.js";
7
+ const M = (s, a) => {
8
8
  for (const t of s)
9
- t.isIntersecting || t.target instanceof HTMLVideoElement && !t.target.paused && (o.unobserve(t.target), t.target.pause());
10
- }, y = new IntersectionObserver(k, { threshold: 0.5 }), f = /* @__PURE__ */ new Set(), H = (s) => {
11
- y.observe(s), f.add(s);
12
- }, u = (s) => {
13
- y.unobserve(s), f.delete(s);
14
- }, M = () => {
9
+ t.isIntersecting || t.target instanceof HTMLVideoElement && !t.target.paused && (a.unobserve(t.target), t.target.pause());
10
+ }, P = new IntersectionObserver(M, { threshold: 0.5 }), f = /* @__PURE__ */ new Set(), A = (s) => {
11
+ P.observe(s), f.add(s);
12
+ }, o = (s) => {
13
+ P.unobserve(s), f.delete(s);
14
+ }, B = () => {
15
15
  for (const s of f)
16
- s instanceof HTMLVideoElement && !s.paused && (s.pause(), u(s));
17
- }, D = ({ poster: s, source: o, controlVideo: t }) => {
18
- const e = C(null), [a, c] = p(!1), [m, b] = p(!0), P = g(() => {
16
+ s instanceof HTMLVideoElement && !s.paused && (s.pause(), o(s));
17
+ }, J = ({ poster: s, source: a, controlVideo: t }) => {
18
+ const e = E(null), [u, c] = g(!1), [m, p] = g(!0), h = v(() => {
19
19
  t == null || t({ muted: !0 });
20
- }, [t]), i = g(() => {
20
+ }, [t]), i = v(() => {
21
21
  t == null || t({ muted: !1 });
22
- }, [t]), h = () => {
23
- const r = e == null ? void 0 : e.current;
24
- if (r)
25
- if (a)
26
- r.pause(), e.current && u(e.current);
22
+ }, [t]), I = (r) => {
23
+ r.stopPropagation();
24
+ const b = e == null ? void 0 : e.current;
25
+ if (b) {
26
+ if (u)
27
+ b.pause(), e.current && o(e.current);
27
28
  else {
28
29
  const l = e == null ? void 0 : e.current;
29
30
  if (!l)
30
31
  return;
31
- M(), H(l), l.play().catch((O) => console.log(O)), b(!1);
32
+ B(), A(l), l.play().catch((w) => console.log(w)), p(!1);
32
33
  }
33
- }, I = () => {
34
+ S.emit("interactions", {
35
+ action: "tap",
36
+ payload: {}
37
+ });
38
+ }
39
+ }, O = () => {
34
40
  var r;
35
- e.current && u(e.current), (r = e == null ? void 0 : e.current) == null || r.load(), b(!0);
41
+ e.current && o(e.current), (r = e == null ? void 0 : e.current) == null || r.load(), p(!0);
36
42
  };
37
- return v(() => {
38
- e.current && u(e.current);
39
- }, []), v(() => {
43
+ return d(() => {
44
+ e.current && o(e.current);
45
+ }, []), d(() => {
40
46
  const r = e == null ? void 0 : e.current;
41
47
  return () => {
42
- r && (r.paused || i(), u(r));
48
+ r && (r.paused || i(), o(r));
43
49
  };
44
- }, [i]), /* @__PURE__ */ w(E, { onClick: h, className: x(a && S), children: [
50
+ }, [i]), /* @__PURE__ */ x(T, { onClick: I, className: C(u && L), children: [
45
51
  /* @__PURE__ */ n(
46
- T,
52
+ j,
47
53
  {
48
54
  ref: e,
49
- src: o,
55
+ src: a,
50
56
  onPlay: () => {
51
- P(), c(!0);
57
+ h(), c(!0);
52
58
  },
53
59
  onPause: () => {
54
60
  i(), c(!1);
55
61
  },
56
62
  onEnded: () => {
57
- i(), c(!1), I();
63
+ i(), c(!1), O();
58
64
  },
59
65
  style: { visibility: m ? "hidden" : "visible" },
60
66
  controls: !1,
61
67
  playsInline: !0
62
68
  }
63
69
  ),
64
- /* @__PURE__ */ n(L, { src: s, style: { visibility: m ? "visible" : "hidden" } }),
65
- /* @__PURE__ */ n(j, { children: a ? /* @__PURE__ */ n(d, { name: "icon-pause" }) : /* @__PURE__ */ n(d, { name: "icon-play" }) })
70
+ /* @__PURE__ */ n(k, { src: s, style: { visibility: m ? "visible" : "hidden" } }),
71
+ /* @__PURE__ */ n(H, { children: u ? /* @__PURE__ */ n(y, { name: "icon-pause" }) : /* @__PURE__ */ n(y, { name: "icon-play" }) })
66
72
  ] });
67
73
  };
68
74
  export {
69
- D as VideoPlayer,
70
- M as pauseAllVideos
75
+ J as VideoPlayer,
76
+ B as pauseAllVideos
71
77
  };