@streamlayer/react 1.14.5 → 1.14.7

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 (44) hide show
  1. package/lib/app/event.d.ts +3 -1
  2. package/lib/app/masters.d.ts +2 -0
  3. package/lib/cjs/advertisement.js +30 -30
  4. package/lib/cjs/gamification-feature2.js +1 -1
  5. package/lib/cjs/index2.js +4 -8
  6. package/lib/cjs/masters2.js +9 -5
  7. package/lib/cjs/notification.js +1 -1
  8. package/lib/cjs/provider.js +16 -16
  9. package/lib/cjs/useStreamLayerApp2.js +2 -2
  10. package/lib/classic/app/event.d.ts +3 -1
  11. package/lib/classic/app/masters.d.ts +2 -0
  12. package/lib/classic/cjs/advertisement.js +30 -30
  13. package/lib/classic/cjs/gamification-feature2.js +1 -1
  14. package/lib/classic/cjs/index2.js +4 -8
  15. package/lib/classic/cjs/masters2.js +9 -5
  16. package/lib/classic/cjs/notification.js +1 -1
  17. package/lib/classic/cjs/provider.js +16 -16
  18. package/lib/classic/cjs/useStreamLayerApp2.js +2 -2
  19. package/lib/classic/es/advertisement.js +2584 -2561
  20. package/lib/classic/es/gamification-feature2.js +1 -1
  21. package/lib/classic/es/index.js +1 -1
  22. package/lib/classic/es/index2.js +3141 -2636
  23. package/lib/classic/es/masters2.js +366 -340
  24. package/lib/classic/es/notification.js +39 -39
  25. package/lib/classic/es/provider.js +1936 -1920
  26. package/lib/classic/es/useStreamLayerApp2.js +17 -17
  27. package/lib/classic/style.css +1 -1
  28. package/lib/dist/cjs/gamification-feature.js +1 -1
  29. package/lib/dist/cjs/gamification-feature2.js +1 -1
  30. package/lib/dist/cjs/masters.js +42 -42
  31. package/lib/dist/es/gamification-feature.js +1 -1
  32. package/lib/dist/es/gamification-feature2.js +1 -1
  33. package/lib/dist/es/masters.js +13017 -12471
  34. package/lib/dist/style.css +1 -1
  35. package/lib/es/advertisement.js +2584 -2561
  36. package/lib/es/gamification-feature2.js +1 -1
  37. package/lib/es/index.js +1 -1
  38. package/lib/es/index2.js +3141 -2636
  39. package/lib/es/masters2.js +366 -340
  40. package/lib/es/notification.js +39 -39
  41. package/lib/es/provider.js +1933 -1917
  42. package/lib/es/useStreamLayerApp2.js +17 -17
  43. package/lib/style.css +1 -1
  44. package/package.json +14 -16
@@ -1,16 +1,16 @@
1
- import { k as u, s, $ as L, a0 as O, a1 as R, C as B, a2 as P, U as Q, d as U, a as V, e as F, N as k, u as W, b as G, V as K, h as Y } from "./provider.js";
2
- import { k as m, Q as A, l as _, S as H } from "./useStreamLayerApp2.js";
1
+ import { k as u, s, X as L, Y as O, _ as R, E as B, $ as P, V as Q, d as V, a as U, e as F, N as k, u as W, b as Y, W as _, h as G } from "./provider.js";
2
+ import { j as m, Q as A, k as K, S as X } from "./useStreamLayerApp2.js";
3
3
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
4
- import { useState as y, useCallback as J, useMemo as E, useEffect as x } from "react";
4
+ import { useState as y, useCallback as H, useMemo as E, useEffect as x } from "react";
5
5
  const $ = /* @__PURE__ */ s("div")({
6
6
  name: "Media",
7
7
  class: "m1bcvojl",
8
8
  propsAsIs: !1
9
- }), X = () => $, Z = /* @__PURE__ */ s(X())({
9
+ }), J = () => $, Z = /* @__PURE__ */ s(J())({
10
10
  name: "MediaImgBottom",
11
11
  class: "m58gin0",
12
12
  propsAsIs: !0
13
- }), ee = () => $, C = /* @__PURE__ */ s(ee())({
13
+ }), ee = () => $, N = /* @__PURE__ */ s(ee())({
14
14
  name: "MediaImgSolid",
15
15
  class: "m1atm8do",
16
16
  propsAsIs: !0
@@ -31,12 +31,12 @@ const $ = /* @__PURE__ */ s("div")({
31
31
  class: "v1kofb47",
32
32
  propsAsIs: !1
33
33
  }), re = {
34
- [m.UNSET]: C,
35
- [m.NONE]: C,
34
+ [m.UNSET]: N,
35
+ [m.NONE]: N,
36
36
  [m.ROUNDED]: ne,
37
37
  [m.CENTERED]: oe,
38
38
  [m.TRANSPARENT]: Z
39
- }, N = ({
39
+ }, b = ({
40
40
  src: t,
41
41
  imageMode: o = m.UNSET,
42
42
  withVideo: i,
@@ -117,7 +117,7 @@ const $ = /* @__PURE__ */ s("div")({
117
117
  {
118
118
  questionTypeData: i,
119
119
  questionType: o,
120
- questionStatus: _.UNSET
120
+ questionStatus: K.UNSET
121
121
  }
122
122
  ),
123
123
  t && /* @__PURE__ */ e(pe, { children: t })
@@ -132,8 +132,8 @@ const $ = /* @__PURE__ */ s("div")({
132
132
  o === A.TWEET && n != null && n.tweetMedia && (h = n.tweetMedia.image), v === m.NONE && (h = "");
133
133
  const f = i.useMediaFromContent && (a == null ? void 0 : a.image), T = o === A.TWEET && ((d = n == null ? void 0 : n.tweetMedia) == null ? void 0 : d.video) || o === A.FACTOID && (a == null ? void 0 : a.video);
134
134
  return /* @__PURE__ */ e(de, { className: "SL_InApp", onClick: t, children: /* @__PURE__ */ c(le, { style: h ? {} : { paddingLeft: "1.5rem" }, children: [
135
- h && !f && /* @__PURE__ */ e(N, { src: h, imageMode: v, withVideo: !!T }),
136
- f && /* @__PURE__ */ e(N, { src: f, fromInsight: !0, withVideo: !!T }),
135
+ h && !f && /* @__PURE__ */ e(b, { src: h, imageMode: v, withVideo: !!T }),
136
+ f && /* @__PURE__ */ e(b, { src: f, fromInsight: !0, withVideo: !!T }),
137
137
  o === A.TWEET ? /* @__PURE__ */ e(ge, { tweet: n }) : /* @__PURE__ */ e(fe, { questionTypeData: l, questionType: o, title: p }),
138
138
  /* @__PURE__ */ e(me, { name: "inapp-button", children: r || "Open" }),
139
139
  /* @__PURE__ */ e(Ie, { name: "chevronRight" })
@@ -142,15 +142,15 @@ const $ = /* @__PURE__ */ s("div")({
142
142
  name: "NotificationContainer",
143
143
  class: "n11jcrxe",
144
144
  propsAsIs: !1
145
- }), b = /* @__PURE__ */ s("img")({
145
+ }), C = /* @__PURE__ */ s("img")({
146
146
  name: "Icon",
147
147
  class: "i1vmpt6u",
148
148
  propsAsIs: !1
149
- }), Ce = /* @__PURE__ */ s("div")({
149
+ }), Ne = /* @__PURE__ */ s("div")({
150
150
  name: "IconContainer",
151
151
  class: "i180665s",
152
152
  propsAsIs: !1
153
- }), Ne = () => u, be = /* @__PURE__ */ s(Ne())({
153
+ }), be = () => u, Ce = /* @__PURE__ */ s(be())({
154
154
  name: "TitleIcon",
155
155
  class: "t16zzzei",
156
156
  propsAsIs: !0
@@ -187,10 +187,10 @@ const $ = /* @__PURE__ */ s("div")({
187
187
  t == null || t(), i && (i.instantOpen = !0);
188
188
  },
189
189
  children: [
190
- /* @__PURE__ */ c(Ce, { children: [
191
- /* @__PURE__ */ e(b, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
190
+ /* @__PURE__ */ c(Ne, { children: [
191
+ /* @__PURE__ */ e(C, { className: "on-light", src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png" }),
192
192
  /* @__PURE__ */ e(
193
- b,
193
+ C,
194
194
  {
195
195
  className: "on-dark",
196
196
  src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"
@@ -199,7 +199,7 @@ const $ = /* @__PURE__ */ s("div")({
199
199
  ] }),
200
200
  /* @__PURE__ */ c(Se, { children: [
201
201
  /* @__PURE__ */ c(Ee, { children: [
202
- /* @__PURE__ */ e(be, { name: "icon-trophy-solid" }),
202
+ /* @__PURE__ */ e(Ce, { name: "icon-trophy-solid" }),
203
203
  (a = i == null ? void 0 : i.titleCard) == null ? void 0 : a.title
204
204
  ] }),
205
205
  /* @__PURE__ */ c(xe, { children: [
@@ -242,11 +242,11 @@ const $ = /* @__PURE__ */ s("div")({
242
242
  name: "Body",
243
243
  class: "barrbyu",
244
244
  propsAsIs: !1
245
- }), Ue = /* @__PURE__ */ s("div")({
245
+ }), Ve = /* @__PURE__ */ s("div")({
246
246
  name: "Subtitle",
247
247
  class: "sz7237i",
248
248
  propsAsIs: !1
249
- }), Ve = ({
249
+ }), Ue = ({
250
250
  step: t,
251
251
  children: o,
252
252
  answer: i,
@@ -257,7 +257,7 @@ const $ = /* @__PURE__ */ s("div")({
257
257
  var I, v;
258
258
  d((v = (I = p == null ? void 0 : p[0]) == null ? void 0 : I.contentRect) == null ? void 0 : v.width);
259
259
  });
260
- })), r = J((p) => {
260
+ })), r = H((p) => {
261
261
  p || l.disconnect(), l.observe(p);
262
262
  }, [l]);
263
263
  return E(() => () => {
@@ -274,7 +274,7 @@ const $ = /* @__PURE__ */ s("div")({
274
274
  children: /* @__PURE__ */ e(Qe, {
275
275
  children: o
276
276
  }, t)
277
- }), /* @__PURE__ */ e(Ue, {
277
+ }), /* @__PURE__ */ e(Ve, {
278
278
  ref: r,
279
279
  className: a,
280
280
  children: /* @__PURE__ */ c("div", {
@@ -292,27 +292,27 @@ const $ = /* @__PURE__ */ s("div")({
292
292
  name: "Line",
293
293
  class: "l16t1zr7",
294
294
  propsAsIs: !1
295
- }), We = () => g, Ge = /* @__PURE__ */ s(We())({
295
+ }), We = () => g, Ye = /* @__PURE__ */ s(We())({
296
296
  name: "Line1",
297
297
  class: "le78kvg",
298
298
  propsAsIs: !0
299
- }), Ke = () => g, Ye = /* @__PURE__ */ s(Ke())({
299
+ }), _e = () => g, Ge = /* @__PURE__ */ s(_e())({
300
300
  name: "Line2",
301
301
  class: "l1o7966d",
302
302
  propsAsIs: !0
303
- }), _e = () => g, He = /* @__PURE__ */ s(_e())({
303
+ }), Ke = () => g, Xe = /* @__PURE__ */ s(Ke())({
304
304
  name: "Line3",
305
305
  class: "lu9lyxq",
306
306
  propsAsIs: !0
307
- }), Je = () => /* @__PURE__ */ c(Fe, {
308
- children: [/* @__PURE__ */ e(Ge, {
307
+ }), He = () => /* @__PURE__ */ c(Fe, {
308
+ children: [/* @__PURE__ */ e(Ye, {
309
309
  children: /* @__PURE__ */ e("div", {})
310
- }), /* @__PURE__ */ e(Ye, {
310
+ }), /* @__PURE__ */ e(Ge, {
311
311
  children: /* @__PURE__ */ e("div", {})
312
- }), /* @__PURE__ */ e(He, {
312
+ }), /* @__PURE__ */ e(Xe, {
313
313
  children: /* @__PURE__ */ e("div", {})
314
314
  })]
315
- }), Xe = /* @__PURE__ */ s("div")({
315
+ }), Je = /* @__PURE__ */ s("div")({
316
316
  name: "Container",
317
317
  class: "c10jy6zf",
318
318
  propsAsIs: !1
@@ -320,7 +320,7 @@ const $ = /* @__PURE__ */ s("div")({
320
320
  name: "CheckIcon",
321
321
  class: "c1c7scay",
322
322
  propsAsIs: !0
323
- }), ss = () => /* @__PURE__ */ c(Xe, {
323
+ }), ss = () => /* @__PURE__ */ c(Je, {
324
324
  children: [/* @__PURE__ */ e(es, {
325
325
  name: "icon-check"
326
326
  }), " Prediction results are in!"]
@@ -390,7 +390,7 @@ const $ = /* @__PURE__ */ s("div")({
390
390
  points: t
391
391
  }) => /* @__PURE__ */ c(ps, {
392
392
  children: [/* @__PURE__ */ c(ms, {
393
- children: ["You won ", /* @__PURE__ */ e(U, {
393
+ children: ["You won ", /* @__PURE__ */ e(V, {
394
394
  delay: 0.5,
395
395
  prefix: "+",
396
396
  suffix: " points",
@@ -428,8 +428,8 @@ const $ = /* @__PURE__ */ s("div")({
428
428
  return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(ss, {}) }) });
429
429
  let p = "pending";
430
430
  return (r === 3 || r === 4) && (p = n ? "correct" : "incorrect"), /* @__PURE__ */ e(w, { onClick: () => o == null ? void 0 : o(), children: /* @__PURE__ */ c(q, { children: [
431
- r !== 1 && /* @__PURE__ */ e(Je, {}, r),
432
- /* @__PURE__ */ c(Ve, { state: p, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
431
+ r !== 1 && /* @__PURE__ */ e(He, {}, r),
432
+ /* @__PURE__ */ c(Ue, { state: p, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
433
433
  r === 2 && /* @__PURE__ */ e(is, { title: l || "unknown" }),
434
434
  r === 3 && n && /* @__PURE__ */ e(ls, {}),
435
435
  r === 3 && !n && /* @__PURE__ */ e(ds, { title: d || "unknown" }),
@@ -457,7 +457,7 @@ const $ = /* @__PURE__ */ s("div")({
457
457
  class: "n1i4h28u",
458
458
  propsAsIs: !1
459
459
  }), ys = (t) => /* @__PURE__ */ e($s, { children: /* @__PURE__ */ e(As, { ...t }) }), fs = ({ sdk: t }) => {
460
- const [o] = y(t.getNotificationsStore()), i = V(o), a = t.getFeature(H.GAMES), n = E(() => t.getActiveNotification(), [t, i]);
460
+ const [o] = y(t.getNotificationsStore()), i = U(o), a = t.getFeature(X.GAMES), n = E(() => t.getActiveNotification(), [t, i]);
461
461
  return x(() => {
462
462
  n && F.emit("notification", {
463
463
  action: "rendered",
@@ -474,11 +474,11 @@ const $ = /* @__PURE__ */ s("div")({
474
474
  ...n.data.question
475
475
  }
476
476
  ) : 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 });
477
- }, Ns = ({ theme: t }) => {
478
- const o = W(), i = G(), a = K();
479
- return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(Y, { customTheme: t ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ e(fs, { sdk: o }) }) }) : null;
477
+ }, bs = ({ theme: t }) => {
478
+ const o = W(), i = Y(), a = _();
479
+ return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(G, { customTheme: t ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ e(fs, { sdk: o }) }) }) : null;
480
480
  };
481
481
  export {
482
- Ns as StreamLayerSDKNotification,
482
+ bs as StreamLayerSDKNotification,
483
483
  fs as StreamLayerSDKNotificationUI
484
484
  };