@streamlayer/react 1.24.7 → 1.24.8-pre.11da316
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/advertisement.d.ts +5 -0
- package/lib/cjs/advertisement.js +1486 -1436
- package/lib/cjs/auth.js +33 -33
- package/lib/cjs/bet-pack.js +232 -195
- package/lib/cjs/index.js +1765 -1707
- package/lib/cjs/insight.js +631 -569
- package/lib/cjs/masters.js +1346 -1307
- package/lib/cjs/notification.js +237 -206
- package/lib/cjs/pause-ad.js +62 -62
- package/lib/cjs/points.js +128 -97
- package/lib/cjs/polymarket.js +98 -97
- package/lib/cjs/style.css +1 -1
- package/lib/cjs/useStreamLayerApp.js +95 -101
- package/lib/dist/cjs/index.js +1346 -1307
- package/lib/dist/es/index.js +1346 -1307
- package/lib/es/Question.js +75 -72
- package/lib/es/advertisement.js +9139 -8159
- package/lib/es/analytics.js +35 -31
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/{hooks-n9ax4LRT.js → hooks-42q2i9Iw.js} +25 -23
- package/lib/es/{index-D8wyDNJD.js → index-sWgEw6jy.js} +1 -1
- package/lib/es/index.js +2 -2
- package/lib/es/index10.js +6 -6
- package/lib/es/index12.js +116 -128
- package/lib/es/index13.js +100 -96
- package/lib/es/index14.js +15 -15
- package/lib/es/index16.js +382 -383
- package/lib/es/index2.js +55 -56
- package/lib/es/index4.js +3 -3
- package/lib/es/index5.js +275 -3
- package/lib/es/index6.js +4 -7
- package/lib/es/index7.js +5 -284
- package/lib/es/index8.js +8 -237
- package/lib/es/index9.js +237 -8
- package/lib/es/insight.js +3 -3
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +29 -29
- package/lib/es/notification.js +28 -28
- package/lib/es/pause-ad.js +21 -21
- package/lib/es/points.js +9 -9
- package/lib/es/polymarket.js +40 -40
- package/lib/es/storage.js +18 -18
- package/lib/es/style.css +1 -1
- package/lib/es/useStreamLayerApp.js +1 -1
- package/lib/es/useStreamLayerApp2.js +5098 -4862
- package/lib/es/utils.js +86 -41
- package/lib/source.css +1 -1
- package/package.json +14 -14
package/lib/es/analytics.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import "./feature.js";
|
|
2
|
+
import { a as c } from "./useStreamLayerApp2.js";
|
|
3
|
+
import { useEffect as v } from "react";
|
|
4
|
+
import { e as u } from "./index3.js";
|
|
5
|
+
import { A as m } from "./index9.js";
|
|
6
|
+
const A = (a) => c(a);
|
|
7
|
+
let o = [], r = 0;
|
|
8
|
+
const s = 4, p = /* @__NO_SIDE_EFFECTS__ */ (a) => {
|
|
6
9
|
let e = [], t = {
|
|
7
10
|
get() {
|
|
8
11
|
return t.lc || t.listen(() => {
|
|
@@ -11,24 +14,24 @@ const u = 4, d = /* @__NO_SIDE_EFFECTS__ */ (a) => {
|
|
|
11
14
|
lc: 0,
|
|
12
15
|
listen(n) {
|
|
13
16
|
return t.lc = e.push(n), () => {
|
|
14
|
-
for (let
|
|
15
|
-
i
|
|
17
|
+
for (let i = r + s; i < o.length; )
|
|
18
|
+
o[i] === n ? o.splice(i, s) : i += s;
|
|
16
19
|
let l = e.indexOf(n);
|
|
17
20
|
~l && (e.splice(l, 1), --t.lc || t.off());
|
|
18
21
|
};
|
|
19
22
|
},
|
|
20
23
|
notify(n, l) {
|
|
21
|
-
let
|
|
24
|
+
let i = !o.length;
|
|
22
25
|
for (let f of e)
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
for (r = 0; r <
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
o.push(f, t.value, n, l);
|
|
27
|
+
if (i) {
|
|
28
|
+
for (r = 0; r < o.length; r += s)
|
|
29
|
+
o[r](
|
|
30
|
+
o[r + 1],
|
|
31
|
+
o[r + 2],
|
|
32
|
+
o[r + 3]
|
|
30
33
|
);
|
|
31
|
-
|
|
34
|
+
o.length = 0;
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
/* It will be called on last listener unsubscribing.
|
|
@@ -46,8 +49,8 @@ const u = 4, d = /* @__NO_SIDE_EFFECTS__ */ (a) => {
|
|
|
46
49
|
value: a
|
|
47
50
|
};
|
|
48
51
|
return t;
|
|
49
|
-
},
|
|
50
|
-
let e = /* @__PURE__ */
|
|
52
|
+
}, E = /* @__NO_SIDE_EFFECTS__ */ (a = {}) => {
|
|
53
|
+
let e = /* @__PURE__ */ p(a);
|
|
51
54
|
return e.setKey = function(t, n) {
|
|
52
55
|
let l = e.value;
|
|
53
56
|
typeof n > "u" && t in e.value ? (e.value = { ...e.value }, delete e.value[t], e.notify(l, t)) : e.value[t] !== n && (e.value = {
|
|
@@ -55,20 +58,20 @@ const u = 4, d = /* @__NO_SIDE_EFFECTS__ */ (a) => {
|
|
|
55
58
|
[t]: n
|
|
56
59
|
}, e.notify(l, t));
|
|
57
60
|
}, e;
|
|
58
|
-
},
|
|
61
|
+
}, w = (a) => [(e) => (...t) => (a && u.emit(a?.type, a), e ? e(t) : null)], x = (a) => {
|
|
59
62
|
const e = a.target;
|
|
60
|
-
e instanceof HTMLAnchorElement && e.target === "_blank" && e.getAttribute("data-a") === "web-link" &&
|
|
63
|
+
e instanceof HTMLAnchorElement && e.target === "_blank" && e.getAttribute("data-a") === "web-link" && u.emit("poll", {
|
|
61
64
|
action: "navigated",
|
|
62
65
|
payload: {}
|
|
63
|
-
}), e instanceof Element && e.getAttribute("data-a") === "intr" &&
|
|
66
|
+
}), e instanceof Element && e.getAttribute("data-a") === "intr" && u.emit("interactions", {
|
|
64
67
|
action: "tap",
|
|
65
68
|
payload: {}
|
|
66
69
|
});
|
|
67
|
-
},
|
|
68
|
-
const t = window.innerWidth <
|
|
69
|
-
|
|
70
|
-
const n = t && e.useDomNode ? document : a.current, l = (
|
|
71
|
-
e.listener(
|
|
70
|
+
}, L = (a, e) => {
|
|
71
|
+
const t = window.innerWidth < m.xl;
|
|
72
|
+
v(() => {
|
|
73
|
+
const n = t && e.useDomNode ? document : a.current, l = (i) => {
|
|
74
|
+
e.listener(i, a);
|
|
72
75
|
};
|
|
73
76
|
return e.enabled && n?.addEventListener(e.event, l), () => {
|
|
74
77
|
n?.removeEventListener(e.event, l);
|
|
@@ -76,9 +79,10 @@ const u = 4, d = /* @__NO_SIDE_EFFECTS__ */ (a) => {
|
|
|
76
79
|
}, [t, e.enabled, e.listener]);
|
|
77
80
|
};
|
|
78
81
|
export {
|
|
79
|
-
A,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
L as A,
|
|
83
|
+
x as a,
|
|
84
|
+
p as b,
|
|
85
|
+
A as c,
|
|
86
|
+
E as f,
|
|
87
|
+
w as u
|
|
84
88
|
};
|
package/lib/es/auth.js
CHANGED
package/lib/es/bet-pack.js
CHANGED
|
@@ -3,7 +3,7 @@ import { e as i } from "./index3.js";
|
|
|
3
3
|
import { useEffect as n } from "react";
|
|
4
4
|
import "./feature.js";
|
|
5
5
|
import { D as c } from "./index4.js";
|
|
6
|
-
import {
|
|
6
|
+
import { w as m } from "./hooks-42q2i9Iw.js";
|
|
7
7
|
const r = (t) => {
|
|
8
8
|
const e = t.target;
|
|
9
9
|
e instanceof Element && e.getAttribute("data-a") === "intr" && i.emit("interactions", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useRef as
|
|
1
|
+
import { useRef as A, useMemo as N, useEffect as r, useContext as l, useState as b, createContext as L } from "react";
|
|
2
2
|
import { jsxs as O, jsx as T } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { B } from "./useStreamLayerApp2.js";
|
|
4
4
|
const x = ({
|
|
5
5
|
event: e,
|
|
6
6
|
internal: i
|
|
@@ -14,13 +14,13 @@ var M = /* @__PURE__ */ ((e) => (e[e.UNSET = 0] = "UNSET", e[e.CONNECTED = 1] =
|
|
|
14
14
|
const H = {
|
|
15
15
|
status: 0,
|
|
16
16
|
sdk: null
|
|
17
|
-
}, d =
|
|
17
|
+
}, d = L(H), F = ({
|
|
18
18
|
sdkKey: e,
|
|
19
19
|
theme: i,
|
|
20
20
|
themeMode: o,
|
|
21
21
|
plugins: n,
|
|
22
22
|
children: h,
|
|
23
|
-
event:
|
|
23
|
+
event: k,
|
|
24
24
|
production: y = !0,
|
|
25
25
|
autoEnable: f = !0,
|
|
26
26
|
withAdNotification: C,
|
|
@@ -32,11 +32,12 @@ const H = {
|
|
|
32
32
|
onDeepLinkHandled: s,
|
|
33
33
|
videoPlayerController: a,
|
|
34
34
|
onContentActivate: g,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
mobileBreakpoint: D,
|
|
36
|
+
containerId: m,
|
|
37
|
+
webOS: K,
|
|
38
|
+
gamification: P
|
|
38
39
|
}) => {
|
|
39
|
-
const t =
|
|
40
|
+
const t = B({
|
|
40
41
|
sdkKey: e,
|
|
41
42
|
plugins: n,
|
|
42
43
|
production: y,
|
|
@@ -50,12 +51,13 @@ const H = {
|
|
|
50
51
|
withAd: E,
|
|
51
52
|
friendsTab: p,
|
|
52
53
|
betPack: u,
|
|
53
|
-
webOS:
|
|
54
|
-
gamification:
|
|
55
|
-
|
|
54
|
+
webOS: K,
|
|
55
|
+
gamification: P,
|
|
56
|
+
mobileBreakpoint: D
|
|
57
|
+
}), v = A(""), w = N(() => t ? { sdk: t, status: 2, event: v } : { status: 1, sdk: null, event: v }, [t]);
|
|
56
58
|
return r(() => {
|
|
57
|
-
t && (t.options.setKey("friendsTab", p), t.options.setKey("theme", i), t.options.setKey("themeMode", o), t.options.setKey("skipOnboarding", c), t.options.setKey("betPack", u), t.options.setKey("containerId",
|
|
58
|
-
}, [t, p, i, o, c, u,
|
|
59
|
+
t && (t.options.setKey("friendsTab", p), t.options.setKey("theme", i), t.options.setKey("themeMode", o), t.options.setKey("skipOnboarding", c), t.options.setKey("betPack", u), t.options.setKey("containerId", m));
|
|
60
|
+
}, [t, p, i, o, c, u, m]), r(() => () => {
|
|
59
61
|
s && t?.removeDeepLinkHandler(s), a && t?.removeVideoPlayerController(a);
|
|
60
62
|
}, [t]), r(() => {
|
|
61
63
|
localStorage.getItem("SL_DEBUG") && console.log("StreamLayerProvider mounted with props:", {
|
|
@@ -63,8 +65,8 @@ const H = {
|
|
|
63
65
|
onDeepLinkHandled: !!s,
|
|
64
66
|
videoPlayerController: !!a
|
|
65
67
|
});
|
|
66
|
-
}, [e, s, a]), /* @__PURE__ */ O(d.Provider, { value:
|
|
67
|
-
|
|
68
|
+
}, [e, s, a]), /* @__PURE__ */ O(d.Provider, { value: w, children: [
|
|
69
|
+
k !== void 0 && /* @__PURE__ */ T(x, { event: k }),
|
|
68
70
|
h
|
|
69
71
|
] });
|
|
70
72
|
}, j = () => {
|
|
@@ -73,13 +75,13 @@ const H = {
|
|
|
73
75
|
}, I = () => {
|
|
74
76
|
const { event: e } = l(d);
|
|
75
77
|
return e;
|
|
76
|
-
},
|
|
78
|
+
}, _ = () => {
|
|
77
79
|
const { sdk: e } = l(d), [i, o] = b({});
|
|
78
80
|
return r(() => e?.options ? e?.options?.subscribe((n) => {
|
|
79
81
|
o({ theme: n.theme, themeMode: n.themeMode });
|
|
80
82
|
}) : () => {
|
|
81
83
|
}, [e?.options]), i;
|
|
82
|
-
},
|
|
84
|
+
}, q = () => {
|
|
83
85
|
const { sdk: e } = l(d), [i, o] = b({});
|
|
84
86
|
return r(() => e?.uiState ? e?.uiState.subscribe((n) => {
|
|
85
87
|
o({ ...n });
|
|
@@ -87,11 +89,11 @@ const H = {
|
|
|
87
89
|
}, [e?.uiState]), i;
|
|
88
90
|
};
|
|
89
91
|
export {
|
|
90
|
-
F as
|
|
91
|
-
j as Y,
|
|
92
|
-
V as _,
|
|
93
|
-
x as g,
|
|
92
|
+
F as _,
|
|
94
93
|
d as i,
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
x as j,
|
|
95
|
+
M as k,
|
|
96
|
+
_ as q,
|
|
97
|
+
j as w,
|
|
98
|
+
q as z
|
|
97
99
|
};
|
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as a } from "./
|
|
1
|
+
import { h as a } from "./index7.js";
|
|
2
2
|
import { D as m } from "./index2.js";
|
|
3
3
|
import { StreamLayerSDKNotification as S, StreamLayerSDKNotificationUI as s } from "./notification.js";
|
|
4
|
-
import {
|
|
4
|
+
import { _ as L, j as i, w as f, q as D, z as p } from "./hooks-42q2i9Iw.js";
|
|
5
5
|
export {
|
|
6
6
|
L as StreamLayerProvider,
|
|
7
7
|
i as StreamLayerSDKEvent,
|
package/lib/es/index10.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Q as i } from "./useStreamLayerApp2.js";
|
|
|
3
3
|
import { jsxs as t, jsx as s, Fragment as U } from "react/jsx-runtime";
|
|
4
4
|
import { memo as $, useMemo as w } from "react";
|
|
5
5
|
import { V as y } from "./index14.js";
|
|
6
|
-
import {
|
|
6
|
+
import { M as T } from "./index5.js";
|
|
7
7
|
const G = {
|
|
8
8
|
[i.TWEET]: { label: "Insight", iconName: "icon-insight" },
|
|
9
9
|
[i.PROMOTION]: { label: "Insight", iconName: "icon-insight" },
|
|
@@ -61,7 +61,7 @@ const G = {
|
|
|
61
61
|
name: "UserNameAndDate",
|
|
62
62
|
class: "u1p051g3",
|
|
63
63
|
propsAsIs: !1
|
|
64
|
-
}),
|
|
64
|
+
}), M = ({ image: r, name: n, userName: c, verified: o, createdTweet: p }) => {
|
|
65
65
|
const m = p && L(p);
|
|
66
66
|
return /* @__PURE__ */ t(D, { children: [
|
|
67
67
|
r && /* @__PURE__ */ t(H, { children: [
|
|
@@ -82,7 +82,7 @@ const G = {
|
|
|
82
82
|
] })
|
|
83
83
|
] })
|
|
84
84
|
] });
|
|
85
|
-
},
|
|
85
|
+
}, P = /* @__PURE__ */ a("div")({
|
|
86
86
|
name: "Container",
|
|
87
87
|
class: "c1kzqw87",
|
|
88
88
|
propsAsIs: !1
|
|
@@ -123,10 +123,10 @@ const G = {
|
|
|
123
123
|
({ contentType: I }) => I === "video/mp4"
|
|
124
124
|
/* VIDEO */
|
|
125
125
|
)?.url, [e]);
|
|
126
|
-
return /* @__PURE__ */ t(
|
|
126
|
+
return /* @__PURE__ */ t(P, { children: [
|
|
127
127
|
/* @__PURE__ */ t(R, { children: [
|
|
128
128
|
/* @__PURE__ */ s(
|
|
129
|
-
|
|
129
|
+
M,
|
|
130
130
|
{
|
|
131
131
|
image: r,
|
|
132
132
|
name: m?.meta?.accountName,
|
|
@@ -175,7 +175,7 @@ const G = {
|
|
|
175
175
|
}
|
|
176
176
|
);
|
|
177
177
|
export {
|
|
178
|
-
|
|
178
|
+
M as D,
|
|
179
179
|
K as I,
|
|
180
180
|
Z as N,
|
|
181
181
|
G as e,
|