@betorigami/game-ui-shared 2.1.0 → 3.0.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/README.md +1 -1
- package/dist/components/shared/GameProviderWrapper.d.ts +5 -4
- package/dist/components/shared/context/slices/layout.context.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1700 -1705
- package/dist/shared/constants.d.ts +1 -0
- package/dist/shared/container-queries.styles.d.ts +3 -0
- package/dist/utils/game-layout-style.d.ts +2 -2
- package/package.json +1 -1
- package/dist/components/shared/context/desktop-attribute.d.ts +0 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The Lit components, controllers, translations, wire types and game-module regist
|
|
|
10
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.
|
|
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. Desktop and mobile styles go in `${desktopContainerQuery} { … }` and `${mobileContainerQuery} { … }` blocks, after the base rules they override; both query the `game-layout` container the wrapper provides. Tests give an element its slices with `provideTestContexts` and change them with `updateTestContexts`.
|
|
14
14
|
|
|
15
15
|
A game contributes itself through a `GameUiModule`:
|
|
16
16
|
|
|
@@ -17,7 +17,7 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
17
17
|
maxPayout: number;
|
|
18
18
|
minBet: number;
|
|
19
19
|
maxBet: number;
|
|
20
|
-
edge: 1 | 2 | 3 |
|
|
20
|
+
edge: 1 | 2 | 3 | 4 | 8;
|
|
21
21
|
showCurrencyAsText: boolean;
|
|
22
22
|
footerPosition: 'ABOVE' | 'BELOW';
|
|
23
23
|
logoUrl: string | null;
|
|
@@ -70,7 +70,8 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
70
70
|
private showMaxBetButton;
|
|
71
71
|
private volume;
|
|
72
72
|
private instantBetEnabled;
|
|
73
|
-
private
|
|
73
|
+
private documentClientWidth;
|
|
74
|
+
private documentClientHeight;
|
|
74
75
|
private publicKey;
|
|
75
76
|
private scale;
|
|
76
77
|
language: Language;
|
|
@@ -107,10 +108,10 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
107
108
|
updateVolume(volume: number): void;
|
|
108
109
|
updateInstantBetEnabled(enabled: boolean): void;
|
|
109
110
|
updateAutobetNumberOfBets(numberOfBets: number): void;
|
|
110
|
-
|
|
111
|
+
updateClientSize(width: number, height: number): void;
|
|
111
112
|
updateBetAmount(newAmount: Big): void;
|
|
112
113
|
updateBalance(newAmount: Big): void;
|
|
113
|
-
private
|
|
114
|
+
private handleResize;
|
|
114
115
|
private setupResizeObserver;
|
|
115
116
|
private cleanupResizeObserver;
|
|
116
117
|
private calculateScale;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare const DESKTOP_MIN_WIDTH = 768;
|
|
2
1
|
export type LayoutContextType = {
|
|
3
2
|
isDesktop: boolean;
|
|
4
3
|
scale: number;
|
|
4
|
+
clientWidth: number;
|
|
5
|
+
clientHeight: number;
|
|
5
6
|
};
|
|
6
7
|
export declare const DEFAULT_LAYOUT_CONTEXT: LayoutContextType;
|
|
7
8
|
export declare const layoutContext: {
|
package/dist/index.d.ts
CHANGED
|
@@ -67,7 +67,6 @@ export * from './components/shared/Toggle/Toggle';
|
|
|
67
67
|
export * from './components/shared/Tooltip/Tooltip.styles';
|
|
68
68
|
export * from './components/shared/Tooltip/Tooltip';
|
|
69
69
|
export * from './components/shared/context/required-context';
|
|
70
|
-
export * from './components/shared/context/desktop-attribute';
|
|
71
70
|
export * from './components/shared/context/provide-test-contexts';
|
|
72
71
|
export * from './components/shared/context/slices/layout.context';
|
|
73
72
|
export * from './components/shared/context/slices/limits.context';
|
|
@@ -109,6 +108,7 @@ export * from './shared/cards/card.utils';
|
|
|
109
108
|
export * from './shared/chip-state.utils';
|
|
110
109
|
export * from './shared/component.styles';
|
|
111
110
|
export * from './shared/constants';
|
|
111
|
+
export * from './shared/container-queries.styles';
|
|
112
112
|
export * from './shared/create-api-factory';
|
|
113
113
|
export * from './shared/event-map';
|
|
114
114
|
export * from './shared/format-monetary-amount';
|