@streamlayer/react 1.11.3 → 1.12.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.
Files changed (46) hide show
  1. package/lib/app/bet-pack.d.ts +20 -0
  2. package/lib/cjs/advertisement.js +1 -1
  3. package/lib/cjs/bet-pack.js +1 -0
  4. package/lib/cjs/index2.js +5 -0
  5. package/lib/cjs/masters2.js +9 -9
  6. package/lib/cjs/notification.js +1 -1
  7. package/lib/cjs/points.js +1 -1
  8. package/lib/cjs/provider.js +47 -47
  9. package/lib/cjs/useStreamLayerApp2.js +12 -12
  10. package/lib/classic/app/bet-pack.d.ts +20 -0
  11. package/lib/classic/cjs/advertisement.js +1 -1
  12. package/lib/classic/cjs/bet-pack.js +1 -0
  13. package/lib/classic/cjs/index2.js +5 -0
  14. package/lib/classic/cjs/masters2.js +9 -9
  15. package/lib/classic/cjs/notification.js +1 -1
  16. package/lib/classic/cjs/points.js +1 -1
  17. package/lib/classic/cjs/provider.js +48 -48
  18. package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
  19. package/lib/classic/es/advertisement.js +17 -17
  20. package/lib/classic/es/bet-pack.js +14 -0
  21. package/lib/classic/es/index.js +1 -1
  22. package/lib/classic/es/index2.js +2890 -0
  23. package/lib/classic/es/masters2.js +372 -497
  24. package/lib/classic/es/notification.js +24 -24
  25. package/lib/classic/es/points.js +6 -6
  26. package/lib/classic/es/provider.js +8872 -8796
  27. package/lib/classic/es/useStreamLayerApp2.js +3014 -2725
  28. package/lib/classic/masters.d.ts +5 -1
  29. package/lib/classic/style.css +1 -1
  30. package/lib/dist/cjs/index.js +1 -1
  31. package/lib/dist/cjs/masters.js +97 -93
  32. package/lib/dist/es/index.js +7 -5
  33. package/lib/dist/es/masters.js +24855 -21687
  34. package/lib/dist/style.css +1 -1
  35. package/lib/es/advertisement.js +17 -17
  36. package/lib/es/bet-pack.js +14 -0
  37. package/lib/es/index.js +1 -1
  38. package/lib/es/index2.js +2890 -0
  39. package/lib/es/masters2.js +372 -497
  40. package/lib/es/notification.js +24 -24
  41. package/lib/es/points.js +6 -6
  42. package/lib/es/provider.js +8866 -8790
  43. package/lib/es/useStreamLayerApp2.js +3014 -2725
  44. package/lib/masters.d.ts +5 -1
  45. package/lib/style.css +1 -1
  46. package/package.json +14 -14
@@ -1,7 +1,7 @@
1
1
  import { jsx as e, jsxs as v, Fragment as po } from "react/jsx-runtime";
2
2
  import { useRef as F, useState as R, useCallback as Mo, useEffect as L } from "react";
3
- import { e as M, s as n, f as Po, g as mo, i as D, Y as ko, a as uo, L as Lo, u as Oo, j as _o, b as Bo, S as T, h as xo } from "./provider.js";
4
- import { N, a as vo, b as Ao, C as go, c as ho, P as k, d as S, A as Ro, e as Do, S as qo } from "./useStreamLayerApp2.js";
3
+ import { c as M, s as n, E as Po, e as mo, g as D, Y as ko, a as uo, L as Lo, u as Oo, i as _o, b as Bo, S as T, h as xo } from "./provider.js";
4
+ import { N, a as vo, b as Ao, C as go, c as ho, P as k, d as E, A as Ro, e as Do, S as qo } from "./useStreamLayerApp2.js";
5
5
  const wo = /* @__PURE__ */ n("div")({
6
6
  name: "Container",
7
7
  class: "c5b6wdg",
@@ -169,11 +169,11 @@ const wo = /* @__PURE__ */ n("div")({
169
169
  name: "MediaImgSolid",
170
170
  class: "mqvntt2",
171
171
  propsAsIs: !0
172
- }), Te = () => q, Se = /* @__PURE__ */ n(Te())({
172
+ }), Te = () => q, Ee = /* @__PURE__ */ n(Te())({
173
173
  name: "MediaImgMiddle",
174
174
  class: "m12jtj3u",
175
175
  propsAsIs: !0
176
- }), Ee = /* @__PURE__ */ n("img")({
176
+ }), Se = /* @__PURE__ */ n("img")({
177
177
  name: "CtaIcon",
178
178
  class: "ckq1frv",
179
179
  propsAsIs: !1
@@ -195,7 +195,7 @@ const wo = /* @__PURE__ */ n("div")({
195
195
  [N.CENTERED]: Io,
196
196
  [N.BOTTOM]: Ne,
197
197
  [N.SOLID]: Ce,
198
- [N.MIDDLE]: Se
198
+ [N.MIDDLE]: Ee
199
199
  }, _e = ({ src: o, imagePosition: s }) => {
200
200
  const i = Oe[s];
201
201
  return /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("img", { src: o, alt: "" }) });
@@ -214,7 +214,7 @@ const wo = /* @__PURE__ */ n("div")({
214
214
  c && /* @__PURE__ */ e(Ie, { children: c })
215
215
  ] }),
216
216
  /* @__PURE__ */ v(Me, { name: "promo-button", style: { color: p == null ? void 0 : p.textColor, backgroundColor: p == null ? void 0 : p.color }, children: [
217
- (p == null ? void 0 : p.ctaIcon) && (p == null ? void 0 : p.ctaIconMode) === go.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(Ee, { src: p == null ? void 0 : p.ctaIcon, alt: "cta-icon" }),
217
+ (p == null ? void 0 : p.ctaIcon) && (p == null ? void 0 : p.ctaIconMode) === go.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(Se, { src: p == null ? void 0 : p.ctaIcon, alt: "cta-icon" }),
218
218
  (p == null ? void 0 : p.label) || "Open"
219
219
  ] }),
220
220
  /* @__PURE__ */ e(ke, { name: "chevronRight" })
@@ -429,16 +429,16 @@ const wo = /* @__PURE__ */ n("div")({
429
429
  promotion: d,
430
430
  open: no,
431
431
  advertisementPaused: To,
432
- togglePause: E,
432
+ togglePause: S,
433
433
  controlVideo: _,
434
- skipAutoClose: So,
434
+ skipAutoClose: Eo,
435
435
  promotionId: B,
436
- onClose: Eo,
436
+ onClose: So,
437
437
  markAsViewed: w,
438
438
  externalAd: so
439
- } = o, V = d.type === S.INGAME_IAB11_LBAR || d.type === S.INGAME_IAB11, j = ((s = d.sponsor) == null ? void 0 : s.logo) && d.logoMode === k.CENTER, to = !!((t = (i = d.banner) == null ? void 0 : i.video) != null && t.url), x = d.autoPlayVideo === Ro.ENABLED;
439
+ } = o, V = d.type === E.INGAME_IAB11_LBAR || d.type === E.INGAME_IAB11, j = ((s = d.sponsor) == null ? void 0 : s.logo) && d.logoMode === k.CENTER, to = !!((t = (i = d.banner) == null ? void 0 : i.video) != null && t.url), x = d.autoPlayVideo === Ro.ENABLED;
440
440
  if (L(() => {
441
- E == null || E(to || x), no == null || no();
441
+ S == null || S(to || x), no == null || no();
442
442
  }, []), L(() => {
443
443
  B && d.type && w && w();
444
444
  }, [B, d.type, w]), L(() => () => {
@@ -472,9 +472,9 @@ const wo = /* @__PURE__ */ n("div")({
472
472
  mo,
473
473
  {
474
474
  className: "ClosePromoIcon",
475
- close: Eo,
475
+ close: So,
476
476
  autoClose: (g = d.closeTimer) == null ? void 0 : g.auto,
477
- duration: So ? 0 : (u = d.closeTimer) == null ? void 0 : u.seconds,
477
+ duration: Eo ? 0 : (u = d.closeTimer) == null ? void 0 : u.seconds,
478
478
  isPlaying: U
479
479
  }
480
480
  )
@@ -488,7 +488,7 @@ const wo = /* @__PURE__ */ n("div")({
488
488
  poster: (O = (b = d.banner) == null ? void 0 : b.video) == null ? void 0 : O.thumbnailUrl,
489
489
  aspectRatio: V ? "1/1" : "16/9",
490
490
  onPause: () => {
491
- x && (E == null || E(!0));
491
+ x && (S == null || S(!0));
492
492
  },
493
493
  onPlay: () => {
494
494
  D.emit("advertisement", {
@@ -497,7 +497,7 @@ const wo = /* @__PURE__ */ n("div")({
497
497
  id: B,
498
498
  type: d.type
499
499
  }
500
- }), E == null || E(!1);
500
+ }), S == null || S(!1);
501
501
  },
502
502
  controlVideo: _,
503
503
  autoPlay: x
@@ -542,7 +542,7 @@ const wo = /* @__PURE__ */ n("div")({
542
542
  children: /* @__PURE__ */ e(sn, {
543
543
  children: o
544
544
  })
545
- }), an = (o) => (o == null ? void 0 : o.type) === S.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === S.INGAME_IAB21_LBAR, rn = (o) => (o == null ? void 0 : o.type) === S.INGAME_IAB11 || (o == null ? void 0 : o.type) === S.INGAME_IAB21, ln = ({
545
+ }), an = (o) => (o == null ? void 0 : o.type) === E.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === E.INGAME_IAB21_LBAR, rn = (o) => (o == null ? void 0 : o.type) === E.INGAME_IAB11 || (o == null ? void 0 : o.type) === E.INGAME_IAB21, ln = ({
546
546
  advertisement: o,
547
547
  close: s,
548
548
  skipTypeCheck: i,
@@ -607,7 +607,7 @@ const wo = /* @__PURE__ */ n("div")({
607
607
  }), cn = (o) => {
608
608
  const s = o.target;
609
609
  if (s instanceof HTMLAnchorElement && s.target === "_blank") {
610
- const i = s.getAttribute("data-promo-id") || "", t = s.getAttribute("data-promo-type") || S.UNSET;
610
+ const i = s.getAttribute("data-promo-id") || "", t = s.getAttribute("data-promo-type") || E.UNSET;
611
611
  s.getAttribute("data-analytics") === "button" && D.emit("advertisement", {
612
612
  action: "buttonSelect",
613
613
  payload: {
@@ -0,0 +1,14 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Y as s, r as u } from "./index2.js";
3
+ import { u as o } from "./provider.js";
4
+ const c = () => {
5
+ const r = o();
6
+ return r ? /* @__PURE__ */ e(s, { sdk: r }) : null;
7
+ }, f = ({ close: r, onEvent: n }) => {
8
+ const t = o();
9
+ return t ? /* @__PURE__ */ e(u, { sdk: t, onEvent: n, close: r }) : null;
10
+ };
11
+ export {
12
+ f as BetPackOverlayProvider,
13
+ c as BetPackProvider
14
+ };
package/lib/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a2 as S, S as o, a9 as i, h as s, u as y, b as L, j as p } from "./provider.js";
1
+ import { a0 as S, S as o, ab as i, h as s, u as y, b as L, i as p } from "./provider.js";
2
2
  import "./useStreamLayerApp2.js";
3
3
  import "react/jsx-runtime";
4
4
  import "react";