{"_id":"@aicaptcha/vue-aicaptcha","name":"@aicaptcha/vue-aicaptcha","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aicaptcha/vue-aicaptcha","version":"1.0.0","description":"A Vue 3.0 component for integrating AI CAPTCHA verification into your applications","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","scripts":{"dev":"vite","demo":"vite --config vite.demo.config.ts","demo:build":"vite build --config vite.demo.config.ts","demo:preview":"vite preview --config vite.demo.config.ts","build":"vite build","build:lib":"vite build --mode lib","preview":"vite preview","type-check":"vue-tsc --noEmit","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore","prepublishOnly":"npm run build:lib"},"keywords":["vue","vue3","captcha","aicaptcha","verification","component","ai","security"],"author":{"name":"AICaptcha Team"},"license":"MIT","peerDependencies":{"vue":"^3.0.0"},"homepage":"https://github.com/AICaptcha/vue-aicaptcha","devDependencies":{"@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","@vitejs/plugin-vue":"^4.0.0","@vue/eslint-config-typescript":"^12.0.0","eslint":"^8.0.0","eslint-plugin-vue":"^9.0.0","typescript":"^5.0.0","vite":"^5.0.0","vite-plugin-dts":"^4.5.4","vue":"^3.3.0","vue-tsc":"^1.8.0"},"exports":{".":{"import":"./dist/index.esm.js","require":"./dist/index.js","types":"./dist/index.d.ts"}},"dependencies":{"@aicaptcha/js-loader":"^1.0.0-dev.2"},"_id":"@aicaptcha/vue-aicaptcha@1.0.0","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-9aUbpmDjC1LARnzf3Uyiv6KkMCs3sV6nLu5I/Lut/R5KsC+AE/L6BSCxS4wPtHtGdzqtr8/1OeyvE/GdXvcneg==","shasum":"3e630c1e97c38d7f97dba56a7db77ebcf8e6c55a","tarball":"https://registry.npmjs.org/@aicaptcha/vue-aicaptcha/-/vue-aicaptcha-1.0.0.tgz","fileCount":9,"unpackedSize":23301,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGXm9OE7ld+LkR5k1c1z+VGZGnGVkdxa/8JVDhYWwWLkAiEA1hn5MzI5BNz8zj3/5RVsINo95DT66mkFdwurdveWxNM="}]},"_npmUser":{"name":"aicaptcha","email":"sady@aicaptcha.net"},"directories":{},"maintainers":[{"name":"aicaptcha","email":"sady@aicaptcha.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vue-aicaptcha_1.0.0_1758008289521_0.8007827619662844"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-16T07:38:09.447Z","1.0.0":"2025-09-16T07:38:09.691Z","modified":"2025-09-16T07:38:10.026Z"},"maintainers":[{"name":"aicaptcha","email":"sady@aicaptcha.net"}],"description":"A Vue 3.0 component for integrating AI CAPTCHA verification into your applications","homepage":"https://github.com/AICaptcha/vue-aicaptcha","keywords":["vue","vue3","captcha","aicaptcha","verification","component","ai","security"],"author":{"name":"AICaptcha Team"},"license":"MIT","readme":"# AI Captcha Vue Component\n\nA Vue 3.0 component for integrating AI CAPTCHA verification into your applications. This component provides both standard widget and programmatic integration options with a clean, modern interface.\n\n## Installation\n\n```bash\nnpm install @aicaptcha/js-loader\nnpm install @aicaptcha/vue-aicaptcha\n```\n\n## Usage\n\n### Global Registration\n```javascript\nimport { createApp } from 'vue'\nimport AiCaptchaVue from '@aicaptcha/vue-aicaptcha'\nimport App from './App.vue'\n\nconst app = createApp(App)\napp.use(AiCaptchaVue)\napp.mount('#app')\n```\n\n### On-demand Import\n```javascript\nimport { AiCaptcha } from '@aicaptcha/vue-aicaptcha'\n\nexport default {\n  components: {\n    AiCaptcha\n  }\n}\n```\n\n## Components\n\n### AI Captcha\n\n Supporting multiple verification methods and callback functions.\n\n#### Basic Usage\n\n```javascript\n<template>\n  <AiCaptcha \n    sitekey=\"your_sitekey_here\"\n    id=\"captcha-container\"\n    :callback=\"onVerifySuccess\"\n    :errorCallback=\"onVerifyError\"\n  />\n</template>\n\n<script setup>\nconst onVerifySuccess = (token) => {\n  console.log('Verification successful:', token)\n}\n\nconst onVerifyError = (error) => {\n  console.log('Verification failed:', error)\n}\n</script>\n```\n\n#### Invisible Captcha\n\n```javascript\n<template>\n  <AiCaptcha \n    ref=\"captchaRef\"\n    sitekey=\"your_sitekey_here\"\n    id=\"invisible-captcha\"\n    size=\"invisible\"\n    :callback=\"onVerifySuccess\"\n    :errorCallback=\"onVerifyError\"\n  />\n  <button @click=\"showCaptcha\">Show Captcha</button>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\n\nconst captchaRef = ref()\n\nconst showCaptcha = () => {\n  captchaRef.value.execute()\n}\n</script>\n```\n\n#### Props\n\n| Property | Type | Required | Default | Description |\n|----------|------|----------|---------|-------------|\n| sitekey | string | Yes | - | Site key for captcha |\n| id | string | No | - | Container element ID |\n| size | string | No | normal | Captcha size (normal/invisible) |\n| theme | string | No | light | Theme (light/dark) |\n| hl | string | No | - | Language setting |\n| callback | function | No | - | Success callback |\n| errorCallback | function | No | - | Error callback |\n| expiredCallback | function | No | - | Expired callback |\n| chalexpiredCallback | function | No | - | Challenge expired callback |\n| closeCallback | function | No | - | Close callback |\n| openCallback | function | No | - | Open callback |\n\n#### Methods\n\nMethods available after getting component instance via ref:\n\n| Method | Description | Return Type |\n|--------|-------------|-------------|\n| reset() | Reset captcha | void |\n| execute() | Execute captcha (invisible mode) | void |\n| getResponse() | Get verification result | string |\n\n#### Complete Example\n\n```javascript\n<template>\n  <div>\n    <!-- Normal Captcha -->\n    <AiCaptcha \n      ref=\"normalCaptcha\"\n      sitekey=\"your_sitekey_here\"\n      id=\"normal-captcha\"\n      :callback=\"handleSuccess\"\n      :errorCallback=\"handleError\"\n      :expiredCallback=\"handleExpired\"\n    />\n    \n    <!-- Invisible Captcha -->\n    <AiCaptcha \n      ref=\"invisibleCaptcha\"\n      sitekey=\"your_sitekey_here\"\n      id=\"invisible-captcha\"\n      size=\"invisible\"\n      :callback=\"handleSuccess\"\n      :errorCallback=\"handleError\"\n    />\n    \n    <div>\n      <button @click=\"resetNormal\">Reset Normal Captcha</button>\n      <button @click=\"showInvisible\">Show Invisible Captcha</button>\n    </div>\n  </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { AiCaptcha } from 'your-ai-captcha-vue'\n\nconst normalCaptcha = ref()\nconst invisibleCaptcha = ref()\n\nconst handleSuccess = (token) => {\n  console.log('Verification successful, token:', token)\n}\n\nconst handleError = (error) => {\n  console.log('Verification error:', error)\n}\n\nconst handleExpired = () => {\n  console.log('Verification expired')\n}\n\nconst resetNormal = () => {\n  normalCaptcha.value.reset()\n}\n\nconst showInvisible = () => {\n  invisibleCaptcha.value.execute()\n}\n</script>\n```","readmeFilename":"README.md","_rev":"1-b5d1772bd33f7703fc1c5547bb5dc234"}