@adiakys/feeling-lucky 0.1.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.
Files changed (50) hide show
  1. package/README.md +73 -5
  2. package/dist/config/types.d.ts +11 -0
  3. package/dist/{de-Cp-ILcpM.js → de-CmzpGbNK.js} +19 -3
  4. package/dist/developer/panel.d.ts +2 -0
  5. package/dist/developer/settings.d.ts +2 -0
  6. package/dist/engine/dealer.d.ts +21 -0
  7. package/dist/{es-DHZIstf4.js → es-k_kS6Fn2.js} +19 -3
  8. package/dist/feeling-lucky.iife.js +417 -249
  9. package/dist/feeling-lucky.js +17 -39
  10. package/dist/{fr-BPFoerSF.js → fr-GuCZB1l4.js} +19 -3
  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 +7 -1
  14. package/dist/games/holdem/holdem.d.ts +2 -0
  15. package/dist/{i18n-CihzHMU5.js → i18n-Cid8bj2R.js} +23 -7
  16. package/dist/icons-DTaPp44c.js +863 -0
  17. package/dist/{it-B95CFDto.js → it-BNztlqHd.js} +19 -3
  18. package/dist/locales/de/cards.d.ts +7 -0
  19. package/dist/locales/de/developer.d.ts +7 -0
  20. package/dist/locales/de/room.d.ts +2 -0
  21. package/dist/locales/en/cards.d.ts +7 -0
  22. package/dist/locales/en/developer.d.ts +7 -0
  23. package/dist/locales/en/room.d.ts +2 -0
  24. package/dist/locales/es/cards.d.ts +7 -0
  25. package/dist/locales/es/developer.d.ts +7 -0
  26. package/dist/locales/es/room.d.ts +2 -0
  27. package/dist/locales/fr/cards.d.ts +7 -0
  28. package/dist/locales/fr/developer.d.ts +7 -0
  29. package/dist/locales/fr/room.d.ts +2 -0
  30. package/dist/locales/it/cards.d.ts +7 -0
  31. package/dist/locales/it/developer.d.ts +7 -0
  32. package/dist/locales/it/room.d.ts +2 -0
  33. package/dist/mount-CMm0qSYk.js +6257 -0
  34. package/dist/multiplayer/blackjack.d.ts +35 -0
  35. package/dist/multiplayer/client.d.ts +55 -0
  36. package/dist/multiplayer/holdem.d.ts +21 -0
  37. package/dist/multiplayer/index.d.ts +2 -0
  38. package/dist/multiplayer/seats.d.ts +16 -0
  39. package/dist/multiplayer/shared.d.ts +33 -0
  40. package/dist/multiplayer-CN0t0j_F.js +502 -0
  41. package/dist/{panel-D1hKmQL7.js → panel-BVgq3Cm5.js} +167 -139
  42. package/dist/resolve-Dc48n2Jo.js +28 -0
  43. package/dist/room/boost.d.ts +1 -1
  44. package/dist/room/lobby.d.ts +1 -0
  45. package/dist/room/room.d.ts +11 -1
  46. package/dist/room/stage.d.ts +2 -1
  47. package/dist/runtime/context.d.ts +3 -1
  48. package/dist/runtime/sound.d.ts +1 -1
  49. package/package.json +2 -2
  50. package/dist/mount-BxDaFww2.js +0 -7034
@@ -1,5 +1,5 @@
1
1
  import { type PropertyValues } from 'lit';
2
- import type { Messages, Player, Prize, Win } from '../config/types';
2
+ import type { Dealer, Messages, Multiplayer, Player, Prize, Win } from '../config/types';
3
3
  import { type RoomContext } from '../runtime/context';
4
4
  import { LuckyElement } from '../runtime/element';
5
5
  import '../games';
@@ -12,14 +12,20 @@ declare module '../engine/rig' {
12
12
  context: Record<string, never>;
13
13
  value: string;
14
14
  };
15
+ multiplayer: {
16
+ context: Record<string, never>;
17
+ value: boolean;
18
+ };
15
19
  }
16
20
  }
17
21
  export interface RoomConfig {
18
22
  prizes: Prize[];
19
23
  player: Player | null;
20
24
  logo?: string;
25
+ dealers?: Dealer[];
21
26
  locale?: string;
22
27
  messages: Record<string, Messages>;
28
+ multiplayer?: Multiplayer;
23
29
  onWin?: (win: Win) => void;
24
30
  onClaim?: (win: Win) => Promise<void>;
25
31
  developer: {
@@ -47,11 +53,15 @@ export declare class Room extends LuckyElement {
47
53
  private lightsCanvas?;
48
54
  private fxCanvas?;
49
55
  private lightsFrame;
56
+ private dutyCheck;
57
+ private dutyClock;
50
58
  private ambient;
51
59
  private boost;
52
60
  constructor();
53
61
  private get theme();
54
62
  protected willUpdate(changed: PropertyValues<this>): void;
63
+ private get dealers();
64
+ private get shared();
55
65
  private locale;
56
66
  private context;
57
67
  private go;
@@ -1,10 +1,11 @@
1
1
  import { type TemplateResult } from 'lit';
2
2
  import type { Translate } from '../runtime/i18n';
3
3
  import { LuckyElement } from '../runtime/element';
4
- export declare function stage(t: Translate, { state, rules, multiplier }: {
4
+ export declare function stage(t: Translate, { state, rules, multiplier, dealer }: {
5
5
  state: 'idle' | 'spinning' | 'won';
6
6
  rules: string;
7
7
  multiplier?: number;
8
+ dealer?: boolean;
8
9
  }, game: TemplateResult, overlay?: TemplateResult): TemplateResult<1>;
9
10
  export declare class Rules extends LuckyElement {
10
11
  text: string;
@@ -1,5 +1,5 @@
1
1
  import type { TemplateResult } from 'lit';
2
- import type { GameId, Player, Prize, Tier } from '../config/types';
2
+ import type { Dealer, GameId, Multiplayer, Player, Prize, Tier } from '../config/types';
3
3
  import type { Award, Board } from '../engine/awards';
4
4
  import type { Outcome } from '../engine/outcome';
5
5
  import type { Translate } from './i18n';
@@ -15,6 +15,8 @@ export interface RoomContext {
15
15
  prizeIds: string[];
16
16
  board: Board;
17
17
  player: Player | null;
18
+ multiplayer?: Multiplayer;
19
+ dealers: Dealer[];
18
20
  locale: string;
19
21
  locales: string[];
20
22
  t: Translate;
@@ -1,4 +1,4 @@
1
- export type SoundName = 'tick' | 'reel' | 'stop' | 'whoosh' | 'bounce' | 'chime' | 'win' | 'jackpot' | 'stamp' | 'scratch' | 'lever' | 'ambient' | 'thunder';
1
+ export type SoundName = 'tick' | 'reel' | 'stop' | 'whoosh' | 'bounce' | 'chime' | 'win' | 'jackpot' | 'stamp' | 'scratch' | 'lever' | 'ambient' | 'thunder' | 'dealer';
2
2
  export declare const sound: {
3
3
  enabled: boolean;
4
4
  context: AudioContext | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adiakys/feeling-lucky",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "A casino room for any web app: classic casino games that award the prizes you configure.",
5
5
  "keywords": [
6
6
  "casino",
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "scripts": {
36
- "dev": "vite playground",
36
+ "dev": "vite --config vite.demo.config.ts",
37
37
  "build": "vite build && tsc -p tsconfig.build.json",
38
38
  "test": "vitest run",
39
39
  "test:e2e": "playwright test",