react-riichi-mahjong-tiles 1.1.0 → 2.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/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "react-riichi-mahjong-tiles",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "description": "Riichi Mahjong tiles as React SVG components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
7
+ "types": "dist/index.d.ts",
7
8
  "scripts": {
8
- "storybook": "start-storybook -p 6006 --no-dll -s ./public",
9
- "build-storybook": "build-storybook",
10
- "build-lib": "rollup -c --bundleConfigAsCjs"
9
+ "storybook": "storybook dev -p 6006",
10
+ "build-storybook": "storybook build",
11
+ "clean": "rimraf dist",
12
+ "build-lib": "rimraf dist && rollup -c --bundleConfigAsCjs"
11
13
  },
12
14
  "repository": {
13
15
  "type": "git",
@@ -28,26 +30,30 @@
28
30
  },
29
31
  "homepage": "https://github.com/MaijaHeiskanen/react-riichi-mahjong-tiles#readme",
30
32
  "devDependencies": {
31
- "@babel/core": "^7.20.12",
32
- "@babel/preset-react": "^7.18.6",
33
- "@rollup/plugin-node-resolve": "^15.0.1",
34
- "@storybook/addon-actions": "^6.5.16",
35
- "@storybook/addon-essentials": "^6.5.16",
36
- "@storybook/addon-interactions": "^6.5.16",
37
- "@storybook/addon-links": "^6.5.16",
38
- "@storybook/builder-webpack4": "^6.5.16",
39
- "@storybook/manager-webpack4": "^6.5.16",
40
- "@storybook/react": "^6.5.16",
41
- "@storybook/testing-library": "^0.0.13",
42
- "@svgr/rollup": "^6.5.1",
43
- "@svgr/webpack": "^5.5.0",
44
- "babel-loader": "^8.3.0",
45
- "react": "^18.2.0",
46
- "react-dom": "^18.2.0",
47
- "rollup": "^3.12.0",
33
+ "@babel/core": "^7.28.6",
34
+ "@babel/preset-react": "^7.28.5",
35
+ "@babel/preset-typescript": "^7.28.5",
36
+ "@rollup/plugin-node-resolve": "^16.0.3",
37
+ "@storybook/addon-essentials": "^8.6.14",
38
+ "@storybook/addon-interactions": "^8.6.14",
39
+ "@storybook/addon-links": "^8.6.14",
40
+ "@storybook/react": "^8.6.14",
41
+ "@storybook/react-webpack5": "^8.6.14",
42
+ "@storybook/test": "^8.6.14",
43
+ "@svgr/rollup": "^8.1.0",
44
+ "@svgr/webpack": "^8.1.0",
45
+ "@types/react": "^19.2.3",
46
+ "babel-loader": "^10.0.0",
47
+ "react": "^19.2.3",
48
+ "react-dom": "^19.2.3",
49
+ "rimraf": "^6.1.2",
50
+ "rollup": "^4.56.0",
48
51
  "rollup-plugin-babel": "^4.4.0",
52
+ "rollup-plugin-copy": "^3.5.0",
49
53
  "rollup-plugin-peer-deps-external": "^2.2.4",
50
- "rollup-plugin-url": "^3.0.1"
54
+ "rollup-plugin-url": "^3.0.1",
55
+ "storybook": "^8.6.14",
56
+ "typescript": "^5.8.3"
51
57
  },
52
58
  "peerDependencies": {
53
59
  "react": "^18.2.0",
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Mahjong Tiles Test App</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "test-app",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "preview": "vite preview"
10
+ },
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1",
14
+ "react-riichi-mahjong-tiles": "file:.."
15
+ },
16
+ "devDependencies": {
17
+ "@types/react": "^18.3.12",
18
+ "@types/react-dom": "^18.3.1",
19
+ "@vitejs/plugin-react": "^4.3.4",
20
+ "typescript": "~5.6.2",
21
+ "vite": "^6.0.1"
22
+ }
23
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2020",
4
+ "useDefineForClassFields": true,
5
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
6
+ "module": "ESNext",
7
+ "skipLibCheck": true,
8
+ "moduleResolution": "bundler",
9
+ "allowImportingTsExtensions": true,
10
+ "isolatedModules": true,
11
+ "moduleDetection": "force",
12
+ "noEmit": true,
13
+ "jsx": "react-jsx",
14
+ "strict": true,
15
+ "noUnusedLocals": true,
16
+ "noUnusedParameters": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ "noUncheckedSideEffectImports": true
19
+ },
20
+ "include": ["src"]
21
+ }
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from 'vite';
2
+ import react from '@vitejs/plugin-react';
3
+
4
+ // https://vite.dev/config/
5
+ export default defineConfig({
6
+ plugins: [react()],
7
+ resolve: {
8
+ // Handle symlinks from file: dependencies
9
+ preserveSymlinks: true,
10
+ // Prevent duplicate React instances
11
+ dedupe: ['react', 'react-dom'],
12
+ },
13
+ });