@streamlayer/react 1.14.6 → 1.14.8

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 +3 -3
  6. package/lib/cjs/masters2.js +9 -5
  7. package/lib/cjs/notification.js +1 -1
  8. package/lib/cjs/provider.js +17 -17
  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 +3 -3
  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 +17 -17
  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 +209 -209
  23. package/lib/classic/es/masters2.js +364 -338
  24. package/lib/classic/es/notification.js +26 -26
  25. package/lib/classic/es/provider.js +2276 -2247
  26. package/lib/classic/es/useStreamLayerApp2.js +5 -5
  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 +33 -29
  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 +6371 -6323
  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 +209 -209
  39. package/lib/es/masters2.js +364 -338
  40. package/lib/es/notification.js +26 -26
  41. package/lib/es/provider.js +2273 -2244
  42. package/lib/es/useStreamLayerApp2.js +5 -5
  43. package/lib/style.css +1 -1
  44. package/package.json +14 -14
@@ -1,12 +1,12 @@
1
- import { k as u, s, X as L, Z 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 _, W as G, h as K } from "./provider.js";
2
- import { j as m, Q as A, k as Y, S as X } from "./useStreamLayerApp2.js";
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
3
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
4
- import { useState as y, useCallback as Z, 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
- }), H = () => $, J = /* @__PURE__ */ s(H())({
9
+ }), J = () => $, X = /* @__PURE__ */ s(J())({
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]: oe,
38
- [m.TRANSPARENT]: J
38
+ [m.TRANSPARENT]: X
39
39
  }, b = ({
40
40
  src: t,
41
41
  imageMode: o = m.UNSET,
@@ -117,7 +117,7 @@ const $ = /* @__PURE__ */ s("div")({
117
117
  {
118
118
  questionTypeData: i,
119
119
  questionType: o,
120
- questionStatus: Y.UNSET
120
+ questionStatus: K.UNSET
121
121
  }
122
122
  ),
123
123
  t && /* @__PURE__ */ e(pe, { children: t })
@@ -242,11 +242,11 @@ const $ = /* @__PURE__ */ s("div")({
242
242
  name: "Body",
243
243
  class: "barrbyu",
244
244
  propsAsIs: !1
245
- }), Ve = /* @__PURE__ */ s("div")({
245
+ }), Ue = /* @__PURE__ */ s("div")({
246
246
  name: "Subtitle",
247
247
  class: "sz7237i",
248
248
  propsAsIs: !1
249
- }), Ue = ({
249
+ }), Ve = ({
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 = Z((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(Ve, {
277
+ }), /* @__PURE__ */ e(Ue, {
278
278
  ref: r,
279
279
  className: a,
280
280
  children: /* @__PURE__ */ c("div", {
@@ -292,35 +292,35 @@ const $ = /* @__PURE__ */ s("div")({
292
292
  name: "Line",
293
293
  class: "l16t1zr7",
294
294
  propsAsIs: !1
295
- }), We = () => g, _e = /* @__PURE__ */ s(We())({
295
+ }), We = () => g, Ge = /* @__PURE__ */ s(We())({
296
296
  name: "Line1",
297
297
  class: "le78kvg",
298
298
  propsAsIs: !0
299
- }), Ge = () => g, Ke = /* @__PURE__ */ s(Ge())({
299
+ }), Ye = () => g, _e = /* @__PURE__ */ s(Ye())({
300
300
  name: "Line2",
301
301
  class: "l1o7966d",
302
302
  propsAsIs: !0
303
- }), Ye = () => g, Xe = /* @__PURE__ */ s(Ye())({
303
+ }), Ke = () => g, Ze = /* @__PURE__ */ s(Ke())({
304
304
  name: "Line3",
305
305
  class: "lu9lyxq",
306
306
  propsAsIs: !0
307
- }), Ze = () => /* @__PURE__ */ c(Fe, {
308
- children: [/* @__PURE__ */ e(_e, {
307
+ }), He = () => /* @__PURE__ */ c(Fe, {
308
+ children: [/* @__PURE__ */ e(Ge, {
309
309
  children: /* @__PURE__ */ e("div", {})
310
- }), /* @__PURE__ */ e(Ke, {
310
+ }), /* @__PURE__ */ e(_e, {
311
311
  children: /* @__PURE__ */ e("div", {})
312
- }), /* @__PURE__ */ e(Xe, {
312
+ }), /* @__PURE__ */ e(Ze, {
313
313
  children: /* @__PURE__ */ e("div", {})
314
314
  })]
315
- }), He = /* @__PURE__ */ s("div")({
315
+ }), Je = /* @__PURE__ */ s("div")({
316
316
  name: "Container",
317
317
  class: "c10jy6zf",
318
318
  propsAsIs: !1
319
- }), Je = () => u, es = /* @__PURE__ */ s(Je())({
319
+ }), Xe = () => u, es = /* @__PURE__ */ s(Xe())({
320
320
  name: "CheckIcon",
321
321
  class: "c1c7scay",
322
322
  propsAsIs: !0
323
- }), ss = () => /* @__PURE__ */ c(He, {
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(V, {
393
+ children: ["You won ", /* @__PURE__ */ e(U, {
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(Ze, {}, r),
432
- /* @__PURE__ */ c(Ue, { state: p, step: r, answer: (a == null ? void 0 : a.title) || "unknown", children: [
431
+ r !== 1 && /* @__PURE__ */ e(He, {}, r),
432
+ /* @__PURE__ */ c(Ve, { 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 = U(o), a = t.getFeature(X.GAMES), n = E(() => t.getActiveNotification(), [t, i]);
460
+ const [o] = y(t.getNotificationsStore()), i = V(o), a = t.getFeature(Z.GAMES), n = E(() => t.getActiveNotification(), [t, i]);
461
461
  return x(() => {
462
462
  n && F.emit("notification", {
463
463
  action: "rendered",
@@ -475,8 +475,8 @@ const $ = /* @__PURE__ */ s("div")({
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
477
  }, bs = ({ theme: t }) => {
478
- const o = W(), i = _(), a = G();
479
- return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(K, { customTheme: t ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ e(fs, { sdk: o }) }) }) : null;
478
+ const o = W(), i = G(), a = Y();
479
+ return o && (a.appNotification || a.onboardingNotification) ? a.app && !a.onboardingNotification ? null : /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(_, { customTheme: t ?? i.theme, themeMode: i.themeMode, children: /* @__PURE__ */ e(fs, { sdk: o }) }) }) : null;
480
480
  };
481
481
  export {
482
482
  bs as StreamLayerSDKNotification,