@adiakys/feeling-lucky 0.1.0 → 0.2.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.
Files changed (35) hide show
  1. package/README.md +20 -4
  2. package/dist/config/types.d.ts +6 -0
  3. package/dist/{de-Cp-ILcpM.js → de-B56NsnDF.js} +8 -2
  4. package/dist/developer/panel.d.ts +1 -0
  5. package/dist/developer/settings.d.ts +1 -0
  6. package/dist/engine/dealer.d.ts +21 -0
  7. package/dist/{es-DHZIstf4.js → es-9iWwCe8s.js} +8 -2
  8. package/dist/feeling-lucky.iife.js +259 -243
  9. package/dist/feeling-lucky.js +6 -4
  10. package/dist/{fr-BPFoerSF.js → fr-Y2BcCS3U.js} +8 -2
  11. package/dist/games/blackjack/blackjack.d.ts +1 -0
  12. package/dist/games/cards/dealer.d.ts +9 -0
  13. package/dist/games/cards/table.d.ts +4 -0
  14. package/dist/games/holdem/holdem.d.ts +2 -0
  15. package/dist/{i18n-CihzHMU5.js → i18n-it2FlmVZ.js} +12 -6
  16. package/dist/{it-B95CFDto.js → it-CNSOLgaT.js} +8 -2
  17. package/dist/locales/de/developer.d.ts +4 -0
  18. package/dist/locales/de/room.d.ts +2 -0
  19. package/dist/locales/en/developer.d.ts +4 -0
  20. package/dist/locales/en/room.d.ts +2 -0
  21. package/dist/locales/es/developer.d.ts +4 -0
  22. package/dist/locales/es/room.d.ts +2 -0
  23. package/dist/locales/fr/developer.d.ts +4 -0
  24. package/dist/locales/fr/room.d.ts +2 -0
  25. package/dist/locales/it/developer.d.ts +4 -0
  26. package/dist/locales/it/room.d.ts +2 -0
  27. package/dist/{mount-BxDaFww2.js → mount-CBUkAcVV.js} +937 -862
  28. package/dist/{panel-D1hKmQL7.js → panel-tWJMt9kl.js} +16 -1
  29. package/dist/room/boost.d.ts +1 -1
  30. package/dist/room/lobby.d.ts +1 -0
  31. package/dist/room/room.d.ts +5 -1
  32. package/dist/room/stage.d.ts +2 -1
  33. package/dist/runtime/context.d.ts +2 -1
  34. package/dist/runtime/sound.d.ts +1 -1
  35. package/package.json +1 -1
@@ -1,14 +1,15 @@
1
- import { a as e, r as t, s as n, t as r } from "./i18n-CihzHMU5.js";
1
+ import { a as e, r as t, s as n, t as r } from "./i18n-it2FlmVZ.js";
2
2
  // src/config/resolve.ts
3
3
  var i = async (e) => typeof e == "function" ? e() : e;
4
4
  async function a(e) {
5
- let [t, n, r, a, o, s] = await Promise.all([
5
+ let [t, n, r, a, o, s, c] = await Promise.all([
6
6
  i(e.prizes),
7
7
  e.locale === void 0 ? void 0 : i(e.locale),
8
8
  e.messages === void 0 ? {} : i(e.messages),
9
9
  e.player === void 0 ? null : i(e.player),
10
10
  e.developer !== void 0 && i(e.developer),
11
- e.logo === void 0 ? void 0 : i(e.logo)
11
+ e.logo === void 0 ? void 0 : i(e.logo),
12
+ e.dealers === void 0 ? void 0 : i(e.dealers)
12
13
  ]);
13
14
  if (!t.length) throw Error("feeling-lucky: at least one prize is needed");
14
15
  return {
@@ -17,6 +18,7 @@ async function a(e) {
17
18
  messages: r,
18
19
  player: a,
19
20
  logo: s,
21
+ dealers: c,
20
22
  developer: o === !1 ? null : { passwordHash: o === !0 ? void 0 : o.passwordHash },
21
23
  onWin: e.onWin,
22
24
  onClaim: e.onClaim
@@ -38,7 +40,7 @@ function o(n) {
38
40
  o = document.body.appendChild(document.createElement("feeling-lucky"));
39
41
  let d = o;
40
42
  (async () => {
41
- let [e, { mountRoom: n }] = await Promise.all([a(i), import("./mount-BxDaFww2.js").then((e) => e.t)]);
43
+ let [e, { mountRoom: n }] = await Promise.all([a(i), import("./mount-CBUkAcVV.js").then((e) => e.t)]);
42
44
  await r(e.locale ?? t.value).catch(() => void 0), o === d && (s = n(d, e, u), s.addEventListener("closed", c));
43
45
  })().catch((e) => {
44
46
  o === d && c(), console.error(e);
@@ -34,7 +34,9 @@ var t = e({
34
34
  boost: {
35
35
  badge: "×{n}",
36
36
  title: "Bonus du jour",
37
- odds: "Bonus du jour\xA0: gains {n} fois plus probables"
37
+ odds: "Bonus du jour\xA0: gains {n} fois plus probables",
38
+ dealer: "Croupier à la table",
39
+ dealerOdds: "Croupier à la table : gains {n} fois plus probables"
38
40
  },
39
41
  themes: {
40
42
  christmas: {
@@ -447,6 +449,10 @@ var t = e({
447
449
  calendar: "D'après le calendrier",
448
450
  noTheme: "Aucun",
449
451
  language: "Langue",
450
- autoLanguage: "Automatique"
452
+ autoLanguage: "Automatique",
453
+ dealer: "Croupier",
454
+ dealerShifts: "Selon les services du jour",
455
+ dealerAbsent: "Absent",
456
+ dealerNumber: "Croupier {n}"
451
457
  } });
452
458
  export { t as default };
@@ -19,6 +19,7 @@ export declare class Blackjack extends LuckyElement {
19
19
  private prizeId;
20
20
  private tier;
21
21
  private pace;
22
+ constructor();
22
23
  protected willUpdate(): void;
23
24
  private get betting();
24
25
  private get left();
@@ -0,0 +1,9 @@
1
+ import { nothing } from 'lit';
2
+ import { LuckyElement } from '../../runtime/element';
3
+ export declare class DealerPortrait extends LuckyElement {
4
+ dealer: number | null;
5
+ dealing: boolean;
6
+ private last;
7
+ protected updated(changed: Map<string, unknown>): void;
8
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
9
+ }
@@ -1,8 +1,12 @@
1
1
  import { type TemplateResult } from 'lit';
2
2
  import type { RoomContext } from '../../runtime/context';
3
+ import './dealer';
3
4
  export declare function cardTable(room: RoomContext, print: string, { dealer, centre, bet, player }: {
4
5
  dealer: TemplateResult;
5
6
  centre: TemplateResult;
6
7
  bet?: TemplateResult;
7
8
  player: TemplateResult;
9
+ }, { on, dealing }: {
10
+ on: number | null;
11
+ dealing: boolean;
8
12
  }): TemplateResult<1>;
@@ -12,6 +12,8 @@ export declare class Holdem extends LuckyElement {
12
12
  private clearing;
13
13
  private table?;
14
14
  private boost;
15
+ constructor();
16
+ protected willUpdate(): void;
15
17
  private prizeId;
16
18
  private tier;
17
19
  private pace;
@@ -35,7 +35,9 @@ var n = e({
35
35
  boost: {
36
36
  badge: "×{n}",
37
37
  title: "Bonus of the day",
38
- odds: "Bonus of the day: wins {n} times as likely"
38
+ odds: "Bonus of the day: wins {n} times as likely",
39
+ dealer: "Dealer at the table",
40
+ dealerOdds: "Dealer at the table: wins {n} times as likely"
39
41
  },
40
42
  themes: {
41
43
  christmas: {
@@ -448,12 +450,16 @@ var n = e({
448
450
  calendar: "From the calendar",
449
451
  noTheme: "None",
450
452
  language: "Language",
451
- autoLanguage: "Automatic"
453
+ autoLanguage: "Automatic",
454
+ dealer: "Dealer",
455
+ dealerShifts: "From the day's shifts",
456
+ dealerAbsent: "Absent",
457
+ dealerNumber: "Dealer {n}"
452
458
  } }), r = {
453
- it: () => import("./it-B95CFDto.js"),
454
- es: () => import("./es-DHZIstf4.js"),
455
- fr: () => import("./fr-BPFoerSF.js"),
456
- de: () => import("./de-Cp-ILcpM.js")
459
+ it: () => import("./it-CNSOLgaT.js"),
460
+ es: () => import("./es-9iWwCe8s.js"),
461
+ fr: () => import("./fr-Y2BcCS3U.js"),
462
+ de: () => import("./de-B56NsnDF.js")
457
463
  }, i = ["en", ...Object.keys(r)], a = { en: n }, o = (e) => a[e], s = (e) => e.every((e) => !r[e] || a[e]);
458
464
  async function c(e) {
459
465
  await Promise.all(e.filter((e) => r[e] && !a[e]).map(async (e) => a[e] = (await r[e]()).default));
@@ -34,7 +34,9 @@ var t = e({
34
34
  boost: {
35
35
  badge: "×{n}",
36
36
  title: "Bonus del giorno",
37
- odds: "Bonus del giorno: vincite {n} volte più probabili"
37
+ odds: "Bonus del giorno: vincite {n} volte più probabili",
38
+ dealer: "Croupier al tavolo",
39
+ dealerOdds: "Croupier al tavolo: vincite {n} volte più probabili"
38
40
  },
39
41
  themes: {
40
42
  christmas: {
@@ -447,6 +449,10 @@ var t = e({
447
449
  calendar: "Dal calendario",
448
450
  noTheme: "Nessuno",
449
451
  language: "Lingua",
450
- autoLanguage: "Automatica"
452
+ autoLanguage: "Automatica",
453
+ dealer: "Croupier",
454
+ dealerShifts: "Dai turni del giorno",
455
+ dealerAbsent: "Assente",
456
+ dealerNumber: "Croupier {n}"
451
457
  } });
452
458
  export { t as default };
@@ -62,6 +62,10 @@ declare const _default: {
62
62
  noTheme: string;
63
63
  language: string;
64
64
  autoLanguage: string;
65
+ dealer: string;
66
+ dealerShifts: string;
67
+ dealerAbsent: string;
68
+ dealerNumber: string;
65
69
  };
66
70
  };
67
71
  export default _default;
@@ -33,6 +33,8 @@ declare const _default: {
33
33
  badge: string;
34
34
  title: string;
35
35
  odds: string;
36
+ dealer: string;
37
+ dealerOdds: string;
36
38
  };
37
39
  themes: {
38
40
  christmas: {
@@ -62,6 +62,10 @@ declare const _default: {
62
62
  noTheme: string;
63
63
  language: string;
64
64
  autoLanguage: string;
65
+ dealer: string;
66
+ dealerShifts: string;
67
+ dealerAbsent: string;
68
+ dealerNumber: string;
65
69
  };
66
70
  };
67
71
  export default _default;
@@ -33,6 +33,8 @@ declare const _default: {
33
33
  badge: string;
34
34
  title: string;
35
35
  odds: string;
36
+ dealer: string;
37
+ dealerOdds: string;
36
38
  };
37
39
  themes: {
38
40
  christmas: {
@@ -62,6 +62,10 @@ declare const _default: {
62
62
  noTheme: string;
63
63
  language: string;
64
64
  autoLanguage: string;
65
+ dealer: string;
66
+ dealerShifts: string;
67
+ dealerAbsent: string;
68
+ dealerNumber: string;
65
69
  };
66
70
  };
67
71
  export default _default;
@@ -33,6 +33,8 @@ declare const _default: {
33
33
  badge: string;
34
34
  title: string;
35
35
  odds: string;
36
+ dealer: string;
37
+ dealerOdds: string;
36
38
  };
37
39
  themes: {
38
40
  christmas: {
@@ -62,6 +62,10 @@ declare const _default: {
62
62
  noTheme: string;
63
63
  language: string;
64
64
  autoLanguage: string;
65
+ dealer: string;
66
+ dealerShifts: string;
67
+ dealerAbsent: string;
68
+ dealerNumber: string;
65
69
  };
66
70
  };
67
71
  export default _default;
@@ -33,6 +33,8 @@ declare const _default: {
33
33
  badge: string;
34
34
  title: string;
35
35
  odds: string;
36
+ dealer: string;
37
+ dealerOdds: string;
36
38
  };
37
39
  themes: {
38
40
  christmas: {
@@ -62,6 +62,10 @@ declare const _default: {
62
62
  noTheme: string;
63
63
  language: string;
64
64
  autoLanguage: string;
65
+ dealer: string;
66
+ dealerShifts: string;
67
+ dealerAbsent: string;
68
+ dealerNumber: string;
65
69
  };
66
70
  };
67
71
  export default _default;
@@ -33,6 +33,8 @@ declare const _default: {
33
33
  badge: string;
34
34
  title: string;
35
35
  odds: string;
36
+ dealer: string;
37
+ dealerOdds: string;
36
38
  };
37
39
  themes: {
38
40
  christmas: {