{"_id":"@cute-me-on-repos/flated-react","_rev":"3-5dc58c10c0d371edfafd06c3e4e62e74","name":"@cute-me-on-repos/flated-react","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@cute-me-on-repos/flated-react","version":"1.0.0","keywords":["reactjs","react","context","hell","callback","hell","lib"],"author":{"name":"Kairis - Lý Lưỡng Thiên 🇻🇳"},"license":"MIT","_id":"@cute-me-on-repos/flated-react@1.0.0","maintainers":[{"name":"lyluongthien-tiki","email":"thien.ly@tiki.vn"},{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"}],"homepage":"https://thediligentengineer.com/the-flated-reaction","bugs":{"url":"https://github.com/cute-me-on-repos/flated-react/issues"},"dist":{"shasum":"0e176b94aca7ea1a1efe382dd585c47ab5b57fc4","tarball":"https://registry.npmjs.org/@cute-me-on-repos/flated-react/-/flated-react-1.0.0.tgz","fileCount":13,"integrity":"sha512-XfEteP8wLwaAAnsmkr4sM+IAa+B2zVnMTkZLix7EDmNoB7wzwlyDuJlCFDTb8lT6HNgACOnkTZWrGH52wkJGTg==","signatures":[{"sig":"MEUCIQDgpWuyAhlQtYzzoCLx9PxZmgBfCeKvcoTHbWmUZNOklQIgESzT2s4Gh4/zzMYp3RjfBy9EHz9GQ2w+4HEGfsc2R8Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13143},"main":"./dist/cjs/index.js","type":"module","_from":"file:cute-me-on-repos-flated-react-1.0.0.tgz","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","exports":{"*":{"import":"./dist/esm/index.js","require":"./dist/cjs/index.cjs"}},"scripts":{"test":"jest","build":"pnpm run build:esm & pnpm run build:cjs & wait && echo '🎉 Parallelly built success'","prebuild":"rm -rf dist","build:cjs":"tsc --incremental -p tsconfig.build.json --module commonjs --outDir dist/cjs","build:esm":"tsc --incremental -p tsconfig.build.json"},"_npmUser":{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"},"_resolved":"/tmp/27ebc058639949568242d1c172aef144/cute-me-on-repos-flated-react-1.0.0.tgz","_integrity":"sha512-XfEteP8wLwaAAnsmkr4sM+IAa+B2zVnMTkZLix7EDmNoB7wzwlyDuJlCFDTb8lT6HNgACOnkTZWrGH52wkJGTg==","repository":{"url":"git+https://github.com/cute-me-on-repos/flated-react.git","type":"git"},"_npmVersion":"10.7.0","description":"`flated-react` is a react typescript libary that is used to Flatten nested React components and remove React context hells","directories":{},"_nodeVersion":"20.15.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","react":"^18.3.1","ts-jest":"^29.2.3","react-dom":"^18.3.1","typescript":"^5.5.4","@types/jest":"^29.5.12","@types/react":"^18.3.3","@jest/globals":"^29.7.0","@types/react-dom":"^18.3.0","react-test-renderer":"^18.3.1","@testing-library/react":"^16.0.0","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/flated-react_1.0.0_1722165755537_0.6148481347869972","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@cute-me-on-repos/flated-react","version":"1.0.1","keywords":["reactjs","react","context","hell","callback","hell","lib"],"author":{"name":"Kairis - Lý Lưỡng Thiên 🇻🇳"},"license":"MIT","_id":"@cute-me-on-repos/flated-react@1.0.1","maintainers":[{"name":"lyluongthien-tiki","email":"thien.ly@tiki.vn"},{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"}],"homepage":"https://thediligentengineer.com/the-flated-reaction","bugs":{"url":"https://github.com/cute-me-on-repos/flated-react/issues"},"dist":{"shasum":"100dfdb7c01f8e86b9bb13eabca3d8effd0be7d2","tarball":"https://registry.npmjs.org/@cute-me-on-repos/flated-react/-/flated-react-1.0.1.tgz","fileCount":13,"integrity":"sha512-QWv5tn8p40GDdpV8MSPBT7dhUqrAxP2ciT+CQyFwkTt2gsyjPUfmyWefyHxSuUq8M9SJWdVNLCSXp2p9VuC2KA==","signatures":[{"sig":"MEQCIDfbJdMrMV79RuaSvJwt+kPso0YNQJsHoIDRUoo/UenIAiAHz6tvjNg0T4UYCSCRYyaTAOB5O4SPoPObqVgDasoNoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13365},"main":"./dist/cjs/index.js","type":"module","_from":"file:cute-me-on-repos-flated-react-1.0.1.tgz","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","exports":{"*":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.cjs"}},"scripts":{"test":"jest","build":"pnpm run build:esm & pnpm run build:cjs & wait && echo '🎉 Parallelly built success'","prebuild":"rm -rf dist","build:cjs":"tsc --incremental -p tsconfig.build.json --module commonjs --outDir dist/cjs","build:esm":"tsc --incremental -p tsconfig.build.json"},"_npmUser":{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"},"_resolved":"/tmp/8b70e4a14dd0169e67b6f50090f02811/cute-me-on-repos-flated-react-1.0.1.tgz","_integrity":"sha512-QWv5tn8p40GDdpV8MSPBT7dhUqrAxP2ciT+CQyFwkTt2gsyjPUfmyWefyHxSuUq8M9SJWdVNLCSXp2p9VuC2KA==","repository":{"url":"git+https://github.com/cute-me-on-repos/flated-react.git","type":"git"},"_npmVersion":"10.7.0","description":"`flated-react` is a react typescript libary that is used to Flatten nested React components and remove React context hells","directories":{},"_nodeVersion":"20.15.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","react":"^18.3.1","ts-jest":"^29.2.3","react-dom":"^18.3.1","typescript":"^5.5.4","@types/jest":"^29.5.12","@types/react":"^18.3.3","@jest/globals":"^29.7.0","@types/react-dom":"^18.3.0","react-test-renderer":"^18.3.1","@testing-library/react":"^16.0.0","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/flated-react_1.0.1_1722166924950_0.14360674691626762","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@cute-me-on-repos/flated-react","version":"1.0.2","keywords":["reactjs","react","context","hell","callback","hell","lib"],"author":{"name":"Kairis - Lý Lưỡng Thiên 🇻🇳"},"license":"MIT","_id":"@cute-me-on-repos/flated-react@1.0.2","maintainers":[{"name":"lyluongthien-tiki","email":"thien.ly@tiki.vn"},{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"}],"homepage":"https://thediligentengineer.com/the-flated-reaction","bugs":{"url":"https://github.com/cute-me-on-repos/flated-react/issues"},"dist":{"shasum":"a7b27814f3c8e72107bb2a2360be7895a24d5512","tarball":"https://registry.npmjs.org/@cute-me-on-repos/flated-react/-/flated-react-1.0.2.tgz","fileCount":11,"integrity":"sha512-SejKHMpBCuHgE1anPV792px4DHTozu6c+PlcaInCTbenfhTyMLvPvdSxVZkUAND5Mdp/TFPPFbNS+eq8ZOkb4g==","signatures":[{"sig":"MEYCIQDBPqcVozGwXn0l47z3/Y+pYWQ+cALaMM2BDZ+bKDJ8CAIhAIZ2Gm1gc1LQdjnOJbh5SiHWaXlohTIVz6JUomOJ9vrp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28435},"main":"./dist/cjs/index.js","type":"module","_from":"file:cute-me-on-repos-flated-react-1.0.2.tgz","types":"./dist/esm/index.d.ts","module":"./dist/esm/index.js","exports":{"*":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.cjs"}},"scripts":{"test":"jest","build":"pnpm run build:esm & pnpm run build:cjs & wait && echo '🎉 Parallelly built success'","prebuild":"rm -rf dist","build:cjs":"tsc --incremental -p tsconfig.build.json --module commonjs --outDir dist/cjs","build:esm":"tsc --incremental -p tsconfig.build.json"},"_npmUser":{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"},"_resolved":"/tmp/be145c02b6a9649ace50d8014049538f/cute-me-on-repos-flated-react-1.0.2.tgz","_integrity":"sha512-SejKHMpBCuHgE1anPV792px4DHTozu6c+PlcaInCTbenfhTyMLvPvdSxVZkUAND5Mdp/TFPPFbNS+eq8ZOkb4g==","repository":{"url":"git+https://github.com/cute-me-on-repos/flated-react.git","type":"git"},"_npmVersion":"10.7.0","description":"`flated-react` is a react typescript libary that is used to Flatten nested React components and remove React context hells","directories":{},"_nodeVersion":"20.15.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","react":"^18.3.1","ts-jest":"^29.2.3","react-dom":"^18.3.1","typescript":"^5.5.4","@types/jest":"^29.5.12","@types/react":"^18.3.3","@jest/globals":"^29.7.0","@types/react-dom":"^18.3.0","react-test-renderer":"^18.3.1","@testing-library/react":"^16.0.0","jest-environment-jsdom":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/flated-react_1.0.2_1722167790893_0.41998218540748433","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@cute-me-on-repos/flated-react","version":"1.0.3","description":"`flated-react` is a react typescript libary that is used to Flatten nested React components and remove React context hells","main":"./dist/esm/index.js","module":"./dist/esm/index.js","require":"./dist/cjs/index.js","types":"./dist/esm/index.d.ts","type":"module","repository":{"type":"git","url":"git+https://github.com/cute-me-on-repos/flated-react.git"},"keywords":["reactjs","react","context","hell","callback","hell","lib"],"author":{"name":"Kairis - Lý Lưỡng Thiên 🇻🇳"},"license":"MIT","bugs":{"url":"https://github.com/cute-me-on-repos/flated-react/issues"},"homepage":"https://thediligentengineer.com/the-flated-reaction","devDependencies":{"@jest/globals":"^29.7.0","@testing-library/react":"^16.0.0","@types/jest":"^29.5.12","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","react":"^18.3.1","react-dom":"^18.3.1","react-test-renderer":"^18.3.1","ts-jest":"^29.2.3","typescript":"^5.5.4"},"scripts":{"test":"jest","prebuild":"rm -rf dist","build":"pnpm run build:esm & pnpm run build:cjs & wait && echo '🎉 Parallelly built success'","build:esm":"tsc --incremental -p tsconfig.build.json","build:cjs":"tsc --incremental -p tsconfig.build.json --module commonjs --outDir dist/cjs"},"_id":"@cute-me-on-repos/flated-react@1.0.3","_integrity":"sha512-IAIak4iLFo956k4QxBz1e4PD3ObtiGajUd+TEnseusLlo6w7rdRJO2CeAFtgu/Yscu+GvSvpajcX3tSagQTG5g==","_resolved":"/tmp/1118edda514763649e7bfbe4e516fbef/cute-me-on-repos-flated-react-1.0.3.tgz","_from":"file:cute-me-on-repos-flated-react-1.0.3.tgz","_nodeVersion":"20.15.1","_npmVersion":"10.7.0","dist":{"integrity":"sha512-IAIak4iLFo956k4QxBz1e4PD3ObtiGajUd+TEnseusLlo6w7rdRJO2CeAFtgu/Yscu+GvSvpajcX3tSagQTG5g==","shasum":"b455eb2ad0663fc0811e737418848c7076721e35","tarball":"https://registry.npmjs.org/@cute-me-on-repos/flated-react/-/flated-react-1.0.3.tgz","fileCount":11,"unpackedSize":28315,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAg+JwcBK2aBQS4672DN3yxIJnqJ7zdR2t0lhYKuvtIVAiEA32ZmrGO25Gbwn3jVofGxd3rg+4TO3hV3OAOWLt1wkPI="}]},"_npmUser":{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"},"directories":{},"maintainers":[{"name":"lyluongthien-tiki","email":"thien.ly@tiki.vn"},{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/flated-react_1.0.3_1722168446900_0.4010310518743636"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-28T11:22:35.393Z","modified":"2024-07-28T12:07:27.335Z","1.0.0":"2024-07-28T11:22:35.737Z","1.0.1":"2024-07-28T11:42:05.117Z","1.0.2":"2024-07-28T11:56:31.041Z","1.0.3":"2024-07-28T12:07:27.078Z"},"bugs":{"url":"https://github.com/cute-me-on-repos/flated-react/issues"},"author":{"name":"Kairis - Lý Lưỡng Thiên 🇻🇳"},"license":"MIT","homepage":"https://thediligentengineer.com/the-flated-reaction","keywords":["reactjs","react","context","hell","callback","hell","lib"],"repository":{"type":"git","url":"git+https://github.com/cute-me-on-repos/flated-react.git"},"description":"`flated-react` is a react typescript libary that is used to Flatten nested React components and remove React context hells","maintainers":[{"name":"lyluongthien-tiki","email":"thien.ly@tiki.vn"},{"name":"lyluongthien","email":"lyluongthien1002@gmail.com"}],"readme":"# FLATED REACT\n`flated-react` is a react libary that used to Flatten nested React components and remove React context hells\n## Install\n\n```bash\nnpm install --save @cute-me-on-repo/flated-react\npnpm install @cute-me-on-repo/flated-react\nyarn add @cute-me-on-repo/flated-react\n\n```\n\n## Usage\n\nGiving an example react components/context hell:\n\n\n```tsx\n// {...deps imports}\n\nexport default function ReactComponent({children}:{ children: ReactNode }){\n    const session = getExampleServerSesion()\n\n    return (\n        <>\n            <TooltipProvider>\n                <AuthProvider session={session}>\n                    <IntercomProvider>\n                        <EmailVerificationProvider>\n                            <ThemeProvider\n                                attribute='class'\n                                defaultTheme='dark'\n                                enableSystem\n                            >\n                                {children}\n                            </ThemeProvider>\n                        </EmailVerificationProvider>\n                    </IntercomProvider>\n                </AuthProvider>\n            </TooltipProvider>\n        </>\n    )\n}\n```\n\nUpdate the code using `flated-react`:\n### Import `flated-react`\n```tsx\nimport FlatedReact from \"@cute-me-on-repo/flated-react\";\n```\n### Update the `hell`\n```tsx\n// {...deps imports}\n\nexport default function ReactComponent({children}:{ children: ReactNode }){\n    const session = getExampleServerSesion()\n\n    return (\n        <FlatedReact.Wrap\n          components={[\n            FlatedReact.Load(TooltipProvider),\n            FlatedReact.Load(AuthProvider, { session }),\n            FlatedReact.Load(IntercomProvider),\n            FlatedReact.Load(EmailVerificationProvider),\n            FlatedReact.Load(ThemeProvider, {\n              attribute: 'class',\n              defaultTheme: 'dark',\n              enableSystem: true,\n            }),\n          ]}\n        >\n          {children}\n        </FlatedReact.Wrap>\n    )\n}\n```\n## Notes\n`FlatedReact.Load` is for component props type checking only, it is not neccessary in js, you can use the following code but we will not recommend it:\n\n```tsx\nimport FlatedReact from \"@cute-me-on-repo/flated-react\";\n// {...deps imports}\n\nexport default function ReactComponent({children}:{ children: ReactNode }){\n    const session = getExampleServerSesion()\n\n    return (\n        <FlatedReact.Wrap\n          components={[\n            TooltipProvider,\n            [AuthProvider, { session })],\n            IntercomProvider,\n            EmailVerificationProvider,\n            [ThemeProvider, {\n              attribute: 'class',\n              defaultTheme: 'dark',\n              enableSystem: true,\n            }],\n          ]}\n        >\n          {children}\n        </FlatedReact.Wrap>\n    )\n}","readmeFilename":"README.MD"}