@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.
- package/lib/app/pause-ad.d.ts +2 -4
- package/lib/app/polymarket.d.ts +7 -0
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -0
- package/lib/cjs/hooks-WfHlJH12.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -4
- package/lib/cjs/index11.js +4 -1
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +1 -1
- package/lib/cjs/index14.js +1 -1
- package/lib/cjs/index15.js +1 -5
- package/lib/cjs/index16.js +5 -0
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index3.js +1 -1
- package/lib/cjs/index4.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +19 -0
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +5 -5
- package/lib/classic/app/pause-ad.d.ts +2 -4
- package/lib/classic/app/polymarket.d.ts +7 -0
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/analytics.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +3 -3
- package/lib/classic/cjs/feature.js +1 -0
- package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -4
- package/lib/classic/cjs/index13.js +4 -0
- package/lib/classic/cjs/index2.js +2 -2
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +1 -1
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +19 -0
- package/lib/classic/cjs/useStreamLayerApp2.js +5 -5
- package/lib/classic/es/Question.js +4 -4
- package/lib/classic/es/advertisement.js +6 -6
- package/lib/classic/es/analytics.js +1 -1
- package/lib/classic/es/auth.js +1 -1
- package/lib/classic/es/bet-pack.js +18 -17
- package/lib/classic/es/feature.js +63 -0
- package/lib/classic/es/hooks-WfHlJH12.js +98 -0
- package/lib/classic/es/index.js +2 -2
- package/lib/classic/es/index10.js +82 -2295
- package/lib/classic/es/index11.js +2351 -179
- package/lib/classic/es/index12.js +170 -822
- package/lib/classic/es/index13.js +835 -0
- package/lib/classic/es/index2.js +127 -126
- package/lib/classic/es/index5.js +4 -5
- package/lib/classic/es/index6.js +5 -11
- package/lib/classic/es/index7.js +5 -62
- package/lib/classic/es/index8.js +7 -315
- package/lib/classic/es/index9.js +313 -81
- package/lib/classic/es/insight.js +2 -2
- package/lib/classic/es/notification.js +2 -2
- package/lib/classic/es/notification2.js +14 -13
- package/lib/classic/es/pause-ad.js +20 -20
- package/lib/classic/es/points.js +15 -14
- package/lib/classic/es/polymarket.js +6670 -0
- package/lib/classic/es/useStreamLayerApp2.js +143 -119
- package/lib/dist/cjs/masters.js +23 -23
- package/lib/dist/es/masters.js +189 -165
- package/lib/dist/index.d.ts +17 -6
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +2 -2
- package/lib/es/advertisement.js +5 -5
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/feature.js +63 -0
- package/lib/es/hooks-WfHlJH12.js +98 -0
- package/lib/es/index.js +2 -2
- package/lib/es/index10.js +236 -804
- package/lib/es/index11.js +822 -170
- package/lib/es/index12.js +166 -302
- package/lib/es/index13.js +313 -81
- package/lib/es/index14.js +82 -2350
- package/lib/es/index15.js +2330 -1229
- package/lib/es/index16.js +1254 -0
- package/lib/es/index2.js +118 -117
- package/lib/es/index3.js +3 -61
- package/lib/es/index4.js +3 -3
- package/lib/es/index7.js +5 -7
- package/lib/es/index8.js +5 -9
- package/lib/es/index9.js +7 -263
- package/lib/es/insight.js +2 -2
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +25 -24
- package/lib/es/notification.js +8 -7
- package/lib/es/pause-ad.js +20 -20
- package/lib/es/points.js +6 -5
- package/lib/es/polymarket.js +6670 -0
- package/lib/es/storage.js +2 -2
- package/lib/es/useStreamLayerApp2.js +143 -119
- package/lib/style.css +1 -1
- package/package.json +24 -14
- package/lib/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/es/hooks-B0Qttldg.js +0 -98
- package/lib/es/hooks-B0Qttldg.js +0 -98
package/lib/es/pause-ad.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s, jsxs as w } from "react/jsx-runtime";
|
|
2
|
-
import { h as N } from "./
|
|
3
|
-
import { s as d, u as
|
|
4
|
-
import { d as
|
|
5
|
-
import { useState as B, useRef as
|
|
6
|
-
import { e as
|
|
7
|
-
import { B as K, z as
|
|
8
|
-
const
|
|
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 &&
|
|
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
|
-
|
|
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
|
|
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(
|
|
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
|
-
|
|
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,
|
|
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:
|
|
127
|
+
refetchInterval: b,
|
|
128
128
|
$enabled: l === 0 || !!i,
|
|
129
|
-
prefetch: l === 0 &&
|
|
130
|
-
}), k =
|
|
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
|
-
|
|
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
|
-
|
|
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 !== "" && (
|
|
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 =
|
|
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 "./
|
|
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 {
|
|
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-
|
|
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
|
-
},
|
|
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
|
-
|
|
78
|
+
_ as StreamLayerSDKPoints
|
|
78
79
|
};
|