@streamlayer/react 1.17.0 → 1.17.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/cjs/advertisement.js +36 -36
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/provider.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +9 -9
- package/lib/classic/cjs/advertisement.js +36 -36
- package/lib/classic/cjs/bet-pack.js +5 -1
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/provider.js +14 -30
- package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
- package/lib/classic/es/advertisement.js +2610 -2543
- package/lib/classic/es/bet-pack.js +3431 -12
- package/lib/classic/es/index.js +3 -5
- package/lib/classic/es/insight.js +8 -8
- package/lib/classic/es/notification.js +14 -14
- package/lib/classic/es/points.js +10 -10
- package/lib/classic/es/provider.js +3663 -3740
- package/lib/classic/es/useStreamLayerApp2.js +1979 -1979
- package/lib/classic/index.d.ts +1 -2
- package/lib/dist/cjs/masters.js +27 -27
- package/lib/dist/es/masters.js +6408 -6408
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +2610 -2543
- package/lib/es/index.js +3 -5
- package/lib/es/index2.js +30 -30
- package/lib/es/insight.js +8 -8
- package/lib/es/masters2.js +36 -36
- package/lib/es/notification.js +25 -25
- package/lib/es/points.js +10 -10
- package/lib/es/provider.js +46 -46
- package/lib/es/useStreamLayerApp2.js +1979 -1979
- package/lib/index.d.ts +1 -2
- package/lib/style.css +1 -1
- package/package.json +16 -26
- package/lib/app/tvos.d.ts +0 -5
- package/lib/cjs/index3.js +0 -1
- package/lib/cjs/tvos.js +0 -1
- package/lib/classic/app/tvos.d.ts +0 -5
- package/lib/classic/cjs/gamification-feature2.js +0 -1
- package/lib/classic/cjs/index2.js +0 -5
- package/lib/classic/cjs/index3.js +0 -1
- package/lib/classic/cjs/masters.js +0 -1
- package/lib/classic/cjs/masters2.js +0 -13
- package/lib/classic/cjs/tvos.js +0 -1
- package/lib/classic/es/gamification-feature2.js +0 -4
- package/lib/classic/es/index2.js +0 -3426
- package/lib/classic/es/index3.js +0 -76
- package/lib/classic/es/masters.js +0 -9
- package/lib/classic/es/masters2.js +0 -868
- package/lib/classic/es/tvos.js +0 -1352
- package/lib/classic/style.css +0 -1
- package/lib/es/index3.js +0 -76
- package/lib/es/tvos.js +0 -1352
package/lib/classic/es/index.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as m, S, t as o, h as i, u as s, b as y, o as L } from "./provider.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
|
-
import { StreamLayerSDKNotification as p, StreamLayerSDKNotificationUI as
|
|
5
|
-
import { StreamLayerSDKTv as c } from "./tvos.js";
|
|
4
|
+
import { StreamLayerSDKNotification as p, StreamLayerSDKNotificationUI as u } from "./notification.js";
|
|
6
5
|
export {
|
|
7
6
|
m as StreamLayerProvider,
|
|
8
7
|
S as StreamLayerSDKEvent,
|
|
9
8
|
p as StreamLayerSDKNotification,
|
|
10
|
-
|
|
9
|
+
u as StreamLayerSDKNotificationUI,
|
|
11
10
|
o as StreamLayerSDKReact,
|
|
12
|
-
c as StreamLayerSDKTv,
|
|
13
11
|
i as StreamLayerThemeProvider,
|
|
14
12
|
s as useStreamLayer,
|
|
15
13
|
y as useStreamLayerTheme,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as u, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as l, useEffect as h } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { a as m, s as p, z as f, u as S, b as I, h as g, S as v } from "./provider.js";
|
|
4
4
|
import { S as y } from "./useStreamLayerApp2.js";
|
|
5
|
-
const Q = () => f,
|
|
5
|
+
const Q = () => f, b = /* @__PURE__ */ p(Q())({
|
|
6
6
|
name: "QuestionWrap",
|
|
7
7
|
class: "q10hhsxv",
|
|
8
8
|
propsAsIs: !0
|
|
9
|
-
}),
|
|
9
|
+
}), k = ({
|
|
10
10
|
gamification: e,
|
|
11
11
|
persistent: r,
|
|
12
12
|
skipAutoClose: n,
|
|
@@ -25,13 +25,13 @@ const Q = () => f, k = /* @__PURE__ */ p(Q())({
|
|
|
25
25
|
var a;
|
|
26
26
|
i && ((a = i.feedItem) == null ? void 0 : a.type) === "insight" && (!r || e.isOpenedQuestion(i.feedItem.id) || (t.current = i.feedItem.id, e.openQuestion(i.feedItem.id, i.feedItem))), !i && t.current && (e.closeQuestion(t.current), t.current = "");
|
|
27
27
|
}), () => {
|
|
28
|
-
}), [e, r, s]), d ? /* @__PURE__ */ u(
|
|
28
|
+
}), [e, r, s]), d ? /* @__PURE__ */ u(b, {
|
|
29
29
|
skipAutoClose: n,
|
|
30
30
|
hideHeader: o,
|
|
31
31
|
gamification: e,
|
|
32
32
|
hideSponsor: !0
|
|
33
33
|
}) : null;
|
|
34
|
-
},
|
|
34
|
+
}, A = ({
|
|
35
35
|
sdk: e,
|
|
36
36
|
persistent: r,
|
|
37
37
|
skipAutoClose: n,
|
|
@@ -41,7 +41,7 @@ const Q = () => f, k = /* @__PURE__ */ p(Q())({
|
|
|
41
41
|
if (!m(e.featuresList.getStore()))
|
|
42
42
|
return null;
|
|
43
43
|
const t = e.getFeature(y.GAMES);
|
|
44
|
-
return t ? /* @__PURE__ */ u(
|
|
44
|
+
return t ? /* @__PURE__ */ u(k, {
|
|
45
45
|
insightId: o,
|
|
46
46
|
persistent: r,
|
|
47
47
|
hideHeader: s,
|
|
@@ -58,7 +58,7 @@ const Q = () => f, k = /* @__PURE__ */ p(Q())({
|
|
|
58
58
|
const t = S(), d = I();
|
|
59
59
|
return t ? /* @__PURE__ */ c("div", { className: "StreamLayerSDK", children: [
|
|
60
60
|
/* @__PURE__ */ u(g, { customTheme: r ?? d.theme, themeMode: d.themeMode, children: /* @__PURE__ */ u(
|
|
61
|
-
|
|
61
|
+
A,
|
|
62
62
|
{
|
|
63
63
|
skipAutoClose: o,
|
|
64
64
|
sdk: t,
|
|
@@ -71,5 +71,5 @@ const Q = () => f, k = /* @__PURE__ */ p(Q())({
|
|
|
71
71
|
};
|
|
72
72
|
export {
|
|
73
73
|
H as StreamLayerSDKInsight,
|
|
74
|
-
|
|
74
|
+
A as StreamLayerSDKInsightUI
|
|
75
75
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { s, k as u, D as L, A as O, x as R, p as B, q as P, y as Q, d as U, a as V, e as F, N as k, u as W, b as G, o as K, h as Y } from "./provider.js";
|
|
1
2
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as y, useCallback as
|
|
3
|
-
import {
|
|
4
|
-
import { Q as m, b as A, c as H, S as J } from "./useStreamLayerApp2.js";
|
|
3
|
+
import { useState as y, useCallback as _, useMemo as E, useEffect as x } from "react";
|
|
4
|
+
import { j as m, Q as A, k as H, S as J } from "./useStreamLayerApp2.js";
|
|
5
5
|
const $ = /* @__PURE__ */ s("div")({
|
|
6
6
|
name: "Media",
|
|
7
7
|
class: "m1bcvojl",
|
|
@@ -100,7 +100,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
100
100
|
return /* @__PURE__ */ c($e, { children: [
|
|
101
101
|
d && /* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(he, { children: d }) }),
|
|
102
102
|
/* @__PURE__ */ e(
|
|
103
|
-
|
|
103
|
+
L,
|
|
104
104
|
{
|
|
105
105
|
image: t,
|
|
106
106
|
name: (l = i == null ? void 0 : i.meta) == null ? void 0 : l.accountName,
|
|
@@ -109,11 +109,11 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
109
109
|
createdTweet: i == null ? void 0 : i.date
|
|
110
110
|
}
|
|
111
111
|
),
|
|
112
|
-
/* @__PURE__ */ e(Ae, { children:
|
|
112
|
+
/* @__PURE__ */ e(Ae, { children: O(n) })
|
|
113
113
|
] });
|
|
114
114
|
}, fe = ({ title: t, questionType: i, questionTypeData: o }) => /* @__PURE__ */ c(M, { children: [
|
|
115
115
|
/* @__PURE__ */ e(
|
|
116
|
-
|
|
116
|
+
R,
|
|
117
117
|
{
|
|
118
118
|
questionTypeData: o,
|
|
119
119
|
questionType: i,
|
|
@@ -124,7 +124,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
124
124
|
] }), ge = ({ tweet: t }) => t ? /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(ye, { ...t, controlVideo: () => {
|
|
125
125
|
} }) }) : null, Te = ({ action: t, questionType: i, inApp: o, insight: a, tweet: n }) => {
|
|
126
126
|
var d;
|
|
127
|
-
const l =
|
|
127
|
+
const l = B[i], r = P[i];
|
|
128
128
|
if (!l || !o || !o.notification)
|
|
129
129
|
return null;
|
|
130
130
|
const { title: p, image: I, imageMode: v } = o.notification;
|
|
@@ -154,7 +154,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
154
154
|
name: "TitleIcon",
|
|
155
155
|
class: "t16zzzei",
|
|
156
156
|
propsAsIs: !0
|
|
157
|
-
}), we = () =>
|
|
157
|
+
}), we = () => Q, qe = /* @__PURE__ */ s(we())({
|
|
158
158
|
name: "Close",
|
|
159
159
|
class: "c1sur0q2",
|
|
160
160
|
propsAsIs: !0
|
|
@@ -258,7 +258,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
258
258
|
var I, v;
|
|
259
259
|
d((v = (I = p == null ? void 0 : p[0]) == null ? void 0 : I.contentRect) == null ? void 0 : v.width);
|
|
260
260
|
});
|
|
261
|
-
})), r =
|
|
261
|
+
})), r = _((p) => {
|
|
262
262
|
p || l.disconnect(), l.observe(p);
|
|
263
263
|
}, [l]);
|
|
264
264
|
return E(() => () => {
|
|
@@ -391,7 +391,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
391
391
|
points: t
|
|
392
392
|
}) => /* @__PURE__ */ c(ps, {
|
|
393
393
|
children: [/* @__PURE__ */ c(ms, {
|
|
394
|
-
children: ["You won ", /* @__PURE__ */ e(
|
|
394
|
+
children: ["You won ", /* @__PURE__ */ e(U, {
|
|
395
395
|
delay: 0.5,
|
|
396
396
|
prefix: "+",
|
|
397
397
|
suffix: " points",
|
|
@@ -458,9 +458,9 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
458
458
|
class: "n1i4h28u",
|
|
459
459
|
propsAsIs: !1
|
|
460
460
|
}), ys = (t) => /* @__PURE__ */ e($s, { children: /* @__PURE__ */ e(As, { ...t }) }), fs = ({ sdk: t }) => {
|
|
461
|
-
const [i] = y(t.getNotificationsStore()), o =
|
|
461
|
+
const [i] = y(t.getNotificationsStore()), o = V(i), a = t.getFeature(J.GAMES), n = E(() => t.getActiveNotification(), [t, o]);
|
|
462
462
|
return x(() => {
|
|
463
|
-
n &&
|
|
463
|
+
n && F.emit("notification", {
|
|
464
464
|
action: "rendered",
|
|
465
465
|
payload: {
|
|
466
466
|
questionId: n.data.questionId,
|
|
@@ -476,8 +476,8 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
476
476
|
}
|
|
477
477
|
) : null : n && n.type === k.ONBOARDING ? n.data.onboarding ? /* @__PURE__ */ e(je, { open: a == null ? void 0 : a.openFeature, close: n.close, ...n.data.onboarding }) : null : n && /* @__PURE__ */ e(Te, { ...n.data, action: n.action });
|
|
478
478
|
}, bs = ({ theme: t }) => {
|
|
479
|
-
const i =
|
|
480
|
-
return i && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(
|
|
479
|
+
const i = W(), o = G(), a = K();
|
|
480
|
+
return i && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(Y, { customTheme: t ?? o.theme, themeMode: o.themeMode, children: /* @__PURE__ */ e(fs, { sdk: i }) }) }) : null;
|
|
481
481
|
};
|
|
482
482
|
export {
|
|
483
483
|
bs as StreamLayerSDKNotification,
|
package/lib/classic/es/points.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u, useEffect as d } from "react";
|
|
3
|
-
import { s as a, k as y, m as h,
|
|
4
|
-
import { S as
|
|
5
|
-
const
|
|
3
|
+
import { s as a, k as y, m as h, d as S, a as f, F as p, e as r, u as v, b as k, h as g } from "./provider.js";
|
|
4
|
+
import { S as b } from "./useStreamLayerApp2.js";
|
|
5
|
+
const A = /* @__PURE__ */ a("div")({
|
|
6
6
|
name: "PointsContainer",
|
|
7
7
|
class: "psiob9b",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), I = /* @__PURE__ */ a("div")({
|
|
10
10
|
name: "PointsIcon",
|
|
11
11
|
class: "p1gqe4lh",
|
|
12
12
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
13
|
+
}), P = () => y, T = /* @__PURE__ */ a(P())({
|
|
14
14
|
name: "PointsSvg",
|
|
15
15
|
class: "p15syg2y",
|
|
16
16
|
propsAsIs: !0
|
|
@@ -26,8 +26,8 @@ const I = /* @__PURE__ */ a("div")({
|
|
|
26
26
|
name: "PointsValue",
|
|
27
27
|
class: "prj9b3v",
|
|
28
28
|
propsAsIs: !1
|
|
29
|
-
}), C = ({ points: s, onClick: e }) => /* @__PURE__ */ l(
|
|
30
|
-
/* @__PURE__ */ t(
|
|
29
|
+
}), C = ({ points: s, onClick: e }) => /* @__PURE__ */ l(A, { className: h, onClick: e, children: [
|
|
30
|
+
/* @__PURE__ */ t(I, { children: /* @__PURE__ */ t(T, { name: "icon-trophy-solid" }) }),
|
|
31
31
|
/* @__PURE__ */ l(F, { children: [
|
|
32
32
|
/* @__PURE__ */ t(L, { children: "Total points" }),
|
|
33
33
|
/* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(S, { value: s }) })
|
|
@@ -61,11 +61,11 @@ const I = /* @__PURE__ */ a("div")({
|
|
|
61
61
|
}, M = ({ sdk: s }) => {
|
|
62
62
|
if (!f(s.featuresList.getStore()))
|
|
63
63
|
return null;
|
|
64
|
-
const e = s.getFeature(
|
|
64
|
+
const e = s.getFeature(b.GAMES);
|
|
65
65
|
return e ? /* @__PURE__ */ t(j, { gamification: e }) : null;
|
|
66
66
|
}, K = ({ theme: s }) => {
|
|
67
|
-
const e = v(), n =
|
|
68
|
-
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(
|
|
67
|
+
const e = v(), n = k();
|
|
68
|
+
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(g, { customTheme: s ?? n.theme, themeMode: n.themeMode, children: /* @__PURE__ */ t(M, { sdk: e }) }) }) : null;
|
|
69
69
|
};
|
|
70
70
|
export {
|
|
71
71
|
K as StreamLayerSDKPoints
|