@betorigami/games 3.5.0 → 3.6.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/dist/index.mjs +11616 -6954
- package/dist/src/components/advanced-dice/advanced-dice.api.d.ts +2 -4
- package/dist/src/components/baccarat/baccarat.api.d.ts +1 -2
- package/dist/src/components/blackjack/BlackjackGame.d.ts +1 -2
- package/dist/src/components/blackjack/actions/betController.d.ts +2 -7
- package/dist/src/components/diamonds/diamonds.api.d.ts +2 -4
- package/dist/src/components/keno/KenoContent/KenoContent.d.ts +2 -2
- package/dist/src/components/keno/KenoContentBottom/KenoContentBottom.d.ts +1 -2
- package/dist/src/components/keno/KenoGame.d.ts +2 -2
- package/dist/src/components/keno/KenoGrid/KenoGrid.d.ts +3 -5
- package/dist/src/components/keno/KenoTile/KenoTile.d.ts +2 -1
- package/dist/src/components/keno/keno.api.d.ts +1 -2
- package/dist/src/components/mines/MinesTile/MinesTile.d.ts +3 -10
- package/dist/src/components/mines/mines.animations.d.ts +4 -0
- package/dist/src/components/plinko/plinko.api.d.ts +1 -2
- package/dist/src/components/roulette/roulette.api.d.ts +1 -2
- package/dist/src/rive/rive-ref.d.ts +11 -0
- package/dist/src/rive/rive-runtime.d.ts +9 -0
- package/dist/test/keno/keno-tile-selection.test.d.ts +1 -0
- package/dist/test/rive/rive-ref.test.d.ts +1 -0
- package/dist/test/rive/rive-runtime.test.d.ts +1 -0
- package/package.json +4 -3
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProviderApi, BaseStartArgs, StartBetResponse } from '@betorigami/game-ui-shared';
|
|
2
2
|
import { AdvancedDiceInputs } from './advanced-dice.types';
|
|
3
|
-
export
|
|
4
|
-
language: Language;
|
|
5
|
-
}
|
|
3
|
+
export type AdvancedDiceStartArgs = BaseStartArgs;
|
|
6
4
|
export interface IAdvancedDiceApi {
|
|
7
5
|
startBet(data: AdvancedDiceStartArgs & {
|
|
8
6
|
gameInputs: AdvancedDiceInputs;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProviderApi, AutobetApiSettings, StartBetResponse } from '@betorigami/game-ui-shared';
|
|
2
2
|
type BaccaratBet = NonNullable<ProviderApi.PostGamesBaccaratPlayData['body']>['gameInputs']['bets'][number];
|
|
3
3
|
export type BaccaratSelection = {
|
|
4
4
|
position: BaccaratBet['type'];
|
|
5
5
|
amount: string;
|
|
6
6
|
};
|
|
7
7
|
export type BaccaratStartArgs = {
|
|
8
|
-
language: Language;
|
|
9
8
|
selections: BaccaratSelection[];
|
|
10
9
|
meta?: {
|
|
11
10
|
autobetSettings: AutobetApiSettings;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BetResult,
|
|
1
|
+
import { BetResult, AutobetSettingsWithId, GameBetResult, GameComponent } from '@betorigami/game-ui-shared';
|
|
2
2
|
import { BlackjackState, Card, SideBetResults } from '@betorigami/game-calculations';
|
|
3
3
|
import { BlackjackVisibleState, UIDealerCard } from './blackjack.helpers';
|
|
4
4
|
import { BlackjackNextArgs, IBlackjackApi } from './blackjack.api';
|
|
@@ -6,7 +6,6 @@ export declare class BlackjackGame extends GameComponent {
|
|
|
6
6
|
private readonly limits;
|
|
7
7
|
private readonly layout;
|
|
8
8
|
static styles: import('lit').CSSResult[];
|
|
9
|
-
get language(): Language;
|
|
10
9
|
get instantBetEnabled(): boolean;
|
|
11
10
|
canonicalState: BlackjackState | null;
|
|
12
11
|
visibleState: BlackjackVisibleState;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BetResult, ErrorBetResult } from '@betorigami/game-ui-shared';
|
|
2
2
|
import { BlackjackState } from '@betorigami/game-calculations';
|
|
3
3
|
import { BlackjackGame } from '../BlackjackGame';
|
|
4
4
|
import { CardAnimationController } from '../controllers/CardAnimationController';
|
|
5
|
-
type BlackjackBetFailure = {
|
|
6
|
-
success: false;
|
|
7
|
-
error: string;
|
|
8
|
-
errorCode: ErrorCode;
|
|
9
|
-
};
|
|
10
5
|
type BlackjackBetExecutionResult = {
|
|
11
6
|
success: true;
|
|
12
7
|
bjState: BlackjackState;
|
|
13
8
|
betData: BetResult;
|
|
14
|
-
} |
|
|
9
|
+
} | ErrorBetResult;
|
|
15
10
|
export declare class BetController {
|
|
16
11
|
private readonly game;
|
|
17
12
|
private readonly animator;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
language: Language;
|
|
4
|
-
}
|
|
1
|
+
import { ProviderApi, BaseStartArgs, StartBetResponse } from '@betorigami/game-ui-shared';
|
|
2
|
+
export type DiamondsStartArgs = BaseStartArgs;
|
|
5
3
|
export interface IDiamondsApi {
|
|
6
4
|
startBet(data: DiamondsStartArgs): Promise<StartBetResponse>;
|
|
7
5
|
}
|
|
@@ -2,8 +2,8 @@ import { KenoRiskLevel, OrigamiElement } from '@betorigami/game-ui-shared';
|
|
|
2
2
|
import { default as Big } from 'big.js';
|
|
3
3
|
export declare class KenoContent extends OrigamiElement {
|
|
4
4
|
static styles: import('lit').CSSResult[];
|
|
5
|
-
selectedTiles: number
|
|
6
|
-
resultTiles: number
|
|
5
|
+
selectedTiles: ReadonlySet<number>;
|
|
6
|
+
resultTiles: ReadonlySet<number>;
|
|
7
7
|
isPlaying: boolean;
|
|
8
8
|
gameOver: boolean;
|
|
9
9
|
multipliersForSelectedTiles: number;
|
|
@@ -6,11 +6,10 @@ export declare class KenoContentBottom extends OrigamiElement {
|
|
|
6
6
|
private readonly layout;
|
|
7
7
|
private readonly wallet;
|
|
8
8
|
static styles: import('lit').CSSResult[];
|
|
9
|
-
selectedTiles: number[];
|
|
10
9
|
risk: KenoRiskLevel;
|
|
11
10
|
hitCount: number;
|
|
12
11
|
multipliersForSelectedTiles: number;
|
|
13
|
-
resultTiles: number
|
|
12
|
+
resultTiles: ReadonlySet<number>;
|
|
14
13
|
private hoverItemIndex;
|
|
15
14
|
updated(changedProperties: Map<string, any>): void;
|
|
16
15
|
private scrollToHighlightedGem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { KenoRiskChangeEvent,
|
|
1
|
+
import { KenoRiskChangeEvent, KenoTileSelectEvent, AutobetSettingsWithId, GameBetResult, GameComponent } from '@betorigami/game-ui-shared';
|
|
2
2
|
export interface KenoHistory {
|
|
3
3
|
multiplier: number;
|
|
4
4
|
won: boolean;
|
|
@@ -39,7 +39,7 @@ export declare class KenoGame extends GameComponent {
|
|
|
39
39
|
private handleBetExecution;
|
|
40
40
|
addToHistory(multiplier: number, won: boolean, id: string): void;
|
|
41
41
|
protected executeAutobet(autobetSettings: AutobetSettingsWithId, currentBetAmount: string): Promise<GameBetResult>;
|
|
42
|
-
|
|
42
|
+
handleTileSelect: (e: KenoTileSelectEvent) => void;
|
|
43
43
|
handleRiskChange: (e: KenoRiskChangeEvent) => void;
|
|
44
44
|
autoPick: () => void;
|
|
45
45
|
clearTable: () => void;
|
|
@@ -2,15 +2,13 @@ import { OrigamiElement } from '@betorigami/game-ui-shared';
|
|
|
2
2
|
export declare class KenoGrid extends OrigamiElement {
|
|
3
3
|
private readonly locale;
|
|
4
4
|
static styles: import('lit').CSSResult[];
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
private readonly dragSelect;
|
|
6
|
+
selectedTiles: ReadonlySet<number>;
|
|
7
|
+
resultTiles: ReadonlySet<number>;
|
|
7
8
|
popupShowing: boolean;
|
|
8
9
|
isPlaying: boolean;
|
|
9
10
|
gameOver: boolean;
|
|
10
|
-
enableSounds: boolean;
|
|
11
11
|
ariaLabel: string;
|
|
12
|
-
get selectedCount(): number;
|
|
13
|
-
get hitCount(): number;
|
|
14
12
|
private calculateTileState;
|
|
15
13
|
render(): import('lit').TemplateResult<1>;
|
|
16
14
|
}
|
|
@@ -15,6 +15,7 @@ export declare class KenoTile extends OrigamiElement {
|
|
|
15
15
|
disabled: boolean;
|
|
16
16
|
ariaLabel: string;
|
|
17
17
|
private handlePointerDown;
|
|
18
|
-
private
|
|
18
|
+
private handleKeyboardActivation;
|
|
19
|
+
private get isSelected();
|
|
19
20
|
render(): import('lit').TemplateResult<1>;
|
|
20
21
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KenoRiskLevel, ProviderApi, BaseStartArgs, StartBetResponse } from '@betorigami/game-ui-shared';
|
|
2
2
|
export declare const MAX_SELECTABLE_TILES = 10;
|
|
3
3
|
export declare const TOTAL_KENO_TILES = 40;
|
|
4
4
|
export interface KenoStartArgs extends BaseStartArgs {
|
|
5
|
-
language: Language;
|
|
6
5
|
riskLevel: KenoRiskLevel;
|
|
7
6
|
selectedNumbers: number[];
|
|
8
7
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OrigamiElement } from '@betorigami/game-ui-shared';
|
|
2
|
-
import { PropertyValues } from 'lit';
|
|
3
2
|
export declare enum MinesTileState {
|
|
4
3
|
NORMAL = "NORMAL",
|
|
5
4
|
AUTOBET_SELECTED = "AUTOBET_SELECTED",
|
|
@@ -22,21 +21,15 @@ export declare class MinesTile extends OrigamiElement {
|
|
|
22
21
|
ariaLabel: string;
|
|
23
22
|
isLoading: boolean;
|
|
24
23
|
disabled: boolean;
|
|
25
|
-
private
|
|
26
|
-
private
|
|
27
|
-
private bombGifTimeout;
|
|
28
|
-
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
24
|
+
private readonly explosionBack;
|
|
25
|
+
private readonly explosionFront;
|
|
29
26
|
private get _isRevealed();
|
|
30
27
|
private get _isMine();
|
|
31
28
|
private get _isGem();
|
|
32
29
|
private get _isDisabled();
|
|
33
30
|
private get _isSelected();
|
|
34
|
-
private get
|
|
35
|
-
private get _shouldShowBombBg();
|
|
36
|
-
private _isSelectedBombState;
|
|
31
|
+
private get _isSelectedBomb();
|
|
37
32
|
private get _currentTileSvgUrl();
|
|
38
|
-
private _activateBombGif;
|
|
39
|
-
disconnectedCallback(): void;
|
|
40
33
|
private _handlePointerDown;
|
|
41
34
|
private _handleClick;
|
|
42
35
|
render(): import('lit').TemplateResult<1>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProviderApi, BaseStartArgs, StartBetResponse } from '@betorigami/game-ui-shared';
|
|
2
2
|
import { PlinkoRiskLevel, PlinkoRowCount } from './plinko.constants';
|
|
3
3
|
export interface PlinkoStartArgs extends BaseStartArgs {
|
|
4
|
-
language: Language;
|
|
5
4
|
riskLevel: PlinkoRiskLevel;
|
|
6
5
|
rowCount: PlinkoRowCount;
|
|
7
6
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProviderApi, AutobetApiSettings, RouletteStartAction, StartBetResponse } from '@betorigami/game-ui-shared';
|
|
2
2
|
export type RouletteStartArgs = {
|
|
3
|
-
language: Language;
|
|
4
3
|
meta?: {
|
|
5
4
|
autobetSettings: AutobetApiSettings;
|
|
6
5
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Rive } from '@rive-app/canvas-lite';
|
|
2
|
+
type RiveSetup = {
|
|
3
|
+
rive: Pick<Rive, 'on' | 'cleanup'>;
|
|
4
|
+
dispose: () => void;
|
|
5
|
+
};
|
|
6
|
+
type CreateRive<T> = (canvas: HTMLCanvasElement, file: T) => RiveSetup;
|
|
7
|
+
type RiveRefOptions = {
|
|
8
|
+
prefersReducedMotion?: () => boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const riveRef: <T>(load: () => Promise<T>, createRive: CreateRive<T>, options?: RiveRefOptions) => (canvas: Element | undefined) => void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RiveFile } from '@rive-app/canvas-lite';
|
|
2
|
+
export declare class AsyncCache<T> {
|
|
3
|
+
private readonly load;
|
|
4
|
+
private readonly cache;
|
|
5
|
+
constructor(load: (key: string) => Promise<T>);
|
|
6
|
+
get(key: string): Promise<T>;
|
|
7
|
+
}
|
|
8
|
+
export declare const loadRiveFile: (src: string) => Promise<RiveFile>;
|
|
9
|
+
export declare const preloadRiveFile: (src: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betorigami/games",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "",
|
|
@@ -24,12 +24,13 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@betorigami/game-calculations": "11.0.1",
|
|
26
26
|
"@lit/context": "^1.1.5",
|
|
27
|
+
"@rive-app/canvas-lite": "2.47.1",
|
|
27
28
|
"big.js": "^7.0.1",
|
|
28
29
|
"lit": "^3.3.0",
|
|
29
30
|
"matter-js": "^0.18.0",
|
|
30
31
|
"web-haptics": "^0.0.6",
|
|
31
|
-
"@betorigami/game-ui-shared": "
|
|
32
|
-
"@betorigami/game-ui-wheel": "1.2.
|
|
32
|
+
"@betorigami/game-ui-shared": "6.0.0",
|
|
33
|
+
"@betorigami/game-ui-wheel": "1.2.1"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@playwright/test": "^1.53.0",
|