demio-ui 4.0.9 → 4.0.13

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 CHANGED
@@ -83,7 +83,7 @@ When creating new components, follow these steps:
83
83
 
84
84
  ### Code recommendations:
85
85
 
86
- - one component -> one file with all related files (CSS, tests etc.)
86
+ - one component -> one folder with all related files (CSS, tests etc.)
87
87
  - try to make components as simple as possible(try make it stateless if it possible)
88
88
  - group hooks by type (state, ref, effect, etc.)
89
89
  - if you write a comment - try to make it short and clear, don't add obvious comments in code like `// render component` or `//hooks`
@@ -156,13 +156,13 @@ We monitor bundle sizes to ensure our library remains lightweight and performant
156
156
 
157
157
  ### 📊 **Current Bundle Sizes**
158
158
 
159
- | Component | Size | Purpose |
160
- | -------------------------- | -------------- | ---------------------------- |
161
- | **JavaScript Bundle** | 886KB (0.85MB) | Core library code (minified) |
162
- | **CSS Bundle** | 76KB | Styles and theming |
163
- | **TypeScript Definitions** | 164KB | Type definitions |
164
- | **SVG Icons** | 105 files | Icon assets |
165
- | **Total Package Size** | **2.5MB** | Complete library on disk |
159
+ | Component | Size | Purpose |
160
+ | -------------------------- | ------------------------- | ---------------------------- |
161
+ | **JavaScript Bundle** | 512KB (CJS) / 428KB (ESM) | Core library code (minified) |
162
+ | **CSS Bundle** | 76KB | Styles and theming |
163
+ | **TypeScript Definitions** | 168KB | Type definitions |
164
+ | **SVG Icons** | 105 files | Icon assets |
165
+ | **Total Package Size** | **2.4MB** | Complete library on disk |
166
166
 
167
167
  ### 🔍 **Bundle Analysis Tools**
168
168
 
@@ -174,7 +174,7 @@ We provide multiple tools to analyze bundle sizes from different perspectives:
174
174
  npm run build:analyze
175
175
  ```
176
176
 
177
- - **Measures**: Only the JavaScript bundle (886KB)
177
+ - **Measures**: Only the JavaScript bundle
178
178
  - **Shows**: Module breakdown, dependencies, tree-shaking analysis
179
179
  - **Output**: Interactive HTML visualization with Gzip and Brotli sizes
180
180
  - **Purpose**: Optimize JavaScript code and identify large dependencies
@@ -185,7 +185,7 @@ npm run build:analyze
185
185
  npm run bundle-size
186
186
  ```
187
187
 
188
- - **Measures**: All output files (2.5MB total)
188
+ - **Measures**: All output files
189
189
  - **Shows**: JavaScript, CSS, TypeScript definitions, and other assets
190
190
  - **Purpose**: Monitor total package size for distribution
191
191
 
@@ -209,23 +209,15 @@ npm run analyze-all
209
209
  - **Shows**: Complete picture of bundle and assets
210
210
  - **Purpose**: Full analysis for optimization planning
211
211
 
212
- ### 📈 **Bundle Size Guidelines**
213
-
214
- - **JavaScript Bundle**: Target under 1MB (current: 886KB ✅)
215
- - **CSS Bundle**: Target under 100KB (current: 76KB ✅)
216
- - **Total Package**: Target under 3MB (current: 2.5MB ✅)
217
- - **SVG Icons**: Keep individual files under 10KB
218
- - **TypeScript Definitions**: Monitor for excessive type complexity
219
-
220
212
  ### 🎯 **Why Two Different Measurements?**
221
213
 
222
- 1. **Visualizer (886KB)**:
214
+ 1. **Visualizer (512KB CJS / 428KB ESM)**:
223
215
 
224
216
  - Shows only JavaScript code size
225
217
  - Helps optimize code and dependencies
226
218
  - Focuses on runtime performance
227
219
 
228
- 2. **File Size Commands (2.5MB)**:
220
+ 2. **File Size Commands (2.4MB)**:
229
221
  - Shows complete package size
230
222
  - Includes all assets and metadata
231
223
  - Focuses on distribution size
@@ -234,25 +226,23 @@ Both measurements are correct and serve different optimization purposes!
234
226
 
235
227
  ### 🚀 **Optimization Recommendations**
236
228
 
237
- 1. **JavaScript Bundle (886KB)**:
229
+ 1. **JavaScript Bundle**:
238
230
 
239
231
  - ✅ Already well-optimized
240
232
  - Consider tree-shaking for unused components
241
233
  - Monitor for large dependency additions
242
234
 
243
- 2. **CSS Bundle (76KB)**:
235
+ 2. **CSS Bundle**:
244
236
 
245
237
  - ✅ Good size for comprehensive styling
246
- - Consider CSS-in-JS for component-specific styles
247
238
  - Monitor for duplicate styles
248
239
 
249
- 3. **Assets (105 SVG files)**:
240
+ 3. **Assets (SVG files)**:
250
241
 
251
242
  - Optimize SVG files using SVGO
252
- - Consider icon font for frequently used icons
253
243
  - Monitor total assets size
254
244
 
255
- 4. **TypeScript Definitions (164KB)**:
245
+ 4. **TypeScript Definitions**:
256
246
  - ✅ Reasonable size for comprehensive types
257
247
  - Consider selective type exports
258
248
  - Monitor for complex type definitions
@@ -272,33 +262,6 @@ npm run analyze-all
272
262
 
273
263
  This will provide comprehensive bundle size information for monitoring and alerting purposes.
274
264
 
275
- ### 📋 **Manual Analysis**
276
-
277
- For detailed investigation:
278
-
279
- ```bash
280
- npm run build
281
- ```
282
-
283
- Then check the generated files in the `dist/` directory:
284
-
285
- - `dist/cjs/index.js` - CommonJS bundle (2.5MB)
286
- - `dist/esm/index.js` - ES Module bundle (2.5MB)
287
- - `dist/cjs/index.css` - CSS bundle (76KB)
288
- - `dist/types.d.ts` - TypeScript definitions (164KB)
289
- - `dist/bundle-analysis.html` - Interactive JavaScript bundle analysis (886KB)
290
-
291
- ### 🎉 **Current Status**
292
-
293
- ✅ **All bundle sizes are within acceptable limits**
294
-
295
- - JavaScript: 886KB (excellent optimization)
296
- - CSS: 76KB (good size)
297
- - Total package: 2.5MB (reasonable for comprehensive UI library)
298
- - TypeScript: 164KB (comprehensive types)
299
-
300
- The library is well-optimized and ready for production use!
301
-
302
265
  ## Publishing
303
266
 
304
267
  When publishing a new version of the library, follow these steps: