{"name":"cssnano-utils","version":"7.0.3","license":"MIT","_id":"cssnano-utils@7.0.3","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"}],"homepage":"https://github.com/cssnano/cssnano","bugs":{"url":"https://github.com/cssnano/cssnano/issues"},"dist":{"shasum":"9ac160024c439c0b3591a280c4062789037c5267","tarball":"http://registry-npm.ywwl.com/cssnano-utils/download/cssnano-utils-7.0.3.tgz","fileCount":15,"integrity":"sha512-KQKwel4/ROikvA9XkOkG7JbmgsipMSl8E7LwvDCjE32zKVz2xjNxxEJxJpbNzCLeeV1WbbD1fRmSUgtuOQeRgg==","signatures":[{"sig":"MEYCIQDATOGbTIjP0MrfY91q6UpaeoGUoz4EWYmLak6KA+GG0AIhAIAhjMFNIY5b/puU1J4OG0moccZIP1/2/mWRwpulMbhs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCyEJiVmQMKWHBSxZTpvxYNae+gGV7IGeWP6bztkSYovwIhAIosySzLM1W5t18lPJkhRsyTc+DsDpTtEuDt9nzzB4MO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cssnano-utils@7.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7672,"size":3183,"noattachment":false,"key":"/cssnano-utils/-/cssnano-utils-7.0.3.tgz"},"main":"./src/index.js","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"},"scripts":{"test":"node --test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a99e5922-6aee-4b5e-9d97-76e1925c1aa1"}},"repository":{"url":"git+https://github.com/cssnano/cssnano.git","type":"git"},"description":"Utility methods and plugin for cssnano projects","directories":{},"_hasShrinkwrap":false,"devDependencies":{"postcss":"^8.5.28","postcss-value-parser":"^4.2.0"},"peerDependencies":{"postcss":"^8.5.28"},"_npmOperationalInternal":{"tmp":"tmp/cssnano-utils_7.0.3_1789637916144_0.41517361719231594","host":"s3://npm-registry-packages-npm-production"},"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":1789637916230,"_cnpm_publish_time":1789637916230,"dist-tags":{"latest":"9.0.0","next":"2.0.0-rc.2","nightly":"4.0.0-nightly.2020.2.6"}}