{"_id":"@captcha-pro/vue2","_rev":"3-2dbcd8beece43ca09d58109c39de282e","name":"@captcha-pro/vue2","dist-tags":{"latest":"2.2.0"},"versions":{"2.0.0":{"name":"@captcha-pro/vue2","version":"2.0.0","keywords":["captcha","vue2","vue","slider-captcha","click-captcha"],"author":{"name":"saqqdy","email":"https://github.com/saqqdy"},"license":"MIT","_id":"@captcha-pro/vue2@2.0.0","maintainers":[{"name":"saqqdy","email":"saqqdy@qq.com"}],"dist":{"shasum":"acc91aeffa5a26a32feeb850eb24c01d604d82a3","tarball":"https://registry.npmjs.org/@captcha-pro/vue2/-/vue2-2.0.0.tgz","fileCount":8,"integrity":"sha512-33k7m96K6CWJ/MdOwR4DCC/KUsGQidR5U9ndWTp/UAsnRSyAKQluH7I+sI0BJmN/KJ5WLJaMZpRk1P3vLNI6rQ==","signatures":[{"sig":"MEUCIApB0/CrHG1uCd7FkzC+huMZ5V8t/22vAS1N5AXsKLJNAiEAmWTD5qBB3nr/25/1oXoVbOK5lWy1FiCkCgq/lejmEOM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71095},"main":"dist/index.cjs","_from":"file:captcha-pro-vue2-2.0.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.cjs"},"./style.css":"./dist/style.css"},"scripts":{"test":"vitest run","build":"run-s clean build:js","clean":"rm-all dist","watch":"vite build -c build/vite.config.ts -w","build:js":"NODE_OPTIONS='-r ./build/preload-vue2.cjs' vite build -c build/vite.config.ts"},"_npmUser":{"name":"saqqdy","email":"saqqdy@qq.com"},"_resolved":"/tmp/806a5135716d01a751ff5d3632c1a8c7/captcha-pro-vue2-2.0.0.tgz","_integrity":"sha512-33k7m96K6CWJ/MdOwR4DCC/KUsGQidR5U9ndWTp/UAsnRSyAKQluH7I+sI0BJmN/KJ5WLJaMZpRk1P3vLNI6rQ==","_npmVersion":"10.8.2","description":"Vue 2 components for captcha-pro","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"20.20.2","dependencies":{"@captcha-pro/core":"2.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^2.7.16","vite":"^4.5.14","rm-all":"^1.1.1","typescript":"^5.9.3","@types/node":"^24.13.3","npm-run-all":"^4.1.5","vite-plugin-vue2":"^2.0.3","vue-template-compiler":"^2.7.16"},"peerDependencies":{"vue":"^2.6.0 || ^2.7.0"},"_npmOperationalInternal":{"tmp":"tmp/vue2_2.0.0_1786288863987_0.3281019763000117","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@captcha-pro/vue2","version":"2.1.0","keywords":["captcha","vue2","vue","slider-captcha","click-captcha"],"author":{"name":"saqqdy","email":"https://github.com/saqqdy"},"license":"MIT","_id":"@captcha-pro/vue2@2.1.0","maintainers":[{"name":"saqqdy","email":"saqqdy@qq.com"}],"dist":{"shasum":"53dd91258fc043389932dd16a3631a8ca3ab90de","tarball":"https://registry.npmjs.org/@captcha-pro/vue2/-/vue2-2.1.0.tgz","fileCount":8,"integrity":"sha512-av7l5R2Xkctak4BFO8y0WWSRf8siXcjlA1bh30ZEY6CHJ9spJNxLyoy3Nc1bru0rUxAdHOuSpFtHne4c9kMT2w==","signatures":[{"sig":"MEYCIQDTwZ/d81dfgBhtKwX3DyZYui66BiDbvPpuaQzq6mz6+AIhAIm7iQyYo1XrWMNeFTt7TzOVlP1Hc/jc2Iz8pCNSVR8q","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71095},"main":"dist/index.cjs","_from":"file:captcha-pro-vue2-2.1.0.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.cjs"},"./style.css":"./dist/style.css"},"scripts":{"test":"vitest run","build":"run-s clean build:js","clean":"rm-all dist","watch":"vite build -c build/vite.config.ts -w","build:js":"NODE_OPTIONS='-r ./build/preload-vue2.cjs' vite build -c build/vite.config.ts"},"_npmUser":{"name":"saqqdy","email":"saqqdy@qq.com"},"_resolved":"/tmp/f32d3135cb1ac0f396640dbc5fca2f62/captcha-pro-vue2-2.1.0.tgz","_integrity":"sha512-av7l5R2Xkctak4BFO8y0WWSRf8siXcjlA1bh30ZEY6CHJ9spJNxLyoy3Nc1bru0rUxAdHOuSpFtHne4c9kMT2w==","_npmVersion":"10.8.2","description":"Vue 2 components for captcha-pro","directories":{},"sideEffects":["**/*.css"],"_nodeVersion":"20.20.2","dependencies":{"@captcha-pro/core":"2.1.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^2.7.16","vite":"^4.5.14","rm-all":"^1.1.1","typescript":"^5.9.3","@types/node":"^24.13.3","npm-run-all":"^4.1.5","vite-plugin-vue2":"^2.0.3","vue-template-compiler":"^2.7.16"},"peerDependencies":{"vue":"^2.6.0 || ^2.7.0"},"_npmOperationalInternal":{"tmp":"tmp/vue2_2.1.0_1786844023008_0.34872064772628586","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@captcha-pro/vue2","description":"Vue 2 components for captcha-pro","version":"2.2.0","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.mjs","default":"./dist/index.mjs"},"./style.css":"./dist/style.css"},"dependencies":{"@captcha-pro/core":"2.2.0"},"devDependencies":{"@types/node":"^24.13.3","npm-run-all":"^4.1.5","rm-all":"^1.1.1","typescript":"^5.9.3","vite":"^4.5.14","vite-plugin-vue2":"^2.0.3","vue":"^2.7.16","vue-template-compiler":"^2.7.16"},"peerDependencies":{"vue":"^2.6.0 || ^2.7.0"},"sideEffects":["**/*.css"],"keywords":["captcha","vue2","vue","slider-captcha","click-captcha"],"license":"MIT","author":{"name":"saqqdy","email":"https://github.com/saqqdy"},"publishConfig":{"registry":"https://registry.npmjs.org","access":"public"},"scripts":{"build":"run-s clean build:js","build:js":"NODE_OPTIONS='-r ./build/preload-vue2.cjs' vite build -c build/vite.config.ts","watch":"vite build -c build/vite.config.ts -w","clean":"rm-all dist","test":"vitest run"},"_id":"@captcha-pro/vue2@2.2.0","_integrity":"sha512-1Jz0mU+QYvtbi/EIFZ+TFNStk/VCIpZOpbApWbqznx8x3jWyyQ/MR355Nl1Y3EiHMb/TmJHcUjnbruDpAKWl4Q==","_resolved":"/tmp/f0b811787c26590ba7c4b784374a1a79/captcha-pro-vue2-2.2.0.tgz","_from":"file:captcha-pro-vue2-2.2.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-1Jz0mU+QYvtbi/EIFZ+TFNStk/VCIpZOpbApWbqznx8x3jWyyQ/MR355Nl1Y3EiHMb/TmJHcUjnbruDpAKWl4Q==","shasum":"ff38a11856b62ef8415844807e99b8f42c184168","tarball":"https://registry.npmjs.org/@captcha-pro/vue2/-/vue2-2.2.0.tgz","fileCount":8,"unpackedSize":72969,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCsdPjM51tFtJVQdLFDY5v5QJ07rlbDaytcIY45faHVNgIgaND4nQDsKWZsjyb+G1zH2IrkzdZmLfW51VZTuaeRIyc="}]},"_npmUser":{"name":"saqqdy","email":"saqqdy@qq.com"},"directories":{},"maintainers":[{"name":"saqqdy","email":"saqqdy@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vue2_2.2.0_1786972752536_0.49593297501466393"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-09T15:21:03.795Z","modified":"2026-08-17T13:19:12.840Z","2.0.0":"2026-08-09T15:21:04.126Z","2.1.0":"2026-08-16T01:33:43.144Z","2.2.0":"2026-08-17T13:19:12.690Z"},"author":{"name":"saqqdy","email":"https://github.com/saqqdy"},"license":"MIT","keywords":["captcha","vue2","vue","slider-captcha","click-captcha"],"description":"Vue 2 components for captcha-pro","maintainers":[{"name":"saqqdy","email":"saqqdy@qq.com"}],"readme":"# @captcha-pro/vue2\n\nVue 2 component library for Captcha Pro.\n\n**[简体中文](./README_CN.md)**\n\n## Installation\n\n```bash\npnpm add @captcha-pro/vue2\n```\n\n## Usage\n\n### Global Registration\n\n```javascript\nimport Vue from 'vue'\nimport CaptchaPro from '@captcha-pro/vue2'\n\nVue.use(CaptchaPro)\n```\n\n### Component Usage\n\n```vue\n<template>\n  <div>\n    <!-- Slider Captcha -->\n    <SliderCaptcha\n      :width=\"300\"\n      :height=\"170\"\n      :precision=\"5\"\n      @success=\"onSuccess\"\n      @fail=\"onFail\"\n      @refresh=\"onRefresh\"\n    />\n\n    <!-- Click Captcha -->\n    <ClickCaptcha\n      :width=\"300\"\n      :height=\"170\"\n      :count=\"3\"\n      @success=\"onSuccess\"\n    />\n\n    <!-- Popup Captcha -->\n    <PopupCaptcha\n      trigger=\"#submit-btn\"\n      type=\"slider\"\n      @success=\"onSuccess\"\n    >\n      <button id=\"submit-btn\">Submit</button>\n    </PopupCaptcha>\n  </div>\n</template>\n\n<script>\nexport default {\n  methods: {\n    onSuccess() {\n      console.log('Verification passed!')\n    },\n    onFail() {\n      console.log('Verification failed!')\n    }\n  }\n}\n</script>\n```\n\n### Using Mixins\n\n```vue\n<template>\n  <div>\n    <div ref=\"containerRef\" class=\"captcha-container\" />\n    <div v-if=\"status\" class=\"status\" :class=\"status\">\n      {{ statusText }}\n    </div>\n  </div>\n</template>\n\n<script>\nimport { sliderCaptchaMixin } from '@captcha-pro/vue2/mixins'\n\nexport default {\n  mixins: [sliderCaptchaMixin],\n  // Mixin provides: data, computed, methods, lifecycle hooks\n}\n</script>\n```\n\n## Props\n\n### SliderCaptcha\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| width | Number | 300 | Container width |\n| height | Number | 170 | Container height |\n| bgImage | String | - | Background image URL |\n| sliderImage | String | - | Slider image URL |\n| precision | Number | 5 | Verification precision (px) |\n| showRefresh | Boolean | true | Show refresh button |\n| verifyMode | String | 'frontend' | 'frontend' or 'backend' |\n| locale | String | 'zh-CN' | Language |\n\n### ClickCaptcha\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| width | Number | 300 | Container width |\n| height | Number | 170 | Container height |\n| count | Number | 3 | Click points count |\n| showRefresh | Boolean | true | Show refresh button |\n\n### PopupCaptcha\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| type | String | 'slider' | 'slider' or 'click' |\n| trigger | String | - | Trigger element selector |\n| autoClose | Boolean | true | Auto close on success |\n| closeDelay | Number | 500 | Close delay (ms) |\n\n## Events\n\n| Event | Description |\n|-------|-------------|\n| success | Verification passed |\n| fail | Verification failed |\n| refresh | Captcha refreshed |\n| ready | Component ready |\n\n## Methods\n\n```javascript\n// Access via ref\nthis.$refs.captcha.refresh()\nthis.$refs.captcha.getData()\nthis.$refs.captcha.getStatistics()\nthis.$refs.captcha.reset()\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}