svgfusion-cmd 1.6.1 → 1.6.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/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/main.js +1 -1
- package/dist/main.mjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -628,7 +628,7 @@ ${L}
|
|
|
628
628
|
${T}
|
|
629
629
|
</svg>
|
|
630
630
|
);
|
|
631
|
-
};`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),
|
|
631
|
+
};`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(t.push(`ForwardRef.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default ForwardRef;"),this.reactOptions.namedExport&&t.push(`export { ForwardRef as ${e} };`))):this.reactOptions.memo?(t.push(`const Memo = memo(${e});`),t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(t.push(`${e}.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push(`export default ${e};`),this.reactOptions.namedExport&&t.push(`export { ${e} };`)),t.join(`
|
|
632
632
|
`)}getDependencies(){let e=["react"];return this.reactOptions.propTypes&&e.push("prop-types"),e}generateSvgAttributes(e){let t=[],r={...e.root.attributes||{},...e.viewBox&&{viewBox:e.viewBox},...e.namespace&&{xmlns:e.namespace},...e.width&&{width:e.width},...e.height&&{height:e.height}},i=r.viewBox;return Object.entries(r).forEach(([a,o])=>{if(o!=null){if(i&&(a==="width"||a==="height")||a==="class"||a==="className")return;let u=cZ(a);if(u==="aria-labelledby"&&typeof o=="string"&&o.includes("{")){let c=o.replace(/\{(\w+)\}/g,"${$1}");t.push(`aria-labelledby={\`${c}\`}`);}else t.push(`${u}="${o}"`);}}),t.length>0?t.join(`
|
|
633
633
|
`)+`
|
|
634
634
|
`:""}elementToJsx(e,t=0){let r=" ".repeat(t+1),{tag:i,attributes:a,children:o,content:u}=e,c=this.attributesToJsxWithClasses(a),l=c.length>0?" "+c.join(" "):"";if(o.length===0&&!u)return `${r}<${i}${l} />`;let h=`${r}<${i}${l}>`;return u&&(h+=u),o.length>0&&(h+=`
|
package/dist/index.mjs
CHANGED
|
@@ -628,7 +628,7 @@ ${L}
|
|
|
628
628
|
${T}
|
|
629
629
|
</svg>
|
|
630
630
|
);
|
|
631
|
-
};`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),
|
|
631
|
+
};`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(t.push(`ForwardRef.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default ForwardRef;"),this.reactOptions.namedExport&&t.push(`export { ForwardRef as ${e} };`))):this.reactOptions.memo?(t.push(`const Memo = memo(${e});`),t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(t.push(`${e}.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push(`export default ${e};`),this.reactOptions.namedExport&&t.push(`export { ${e} };`)),t.join(`
|
|
632
632
|
`)}getDependencies(){let e=["react"];return this.reactOptions.propTypes&&e.push("prop-types"),e}generateSvgAttributes(e){let t=[],r={...e.root.attributes||{},...e.viewBox&&{viewBox:e.viewBox},...e.namespace&&{xmlns:e.namespace},...e.width&&{width:e.width},...e.height&&{height:e.height}},i=r.viewBox;return Object.entries(r).forEach(([a,o])=>{if(o!=null){if(i&&(a==="width"||a==="height")||a==="class"||a==="className")return;let u=pZ(a);if(u==="aria-labelledby"&&typeof o=="string"&&o.includes("{")){let c=o.replace(/\{(\w+)\}/g,"${$1}");t.push(`aria-labelledby={\`${c}\`}`);}else t.push(`${u}="${o}"`);}}),t.length>0?t.join(`
|
|
633
633
|
`)+`
|
|
634
634
|
`:""}elementToJsx(e,t=0){let r=" ".repeat(t+1),{tag:i,attributes:a,children:o,content:u}=e,c=this.attributesToJsxWithClasses(a),l=c.length>0?" "+c.join(" "):"";if(o.length===0&&!u)return `${r}<${i}${l} />`;let h=`${r}<${i}${l}>`;return u&&(h+=u),o.length>0&&(h+=`
|
package/dist/main.js
CHANGED
|
@@ -628,7 +628,7 @@ ${L}
|
|
|
628
628
|
${T}
|
|
629
629
|
</svg>
|
|
630
630
|
);
|
|
631
|
-
};`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),
|
|
631
|
+
};`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(t.push(`ForwardRef.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default ForwardRef;"),this.reactOptions.namedExport&&t.push(`export { ForwardRef as ${e} };`))):this.reactOptions.memo?(t.push(`const Memo = memo(${e});`),t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(t.push(`${e}.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push(`export default ${e};`),this.reactOptions.namedExport&&t.push(`export { ${e} };`)),t.join(`
|
|
632
632
|
`)}getDependencies(){let e=["react"];return this.reactOptions.propTypes&&e.push("prop-types"),e}generateSvgAttributes(e){let t=[],r={...e.root.attributes||{},...e.viewBox&&{viewBox:e.viewBox},...e.namespace&&{xmlns:e.namespace},...e.width&&{width:e.width},...e.height&&{height:e.height}},i=r.viewBox;return Object.entries(r).forEach(([a,o])=>{if(o!=null){if(i&&(a==="width"||a==="height")||a==="class"||a==="className")return;let u=cZ(a);if(u==="aria-labelledby"&&typeof o=="string"&&o.includes("{")){let c=o.replace(/\{(\w+)\}/g,"${$1}");t.push(`aria-labelledby={\`${c}\`}`);}else t.push(`${u}="${o}"`);}}),t.length>0?t.join(`
|
|
633
633
|
`)+`
|
|
634
634
|
`:""}elementToJsx(e,t=0){let r=" ".repeat(t+1),{tag:i,attributes:a,children:o,content:u}=e,c=this.attributesToJsxWithClasses(a),l=c.length>0?" "+c.join(" "):"";if(o.length===0&&!u)return `${r}<${i}${l} />`;let h=`${r}<${i}${l}>`;return u&&(h+=u),o.length>0&&(h+=`
|
package/dist/main.mjs
CHANGED
|
@@ -628,7 +628,7 @@ ${L}
|
|
|
628
628
|
${T}
|
|
629
629
|
</svg>
|
|
630
630
|
);
|
|
631
|
-
};`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),
|
|
631
|
+
};`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(t.push(`ForwardRef.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default ForwardRef;"),this.reactOptions.namedExport&&t.push(`export { ForwardRef as ${e} };`))):this.reactOptions.memo?(t.push(`const Memo = memo(${e});`),t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(t.push(`${e}.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push(`export default ${e};`),this.reactOptions.namedExport&&t.push(`export { ${e} };`)),t.join(`
|
|
632
632
|
`)}getDependencies(){let e=["react"];return this.reactOptions.propTypes&&e.push("prop-types"),e}generateSvgAttributes(e){let t=[],r={...e.root.attributes||{},...e.viewBox&&{viewBox:e.viewBox},...e.namespace&&{xmlns:e.namespace},...e.width&&{width:e.width},...e.height&&{height:e.height}},i=r.viewBox;return Object.entries(r).forEach(([a,o])=>{if(o!=null){if(i&&(a==="width"||a==="height")||a==="class"||a==="className")return;let u=pZ(a);if(u==="aria-labelledby"&&typeof o=="string"&&o.includes("{")){let c=o.replace(/\{(\w+)\}/g,"${$1}");t.push(`aria-labelledby={\`${c}\`}`);}else t.push(`${u}="${o}"`);}}),t.length>0?t.join(`
|
|
633
633
|
`)+`
|
|
634
634
|
`:""}elementToJsx(e,t=0){let r=" ".repeat(t+1),{tag:i,attributes:a,children:o,content:u}=e,c=this.attributesToJsxWithClasses(a),l=c.length>0?" "+c.join(" "):"";if(o.length===0&&!u)return `${r}<${i}${l} />`;let h=`${r}<${i}${l}>`;return u&&(h+=u),o.length>0&&(h+=`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svgfusion-cmd",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Command-line interface for converting SVG files into React and Vue 3 components with TypeScript support and batch processing capabilities.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"commander": "^11.1.0",
|
|
61
61
|
"figlet": "^1.7.0",
|
|
62
62
|
"svgfusion-core": "1.6.0",
|
|
63
|
-
"svgfusion-react": "1.5.
|
|
63
|
+
"svgfusion-react": "1.5.2",
|
|
64
64
|
"svgfusion-utils": "1.4.0",
|
|
65
65
|
"svgfusion-vue": "1.5.0"
|
|
66
66
|
},
|