@betorigami/game-ui-shared 1.7.0 → 2.0.1
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 +3 -1
- package/dist/components/shared/Alert/Alert.d.ts +0 -2
- package/dist/components/shared/AlertManager/AlertManager.d.ts +1 -3
- package/dist/components/shared/BetResultModal/BetResultModal.d.ts +3 -4
- package/dist/components/shared/Button/Button.d.ts +3 -2
- package/dist/components/shared/Button/LinkButton.d.ts +3 -3
- package/dist/components/shared/ChipTableGameComponent.d.ts +5 -1
- package/dist/components/shared/DepositButton/DepositButton.d.ts +5 -3
- package/dist/components/shared/FairnessDetails/FairnessContent.d.ts +6 -3
- package/dist/components/shared/FairnessDetails/HistoryTable.d.ts +4 -1
- package/dist/components/shared/Footer/Footer.d.ts +4 -2
- package/dist/components/shared/GameComponent.d.ts +17 -4
- package/dist/components/shared/GameInfo/GameInfoModal.d.ts +5 -5
- package/dist/components/shared/GameInfo/gameInfoConfig.d.ts +2 -2
- package/dist/components/shared/GameLayout/GameLayout.d.ts +8 -4
- package/dist/components/shared/GameOutcomeDisplay/GameOutcomeDisplay.d.ts +4 -3
- package/dist/components/shared/GameProviderWrapper.d.ts +17 -9
- package/dist/components/shared/GameSidebar/GameSidebar.d.ts +1 -3
- package/dist/components/shared/GameWinPopup/GameWinPopup.d.ts +4 -3
- package/dist/components/shared/GenericAutobet/BetCountInput.d.ts +2 -2
- package/dist/components/shared/GenericAutobet/GenericAutobet.d.ts +3 -3
- package/dist/components/shared/HistoryPills/HistoryPills.d.ts +2 -1
- package/dist/components/shared/HotkeysModal/HotkeysModal.d.ts +1 -1
- package/dist/components/shared/Inputs/BetAmountInput/BetAmountInput.d.ts +6 -2
- package/dist/components/shared/Inputs/ChipInput/ChipInput.d.ts +3 -3
- package/dist/components/shared/Inputs/CurrencyInput/RawCurrencyInput.d.ts +2 -5
- package/dist/components/shared/Inputs/Input/Input.d.ts +1 -2
- package/dist/components/shared/Modal/Modal.d.ts +0 -2
- package/dist/components/shared/Select/Select.d.ts +1 -1
- package/dist/components/shared/Switch/Switch.d.ts +1 -1
- package/dist/components/shared/Toggle/Toggle.d.ts +1 -1
- package/dist/components/shared/context/desktop-attribute.d.ts +2 -0
- package/dist/components/shared/context/provide-test-contexts.d.ts +24 -0
- package/dist/components/shared/context/required-context.d.ts +10 -0
- package/dist/components/shared/context/slices/layout.context.d.ts +9 -0
- package/dist/components/shared/context/slices/limits.context.d.ts +17 -0
- package/dist/components/shared/context/slices/locale.context.d.ts +13 -0
- package/dist/components/shared/context/slices/preferences.context.d.ts +15 -0
- package/dist/components/shared/context/slices/services.context.d.ts +11 -0
- package/dist/components/shared/context/slices/session.context.d.ts +12 -0
- package/dist/components/shared/context/slices/skin.context.d.ts +43 -0
- package/dist/components/shared/context/slices/wallet.context.d.ts +16 -0
- package/dist/controllers/history.controller.d.ts +3 -8
- package/dist/index.d.ts +12 -1
- package/dist/index.mjs +3216 -3214
- package/dist/shared/button-feedback.d.ts +5 -13
- package/dist/shared/cards/Card.d.ts +1 -1
- package/dist/shared/cards/CardStack.d.ts +0 -1
- package/dist/shared/create-api-factory.d.ts +2 -2
- package/dist/shared/game-ui-module.d.ts +2 -2
- package/dist/shared/mock-bridged-game-service.d.ts +5 -5
- package/dist/shared/number-attribute.d.ts +3 -0
- package/dist/shared/profit-on-win.d.ts +6 -0
- package/dist/translations/language.context.d.ts +0 -7
- package/dist/utils/game-layout-style.d.ts +4 -6
- package/package.json +3 -2
- package/dist/components/shared/context/game.context.d.ts +0 -93
package/README.md
CHANGED
|
@@ -7,9 +7,11 @@ The Lit components, controllers, translations, wire types and game-module regist
|
|
|
7
7
|
`lit`, `@lit/context` and `big.js` are peer dependencies so that one copy of each is bundled by the host. Importing the package registers every shared custom element.
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
|
-
import { GameComponent,
|
|
10
|
+
import { GameComponent, RequiredContext, localeContext, getTranslation } from '@betorigami/game-ui-shared';
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
Elements read the game context through `RequiredContext`, one per slice they need (`localeContext`, `sessionContext`, `limitsContext`, `servicesContext`, `skinContext`, `preferencesContext`, `layoutContext`, `walletContext`), all provided by `<origami-game-provider-wrapper>`. Reading a slice outside the wrapper throws. Elements whose styles use `data-is-desktop` add the `@desktopAttribute` decorator. Tests give an element its slices with `provideTestContexts` and change them with `updateTestContexts`.
|
|
14
|
+
|
|
13
15
|
A game contributes itself through a `GameUiModule`:
|
|
14
16
|
|
|
15
17
|
```ts
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../context/game.context';
|
|
3
2
|
export type AlertType = 'success' | 'warning' | 'error' | 'info';
|
|
4
3
|
export declare class Alert extends OrigamiElement {
|
|
5
4
|
static styles: import('lit').CSSResult[];
|
|
@@ -10,7 +9,6 @@ export declare class Alert extends OrigamiElement {
|
|
|
10
9
|
private isHiding;
|
|
11
10
|
private isPaused;
|
|
12
11
|
private progressWidth;
|
|
13
|
-
gameData?: gameContextType;
|
|
14
12
|
private animationFrame?;
|
|
15
13
|
private remainingTime;
|
|
16
14
|
private lastTickTimestamp?;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { nothing } from 'lit';
|
|
2
2
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
3
3
|
import { AlertType } from '../Alert/Alert';
|
|
4
|
-
import { gameContextType } from '../context/game.context';
|
|
5
4
|
export interface AlertItem {
|
|
6
5
|
id: string;
|
|
7
6
|
type: AlertType;
|
|
@@ -12,14 +11,13 @@ export interface AlertItem {
|
|
|
12
11
|
}
|
|
13
12
|
export declare class AlertManager extends OrigamiElement {
|
|
14
13
|
static styles: import('lit').CSSResult[];
|
|
15
|
-
gameData?: gameContextType;
|
|
16
14
|
private alerts;
|
|
17
15
|
private previousPositions;
|
|
18
16
|
private readonly defaultAnimationMs;
|
|
19
17
|
addAlert(alert: AlertItem): string;
|
|
20
18
|
clearAllAlerts(): void;
|
|
21
19
|
private handleAlertClose;
|
|
22
|
-
render():
|
|
20
|
+
render(): import('lit').TemplateResult<1> | typeof nothing;
|
|
23
21
|
protected willUpdate(): void;
|
|
24
22
|
protected updated(): void;
|
|
25
23
|
private measurePositions;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { BetResult } from '../../../shared/bet.types';
|
|
2
|
-
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
3
2
|
import { OrigamiGame } from '../../../shared/constants';
|
|
4
|
-
import {
|
|
3
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
5
4
|
export declare class BetResultModal extends OrigamiElement {
|
|
6
|
-
|
|
5
|
+
private readonly locale;
|
|
6
|
+
private readonly session;
|
|
7
7
|
static styles: import('lit').CSSResult[];
|
|
8
8
|
betId: string;
|
|
9
9
|
betData: Omit<BetResult, 'afterBalance'> | null;
|
|
10
10
|
private _copiedId;
|
|
11
11
|
private _copyTimeout;
|
|
12
|
-
private gameConsumer;
|
|
13
12
|
private betResultCache;
|
|
14
13
|
private _cachedOutcome;
|
|
15
14
|
private _cachedBetData;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../context/game.context';
|
|
3
2
|
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'icon' | 'icon-secondary';
|
|
4
3
|
export declare class Button extends OrigamiElement {
|
|
4
|
+
private readonly locale;
|
|
5
|
+
private readonly services;
|
|
6
|
+
private readonly preferences;
|
|
5
7
|
static styles: import('lit').CSSResult[];
|
|
6
8
|
static shadowRootOptions: {
|
|
7
9
|
delegatesFocus: boolean;
|
|
@@ -11,7 +13,6 @@ export declare class Button extends OrigamiElement {
|
|
|
11
13
|
serializable?: boolean;
|
|
12
14
|
slotAssignment?: SlotAssignmentMode;
|
|
13
15
|
};
|
|
14
|
-
gameData?: gameContextType;
|
|
15
16
|
variant: ButtonVariant;
|
|
16
17
|
disabled: boolean;
|
|
17
18
|
ariaLabel: string | null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../context/game.context';
|
|
3
1
|
import { ButtonVariant } from './Button';
|
|
2
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
4
3
|
export type LinkButtonTarget = '_self' | '_top' | '_blank';
|
|
5
4
|
export declare class LinkButton extends OrigamiElement {
|
|
5
|
+
private readonly locale;
|
|
6
|
+
private readonly services;
|
|
6
7
|
static styles: import('lit').CSSResult[];
|
|
7
8
|
static shadowRootOptions: {
|
|
8
9
|
delegatesFocus: boolean;
|
|
@@ -12,7 +13,6 @@ export declare class LinkButton extends OrigamiElement {
|
|
|
12
13
|
serializable?: boolean;
|
|
13
14
|
slotAssignment?: SlotAssignmentMode;
|
|
14
15
|
};
|
|
15
|
-
gameData?: gameContextType;
|
|
16
16
|
href: string;
|
|
17
17
|
target: LinkButtonTarget;
|
|
18
18
|
variant: ButtonVariant;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RequiredContext } from './context/required-context';
|
|
1
2
|
import { HotkeyDefinition } from '../../controllers/hotkey.controller';
|
|
2
3
|
import { ChipEvent } from '../../shared/chip-state.utils';
|
|
3
4
|
import { GameComponent } from './GameComponent';
|
|
@@ -9,10 +10,13 @@ export type ChipTablePosition = string;
|
|
|
9
10
|
* Responsibilities:
|
|
10
11
|
* - Per-click chip amount (1/2, 2x, reset)
|
|
11
12
|
* - Event-sourced chip state (add, multiplier-change)
|
|
12
|
-
* - Derived totals + syncing `
|
|
13
|
+
* - Derived totals + syncing the wallet `betAmount`
|
|
13
14
|
* - Shared hotkeys for chip table interaction
|
|
14
15
|
*/
|
|
15
16
|
export declare abstract class ChipTableGameComponent extends GameComponent {
|
|
17
|
+
protected readonly limits: RequiredContext<{
|
|
18
|
+
__context__: import('../..').LimitsContextType;
|
|
19
|
+
}>;
|
|
16
20
|
protected perClickAmount: string;
|
|
17
21
|
protected chipEvents: ChipEvent[];
|
|
18
22
|
/** Game-specific max payout check (uses derived state). */
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../context/game.context';
|
|
3
2
|
export declare class DepositButton extends OrigamiElement {
|
|
3
|
+
private readonly locale;
|
|
4
|
+
private readonly session;
|
|
5
|
+
private readonly limits;
|
|
6
|
+
private readonly wallet;
|
|
4
7
|
betAboveBalance: boolean;
|
|
5
|
-
|
|
6
|
-
private shouldShowDepositButton;
|
|
8
|
+
private depositButtonUrl;
|
|
7
9
|
render(): import('lit').TemplateResult<1>;
|
|
8
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
2
|
import { VerifierGameOptions } from '../../../shared/provably-fair-verifier';
|
|
3
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
3
4
|
export interface ProvablyFairData {
|
|
4
5
|
publicKey: string;
|
|
5
6
|
request: string;
|
|
@@ -8,7 +9,10 @@ export interface ProvablyFairData {
|
|
|
8
9
|
clientSeed: string;
|
|
9
10
|
verifierOptions?: VerifierGameOptions;
|
|
10
11
|
}
|
|
11
|
-
export declare class FairnessContent extends
|
|
12
|
+
export declare class FairnessContent extends OrigamiElement {
|
|
13
|
+
private readonly locale;
|
|
14
|
+
private readonly session;
|
|
15
|
+
private readonly services;
|
|
12
16
|
static styles: import('lit').CSSResult[];
|
|
13
17
|
provablyFairData: ProvablyFairData;
|
|
14
18
|
showExtendedFields: boolean;
|
|
@@ -24,7 +28,6 @@ export declare class FairnessContent extends LitElement {
|
|
|
24
28
|
private _isSavingClientSeed;
|
|
25
29
|
private _showProvablyFairInfo;
|
|
26
30
|
private _onAccordionClick;
|
|
27
|
-
private gameConsumer;
|
|
28
31
|
private _clientSeedChangedHandler;
|
|
29
32
|
private _nonceChangedHandler;
|
|
30
33
|
private _previousHistoryController?;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
2
|
export declare class HistoryTable extends OrigamiElement {
|
|
3
|
+
private readonly locale;
|
|
4
|
+
private readonly session;
|
|
5
|
+
private readonly services;
|
|
6
|
+
private readonly layout;
|
|
3
7
|
static styles: import('lit').CSSResult[];
|
|
4
8
|
private _historyData;
|
|
5
9
|
private _isLoading;
|
|
6
|
-
private gameConsumer;
|
|
7
10
|
private betResultCache;
|
|
8
11
|
private _historyDataChangedHandler;
|
|
9
12
|
private _previousHistoryController?;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../context/game.context';
|
|
3
2
|
export declare class Footer extends OrigamiElement {
|
|
3
|
+
private readonly locale;
|
|
4
|
+
private readonly session;
|
|
5
|
+
private readonly skin;
|
|
6
|
+
private readonly preferences;
|
|
4
7
|
static styles: import('lit').CSSResult[];
|
|
5
|
-
gameData?: gameContextType;
|
|
6
8
|
showLogo: boolean;
|
|
7
9
|
showHistoryButton: boolean;
|
|
8
10
|
gameInfoOpen: boolean;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AutobetToggleEvent } from '../../shared/event-map';
|
|
2
|
-
import { default as OrigamiElement } from '../../shared/origami-element';
|
|
3
2
|
import { ErrorCode } from '../../shared/provider-api/error-codes';
|
|
4
3
|
import { BetMode } from './GameSidebar/GameSidebar';
|
|
5
4
|
import { AutobetEventPayload } from './GenericAutobet/GenericAutobet';
|
|
5
|
+
import { default as OrigamiElement } from '../../shared/origami-element';
|
|
6
6
|
import { UiLockContent } from './UiLock/UiLockContent';
|
|
7
7
|
import { default as Big } from 'big.js';
|
|
8
8
|
import { NewBetItem } from '../../controllers/history.controller';
|
|
9
|
+
import { RequiredContext } from './context/required-context';
|
|
9
10
|
export declare const isBetMode: (value: unknown) => value is BetMode;
|
|
10
11
|
export type AutobetSettingsWithId = AutobetEventPayload & {
|
|
11
12
|
autobetId: string;
|
|
@@ -20,6 +21,21 @@ export interface GameBetResult {
|
|
|
20
21
|
errorMessage?: string;
|
|
21
22
|
}
|
|
22
23
|
export declare abstract class GameComponent extends OrigamiElement {
|
|
24
|
+
protected readonly locale: RequiredContext<{
|
|
25
|
+
__context__: import('../..').LocaleContextType;
|
|
26
|
+
}>;
|
|
27
|
+
protected readonly session: RequiredContext<{
|
|
28
|
+
__context__: import('../..').SessionContextType;
|
|
29
|
+
}>;
|
|
30
|
+
protected readonly services: RequiredContext<{
|
|
31
|
+
__context__: import('../..').ServicesContextType;
|
|
32
|
+
}>;
|
|
33
|
+
protected readonly preferences: RequiredContext<{
|
|
34
|
+
__context__: import('../..').PreferencesContextType;
|
|
35
|
+
}>;
|
|
36
|
+
protected readonly wallet: RequiredContext<{
|
|
37
|
+
__context__: import('../..').WalletContextType;
|
|
38
|
+
}>;
|
|
23
39
|
protected manualOrAuto: BetMode;
|
|
24
40
|
protected hasPendingBet: boolean;
|
|
25
41
|
protected autobetInProgress: boolean;
|
|
@@ -27,9 +43,6 @@ export declare abstract class GameComponent extends OrigamiElement {
|
|
|
27
43
|
static styles: import('lit').CSSResult[];
|
|
28
44
|
protected onBetAmountChange: (_oldBetAmount: string, _newBetAmount: string) => void;
|
|
29
45
|
private deferredBetReset;
|
|
30
|
-
private gameConsumer;
|
|
31
|
-
get gameData(): import('./context/game.context').gameContextType;
|
|
32
|
-
get isDemoMode(): boolean;
|
|
33
46
|
get isToggleDisabled(): boolean;
|
|
34
47
|
get areInputsDisabled(): boolean;
|
|
35
48
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
3
3
|
import { OrigamiGame } from '../../../shared/constants';
|
|
4
|
-
export declare class GameInfoModal extends
|
|
4
|
+
export declare class GameInfoModal extends OrigamiElement {
|
|
5
|
+
private readonly locale;
|
|
6
|
+
private readonly limits;
|
|
5
7
|
static styles: import('lit').CSSResult[];
|
|
6
|
-
gameData?: gameContextType;
|
|
7
8
|
gameType: OrigamiGame;
|
|
8
9
|
get rtpValue(): number;
|
|
9
|
-
get isDemoMode(): boolean;
|
|
10
10
|
private renderAccordionSection;
|
|
11
11
|
private renderAccordionSectionWithCustomContent;
|
|
12
12
|
private renderAccordionSectionWithInterpolation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TranslationKey } from '../../../translations';
|
|
2
2
|
import { OrigamiGame } from '../../../shared/constants';
|
|
3
|
-
import {
|
|
3
|
+
import { LimitsContextType } from '../context/slices/limits.context';
|
|
4
4
|
export interface TranslationInfo {
|
|
5
5
|
key: TranslationKey;
|
|
6
6
|
fallback: string;
|
|
@@ -23,4 +23,4 @@ export interface GameInfoConfig {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
export declare const getGameInfoConfig: (game: OrigamiGame) => GameInfoConfig | undefined;
|
|
26
|
-
export declare const calculateMaxMultiplier: (game: OrigamiGame,
|
|
26
|
+
export declare const calculateMaxMultiplier: (game: OrigamiGame, limits: LimitsContextType) => string;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { default as OrigamiElement } from '../../../shared/origami-element.js';
|
|
2
|
-
import { gameContextType } from '../context/game.context';
|
|
3
1
|
import { AlertManager } from '../AlertManager/AlertManager';
|
|
4
2
|
import { OrigamiGame } from '../../../shared/constants';
|
|
3
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
5
4
|
export declare class GameLayout extends OrigamiElement {
|
|
5
|
+
private readonly locale;
|
|
6
|
+
private readonly session;
|
|
7
|
+
private readonly limits;
|
|
8
|
+
private readonly services;
|
|
9
|
+
private readonly skin;
|
|
10
|
+
private readonly preferences;
|
|
11
|
+
private readonly wallet;
|
|
6
12
|
static styles: import('lit').CSSResult[];
|
|
7
|
-
gameData?: gameContextType;
|
|
8
13
|
gameType: OrigamiGame;
|
|
9
14
|
showFooter: boolean;
|
|
10
15
|
alertManager: AlertManager;
|
|
@@ -22,7 +27,6 @@ export declare class GameLayout extends OrigamiElement {
|
|
|
22
27
|
private get uiLock();
|
|
23
28
|
private get isUiLocked();
|
|
24
29
|
private get gameFooterPosition();
|
|
25
|
-
get isDemoMode(): boolean;
|
|
26
30
|
private getCustomBackgroundUrl;
|
|
27
31
|
private getGameAreaCustomStyles;
|
|
28
32
|
private previousHistoryController?;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nothing } from 'lit';
|
|
2
2
|
import { OrigamiGame } from '../../../shared/constants';
|
|
3
|
-
|
|
3
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
4
|
+
export declare class GameOutcomeDisplay extends OrigamiElement {
|
|
5
|
+
private readonly locale;
|
|
4
6
|
static styles: import('lit').CSSResult[];
|
|
5
7
|
gameType: OrigamiGame | 'INVALID_GAME';
|
|
6
8
|
inBetResultModal: boolean;
|
|
7
9
|
gameOutcome?: unknown;
|
|
8
10
|
enableAnimation: boolean;
|
|
9
11
|
persistResult: boolean;
|
|
10
|
-
private gameConsumer;
|
|
11
12
|
render(): import('lit').TemplateResult | typeof nothing;
|
|
12
13
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Currency, OrigamiGame } from '../../shared/constants';
|
|
2
2
|
import { default as OrigamiElement } from '../../shared/origami-element';
|
|
3
3
|
import { Language } from '../../translations/language.context';
|
|
4
|
-
import { gameContext, gameContextType } from './context/game.context';
|
|
5
|
-
import { ContextProvider } from '@lit/context';
|
|
6
4
|
import { PropertyValues } from 'lit';
|
|
7
5
|
import { default as Big } from 'big.js';
|
|
8
6
|
export declare class GameProviderWrapper extends OrigamiElement {
|
|
@@ -16,9 +14,9 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
16
14
|
origamiGame: OrigamiGame;
|
|
17
15
|
lobbyUrl: string | null;
|
|
18
16
|
depositUrl: string | undefined;
|
|
19
|
-
maxPayout: number
|
|
20
|
-
minBet: number
|
|
21
|
-
maxBet: number
|
|
17
|
+
maxPayout: number;
|
|
18
|
+
minBet: number;
|
|
19
|
+
maxBet: number;
|
|
22
20
|
edge: 1 | 2 | 3 | 8 | 4;
|
|
23
21
|
showCurrencyAsText: boolean;
|
|
24
22
|
footerPosition: 'ABOVE' | 'BELOW';
|
|
@@ -82,16 +80,26 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
82
80
|
private _resizeObserver;
|
|
83
81
|
private hasLoadedBalance;
|
|
84
82
|
private uiLock;
|
|
85
|
-
|
|
83
|
+
private readonly walletUpdaters;
|
|
84
|
+
private readonly preferenceUpdaters;
|
|
85
|
+
private readonly providers;
|
|
86
86
|
private applyUiLock;
|
|
87
87
|
private handleLockUi;
|
|
88
88
|
connectedCallback(): void;
|
|
89
89
|
firstUpdated(_changed: PropertyValues): Promise<void>;
|
|
90
90
|
disconnectedCallback(): void;
|
|
91
91
|
updated(changedProperties: PropertyValues): void;
|
|
92
|
-
get
|
|
93
|
-
private
|
|
94
|
-
private
|
|
92
|
+
private get isDemoMode();
|
|
93
|
+
private get isDesktop();
|
|
94
|
+
private createLocale;
|
|
95
|
+
private createSession;
|
|
96
|
+
private createLimits;
|
|
97
|
+
private createServices;
|
|
98
|
+
private createSkin;
|
|
99
|
+
private createPreferences;
|
|
100
|
+
private createLayout;
|
|
101
|
+
private createWallet;
|
|
102
|
+
private publish;
|
|
95
103
|
private fetchBalance;
|
|
96
104
|
private fetchPublicKey;
|
|
97
105
|
updateHotkeysOpenEnabled(enabled: boolean): void;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../context/game.context';
|
|
3
2
|
export type BetMode = 'Manual' | 'Auto';
|
|
4
3
|
export declare class GameSidebar extends OrigamiElement {
|
|
4
|
+
private readonly locale;
|
|
5
5
|
static styles: import('lit').CSSResult[];
|
|
6
|
-
gameData?: gameContextType;
|
|
7
6
|
mode: BetMode;
|
|
8
|
-
betAmount: string;
|
|
9
7
|
toggleDisabled: boolean;
|
|
10
8
|
option1Label: string;
|
|
11
9
|
option2Label: string;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { TemplateResult } from 'lit';
|
|
2
|
-
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
3
2
|
import { default as Big } from 'big.js';
|
|
3
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
4
4
|
type GameType = 'Keno' | 'Mines' | 'Roulette';
|
|
5
5
|
export declare class GameWinPopup extends OrigamiElement {
|
|
6
|
+
private readonly locale;
|
|
7
|
+
private readonly session;
|
|
8
|
+
private readonly skin;
|
|
6
9
|
static styles: import('lit').CSSResult[];
|
|
7
10
|
payout: Big | null;
|
|
8
11
|
multiplier: number | undefined;
|
|
9
|
-
currencySymbol: string;
|
|
10
12
|
title: string;
|
|
11
13
|
description: string;
|
|
12
14
|
gemCount: number | undefined;
|
|
@@ -15,7 +17,6 @@ export declare class GameWinPopup extends OrigamiElement {
|
|
|
15
17
|
isLoss: boolean;
|
|
16
18
|
isPush: boolean;
|
|
17
19
|
private betResultCache;
|
|
18
|
-
private gameConsumer;
|
|
19
20
|
private get disableBetResultModal();
|
|
20
21
|
constructor();
|
|
21
22
|
disconnectedCallback(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../context/game.context';
|
|
3
2
|
export declare class BetCountInput extends OrigamiElement {
|
|
4
|
-
|
|
3
|
+
private readonly locale;
|
|
4
|
+
private readonly wallet;
|
|
5
5
|
disabled: boolean;
|
|
6
6
|
static styles: import('lit').CSSResult[];
|
|
7
7
|
private _handleAutobetGamesChange;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
1
|
import { ContextProvider } from '@lit/context';
|
|
3
|
-
import {
|
|
2
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
4
3
|
export type AfterBetEffect = 'Reset' | 'Increase';
|
|
5
4
|
export type AutobetValues = {
|
|
6
5
|
onWinPercentage: string;
|
|
@@ -15,6 +14,8 @@ export type AutobetEventPayload = AutobetValues & {
|
|
|
15
14
|
numberOfBets: string;
|
|
16
15
|
};
|
|
17
16
|
export declare class GenericAutobet extends OrigamiElement {
|
|
17
|
+
private readonly locale;
|
|
18
|
+
private readonly wallet;
|
|
18
19
|
inputsDisabled: boolean;
|
|
19
20
|
autobetSettings: AutobetValues;
|
|
20
21
|
autobetStopping: boolean;
|
|
@@ -31,7 +32,6 @@ export declare class GenericAutobet extends OrigamiElement {
|
|
|
31
32
|
betMaxMultiplier: number;
|
|
32
33
|
hasCustomBetAmountSection: boolean;
|
|
33
34
|
disableBetAmountHotkeys: boolean;
|
|
34
|
-
gameData: gameContextType;
|
|
35
35
|
customInputsSlot?: HTMLSlotElement;
|
|
36
36
|
private betButtonEl?;
|
|
37
37
|
static styles: import('lit').CSSResult[];
|
|
@@ -7,13 +7,14 @@ export interface HistoryItem {
|
|
|
7
7
|
color?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare class HistoryPills extends OrigamiElement {
|
|
10
|
+
private readonly session;
|
|
11
|
+
private readonly preferences;
|
|
10
12
|
static styles: import('lit').CSSResult[];
|
|
11
13
|
history: HistoryItem[];
|
|
12
14
|
showMultiplierSuffix: boolean;
|
|
13
15
|
fadeOpacity: boolean;
|
|
14
16
|
private animatingInIds;
|
|
15
17
|
private betResultCache;
|
|
16
|
-
private gameConsumer;
|
|
17
18
|
get disableHistoryModal(): boolean;
|
|
18
19
|
protected updated(changedProperties: PropertyValues<this>): void;
|
|
19
20
|
handleHistoryChange(oldHistory: HistoryItem[]): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OrigamiGame } from '../../../shared/constants';
|
|
2
2
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
3
3
|
export declare class HotkeysModal extends OrigamiElement {
|
|
4
|
+
private readonly locale;
|
|
4
5
|
static styles: import('lit').CSSResult[];
|
|
5
|
-
private gameConsumer;
|
|
6
6
|
gameType: OrigamiGame;
|
|
7
7
|
private getRows;
|
|
8
8
|
private renderRow;
|
|
@@ -6,8 +6,12 @@ export declare enum InvalidReason {
|
|
|
6
6
|
BET_AMOUNT_ABOVE_BALANCE = "BET_AMOUNT_ABOVE_BALANCE"
|
|
7
7
|
}
|
|
8
8
|
export declare class BetAmountInput extends OrigamiElement {
|
|
9
|
+
private readonly locale;
|
|
10
|
+
private readonly limits;
|
|
11
|
+
private readonly services;
|
|
12
|
+
private readonly preferences;
|
|
13
|
+
private readonly wallet;
|
|
9
14
|
static styles: import('lit').CSSResult[];
|
|
10
|
-
get gameData(): import('../../context/game.context').gameContextType;
|
|
11
15
|
private isFocused;
|
|
12
16
|
private invalidReason;
|
|
13
17
|
betMaxMultiplier: number | null;
|
|
@@ -15,7 +19,7 @@ export declare class BetAmountInput extends OrigamiElement {
|
|
|
15
19
|
halfBetDisabled: boolean;
|
|
16
20
|
doubleBetDisabled: boolean;
|
|
17
21
|
maxAmount?: string;
|
|
18
|
-
private
|
|
22
|
+
private syncBetAmount;
|
|
19
23
|
firstUpdated(): void;
|
|
20
24
|
watchValue(): void;
|
|
21
25
|
updated(changedProperties: PropertyValues): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { default as OrigamiElement } from '../../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../../context/game.context';
|
|
3
1
|
import { ChipConfig } from '../../types/chip.types';
|
|
2
|
+
import { default as OrigamiElement } from '../../../../shared/origami-element';
|
|
4
3
|
export declare class ChipInput extends OrigamiElement {
|
|
4
|
+
private readonly locale;
|
|
5
|
+
private readonly services;
|
|
5
6
|
static styles: import('lit').CSSResult[];
|
|
6
7
|
chips: ChipConfig[];
|
|
7
8
|
disabled: boolean;
|
|
8
9
|
private selectedIndex;
|
|
9
|
-
gameData?: gameContextType;
|
|
10
10
|
/**
|
|
11
11
|
* Parse a chip label like "0.1", "10", "1K", "10K", "1M" into its numeric value.
|
|
12
12
|
* This is used only for display of the chip value hint in the UI.
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
|
-
import { default as OrigamiElement } from '../../../../shared/origami-element';
|
|
3
2
|
import { Input } from '../Input/Input';
|
|
4
|
-
import {
|
|
5
|
-
import { gameContextType } from '../../context/game.context';
|
|
3
|
+
import { default as OrigamiElement } from '../../../../shared/origami-element';
|
|
6
4
|
export declare class RawCurrencyInput extends OrigamiElement {
|
|
5
|
+
private readonly locale;
|
|
7
6
|
static styles: import('lit').CSSResult[];
|
|
8
|
-
gameData: gameContextType;
|
|
9
7
|
label: string;
|
|
10
|
-
currency: Currency;
|
|
11
8
|
errorMessage: string;
|
|
12
9
|
value: string;
|
|
13
10
|
rightLabel: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../../shared/origami-element';
|
|
2
|
-
import { gameContextType } from '../../context/game.context';
|
|
3
2
|
export interface InputAddonButton {
|
|
4
3
|
label: string;
|
|
5
4
|
'aria-label'?: string;
|
|
@@ -19,8 +18,8 @@ export declare const ValidationPatterns: {
|
|
|
19
18
|
alphanumeric: RegExp;
|
|
20
19
|
};
|
|
21
20
|
export declare class Input extends OrigamiElement {
|
|
21
|
+
private readonly layout;
|
|
22
22
|
static styles: import('lit').CSSResult[];
|
|
23
|
-
gameData?: gameContextType;
|
|
24
23
|
value: string;
|
|
25
24
|
label: string;
|
|
26
25
|
placeholder: string;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element.js';
|
|
2
2
|
import { default as FocusTrap } from '../../../utils/focus-trap.js';
|
|
3
|
-
import { gameContextType } from '../context/game.context';
|
|
4
3
|
export default class OrigamiModal extends OrigamiElement {
|
|
5
4
|
static styles: import('lit').CSSResult[];
|
|
6
5
|
private originalTrigger;
|
|
7
|
-
gameData?: gameContextType;
|
|
8
6
|
focusTrap: FocusTrap;
|
|
9
7
|
private closeWatcher;
|
|
10
8
|
fixedPosition: boolean;
|
|
@@ -6,8 +6,8 @@ export interface SelectOption<T extends string = string> {
|
|
|
6
6
|
group?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare class Select extends OrigamiElement {
|
|
9
|
+
private readonly locale;
|
|
9
10
|
static styles: import('lit').CSSResult[];
|
|
10
|
-
private gameData?;
|
|
11
11
|
dir: string;
|
|
12
12
|
label: string;
|
|
13
13
|
options: SelectOption[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
2
|
export declare class Switch extends OrigamiElement {
|
|
3
|
+
private readonly services;
|
|
3
4
|
static styles: import('lit').CSSResult[];
|
|
4
|
-
private gameContext?;
|
|
5
5
|
checked: boolean;
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
label: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
2
|
export declare class Toggle extends OrigamiElement {
|
|
3
|
+
private readonly services;
|
|
3
4
|
static styles: import('lit').CSSResult[];
|
|
4
|
-
private gameContext?;
|
|
5
5
|
option1: string;
|
|
6
6
|
option2: string;
|
|
7
7
|
option1Value: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LayoutContextType } from './slices/layout.context';
|
|
2
|
+
import { LimitsContextType } from './slices/limits.context';
|
|
3
|
+
import { LocaleContextType } from './slices/locale.context';
|
|
4
|
+
import { PreferencesContextType } from './slices/preferences.context';
|
|
5
|
+
import { ServicesContextType } from './slices/services.context';
|
|
6
|
+
import { SessionContextType } from './slices/session.context';
|
|
7
|
+
import { SkinContextType } from './slices/skin.context';
|
|
8
|
+
import { WalletContextType } from './slices/wallet.context';
|
|
9
|
+
type TestContexts = {
|
|
10
|
+
locale: LocaleContextType;
|
|
11
|
+
session: SessionContextType;
|
|
12
|
+
limits: LimitsContextType;
|
|
13
|
+
services: ServicesContextType;
|
|
14
|
+
skin: SkinContextType;
|
|
15
|
+
preferences: PreferencesContextType;
|
|
16
|
+
layout: LayoutContextType;
|
|
17
|
+
wallet: WalletContextType;
|
|
18
|
+
};
|
|
19
|
+
export type TestContextOverrides = {
|
|
20
|
+
[K in keyof TestContexts]?: Partial<TestContexts[K]>;
|
|
21
|
+
};
|
|
22
|
+
export declare const provideTestContexts: <T extends object>(element: T, overrides?: TestContextOverrides) => T;
|
|
23
|
+
export declare const updateTestContexts: (element: object, overrides: TestContextOverrides) => void;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Context, ContextType } from '@lit/context';
|
|
2
|
+
import { ReactiveControllerHost } from 'lit';
|
|
3
|
+
type Host = ReactiveControllerHost & HTMLElement;
|
|
4
|
+
export declare class RequiredContext<C extends Context<unknown, unknown>> {
|
|
5
|
+
readonly context: C;
|
|
6
|
+
private consumer;
|
|
7
|
+
constructor(host: Host, context: C, onChange?: (value: ContextType<C>) => void);
|
|
8
|
+
get value(): ContextType<C>;
|
|
9
|
+
}
|
|
10
|
+
export {};
|