dev-react-microstore 4.0.1 → 5.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 +101 -2
- package/dist/index.d.mts +85 -2
- package/dist/index.d.ts +85 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/example/README.md +54 -0
- package/example/eslint.config.js +28 -0
- package/example/index.html +13 -0
- package/example/package-lock.json +3382 -0
- package/example/package.json +29 -0
- package/example/public/index.html +98 -0
- package/example/public/vite.svg +1 -0
- package/example/src/App.css +613 -0
- package/example/src/App.tsx +34 -0
- package/example/src/assets/react.svg +1 -0
- package/example/src/components/Counter.tsx +112 -0
- package/example/src/components/CustomCompare.tsx +466 -0
- package/example/src/components/Logs.tsx +28 -0
- package/example/src/components/Search.tsx +38 -0
- package/example/src/components/ThemeToggle.tsx +25 -0
- package/example/src/components/TodoList.tsx +63 -0
- package/example/src/components/UserManager.tsx +68 -0
- package/example/src/index.css +68 -0
- package/example/src/main.tsx +10 -0
- package/example/src/store.ts +223 -0
- package/example/src/vite-env.d.ts +1 -0
- package/example/tsconfig.app.json +26 -0
- package/example/tsconfig.json +7 -0
- package/example/tsconfig.node.json +25 -0
- package/example/vite.config.ts +7 -0
- package/package.json +10 -3
- package/src/index.ts +245 -8
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "example",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"lint": "eslint .",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"react": "^19.1.0",
|
|
14
|
+
"react-dom": "^19.1.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@eslint/js": "^9.25.0",
|
|
18
|
+
"@types/react": "^19.1.2",
|
|
19
|
+
"@types/react-dom": "^19.1.2",
|
|
20
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
21
|
+
"eslint": "^9.25.0",
|
|
22
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
23
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
24
|
+
"globals": "^16.0.0",
|
|
25
|
+
"typescript": "~5.8.3",
|
|
26
|
+
"typescript-eslint": "^8.30.1",
|
|
27
|
+
"vite": "^6.3.5"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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" />
|
|
6
|
+
<meta name="theme-color" content="#000000" />
|
|
7
|
+
<meta name="description" content="React Microstore Example App" />
|
|
8
|
+
<title>React Microstore Example</title>
|
|
9
|
+
<style>
|
|
10
|
+
body {
|
|
11
|
+
margin: 0;
|
|
12
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
13
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
14
|
+
sans-serif;
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
|
17
|
+
background-color: #f5f5f5;
|
|
18
|
+
padding: 20px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.container {
|
|
22
|
+
max-width: 800px;
|
|
23
|
+
margin: 0 auto;
|
|
24
|
+
background: white;
|
|
25
|
+
padding: 30px;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.section {
|
|
31
|
+
margin-bottom: 30px;
|
|
32
|
+
padding: 20px;
|
|
33
|
+
border: 1px solid #ddd;
|
|
34
|
+
border-radius: 4px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.section h3 {
|
|
38
|
+
margin-top: 0;
|
|
39
|
+
color: #333;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
button {
|
|
43
|
+
background: #007bff;
|
|
44
|
+
color: white;
|
|
45
|
+
border: none;
|
|
46
|
+
padding: 8px 16px;
|
|
47
|
+
border-radius: 4px;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
margin-right: 10px;
|
|
50
|
+
margin-bottom: 10px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
button:hover {
|
|
54
|
+
background: #0056b3;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
button:disabled {
|
|
58
|
+
background: #ccc;
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
input {
|
|
63
|
+
padding: 8px;
|
|
64
|
+
border: 1px solid #ddd;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
margin-right: 10px;
|
|
67
|
+
margin-bottom: 10px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.logs {
|
|
71
|
+
background: #f8f9fa;
|
|
72
|
+
padding: 15px;
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
font-family: monospace;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
max-height: 200px;
|
|
77
|
+
overflow-y: auto;
|
|
78
|
+
border: 1px solid #ddd;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.error {
|
|
82
|
+
color: #dc3545;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.success {
|
|
86
|
+
color: #28a745;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.info {
|
|
90
|
+
color: #17a2b8;
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
93
|
+
</head>
|
|
94
|
+
<body>
|
|
95
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
96
|
+
<div id="root"></div>
|
|
97
|
+
</body>
|
|
98
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|