{"name":"@emmetio/css-abbreviation","version":"2.1.6","description":"Parses Emmet CSS abbreviation into AST tree","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","type":"module","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"scripts":{"test":"mocha","build":"rollup -c","watch":"rollup -wc","clean":"rm -rf ./dist","prepublishOnly":"npm test && npm run clean && npm run build"},"repository":{"type":"git","url":"git+https://github.com/emmetio/emmet.git"},"keywords":[],"author":{"name":"Sergey Chikuyonok","email":"serge.che@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/emmetio/emmet/issues"},"homepage":"https://github.com/emmetio/emmet#readme","dependencies":{"@emmetio/scanner":"^1.0.2"},"devDependencies":{"@rollup/plugin-typescript":"^10.0.1","@types/mocha":"^10.0.1","@types/node":"^18.11.18","mocha":"^10.2.0","rollup":"^3.9.0","ts-node":"^10.9.1","typescript":"^4.9.4"},"directories":{"test":"test"},"mocha":{"loader":"ts-node/esm","spec":"./test/*.ts"},"gitHead":"406e38e35d0a7fc4ef4dab85a2fd3559b2531f66","_id":"@emmetio/css-abbreviation@2.1.6","_nodeVersion":"16.16.0","_npmVersion":"lerna/6.5.1/node@v16.16.0+x64 (darwin)","dist":{"integrity":"sha512-bvuPogt0OvwcILRg+ZD/oej1H72xwOhUDPWOmhCWLJrZZ8bMTazsWnvw8a8noaaVqUhOE9PsC0tYgGVv5N7fsw==","shasum":"f37f7ffb8d76efc40d3629739758531bbe810d7b","tarball":"http://registry-npm.ywwl.com/@emmetio/css-abbreviation/download/@emmetio/css-abbreviation-2.1.6.tgz","fileCount":13,"unpackedSize":89995,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYmj8qNz8aSOhgskd+6vA+ZvkZZkrAklyOyj5q6zY+lAiEA1HT0s54OeDJzfkgWd4nYuaVzIXTR9nhpP7q5vorUHSg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJrDJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRWA//bw/zG3sp/D4wkJXWSoBInvjlOCn5zNNpIjCncQ9LX9X4LtMa\r\nIG2n2hEqKLxZXKljYHV8AbFX/PaUcuhN0mIvcbA1QHb6iSr75wTWucV93bTV\r\nGVii6mu/lUbtpD1BVuEpzviuYPMlZmI3NZjCVM/sULO0qOn+UGrD4vxoVRgY\r\nRINm6PD2A0EMbzlf6vMl+GDuM0EYeqZdyzpPrwu77nk+u9wDXN1aisXiymFe\r\n70/U+Jk7ThzQfU3LTKiJKoPdE86KKpjxJI6Tyl2yAYv3uetkwRIOpLTmBkHt\r\ne27gKyVYTa2BO0GA8Ta4DnXfG4wkQiofjt3tTwanne0qL/9T4JCLXsNvJ+us\r\nVVT5ws/XS4n973a4s87ANnWg0C9RvNptVpvHWf25zKlajpvFd5oplpe82kUN\r\nhLBn/WXjhGi7wSvcMyrpnMHHtfKpyLYggrUNe+h8gtgpMZIE15bTNQarX14E\r\np0FKgI5YatmRp8OdhDnjdLSs3f0AqCYtEgM5Vz23pawNNy3Wcbl9la3UPcMO\r\nVULYqQRvpiBpAZ2b9af30ZuRXqp3GGE/fDvgpdtkKk/OOblweKJvxw3d6e25\r\nUE4wE6BFSG9gsFDAlAgXy+zE5u+qQbcmeQxpsQ+1zLfMv3y9s2z8Pf2/nTXp\r\nyKj9z6KRAl2gvNHVvkp7iNfyBBz7hy1khzA=\r\n=MsNM\r\n-----END PGP SIGNATURE-----\r\n","size":13539,"noattachment":false,"key":"/@emmetio/css-abbreviation/-/@emmetio/css-abbreviation-2.1.6.tgz"},"_npmUser":{"name":"serge.che","email":"serge.che@gmail.com"},"maintainers":[{"name":"emmetio-user","email":"info@emmet.io"},{"name":"serge.che","email":"serge.che@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/css-abbreviation_2.1.6_1680257224860_0.7460961743570365"},"_hasShrinkwrap":false,"readme":"# Emmet stylesheet abbreviation parser\n\nParses given Emmet *stylesheet* abbreviation into AST. Parsing is performed in two steps: first it tokenizes given abbreviation (useful for syntax highlighting in editors) and then tokens are analyzed and converted into AST nodes as plain, JSON-serializable objects.\n\nUnlike in [markup abbreviations](/packages/abbreviation), elements in stylesheet abbreviations cannot be nested and contain attributes, but allow embedded values in element names.\n\n## Usage\n\nYou can install it via npm:\n\n```bash\nnpm install @emmetio/css-abbreviation\n```\n\nThen add it into your project:\n\n```js\nimport parse from '@emmetio/css-abbreviation';\n\nconst props = parse('p10+poa');\n/* [{\n    name: 'p',\n    value: [{ type: 'CSSValue', value: [...] }],\n    important: false\n}, {\n    name: 'poa',\n    value: [],\n    important: false\n}] */\n```\nThe returned result is an array of `CSSProperty` items: a node with name and values.\n\n## Abbreviation syntax\n\nEmmet stylesheet abbreviation element may start with name and followed by values, optionally chained with `-` delimiter. In most cases, actual CSS properties doesn’t have numbers in their names (or at least they are not used in abbreviation shortcuts) so a number right after alpha characters is considered as *embedded value*, as well as colors starting with `#` character: `p10`, `bg#fc0` etc. If implicit name/value boundary can’t be identified, you should use `-` as value separator: `m-a`, `p10-20` etc.\n\n### Operators\n\nSince CSS properties can’t be nested, the only available operator is `+`.\n","publish_time":1680257225067,"_cnpm_publish_time":1680257225067,"dist-tags":{"latest":"2.1.8"}}