speakid-hangman 1.0.7 → 1.0.9
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/dist/components/HangmanLobbyGame.d.ts.map +1 -1
- package/dist/speakid-hangman.cjs.js +2 -2
- package/dist/speakid-hangman.cjs.js.map +1 -1
- package/dist/speakid-hangman.es.js +84 -80
- package/dist/speakid-hangman.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as m, Fragment as G } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useMemo as Q, useCallback as ue, useEffect as me } from "react";
|
|
3
3
|
const a = {
|
|
4
4
|
gmCenterScreen: {
|
|
5
5
|
position: "relative",
|
|
@@ -180,8 +180,10 @@ const a = {
|
|
|
180
180
|
// ✅ Обновлено только для качества логотипа (размер как в magic-sentence)
|
|
181
181
|
gmLogoFixed: {
|
|
182
182
|
position: "absolute",
|
|
183
|
-
top: "
|
|
184
|
-
|
|
183
|
+
top: "24px",
|
|
184
|
+
// ✅ Увеличен отступ сверху для большего пространства
|
|
185
|
+
left: "24px",
|
|
186
|
+
// ✅ Увеличен отступ слева для большего пространства
|
|
185
187
|
width: "auto",
|
|
186
188
|
zIndex: 30,
|
|
187
189
|
// ✅ Унифицирован zIndex для консистентности
|
|
@@ -203,12 +205,12 @@ const a = {
|
|
|
203
205
|
}
|
|
204
206
|
};
|
|
205
207
|
function He({
|
|
206
|
-
mistakes:
|
|
208
|
+
mistakes: r,
|
|
207
209
|
maxMistakes: J,
|
|
208
210
|
size: _ = 200
|
|
209
211
|
}) {
|
|
210
|
-
const c = _, g = _ * 1.25, w = Math.max(3, _ / 100), C = 10 * (c / 200), x = 240 * (g / 250), y = 150 * (c / 200), b = 80 * (c / 200), ee = 20 * (g / 250), N = 240 * (g / 250), M = 80 * (c / 200), P = 20 * (g / 250), L = 150 * (c / 200), H = 150 * (c / 200), v = 20 * (g / 250), I = 50 * (g / 250), F = 150 * (c / 200), R = 70 * (g / 250), V = 20 * (c / 200), T = 150 * (c / 200), te = 90 * (g / 250), A = 150 * (g / 250), f = 150 * (c / 200), B = 110 * (g / 250), p = 130 * (c / 200), O = 130 * (g / 250), ne = 150 * (c / 200), E = 110 * (g / 250),
|
|
211
|
-
return /* @__PURE__ */
|
|
212
|
+
const c = _, g = _ * 1.25, w = Math.max(3, _ / 100), C = 10 * (c / 200), x = 240 * (g / 250), y = 150 * (c / 200), b = 80 * (c / 200), ee = 20 * (g / 250), N = 240 * (g / 250), M = 80 * (c / 200), P = 20 * (g / 250), L = 150 * (c / 200), H = 150 * (c / 200), v = 20 * (g / 250), I = 50 * (g / 250), F = 150 * (c / 200), R = 70 * (g / 250), V = 20 * (c / 200), T = 150 * (c / 200), te = 90 * (g / 250), A = 150 * (g / 250), f = 150 * (c / 200), B = 110 * (g / 250), p = 130 * (c / 200), O = 130 * (g / 250), ne = 150 * (c / 200), E = 110 * (g / 250), he = 170 * (c / 200), z = 130 * (g / 250), oe = 150 * (c / 200), Z = 150 * (g / 250), d = 130 * (c / 200), re = 190 * (g / 250), j = 150 * (c / 200), ie = 150 * (g / 250), u = 170 * (c / 200), ae = 190 * (g / 250), k = r === 0 || r <= J * 0.5 ? "#1f2937" : r <= J * 0.75 ? "#f59e0b" : "#ec4c44";
|
|
213
|
+
return /* @__PURE__ */ m(
|
|
212
214
|
"svg",
|
|
213
215
|
{
|
|
214
216
|
width: c,
|
|
@@ -225,7 +227,7 @@ function He({
|
|
|
225
227
|
// ✅ Включение аппаратного ускорения на iOS
|
|
226
228
|
},
|
|
227
229
|
children: [
|
|
228
|
-
|
|
230
|
+
r > 0 && /* @__PURE__ */ o(
|
|
229
231
|
"line",
|
|
230
232
|
{
|
|
231
233
|
x1: C,
|
|
@@ -236,7 +238,7 @@ function He({
|
|
|
236
238
|
strokeWidth: w
|
|
237
239
|
}
|
|
238
240
|
),
|
|
239
|
-
|
|
241
|
+
r > 1 && /* @__PURE__ */ o(
|
|
240
242
|
"line",
|
|
241
243
|
{
|
|
242
244
|
x1: b,
|
|
@@ -247,7 +249,7 @@ function He({
|
|
|
247
249
|
strokeWidth: w
|
|
248
250
|
}
|
|
249
251
|
),
|
|
250
|
-
|
|
252
|
+
r > 2 && /* @__PURE__ */ o(
|
|
251
253
|
"line",
|
|
252
254
|
{
|
|
253
255
|
x1: M,
|
|
@@ -258,7 +260,7 @@ function He({
|
|
|
258
260
|
strokeWidth: w
|
|
259
261
|
}
|
|
260
262
|
),
|
|
261
|
-
|
|
263
|
+
r > 3 && /* @__PURE__ */ o(
|
|
262
264
|
"line",
|
|
263
265
|
{
|
|
264
266
|
x1: H,
|
|
@@ -269,7 +271,7 @@ function He({
|
|
|
269
271
|
strokeWidth: w
|
|
270
272
|
}
|
|
271
273
|
),
|
|
272
|
-
|
|
274
|
+
r > 4 && /* @__PURE__ */ o(
|
|
273
275
|
"circle",
|
|
274
276
|
{
|
|
275
277
|
cx: F,
|
|
@@ -280,7 +282,7 @@ function He({
|
|
|
280
282
|
strokeWidth: w
|
|
281
283
|
}
|
|
282
284
|
),
|
|
283
|
-
|
|
285
|
+
r > 5 && /* @__PURE__ */ o(
|
|
284
286
|
"line",
|
|
285
287
|
{
|
|
286
288
|
x1: T,
|
|
@@ -291,7 +293,7 @@ function He({
|
|
|
291
293
|
strokeWidth: w
|
|
292
294
|
}
|
|
293
295
|
),
|
|
294
|
-
|
|
296
|
+
r > 6 && /* @__PURE__ */ o(
|
|
295
297
|
"line",
|
|
296
298
|
{
|
|
297
299
|
x1: f,
|
|
@@ -302,18 +304,18 @@ function He({
|
|
|
302
304
|
strokeWidth: w
|
|
303
305
|
}
|
|
304
306
|
),
|
|
305
|
-
|
|
307
|
+
r > 7 && /* @__PURE__ */ o(
|
|
306
308
|
"line",
|
|
307
309
|
{
|
|
308
310
|
x1: ne,
|
|
309
311
|
y1: E,
|
|
310
|
-
x2:
|
|
312
|
+
x2: he,
|
|
311
313
|
y2: z,
|
|
312
314
|
stroke: k,
|
|
313
315
|
strokeWidth: w
|
|
314
316
|
}
|
|
315
317
|
),
|
|
316
|
-
|
|
318
|
+
r > 8 && /* @__PURE__ */ o(
|
|
317
319
|
"line",
|
|
318
320
|
{
|
|
319
321
|
x1: oe,
|
|
@@ -324,7 +326,7 @@ function He({
|
|
|
324
326
|
strokeWidth: w
|
|
325
327
|
}
|
|
326
328
|
),
|
|
327
|
-
|
|
329
|
+
r > 9 && /* @__PURE__ */ o(
|
|
328
330
|
"line",
|
|
329
331
|
{
|
|
330
332
|
x1: j,
|
|
@@ -340,7 +342,7 @@ function He({
|
|
|
340
342
|
);
|
|
341
343
|
}
|
|
342
344
|
function Ye({
|
|
343
|
-
gameCubeSize:
|
|
345
|
+
gameCubeSize: r = 400,
|
|
344
346
|
screenHeight: J = 800,
|
|
345
347
|
screenWidth: _ = 800,
|
|
346
348
|
logoUrl: c,
|
|
@@ -365,10 +367,10 @@ function Ye({
|
|
|
365
367
|
Environment: ["tree", "forest", "air", "water", "pollution", "recycle", "nature", "clean", "waste", "plastic", "energy", "animal", "climate", "earth", "ocean", "river", "planet", "save", "green", "environment", "litter", "organic"],
|
|
366
368
|
Space: ["planet", "star", "sun", "moon", "astronaut", "rocket", "space", "galaxy", "universe", "telescope", "comet", "asteroid", "orbit", "gravity", "alien", "spaceship", "mars", "satellite", "sky", "eclipse"],
|
|
367
369
|
Devices: ["computer", "laptop", "phone", "tablet", "tv", "keyboard", "mouse", "printer", "camera", "headphones", "charger", "screen", "watch", "microphone", "speaker", "console", "router", "battery", "cable", "remote"]
|
|
368
|
-
}, [x, y] =
|
|
369
|
-
const e = (p ||
|
|
370
|
+
}, [x, y] = h("lobby"), [b, ee] = h(""), [N] = h("Normal"), [M, P] = h(0), [L, H] = h(1), [v, I] = h(""), [F, R] = h([]), [V, T] = h(0), [te, A] = h(0), [f, B] = h(null), [p, O] = h(null), [ne, E] = h(1), [he, z] = h([]), oe = N === "Easy" ? 8 : N === "Normal" ? 6 : 4, Z = w || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman` : "/cloud/speakid/games/hangman"), [d, re] = h(!1), [j, ie] = h(!1), [u, ae] = h(!1), [$, k] = h(!1), s = Q(() => {
|
|
371
|
+
const e = (p || r || 1e3) / 400, t = u ? 0.8 : 1, i = $ ? 0.9 : 1, l = t * i;
|
|
370
372
|
return {
|
|
371
|
-
headline1: d ? Math.max(24, Math.min(30, 30 * e * l)) : Math.max(28, Math.min(32, 32 * e *
|
|
373
|
+
headline1: d ? Math.max(24, Math.min(30, 30 * e * l)) : Math.max(28, Math.min(32, 32 * e * i)),
|
|
372
374
|
// Desktop: 32px
|
|
373
375
|
headline2: Math.max(20, Math.min(28, 24 * e * l)),
|
|
374
376
|
// Desktop: 24px
|
|
@@ -385,25 +387,25 @@ function Ye({
|
|
|
385
387
|
button: Math.max(12, Math.min(18, 16 * e * l))
|
|
386
388
|
// Desktop: 16px
|
|
387
389
|
};
|
|
388
|
-
}, [d, p,
|
|
389
|
-
const e = (p ||
|
|
390
|
-
return j ? Math.max(8, Math.min(12, 10 * e)) : Math.max(12, Math.min(24, 16 * e)) * t *
|
|
391
|
-
}, [j, p,
|
|
392
|
-
const e = (p ||
|
|
393
|
-
return j ? Math.max(3, Math.min(6, 5 * e)) : Math.max(4, Math.min(12, 8 * e)) * t *
|
|
394
|
-
}, [j, p,
|
|
395
|
-
const e = (p ||
|
|
390
|
+
}, [d, p, r, u, $]), fe = Q(() => {
|
|
391
|
+
const e = (p || r || 1e3) / 400, t = u ? 0.65 : 1, i = $ ? 0.85 : 1;
|
|
392
|
+
return j ? Math.max(8, Math.min(12, 10 * e)) : Math.max(12, Math.min(24, 16 * e)) * t * i;
|
|
393
|
+
}, [j, p, r, u, $]), n = Q(() => {
|
|
394
|
+
const e = (p || r || 1e3) / 400, t = u ? 0.65 : 1, i = $ ? 0.85 : 1;
|
|
395
|
+
return j ? Math.max(3, Math.min(6, 5 * e)) : Math.max(4, Math.min(12, 8 * e)) * t * i;
|
|
396
|
+
}, [j, p, r, u, $]), S = Q(() => {
|
|
397
|
+
const e = (p || r || 1e3) / 400, t = $ ? 0.9 : 1;
|
|
396
398
|
return Math.max(6, Math.min(10, 8 * e * t));
|
|
397
|
-
}, [p,
|
|
399
|
+
}, [p, r, $]), we = (e, t) => e.split("").every((i) => t.includes(i)), ke = (e, t) => e.split("").map((i) => t.includes(i) ? i : "_").join(" "), Me = (e) => "abcdefghijklmnopqrstuvwxyz".split("").filter((i) => !e.includes(i)), U = (e, t = []) => {
|
|
398
400
|
var q;
|
|
399
401
|
if (!e || !C[e]) {
|
|
400
402
|
const W = Object.keys(C)[0];
|
|
401
403
|
return ((q = C[W]) == null ? void 0 : q[0]) || "";
|
|
402
404
|
}
|
|
403
|
-
const
|
|
404
|
-
if (!
|
|
405
|
+
const i = C[e];
|
|
406
|
+
if (!i || i.length === 0)
|
|
405
407
|
return "";
|
|
406
|
-
const l =
|
|
408
|
+
const l = i.filter((W) => !t.includes(W)), Y = l.length > 0 ? l : i;
|
|
407
409
|
if (Y.length === 0)
|
|
408
410
|
return "";
|
|
409
411
|
let D;
|
|
@@ -427,11 +429,11 @@ function Ye({
|
|
|
427
429
|
}, se = ue((e) => {
|
|
428
430
|
if (x !== "game" || f !== null) return;
|
|
429
431
|
const t = e.toLowerCase();
|
|
430
|
-
/^[a-z]$/.test(t) && (R((
|
|
432
|
+
/^[a-z]$/.test(t) && (R((i) => i.includes(t) ? i : [...i, t]), I((i) => (i && !i.includes(t) && T((l) => l + 1), i)));
|
|
431
433
|
}, [x, f]), le = ue((e) => {
|
|
432
434
|
se(e.key);
|
|
433
435
|
}, [se]);
|
|
434
|
-
|
|
436
|
+
me(() => {
|
|
435
437
|
if (x === "game")
|
|
436
438
|
return window.addEventListener("keydown", le), () => window.removeEventListener("keydown", le);
|
|
437
439
|
}, [x, le]);
|
|
@@ -445,7 +447,7 @@ function Ye({
|
|
|
445
447
|
return t ? (I(t), [...e, t]) : e;
|
|
446
448
|
}), R([]), T(0), B(null);
|
|
447
449
|
}, [b, L, M]);
|
|
448
|
-
|
|
450
|
+
me(() => {
|
|
449
451
|
if (xe && f === null) {
|
|
450
452
|
B("win"), A((t) => t + 1);
|
|
451
453
|
const e = setTimeout(() => {
|
|
@@ -471,23 +473,23 @@ function Ye({
|
|
|
471
473
|
return t ? (I(t), [...e, t]) : e;
|
|
472
474
|
}), R([]), T(0), B(null);
|
|
473
475
|
};
|
|
474
|
-
|
|
476
|
+
me(() => {
|
|
475
477
|
const e = () => {
|
|
476
|
-
const t = window.innerWidth,
|
|
478
|
+
const t = window.innerWidth, i = window.innerHeight, l = t < 768 || t === 926 && i === 428 || t === 932 && i === 430, Y = i < 700, D = t / i > 1.8, q = t === 1024 && i === 600, W = l && t > i, ge = t >= 1200 && t <= 1400;
|
|
477
479
|
if (re(l), ie(q), ae(W), k(ge), l)
|
|
478
480
|
O(null), E(1);
|
|
479
481
|
else if (Y)
|
|
480
482
|
O(null), E(1);
|
|
481
483
|
else {
|
|
482
|
-
const ze = t - 80, We =
|
|
484
|
+
const ze = t - 80, We = i - 80, be = Math.min(ze, We);
|
|
483
485
|
let pe;
|
|
484
|
-
|
|
486
|
+
r && r >= 320 ? pe = Math.min(r, be) : pe = Math.min(1e3, be * 0.9);
|
|
485
487
|
const Ce = Math.max(400, Math.min(1200, pe));
|
|
486
488
|
O(Ce), E(D ? 0.85 : 1);
|
|
487
489
|
}
|
|
488
490
|
};
|
|
489
491
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
490
|
-
}, [
|
|
492
|
+
}, [r]);
|
|
491
493
|
const K = `
|
|
492
494
|
<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" style="position: absolute; top: 0; left: 0; pointer-events: none; opacity: 0.2;">
|
|
493
495
|
<!-- Каракули мелками и фломастерами -->
|
|
@@ -537,8 +539,8 @@ function Ye({
|
|
|
537
539
|
width: "100%",
|
|
538
540
|
height: "100%",
|
|
539
541
|
padding: `${fe}px`,
|
|
540
|
-
paddingTop: de ? "
|
|
541
|
-
// ✅ Резервируем
|
|
542
|
+
paddingTop: de ? "80px" : `${fe}px`,
|
|
543
|
+
// ✅ Резервируем больше места под логотип (24px top + 28px высота + 28px отступ)
|
|
542
544
|
overflow: $ ? "hidden" : "auto",
|
|
543
545
|
// ✅ Для разрешений 1200-1400 убираем скролл
|
|
544
546
|
position: "relative",
|
|
@@ -546,22 +548,24 @@ function Ye({
|
|
|
546
548
|
background: "transparent"
|
|
547
549
|
}, X = Q(
|
|
548
550
|
() => {
|
|
549
|
-
|
|
550
|
-
if (d && e > t || t < 700 || !de)
|
|
551
|
+
if (!de)
|
|
551
552
|
return null;
|
|
552
|
-
const
|
|
553
|
-
|
|
553
|
+
const e = window.innerWidth;
|
|
554
|
+
if (d && e > window.innerHeight)
|
|
555
|
+
return null;
|
|
556
|
+
const t = c || (typeof window < "u" && window.origin ? `${window.origin}/cloud/speakid/games/hangman/logo` : "/cloud/speakid/games/hangman/logo");
|
|
557
|
+
return /* @__PURE__ */ o("div", { style: a.gmLogoFixed, children: /* @__PURE__ */ m("picture", { children: [
|
|
554
558
|
/* @__PURE__ */ o(
|
|
555
559
|
"source",
|
|
556
560
|
{
|
|
557
|
-
srcSet: `${
|
|
561
|
+
srcSet: `${t}.svg`,
|
|
558
562
|
type: "image/svg+xml"
|
|
559
563
|
}
|
|
560
564
|
),
|
|
561
565
|
/* @__PURE__ */ o(
|
|
562
566
|
"img",
|
|
563
567
|
{
|
|
564
|
-
src: `${
|
|
568
|
+
src: `${t}.png`,
|
|
565
569
|
alt: "SPEAKID Logo",
|
|
566
570
|
style: a.gmLogoImg,
|
|
567
571
|
loading: "lazy"
|
|
@@ -570,7 +574,7 @@ function Ye({
|
|
|
570
574
|
] }) });
|
|
571
575
|
},
|
|
572
576
|
[d, de, c, x]
|
|
573
|
-
), Be = () => x === "lobby" ? /* @__PURE__ */
|
|
577
|
+
), Be = () => x === "lobby" ? /* @__PURE__ */ m(G, { children: [
|
|
574
578
|
X,
|
|
575
579
|
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
|
|
576
580
|
/* @__PURE__ */ o("h1", { style: {
|
|
@@ -580,7 +584,7 @@ function Ye({
|
|
|
580
584
|
position: "relative",
|
|
581
585
|
zIndex: 1
|
|
582
586
|
}, children: "HANGMAN" }),
|
|
583
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ m(
|
|
584
588
|
"button",
|
|
585
589
|
{
|
|
586
590
|
onClick: () => y("category"),
|
|
@@ -637,7 +641,7 @@ function Ye({
|
|
|
637
641
|
]
|
|
638
642
|
}
|
|
639
643
|
),
|
|
640
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ m("div", { style: {
|
|
641
645
|
position: "absolute",
|
|
642
646
|
top: "50%",
|
|
643
647
|
left: "50%",
|
|
@@ -657,7 +661,7 @@ function Ye({
|
|
|
657
661
|
left: d ? "-10%" : "5%",
|
|
658
662
|
top: "20%",
|
|
659
663
|
width: "auto",
|
|
660
|
-
height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p ||
|
|
664
|
+
height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || r || 1e3) * 0.33, 300)}px`,
|
|
661
665
|
maxHeight: "33vh",
|
|
662
666
|
objectFit: "contain",
|
|
663
667
|
opacity: 0.6
|
|
@@ -674,7 +678,7 @@ function Ye({
|
|
|
674
678
|
right: d ? "5%" : "10%",
|
|
675
679
|
bottom: "10%",
|
|
676
680
|
width: "auto",
|
|
677
|
-
height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p ||
|
|
681
|
+
height: d ? `${Math.min(window.innerHeight * 0.33, 200)}px` : `${Math.min((p || r || 1e3) * 0.33, 300)}px`,
|
|
678
682
|
maxHeight: "33vh",
|
|
679
683
|
objectFit: "contain",
|
|
680
684
|
opacity: 0.6
|
|
@@ -682,7 +686,7 @@ function Ye({
|
|
|
682
686
|
}
|
|
683
687
|
)
|
|
684
688
|
] })
|
|
685
|
-
] }) : x === "category" ? /* @__PURE__ */
|
|
689
|
+
] }) : x === "category" ? /* @__PURE__ */ m(G, { children: [
|
|
686
690
|
X,
|
|
687
691
|
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
|
|
688
692
|
/* @__PURE__ */ o(
|
|
@@ -702,9 +706,9 @@ function Ye({
|
|
|
702
706
|
padding: `${n}px ${n * 1.5}px`,
|
|
703
707
|
borderRadius: `${S}px`,
|
|
704
708
|
position: "absolute",
|
|
705
|
-
top: "
|
|
706
|
-
// ✅ Под логотипом (
|
|
707
|
-
left: "
|
|
709
|
+
top: "60px",
|
|
710
|
+
// ✅ Под логотипом (24px top логотипа + 28px высота + 8px отступ)
|
|
711
|
+
left: "24px",
|
|
708
712
|
// ✅ Та же позиция что и логотип
|
|
709
713
|
zIndex: 10
|
|
710
714
|
},
|
|
@@ -742,7 +746,7 @@ function Ye({
|
|
|
742
746
|
},
|
|
743
747
|
e
|
|
744
748
|
)) })
|
|
745
|
-
] }) : x === "rounds" ? /* @__PURE__ */
|
|
749
|
+
] }) : x === "rounds" ? /* @__PURE__ */ m(G, { children: [
|
|
746
750
|
X,
|
|
747
751
|
/* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
|
|
748
752
|
/* @__PURE__ */ o(
|
|
@@ -762,9 +766,9 @@ function Ye({
|
|
|
762
766
|
padding: `${n}px ${n * 1.5}px`,
|
|
763
767
|
borderRadius: `${S}px`,
|
|
764
768
|
position: "absolute",
|
|
765
|
-
top: "
|
|
766
|
-
// ✅ Под логотипом (
|
|
767
|
-
left: "
|
|
769
|
+
top: "60px",
|
|
770
|
+
// ✅ Под логотипом (24px top логотипа + 28px высота + 8px отступ)
|
|
771
|
+
left: "24px",
|
|
768
772
|
// ✅ Та же позиция что и логотип
|
|
769
773
|
zIndex: 10
|
|
770
774
|
},
|
|
@@ -803,30 +807,30 @@ function Ye({
|
|
|
803
807
|
},
|
|
804
808
|
e
|
|
805
809
|
)) })
|
|
806
|
-
] }) : x === "game" ? /* @__PURE__ */
|
|
810
|
+
] }) : x === "game" ? /* @__PURE__ */ m(G, { children: [
|
|
807
811
|
X,
|
|
808
812
|
!u && /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: K } }),
|
|
809
813
|
" ",
|
|
810
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ m("div", { style: {
|
|
811
815
|
...a.gmInfoBox,
|
|
812
816
|
padding: `${u ? n * 0.6 : n * 0.8}px`,
|
|
813
817
|
// ✅ Уменьшаем padding в landscape
|
|
814
818
|
marginBottom: `${u ? n * 0.3 : n * 0.5}px`,
|
|
815
819
|
// ✅ Уменьшаем margin в landscape
|
|
816
|
-
maxWidth: `${(p ||
|
|
820
|
+
maxWidth: `${(p || r) * 0.9}px`
|
|
817
821
|
}, children: [
|
|
818
|
-
/* @__PURE__ */
|
|
822
|
+
/* @__PURE__ */ m("h3", { style: { ...a.gmHeadline3, fontSize: `${s.headline3}px`, marginBottom: `${n * 0.5}px` }, children: [
|
|
819
823
|
"Category: ",
|
|
820
824
|
b
|
|
821
825
|
] }),
|
|
822
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ m("p", { style: { ...a.gmBodyM, fontSize: `${s.bodyM}px`, marginBottom: "0px" }, children: [
|
|
823
827
|
"Round ",
|
|
824
828
|
L,
|
|
825
829
|
" of ",
|
|
826
830
|
M
|
|
827
831
|
] })
|
|
828
832
|
] }),
|
|
829
|
-
v && /* @__PURE__ */
|
|
833
|
+
v && /* @__PURE__ */ m("p", { style: {
|
|
830
834
|
...a.gmBodyS,
|
|
831
835
|
fontSize: `${s.bodyS}px`,
|
|
832
836
|
marginTop: `${u ? n * 0.3 : n * 0.5}px`,
|
|
@@ -849,7 +853,7 @@ function Ye({
|
|
|
849
853
|
{
|
|
850
854
|
mistakes: V,
|
|
851
855
|
maxMistakes: oe,
|
|
852
|
-
size: j ? Math.max(80, Math.min(110, (p ||
|
|
856
|
+
size: j ? Math.max(80, Math.min(110, (p || r) * 0.16)) : d ? u ? Math.max(70, Math.min(120, Math.min(window.innerWidth * 0.25, window.innerHeight * 0.15))) : Math.max(100, Math.min(150, Math.min(window.innerWidth * 0.3, window.innerHeight * 0.2))) : Math.max(100, Math.min(150, (p || r) * 0.2))
|
|
853
857
|
}
|
|
854
858
|
) }),
|
|
855
859
|
/* @__PURE__ */ o("div", { style: {
|
|
@@ -860,7 +864,7 @@ function Ye({
|
|
|
860
864
|
letterSpacing: `${n * 0.8}px`,
|
|
861
865
|
minHeight: `${Math.max(16, Math.min(24, s.wordDisplay * 0.9)) * 1.2}px`
|
|
862
866
|
}, children: Se || "Loading..." }),
|
|
863
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ m("div", { style: {
|
|
864
868
|
...a.gmInfoBox,
|
|
865
869
|
padding: `${u ? n * 0.6 : n}px`,
|
|
866
870
|
// ✅ Уменьшаем padding в landscape
|
|
@@ -868,7 +872,7 @@ function Ye({
|
|
|
868
872
|
// ✅ Уменьшаем margin в landscape
|
|
869
873
|
marginBottom: `${u ? n * 0.5 : n}px`,
|
|
870
874
|
// ✅ Уменьшаем margin в landscape
|
|
871
|
-
maxWidth: `${(p ||
|
|
875
|
+
maxWidth: `${(p || r) * 0.95}px`
|
|
872
876
|
}, children: [
|
|
873
877
|
/* @__PURE__ */ o("p", { style: {
|
|
874
878
|
...a.gmBodyS,
|
|
@@ -901,7 +905,7 @@ function Ye({
|
|
|
901
905
|
background: "#f9f9f9",
|
|
902
906
|
color: "#1f2937",
|
|
903
907
|
border: "1px solid #e5e7eb",
|
|
904
|
-
minWidth: `${Math.max(n * 1.5, (p ||
|
|
908
|
+
minWidth: `${Math.max(n * 1.5, (p || r) * 0.04)}px`,
|
|
905
909
|
textAlign: "center",
|
|
906
910
|
display: "inline-block",
|
|
907
911
|
cursor: f === null ? "pointer" : "default",
|
|
@@ -919,7 +923,7 @@ function Ye({
|
|
|
919
923
|
fontSize: `${Math.max(10, Math.min(12, s.bodyS * 0.85))}px`,
|
|
920
924
|
marginTop: `${n * 0.5}px`,
|
|
921
925
|
marginBottom: "2px"
|
|
922
|
-
}, children: /* @__PURE__ */
|
|
926
|
+
}, children: /* @__PURE__ */ m("span", { style: { color: "#6b7280" }, children: [
|
|
923
927
|
"Guessed letters: ",
|
|
924
928
|
/* @__PURE__ */ o("strong", { children: F.join(", ") })
|
|
925
929
|
] }) }),
|
|
@@ -928,7 +932,7 @@ function Ye({
|
|
|
928
932
|
fontSize: `${s.bodyL}px`,
|
|
929
933
|
margin: "2px 0"
|
|
930
934
|
}, children: "🎉 You won this round!" }),
|
|
931
|
-
f === "lose" && /* @__PURE__ */
|
|
935
|
+
f === "lose" && /* @__PURE__ */ m("div", { style: {
|
|
932
936
|
...a.gmStatusLose,
|
|
933
937
|
fontSize: `${s.bodyL}px`,
|
|
934
938
|
margin: "2px 0"
|
|
@@ -980,14 +984,14 @@ function Ye({
|
|
|
980
984
|
marginTop: `${n}px`,
|
|
981
985
|
marginBottom: `${n}px`
|
|
982
986
|
}, children: "Type a letter on your keyboard" })
|
|
983
|
-
] }) : x === "result" ? /* @__PURE__ */
|
|
987
|
+
] }) : x === "result" ? /* @__PURE__ */ m(G, { children: [
|
|
984
988
|
X,
|
|
985
989
|
/* @__PURE__ */ o("h1", { style: {
|
|
986
990
|
...a.gmHeadline1,
|
|
987
991
|
fontSize: `${s.headline1}px`,
|
|
988
992
|
marginBottom: `${n * 2}px`
|
|
989
993
|
}, children: "🎊 Game Finished!" }),
|
|
990
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ m("p", { style: {
|
|
991
995
|
...a.gmBodyL,
|
|
992
996
|
fontSize: `${s.bodyL}px`,
|
|
993
997
|
marginBottom: `${n * 2}px`
|
|
@@ -998,7 +1002,7 @@ function Ye({
|
|
|
998
1002
|
/* @__PURE__ */ o("strong", { children: M }),
|
|
999
1003
|
" words correctly."
|
|
1000
1004
|
] }),
|
|
1001
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ m("div", { style: {
|
|
1002
1006
|
display: "flex",
|
|
1003
1007
|
flexDirection: "column",
|
|
1004
1008
|
gap: `${n}px`,
|
|
@@ -1076,8 +1080,8 @@ function Ye({
|
|
|
1076
1080
|
"div",
|
|
1077
1081
|
{
|
|
1078
1082
|
style: {
|
|
1079
|
-
width: d ? "100%" : p ||
|
|
1080
|
-
height: d ? "100%" : p ||
|
|
1083
|
+
width: d ? "100%" : p || r || 1e3,
|
|
1084
|
+
height: d ? "100%" : p || r || 1e3,
|
|
1081
1085
|
display: "flex",
|
|
1082
1086
|
justifyContent: "center",
|
|
1083
1087
|
alignItems: "center",
|