@streamlayer/react 1.15.5 → 1.17.0
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/tvos.d.ts +5 -0
- package/lib/cjs/advertisement.js +37 -37
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index3.js +1 -0
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +16 -16
- package/lib/cjs/tvos.js +1 -0
- package/lib/cjs/useStreamLayerApp2.js +16 -16
- package/lib/classic/app/tvos.d.ts +5 -0
- package/lib/classic/cjs/advertisement.js +37 -37
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index3.js +1 -0
- package/lib/classic/cjs/masters2.js +4 -4
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +16 -16
- package/lib/classic/cjs/tvos.js +1 -0
- package/lib/classic/cjs/useStreamLayerApp2.js +16 -16
- package/lib/classic/es/advertisement.js +2243 -2308
- package/lib/classic/es/index.js +12 -11
- package/lib/classic/es/index2.js +30 -30
- package/lib/classic/es/index3.js +76 -0
- package/lib/classic/es/insight.js +8 -8
- package/lib/classic/es/masters2.js +18 -18
- package/lib/classic/es/notification.js +25 -25
- package/lib/classic/es/points.js +10 -10
- package/lib/classic/es/provider.js +1715 -1711
- package/lib/classic/es/tvos.js +1352 -0
- package/lib/classic/es/useStreamLayerApp2.js +7223 -14867
- package/lib/classic/index.d.ts +1 -0
- package/lib/classic/style.css +1 -1
- package/lib/dist/cjs/masters.js +42 -42
- package/lib/dist/es/masters.js +21046 -28686
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +2243 -2308
- package/lib/es/index.js +12 -11
- package/lib/es/index2.js +30 -30
- package/lib/es/index3.js +76 -0
- package/lib/es/insight.js +8 -8
- package/lib/es/masters2.js +18 -18
- package/lib/es/notification.js +25 -25
- package/lib/es/points.js +10 -10
- package/lib/es/provider.js +1712 -1708
- package/lib/es/tvos.js +1352 -0
- package/lib/es/useStreamLayerApp2.js +7223 -14867
- package/lib/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +27 -17
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { k as u, s, Z as L, _ as O, $ as R, G as B, a0 as P, W as Q, d as U, a as V, e as F, N as k, u as W, b as G, Y, h as _ } from "./provider.js";
|
|
2
|
-
import { j as m, Q as A, k as K, S as Z } from "./useStreamLayerApp2.js";
|
|
3
1
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
4
|
-
import { useState as y, useCallback as
|
|
2
|
+
import { useState as y, useCallback as L, useMemo as E, useEffect as x } from "react";
|
|
3
|
+
import { s, k as u, D as O, A as R, x as B, q as P, r as Q, y as U, g as V, f as F, e as W, N as k, u as G, d as K, c as Y, h as _ } from "./provider.js";
|
|
4
|
+
import { Q as m, b as A, c as H, S as J } from "./useStreamLayerApp2.js";
|
|
5
5
|
const $ = /* @__PURE__ */ s("div")({
|
|
6
6
|
name: "Media",
|
|
7
7
|
class: "m1bcvojl",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), X = () => $, Z = /* @__PURE__ */ s(X())({
|
|
10
10
|
name: "MediaImgBottom",
|
|
11
11
|
class: "m58gin0",
|
|
12
12
|
propsAsIs: !0
|
|
@@ -35,7 +35,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
35
35
|
[m.NONE]: N,
|
|
36
36
|
[m.ROUNDED]: ne,
|
|
37
37
|
[m.CENTERED]: ie,
|
|
38
|
-
[m.TRANSPARENT]:
|
|
38
|
+
[m.TRANSPARENT]: Z
|
|
39
39
|
}, b = ({
|
|
40
40
|
src: t,
|
|
41
41
|
imageMode: i = m.UNSET,
|
|
@@ -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
|
+
O,
|
|
104
104
|
{
|
|
105
105
|
image: t,
|
|
106
106
|
name: (l = i == null ? void 0 : i.meta) == null ? void 0 : l.accountName,
|
|
@@ -109,22 +109,22 @@ 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: R(n) })
|
|
113
113
|
] });
|
|
114
114
|
}, fe = ({ title: t, questionType: i, questionTypeData: o }) => /* @__PURE__ */ c(M, { children: [
|
|
115
115
|
/* @__PURE__ */ e(
|
|
116
|
-
|
|
116
|
+
B,
|
|
117
117
|
{
|
|
118
118
|
questionTypeData: o,
|
|
119
119
|
questionType: i,
|
|
120
|
-
questionStatus:
|
|
120
|
+
questionStatus: H.UNSET
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
123
|
t && /* @__PURE__ */ e(pe, { children: t })
|
|
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 = P[i], r = Q[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 = () => U, 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 = L((p) => {
|
|
262
262
|
p || l.disconnect(), l.observe(p);
|
|
263
263
|
}, [l]);
|
|
264
264
|
return E(() => () => {
|
|
@@ -297,31 +297,31 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
297
297
|
name: "Line1",
|
|
298
298
|
class: "le78kvg",
|
|
299
299
|
propsAsIs: !0
|
|
300
|
-
}),
|
|
300
|
+
}), Ke = () => g, Ye = /* @__PURE__ */ s(Ke())({
|
|
301
301
|
name: "Line2",
|
|
302
302
|
class: "l1o7966d",
|
|
303
303
|
propsAsIs: !0
|
|
304
|
-
}),
|
|
304
|
+
}), _e = () => g, He = /* @__PURE__ */ s(_e())({
|
|
305
305
|
name: "Line3",
|
|
306
306
|
class: "lu9lyxq",
|
|
307
307
|
propsAsIs: !0
|
|
308
|
-
}),
|
|
308
|
+
}), Je = () => /* @__PURE__ */ c(Fe, {
|
|
309
309
|
children: [/* @__PURE__ */ e(Ge, {
|
|
310
310
|
children: /* @__PURE__ */ e("div", {})
|
|
311
|
-
}), /* @__PURE__ */ e(
|
|
311
|
+
}), /* @__PURE__ */ e(Ye, {
|
|
312
312
|
children: /* @__PURE__ */ e("div", {})
|
|
313
|
-
}), /* @__PURE__ */ e(
|
|
313
|
+
}), /* @__PURE__ */ e(He, {
|
|
314
314
|
children: /* @__PURE__ */ e("div", {})
|
|
315
315
|
})]
|
|
316
|
-
}),
|
|
316
|
+
}), Xe = /* @__PURE__ */ s("div")({
|
|
317
317
|
name: "Container",
|
|
318
318
|
class: "c10jy6zf",
|
|
319
319
|
propsAsIs: !1
|
|
320
|
-
}),
|
|
320
|
+
}), Ze = () => u, es = /* @__PURE__ */ s(Ze())({
|
|
321
321
|
name: "CheckIcon",
|
|
322
322
|
class: "c1c7scay",
|
|
323
323
|
propsAsIs: !0
|
|
324
|
-
}), ss = () => /* @__PURE__ */ c(
|
|
324
|
+
}), ss = () => /* @__PURE__ */ c(Xe, {
|
|
325
325
|
children: [/* @__PURE__ */ e(es, {
|
|
326
326
|
name: "icon-check"
|
|
327
327
|
}), " Prediction results are in!"]
|
|
@@ -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(V, {
|
|
395
395
|
delay: 0.5,
|
|
396
396
|
prefix: "+",
|
|
397
397
|
suffix: " points",
|
|
@@ -429,7 +429,7 @@ const $ = /* @__PURE__ */ s("div")({
|
|
|
429
429
|
return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(ss, {}) }) });
|
|
430
430
|
let p = "pending";
|
|
431
431
|
return (r === 3 || r === 4) && (p = n ? "correct" : "incorrect"), /* @__PURE__ */ e(w, { "data-a": "intr", onClick: () => i == null ? void 0 : i(), children: /* @__PURE__ */ c(q, { children: [
|
|
432
|
-
r !== 1 && /* @__PURE__ */ e(
|
|
432
|
+
r !== 1 && /* @__PURE__ */ e(Je, {}, r),
|
|
433
433
|
/* @__PURE__ */ c(Ve, { state: p, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
|
|
434
434
|
r === 2 && /* @__PURE__ */ e(os, { title: l || "unknown" }),
|
|
435
435
|
r === 3 && n && /* @__PURE__ */ e(ls, {}),
|
|
@@ -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 = F(i), a = t.getFeature(J.GAMES), n = E(() => t.getActiveNotification(), [t, o]);
|
|
462
462
|
return x(() => {
|
|
463
|
-
n &&
|
|
463
|
+
n && W.emit("notification", {
|
|
464
464
|
action: "rendered",
|
|
465
465
|
payload: {
|
|
466
466
|
questionId: n.data.questionId,
|
|
@@ -476,7 +476,7 @@ 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 =
|
|
479
|
+
const i = G(), o = K(), a = Y();
|
|
480
480
|
return i && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(_, { customTheme: t ?? o.theme, themeMode: o.themeMode, children: /* @__PURE__ */ e(fs, { sdk: i }) }) }) : null;
|
|
481
481
|
};
|
|
482
482
|
export {
|
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
|
|
4
|
-
import { S as
|
|
5
|
-
const
|
|
3
|
+
import { s as a, k as y, m as h, g as S, f, F as p, e as r, u as v, d as g, h as k } from "./provider.js";
|
|
4
|
+
import { S as A } from "./useStreamLayerApp2.js";
|
|
5
|
+
const I = /* @__PURE__ */ a("div")({
|
|
6
6
|
name: "PointsContainer",
|
|
7
7
|
class: "psiob9b",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
9
|
+
}), P = /* @__PURE__ */ a("div")({
|
|
10
10
|
name: "PointsIcon",
|
|
11
11
|
class: "p1gqe4lh",
|
|
12
12
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
13
|
+
}), b = () => y, T = /* @__PURE__ */ a(b())({
|
|
14
14
|
name: "PointsSvg",
|
|
15
15
|
class: "p15syg2y",
|
|
16
16
|
propsAsIs: !0
|
|
@@ -26,8 +26,8 @@ const A = /* @__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(I, { className: h, onClick: e, children: [
|
|
30
|
+
/* @__PURE__ */ t(P, { 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 A = /* @__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(A.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 = g();
|
|
68
|
+
return e ? /* @__PURE__ */ t("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ t(k, { customTheme: s ?? n.theme, themeMode: n.themeMode, children: /* @__PURE__ */ t(M, { sdk: e }) }) }) : null;
|
|
69
69
|
};
|
|
70
70
|
export {
|
|
71
71
|
K as StreamLayerSDKPoints
|