{"name":"@csstools/utilities-for-private-properties","version":"0.0.0-stage","_id":"@csstools/utilities-for-private-properties@0.0.0-stage","stub":true,"maintainers":[{"name":"romainmenke","email":"romainmenke@gmail.com"}],"dist":{"shasum":"3ee859c9775a40e46cf42ec69345806ae7af0994","tarball":"http://registry-npm.ywwl.com/@csstools/utilities-for-private-properties/download/@csstools/utilities-for-private-properties-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-kzrSqm+JlT+u7kWn208i1thn9t2oo+RuJzobbElba/FFEkQ2EgpfTQai+wpdgs1x3lou19wkdikItrqTadtzMg==","signatures":[{"sig":"MEUCIGhMlWFjJzxlpnQol9wpmMTlogy0Eesoyh7uTXbdvAYmAiEA8oTijbC5pd/QV8da02TKD/OKKaNM5dFV3PYWlbEKbvA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":364,"size":383,"noattachment":false,"key":"/@csstools/utilities-for-private-properties/-/@csstools/utilities-for-private-properties-0.0.0-stage.tgz"},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{},"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":1794918142567,"_cnpm_publish_time":1794918142567,"dist-tags":{"latest":"1.0.1"}}