@streamlayer/react 1.23.0 → 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 +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 -0
  8. package/lib/cjs/hooks-WfHlJH12.js +1 -0
  9. package/lib/cjs/index.js +1 -1
  10. package/lib/cjs/index10.js +1 -4
  11. package/lib/cjs/index11.js +4 -1
  12. package/lib/cjs/index12.js +1 -1
  13. package/lib/cjs/index13.js +1 -1
  14. package/lib/cjs/index14.js +1 -1
  15. package/lib/cjs/index15.js +1 -5
  16. package/lib/cjs/index16.js +5 -0
  17. package/lib/cjs/index2.js +1 -1
  18. package/lib/cjs/index3.js +1 -1
  19. package/lib/cjs/index4.js +1 -1
  20. package/lib/cjs/index7.js +1 -1
  21. package/lib/cjs/index8.js +1 -1
  22. package/lib/cjs/index9.js +1 -1
  23. package/lib/cjs/insight.js +1 -1
  24. package/lib/cjs/masters.js +1 -1
  25. package/lib/cjs/masters2.js +4 -4
  26. package/lib/cjs/notification.js +1 -1
  27. package/lib/cjs/pause-ad.js +1 -1
  28. package/lib/cjs/points.js +1 -1
  29. package/lib/cjs/polymarket.js +19 -0
  30. package/lib/cjs/storage.js +1 -1
  31. package/lib/cjs/useStreamLayerApp2.js +5 -5
  32. package/lib/classic/app/pause-ad.d.ts +2 -4
  33. package/lib/classic/app/polymarket.d.ts +7 -0
  34. package/lib/classic/cjs/Question.js +1 -1
  35. package/lib/classic/cjs/advertisement.js +1 -1
  36. package/lib/classic/cjs/analytics.js +1 -1
  37. package/lib/classic/cjs/auth.js +1 -1
  38. package/lib/classic/cjs/bet-pack.js +3 -3
  39. package/lib/classic/cjs/feature.js +1 -0
  40. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
  41. package/lib/classic/cjs/index.js +1 -1
  42. package/lib/classic/cjs/index10.js +1 -1
  43. package/lib/classic/cjs/index11.js +1 -1
  44. package/lib/classic/cjs/index12.js +1 -4
  45. package/lib/classic/cjs/index13.js +4 -0
  46. package/lib/classic/cjs/index2.js +2 -2
  47. package/lib/classic/cjs/index5.js +1 -1
  48. package/lib/classic/cjs/index6.js +1 -1
  49. package/lib/classic/cjs/index7.js +1 -1
  50. package/lib/classic/cjs/index8.js +1 -1
  51. package/lib/classic/cjs/index9.js +1 -1
  52. package/lib/classic/cjs/insight.js +1 -1
  53. package/lib/classic/cjs/notification.js +1 -1
  54. package/lib/classic/cjs/notification2.js +1 -1
  55. package/lib/classic/cjs/pause-ad.js +1 -1
  56. package/lib/classic/cjs/points.js +1 -1
  57. package/lib/classic/cjs/polymarket.js +19 -0
  58. package/lib/classic/cjs/useStreamLayerApp2.js +5 -5
  59. package/lib/classic/es/Question.js +4 -4
  60. package/lib/classic/es/advertisement.js +6 -6
  61. package/lib/classic/es/analytics.js +1 -1
  62. package/lib/classic/es/auth.js +1 -1
  63. package/lib/classic/es/bet-pack.js +18 -17
  64. package/lib/classic/es/feature.js +63 -0
  65. package/lib/classic/es/hooks-WfHlJH12.js +98 -0
  66. package/lib/classic/es/index.js +2 -2
  67. package/lib/classic/es/index10.js +82 -2295
  68. package/lib/classic/es/index11.js +2351 -179
  69. package/lib/classic/es/index12.js +170 -822
  70. package/lib/classic/es/index13.js +835 -0
  71. package/lib/classic/es/index2.js +127 -126
  72. package/lib/classic/es/index5.js +4 -5
  73. package/lib/classic/es/index6.js +5 -11
  74. package/lib/classic/es/index7.js +5 -62
  75. package/lib/classic/es/index8.js +7 -315
  76. package/lib/classic/es/index9.js +313 -81
  77. package/lib/classic/es/insight.js +2 -2
  78. package/lib/classic/es/notification.js +2 -2
  79. package/lib/classic/es/notification2.js +14 -13
  80. package/lib/classic/es/pause-ad.js +20 -20
  81. package/lib/classic/es/points.js +15 -14
  82. package/lib/classic/es/polymarket.js +6670 -0
  83. package/lib/classic/es/useStreamLayerApp2.js +143 -119
  84. package/lib/dist/cjs/masters.js +23 -23
  85. package/lib/dist/es/masters.js +189 -165
  86. package/lib/dist/index.d.ts +17 -6
  87. package/lib/dist/style.css +1 -1
  88. package/lib/es/Question.js +2 -2
  89. package/lib/es/advertisement.js +5 -5
  90. package/lib/es/auth.js +1 -1
  91. package/lib/es/bet-pack.js +1 -1
  92. package/lib/es/feature.js +63 -0
  93. package/lib/es/hooks-WfHlJH12.js +98 -0
  94. package/lib/es/index.js +2 -2
  95. package/lib/es/index10.js +236 -804
  96. package/lib/es/index11.js +822 -170
  97. package/lib/es/index12.js +166 -302
  98. package/lib/es/index13.js +313 -81
  99. package/lib/es/index14.js +82 -2350
  100. package/lib/es/index15.js +2330 -1229
  101. package/lib/es/index16.js +1254 -0
  102. package/lib/es/index2.js +118 -117
  103. package/lib/es/index3.js +3 -61
  104. package/lib/es/index4.js +3 -3
  105. package/lib/es/index7.js +5 -7
  106. package/lib/es/index8.js +5 -9
  107. package/lib/es/index9.js +7 -263
  108. package/lib/es/insight.js +2 -2
  109. package/lib/es/masters.js +1 -1
  110. package/lib/es/masters2.js +25 -24
  111. package/lib/es/notification.js +8 -7
  112. package/lib/es/pause-ad.js +20 -20
  113. package/lib/es/points.js +6 -5
  114. package/lib/es/polymarket.js +6670 -0
  115. package/lib/es/storage.js +2 -2
  116. package/lib/es/useStreamLayerApp2.js +143 -119
  117. package/lib/style.css +1 -1
  118. package/package.json +24 -14
  119. package/lib/cjs/hooks-B0Qttldg.js +0 -1
  120. package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
  121. package/lib/classic/es/hooks-B0Qttldg.js +0 -98
  122. package/lib/es/hooks-B0Qttldg.js +0 -98
@@ -1,11 +1,11 @@
1
1
  import { jsx as s, jsxs as w } from "react/jsx-runtime";
2
- import { h as N } from "./index7.js";
3
- import { s as d, u as q, c as V } from "./sl-types.js";
4
- import { d as j } from "./index14.js";
5
- import { useState as B, useRef as b, useCallback as _, useEffect as c, Component as z } from "react";
6
- import { e as E } from "./index3.js";
7
- import { B as K, z as O } from "./hooks-B0Qttldg.js";
8
- const G = /* @__PURE__ */ d("div")({
2
+ import { h as N } from "./index8.js";
3
+ import { s as d, u as j, c as q } from "./sl-types.js";
4
+ import { d as V } from "./index15.js";
5
+ import { useState as B, useRef as E, useCallback as _, useEffect as c, Component as z } from "react";
6
+ import { e as C } from "./index3.js";
7
+ import { B as K, z as G } from "./hooks-WfHlJH12.js";
8
+ const O = /* @__PURE__ */ d("div")({
9
9
  name: "PauseAdOverlay",
10
10
  class: "pw9gih8",
11
11
  propsAsIs: !1
@@ -54,7 +54,7 @@ const G = /* @__PURE__ */ d("div")({
54
54
  isDesktop: n,
55
55
  content: e
56
56
  }) => (c(() => {
57
- e.imageSrc && e.id && E.emit("exposedPauseAd", {
57
+ e.imageSrc && e.id && C.emit("exposedPauseAd", {
58
58
  action: "rendered",
59
59
  payload: {
60
60
  id: e.id,
@@ -65,7 +65,7 @@ const G = /* @__PURE__ */ d("div")({
65
65
  "a",
66
66
  {
67
67
  onClick: () => {
68
- E.emit("exposedPauseAd", {
68
+ C.emit("exposedPauseAd", {
69
69
  action: "navigated",
70
70
  payload: {
71
71
  id: e.id,
@@ -79,7 +79,7 @@ const G = /* @__PURE__ */ d("div")({
79
79
  children: /* @__PURE__ */ s(F, { src: e.imageSrc })
80
80
  }
81
81
  ) : null), te = ({ isClosing: i, content: n, externalPauseAdStore: e, title: I, caption: v, onPlay: u, onClose: a, vastUrl: t, options: f, isDesktop: l }) => {
82
- const C = (f == null ? void 0 : f.showPauseButton) ?? !0, { ref: p, focusSelf: g } = j.useFocusable({
82
+ const b = (f == null ? void 0 : f.showPauseButton) ?? !0, { ref: p, focusSelf: g } = V.useFocusable({
83
83
  focusKey: "sl-pause-ad-play",
84
84
  onEnterRelease: u,
85
85
  isFocusBoundary: !0,
@@ -101,12 +101,12 @@ const G = /* @__PURE__ */ d("div")({
101
101
  }
102
102
  };
103
103
  return window.addEventListener("keydown", T, { capture: !0 }), () => window.removeEventListener("keydown", T, { capture: !0 });
104
- }, [a]), /* @__PURE__ */ s(G, { className: V("SL_PauseAdOverlay", i && "pause-ad-closing"), children: /* @__PURE__ */ w(W, { children: [
104
+ }, [a]), /* @__PURE__ */ s(O, { className: q("SL_PauseAd", i && "pause-ad-closing"), children: /* @__PURE__ */ w(W, { children: [
105
105
  /* @__PURE__ */ w(X, { children: [
106
106
  /* @__PURE__ */ s(H, { children: I }),
107
107
  /* @__PURE__ */ s(J, { children: v })
108
108
  ] }),
109
- C && /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(
109
+ b && /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(
110
110
  Y,
111
111
  {
112
112
  ref: p,
@@ -121,17 +121,17 @@ const G = /* @__PURE__ */ d("div")({
121
121
  ] }) })
122
122
  ] }) });
123
123
  }, se = ({ showPauseAd: i, vastUrls: n, title: e, caption: I, sdk: v, onClose: u, onRender: a, options: t, isDesktop: f }) => {
124
- const l = (t == null ? void 0 : t.pauseAdDelay) ?? 0, C = (t == null ? void 0 : t.pauseAdRefetchInterval) ?? 1e3 * 60 * 50, [p, g] = B(!1), [T, A] = B(!1), o = b(), h = n == null ? void 0 : n[0].url, P = b(h), y = b(""), S = b("");
124
+ const l = (t == null ? void 0 : t.pauseAdDelay) ?? 0, b = (t == null ? void 0 : t.pauseAdRefetchInterval) ?? 1e3 * 60 * 50, [p, g] = B(!1), [T, A] = B(!1), o = E(), h = n == null ? void 0 : n[0].url, P = E(h), y = E(""), S = E("");
125
125
  P.current = h;
126
126
  const [m, R] = v.advertisement.getExternalPauseAd(h, {
127
- refetchInterval: C,
127
+ refetchInterval: b,
128
128
  $enabled: l === 0 || !!i,
129
- prefetch: l === 0 && C > 0
130
- }), k = q(m), x = _(() => {
129
+ prefetch: l === 0 && b > 0
130
+ }), k = j(m), x = _(() => {
131
131
  if (u) {
132
132
  S.current = P.current;
133
133
  const r = m.get().data;
134
- E.emit("exposedPauseAd", {
134
+ C.emit("exposedPauseAd", {
135
135
  action: "closed",
136
136
  payload: (r == null ? void 0 : r.url) === S.current ? {
137
137
  id: r == null ? void 0 : r.id,
@@ -148,7 +148,7 @@ const G = /* @__PURE__ */ d("div")({
148
148
  if (i && h) {
149
149
  y.current = P.current, S.current = "";
150
150
  const r = m.get().data;
151
- E.emit("exposedPauseAd", {
151
+ C.emit("exposedPauseAd", {
152
152
  action: "enabled",
153
153
  payload: (r == null ? void 0 : r.url) === y.current ? {
154
154
  id: r == null ? void 0 : r.id,
@@ -167,7 +167,7 @@ const G = /* @__PURE__ */ d("div")({
167
167
  } else {
168
168
  if (S.current !== P.current) {
169
169
  const r = m.get().data;
170
- S.current = "", y.current !== "" && (E.emit("exposedPauseAd", {
170
+ S.current = "", y.current !== "" && (C.emit("exposedPauseAd", {
171
171
  action: "disabled",
172
172
  payload: y.current === (r == null ? void 0 : r.url) ? {
173
173
  id: r == null ? void 0 : r.id,
@@ -210,7 +210,7 @@ const G = /* @__PURE__ */ d("div")({
210
210
  children: u,
211
211
  options: a
212
212
  }) => {
213
- const t = K(), f = O(), l = b();
213
+ const t = K(), f = G(), l = E();
214
214
  return c(() => t ? (e && (l.current = e, t.addVideoPlayerController(l.current)), () => {
215
215
  l.current && t.removeVideoPlayerController(l.current);
216
216
  }) : () => {
package/lib/es/points.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
- import { h as u } from "./index7.js";
2
+ import { h as u } from "./index8.js";
3
3
  import { useState as d, useEffect as f } from "react";
4
4
  import { s as o, u as y } from "./sl-types.js";
5
- import { F as c, e as a } from "./index3.js";
5
+ import { e as a } from "./index3.js";
6
6
  import { d as h } from "./index5.js";
7
7
  import { m as S } from "./theme.js";
8
8
  import { B as v } from "./index6.js";
9
+ import { F as c } from "./feature.js";
9
10
  import { S as g } from "./useStreamLayerApp2.js";
10
- import { B as k, z as A } from "./hooks-B0Qttldg.js";
11
+ import { B as k, z as A } from "./hooks-WfHlJH12.js";
11
12
  const I = /* @__PURE__ */ o("div")({
12
13
  name: "PointsContainer",
13
14
  class: "psiob9b",
@@ -69,10 +70,10 @@ const I = /* @__PURE__ */ o("div")({
69
70
  return null;
70
71
  const t = s.getFeature(g.GAMES);
71
72
  return t ? /* @__PURE__ */ e(j, { gamification: t }) : null;
72
- }, V = ({ theme: s }) => {
73
+ }, _ = ({ theme: s }) => {
73
74
  const t = k(), r = A();
74
75
  return t ? /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(u, { customTheme: s ?? r.theme, themeMode: r.themeMode, children: /* @__PURE__ */ e(L, { sdk: t }) }) }) : null;
75
76
  };
76
77
  export {
77
- V as StreamLayerSDKPoints
78
+ _ as StreamLayerSDKPoints
78
79
  };