{"name":"react-style-singleton","version":"2.2.2","keywords":["react","style","css"],"author":{"url":"thekashey@gmail.com","name":"Anton Korzunov"},"license":"MIT","_id":"react-style-singleton@2.2.2","homepage":"https://github.com/theKashey/react-style-singleton#readme","bugs":{"url":"https://github.com/theKashey/react-style-singleton/issues"},"dist":{"shasum":"1e7a6a92d495ca0354449cb6736784e72ee7eb05","tarball":"http://registry-npm.ywwl.com/react-style-singleton/download/react-style-singleton-2.2.2.tgz","fileCount":28,"integrity":"sha512-tkt+lL5/0Od4uy10wnXnZ1FLTSgKHhSK+quDbJHqFdEgdLEoWgPYQ166s8lOjSBzk5xAxH9YlFaQDUbGgZO/Lw==","signatures":[{"sig":"MEYCIQDigDwyI2kiDP2nu+HrTi/hTH8/lG+Xmi5LEwVYZAFemgIhALg1t6IL6rbb63eLrkSnA9v8NeZ5Puyha1XxaqQzVJzy","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19433,"size":4880,"noattachment":false,"key":"/react-style-singleton/-/react-style-singleton-2.2.2.tgz"},"main":"dist/es5/index.js","husky":{"hooks":{"pre-commit":"lint-staged"}},"types":"dist/es5/index.d.ts","module":"dist/es2015/index.js","engines":{"node":">=10"},"gitHead":"0855d4b3478326fda30efff7e0511540be7f57e8","scripts":{"dev":"lib-builder dev","lint":"lib-builder lint","size":"npx size-limit","test":"jest","build":"lib-builder build && yarn size:report","format":"lib-builder format","update":"lib-builder update","release":"yarn build && yarn test","test:ci":"jest --runInBand --coverage","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s","size:report":"npx size-limit --json > .size.json","prepublish-only":"yarn build && yarn changelog","changelog:rewrite":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0"},"_npmUser":{"name":"kashey","email":"thekashey@gmail.com"},"prettier":{"semi":true,"tabWidth":2,"printWidth":120,"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/theKashey/react-style-singleton.git","type":"git"},"_npmVersion":"10.7.0","description":"Just create a single stylesheet...","directories":{},"jsnext:main":"dist/es2015/index.js","lint-staged":{"*.{ts,tsx}":["prettier --write","eslint --fix","git add"],"*.{js,css,json,md}":["prettier --write","git add"]},"_nodeVersion":"20.15.1","dependencies":{"tslib":"^2.0.0","get-nonce":"^1.0.0"},"module:es2019":"dist/es2019/index.js","_hasShrinkwrap":false,"packageManager":"yarn@1.22.19","devDependencies":{"react":"^16.8.6","react-dom":"^16.8.6","size-limit":"^11.0.2","@theuiteam/lib-builder":"^0.1.4","@size-limit/preset-small-lib":"^11.0.2"},"peerDependencies":{"react":"*","@types/react":"^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/react-style-singleton_2.2.2_1734228418035_0.5643932589294713","host":"s3://npm-registry-packages-npm-production"},"readme":"react-style-singleton\n====\n\n__300b__ with all dependencies, minified and gzipped\n\n\nCreates a style component with internal _tracker_.\n- Adds styles to the browser on the __first__ instance mount.\n- Removes after the __last__ instance unmount.\n- Thus helps you deliver styles you need to the customer, and clean up later.\n- Is not server-side rendering compatible!\n\n\n# API\n\n## Component\n\n```js\nimport {styleSingleton} from 'react-style-singleton'\n\nconst Style = styleSingleton();\n\nexport const App = () => (\n  <Style styles={'body {color:red}'} />\n);\n```\n\n## Hook\n\n```js\nimport {styleHookSingleton} from 'react-style-singleton';\n\nconst useStyle = styleHookSingleton();\nconst useAnotherStyle = styleHookSingleton();\n\nexport const App = () => {\n  useStyle('div {color:red}');\n  useAnotherStyle('body { background-color:red }');\n  return (<div />);\n}\n```\n\n# License\n\nMIT","publish_time":1734228418217,"maintainers":[{"name":"kashey","email":"thekashey@gmail.com"}],"_cnpm_publish_time":1734228418217,"dist-tags":{"latest":"2.2.3"}}