{"_id":"postcss-plugin-shared","_rev":"9-fce607f8d126261c75386383365e7600","name":"postcss-plugin-shared","dist-tags":{"latest":"1.1.6"},"versions":{"0.0.0":{"name":"postcss-plugin-shared","version":"0.0.0","keywords":["postcss","postcss-plugin","shared","utils"],"author":{"name":"ice breaker","email":"1324318532@qq.com"},"license":"MIT","_id":"postcss-plugin-shared@0.0.0","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"homepage":"https://github.com/sonofmagic/postcss-plugins#readme","bugs":{"url":"https://github.com/sonofmagic/postcss-plugins/issues"},"dist":{"shasum":"c679968cf97543e74f477310f1e05ef1f2d6f7ba","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-0.0.0.tgz","fileCount":8,"integrity":"sha512-Nk1xxbVqmCt9tY+rVDVtEmZ0XV/a9brU6Y0JuFeW6xPgFNsU/TOwYpHlkkLwAWzd00SFnz8BjkfQWPt6Z06Slg==","signatures":[{"sig":"MEUCIAq7O7dS4JQ+6Xuxkcn8KkmoMyH8qVAwNiVwBH8qDBODAiEA+4osRunh3wsJMwMajuTu0LroSof71+0BzU3UvMZMO2I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18025},"main":"./dist/index.cjs","_from":"file:postcss-plugin-shared-0.0.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"}},"scripts":{"dev":"tsup --watch --sourcemap","lint":"eslint .","build":"tsup","lint:fix":"eslint . --fix"},"_npmUser":{"name":"icebreaker","email":"1324318532@qq.com"},"_resolved":"/private/var/folders/rm/spk31h7x5bdbbfmncmrf6yw00000gn/T/edecf3077d54e9d9c7f241a95cfb5cae/postcss-plugin-shared-0.0.0.tgz","_integrity":"sha512-Nk1xxbVqmCt9tY+rVDVtEmZ0XV/a9brU6Y0JuFeW6xPgFNsU/TOwYpHlkkLwAWzd00SFnz8BjkfQWPt6Z06Slg==","repository":{"url":"git+https://github.com/sonofmagic/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"_npmVersion":"10.9.4","description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","dependencies":{"defu":"^6.1.4"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"tmp":"tmp/postcss-plugin-shared_0.0.0_1766038486180_0.024160477552293225","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"postcss-plugin-shared","version":"1.0.0","keywords":["postcss","postcss-plugin","shared","utils"],"author":{"name":"ice breaker","email":"1324318532@qq.com"},"license":"MIT","_id":"postcss-plugin-shared@1.0.0","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"homepage":"https://github.com/sonofmagic/postcss-plugins#readme","bugs":{"url":"https://github.com/sonofmagic/postcss-plugins/issues"},"dist":{"shasum":"ffc5c7b21cf1f50acc62c4d75a9aed65ce84ae9f","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-1.0.0.tgz","fileCount":8,"integrity":"sha512-3x83BXvFXlbtIaD/GC4C2uZQ+UmGwh1uYCm4DjQTEjDv8HrrBmZWZH968W+Shq/vxP+amsH08OafVt8aVzqL2w==","signatures":[{"sig":"MEQCIHf0KrJwS2lI6EuLt34d1iERZUKc1u/lRi8DkRRFj4crAiAXbtZDfEgcDoa+0bX55oPFFplOiA1Ph7aIdT8yOS715w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-plugin-shared@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28162},"main":"./dist/index.cjs","_from":"file:postcss-plugin-shared-1.0.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"}},"scripts":{"dev":"tsup --watch --sourcemap","lint":"eslint .","build":"tsup","lint:fix":"eslint . --fix"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:06df814c-ba6b-4f93-abc1-f3ce8680d410"}},"_resolved":"/tmp/7963e38ebe5806825eb4543c689819df/postcss-plugin-shared-1.0.0.tgz","_integrity":"sha512-3x83BXvFXlbtIaD/GC4C2uZQ+UmGwh1uYCm4DjQTEjDv8HrrBmZWZH968W+Shq/vxP+amsH08OafVt8aVzqL2w==","repository":{"url":"git+https://github.com/sonofmagic/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"_npmVersion":"11.6.2","description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"sideEffects":false,"_nodeVersion":"24.12.0","dependencies":{"defu":"^6.1.4"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"tmp":"tmp/postcss-plugin-shared_1.0.0_1766047843723_0.3492887876252022","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"postcss-plugin-shared","version":"1.1.0","keywords":["postcss","postcss-plugin","shared","utils"],"author":{"name":"ice breaker","email":"1324318532@qq.com"},"license":"MIT","_id":"postcss-plugin-shared@1.1.0","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"homepage":"https://github.com/sonofmagic/postcss-plugins#readme","bugs":{"url":"https://github.com/sonofmagic/postcss-plugins/issues"},"dist":{"shasum":"02206734b614fe01fc7e1fea4b5c1d22cffdbeee","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-1.1.0.tgz","fileCount":8,"integrity":"sha512-gH/iDzmzPrndCQ7rsEhOW9MXAEo0xyhoD7gX0M1X5UybAG1xMPNWTmdEGUq89QESfekQFenGfk4R9dYHtbygEg==","signatures":[{"sig":"MEUCIC9a866lXiY+QaSpyMsLtxQED3IeXXFsrkVjH/ndMqSvAiEAmRyc+0INYiqaJgH8+2iBvRhcxX7mGZ/eZVL6R9kOiYg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-plugin-shared@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":45395},"main":"./dist/index.cjs","_from":"file:postcss-plugin-shared-1.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.ts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch --sourcemap","lint":"eslint .","build":"tsup","lint:fix":"eslint . --fix"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:06df814c-ba6b-4f93-abc1-f3ce8680d410"}},"_resolved":"/tmp/3e984738e57d3cf40004561c541c44e3/postcss-plugin-shared-1.1.0.tgz","_integrity":"sha512-gH/iDzmzPrndCQ7rsEhOW9MXAEo0xyhoD7gX0M1X5UybAG1xMPNWTmdEGUq89QESfekQFenGfk4R9dYHtbygEg==","repository":{"url":"git+https://github.com/sonofmagic/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"_npmVersion":"11.6.2","description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"defu":"^6.1.4"},"typesVersions":{"<4.7":{"*":["./dist/*","./dist/index.d.ts"]}},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"tmp":"tmp/postcss-plugin-shared_1.1.0_1770033306625_0.6213889711776384","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"postcss-plugin-shared","version":"1.1.1","keywords":["postcss","shared","utils"],"author":{"name":"ice breaker","email":"1324318532@qq.com"},"license":"MIT","_id":"postcss-plugin-shared@1.1.1","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"homepage":"https://github.com/sonofmagic/postcss-plugins#readme","bugs":{"url":"https://github.com/sonofmagic/postcss-plugins/issues"},"dist":{"shasum":"2c490833a9ecc390215d43893a62b01e8609110b","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-1.1.1.tgz","fileCount":8,"integrity":"sha512-ucByjwfw3SJXo3NFDy6aF264cnSxOL5gFYMfDz9U/CD97+pT2KSryZ8DmVviWnI1ofJL71y2DhParq1zoS4hcw==","signatures":[{"sig":"MEUCIGIE3xiHyv0hSK0jq9ft04rkn0tip37zwqQTwPvqnK59AiEA8P2S5Iic+Nu5aOqfO8x4ZVvKxvPwViO9hMR7S0hIl8c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-plugin-shared@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":45373},"main":"./dist/index.cjs","_from":"file:postcss-plugin-shared-1.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.ts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch --sourcemap","lint":"eslint .","build":"tsup","lint:fix":"eslint . --fix"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:06df814c-ba6b-4f93-abc1-f3ce8680d410"}},"_resolved":"/tmp/9bc1bac0f0610e06f1dca98ecfa3cd25/postcss-plugin-shared-1.1.1.tgz","_integrity":"sha512-ucByjwfw3SJXo3NFDy6aF264cnSxOL5gFYMfDz9U/CD97+pT2KSryZ8DmVviWnI1ofJL71y2DhParq1zoS4hcw==","repository":{"url":"git+https://github.com/sonofmagic/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"_npmVersion":"11.6.2","description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"sideEffects":false,"_nodeVersion":"24.13.0","dependencies":{"defu":"^6.1.4"},"typesVersions":{"<4.7":{"*":["./dist/*","./dist/index.d.ts"]}},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"tmp":"tmp/postcss-plugin-shared_1.1.1_1770189634149_0.5651214560450835","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"postcss-plugin-shared","version":"1.1.2","keywords":["postcss","shared","utils"],"author":{"name":"ice breaker","email":"1324318532@qq.com"},"license":"MIT","_id":"postcss-plugin-shared@1.1.2","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"homepage":"https://github.com/sonofmagic/postcss-plugins#readme","bugs":{"url":"https://github.com/sonofmagic/postcss-plugins/issues"},"dist":{"shasum":"c3d29e6f22fd0c5b7f0b45ab1e7f81bfaa73c1d2","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-1.1.2.tgz","fileCount":8,"integrity":"sha512-tb8xulkCpp4V7QEGbqmyAyJpv82C1OorZShhsaqBxOMR94p9JQL5ew95neiTRs3j2h1MJjB8LP4H2eryKg2b2w==","signatures":[{"sig":"MEUCIQCrM5PgsdlbuN/OOH+VGuJs1KfoBb6QwA9PG0Hl7wPvBAIgGujjegw5+QQmWzDKXHjyC52gw5vLItd2kIqc55L3G1Q=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-plugin-shared@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46300},"main":"./dist/index.cjs","_from":"file:postcss-plugin-shared-1.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.ts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"tsup --watch --sourcemap","lint":"eslint .","bench":"vitest bench","build":"tsup","lint:fix":"eslint . --fix"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:06df814c-ba6b-4f93-abc1-f3ce8680d410"}},"_resolved":"/tmp/7595940228b6048112ca2499a3e0b849/postcss-plugin-shared-1.1.2.tgz","_integrity":"sha512-tb8xulkCpp4V7QEGbqmyAyJpv82C1OorZShhsaqBxOMR94p9JQL5ew95neiTRs3j2h1MJjB8LP4H2eryKg2b2w==","repository":{"url":"git+https://github.com/sonofmagic/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"_npmVersion":"11.11.0","description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","dependencies":{"defu":"^6.1.7"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"tmp":"tmp/postcss-plugin-shared_1.1.2_1776487363828_0.2524492175814683","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"postcss-plugin-shared","version":"1.1.3","keywords":["postcss","shared","utils"],"author":{"name":"ice breaker","email":"1324318532@qq.com"},"license":"MIT","_id":"postcss-plugin-shared@1.1.3","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"homepage":"https://github.com/sonofmagic/postcss-plugins#readme","bugs":{"url":"https://github.com/sonofmagic/postcss-plugins/issues"},"dist":{"shasum":"0b8c51c359e7840f2120be81a44c7206c04e344d","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-1.1.3.tgz","fileCount":8,"integrity":"sha512-EvCHlFTFN3EpRdqu3pdNyKxgOIoAw0YaSxxQG+Fd9keKQPblWF8SCw8g7sZYrObOOcqHnRH/sJ4FNbNAvhb8ow==","signatures":[{"sig":"MEYCIQCL7rGe+tqtW9psrkfvEnNkBn3XH52fEsSm+7+VXBfHJgIhAO9kiJDU9IFUEwgnUbdtHk6ULpvzdlOjP7RE3CSHnaH1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-plugin-shared@1.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":49392},"main":"./dist/index.cjs","_from":"file:postcss-plugin-shared-1.1.3.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"tsdown -w","lint":"eslint .","bench":"vitest bench","build":"tsdown","lint:fix":"eslint . --fix"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:06df814c-ba6b-4f93-abc1-f3ce8680d410"}},"_resolved":"/tmp/ba73eeeabe9af63a03a4b0b82809c043/postcss-plugin-shared-1.1.3.tgz","_integrity":"sha512-EvCHlFTFN3EpRdqu3pdNyKxgOIoAw0YaSxxQG+Fd9keKQPblWF8SCw8g7sZYrObOOcqHnRH/sJ4FNbNAvhb8ow==","repository":{"url":"git+https://github.com/sonofmagic/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"_npmVersion":"11.11.0","description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","dependencies":{"defu":"^6.1.7"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"tmp":"tmp/postcss-plugin-shared_1.1.3_1776516423501_0.7231334552844728","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"postcss-plugin-shared","version":"1.1.4","keywords":["postcss","shared","utils"],"author":{"name":"ice breaker","email":"1324318532@qq.com"},"license":"MIT","_id":"postcss-plugin-shared@1.1.4","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"homepage":"https://github.com/sonofmagic/postcss-plugins#readme","bugs":{"url":"https://github.com/sonofmagic/postcss-plugins/issues"},"dist":{"shasum":"d4d935b39e84dcb944dfac781684e094f07e683c","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-1.1.4.tgz","fileCount":8,"integrity":"sha512-ERzk32HelZ4pCd29Nw37fZTK/xHCO//cYvGdXreT44J7tFBimjpLayahr9Ldid5+XIASPa4gHc1T00PKlmtXRg==","signatures":[{"sig":"MEQCICfOWKLR4zsu4FLYxPLZ2EJRLsOAWZgWmk1xaxfRDd6PAiBdzY3tJzUPBMZTnW310A0lmJqzvDPkmZnldpXLF9gf3g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-plugin-shared@1.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51113},"main":"./dist/index.cjs","_from":"file:postcss-plugin-shared-1.1.4.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"tsdown -w","lint":"eslint .","bench":"vitest bench","build":"tsdown","lint:fix":"eslint . --fix"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:06df814c-ba6b-4f93-abc1-f3ce8680d410"}},"_resolved":"/tmp/cfb00f3061b747235250073c528a2417/postcss-plugin-shared-1.1.4.tgz","_integrity":"sha512-ERzk32HelZ4pCd29Nw37fZTK/xHCO//cYvGdXreT44J7tFBimjpLayahr9Ldid5+XIASPa4gHc1T00PKlmtXRg==","repository":{"url":"git+https://github.com/sonofmagic/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"_npmVersion":"11.11.0","description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","dependencies":{"defu":"^6.1.7"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"tmp":"tmp/postcss-plugin-shared_1.1.4_1776684660778_0.026259955501258148","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"postcss-plugin-shared","version":"1.1.5","keywords":["postcss","shared","utils"],"author":{"name":"ice breaker","email":"1324318532@qq.com"},"license":"MIT","_id":"postcss-plugin-shared@1.1.5","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"homepage":"https://github.com/sonofmagic/postcss-plugins#readme","bugs":{"url":"https://github.com/sonofmagic/postcss-plugins/issues"},"dist":{"shasum":"e9cd48d02ffdfebce1d2cc8ac9d2b7ee743049a8","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-1.1.5.tgz","fileCount":8,"integrity":"sha512-lYn9dyw3+BDpK39DI9HdMdDfdPnPKnIMA4OJnkodWnZ0OOZrDCUafpQaIUcBLXlInLBGYFo3YhB/BwyuwUY1Kw==","signatures":[{"sig":"MEYCIQDORobrbwnNpjjtTHjxqAEYCQ2ys/6/7/+1a5R9+ySekQIhAN+57cM4hmUBMrVBkVPNIA9jl54DhBWhXbxJ8tDRj3nD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-plugin-shared@1.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":51185},"main":"./dist/index.cjs","_from":"file:postcss-plugin-shared-1.1.5.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"dev":"tsdown -w","lint":"eslint .","bench":"vitest bench","build":"tsdown","lint:fix":"eslint . --fix"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:06df814c-ba6b-4f93-abc1-f3ce8680d410"}},"_resolved":"/tmp/d8a360347ca520c75ea3e48e9b822781/postcss-plugin-shared-1.1.5.tgz","_integrity":"sha512-lYn9dyw3+BDpK39DI9HdMdDfdPnPKnIMA4OJnkodWnZ0OOZrDCUafpQaIUcBLXlInLBGYFo3YhB/BwyuwUY1Kw==","repository":{"url":"git+https://github.com/sonofmagic/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"_npmVersion":"11.11.0","description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","dependencies":{"defu":"^6.1.7"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"tmp":"tmp/postcss-plugin-shared_1.1.5_1777390627562_0.36611377479670515","host":"s3://npm-registry-packages-npm-production"}},"1.1.6":{"_id":"postcss-plugin-shared@1.1.6","tsd":{"compilerOptions":{"module":"NodeNext"}},"bugs":{"url":"https://github.com/icelib/postcss-plugins/issues"},"dist":{"shasum":"a38079c83a0e26a7de2d27a2c341876446cfa031","tarball":"https://registry.npmjs.org/postcss-plugin-shared/-/postcss-plugin-shared-1.1.6.tgz","fileCount":8,"integrity":"sha512-ARv37oi6XN6FK15wgZanNH4/FfSqEEQ1BmdxkdBhKrddJnPO71MxN3SKI52qlvpmCQLmSV/QE7lE4K2hf+ncVQ==","signatures":[{"sig":"MEQCIGu90u26mk0LI8F7nsVissYCYlILAfOVFt0EOuKiQMOwAiBijF5ePHiXxSLNiikKjns+r9pZRsvq+8GKU0jDq5qlAg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCIKj9OpjLADpahFHt7D+HfREyQtqwvINptC+Wins9uVAIhAMfOfqiFwFhHdbJqblq3+JIIuNqE1gzXzV4IbflFsV8o"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-plugin-shared@1.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":55693},"main":"./dist/index.cjs","name":"postcss-plugin-shared","type":"module","types":"./dist/index.d.mts","author":"ice breaker <1324318532@qq.com>","module":"./dist/index.mjs","exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"license":"MIT","scripts":{"dev":"tsdown -w","tsd":"pnpm run build && tsd --typings dist/index.d.mts","lint":"eslint .","test":"vitest run","bench":"vitest bench","build":"tsdown","lint:fix":"eslint . --fix","typecheck":"tsc --noEmit"},"version":"1.1.6","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:09893a01-0b80-4e1e-b094-32c11254279f"}},"keywords":["postcss","shared","utils"],"repository":{"url":"git+https://github.com/icelib/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"description":"Shared utilities for postcss-plugins monorepo packages.","directories":{},"maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"sideEffects":false,"dependencies":{"defu":"^6.1.7"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-plugin-shared_1.1.6_1790175303741_0.1819430624417293"}}},"time":{"created":"2025-12-18T06:14:46.179Z","modified":"2026-09-23T14:55:04.163Z","0.0.0":"2025-12-18T06:14:46.323Z","1.0.0":"2025-12-18T08:50:43.877Z","1.1.0":"2026-02-02T11:55:06.772Z","1.1.1":"2026-02-04T07:20:34.284Z","1.1.2":"2026-04-18T04:42:43.988Z","1.1.3":"2026-04-18T12:47:03.659Z","1.1.4":"2026-04-20T11:31:01.045Z","1.1.5":"2026-04-28T15:37:07.715Z","1.1.6":"2026-09-23T14:55:03.829Z"},"bugs":{"url":"https://github.com/icelib/postcss-plugins/issues"},"author":"ice breaker <1324318532@qq.com>","license":"MIT","keywords":["postcss","shared","utils"],"repository":{"url":"git+https://github.com/icelib/postcss-plugins.git","type":"git","directory":"packages/postcss-plugin-shared"},"description":"Shared utilities for postcss-plugins monorepo packages.","maintainers":[{"name":"icebreaker","email":"1324318532@qq.com"}],"readme":"# postcss-plugin-shared\n\nEnglish | [简体中文](./README.zh-CN.md)\n\n`postcss-plugin-shared` is a shared utilities package used across the `postcss-plugins` monorepo to avoid duplicated logic (option merging, selector blacklists, declaration dedupe, exclude matching, unit regexes, numeric helpers, etc.).\n\n> Goals: **small, stable, side-effect free, and reusable**. This package intentionally does not include specific unit-conversion formulas (e.g. rem→px); it only provides generic building blocks.\n\n## Install / Usage\n\n### Inside this repo (pnpm workspace)\n\nUse a workspace dependency:\n\n```jsonc\n// packages/your-plugin/package.json\n{\n  \"dependencies\": {\n    \"postcss-plugin-shared\": \"workspace:^\"\n  }\n}\n```\n\nThen import utilities in your plugin:\n\n```ts\nimport { createExcludeMatcher, remRegex } from 'postcss-plugin-shared'\n```\n\n### Outside this repo\n\nIf you publish this package to npm, install it normally:\n\n```bash\npnpm add postcss-plugin-shared\n```\n\nThis package declares `postcss` as a peer dependency (`^8`).\n\n## Exports\n\nEntry: `packages/postcss-plugin-shared/src/index.ts`\n\n- `mergeOptions`: option merging based on `defu` (arrays use “override” strategy)\n- `createConfigGetter`: create a `getConfig(options?)` helper based on `mergeOptions`\n- `toFixed`: stable rounding helper (avoids `-0`/precision noise)\n- `createUnitRegex`: build a unit regex with configurable skip rules\n- `remRegex` / `pxRegex`: shared regexes for rem/px replacement (skips string literals, `url()`, `var()`)\n- `blacklistedSelector`: selector blacklist matcher (string includes / RegExp match)\n- `maybeBlacklistedSelector`: like `blacklistedSelector`, but returns `undefined` for non-string selectors\n- `createPropListMatcher`: builds a property matcher from `propList` (supports `*`)\n- `createAdvancedPropListMatcher`: advanced prop matcher (wildcards + negation) for `string[]`\n- `createExcludeMatcher`: builds an exclude matcher from `exclude` (array or function)\n- `createSelectorBlacklistMatcher`: selector blacklist matcher with optional cache\n- `declarationExists`: checks whether a rule/decls already contains the same `prop/value` to avoid duplicates\n- `walkAndReplaceValues`: shared walker to replace declaration values and media params\n\n## API\n\n### `mergeOptions(options, defaults)`\n\nMerges user options with defaults:\n\n- Object fields follow `defu` semantics (fallback to `defaults` when not provided in `options`)\n- **Arrays are overridden**: if both sides are arrays, the user array replaces the default array\n\n```ts\nimport { mergeOptions } from 'postcss-plugin-shared'\n\ninterface Options {\n  propList: string[]\n  unitPrecision: number\n}\n\nconst defaults: Options = { propList: ['*'], unitPrecision: 5 }\nconst resolved = mergeOptions<Options>({ propList: ['font-size'] }, defaults)\n// resolved.propList === ['font-size']\n```\n\n### `createConfigGetter(defaults)`\n\nCreates a strongly-typed `getConfig(options?)` function:\n\n```ts\nimport { createConfigGetter } from 'postcss-plugin-shared'\n\nconst defaultOptions = { rootValue: 16, propList: ['*'] as string[] }\nexport const getConfig = createConfigGetter(defaultOptions)\n\ngetConfig() // => defaultOptions\ngetConfig({ rootValue: 10 }) // => merged result\n```\n\n### `toFixed(number, precision)`\n\nStable rounding helper:\n\n- returns `0` when `number === 0`\n- preserves sign (supports negative values)\n- uses `Number.EPSILON` to reduce floating-point edge cases\n\n```ts\nimport { toFixed } from 'postcss-plugin-shared'\n\ntoFixed(1.005, 2) // 1.01\ntoFixed(0, 5) // 0\n```\n\n### `createUnitRegex(options)`\n\nCreates a global regex for unit replacement with configurable “skip” rules.\n\nNotes:\n\n- capture group 1 is the numeric portion\n- defaults to skipping quoted strings, `url(...)` and `var(...)`\n\n```ts\nimport { createUnitRegex } from 'postcss-plugin-shared'\n\nconst pxLike = createUnitRegex({ units: ['px', 'rpx'], ignoreCase: true })\n```\n\n### `remRegex` / `pxRegex`\n\nGlobal regexes for `String.prototype.replace`, designed to reduce false positives:\n\n- skip double-quoted strings `\"...\"` and single-quoted strings `'...'`\n- skip `url(...)`\n- skip `var(...)`\n- capture group 1 is the numeric portion (e.g. `1.25`)\n\n```ts\nimport { remRegex } from 'postcss-plugin-shared'\n\nconst value = 'margin: 1rem 0; background: url(\"1rem.png\")'\nvalue.replace(remRegex, (m, num) => `${Number(num) * 16}px`)\n// => margin: 16px 0; background: url(\"1rem.png\")\n```\n\n### `blacklistedSelector(blacklist, selector?)`\n\nReturns `true` if `selector` matches the blacklist:\n\n- `blacklist` supports `string | RegExp`\n- returns `false` when `selector` is not a string\n- `string`: `selector.includes(rule)`\n- `RegExp`: `Boolean(selector.match(rule))`\n\n```ts\nimport { blacklistedSelector } from 'postcss-plugin-shared'\n\nblacklistedSelector(['.ignore', /^\\.no-/], '.ignore .a') // true\nblacklistedSelector(['.ignore', /^\\.no-/], '.no-test') // true\n```\n\n### `maybeBlacklistedSelector(blacklist, selector?)`\n\nSame matching logic as `blacklistedSelector`, but returns `undefined` when `selector` is not a string.\n\n### `createPropListMatcher(propList)`\n\nBuilds a matcher `(prop: string) => boolean` to decide whether a CSS property should be processed.\n\nRules:\n\n- If `propList` includes `'*'`, it matches everything.\n- String entries prefixed with `!` exclude properties. Negated strings support\n  `!foo` (exact) and glob patterns like `!foo*`, `!*foo`, `!*foo*`,\n  `!--wot-*-font-size`.\n- Otherwise:\n  - `string` without `*`: `prop.includes(rule)`\n  - `string` with `*`: glob matching\n  - `RegExp`: `Boolean(prop.match(rule))`\n\n```ts\nimport { createPropListMatcher } from 'postcss-plugin-shared'\n\nconst match = createPropListMatcher(['font', /height$/])\nmatch('font-size') // true (contains 'font')\nmatch('line-height') // true (/height$/)\nmatch('color') // false\n\nconst matchWithExcludes = createPropListMatcher(['*', '!font-size', '!padding*'])\nmatchWithExcludes('font-size') // false\nmatchWithExcludes('padding-right') // false\n\nconst matchCustomProps = createPropListMatcher(['*', '!--wot-*-font-size'])\nmatchCustomProps('--wot-body-font-size') // false\n```\n\n### `createAdvancedPropListMatcher(propList)`\n\nAdvanced property matcher for `string[]` `propList`, compatible with `postcss-pxtrans` patterns:\n\n- `*` matches all properties\n- `foo` exact match\n- strings containing `*` use glob matching, such as `foo*`, `*foo`, `*foo*`, `!--wot-*-font-size`\n- `!pattern` negates (deny-list)\n\n```ts\nimport { createAdvancedPropListMatcher } from 'postcss-plugin-shared'\n\nconst match = createAdvancedPropListMatcher(['*', '!border', 'font*', '*height'])\nmatch('font-size') // true\nmatch('border') // false\n```\n\n### `createExcludeMatcher(exclude)`\n\nBuilds an exclude matcher `(filepath?: string) => boolean`.\n\n- `exclude` can be `Array<string | RegExp>` or `(filePath) => boolean`\n- returns `false` when `filepath` is `undefined`\n\n```ts\nimport { createExcludeMatcher } from 'postcss-plugin-shared'\n\nconst isExcluded = createExcludeMatcher([/node_modules/i, 'vendor'])\nisExcluded('/a/node_modules/x.css') // true\nisExcluded('/a/src/vendor.css') // true\n```\n\n### `declarationExists(decls, prop, value)`\n\nChecks whether a rule already contains the same declaration (commonly used to avoid duplicates when `replace: false` and `cloneAfter` is used).\n\n`decls` only needs a `.some(...)` method that iterates PostCSS `ChildNode`s (usually a `Rule`).\n\n```ts\nimport { declarationExists } from 'postcss-plugin-shared'\n\n// inside PostCSS visitor\nif (!declarationExists(rule, decl.prop, nextValue)) {\n  decl.cloneAfter({ value: nextValue })\n}\n```\n\n## Development\n\nThis package uses `tsdown`:\n\n- `pnpm -C packages/postcss-plugin-shared dev`\n- `pnpm -C packages/postcss-plugin-shared build`\n\n## Use cases\n\nThis package currently powers multiple plugins in this monorepo, e.g.:\n\n- `postcss-rem-to-responsive-pixel`\n- `postcss-rem-to-viewport`\n- `postcss-pxtrans`\n\nIf you want to extract more shared logic, this is the recommended place. Keep the scope:\n\n- utilities only (no plugin state, no IO, no side effects)\n- decoupled from conversion formulas (each plugin can define its own conversion)\n","readmeFilename":""}