Socket
Socket
Sign inDemoInstall

vue-turnstile

Package Overview
Dependencies
21
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

LICENSE.md

22

dist/vue-turnstile.js
import { defineComponent as l, openBlock as a, createElementBlock as d } from "vue";
const c = "https://challenges.cloudflare.com/turnstile/v0/api.js", u = "cfTurnstileOnLoad";
let n = window.turnstile !== void 0 ? "ready" : "unloaded", i;
let n = window.turnstile !== void 0 ? "ready" : "unloaded", s;
const m = l({

@@ -31,2 +31,7 @@ name: "VueTurnstile",

},
action: {
type: String,
required: !1,
default: ""
},
renderOnMount: {

@@ -49,3 +54,4 @@ type: Boolean,

size: this.size,
callback: this.callback
callback: this.callback,
action: this.action
};

@@ -72,6 +78,6 @@ }

const r = new Promise((t, e) => {
i = { resolve: t, reject: e }, n === "ready" && t(void 0);
s = { resolve: t, reject: e }, n === "ready" && t(void 0);
});
window[u] = () => {
i.resolve(), n = "ready";
s.resolve(), n = "ready";
}, await (() => {

@@ -82,3 +88,3 @@ if (n === "unloaded") {

e.src = t, e.async = !0, e.addEventListener("error", () => {
i.reject("Failed to load Turnstile.");
s.reject("Failed to load Turnstile.");
}), document.head.appendChild(e);

@@ -89,9 +95,9 @@ }

}
}), p = (r, s) => {
}), p = (r, i) => {
const t = r.__vccOpts || r;
for (const [e, o] of s)
for (const [e, o] of i)
t[e] = o;
return t;
}, f = { ref: "turnstile" };
function h(r, s, t, e, o, y) {
function h(r, i, t, e, o, y) {
return a(), d("div", f, null, 512);

@@ -98,0 +104,0 @@ }

@@ -36,2 +36,7 @@ import type { PropType } from 'vue';

};
action: {
type: StringConstructor;
required: false;
default: string;
};
renderOnMount: {

@@ -48,2 +53,3 @@ type: BooleanConstructor;

callback: (token: string) => void;
action: string;
};

@@ -79,2 +85,7 @@ }, {

};
action: {
type: StringConstructor;
required: false;
default: string;
};
renderOnMount: {

@@ -91,4 +102,5 @@ type: BooleanConstructor;

theme: "light" | "dark" | "auto";
action: string;
renderOnMount: boolean;
}>;
export default _default;
{
"name": "vue-turnstile",
"version": "1.0.0",
"version": "1.0.1",
"description": "Vue library for Cloudflare Turnstile CAPTCHA alternative",

@@ -5,0 +5,0 @@ "type": "module",

@@ -1,3 +0,5 @@

# Vue Turnstile
# vue-turnstile
[![npm version](https://badge.fury.io/js/vue-turnstile.svg)](https://www.npmjs.com/package/vue-turnstile)
A [Cloudflare Turnstile](https://developers.cloudflare.com/turnstile/) library for Vue 3

@@ -46,10 +48,11 @@

| Prop | Type | Description | Required | Default |
| --------------- | ----------------------------- | ------------------------------------------------------------------------------------------------ | -------- | ---------- |
| site-key | `String` | Your Turnstile sitekey - [Docs](https://developers.cloudflare.com/turnstile/get-started/) | Yes | N/A |
| v-model | `String` | Binding that contains the token returned by the Turnstile widget | Yes | N/A |
| reset-interval | `Number` | Get a fresh token after `reset-interval` milliseconds - Turnstile tokens only last for 5 minutes | No | `295000` |
| size | `'normal' \| 'compact'` | Widget size | No | `'normal'` |
| theme | `'light' \| 'dark' \| 'auto'` | Widget theme - auto respects the user's browser preference | No | `'auto'` |
| render-on-mount | `Boolean` | Automatically render Turnstile widget after component mounts | No | `true` |
| Prop | Type | Description | Required | Default |
| --------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------- |
| site-key | `String` | Your Turnstile sitekey - [Docs](https://developers.cloudflare.com/turnstile/get-started/) | Yes | N/A |
| v-model | `String` | Binding that contains the token returned by the Turnstile widget | Yes | N/A |
| reset-interval | `Number` | Get a fresh token after `reset-interval` milliseconds - Turnstile tokens only last for 5 minutes | No | `295000` |
| size | `'normal' \| 'compact'` | Widget size | No | `'normal'` |
| theme | `'light' \| 'dark' \| 'auto'` | Widget theme - auto respects the user's browser preference | No | `'auto'` |
| action | `String` | A customer value that can be used to differentiate widgets under the same sitekey in analytics and which is returned upon validation. | No | `''` |
| render-on-mount | `Boolean` | Automatically render Turnstile widget after component mounts | No | `true` |

@@ -70,2 +73,2 @@ ## Methods

The MIT License (MIT). Please see [LICENSE file](https://github.com/ruigomeseu/bitcoin-address-validation/blob/master/LICENSE.md) for more information.
The MIT License (MIT). Please see [LICENSE file](https://github.com/ruigomeseu/vue-turnstile/blob/main/LICENSE.md) for more information.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc