{"bugs":{"url":"https://github.com/alibaba/rax/issues"},"dist":{"shasum":"f1fb54a6ed386c9880a8bc30ad97dc0f23c05d9f","tarball":"https://registry.npmjs.org/style-unit/-/style-unit-3.0.1-0.tgz","fileCount":3,"integrity":"sha512-jGAy+Viof2MkOXHkkhJIO6QVmNKg2l9R74MoyZ4HTQj9g+frNhfXt6Se7KCXHF6Yl4LtpZrq41CY0fH5wydYZQ==","signatures":[{"sig":"MEYCIQDhOdWPrBHHVxWzQI/avN3SeXcccnCHPBA/Tn09B+sqfAIhAMgLcKUetUTfBry67jrWTA2vemzwIhXQjvVE6TCzCYks","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5656,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAU+qCRA9TVsSAnZWagAAquwP+gM4HmfykMb/RPMYEajw\nlUWU7j2hWrgkpFjF4BFKmhkA9J5B5n3b9iGRCyVJe/A+8XIPb3ABkODs4UW8\nrnhS4VfdwB3TWNru9gLbJxAXXVgaEdH3jI4RzW8QKUV/bZ9LKPe3Hz+bMVQo\n0yXX1iirbzQzB2+gscfrQMY8BuY7+okV1+vJ1o6IRRvXE5gSSLR6OULdkuPc\n3kU3IZa06qDNxjs4b94Njs5lbIvmrekn5v/XY99BKBzcMCtwPuUR5duVH68i\nivEjUA+OQeivdgdV6Va6XWKBuMjKSYlO4Tbl1Qi4xUQq8up8fM5XYyMdlWOB\nLZ13G/g3269IppXcDooA9fwZSB2OOP7rP9Bc4YcmcKZtTqBvJPbRDVEABiNu\ngKwxlElQg6KUYPK0YDb6JUlu52TdhE6HlHuN8/igERN7K4k7V3/mNPZWim+o\npwivZqWHuQx8QulZ6uoZdQpG9+nxLnwghlp40HiSFY9s6F0mOZnCERYQ4D/t\nkBBC23j/AAJjthjvrOo5UYviExnnPsPeZcisOh/O2zZfCRUJQ6RM0MzYFo5B\nd1SsLffShLCFFNjyjwnro/grWxEWK11+GVIl8OKCYqwuNyrqK1GY2b0ZForV\n5m+9m9WuVy7bBYuJ1Jeky1CE6403FnNnWHgf2R7sTi4geISHeXjwKBWQsol6\nOMhf\r\n=OabO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"style-unit","readme":"# style-unit\n\n> Unit conversion for calculating dimensional css attributes, especially for rpx.\n\n## API\n\nconvertUnit(value, prop, platform);\n\n| Property | Type          | Required | Description                                                  |\n| -------- | ------------- | -------- | ------------------------------------------------------------ |\n| value    | string/number | true     |                                                              |\n| prop     | string        | true     |                                                              |\n| platform | string        | false    | Auto assignment with [universal-env](https://www.npmjs.com/package/universal-env), different platforms have different rpx conversion. Details are as follows. |\n\n## Web \n\nIn Web, Calculate rpx to vw (relative to viewport width 750). \n\n750rpx -> 100vw\n\n### setViewportWidth\n\nYou can use `setViewportWidth` method update viewport width\n\nsetViewportWidth(1500);\n\n750rpx -> 50vw\n\n\n## Weex \n\nIn Weex, Calculate rpx to px (viewport width is 750). \n\n750rpx -> 750px\n\n### setRpx\n\nYou can use `setRpx` method update coefficient of 750\n\nsetRpx(1500 / 750)\n\n750rpx -> 1500px\n\n## MiniApp\n\nrpx (responsive pixel): Adaptable to the screen width in MiniApp. The specified screen width is 750 rpx. If the screen width on iPhone6 is 375 px (750 physical pixels), then 750 rpx = 375 px = 750 physical pixels, i.e. 1 rpx = 0.5 px = 1 physical pixel.\n\n## Node.js\n\nUse Weex result:\n```\nconvertUnit('500rpx', 'width', 'weex')\n```\nUse Web result:\n```\nconvertUnit('500rpx', 'width', 'web')\n```","license":"BSD-3-Clause","_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"homepage":"https://github.com/alibaba/rax#readme","repository":{"url":"git+https://github.com/alibaba/rax.git","type":"git"},"_npmVersion":"6.14.5","description":"style-unit","directories":{},"maintainers":[{"name":"zeroling","email":"wssgcg1213@qq.com"},{"name":"wintercn","email":"csf178@gmail.com"},{"name":"yuanyan","email":"yuanyan.cao@gmail.com"},{"name":"fyangstudio","email":"18767120422@163.com"},{"name":"oraaange","email":"oraaangecolin@gmail.com"},{"name":"yacheng","email":"narutosun2@163.com"},{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_nodeVersion":"12.18.1","dependencies":{"universal-env":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/style-unit_3.0.1-0_1610698665658_0.033335165053226756","host":"s3://npm-registry-packages"},"_id":"style-unit@3.0.1-0","version":"3.0.1-0"}