{"_id":"react-native-pixel-perfect","_rev":"3-7b96cf80e7b182df483583b79cba1465","name":"react-native-pixel-perfect","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"react-native-pixel-perfect","version":"1.0.0","description":"helps you create pixel perfect apps by design","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native","pixel","perfect","relative","pixel perfect","pixel-perfect","react-native-pixel-perfect","design","ui","UI","size","dp","px","pixels","dpi","ratio","screens","cross platform","cross-platform","multipule screens"],"peerDependencies":{"react-native":"*"},"author":{"name":"omri himlebrand"},"license":"MIT","gitHead":"690b8a4abb14da9700df609d8f54f473654f403a","_id":"react-native-pixel-perfect@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"himelbrand","email":"himelbrand@gmail.com"},"dist":{"integrity":"sha512-9bxo2Qjw2IuZ9APXbDeLfVqwKVQo0LcPJzg0oZMkoDqXyStABpxRk91RYsm0xvMCZOvgW3EyB1vRYZkBBHJLeQ==","shasum":"b489c208f2f383d3149f778184c9b5087eac2444","tarball":"https://registry.npmjs.org/react-native-pixel-perfect/-/react-native-pixel-perfect-1.0.0.tgz","fileCount":4,"unpackedSize":8359,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4ZZWCRA9TVsSAnZWagAAeOcP/14n9I7eMAaCXbnyHKgP\natNLnlHcx/dg1z3+72SHiwbtVcU/7aQ8SafvB4TjO23MxTSwe+CnVPRikOlJ\nBAbkmlAl7Q4GQor5sGiHZVpJCM4OtwRwAlF3+m1uyyqdLpIj4jlwMotAmC2o\nQUG7cIqOaV5OQRJHTM7jFokIktxzO9TLzBzlAtaFe1XPv0/s3qqKGKMdc+1z\ny0c2vMESxr9xEO/sieJBcozUs4GJl+SunQYDqMMnaGWWzFPA0yN8d1T72dEQ\ndCaeC6KWc+hfTEy2EbqF26XgrmPz2P3HepupCXY6c7q8JNZf0o36aXnWquk0\nwhHEIbcPsapuSbR74g/1/DhJDoZr+b7rRwoq9T40rBBp6mHmyXJn8qcGUf6o\nKRq0ZVHpDZmywd6/MvlFVglHgQArIE40hMeuKZffV7gMw7f9LodpCM1gGnYv\nSBQXJD8OYMnEo+uG0lrpBJYApPYiC6pZZpsqEBzVFgkdqy2m/zi8fPTpYUtM\nDIyrNHZcD8KwXM3FKdUq+CH43hGlRYDiiHvCr2HAmpCxeRX5iKNxsYH8fcaz\nyQ4Sr2HDuvFVJ0OPmiMY5XmImziBl7gdQLc8TgEWbxbwC1KS6oViHV4kfTs0\nMcFlRnxBzXN+MZkjhHJCFYZDAuXAUDrQAybSX3WwOCYyFLhjNULGbEygpPzo\n45Ea\r\n=C5L5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf/C6pAy+bPppj7n+LyJwxLWc52ePEnqJ3yuWJZ4h87wIhAIFKA4t9W1Bdny5WXzApNEfbxWNX7a3q389NHq9H+1iL"}]},"maintainers":[{"name":"himelbrand","email":"himelbrand@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-pixel-perfect_1.0.0_1541510742174_0.7243250367962246"},"_hasShrinkwrap":false},"1.0.1":{"name":"react-native-pixel-perfect","version":"1.0.1","description":"helps you create pixel perfect apps by design","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react-native","pixel","perfect","relative","pixel perfect","pixel-perfect","react-native-pixel-perfect","design","ui","UI","size","dp","px","pixels","dpi","ratio","screens","cross platform","cross-platform","multipule screens","responsive"],"peerDependencies":{"react-native":"*"},"author":{"name":"omri himlebrand"},"license":"MIT","gitHead":"23f160da5666137fd8f7468ba9c97b37de02f052","_id":"react-native-pixel-perfect@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"himelbrand","email":"himelbrand@gmail.com"},"dist":{"integrity":"sha512-jklo50ZHyUV2cYwQujbw6wis6DbvwxpfKPnXteLAUj+3zk6iW4kzoL8Ce+ks5cs9NUDuRQVcKTICm0Y2du2J4Q==","shasum":"a316bea9b486a13ba6ced7849a4aa878fd37c875","tarball":"https://registry.npmjs.org/react-native-pixel-perfect/-/react-native-pixel-perfect-1.0.1.tgz","fileCount":4,"unpackedSize":8377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb4Za9CRA9TVsSAnZWagAAz7sP/0DMO/T8v9FFhfdWcr4X\nmn3/yygyziuDnVdWLtZeOyNglHsGgwj3f8/n+swBmHIBe7qe2ZISOUPtNNri\n2OPsUQ/s7EzrOIBnVqpoQyWqJkDfmoFDQxpldJaf2Owa9kBbpXUXu5y3OthA\nBdkA2aUqydGXwuD9FqEVM0hU/4nWmx5eD+BbJEZv5cb6CutOXBDkTfz1Ddko\nze0MFo2JTiGLFbGa33ebL6TOkQ31ZMyMi+JOZVyoMJY+w3t5EI4m5ZIN9yZX\nxzJY3Sc0cGkxPenMkos+8FPo/GxMYU6gXcDoYVGQ+9OHQ9mfC4laR4cmw9bZ\nuRZ16p8Oau3RU5tu7kDr0KqYgTDTRaTo+2M0ubUR2fvloFeBQIBuJKUkVr7t\nJQYC5UIHZA27e9M2mEKVyLks1bWdVOlAxO+nucJXu8IxMQZiqvozj9hPybMS\nQwiCHMX22cmOxULuurWWn/pRd88RJAj50LwXZUri1Ga7GdMkJ/2j5DS042ie\n5KMJO6jSLkcUyvdqrH2mE2DjjeCtpPJcghKasp4K41Qircb3y9wL0OItEH5S\nJ30wLccJ4Z5tOzoGyMaiLDzIaeH/E2CQUYoZIHU3iZbZZvk/ZU7d+jhzMDYh\nEJnT/JiPc2vlqLC8VMRC+xBxdIXnUENP+ntILVj+KTL5csZ1CtWKnv34q6rW\nZA1c\r\n=ka/Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBOkRIH+9nXZUFVGnK3hhwyv73pPanGgFlodLysg/pCQIhAMJG0mrvHAOeUinoMo1LL4lHzUyi5VCfDDtKDPgCmVXp"}]},"maintainers":[{"name":"himelbrand","email":"himelbrand@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-pixel-perfect_1.0.1_1541510845232_0.0074410266014242055"},"_hasShrinkwrap":false},"1.0.2":{"name":"react-native-pixel-perfect","version":"1.0.2","description":"helps you create pixel perfect apps by design","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"omri himelbrand","email":"himelbrand@gmail.com"},"homepage":"https://github.com/himelbrand/react-native-pixel-perfect","bugs":{"url":"https://github.com/himelbrand/react-native-pixel-perfect/issues"},"repository":{"type":"git","url":"git://github.com/himelbrand/react-native-pixel-perfect.git"},"keywords":["react-native","pixel","perfect","relative","pixel perfect","pixel-perfect","react-native-pixel-perfect","design","ui","UI","size","dp","px","pixels","dpi","ratio","screens","cross platform","cross-platform","multipule screens","responsive"],"peerDependencies":{"react-native":"*"},"license":"MIT","gitHead":"846614fce906b7512cf259b4c266f1b90e5bfbbf","_id":"react-native-pixel-perfect@1.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"himelbrand","email":"himelbrand@gmail.com"},"dist":{"integrity":"sha512-0IvYCNkxuQbQC9q4tI+C3i6o38nbx916p7gBRBWuPxDhKBCuTkVV3VukcfW6vtjRlwQm6kwQcF9OtI+yUBt+YA==","shasum":"8e6dc97e377caa4bd07f9e584ba438d53c0e25e8","tarball":"https://registry.npmjs.org/react-native-pixel-perfect/-/react-native-pixel-perfect-1.0.2.tgz","fileCount":4,"unpackedSize":8714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb59/QCRA9TVsSAnZWagAAUlkP/AyhhBzCWvwLK1FsbSci\nW2Xiiz/EeL3bMMgaeenf+IDxToo677d0HK6v+rSp18EIyszvSPs4sicFLB2r\nzZjQfcMXt7YHQru6UBJuXCkuOIfgpzBhIRd6S4pPN1136YMXnR6DWslSv68K\n/zxPaT0zwfJUHjRihvj36QpOBFHpwTwzP2tRyfajAzhm1Umvll8jKE/rIoQj\n6b8Te1IDZ1hBl8PWt7aa6GfPljo5kGdXzt9zQ/xYKHYmS8dllt9tM3QB7qNJ\nxhtp22rRYbRoKDUGi2bKnZ9zyXgHoZ7F7MH0w28RoX2AgxGJZ3Z6aEGT2zO3\nNIjhlfpbIgMRreqU2izGAKYMts+45t9S0r7sbIRY2o+KkFBHx318u2Inq3e7\nlDM3eJWI0UO2q1qNX/CEWCCawYhxfS76nsiAsS4ewxNs550OXlZJwRHgolEg\nnLsQqo3tt9EMvA6ns9vm2zj+qhtlMf3D0n/gXBg/HEHFGClk6N8gWzZeQDte\nangVDb+MgNLC1dWzKdPA2vOP45YD2cbmd8jlApfhknAOHOH/vjFY82BP5h4q\nkyfMFsTpK7hjptCSvu6AlCpPePdpKOKpGZXai7QR46valPqG/IxmXbY0McuD\nZV2OWOPoNnzwcFMaeF873RptkIfj04SDaXKN0sv0nZGdtvCWNV5dKqWql5XW\n8OcV\r\n=+SUO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHWQBcRAWBwuSRlXBznj+8M3z9ENjxslxk5MSoFa9TTAiEA4V2D+wLowAe0yeXZ/q4Z5MnHOwI2hyeEhVhdvAodqAA="}]},"maintainers":[{"name":"himelbrand","email":"himelbrand@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-pixel-perfect_1.0.2_1541922767606_0.6238511110686755"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-06T13:25:42.173Z","1.0.0":"2018-11-06T13:25:42.328Z","modified":"2022-05-14T20:40:32.841Z","1.0.1":"2018-11-06T13:27:25.422Z","1.0.2":"2018-11-11T07:52:47.730Z"},"maintainers":[{"name":"himelbrand","email":"himelbrand@gmail.com"}],"description":"helps you create pixel perfect apps by design","keywords":["react-native","pixel","perfect","relative","pixel perfect","pixel-perfect","react-native-pixel-perfect","design","ui","UI","size","dp","px","pixels","dpi","ratio","screens","cross platform","cross-platform","multipule screens","responsive"],"author":{"name":"omri himelbrand","email":"himelbrand@gmail.com"},"license":"MIT","readme":"# react-native-pixel-perfect\n\nhelps you create pixel perfect apps by design, no matter the screen\n\n## About\n\nThis module was created for developers who create react-native apps from design and wants to keep their app pixel perfect across all devices, quickly and easily.\n\nAll you require to use this module is a design for an app, using one type of size units, for example pixels.\n\nThen you need to measure the screen size in the design and use the create function to genrate a function to compute the correct size for the current device, see more info below.\n\nThis method is in use in production in more than a few apps both for android and for ios, works perfectly both for layout and font sizes, as long as the font sizes in the design uses the same type of size unit.\n\n**NOW ALL YOU NEED TO DO IS TO PLUG THE MESAUREMENTS YOU TAKE FROM YOUR DESIGN** inside the perfectSize function and your app will look great on **ALL DEVICES**\n\n**The module comes with predefined resolutions for Apple devices**, see more info below.\n\n## Installation\n\n```bash\nyarn add react-native-pixel-perfect\n```\n\nor with npm\n\n```bash\nnpm install react-native-pixel-perfect --save\n```\n\n[link to npm page](https://www.npmjs.com/package/react-native-pixel-perfect)\n\n## Usage\n\n### import\n\n```javascript\nimport { create } from 'react-native-pixel-perfect'\n```\n\nor\n\n```javascript\nimport { create, PREDEF_RES } from 'react-native-pixel-perfect'\n```\n\nin case you want to use one of the presets screen resolutions, see table down below\n\n### Basic Usage - custom screen size\n\n**Important**: you can enter what kind of size you want and always use the same unit type. (for example: px,dp,dpi,etc.)\n\n```javascript\nconst designResolution = {\n    width: 1125,\n    height: 2436\n} //this size is the size that your design is made for (screen size)\nconst perfectSize = create(designResolution)\n\nperfectSize(50)// returns the actual size needed to make 50 fit the screen perfectly according to original design\n```\n\n### Basic Usage - predefined screen size (pixels)\n\n```javascript\nimport { create, PREDEF_RES } from 'react-native-pixel-perfect'\n\nconst perfectSize = create(PREDEF_RES.iphoneX.px)\n\nperfectSize(50)// returns the actual size needed to make 50 fit the screen perfectly according to original design\n```\n\n### Basic Usage - predefined screen size (points)\n\n```javascript\nimport { create, PREDEF_RES } from 'react-native-pixel-perfect'\n\nconst perfectSize = create(PREDEF_RES.iphoneX.dp)\n\nperfectSize(50)// returns the actual size needed to make 50 fit the screen perfectly according to original design\n```\n\n## Availble Predefined Resolutions\n\nDevice                              | Key         | pixels      | points\n------------------------------------|-------------|-------------|------------\n**iPhone X**                        |`iphoneX`    | 1125 x 2436 | 375 x 812  |\n**iPhone 8 Plus**                   |`iphone8P`   | 1080 x 1920 | 414 x 736  |\n**iPhone 8**                        |`iphone8`    | 750 x 1334  | 375 x 667  |\n**iPhone 7 Plus**                   |`iphone7P`   | 1080 x 1920 | 414 x 736  |\n**iPhone 6s Plus**                  |`iphone6sP`  | 1080 x 1920 | 375 x 667  |\n**iPhone 6 Plus**                   |`iphone6P`   | 1080 x 1920 | 375 x 667  |\n**iPhone 7**                        |`iphone7`    | 750 x 1334  | 375 x 667  |\n**iPhone 6s**                       |`iphone6s`   | 750 x 1334  | 375 x 667  |\n**iPhone 6**                        |`iphone6`    | 750 x 1334  | 375 x 667  |\n**iPhone SE**                       |`iphoneSE`   | 640 x 1136  | 320 x 568  |\n\n### How to access predefined resolution\n\nAll you need to do is look at the table above and then use the imported BASE_RES object like so:\n\nfor pixels:\n\n```javascript\nPREDEF_RES.key.px\n```\n\nor\n\n```javascript\nPREDEF_RES[key].px\n```\n\nfor points:\n\n```javascript\nPREDEF_RES.key.dp\n```\n\nor\n\n```javascript\nPREDEF_RES[key].dp\n```\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).\n\n## License\n\nThis project is licensed under the MIT License","readmeFilename":"README.md","homepage":"https://github.com/himelbrand/react-native-pixel-perfect","repository":{"type":"git","url":"git://github.com/himelbrand/react-native-pixel-perfect.git"},"bugs":{"url":"https://github.com/himelbrand/react-native-pixel-perfect/issues"}}