{"_id":"@captcha-pro/vue","_rev":"3-6d69f30e93bcd6a4c27938f766a051b6","name":"@captcha-pro/vue","dist-tags":{"latest":"2.2.0"},"versions":{"2.0.0":{"name":"@captcha-pro/vue","version":"2.0.0","keywords":["captcha","vue","slider-captcha","click-captcha"],"author":{"name":"saqqdy","email":"https://github.com/saqqdy"},"license":"MIT","_id":"@captcha-pro/vue@2.0.0","maintainers":[{"name":"saqqdy","email":"saqqdy@qq.com"}],"dist":{"shasum":"ce2b80fa9687df718500ff43b3d276f96d96b96c","tarball":"https://registry.npmjs.org/@captcha-pro/vue/-/vue-2.0.0.tgz","fileCount":20,"integrity":"sha512-ddAENazg0E+7cTpv1FIsQYYUYHopCmPDK3a+bgmZ84/RrnN3TwNlc86atyRnu4WDOI4GVaB/kXtaG4QEB8HLWg==","signatures":[{"sig":"MEQCIAymOANlXzOj1p0+eaCekdJvP8UFWFsvwQfr0UpTpmWRAiA7bW0UExmIiNeoprgLUoam2e+HdFFp6HFbvyr4AIgo4g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66346},"main":"dist/index.cjs","type":"module","_from":"file:captcha-pro-vue-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,types}","clean":"rm-all dist","watch":"vite build -c build/vite.config.ts -w","build:js":"vite build -c build/vite.config.ts","build:types":"vue-tsc -p src/tsconfig.json --emitDeclarationOnly --outDir dist"},"_npmUser":{"name":"saqqdy","email":"saqqdy@qq.com"},"_resolved":"/tmp/d42f66fa2a58ab22bf0e3579c75db5f0/captcha-pro-vue-2.0.0.tgz","_integrity":"sha512-ddAENazg0E+7cTpv1FIsQYYUYHopCmPDK3a+bgmZ84/RrnN3TwNlc86atyRnu4WDOI4GVaB/kXtaG4QEB8HLWg==","_npmVersion":"10.8.2","description":"Vue 3 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":"^3.5.39","vite":"^5.4.19","rm-all":"^1.1.1","vue-tsc":"^3.3.7","typescript":"^5.9.3","@types/node":"^24.13.3","npm-run-all":"^4.1.5","@vitejs/plugin-vue":"^5.2.3"},"peerDependencies":{"vue":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vue_2.0.0_1786288862206_0.5875664704534409","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@captcha-pro/vue","version":"2.1.0","keywords":["captcha","vue","slider-captcha","click-captcha"],"author":{"name":"saqqdy","email":"https://github.com/saqqdy"},"license":"MIT","_id":"@captcha-pro/vue@2.1.0","maintainers":[{"name":"saqqdy","email":"saqqdy@qq.com"}],"dist":{"shasum":"f829c44c196528e56147962da937882520d3e982","tarball":"https://registry.npmjs.org/@captcha-pro/vue/-/vue-2.1.0.tgz","fileCount":20,"integrity":"sha512-AmLLxo6N6ho1ahpR+WIvnKOTZZPeniZE+YIB5bEBtHPoiouBKCFUikNSKYWaEaxY5Jlhyj8TZlh4hceBgmgRjA==","signatures":[{"sig":"MEYCIQCOiA+ywde/k6TaMyYzt5qOx1HzOwf5Lz1AF8Rz7pVtLgIhALEN3klGmvartxp5tkClhCp/IaIn09UI2v3S1vqftpkR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66346},"main":"dist/index.cjs","type":"module","_from":"file:captcha-pro-vue-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,types}","clean":"rm-all dist","watch":"vite build -c build/vite.config.ts -w","build:js":"vite build -c build/vite.config.ts","build:types":"vue-tsc -p src/tsconfig.json --emitDeclarationOnly --outDir dist"},"_npmUser":{"name":"saqqdy","email":"saqqdy@qq.com"},"_resolved":"/tmp/dcccf5783067317da0827ccfefce90fd/captcha-pro-vue-2.1.0.tgz","_integrity":"sha512-AmLLxo6N6ho1ahpR+WIvnKOTZZPeniZE+YIB5bEBtHPoiouBKCFUikNSKYWaEaxY5Jlhyj8TZlh4hceBgmgRjA==","_npmVersion":"10.8.2","description":"Vue 3 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":"^3.5.39","vite":"^5.4.19","rm-all":"^1.1.1","vue-tsc":"^3.3.7","typescript":"^5.9.3","@types/node":"^24.13.3","npm-run-all":"^4.1.5","@vitejs/plugin-vue":"^5.2.3"},"peerDependencies":{"vue":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/vue_2.1.0_1786844021408_0.023778193709212525","host":"s3://npm-registry-packages-npm-production"}},"2.2.0":{"name":"@captcha-pro/vue","description":"Vue 3 components for captcha-pro","type":"module","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","@vitejs/plugin-vue":"^5.2.3","npm-run-all":"^4.1.5","rm-all":"^1.1.1","typescript":"^5.9.3","vite":"^5.4.19","vue":"^3.5.39","vue-tsc":"^3.3.7"},"peerDependencies":{"vue":"^3.0.0"},"sideEffects":["**/*.css"],"keywords":["captcha","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,types}","build:js":"vite build -c build/vite.config.ts","build:types":"vue-tsc -p src/tsconfig.json --emitDeclarationOnly --outDir dist","watch":"vite build -c build/vite.config.ts -w","clean":"rm-all dist","test":"vitest run"},"_id":"@captcha-pro/vue@2.2.0","_integrity":"sha512-GtUfBq76dYaLL7xEaNkF/wgjka1SduefxVl4gub1Vu10FxWSG7wNw8Y9eEy14LU2T8bccltrBRmuMBaRS4i0qA==","_resolved":"/tmp/69af547f6b17b7477f50b4baee84ab76/captcha-pro-vue-2.2.0.tgz","_from":"file:captcha-pro-vue-2.2.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-GtUfBq76dYaLL7xEaNkF/wgjka1SduefxVl4gub1Vu10FxWSG7wNw8Y9eEy14LU2T8bccltrBRmuMBaRS4i0qA==","shasum":"5f00bd95d2dff81ba99a092231c21478ca5f2925","tarball":"https://registry.npmjs.org/@captcha-pro/vue/-/vue-2.2.0.tgz","fileCount":20,"unpackedSize":67280,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG+2xc++z1tOKfi8zvLunJK6B2tNBsmwyZcEX3Pao5FkAiAPRPhqG4TcLq4sTBrQDJKTVsM/0k8PsVcsTzIsQ1MVTg=="}]},"_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/vue_2.2.0_1786972751042_0.7454673095053548"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-09T15:21:01.984Z","modified":"2026-08-17T13:19:11.383Z","2.0.0":"2026-08-09T15:21:02.356Z","2.1.0":"2026-08-16T01:33:41.551Z","2.2.0":"2026-08-17T13:19:11.196Z"},"author":{"name":"saqqdy","email":"https://github.com/saqqdy"},"license":"MIT","keywords":["captcha","vue","slider-captcha","click-captcha"],"description":"Vue 3 components for captcha-pro","maintainers":[{"name":"saqqdy","email":"saqqdy@qq.com"}],"readme":"# @captcha-pro/vue\n\nVue 3 component library for Captcha Pro with Composition API support.\n\n**[简体中文](./README_CN.md)**\n\n## Installation\n\n```bash\npnpm add @captcha-pro/vue\n```\n\n## Usage\n\n### Global Registration\n\n```typescript\nimport { createApp } from 'vue'\nimport CaptchaPro from '@captcha-pro/vue'\nimport '@captcha-pro/vue/style.css'\n\nconst app = createApp(App)\napp.use(CaptchaPro)\n```\n\n### Component Usage\n\n```vue\n<template>\n  <!-- Slider Captcha -->\n  <SliderCaptcha\n    v-model=\"sliderData\"\n    :width=\"300\"\n    :height=\"170\"\n    @success=\"onSuccess\"\n    @fail=\"onFail\"\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</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { SliderCaptcha, ClickCaptcha, PopupCaptcha } from '@captcha-pro/vue'\n\nconst sliderData = ref(null)\n\nconst onSuccess = () => {\n  console.log('Verification passed!')\n}\n</script>\n```\n\n### Using Composables\n\n```vue\n<template>\n  <div ref=\"containerRef\" class=\"captcha-container\" />\n  <div v-if=\"status\" class=\"status\" :class=\"status\">{{ statusText }}</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useSliderCaptcha } from '@captcha-pro/vue/composables'\n\nconst containerRef = ref<HTMLDivElement>()\n\nconst {\n  status,\n  statusText,\n  init,\n  refresh,\n  getData,\n  destroy\n} = useSliderCaptcha({\n  width: 300,\n  height: 170,\n  onSuccess: () => console.log('Passed!')\n}, containerRef)\n\nonMounted(() => init())\nonUnmounted(() => destroy())\n</script>\n```\n\n## TypeScript Support\n\nFull TypeScript support with exported types:\n\n```typescript\nimport type {\n  SliderCaptchaProps,\n  ClickCaptchaProps,\n  PopupCaptchaProps,\n  SliderCaptchaInstance,\n  ClickCaptchaInstance\n} from '@captcha-pro/vue'\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 | 'frontend' \\| 'backend' | 'frontend' | Verification mode |\n| locale | 'zh-CN' \\| 'en-US' | '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## Exposed Methods\n\n```vue\n<script setup>\nconst captchaRef = ref()\n\n// Call methods\ncaptchaRef.value?.refresh()\ncaptchaRef.value?.getData()\ncaptchaRef.value?.getStatistics()\n</script>\n\n<template>\n  <SliderCaptcha ref=\"captchaRef\" />\n</template>\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}