promogame-player 0.0.21 → 0.0.22
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as P, Fragment as le, jsx as $ } from "react/jsx-runtime";
|
|
2
2
|
import * as ce from "react";
|
|
3
|
-
import
|
|
3
|
+
import g, { useRef as de, useEffect as B } from "react";
|
|
4
4
|
import { cn as ve } from "../../utils.js";
|
|
5
5
|
var j = {}, L = {}, S = {}, F;
|
|
6
6
|
function fe() {
|
|
7
7
|
if (F) return S;
|
|
8
8
|
F = 1, Object.defineProperty(S, "__esModule", { value: !0 }), S.useUnityCanvasId = void 0;
|
|
9
|
-
var l =
|
|
9
|
+
var l = g, c = 0, a = "react-unity-webgl-canvas", y = function(v) {
|
|
10
10
|
if (v.id !== void 0)
|
|
11
11
|
return v.id;
|
|
12
12
|
var b = (0, l.useMemo)(function() {
|
|
@@ -120,7 +120,7 @@ function ye() {
|
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
Object.defineProperty(w, "__esModule", { value: !0 }), w.useUnityInstance = void 0;
|
|
123
|
-
var a =
|
|
123
|
+
var a = g, y = Z(), v = A(), b = function(m, o, n, e) {
|
|
124
124
|
(0, a.useEffect)(function() {
|
|
125
125
|
(function() {
|
|
126
126
|
return l(void 0, void 0, void 0, function() {
|
|
@@ -162,7 +162,7 @@ var M = {}, z;
|
|
|
162
162
|
function Ue() {
|
|
163
163
|
if (z) return M;
|
|
164
164
|
z = 1, Object.defineProperty(M, "__esModule", { value: !0 }), M.useUnityArguments = void 0;
|
|
165
|
-
var l =
|
|
165
|
+
var l = g, c = function(a) {
|
|
166
166
|
return (0, l.useMemo)(function() {
|
|
167
167
|
return {
|
|
168
168
|
// Assigns the data URL, framework URL, and code URL to the Unity
|
|
@@ -241,7 +241,7 @@ var x = {}, V;
|
|
|
241
241
|
function me() {
|
|
242
242
|
if (V) return x;
|
|
243
243
|
V = 1, Object.defineProperty(x, "__esModule", { value: !0 }), x.useUnityLoader = void 0;
|
|
244
|
-
var l =
|
|
244
|
+
var l = g, c = A(), a = Z(), y = function(v) {
|
|
245
245
|
var b = (0, l.useState)(a.UnityLoaderStatus.Loading), m = b[0], o = b[1];
|
|
246
246
|
return (0, l.useEffect)(function() {
|
|
247
247
|
if (c.isBrowserEnvironment !== !1) {
|
|
@@ -270,7 +270,7 @@ var W;
|
|
|
270
270
|
function be() {
|
|
271
271
|
if (W) return L;
|
|
272
272
|
W = 1, Object.defineProperty(L, "__esModule", { value: !0 }), L.Unity = void 0;
|
|
273
|
-
var l =
|
|
273
|
+
var l = g, c = g, a = fe(), y = ye(), v = Ue(), b = me(), m = (0, c.forwardRef)(
|
|
274
274
|
/**
|
|
275
275
|
* @param unityProps The Unity props provided the the Unity component.
|
|
276
276
|
* @param forwardedRef The forwarded ref to the Unity component.
|
|
@@ -291,7 +291,7 @@ function be() {
|
|
|
291
291
|
);
|
|
292
292
|
return L.Unity = m, L;
|
|
293
293
|
}
|
|
294
|
-
var
|
|
294
|
+
var h = {}, k = {}, Q;
|
|
295
295
|
function ee() {
|
|
296
296
|
if (Q) return k;
|
|
297
297
|
Q = 1, Object.defineProperty(k, "__esModule", { value: !0 }), k.errorMessages = void 0;
|
|
@@ -343,7 +343,7 @@ function _e() {
|
|
|
343
343
|
return o.concat(t || Array.prototype.slice.call(n));
|
|
344
344
|
};
|
|
345
345
|
Object.defineProperty(I, "__esModule", { value: !0 }), I.useEventSystem = void 0;
|
|
346
|
-
var c =
|
|
346
|
+
var c = g, a = ee(), y = A(), v = [], b = function(o) {
|
|
347
347
|
for (var n = [], e = 1; e < arguments.length; e++)
|
|
348
348
|
n[e - 1] = arguments[e];
|
|
349
349
|
var u = void 0;
|
|
@@ -409,16 +409,16 @@ var N = {}, J;
|
|
|
409
409
|
function we() {
|
|
410
410
|
if (J) return N;
|
|
411
411
|
J = 1, Object.defineProperty(N, "__esModule", { value: !0 }), N.useNullableState = void 0;
|
|
412
|
-
var l =
|
|
412
|
+
var l = g, c = function(a) {
|
|
413
413
|
return (0, l.useState)(a || null);
|
|
414
414
|
};
|
|
415
415
|
return N.useNullableState = c, N;
|
|
416
416
|
}
|
|
417
417
|
var K;
|
|
418
|
-
function
|
|
419
|
-
if (K) return
|
|
418
|
+
function he() {
|
|
419
|
+
if (K) return h;
|
|
420
420
|
K = 1;
|
|
421
|
-
var l =
|
|
421
|
+
var l = h && h.__awaiter || function(o, n, e, u) {
|
|
422
422
|
function r(t) {
|
|
423
423
|
return t instanceof e ? t : new e(function(d) {
|
|
424
424
|
d(t);
|
|
@@ -444,7 +444,7 @@ function ge() {
|
|
|
444
444
|
}
|
|
445
445
|
i((u = u.apply(o, n || [])).next());
|
|
446
446
|
});
|
|
447
|
-
}, c =
|
|
447
|
+
}, c = h && h.__generator || function(o, n) {
|
|
448
448
|
var e = { label: 0, sent: function() {
|
|
449
449
|
if (t[0] & 1) throw t[1];
|
|
450
450
|
return t[1];
|
|
@@ -504,8 +504,8 @@ function ge() {
|
|
|
504
504
|
return { value: i[0] ? i[1] : void 0, done: !0 };
|
|
505
505
|
}
|
|
506
506
|
};
|
|
507
|
-
Object.defineProperty(
|
|
508
|
-
var a =
|
|
507
|
+
Object.defineProperty(h, "__esModule", { value: !0 }), h.useUnityContext = void 0;
|
|
508
|
+
var a = g, y = ee(), v = _e(), b = we(), m = function(o) {
|
|
509
509
|
var n = (0, b.useNullableState)(), e = n[0], u = n[1], r = (0, a.useState)(0), t = r[0], d = r[1], f = (0, a.useState)(!1), s = f[0], i = f[1], U = (0, b.useNullableState)(), C = U[0], te = U[1], O = (0, v.useEventSystem)(), ne = (0, a.useRef)({
|
|
510
510
|
setLoadingProgression: d,
|
|
511
511
|
setInitialisationError: te,
|
|
@@ -606,23 +606,23 @@ function ge() {
|
|
|
606
606
|
removeEventListener: O.removeEventListener
|
|
607
607
|
};
|
|
608
608
|
};
|
|
609
|
-
return
|
|
609
|
+
return h.useUnityContext = m, h;
|
|
610
610
|
}
|
|
611
611
|
var X;
|
|
612
|
-
function
|
|
612
|
+
function ge() {
|
|
613
613
|
return X || (X = 1, function(l) {
|
|
614
614
|
Object.defineProperty(l, "__esModule", { value: !0 }), l.useUnityContext = l.Unity = void 0;
|
|
615
615
|
var c = be();
|
|
616
616
|
Object.defineProperty(l, "Unity", { enumerable: !0, get: function() {
|
|
617
617
|
return c.Unity;
|
|
618
618
|
} });
|
|
619
|
-
var a =
|
|
619
|
+
var a = he();
|
|
620
620
|
Object.defineProperty(l, "useUnityContext", { enumerable: !0, get: function() {
|
|
621
621
|
return a.useUnityContext;
|
|
622
622
|
} });
|
|
623
623
|
}(j)), j;
|
|
624
624
|
}
|
|
625
|
-
var Y =
|
|
625
|
+
var Y = ge();
|
|
626
626
|
const Le = ce.forwardRef(
|
|
627
627
|
({ className: l, gameLink: c, loadingComponent: a, registerEvents: y, onEventReceived: v }, b) => {
|
|
628
628
|
const {
|
|
@@ -648,11 +648,11 @@ const Le = ce.forwardRef(
|
|
|
648
648
|
const s = (i) => {
|
|
649
649
|
v == null || v(f, i);
|
|
650
650
|
};
|
|
651
|
-
u(f, s),
|
|
651
|
+
u(f, s), d.push({ key: f, event: s });
|
|
652
652
|
}
|
|
653
653
|
return t.current = [...t.current, ...d], () => {
|
|
654
654
|
for (const { key: f, event: s } of t.current)
|
|
655
|
-
|
|
655
|
+
r(f, s);
|
|
656
656
|
t.current = [];
|
|
657
657
|
};
|
|
658
658
|
}, [y, u, r, v]), B(() => {
|