create-template-html-css 1.6.4 → 1.8.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.
@@ -0,0 +1,112 @@
1
+ # Publishing Guide for v1.8.0
2
+
3
+ ## Pre-Publish Checklist ✅
4
+
5
+ - [x] Version updated to 1.8.0 in package.json
6
+ - [x] Version updated to 1.8.0 in bin/cli.js
7
+ - [x] README.md updated with all features
8
+ - [x] CHANGELOG.md updated with v1.8.0 features
9
+ - [x] All commits pushed to GitHub
10
+ - [x] Security audit passed (npm audit: 0 vulnerabilities)
11
+ - [x] No Hebrew text in codebase
12
+ - [x] Path traversal protection added
13
+ - [x] Input validation verified
14
+ - [x] All 26 components available and tested
15
+
16
+ ## Features in v1.8.0
17
+
18
+ ### 🌙 Dark Mode Support
19
+ - Automatic `prefers-color-scheme: dark` detection
20
+ - `--dark-mode` flag to enable dark theme support
21
+
22
+ ### 🎨 Color Customizer with Presets
23
+ - 10 preset color schemes: vibrant, pastel, ocean, sunset, forest, purple, minimal, coral, teal, neon
24
+ - `--color-scheme` flag for preset selection
25
+ - Interactive CLI color selection (preset/custom/skip)
26
+ - Hex color validation
27
+ - Automatic RGB conversion for rgba() support
28
+
29
+ ### 📊 Interactive Component Gallery
30
+ - Browse all 26 components with descriptions
31
+ - Search and filter by category
32
+ - Live color scheme preview with hex values
33
+ - Copy commands (both npx and local)
34
+ - Dark mode support
35
+ - Print-friendly layout
36
+ - Mobile responsive design
37
+
38
+ ### 🎪 Gallery Command
39
+ - `create-template gallery` opens COMPONENTS-GALLERY.html in browser
40
+ - Cross-platform support (Windows, macOS, Linux)
41
+
42
+ ### 📦 Package Updates
43
+ - Added `open` dependency for cross-platform file opening
44
+ - Updated .npmignore to exclude development files
45
+ - All dependencies verified and security audited
46
+
47
+ ## Publishing Steps
48
+
49
+ ### 1. Login to npm (if not already logged in)
50
+ ```bash
51
+ npm login
52
+ ```
53
+
54
+ ### 2. Verify package contents
55
+ ```bash
56
+ npm pack
57
+ # This creates a .tgz file showing what will be published
58
+ tar -tzf create-template-html-css-1.8.0.tgz | head -20
59
+ ```
60
+
61
+ ### 3. Publish to npm
62
+ ```bash
63
+ npm publish
64
+ ```
65
+
66
+ ### 4. Verify published package
67
+ ```bash
68
+ npm info create-template-html-css
69
+ npm view create-template-html-css@1.8.0
70
+ ```
71
+
72
+ ### 5. Test installation from npm
73
+ ```bash
74
+ npm install -g create-template-html-css@1.8.0
75
+ create-template --version
76
+ create-template list
77
+ create-template gallery
78
+ ```
79
+
80
+ ### 6. Push commits to GitHub
81
+ ```bash
82
+ git push origin main
83
+ ```
84
+
85
+ ## Post-Publish Tasks
86
+
87
+ - [ ] Add release tag: `git tag -a v1.8.0 -m "Release v1.8.0"`
88
+ - [ ] Push tags: `git push origin v1.8.0`
89
+ - [ ] Create GitHub Release with changelog
90
+ - [ ] Update social media/documentation sites
91
+ - [ ] Monitor npm page for feedback
92
+
93
+ ## Package Statistics
94
+
95
+ - **Version**: 1.8.0
96
+ - **License**: MIT
97
+ - **Repository**: https://github.com/benshabbat/create-template-html-css
98
+ - **NPM**: https://www.npmjs.com/package/create-template-html-css
99
+ - **Components**: 26 total
100
+ - **Color Schemes**: 10 presets
101
+ - **Dependencies**: 3 (chalk, commander, inquirer, open)
102
+ - **DevDependencies**: 1 (prettier)
103
+
104
+ ## Security & Quality
105
+
106
+ - ✅ No vulnerabilities (npm audit: 0)
107
+ - ✅ Path traversal protection implemented
108
+ - ✅ Input validation on all user inputs
109
+ - ✅ Component whitelist validation
110
+ - ✅ HTML structure validation
111
+ - ✅ Cross-platform support verified
112
+ - ✅ All code is English (no Hebrew text)
package/README.md CHANGED
@@ -33,7 +33,7 @@ npm install -g create-template-html-css
33
33
  - 🌈 **Stunning Gradients** - Colorful and attractive designs
34
34
  - ⚡ **Animations** - Smooth and professional effects
35
35
  - 🔧 **Customizable** - Easy to edit and modify the code
36
- - 📦 **23 Templates** - Button, Card, Form, Navigation, Modal, Footer, Hero, Slider, Table, Spinner, Animated Cards, Typing Effect, Fade Gallery, Grid Layouts, Masonry Grid, Dashboard, Flexbox Layouts, Todo List, Counter, Accordion, Tabs
36
+ - 📦 **26 Templates** - Button, Card, Form, Navigation, Modal, Footer, Hero, Slider, Table, Login, Register, Skeleton, Spinner, Animated Cards, Typing Effect, Fade Gallery, Grid Layouts, Masonry Grid, Dashboard, Flexbox Layouts, Todo List, Counter, Accordion, Tabs
37
37
  - 🎯 **Two Modes** - Create new projects or insert into existing HTML pages
38
38
  - 🔒 **Secure** - Input validation and path protection
39
39
  - 📚 **Well Documented** - Comprehensive guides and examples
@@ -41,8 +41,115 @@ npm install -g create-template-html-css
41
41
  - ✨ **Prettier Formatting** - All generated code is automatically formatted with Prettier (v1.6.2+)
42
42
  - 📂 **Organized Structure** - CSS and JS files automatically organized in folders (v1.6.2+)
43
43
  - 💾 **Simple Backups** - Clean backup naming without timestamps (v1.6.2+)
44
+ - 🎯 **Customizable Components** - Choose navigation items and form fields during creation (v1.7.0+)
44
45
 
45
- ## 🆕 What's New in v1.6.2
46
+ ## 🆕 What's New in v1.8.0
47
+
48
+ ### 🌙 Dark Mode Support
49
+ Every component now supports automatic dark mode detection:
50
+ - Add `--dark-mode` flag to enable dark mode styles
51
+ - Uses `prefers-color-scheme: dark` media query
52
+ - Automatic color inversion in dark theme
53
+ - Perfect for modern user preferences
54
+
55
+ **Example:**
56
+ ```bash
57
+ create-template create -c button -n my-button --dark-mode
58
+ ```
59
+
60
+ ### 🎨 Color Customizer
61
+ Create components with custom colors instantly:
62
+ - Use `--primary-color <hex>` flag for primary gradient color
63
+ - Use `--secondary-color <hex>` flag for secondary color
64
+ - Automatic CSS variables generation
65
+ - RGB values automatically calculated
66
+
67
+ **Custom Colors:**
68
+ ```bash
69
+ create-template create -c button --primary-color "#FF5733"
70
+ create-template create -c card --primary-color "#667eea" --secondary-color "#764ba2"
71
+ ```
72
+
73
+ ### 🎨 Preset Color Schemes
74
+ 10 beautiful color schemes ready to use instantly:
75
+
76
+ | Scheme | Primary | Secondary | Use Case |
77
+ |--------|---------|-----------|----------|
78
+ | **Vibrant** | #FF6B6B | #4ECDC4 | Bold, energetic designs |
79
+ | **Pastel** | #FFB3BA | #FFDFBA | Soft, friendly interfaces |
80
+ | **Ocean** | #0066CC | #00CCFF | Professional, tech-focused |
81
+ | **Sunset** | #FF6B35 | #FFA500 | Warm, engaging UIs |
82
+ | **Forest** | #2D6A4F | #40916C | Natural, organic themes |
83
+ | **Purple** | #7209B7 | #B5179E | Elegant, premium feel |
84
+ | **Minimal** | #1A1A1A | #666666 | Clean, modern look |
85
+ | **Coral** | #FF6B9D | #FFA07A | Playful, warm designs |
86
+ | **Teal** | #008B8B | #20B2AA | Balanced, professional |
87
+ | **Neon** | #FF006E | #00D9FF | Bold, futuristic style |
88
+
89
+ **Usage:**
90
+ ```bash
91
+ # Using the vibrant color scheme
92
+ create-template create -c button -n vibrant-button --color-scheme vibrant
93
+
94
+ # Using the ocean color scheme
95
+ create-template create -c card -n ocean-card --color-scheme ocean
96
+
97
+ # Interactive mode - select from presets
98
+ create-template create -c modal
99
+ # Then choose "Use preset color schemes" option
100
+ ```
101
+
102
+ **View All Schemes:** Run `create-template gallery` to see live previews of all color schemes with swatches.
103
+
104
+ ### 📊 Interactive Component Gallery
105
+ New **COMPONENTS-GALLERY.html** showcase page:
106
+ - Browse all 26 components with descriptions
107
+ - Search and filter by category
108
+ - View all 10 color scheme presets with color swatches
109
+ - Copy CLI commands (both npx and local) with one click
110
+ - Dark mode support
111
+ - Print-friendly layout
112
+ - Mobile responsive design
113
+
114
+ **Open gallery:**
115
+ ```bash
116
+ create-template gallery
117
+ # or
118
+ npx create-template gallery
119
+ ```
120
+
121
+ ### 📚 Enhanced Documentation
122
+ - Updated README with all new features
123
+ - Improved CLI help text with examples
124
+ - Detailed component showcase with features
125
+
126
+ ## 🆕 What's New in v1.7.0
127
+
128
+ ### 🎯 Customizable Navigation
129
+ When creating a navigation component, you can now specify exactly which menu items you want:
130
+ - Enter comma-separated items: "Home, Blog, Shop, Contact"
131
+ - Automatically generates matching navigation links and page sections
132
+ - Default: "Home, About, Services, Portfolio, Contact"
133
+
134
+ ### 📝 Customizable Form Fields
135
+ Create forms with exactly the fields you need:
136
+ - **Standard Fields**: Select from Name, Email, Phone, Subject, Message, Terms
137
+ - **Custom Fields**: Add any field with format `type:label`
138
+ - Examples: `text:Age`, `url:Website`, `date:Birth Date`, `number:Quantity`
139
+ - Supports all HTML5 input types: text, email, url, date, number, tel, password, color, etc.
140
+ - Also supports: textarea, checkbox, select
141
+
142
+ ### 🎨 Component Variation Selection
143
+ Choose exactly which variations you want for multi-style components:
144
+ - **Button**: Select from 6 button types (Primary, Secondary, Success, Danger, Outlined, Disabled)
145
+ - **Card**: Choose from 6 card variations (Modern, Premium, Blog, Minimal, User Profile, Interactive)
146
+ - **Spinner**: Pick from 5 spinner types (Circle, Dots, Pulse, Bars, Gradient)
147
+ - Option to select "All Variations" or choose specific ones
148
+
149
+ ### 🚀 Interactive CLI Experience
150
+ Enhanced prompts guide you through component customization with clear instructions and validation.
151
+
152
+ ## 🎨 What Was Added in v1.6.2
46
153
 
47
154
  ### ✨ Prettier Code Formatting
48
155
  All generated and inserted files are automatically formatted with [Prettier](https://prettier.io/) for beautiful, professional-looking code.
@@ -96,9 +203,12 @@ create-template create
96
203
  Follow the interactive prompts:
97
204
  1. **Select Component Type** - Choose from Button, Card, Form, Navigation, Modal, Footer, or Hero
98
205
  2. **Enter Component Name** - Give your component a meaningful name
99
- 3. **Include JavaScript** - Decide if you want to include the script file
206
+ 3. **Customize Component** (v1.7.0+):
207
+ - **Navigation**: Choose menu items (e.g., "Home, Blog, Shop, Contact")
208
+ - **Form**: Select standard fields and add custom fields (e.g., "text:Age, url:Website")
209
+ 4. **Include JavaScript** - Decide if you want to include the script file
100
210
 
101
- **Example:**
211
+ **Example (Basic):**
102
212
 
103
213
  ```bash
104
214
  $ create-template create
@@ -109,6 +219,29 @@ $ create-template create
109
219
  Location: ./my-awesome-button/
110
220
  ```
111
221
 
222
+ **Example (Navigation with Custom Items):**
223
+
224
+ ```bash
225
+ $ create-template create
226
+ ? Choose a component type: Navigation
227
+ ? Enter a name for your component: my-nav
228
+ ? Enter navigation items (comma-separated): Home, Blog, Shop, About Us, Contact
229
+ ✓ Template created successfully!
230
+ Location: ./my-nav/
231
+ ```
232
+
233
+ **Example (Form with Custom Fields):**
234
+
235
+ ```bash
236
+ $ create-template create
237
+ ? Choose a component type: Form
238
+ ? Enter a name for your component: contact-form
239
+ ? Select form fields to include: Name, Email, Message
240
+ ? Add custom fields: text:Age, url:Website, date:Birth Date
241
+ ✓ Template created successfully!
242
+ Location: ./contact-form/
243
+ ```
244
+
112
245
  **Result:**
113
246
  ```
114
247
  my-awesome-button/
@@ -207,31 +340,45 @@ Responsive card component with 6 professional variations:
207
340
 
208
341
  ### 3. Form
209
342
 
210
- Complete contact form with validation:
343
+ Complete contact form with validation and customizable fields (v1.7.0+):
211
344
 
212
- **Fields:**
213
- - Text input
214
- - Email input
215
- - Phone input
216
- - Select dropdown
217
- - Textarea
218
- - Checkboxes
345
+ **Customization Options:**
346
+ - **Standard Fields**: Name, Email, Phone, Subject, Message, Terms Checkbox
347
+ - **Custom Fields**: Add any field with `type:label` format
348
+ - Supported types: text, email, url, date, number, tel, password, color, textarea, checkbox, select
349
+ - Examples: `text:Age`, `url:Website`, `date:Birth Date`, `number:Quantity`
219
350
 
220
351
  **Features:**
221
352
  - Real-time validation
222
353
  - Focus effects
223
354
  - Error messages
224
355
  - Modern styling
356
+ - Fully customizable field selection
225
357
 
226
358
  ### 4. Navigation
227
359
 
228
- Responsive navigation bar for all devices:
360
+ Responsive navigation bar with customizable menu items (v1.7.0+):
361
+
362
+ **Customization:**
363
+ - Choose exactly which menu items to include
364
+ - Enter comma-separated items: "Home, Blog, Shop, Contact"
365
+ - Automatically generates matching page sections
366
+ - Default items: "Home, About, Services, Portfolio, Contact"
229
367
 
230
368
  **Components:**
231
369
  - Logo section
232
- - Navigation menu
370
+ - Customizable navigation menu
233
371
  - Mobile hamburger menu
234
372
  - Smooth scrolling
373
+ - Section highlighting on scroll
374
+
375
+ **Features:**
376
+ - Fully customizable menu structure
377
+ - Mobile-responsive design
378
+ - Sticky navigation
379
+ - Active link highlighting
380
+ - Animated hamburger menu
381
+ - Smooth scroll to sections
235
382
 
236
383
  **Features:**
237
384
  - Fixed header option
@@ -254,6 +401,86 @@ Dialog boxes for various purposes:
254
401
  - Smooth animations
255
402
  - Backdrop blur effect
256
403
 
404
+ ### 6. Login (NEW in v1.8.0)
405
+
406
+ Complete authentication login form with validation and social login:
407
+
408
+ **Features:**
409
+ - Email validation
410
+ - Password validation (minimum 6 characters)
411
+ - "Remember me" checkbox
412
+ - "Forgot password" link
413
+ - Social login buttons (Google, GitHub)
414
+ - Real-time form validation
415
+ - Focus states and animations
416
+ - Responsive design
417
+ - Modal integration with navigation
418
+
419
+ **Includes:**
420
+ - Login form with email/password fields
421
+ - Remember me functionality
422
+ - Forgot password handler
423
+ - Social authentication placeholders
424
+ - Professional gradient styling
425
+ - Mobile-optimized layout
426
+
427
+ ### 7. Register (NEW in v1.8.0)
428
+
429
+ Advanced user registration form with real-time password validation:
430
+
431
+ **Features:**
432
+ - Full name, email, username fields
433
+ - Real-time password strength validation
434
+ - Password requirements display:
435
+ - Minimum 8 characters
436
+ - Uppercase letter required
437
+ - Number required
438
+ - Special character required (@, #, $, %)
439
+ - Password matching validation
440
+ - Username validation (3-20 characters, alphanumeric + underscore)
441
+ - Terms of Service checkbox
442
+ - Newsletter subscription option
443
+ - Dynamic submit button (enabled only when all requirements met)
444
+ - Social registration buttons (Google, GitHub)
445
+ - Real-time visual feedback
446
+
447
+ **Includes:**
448
+ - Registration form with custom fields
449
+ - Live password strength checker
450
+ - Visual requirement indicators (✓/✗)
451
+ - Matching password validator
452
+ - Professional styling
453
+ - Mobile-responsive layout
454
+
455
+ ### 8. Skeleton (NEW in v1.8.0)
456
+
457
+ Loading placeholders with smooth shimmer animation - perfect for displaying while content loads:
458
+
459
+ **Features:**
460
+ - Multiple skeleton variations (card, article, list, profile, grid)
461
+ - Smooth shimmer animation effect
462
+ - Fade-in animations for loaded content
463
+ - Toggle between skeleton and actual content
464
+ - Professional gray gradient styling
465
+ - Responsive grid layout
466
+ - ESC key support for controls
467
+
468
+ **Includes:**
469
+ - Card skeleton with image and content blocks
470
+ - Article skeleton with avatar and text
471
+ - List skeleton with multiple items
472
+ - Profile skeleton with cover and info sections
473
+ - Grid skeleton for gallery-like layouts
474
+ - Toggle button to switch between skeleton and demo content
475
+ - Demo content section with real images and text
476
+ - Mobile-responsive design
477
+
478
+ **Perfect For:**
479
+ - Loading states in applications
480
+ - API response delays
481
+ - Perceived performance optimization
482
+ - Professional user experience
483
+
257
484
  ### 6. Footer
258
485
 
259
486
  Professional footer section:
@@ -610,6 +837,18 @@ See [SECURITY.md](SECURITY.md) for more details.
610
837
  - **[Security Policy](SECURITY.md)** - Security guidelines
611
838
  - **[Component Showcase](SHOWCASE.html)** - View all components in action
612
839
 
840
+ ## 🔒 Security
841
+
842
+ This project includes security features to protect your files:
843
+
844
+ - **Component Whitelist** - Only validated components can be inserted
845
+ - **Path Traversal Protection** - Prevents access to files outside the working directory
846
+ - **Input Validation** - Hex color validation and component name validation
847
+ - **HTML Structure Validation** - Ensures proper HTML structure before insertion
848
+ - **Zero Dependencies for Security** - Uses only Node.js built-in modules for security checks
849
+
850
+ For security concerns, see [SECURITY.md](SECURITY.md)
851
+
613
852
  ## 🤝 Contributing
614
853
 
615
854
  Contributions are welcome! Here's how you can help: