{"_id":"@astii/autofit","_rev":"3-b916167d589eb416f23edf316f4b43d7","name":"@astii/autofit","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@astii/autofit","version":"0.0.1","description":"autofit","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"dev":"father dev","build":"father build","build:deps":"father prebundle","prepublishOnly":"father doctor && npm run build"},"keywords":["autoFit","autoScale"],"authors":["1302947749@qq.com"],"license":"MIT","publishConfig":{"access":"public"},"devDependencies":{"father":"^4.4.1"},"_id":"@astii/autofit@0.0.1","gitHead":"772a0179029dd3cc7a7cb5dbd3ac4d25970448f5","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-De9ESRaTO2eeOt4oQCkvNUCHyOp4/X9yNsKJEDZOJhKKnPogBFdmY+K6Yoi+l8SxF8uIOKzhkIxPAJ9oGpx5oQ==","shasum":"2692455e4035e97098406eab594b5340ef73f613","tarball":"https://registry.npmjs.org/@astii/autofit/-/autofit-0.0.1.tgz","fileCount":11,"unpackedSize":9512,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICo415JGlTQ/FmsY4L4KDykINCeztBZEzfoYwOnf+h5qAiB9KitVtolRmuWcVoXQEc0ZvsEED3S/UN4g8SN5M6Pqiw=="}]},"_npmUser":{"name":"tangxiaoxin","email":"1302947749@qq.com"},"directories":{},"maintainers":[{"name":"tangxiaoxin","email":"1302947749@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autofit_0.0.1_1715924134368_0.8351402280505851"},"_hasShrinkwrap":false},"0.0.2":{"name":"@astii/autofit","version":"0.0.2","description":"autofit","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"dev":"father dev","build":"father build","build:deps":"father prebundle","prepublishOnly":"father doctor && npm run build"},"keywords":["autoFit","autoScale"],"authors":["1302947749@qq.com"],"license":"MIT","publishConfig":{"access":"public"},"devDependencies":{"father":"^4.4.1"},"_id":"@astii/autofit@0.0.2","gitHead":"d669ffaf17056db284f50bb3b3415a3036f4be89","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-HMfPtM8RJSZkBud19yAtjOaxIuiwzsS9UkjHvsSWtb+dwFcXVAo/vrh1a/AKH3q6FVln6LdpsxW9kxW8SHSaog==","shasum":"c2e797f5f882883ebf3d65c83d9a5c5001fa12ab","tarball":"https://registry.npmjs.org/@astii/autofit/-/autofit-0.0.2.tgz","fileCount":11,"unpackedSize":9500,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF0S3GXTrIHhgdefhntrIZ4W2889+CxOYOnrr+57mWL4AiEA4lmWbSNzvDFDVqNX+SICwa8sA9/F+DwOE56Qm4Z/YKc="}]},"_npmUser":{"name":"tangxiaoxin","email":"1302947749@qq.com"},"directories":{},"maintainers":[{"name":"tangxiaoxin","email":"1302947749@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autofit_0.0.2_1715925238724_0.5938225569860944"},"_hasShrinkwrap":false},"0.0.3":{"name":"@astii/autofit","version":"0.0.3","description":"autofit","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"dev":"father dev","build":"father build","build:deps":"father prebundle","prepublishOnly":"father doctor && npm run build"},"keywords":["autoFit","autoScale"],"authors":["1302947749@qq.com"],"license":"MIT","publishConfig":{"access":"public"},"devDependencies":{"father":"^4.4.1"},"_id":"@astii/autofit@0.0.3","gitHead":"b175c61f8ae16c6467cf32559363188105f4e87b","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-ONmcUYxXXahAufXkD3aS4AiFygEFd44P8GC+Hpk7dc/vfyNDSdBaI5Ows35Fdkl59XeuP8KrAmJgSr8MUYExGA==","shasum":"2342eec8267023de9fce709359688a14660ecc93","tarball":"https://registry.npmjs.org/@astii/autofit/-/autofit-0.0.3.tgz","fileCount":11,"unpackedSize":9573,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSsSPalUoJ70MXk2aa3mShei0QERs2HfT3Do7A3tFGOAiAkfoaB9kIvuJf3G+E7SCJ4yb9Kc5pQlZb338tpTpy9/A=="}]},"_npmUser":{"name":"tangxiaoxin","email":"1302947749@qq.com"},"directories":{},"maintainers":[{"name":"tangxiaoxin","email":"1302947749@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autofit_0.0.3_1715925665638_0.24738432210600902"},"_hasShrinkwrap":false},"0.0.4":{"name":"@astii/autofit","version":"0.0.4","description":"autofit","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","scripts":{"dev":"father dev","build":"father build","build:deps":"father prebundle","prepublishOnly":"father doctor && npm run build"},"keywords":["autoFit","autoScale"],"authors":["1302947749@qq.com"],"license":"MIT","publishConfig":{"access":"public"},"devDependencies":{"father":"^4.4.1"},"_id":"@astii/autofit@0.0.4","gitHead":"7d1e0af133daed63efc98af12ab9fc9ec9cde753","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-LBJttJEwVjNFjhN5dzBh1joBRXvPzNYyELD0+W9/89z1prCaf8FUsFBLdfJ/onhAprE3OUrGpCogwcesriHfbQ==","shasum":"c67002cb061bb5af18e5d7f51d9f723db667ec23","tarball":"https://registry.npmjs.org/@astii/autofit/-/autofit-0.0.4.tgz","fileCount":11,"unpackedSize":10539,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9oGFajg2QQGM6zD32R4KXFjlcgrG45jIeVLJks19WMQIgV4U4A7csuhJNCnScl6qR6a/ot/Hehaj+RetKjPzpMo4="}]},"_npmUser":{"name":"tangxiaoxin","email":"1302947749@qq.com"},"directories":{},"maintainers":[{"name":"tangxiaoxin","email":"1302947749@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/autofit_0.0.4_1715927371194_0.4550630366929789"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-17T05:35:34.206Z","0.0.1":"2024-05-17T05:35:34.549Z","modified":"2024-05-17T06:29:31.564Z","0.0.2":"2024-05-17T05:53:58.934Z","0.0.3":"2024-05-17T06:01:05.803Z","0.0.4":"2024-05-17T06:29:31.353Z"},"maintainers":[{"name":"tangxiaoxin","email":"1302947749@qq.com"}],"description":"autofit","keywords":["autoFit","autoScale"],"license":"MIT","readme":"# @astii/autofit\n\n[![NPM version](https://img.shields.io/npm/v/@astii/autofit.svg?style=flat)](https://npmjs.com/package/@astii/autofit)\n[![NPM downloads](http://img.shields.io/npm/dm/@astii/autofit.svg?style=flat)](https://npmjs.com/package/@astii/autofit)\n\n## Usage\n\n```bash\n$ yarn add @astii/autofit\n```\n\n### autoScale\n\n```tsx\n//entry of app\nimport { autoFit, autoScale } from \"@astii/autofit\";\n\nautoScale({ dw: 375 });\n```\n\n### autoFit\n\n```tsx\n//entry of app\nimport { autoFit, autoScale } from \"@astii/autofit\";\n\nautoFit({ dw: 375, dh: 667 });\n```\n\n#### with \"viewport\"\n\n\"px\" need convert to **\"vw\"** and **\"vh\"**\n\n```css\n.card {\n  /* width: 300px;\n  height: 300px; */\n  width: calc(300 * var(--pxw));\n  height: calc(300 * var(--pxh));\n}\n```\n\n#### with \"rem\"\n\n\"px\" need convert to **\"rem\"**\n\n```css\n.card {\n  /* width: 300px;\n  height: 300px; */\n  width: calc(300 / var(--rem));\n  height: calc(300 / var(--rem));\n}\n```\n\n## Options\n\n| Name    | Type                | Default            | Description   |\n| ------- | ------------------- | ------------------ | ------------- |\n| dw      | number              | -                  | design width  |\n| dh      | number              | window.innerHeight(viewport mode default to 100) | design height |\n| fitType | \"viewport\" \\| \"rem\" | \"viewport\"         | autoFit type  |\n\n## LICENSE\n\nMIT\n","readmeFilename":"README.md"}