@sigtes/ui 0.0.2
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 +73 -0
- package/dist/components/button.js +7 -0
- package/dist/index.js +5 -0
- package/dist/types/components/button.d.ts +3 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/ui.css +1 -0
- package/package.json +55 -0
package/README.md
ADDED
@@ -0,0 +1,73 @@
|
|
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
|
+
## React Compiler
|
11
|
+
|
12
|
+
The React Compiler is currently not compatible with SWC. See [this issue](https://github.com/vitejs/vite-plugin-react/issues/428) for tracking the progress.
|
13
|
+
|
14
|
+
## Expanding the ESLint configuration
|
15
|
+
|
16
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
17
|
+
|
18
|
+
```js
|
19
|
+
export default defineConfig([
|
20
|
+
globalIgnores(['dist']),
|
21
|
+
{
|
22
|
+
files: ['**/*.{ts,tsx}'],
|
23
|
+
extends: [
|
24
|
+
// Other configs...
|
25
|
+
|
26
|
+
// Remove tseslint.configs.recommended and replace with this
|
27
|
+
tseslint.configs.recommendedTypeChecked,
|
28
|
+
// Alternatively, use this for stricter rules
|
29
|
+
tseslint.configs.strictTypeChecked,
|
30
|
+
// Optionally, add this for stylistic rules
|
31
|
+
tseslint.configs.stylisticTypeChecked,
|
32
|
+
|
33
|
+
// Other configs...
|
34
|
+
],
|
35
|
+
languageOptions: {
|
36
|
+
parserOptions: {
|
37
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
38
|
+
tsconfigRootDir: import.meta.dirname,
|
39
|
+
},
|
40
|
+
// other options...
|
41
|
+
},
|
42
|
+
},
|
43
|
+
])
|
44
|
+
```
|
45
|
+
|
46
|
+
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:
|
47
|
+
|
48
|
+
```js
|
49
|
+
// eslint.config.js
|
50
|
+
import reactX from 'eslint-plugin-react-x'
|
51
|
+
import reactDom from 'eslint-plugin-react-dom'
|
52
|
+
|
53
|
+
export default defineConfig([
|
54
|
+
globalIgnores(['dist']),
|
55
|
+
{
|
56
|
+
files: ['**/*.{ts,tsx}'],
|
57
|
+
extends: [
|
58
|
+
// Other configs...
|
59
|
+
// Enable lint rules for React
|
60
|
+
reactX.configs['recommended-typescript'],
|
61
|
+
// Enable lint rules for React DOM
|
62
|
+
reactDom.configs.recommended,
|
63
|
+
],
|
64
|
+
languageOptions: {
|
65
|
+
parserOptions: {
|
66
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
67
|
+
tsconfigRootDir: import.meta.dirname,
|
68
|
+
},
|
69
|
+
// other options...
|
70
|
+
},
|
71
|
+
},
|
72
|
+
])
|
73
|
+
```
|
package/dist/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { Button } from './button';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Button } from './components/index';
|
package/dist/ui.css
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
#root{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion: no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}
|
package/package.json
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
{
|
2
|
+
"name": "@sigtes/ui",
|
3
|
+
"private": false,
|
4
|
+
"version": "0.0.2",
|
5
|
+
"type": "module",
|
6
|
+
"exports": {
|
7
|
+
".": {
|
8
|
+
"types": "./dist/types/index.d.ts",
|
9
|
+
"import": "./dist/src/index.js",
|
10
|
+
"require": "./dist/src/index.cjs"
|
11
|
+
},
|
12
|
+
"./styles.css": "./dist/ui.css"
|
13
|
+
},
|
14
|
+
"files": [
|
15
|
+
"dist"
|
16
|
+
],
|
17
|
+
"publishConfig": {
|
18
|
+
"access": "public"
|
19
|
+
},
|
20
|
+
"scripts": {
|
21
|
+
"dev": "vite build --watch",
|
22
|
+
"build": "tsc -b && vite build",
|
23
|
+
"lint": "eslint .",
|
24
|
+
"prepare": "npm run build",
|
25
|
+
"preview": "vite preview"
|
26
|
+
},
|
27
|
+
"peerDependencies": {
|
28
|
+
"next": "15.5.4",
|
29
|
+
"react": "^19.1.1",
|
30
|
+
"react-dom": "^19.1.1"
|
31
|
+
},
|
32
|
+
"devDependencies": {
|
33
|
+
"@eslint/js": "^9.36.0",
|
34
|
+
"@tailwindcss/vite": "^4.1.13",
|
35
|
+
"@types/node": "^24.5.2",
|
36
|
+
"@types/react": "^19.1.13",
|
37
|
+
"@types/react-dom": "^19.1.9",
|
38
|
+
"@vitejs/plugin-react-swc": "^4.1.0",
|
39
|
+
"autoprefixer": "^10.4.21",
|
40
|
+
"eslint": "^9.36.0",
|
41
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
42
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
43
|
+
"globals": "^16.4.0",
|
44
|
+
"postcss": "^8.5.6",
|
45
|
+
"rollup-plugin-preserve-directives": "^0.4.0",
|
46
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
47
|
+
"tailwindcss": "^4.1.13",
|
48
|
+
"typescript": "~5.8.3",
|
49
|
+
"typescript-eslint": "^8.44.0",
|
50
|
+
"vite": "^7.1.7",
|
51
|
+
"vite-plugin-dts": "^4.5.4",
|
52
|
+
"vite-plugin-typed-css-modules": "^0.4.0",
|
53
|
+
"vite-tsconfig-paths": "^5.1.4"
|
54
|
+
}
|
55
|
+
}
|