{"_id":"@alemesa/react-hooks","_rev":"3-f98528eb313c61f321fd800d4a3f9999","name":"@alemesa/react-hooks","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"version":"0.1.0","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why"},"peerDependencies":{"react":">=16"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@alemesa/react-hooks","author":{"name":"alemesa"},"module":"dist/react-hooks.esm.js","size-limit":[{"path":"dist/react-hooks.cjs.production.min.js","limit":"10 KB"},{"path":"dist/react-hooks.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^5.0.3","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","husky":"^7.0.1","react":"^17.0.2","react-dom":"^17.0.2","size-limit":"^5.0.3","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.3.5"},"description":"Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.","_id":"@alemesa/react-hooks@0.1.0","_nodeVersion":"14.8.0","_npmVersion":"7.6.3","dist":{"integrity":"sha512-7uX/Y0F+so8IeGBvINtJvUD1JZIyT1r8bJjQWoa7LvKksGGvSDXQjG2RowPHXF+Gg20aeTG/H58LdjLc9aDLeA==","shasum":"c0ccaae6e11a4ef8c5d091cbb2e3dbd7f5020c8e","tarball":"https://registry.npmjs.org/@alemesa/react-hooks/-/react-hooks-0.1.0.tgz","fileCount":16,"unpackedSize":16642,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHgllCRA9TVsSAnZWagAALKwP/1caJZcYtJEGPmVTv2JO\ntJBj6JOO+dZUlBxIlCZcrDatANUvLXaJuhxwLjoHZuwGQ7mXoJT6KmoZVapi\nTh72iVXCMjk9BMBCaBKZUE5zBI8tViY4MpPNyZYfMvwIVzd9Ye8+7+b7udHb\nYfS+n4eFtYYJM+UZJX4pLRtwVzQ1Nf4O/ZxTQ2D5rFMcW+dvbjWkrPCiX2Xw\nYCvkM+PTynBteqqYMKxo97DRew0/1CrYZvbGQK4RzNnbRV98rnIz0NWHNs1s\ne8EvVNIf6uChSvaf+AhtCPquPA5q7YHi6IZKYdfFwsKfPJlk9Sn/E/OzjT8i\n8U3raaJLKrkjIU8QhXU87LOi5NEIbFB3RjhZhboVc/FhM0u3o1caGbMerbiO\nGCReJAVxrtp2fAvSnEiCdd7+5Q5CVNaPiTN8l9GPT6FqkNT6VCBLHsYqUQ/A\nXPu6wHR022c6xAOsJJRZvNyz9JCOLrZePmXwycbwNNqbWMvYbIEIfUA49bbw\n/uL8LMHPthjm/J1jd8dMnJ49l0H/fRGNXpETmrP/LiIKy303FIjoCsnCU7W8\n4Cfs0L3NFwGMr4ekf1GGDlitR/e0Yg9LSNdQkYtESGaMXTUqaxHy5uQbZjvm\n+VuM5kNhQsK94y/AHjvhz7pOK4dwSIw6KKkbj5sr5LNOfsMUW1TZu4yfyP5H\nJlad\r\n=+4Lv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbmYWvhXiia1Y1F62DrgnDyvmqoYjRLb0gutq4A6kUGgIgTMhn67B4ERC3l1Ar+BX+f/oUjKW0kUIp46zhJeEjDrw="}]},"_npmUser":{"name":"alemesa","email":"notalemesa@gmail.com"},"directories":{},"maintainers":[{"name":"alemesa","email":"notalemesa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_0.1.0_1629358437359_0.8648652057323056"},"_hasShrinkwrap":false},"1.0.0":{"version":"1.0.0","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","semantic-release":"semantic-release --branches  main"},"peerDependencies":{"react":">=16"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@alemesa/react-hooks","author":{"name":"alemesa"},"module":"dist/react-hooks.esm.js","size-limit":[{"path":"dist/react-hooks.cjs.production.min.js","limit":"10 KB"},{"path":"dist/react-hooks.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^5.0.3","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","husky":"^7.0.1","react":"^17.0.2","react-dom":"^17.0.2","semantic-release":"^17.4.5","size-limit":"^5.0.3","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.3.5"},"repository":{"type":"git","url":"git+https://github.com/alemesa/react-hooks.git"},"gitHead":"1eeb0f4f87059bd266c12efc2762b4b75922d10a","description":"Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.","bugs":{"url":"https://github.com/alemesa/react-hooks/issues"},"homepage":"https://github.com/alemesa/react-hooks#readme","_id":"@alemesa/react-hooks@1.0.0","_nodeVersion":"14.17.5","_npmVersion":"7.20.6","dist":{"integrity":"sha512-XPRYP+RUJLrZ2/9GHFsGzDW5v9p86a7HuKyrwyg0Ibea0bGvhFFsJVdSBsiT58f9uCb56jaZaXTCfPOsgFc/zA==","shasum":"da96a6f57372256d68f2e02c13865b04cd8d4a0c","tarball":"https://registry.npmjs.org/@alemesa/react-hooks/-/react-hooks-1.0.0.tgz","fileCount":16,"unpackedSize":16850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHhjcCRA9TVsSAnZWagAASvQP/iSkgUgIaeJkiZxn760R\nZvjHeDVOhhseZx3E+VJwOrL4LHJzReZa9LZ1TXY+fRf+qhJL6gCqlZIZFsWp\nis3RbfjqWwu0nY75OJJPs9KM7Y77B9LOXIONIIndAvJ58hYAVzGRUhttysHK\n3m6auq2ImbCRHAChOhnldck4cqoi7XFqZakdBQKV0BBSyjcZbXqSgHKD0/xW\nok8RZXSC0UieTAEhTMMQLz9KBsgt9NeMMlZm/j0gQg9mSSPNBRQvTSqsmJZj\npNeqirdXGanIDq+jeYxTRcnckUhyT6HhZDGu+Dl0Gy6H/uoovs0WpjazuUQ2\nJMYxr26EzU89AWOpKAayzMMTo14CU0gQf0ANlU6SPoh/rdb+LxVIqu7NFzfV\niLPn6mU8p7bsDi446WL8f1C69KfJnB5NbDL7yIlNwdUPgDkR9wXJxwzIpyL7\nYzLqTZd+DTjdQY5v2CnpFYjlrZvn2OnYArhTNChuHIBF594W8f4VdXOxUYNL\nJNwmj9rACVPhzH8EzkIqY2Lm85myb3AbJtfWU1m/t3KPBoP1f03odgLzhEkP\n7jl57HJdQVOr07NFMMk1614T/8UrmfwUcQYnyYLkD2Kss4W2ja0TSp4HOGfM\ngEsuaY92/2ENL+UJeBVmUU9w+IsSjb8IKqZYuZqIKBx6xZ7kFiRPCLvbMhj+\ni83d\r\n=XXCL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtjk6BG+WlfGsrd7PPST9lFOwkI/MauKYAgKCNiRtAHgIgRrCDc6V5E/YtqE6EPOyOKZLVLngC5ydq4ZFyP4PQbDo="}]},"_npmUser":{"name":"alemesa","email":"notalemesa@gmail.com"},"directories":{},"maintainers":[{"name":"alemesa","email":"notalemesa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_1.0.0_1629362395944_0.39364331219565596"},"_hasShrinkwrap":false},"1.0.1":{"version":"1.0.1","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","semantic-release":"semantic-release --branches  main","storybook:watch":"start-storybook -p 6006 --docs --no-manager-cache","storybook:build":"build-storybook --docs -o ./storybook-build","storybook:deploy":"storybook-to-ghpages -s storybook:build"},"peerDependencies":{"react":">=16"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@alemesa/react-hooks","author":{"name":"alemesa"},"module":"dist/react-hooks.esm.js","size-limit":[{"path":"dist/react-hooks.cjs.production.min.js","limit":"10 KB"},{"path":"dist/react-hooks.esm.js","limit":"10 KB"}],"devDependencies":{"@babel/core":"^7.20.2","@size-limit/preset-small-lib":"^5.0.3","@storybook/addon-actions":"^6.5.13","@storybook/addon-essentials":"^6.5.13","@storybook/addon-interactions":"^6.5.13","@storybook/addon-links":"^6.5.13","@storybook/builder-webpack4":"^6.5.13","@storybook/manager-webpack4":"^6.5.13","@storybook/react":"^6.5.13","@storybook/testing-library":"^0.0.13","@types/react":"^17.0.19","@types/react-dom":"^17.0.9","babel-loader":"^8.3.0","husky":"^7.0.1","react":"^17.0.2","react-dom":"^17.0.2","semantic-release":"^17.4.5","size-limit":"^5.0.3","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.3.5"},"repository":{"type":"git","url":"git+https://github.com/alemesa/react-hooks.git"},"dependencies":{},"gitHead":"0e71ab4aa1a526b7935634dc0cca71ada5abd8f5","description":"Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.","bugs":{"url":"https://github.com/alemesa/react-hooks/issues"},"homepage":"https://github.com/alemesa/react-hooks#readme","_id":"@alemesa/react-hooks@1.0.1","_nodeVersion":"16.18.0","_npmVersion":"7.20.6","dist":{"integrity":"sha512-7DSMZqFoi7B8yBye8yErYS9LOZa6FhPXWzwvDkyCyPHXoy3pBlknU9NmYNfvxBRGLrw6KWRP5w8ld3wdliUEuA==","shasum":"4abb802a11609a87d7ed2ba7be2b85a58c98445d","tarball":"https://registry.npmjs.org/@alemesa/react-hooks/-/react-hooks-1.0.1.tgz","fileCount":38,"unpackedSize":54742,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE986UyitLE9a0cO5g20MgJWIuaJH/t4cZeBkh8MnB00AiBTURTpZw4XJrpIlq4F8WwxIP5S8rEWCCw96/W0B66HEg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjdy/9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoufg//YScJ2d+UhJcXRULwl5as/aj/ZsIRPzreT3B9GZ+DIZyXxvyb\r\nB9TO8a+V4VMKhPnRhwa7p1aZTir61VcLyjH+1YdW0WSNhJPBHVxcVJDqgUyk\r\n7NRAD4pRO0kfQLSoXcgVZ9r/AHQzsIKGJRlAfwihJMS+Z6gJHW0UKGSoFBM1\r\nbYHlqOJyfHKr0sWkNXV+/IUsFPeexe/IocbOF4tZx17rVbc6b0UJ8rfBfupK\r\nequuNepSJ/+0TARW99EZo5tELGR6bdkSpngPCUDFy1/kWL9yWT0T8DM4LeQc\r\nkXu4VuH+jKV4z0qR5Ublqp7REvOboyE2s9952f1GxB8P9sTjsHOiJ9fg/yff\r\nR5fKa7hnrjQfaEYTsafzVabnOiMXRCO7TMvF4x8vymPH1axGKRCH0vRTPWOc\r\nDJu6gSrk0Tr6OLgD9UY5gPrKWMmTNmUHkyvf+787sIf3WQtKq4VgNkHSFtEu\r\nXBUyHeoO2lKeW3o7zZzdDE1Y29YFIIDeL7ggKm+YZiGmDd1RE0ReMxnJwvR8\r\ndujmEg01ejzuqsAgdBOrPPiEIVgBNwSEHniTCmo80VZlyGMbfa5pxxm9fUEd\r\nj/E02ElhLA21fzLvpEQVfy5SOnV2icUzpMEKh5znq0G/KfOW0qd7vfERz44j\r\n1PWEQhIkR7/iqBnvdeE4vY8oy8Meyfoomhc=\r\n=q3fR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alemesa","email":"notalemesa@gmail.com"},"directories":{},"maintainers":[{"name":"alemesa","email":"notalemesa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-hooks_1.0.1_1668755453719_0.3135499726361699"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-19T07:33:57.267Z","0.1.0":"2021-08-19T07:33:57.510Z","modified":"2022-11-18T07:10:53.945Z","1.0.0":"2021-08-19T08:39:56.075Z","1.0.1":"2022-11-18T07:10:53.856Z"},"maintainers":[{"name":"alemesa","email":"notalemesa@gmail.com"}],"description":"Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.","author":{"name":"alemesa"},"license":"MIT","readme":"# TSDX React User Guide\n\nCongrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.\n\n> This TSDX setup is meant for developing React component libraries (not apps!) that can be published to NPM. If you’re looking to build a React-based app, you should use `create-react-app`, `razzle`, `nextjs`, `gatsby`, or `react-static`.\n\n> If you’re new to TypeScript and React, checkout [this handy cheatsheet](https://github.com/sw-yx/react-typescript-cheatsheet/)\n\n## Commands\n\nTSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.\n\nThe recommended workflow is to run TSDX in one terminal:\n\n```bash\nnpm start # or yarn start\n```\n\nThis builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.\n\nThen run the example inside another:\n\n```bash\ncd example\nnpm i # or yarn to install dependencies\nnpm start # or yarn start\n```\n\nThe default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, we use [Parcel's aliasing](https://parceljs.org/module_resolution.html#aliases).\n\nTo do a one-off build, use `npm run build` or `yarn build`.\n\nTo run tests, use `npm test` or `yarn test`.\n\n## Configuration\n\nCode quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.\n\n### Jest\n\nJest tests are set up to run with `npm test` or `yarn test`.\n\n### Bundle analysis\n\nCalculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.\n\n#### Setup Files\n\nThis is the folder structure we set up for you:\n\n```txt\n/example\n  index.html\n  index.tsx       # test your component here in a demo app\n  package.json\n  tsconfig.json\n/src\n  index.tsx       # EDIT THIS\n/test\n  blah.test.tsx   # EDIT THIS\n.gitignore\npackage.json\nREADME.md         # EDIT THIS\ntsconfig.json\n```\n\n#### React Testing Library\n\nWe do not set up `react-testing-library` for you yet, we welcome contributions and documentation on this.\n\n### Rollup\n\nTSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.\n\n### TypeScript\n\n`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.\n\n## Continuous Integration\n\n### GitHub Actions\n\nTwo actions are added by default:\n\n- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix\n- `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit)\n\n## Optimizations\n\nPlease see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:\n\n```js\n// ./types/index.d.ts\ndeclare var __DEV__: boolean;\n\n// inside your code...\nif (__DEV__) {\n  console.log('foo');\n}\n```\n\nYou can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.\n\n## Module Formats\n\nCJS, ESModules, and UMD module formats are supported.\n\nThe appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.\n\n## Deploying the Example Playground\n\nThe Playground is just a simple [Parcel](https://parceljs.org) app, you can deploy it anywhere you would normally deploy that. Here are some guidelines for **manually** deploying with the Netlify CLI (`npm i -g netlify-cli`):\n\n```bash\ncd example # if not already in the example folder\nnpm run build # builds to dist\nnetlify deploy # deploy the dist folder\n```\n\nAlternatively, if you already have a git repo connected, you can set up continuous deployment with Netlify:\n\n```bash\nnetlify init\n# build command: yarn build && cd example && yarn && yarn build\n# directory to deploy: example/dist\n# pick yes for netlify.toml\n```\n\n## Named Exports\n\nPer Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library.\n\n## Including Styles\n\nThere are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like.\n\nFor vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader.\n\n## Publishing to NPM\n\nWe recommend using [np](https://github.com/sindresorhus/np).\n\n## Usage with Lerna\n\nWhen creating a new package with TSDX within a project set up with Lerna, you might encounter a `Cannot resolve dependency` error when trying to run the `example` project. To fix that you will need to make changes to the `package.json` file _inside the `example` directory_.\n\nThe problem is that due to the nature of how dependencies are installed in Lerna projects, the aliases in the example project's `package.json` might not point to the right place, as those dependencies might have been installed in the root of your Lerna project.\n\nChange the `alias` to point to where those packages are actually installed. This depends on the directory structure of your Lerna project, so the actual path might be different from the diff below.\n\n```diff\n   \"alias\": {\n-    \"react\": \"../node_modules/react\",\n-    \"react-dom\": \"../node_modules/react-dom\"\n+    \"react\": \"../../../node_modules/react\",\n+    \"react-dom\": \"../../../node_modules/react-dom\"\n   },\n```\n\nAn alternative to fixing this problem would be to remove aliases altogether and define the dependencies referenced as aliases as dev dependencies instead. [However, that might cause other problems.](https://github.com/palmerhq/tsdx/issues/64)\n# react-hooks\n","readmeFilename":"README.md","homepage":"https://github.com/alemesa/react-hooks#readme","repository":{"type":"git","url":"git+https://github.com/alemesa/react-hooks.git"},"bugs":{"url":"https://github.com/alemesa/react-hooks/issues"}}