svgfusion 1.37.1 → 1.37.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.cjs CHANGED
@@ -676,7 +676,7 @@ ${L}
676
676
  ${F}
677
677
  </svg>
678
678
  );
679
- };`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),this.reactOptions.namedExport&&t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(this.reactOptions.namedExport&&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});`),this.reactOptions.namedExport&&t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(this.reactOptions.namedExport&&t.push(`${e}.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push(`export default ${e};`),this.reactOptions.namedExport&&t.push(`export { ${e} };`)),t.join(`
679
+ };`}}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(`
680
680
  `)}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=LM(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(`
681
681
  `)+`
682
682
  `:""}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.js CHANGED
@@ -676,7 +676,7 @@ ${L}
676
676
  ${F}
677
677
  </svg>
678
678
  );
679
- };`}}generateExports(e){let t=[];return this.reactOptions.forwardRef?(t.push(`const ForwardRef = forwardRef(${e});`),this.reactOptions.memo?(t.push("const Memo = memo(ForwardRef);"),this.reactOptions.namedExport&&t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(this.reactOptions.namedExport&&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});`),this.reactOptions.namedExport&&t.push(`Memo.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push("export default Memo;"),this.reactOptions.namedExport&&t.push(`export { Memo as ${e} };`)):(this.reactOptions.namedExport&&t.push(`${e}.displayName = '${e}';`),this.reactOptions.exportDefault&&t.push(`export default ${e};`),this.reactOptions.namedExport&&t.push(`export { ${e} };`)),t.join(`
679
+ };`}}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(`
680
680
  `)}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=MM(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(`
681
681
  `)+`
682
682
  `:""}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",
3
- "version": "1.37.1",
3
+ "version": "1.37.2",
4
4
  "description": "Convert SVG files into blazing-fast React and Vue 3 components with automatic color extraction, full TypeScript support, and seamless integration into any modern workflow.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -85,7 +85,7 @@
85
85
  "svgfusion-cmd": "1.6.0",
86
86
  "svgfusion-core": "1.6.0",
87
87
  "svgfusion-dom": "1.6.0",
88
- "svgfusion-react": "1.5.1",
88
+ "svgfusion-react": "1.5.2",
89
89
  "svgfusion-utils": "1.4.0",
90
90
  "svgfusion-vue": "1.5.0",
91
91
  "zod": "^4.0.5"