{"_id":"@blro/body-scroll-lock","_rev":"4-3af51b29ab3252d1f556b0c1ba5efb8c","name":"@blro/body-scroll-lock","dist-tags":{"latest":"1.0.2"},"versions":{"0.1.0":{"name":"@blro/body-scroll-lock","version":"0.1.0","license":"MIT","_id":"@blro/body-scroll-lock@0.1.0","maintainers":[{"name":"blrog0319","email":"gyeongtae020319@gmail.com"}],"homepage":"https://github.com/blro0319/body-scroll-lock#readme","bugs":{"url":"https://github.com/blro0319/body-scroll-lock/issues"},"dist":{"shasum":"fe99d76dc9269cc3dab3144e1113663acaa511e3","tarball":"https://registry.npmjs.org/@blro/body-scroll-lock/-/body-scroll-lock-0.1.0.tgz","fileCount":4,"integrity":"sha512-iz5ZdmlXBXahMZgnVbF2TPd79Z+PG+uoG8w8q53BS94bfQtdisRQxsV+uDkKAXD3tPlDk944GmDHAFpf2RDjfw==","signatures":[{"sig":"MEYCIQCr0KZmx7AgIadKL0K67cp4tvN0FwuekOxRA104fdfFYgIhANEblYb8bsSOi3gtcHtOgvsivcKONfJ0IiOJQQX82x6/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5777},"main":"dist/body-scroll-lock.umd.cjs","type":"module","types":"dist/types/index.d.ts","module":"dist/body-scroll-lock.js","gitHead":"a7594eb4b65d1d577e5526a3a828877505cc5149","scripts":{"dev":"vite --host","build":"tsc && vite build && npm run build:types","build:types":"tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --outDir dist/types"},"_npmUser":{"name":"blrog0319","email":"gyeongtae020319@gmail.com"},"repository":{"url":"git+https://github.com/blro0319/body-scroll-lock.git","type":"git","directory":"packages/core"},"_npmVersion":"9.6.4","directories":{},"_nodeVersion":"16.19.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^4.3.6","typescript":"^5.0.4","@types/node":"^20.1.5","@tsconfig/node20":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/body-scroll-lock_0.1.0_1684395680819_0.2604281163686366","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@blro/body-scroll-lock","version":"0.2.0","license":"MIT","_id":"@blro/body-scroll-lock@0.2.0","maintainers":[{"name":"blrog0319","email":"gyeongtae020319@gmail.com"}],"homepage":"https://github.com/blro0319/body-scroll-lock#readme","bugs":{"url":"https://github.com/blro0319/body-scroll-lock/issues"},"dist":{"shasum":"8a82bd969af796107c3f97114396dd20cd64cede","tarball":"https://registry.npmjs.org/@blro/body-scroll-lock/-/body-scroll-lock-0.2.0.tgz","fileCount":6,"integrity":"sha512-nONXLHu4vnfQFlRWmstZgE6rPYeSEVtKtdUP0fEMDv+19GkEcAmpsokNDq9C3l6hZmaPufQasPRxDtPosFj7yQ==","signatures":[{"sig":"MEUCIEi3wpGi/YohOOEL5DYbUNmkAFCcmRDPzYokX2yuGQXhAiEA01QjbfQoHu0cccdCyU+sOeR1qoKA6lXm1kUQGYSgmA8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8593},"main":"./dist/body-scroll-lock.umd.cjs","type":"module","types":"./dist/types/index.d.ts","module":"./dist/body-scroll-lock.mjs","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/body-scroll-lock.mjs","require":"./dist/body-scroll-lock.cjs"}},"gitHead":"a358c0e75cfe3649823dd05e8981f5b9a9f8f147","scripts":{"dev":"vite --host --port 3190","build":"vite build && npm run build:types","publish":"npm run build && npm publish --access=public","docs:dev":"vitepress dev docs --host","docs:build":"vitepress build docs","build:types":"tsc --project tsconfig.build.json","docs:preview":"vitepress preview docs"},"_npmUser":{"name":"blrog0319","email":"gyeongtae020319@gmail.com"},"repository":{"url":"git+https://github.com/blro0319/body-scroll-lock.git","type":"git","directory":"packages/core"},"_npmVersion":"9.6.4","description":"::: code-group","directories":{},"_nodeVersion":"16.19.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^4.3.9","vitepress":"1.0.0-beta.5","typescript":"^5.1.6","@types/node":"^20.3.3","@tsconfig/node20":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/body-scroll-lock_0.2.0_1688447421312_0.6796897839084972","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@blro/body-scroll-lock","version":"1.0.0","license":"MIT","_id":"@blro/body-scroll-lock@1.0.0","maintainers":[{"name":"blrog0319","email":"gyeongtae020319@gmail.com"}],"homepage":"https://github.com/blro0319/body-scroll-lock#readme","bugs":{"url":"https://github.com/blro0319/body-scroll-lock/issues"},"dist":{"shasum":"d9423e1f59e315c217401e24f8ba76d937861068","tarball":"https://registry.npmjs.org/@blro/body-scroll-lock/-/body-scroll-lock-1.0.0.tgz","fileCount":6,"integrity":"sha512-7ZMEOQb869cTwHOE1emUHNTlMS592++GDpkMW+f3aNQ9n5qlQOFoj2iQ5ZFym3R8Jk0722gc0sYsckF70z+t5Q==","signatures":[{"sig":"MEUCIQDszxzOUH1cIe+cduz8xEFpCIGqeXd4AUZAqR2KURiyygIgDfMcDHl4kh5BGT4gV7izihlt/bCbfiRElT9Lkxrv57Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8557},"main":"./dist/body-scroll-lock.umd.cjs","type":"module","types":"./dist/types/index.d.ts","module":"./dist/body-scroll-lock.mjs","exports":{".":{"types":"./dist/types/index.d.ts","import":"./dist/body-scroll-lock.mjs","require":"./dist/body-scroll-lock.cjs"}},"gitHead":"5e38f840eac42fb21f72e5aec5391b703c7a91ca","scripts":{"dev":"vite --host --port 3190","build":"vite build && npm run build:types","deploy":"npm run build && npm publish --access=public","docs:dev":"vitepress dev docs --host","docs:build":"vitepress build docs","build:types":"tsc --project tsconfig.build.json","docs:preview":"vitepress preview docs"},"_npmUser":{"name":"blrog0319","email":"gyeongtae020319@gmail.com"},"repository":{"url":"git+https://github.com/blro0319/body-scroll-lock.git","type":"git","directory":"packages/core"},"_npmVersion":"9.6.4","description":"::: code-group","directories":{},"_nodeVersion":"16.19.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^4.3.9","vitepress":"1.0.0-beta.5","typescript":"^5.1.6","@types/node":"^20.3.3"},"_npmOperationalInternal":{"tmp":"tmp/body-scroll-lock_1.0.0_1688459585103_0.6033728020522291","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@blro/body-scroll-lock","version":"1.0.1","license":"MIT","_id":"@blro/body-scroll-lock@1.0.1","maintainers":[{"name":"blrog0319","email":"gyeongtae020319@gmail.com"}],"homepage":"https://github.com/blro0319/body-scroll-lock#readme","bugs":{"url":"https://github.com/blro0319/body-scroll-lock/issues"},"dist":{"shasum":"4be2e92c99c4c302a66d8d57f8f1628a5a4f46e0","tarball":"https://registry.npmjs.org/@blro/body-scroll-lock/-/body-scroll-lock-1.0.1.tgz","fileCount":7,"integrity":"sha512-8q0J/lF06qhw4TF7cjF31m+/BOA6UWeSy0yvEsgFQbSRMi+FkXiL5D4lS49xtPTRiZ+lkBOpImeRfXP+J4nSvg==","signatures":[{"sig":"MEQCIHRUd+bLTpT8uhZmqCUWcWuEBZaqP1lyO6WQgiXL7QC0AiAtHauFgWhYxrJePK3t5IoLjHdcK8IA5eE71fglwCl7sQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10121},"main":"./dist/index.cjs","type":"module","_from":"file:blro-body-scroll-lock-1.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"vite --host --port 3190","build":"vite build && pnpm build:types","deploy":"pnpm build && pnpm publish --access=public","docs:dev":"vitepress dev docs --host","docs:build":"vitepress build docs","preinstall":"npx only-allow pnpm","build:types":"tsc --project tsconfig.build.json","docs:preview":"vitepress preview docs"},"_npmUser":{"name":"blrog0319","email":"gyeongtae020319@gmail.com"},"_resolved":"C:\\Users\\gyeon\\AppData\\Local\\Temp\\86b8c726a032a78e7a9d986cc79474ed\\blro-body-scroll-lock-1.0.1.tgz","_integrity":"sha512-8q0J/lF06qhw4TF7cjF31m+/BOA6UWeSy0yvEsgFQbSRMi+FkXiL5D4lS49xtPTRiZ+lkBOpImeRfXP+J4nSvg==","repository":{"url":"git+https://github.com/blro0319/body-scroll-lock.git","type":"git","directory":"packages/core"},"_npmVersion":"9.8.1","description":"::: code-group","directories":{},"_nodeVersion":"16.20.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^4.4.9","vitepress":"1.0.0-rc.10","typescript":"^5.2.2","@types/node":"^20.5.9"},"_npmOperationalInternal":{"tmp":"tmp/body-scroll-lock_1.0.1_1693839506879_0.8950500818004266","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@blro/body-scroll-lock","version":"1.0.2","license":"MIT","repository":{"type":"git","url":"git+https://github.com/blro0319/body-scroll-lock.git","directory":"packages/core"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"devDependencies":{"@types/node":"^20.5.9","typescript":"^5.2.2","vite":"^4.4.9","vitepress":"1.0.0-rc.10"},"scripts":{"dev":"vite --host --port 3190","build":"vite build && pnpm build:types","build:types":"tsc --project tsconfig.build.json","deploy":"pnpm build && pnpm publish --access=public","docs:dev":"vitepress dev docs --host","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"_id":"@blro/body-scroll-lock@1.0.2","description":"::: code-group","bugs":{"url":"https://github.com/blro0319/body-scroll-lock/issues"},"homepage":"https://github.com/blro0319/body-scroll-lock#readme","_integrity":"sha512-uALnBmOe5/vvxyg0EUHkT+drnW/U7O9cBJw7A5sRu2DDhpqZihgDgAxG6DkG0PP3cmKg7ujuOMsxyi2d/MqbNg==","_resolved":"C:\\Users\\gyeon\\AppData\\Local\\Temp\\36d5d16d6dece428def3eeb44adba778\\blro-body-scroll-lock-1.0.2.tgz","_from":"file:blro-body-scroll-lock-1.0.2.tgz","_nodeVersion":"20.15.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-uALnBmOe5/vvxyg0EUHkT+drnW/U7O9cBJw7A5sRu2DDhpqZihgDgAxG6DkG0PP3cmKg7ujuOMsxyi2d/MqbNg==","shasum":"566152bb702dddc43804db06b4b3de2c852f821e","tarball":"https://registry.npmjs.org/@blro/body-scroll-lock/-/body-scroll-lock-1.0.2.tgz","fileCount":6,"unpackedSize":8243,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCB3fW9HMPDoQr5TWza5gq9fZKqo+bUishyRRLvcmc8aAIgBi4aZHp5ps0joz778v/O6nP0KI9ArmpI+V53yJPp/fA="}]},"_npmUser":{"name":"blrog0319","email":"gyeongtae020319@gmail.com"},"directories":{},"maintainers":[{"name":"blrog0319","email":"gyeongtae020319@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/body-scroll-lock_1.0.2_1737445290331_0.7658122887970122"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-18T07:41:20.756Z","modified":"2025-01-21T07:41:30.725Z","0.1.0":"2023-05-18T07:41:20.997Z","0.2.0":"2023-07-04T05:10:21.478Z","1.0.0":"2023-07-04T08:33:05.259Z","1.0.1":"2023-09-04T14:58:27.055Z","1.0.2":"2025-01-21T07:41:30.548Z"},"bugs":{"url":"https://github.com/blro0319/body-scroll-lock/issues"},"license":"MIT","homepage":"https://github.com/blro0319/body-scroll-lock#readme","repository":{"type":"git","url":"git+https://github.com/blro0319/body-scroll-lock.git","directory":"packages/core"},"description":"::: code-group","maintainers":[{"name":"blrog0319","email":"gyeongtae020319@gmail.com"}],"readme":"# @blro/body-scroll-lock\r\n\r\n## Installation\r\n\r\n::: code-group\r\n\r\n```bash [npm]\r\nnpm install @blro/body-scroll-lock\r\n```\r\n\r\n```bash [pnpm]\r\npnpm add @blro/body-scroll-lock\r\n```\r\n\r\n```bash [yarn]\r\nyarn add @blro/body-scroll-lock\r\n```\r\n\r\n:::\r\n\r\n## Usage\r\n\r\nYou can lock the scroll by calling the `disableBodyScroll` function, and unlock the scroll by calling the `enableBodyScroll` function.\r\n\r\n```js\r\nimport { disableBodyScroll, enableBodyScroll } from \"@blro/body-scroll-lock\";\r\n\r\n// Lock the scroll\r\ndisableBodyScroll();\r\n\r\n// Unlock the scroll\r\nenableBodyScroll();\r\n```\r\n\r\nIf you call the `disableBodyScroll` function multiple times, you must call the `enableBodyScroll` function as many times as you called it to unlock the scroll.\r\n\r\n```js\r\nimport { disableBodyScroll, enableBodyScroll } from \"@blro/body-scroll-lock\";\r\n\r\n// Lock twice\r\ndisableBodyScroll();\r\n\r\n// Unlock once\r\nenableBodyScroll();\r\n\r\n// Scroll is still locked\r\n\r\n// Unlock once more\r\nenableBodyScroll();\r\n\r\n// Now the scroll is unlocked\r\n```\r\n\r\nOr you can call the `resetBodyScroll` function to unlock the scroll regardless of the number of locks.\r\n\r\n```js\r\nimport {\r\n  disableBodyScroll,\r\n  enableBodyScroll,\r\n  resetBodyScroll,\r\n} from \"@blro/body-scroll-lock\";\r\n\r\n// Lock twice\r\ndisableBodyScroll();\r\ndisableBodyScroll();\r\n\r\n// Unlock once\r\nenableBodyScroll();\r\n\r\n// Scroll is unlocked\r\n```\r\n","readmeFilename":"README.md"}