Optimize existing functionality to allow direct conversion of existing components into Figma-compliant component-based design source files via screenshots. The current application implements basic functionality, but the output has two main problems: 1) the generated SVG format files do not retain component structure; 2) the official Figma API does not seem to support direct component creation. Please improve the solution to achieve true component-based output while maintaining the existing category layer functionality.


