{"_id":"@asyarb/goobed","_rev":"3-aa16146eb41ea68a218ef983ca5444e8","name":"@asyarb/goobed","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.1":{"version":"0.1.1","license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","dev":"tsdx watch --transpileOnly","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","prerelease":"yarn build","release":"standard-version"},"peerDependencies":{"clsx":">=1.1.1","goober":">=2","react":">=17"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@asyarb/goobed","author":{"name":"Anthony Yarbrough"},"module":"dist/sx.esm.js","size-limit":[{"path":"dist/sx.cjs.production.min.js","limit":"10 KB"},{"path":"dist/sx.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^4.9.2","@types/react":"^17.0.1","@types/react-dom":"^17.0.0","clsx":"^1.1.1","goober":"^2.0.30","husky":"^5.0.9","react":"^17.0.1","react-dom":"^17.0.1","react-polymorphic-types":"^1.0.3","size-limit":"^4.9.2","standard-version":"^9.1.0","tsdx":"^0.14.1","tslib":"^2.1.0","typescript":"^4.1.5"},"description":"Very opinionated light abstractions for CSS-in-JS styling built on top of [`goober`](https://github.com/cristianbote/goober).","licenseText":"MIT License\n\nCopyright (c) 2021 Anthony Yarbrough\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"@asyarb/goobed@0.1.1","dist":{"shasum":"587628a55dd05f62f0ebad01817d0f6553b69b94","integrity":"sha512-nfw8OOv4TiJKvpg9I7Q/qA6hrEbbPy9qkrK6DCDKUI1WqzKSNBgIREkpb9N5FtZWWOzQaZoApz+X4tFgm7rAOg==","tarball":"https://registry.npmjs.org/@asyarb/goobed/-/goobed-0.1.1.tgz","fileCount":20,"unpackedSize":21117,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJ1c1CRA9TVsSAnZWagAAtqIP/2KY/iKeoGvH8y27YLRH\ns19ZDXbBHa/zihM34t4cKlBJtxnJG8PTux+/48zqnhTeRsQPQjd0djRgesct\nD6BzMFf4hF1zAwyV9W3Gz0iH+qcOo4aVPVmczzSlBVmGXFfn0AJPTm3Rw2ZM\nx/Si11Ydxko2Mnmx6t8ZxtURwmLZ1bu01lorM0fzeZwI4t8qR4DfIJL0kGDv\nq3H5ahqM/FZLitWyv3oRI687nSNH8V1DBX2H+C6mD3TuwHxl3wRDJlBtcLp/\no0ksd16Ua2neAq3YL0USvxHQF53v5xBcRkirSQXlQn/NtOCeCexToVuWy4P2\nSOh0h0vu+mjaanof9+smJx19jglSgqSQkXp7kububiXarvei28/sLisgb2tA\nW8YoYgosLu3hlubcQLdUa64Eb2I33UZRwztT7aeazOeewz6hZ3TE2FefllPm\naU7FsHomA+Lw0e3JuxSOeLE7WDTMPoKXyuJ+r5DbIASgnGC4de0K54fyn1hv\nVC7gaZ+xyYY3NDBDX1hD5nIshadhtYBawOBOxzmEmYOMaj1Nel+UpLgWWK99\nwSKv1yDwtBOlgIlm6BABXG+jZuMglhzP0FL+wFPuvBnmAITJqY0C5OFOxRwO\nJxwBd537AHVR57nhHLaBZFZhr/PGA9rxR80LkIpc2LWQQfbBdbWoH3tll0Tf\njTIY\r\n=BAD/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+Y97FjF/klTOwTinryw6QKdAxg/zw0XthagtHWlHsegIhAJ5egaZErnBDrkv8PxB8mIpk0NFcxM/960GjrWgJHy8x"}]},"_npmUser":{"name":"asyarb","email":"asyarb@hawaii.edu"},"directories":{},"maintainers":[{"name":"asyarb","email":"asyarb@hawaii.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/goobed_0.1.1_1613190964895_0.23801073310231646"},"_hasShrinkwrap":false},"0.2.0":{"version":"0.2.0","license":"MIT","main":"dist/index.js","modern":"dist/goober.esm.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","dev":"tsdx watch --transpileOnly","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","prerelease":"yarn build","release":"standard-version"},"peerDependencies":{"clsx":">=1.1.1","goober":">=2","react":">=17"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@asyarb/goobed","author":{"name":"Anthony Yarbrough"},"module":"dist/sx.esm.js","size-limit":[{"path":"dist/sx.cjs.production.min.js","limit":"10 KB"},{"path":"dist/sx.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^4.9.2","@types/react":"^17.0.1","@types/react-dom":"^17.0.0","clsx":"^1.1.1","goober":"^2.0.30","husky":"^5.0.9","react":"^17.0.1","react-dom":"^17.0.1","size-limit":"^4.9.2","standard-version":"^9.1.0","tsdx":"^0.14.1","tslib":"^2.1.0","typescript":"^4.1.5"},"dependencies":{"react-polymorphic-types":"^1.0.3"},"description":"Very opinionated light abstractions for CSS-in-JS styling built on top of [`goober`](https://github.com/cristianbote/goober).","licenseText":"MIT License\n\nCopyright (c) 2021 Anthony Yarbrough\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"@asyarb/goobed@0.2.0","dist":{"shasum":"892ff46af1766edb7bc0d657971a7b3b0e9bdcf4","integrity":"sha512-gSd+RswBQPv4qP2HWdKFIByvTPX6ha4cXtT+yfA5rUZU90mUpMky8+90l6i1r3RyeEqB9BaGtqcW0W5/Bynuww==","tarball":"https://registry.npmjs.org/@asyarb/goobed/-/goobed-0.2.0.tgz","fileCount":20,"unpackedSize":21398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS9hnCRA9TVsSAnZWagAADb8P/18r9msi0FOuWs6DKHIQ\nKRKHUWJEoc0T1CXR+RoX1URGbnTW995+0eqmq7kHWhly86Yk2xJiXdku+l+L\ndAwXAI8RmW1rPNsdHsTISRwyhT52fRjuzxB3BZRMFN9Pbjaom0mn5hRbeW7W\nBhI28y3A8zV3t/12jCTm8Goks7eutAr4AnIC74MBZAkLMDs1uUIYqxAfS4lV\nMwZxQ79Fb6wHBMnYT3MlKka7A1fLF2HwJVg3NeMpS1eYDqiEkC8qEhvdbYHC\n/o7wxh+I3RZBZWrw1Vjg4l8aaqx6pY+++wLT78k2uN7LN6Iz538UkrUYLbRb\nlWrVNtT0ld501iC9d5xQFxMOEgCss+z3G+NOcZg/DbsyP0zElqRsuTO4ItQR\n2ofACum8UuhjtvsjzrqsPkpoUvVWGJFjo4zBAOMKoPYQ+U8eJx4fCP0mMV6/\nNhEyeaE2niZHAgLcXIY4MyBoxklw7DDpM4W4q//8Xapzw1EDDyvVmfnYDxrU\nkn8OQdXAGPCROpOXmyPSzC7vcbDDYNDgV7zwHaYK/njsxi00EADbjXPYXucJ\n2pK4S1Vi3fVnOKvL84gd4qKssCKJO5IE6u+bSARko9mJFjFoA7JH97eSS4HL\nGzHuS8y82lgRrI+nQv5esWEbtq1vfEn8xCfakVnCRVOzR8MXnhwhMg4yv4y/\nxE7z\r\n=y1r6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxCkoqCRJyVycBYuzZywotchPqfVEbZeFH2x11YB60kAIgH6eDzprftUHYyQl27/3NTFcULTsjr9NAl97PT4YHpi4="}]},"_npmUser":{"name":"asyarb","email":"asyarb@hawaii.edu"},"directories":{},"maintainers":[{"name":"asyarb","email":"asyarb@hawaii.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/goobed_0.2.0_1615583335432_0.9902911466990487"},"_hasShrinkwrap":false},"0.2.1":{"version":"0.2.1","license":"MIT","main":"dist/index.js","module":"dist/goobed.esm.js","typings":"dist/index.d.ts","engines":{"node":">=10"},"scripts":{"start":"tsdx watch","dev":"tsdx watch --transpileOnly","build":"tsdx build","test":"tsdx test --passWithNoTests","lint":"tsdx lint","prepare":"tsdx build","size":"size-limit","analyze":"size-limit --why","prerelease":"yarn build","release":"standard-version"},"peerDependencies":{"clsx":">=1.1.1","goober":">=2","react":">=17"},"husky":{"hooks":{"pre-commit":"tsdx lint"}},"prettier":{"printWidth":80,"semi":true,"singleQuote":true,"trailingComma":"es5"},"name":"@asyarb/goobed","author":{"name":"Anthony Yarbrough"},"size-limit":[{"path":"dist/sx.cjs.production.min.js","limit":"10 KB"},{"path":"dist/sx.esm.js","limit":"10 KB"}],"devDependencies":{"@size-limit/preset-small-lib":"^4.9.2","@types/react":"^17.0.1","@types/react-dom":"^17.0.0","clsx":"^1.1.1","goober":"^2.0.30","husky":"^5.0.9","react":"^17.0.1","react-dom":"^17.0.1","size-limit":"^4.9.2","standard-version":"^9.1.0","tsdx":"^0.14.1","tslib":"^2.1.0","typescript":"^4.1.5"},"dependencies":{"react-polymorphic-types":"^1.0.3"},"description":"Very opinionated light abstractions for CSS-in-JS styling built on top of [`goober`](https://github.com/cristianbote/goober).","licenseText":"MIT License\n\nCopyright (c) 2021 Anthony Yarbrough\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","_id":"@asyarb/goobed@0.2.1","dist":{"shasum":"6abb8746c25ff8eb67eb224e25a7245962227ee9","integrity":"sha512-TzxFww77GAu/nTiMDWw2/yGqcyBl6alwXu2JFYJX5d1vIS88+cYTStvsJ5FQ6StD5wyGhXGxmYk9QbmxG/uZ+g==","tarball":"https://registry.npmjs.org/@asyarb/goobed/-/goobed-0.2.1.tgz","fileCount":20,"unpackedSize":21576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgS9kBCRA9TVsSAnZWagAASIwP/1Le9z1TXpw1pDquaznj\n4z8Q7haItsBcwD0qQKOpOy57CN+GsMkL47KfFDO9MFSY1SoJGRVBs9PLTbHG\njxnrs46PT3YkJOlLVX/Y7C+kWMIgDyDQ6KsqD4efN/6kZQnq4y9DgIDJsElc\nl8XjUqAYBc43SRkFml2LY91bk1SZj7rb7jNIOQHTa/d3IHE64at8CHK7V8e7\nTE6gd6clvpEc1UQQhgf4bUnxcTdJxDEVWFTSnW+icRMxvsGmsODpFY83irQh\ny8nKOdPEOLZ8EBj8V1Chyjf2pS6UNeVWdC94fsQAIow0eoUM26PXZJYWH0ms\nheiXYwmr/8Q8r4KwiZ4QRzQTPdkIn7AFQO/BQsUrwME8lNUpztOFI2mniW1m\nBxJDS22/VAwZ7UDbVdMs7olQ1gPukEzGiQlG6hcG+UJZcgp1wZritf1b/PgB\nfTNTdxV1LfKc31nxfA36/CqmShjt5A6HWWFrPWZ1ey1uKyY554qt08PRYKHs\n2nkuSUrzS7CfT7yGKXwd4AWM2NOZ1jDBl3B01UULxgtpHzbX6ykp1L5AE3ra\nABiEGqaPLoKzfq2iONxdSc6cv3Slwp/ZVAaw+w3PwFEgiDTvzMjNGV9dfoY1\nTV0dRUyqwxK4rSKjFgZojmdpbGbsqpYZlC17BCbYqJhdwH+/VPwyim7ZRM71\nB9zz\r\n=7n9i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkG5XbVT87QkTr+Zh4vRki8KAuE4KUNU+3/jOSqxbppAiBkwIaPNnfiI/cgC7X2+CALMlQNI3jRQZfDRlkpjbWLoQ=="}]},"_npmUser":{"name":"asyarb","email":"asyarb@hawaii.edu"},"directories":{},"maintainers":[{"name":"asyarb","email":"asyarb@hawaii.edu"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/goobed_0.2.1_1615583488603_0.37399868628181077"},"_hasShrinkwrap":false}},"time":{"created":"2021-02-13T04:36:04.863Z","0.1.1":"2021-02-13T04:36:05.030Z","modified":"2022-04-04T16:00:49.565Z","0.2.0":"2021-03-12T21:08:55.575Z","0.2.1":"2021-03-12T21:11:28.773Z"},"maintainers":[{"name":"asyarb","email":"asyarb@hawaii.edu"}],"description":"Very opinionated light abstractions for CSS-in-JS styling built on top of [`goober`](https://github.com/cristianbote/goober).","author":{"name":"Anthony Yarbrough"},"license":"MIT","readme":"# Goobed (TBD)\n\nVery opinionated light abstractions for CSS-in-JS styling built\non top of [`goober`](https://github.com/cristianbote/goober).\n\n## Installation\n\n```bash\n# Install package and required `goober` peer-dependency:\nyarn install @asyarb/goobed goober\n\n# If you plan on using <Box />, install the required `clsx` peer-dependency.\nyarn install clsx\n```\n\n## Usage\n\n### CSS-style function\n\n```tsx\nimport { createSx } from '@asyarb/goobed';\n\nconst breakpoints = {\n  sm: '48rem',\n  md: '75rem',\n};\n\nconst sx = createSx(breakpoints);\n\n// Use it inline to create styles:\nconst Example = () => <div className={sx({ display: 'block' })} />;\n\n// sx() just returns a valid className, so it's usage is straightforward:\nconst redClassName = sx({ color: 'red' });\nconst PlainClassExample = () => <div className={redColor} />;\n\n// Define mobile-first, responsive styles with auto-complete for breakpoints:\nconst responsiveClassName = sx({ color: 'red', sm: { color: 'blue' } });\n```\n\n### React Integration\n\n```tsx\nimport { createBox } from '@asyarb/goobed';\n\nconst { Box, sx } = createBox(breakpoints); // => sx() is also available!\n\n// <Box /> supports a convenience `sx` prop for styling:\nconst BoxSXExample = () => <Box sx={{ display: 'block' }} />;\n\n// <Box /> supports polymorphism via the `as` prop with full TypeScript support:\nconst BoxAsExample = () => <Box as=\"img\" src=\"...\" sx={{ width: '300px' }} />;\nconst TypeSafetyExample = () => <Box as=\"a\" loading=\"lazy\" />; // => 'loading' is not a property of HTMLAnchorElement.\n\n// <Box /> supports auto-completed responsive styling too:\nconst BoxResponsive = () => (\n  <Box sx={{ color: 'red', sm: { color: 'blue' } }} />\n);\n```\n\n#### Extending Box\n\nCreating components with `sx` support can be done like the following:\n\n```tsx\nimport { BoxProps } from '@asyarb/goobed';\nimport { Box, breakpoints } from '../path/to/Box-And-Breakpoints';\n\n// Define your component's props as a union of BoxProps.\ntype StackProps<T extends React.ElementType = 'div'> = BoxProps<\n  typeof breakpoints,\n  T\n> & {\n  space: string;\n};\n\n// Extending React.ElementType is required for type-safe polymorphism.\nconst Stack = <T extends React.ElementType = 'div'>({\n  as,\n  sx,\n  space,\n  ...props\n}: StackProps<T>) => (\n  <Box\n    as={as as React.ElementType}\n    sx={{ display: 'flex', flexDirection: 'column', gap: space, ...sx }}\n    {...props}\n  />\n);\n\nconst Usage = () => <Stack space=\"1rem\" />;\n```\n\n### SSR\n\nSee [`goober`'s documentation](https://github.com/cristianbote/goober#ssr) on\nsetting up SSR. For NextJS example, check their examples repo.\n\n## Why?\n\nGoober (imo) provides a nice balance of performance, flexibility and\nperformance size for css-in-js. This library just provides mostly type-level\nand responsive helpers for authoring styles without sacrificing run-time performance.\n","readmeFilename":"README.md"}