@streamlayer/react 1.23.2 → 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 (174) 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 +203 -28
  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/gamification-feature.js +1 -1
  9. package/lib/cjs/gamification-feature2.js +1 -1
  10. package/lib/cjs/hooks-n9ax4LRT.js +1 -0
  11. package/lib/cjs/index-ByUNFvMk.js +5 -0
  12. package/lib/cjs/index.js +1 -1
  13. package/lib/cjs/index10.js +1 -1
  14. package/lib/cjs/index11.js +1 -3
  15. package/lib/cjs/index12.js +1 -1
  16. package/lib/cjs/index13.js +1 -3
  17. package/lib/cjs/index14.js +4 -1
  18. package/lib/cjs/index15.js +1 -1
  19. package/lib/cjs/index16.js +5 -3
  20. package/lib/cjs/index2.js +1 -1
  21. package/lib/cjs/index3.js +1 -1
  22. package/lib/cjs/index4.js +5 -3
  23. package/lib/cjs/index5.js +1 -1
  24. package/lib/cjs/index6.js +1 -1
  25. package/lib/cjs/index7.js +1 -1
  26. package/lib/cjs/index8.js +1 -1
  27. package/lib/cjs/index9.js +7 -1
  28. package/lib/cjs/insight.js +1 -1
  29. package/lib/cjs/masters.js +1 -1
  30. package/lib/cjs/masters2.js +8 -1
  31. package/lib/cjs/notification.js +1 -1
  32. package/lib/cjs/pause-ad.js +1 -1
  33. package/lib/cjs/points.js +1 -1
  34. package/lib/cjs/polymarket.js +14 -9
  35. package/lib/cjs/sl-types.js +1 -1
  36. package/lib/cjs/storage.js +1 -1
  37. package/lib/cjs/theme.js +1 -1
  38. package/lib/cjs/useStreamLayerApp.js +1 -1
  39. package/lib/cjs/useStreamLayerApp2.js +17 -3
  40. package/lib/cjs/utils.js +47 -1
  41. package/lib/classic/app/masters.d.ts +0 -1
  42. package/lib/classic/cjs/Question.js +1 -1
  43. package/lib/classic/cjs/advertisement.js +203 -28
  44. package/lib/classic/cjs/analytics.js +1 -1
  45. package/lib/classic/cjs/auth.js +1 -1
  46. package/lib/classic/cjs/bet-pack.js +5 -3
  47. package/lib/classic/cjs/feature.js +1 -1
  48. package/lib/classic/cjs/gamification-feature.js +1 -1
  49. package/lib/classic/cjs/hooks-n9ax4LRT.js +1 -0
  50. package/lib/classic/cjs/index-ByUNFvMk.js +5 -0
  51. package/lib/classic/cjs/index.js +1 -1
  52. package/lib/classic/cjs/index10.js +1 -1
  53. package/lib/classic/cjs/index11.js +1 -1
  54. package/lib/classic/cjs/index12.js +1 -1
  55. package/lib/classic/cjs/index13.js +4 -3
  56. package/lib/classic/cjs/index2.js +5 -3
  57. package/lib/classic/cjs/index3.js +1 -1
  58. package/lib/classic/cjs/index4.js +1 -1
  59. package/lib/classic/cjs/index5.js +1 -1
  60. package/lib/classic/cjs/index6.js +1 -1
  61. package/lib/classic/cjs/index7.js +7 -1
  62. package/lib/classic/cjs/index8.js +1 -1
  63. package/lib/classic/cjs/index9.js +1 -3
  64. package/lib/classic/cjs/insight.js +1 -1
  65. package/lib/classic/cjs/notification.js +1 -1
  66. package/lib/classic/cjs/notification2.js +1 -1
  67. package/lib/classic/cjs/pause-ad.js +1 -1
  68. package/lib/classic/cjs/points.js +1 -1
  69. package/lib/classic/cjs/polymarket.js +14 -9
  70. package/lib/classic/cjs/sl-types.js +1 -1
  71. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  72. package/lib/classic/cjs/useStreamLayerApp2.js +17 -3
  73. package/lib/classic/cjs/utils.js +47 -1
  74. package/lib/classic/es/Question.js +258 -275
  75. package/lib/classic/es/advertisement.js +22128 -38694
  76. package/lib/classic/es/analytics.js +55 -57
  77. package/lib/classic/es/auth.js +8 -14
  78. package/lib/classic/es/bet-pack.js +2413 -2455
  79. package/lib/classic/es/feature.js +46 -95
  80. package/lib/classic/es/gamification-feature.js +2 -2
  81. package/lib/classic/es/hooks-n9ax4LRT.js +97 -0
  82. package/lib/classic/es/index-ByUNFvMk.js +3775 -0
  83. package/lib/classic/es/index.js +13 -16
  84. package/lib/classic/es/index10.js +2587 -83
  85. package/lib/classic/es/index11.js +305 -3087
  86. package/lib/classic/es/index12.js +121 -124
  87. package/lib/classic/es/index13.js +559 -589
  88. package/lib/classic/es/index2.js +1755 -2114
  89. package/lib/classic/es/index3.js +13 -13
  90. package/lib/classic/es/index4.js +4 -283
  91. package/lib/classic/es/index5.js +5 -5
  92. package/lib/classic/es/index6.js +285 -10
  93. package/lib/classic/es/index7.js +179 -6
  94. package/lib/classic/es/index8.js +5 -10
  95. package/lib/classic/es/index9.js +8 -318
  96. package/lib/classic/es/insight.js +54 -61
  97. package/lib/classic/es/notification.js +5 -5
  98. package/lib/classic/es/notification2.js +730 -787
  99. package/lib/classic/es/pause-ad.js +168 -191
  100. package/lib/classic/es/points.js +47 -55
  101. package/lib/classic/es/polymarket.js +4058 -4289
  102. package/lib/classic/es/sl-types.js +128 -298
  103. package/lib/classic/es/useStreamLayerApp.js +2 -2
  104. package/lib/classic/es/useStreamLayerApp2.js +9090 -11121
  105. package/lib/classic/es/utils.js +28 -28
  106. package/lib/classic/index.d.ts +0 -1
  107. package/lib/classic/source.css +110 -0
  108. package/lib/dist/cjs/gamification-feature.js +1 -1
  109. package/lib/dist/cjs/index-ByUNFvMk.js +5 -0
  110. package/lib/dist/cjs/index.js +1 -1
  111. package/lib/dist/cjs/masters.js +69 -3
  112. package/lib/dist/es/gamification-feature.js +2 -2
  113. package/lib/dist/es/index-ByUNFvMk.js +3775 -0
  114. package/lib/dist/es/index.js +7 -10
  115. package/lib/dist/es/masters.js +16944 -19645
  116. package/lib/dist/index.d.ts +7 -17
  117. package/lib/dist/source.css +64 -0
  118. package/lib/es/Question.js +101 -105
  119. package/lib/es/advertisement.js +22128 -38694
  120. package/lib/es/analytics.js +55 -57
  121. package/lib/es/auth.js +8 -14
  122. package/lib/es/bet-pack.js +18 -29
  123. package/lib/es/feature.js +46 -95
  124. package/lib/es/gamification-feature.js +2 -2
  125. package/lib/es/gamification-feature2.js +2 -2
  126. package/lib/es/hooks-n9ax4LRT.js +97 -0
  127. package/lib/es/index-ByUNFvMk.js +3775 -0
  128. package/lib/es/index.js +13 -17
  129. package/lib/es/index10.js +8 -274
  130. package/lib/es/index11.js +172 -837
  131. package/lib/es/index12.js +2587 -183
  132. package/lib/es/index13.js +258 -314
  133. package/lib/es/index14.js +813 -81
  134. package/lib/es/index15.js +305 -3087
  135. package/lib/es/index16.js +803 -1005
  136. package/lib/es/index2.js +980 -1133
  137. package/lib/es/index3.js +4 -3
  138. package/lib/es/index4.js +2401 -2431
  139. package/lib/es/index5.js +13 -13
  140. package/lib/es/index6.js +5 -285
  141. package/lib/es/index7.js +7 -10
  142. package/lib/es/index8.js +283 -5
  143. package/lib/es/index9.js +180 -10
  144. package/lib/es/insight.js +54 -61
  145. package/lib/es/masters.js +5 -7
  146. package/lib/es/masters2.js +538 -708
  147. package/lib/es/notification.js +663 -719
  148. package/lib/es/pause-ad.js +168 -191
  149. package/lib/es/points.js +48 -56
  150. package/lib/es/polymarket.js +4058 -4289
  151. package/lib/es/sl-types.js +128 -317
  152. package/lib/es/storage.js +74 -75
  153. package/lib/es/theme.js +3 -190
  154. package/lib/es/useStreamLayerApp.js +2 -2
  155. package/lib/es/useStreamLayerApp2.js +9090 -11121
  156. package/lib/es/utils.js +28 -28
  157. package/lib/index.d.ts +0 -1
  158. package/lib/source.css +120 -0
  159. package/lib/style.css +1 -1
  160. package/package.json +21 -24
  161. package/lib/cjs/hooks-WfHlJH12.js +0 -1
  162. package/lib/cjs/index-eShKGO10.js +0 -1
  163. package/lib/cjs/style.css +0 -1
  164. package/lib/classic/cjs/hooks-WfHlJH12.js +0 -1
  165. package/lib/classic/cjs/index-eShKGO10.js +0 -1
  166. package/lib/classic/cjs/style.css +0 -1
  167. package/lib/classic/es/hooks-WfHlJH12.js +0 -98
  168. package/lib/classic/es/index-eShKGO10.js +0 -3757
  169. package/lib/classic/style.css +0 -1
  170. package/lib/dist/cjs/index-eShKGO10.js +0 -1
  171. package/lib/dist/es/index-eShKGO10.js +0 -3757
  172. package/lib/dist/style.css +0 -1
  173. package/lib/es/hooks-WfHlJH12.js +0 -98
  174. package/lib/es/index-eShKGO10.js +0 -3757
@@ -1,138 +1,134 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { s as styled_default, u as useStore } from "./sl-types.js";
3
- import { createContext, useContext, useRef, useEffect, useState } from "react";
4
- import { y as y$1, d as d$1, x, a as a$1 } from "./index10.js";
5
- import { e as ee, t as te } from "./index11.js";
6
- import { y } from "./utils.js";
7
- import { Q as QuestionType, A as AdUnit } from "./useStreamLayerApp2.js";
8
- const e = createContext({
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
- topNavigation: false
11
- }), p = () => useContext(e);
12
- const a = /* @__PURE__ */ styled_default("div")({
10
+ topNavigation: !1
11
+ }), O = () => k(j), Z = /* @__PURE__ */ l("div")({
13
12
  name: "QuestionAdvertisementContainer",
14
13
  class: "qwludgs",
15
- propsAsIs: false
16
- }), d = /* @__PURE__ */ styled_default("div")({
14
+ propsAsIs: !1
15
+ }), _ = /* @__PURE__ */ l("div")({
17
16
  name: "QuestionAdvertisementText",
18
17
  class: "qvce6pv",
19
- propsAsIs: false
20
- }), l = /* @__PURE__ */ styled_default("div")({
18
+ propsAsIs: !1
19
+ }), F = /* @__PURE__ */ l("div")({
21
20
  name: "QuestionAdvertisementImage",
22
21
  class: "qsid7hx",
23
- propsAsIs: false
24
- }), A = ({
25
- sponsorLogo: r,
26
- id: i,
27
- hasBanner: o,
22
+ propsAsIs: !1
23
+ }), H = ({
24
+ sponsorLogo: e,
25
+ id: a,
26
+ hasBanner: n,
28
27
  setAdShowed: t
29
28
  }) => {
30
- const n = useRef();
31
- return useEffect(() => (n.current = setTimeout(() => {
32
- t(true);
29
+ const r = N();
30
+ return $(() => (r.current = setTimeout(() => {
31
+ t(!0);
33
32
  }, 5e3), () => {
34
- clearTimeout(n.current);
35
- }), [t, i, o]), /* @__PURE__ */ jsxs(a, {
36
- children: [/* @__PURE__ */ jsx(d, {
33
+ clearTimeout(r.current);
34
+ }), [t, a, n]), /* @__PURE__ */ p(Z, {
35
+ children: [/* @__PURE__ */ s(_, {
37
36
  children: "PRESENTED BY"
38
- }), /* @__PURE__ */ jsx(l, {
39
- children: /* @__PURE__ */ jsx("img", {
40
- src: r,
37
+ }), /* @__PURE__ */ s(F, {
38
+ children: /* @__PURE__ */ s("img", {
39
+ src: e,
41
40
  alt: "ad-sponsor-logo"
42
41
  })
43
42
  })]
44
43
  });
45
- };
46
- const $ = /* @__PURE__ */ styled_default("div")({
44
+ }, Q = /* @__PURE__ */ l("div")({
47
45
  name: "QuestionContainer",
48
46
  class: "q14ckf9e",
49
- propsAsIs: false
50
- }), tt = ({
51
- openedQuestion: t,
52
- muted: n,
53
- webos: c
47
+ propsAsIs: !1
48
+ }), Y = ({
49
+ openedQuestion: e,
50
+ muted: a,
51
+ webos: n
54
52
  }) => {
55
- var a2, i;
56
53
  const {
57
- sdk: r
58
- } = p();
59
- return ((a2 = t == null ? void 0 : t.attributes) == null ? void 0 : a2.attributes.case) === "insight" ? /* @__PURE__ */ jsx(x, {
60
- ...t.attributes.attributes.value,
61
- muted: n,
62
- controlVideo: r == null ? void 0 : r.controlVideoPlayer,
63
- webos: c
64
- }) : ((i = t == null ? void 0 : t.attributes) == null ? void 0 : i.attributes.case) === "tweet" ? /* @__PURE__ */ jsx(a$1, {
65
- ...t.attributes.attributes.value,
66
- muted: n,
67
- controlVideo: r == null ? void 0 : r.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
68
65
  }) : null;
69
- }, ot = ({
70
- extendedQuestion: t,
71
- vote: n,
72
- close: c,
73
- webos: r
66
+ }, z = ({
67
+ extendedQuestion: e,
68
+ vote: a,
69
+ close: n,
70
+ webos: t
74
71
  }) => {
75
72
  const {
76
- loading: a2,
77
- data: i
78
- } = t;
79
- return i ? /* @__PURE__ */ jsx(ee, {
80
- webos: r,
81
- vote: n,
82
- close: c,
83
- openedQuestion: i,
84
- isLoading: !!a2
85
- }) : /* @__PURE__ */ jsx(te, {});
86
- }, ht = ({
87
- gamification: t,
88
- sdk: n,
89
- muted: c,
90
- skipAutoClose: r,
91
- hideSponsor: a2,
92
- className: i,
93
- hideHeader: E,
94
- webos: d2
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
95
92
  }) => {
96
- var A$1, S, T, v, b, y$2, U, V, x2, D, g, q, C, w, j, H;
97
- const s = useStore(t.openedQuestion.$store), o = useStore(t.openedQuestion.$extendedStore), [L, N] = useState(false), O = useStore(n.options), m = ((A$1 = s == null ? void 0 : s.attributes) == null ? void 0 : A$1.type) === QuestionType.FACTOID, l2 = (S = s == null ? void 0 : s.attributes) == null ? void 0 : S.backgroundImage, p2 = (T = o.data) == null ? void 0 : T.backgroundImage, R = m ? l2 == null ? void 0 : l2.landscapeUrl : p2 == null ? void 0 : p2.landscapeUrl, z = m ? l2 == null ? void 0 : l2.portraitUrl : p2 == null ? void 0 : p2.portraitUrl, f = y({
98
- containerId: O.containerId,
99
- landscapeUrl: R,
100
- portraitUrl: z
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
101
97
  });
102
- if (!s)
98
+ if (!i)
103
99
  return null;
104
- const h = s.type, B = ((b = (v = o.data) == null ? void 0 : v.options) == null ? void 0 : b.options.case) === "factoid" ? o.data.options.options.value.closeTimer : void 0;
105
- return o.data && o.data.adUnit === AdUnit.STANDART && !L ? /* @__PURE__ */ jsxs($, {
106
- className: i,
107
- children: [f, /* @__PURE__ */ jsx(A, {
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, {
108
104
  id: o.data.id,
109
- hasBanner: !!((U = (y$2 = o.data.promotion) == null ? void 0 : y$2.banner) != null && U.imageUrl),
110
- setAdShowed: N,
111
- sponsorLogo: ((x2 = (V = o.data.promotion) == null ? void 0 : V.sponsor) == null ? void 0 : x2.logo) || ((D = o.data.sponsorship) == null ? void 0 : D.logo) || ""
105
+ hasBanner: !!o.data.promotion?.banner?.imageUrl,
106
+ setAdShowed: T,
107
+ sponsorLogo: o.data.promotion?.sponsor?.logo || o.data.sponsorship?.logo || ""
112
108
  })]
113
- }) : /* @__PURE__ */ jsxs($, {
114
- className: i,
115
- children: [f, !E && /* @__PURE__ */ jsx(y$1, {
116
- closeTimer: r ? void 0 : B,
117
- close: t.closeQuestion,
118
- type: ((g = s.attributes) == null ? void 0 : g.type) || QuestionType.UNSET,
119
- webos: d2
120
- }), h === "question" && /* @__PURE__ */ jsx(ot, {
121
- webos: d2,
122
- vote: t.submitAnswer,
123
- close: t.closeQuestion,
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,
124
120
  extendedQuestion: o
125
- }), h !== "question" && /* @__PURE__ */ jsx(tt, {
126
- muted: c,
127
- openedQuestion: s,
128
- webos: d2
129
- }), !a2 && /* @__PURE__ */ jsx(d$1, {
130
- sponsorLogo: ((w = (C = (q = o.data) == null ? void 0 : q.promotion) == null ? void 0 : C.sponsor) == null ? void 0 : w.logo) || ((H = (j = o.data) == null ? void 0 : j.sponsorship) == null ? void 0 : H.logo)
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
131
127
  })]
132
128
  });
133
129
  };
134
130
  export {
135
- e,
136
- ht as h,
137
- p
131
+ oe as _,
132
+ j as e,
133
+ O as p
138
134
  };