{"_id":"@csstools/utilities-for-private-properties@1.0.1","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"45d78cd62f783bc73f2076bc33ad4ba3d5f1001d","tarball":"http://registry-npm.ywwl.com/@csstools/utilities-for-private-properties/download/@csstools/utilities-for-private-properties-1.0.1.tgz","fileCount":6,"integrity":"sha512-3xvIQTdcmQIWhFFpp78sQZ9h4apCBpihx640EzLNYSxWcT9/MI/6QBZcGJ2GDtUdMdOutW7rT4YLDRPPiGO2QA==","signatures":[{"sig":"MEYCIQDiRPQ9Bk75E6MiZX4hItuS2qE0aBIxHNtzsyaz5QGfHQIhAIsAjql3O0926Uau/tredYgAihkEPuxAuTa9F7uN0mlR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCdUSxGY9xWKcr1pLQZAXMMtN/1drJ808EmAxtjH3+DcQIhALX2ntEwT2M5NuOjnqOxInKkDsSeH/StT7UatbPee1af"}],"unpackedSize":16367,"size":5816,"noattachment":false,"key":"/@csstools/utilities-for-private-properties/-/@csstools/utilities-for-private-properties-1.0.1.tgz"},"name":"@csstools/utilities-for-private-properties","type":"module","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"31c8d1466ff8d7d633563034b5bcbeabdc60a78f","license":"MIT-0","scripts":{},"version":"1.0.1","_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/packages/utilities-for-private-properties#readme","keywords":["css","custom-property","postcss","private"],"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"packages/utilities-for-private-properties"},"_npmVersion":"11.13.0","description":"Utilities for private custom properties","directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"_nodeVersion":"26.1.0","contributors":[{"url":"https://antonio.laguna.es","name":"Antonio Laguna","email":"antonio@laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"dependencies":{"@csstools/generate-idents":"^1.0.0","@csstools/utilities-for-property-registrations":"^1.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4","@csstools/css-tokenizer":"^4.0.3","@csstools/css-parser-algorithms":"^4.0.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/utilities-for-private-properties_1.0.1_1794919768246_0.17405850378139331"},"readme":"# Utilities for Private Properties <img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"for PostCSS\" width=\"90\" height=\"90\" align=\"right\">\n\n[<img alt=\"npm version\" src=\"https://img.shields.io/npm/v/@csstools/utilities-for-private-properties.svg\" height=\"20\">][npm-url]\n[<img alt=\"Build Status\" src=\"https://github.com/csstools/postcss-plugins/actions/workflows/test.yml/badge.svg?branch=main\" height=\"20\">][cli-url]\n[<img alt=\"Discord\" src=\"https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white\">][discord]\n\nTranspile `@private` rules and private custom property references.\n\n## API\n\n[Read the API docs](./docs/utilities-for-private-properties.md)\n\n## Usage\n\nAdd [Utilities for Private Properties] to your project:\n\n```bash\nnpm install @csstools/utilities-for-private-properties @csstools/css-parser-algorithms @csstools/css-tokenizer postcss --save-dev\n```\n\n```ts\nimport { createPrivatePropertyTranspiler } from '@csstools/utilities-for-private-properties';\n\nconst transpiler = createPrivatePropertyTranspiler({ namespace: 'p' });\n\nconst registrations = transpiler.transpile(root.nodes);\nroot.append(...registrations);\n```\n\nNodes that are substituted into a style rule but are not its children, for example the contents of\nan `@contents` block, can be transpiled in the scope of that style rule:\n\n```ts\ntranspiler.transpile(nodes, { scope: styleRule });\n```\n\nWith `preserve: true` the `@private` rules are kept and references inside `@apply` and `@contents`\nblocks are left alone. Transpiled declarations are still hoisted, so the original notation keeps\nworking where `@private` is supported.\n\n`@property` rules are hoisted out of `@layer`, `@media` and `@supports` group rules, and the\n`@layer`, `@media` and `@supports` conditions are kept. `@container`, `@scope` and\n`@starting-style` do not constrain name-defining at-rules, so registrations inside them are hoisted\nwithout those conditions.\n\n[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/utilities-for-private-properties\n\n[Utilities for Private Properties]: https://github.com/csstools/postcss-plugins/tree/main/packages/utilities-for-private-properties\n","publish_time":1794919768334,"_cnpm_publish_time":1794919768334,"dist-tags":{"latest":"1.0.1"}}