@streamlayer/react 1.24.5 → 1.24.6

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 (103) hide show
  1. package/lib/cjs/Question.js +1 -1
  2. package/lib/cjs/advertisement.js +26 -26
  3. package/lib/cjs/bet-pack.js +1 -1
  4. package/lib/cjs/feature.js +1 -1
  5. package/lib/cjs/{index-DvqmgCor.js → index-CfSdnrfA.js} +1 -1
  6. package/lib/cjs/index10.js +1 -1
  7. package/lib/cjs/index11.js +1 -1
  8. package/lib/cjs/index12.js +1 -1
  9. package/lib/cjs/index13.js +4 -1
  10. package/lib/cjs/index14.js +1 -4
  11. package/lib/cjs/index15.js +1 -1
  12. package/lib/cjs/index16.js +2 -2
  13. package/lib/cjs/index2.js +1 -1
  14. package/lib/cjs/index4.js +3 -3
  15. package/lib/cjs/index6.js +1 -1
  16. package/lib/cjs/index7.js +1 -1
  17. package/lib/cjs/index9.js +2 -2
  18. package/lib/cjs/insight.js +1 -1
  19. package/lib/cjs/masters2.js +3 -3
  20. package/lib/cjs/notification.js +1 -1
  21. package/lib/cjs/pause-ad.js +1 -1
  22. package/lib/cjs/points.js +1 -1
  23. package/lib/cjs/polymarket.js +1 -1
  24. package/lib/cjs/storage.js +1 -1
  25. package/lib/cjs/useStreamLayerApp2.js +13 -13
  26. package/lib/classic/cjs/Question.js +1 -1
  27. package/lib/classic/cjs/advertisement.js +26 -26
  28. package/lib/classic/cjs/bet-pack.js +3 -3
  29. package/lib/classic/cjs/feature.js +1 -1
  30. package/lib/classic/cjs/{index-DvqmgCor.js → index-CfSdnrfA.js} +1 -1
  31. package/lib/classic/cjs/index10.js +1 -1
  32. package/lib/classic/cjs/index11.js +1 -1
  33. package/lib/classic/cjs/index12.js +1 -1
  34. package/lib/classic/cjs/index13.js +1 -1
  35. package/lib/classic/cjs/index2.js +2 -2
  36. package/lib/classic/cjs/index5.js +1 -1
  37. package/lib/classic/cjs/index7.js +2 -2
  38. package/lib/classic/cjs/index8.js +1 -1
  39. package/lib/classic/cjs/index9.js +1 -1
  40. package/lib/classic/cjs/insight.js +1 -1
  41. package/lib/classic/cjs/notification2.js +1 -1
  42. package/lib/classic/cjs/pause-ad.js +1 -1
  43. package/lib/classic/cjs/points.js +1 -1
  44. package/lib/classic/cjs/polymarket.js +1 -1
  45. package/lib/classic/cjs/useStreamLayerApp2.js +13 -13
  46. package/lib/classic/es/Question.js +313 -198
  47. package/lib/classic/es/advertisement.js +1988 -1955
  48. package/lib/classic/es/bet-pack.js +12 -13
  49. package/lib/classic/es/feature.js +188 -37
  50. package/lib/{es/index-DvqmgCor.js → classic/es/index-CfSdnrfA.js} +1 -1
  51. package/lib/classic/es/index10.js +309 -2580
  52. package/lib/classic/es/index11.js +2580 -305
  53. package/lib/classic/es/index12.js +12 -12
  54. package/lib/classic/es/index13.js +2 -2
  55. package/lib/classic/es/index2.js +129 -121
  56. package/lib/classic/es/index5.js +0 -1
  57. package/lib/classic/es/index7.js +2 -2
  58. package/lib/classic/es/index8.js +1 -1
  59. package/lib/classic/es/index9.js +1 -1
  60. package/lib/classic/es/insight.js +1 -1
  61. package/lib/classic/es/notification2.js +137 -138
  62. package/lib/classic/es/pause-ad.js +124 -149
  63. package/lib/classic/es/points.js +3 -4
  64. package/lib/classic/es/polymarket.js +1 -1
  65. package/lib/classic/es/useStreamLayerApp2.js +2931 -2877
  66. package/lib/classic/source.css +1 -1
  67. package/lib/dist/cjs/{index-DvqmgCor.js → index-CfSdnrfA.js} +1 -1
  68. package/lib/dist/cjs/masters.js +31 -31
  69. package/lib/dist/es/{index-DvqmgCor.js → index-CfSdnrfA.js} +1 -1
  70. package/lib/dist/es/masters.js +7957 -7774
  71. package/lib/dist/index.d.ts +2 -0
  72. package/lib/es/Question.js +66 -65
  73. package/lib/es/advertisement.js +1988 -1955
  74. package/lib/es/bet-pack.js +1 -1
  75. package/lib/es/feature.js +188 -37
  76. package/lib/{classic/es/index-DvqmgCor.js → es/index-CfSdnrfA.js} +1 -1
  77. package/lib/es/index10.js +1 -1
  78. package/lib/es/index11.js +12 -12
  79. package/lib/es/index12.js +366 -2579
  80. package/lib/es/index13.js +789 -234
  81. package/lib/es/index14.js +293 -792
  82. package/lib/es/index15.js +2580 -305
  83. package/lib/es/index16.js +41 -42
  84. package/lib/es/index2.js +279 -271
  85. package/lib/es/index4.js +15 -16
  86. package/lib/es/index6.js +0 -1
  87. package/lib/es/index7.js +1 -1
  88. package/lib/es/index9.js +2 -2
  89. package/lib/es/insight.js +1 -1
  90. package/lib/es/masters2.js +194 -183
  91. package/lib/es/notification.js +22 -23
  92. package/lib/es/pause-ad.js +124 -149
  93. package/lib/es/points.js +20 -21
  94. package/lib/es/polymarket.js +1 -1
  95. package/lib/es/storage.js +1 -1
  96. package/lib/es/useStreamLayerApp2.js +2931 -2877
  97. package/lib/source.css +1 -1
  98. package/lib/style.css +1 -1
  99. package/package.json +72 -53
  100. package/lib/cjs/sl-types.js +0 -1
  101. package/lib/classic/cjs/sl-types.js +0 -1
  102. package/lib/classic/es/sl-types.js +0 -156
  103. package/lib/es/sl-types.js +0 -156
@@ -341,8 +341,10 @@ declare module "../../sdk-web-interfaces/src/store/api" {
341
341
  */
342
342
  export class ApiStore<StoreValue, StoreInstance extends FetcherStore<StoreValue, any> = FetcherStore<StoreValue, any>> extends AbstractStore<StoreInstance> {
343
343
  private readonly atomStore;
344
+ private pendingGetValue;
344
345
  constructor(store: StoreInstance, name: string, atomPicker?: (val: FetcherValue<StoreValue, unknown>, prevVal?: string) => string | undefined);
345
346
  getAtomStore: () => WritableAtom<string | undefined>;
347
+ isEnabled: () => boolean;
346
348
  getValue: () => Promise<StoreValue | undefined>;
347
349
  getValues: () => FetcherValue<StoreValue, any>;
348
350
  setValue: (value?: StoreInstance["value"]) => void;
@@ -1,47 +1,46 @@
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({
1
+ import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
+ import { s as l, u as p } from "./feature.js";
3
+ import { createContext as E, useContext as N, useRef as k, useEffect as q, useState as $ } from "react";
4
+ import { O as C, d as D, f as L, a as R } from "./index12.js";
5
+ import { Q as V, Z as F } from "./index13.js";
6
+ import { y as P } from "./utils.js";
7
+ import { Q as A, A as Q } from "./useStreamLayerApp2.js";
8
+ const j = E({
9
9
  sdk: null,
10
10
  topNavigation: !1
11
- }), O = () => k(j), Z = /* @__PURE__ */ l("div")({
11
+ }), H = () => N(j), O = /* @__PURE__ */ l("div")({
12
12
  name: "QuestionAdvertisementContainer",
13
13
  class: "qwludgs",
14
14
  propsAsIs: !1
15
- }), _ = /* @__PURE__ */ l("div")({
15
+ }), Z = /* @__PURE__ */ l("div")({
16
16
  name: "QuestionAdvertisementText",
17
17
  class: "qvce6pv",
18
18
  propsAsIs: !1
19
- }), F = /* @__PURE__ */ l("div")({
19
+ }), _ = /* @__PURE__ */ l("div")({
20
20
  name: "QuestionAdvertisementImage",
21
21
  class: "qsid7hx",
22
22
  propsAsIs: !1
23
- }), H = ({
23
+ }), B = ({
24
24
  sponsorLogo: e,
25
25
  id: a,
26
- hasBanner: n,
27
- setAdShowed: t
26
+ setAdShowed: n
28
27
  }) => {
29
- const r = N();
30
- return $(() => (r.current = setTimeout(() => {
31
- t(!0);
28
+ const s = k();
29
+ return q(() => (s.current = setTimeout(() => {
30
+ n(!0);
32
31
  }, 5e3), () => {
33
- clearTimeout(r.current);
34
- }), [t, a, n]), /* @__PURE__ */ p(Z, {
35
- children: [/* @__PURE__ */ s(_, {
32
+ clearTimeout(s.current);
33
+ }), [n, a]), /* @__PURE__ */ m(O, {
34
+ children: [/* @__PURE__ */ t(Z, {
36
35
  children: "PRESENTED BY"
37
- }), /* @__PURE__ */ s(F, {
38
- children: /* @__PURE__ */ s("img", {
36
+ }), /* @__PURE__ */ t(_, {
37
+ children: /* @__PURE__ */ t("img", {
39
38
  src: e,
40
39
  alt: "ad-sponsor-logo"
41
40
  })
42
41
  })]
43
42
  });
44
- }, Q = /* @__PURE__ */ l("div")({
43
+ }, h = /* @__PURE__ */ l("div")({
45
44
  name: "QuestionContainer",
46
45
  class: "q14ckf9e",
47
46
  propsAsIs: !1
@@ -51,78 +50,80 @@ const j = S({
51
50
  webos: n
52
51
  }) => {
53
52
  const {
54
- sdk: t
55
- } = O();
56
- return e?.attributes?.attributes.case === "insight" ? /* @__PURE__ */ s(L, {
53
+ sdk: s
54
+ } = H();
55
+ return e?.attributes?.attributes.case === "insight" ? /* @__PURE__ */ t(L, {
57
56
  ...e.attributes.attributes.value,
58
57
  muted: a,
59
- controlVideo: t?.controlVideoPlayer,
60
- webos: n
61
- }) : e?.attributes?.attributes.case === "tweet" ? /* @__PURE__ */ s(P, {
58
+ controlVideo: s?.controlVideoPlayer,
59
+ webos: n,
60
+ questionId: e.id,
61
+ fireEvent: e.fireEvent,
62
+ isEventFired: e.isEventFired
63
+ }) : e?.attributes?.attributes.case === "tweet" ? /* @__PURE__ */ t(R, {
62
64
  ...e.attributes.attributes.value,
63
65
  muted: a,
64
- controlVideo: t?.controlVideoPlayer
66
+ controlVideo: s?.controlVideoPlayer
65
67
  }) : null;
66
68
  }, z = ({
67
69
  extendedQuestion: e,
68
70
  vote: a,
69
71
  close: n,
70
- webos: t
72
+ webos: s
71
73
  }) => {
72
74
  const {
73
- loading: r,
74
- data: d
75
+ loading: u,
76
+ data: r
75
77
  } = e;
76
- return d ? /* @__PURE__ */ s(V, {
77
- webos: t,
78
+ return r ? /* @__PURE__ */ t(V, {
79
+ webos: s,
78
80
  vote: a,
79
81
  close: n,
80
- openedQuestion: d,
81
- isLoading: !!r
82
- }) : /* @__PURE__ */ s(B, {});
82
+ openedQuestion: r,
83
+ isLoading: !!u
84
+ }) : /* @__PURE__ */ t(F, {});
83
85
  }, oe = ({
84
86
  gamification: e,
85
87
  sdk: a,
86
88
  muted: n,
87
- skipAutoClose: t,
88
- hideSponsor: r,
89
- className: d,
90
- hideHeader: h,
91
- webos: u
89
+ skipAutoClose: s,
90
+ hideSponsor: u,
91
+ className: r,
92
+ hideHeader: w,
93
+ webos: c
92
94
  }) => {
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
95
+ const i = p(e.openedQuestion.$store), o = p(e.openedQuestion.$extendedStore), [T, I] = $(!1), U = p(a.options), f = i?.attributes?.type === A.FACTOID, b = i?.attributes?.backgroundImage, d = o.data?.backgroundImage, S = f ? b?.landscapeUrl ?? d?.landscapeUrl : d?.landscapeUrl, x = f ? b?.portraitUrl ?? d?.portraitUrl : d?.portraitUrl, v = P({
96
+ containerId: U.containerId,
97
+ landscapeUrl: S,
98
+ portraitUrl: x
97
99
  });
98
- if (!i)
100
+ if (!i || !o.data)
99
101
  return null;
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, {
102
+ const g = i.type, y = o.data?.options?.options.case === "factoid" ? o.data.options.options.value.closeTimer : void 0;
103
+ return o.data && (o.data.adUnit === Q.STANDART || o.data.promotion?.adUnit === Q.STANDART) && !T ? /* @__PURE__ */ m(h, {
104
+ className: r,
105
+ children: [v, /* @__PURE__ */ t(B, {
104
106
  id: o.data.id,
105
- hasBanner: !!o.data.promotion?.banner?.imageUrl,
106
- setAdShowed: T,
107
+ setAdShowed: I,
107
108
  sponsorLogo: o.data.promotion?.sponsor?.logo || o.data.sponsorship?.logo || ""
108
109
  })]
109
- }) : /* @__PURE__ */ p(Q, {
110
- className: d,
111
- children: [g, !h && /* @__PURE__ */ s(C, {
112
- closeTimer: t ? void 0 : x,
110
+ }) : /* @__PURE__ */ m(h, {
111
+ className: r,
112
+ children: [v, !w && /* @__PURE__ */ t(C, {
113
+ closeTimer: s ? void 0 : y,
113
114
  close: e.closeQuestion,
114
115
  type: i.attributes?.type || A.UNSET,
115
- webos: u
116
- }), v === "question" && /* @__PURE__ */ s(z, {
117
- webos: u,
116
+ webos: c
117
+ }), g === "question" && /* @__PURE__ */ t(z, {
118
+ webos: c,
118
119
  vote: e.submitAnswer,
119
120
  close: e.closeQuestion,
120
121
  extendedQuestion: o
121
- }), v !== "question" && /* @__PURE__ */ s(Y, {
122
+ }), g !== "question" && /* @__PURE__ */ t(Y, {
122
123
  muted: n,
123
124
  openedQuestion: i,
124
- webos: u
125
- }), !r && /* @__PURE__ */ s(E, {
125
+ webos: c
126
+ }), !u && /* @__PURE__ */ t(D, {
126
127
  sponsorLogo: o.data?.promotion?.sponsor?.logo || o.data?.sponsorship?.logo
127
128
  })]
128
129
  });
@@ -130,5 +131,5 @@ const j = S({
130
131
  export {
131
132
  oe as _,
132
133
  j as e,
133
- O as p
134
+ H as p
134
135
  };