@machinemetrics/mm-react-components 0.2.3-6 → 0.2.3-8
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.
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@machinemetrics/mm-react-components",
|
|
3
|
-
"version": "0.2.3-
|
|
3
|
+
"version": "0.2.3-8",
|
|
4
4
|
"description": "Industrial-grade React components for manufacturing applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"bin": {
|
|
52
52
|
"chakra-to-shadcn": "dist/scripts/chakra-to-shadcn-migrator/bin/chakra-to-shadcn.js",
|
|
53
|
-
"mm-init": "scripts/init.cjs"
|
|
53
|
+
"mm-init": "dist/scripts/init.cjs"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "vite build --mode production && tsc --project tsconfig.build.json",
|
|
@@ -162,7 +162,6 @@
|
|
|
162
162
|
"files": [
|
|
163
163
|
"dist",
|
|
164
164
|
"src/index.css",
|
|
165
|
-
"src/themes",
|
|
166
165
|
"tailwind.config.export.js",
|
|
167
166
|
"docs/TAILWIND_SETUP.md",
|
|
168
167
|
"README.md",
|
package/scripts/README.md
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
# MM React Components - Initialization Scripts
|
|
2
|
-
|
|
3
|
-
This directory contains initialization scripts to help users quickly set up the MachineMetrics React Components library in their projects.
|
|
4
|
-
|
|
5
|
-
## Available Scripts
|
|
6
|
-
|
|
7
|
-
### 1. Quick Initialization Script (`init.js`)
|
|
8
|
-
|
|
9
|
-
**Usage:** `npm run init`
|
|
10
|
-
|
|
11
|
-
A streamlined initialization script that:
|
|
12
|
-
|
|
13
|
-
- Installs the component library and core dependencies
|
|
14
|
-
- Sets up basic CSS imports
|
|
15
|
-
- Provides minimal configuration
|
|
16
|
-
|
|
17
|
-
**Features:**
|
|
18
|
-
|
|
19
|
-
- ✅ Fast setup (no interactive prompts)
|
|
20
|
-
- ✅ Installs only essential dependencies
|
|
21
|
-
- ✅ Basic theme integration
|
|
22
|
-
- ✅ Perfect for quick prototyping
|
|
23
|
-
|
|
24
|
-
### 2. NPX CLI Tool (`npx-init.js`)
|
|
25
|
-
|
|
26
|
-
**Usage:** `npx @machinemetrics/mm-react-components init`
|
|
27
|
-
|
|
28
|
-
An NPX CLI tool that can be run from any directory:
|
|
29
|
-
|
|
30
|
-
- Installs the component library
|
|
31
|
-
- Sets up peer dependencies
|
|
32
|
-
- Creates example components
|
|
33
|
-
- Configures CSS imports
|
|
34
|
-
|
|
35
|
-
**Features:**
|
|
36
|
-
|
|
37
|
-
- ✅ Can be run via npx (no global installation needed)
|
|
38
|
-
- ✅ Works in any React project
|
|
39
|
-
- ✅ Creates example components
|
|
40
|
-
- ✅ Minimal setup process
|
|
41
|
-
|
|
42
|
-
## Usage Examples
|
|
43
|
-
|
|
44
|
-
### For New Projects
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
# Create a new React project
|
|
48
|
-
npx create-react-app my-app
|
|
49
|
-
cd my-app
|
|
50
|
-
|
|
51
|
-
# Install MM React Components
|
|
52
|
-
npx @machinemetrics/mm-react-components init
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### For Existing Projects
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
# Quick setup
|
|
59
|
-
npm run init
|
|
60
|
-
|
|
61
|
-
# Or use npx (recommended)
|
|
62
|
-
npx @machinemetrics/mm-react-components init
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### NPX Usage
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# Use directly with npx (no installation needed)
|
|
69
|
-
npx @machinemetrics/mm-react-components init
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## What Gets Installed
|
|
73
|
-
|
|
74
|
-
### Core Dependencies
|
|
75
|
-
|
|
76
|
-
- `@machinemetrics/mm-react-components` - The component library
|
|
77
|
-
- `class-variance-authority` - Component variant management
|
|
78
|
-
- `clsx` - Conditional class names
|
|
79
|
-
- `tailwind-merge` - Tailwind class merging
|
|
80
|
-
- `@radix-ui/react-slot` - Radix UI primitives
|
|
81
|
-
- `lucide-react` - Icon library
|
|
82
|
-
|
|
83
|
-
### Optional Dependencies
|
|
84
|
-
|
|
85
|
-
- `react-hook-form` - Form handling
|
|
86
|
-
- `@hookform/resolvers` - Form validation resolvers
|
|
87
|
-
- `zod` - Schema validation
|
|
88
|
-
- `sonner` - Toast notifications
|
|
89
|
-
|
|
90
|
-
## What Gets Created
|
|
91
|
-
|
|
92
|
-
### CSS Imports
|
|
93
|
-
|
|
94
|
-
```css
|
|
95
|
-
@import '@machinemetrics/mm-react-components/styles';
|
|
96
|
-
@import '@machinemetrics/mm-react-components/themes/carbide';
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
### Example Components
|
|
100
|
-
|
|
101
|
-
- Basic usage examples
|
|
102
|
-
- Advanced form examples
|
|
103
|
-
- Industrial/manufacturing use cases
|
|
104
|
-
|
|
105
|
-
### Configuration Files
|
|
106
|
-
|
|
107
|
-
- TypeScript declarations
|
|
108
|
-
- Vite configuration (if needed)
|
|
109
|
-
- Example documentation
|
|
110
|
-
|
|
111
|
-
## Theme Integration
|
|
112
|
-
|
|
113
|
-
The scripts automatically set up the Carbide theme for industrial applications:
|
|
114
|
-
|
|
115
|
-
```tsx
|
|
116
|
-
// Add to your root element
|
|
117
|
-
<div className="carbide">
|
|
118
|
-
<App />
|
|
119
|
-
</div>
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Troubleshooting
|
|
123
|
-
|
|
124
|
-
### Common Issues
|
|
125
|
-
|
|
126
|
-
1. **"React not found"**
|
|
127
|
-
- Ensure you're in a React project directory
|
|
128
|
-
- Check that React is installed in package.json
|
|
129
|
-
|
|
130
|
-
2. **"Permission denied"**
|
|
131
|
-
- Make sure the script is executable: `chmod +x scripts/*.js`
|
|
132
|
-
|
|
133
|
-
3. **"Module not found"**
|
|
134
|
-
- Run `npm install` to install dependencies
|
|
135
|
-
- Check that the component library is properly installed
|
|
136
|
-
|
|
137
|
-
### Manual Setup
|
|
138
|
-
|
|
139
|
-
If the scripts fail, you can set up manually:
|
|
140
|
-
|
|
141
|
-
```bash
|
|
142
|
-
# Install the library
|
|
143
|
-
npm install @machinemetrics/mm-react-components
|
|
144
|
-
|
|
145
|
-
# Install peer dependencies
|
|
146
|
-
npm install class-variance-authority clsx tailwind-merge @radix-ui/react-slot lucide-react
|
|
147
|
-
|
|
148
|
-
# Add to your CSS
|
|
149
|
-
@import '@machinemetrics/mm-react-components/styles';
|
|
150
|
-
@import '@machinemetrics/mm-react-components/themes/carbide';
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## Support
|
|
154
|
-
|
|
155
|
-
For issues or questions:
|
|
156
|
-
|
|
157
|
-
- GitHub Issues: https://github.com/machinemetrics/mm-react-components/issues
|
|
158
|
-
- Documentation: https://github.com/machinemetrics/mm-react-components#readme
|
|
159
|
-
|
|
160
|
-
## Contributing
|
|
161
|
-
|
|
162
|
-
To improve the initialization scripts:
|
|
163
|
-
|
|
164
|
-
1. Fork the repository
|
|
165
|
-
2. Make your changes
|
|
166
|
-
3. Test with different React setups
|
|
167
|
-
4. Submit a pull request
|
|
168
|
-
|
|
169
|
-
## License
|
|
170
|
-
|
|
171
|
-
MIT License - see LICENSE file for details.
|
|
File without changes
|