{"_id":"@any-design/turnstile","_rev":"4-ec03167867b0298968209cc210b22f7f","name":"@any-design/turnstile","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@any-design/turnstile","version":"0.1.0","scripts":{"dev":"vite","build":"run-p type-check \"build-only {@}\" --","preview":"vite preview","build-only":"vite build","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore","format":"prettier --write src/"},"dependencies":{"vue":"^3.3.4"},"devDependencies":{"@rushstack/eslint-patch":"^1.3.3","@tsconfig/node18":"^18.2.2","@types/node":"^18.18.5","@vitejs/plugin-vue":"^4.4.0","@vitejs/plugin-vue-jsx":"^3.0.2","@vue/eslint-config-prettier":"^8.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0","eslint":"^8.49.0","eslint-plugin-vue":"^9.17.0","npm-run-all2":"^6.1.1","prettier":"^3.0.3","typescript":"~5.2.0","vite":"^4.4.11","vue-tsc":"^1.8.19"},"_id":"@any-design/turnstile@0.1.0","gitHead":"75b46ab74a8e3775bd1927b4fa8495006201ccfb","description":"A Cloudflare Turnstile wrapper in Vue 3.","_nodeVersion":"20.7.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-allQeY0HsiPo0YvKn9j+DSWTh2y7aSiEfXm1dzHulZDO1aaLJgkBUguYi6rD5SANdNgw7+CTo8aKXuxfmhItwQ==","shasum":"50fc27d9447e4c3140ef25e55c01ee4b894cddbe","tarball":"https://registry.npmjs.org/@any-design/turnstile/-/turnstile-0.1.0.tgz","fileCount":4,"unpackedSize":8840,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDrUZvfc2KjvdT/JvXwK09qcc5u8Ts30i1cqnbhQ1xCAiBRV5T2qnXym6zU5CXGe4Z439PndH1MAFRACwcHVEgNzA=="}]},"_npmUser":{"name":"backrunner","email":"dev@backrunner.top"},"directories":{},"maintainers":[{"name":"backrunner","email":"dev@backrunner.top"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turnstile_0.1.0_1699785488531_0.9962272273573012"},"_hasShrinkwrap":false},"0.1.1":{"name":"@any-design/turnstile","version":"0.1.1","types":"./dist/main.d.ts","scripts":{"dev":"vite","build":"run-p type-check \"build-only {@}\" --","preview":"vite preview","build-only":"vite build","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore","format":"prettier --write src/"},"dependencies":{"vue":"^3.3.4"},"devDependencies":{"@rushstack/eslint-patch":"^1.3.3","@tsconfig/node18":"^18.2.2","@types/node":"^18.18.5","@vitejs/plugin-vue":"^4.4.0","@vitejs/plugin-vue-jsx":"^3.0.2","@vue/eslint-config-prettier":"^8.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0","eslint":"^8.49.0","eslint-plugin-vue":"^9.17.0","npm-run-all2":"^6.1.1","prettier":"^3.0.3","typescript":"~5.2.0","vite":"^4.4.11","vite-plugin-dts":"^3.6.3","vue-tsc":"^1.8.19"},"_id":"@any-design/turnstile@0.1.1","gitHead":"051532e111a70b876b850c59b17722ba32ba9fa4","description":"A Cloudflare Turnstile wrapper in Vue 3.","_nodeVersion":"20.7.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-f+nCb14rq+hBy4MTWtOih1nwlACSb0J5UcitVMq6i6qzwwPAyZ48LVOjplb/+FST7y8OD1/CVwhx0QSK7rmcdQ==","shasum":"87051455e7ae1ab1c36a34af6b1d3e240043d13c","tarball":"https://registry.npmjs.org/@any-design/turnstile/-/turnstile-0.1.1.tgz","fileCount":6,"unpackedSize":12278,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJGCN71xJjbn5orkDDUb9AtxRqFWgFwWoNfY+NFctjFAiA/h8toK/dhBgTO8cE84x65+sWweYznczTkGU7/XqpHOQ=="}]},"_npmUser":{"name":"backrunner","email":"dev@backrunner.top"},"directories":{},"maintainers":[{"name":"backrunner","email":"dev@backrunner.top"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turnstile_0.1.1_1699788024441_0.8142496619322137"},"_hasShrinkwrap":false},"0.1.2":{"name":"@any-design/turnstile","version":"0.1.2","main":"./dist/turnstile.umd.js","module":"./dist/turnstile.mjs","types":"./dist/main.d.ts","scripts":{"dev":"vite","build":"run-p type-check \"build-only {@}\" --","preview":"vite preview","build-only":"vite build","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore","format":"prettier --write src/"},"dependencies":{"vue":"^3.3.4"},"devDependencies":{"@rushstack/eslint-patch":"^1.3.3","@tsconfig/node18":"^18.2.2","@types/node":"^18.18.5","@vitejs/plugin-vue":"^4.4.0","@vitejs/plugin-vue-jsx":"^3.0.2","@vue/eslint-config-prettier":"^8.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0","eslint":"^8.49.0","eslint-plugin-vue":"^9.17.0","npm-run-all2":"^6.1.1","prettier":"^3.0.3","typescript":"~5.2.0","vite":"^4.4.11","vite-plugin-dts":"^3.6.3","vue-tsc":"^1.8.19"},"_id":"@any-design/turnstile@0.1.2","gitHead":"9d447a619abff12fa1810751bd3b0d8c97df079c","description":"A Cloudflare Turnstile wrapper in Vue 3.","_nodeVersion":"20.7.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-v/UuTW8besGGk4N+PtdmsatDpPIbFL3YSQ9yCA7rtFEv9ubNVka7UzKakm0h4iudUEtoiJoMtEV9X+pCC7iMfw==","shasum":"d758b16b8bed5fca03f7c77624f08a325d095106","tarball":"https://registry.npmjs.org/@any-design/turnstile/-/turnstile-0.1.2.tgz","fileCount":6,"unpackedSize":12351,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGpQ4unUEqzeCwF0nkIL2GALSWkXpr23WUG7W407YV5gIhAKYolHqSFDNz7F2Iy2veIsCxWoo/7xoEsze5Gf1SoMvZ"}]},"_npmUser":{"name":"backrunner","email":"dev@backrunner.top"},"directories":{},"maintainers":[{"name":"backrunner","email":"dev@backrunner.top"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turnstile_0.1.2_1699789933286_0.46741312486314834"},"_hasShrinkwrap":false},"0.2.0":{"name":"@any-design/turnstile","version":"0.2.0","main":"./dist/turnstile.umd.js","module":"./dist/turnstile.mjs","types":"./dist/main.d.ts","scripts":{"dev":"vite","build":"run-p type-check \"build-only {@}\" --","preview":"vite preview","build-only":"vite build","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore","format":"prettier --write src/"},"dependencies":{"vue":"^3.3.8"},"devDependencies":{"@rushstack/eslint-patch":"^1.5.1","@tsconfig/node18":"^18.2.2","@types/node":"^18.18.9","@vitejs/plugin-vue":"^4.4.1","@vitejs/plugin-vue-jsx":"^3.0.2","@vue/eslint-config-prettier":"^8.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0","eslint":"^8.53.0","eslint-plugin-vue":"^9.18.1","npm-run-all2":"^6.1.1","prettier":"^3.0.3","sass":"^1.69.5","typescript":"~5.2.2","vite":"^4.5.0","vite-plugin-dts":"^3.6.3","vue-tsc":"^1.8.22"},"_id":"@any-design/turnstile@0.2.0","gitHead":"2782451367d7c5957295f7ad810971039136969b","description":"A Cloudflare Turnstile wrapper in Vue 3.","_nodeVersion":"20.7.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-vP3qCWVHVSU3IpAsm0qRFjmnBqFk6vU3figQJQzCM5rmNKbnat/TORbUiwKvlJoatrygMixgnHMqFCsEFAjLVw==","shasum":"9a28c2bd2aaba4e60c8f344981f2fd655142793b","tarball":"https://registry.npmjs.org/@any-design/turnstile/-/turnstile-0.2.0.tgz","fileCount":7,"unpackedSize":17126,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCey/bna/de7bbrlhNrnoPEPEP2eS73ODvk4+lWXDBd4wIhAMgrl9Z5forxZW5VPNKewHtHrszkMt5qDNw9OlrN8IJT"}]},"_npmUser":{"name":"backrunner","email":"dev@backrunner.top"},"directories":{},"maintainers":[{"name":"backrunner","email":"dev@backrunner.top"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turnstile_0.2.0_1699792485958_0.007800312527684206"},"_hasShrinkwrap":false},"0.2.1":{"name":"@any-design/turnstile","version":"0.2.1","main":"./dist/turnstile.umd.js","module":"./dist/turnstile.mjs","types":"./dist/main.d.ts","scripts":{"dev":"vite","build":"run-p type-check \"build-only {@}\" --","preview":"vite preview","build-only":"vite build","type-check":"vue-tsc --noEmit -p tsconfig.app.json --composite false","lint":"eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore","format":"prettier --write src/"},"dependencies":{"vue":"^3.3.8"},"devDependencies":{"@rushstack/eslint-patch":"^1.5.1","@tsconfig/node18":"^18.2.2","@types/node":"^18.18.9","@vitejs/plugin-vue":"^4.4.1","@vitejs/plugin-vue-jsx":"^3.0.2","@vue/eslint-config-prettier":"^8.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/tsconfig":"^0.4.0","eslint":"^8.53.0","eslint-plugin-vue":"^9.18.1","npm-run-all2":"^6.1.1","prettier":"^3.0.3","sass":"^1.69.5","typescript":"~5.2.2","vite":"^4.5.0","vite-plugin-dts":"^3.6.3","vue-tsc":"^1.8.22"},"_id":"@any-design/turnstile@0.2.1","gitHead":"dd9ddb087a52337097b4943dd781ee6ba1dc4649","description":"A Cloudflare Turnstile wrapper in Vue 3.","_nodeVersion":"20.7.0","_npmVersion":"10.2.0","dist":{"integrity":"sha512-XidISxyRwnKC31+QWojS6GZF/iH5mnl/k71xXdahlHVO04a4tRSr7ez+CeXeJ6uGWsM7XCIHU9jDJ1iwV+cpbA==","shasum":"73d0b56b3abf4b4469a102b9dc25183a4bf183bd","tarball":"https://registry.npmjs.org/@any-design/turnstile/-/turnstile-0.2.1.tgz","fileCount":7,"unpackedSize":17338,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuKxgbcwakLbKmcJsX519jVKx5Ri6o9VkEAUure70gqAIhAJbOk/l3CxW2PNyJcXokGTnc6gYlMFZWjantQ+ADbnar"}]},"_npmUser":{"name":"backrunner","email":"dev@backrunner.top"},"directories":{},"maintainers":[{"name":"backrunner","email":"dev@backrunner.top"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/turnstile_0.2.1_1699816778632_0.8614151159427417"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-12T10:38:08.407Z","0.1.0":"2023-11-12T10:38:08.714Z","modified":"2023-11-12T19:19:39.235Z","0.1.1":"2023-11-12T11:20:24.658Z","0.1.2":"2023-11-12T11:52:13.497Z","0.2.0":"2023-11-12T12:34:46.183Z","0.2.1":"2023-11-12T19:19:38.993Z"},"maintainers":[{"name":"backrunner","email":"dev@backrunner.top"}],"description":"A Cloudflare Turnstile wrapper in Vue 3.","readme":"# @any-design/turnstile\n\nA Cloudflare Turnstile wrapper in Vue 3.\n\n_Compatible with form in `@any-design/anyui`._\n\n## Usage\n\n### Install\n\n```bash\n$ npm i @any-design/turnstile\n```\n\n### Import\n\n```vue\n<template>\n  <turnstile siteKey=\"SITE_KEY\"></turnstile>\n</template>\n\n<script steup lang=\"ts\">\nimport Turnstile from '@any-design/turnstile';\nimport '@any-design/turnstile/dist/main.css'; // if you want to use the default placeholder style\n</script>\n```\n\n### Props\n\nThis component takes the following props:\n\n- `siteKey` (**required**, type: `String`): The site key from your Turnstile project.\n\n- `callbackName` (type: `String`, default: `'onTurnstileLoaded'`): The global callback function name when the Turnstile JS SDK is loaded.\n\n- `modelValue` (type: `String`, default: `''`): Use `v-model` to sync the response of the verification.\n\n- `action` (type: `String`): The action when you verify.\n\n- `size` (type: `String`, optional values: `'normal' | 'compact'`, default: `'normal'`): The size of the widget.\n\n- `theme` (type: `String`, optional values: `'light' | 'dark' | 'auto'`, default: `'auto'`): The theme of the widget.\n\n- `appearance` (type: `String`, optional values: `'always' | 'execute' | 'interaction-only'`, default: `'always'`): How the widget is shown.\n\n- `renderOnMount` (type: `Boolean`, default: `true`): If set to false, the component will not render on mount. Instead, you need to manually call the `render` method.\n\n- `autoReset` (type: `Boolean`, default: `true`): If set to true, the widget will automatically reset after the response expired.\n\n- `resetInterval` (type: `Number`, default: `295000`): The interval before automatically reset. Only enabled when `autoReset` is true.\n\n- `placeholder` (type: `Boolean`, default: `true`): Render a placeholder while the Turnstile is loading.\n\n- `loadingText` (type: `String`, default: `''`): The loading text which will be displayed in the placeholder.\n\n- `readyDelay`: (type: `Number`, default: `1000`): The ready event (also the actual render timing) will be delayed due to the Turnstile rendering mechanism.\n\n### Events\n\nThis component will emit the following events:\n\n- `verify`: This gets triggered when the verification completes. The failure could be caused by no response or error during verification. The argument will be `{ result: boolean, response?: string }`.\n\n- `expire`: This is emitted when the response expired.\n\n- `error`: This is emitted when an error occurred during rendering or verifying.\n\n- `ready`: This is emitted when the Turnstile SDK is ready and the widget is rendered.\n\n- `unsupported`: This is emitted when the Turnstile reported that the browser is not supported.\n\n- `update:modelValue`: This is emitted when the modelValue updates. Often used in `v-model`.\n\n### Exposed Methods\n\nThe Turnstile component exposes two methods for you to interact with it.\n\n- `render`: Call this method to manually render the Turnstile. It's useful when `renderOnMount` is set to false.\n\n- `reset`: Call this method to manually reset the Turnstile, it will also reset the value of the `modelValue`.\n\n# License\n\nMIT\n","readmeFilename":"README.md"}