svger-cli 2.0.6 → 2.0.7
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/.svgerconfig.example.json +119 -119
- package/CHANGELOG.md +144 -156
- package/DEVELOPMENT.md +352 -352
- package/LICENSE +20 -20
- package/README.md +2340 -2654
- package/SECURITY.md +68 -68
- package/bin/svg-tool.js +2 -2
- package/dist/core/framework-templates.d.ts +1 -0
- package/dist/core/framework-templates.js +373 -285
- package/dist/core/style-compiler.js +201 -201
- package/dist/core/template-manager.js +348 -348
- package/dist/services/svg-service.js +12 -12
- package/dist/templates/ComponentTemplate.js +17 -17
- package/dist/types/index.d.ts +1 -1
- package/docs/ADR-SVG-INTRGRATION-METHODS-001.adr.md +157 -157
- package/docs/ADR-SVG-INTRGRATION-METHODS-002.adr.md +549 -549
- package/docs/FRAMEWORK-GUIDE.md +768 -768
- package/docs/IMPLEMENTATION-SUMMARY.md +376 -376
- package/package.json +179 -177
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/faezemohades/svger-cli/main/schemas/config.schema.json",
|
|
3
|
-
|
|
4
|
-
"_comment": "Complete Configuration Schema - This file demonstrates all available configuration options for svger-cli",
|
|
5
|
-
|
|
6
|
-
"// Source & Output": "",
|
|
7
|
-
"source": "./src/assets/svg",
|
|
8
|
-
"output": "./src/components/icons",
|
|
9
|
-
|
|
10
|
-
"// Framework Configuration": "",
|
|
11
|
-
"framework": "react",
|
|
12
|
-
"typescript": true,
|
|
13
|
-
"componentType": "functional",
|
|
14
|
-
|
|
15
|
-
"// Processing Options": "",
|
|
16
|
-
"watch": false,
|
|
17
|
-
"parallel": true,
|
|
18
|
-
"batchSize": 10,
|
|
19
|
-
"maxConcurrency": 4,
|
|
20
|
-
"cache": true,
|
|
21
|
-
|
|
22
|
-
"// Default Properties": "",
|
|
23
|
-
"defaultWidth": 24,
|
|
24
|
-
"defaultHeight": 24,
|
|
25
|
-
"defaultFill": "currentColor",
|
|
26
|
-
"defaultStroke": "none",
|
|
27
|
-
"defaultStrokeWidth": 1,
|
|
28
|
-
|
|
29
|
-
"// Styling Configuration": "",
|
|
30
|
-
"styleRules": {
|
|
31
|
-
"fill": "inherit",
|
|
32
|
-
"stroke": "none",
|
|
33
|
-
"strokeWidth": "1",
|
|
34
|
-
"opacity": "1"
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
"// Responsive Design": "",
|
|
38
|
-
"responsive": {
|
|
39
|
-
"breakpoints": ["sm", "md", "lg", "xl"],
|
|
40
|
-
"values": {
|
|
41
|
-
"width": ["16px", "20px", "24px", "32px"],
|
|
42
|
-
"height": ["16px", "20px", "24px", "32px"]
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
"// Theme Configuration": "",
|
|
47
|
-
"theme": {
|
|
48
|
-
"mode": "auto",
|
|
49
|
-
"variables": {
|
|
50
|
-
"primary": "currentColor",
|
|
51
|
-
"secondary": "#6b7280",
|
|
52
|
-
"accent": "#3b82f6",
|
|
53
|
-
"background": "#ffffff",
|
|
54
|
-
"foreground": "#000000"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
"// Animation Effects": "",
|
|
59
|
-
"animations": ["fadeIn", "slideIn", "bounce"],
|
|
60
|
-
|
|
61
|
-
"// Advanced Options": "",
|
|
62
|
-
"plugins": [
|
|
63
|
-
{
|
|
64
|
-
"name": "svg-optimizer",
|
|
65
|
-
"options": {
|
|
66
|
-
"removeComments": true,
|
|
67
|
-
"removeMetadata": true
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
],
|
|
71
|
-
"exclude": ["*.test.svg", "deprecated/**"],
|
|
72
|
-
"include": ["icons/**", "illustrations/**"],
|
|
73
|
-
|
|
74
|
-
"// Error Handling": "",
|
|
75
|
-
"errorHandling": {
|
|
76
|
-
"strategy": "continue",
|
|
77
|
-
"maxRetries": 3,
|
|
78
|
-
"timeout": 30000
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
"// Performance Settings": "",
|
|
82
|
-
"performance": {
|
|
83
|
-
"optimization": "balanced",
|
|
84
|
-
"memoryLimit": 512,
|
|
85
|
-
"cacheTimeout": 3600000
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
"// Output Customization": "",
|
|
89
|
-
"outputConfig": {
|
|
90
|
-
"naming": "pascal",
|
|
91
|
-
"extension": "tsx",
|
|
92
|
-
"directory": "./src/components/icons"
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
"// Framework-Specific Configurations": "",
|
|
96
|
-
"react": {
|
|
97
|
-
"componentType": "functional",
|
|
98
|
-
"forwardRef": true,
|
|
99
|
-
"memo": false,
|
|
100
|
-
"propsInterface": "SVGProps",
|
|
101
|
-
"styledComponents": false,
|
|
102
|
-
"cssModules": false
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
"vue": {
|
|
106
|
-
"api": "composition",
|
|
107
|
-
"setup": true,
|
|
108
|
-
"typescript": true,
|
|
109
|
-
"scoped": true,
|
|
110
|
-
"cssVariables": true
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
"angular": {
|
|
114
|
-
"standalone": true,
|
|
115
|
-
"signals": true,
|
|
116
|
-
"changeDetection": "OnPush",
|
|
117
|
-
"encapsulation": "Emulated"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/faezemohades/svger-cli/main/schemas/config.schema.json",
|
|
3
|
+
|
|
4
|
+
"_comment": "Complete Configuration Schema - This file demonstrates all available configuration options for svger-cli",
|
|
5
|
+
|
|
6
|
+
"// Source & Output": "",
|
|
7
|
+
"source": "./src/assets/svg",
|
|
8
|
+
"output": "./src/components/icons",
|
|
9
|
+
|
|
10
|
+
"// Framework Configuration": "",
|
|
11
|
+
"framework": "react",
|
|
12
|
+
"typescript": true,
|
|
13
|
+
"componentType": "functional",
|
|
14
|
+
|
|
15
|
+
"// Processing Options": "",
|
|
16
|
+
"watch": false,
|
|
17
|
+
"parallel": true,
|
|
18
|
+
"batchSize": 10,
|
|
19
|
+
"maxConcurrency": 4,
|
|
20
|
+
"cache": true,
|
|
21
|
+
|
|
22
|
+
"// Default Properties": "",
|
|
23
|
+
"defaultWidth": 24,
|
|
24
|
+
"defaultHeight": 24,
|
|
25
|
+
"defaultFill": "currentColor",
|
|
26
|
+
"defaultStroke": "none",
|
|
27
|
+
"defaultStrokeWidth": 1,
|
|
28
|
+
|
|
29
|
+
"// Styling Configuration": "",
|
|
30
|
+
"styleRules": {
|
|
31
|
+
"fill": "inherit",
|
|
32
|
+
"stroke": "none",
|
|
33
|
+
"strokeWidth": "1",
|
|
34
|
+
"opacity": "1"
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
"// Responsive Design": "",
|
|
38
|
+
"responsive": {
|
|
39
|
+
"breakpoints": ["sm", "md", "lg", "xl"],
|
|
40
|
+
"values": {
|
|
41
|
+
"width": ["16px", "20px", "24px", "32px"],
|
|
42
|
+
"height": ["16px", "20px", "24px", "32px"]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
"// Theme Configuration": "",
|
|
47
|
+
"theme": {
|
|
48
|
+
"mode": "auto",
|
|
49
|
+
"variables": {
|
|
50
|
+
"primary": "currentColor",
|
|
51
|
+
"secondary": "#6b7280",
|
|
52
|
+
"accent": "#3b82f6",
|
|
53
|
+
"background": "#ffffff",
|
|
54
|
+
"foreground": "#000000"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
"// Animation Effects": "",
|
|
59
|
+
"animations": ["fadeIn", "slideIn", "bounce"],
|
|
60
|
+
|
|
61
|
+
"// Advanced Options": "",
|
|
62
|
+
"plugins": [
|
|
63
|
+
{
|
|
64
|
+
"name": "svg-optimizer",
|
|
65
|
+
"options": {
|
|
66
|
+
"removeComments": true,
|
|
67
|
+
"removeMetadata": true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"exclude": ["*.test.svg", "deprecated/**"],
|
|
72
|
+
"include": ["icons/**", "illustrations/**"],
|
|
73
|
+
|
|
74
|
+
"// Error Handling": "",
|
|
75
|
+
"errorHandling": {
|
|
76
|
+
"strategy": "continue",
|
|
77
|
+
"maxRetries": 3,
|
|
78
|
+
"timeout": 30000
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
"// Performance Settings": "",
|
|
82
|
+
"performance": {
|
|
83
|
+
"optimization": "balanced",
|
|
84
|
+
"memoryLimit": 512,
|
|
85
|
+
"cacheTimeout": 3600000
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
"// Output Customization": "",
|
|
89
|
+
"outputConfig": {
|
|
90
|
+
"naming": "pascal",
|
|
91
|
+
"extension": "tsx",
|
|
92
|
+
"directory": "./src/components/icons"
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
"// Framework-Specific Configurations": "",
|
|
96
|
+
"react": {
|
|
97
|
+
"componentType": "functional",
|
|
98
|
+
"forwardRef": true,
|
|
99
|
+
"memo": false,
|
|
100
|
+
"propsInterface": "SVGProps",
|
|
101
|
+
"styledComponents": false,
|
|
102
|
+
"cssModules": false
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
"vue": {
|
|
106
|
+
"api": "composition",
|
|
107
|
+
"setup": true,
|
|
108
|
+
"typescript": true,
|
|
109
|
+
"scoped": true,
|
|
110
|
+
"cssVariables": true
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
"angular": {
|
|
114
|
+
"standalone": true,
|
|
115
|
+
"signals": true,
|
|
116
|
+
"changeDetection": "OnPush",
|
|
117
|
+
"encapsulation": "Emulated"
|
|
118
|
+
}
|
|
119
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,156 +1,144 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## [
|
|
9
|
-
|
|
10
|
-
###
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
###
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
Please see the [releases page](https://github.com/faezemohades/svger-cli/releases) for information about 1.x versions.
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
|
|
149
|
-
## Legend
|
|
150
|
-
|
|
151
|
-
- **Added** for new features
|
|
152
|
-
- **Changed** for changes in existing functionality
|
|
153
|
-
- **Deprecated** for soon-to-be removed features
|
|
154
|
-
- **Removed** for now removed features
|
|
155
|
-
- **Fixed** for any bug fixes
|
|
156
|
-
- **Security** for vulnerability fixes
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
|
|
6
|
+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [2.0.7] - 2025-11-20
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Version bump for npm publishing (2.0.6 was already published)
|
|
13
|
+
|
|
14
|
+
## [2.0.6] - 2025-11-20
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **🎉 React Native Support**: Full support for React Native with `react-native-svg`
|
|
19
|
+
- Automatic conversion of SVG elements to React Native SVG components
|
|
20
|
+
- Support for Path, Circle, Rect, Line, Polygon, Polyline, Ellipse, G, Defs, ClipPath, and
|
|
21
|
+
gradient components
|
|
22
|
+
- Proper prop conversion (strokeWidth, strokeLinecap, fillRule, etc.)
|
|
23
|
+
- TypeScript interfaces with SvgProps
|
|
24
|
+
- Size and color prop support
|
|
25
|
+
- ForwardRef implementation for React Native components
|
|
26
|
+
- Enhanced test suite with React Native validation
|
|
27
|
+
- Comprehensive React Native documentation
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Updated framework count from 8 to 9 supported frameworks
|
|
32
|
+
- Enhanced framework template engine to handle React Native SVG transformations
|
|
33
|
+
- Improved package description to include React Native
|
|
34
|
+
- Updated all documentation to reflect React Native support
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Framework type definitions to include 'react-native'
|
|
39
|
+
- File extension handling for React Native (.tsx)
|
|
40
|
+
- Test validation for react-native-svg imports
|
|
41
|
+
|
|
42
|
+
## [2.0.5] - 2025-11-11
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- **🔧 CRITICAL FIX: PascalCase Component Naming**: Fixed issue where files like
|
|
47
|
+
"ArrowBendDownLeft.svg" were incorrectly converted to "Arrowbenddownleft.tsx" instead of
|
|
48
|
+
preserving the correct "ArrowBendDownLeft.tsx" format
|
|
49
|
+
- Enhanced regex pattern in toPascalCase() to properly detect existing PascalCase names
|
|
50
|
+
- All existing PascalCase filenames now preserved correctly during component generation
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- Updated README.md to v2.0.5 with critical fix details
|
|
55
|
+
- Updated all installation commands to new version
|
|
56
|
+
|
|
57
|
+
## [2.0.4] - 2025-11-11
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- Complete 28-property configuration schema with React/Vue/Angular specific options
|
|
62
|
+
- Enhanced responsive design support with breakpoint configurations
|
|
63
|
+
- Comprehensive theme system with multiple design systems
|
|
64
|
+
- Advanced performance optimization settings
|
|
65
|
+
- Professional error handling and validation system
|
|
66
|
+
|
|
67
|
+
### Fixed
|
|
68
|
+
|
|
69
|
+
- TypeScript duplicate export errors in index generation
|
|
70
|
+
- Enhanced toPascalCase to preserve existing PascalCase names
|
|
71
|
+
- Simplified index.ts generation to prevent conflicts
|
|
72
|
+
- Improved configuration validation and error messages
|
|
73
|
+
|
|
74
|
+
### Documentation
|
|
75
|
+
|
|
76
|
+
- Updated README.md with comprehensive v2.0.4 feature documentation
|
|
77
|
+
- Added complete configuration schema documentation
|
|
78
|
+
- Enhanced comparison tables and installation instructions
|
|
79
|
+
- Included recent fixes section with technical details
|
|
80
|
+
|
|
81
|
+
## [2.0.3] - 2024-11-11
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- Enhanced package.json with comprehensive metadata
|
|
86
|
+
- Professional development tooling configuration
|
|
87
|
+
- Extended TypeScript support and type definitions
|
|
88
|
+
- Additional CLI aliases (`svger` shorthand)
|
|
89
|
+
- Comprehensive export map for better module resolution
|
|
90
|
+
- Development scripts for testing, linting, and formatting
|
|
91
|
+
- Documentation generation scripts
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- Improved package description with full feature list
|
|
96
|
+
- Enhanced keywords for better discoverability
|
|
97
|
+
- Updated contributor information with roles
|
|
98
|
+
- Expanded file inclusion patterns
|
|
99
|
+
- More comprehensive engine requirements
|
|
100
|
+
|
|
101
|
+
### Fixed
|
|
102
|
+
|
|
103
|
+
- Package metadata completeness
|
|
104
|
+
- Export definitions for better tree-shaking
|
|
105
|
+
- Module resolution issues
|
|
106
|
+
|
|
107
|
+
## [2.0.2] - 2024-11-01
|
|
108
|
+
|
|
109
|
+
### Added
|
|
110
|
+
|
|
111
|
+
- Multi-framework support (React, Vue, Angular, Svelte, Solid, Lit, Preact, Vanilla)
|
|
112
|
+
- Auto-generated index.ts exports
|
|
113
|
+
- Responsive design system
|
|
114
|
+
- Theme support (light/dark/auto)
|
|
115
|
+
- File locking mechanism
|
|
116
|
+
- Performance optimization engine
|
|
117
|
+
|
|
118
|
+
### Changed
|
|
119
|
+
|
|
120
|
+
- Complete rewrite for enterprise-grade performance
|
|
121
|
+
- Zero-dependency architecture
|
|
122
|
+
- 85% performance improvement over SVGR
|
|
123
|
+
- TypeScript-first approach
|
|
124
|
+
|
|
125
|
+
### Removed
|
|
126
|
+
|
|
127
|
+
- Legacy dependencies
|
|
128
|
+
- Single-framework limitation
|
|
129
|
+
|
|
130
|
+
## [1.x.x] - Legacy Versions
|
|
131
|
+
|
|
132
|
+
Please see the [releases page](https://github.com/faezemohades/svger-cli/releases) for information
|
|
133
|
+
about 1.x versions.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Legend
|
|
138
|
+
|
|
139
|
+
- **Added** for new features
|
|
140
|
+
- **Changed** for changes in existing functionality
|
|
141
|
+
- **Deprecated** for soon-to-be removed features
|
|
142
|
+
- **Removed** for now removed features
|
|
143
|
+
- **Fixed** for any bug fixes
|
|
144
|
+
- **Security** for vulnerability fixes
|