@streamlayer/react-ui 1.31.6 → 1.32.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/app/Notifications/index.js +34 -34
- package/lib/app/masters/Notifications/index.js +40 -40
- package/lib/app/useClipboardCopy.js +8 -8
- package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +6 -3
- package/lib/app/webos/ExposedPauseAd/PauseAd.js +99 -77
- package/lib/app/webos/index.d.ts +5 -2
- package/lib/app/webos/index.js +22 -21
- package/lib/assets/style.css +1 -1
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +6 -6
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.d.ts +1 -0
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +56 -31
- package/lib/ui/modal/index.js +16 -16
- package/package.json +17 -16
- package/lib/index-DALxy-8N.js +0 -5437
|
@@ -3,7 +3,8 @@ import { useRef as Qr, useCallback as Ui, useEffect as js } from "react";
|
|
|
3
3
|
import { D as gg } from "../../../../../index-l-eyvmpL.js";
|
|
4
4
|
import { useVastAds as mg } from "./useVastAds.js";
|
|
5
5
|
import { m as _g } from "../../../../../index-DSi8Qgfs.js";
|
|
6
|
-
|
|
6
|
+
const tn = globalThis || void 0 || self;
|
|
7
|
+
var sn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7
8
|
function nr(s) {
|
|
8
9
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
9
10
|
}
|
|
@@ -26,15 +27,14 @@ function yg(s) {
|
|
|
26
27
|
});
|
|
27
28
|
}), t;
|
|
28
29
|
}
|
|
29
|
-
const sn = globalThis || void 0 || self;
|
|
30
30
|
var Hs;
|
|
31
|
-
typeof window < "u" ? Hs = window : typeof
|
|
31
|
+
typeof window < "u" ? Hs = window : typeof sn < "u" ? Hs = sn : typeof self < "u" ? Hs = self : Hs = {};
|
|
32
32
|
var In = Hs;
|
|
33
33
|
const A = /* @__PURE__ */ nr(In), Tg = {}, bg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
34
34
|
__proto__: null,
|
|
35
35
|
default: Tg
|
|
36
36
|
}, Symbol.toStringTag, { value: "Module" })), vg = /* @__PURE__ */ yg(bg);
|
|
37
|
-
var Xl = typeof
|
|
37
|
+
var Xl = typeof sn < "u" ? sn : typeof window < "u" ? window : {}, xg = vg, Vs;
|
|
38
38
|
typeof document < "u" ? Vs = document : (Vs = Xl["__GLOBAL_DOCUMENT_CACHE@4"], Vs || (Vs = Xl["__GLOBAL_DOCUMENT_CACHE@4"] = xg));
|
|
39
39
|
var dc = Vs;
|
|
40
40
|
const W = /* @__PURE__ */ nr(dc);
|
|
@@ -21683,7 +21683,7 @@ browserWorkerPolyFill(self);
|
|
|
21683
21683
|
}, Od = function(s) {
|
|
21684
21684
|
return s.toString().replace(/^function.+?{/, "").slice(0, -1);
|
|
21685
21685
|
}, ST = Ld(Od(function() {
|
|
21686
|
-
var s = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof
|
|
21686
|
+
var s = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof tn < "u" ? tn : typeof self < "u" ? self : {}, e = function() {
|
|
21687
21687
|
this.init = function() {
|
|
21688
21688
|
var o = {};
|
|
21689
21689
|
this.on = function(u, c) {
|
|
@@ -30187,7 +30187,7 @@ const Ab = Ld(Od(function() {
|
|
|
30187
30187
|
};
|
|
30188
30188
|
}
|
|
30189
30189
|
}
|
|
30190
|
-
var f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof
|
|
30190
|
+
var f = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof tn < "u" ? tn : typeof self < "u" ? self : {}, g;
|
|
30191
30191
|
typeof window < "u" ? g = window : typeof f < "u" ? g = f : typeof self < "u" ? g = self : g = {};
|
|
30192
30192
|
var T = g, w = function(M) {
|
|
30193
30193
|
return ArrayBuffer.isView === "function" ? ArrayBuffer.isView(M) : M && M.buffer instanceof ArrayBuffer;
|
|
@@ -1,44 +1,69 @@
|
|
|
1
1
|
import { _ as C } from "../../../../../vast-client.min-B0NUra1B.js";
|
|
2
|
-
import { useRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { useRef as P, useCallback as k } from "react";
|
|
3
|
+
import { eventBus as l } from "@streamlayer/sdk-web-interfaces";
|
|
4
|
+
import { createLogger as I } from "@streamlayer/sdk-web-logger";
|
|
5
|
+
import { m as K } from "../../../../../index-DSi8Qgfs.js";
|
|
6
|
+
const V = {}, B = new C(), i = K(V), d = I("ui:gam-static"), b = (n) => new Promise((m, e) => {
|
|
7
|
+
const r = new Image();
|
|
8
|
+
r.onload = () => m(n), r.onerror = () => e(), r.src = n;
|
|
9
|
+
}), $ = () => {
|
|
10
|
+
const n = P(0);
|
|
11
|
+
return [k(async (e) => {
|
|
12
|
+
var p, g, f, v, y, A, T, R, S, w, h;
|
|
13
|
+
if ((p = i.get()[e]) != null && p.imageSrc)
|
|
13
14
|
return { success: !0 };
|
|
14
|
-
const
|
|
15
|
-
n.current =
|
|
15
|
+
const r = Date.now();
|
|
16
|
+
n.current = r, i.setKey(e, { id: "", url: e });
|
|
16
17
|
try {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
l.emit("exposedPauseAd", {
|
|
19
|
+
action: "load",
|
|
20
|
+
payload: {}
|
|
21
|
+
});
|
|
22
|
+
const c = await B.get(e);
|
|
23
|
+
if (d.debug(c, "parsedVAST"), n.current === r && i.get()[e].url) {
|
|
24
|
+
const t = c.ads.find((s) => s.creatives.length > 0);
|
|
25
|
+
if (t) {
|
|
26
|
+
d.debug(t, "validAd");
|
|
27
|
+
const s = t.creatives.find((o) => o.type === "nonlinear");
|
|
28
|
+
if (s) {
|
|
29
|
+
d.debug(s, "nonlinear");
|
|
30
|
+
const o = (f = (g = s.variations) == null ? void 0 : g[0]) == null ? void 0 : f.staticResource, x = (y = (v = s.variations) == null ? void 0 : v[0]) == null ? void 0 : y.nonlinearClickThroughURLTemplate;
|
|
31
|
+
if (o)
|
|
32
|
+
return await b(o), i.setKey(e, {
|
|
33
|
+
id: t.id || "",
|
|
34
|
+
url: e,
|
|
35
|
+
imageSrc: o,
|
|
36
|
+
adUrl: x
|
|
37
|
+
}), l.emit("exposedPauseAd", {
|
|
38
|
+
action: "loaded",
|
|
39
|
+
payload: {
|
|
40
|
+
id: t.id || ""
|
|
41
|
+
}
|
|
42
|
+
}), { success: !0 };
|
|
28
43
|
}
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
return await
|
|
44
|
+
const a = t.creatives.find((o) => o.type === "companion");
|
|
45
|
+
d.debug(a, "companion");
|
|
46
|
+
const u = (S = (R = (T = (A = a == null ? void 0 : a.variations) == null ? void 0 : A[0]) == null ? void 0 : T.staticResources) == null ? void 0 : R[0]) == null ? void 0 : S.url, L = (h = (w = a == null ? void 0 : a.variations) == null ? void 0 : w[0]) == null ? void 0 : h.companionClickThroughURLTemplate;
|
|
47
|
+
if (u)
|
|
48
|
+
return await b(u), i.setKey(e, {
|
|
49
|
+
id: t.id || "",
|
|
50
|
+
url: e,
|
|
51
|
+
imageSrc: u,
|
|
52
|
+
adUrl: L
|
|
53
|
+
}), l.emit("exposedPauseAd", {
|
|
54
|
+
action: "loaded",
|
|
55
|
+
payload: {
|
|
56
|
+
id: t.id || ""
|
|
57
|
+
}
|
|
58
|
+
}), { success: !0 };
|
|
34
59
|
}
|
|
35
60
|
}
|
|
36
61
|
} catch (c) {
|
|
37
62
|
console.error("Error parsing VAST", c);
|
|
38
63
|
}
|
|
39
64
|
return { success: !1 };
|
|
40
|
-
}, []),
|
|
65
|
+
}, []), i];
|
|
41
66
|
};
|
|
42
67
|
export {
|
|
43
|
-
|
|
68
|
+
$ as useLoadGAMStatic
|
|
44
69
|
};
|
package/lib/ui/modal/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as c, Fragment as h, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { styled as y } from "@linaria/react";
|
|
3
|
-
import { useState as d, useEffect as
|
|
4
|
-
import {
|
|
5
|
-
import { BREAKPOINTS as
|
|
3
|
+
import { useState as d, useEffect as u } from "react";
|
|
4
|
+
import { createPortal as a } from "react-dom";
|
|
5
|
+
import { BREAKPOINTS as f } from "../theme/constants.js";
|
|
6
6
|
import { hideContentStyles as O } from "../theme/utils.js";
|
|
7
7
|
const S = /* @__PURE__ */ y("div")({
|
|
8
8
|
name: "StaticContainer",
|
|
@@ -12,49 +12,49 @@ const S = /* @__PURE__ */ y("div")({
|
|
|
12
12
|
.sl-pill-button {
|
|
13
13
|
display: none !important;
|
|
14
14
|
}
|
|
15
|
-
`, p = () => window.innerWidth >=
|
|
16
|
-
var
|
|
15
|
+
`, p = () => window.innerWidth >= f.md && window.innerWidth < f.lg ? 76 : 53, m = (e) => {
|
|
16
|
+
var n;
|
|
17
17
|
const t = p();
|
|
18
|
-
return Math.round((((
|
|
19
|
-
},
|
|
18
|
+
return Math.round((((n = e.current) == null ? void 0 : n.getBoundingClientRect().y) || 0) - t) <= 0;
|
|
19
|
+
}, T = ({
|
|
20
20
|
children: e,
|
|
21
21
|
container: t,
|
|
22
|
-
useContainer:
|
|
22
|
+
useContainer: n,
|
|
23
23
|
staticStyles: w
|
|
24
24
|
}) => {
|
|
25
|
-
const [s] = d(() =>
|
|
26
|
-
return
|
|
25
|
+
const [s] = d(() => m(t)), [r, i] = d(!1);
|
|
26
|
+
return u(() => {
|
|
27
27
|
if (!t.current || !s)
|
|
28
28
|
return i(!0), () => {
|
|
29
29
|
};
|
|
30
30
|
const o = window.scrollY;
|
|
31
31
|
return i(!0), () => {
|
|
32
|
-
|
|
32
|
+
m(t) && window.scrollTo({
|
|
33
33
|
top: o,
|
|
34
34
|
behavior: "instant"
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
}, []),
|
|
38
|
-
if (
|
|
37
|
+
}, []), u(() => {
|
|
38
|
+
if (r && t.current && s) {
|
|
39
39
|
const o = p();
|
|
40
40
|
window.scrollTo({
|
|
41
41
|
top: t.current.offsetTop - o,
|
|
42
42
|
behavior: "instant"
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
}, [
|
|
45
|
+
}, [r]), !t.current || !r ? null : n ? a(/* @__PURE__ */ c(S, {
|
|
46
46
|
className: "StaticContainer",
|
|
47
47
|
children: [e, /* @__PURE__ */ l("style", {
|
|
48
48
|
children: O
|
|
49
49
|
}), /* @__PURE__ */ l("style", {
|
|
50
50
|
children: C
|
|
51
51
|
})]
|
|
52
|
-
}), t.current, "modal-node") :
|
|
52
|
+
}), t.current, "modal-node") : a(/* @__PURE__ */ c(h, {
|
|
53
53
|
children: [e, /* @__PURE__ */ l("style", {
|
|
54
54
|
children: w
|
|
55
55
|
})]
|
|
56
56
|
}), t.current, "modal-node");
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
T as ModalPortal
|
|
60
60
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
],
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@lottiefiles/react-lottie-player": "^3.5.4",
|
|
79
|
-
"@streamlayer/sl-eslib": "^5.
|
|
79
|
+
"@streamlayer/sl-eslib": "^5.225.0",
|
|
80
80
|
"@types/lodash.throttle": "^4.1.9",
|
|
81
81
|
"lodash.throttle": "^4.1.1",
|
|
82
82
|
"react-infinite-scroller": "^1.2.6",
|
|
@@ -85,19 +85,19 @@
|
|
|
85
85
|
"@noriginmedia/norigin-spatial-navigation": "^2.3.0",
|
|
86
86
|
"react-window-infinite-loader": "^1.0.9",
|
|
87
87
|
"uuid": "^11.1.0",
|
|
88
|
-
"@streamlayer/feature-gamification": "^1.
|
|
89
|
-
"@streamlayer/react-polyfills": "^0.1.
|
|
90
|
-
"@streamlayer/sdk-web": "^1.
|
|
91
|
-
"@streamlayer/sdk-web
|
|
92
|
-
"@streamlayer/sdk-web-anonymous-auth": "^1.
|
|
93
|
-
"@streamlayer/sdk-web-
|
|
94
|
-
"@streamlayer/sdk-web-
|
|
95
|
-
"@streamlayer/sdk-web-features": "^1.0.
|
|
96
|
-
"@streamlayer/sdk-web-
|
|
97
|
-
"@streamlayer/sdk-web-
|
|
98
|
-
"@streamlayer/sdk-web-notifications": "^1.3.
|
|
99
|
-
"@streamlayer/sdk-web-storage": "^1.0.
|
|
100
|
-
"@streamlayer/sdk-web-types": "^1.
|
|
88
|
+
"@streamlayer/feature-gamification": "^1.23.0",
|
|
89
|
+
"@streamlayer/react-polyfills": "^0.1.45",
|
|
90
|
+
"@streamlayer/sdk-web-analytics": "^1.13.0",
|
|
91
|
+
"@streamlayer/sdk-web": "^1.16.0",
|
|
92
|
+
"@streamlayer/sdk-web-anonymous-auth": "^1.3.0",
|
|
93
|
+
"@streamlayer/sdk-web-core": "^1.17.0",
|
|
94
|
+
"@streamlayer/sdk-web-api": "^1.14.0",
|
|
95
|
+
"@streamlayer/sdk-web-features": "^1.0.85",
|
|
96
|
+
"@streamlayer/sdk-web-interfaces": "^1.8.0",
|
|
97
|
+
"@streamlayer/sdk-web-logger": "^1.0.85",
|
|
98
|
+
"@streamlayer/sdk-web-notifications": "^1.3.47",
|
|
99
|
+
"@streamlayer/sdk-web-storage": "^1.0.85",
|
|
100
|
+
"@streamlayer/sdk-web-types": "^1.16.0"
|
|
101
101
|
},
|
|
102
102
|
"nx": {
|
|
103
103
|
"implicitDependencies": [
|
|
@@ -126,6 +126,7 @@
|
|
|
126
126
|
"glob": "^11.0.0",
|
|
127
127
|
"hls.js": "^1.6.13",
|
|
128
128
|
"react": "18.3.1",
|
|
129
|
+
"react-dom": "18.3.1",
|
|
129
130
|
"react-auth-code-input": "^3.2.1",
|
|
130
131
|
"react-countdown-circle-timer": "^3.2.1",
|
|
131
132
|
"react-countup": "^6.5.3",
|
|
@@ -138,7 +139,7 @@
|
|
|
138
139
|
"vite-plugin-svgr": "^4.2.0",
|
|
139
140
|
"vite-svg-loader": "^5.1.0",
|
|
140
141
|
"vite-tsconfig-paths": "^5.0.1",
|
|
141
|
-
"@streamlayer/react": "^1.
|
|
142
|
+
"@streamlayer/react": "^1.21.0"
|
|
142
143
|
},
|
|
143
144
|
"dependencies": {
|
|
144
145
|
"@dailymotion/vast-client": "^6.4.2",
|