@streamlayer/react 1.22.3 → 1.23.1

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 (122) 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 +44 -40
  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/hooks-WfHlJH12.js +1 -0
  10. package/lib/cjs/index-eShKGO10.js +5 -0
  11. package/lib/cjs/index.js +1 -1
  12. package/lib/cjs/index10.js +1 -1
  13. package/lib/cjs/index16.js +2 -2
  14. package/lib/cjs/index2.js +1 -1
  15. package/lib/cjs/index3.js +1 -1
  16. package/lib/cjs/index4.js +1 -1
  17. package/lib/cjs/index7.js +1 -5
  18. package/lib/cjs/insight.js +1 -1
  19. package/lib/cjs/masters.js +1 -1
  20. package/lib/cjs/masters2.js +5 -5
  21. package/lib/cjs/notification.js +1 -1
  22. package/lib/cjs/pause-ad.js +1 -1
  23. package/lib/cjs/points.js +1 -1
  24. package/lib/cjs/polymarket.js +19 -0
  25. package/lib/cjs/useStreamLayerApp2.js +17 -17
  26. package/lib/classic/app/pause-ad.d.ts +2 -4
  27. package/lib/classic/app/polymarket.d.ts +7 -0
  28. package/lib/classic/cjs/Question.js +1 -1
  29. package/lib/classic/cjs/advertisement.js +44 -40
  30. package/lib/classic/cjs/analytics.js +1 -1
  31. package/lib/classic/cjs/auth.js +1 -1
  32. package/lib/classic/cjs/bet-pack.js +3 -3
  33. package/lib/classic/cjs/feature.js +1 -0
  34. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
  35. package/lib/classic/cjs/index-eShKGO10.js +5 -0
  36. package/lib/classic/cjs/index.js +1 -1
  37. package/lib/classic/cjs/index10.js +1 -1
  38. package/lib/classic/cjs/index11.js +1 -1
  39. package/lib/classic/cjs/index12.js +1 -1
  40. package/lib/classic/cjs/index13.js +1 -1
  41. package/lib/classic/cjs/index2.js +2 -2
  42. package/lib/classic/cjs/index3.js +1 -1
  43. package/lib/classic/cjs/index4.js +1 -1
  44. package/lib/classic/cjs/index5.js +1 -1
  45. package/lib/classic/cjs/index6.js +1 -5
  46. package/lib/classic/cjs/index9.js +1 -1
  47. package/lib/classic/cjs/insight.js +1 -1
  48. package/lib/classic/cjs/notification.js +1 -1
  49. package/lib/classic/cjs/notification2.js +1 -1
  50. package/lib/classic/cjs/pause-ad.js +1 -1
  51. package/lib/classic/cjs/points.js +1 -1
  52. package/lib/classic/cjs/polymarket.js +19 -0
  53. package/lib/classic/cjs/useStreamLayerApp2.js +17 -17
  54. package/lib/classic/es/Question.js +50 -50
  55. package/lib/classic/es/advertisement.js +15547 -10742
  56. package/lib/classic/es/analytics.js +74 -18
  57. package/lib/classic/es/auth.js +1 -1
  58. package/lib/classic/es/bet-pack.js +19 -18
  59. package/lib/classic/es/feature.js +63 -0
  60. package/lib/classic/es/hooks-WfHlJH12.js +98 -0
  61. package/lib/classic/es/index-eShKGO10.js +3757 -0
  62. package/lib/classic/es/index.js +1 -1
  63. package/lib/classic/es/index10.js +1 -1
  64. package/lib/classic/es/index11.js +767 -755
  65. package/lib/classic/es/index12.js +1 -1
  66. package/lib/classic/es/index13.js +2 -2
  67. package/lib/classic/es/index2.js +125 -125
  68. package/lib/classic/es/index3.js +16 -61
  69. package/lib/classic/es/index4.js +282 -16
  70. package/lib/classic/es/index5.js +4 -283
  71. package/lib/classic/es/index6.js +5 -3758
  72. package/lib/classic/es/index9.js +1 -1
  73. package/lib/classic/es/insight.js +1 -1
  74. package/lib/classic/es/notification.js +1 -1
  75. package/lib/classic/es/notification2.js +476 -451
  76. package/lib/classic/es/pause-ad.js +174 -208
  77. package/lib/classic/es/points.js +16 -15
  78. package/lib/classic/es/polymarket.js +6670 -0
  79. package/lib/classic/es/useStreamLayerApp2.js +5088 -4030
  80. package/lib/dist/cjs/index-eShKGO10.js +5 -0
  81. package/lib/dist/cjs/masters.js +36 -36
  82. package/lib/dist/es/index-eShKGO10.js +3757 -0
  83. package/lib/dist/es/masters.js +9243 -8192
  84. package/lib/dist/index.d.ts +30 -7
  85. package/lib/dist/style.css +1 -1
  86. package/lib/es/Question.js +3 -3
  87. package/lib/es/advertisement.js +15547 -10742
  88. package/lib/es/analytics.js +74 -18
  89. package/lib/es/auth.js +1 -1
  90. package/lib/es/bet-pack.js +1 -1
  91. package/lib/es/feature.js +63 -0
  92. package/lib/es/hooks-WfHlJH12.js +98 -0
  93. package/lib/es/index-eShKGO10.js +3757 -0
  94. package/lib/es/index.js +1 -1
  95. package/lib/es/index10.js +9 -9
  96. package/lib/es/index16.js +2 -2
  97. package/lib/es/index2.js +118 -118
  98. package/lib/es/index3.js +3 -61
  99. package/lib/es/index4.js +1 -1
  100. package/lib/es/index7.js +5 -3758
  101. package/lib/es/insight.js +1 -1
  102. package/lib/es/masters.js +1 -1
  103. package/lib/es/masters2.js +23 -23
  104. package/lib/es/notification.js +450 -425
  105. package/lib/es/pause-ad.js +174 -208
  106. package/lib/es/points.js +5 -4
  107. package/lib/es/polymarket.js +6670 -0
  108. package/lib/es/useStreamLayerApp2.js +5088 -4030
  109. package/lib/style.css +1 -1
  110. package/package.json +27 -17
  111. package/lib/cjs/hooks-B0Qttldg.js +0 -1
  112. package/lib/cjs/index-DSi8Qgfs.js +0 -1
  113. package/lib/cjs/vast-client.min.js +0 -1
  114. package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
  115. package/lib/classic/cjs/index-DSi8Qgfs.js +0 -1
  116. package/lib/classic/cjs/vast-client.min.js +0 -1
  117. package/lib/classic/es/hooks-B0Qttldg.js +0 -98
  118. package/lib/classic/es/index-DSi8Qgfs.js +0 -65
  119. package/lib/classic/es/vast-client.min.js +0 -1060
  120. package/lib/es/hooks-B0Qttldg.js +0 -98
  121. package/lib/es/index-DSi8Qgfs.js +0 -65
  122. package/lib/es/vast-client.min.js +0 -1060
package/lib/es/insight.js CHANGED
@@ -4,7 +4,7 @@ import { u as m, s as h } from "./sl-types.js";
4
4
  import { useRef as f, useEffect as I } from "react";
5
5
  import { h as g } from "./Question.js";
6
6
  import { S } from "./useStreamLayerApp2.js";
7
- import { B as k, z as v, j as Q } from "./hooks-B0Qttldg.js";
7
+ import { B as k, z as v, j as Q } from "./hooks-WfHlJH12.js";
8
8
  const y = () => g, b = /* @__PURE__ */ h(y())({
9
9
  name: "QuestionWrap",
10
10
  class: "q10hhsxv",
package/lib/es/masters.js CHANGED
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import { S as o, M as s } from "./masters2.js";
3
3
  import "react";
4
4
  import "./useStreamLayerApp2.js";
5
- import { B as S } from "./hooks-B0Qttldg.js";
5
+ import { B as S } from "./hooks-WfHlJH12.js";
6
6
  export {
7
7
  o as MastersStreamLayerProvider,
8
8
  s as MastersStreamLayerSDKReact,
@@ -2,21 +2,21 @@ import { jsx as s, jsxs as g, Fragment as D } from "react/jsx-runtime";
2
2
  import { s as c, u as m, A as N, c as A, a as w, R as a2, D as b } from "./sl-types.js";
3
3
  import V from "lodash.throttle";
4
4
  import { useRef as I, useState as _, useEffect as v, createContext as l2, useContext as Y, lazy as d2, useMemo as k, Suspense as c2, forwardRef as p2, useLayoutEffect as C2, useCallback as $, Component as u2 } from "react";
5
- import { i as j } from "./index-DSi8Qgfs.js";
6
- import { k as m2, z as f2, T as X, I as g2, c as h2, t as v2, f as E2, w as z, D as L2, p as S2 } from "./index16.js";
7
- import { b as J, A as e2 } from "./analytics.js";
5
+ import { f as j, b as X, A as J } from "./analytics.js";
6
+ import { k as m2, z as f2, T as e2, I as g2, c as h2, t as v2, f as E2, w as z, D as L2, p as S2 } from "./index16.js";
8
7
  import { c as M, m as F } from "./theme.js";
9
8
  import { n as _2 } from "./index4.js";
10
- import { F as T2, e as N2 } from "./index3.js";
9
+ import { F as T2 } from "./feature.js";
11
10
  import "nanostores";
12
- import { e as I2, t as b2, S as R2, f as P } from "./index11.js";
13
- import { y as A2, d as k2, x as y2, a as w2 } from "./index10.js";
14
- import { Q as D2, S as y } from "./useStreamLayerApp2.js";
11
+ import { e as N2, t as I2, S as b2, f as P } from "./index11.js";
12
+ import { y as R2, d as A2, u as k2, a as y2 } from "./index10.js";
13
+ import { Q as w2, S as y } from "./useStreamLayerApp2.js";
15
14
  import { B as n2 } from "./index6.js";
16
- import { createPortal as x2 } from "react-dom";
15
+ import { createPortal as D2 } from "react-dom";
16
+ import { e as x2 } from "./index3.js";
17
17
  import "./storage.js";
18
18
  import { e as F2 } from "./index12.js";
19
- import { q as O2, j as B2, c as V2, Y as $2 } from "./hooks-B0Qttldg.js";
19
+ import { q as O2, j as B2, i as V2, Y as $2 } from "./hooks-WfHlJH12.js";
20
20
  const H2 = /* @__PURE__ */ c("div")({
21
21
  name: "SDKContainer",
22
22
  class: "s8zgqze",
@@ -124,10 +124,10 @@ const H2 = /* @__PURE__ */ c("div")({
124
124
  const {
125
125
  sdk: i
126
126
  } = U();
127
- return ((e = n == null ? void 0 : n.attributes) == null ? void 0 : e.attributes.case) === "insight" ? /* @__PURE__ */ s(y2, {
127
+ return ((e = n == null ? void 0 : n.attributes) == null ? void 0 : e.attributes.case) === "insight" ? /* @__PURE__ */ s(k2, {
128
128
  ...n.attributes.attributes.value,
129
129
  controlVideo: i == null ? void 0 : i.controlVideoPlayer
130
- }) : ((t = n == null ? void 0 : n.attributes) == null ? void 0 : t.attributes.case) === "tweet" ? /* @__PURE__ */ s(w2, {
130
+ }) : ((t = n == null ? void 0 : n.attributes) == null ? void 0 : t.attributes.case) === "tweet" ? /* @__PURE__ */ s(y2, {
131
131
  ...n.attributes.attributes.value,
132
132
  controlVideo: i == null ? void 0 : i.controlVideoPlayer
133
133
  }) : null;
@@ -140,13 +140,13 @@ const H2 = /* @__PURE__ */ c("div")({
140
140
  loading: i,
141
141
  data: o
142
142
  } = n;
143
- return o ? /* @__PURE__ */ s(I2, {
143
+ return o ? /* @__PURE__ */ s(N2, {
144
144
  vote: e,
145
145
  close: t,
146
146
  openedQuestion: o,
147
147
  isLoading: !!i,
148
148
  mastersApp: !0
149
- }) : /* @__PURE__ */ s(b2, {});
149
+ }) : /* @__PURE__ */ s(I2, {});
150
150
  }, X2 = ({
151
151
  gamification: n
152
152
  }) => {
@@ -156,9 +156,9 @@ const H2 = /* @__PURE__ */ c("div")({
156
156
  return null;
157
157
  const o = t.type;
158
158
  return /* @__PURE__ */ g(W2, {
159
- children: [/* @__PURE__ */ s(A2, {
159
+ children: [/* @__PURE__ */ s(R2, {
160
160
  close: n.closeQuestion,
161
- type: ((e = t.attributes) == null ? void 0 : e.type) || D2.UNSET,
161
+ type: ((e = t.attributes) == null ? void 0 : e.type) || w2.UNSET,
162
162
  mastersApp: !0
163
163
  }), o === "question" && /* @__PURE__ */ s(j2, {
164
164
  vote: n.submitAnswer,
@@ -166,7 +166,7 @@ const H2 = /* @__PURE__ */ c("div")({
166
166
  extendedQuestion: i
167
167
  }), o !== "question" && /* @__PURE__ */ s(Y2, {
168
168
  openedQuestion: t
169
- }), /* @__PURE__ */ s(k2, {
169
+ }), /* @__PURE__ */ s(A2, {
170
170
  mastersApp: !0
171
171
  })]
172
172
  });
@@ -216,8 +216,8 @@ const H2 = /* @__PURE__ */ c("div")({
216
216
  }), {
217
217
  hiding: d,
218
218
  onAnimationEnd: l
219
- } = R2();
220
- return !o.current || !a ? null : /* @__PURE__ */ s(X, {
219
+ } = b2();
220
+ return !o.current || !a ? null : /* @__PURE__ */ s(e2, {
221
221
  container: o,
222
222
  useContainer: typeof t == "boolean" ? !t : !r,
223
223
  staticStyles: typeof t == "boolean" ? i0 : "",
@@ -432,7 +432,7 @@ const H2 = /* @__PURE__ */ c("div")({
432
432
  loading: S,
433
433
  throttled: x
434
434
  } = g2(f);
435
- return C && p && l && o.current && !x ? /* @__PURE__ */ s(X, {
435
+ return C && p && l && o.current && !x ? /* @__PURE__ */ s(e2, {
436
436
  container: o,
437
437
  useContainer: !1,
438
438
  children: /* @__PURE__ */ s(A0, {
@@ -583,7 +583,7 @@ const H2 = /* @__PURE__ */ c("div")({
583
583
  a.get().sdkInDesktopView || d ? f < 50 && e(null) : f > -50 && e(null);
584
584
  }, [f, a, e, d]);
585
585
  const E = a.get().sdkInDesktopView ? t : i;
586
- return !n || !E.current ? null : x2(/* @__PURE__ */ s(B0, {
586
+ return !n || !E.current ? null : D2(/* @__PURE__ */ s(B0, {
587
587
  title: n.type === w.QUESTION_RESOLVED ? "Prediction result" : `New ${((C = F2[(l = n.data) == null ? void 0 : l.questionType]) == null ? void 0 : C.label) || "notification"}`,
588
588
  onClick: () => {
589
589
  var S;
@@ -607,7 +607,7 @@ const H2 = /* @__PURE__ */ c("div")({
607
607
  }) => {
608
608
  const [d] = _(n.getNotificationsStore()), l = m(d), [C, u] = _(null), p = k(() => n.getActiveNotification(), [n, l]);
609
609
  return v(() => {
610
- p && N2.emit("notification", {
610
+ p && x2.emit("notification", {
611
611
  action: "rendered",
612
612
  payload: {
613
613
  questionId: p.data.questionId,
@@ -801,7 +801,7 @@ const q0 = "m1ojpy2l", K0 = ({ children: n, style: e }) => /* @__PURE__ */ s("di
801
801
  }) : null;
802
802
  }, W0 = (n) => {
803
803
  const e = I(null);
804
- return J(e, { enabled: !0, event: "click", listener: e2 }), /* @__PURE__ */ s(_2, { ref: e, ...n });
804
+ return X(e, { enabled: !0, event: "click", listener: J }), /* @__PURE__ */ s(_2, { ref: e, ...n });
805
805
  }, Y0 = ({ sdk: n, useContainer: e }) => {
806
806
  const t = I(null), i = m(n.status), o = m(n.sdkStore.slStreamId), a = I(null), [r] = G0(t), [d, l] = Q2(t, r, e), C = i === "ready" && !!o.data;
807
807
  return v(() => {
@@ -810,7 +810,7 @@ const q0 = "m1ojpy2l", K0 = ({ children: n, style: e }) => /* @__PURE__ */ s("di
810
810
  n.openFeature(y.GAMES);
811
811
  });
812
812
  });
813
- }, [n]), J(t, { enabled: !0, event: "click", listener: e2 }), v(() => {
813
+ }, [n]), X(t, { enabled: !0, event: "click", listener: J }), v(() => {
814
814
  import("./gamification-feature2.js");
815
815
  }, []), /* @__PURE__ */ g(H2, { className: A("SDKContainer", !e && P2), ref: t, children: [
816
816
  /* @__PURE__ */ s(u0, { className: A(F), ref: a }),