{"_id":"cssnano-utils@9.0.0","bugs":{"url":"https://github.com/cssnano/cssnano/issues"},"dist":{"shasum":"6f4b85124f3420f42fa5ab7e35a28a443ebe13e2","tarball":"http://registry-npm.ywwl.com/cssnano-utils/download/cssnano-utils-9.0.0.tgz","fileCount":30,"integrity":"sha512-HIdFG2S06bygEl6+bZYPvA0/UyoYseXR/RpcvvwyE2NxWBbkZ70y9uRnvFwlQ4ztSlIeBqQBcwOMQG6DVrRHuA==","signatures":[{"sig":"MEYCIQChy9iUSqCZUvmJ7//fQKEZjQHdt+aY5T/t6AD4ueqs/QIhALvrx79RUrGpxwvKzZWSDke1eZAopp++IW611CEZ1S2C","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDYXKBSyI5wwNSFmdCave88Uvq1lBcpn/FS3zxuJxA1lAiBWayu17kMlB9PxUOdAev7wrCn+rr7UUsk/1GJhJqiNtg=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cssnano-utils@9.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":26742,"size":9102,"noattachment":false,"key":"/cssnano-utils/-/cssnano-utils-9.0.0.tgz"},"main":"./src/index.js","name":"cssnano-utils","type":"module","types":"./types/index.d.ts","engines":{"node":"^22.22.3 || ^24.15.0 || >=26.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"},"./package.json":"./package.json"},"license":"MIT","scripts":{"test":"node --test"},"version":"9.0.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"a99e5922-6aee-4b5e-9d97-76e1925c1aa1"}},"homepage":"https://github.com/cssnano/cssnano","repository":{"url":"git+https://github.com/cssnano/cssnano.git","type":"git"},"description":"Utility methods and plugin for cssnano projects","directories":{},"maintainers":[{"name":"ludovicofischer","email":"livrerie@gmail.com"},{"name":"evilebottnawi","email":"sheo13666q@gmail.com"},{"name":"anixsaha","email":"anik220798@gmail.com"},{"name":"cssnano-bot","email":"sahaaniketh@gmail.com"}],"dependencies":{"@csstools/css-tokenizer":"^4.0.2"},"_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.5.29"},"peerDependencies":{"postcss":"^8.5.29"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cssnano-utils_9.0.0_1791666668555_0.817176866853973"},"readme":"# cssnano-utils\n\nUtility methods and plugins for cssnano projects.\n\n## API\n\n### PostCSS Utilities\n\n| Utility | Description |\n| --- | --- |\n| `rawCache` | PostCSS plugin that sets default formatting for generated AST nodes on `result.root.rawCache`. |\n\n### CSS Tokenizer and Value Utilities\n\n| Utility | Description |\n| --- | --- |\n| `TokenType` | Re-exported `TokenType` enum from `@csstools/css-tokenizer`. |\n| `tokens` | Tokenize a CSS string into a `CSSToken[]` array with trailing `EOF` tokens stripped. |\n| `tokenStart` | Return the inclusive start character offset of a token (`token[2]`). |\n| `tokenEnd` | Return the exclusive end character offset of a token (`token[3] + 1`) for string slicing. |\n| `decoded` | Return the decoded string value of a token, falling back to its raw representation. |\n| `numeric` | Parse a single token into `{ number, unit }`, or `false` if not a numeric token. |\n| `endsWithEscapingBackslash` | Whether a string ends in an odd run of backslashes, so the last one escapes whatever follows. |\n| `isHexDigitCode` | Whether a UTF-16 code unit is an ASCII hex digit (`0-9`, `a-f`, `A-F`). |\n| `mathFunctions` | Read-only `Map` from each CSS Values 4 math function name to its `[min, max]` inclusive argument count (`max` may be `Infinity`). Iterating yields `[name, range]` pairs; use `.keys()` for names. |\n| `balancedTokens` | Parse CSS into a `BalancedTokens` index of matching delimiters (`()`, `[]`, `{}`), or `undefined` if unbalanced. |\n| `applyEdits` | Apply validated, non-overlapping string edits. Invalid bounds or overlaps fail closed by returning the complete original source. |\n\n### `BalancedTokens` Methods\n\nInstances returned by `balancedTokens(source)` provide:\n\n- `endForOpening(index)`: Returns the closing token index for an opening delimiter token at `index`.\n- `topLevelSegments(startIndex?, endIndex?, delimiter?)`: Splits a balanced token range by a top-level delimiter (defaults to comma).\n\n## Usage\n\n```js\nimport cssnanoUtils from 'cssnano-utils';\n\nconst { tokens, balancedTokens, applyEdits } = cssnanoUtils;\n\nconst structure = balancedTokens('cubic-bezier(0.1, 0.7, 1.0, 0.1)');\nif (structure) {\n  const segments = structure.topLevelSegments();\n  // Process balanced segments\n}\n```\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/main/CONTRIBUTORS.md).\n\n## License\n\nMIT\n","publish_time":1791666668657,"_cnpm_publish_time":1791666668657,"dist-tags":{"latest":"9.0.0","next":"2.0.0-rc.2","nightly":"4.0.0-nightly.2020.2.6"}}