@streamlayer/react-ui 1.34.0 → 1.34.2

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.
@@ -43,7 +43,7 @@ const D = /* @__PURE__ */ $("div")({
43
43
  persistent: c,
44
44
  controlVideo: p
45
45
  }, m) => {
46
- var A, g, b, S, y, L, U, P, I, W, O, h, k, E, T, B;
46
+ var A, b, g, S, L, y, U, P, I, W, O, k, E, T, h, B;
47
47
  const e = u(t.advertisement.$store), o = u(t.openedQuestion.$store), f = u(t.openedQuestion.$extendedStore), {
48
48
  finished: v
49
49
  } = H();
@@ -55,16 +55,13 @@ const D = /* @__PURE__ */ $("div")({
55
55
  var w;
56
56
  v && ((w = e.close) == null || w.call(e));
57
57
  }, [v]);
58
- const F = ((b = (g = (A = e.data) == null ? void 0 : A.question) == null ? void 0 : g.backgroundImage) == null ? void 0 : b.landscapeUrl) || ((y = (S = e.data) == null ? void 0 : S.promotion) == null ? void 0 : y.backgroundImageLandscapeUrl), M = ((P = (U = (L = e.data) == null ? void 0 : L.question) == null ? void 0 : U.backgroundImage) == null ? void 0 : P.portraitUrl) || ((W = (I = e.data) == null ? void 0 : I.promotion) == null ? void 0 : W.backgroundImagePortraitUrl), R = Y({
58
+ const F = ((g = (b = (A = e.data) == null ? void 0 : A.question) == null ? void 0 : b.backgroundImage) == null ? void 0 : g.landscapeUrl) || ((L = (S = e.data) == null ? void 0 : S.promotion) == null ? void 0 : L.backgroundImageLandscapeUrl), M = ((P = (U = (y = e.data) == null ? void 0 : y.question) == null ? void 0 : U.backgroundImage) == null ? void 0 : P.portraitUrl) || ((W = (I = e.data) == null ? void 0 : I.promotion) == null ? void 0 : W.backgroundImagePortraitUrl), R = Y({
59
59
  containerId: s,
60
60
  landscapeUrl: F,
61
61
  portraitUrl: M
62
- }), K = ((h = (O = f == null ? void 0 : f.data) == null ? void 0 : O.appearance) == null ? void 0 : h.position) === z.LBAR;
63
- return n && e.data === void 0 && ((k = o == null ? void 0 : o.attributes) == null ? void 0 : k.adUnit) === C.STANDART && K && ((B = (T = (E = o == null ? void 0 : o.attributes) == null ? void 0 : E.adPromotion) == null ? void 0 : T.banner) != null && B.imageUrl) ? /* @__PURE__ */ l(D, {
62
+ }), K = ((k = (O = f == null ? void 0 : f.data) == null ? void 0 : O.appearance) == null ? void 0 : k.position) === z.LBAR;
63
+ return n && e.data === void 0 && ((E = o == null ? void 0 : o.attributes) == null ? void 0 : E.adUnit) === C.STANDART && K && ((B = (h = (T = o == null ? void 0 : o.attributes) == null ? void 0 : T.adPromotion) == null ? void 0 : h.banner) != null && B.imageUrl) ? /* @__PURE__ */ l(D, {
64
64
  ref: m,
65
- style: {
66
- height: "100%"
67
- },
68
65
  className: V("SL-AdvertisementWebOs", "SL-AdvertisementWebOs--banner"),
69
66
  children: /* @__PURE__ */ l(j, {
70
67
  cardId: o.id,
@@ -77,7 +74,7 @@ const D = /* @__PURE__ */ $("div")({
77
74
  }) : e.data === void 0 || !c && e.isViewed ? null : /* @__PURE__ */ N(D, {
78
75
  ref: m,
79
76
  style: {
80
- height: d || n ? "100%" : "auto"
77
+ height: d ? "100%" : n ? void 0 : "auto"
81
78
  },
82
79
  className: V("SL-AdvertisementWebOs", !d && !n && !i && "SL-AdvertisementWebOs--overlay", d && "SL-AdvertisementWebOs--sidebar", n && "SL-AdvertisementWebOs--banner", i && "SL-AdvertisementWebOs--notification"),
83
80
  children: [!i && R, /* @__PURE__ */ l(Z, {
@@ -1,27 +1,27 @@
1
1
  import { jsx as u, jsxs as B } from "react/jsx-runtime";
2
- import { cx as j } from "@linaria/core";
3
- import { useFocusable as K } from "@noriginmedia/norigin-spatial-navigation";
2
+ import { cx as K } from "@linaria/core";
3
+ import { useFocusable as M } from "@noriginmedia/norigin-spatial-navigation";
4
4
  import { useState as F, useRef as w, useCallback as N, useEffect as n } from "react";
5
- import { useStore as M } from "@streamlayer/react-polyfills";
6
- import { eventBus as v } from "@streamlayer/sdk-web-interfaces";
7
- import { PauseAdOverlay as U, PauseAdContent as V, PauseAdTopLeft as $, PauseAdTitle as G, PauseAdCaption as _, PauseAdBottomLeft as q, PauseAdPlayButton as z, PauseAdSidebarGradient as H, PauseAdSidebar as J, PauseAdTitleDescription as Q, ExternalAdContainer as O } from "./styles.js";
5
+ import { useStore as O } from "@streamlayer/react-polyfills";
6
+ import { eventBus as b } from "@streamlayer/sdk-web-interfaces";
7
+ import { PauseAdOverlay as U, PauseAdContent as V, PauseAdTopLeft as $, PauseAdTitle as G, PauseAdCaption as _, PauseAdBottomLeft as q, PauseAdPlayButton as z, PauseAdSidebarGradient as H, PauseAdSidebar as J, PauseAdTitleDescription as Q, ExternalAdContainer as R } from "./styles.js";
8
8
  const W = ({
9
9
  vastUrl: l,
10
10
  isDesktop: o,
11
11
  content: r
12
12
  }) => (n(() => {
13
- r.imageSrc && r.id && v.emit("exposedPauseAd", {
13
+ r.imageSrc && r.id && b.emit("exposedPauseAd", {
14
14
  action: "rendered",
15
15
  payload: {
16
16
  id: r.id,
17
17
  parentId: r.parentId
18
18
  }
19
19
  });
20
- }, [r, l]), r != null && r.imageSrc ? !r.adUrl || !o ? /* @__PURE__ */ u(O, { src: r.imageSrc }) : /* @__PURE__ */ u(
20
+ }, [r, l]), r != null && r.imageSrc ? !r.adUrl || !o ? /* @__PURE__ */ u(R, { src: r.imageSrc }) : /* @__PURE__ */ u(
21
21
  "a",
22
22
  {
23
23
  onClick: () => {
24
- v.emit("exposedPauseAd", {
24
+ b.emit("exposedPauseAd", {
25
25
  action: "navigated",
26
26
  payload: {
27
27
  id: r.id,
@@ -32,10 +32,10 @@ const W = ({
32
32
  href: r.adUrl,
33
33
  target: "_blank",
34
34
  rel: "noopener noreferrer",
35
- children: /* @__PURE__ */ u(O, { src: r.imageSrc })
35
+ children: /* @__PURE__ */ u(R, { src: r.imageSrc })
36
36
  }
37
37
  ) : null), X = ({ isClosing: l, content: o, externalPauseAdStore: r, title: k, caption: y, onPlay: f, onClose: a, vastUrl: c, options: A, isDesktop: m }) => {
38
- const b = (A == null ? void 0 : A.showPauseButton) ?? !0, { ref: s, focusSelf: I } = K({
38
+ const v = (A == null ? void 0 : A.showPauseButton) ?? !0, { ref: s, focusSelf: I } = M({
39
39
  focusKey: "sl-pause-ad-play",
40
40
  onEnterRelease: f,
41
41
  isFocusBoundary: !0,
@@ -57,12 +57,12 @@ const W = ({
57
57
  }
58
58
  };
59
59
  return window.addEventListener("keydown", E, { capture: !0 }), () => window.removeEventListener("keydown", E, { capture: !0 });
60
- }, [a]), /* @__PURE__ */ u(U, { className: j("SL_PauseAdOverlay", l && "pause-ad-closing"), children: /* @__PURE__ */ B(V, { children: [
60
+ }, [a]), /* @__PURE__ */ u(U, { className: K("SL_PauseAd", l && "pause-ad-closing"), children: /* @__PURE__ */ B(V, { children: [
61
61
  /* @__PURE__ */ B($, { children: [
62
62
  /* @__PURE__ */ u(G, { children: k }),
63
63
  /* @__PURE__ */ u(_, { children: y })
64
64
  ] }),
65
- b && /* @__PURE__ */ u(q, { children: /* @__PURE__ */ u(
65
+ v && /* @__PURE__ */ u(q, { children: /* @__PURE__ */ u(
66
66
  z,
67
67
  {
68
68
  ref: s,
@@ -77,17 +77,17 @@ const W = ({
77
77
  ] }) })
78
78
  ] }) });
79
79
  }, se = ({ showPauseAd: l, vastUrls: o, title: r, caption: k, sdk: y, onClose: f, onRender: a, options: c, isDesktop: A }) => {
80
- const m = (c == null ? void 0 : c.pauseAdDelay) ?? 0, b = (c == null ? void 0 : c.pauseAdRefetchInterval) ?? 1e3 * 60 * 50, [s, I] = F(!1), [E, d] = F(!1), t = w(), p = o == null ? void 0 : o[0].url, P = w(p), S = w(""), T = w("");
80
+ const m = (c == null ? void 0 : c.pauseAdDelay) ?? 0, v = (c == null ? void 0 : c.pauseAdRefetchInterval) ?? 1e3 * 60 * 50, [s, I] = F(!1), [E, d] = F(!1), t = w(), p = o == null ? void 0 : o[0].url, P = w(p), S = w(""), T = w("");
81
81
  P.current = p;
82
82
  const [i, D] = y.advertisement.getExternalPauseAd(p, {
83
- refetchInterval: b,
83
+ refetchInterval: v,
84
84
  $enabled: m === 0 || !!l,
85
- prefetch: m === 0 && b > 0
86
- }), x = M(i), g = N(() => {
85
+ prefetch: m === 0 && v > 0
86
+ }), x = O(i), g = N(() => {
87
87
  if (f) {
88
88
  T.current = P.current;
89
89
  const e = i.get().data;
90
- v.emit("exposedPauseAd", {
90
+ b.emit("exposedPauseAd", {
91
91
  action: "closed",
92
92
  payload: (e == null ? void 0 : e.url) === T.current ? {
93
93
  id: e == null ? void 0 : e.id,
@@ -95,7 +95,7 @@ const W = ({
95
95
  } : {}
96
96
  }), f();
97
97
  }
98
- }, [f, i]), R = N(() => {
98
+ }, [f, i]), j = N(() => {
99
99
  y.controlVideoPlayer({ play: !0 });
100
100
  }, [y]);
101
101
  return n(() => {
@@ -104,7 +104,7 @@ const W = ({
104
104
  if (l && p) {
105
105
  S.current = P.current, T.current = "";
106
106
  const e = i.get().data;
107
- v.emit("exposedPauseAd", {
107
+ b.emit("exposedPauseAd", {
108
108
  action: "enabled",
109
109
  payload: (e == null ? void 0 : e.url) === S.current ? {
110
110
  id: e == null ? void 0 : e.id,
@@ -123,7 +123,7 @@ const W = ({
123
123
  } else {
124
124
  if (T.current !== P.current) {
125
125
  const e = i.get().data;
126
- T.current = "", S.current !== "" && (v.emit("exposedPauseAd", {
126
+ T.current = "", S.current !== "" && (b.emit("exposedPauseAd", {
127
127
  action: "disabled",
128
128
  payload: S.current === (e == null ? void 0 : e.url) ? {
129
129
  id: e == null ? void 0 : e.id,
@@ -149,7 +149,7 @@ const W = ({
149
149
  isClosing: E,
150
150
  title: r,
151
151
  caption: k,
152
- onPlay: R,
152
+ onPlay: j,
153
153
  vastUrl: p,
154
154
  options: c,
155
155
  isDesktop: A,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.34.0",
3
+ "version": "1.34.2",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -110,21 +110,21 @@
110
110
  "react-countdown-circle-timer": "^3.2.1",
111
111
  "react-countup": "^6.5.3",
112
112
  "react-phone-number-input": "^3.4.8",
113
- "@streamlayer/feature-polymarket": "^0.1.0",
114
- "@streamlayer/react-polyfills": "^0.2.0",
115
- "@streamlayer/feature-gamification": "^1.24.0",
116
- "@streamlayer/sdk-web": "^1.17.0",
117
- "@streamlayer/sdk-web-analytics": "^1.15.0",
118
- "@streamlayer/sdk-web-anonymous-auth": "^1.3.9",
119
- "@streamlayer/feature-advertisement": "^0.1.0",
120
- "@streamlayer/sdk-web-api": "^1.15.0",
121
- "@streamlayer/sdk-web-core": "^1.19.0",
122
- "@streamlayer/sdk-web-features": "^1.0.94",
123
- "@streamlayer/sdk-web-interfaces": "^1.9.0",
124
- "@streamlayer/sdk-web-notifications": "^1.3.56",
125
- "@streamlayer/sdk-web-storage": "^1.0.94",
126
- "@streamlayer/sdk-web-logger": "^1.0.94",
127
- "@streamlayer/sdk-web-types": "^1.16.9"
113
+ "@streamlayer/feature-polymarket": "^0.1.2",
114
+ "@streamlayer/feature-advertisement": "^0.1.2",
115
+ "@streamlayer/feature-gamification": "^1.24.2",
116
+ "@streamlayer/sdk-web": "^1.17.2",
117
+ "@streamlayer/react-polyfills": "^0.2.2",
118
+ "@streamlayer/sdk-web-anonymous-auth": "^1.3.11",
119
+ "@streamlayer/sdk-web-api": "^1.15.2",
120
+ "@streamlayer/sdk-web-analytics": "^1.15.2",
121
+ "@streamlayer/sdk-web-features": "^1.0.96",
122
+ "@streamlayer/sdk-web-logger": "^1.0.96",
123
+ "@streamlayer/sdk-web-core": "^1.19.2",
124
+ "@streamlayer/sdk-web-interfaces": "^1.9.2",
125
+ "@streamlayer/sdk-web-storage": "^1.0.96",
126
+ "@streamlayer/sdk-web-notifications": "^1.3.58",
127
+ "@streamlayer/sdk-web-types": "^1.16.11"
128
128
  },
129
129
  "nx": {
130
130
  "implicitDependencies": [