@betorigami/games 0.7.4 → 0.7.6
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.d.ts +740 -6
- package/dist/index.mjs +3579 -6434
- package/package.json +11 -7
- package/dist/components/dice/DiceContent/DiceContent.d.ts +0 -14
- package/dist/components/dice/DiceContent/DiceContent.styles.d.ts +0 -1
- package/dist/components/dice/DiceContentBottom/DiceContentBottom.d.ts +0 -15
- package/dist/components/dice/DiceContentBottom/DiceContentBottom.styles.d.ts +0 -1
- package/dist/components/dice/DiceControls/DiceAuto.d.ts +0 -9
- package/dist/components/dice/DiceControls/DiceControls.styles.d.ts +0 -1
- package/dist/components/dice/DiceControls/DiceManual.d.ts +0 -10
- package/dist/components/dice/DiceGame.d.ts +0 -45
- package/dist/components/dice/DiceSlider/DiceSlider.d.ts +0 -16
- package/dist/components/dice/DiceSlider/DiceSlider.styles.d.ts +0 -1
- package/dist/components/dice/dice.api.d.ts +0 -71
- package/dist/components/dice/dice.mock.api.d.ts +0 -13
- package/dist/components/keno/KenoContent/KenoContent.d.ts +0 -17
- package/dist/components/keno/KenoContent/KenoContent.styles.d.ts +0 -1
- package/dist/components/keno/KenoContent/KenoContentBottom.d.ts +0 -15
- package/dist/components/keno/KenoContent/KenoContentBottom.styles.d.ts +0 -1
- package/dist/components/keno/KenoControls/KenoAuto.d.ts +0 -11
- package/dist/components/keno/KenoControls/KenoControls.styles.d.ts +0 -1
- package/dist/components/keno/KenoControls/KenoManual.d.ts +0 -11
- package/dist/components/keno/KenoGame.d.ts +0 -31
- package/dist/components/keno/KenoGrid/KenoGrid.d.ts +0 -15
- package/dist/components/keno/KenoGrid/KenoGrid.styles.d.ts +0 -1
- package/dist/components/keno/KenoTile/KenoTile.d.ts +0 -16
- package/dist/components/keno/KenoTile/KenoTile.styles.d.ts +0 -1
- package/dist/components/keno/keno.api.d.ts +0 -67
- package/dist/components/keno/keno.mock.api.d.ts +0 -15
- package/dist/components/limbo/LimboContent/LimboContent.d.ts +0 -13
- package/dist/components/limbo/LimboContent/LimboContent.styles.d.ts +0 -1
- package/dist/components/limbo/LimboContentBottom/LimboContentBottom.d.ts +0 -14
- package/dist/components/limbo/LimboContentBottom/LimboContentBottom.styles.d.ts +0 -1
- package/dist/components/limbo/LimboControls/LimboAuto.d.ts +0 -9
- package/dist/components/limbo/LimboControls/LimboControls.styles.d.ts +0 -1
- package/dist/components/limbo/LimboControls/LimboManual.d.ts +0 -11
- package/dist/components/limbo/LimboGame.d.ts +0 -27
- package/dist/components/limbo/Multiplier/LimboMultiplier.d.ts +0 -17
- package/dist/components/limbo/Multiplier/LimboMultiplier.styles.d.ts +0 -1
- package/dist/components/limbo/limbo.api.d.ts +0 -62
- package/dist/components/limbo/limbo.mock.api.d.ts +0 -13
- package/dist/components/mines/Controls/MinesAuto.d.ts +0 -14
- package/dist/components/mines/Controls/MinesControls.styles.d.ts +0 -1
- package/dist/components/mines/Controls/MinesManual.d.ts +0 -10
- package/dist/components/mines/MinesContent/MinesContent.d.ts +0 -16
- package/dist/components/mines/MinesContent/MinesContent.styles.d.ts +0 -1
- package/dist/components/mines/MinesGame.d.ts +0 -36
- package/dist/components/mines/MinesGrid/MinesGrid.d.ts +0 -31
- package/dist/components/mines/MinesGrid/MinesGrid.styles.d.ts +0 -1
- package/dist/components/mines/MinesTile/MinesTile.d.ts +0 -23
- package/dist/components/mines/MinesTile/MinesTile.styles.d.ts +0 -1
- package/dist/components/mines/mines.api.d.ts +0 -122
- package/dist/components/mines/mines.constants.d.ts +0 -23
- package/dist/components/mines/mines.mock.api.d.ts +0 -50
- package/dist/components/shared/BetResultModal/BetResultModal.d.ts +0 -48
- package/dist/components/shared/BetResultModal/BetResultModal.styles.d.ts +0 -1
- package/dist/components/shared/Button/Button.d.ts +0 -25
- package/dist/components/shared/Button/Button.styles.d.ts +0 -1
- package/dist/components/shared/Button/ButtonGroup.d.ts +0 -6
- package/dist/components/shared/Button/ButtonGroup.styles.d.ts +0 -1
- package/dist/components/shared/Drawer/Drawer.d.ts +0 -122
- package/dist/components/shared/Drawer/Drawer.styles.d.ts +0 -2
- package/dist/components/shared/FairnessDetails/FairnessDetails.d.ts +0 -24
- package/dist/components/shared/FairnessDetails/FairnessDetails.styles.d.ts +0 -1
- package/dist/components/shared/Footer/Footer.d.ts +0 -48
- package/dist/components/shared/Footer/Footer.styles.d.ts +0 -1
- package/dist/components/shared/GameComponent.d.ts +0 -35
- package/dist/components/shared/GameLayout/GameLayout.d.ts +0 -36
- package/dist/components/shared/GameLayout/GameLayout.styles.d.ts +0 -1
- package/dist/components/shared/GameOutcomeDisplay/GameOutcomeDisplay.d.ts +0 -39
- package/dist/components/shared/GameOutcomeDisplay/GameOutcomeDisplay.styles.d.ts +0 -1
- package/dist/components/shared/GameProviderWrapper.d.ts +0 -26
- package/dist/components/shared/GameSidebar/GameSidebar.d.ts +0 -14
- package/dist/components/shared/GameSidebar/GameSidebar.styles.d.ts +0 -1
- package/dist/components/shared/GameWinPopup/GameWinPopup.d.ts +0 -14
- package/dist/components/shared/GameWinPopup/GameWinPopup.styles.d.ts +0 -1
- package/dist/components/shared/GenericAutobet/BetCountInput.d.ts +0 -11
- package/dist/components/shared/GenericAutobet/GenericAutobet.d.ts +0 -41
- package/dist/components/shared/GenericAutobet/GenericAutobet.styles.d.ts +0 -1
- package/dist/components/shared/GenericAutobet/context/autobet.context.d.ts +0 -11
- package/dist/components/shared/HistoryPills/HistoryPills.d.ts +0 -20
- package/dist/components/shared/HistoryPills/HistoryPills.styles.d.ts +0 -1
- package/dist/components/shared/Inputs/BetAmountInput/BetAmountInput.d.ts +0 -20
- package/dist/components/shared/Inputs/CurrencyInput/RawCurrencyInput.d.ts +0 -46
- package/dist/components/shared/Inputs/Input/Input.d.ts +0 -73
- package/dist/components/shared/Inputs/Input/Input.styles.d.ts +0 -1
- package/dist/components/shared/LottieIcon/LottieIcon.d.ts +0 -22
- package/dist/components/shared/Modal/Modal.d.ts +0 -91
- package/dist/components/shared/Modal/Modal.styles.d.ts +0 -2
- package/dist/components/shared/Modal/Portal.d.ts +0 -13
- package/dist/components/shared/Select/Select.d.ts +0 -48
- package/dist/components/shared/Select/Select.styles.d.ts +0 -1
- package/dist/components/shared/Statistics/Statistics.d.ts +0 -43
- package/dist/components/shared/Statistics/Statistics.styles.d.ts +0 -1
- package/dist/components/shared/Toggle/Toggle.d.ts +0 -13
- package/dist/components/shared/Toggle/Toggle.styles.d.ts +0 -1
- package/dist/components/shared/Tooltip/Tooltip.d.ts +0 -55
- package/dist/components/shared/Tooltip/Tooltip.styles.d.ts +0 -1
- package/dist/components/shared/context/game.context.d.ts +0 -19
- package/dist/lottie-CF6R56sF.js +0 -5443
- package/dist/shared/component.styles.d.ts +0 -2
- package/dist/shared/constants.d.ts +0 -8
- package/dist/shared/event-map.d.ts +0 -132
- package/dist/shared/get-game-outcome.d.ts +0 -1
- package/dist/shared/icons/currencies/btcIcon.d.ts +0 -1
- package/dist/shared/icons/currencies/ethIcon.d.ts +0 -1
- package/dist/shared/icons/currencies/usdcIcon.d.ts +0 -1
- package/dist/shared/icons/diceCubeIcon.d.ts +0 -1
- package/dist/shared/icons/minesBombIcon.d.ts +0 -1
- package/dist/shared/icons/minesGemIcon.d.ts +0 -1
- package/dist/shared/origami-action.type.d.ts +0 -7
- package/dist/shared/origami-element.d.ts +0 -21
- package/dist/shared/sleep.d.ts +0 -1
- package/dist/shared/watch.d.ts +0 -26
- package/dist/utils/active-elements.d.ts +0 -15
- package/dist/utils/animate.d.ts +0 -22
- package/dist/utils/animation-registry.d.ts +0 -24
- package/dist/utils/blur-active-element.d.ts +0 -7
- package/dist/utils/event.d.ts +0 -2
- package/dist/utils/focus-trap.d.ts +0 -24
- package/dist/utils/scroll.d.ts +0 -22
- package/dist/utils/slot.controller.d.ts +0 -23
- package/dist/utils/tabbable.d.ts +0 -9
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { KenoRiskLevel } from '@betorigami/calculations';
|
|
2
|
-
import { GameType } from '../components/shared/BetResultModal/BetResultModal';
|
|
3
|
-
import { BetMode } from '../components/shared/GameSidebar/GameSidebar';
|
|
4
|
-
import { AutobetValues } from '../components/shared/GenericAutobet/GenericAutobet';
|
|
5
|
-
import { Currency } from './constants';
|
|
6
|
-
export type MinesCountChangeEvent = CustomEvent<{
|
|
7
|
-
count: number;
|
|
8
|
-
}>;
|
|
9
|
-
export type BetModeChangeEvent = CustomEvent<{
|
|
10
|
-
tab: BetMode;
|
|
11
|
-
}>;
|
|
12
|
-
export type MinesTileChosenEvent = CustomEvent<{
|
|
13
|
-
tile: number;
|
|
14
|
-
}>;
|
|
15
|
-
export type InputChangeEvent = CustomEvent<{
|
|
16
|
-
value: string;
|
|
17
|
-
target: HTMLInputElement;
|
|
18
|
-
}>;
|
|
19
|
-
export type AutobetToggleEvent = CustomEvent<AutobetValues & {
|
|
20
|
-
numberOfBets: string;
|
|
21
|
-
}>;
|
|
22
|
-
export type SliderChangeEvent = CustomEvent<{
|
|
23
|
-
value: number;
|
|
24
|
-
}>;
|
|
25
|
-
export type DiceMultiplierChangeEvent = CustomEvent<{
|
|
26
|
-
multiplier: string;
|
|
27
|
-
}>;
|
|
28
|
-
export type DiceWinChanceChangeEvent = CustomEvent<{
|
|
29
|
-
winChance: string;
|
|
30
|
-
}>;
|
|
31
|
-
export type LimboMultiplierChangeEvent = CustomEvent<{
|
|
32
|
-
multiplier: string;
|
|
33
|
-
}>;
|
|
34
|
-
export type LimboWinChanceChangeEvent = CustomEvent<{
|
|
35
|
-
winChance: string;
|
|
36
|
-
}>;
|
|
37
|
-
export type LimboMultiplierAnimationEndEvent = CustomEvent<{
|
|
38
|
-
resultMultiplier: number;
|
|
39
|
-
isWin: boolean;
|
|
40
|
-
betId: string;
|
|
41
|
-
}>;
|
|
42
|
-
export type InputBlurEvent = CustomEvent<{
|
|
43
|
-
value: string;
|
|
44
|
-
}>;
|
|
45
|
-
export type RawCurrencyInputChangeEvent = CustomEvent<{
|
|
46
|
-
value: string;
|
|
47
|
-
}>;
|
|
48
|
-
export type SelectEvent = CustomEvent<{
|
|
49
|
-
value: string;
|
|
50
|
-
originalEvent: Event;
|
|
51
|
-
}>;
|
|
52
|
-
export type ButtonClickEvent = CustomEvent<{
|
|
53
|
-
originalEvent: MouseEvent;
|
|
54
|
-
}>;
|
|
55
|
-
export type ToggleChangeEvent = CustomEvent<{
|
|
56
|
-
value: string;
|
|
57
|
-
}>;
|
|
58
|
-
export type BetCountChangeEvent = CustomEvent<{
|
|
59
|
-
value: number;
|
|
60
|
-
}>;
|
|
61
|
-
export type KenoRiskChangeEvent = CustomEvent<{
|
|
62
|
-
value: KenoRiskLevel;
|
|
63
|
-
}>;
|
|
64
|
-
export type KenoTileClickEvent = CustomEvent<{
|
|
65
|
-
tile: number;
|
|
66
|
-
}>;
|
|
67
|
-
export type KenoGridClickEvent = CustomEvent;
|
|
68
|
-
export type BalanceChangeEvent = CustomEvent<{
|
|
69
|
-
balance: number;
|
|
70
|
-
currency: Currency;
|
|
71
|
-
}>;
|
|
72
|
-
export type OpenBetResultModalEvent = CustomEvent<{
|
|
73
|
-
gameType: GameType;
|
|
74
|
-
betId: string;
|
|
75
|
-
}>;
|
|
76
|
-
declare global {
|
|
77
|
-
interface GlobalEventHandlersEventMap {
|
|
78
|
-
'bet-mode-change': BetModeChangeEvent;
|
|
79
|
-
'mines-count-change': MinesCountChangeEvent;
|
|
80
|
-
'mines-tile-selected': MinesTileChosenEvent;
|
|
81
|
-
'mines-manual-start': CustomEvent;
|
|
82
|
-
'mines-cashout': CustomEvent;
|
|
83
|
-
'mines-choose-random-tile': CustomEvent;
|
|
84
|
-
'autobet-toggle': AutobetToggleEvent;
|
|
85
|
-
'bet-count-change': BetCountChangeEvent;
|
|
86
|
-
'modal-after-hide': CustomEvent;
|
|
87
|
-
'modal-after-show': CustomEvent;
|
|
88
|
-
'modal-hide': CustomEvent;
|
|
89
|
-
'modal-initial-focus': CustomEvent;
|
|
90
|
-
'modal-request-close': CustomEvent;
|
|
91
|
-
'modal-show': CustomEvent;
|
|
92
|
-
'drawer-after-hide': CustomEvent;
|
|
93
|
-
'drawer-after-show': CustomEvent;
|
|
94
|
-
'drawer-hide': CustomEvent;
|
|
95
|
-
'drawer-initial-focus': CustomEvent;
|
|
96
|
-
'drawer-request-close': CustomEvent;
|
|
97
|
-
'drawer-show': CustomEvent;
|
|
98
|
-
'input-change': InputChangeEvent;
|
|
99
|
-
'input-focus': CustomEvent;
|
|
100
|
-
'input-click': CustomEvent;
|
|
101
|
-
'input-blur': InputBlurEvent;
|
|
102
|
-
'raw-currency-input-change': RawCurrencyInputChangeEvent;
|
|
103
|
-
'raw-currency-input-blur': CustomEvent;
|
|
104
|
-
'raw-currency-input-focus': CustomEvent;
|
|
105
|
-
'currency-input-change': InputChangeEvent;
|
|
106
|
-
'slider-input-change': SliderChangeEvent;
|
|
107
|
-
'select-change': SelectEvent;
|
|
108
|
-
'button-click': ButtonClickEvent;
|
|
109
|
-
'dice-multiplier-change': DiceMultiplierChangeEvent;
|
|
110
|
-
'dice-win-chance-change': DiceWinChanceChangeEvent;
|
|
111
|
-
'dice-roll-over-toggle': CustomEvent;
|
|
112
|
-
'dice-manual-play': CustomEvent;
|
|
113
|
-
'footer-settings-click': CustomEvent;
|
|
114
|
-
'footer-theatre-click': CustomEvent;
|
|
115
|
-
'footer-stats-click': CustomEvent;
|
|
116
|
-
'footer-favorites-click': CustomEvent;
|
|
117
|
-
'footer-provably-fair-click': CustomEvent;
|
|
118
|
-
'toggle-change': ToggleChangeEvent;
|
|
119
|
-
'limbo-multiplier-change': LimboMultiplierChangeEvent;
|
|
120
|
-
'limbo-win-chance-change': LimboWinChanceChangeEvent;
|
|
121
|
-
'limbo-multiplier-animation-end': LimboMultiplierAnimationEndEvent;
|
|
122
|
-
'keno-auto-pick': CustomEvent;
|
|
123
|
-
'keno-clear-table': CustomEvent;
|
|
124
|
-
'keno-manual-play': CustomEvent;
|
|
125
|
-
'keno-risk-change': KenoRiskChangeEvent;
|
|
126
|
-
'keno-tile-click': KenoTileClickEvent;
|
|
127
|
-
'keno-grid-click': KenoGridClickEvent;
|
|
128
|
-
'limbo-manual-play': CustomEvent;
|
|
129
|
-
'open-bet-result-modal': OpenBetResultModalEvent;
|
|
130
|
-
'balance-change': BalanceChangeEvent;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getGameOutcome: (multiplier: number) => "Draw" | "Win" | "Loss";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const btcIcon: import('lit').TemplateResult<2>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ethIcon: import('lit').TemplateResult<2>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const usdcIcon: import('lit').TemplateResult<2>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const diceCubeSvg: import('lit').TemplateResult<2>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const minesBombIcon: import('lit').TemplateResult<2>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const minesGemIcon: import('lit').TemplateResult<2>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare enum OrigamiActionType {
|
|
2
|
-
START_BET = "START_BET",// bet started but not yet ended send to the /bet webhook
|
|
3
|
-
END_BET = "END_BET",// bet has been completed. Can be started and ended in 1 webhook or started in 1 and ended in another. send to the /bet webhook
|
|
4
|
-
ROLLBACK = "ROLLBACK",// send to the /rollback webhook
|
|
5
|
-
INTERMEDIATE_BET_ACTION = "INTERMEDIATE_BET_ACTION",// bet amount was increased without game ending, such as doubling down in blackjack
|
|
6
|
-
INTERMEDIATE_NON_BET_ACTION = "INTERMEDIATE_NON_BET_ACTION"
|
|
7
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CSSResult, LitElement } from 'lit';
|
|
2
|
-
type EventTypeRequiresDetail<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? never : Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail'] ? never : T : never : never;
|
|
3
|
-
type EventTypeDoesNotRequireDetail<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? T : Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail'] ? T : never : T : T;
|
|
4
|
-
type EventTypesWithRequiredDetail = {
|
|
5
|
-
[EventType in keyof GlobalEventHandlersEventMap as EventTypeRequiresDetail<EventType>]: true;
|
|
6
|
-
};
|
|
7
|
-
type EventTypesWithoutRequiredDetail = {
|
|
8
|
-
[EventType in keyof GlobalEventHandlersEventMap as EventTypeDoesNotRequireDetail<EventType>]: true;
|
|
9
|
-
};
|
|
10
|
-
type WithRequired<T, K extends keyof T> = T & {
|
|
11
|
-
[P in K]-?: T[P];
|
|
12
|
-
};
|
|
13
|
-
type SlEventInit<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? CustomEventInit<GlobalEventHandlersEventMap[T]['detail']> : Partial<GlobalEventHandlersEventMap[T]['detail']> extends GlobalEventHandlersEventMap[T]['detail'] ? CustomEventInit<GlobalEventHandlersEventMap[T]['detail']> : WithRequired<CustomEventInit<GlobalEventHandlersEventMap[T]['detail']>, 'detail'> : CustomEventInit : CustomEventInit;
|
|
14
|
-
type GetCustomEventType<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<unknown> ? GlobalEventHandlersEventMap[T] : CustomEvent<unknown> : CustomEvent<unknown>;
|
|
15
|
-
export default class OrigamiElement extends LitElement {
|
|
16
|
-
static componentStyles: CSSResult[];
|
|
17
|
-
/** Emits a custom event with more convenient defaults. */
|
|
18
|
-
emit<T extends string & keyof EventTypesWithoutRequiredDetail>(name: EventTypeDoesNotRequireDetail<T>, options?: SlEventInit<T> | undefined): GetCustomEventType<T>;
|
|
19
|
-
emit<T extends string & keyof EventTypesWithRequiredDetail>(name: EventTypeRequiresDetail<T>, options: SlEventInit<T>): GetCustomEventType<T>;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
package/dist/shared/sleep.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function sleep(ms: number): Promise<unknown>;
|
package/dist/shared/watch.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
type UpdateHandler = (prev?: unknown, next?: unknown) => void;
|
|
3
|
-
type NonUndefined<A> = A extends undefined ? never : A;
|
|
4
|
-
type UpdateHandlerFunctionKeys<T extends object> = {
|
|
5
|
-
[K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;
|
|
6
|
-
}[keyof T];
|
|
7
|
-
interface WatchOptions {
|
|
8
|
-
/**
|
|
9
|
-
* If true, will only start watching after the initial update/render
|
|
10
|
-
*/
|
|
11
|
-
waitUntilFirstUpdate?: boolean;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an
|
|
15
|
-
* update to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the
|
|
16
|
-
* initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.
|
|
17
|
-
*
|
|
18
|
-
* Usage:
|
|
19
|
-
*
|
|
20
|
-
* @watch('propName')
|
|
21
|
-
* handlePropChange(oldValue, newValue) {
|
|
22
|
-
* ...
|
|
23
|
-
* }
|
|
24
|
-
*/
|
|
25
|
-
export declare function watch(propertyName: string | string[], options?: WatchOptions): <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>) => void;
|
|
26
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Use a generator so we can iterate and possibly break early.
|
|
3
|
-
* @example
|
|
4
|
-
* // to operate like a regular array. This kinda nullifies generator benefits, but worth knowing if you need the whole array.
|
|
5
|
-
* const allActiveElements = [...activeElements()]
|
|
6
|
-
*
|
|
7
|
-
* // Early return
|
|
8
|
-
* for (const activeElement of activeElements()) {
|
|
9
|
-
* if (<cond>) {
|
|
10
|
-
* break; // Break the loop, dont need to iterate over the whole array or store an array in memory!
|
|
11
|
-
* }
|
|
12
|
-
* }
|
|
13
|
-
*/
|
|
14
|
-
export declare function activeElements(activeElement?: Element | null): Generator<Element>;
|
|
15
|
-
export declare function getDeepestActiveElement(): Element | undefined;
|
package/dist/utils/animate.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Animates an element using keyframes. Returns a promise that resolves after the animation completes or gets canceled.
|
|
3
|
-
*/
|
|
4
|
-
export declare function animateTo(el: HTMLElement, keyframes: Keyframe[], options?: KeyframeAnimationOptions): Promise<unknown>;
|
|
5
|
-
/** Parses a CSS duration and returns the number of milliseconds. */
|
|
6
|
-
export declare function parseDuration(delay: number | string): number;
|
|
7
|
-
/** Tells if the user has enabled the "reduced motion" setting in their browser or OS. */
|
|
8
|
-
export declare function prefersReducedMotion(): boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Stops all active animations on the target element. Returns a promise that resolves after all animations are canceled.
|
|
11
|
-
*/
|
|
12
|
-
export declare function stopAnimations(el: HTMLElement): Promise<unknown[]>;
|
|
13
|
-
/**
|
|
14
|
-
* We can't animate `height: auto`, but we can calculate the height and shim keyframes by replacing it with the
|
|
15
|
-
* element's scrollHeight before the animation.
|
|
16
|
-
*/
|
|
17
|
-
export declare function shimKeyframesHeightAuto(keyframes: Keyframe[], calculatedHeight: number): {
|
|
18
|
-
height: string | number | null | undefined;
|
|
19
|
-
composite?: CompositeOperationOrAuto;
|
|
20
|
-
easing?: string;
|
|
21
|
-
offset?: number | null;
|
|
22
|
-
}[];
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export interface ElementAnimation {
|
|
2
|
-
keyframes: Keyframe[];
|
|
3
|
-
rtlKeyframes?: Keyframe[];
|
|
4
|
-
options?: KeyframeAnimationOptions;
|
|
5
|
-
}
|
|
6
|
-
export interface ElementAnimationMap {
|
|
7
|
-
[animationName: string]: ElementAnimation;
|
|
8
|
-
}
|
|
9
|
-
export interface GetAnimationOptions {
|
|
10
|
-
/**
|
|
11
|
-
* The component's directionality. When set to "rtl", `rtlKeyframes` will be preferred over `keyframes` where
|
|
12
|
-
* available using getAnimation().
|
|
13
|
-
*/
|
|
14
|
-
dir: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Sets a default animation. Components should use the `name.animation` for primary animations and `name.part.animation`
|
|
18
|
-
* for secondary animations, e.g. `dialog.show` and `dialog.overlay.show`. For modifiers, use `drawer.showTop`.
|
|
19
|
-
*/
|
|
20
|
-
export declare function setDefaultAnimation(animationName: string, animation: ElementAnimation | null): void;
|
|
21
|
-
/** Sets a custom animation for the specified element. */
|
|
22
|
-
export declare function setAnimation(el: Element, animationName: string, animation: ElementAnimation | null): void;
|
|
23
|
-
/** Gets an element's animation. Falls back to the default if no animation is found. */
|
|
24
|
-
export declare function getAnimation(el: Element, animationName: string, options: GetAnimationOptions): ElementAnimation;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Calls the blur method on the current active element if it is a child of the provided element.
|
|
3
|
-
* Needed for fixing a11y errors in console.
|
|
4
|
-
* @see https://github.com/shoelace-style/shoelace/issues/2283
|
|
5
|
-
* @param elm The element to check
|
|
6
|
-
*/
|
|
7
|
-
export declare const blurActiveElement: (elm: HTMLElement) => void;
|
package/dist/utils/event.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export default class FocusTrap {
|
|
2
|
-
element: HTMLElement;
|
|
3
|
-
isExternalActivated: boolean;
|
|
4
|
-
tabDirection: 'forward' | 'backward';
|
|
5
|
-
currentFocus: HTMLElement | null;
|
|
6
|
-
previousFocus: HTMLElement | null;
|
|
7
|
-
elementsWithTabbableControls: string[];
|
|
8
|
-
constructor(element: HTMLElement);
|
|
9
|
-
/** Activates focus trapping. */
|
|
10
|
-
activate(): void;
|
|
11
|
-
/** Deactivates focus trapping. */
|
|
12
|
-
deactivate(): void;
|
|
13
|
-
/** Determines if this modal element is currently active or not. */
|
|
14
|
-
isActive(): boolean;
|
|
15
|
-
/** Activates external modal behavior and temporarily disables focus trapping. */
|
|
16
|
-
activateExternal(): void;
|
|
17
|
-
/** Deactivates external modal behavior and re-enables focus trapping. */
|
|
18
|
-
deactivateExternal(): void;
|
|
19
|
-
private checkFocus;
|
|
20
|
-
private handleFocusIn;
|
|
21
|
-
private possiblyHasTabbableChildren;
|
|
22
|
-
private handleKeyDown;
|
|
23
|
-
private handleKeyUp;
|
|
24
|
-
}
|
package/dist/utils/scroll.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns an element's offset relative to its parent. Similar to element.offsetTop and element.offsetLeft, except the
|
|
3
|
-
* parent doesn't have to be positioned relative or absolute.
|
|
4
|
-
*
|
|
5
|
-
* NOTE: This was created to work around what appears to be a bug in Chrome where a slotted element's offsetParent seems
|
|
6
|
-
* to ignore elements inside the surrounding shadow DOM: https://bugs.chromium.org/p/chromium/issues/detail?id=920069
|
|
7
|
-
*/
|
|
8
|
-
export declare function getOffset(element: HTMLElement, parent: HTMLElement): {
|
|
9
|
-
top: number;
|
|
10
|
-
left: number;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Prevents body scrolling. Keeps track of which elements requested a lock so multiple levels of locking are possible
|
|
14
|
-
* without premature unlocking.
|
|
15
|
-
*/
|
|
16
|
-
export declare function lockBodyScrolling(lockingEl: HTMLElement): void;
|
|
17
|
-
/**
|
|
18
|
-
* Unlocks body scrolling. Scrolling will only be unlocked once all elements that requested a lock call this method.
|
|
19
|
-
*/
|
|
20
|
-
export declare function unlockBodyScrolling(lockingEl: HTMLElement): void;
|
|
21
|
-
/** Scrolls an element into view of its container. If the element is already in view, nothing will happen. */
|
|
22
|
-
export declare function scrollIntoView(element: HTMLElement, container: HTMLElement, direction?: 'horizontal' | 'vertical' | 'both', behavior?: 'smooth' | 'auto'): void;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
-
/** A reactive controller that determines when slots exist. */
|
|
3
|
-
export declare class HasSlotController implements ReactiveController {
|
|
4
|
-
host: ReactiveControllerHost & Element;
|
|
5
|
-
slotNames: string[];
|
|
6
|
-
constructor(host: ReactiveControllerHost & Element, ...slotNames: string[]);
|
|
7
|
-
private hasDefaultSlot;
|
|
8
|
-
private hasNamedSlot;
|
|
9
|
-
test(slotName: string): boolean;
|
|
10
|
-
hostConnected(): void;
|
|
11
|
-
hostDisconnected(): void;
|
|
12
|
-
private handleSlotChange;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Given a slot, this function iterates over all of its assigned element and text nodes and returns the concatenated
|
|
16
|
-
* HTML as a string. This is useful because we can't use slot.innerHTML as an alternative.
|
|
17
|
-
*/
|
|
18
|
-
export declare function getInnerHTML(slot: HTMLSlotElement): string;
|
|
19
|
-
/**
|
|
20
|
-
* Given a slot, this function iterates over all of its assigned text nodes and returns the concatenated text as a
|
|
21
|
-
* string. This is useful because we can't use slot.textContent as an alternative.
|
|
22
|
-
*/
|
|
23
|
-
export declare function getTextContent(slot: HTMLSlotElement | undefined | null): string;
|
package/dist/utils/tabbable.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the first and last bounding elements that are tabbable. This is more performant than checking every single
|
|
3
|
-
* element because it short-circuits after finding the first and last ones.
|
|
4
|
-
*/
|
|
5
|
-
export declare function getTabbableBoundary(root: HTMLElement | ShadowRoot): {
|
|
6
|
-
start: HTMLElement;
|
|
7
|
-
end: HTMLElement;
|
|
8
|
-
};
|
|
9
|
-
export declare function getTabbableElements(root: HTMLElement | ShadowRoot): HTMLElement[];
|