{"_id":"@autobg/babel.macro","_rev":"8-940c8b9c3ad0ab2139c679ae36569a4e","name":"@autobg/babel.macro","dist-tags":{"latest":"1.5.0"},"versions":{"0.0.1":{"name":"@autobg/babel.macro","version":"0.0.1","keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"author":{"url":"https://github.com/pzehrel","name":"pzehrel","email":"pzehrel@gmail.com"},"license":"MIT","_id":"@autobg/babel.macro@0.0.1","maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"dist":{"shasum":"44ba6980c82c201068c7502320d5f6477ba75adf","tarball":"https://registry.npmjs.org/@autobg/babel.macro/-/babel.macro-0.0.1.tgz","fileCount":7,"integrity":"sha512-Pb6yHRh1TYURbwPj6BO+yAw7ozlL6wDrvVqWgkINW2bxY3CL+vDlTNOqv8Xyaz1Kjw/xDpDVrGTnukcPlqGjJw==","signatures":[{"sig":"MEQCIB7ItACZwf/uIIRn9pFFrok2Vr+BG8rSQBltSlKhH324AiB2/TWARS7dM9XPHm9J3ImBKH4oouXZfj5rPkXVC1GuZw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@autobg%2fbabel.macro@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":14677},"main":"dist/index.cjs","type":"module","_from":"file:autobg-babel.macro-0.0.1.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","require":"dist/index.cjs","scripts":{"build":"unbuild"},"_npmUser":{"name":"pzehrel","email":"pzehrel@gmail.com"},"_resolved":"/tmp/7f51b5fc2bfdf6967ab72e73d2b3be29/autobg-babel.macro-0.0.1.tgz","_integrity":"sha512-Pb6yHRh1TYURbwPj6BO+yAw7ozlL6wDrvVqWgkINW2bxY3CL+vDlTNOqv8Xyaz1Kjw/xDpDVrGTnukcPlqGjJw==","repository":{"url":"git+https://github.com/pzehrel/autobg.git","type":"git","directory":"packages/babel-macro"},"_npmVersion":"10.9.2","description":"Set the width and height of elements based on the background image","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","babel-plugin-macros":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/babel__core":"^7.20.5","@types/babel-plugin-macros":"^3.1.3"},"peerDependencies":{"image-size":"^2.0.1","babel-plugin-macros":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/babel.macro_0.0.1_1743088710647_0.4018410634791665","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@autobg/babel.macro","version":"1.0.0","keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"author":{"url":"https://github.com/pzehrel","name":"pzehrel","email":"pzehrel@gmail.com"},"license":"MIT","_id":"@autobg/babel.macro@1.0.0","maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"dist":{"shasum":"518a96469044315fc16a4e1d710f58bab73e94ae","tarball":"https://registry.npmjs.org/@autobg/babel.macro/-/babel.macro-1.0.0.tgz","fileCount":9,"integrity":"sha512-KVURbegRwkqSVDNDdJn0wzZuMYqYuhYkuYOd8Yg+rbSa/ToaEHXyQ/4HvfiubAIaTDIdgKy7QscJjPMjWrHdpQ==","signatures":[{"sig":"MEQCIBbTVAiJ6p+xYlfSSS8gwr+CS8ytb3tt2D2neU56CgGmAiB6n0XaqtNAvdj61N+8cabYSgjo/3UGLsttz6NNjS5uEQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@autobg%2fbabel.macro@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20534},"main":"dist/index.cjs","type":"module","_from":"file:autobg-babel.macro-1.0.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","require":"dist/index.cjs","scripts":{"stub":"unbuild --stub","build":"unbuild"},"_npmUser":{"name":"pzehrel","email":"pzehrel@gmail.com"},"_resolved":"/tmp/db930be3f361f6fb17383f1ddb0ce85d/autobg-babel.macro-1.0.0.tgz","_integrity":"sha512-KVURbegRwkqSVDNDdJn0wzZuMYqYuhYkuYOd8Yg+rbSa/ToaEHXyQ/4HvfiubAIaTDIdgKy7QscJjPMjWrHdpQ==","repository":{"url":"git+https://github.com/pzehrel/autobg.git","type":"git","directory":"packages/babel-macro"},"_npmVersion":"10.9.2","description":"Set the width and height of elements based on the background image","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","babel-plugin-macros":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/babel__core":"^7.20.5","@types/babel-plugin-macros":"^3.1.3"},"peerDependencies":{"image-size":"^2.0.1","babel-plugin-macros":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/babel.macro_1.0.0_1743142517916_0.13504993873994886","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@autobg/babel.macro","version":"1.0.1","keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"author":{"url":"https://github.com/pzehrel","name":"pzehrel","email":"pzehrel@gmail.com"},"license":"MIT","_id":"@autobg/babel.macro@1.0.1","maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"dist":{"shasum":"f05ade84c2f4aa2a86417f68d6c3754ca5ca856f","tarball":"https://registry.npmjs.org/@autobg/babel.macro/-/babel.macro-1.0.1.tgz","fileCount":9,"integrity":"sha512-V9xZqr7yHWQBxWfqLUW4wTwhgKFd6xH8C84PvF0iASOeGXbGnocrg7dWFkQYPuG5CcXvnM0tyaAN0DhzNHr4VQ==","signatures":[{"sig":"MEYCIQDF7qLL6t5k57KKDTLYJdlA+lzvkJjlFZYd2p6OXBs4LgIhAN5ork1LXCeKHw2aTW7m3atPTP2zv9tISptqu3oNbUOo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@autobg%2fbabel.macro@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20534},"main":"dist/index.cjs","type":"module","_from":"file:autobg-babel.macro-1.0.1.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","require":"dist/index.cjs","scripts":{"stub":"unbuild --stub","build":"unbuild"},"_npmUser":{"name":"pzehrel","email":"pzehrel@gmail.com"},"_resolved":"/tmp/be0386fc59471a8b796f4efb9c37865f/autobg-babel.macro-1.0.1.tgz","_integrity":"sha512-V9xZqr7yHWQBxWfqLUW4wTwhgKFd6xH8C84PvF0iASOeGXbGnocrg7dWFkQYPuG5CcXvnM0tyaAN0DhzNHr4VQ==","repository":{"url":"git+https://github.com/pzehrel/autobg.git","type":"git","directory":"packages/babel-macro"},"_npmVersion":"10.9.2","description":"Set the width and height of elements based on the background image","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","babel-plugin-macros":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/babel__core":"^7.20.5","@types/babel-plugin-macros":"^3.1.3"},"peerDependencies":{"image-size":"^2.0.1","babel-plugin-macros":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/babel.macro_1.0.1_1743152511509_0.6159278334932414","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@autobg/babel.macro","version":"1.1.0","keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"author":{"url":"https://github.com/pzehrel","name":"pzehrel","email":"pzehrel@gmail.com"},"license":"MIT","_id":"@autobg/babel.macro@1.1.0","maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"dist":{"shasum":"f57e8c24485ed4b7d756a69c32a0a4e5e04ac10c","tarball":"https://registry.npmjs.org/@autobg/babel.macro/-/babel.macro-1.1.0.tgz","fileCount":9,"integrity":"sha512-M8jzS7TwHeuauTIISECYvW0cS0AkglWlKouRovZbRr2wnJ5TrPf9Mt6LulNQKZoYtBmxCm7fbRF8YiuNv9ESOQ==","signatures":[{"sig":"MEYCIQDaQqZZ9+utFEw/S54Cx8ZhSxfuvLbjOXga6lfjBYMVUAIhAKVb44p9S4bL94J9+uCUT3+u1t3LPV8v+rxG7jrqERRq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@autobg%2fbabel.macro@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20376},"main":"dist/index.cjs","type":"module","_from":"file:autobg-babel.macro-1.1.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","require":"dist/index.cjs","scripts":{"stub":"unbuild --stub","build":"unbuild"},"_npmUser":{"name":"pzehrel","email":"pzehrel@gmail.com"},"_resolved":"/tmp/2cbf93f3f124c58ef81927a002bb4f39/autobg-babel.macro-1.1.0.tgz","_integrity":"sha512-M8jzS7TwHeuauTIISECYvW0cS0AkglWlKouRovZbRr2wnJ5TrPf9Mt6LulNQKZoYtBmxCm7fbRF8YiuNv9ESOQ==","repository":{"url":"git+https://github.com/pzehrel/autobg.git","type":"git","directory":"packages/babel-macro"},"_npmVersion":"10.9.2","description":"Set the width and height of elements based on the background image","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","babel-plugin-macros":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/babel__core":"^7.20.5","@types/babel-plugin-macros":"^3.1.3"},"peerDependencies":{"image-size":"^2.0.1","babel-plugin-macros":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/babel.macro_1.1.0_1743487814590_0.7593593185284353","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@autobg/babel.macro","version":"1.2.0","keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"author":{"url":"https://github.com/pzehrel","name":"pzehrel","email":"pzehrel@gmail.com"},"license":"MIT","_id":"@autobg/babel.macro@1.2.0","maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"dist":{"shasum":"4c6990ba0205a75c4a43b33dc202279e3a717216","tarball":"https://registry.npmjs.org/@autobg/babel.macro/-/babel.macro-1.2.0.tgz","fileCount":9,"integrity":"sha512-q8lsaxSWy2ajJSp4MIrIJ7s4QDyX4yDRLhON4g0HFcElowb5jQtyuc/lVdkrTPsWty15HBe5yAhYao21MXklOw==","signatures":[{"sig":"MEYCIQDGsglzM37/ISgHr7yXH3MuFh8HymNBhjW6xoPCKb8ZZAIhANLODJSFUD4e3e9BSDyynDHlBHksDLsTbc7JC6BHqUxs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@autobg%2fbabel.macro@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":22626},"main":"dist/index.cjs","type":"module","_from":"file:autobg-babel.macro-1.2.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"require":"dist/index.cjs","scripts":{"stub":"unbuild --stub","build":"unbuild"},"_npmUser":{"name":"pzehrel","email":"pzehrel@gmail.com"},"_resolved":"/tmp/6b2d800ba0f1f3f4d3e77642264fc295/autobg-babel.macro-1.2.0.tgz","_integrity":"sha512-q8lsaxSWy2ajJSp4MIrIJ7s4QDyX4yDRLhON4g0HFcElowb5jQtyuc/lVdkrTPsWty15HBe5yAhYao21MXklOw==","repository":{"url":"git+https://github.com/pzehrel/autobg.git","type":"git","directory":"packages/babel-macro"},"_npmVersion":"10.9.2","description":"Set the width and height of elements based on the background image","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","@types/babel__core":"^7.20.5","babel-plugin-macros":"^3.1.0","@types/babel-plugin-macros":"^3.1.3"},"peerDependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","babel-plugin-macros":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/babel.macro_1.2.0_1744033985724_0.7196334688036887","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@autobg/babel.macro","version":"1.3.0","keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"author":{"url":"https://github.com/pzehrel","name":"pzehrel","email":"pzehrel@gmail.com"},"license":"MIT","_id":"@autobg/babel.macro@1.3.0","maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"dist":{"shasum":"e185371e019e3fd24f414af198d77631d2931321","tarball":"https://registry.npmjs.org/@autobg/babel.macro/-/babel.macro-1.3.0.tgz","fileCount":9,"integrity":"sha512-eiuIO0mfLNPVwPF+/DhmsWoiPC8Bkm0SgVMdFcFoI4vUmpGjDBrkg0bAd5Os5heHbujPQuVjHAIkviZxNg2FWg==","signatures":[{"sig":"MEUCIDtQkZGAf1pIAdMF9WZTOvyAo9vXvq52d9oqPmA9jZhbAiEAxtf10KA3cHUblRnQSgcZDjOQqOHNxD7NzQuTOj2uN4w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@autobg%2fbabel.macro@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":22626},"main":"dist/index.cjs","type":"module","_from":"file:autobg-babel.macro-1.3.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"require":"dist/index.cjs","scripts":{"stub":"unbuild --stub","build":"unbuild"},"_npmUser":{"name":"pzehrel","email":"pzehrel@gmail.com"},"_resolved":"/tmp/0a2a40620e965942c899752fc43034ab/autobg-babel.macro-1.3.0.tgz","_integrity":"sha512-eiuIO0mfLNPVwPF+/DhmsWoiPC8Bkm0SgVMdFcFoI4vUmpGjDBrkg0bAd5Os5heHbujPQuVjHAIkviZxNg2FWg==","repository":{"url":"git+https://github.com/pzehrel/autobg.git","type":"git","directory":"packages/babel-macro"},"_npmVersion":"10.9.2","description":"Set the width and height of elements based on the background image","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","@types/babel__core":"^7.20.5","babel-plugin-macros":"^3.1.0","@types/babel-plugin-macros":"^3.1.3"},"peerDependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","babel-plugin-macros":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/babel.macro_1.3.0_1744443561284_0.3164243443406407","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@autobg/babel.macro","version":"1.4.0","keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"author":{"url":"https://github.com/pzehrel","name":"pzehrel","email":"pzehrel@gmail.com"},"license":"MIT","_id":"@autobg/babel.macro@1.4.0","maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"dist":{"shasum":"d1d180fd1e8090680ccf0ed37a2523fa9870077d","tarball":"https://registry.npmjs.org/@autobg/babel.macro/-/babel.macro-1.4.0.tgz","fileCount":9,"integrity":"sha512-OLY7+beXQjdkJ3U2afGbBFUaWWsVTHtERkuD5k/y0Owg/5Wq5a8RTKbbAby9+RYlyPPMKIK62kZYJHBwq9Jqmg==","signatures":[{"sig":"MEUCIBwg0nEB/2VcfF5jZmzfKF3b7n1+cE+9OMR6XNw0GwkJAiEAmZmsPVQRKhj/tSzfr/zI+xkfuLx19F0ftxgRrXgFNRA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@autobg%2fbabel.macro@1.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31165},"main":"dist/index.cjs","type":"module","_from":"file:autobg-babel.macro-1.4.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"require":"dist/index.cjs","scripts":{"stub":"unbuild --stub","build":"unbuild"},"_npmUser":{"name":"pzehrel","email":"pzehrel@gmail.com"},"_resolved":"/tmp/abafcedfaf9facb3aec48699d8a2e900/autobg-babel.macro-1.4.0.tgz","_integrity":"sha512-OLY7+beXQjdkJ3U2afGbBFUaWWsVTHtERkuD5k/y0Owg/5Wq5a8RTKbbAby9+RYlyPPMKIK62kZYJHBwq9Jqmg==","repository":{"url":"git+https://github.com/pzehrel/autobg.git","type":"git","directory":"packages/babel-macro"},"_npmVersion":"10.9.2","description":"Set the width and height of elements based on the background image","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","@types/babel__core":"^7.20.5","babel-plugin-macros":"^3.1.0","@types/babel-plugin-macros":"^3.1.3"},"peerDependencies":{"image-size":"^2.0.1","@babel/core":"^7.26.10","@babel/types":"^7.27.0","babel-plugin-macros":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/babel.macro_1.4.0_1744525358403_0.4187225836753494","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@autobg/babel.macro","type":"module","version":"1.5.0","description":"Set the width and height of elements based on the background image","author":{"name":"pzehrel","email":"pzehrel@gmail.com","url":"https://github.com/pzehrel"},"license":"MIT","homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","repository":{"type":"git","url":"git+https://github.com/pzehrel/autobg.git","directory":"packages/babel-macro"},"bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","require":"dist/index.cjs","types":"dist/index.d.ts","peerDependencies":{"@babel/core":"^7.26.10","@babel/types":"^7.27.0","babel-plugin-macros":"^3.1.0","image-size":"^2.0.1"},"dependencies":{},"devDependencies":{"@babel/core":"^7.26.10","@babel/types":"^7.27.0","@types/babel-plugin-macros":"^3.1.3","@types/babel__core":"^7.20.5","babel-plugin-macros":"^3.1.0","image-size":"^2.0.1"},"scripts":{"build":"unbuild","stub":"unbuild --stub"},"_id":"@autobg/babel.macro@1.5.0","_integrity":"sha512-xgDjGtBOZGSXLyUMXlv6tW5wZiKOkTcvCrXeexgrjhszkHD1/v9jaWvYiJCrjvlDrCzAU3aDkmVx+gY/CF84Xw==","_resolved":"/tmp/0c62690bbf3cf571c7ffd1cfa248cb01/autobg-babel.macro-1.5.0.tgz","_from":"file:autobg-babel.macro-1.5.0.tgz","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-xgDjGtBOZGSXLyUMXlv6tW5wZiKOkTcvCrXeexgrjhszkHD1/v9jaWvYiJCrjvlDrCzAU3aDkmVx+gY/CF84Xw==","shasum":"96581ac35748d999b8aac85f09180469a282dadf","tarball":"https://registry.npmjs.org/@autobg/babel.macro/-/babel.macro-1.5.0.tgz","fileCount":9,"unpackedSize":48479,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@autobg%2fbabel.macro@1.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGU9U4APJhxJjcAGBdyaA19EOBHvy9eRZDQ49BmoWrTuAiEAlizsT60HEoAIS4jLppWAIWCC9XMGZBTW8rxzNEyaGhE="}]},"_npmUser":{"name":"pzehrel","email":"pzehrel@gmail.com"},"directories":{},"maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/babel.macro_1.5.0_1744967941452_0.6720888993496301"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-27T15:18:30.567Z","modified":"2025-04-18T09:19:02.077Z","0.0.1":"2025-03-27T15:18:30.819Z","1.0.0":"2025-03-28T06:15:18.186Z","1.0.1":"2025-03-28T09:01:51.772Z","1.1.0":"2025-04-01T06:10:14.785Z","1.2.0":"2025-04-07T13:53:05.896Z","1.3.0":"2025-04-12T07:39:21.443Z","1.4.0":"2025-04-13T06:22:38.605Z","1.5.0":"2025-04-18T09:19:01.661Z"},"bugs":{"url":"https://github.com/pzehrel/autobg/issues"},"author":{"name":"pzehrel","email":"pzehrel@gmail.com","url":"https://github.com/pzehrel"},"license":"MIT","homepage":"https://github.com/pzehrel/autobg/tree/main/packages/babel-macro","keywords":["autobg","babel","macro","background","image","autobg.macro","autobg-macro","babel macros","macros","babel-plugin-macros","styled-components"],"repository":{"type":"git","url":"git+https://github.com/pzehrel/autobg.git","directory":"packages/babel-macro"},"description":"Set the width and height of elements based on the background image","maintainers":[{"name":"pzehrel","email":"pzehrel@gmail.com"}],"readme":"# 🎨 @autobg/babel.macro\n\n[![npm version](https://img.shields.io/npm/v/@autobg/babel.macro.svg?style=flat)](https://www.npmjs.com/package/@autobg/babel.macro)\n[![npm downloads](https://img.shields.io/npm/dm/@autobg/babel.macro.svg?style=flat)](https://www.npmjs.com/package/@autobg/babel.macro)\n\n基于 [babel-plugin-macros](https://github.com/kentcdodds/babel-plugin-macros) 的宏工具，专为 [styled-components](https://styled-components.com/) 设计。通过简单的本地图片路径，自动获取图片尺寸并设置相应的 CSS 样式。\n\n## ✨ 核心特性\n\n- 🚀 支持 Vite 和 Webpack 构建工具\n- 🔄 识别图片尺寸并自动应用\n- 📍 灵活支持相对路径和路径别名\n- 📐 支持多种灵活的缩放模式\n- 🎨 提供常规和 aspect-ratio 两种模式\n- 📏 支持单位转换（px、rem、vw）\n\n## 📦 安装\n\n```bash\npnpm add @autobg/babel-macro babel-plugin-macros styled-components\n```\n\n## ⚙️ 配置\n\n### Vite 配置\n\n```ts\n// vite.config.ts\nimport { resolve } from 'node:path'\nimport react from '@vitejs/plugin-react'\nimport { defineConfig } from 'vite'\n\nexport default defineConfig({\n  plugins: [\n    react({\n      include: /\\.(jsx|tsx)$/,\n      babel: {\n        plugins: [\n          'babel-plugin-macros',\n          'styled-components',\n        ],\n        babelrc: false,\n        configFile: false,\n      },\n    }),\n  ],\n  resolve: {\n    alias: {\n      '@': resolve(__dirname, 'src'),\n    },\n  },\n})\n```\n\n### Webpack 配置\n\n```ts\n// craco.config.ts\nimport type { CracoConfig } from '@craco/types'\nimport { resolve } from 'node:path'\nimport { defineAutobgMacro } from '@autobg/babel.macro'\n\nexport default {\n  webpack: {\n    alias: {\n      '@': resolve(__dirname, 'src'),\n    },\n  },\n  babel: {\n    plugins: [\n      // 你也可以用 .babel-plugin-macrosrc.js\n      ['babel-plugin-macros', {\n        autobg: defineAutobgMacro({\n          unit: 'px',\n        }),\n      }],\n      ['babel-plugin-styled-components', { displayName: true }],\n    ],\n  },\n} satisfies CracoConfig\n```\n\n> **注意**：以上 Webpack 配置示例使用 craco，但同样适用于其他 Webpack 配置，只要确保正确配置了 babel 插件即可。\n\n## 🎯 使用指南\n\n### 基础用法\n\n```tsx\nimport autobg from '@autobg/babel.macro'\nimport { styled } from 'styled-components'\n\nconst Foo = styled.div`\n  /* 基本用法 - 自动设置背景图和尺寸 */\n  ${autobg('@/assets/foo.png')}\n`\n```\n\n### 等比缩放\n\n#### 固定宽度或高度\n\n```tsx\nimport autobg from '@autobg/babel.macro'\nimport { styled } from 'styled-components'\n\nconst Foo = styled.div`\n  /* 固定宽度，高度按比例自动计算 */\n  ${autobg('@/assets/foo.png', 'w', 100)}\n  ${autobg('@/assets/foo.png', 'width', 100)}\n\n  /* 固定高度，宽度按比例自动计算 */\n  ${autobg('@/assets/foo.png', 'h', 100)}\n  ${autobg('@/assets/foo.png', 'height', 100)}\n`\n```\n\n#### 整体缩放比例\n\n```tsx\nimport autobg from '@autobg/babel.macro'\nimport { styled } from 'styled-components'\n\nconst Foo = styled.div`\n  /* 数值形式（0.75倍缩放） */\n  ${autobg('@/assets/foo.png', 0.75)}\n  ${autobg('@/assets/foo.png', 's', 0.75)}\n  ${autobg('@/assets/foo.png', 'scale', 0.75)}\n\n  /* 百分比形式（缩放至75%） */\n  ${autobg('@/assets/foo.png', '75%')}\n  ${autobg('@/assets/foo.png', 's', '75%')}\n  ${autobg('@/assets/foo.png', 'scale', '75%')}\n`\n```\n\n### 使用 aspect-ratio 属性\n\n利用现代 CSS 的 [aspect-ratio](https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio) 属性保持元素宽高比，实现更灵活的布局控制。\n\n特别适用于需要响应式缩放的场景，当父元素尺寸动态变化时尤为有效：\n\n```tsx\nimport autobg from '@autobg/babel.macro'\nimport { styled } from 'styled-components'\n\n// 父元素高度可能会动态变化\nconst Parent = styled.div`\n  height: 200px;\n`\n\n// 子元素会自动保持图片原始宽高比并适应父元素\nconst Child = styled.div`\n  ${autobg.aspect('@/assets/foo.png', 'height')}\n`\n\nexport function Component() {\n  return (\n    <Parent>\n      <Child />\n    </Parent>\n  )\n}\n```\n\n当父元素的高度发生变化时，子元素会自动保持原始图片的宽高比例，实现等比例缩放。\n\n#### 基础用法\n\n不指定宽高时，仅生成背景和宽高比：\n\n```tsx\nimport autobg from '@autobg/babel.macro'\nimport { styled } from 'styled-components'\n\nconst Foo = styled.div`\n  ${autobg.aspect('@/assets/foo.png')}\n  /* 需要手动设置宽度或高度 */\n  width: 100%;\n`\n```\n\n#### 📐 指定生成宽度或高度\n\n自动生成一个维度的值（默认100%）：\n\n```tsx\nimport autobg from '@autobg/babel.macro'\nimport { styled } from 'styled-components'\n\n// 生成高度，保持原图宽高比\nconst HeightAuto = styled.div`\n  ${autobg.aspect('@/assets/foo.png', 'height')}\n  ${autobg.aspect('@/assets/foo.png', 'h')}\n`\n\n// 生成宽度，保持原图宽高比\nconst WidthAuto = styled.div`\n  ${autobg.aspect('@/assets/foo.png', 'width')}\n  ${autobg.aspect('@/assets/foo.png', 'w')}\n`\n```\n\n#### 自定义比例\n\n设置宽高：\n\n```tsx\nimport autobg from '@autobg/babel.macro'\nimport { styled } from 'styled-components'\n\n// 设置高度值，保持原图宽高比\nconst HeightCustom = styled.div`\n  ${autobg.aspect('@/assets/foo.png', 'height', '78%')}\n  ${autobg.aspect('@/assets/foo.png', 'h', '78px')}\n  ${autobg.aspect('@/assets/foo.png', 'h', '78rem')}\n`\n\n// 设置宽度值，保持原图宽高比\nconst WidthCustom = styled.div`\n  ${autobg.aspect('@/assets/foo.png', 'width', '78%')}\n  ${autobg.aspect('@/assets/foo.png', 'w', '78px')}\n  ${autobg.aspect('@/assets/foo.png', 'w', '78rem')}\n`\n```\n\n> 💡 **提示**：在 aspect 模式下，值会直接设置到 width 或 height 属性上，不会经过转换。\n\n### 📋 缩放选项总览\n\n| 选项                | 语法                                | 功能描述                                             |\n| ------------------- | ----------------------------------- | ---------------------------------------------------- |\n| 宽度缩放            | `autobg(path, 'width', 值)`         | 固定宽度，高度按比例自动计算（值表示像素等具体单位） |\n| 高度缩放            | `autobg(path, 'height', 值)`        | 固定高度，宽度按比例自动计算（值表示像素等具体单位） |\n| 整体缩放            | `autobg(path, 值或百分比)`          | 按比例统一缩放两个维度（数值或百分比表示缩放比例）   |\n| 宽高比模式-宽度     | `autobg.aspect(path, 'width')`      | 生成宽度并设置 aspect-ratio，保持原图宽高比          |\n| 宽高比模式-高度     | `autobg.aspect(path, 'height')`     | 生成高度并设置 aspect-ratio，保持原图宽高比          |\n| 宽高比模式-自定义宽 | `autobg.aspect(path, 'width', 值)`  | 设置宽度为指定值并保持原图宽高比                     |\n| 宽高比模式-自定义高 | `autobg.aspect(path, 'height', 值)` | 设置高度为指定值并保持原图宽高比                     |\n\n> 💡 **提示**：使用路径别名或 `public` 目录下的图片时，需要确保 `alias` 和 `publicPath` 配置与构建工具配置保持一致。\n\n## 📝 配置项说明\n\n| 配置项        | 类型                        | 默认值                                         | 说明                                                                          |\n| ------------- | --------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------- |\n| publicPath    | `string`                    | `'public'`                                     | 静态资源目录路径，需要与构建工具配置保持一致                                  |\n| alias         | `Record<string, string>`    | `{ '@/': 'src/', '~': 'src/', '~@/': 'src/' }` | 路径别名配置，需要与构建工具配置保持一致<br>不使用路径别名时，传入空对象 `{}` |\n| unit          | `'px'` \\| `'rem'` \\| `'vw'` | `'px'`                                         | CSS 单位类型                                                                  |\n| rootValue     | `number`                    | `100`                                          | 根元素字体大小（仅在 `unit` 为 `'rem'` 时生效）                               |\n| designWidth   | `number`                    | `750`                                          | 设计稿宽度（仅在 `unit` 为 `'vw'` 时生效）                                    |\n| unitPrecision | `number`                    | `5`                                            | `px` 转换为 `rem` 或 `vw` 时的精度（小数位数）                                |\n\n## 📄 许可证\n\nMIT\n","readmeFilename":"README.zh-CN.md"}