@streamlayer/react 1.23.0 → 1.23.2

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 (167) hide show
  1. package/lib/app/pause-ad.d.ts +2 -4
  2. package/lib/app/polymarket.d.ts +7 -0
  3. package/lib/cjs/Question.js +1 -1
  4. package/lib/cjs/advertisement.js +28 -223
  5. package/lib/cjs/analytics.js +1 -1
  6. package/lib/cjs/auth.js +1 -1
  7. package/lib/cjs/bet-pack.js +1 -1
  8. package/lib/cjs/feature.js +1 -0
  9. package/lib/cjs/gamification-feature.js +1 -1
  10. package/lib/cjs/gamification-feature2.js +1 -1
  11. package/lib/cjs/hooks-WfHlJH12.js +1 -0
  12. package/lib/cjs/index-eShKGO10.js +1 -5
  13. package/lib/cjs/index.js +1 -1
  14. package/lib/cjs/index10.js +1 -4
  15. package/lib/cjs/index11.js +3 -1
  16. package/lib/cjs/index12.js +1 -1
  17. package/lib/cjs/index13.js +3 -1
  18. package/lib/cjs/index14.js +1 -1
  19. package/lib/cjs/index15.js +1 -5
  20. package/lib/cjs/index16.js +3 -0
  21. package/lib/cjs/index2.js +1 -1
  22. package/lib/cjs/index3.js +1 -1
  23. package/lib/cjs/index4.js +3 -5
  24. package/lib/cjs/index5.js +1 -1
  25. package/lib/cjs/index6.js +1 -1
  26. package/lib/cjs/index7.js +1 -1
  27. package/lib/cjs/index8.js +1 -1
  28. package/lib/cjs/index9.js +1 -1
  29. package/lib/cjs/insight.js +1 -1
  30. package/lib/cjs/masters.js +1 -1
  31. package/lib/cjs/masters2.js +1 -13
  32. package/lib/cjs/notification.js +1 -1
  33. package/lib/cjs/pause-ad.js +1 -1
  34. package/lib/cjs/points.js +1 -1
  35. package/lib/cjs/polymarket.js +9 -0
  36. package/lib/cjs/sl-types.js +1 -15
  37. package/lib/cjs/storage.js +1 -1
  38. package/lib/cjs/style.css +1 -0
  39. package/lib/cjs/theme.js +1 -17
  40. package/lib/cjs/useStreamLayerApp.js +1 -1
  41. package/lib/cjs/useStreamLayerApp2.js +3 -17
  42. package/lib/cjs/utils.js +1 -47
  43. package/lib/classic/app/pause-ad.d.ts +2 -4
  44. package/lib/classic/app/polymarket.d.ts +7 -0
  45. package/lib/classic/cjs/Question.js +1 -1
  46. package/lib/classic/cjs/advertisement.js +28 -223
  47. package/lib/classic/cjs/analytics.js +1 -1
  48. package/lib/classic/cjs/auth.js +1 -1
  49. package/lib/classic/cjs/bet-pack.js +3 -5
  50. package/lib/classic/cjs/feature.js +1 -0
  51. package/lib/classic/cjs/gamification-feature.js +1 -1
  52. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
  53. package/lib/classic/cjs/index-eShKGO10.js +1 -5
  54. package/lib/classic/cjs/index.js +1 -1
  55. package/lib/classic/cjs/index10.js +1 -1
  56. package/lib/classic/cjs/index11.js +1 -1
  57. package/lib/classic/cjs/index12.js +1 -4
  58. package/lib/classic/cjs/index13.js +3 -0
  59. package/lib/classic/cjs/index2.js +3 -5
  60. package/lib/classic/cjs/index3.js +1 -1
  61. package/lib/classic/cjs/index4.js +1 -1
  62. package/lib/classic/cjs/index5.js +1 -1
  63. package/lib/classic/cjs/index6.js +1 -1
  64. package/lib/classic/cjs/index7.js +1 -1
  65. package/lib/classic/cjs/index8.js +1 -1
  66. package/lib/classic/cjs/index9.js +3 -1
  67. package/lib/classic/cjs/insight.js +1 -1
  68. package/lib/classic/cjs/notification.js +1 -1
  69. package/lib/classic/cjs/notification2.js +1 -1
  70. package/lib/classic/cjs/pause-ad.js +1 -1
  71. package/lib/classic/cjs/points.js +1 -1
  72. package/lib/classic/cjs/polymarket.js +9 -0
  73. package/lib/classic/cjs/sl-types.js +1 -15
  74. package/lib/classic/cjs/style.css +1 -0
  75. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  76. package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
  77. package/lib/classic/cjs/utils.js +1 -47
  78. package/lib/classic/es/Question.js +277 -264
  79. package/lib/classic/es/advertisement.js +34990 -18881
  80. package/lib/classic/es/analytics.js +58 -56
  81. package/lib/classic/es/auth.js +14 -8
  82. package/lib/classic/es/bet-pack.js +2448 -2418
  83. package/lib/classic/es/feature.js +108 -0
  84. package/lib/classic/es/gamification-feature.js +2 -2
  85. package/lib/classic/es/hooks-WfHlJH12.js +98 -0
  86. package/lib/classic/es/index-eShKGO10.js +948 -948
  87. package/lib/classic/es/index.js +13 -13
  88. package/lib/classic/es/index10.js +83 -2295
  89. package/lib/classic/es/index11.js +3095 -179
  90. package/lib/classic/es/index12.js +174 -821
  91. package/lib/classic/es/index13.js +850 -0
  92. package/lib/classic/es/index2.js +2099 -1763
  93. package/lib/classic/es/index3.js +11 -11
  94. package/lib/classic/es/index4.js +127 -127
  95. package/lib/classic/es/index5.js +3 -5
  96. package/lib/classic/es/index6.js +10 -11
  97. package/lib/classic/es/index7.js +6 -62
  98. package/lib/classic/es/index8.js +9 -316
  99. package/lib/classic/es/index9.js +316 -82
  100. package/lib/classic/es/insight.js +58 -53
  101. package/lib/classic/es/notification.js +5 -5
  102. package/lib/classic/es/notification2.js +765 -722
  103. package/lib/classic/es/pause-ad.js +190 -167
  104. package/lib/classic/es/points.js +55 -47
  105. package/lib/classic/es/polymarket.js +6848 -0
  106. package/lib/classic/es/sl-types.js +193 -125
  107. package/lib/classic/es/useStreamLayerApp.js +2 -2
  108. package/lib/classic/es/useStreamLayerApp2.js +9727 -7592
  109. package/lib/classic/es/utils.js +28 -28
  110. package/lib/classic/index.d.ts +1 -0
  111. package/lib/classic/style.css +1 -0
  112. package/lib/dist/cjs/gamification-feature.js +1 -1
  113. package/lib/dist/cjs/index-eShKGO10.js +1 -5
  114. package/lib/dist/cjs/index.js +1 -1
  115. package/lib/dist/cjs/masters.js +3 -77
  116. package/lib/dist/es/gamification-feature.js +2 -2
  117. package/lib/dist/es/index-eShKGO10.js +948 -948
  118. package/lib/dist/es/index.js +7 -8
  119. package/lib/dist/es/masters.js +18212 -14741
  120. package/lib/dist/index.d.ts +29 -8
  121. package/lib/dist/style.css +1 -1
  122. package/lib/es/Question.js +108 -106
  123. package/lib/es/advertisement.js +34990 -18881
  124. package/lib/es/analytics.js +58 -56
  125. package/lib/es/auth.js +14 -8
  126. package/lib/es/bet-pack.js +29 -17
  127. package/lib/es/feature.js +108 -0
  128. package/lib/es/gamification-feature.js +2 -2
  129. package/lib/es/gamification-feature2.js +2 -2
  130. package/lib/es/hooks-WfHlJH12.js +98 -0
  131. package/lib/es/index-eShKGO10.js +948 -948
  132. package/lib/es/index.js +14 -13
  133. package/lib/es/index10.js +258 -816
  134. package/lib/es/index11.js +837 -170
  135. package/lib/es/index12.js +181 -312
  136. package/lib/es/index13.js +316 -82
  137. package/lib/es/index14.js +83 -2350
  138. package/lib/es/index15.js +3069 -1224
  139. package/lib/es/index16.js +1453 -0
  140. package/lib/es/index2.js +1118 -984
  141. package/lib/es/index3.js +3 -62
  142. package/lib/es/index4.js +2424 -2407
  143. package/lib/es/index5.js +11 -11
  144. package/lib/es/index6.js +127 -127
  145. package/lib/es/index7.js +10 -7
  146. package/lib/es/index8.js +5 -9
  147. package/lib/es/index9.js +10 -265
  148. package/lib/es/insight.js +58 -53
  149. package/lib/es/masters.js +6 -5
  150. package/lib/es/masters2.js +696 -558
  151. package/lib/es/notification.js +697 -655
  152. package/lib/es/pause-ad.js +190 -167
  153. package/lib/es/points.js +56 -48
  154. package/lib/es/polymarket.js +6848 -0
  155. package/lib/es/sl-types.js +200 -132
  156. package/lib/es/storage.js +75 -74
  157. package/lib/es/theme.js +177 -31
  158. package/lib/es/useStreamLayerApp.js +2 -2
  159. package/lib/es/useStreamLayerApp2.js +9727 -7592
  160. package/lib/es/utils.js +28 -28
  161. package/lib/index.d.ts +1 -0
  162. package/lib/style.css +1 -1
  163. package/package.json +33 -20
  164. package/lib/cjs/hooks-B0Qttldg.js +0 -1
  165. package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
  166. package/lib/classic/es/hooks-B0Qttldg.js +0 -98
  167. package/lib/es/hooks-B0Qttldg.js +0 -98
@@ -1,136 +1,138 @@
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 "./index9.js";
5
- import { e as X, t as Z } from "./index10.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, 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({
9
9
  sdk: null,
10
- topNavigation: !1
11
- }), so = () => F(to), no = /* @__PURE__ */ p("div")({
10
+ topNavigation: false
11
+ }), p = () => useContext(e);
12
+ const a = /* @__PURE__ */ styled_default("div")({
12
13
  name: "QuestionAdvertisementContainer",
13
14
  class: "qwludgs",
14
- propsAsIs: !1
15
- }), io = /* @__PURE__ */ p("div")({
15
+ propsAsIs: false
16
+ }), d = /* @__PURE__ */ styled_default("div")({
16
17
  name: "QuestionAdvertisementText",
17
18
  class: "qvce6pv",
18
- propsAsIs: !1
19
- }), lo = /* @__PURE__ */ p("div")({
19
+ propsAsIs: false
20
+ }), l = /* @__PURE__ */ styled_default("div")({
20
21
  name: "QuestionAdvertisementImage",
21
22
  class: "qsid7hx",
22
- propsAsIs: !1
23
- }), ao = ({
24
- sponsorLogo: o,
25
- id: l,
26
- hasBanner: r,
27
- setAdShowed: n
23
+ propsAsIs: false
24
+ }), A = ({
25
+ sponsorLogo: r,
26
+ id: i,
27
+ hasBanner: o,
28
+ setAdShowed: t
28
29
  }) => {
29
- const i = Y();
30
- return _(() => (i.current = setTimeout(() => {
31
- n(!0);
30
+ const n = useRef();
31
+ return useEffect(() => (n.current = setTimeout(() => {
32
+ t(true);
32
33
  }, 5e3), () => {
33
- clearTimeout(i.current);
34
- }), [n, l, r]), /* @__PURE__ */ m(no, {
35
- children: [/* @__PURE__ */ t(io, {
34
+ clearTimeout(n.current);
35
+ }), [t, i, o]), /* @__PURE__ */ jsxs(a, {
36
+ children: [/* @__PURE__ */ jsx(d, {
36
37
  children: "PRESENTED BY"
37
- }), /* @__PURE__ */ t(lo, {
38
- children: /* @__PURE__ */ t("img", {
39
- src: o,
38
+ }), /* @__PURE__ */ jsx(l, {
39
+ children: /* @__PURE__ */ jsx("img", {
40
+ src: r,
40
41
  alt: "ad-sponsor-logo"
41
42
  })
42
43
  })]
43
44
  });
44
- }, V = /* @__PURE__ */ p("div")({
45
+ };
46
+ const $ = /* @__PURE__ */ styled_default("div")({
45
47
  name: "QuestionContainer",
46
48
  class: "q14ckf9e",
47
- propsAsIs: !1
48
- }), ro = ({
49
- openedQuestion: o,
50
- muted: l,
51
- webos: r
49
+ propsAsIs: false
50
+ }), tt = ({
51
+ openedQuestion: t,
52
+ muted: n,
53
+ webos: c
52
54
  }) => {
53
- var n, i;
55
+ var a2, i;
54
56
  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
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
66
68
  }) : null;
67
- }, uo = ({
68
- extendedQuestion: o,
69
- vote: l,
70
- close: r,
71
- webos: n
69
+ }, ot = ({
70
+ extendedQuestion: t,
71
+ vote: n,
72
+ close: c,
73
+ webos: r
72
74
  }) => {
73
75
  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
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
93
95
  }) => {
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
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
99
101
  });
100
- if (!a)
102
+ if (!s)
101
103
  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) || ""
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, {
108
+ 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) || ""
110
112
  })]
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)
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,
124
+ 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)
129
131
  })]
130
132
  });
131
133
  };
132
134
  export {
133
- to as e,
134
- Ao as h,
135
- so as p
135
+ e,
136
+ ht as h,
137
+ p
136
138
  };