interface AstroComponentParams { svgContent: string; } export function getAstroCode({ svgContent }: AstroComponentParams): string { const cleanedSvg = svgContent .replace(/\s*(width|height)="[^"]*"/gi, '') .replace(/\s*(width|height)='[^']*'/gi, '') .replace(/\s*(width|height)=\{[^}]*\}/gi, '') .replace(/]*)>/i, (match, attrs) => { const cleanedAttrs = attrs.replace(/\s*\{?\.\.\.Astro\.props\}?\s*/i, ''); return ``; }); return cleanedSvg.trim(); }