{"_id":"@alinea/styler","_rev":"5-3583f46147add7af6c07bc957279a88b","name":"@alinea/styler","dist-tags":{"latest":"1.0.3"},"versions":{"0.0.0":{"name":"@alinea/styler","version":"0.0.0","license":"MIT","_id":"@alinea/styler@0.0.0","maintainers":[{"name":"benmerckx","email":"ben@codeurs.be"}],"homepage":"https://github.com/alineacms/styler#readme","bugs":{"url":"https://github.com/alineacms/styler/issues"},"dist":{"shasum":"012650cc008f0178dab12fef4b3a7d7d77f56ed6","tarball":"https://registry.npmjs.org/@alinea/styler/-/styler-0.0.0.tgz","fileCount":4,"integrity":"sha512-osi3zNsT0KLwpzsWABbK1XfIxiL1/+WADem4JYBAQh21uy6zcrN6NeCQIWETWW8Jk012DpyS5yQR5r3oiZwtDg==","signatures":[{"sig":"MEUCIQC/QKNk83eYM3spda2tUuoOWM3WmW3HpN9EGDC+6NSsbAIgZamKbWl7Z+/VDpqkA/u2nYbqlRnt8NRKDUxHY2OiXKk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+2mcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVExAAnJYN74zsP8l657UhkpM6FGUJfiUfG6wdmAleLz/fDR64Phz0\r\nGc0yES0bgJ9JrBF/A7oy08WfmugVFDHavNJJJ4OaT33v/Pl66ydu2pWCN23x\r\nJbX4i4xxHjZwn9jIf9Mim349+5mNLfiVOnfaOAhHcqBiiqcbFbLabCRg9vis\r\n3kIN2Tadi+hMoBjlsdUfquRs5E7s8wRxzt/GFAKtNacHvpHuINDz2Ar03Kk2\r\nJL279ui09Z7Gvrr94zC18pEoOATm/CbngofooegrGw9YVeWnMcGpTDwGariS\r\nAPlL9LURSiRz8p6kvtdKL7yTDRijcaP3FgVRJp4h6U4mWgyDZRROH2OIHexH\r\nmmvTcv6hPYzVNcjfH7Wm9HjoMsZfqtl/37vuXDZirAGTjvbiZ/2mTukW4T/M\r\nqdf/Frh22Iqf9BtGTuxxfHEYt1Bquw4xuD/79TWjk06lFKCI4NtS/IOAvu1+\r\nzLsbE+3r4pBVJs/249ViQTSnVa2lZhh1LWhGim2mRu0jHqt1DjHwF/7MwINb\r\nZzrs4/0nvhvHp2J6SaEKopnNeOy+KrNtOeIkqzMFdB5avxZMUd6mpqfQiVOx\r\n9cKCGsXnVhznZ5lCHCEIjmltTvP6h9VR+3lQT2UaH8kRGsm135B3S/UxmAkf\r\nz0pcMjC2FRjeoZFttrlxTQuOdixwuWZuPdI=\r\n=vwV1\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"8923fb95933109fe768f793720ccf3dd8287bda6","scripts":{"test":"tsx ./test/TestStyler.ts","build":"tsc && esbuild ./src/index.ts --outdir=dist","prepublishOnly":"yarn build"},"_npmUser":{"name":"benmerckx","email":"ben@codeurs.be"},"repository":{"url":"git+https://github.com/alineacms/styler.git","type":"git"},"_npmVersion":"7.10.0","description":"��# @alinea/styler\r \r Class name composer. Fully typed in your IDE when paired with \r [typescript-plugin-css-modules](https://git","directories":{},"sideEffects":false,"_nodeVersion":"16.0.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^3.8.2","uvu":"^0.5.6","typescript":"^4.7.4"},"_npmOperationalInternal":{"tmp":"tmp/styler_0.0.0_1660643739847_0.023672264989975655","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@alinea/styler","version":"1.0.0","license":"MIT","_id":"@alinea/styler@1.0.0","maintainers":[{"name":"benmerckx","email":"ben@codeurs.be"}],"homepage":"https://github.com/alineacms/styler#readme","bugs":{"url":"https://github.com/alineacms/styler/issues"},"dist":{"shasum":"1f4f208a2ee6ce781c8bb82fcab35c82613ac53c","tarball":"https://registry.npmjs.org/@alinea/styler/-/styler-1.0.0.tgz","fileCount":4,"integrity":"sha512-BtWj4+o6WQeQ8Q1EYOOvQ/Uez7+qgJmDOY9DefHTt2V6HL7ND2xrxiftxXy31g2qcODlBOBHM0SCeji7FQgmAQ==","signatures":[{"sig":"MEUCIQCNcioLSL+tbBMFYhmifJqOQ3IKkql/EQexzAi32YCceQIgE27IjC5ZZBpca1NMm2CAh+sVXJxU/QOUG+ei1bmQpH4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7622},"type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"60d80a37d5a6dd855c1b9b9b131878dc0a518730","scripts":{"build":"tsc && esbuild ./src/index.ts --outdir=dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"benmerckx","email":"ben@codeurs.be"},"repository":{"url":"git+https://github.com/alineacms/styler.git","type":"git"},"_npmVersion":"10.8.1","description":"��[![spring-easing's badge](https://deno.bundlejs.com/?q=@alinea/styler&badge=detailed&badge-style=for-the-badge)](https://bundle","directories":{},"sideEffects":false,"_nodeVersion":"22.3.0","dependencies":{"esbuild":"^0.23.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/styler_1.0.0_1721910896992_0.36902743536172666","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@alinea/styler","version":"1.0.1","license":"MIT","_id":"@alinea/styler@1.0.1","maintainers":[{"name":"benmerckx","email":"ben@codeurs.be"}],"homepage":"https://github.com/alineacms/styler#readme","bugs":{"url":"https://github.com/alineacms/styler/issues"},"dist":{"shasum":"8c09ff2a3ac6859c278c29497e1f321d21dbcb5f","tarball":"https://registry.npmjs.org/@alinea/styler/-/styler-1.0.1.tgz","fileCount":4,"integrity":"sha512-60HRENr5tWSyrjxF20G5LJPF2X7nPk4Pati8cIEHNu+JQgV2/4fxgmNfmecFs3UrcjuQ9pzJI7SLeGxY6ISSEw==","signatures":[{"sig":"MEUCIQD9wfdHkpPCTxFj1RpJxvJYB2bXDb/1+I2mbmXlQNPuhgIgA4vW06Fm5TdwH7nDOmEkdmOafzUE7FVayxFlpEZeenI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6026},"type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"d1a76631836e6d03cf09f6989b4da6a42cd15163","scripts":{"build":"tsc && esbuild ./src/index.ts --outdir=dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"benmerckx","email":"ben@codeurs.be"},"repository":{"url":"git+https://github.com/alineacms/styler.git","type":"git"},"_npmVersion":"10.8.1","description":"[![spring-easing's badge](https://deno.bundlejs.com/?q=@alinea/styler&badge=detailed&badge-style=for-the-badge)](https://bundlejs.com/?q=@alinea/styler)","directories":{},"sideEffects":false,"_nodeVersion":"22.3.0","dependencies":{"esbuild":"^0.23.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/styler_1.0.1_1727431461877_0.7531235803383305","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@alinea/styler","version":"1.0.2","license":"MIT","_id":"@alinea/styler@1.0.2","maintainers":[{"name":"benmerckx","email":"ben@codeurs.be"}],"homepage":"https://github.com/alineacms/styler#readme","bugs":{"url":"https://github.com/alineacms/styler/issues"},"dist":{"shasum":"859adab3f03827ef721e44a0ac16b62bc264e46e","tarball":"https://registry.npmjs.org/@alinea/styler/-/styler-1.0.2.tgz","fileCount":4,"integrity":"sha512-SbLnFBB0o6GNvOexWqfAio9M/UxIu5CYAKFy1E+8cH/69sucadDdU20BXNfRnbJi6x1mtISfO1BgTJge6SqyKA==","signatures":[{"sig":"MEUCIQDdx4mVqxCSA4gahIcwC1cloNfrmKXfqzAWEiZUVeGuxwIgSKFYpzTVgV5HcAshQZg34KTd7wYRcBRaocJmG+4fP80=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6091},"type":"module","types":"./dist/index.d.ts","exports":"./dist/index.js","gitHead":"339aefb18c9358f3209eab8b18ae602f4a0d189b","scripts":{"build":"tsc && esbuild ./src/index.ts --outdir=dist","prepublishOnly":"bun run build"},"_npmUser":{"name":"benmerckx","email":"ben@codeurs.be"},"repository":{"url":"git+https://github.com/alineacms/styler.git","type":"git"},"_npmVersion":"10.8.1","description":"[![spring-easing's badge](https://deno.bundlejs.com/?q=@alinea/styler&badge=detailed&badge-style=for-the-badge)](https://bundlejs.com/?q=@alinea/styler)","directories":{},"sideEffects":false,"_nodeVersion":"22.3.0","dependencies":{"esbuild":"^0.23.0","@biomejs/biome":"^1.9.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/styler_1.0.2_1727437830697_0.908834327379918","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@alinea/styler","version":"1.0.3","license":"MIT","repository":{"type":"git","url":"git+https://github.com/alineacms/styler.git"},"type":"module","exports":"./dist/index.js","types":"./dist/index.d.ts","sideEffects":false,"devDependencies":{"@types/bun":"latest","@biomejs/biome":"^1.9.2","esbuild":"^0.23.0","typescript":"^5.5.4"},"scripts":{"build":"tsc && esbuild ./src/index.ts --outdir=dist","prepublishOnly":"bun run build"},"_id":"@alinea/styler@1.0.3","gitHead":"de0e827be868936062047721d4d4f13ea0defe53","description":"[![spring-easing's badge](https://deno.bundlejs.com/?q=@alinea/styler&badge=detailed&badge-style=for-the-badge)](https://bundlejs.com/?q=@alinea/styler)","bugs":{"url":"https://github.com/alineacms/styler/issues"},"homepage":"https://github.com/alineacms/styler#readme","_nodeVersion":"22.3.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-u248xCGPYuGAsC2Z83Jyxplcc92Ai1IdeoZiBmr9HY/yGRSLZAxteStg4ErLOi8BnQQ9g72oEbgK3GJ7wU71zA==","shasum":"d37c3fa7c4e866f516472930a12c1d585297d04c","tarball":"https://registry.npmjs.org/@alinea/styler/-/styler-1.0.3.tgz","fileCount":4,"unpackedSize":6067,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDaTY+w+8lVAWVuM/ShHh7+dj/KX1nBmyLU12baKVEBXwIhAMdM+Yech3cpwXfswJ93+xLkS3kfxAUYxuRzbBgv27eu"}]},"_npmUser":{"name":"benmerckx","email":"ben@codeurs.be"},"directories":{},"maintainers":[{"name":"benmerckx","email":"ben@codeurs.be"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/styler_1.0.3_1727437920937_0.5402036598415012"},"_hasShrinkwrap":false}},"time":{"created":"2022-08-16T09:55:39.779Z","modified":"2024-09-27T11:52:01.376Z","0.0.0":"2022-08-16T09:55:40.055Z","1.0.0":"2024-07-25T12:34:57.271Z","1.0.1":"2024-09-27T10:04:22.111Z","1.0.2":"2024-09-27T11:50:30.858Z","1.0.3":"2024-09-27T11:52:01.159Z"},"bugs":{"url":"https://github.com/alineacms/styler/issues"},"license":"MIT","homepage":"https://github.com/alineacms/styler#readme","repository":{"type":"git","url":"git+https://github.com/alineacms/styler.git"},"description":"[![spring-easing's badge](https://deno.bundlejs.com/?q=@alinea/styler&badge=detailed&badge-style=for-the-badge)](https://bundlejs.com/?q=@alinea/styler)","maintainers":[{"name":"benmerckx","email":"ben@codeurs.be"}],"readme":"[![spring-easing's badge](https://deno.bundlejs.com/?q=@alinea/styler&badge=detailed&badge-style=for-the-badge)](https://bundlejs.com/?q=@alinea/styler)\n\n# @alinea/styler\n\nClass name composer. Fully typed in your IDE when paired with\n[typescript-plugin-css-modules](https://github.com/mrmckeb/typescript-plugin-css-modules).\n\n```scss\n// Some.module.scss\n.root {\n  color: blue;\n  &-sub {\n    color: red;\n  }\n}\n.link {\n  color: yellow;\n  &.is-active {\n    color: orange;\n  }\n  &.is-small {\n    font-size: 2em;\n  }\n  &.is-large {\n    font-size: 2em;\n  }\n}\n```\n\n```tsx\nimport styler from '@alinea/styler'\nimport css from './Some.module.scss'\n\nconst styles = styler(css)\n\n<div className={styles.root()} />\n// => <div class=\"root_zr2ux\" /> (generated class name will vary)\n```\n\nYou can reach subclasses, separated in css by dashes, with dot access\n\n```tsx\n<div className={styles.root.sub()} />\n// => <div class=\"root-sub_zr2ux\" />\n```\n\nReflect state by passing objects with boolean properties or strings\n\n```tsx\n<a className={styles.link({active: true})} />\n// => <a class=\"is-active_zr2ux link_zr2ux\" />\n\n<a className={styles.link('large')} />\n// => <a class=\"is-large_zr2ux link_zr2ux\" />\n\n<a className={styles.link({active: false}, 'small')} />\n// => <a class=\"is-small_zr2ux link_zr2ux\" />\n```\n\nUse `styler.global` to add a global classname\n\n```tsx\n<div className={styles.root(styler.global('some-external-class'))} />\n// => <div class=\"some-external-class root_zr2ux\" />\n```\n\nUse `styler.merge` to add in props with a className\n\n```tsx\n<div className={styles.root(styler.merge({className: 'some-external-class'}))} />\n// => <div class=\"some-external-class root_zr2ux\" />\n```\n","readmeFilename":"README.md"}