New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue3-smart-captcha

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-smart-captcha - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

dist/index.js.js

11

dist/SmartCaptcha.d.ts

@@ -35,3 +35,3 @@ import { ComponentOptionsMixin } from 'vue';

declare type CaptchaSubscriptionEventCallback = BaseEventCallback | SuccessEventCallback | JavascriptErrorEventCallback;
declare type CaptchaSubscriptionEventCallback = BaseEventCallback | SuccessEventCallback | JavascriptErrorEventCallback

@@ -102,2 +102,11 @@ declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SmartCaptchaComponentProps>, {

export declare class SmartCaptchaUtils {
readonly SCRIPT_RENDER_ONLOAD_SRC = "https://smartcaptcha.yandexcloud.net/captcha.js?render=onload";
execute(widgetID?: WidgetId): void;
reset(widgetID?: WidgetId): void;
destroy(widgetID?: WidgetId): void;
getResponse(widgetID?: WidgetId): Token | undefined;
subscribe(widgetId: WidgetId, event: SubscribeEvent, cb: CaptchaSubscriptionEventCallback): void;
}
/**

@@ -104,0 +113,0 @@ * @link https://cloud.yandex.ru/docs/smartcaptcha/concepts/widget-methods#subscribe

2

package.json

@@ -12,3 +12,3 @@ {

"license": "MIT",
"version": "1.0.0",
"version": "1.1.0",
"type": "module",

@@ -15,0 +15,0 @@ "main": "./dist/index.cjs",

@@ -115,2 +115,11 @@ # Yandex SmartCaptcha for Vue3 projects

> Package checks if `window.smartCaptcha` object was defined. However when using multiple captcha instances at once all of them will have `window.smartCaptcha === undefined` on initial load. Therefore it is better either load script on your own and disable widget loading for every captcha or disable it for every captcha but first, e.g.
```vue
<template>
<SmartCaptcha />
<SmartCaptcha :load-widget="false" />
</template>
```
### Rendering timeout

@@ -254,2 +263,14 @@

> Package checks if `window.smartCaptcha` object was defined. However when using multiple captcha instances at once all of them will have `window.smartCaptcha === undefined` on initial load.. Therefore it is better either load script on your own and disable widget loading for every captcha or disable it for every captcha but first, e.g.
```js
const firstCaptcha = useSmartCaptcha(container, {
// render props
})
const secondCaptcha = useSmartCaptcha(container, {
// render props
}, false) // disable script appending as it will be appended by first captcha
```
### Rendering timeout

@@ -413,2 +434,15 @@

## Utilities
Package provides utility class with every method but `render` in order if you need call captcha methods "manually" outside of current captcha (since both composable and captcha do not allows you to specify "custom" widget id)
```js
import { SmartCaptchaUtils } from 'vue3-smart-captcha'
const widgetId = 0 // example
const utils = new SmartCaptchaUtils()
utils.execute(widgetId)
```
## License

@@ -415,0 +449,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc