@streamlayer/react 1.23.1 → 1.24.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 (159) hide show
  1. package/lib/app/masters.d.ts +0 -1
  2. package/lib/cjs/Question.js +1 -1
  3. package/lib/cjs/advertisement.js +33 -53
  4. package/lib/cjs/analytics.js +1 -1
  5. package/lib/cjs/auth.js +1 -1
  6. package/lib/cjs/bet-pack.js +1 -1
  7. package/lib/cjs/feature.js +1 -1
  8. package/lib/cjs/hooks-n9ax4LRT.js +1 -0
  9. package/lib/cjs/index-ByUNFvMk.js +5 -0
  10. package/lib/cjs/index.js +1 -1
  11. package/lib/cjs/index10.js +1 -1
  12. package/lib/cjs/index11.js +1 -4
  13. package/lib/cjs/index12.js +1 -1
  14. package/lib/cjs/index13.js +1 -1
  15. package/lib/cjs/index14.js +4 -1
  16. package/lib/cjs/index15.js +1 -1
  17. package/lib/cjs/index16.js +2 -2
  18. package/lib/cjs/index2.js +1 -1
  19. package/lib/cjs/index4.js +3 -3
  20. package/lib/cjs/index5.js +1 -1
  21. package/lib/cjs/index6.js +1 -1
  22. package/lib/cjs/index7.js +1 -1
  23. package/lib/cjs/index8.js +1 -1
  24. package/lib/cjs/index9.js +7 -1
  25. package/lib/cjs/insight.js +1 -1
  26. package/lib/cjs/masters.js +1 -1
  27. package/lib/cjs/masters2.js +5 -10
  28. package/lib/cjs/notification.js +1 -1
  29. package/lib/cjs/pause-ad.js +1 -1
  30. package/lib/cjs/points.js +1 -1
  31. package/lib/cjs/polymarket.js +4 -9
  32. package/lib/cjs/sl-types.js +1 -15
  33. package/lib/cjs/storage.js +1 -1
  34. package/lib/cjs/theme.js +1 -17
  35. package/lib/cjs/useStreamLayerApp.js +1 -1
  36. package/lib/cjs/useStreamLayerApp2.js +15 -15
  37. package/lib/cjs/utils.js +8 -8
  38. package/lib/classic/app/masters.d.ts +0 -1
  39. package/lib/classic/cjs/Question.js +1 -1
  40. package/lib/classic/cjs/advertisement.js +33 -53
  41. package/lib/classic/cjs/analytics.js +1 -1
  42. package/lib/classic/cjs/auth.js +1 -1
  43. package/lib/classic/cjs/bet-pack.js +3 -3
  44. package/lib/classic/cjs/feature.js +1 -1
  45. package/lib/classic/cjs/hooks-n9ax4LRT.js +1 -0
  46. package/lib/classic/cjs/index-ByUNFvMk.js +5 -0
  47. package/lib/classic/cjs/index.js +1 -1
  48. package/lib/classic/cjs/index10.js +1 -1
  49. package/lib/classic/cjs/index11.js +1 -1
  50. package/lib/classic/cjs/index12.js +1 -1
  51. package/lib/classic/cjs/index13.js +3 -3
  52. package/lib/classic/cjs/index2.js +2 -2
  53. package/lib/classic/cjs/index3.js +1 -1
  54. package/lib/classic/cjs/index4.js +1 -1
  55. package/lib/classic/cjs/index5.js +1 -1
  56. package/lib/classic/cjs/index6.js +1 -1
  57. package/lib/classic/cjs/index7.js +7 -1
  58. package/lib/classic/cjs/index8.js +1 -1
  59. package/lib/classic/cjs/index9.js +1 -1
  60. package/lib/classic/cjs/insight.js +1 -1
  61. package/lib/classic/cjs/notification.js +1 -1
  62. package/lib/classic/cjs/notification2.js +1 -1
  63. package/lib/classic/cjs/pause-ad.js +1 -1
  64. package/lib/classic/cjs/points.js +1 -1
  65. package/lib/classic/cjs/polymarket.js +4 -9
  66. package/lib/classic/cjs/sl-types.js +1 -15
  67. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  68. package/lib/classic/cjs/useStreamLayerApp2.js +15 -15
  69. package/lib/classic/cjs/utils.js +8 -8
  70. package/lib/classic/es/Question.js +216 -220
  71. package/lib/classic/es/advertisement.js +14665 -15122
  72. package/lib/classic/es/analytics.js +9 -9
  73. package/lib/classic/es/auth.js +1 -1
  74. package/lib/classic/es/bet-pack.js +637 -650
  75. package/lib/classic/es/feature.js +29 -33
  76. package/lib/classic/es/hooks-n9ax4LRT.js +97 -0
  77. package/lib/classic/es/index-ByUNFvMk.js +3775 -0
  78. package/lib/classic/es/index.js +13 -16
  79. package/lib/classic/es/index10.js +2587 -82
  80. package/lib/classic/es/index11.js +306 -2344
  81. package/lib/classic/es/index12.js +103 -101
  82. package/lib/classic/es/index13.js +449 -464
  83. package/lib/classic/es/index2.js +1244 -1268
  84. package/lib/classic/es/index3.js +10 -10
  85. package/lib/classic/es/index4.js +4 -283
  86. package/lib/classic/es/index5.js +4 -5
  87. package/lib/classic/es/index6.js +285 -5
  88. package/lib/classic/es/index7.js +179 -5
  89. package/lib/classic/es/index8.js +5 -9
  90. package/lib/classic/es/index9.js +7 -315
  91. package/lib/classic/es/insight.js +39 -41
  92. package/lib/classic/es/notification.js +3 -3
  93. package/lib/classic/es/notification2.js +513 -528
  94. package/lib/classic/es/pause-ad.js +116 -116
  95. package/lib/classic/es/points.js +33 -34
  96. package/lib/classic/es/polymarket.js +1049 -1102
  97. package/lib/classic/es/sl-types.js +115 -217
  98. package/lib/classic/es/useStreamLayerApp.js +1 -1
  99. package/lib/classic/es/useStreamLayerApp2.js +6485 -6405
  100. package/lib/classic/es/utils.js +6 -6
  101. package/lib/classic/source.css +110 -0
  102. package/lib/dist/cjs/index-ByUNFvMk.js +5 -0
  103. package/lib/dist/cjs/index.js +1 -1
  104. package/lib/dist/cjs/masters.js +34 -42
  105. package/lib/dist/es/index-ByUNFvMk.js +3775 -0
  106. package/lib/dist/es/index.js +7 -11
  107. package/lib/dist/es/masters.js +13506 -12760
  108. package/lib/dist/index.d.ts +5 -5
  109. package/lib/dist/source.css +64 -0
  110. package/lib/es/Question.js +99 -101
  111. package/lib/es/advertisement.js +14665 -15122
  112. package/lib/es/analytics.js +29 -29
  113. package/lib/es/auth.js +1 -1
  114. package/lib/es/bet-pack.js +12 -11
  115. package/lib/es/feature.js +29 -33
  116. package/lib/es/hooks-n9ax4LRT.js +97 -0
  117. package/lib/es/index-ByUNFvMk.js +3775 -0
  118. package/lib/es/index.js +13 -16
  119. package/lib/es/index10.js +7 -263
  120. package/lib/es/index11.js +172 -822
  121. package/lib/es/index12.js +2587 -178
  122. package/lib/es/index13.js +248 -302
  123. package/lib/es/index14.js +815 -82
  124. package/lib/es/index15.js +306 -2344
  125. package/lib/es/index16.js +451 -454
  126. package/lib/es/index2.js +737 -757
  127. package/lib/es/index4.js +626 -639
  128. package/lib/es/index5.js +10 -10
  129. package/lib/es/index6.js +5 -285
  130. package/lib/es/index7.js +7 -5
  131. package/lib/es/index8.js +283 -5
  132. package/lib/es/index9.js +179 -8
  133. package/lib/es/insight.js +39 -41
  134. package/lib/es/masters.js +4 -5
  135. package/lib/es/masters2.js +408 -441
  136. package/lib/es/notification.js +469 -484
  137. package/lib/es/pause-ad.js +116 -116
  138. package/lib/es/points.js +42 -43
  139. package/lib/es/polymarket.js +1049 -1102
  140. package/lib/es/sl-types.js +114 -235
  141. package/lib/es/storage.js +22 -22
  142. package/lib/es/theme.js +3 -44
  143. package/lib/es/useStreamLayerApp.js +1 -1
  144. package/lib/es/useStreamLayerApp2.js +6485 -6405
  145. package/lib/es/utils.js +6 -6
  146. package/lib/source.css +120 -0
  147. package/lib/style.css +1 -1
  148. package/package.json +15 -15
  149. package/lib/cjs/hooks-WfHlJH12.js +0 -1
  150. package/lib/cjs/index-eShKGO10.js +0 -5
  151. package/lib/classic/cjs/hooks-WfHlJH12.js +0 -1
  152. package/lib/classic/cjs/index-eShKGO10.js +0 -5
  153. package/lib/classic/es/hooks-WfHlJH12.js +0 -98
  154. package/lib/classic/es/index-eShKGO10.js +0 -3757
  155. package/lib/dist/cjs/index-eShKGO10.js +0 -5
  156. package/lib/dist/es/index-eShKGO10.js +0 -3757
  157. package/lib/dist/style.css +0 -1
  158. package/lib/es/hooks-WfHlJH12.js +0 -98
  159. package/lib/es/index-eShKGO10.js +0 -3757
@@ -1,136 +1,134 @@
1
- import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
- import { s as p, u as v } from "./sl-types.js";
3
- import { createContext as z, useContext as F, useRef as Y, useEffect as _, useState as G } from "react";
4
- import { y as J, d as K, u as M, a as W } from "./index10.js";
5
- import { e as X, t as Z } from "./index11.js";
6
- import { y as oo } from "./utils.js";
7
- import { Q as L, A as eo } from "./useStreamLayerApp2.js";
8
- const to = z({
1
+ import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
+ import { s as l, u as c } from "./sl-types.js";
3
+ import { createContext as S, useContext as k, useRef as N, useEffect as $, useState as q } from "react";
4
+ import { O as C, d as E, f as L, a as P } from "./index13.js";
5
+ import { Q as V, Z as B } from "./index14.js";
6
+ import { y as D } from "./utils.js";
7
+ import { Q as A, A as R } from "./useStreamLayerApp2.js";
8
+ const j = S({
9
9
  sdk: null,
10
10
  topNavigation: !1
11
- }), so = () => F(to), no = /* @__PURE__ */ p("div")({
11
+ }), O = () => k(j), Z = /* @__PURE__ */ l("div")({
12
12
  name: "QuestionAdvertisementContainer",
13
13
  class: "qwludgs",
14
14
  propsAsIs: !1
15
- }), io = /* @__PURE__ */ p("div")({
15
+ }), _ = /* @__PURE__ */ l("div")({
16
16
  name: "QuestionAdvertisementText",
17
17
  class: "qvce6pv",
18
18
  propsAsIs: !1
19
- }), lo = /* @__PURE__ */ p("div")({
19
+ }), F = /* @__PURE__ */ l("div")({
20
20
  name: "QuestionAdvertisementImage",
21
21
  class: "qsid7hx",
22
22
  propsAsIs: !1
23
- }), ao = ({
24
- sponsorLogo: o,
25
- id: l,
26
- hasBanner: r,
27
- setAdShowed: n
23
+ }), H = ({
24
+ sponsorLogo: e,
25
+ id: a,
26
+ hasBanner: n,
27
+ setAdShowed: t
28
28
  }) => {
29
- const i = Y();
30
- return _(() => (i.current = setTimeout(() => {
31
- n(!0);
29
+ const r = N();
30
+ return $(() => (r.current = setTimeout(() => {
31
+ t(!0);
32
32
  }, 5e3), () => {
33
- clearTimeout(i.current);
34
- }), [n, l, r]), /* @__PURE__ */ m(no, {
35
- children: [/* @__PURE__ */ t(io, {
33
+ clearTimeout(r.current);
34
+ }), [t, a, n]), /* @__PURE__ */ p(Z, {
35
+ children: [/* @__PURE__ */ s(_, {
36
36
  children: "PRESENTED BY"
37
- }), /* @__PURE__ */ t(lo, {
38
- children: /* @__PURE__ */ t("img", {
39
- src: o,
37
+ }), /* @__PURE__ */ s(F, {
38
+ children: /* @__PURE__ */ s("img", {
39
+ src: e,
40
40
  alt: "ad-sponsor-logo"
41
41
  })
42
42
  })]
43
43
  });
44
- }, V = /* @__PURE__ */ p("div")({
44
+ }, Q = /* @__PURE__ */ l("div")({
45
45
  name: "QuestionContainer",
46
46
  class: "q14ckf9e",
47
47
  propsAsIs: !1
48
- }), ro = ({
49
- openedQuestion: o,
50
- muted: l,
51
- webos: r
48
+ }), Y = ({
49
+ openedQuestion: e,
50
+ muted: a,
51
+ webos: n
52
52
  }) => {
53
- var n, i;
54
53
  const {
55
- sdk: s
56
- } = so();
57
- return ((n = o == null ? void 0 : o.attributes) == null ? void 0 : n.attributes.case) === "insight" ? /* @__PURE__ */ t(M, {
58
- ...o.attributes.attributes.value,
59
- muted: l,
60
- controlVideo: s == null ? void 0 : s.controlVideoPlayer,
61
- webos: r
62
- }) : ((i = o == null ? void 0 : o.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ t(W, {
63
- ...o.attributes.attributes.value,
64
- muted: l,
65
- controlVideo: s == null ? void 0 : s.controlVideoPlayer
54
+ sdk: t
55
+ } = O();
56
+ return e?.attributes?.attributes.case === "insight" ? /* @__PURE__ */ s(L, {
57
+ ...e.attributes.attributes.value,
58
+ muted: a,
59
+ controlVideo: t?.controlVideoPlayer,
60
+ webos: n
61
+ }) : e?.attributes?.attributes.case === "tweet" ? /* @__PURE__ */ s(P, {
62
+ ...e.attributes.attributes.value,
63
+ muted: a,
64
+ controlVideo: t?.controlVideoPlayer
66
65
  }) : null;
67
- }, uo = ({
68
- extendedQuestion: o,
69
- vote: l,
70
- close: r,
71
- webos: n
66
+ }, z = ({
67
+ extendedQuestion: e,
68
+ vote: a,
69
+ close: n,
70
+ webos: t
72
71
  }) => {
73
72
  const {
74
- loading: i,
75
- data: s
76
- } = o;
77
- return s ? /* @__PURE__ */ t(X, {
78
- webos: n,
79
- vote: l,
80
- close: r,
81
- openedQuestion: s,
82
- isLoading: !!i
83
- }) : /* @__PURE__ */ t(Z, {});
84
- }, Ao = ({
85
- gamification: o,
86
- sdk: l,
87
- muted: r,
88
- skipAutoClose: n,
89
- hideSponsor: i,
90
- className: s,
91
- hideHeader: B,
92
- webos: c
73
+ loading: r,
74
+ data: d
75
+ } = e;
76
+ return d ? /* @__PURE__ */ s(V, {
77
+ webos: t,
78
+ vote: a,
79
+ close: n,
80
+ openedQuestion: d,
81
+ isLoading: !!r
82
+ }) : /* @__PURE__ */ s(B, {});
83
+ }, oe = ({
84
+ gamification: e,
85
+ sdk: a,
86
+ muted: n,
87
+ skipAutoClose: t,
88
+ hideSponsor: r,
89
+ className: d,
90
+ hideHeader: h,
91
+ webos: u
93
92
  }) => {
94
- var b, g, h, A, f, Q, w, y, T, x, U, I, S, N, $, k;
95
- const a = v(o.openedQuestion.$store), e = v(o.openedQuestion.$extendedStore), [D, R] = G(!1), j = v(l.options), q = ((b = a == null ? void 0 : a.attributes) == null ? void 0 : b.type) === L.FACTOID, d = (g = a == null ? void 0 : a.attributes) == null ? void 0 : g.backgroundImage, u = (h = e.data) == null ? void 0 : h.backgroundImage, P = q ? d == null ? void 0 : d.landscapeUrl : u == null ? void 0 : u.landscapeUrl, H = q ? d == null ? void 0 : d.portraitUrl : u == null ? void 0 : u.portraitUrl, C = oo({
96
- containerId: j.containerId,
97
- landscapeUrl: P,
98
- portraitUrl: H
93
+ const i = c(e.openedQuestion.$store), o = c(e.openedQuestion.$extendedStore), [w, T] = q(!1), y = c(a.options), m = i?.attributes?.type === A.FACTOID, b = i?.attributes?.backgroundImage, f = o.data?.backgroundImage, I = m ? b?.landscapeUrl : f?.landscapeUrl, U = m ? b?.portraitUrl : f?.portraitUrl, g = D({
94
+ containerId: y.containerId,
95
+ landscapeUrl: I,
96
+ portraitUrl: U
99
97
  });
100
- if (!a)
98
+ if (!i)
101
99
  return null;
102
- const E = a.type, O = ((f = (A = e.data) == null ? void 0 : A.options) == null ? void 0 : f.options.case) === "factoid" ? e.data.options.options.value.closeTimer : void 0;
103
- return e.data && e.data.adUnit === eo.STANDART && !D ? /* @__PURE__ */ m(V, {
104
- className: s,
105
- children: [C, /* @__PURE__ */ t(ao, {
106
- id: e.data.id,
107
- hasBanner: !!((w = (Q = e.data.promotion) == null ? void 0 : Q.banner) != null && w.imageUrl),
108
- setAdShowed: R,
109
- sponsorLogo: ((T = (y = e.data.promotion) == null ? void 0 : y.sponsor) == null ? void 0 : T.logo) || ((x = e.data.sponsorship) == null ? void 0 : x.logo) || ""
100
+ const v = i.type, x = o.data?.options?.options.case === "factoid" ? o.data.options.options.value.closeTimer : void 0;
101
+ return o.data && o.data.adUnit === R.STANDART && !w ? /* @__PURE__ */ p(Q, {
102
+ className: d,
103
+ children: [g, /* @__PURE__ */ s(H, {
104
+ id: o.data.id,
105
+ hasBanner: !!o.data.promotion?.banner?.imageUrl,
106
+ setAdShowed: T,
107
+ sponsorLogo: o.data.promotion?.sponsor?.logo || o.data.sponsorship?.logo || ""
110
108
  })]
111
- }) : /* @__PURE__ */ m(V, {
112
- className: s,
113
- children: [C, !B && /* @__PURE__ */ t(J, {
114
- closeTimer: n ? void 0 : O,
115
- close: o.closeQuestion,
116
- type: ((U = a.attributes) == null ? void 0 : U.type) || L.UNSET,
117
- webos: c
118
- }), E === "question" && /* @__PURE__ */ t(uo, {
119
- webos: c,
120
- vote: o.submitAnswer,
121
- close: o.closeQuestion,
122
- extendedQuestion: e
123
- }), E !== "question" && /* @__PURE__ */ t(ro, {
124
- muted: r,
125
- openedQuestion: a,
126
- webos: c
127
- }), !i && /* @__PURE__ */ t(K, {
128
- sponsorLogo: ((N = (S = (I = e.data) == null ? void 0 : I.promotion) == null ? void 0 : S.sponsor) == null ? void 0 : N.logo) || ((k = ($ = e.data) == null ? void 0 : $.sponsorship) == null ? void 0 : k.logo)
109
+ }) : /* @__PURE__ */ p(Q, {
110
+ className: d,
111
+ children: [g, !h && /* @__PURE__ */ s(C, {
112
+ closeTimer: t ? void 0 : x,
113
+ close: e.closeQuestion,
114
+ type: i.attributes?.type || A.UNSET,
115
+ webos: u
116
+ }), v === "question" && /* @__PURE__ */ s(z, {
117
+ webos: u,
118
+ vote: e.submitAnswer,
119
+ close: e.closeQuestion,
120
+ extendedQuestion: o
121
+ }), v !== "question" && /* @__PURE__ */ s(Y, {
122
+ muted: n,
123
+ openedQuestion: i,
124
+ webos: u
125
+ }), !r && /* @__PURE__ */ s(E, {
126
+ sponsorLogo: o.data?.promotion?.sponsor?.logo || o.data?.sponsorship?.logo
129
127
  })]
130
128
  });
131
129
  };
132
130
  export {
133
- to as e,
134
- Ao as h,
135
- so as p
131
+ oe as _,
132
+ j as e,
133
+ O as p
136
134
  };