@betorigami/games 0.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/dist/components/dice/DiceContent/DiceContent.d.ts +14 -0
- package/dist/components/dice/DiceContent/DiceContent.styles.d.ts +1 -0
- package/dist/components/dice/DiceContentBottom/DiceContentBottom.d.ts +15 -0
- package/dist/components/dice/DiceContentBottom/DiceContentBottom.styles.d.ts +1 -0
- package/dist/components/dice/DiceControls/DiceAuto.d.ts +9 -0
- package/dist/components/dice/DiceControls/DiceControls.styles.d.ts +1 -0
- package/dist/components/dice/DiceControls/DiceManual.d.ts +11 -0
- package/dist/components/dice/DiceGame.d.ts +47 -0
- package/dist/components/dice/DiceSlider/DiceSlider.d.ts +16 -0
- package/dist/components/dice/DiceSlider/DiceSlider.styles.d.ts +1 -0
- package/dist/components/dice/dice.api.d.ts +71 -0
- package/dist/components/dice/dice.mock.api.d.ts +13 -0
- package/dist/components/keno/KenoContent/KenoContent.d.ts +17 -0
- package/dist/components/keno/KenoContent/KenoContent.styles.d.ts +1 -0
- package/dist/components/keno/KenoContent/KenoContentBottom.d.ts +14 -0
- package/dist/components/keno/KenoContent/KenoContentBottom.styles.d.ts +1 -0
- package/dist/components/keno/KenoControls/KenoAuto.d.ts +9 -0
- package/dist/components/keno/KenoControls/KenoControls.styles.d.ts +1 -0
- package/dist/components/keno/KenoControls/KenoManual.d.ts +10 -0
- package/dist/components/keno/KenoGame.d.ts +30 -0
- package/dist/components/keno/KenoGrid/KenoGrid.d.ts +24 -0
- package/dist/components/keno/KenoGrid/KenoGrid.styles.d.ts +1 -0
- package/dist/components/keno/KenoTile/KenoTile.d.ts +16 -0
- package/dist/components/keno/KenoTile/KenoTile.styles.d.ts +1 -0
- package/dist/components/keno/keno.api.d.ts +67 -0
- package/dist/components/keno/keno.mock.api.d.ts +15 -0
- package/dist/components/limbo/LimboContent/LimboContent.d.ts +13 -0
- package/dist/components/limbo/LimboContent/LimboContent.styles.d.ts +1 -0
- package/dist/components/limbo/LimboContentBottom/LimboContentBottom.d.ts +14 -0
- package/dist/components/limbo/LimboContentBottom/LimboContentBottom.styles.d.ts +1 -0
- package/dist/components/limbo/LimboControls/LimboAuto.d.ts +9 -0
- package/dist/components/limbo/LimboControls/LimboControls.styles.d.ts +1 -0
- package/dist/components/limbo/LimboControls/LimboManual.d.ts +11 -0
- package/dist/components/limbo/LimboGame.d.ts +27 -0
- package/dist/components/limbo/Multiplier/LimboMultiplier.d.ts +17 -0
- package/dist/components/limbo/Multiplier/LimboMultiplier.styles.d.ts +1 -0
- package/dist/components/limbo/limbo.api.d.ts +62 -0
- package/dist/components/limbo/limbo.mock.api.d.ts +13 -0
- package/dist/components/mines/Controls/MinesAuto.d.ts +13 -0
- package/dist/components/mines/Controls/MinesControls.styles.d.ts +1 -0
- package/dist/components/mines/Controls/MinesManual.d.ts +11 -0
- package/dist/components/mines/MinesGame.d.ts +34 -0
- package/dist/components/mines/MinesGrid/MinesGrid.d.ts +29 -0
- package/dist/components/mines/MinesGrid/MinesGrid.styles.d.ts +1 -0
- package/dist/components/mines/MinesTile/MinesTile.d.ts +21 -0
- package/dist/components/mines/MinesTile/MinesTile.styles.d.ts +1 -0
- package/dist/components/mines/mines.api.d.ts +122 -0
- package/dist/components/mines/mines.constants.d.ts +22 -0
- package/dist/components/mines/mines.mock.api.d.ts +50 -0
- package/dist/components/shared/BetResultModal/BetResultModal.d.ts +45 -0
- package/dist/components/shared/BetResultModal/BetResultModal.styles.d.ts +1 -0
- package/dist/components/shared/Button/Button.d.ts +25 -0
- package/dist/components/shared/Button/Button.styles.d.ts +1 -0
- package/dist/components/shared/Button/ButtonGroup.d.ts +6 -0
- package/dist/components/shared/Button/ButtonGroup.styles.d.ts +1 -0
- package/dist/components/shared/FairnessDetails/FairnessDetails.d.ts +14 -0
- package/dist/components/shared/FairnessDetails/FairnessDetails.styles.d.ts +1 -0
- package/dist/components/shared/Footer/Footer.d.ts +49 -0
- package/dist/components/shared/Footer/Footer.styles.d.ts +1 -0
- package/dist/components/shared/GameComponent.d.ts +35 -0
- package/dist/components/shared/GameLayout/GameLayout.d.ts +40 -0
- package/dist/components/shared/GameLayout/GameLayout.styles.d.ts +1 -0
- package/dist/components/shared/GameProviderWrapper.d.ts +20 -0
- package/dist/components/shared/GameSidebar/GameSidebar.d.ts +15 -0
- package/dist/components/shared/GameSidebar/GameSidebar.styles.d.ts +1 -0
- package/dist/components/shared/GameWinPopup/GameWinPopup.d.ts +18 -0
- package/dist/components/shared/GameWinPopup/GameWinPopup.styles.d.ts +1 -0
- package/dist/components/shared/GenericAutobet/BetCountInput.d.ts +11 -0
- package/dist/components/shared/GenericAutobet/GenericAutobet.d.ts +42 -0
- package/dist/components/shared/GenericAutobet/GenericAutobet.styles.d.ts +1 -0
- package/dist/components/shared/GenericAutobet/context/autobet.context.d.ts +11 -0
- package/dist/components/shared/HistoryPills/HistoryPills.d.ts +20 -0
- package/dist/components/shared/HistoryPills/HistoryPills.styles.d.ts +1 -0
- package/dist/components/shared/Inputs/BetAmountInput/BetAmountInput.d.ts +22 -0
- package/dist/components/shared/Inputs/CurrencyInput/RawCurrencyInput.d.ts +46 -0
- package/dist/components/shared/Inputs/Input/Input.d.ts +68 -0
- package/dist/components/shared/Inputs/Input/Input.styles.d.ts +1 -0
- package/dist/components/shared/Modal/Modal.d.ts +91 -0
- package/dist/components/shared/Modal/Modal.styles.d.ts +2 -0
- package/dist/components/shared/Modal/Portal.d.ts +13 -0
- package/dist/components/shared/Select/Select.d.ts +48 -0
- package/dist/components/shared/Select/Select.styles.d.ts +1 -0
- package/dist/components/shared/Statistics/Statistics.d.ts +43 -0
- package/dist/components/shared/Statistics/Statistics.styles.d.ts +1 -0
- package/dist/components/shared/Toggle/Toggle.d.ts +12 -0
- package/dist/components/shared/Toggle/Toggle.styles.d.ts +1 -0
- package/dist/components/shared/Tooltip/Tooltip.d.ts +54 -0
- package/dist/components/shared/Tooltip/Tooltip.styles.d.ts +1 -0
- package/dist/components/shared/context/game.context.d.ts +15 -0
- package/dist/favicon.ico +0 -0
- package/dist/favicon.png +0 -0
- package/dist/favicon.svg +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.mjs +18188 -0
- package/dist/index.umd.js +5695 -0
- package/dist/origami.svg +17 -0
- package/dist/shared/component.styles.d.ts +2 -0
- package/dist/shared/constants.d.ts +8 -0
- package/dist/shared/event-map.d.ts +126 -0
- package/dist/shared/get-game-outcome.d.ts +1 -0
- package/dist/shared/icons/diceCubeIcon.d.ts +1 -0
- package/dist/shared/icons/minesBombIcon.d.ts +1 -0
- package/dist/shared/icons/minesGemIcon.d.ts +1 -0
- package/dist/shared/icons/multiplierIcon.d.ts +1 -0
- package/dist/shared/icons/profitIcon.d.ts +1 -0
- package/dist/shared/icons/rollDirectionIcon.d.ts +1 -0
- package/dist/shared/icons/winChanceIcon.d.ts +1 -0
- package/dist/shared/origami-action.type.d.ts +7 -0
- package/dist/shared/origami-element.d.ts +21 -0
- package/dist/shared/sleep.d.ts +1 -0
- package/dist/shared/watch.d.ts +26 -0
- package/dist/utils/active-elements.d.ts +15 -0
- package/dist/utils/animate.d.ts +22 -0
- package/dist/utils/animation-registry.d.ts +24 -0
- package/dist/utils/event.d.ts +2 -0
- package/dist/utils/focus-trap.d.ts +24 -0
- package/dist/utils/scroll.d.ts +22 -0
- package/dist/utils/slot.controller.d.ts +23 -0
- package/dist/utils/tabbable.d.ts +9 -0
- package/package.json +40 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SelectOption } from '../../Select/Select';
|
|
2
|
+
export interface AutobetContextType {
|
|
3
|
+
numberOfBets: string;
|
|
4
|
+
updateNumberOfBets: (numberOfBets: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const autobetGamesOptions: SelectOption[];
|
|
7
|
+
export declare const defaultNumberOfBetsValue: string;
|
|
8
|
+
export declare const autobetContext: {
|
|
9
|
+
__context__: AutobetContextType;
|
|
10
|
+
};
|
|
11
|
+
export declare const defaultAutobetContext: AutobetContextType;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
+
import { GameType } from '../BetResultModal/BetResultModal';
|
|
3
|
+
export interface HistoryItem {
|
|
4
|
+
multiplier: number;
|
|
5
|
+
won: boolean;
|
|
6
|
+
id: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class HistoryPills extends OrigamiElement {
|
|
9
|
+
static styles: import('lit').CSSResult[];
|
|
10
|
+
history: HistoryItem[];
|
|
11
|
+
gameType: GameType;
|
|
12
|
+
private animatingInIds;
|
|
13
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
14
|
+
handleHistoryChange(oldHistory: HistoryItem[]): void;
|
|
15
|
+
private handleAnimationEnd;
|
|
16
|
+
private formatMultiplier;
|
|
17
|
+
private renderHistoryPill;
|
|
18
|
+
private handleHistoryPillClick;
|
|
19
|
+
render(): import('lit').TemplateResult<1>;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const historyPillsStyles: import('lit').CSSResult;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as BigNumber } from 'bignumber.js';
|
|
2
|
+
import { default as OrigamiElement } from '../../../../shared/origami-element';
|
|
3
|
+
import { gameContextType } from '../../context/game.context';
|
|
4
|
+
import { Currency } from '../CurrencyInput/RawCurrencyInput';
|
|
5
|
+
export declare class BetAmountInput extends OrigamiElement {
|
|
6
|
+
static styles: import('lit').CSSResult[];
|
|
7
|
+
gameData?: gameContextType;
|
|
8
|
+
firstUpdated(): void;
|
|
9
|
+
private value;
|
|
10
|
+
currency: Currency;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
label: string;
|
|
13
|
+
displayInFiat: boolean;
|
|
14
|
+
updateBalanceState(newAmount: BigNumber): void;
|
|
15
|
+
private handleCurrencyInputChange;
|
|
16
|
+
private updateAmount;
|
|
17
|
+
private handleHalfBet;
|
|
18
|
+
private handleDoubleBet;
|
|
19
|
+
private getAddonButtons;
|
|
20
|
+
handleDisplayInFiatChange(): void;
|
|
21
|
+
render(): import('lit').TemplateResult<1>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as OrigamiElement } from '../../../../shared/origami-element';
|
|
2
|
+
import { Input } from '../Input/Input';
|
|
3
|
+
export type Currency = "BTC" | "ETH" | "USDT" | "SOL";
|
|
4
|
+
export type FiatCurrency = "USD" | "EUR" | "GBP";
|
|
5
|
+
export declare class RawCurrencyInput extends OrigamiElement {
|
|
6
|
+
label: string;
|
|
7
|
+
currency: Currency;
|
|
8
|
+
fiatCurrency: FiatCurrency;
|
|
9
|
+
value: string;
|
|
10
|
+
rightLabel: string;
|
|
11
|
+
suffix: string;
|
|
12
|
+
error: string;
|
|
13
|
+
placeholder: string;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
readonly: boolean;
|
|
16
|
+
disableInput: boolean;
|
|
17
|
+
cursorNotAllowed: boolean;
|
|
18
|
+
bgColor: string;
|
|
19
|
+
testId: string;
|
|
20
|
+
tooltip: string;
|
|
21
|
+
maxBetEnabled: boolean;
|
|
22
|
+
dimmed: boolean;
|
|
23
|
+
maxPayoutUSD: number;
|
|
24
|
+
variant: "primary" | "secondary";
|
|
25
|
+
required: boolean;
|
|
26
|
+
displayInFiat: boolean;
|
|
27
|
+
input: Input;
|
|
28
|
+
get leftAddon(): boolean;
|
|
29
|
+
get rightAddon(): boolean;
|
|
30
|
+
/** Format the value for display */
|
|
31
|
+
private formatValue;
|
|
32
|
+
/**
|
|
33
|
+
* Filter non-numeric keypress events
|
|
34
|
+
* This provides better UX by preventing obviously invalid keys
|
|
35
|
+
*/
|
|
36
|
+
private preventNonNumericInput;
|
|
37
|
+
/**
|
|
38
|
+
* Handle all input changes including paste events
|
|
39
|
+
* This is the single point of validation for all input methods
|
|
40
|
+
*/
|
|
41
|
+
private handleChange;
|
|
42
|
+
/** Handle input blur */
|
|
43
|
+
private handleBlur;
|
|
44
|
+
private handleFocus;
|
|
45
|
+
render(): import('lit').TemplateResult<1>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { default as OrigamiElement } from '../../../../shared/origami-element';
|
|
2
|
+
export interface InputAddonButton {
|
|
3
|
+
label: string;
|
|
4
|
+
'aria-label'?: string;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export type InputType = 'text' | 'number' | 'password' | 'email' | 'search' | 'tel' | 'url' | 'date' | 'time' | 'datetime-local';
|
|
10
|
+
export declare const ValidationPatterns: {
|
|
11
|
+
email: RegExp;
|
|
12
|
+
url: RegExp;
|
|
13
|
+
phone: RegExp;
|
|
14
|
+
number: RegExp;
|
|
15
|
+
integer: RegExp;
|
|
16
|
+
alphabetic: RegExp;
|
|
17
|
+
alphanumeric: RegExp;
|
|
18
|
+
};
|
|
19
|
+
export declare class Input extends OrigamiElement {
|
|
20
|
+
static styles: import('lit').CSSResult[];
|
|
21
|
+
value: string;
|
|
22
|
+
label: string;
|
|
23
|
+
placeholder: string;
|
|
24
|
+
type: InputType;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
rightText: string | null;
|
|
27
|
+
min: number | null;
|
|
28
|
+
max: number | null;
|
|
29
|
+
step: number | null;
|
|
30
|
+
addonButtonsPosition: 'left' | 'right';
|
|
31
|
+
name: string | null;
|
|
32
|
+
autocomplete: string | null;
|
|
33
|
+
required: boolean;
|
|
34
|
+
readonly: boolean;
|
|
35
|
+
pattern: string | null;
|
|
36
|
+
validateOnInput: boolean;
|
|
37
|
+
validationPattern: string | null;
|
|
38
|
+
validationMessage: string | null;
|
|
39
|
+
inputMode: 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url' | 'none' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url' | 'none';
|
|
40
|
+
hideRightLabel: boolean;
|
|
41
|
+
clickable: boolean;
|
|
42
|
+
forceActiveBorder: boolean;
|
|
43
|
+
handleBeforeInput: ((e: InputEvent & {
|
|
44
|
+
dataTransfer?: DataTransfer | null;
|
|
45
|
+
}) => void) | null;
|
|
46
|
+
private _errorMessage;
|
|
47
|
+
private _isIconRotating;
|
|
48
|
+
errorTooltipMessage: string;
|
|
49
|
+
private _iconRotationState;
|
|
50
|
+
private inputRef;
|
|
51
|
+
private inputId;
|
|
52
|
+
private errorId;
|
|
53
|
+
private handleInput;
|
|
54
|
+
/**
|
|
55
|
+
* Handler for paste events to fix browser issues with number inputs
|
|
56
|
+
* This ensures that what you paste is what you get, even with invalid number characters like 'e'
|
|
57
|
+
*/
|
|
58
|
+
private handlePaste;
|
|
59
|
+
private handleClick;
|
|
60
|
+
private handleAnimationEnd;
|
|
61
|
+
private handleFocus;
|
|
62
|
+
private handleBlur;
|
|
63
|
+
render(): import('lit').TemplateResult<1>;
|
|
64
|
+
get rightIcon(): boolean;
|
|
65
|
+
get leftIcon(): boolean;
|
|
66
|
+
get leftAddon(): boolean;
|
|
67
|
+
get rightAddon(): boolean;
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const inputStyles: import('lit').CSSResult;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { default as OrigamiElement } from '../../../shared/origami-element.js';
|
|
2
|
+
import { default as FocusTrap } from '../../../utils/focus-trap.js';
|
|
3
|
+
/**
|
|
4
|
+
* @summary Dialogs, sometimes called "modals", appear above the page and require the user's immediate attention.
|
|
5
|
+
* @documentation https://shoelace.style/components/dialog
|
|
6
|
+
* @status stable
|
|
7
|
+
* @since 2.0
|
|
8
|
+
*
|
|
9
|
+
* @dependency sl-icon-button
|
|
10
|
+
*
|
|
11
|
+
* @slot - The dialog's main content.
|
|
12
|
+
* @slot label - The dialog's label. Alternatively, you can use the `label` attribute.
|
|
13
|
+
* @slot header-actions - Optional actions to add to the header. Works best with `<sl-icon-button>`.
|
|
14
|
+
* @slot footer - The dialog's footer, usually one or more buttons representing various options.
|
|
15
|
+
*
|
|
16
|
+
* @event modal-show - Emitted when the dialog opens.
|
|
17
|
+
* @event modal-after-show - Emitted after the dialog opens and all animations are complete.
|
|
18
|
+
* @event modal-hide - Emitted when the dialog closes.
|
|
19
|
+
* @event modal-after-hide - Emitted after the dialog closes and all animations are complete.
|
|
20
|
+
* @event modal-initial-focus - Emitted when the dialog opens and is ready to receive focus. Calling
|
|
21
|
+
* `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.
|
|
22
|
+
* @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} sl-request-close - Emitted when the user attempts to
|
|
23
|
+
* close the dialog by clicking the close button, clicking the overlay, or pressing escape. Calling
|
|
24
|
+
* `event.preventDefault()` will keep the dialog open. Avoid using this unless closing the dialog will result in
|
|
25
|
+
* destructive behavior such as data loss.
|
|
26
|
+
*
|
|
27
|
+
* @csspart base - The component's base wrapper.
|
|
28
|
+
* @csspart overlay - The overlay that covers the screen behind the dialog.
|
|
29
|
+
* @csspart panel - The dialog's panel (where the dialog and its content are rendered).
|
|
30
|
+
* @csspart header - The dialog's header. This element wraps the title and header actions.
|
|
31
|
+
* @csspart header-actions - Optional actions to add to the header. Works best with `<sl-icon-button>`.
|
|
32
|
+
* @csspart title - The dialog's title.
|
|
33
|
+
* @csspart close-button - The close button, an `<sl-icon-button>`.
|
|
34
|
+
* @csspart close-button__base - The close button's exported `base` part.
|
|
35
|
+
* @csspart body - The dialog's body.
|
|
36
|
+
* @csspart footer - The dialog's footer.
|
|
37
|
+
*
|
|
38
|
+
* @cssproperty --width - The preferred width of the dialog. Note that the dialog will shrink to accommodate smaller screens.
|
|
39
|
+
* @cssproperty --header-spacing - The amount of padding to use for the header.
|
|
40
|
+
* @cssproperty --body-spacing - The amount of padding to use for the body.
|
|
41
|
+
* @cssproperty --footer-spacing - The amount of padding to use for the footer.
|
|
42
|
+
*
|
|
43
|
+
* @animation dialog.show - The animation to use when showing the dialog.
|
|
44
|
+
* @animation dialog.hide - The animation to use when hiding the dialog.
|
|
45
|
+
* @animation dialog.denyClose - The animation to use when a request to close the dialog is denied.
|
|
46
|
+
* @animation dialog.overlay.show - The animation to use when showing the dialog's overlay.
|
|
47
|
+
* @animation dialog.overlay.hide - The animation to use when hiding the dialog's overlay.
|
|
48
|
+
*
|
|
49
|
+
* @property modal - Exposes the internal modal utility that controls focus trapping. To temporarily disable focus
|
|
50
|
+
* trapping and allow third-party modals spawned from an active Shoelace modal, call `modal.activateExternal()` when
|
|
51
|
+
* the third-party modal opens. Upon closing, call `modal.deactivateExternal()` to restore Shoelace's focus trapping.
|
|
52
|
+
*/
|
|
53
|
+
export default class OrigamiModal extends OrigamiElement {
|
|
54
|
+
static styles: import('lit').CSSResult[];
|
|
55
|
+
private readonly hasSlotController;
|
|
56
|
+
private originalTrigger;
|
|
57
|
+
focusTrap: FocusTrap;
|
|
58
|
+
private closeWatcher;
|
|
59
|
+
fixedPosition: boolean;
|
|
60
|
+
dialog: HTMLElement;
|
|
61
|
+
panel: HTMLElement;
|
|
62
|
+
overlay: HTMLElement;
|
|
63
|
+
/**
|
|
64
|
+
* Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can
|
|
65
|
+
* use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.
|
|
66
|
+
*/
|
|
67
|
+
open: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The dialog's label as displayed in the header. You should always include a relevant label even when using
|
|
70
|
+
* `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.
|
|
71
|
+
*/
|
|
72
|
+
label: string;
|
|
73
|
+
lockScrolling: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Disables the header. This will also remove the default close button, so please ensure you provide an easy,
|
|
76
|
+
* accessible way for users to dismiss the dialog.
|
|
77
|
+
*/
|
|
78
|
+
noHeader: boolean;
|
|
79
|
+
firstUpdated(): void;
|
|
80
|
+
disconnectedCallback(): void;
|
|
81
|
+
private requestClose;
|
|
82
|
+
private addOpenListeners;
|
|
83
|
+
private removeOpenListeners;
|
|
84
|
+
private handleDocumentKeyDown;
|
|
85
|
+
handleOpenChange(): Promise<void>;
|
|
86
|
+
/** Shows the dialog. */
|
|
87
|
+
show(): Promise<void>;
|
|
88
|
+
/** Hides the dialog */
|
|
89
|
+
hide(): Promise<void>;
|
|
90
|
+
render(): import('lit').TemplateResult<1>;
|
|
91
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class Portal extends LitElement {
|
|
3
|
+
to?: string;
|
|
4
|
+
containerClass: string;
|
|
5
|
+
body: import('lit').TemplateResult<1>;
|
|
6
|
+
uniqueID: string;
|
|
7
|
+
private getOrCreateDestination;
|
|
8
|
+
private getOrCreateContainer;
|
|
9
|
+
private removeContainer;
|
|
10
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
11
|
+
disconnectedCallback(): void;
|
|
12
|
+
render(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
+
/**
|
|
3
|
+
* Option for the select input
|
|
4
|
+
*/
|
|
5
|
+
export interface SelectOption<T extends string = string> {
|
|
6
|
+
/**
|
|
7
|
+
* Value of the option
|
|
8
|
+
*/
|
|
9
|
+
value: T;
|
|
10
|
+
/**
|
|
11
|
+
* Display label for the option
|
|
12
|
+
*/
|
|
13
|
+
label: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the option is disabled
|
|
16
|
+
*/
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Optional group this option belongs to
|
|
20
|
+
*/
|
|
21
|
+
group?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class Select extends OrigamiElement {
|
|
24
|
+
static styles: import('lit').CSSResult[];
|
|
25
|
+
dir: string;
|
|
26
|
+
label: string;
|
|
27
|
+
options: SelectOption[];
|
|
28
|
+
placeholder: string;
|
|
29
|
+
helperText: string | null;
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
required: boolean;
|
|
32
|
+
defaultValue: string | null;
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
error: string;
|
|
36
|
+
size: number | null;
|
|
37
|
+
autoFocus: boolean;
|
|
38
|
+
private _errorMessage;
|
|
39
|
+
value: string;
|
|
40
|
+
private _generatedId;
|
|
41
|
+
get _effectiveId(): string;
|
|
42
|
+
private getGroupedOptions;
|
|
43
|
+
private handleChange;
|
|
44
|
+
private validate;
|
|
45
|
+
private generateOptionElements;
|
|
46
|
+
private renderOption;
|
|
47
|
+
render(): import('lit').TemplateResult<1>;
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const selectStyles: import('lit').CSSResult;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export interface StatisticsData {
|
|
3
|
+
/**
|
|
4
|
+
* The token value to display
|
|
5
|
+
*/
|
|
6
|
+
tokenValue: string;
|
|
7
|
+
/**
|
|
8
|
+
* The dollar value to display
|
|
9
|
+
*/
|
|
10
|
+
dollarValue: string;
|
|
11
|
+
/**
|
|
12
|
+
* The multiplier value to display
|
|
13
|
+
*/
|
|
14
|
+
multiplier: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Statistics component to display current and next values with their corresponding multipliers
|
|
18
|
+
*
|
|
19
|
+
* @property {StatisticsData} current - Current statistics data to display
|
|
20
|
+
* @property {StatisticsData} next - Next statistics data to display
|
|
21
|
+
* @property {string} tokenAcronym - The token acronym to display after the token value
|
|
22
|
+
* @property {string} ariaLabel - Accessible label for the statistics region
|
|
23
|
+
*
|
|
24
|
+
* @cssvar --base-secondary - Background color of the statistics container
|
|
25
|
+
* @cssvar --secondary-text - Color of the labels and token values
|
|
26
|
+
* @cssvar --border-base - Color of the divider between sections
|
|
27
|
+
*/
|
|
28
|
+
export declare class Statistics extends LitElement {
|
|
29
|
+
static styles: import('lit').CSSResult[];
|
|
30
|
+
/** Current statistics data to display */
|
|
31
|
+
current: StatisticsData;
|
|
32
|
+
/** Next statistics data to display */
|
|
33
|
+
next: StatisticsData;
|
|
34
|
+
/** The token acronym to display after the token value */
|
|
35
|
+
tokenAcronym: string;
|
|
36
|
+
/** Accessible label for the statistics region */
|
|
37
|
+
ariaLabel: string;
|
|
38
|
+
/**
|
|
39
|
+
* Render a statistics section
|
|
40
|
+
*/
|
|
41
|
+
private renderStatisticsSection;
|
|
42
|
+
render(): import('lit').TemplateResult<1>;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const statisticsStyles: import('lit').CSSResult;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
+
export declare class Toggle extends OrigamiElement {
|
|
3
|
+
static styles: import('lit').CSSResult[];
|
|
4
|
+
option1: string;
|
|
5
|
+
option2: string;
|
|
6
|
+
value: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
name: string;
|
|
9
|
+
class: string;
|
|
10
|
+
private handleOptionClick;
|
|
11
|
+
render(): import('lit').TemplateResult<1>;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toggleStyles: import('lit').CSSResult;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export type TooltipPosition = "top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end";
|
|
3
|
+
export type TooltipTrigger = "hover" | "click" | "focus" | "manual";
|
|
4
|
+
export declare class Tooltip extends LitElement {
|
|
5
|
+
static styles: import('lit').CSSResult[];
|
|
6
|
+
/** The text content to display in the tooltip */
|
|
7
|
+
content: string;
|
|
8
|
+
/** Position of the tooltip relative to the target element */
|
|
9
|
+
position: TooltipPosition;
|
|
10
|
+
/** What triggers the tooltip to show */
|
|
11
|
+
trigger: TooltipTrigger[];
|
|
12
|
+
/** Whether to show an arrow pointing to the target */
|
|
13
|
+
arrow: boolean;
|
|
14
|
+
open: boolean;
|
|
15
|
+
/** Whether the tooltip is disabled */
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
/** Distance in pixels between the tooltip arrow edge and the target */
|
|
18
|
+
offset: number;
|
|
19
|
+
theme: "light" | "dark";
|
|
20
|
+
delay: number;
|
|
21
|
+
hideDelay: number;
|
|
22
|
+
private tooltipRef;
|
|
23
|
+
private triggerRef;
|
|
24
|
+
private showTimeout;
|
|
25
|
+
private hideTimeout;
|
|
26
|
+
private scrollTimeout;
|
|
27
|
+
private clickOutsideHandler;
|
|
28
|
+
private keydownHandler;
|
|
29
|
+
private scrollHandler;
|
|
30
|
+
private debounceTime;
|
|
31
|
+
private triggerSlot;
|
|
32
|
+
disconnectedCallback(): void;
|
|
33
|
+
onOpenChange(): void;
|
|
34
|
+
onDisabledChange(): void;
|
|
35
|
+
onPositionChange(): void;
|
|
36
|
+
private addEventListeners;
|
|
37
|
+
private removeEventListeners;
|
|
38
|
+
private hasTrigger;
|
|
39
|
+
private handleScroll;
|
|
40
|
+
private clearTimeouts;
|
|
41
|
+
private show;
|
|
42
|
+
private hide;
|
|
43
|
+
private showTooltip;
|
|
44
|
+
private hideTooltip;
|
|
45
|
+
private updatePosition;
|
|
46
|
+
private handleMouseEnter;
|
|
47
|
+
private handleMouseLeave;
|
|
48
|
+
private handleFocus;
|
|
49
|
+
private handleBlur;
|
|
50
|
+
private handleClick;
|
|
51
|
+
private handleClickOutside;
|
|
52
|
+
private handleKeyDown;
|
|
53
|
+
render(): import('lit').TemplateResult<1>;
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tooltipStyles: import('lit').CSSResult;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as BigNumber } from 'bignumber.js';
|
|
2
|
+
import { Currency } from '../../../shared/constants';
|
|
3
|
+
export type gameContextType = {
|
|
4
|
+
amount: string;
|
|
5
|
+
updateBalance: (newAmount: BigNumber) => void;
|
|
6
|
+
currency: Currency;
|
|
7
|
+
isCryptoMode: boolean;
|
|
8
|
+
isTheatreMode: boolean;
|
|
9
|
+
showFavorites: boolean;
|
|
10
|
+
balance: number;
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const gameContext: {
|
|
14
|
+
__context__: gameContextType;
|
|
15
|
+
};
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/dist/favicon.png
ADDED
|
File without changes
|
package/dist/favicon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="900" height="900"><svg xmlns="http://www.w3.org/2000/svg" width="900" height="900" fill="none" viewBox="0 0 900 900"><rect width="900" height="900" fill="#DAFF01" rx="450"/><path fill="#0E1909" d="M349.66 349.821C268.177 431.291 165 450.046 165 450.046s66.417 12.22 134.731 59.112c16.862 11.558 33.825 25.108 49.929 41.209C431.143 631.834 449.998 735 449.998 735s14.211-77.868 71.441-151.855c8.621-11.085 18.096-22.165 28.802-32.87C631.725 468.802 735 449.954 735 449.954s-66.418-12.03-134.92-58.924c-16.865-11.558-33.825-25.199-49.93-41.304C468.667 268.163 449.907 165 449.907 165s-14.216 77.964-71.44 151.949c-8.717 11.084-18.193 22.168-28.898 32.872h.091Z"/></svg><style>@media (prefers-color-scheme:light){:root{filter:none}}@media (prefers-color-scheme:dark){:root{filter:none}}</style></svg>
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DiceGame } from './components/dice/DiceGame';
|
|
2
|
+
import { KenoGame } from './components/keno/KenoGame';
|
|
3
|
+
import { LimboGame } from './components/limbo/LimboGame';
|
|
4
|
+
import { MinesGame } from './components/mines/MinesGame';
|
|
5
|
+
import { GameProviderWrapper } from './components/shared/GameProviderWrapper';
|
|
6
|
+
export { DiceGame, KenoGame, LimboGame, MinesGame, GameProviderWrapper };
|