livevegas-ui-kit 1.0.30 → 1.0.32
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 +69 -69
- package/dist/components/Card/helper.d.ts +24 -0
- package/dist/components/Card/index.d.ts +6 -0
- package/dist/components/Card/index.stories.d.ts +7 -0
- package/dist/components/Card/styled.d.ts +6 -0
- package/dist/components/History/RoundHistory/index.d.ts +10 -1
- package/dist/components/History/RoundHistory/styled.d.ts +15 -0
- package/dist/components/History/helpers.d.ts +5 -4
- package/dist/components/NotPlaying/index.d.ts +5 -0
- package/dist/components/NotPlaying/index.stories.d.ts +7 -0
- package/dist/components/NotPlaying/styled.d.ts +5 -0
- package/dist/components/Reconnect/index.d.ts +1 -0
- package/dist/components/Reconnect/index.stories.d.ts +7 -0
- package/dist/components/Reconnect/styled.d.ts +6 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/livevegas-ui-kit.es.js +1618 -1185
- package/dist/livevegas-ui-kit.umd.js +349 -104
- package/package.json +55 -55
package/README.md
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
export default tseslint.config([
|
|
16
|
-
globalIgnores(['dist']),
|
|
17
|
-
{
|
|
18
|
-
files: ['**/*.{ts,tsx}'],
|
|
19
|
-
extends: [
|
|
20
|
-
// Other configs...
|
|
21
|
-
|
|
22
|
-
// Remove tseslint.configs.recommended and replace with this
|
|
23
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
24
|
-
// Alternatively, use this for stricter rules
|
|
25
|
-
...tseslint.configs.strictTypeChecked,
|
|
26
|
-
// Optionally, add this for stylistic rules
|
|
27
|
-
...tseslint.configs.stylisticTypeChecked,
|
|
28
|
-
|
|
29
|
-
// Other configs...
|
|
30
|
-
],
|
|
31
|
-
languageOptions: {
|
|
32
|
-
parserOptions: {
|
|
33
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
34
|
-
tsconfigRootDir: import.meta.dirname,
|
|
35
|
-
},
|
|
36
|
-
// other options...
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
])
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
43
|
-
|
|
44
|
-
```js
|
|
45
|
-
// eslint.config.js
|
|
46
|
-
import reactX from 'eslint-plugin-react-x'
|
|
47
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
48
|
-
|
|
49
|
-
export default tseslint.config([
|
|
50
|
-
globalIgnores(['dist']),
|
|
51
|
-
{
|
|
52
|
-
files: ['**/*.{ts,tsx}'],
|
|
53
|
-
extends: [
|
|
54
|
-
// Other configs...
|
|
55
|
-
// Enable lint rules for React
|
|
56
|
-
reactX.configs['recommended-typescript'],
|
|
57
|
-
// Enable lint rules for React DOM
|
|
58
|
-
reactDom.configs.recommended,
|
|
59
|
-
],
|
|
60
|
-
languageOptions: {
|
|
61
|
-
parserOptions: {
|
|
62
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
63
|
-
tsconfigRootDir: import.meta.dirname,
|
|
64
|
-
},
|
|
65
|
-
// other options...
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
])
|
|
69
|
-
```
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
export default tseslint.config([
|
|
16
|
+
globalIgnores(['dist']),
|
|
17
|
+
{
|
|
18
|
+
files: ['**/*.{ts,tsx}'],
|
|
19
|
+
extends: [
|
|
20
|
+
// Other configs...
|
|
21
|
+
|
|
22
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
23
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
24
|
+
// Alternatively, use this for stricter rules
|
|
25
|
+
...tseslint.configs.strictTypeChecked,
|
|
26
|
+
// Optionally, add this for stylistic rules
|
|
27
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
28
|
+
|
|
29
|
+
// Other configs...
|
|
30
|
+
],
|
|
31
|
+
languageOptions: {
|
|
32
|
+
parserOptions: {
|
|
33
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
34
|
+
tsconfigRootDir: import.meta.dirname,
|
|
35
|
+
},
|
|
36
|
+
// other options...
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
])
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
// eslint.config.js
|
|
46
|
+
import reactX from 'eslint-plugin-react-x'
|
|
47
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
48
|
+
|
|
49
|
+
export default tseslint.config([
|
|
50
|
+
globalIgnores(['dist']),
|
|
51
|
+
{
|
|
52
|
+
files: ['**/*.{ts,tsx}'],
|
|
53
|
+
extends: [
|
|
54
|
+
// Other configs...
|
|
55
|
+
// Enable lint rules for React
|
|
56
|
+
reactX.configs['recommended-typescript'],
|
|
57
|
+
// Enable lint rules for React DOM
|
|
58
|
+
reactDom.configs.recommended,
|
|
59
|
+
],
|
|
60
|
+
languageOptions: {
|
|
61
|
+
parserOptions: {
|
|
62
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
63
|
+
tsconfigRootDir: import.meta.dirname,
|
|
64
|
+
},
|
|
65
|
+
// other options...
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
])
|
|
69
|
+
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum BackFaceCardType {
|
|
2
|
+
Reverse = "reverse",
|
|
3
|
+
Green = "green",
|
|
4
|
+
Gray = "gray",
|
|
5
|
+
Black = "black"
|
|
6
|
+
}
|
|
7
|
+
interface IcardScannerIndexArr {
|
|
8
|
+
value: string;
|
|
9
|
+
tSpanX: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IBackFaceCard {
|
|
12
|
+
type: BackFaceCardType;
|
|
13
|
+
fixSizes?: boolean;
|
|
14
|
+
cardWidth?: number;
|
|
15
|
+
cardHeight?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const cardScannerIndexArr: IcardScannerIndexArr[];
|
|
18
|
+
export declare const getCardColor: (scannerIndex: number) => "#111111" | "#B50E05";
|
|
19
|
+
export declare const cardTypeIcons: Record<IBackFaceCard["type"], string>;
|
|
20
|
+
export declare const SVGSuits: string[];
|
|
21
|
+
export declare const getSuit: (index: number) => string;
|
|
22
|
+
export declare const getSuitIndex: (index: number) => string;
|
|
23
|
+
export declare const getCardColorIndex: (scannerIndex: number) => "#E34747" | "#FFFFFF99";
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface ICardWrapper {
|
|
2
|
+
cardWidth: number;
|
|
3
|
+
cardHeight: number;
|
|
4
|
+
}
|
|
5
|
+
export declare const CardWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ICardWrapper>> & string;
|
|
6
|
+
export {};
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { IRound } from '../helpers';
|
|
2
|
+
|
|
3
|
+
interface IRoundHistory {
|
|
4
|
+
roundData: IRound;
|
|
5
|
+
setRoundData: (data: IRound | null) => void;
|
|
6
|
+
handleClickRound: (index: number) => void;
|
|
7
|
+
indexHistory: number | null;
|
|
8
|
+
}
|
|
9
|
+
export declare const RoundHistory: ({ roundData, setRoundData, handleClickRound, indexHistory, }: IRoundHistory) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const RoundHistoryWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const AmountWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const DealerInfo: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const Line: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
interface ISeats {
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
index: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const Seats: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ISeats>> & string;
|
|
10
|
+
export declare const BoxComponents: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
+
interface IHistoryCardWrapper {
|
|
12
|
+
color: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const HistoryCardWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IHistoryCardWrapper>> & string;
|
|
15
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface IHistoryData {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
connectionId: string;
|
|
3
|
+
token: string;
|
|
4
4
|
playerId: number;
|
|
5
5
|
rounds: IRound[];
|
|
6
6
|
totalCount: number;
|
|
@@ -16,7 +16,7 @@ export interface IRound {
|
|
|
16
16
|
roundEndTime: string;
|
|
17
17
|
tableId: number;
|
|
18
18
|
}
|
|
19
|
-
type IHands = Pick<IHand,
|
|
19
|
+
type IHands = Pick<IHand, "cards" | "finalValue" | "isBlackjack" | "winOnHand" | "betOnHand">;
|
|
20
20
|
export interface IDealerHand {
|
|
21
21
|
cards: ICard[];
|
|
22
22
|
isBlackjack: boolean;
|
|
@@ -86,6 +86,7 @@ export interface IBets {
|
|
|
86
86
|
boxIndex: number;
|
|
87
87
|
winAmount: number;
|
|
88
88
|
}
|
|
89
|
-
export declare const historyData:
|
|
89
|
+
export declare const historyData: IHistoryData;
|
|
90
90
|
export declare const formatted: (date: string) => string;
|
|
91
|
+
export declare const seatsPosition: string[];
|
|
91
92
|
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const Overlay: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const Content: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const Actions: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const Title: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
|
|
5
|
+
export declare const Subtitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Reconnect: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Overlay: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const Content: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const LoaderWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const Spinner: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
+
export declare const Title: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
|
|
6
|
+
export declare const Subtitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
|
|
@@ -9,5 +9,7 @@ import { TournamentNotification } from './TournamentNotification';
|
|
|
9
9
|
import { ChipBoard } from './ChipBoard';
|
|
10
10
|
import { MobileBottomInfo } from './MobileBottomInfo';
|
|
11
11
|
import { Timer } from './Timer';
|
|
12
|
+
import { Reconnect } from './Reconnect';
|
|
13
|
+
import { NotPlaying } from './NotPlaying';
|
|
12
14
|
|
|
13
|
-
export { BalanceAndBet, TopIcons, Button, Chip, MobileMenu, PopupWrapper, ToLobby, TournamentNotification, ChipBoard, Timer, MobileBottomInfo, };
|
|
15
|
+
export { BalanceAndBet, TopIcons, Button, Chip, MobileMenu, PopupWrapper, ToLobby, TournamentNotification, ChipBoard, Timer, MobileBottomInfo, Reconnect, NotPlaying };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,5 +9,7 @@ import { TournamentNotification } from './components/TournamentNotification';
|
|
|
9
9
|
import { ChipBoard } from './components/ChipBoard';
|
|
10
10
|
import { MobileBottomInfo } from './components/MobileBottomInfo';
|
|
11
11
|
import { Timer } from './components/Timer';
|
|
12
|
+
import { Reconnect } from './components/Reconnect';
|
|
13
|
+
import { NotPlaying } from './components/NotPlaying';
|
|
12
14
|
|
|
13
|
-
export { BalanceAndBet, TopIcons, Button, Chip, MobileMenu, PopupWrapper, ToLobby, TournamentNotification, ChipBoard, Timer, MobileBottomInfo, };
|
|
15
|
+
export { BalanceAndBet, TopIcons, Button, Chip, MobileMenu, PopupWrapper, ToLobby, TournamentNotification, ChipBoard, Timer, MobileBottomInfo, Reconnect, NotPlaying };
|