{"_id":"@agungkes/react-native-scalable-image","_rev":"2-2b92d2e74fb3fb446f193c9be74f8211","name":"@agungkes/react-native-scalable-image","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"name":"@agungkes/react-native-scalable-image","version":"1.0.1","license":"MIT","description":"React Native Image component which scales width or height automatically to keep the aspect ratio. Using React Native Fast Image as ImageComponent","keywords":["react-native","image","component","scalable","aspect-ratio","scales-width","scales-height"],"homepage":"https://github.com/ihor/react-native-scalable-image","bugs":{"url":"https://github.com/ihor/react-native-scalable-image/issues"},"author":{"name":"Ihor Burlachenko","email":"ihor.burlachenko@gmail.com","url":"http://ihor.burlachenko.com"},"repository":{"type":"git","url":"git+https://github.com/Agungkes/react-native-scalable-image"},"dependencies":{"react-native-fast-image":"^7.0.2"},"devDependencies":{},"peerDependencies":{"@types/react":"^16.9.5","@types/react-native":"^0.60.19","prop-types":"^15.7.2","react":"^16.8.3","react-native":"^0.61.2"},"scripts":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2019 Ihor Burlachenko\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and\nto permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\nTHE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"@agungkes/react-native-scalable-image@1.0.1","dist":{"shasum":"5bb17ef2d12a7e3edbb090bc4e2c702eb8e12f73","integrity":"sha512-RRV9+Fp4yq+e4WBSvWd+ac00Z1ozptlDwxXd79NIqW2jaiZ1QxFb94LZJlw1SXLgzin4iBJp6aekdu2QciuSoA==","tarball":"https://registry.npmjs.org/@agungkes/react-native-scalable-image/-/react-native-scalable-image-1.0.1.tgz","fileCount":6,"unpackedSize":7457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnh8GCRA9TVsSAnZWagAASV4P/i0Bcsrjs++UmjeZwO81\nDv3yi1K4PFREgM2+DNuIuX5pJkWZfSowYTbl1I0nzqGo9Ca1di1x2Oe53SZt\njeQeXb5SvvO/FmFvmumGxj/uKIu44tQsOQAYJ9e4321wktlX2V0tXFMgxaSS\neY7T8POQwkD/jniNycPc5KDmkfWrNZADNejvh82T1MJAFm85vjFtekliDJ1i\nfUYOJUEU3hdAoEceoEC3L+aiAco2ql4WFORAYw0XBfrWuAG+wRb7YbphHCBO\nGN65JCPs2+XGFipFTdF+LqA+hUBCElJnWxOnF/Im6cGxz2uNUxGVtltK6nMs\nNkCcnY9IG7e6LRZO1xMUCA6VlYVWbE/IC17lJ/7gnVPOHcdWiXfsBGhZA3LV\nqt0wNEHviQGdTMAEwD+Uuf9DDTEUFqsdMfAEie6atVKpoECBvfmljgMCKx67\nuRWZFdosHfybbq010RE6i4Um+quUXQrluwj7zpz+s9WRW0NKqyI+GzHXp3Gt\n0lYuPn4C0/oVwK1axmLoU0S6Nb9oDyDMO7w3JXCogavIETZcEWOpY3UnV/qM\nTBoFp0dH2FfS9HJkRlW3uC5+S26/ZkX0m9CqgV5YGCtEb8vooE89ijJc2Fnc\n9n7a89poH1ANjclfRb11rmDhXSbqxjHGBm310B34nhSJvJeuAIWSl8lE/K7e\n5h5N\r\n=V1N5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDhF1kEkYQQARaHMThj5/B+p/cEiLcSJmV+mgj39RkCQIgDzWYG6RQ9MSO+DmCWA4BqO4v+1KbY8pm/sHdNhUWoAM="}]},"maintainers":[{"name":"agungkes","email":"cintarembo@gmail.com"}],"_npmUser":{"name":"agungkes","email":"cintarembo@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-scalable-image_1.0.1_1570643717456_0.7106877285277018"},"_hasShrinkwrap":false},"1.0.2":{"name":"@agungkes/react-native-scalable-image","version":"1.0.2","license":"MIT","description":"React Native Image component which scales width or height automatically to keep the aspect ratio. Using React Native Fast Image as ImageComponent","keywords":["react-native","image","component","scalable","aspect-ratio","scales-width","scales-height"],"homepage":"https://github.com/ihor/react-native-scalable-image","bugs":{"url":"https://github.com/ihor/react-native-scalable-image/issues"},"author":{"name":"Ihor Burlachenko","email":"ihor.burlachenko@gmail.com","url":"http://ihor.burlachenko.com"},"repository":{"type":"git","url":"git+https://github.com/Agungkes/react-native-scalable-image"},"dependencies":{"react-native-fast-image":"^7.0.2"},"devDependencies":{},"peerDependencies":{"@types/react":"^16.9.5","@types/react-native":"^0.60.19","prop-types":"^15.7.2","react":"^16.8.3","react-native":"^0.61.2"},"scripts":{},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2019 Ihor Burlachenko\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\ndocumentation files (the \"Software\"), to deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and\nto permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions\nof the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\nTHE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"@agungkes/react-native-scalable-image@1.0.2","dist":{"shasum":"2ae1ec52c20c14a78638167d51c9c22388c41d09","integrity":"sha512-vfGUEnkGZ6wEP7pxdFpxoqFTt1AYxRSiLlpa9cY4zD8hZBSkNOj29J534T70AfR51hv/0/XYlMQeegWTaTKeoQ==","tarball":"https://registry.npmjs.org/@agungkes/react-native-scalable-image/-/react-native-scalable-image-1.0.2.tgz","fileCount":6,"unpackedSize":7457,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdnh9BCRA9TVsSAnZWagAA1nEQAKHxwMUWOXGYXXWflALj\nkxfr/ibWXPc10J41FLPdoL0bzNyt4/ARV2izzzhQpSoM5iJmvFSLJqsQNJDQ\n4BB1s04m31GZoM1B1B4B006cP8mNbAulslrkfX2+mXFPikV8h5gW8vYnAqhv\npCrPgAUrPZ0XWS8dXLvaxAhaDLBlbqLkVSeeGr07PMKmZLJlVg12eTxWRvbW\nRLswnH3A2wSEpy6pLcOwPuFkWxQIZkT0EjNlxGKnW5Wh3E2hIcgZtZsSXYJV\n2ZVGpK22UZ7fHD7sV/UnAJQ7mtnw0pQ69SrY13d5SQ/mdFMlaXRlhM8SwMTu\nr7yWkC9vJggRsti+BRoWk6D/nKoX/eRiMO4o/IJUKbKYKiRc3PyxDH6IC2wB\n5KC0yBju+z96Wx2e3IH2HuJ/mhsM9+EHr+UPSui/EqlY/gJyJvTLoAldx0O1\nFaPfKI6+2mG6EUT2qJHA94vuHEwLAzhV9QKKdxUdOwHq7pw5uveGmzq0indz\nBUy87ze6CK0erbYZXafKH9y6eLyAn/6kLXYpZRZnQ+l0UWh7wS/woYIZ0xNC\ngzeAbeOXLuuelsXRdrfOmZaOEqoIqGyVIg5g9jXzgbtY9YbnJ63L6xVMddty\ncuGbajs8FV02oqe+J35cKY0DOMB2FbiuTWhsDgP2jNyBBVP5k5fSkoJqJCCR\nptDs\r\n=2DQl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5Z5XJ3eE0UHcM95KAyOuNKt5BL5SttTXhlYySxgcUWAIgadDWpGQ87sc560RgqvMqjaBtZeWodQYolyEtS2jwQWc="}]},"maintainers":[{"name":"agungkes","email":"cintarembo@gmail.com"}],"_npmUser":{"name":"agungkes","email":"cintarembo@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-scalable-image_1.0.2_1570643776520_0.042907031294209697"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-09T17:55:17.223Z","1.0.1":"2019-10-09T17:55:17.576Z","modified":"2022-04-04T12:08:51.414Z","1.0.2":"2019-10-09T17:56:16.637Z"},"maintainers":[{"name":"agungkes","email":"cintarembo@gmail.com"}],"description":"React Native Image component which scales width or height automatically to keep the aspect ratio. Using React Native Fast Image as ImageComponent","homepage":"https://github.com/ihor/react-native-scalable-image","keywords":["react-native","image","component","scalable","aspect-ratio","scales-width","scales-height"],"repository":{"type":"git","url":"git+https://github.com/Agungkes/react-native-scalable-image"},"author":{"name":"Ihor Burlachenko","email":"ihor.burlachenko@gmail.com","url":"http://ihor.burlachenko.com"},"bugs":{"url":"https://github.com/ihor/react-native-scalable-image/issues"},"license":"MIT","readme":"# React Native Scalable Image\n\nReact Native `<Image/>` component [does not keep the image aspect ratio](https://github.com/facebook/react-native/issues/858), which results in the image being stretched or cropped. `react-native-scalable-image` solves this problem by calculating the image size and resizing the image when rendering.\n\nThis library provides an `<Image/>` component which scales width or height automatically to keep the aspect ratio. It is useful when you don't know the aspect ratio in advance (e.g. user-uploaded content) but want to display the entire image and limit it only by width or height to fit the container component.\n\nThe following example creates an image which fits the full screen width and keeps the aspect ratio:\n\n```jsx\nimport React from 'react';\nimport { Dimensions } from 'react-native';\nimport Image from 'react-native-scalable-image';\n\nconst image = (\n  <Image\n    width={Dimensions.get('window').width} // height will be calculated automatically\n    source={{ uri: '<image uri>' }}\n  />\n);\n```\n\n# Install\n\n`npm install react-native-scalable-image --save`\n\nFollow instruction from RN Fast Image to get started\n\n# Usage\n\nSpecify width or height which may be calculated dynamically like in the example above. All other props are the same as in regular [React Native `<Image/>` component](https://facebook.github.io/react-native/docs/image.html).\n\n## props\n\n| name         | type     | default | description                                                                       |\n| ------------ | -------- | ------- | --------------------------------------------------------------------------------- |\n| `height`     | number   | none    | Maximum image height                                                              |\n| `width`      | number   | none    | Maximum image width                                                               |\n| `background` | boolean  | false   | Set to true when used as a background                                             |\n| `onPress`    | function | none    | onPress callback                                                                  |\n| `onSize`     | function | none    | Is called with `{ width, height }` as the first arg once image size is calculated |\n\n# Versions\n\nThe latest major version of `react-native-scalable-image` is implemented with hooks. If you are using a pre-hooks React version please use `react-native-scalable-image` version `0.5.1`\n\n| React Version | Scalable Image Version |\n| ------------- | ---------------------- |\n| < 16.8        | 0.5.1                  |\n| >= 16.8       | > 1.0.0                |\n","readmeFilename":"README.md"}