@everymatrix/casino-game-thumb-view 1.56.2 → 1.57.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.
@@ -0,0 +1,138 @@
1
+ import { html } from "lit";
2
+ import "@everymatrix/casino-game-thumb-view";
3
+ const meta = {
4
+ title: 'Casino/Components/casino-game-thumb-view',
5
+ component: 'casino-game-thumb-view',
6
+ args: {
7
+ language: "en",
8
+ endpoint: "",
9
+ userId: "",
10
+ showGameName: "",
11
+ session: "",
12
+ showFavoredCategory: "",
13
+ clientStyling: "",
14
+ clientStylingUrl: "",
15
+ integratedGameframeMobile: "false",
16
+ gamepageModalurl: "",
17
+ integratedGameframeDesktop: "false",
18
+ loadDetails: "false",
19
+ showRoundBoard: "false",
20
+ visibilityConnect: "",
21
+ connectLive: "",
22
+ gameCategory: "",
23
+ livelobbyEndpoint: "",
24
+ gameId: "",
25
+ gameName: "",
26
+ subVendor: "",
27
+ gameVendor: "",
28
+ hasFunMode: "",
29
+ hasAnonymousFunMode: "",
30
+ platform: "PC",
31
+ thumbnail: "",
32
+ isFavorite: "",
33
+ isNew: "",
34
+ cellSize: "",
35
+ gameTag: "",
36
+ type: "",
37
+ },
38
+ argTypes: {
39
+ language: { control: 'text', description: '' },
40
+ endpoint: { control: 'text', description: '' },
41
+ userId: { control: 'text', description: '' },
42
+ showGameName: { control: 'text', description: '' },
43
+ session: { control: 'text', description: '' },
44
+ showFavoredCategory: { control: 'text', description: '' },
45
+ clientStyling: { control: 'text', description: '' },
46
+ clientStylingUrl: { control: 'text', description: '' },
47
+ integratedGameframeMobile: { control: 'text', description: '' },
48
+ gamepageModalurl: { control: 'text', description: '' },
49
+ integratedGameframeDesktop: { control: 'text', description: '' },
50
+ loadDetails: { control: 'text', description: '' },
51
+ showRoundBoard: { control: 'text', description: '' },
52
+ visibilityConnect: { control: 'text', description: '' },
53
+ connectLive: { control: 'text', description: '' },
54
+ gameCategory: { control: 'text', description: '' },
55
+ livelobbyEndpoint: { control: 'text', description: '' },
56
+ gameId: { control: 'text', description: '' },
57
+ gameName: { control: 'text', description: '' },
58
+ subVendor: { control: 'text', description: '' },
59
+ gameVendor: { control: 'text', description: '' },
60
+ hasFunMode: { control: 'text', description: '' },
61
+ hasAnonymousFunMode: { control: 'text', description: '' },
62
+ platform: { control: 'text', description: '' },
63
+ thumbnail: { control: 'text', description: '' },
64
+ isFavorite: { control: 'text', description: '' },
65
+ isNew: { control: 'text', description: '' },
66
+ cellSize: { control: 'text', description: '' },
67
+ gameTag: { control: 'text', description: '' },
68
+ type: { control: 'text', description: '' },
69
+ },
70
+ };
71
+ export default meta;
72
+ const Template = (args) => {
73
+ return html `<casino-game-thumb-view
74
+ language="${args.language}"
75
+ endpoint="${args.endpoint}"
76
+ userId="${args.userId}"
77
+ showGameName="${args.showGameName}"
78
+ session="${args.session}"
79
+ showFavoredCategory="${args.showFavoredCategory}"
80
+ clientStyling="${args.clientStyling}"
81
+ clientStylingUrl="${args.clientStylingUrl}"
82
+ integratedGameframeMobile="${args.integratedGameframeMobile}"
83
+ gamepageModalurl="${args.gamepageModalurl}"
84
+ integratedGameframeDesktop="${args.integratedGameframeDesktop}"
85
+ loadDetails="${args.loadDetails}"
86
+ showRoundBoard="${args.showRoundBoard}"
87
+ visibilityConnect="${args.visibilityConnect}"
88
+ connectLive="${args.connectLive}"
89
+ gameCategory="${args.gameCategory}"
90
+ livelobbyEndpoint="${args.livelobbyEndpoint}"
91
+ gameId="${args.gameId}"
92
+ gameName="${args.gameName}"
93
+ subVendor="${args.subVendor}"
94
+ gameVendor="${args.gameVendor}"
95
+ hasFunMode="${args.hasFunMode}"
96
+ hasAnonymousFunMode="${args.hasAnonymousFunMode}"
97
+ platform="${args.platform}"
98
+ thumbnail="${args.thumbnail}"
99
+ isFavorite="${args.isFavorite}"
100
+ isNew="${args.isNew}"
101
+ cellSize="${args.cellSize}"
102
+ gameTag="${args.gameTag}"
103
+ type="${args.type}"
104
+ ></casino-game-thumb-view>`;
105
+ };
106
+ export const Default = Template.bind({});
107
+ Default.args = {
108
+ language: "en",
109
+ endpoint: "",
110
+ userId: "",
111
+ showGameName: "",
112
+ session: "",
113
+ showFavoredCategory: "",
114
+ clientStyling: "",
115
+ clientStylingUrl: "",
116
+ integratedGameframeMobile: "false",
117
+ gamepageModalurl: "",
118
+ integratedGameframeDesktop: "false",
119
+ loadDetails: "false",
120
+ showRoundBoard: "false",
121
+ visibilityConnect: "",
122
+ connectLive: "",
123
+ gameCategory: "",
124
+ livelobbyEndpoint: "",
125
+ gameId: "",
126
+ gameName: "",
127
+ subVendor: "",
128
+ gameVendor: "",
129
+ hasFunMode: "",
130
+ hasAnonymousFunMode: "",
131
+ platform: "PC",
132
+ thumbnail: "",
133
+ isFavorite: "",
134
+ isNew: "",
135
+ cellSize: "",
136
+ gameTag: "",
137
+ type: "",
138
+ };
@@ -0,0 +1,47 @@
1
+ import path from "path";
2
+ import { getStoryFiles, detectUsedPackages, parseTsConfig, exec, filterParsedPathsByUsedPackages } from "../../../../libs/common/src/storybook/storybook-utils";
3
+ const config = {
4
+ stories: ['../**/*.@(mdx|stories.@(js|ts|tsx))'],
5
+ addons: [
6
+ '@storybook/addon-essentials',
7
+ '@storybook/addon-interactions',
8
+ 'storybook-dark-mode'
9
+ ],
10
+ docs: {
11
+ defaultName: 'Documentation',
12
+ autodocs: 'tag'
13
+ },
14
+ framework: {
15
+ name: '@storybook/web-components-vite',
16
+ options: {}
17
+ },
18
+ // Async viteFinal to build dependent packages before finalizing configuration.
19
+ viteFinal: async (config) => {
20
+ const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
21
+ const usedPackages = detectUsedPackages(storyFiles);
22
+ const buildPromises = usedPackages.map(async (pkg) => {
23
+ try {
24
+ console.log(`Building package ${pkg}...`);
25
+ const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
26
+ console.log(`Built package ${pkg}: ${stdout}`);
27
+ if (stderr) {
28
+ console.error(`Build warning/error for package ${pkg}: ${stderr}`);
29
+ }
30
+ }
31
+ catch (error) {
32
+ console.error(`Error building package ${pkg}:`, error);
33
+ }
34
+ });
35
+ await Promise.all(buildPromises);
36
+ const parsedPaths = parseTsConfig() || {};
37
+ const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
38
+ return Object.assign(Object.assign({}, config), { resolve: {
39
+ alias: Object.assign({}, filteredParsedPaths)
40
+ }, define: {
41
+ process: {
42
+ env: {}
43
+ }
44
+ } });
45
+ }
46
+ };
47
+ export default config;
@@ -0,0 +1,9 @@
1
+ import { themes } from "@storybook/theming";
2
+ export const parameters = {
3
+ darkMode: {
4
+ dark: Object.assign(Object.assign({}, themes.dark), { appBg: 'black' }),
5
+ light: Object.assign(Object.assign({}, themes.normal), { appBg: 'green' }),
6
+ current: 'light',
7
+ stylePreview: true
8
+ }
9
+ };
@@ -0,0 +1,39 @@
1
+ /// <reference types="node" />
2
+ import { exec as execCallback } from 'child_process';
3
+ export declare const exec: typeof execCallback.__promisify__;
4
+ /**
5
+ * Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
6
+ * @param dir The directory to search.
7
+ * @returns Array of story file paths.
8
+ */
9
+ export declare const getStoryFiles: (dir: string) => string[];
10
+ /**
11
+ * Detects which internal packages are used in the provided story files.
12
+ * It looks at every import that starts with the given package alias prefix,
13
+ * then extracts the package name (the segment immediately following the prefix).
14
+ *
15
+ * @param stories Array of story file paths.
16
+ * @returns Array of unique package names (e.g. ['foo', 'bar']).
17
+ */
18
+ export declare const detectUsedPackages: (stories: string[]) => string[];
19
+ /**
20
+ * Extracts all import paths from a file using the TypeScript compiler API.
21
+ * @param filePath The file path to parse.
22
+ * @returns Array of import strings.
23
+ */
24
+ export declare const extractImports: (filePath: string) => string[];
25
+ /**
26
+ * Parses the tsconfig paths and resolves them to absolute paths.
27
+ * @param tsconfigPath The path to the tsconfig file.
28
+ * @returns An object mapping alias keys to absolute paths.
29
+ */
30
+ export declare const parseTsConfig: () => Record<string, string> | null;
31
+ /**
32
+ * Filters the parsed tsconfig alias mapping to only include keys that correspond
33
+ * to the used packages.
34
+ *
35
+ * @param parsedPaths The full alias mapping from tsconfig.
36
+ * @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
37
+ * @returns Filtered alias mapping.
38
+ */
39
+ export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
@@ -0,0 +1,3 @@
1
+ import type { StorybookConfig } from '@storybook/web-components-vite';
2
+ declare const config: StorybookConfig;
3
+ export default config;
@@ -0,0 +1,70 @@
1
+ export declare const parameters: {
2
+ darkMode: {
3
+ dark: {
4
+ appBg: string;
5
+ base: "light" | "dark";
6
+ colorPrimary: string;
7
+ colorSecondary: string;
8
+ appContentBg: string;
9
+ appPreviewBg: string;
10
+ appBorderColor: string;
11
+ appBorderRadius: number;
12
+ fontBase: string;
13
+ fontCode: string;
14
+ textColor: string;
15
+ textInverseColor: string;
16
+ textMutedColor: string;
17
+ barTextColor: string;
18
+ barHoverColor: string;
19
+ barSelectedColor: string;
20
+ barBg: string;
21
+ buttonBg: string;
22
+ buttonBorder: string;
23
+ booleanBg: string;
24
+ booleanSelectedBg: string;
25
+ inputBg: string;
26
+ inputBorder: string;
27
+ inputTextColor: string;
28
+ inputBorderRadius: number;
29
+ brandTitle?: string;
30
+ brandUrl?: string;
31
+ brandImage?: string;
32
+ brandTarget?: string;
33
+ gridCellSize?: number;
34
+ };
35
+ light: {
36
+ appBg: string;
37
+ base: "light" | "dark";
38
+ colorPrimary: string;
39
+ colorSecondary: string;
40
+ appContentBg: string;
41
+ appPreviewBg: string;
42
+ appBorderColor: string;
43
+ appBorderRadius: number;
44
+ fontBase: string;
45
+ fontCode: string;
46
+ textColor: string;
47
+ textInverseColor: string;
48
+ textMutedColor: string;
49
+ barTextColor: string;
50
+ barHoverColor: string;
51
+ barSelectedColor: string;
52
+ barBg: string;
53
+ buttonBg: string;
54
+ buttonBorder: string;
55
+ booleanBg: string;
56
+ booleanSelectedBg: string;
57
+ inputBg: string;
58
+ inputBorder: string;
59
+ inputTextColor: string;
60
+ inputBorderRadius: number;
61
+ brandTitle?: string;
62
+ brandUrl?: string;
63
+ brandImage?: string;
64
+ brandTarget?: string;
65
+ gridCellSize?: number;
66
+ };
67
+ current: string;
68
+ stylePreview: boolean;
69
+ };
70
+ };
@@ -0,0 +1,5 @@
1
+ import type { Meta } from '@storybook/web-components';
2
+ import '@everymatrix/casino-game-thumb-view';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ export declare const Default: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-game-thumb-view",
3
- "version": "1.56.2",
3
+ "version": "1.57.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",