@adiakys/feeling-lucky 0.2.0 → 0.3.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/README.md +53 -1
- package/dist/config/types.d.ts +5 -0
- package/dist/{de-B56NsnDF.js → de-CmzpGbNK.js} +11 -1
- package/dist/developer/panel.d.ts +1 -0
- package/dist/developer/settings.d.ts +1 -0
- package/dist/{es-9iWwCe8s.js → es-k_kS6Fn2.js} +11 -1
- package/dist/feeling-lucky.iife.js +395 -243
- package/dist/feeling-lucky.js +17 -41
- package/dist/{fr-Y2BcCS3U.js → fr-GuCZB1l4.js} +11 -1
- package/dist/games/cards/table.d.ts +3 -1
- package/dist/{i18n-it2FlmVZ.js → i18n-Cid8bj2R.js} +15 -5
- package/dist/icons-DTaPp44c.js +863 -0
- package/dist/{it-CNSOLgaT.js → it-BNztlqHd.js} +11 -1
- package/dist/locales/de/cards.d.ts +7 -0
- package/dist/locales/de/developer.d.ts +3 -0
- package/dist/locales/en/cards.d.ts +7 -0
- package/dist/locales/en/developer.d.ts +3 -0
- package/dist/locales/es/cards.d.ts +7 -0
- package/dist/locales/es/developer.d.ts +3 -0
- package/dist/locales/fr/cards.d.ts +7 -0
- package/dist/locales/fr/developer.d.ts +3 -0
- package/dist/locales/it/cards.d.ts +7 -0
- package/dist/locales/it/developer.d.ts +3 -0
- package/dist/mount-CMm0qSYk.js +6257 -0
- package/dist/multiplayer/blackjack.d.ts +35 -0
- package/dist/multiplayer/client.d.ts +55 -0
- package/dist/multiplayer/holdem.d.ts +21 -0
- package/dist/multiplayer/index.d.ts +2 -0
- package/dist/multiplayer/seats.d.ts +16 -0
- package/dist/multiplayer/shared.d.ts +33 -0
- package/dist/multiplayer-CN0t0j_F.js +502 -0
- package/dist/{panel-tWJMt9kl.js → panel-BVgq3Cm5.js} +158 -145
- package/dist/resolve-Dc48n2Jo.js +28 -0
- package/dist/room/room.d.ts +7 -1
- package/dist/runtime/context.d.ts +2 -1
- package/package.json +2 -2
- package/dist/mount-CBUkAcVV.js +0 -7109
package/dist/feeling-lucky.js
CHANGED
|
@@ -1,47 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var i = async (e) => typeof e == "function" ? e() : e;
|
|
4
|
-
async function a(e) {
|
|
5
|
-
let [t, n, r, a, o, s, c] = await Promise.all([
|
|
6
|
-
i(e.prizes),
|
|
7
|
-
e.locale === void 0 ? void 0 : i(e.locale),
|
|
8
|
-
e.messages === void 0 ? {} : i(e.messages),
|
|
9
|
-
e.player === void 0 ? null : i(e.player),
|
|
10
|
-
e.developer !== void 0 && i(e.developer),
|
|
11
|
-
e.logo === void 0 ? void 0 : i(e.logo),
|
|
12
|
-
e.dealers === void 0 ? void 0 : i(e.dealers)
|
|
13
|
-
]);
|
|
14
|
-
if (!t.length) throw Error("feeling-lucky: at least one prize is needed");
|
|
15
|
-
return {
|
|
16
|
-
prizes: t,
|
|
17
|
-
locale: n,
|
|
18
|
-
messages: r,
|
|
19
|
-
player: a,
|
|
20
|
-
logo: s,
|
|
21
|
-
dealers: c,
|
|
22
|
-
developer: o === !1 ? null : { passwordHash: o === !0 ? void 0 : o.passwordHash },
|
|
23
|
-
onWin: e.onWin,
|
|
24
|
-
onClaim: e.onClaim
|
|
25
|
-
};
|
|
26
|
-
}
|
|
1
|
+
import { n as e } from "./resolve-Dc48n2Jo.js";
|
|
2
|
+
import { a as t, r as n, s as r, t as i } from "./i18n-Cid8bj2R.js";
|
|
27
3
|
// src/index.ts
|
|
28
|
-
function
|
|
29
|
-
let
|
|
4
|
+
function a(r) {
|
|
5
|
+
let a = r, o = null, s = null, c = () => {
|
|
30
6
|
o?.remove(), o = null, s = null;
|
|
31
7
|
};
|
|
32
8
|
return {
|
|
33
|
-
open({ from:
|
|
9
|
+
open({ from: r } = {}) {
|
|
34
10
|
if (o) return;
|
|
35
|
-
|
|
36
|
-
let l =
|
|
11
|
+
t();
|
|
12
|
+
let l = r instanceof Element ? r.getBoundingClientRect() : null, u = l ? {
|
|
37
13
|
x: l.left + l.width / 2,
|
|
38
14
|
y: l.top + l.height / 2
|
|
39
|
-
} :
|
|
15
|
+
} : r;
|
|
40
16
|
o = document.body.appendChild(document.createElement("feeling-lucky"));
|
|
41
17
|
let d = o;
|
|
42
18
|
(async () => {
|
|
43
|
-
let [
|
|
44
|
-
await
|
|
19
|
+
let [t, { mountRoom: r }] = await Promise.all([e(a), import("./mount-CMm0qSYk.js").then((e) => e.t)]);
|
|
20
|
+
await i(t.locale ?? n.value).catch(() => void 0), o === d && (s = r(d, t, u), s.addEventListener("closed", c));
|
|
45
21
|
})().catch((e) => {
|
|
46
22
|
o === d && c(), console.error(e);
|
|
47
23
|
});
|
|
@@ -49,17 +25,17 @@ function o(n) {
|
|
|
49
25
|
close() {
|
|
50
26
|
s ? s.close() : c();
|
|
51
27
|
},
|
|
52
|
-
update(
|
|
53
|
-
|
|
54
|
-
...
|
|
55
|
-
...
|
|
28
|
+
update(t) {
|
|
29
|
+
a = {
|
|
30
|
+
...a,
|
|
31
|
+
...t
|
|
56
32
|
};
|
|
57
|
-
let
|
|
58
|
-
|
|
33
|
+
let n = s;
|
|
34
|
+
n && e(a).then((e) => n === s && (n.config = e));
|
|
59
35
|
},
|
|
60
36
|
destroy() {
|
|
61
37
|
c();
|
|
62
38
|
}
|
|
63
39
|
};
|
|
64
40
|
}
|
|
65
|
-
export {
|
|
41
|
+
export { a as createFeelingLucky, r as en };
|
|
@@ -337,7 +337,14 @@ var t = e({
|
|
|
337
337
|
cards: {
|
|
338
338
|
you: "Vous",
|
|
339
339
|
dealer: "Banque",
|
|
340
|
-
deal: "Distribuer"
|
|
340
|
+
deal: "Distribuer",
|
|
341
|
+
player: "Joueur",
|
|
342
|
+
stand: "Quitter la table",
|
|
343
|
+
sit: "S’asseoir ici",
|
|
344
|
+
chooseSeat: "Choisissez une place",
|
|
345
|
+
dealingIn: "Distribution dans {seconds}s",
|
|
346
|
+
playIn: "{seconds}s pour jouer",
|
|
347
|
+
nextHand: "Vous jouez dès la prochaine main"
|
|
341
348
|
},
|
|
342
349
|
blackjack: {
|
|
343
350
|
print: "La banque reste à 17 · Blackjack de pique\xA0: jackpot",
|
|
@@ -450,6 +457,9 @@ var t = e({
|
|
|
450
457
|
noTheme: "Aucun",
|
|
451
458
|
language: "Langue",
|
|
452
459
|
autoLanguage: "Automatique",
|
|
460
|
+
tables: "Tables de cartes",
|
|
461
|
+
multiplayer: "Multijoueur",
|
|
462
|
+
singlePlayer: "Solo",
|
|
453
463
|
dealer: "Croupier",
|
|
454
464
|
dealerShifts: "Selon les services du jour",
|
|
455
465
|
dealerAbsent: "Absent",
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { type TemplateResult } from 'lit';
|
|
2
2
|
import type { RoomContext } from '../../runtime/context';
|
|
3
3
|
import './dealer';
|
|
4
|
-
export declare
|
|
4
|
+
export declare const silhouette: TemplateResult<1>;
|
|
5
|
+
export declare function cardTable(room: RoomContext, print: string, { dealer, centre, bet, player, seats }: {
|
|
5
6
|
dealer: TemplateResult;
|
|
6
7
|
centre: TemplateResult;
|
|
7
8
|
bet?: TemplateResult;
|
|
8
9
|
player: TemplateResult;
|
|
10
|
+
seats?: TemplateResult;
|
|
9
11
|
}, { on, dealing }: {
|
|
10
12
|
on: number | null;
|
|
11
13
|
dealing: boolean;
|
|
@@ -338,7 +338,14 @@ var n = e({
|
|
|
338
338
|
cards: {
|
|
339
339
|
you: "You",
|
|
340
340
|
dealer: "Dealer",
|
|
341
|
-
deal: "Deal"
|
|
341
|
+
deal: "Deal",
|
|
342
|
+
player: "Player",
|
|
343
|
+
stand: "Stand up",
|
|
344
|
+
sit: "Sit here",
|
|
345
|
+
chooseSeat: "Choose a seat",
|
|
346
|
+
dealingIn: "Dealing in {seconds}s",
|
|
347
|
+
playIn: "{seconds}s to play",
|
|
348
|
+
nextHand: "You're in from the next hand"
|
|
342
349
|
},
|
|
343
350
|
blackjack: {
|
|
344
351
|
print: "Dealer stands on 17 · Blackjack of spades: jackpot",
|
|
@@ -451,15 +458,18 @@ var n = e({
|
|
|
451
458
|
noTheme: "None",
|
|
452
459
|
language: "Language",
|
|
453
460
|
autoLanguage: "Automatic",
|
|
461
|
+
tables: "Card tables",
|
|
462
|
+
multiplayer: "Multiplayer",
|
|
463
|
+
singlePlayer: "Single player",
|
|
454
464
|
dealer: "Dealer",
|
|
455
465
|
dealerShifts: "From the day's shifts",
|
|
456
466
|
dealerAbsent: "Absent",
|
|
457
467
|
dealerNumber: "Dealer {n}"
|
|
458
468
|
} }), r = {
|
|
459
|
-
it: () => import("./it-
|
|
460
|
-
es: () => import("./es-
|
|
461
|
-
fr: () => import("./fr-
|
|
462
|
-
de: () => import("./de-
|
|
469
|
+
it: () => import("./it-BNztlqHd.js"),
|
|
470
|
+
es: () => import("./es-k_kS6Fn2.js"),
|
|
471
|
+
fr: () => import("./fr-GuCZB1l4.js"),
|
|
472
|
+
de: () => import("./de-CmzpGbNK.js")
|
|
463
473
|
}, i = ["en", ...Object.keys(r)], a = { en: n }, o = (e) => a[e], s = (e) => e.every((e) => !r[e] || a[e]);
|
|
464
474
|
async function c(e) {
|
|
465
475
|
await Promise.all(e.filter((e) => r[e] && !a[e]).map(async (e) => a[e] = (await r[e]()).default));
|