@adiakys/feeling-lucky 0.0.0-stage → 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 (121) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +227 -2
  3. package/dist/config/resolve.d.ts +4 -0
  4. package/dist/config/types.d.ts +62 -0
  5. package/dist/de-B56NsnDF.js +458 -0
  6. package/dist/developer/panel.d.ts +61 -0
  7. package/dist/developer/rig.d.ts +2 -0
  8. package/dist/developer/settings.d.ts +30 -0
  9. package/dist/engine/awards.d.ts +12 -0
  10. package/dist/engine/cards.d.ts +44 -0
  11. package/dist/engine/cashout.d.ts +32 -0
  12. package/dist/engine/dealer.d.ts +21 -0
  13. package/dist/engine/outcome.d.ts +13 -0
  14. package/dist/engine/pachinko.d.ts +58 -0
  15. package/dist/engine/random.d.ts +6 -0
  16. package/dist/engine/rig.d.ts +28 -0
  17. package/dist/engine/roulette.d.ts +53 -0
  18. package/dist/engine/scratch.d.ts +40 -0
  19. package/dist/engine/slot.d.ts +19 -0
  20. package/dist/engine/themes.d.ts +30 -0
  21. package/dist/engine/tiers.d.ts +64 -0
  22. package/dist/engine/wheel.d.ts +47 -0
  23. package/dist/es-9iWwCe8s.js +458 -0
  24. package/dist/feeling-lucky.iife.js +1494 -0
  25. package/dist/feeling-lucky.js +65 -0
  26. package/dist/fr-Y2BcCS3U.js +458 -0
  27. package/dist/games/blackjack/blackjack.d.ts +48 -0
  28. package/dist/games/cards/card.d.ts +5 -0
  29. package/dist/games/cards/dealer.d.ts +9 -0
  30. package/dist/games/cards/table.d.ts +12 -0
  31. package/dist/games/holdem/holdem.d.ts +29 -0
  32. package/dist/games/index.d.ts +9 -0
  33. package/dist/games/pachinko/pachinko.d.ts +53 -0
  34. package/dist/games/roulette/roulette.d.ts +63 -0
  35. package/dist/games/roulette/table.d.ts +19 -0
  36. package/dist/games/roulette/track.d.ts +18 -0
  37. package/dist/games/roulette/wheel.d.ts +9 -0
  38. package/dist/games/scratch/covers.d.ts +3 -0
  39. package/dist/games/scratch/double.d.ts +3 -0
  40. package/dist/games/scratch/forever.d.ts +3 -0
  41. package/dist/games/scratch/scratch.d.ts +39 -0
  42. package/dist/games/slot/breakaway.d.ts +32 -0
  43. package/dist/games/slot/machine.d.ts +18 -0
  44. package/dist/games/slot/slot.d.ts +32 -0
  45. package/dist/games/slot/takeoff.d.ts +28 -0
  46. package/dist/games/wheel/coin.d.ts +19 -0
  47. package/dist/games/wheel/face.d.ts +18 -0
  48. package/dist/games/wheel/hunt.d.ts +15 -0
  49. package/dist/games/wheel/wheel.d.ts +64 -0
  50. package/dist/i18n-it2FlmVZ.js +490 -0
  51. package/dist/index.d.ts +4 -0
  52. package/dist/it-CNSOLgaT.js +458 -0
  53. package/dist/locales/de/cards.d.ts +68 -0
  54. package/dist/locales/de/developer.d.ts +71 -0
  55. package/dist/locales/de/index.d.ts +2 -0
  56. package/dist/locales/de/pachinko.d.ts +26 -0
  57. package/dist/locales/de/room.d.ts +86 -0
  58. package/dist/locales/de/roulette.d.ts +77 -0
  59. package/dist/locales/de/scratch.d.ts +56 -0
  60. package/dist/locales/de/slot.d.ts +61 -0
  61. package/dist/locales/de/wheel.d.ts +45 -0
  62. package/dist/locales/en/cards.d.ts +68 -0
  63. package/dist/locales/en/developer.d.ts +71 -0
  64. package/dist/locales/en/index.d.ts +2 -0
  65. package/dist/locales/en/pachinko.d.ts +26 -0
  66. package/dist/locales/en/room.d.ts +86 -0
  67. package/dist/locales/en/roulette.d.ts +77 -0
  68. package/dist/locales/en/scratch.d.ts +56 -0
  69. package/dist/locales/en/slot.d.ts +61 -0
  70. package/dist/locales/en/wheel.d.ts +45 -0
  71. package/dist/locales/es/cards.d.ts +68 -0
  72. package/dist/locales/es/developer.d.ts +71 -0
  73. package/dist/locales/es/index.d.ts +2 -0
  74. package/dist/locales/es/pachinko.d.ts +26 -0
  75. package/dist/locales/es/room.d.ts +86 -0
  76. package/dist/locales/es/roulette.d.ts +77 -0
  77. package/dist/locales/es/scratch.d.ts +56 -0
  78. package/dist/locales/es/slot.d.ts +61 -0
  79. package/dist/locales/es/wheel.d.ts +45 -0
  80. package/dist/locales/fr/cards.d.ts +68 -0
  81. package/dist/locales/fr/developer.d.ts +71 -0
  82. package/dist/locales/fr/index.d.ts +2 -0
  83. package/dist/locales/fr/pachinko.d.ts +26 -0
  84. package/dist/locales/fr/room.d.ts +86 -0
  85. package/dist/locales/fr/roulette.d.ts +77 -0
  86. package/dist/locales/fr/scratch.d.ts +56 -0
  87. package/dist/locales/fr/slot.d.ts +61 -0
  88. package/dist/locales/fr/wheel.d.ts +45 -0
  89. package/dist/locales/index.d.ts +7 -0
  90. package/dist/locales/it/cards.d.ts +68 -0
  91. package/dist/locales/it/developer.d.ts +71 -0
  92. package/dist/locales/it/index.d.ts +2 -0
  93. package/dist/locales/it/pachinko.d.ts +26 -0
  94. package/dist/locales/it/room.d.ts +86 -0
  95. package/dist/locales/it/roulette.d.ts +77 -0
  96. package/dist/locales/it/scratch.d.ts +56 -0
  97. package/dist/locales/it/slot.d.ts +61 -0
  98. package/dist/locales/it/wheel.d.ts +45 -0
  99. package/dist/locales/merge.d.ts +2 -0
  100. package/dist/merge-iGSNfZkz.js +10 -0
  101. package/dist/mount-CBUkAcVV.js +7109 -0
  102. package/dist/panel-tWJMt9kl.js +545 -0
  103. package/dist/room/boost.d.ts +2 -0
  104. package/dist/room/certificate.d.ts +22 -0
  105. package/dist/room/chips.d.ts +21 -0
  106. package/dist/room/lobby.d.ts +45 -0
  107. package/dist/room/mount.d.ts +6 -0
  108. package/dist/room/room.d.ts +74 -0
  109. package/dist/room/stage.d.ts +18 -0
  110. package/dist/room/theme.d.ts +15 -0
  111. package/dist/runtime/context.d.ts +34 -0
  112. package/dist/runtime/element.d.ts +15 -0
  113. package/dist/runtime/fx.d.ts +43 -0
  114. package/dist/runtime/i18n.d.ts +8 -0
  115. package/dist/runtime/icons.d.ts +2 -0
  116. package/dist/runtime/motion.d.ts +2 -0
  117. package/dist/runtime/signal.d.ts +6 -0
  118. package/dist/runtime/sound.d.ts +11 -0
  119. package/dist/signal-CAveEGrG.js +19 -0
  120. package/dist/styles/index.d.ts +1 -0
  121. package/package.json +56 -4
@@ -0,0 +1,63 @@
1
+ import type { GameOptions } from '../../runtime/context';
2
+ import { LuckyElement } from '../../runtime/element';
3
+ import './table';
4
+ import './track';
5
+ export declare class Roulette extends LuckyElement {
6
+ options: GameOptions;
7
+ private state;
8
+ private result;
9
+ private bets;
10
+ private chosen;
11
+ private winning;
12
+ private shownCall;
13
+ private surface;
14
+ private shownSurface;
15
+ private plays;
16
+ private history;
17
+ private lastThrown;
18
+ private struck;
19
+ private medallions;
20
+ private root?;
21
+ private board?;
22
+ private sky?;
23
+ private dark?;
24
+ private boost;
25
+ private storm;
26
+ private call;
27
+ private callChange;
28
+ private surfaceChange;
29
+ private rotorAngle;
30
+ private ballAngle;
31
+ private ballRadius;
32
+ private raf;
33
+ private previous;
34
+ private spin;
35
+ private bolts;
36
+ private storming;
37
+ private darkness;
38
+ private get used();
39
+ private get struckResult();
40
+ protected willUpdate(): void;
41
+ protected firstUpdated(): void;
42
+ disconnectedCallback(): void;
43
+ private draw;
44
+ private frame;
45
+ private drawSky;
46
+ private setMedallion;
47
+ private setCall;
48
+ private setSurface;
49
+ private roll;
50
+ private strike;
51
+ private layout;
52
+ private placeChips;
53
+ private announce;
54
+ private restore;
55
+ private clearChips;
56
+ private undo;
57
+ private rebet;
58
+ private clearStorm;
59
+ private launch;
60
+ private throwBall;
61
+ private land;
62
+ render(): import("lit-html").TemplateResult<1>;
63
+ }
@@ -0,0 +1,19 @@
1
+ import { type PropertyValues } from 'lit';
2
+ import { type RouletteBet } from '../../engine/roulette';
3
+ import { LuckyElement } from '../../runtime/element';
4
+ export declare class RouletteTable extends LuckyElement {
5
+ bets: RouletteBet[];
6
+ locked: boolean;
7
+ result: number | null;
8
+ winning: string | null;
9
+ struck: number[];
10
+ strikeLabel: string;
11
+ private hovered;
12
+ private labels;
13
+ private labelsOf?;
14
+ protected willUpdate(changed: PropertyValues<this>): void;
15
+ private label;
16
+ private choose;
17
+ private stacks;
18
+ render(): import("lit-html").TemplateResult<1>;
19
+ }
@@ -0,0 +1,18 @@
1
+ import { type PropertyValues } from 'lit';
2
+ import { type RouletteAnnounced } from '../../engine/roulette';
3
+ import { LuckyElement } from '../../runtime/element';
4
+ export type Play = {
5
+ name: RouletteAnnounced;
6
+ prizeId: string;
7
+ };
8
+ export declare class RouletteTrack extends LuckyElement {
9
+ plays: Play[];
10
+ chipsLeft: number;
11
+ locked: boolean;
12
+ result: number | null;
13
+ struck: number[];
14
+ private hovered;
15
+ protected willUpdate(changed: PropertyValues<this>): void;
16
+ private choose;
17
+ render(): import("lit-html").TemplateResult<1>;
18
+ }
@@ -0,0 +1,9 @@
1
+ import { LuckyElement } from '../../runtime/element';
2
+ export declare const polar: (radius: number, degrees: number) => readonly [number, number];
3
+ export declare class RouletteWheel extends LuckyElement {
4
+ prefix: string;
5
+ ball: boolean;
6
+ struck?: number[];
7
+ rootClass: string;
8
+ render(): import("lit-html").TemplateResult<1>;
9
+ }
@@ -0,0 +1,3 @@
1
+ export type Cover = 'coin' | 'bundle' | 'boat' | 'flipflop' | 'beach';
2
+ export declare function coverArt(prizeLabel: string): Record<Cover, string>;
3
+ export declare function loadCovers(art: Record<Cover, string>): Promise<Record<Cover, HTMLImageElement>>;
@@ -0,0 +1,3 @@
1
+ import type { NumbersTicket } from '../../engine/scratch';
2
+ import type { RoomContext } from '../../runtime/context';
3
+ export declare function ticketDouble(room: RoomContext, ticket: NumbersTicket, matched: boolean, serial: string): import("lit-html").TemplateResult<1>;
@@ -0,0 +1,3 @@
1
+ import type { NumbersTicket } from '../../engine/scratch';
2
+ import type { RoomContext } from '../../runtime/context';
3
+ export declare function ticketForever(room: RoomContext, ticket: NumbersTicket, matched: boolean, serial: string): import("lit-html").TemplateResult<1>;
@@ -0,0 +1,39 @@
1
+ import type { GameOptions } from '../../runtime/context';
2
+ import { LuckyElement } from '../../runtime/element';
3
+ export declare class Scratch extends LuckyElement {
4
+ options: GameOptions;
5
+ private boost;
6
+ private kind;
7
+ private tier;
8
+ private card?;
9
+ private serial;
10
+ private revealed;
11
+ private state;
12
+ private ticket?;
13
+ private covers?;
14
+ private last;
15
+ private strokes;
16
+ private print;
17
+ protected willUpdate(): void;
18
+ private get spots();
19
+ private get done();
20
+ private inLine;
21
+ private get hit();
22
+ private get matched();
23
+ private paint;
24
+ private ready;
25
+ private cleared;
26
+ private scratched;
27
+ private reveal;
28
+ private finish;
29
+ private foilOf;
30
+ private scratch;
31
+ private start;
32
+ private stop;
33
+ private foils;
34
+ private revealAll;
35
+ private newTicket;
36
+ firstUpdated(): Promise<void>;
37
+ private classic;
38
+ render(): import("lit-html").TemplateResult<1>;
39
+ }
@@ -0,0 +1,32 @@
1
+ import type { GameOptions } from '../../runtime/context';
2
+ import { LuckyElement } from '../../runtime/element';
3
+ export declare class Breakaway extends LuckyElement {
4
+ options: GameOptions;
5
+ private phase;
6
+ private cleared;
7
+ private runner;
8
+ private chosen;
9
+ private defenders;
10
+ private aim;
11
+ private keeper;
12
+ private field?;
13
+ private boost;
14
+ private tackle;
15
+ private get steps();
16
+ private get collected();
17
+ private get shooting();
18
+ private open;
19
+ private label;
20
+ private kickOff;
21
+ private step;
22
+ private advance;
23
+ private tackled;
24
+ private win;
25
+ private cashOut;
26
+ private shoot;
27
+ private again;
28
+ private get hint();
29
+ private onSquareKey;
30
+ private shot;
31
+ render(): import("lit-html").TemplateResult<1>;
32
+ }
@@ -0,0 +1,18 @@
1
+ import { type TemplateResult } from 'lit';
2
+ import type { SlotSymbol } from '../../engine/slot';
3
+ import { LuckyElement } from '../../runtime/element';
4
+ export declare class SlotMachine extends LuckyElement {
5
+ strips: SlotSymbol[][];
6
+ mini: boolean;
7
+ state: 'idle' | 'spinning' | 'won';
8
+ rootClass: string;
9
+ tray?: TemplateResult;
10
+ private symbol;
11
+ private pull;
12
+ render(): TemplateResult<1>;
13
+ }
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ 'fl-slot-machine': SlotMachine;
17
+ }
18
+ }
@@ -0,0 +1,32 @@
1
+ import { type PropertyValues } from 'lit';
2
+ import type { GameOptions } from '../../runtime/context';
3
+ import { LuckyElement } from '../../runtime/element';
4
+ import './machine';
5
+ export declare class Slot extends LuckyElement {
6
+ options: GameOptions;
7
+ private state;
8
+ private readout;
9
+ private strips;
10
+ private machine?;
11
+ private boost;
12
+ private stripsOf;
13
+ private reels;
14
+ private raf;
15
+ private previous;
16
+ private ticker;
17
+ private tier;
18
+ private prizeId;
19
+ private line;
20
+ private suspense;
21
+ private get size();
22
+ private reelElements;
23
+ private draw;
24
+ willUpdate(changed: PropertyValues): void;
25
+ updated(changed: PropertyValues): void;
26
+ private pull;
27
+ private spin;
28
+ private frame;
29
+ private settle;
30
+ disconnectedCallback(): void;
31
+ render(): import("lit-html").TemplateResult<1>;
32
+ }
@@ -0,0 +1,28 @@
1
+ import type { GameOptions } from '../../runtime/context';
2
+ import { LuckyElement } from '../../runtime/element';
3
+ export declare class Takeoff extends LuckyElement {
4
+ options: GameOptions;
5
+ private phase;
6
+ private multiplier;
7
+ private cashed;
8
+ private canvas?;
9
+ private boost;
10
+ private christmas;
11
+ private tier;
12
+ private crash;
13
+ private start;
14
+ private goneAt;
15
+ private raf;
16
+ private won;
17
+ private get steps();
18
+ private get reached();
19
+ private label;
20
+ private takeOff;
21
+ private cashOut;
22
+ private frame;
23
+ private draw;
24
+ private again;
25
+ firstUpdated(): void;
26
+ disconnectedCallback(): void;
27
+ render(): import("lit-html").TemplateResult<1>;
28
+ }
@@ -0,0 +1,19 @@
1
+ import type { Tier } from '../../config/types';
2
+ import { type Award } from '../../engine/awards';
3
+ import { LuckyElement } from '../../runtime/element';
4
+ export type CoinFace = {
5
+ tier: Tier;
6
+ award: Award;
7
+ };
8
+ export declare class WheelCoin extends LuckyElement {
9
+ won: CoinFace;
10
+ other: CoinFace;
11
+ prizeId: string;
12
+ private flipping;
13
+ private coin?;
14
+ private shadow?;
15
+ private goldWins;
16
+ private flip;
17
+ private label;
18
+ render(): import("lit-html").TemplateResult<1>;
19
+ }
@@ -0,0 +1,18 @@
1
+ import { type WheelSegment } from '../../engine/wheel';
2
+ import { LuckyElement } from '../../runtime/element';
3
+ export declare class WheelFace extends LuckyElement {
4
+ rootClass: string;
5
+ prefix: string;
6
+ boosted: number[];
7
+ boostLabel: string;
8
+ private winPath;
9
+ rotor?: SVGGElement;
10
+ get segments(): WheelSegment[];
11
+ highlight(index: number | null): void;
12
+ render(): import("lit-html").TemplateResult<1>;
13
+ }
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ 'fl-wheel-face': WheelFace;
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ import { type PropertyValues } from 'lit';
2
+ import type { PrizeTier } from '../../config/types';
3
+ import type { Award } from '../../engine/awards';
4
+ import { LuckyElement } from '../../runtime/element';
5
+ export declare class WheelHunt extends LuckyElement {
6
+ won: {
7
+ tier: PrizeTier;
8
+ award: Award;
9
+ };
10
+ private tiles;
11
+ private picked;
12
+ protected willUpdate(changed: PropertyValues<this>): void;
13
+ private choose;
14
+ render(): import("lit-html").TemplateResult<1>;
15
+ }
@@ -0,0 +1,64 @@
1
+ import type { GameOptions } from '../../runtime/context';
2
+ import { LuckyElement } from '../../runtime/element';
3
+ import './coin';
4
+ import './face';
5
+ import './hunt';
6
+ export declare class Wheel extends LuckyElement {
7
+ options: GameOptions;
8
+ private state;
9
+ private prizeId;
10
+ private topSet;
11
+ private topBlur;
12
+ private bonus;
13
+ private grabbed;
14
+ private zoomed;
15
+ private boosted;
16
+ private face?;
17
+ private wrap?;
18
+ private pointer?;
19
+ private strip?;
20
+ private boostStrip?;
21
+ private boost;
22
+ private boosterDay;
23
+ private angle;
24
+ private velocity;
25
+ private direction;
26
+ private phase;
27
+ private freeSince;
28
+ private brake;
29
+ private target;
30
+ private tier;
31
+ private lastIndex;
32
+ private lastTick;
33
+ private raf;
34
+ private previous;
35
+ private top;
36
+ private boostTop;
37
+ private prize;
38
+ private get segments();
39
+ private get keys();
40
+ private segmentLabel;
41
+ private indexAt;
42
+ private draw;
43
+ private planBrake;
44
+ private frame;
45
+ private settleTop;
46
+ private stopBoost;
47
+ private settleBoost;
48
+ private spin;
49
+ private land;
50
+ private bonusWon;
51
+ private drag;
52
+ private pointerAngle;
53
+ private zoom;
54
+ private fingers;
55
+ private pinch;
56
+ private spread;
57
+ private grab;
58
+ private move;
59
+ private release;
60
+ firstUpdated(): Promise<void>;
61
+ disconnectedCallback(): void;
62
+ private overlay;
63
+ render(): import("lit-html").TemplateResult<1>;
64
+ }