Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@matt-block/react-recaptcha-v2

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matt-block/react-recaptcha-v2 - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

1

lib/index.d.ts

@@ -6,2 +6,3 @@ import { FC } from "react";

size?: "normal" | "compact";
tabIndex?: number;
onSuccess?: (result: string) => any;

@@ -8,0 +9,0 @@ onExpire?: () => any;

6

lib/index.esm.js

@@ -17,3 +17,5 @@ import React, { useState, useEffect } from 'react';

***************************************************************************** */
/* global Reflect, Promise */
function __rest(s, e) {

@@ -153,3 +155,3 @@ var t = {};

const ReCaptcha = (props) => {
const { siteKey, theme, size } = props, callbacks = __rest(props, ["siteKey", "theme", "size"]);
const { siteKey, theme, size, tabIndex } = props, callbacks = __rest(props, ["siteKey", "theme", "size", "tabIndex"]);
const { onSuccessCallbackId, onErrorCallbackId, onExpireCallbackId } = useWindowCallbackBinder(callbacks);

@@ -159,5 +161,5 @@ useRecaptchaHiddenDivManager();

const [id] = useState(nanoid());
return (React.createElement("div", { id: id, className: "g-recaptcha", "data-sitekey": siteKey === "test" ? TEST_SITE_KEY : siteKey, "data-theme": theme, "data-size": size, "data-callback": onSuccessCallbackId, "data-error-callback": onErrorCallbackId, "data-expired-callback": onExpireCallbackId }));
return (React.createElement("div", { id: id, className: "g-recaptcha", "data-sitekey": siteKey === "test" ? TEST_SITE_KEY : siteKey, "data-theme": theme, "data-size": size, "data-tabindex": tabIndex !== null && tabIndex !== void 0 ? tabIndex : 0, "data-callback": onSuccessCallbackId, "data-error-callback": onErrorCallbackId, "data-expired-callback": onExpireCallbackId }));
};
export { ReCaptcha as default };
{
"name": "@matt-block/react-recaptcha-v2",
"version": "2.0.1",
"version": "2.1.0",
"description": "Google reCAPTCHA v2 React component that does not pollute the DOM",

@@ -34,14 +34,14 @@ "main": "lib/index.esm.js",

"dependencies": {
"nanoid": "^3.3.4"
"nanoid": "^5.0.7"
},
"devDependencies": {
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-typescript": "^11.1.0",
"@types/react": "^18.2.1",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@types/react": "^18.3.3",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"rollup": "^3.21.4",
"rollup-plugin-copy": "^3.4.0",
"prettier": "^3.3.2",
"rollup": "^4.18.0",
"rollup-plugin-copy": "^3.5.0",
"shx": "^0.3.4",

@@ -48,0 +48,0 @@ "typescript": "^4.9.5"

@@ -31,10 +31,8 @@ # React reCAPTCHA v2

This library will always target the most recent React package. If you are
using an older release of React, use the correct version of this library
from the compatibility table below (if available):
⚠️**This library will stop being supported on December 31st 2024.**
| React | Library | Status | End-of-Life |
| :---------------: | :---------------------------------------: | :-------------: | :---------: |
| `>=16.8.0` | [![npm (scoped)][npm_shield]][npm] | **Active** | - |
| `16.0.0 - 16.7.x` | [![npm v1 (scoped)][npm_1_shield]][npm_1] | **Maintenance** | 2023-06-01 |
| `16.8.0 - 18` | [![npm (scoped)][npm_shield]][npm] | **Maintenance** | 2024-12-31 |
| `16.0.0 - 16.7.x` | [![npm v1 (scoped)][npm_1_shield]][npm_1] | **EOL** | 2023-06-01 |

@@ -98,2 +96,3 @@ ### Migrating from 1.x to 2.x

| `size` | `normal` \| `compact` | `normal` | The size of the widget. |
| `tabIndex` | `number` | `0` | The tabindex of the widget and challenge. If other elements in your page use tabindex, it should be set to make user navigation easier. |
| `onSuccess` | `function` | `undefined` | Callback function, executed when the user submits a successful response. The response token is passed to your callback. |

@@ -100,0 +99,0 @@ | `onError` | `function` | `undefined` | Callback function, executed when reCAPTCHA encounters an error (usually network connectivity) and cannot continue until connectivity is restored. If you specify a function here, you are responsible for informing the user that they should retry. |

Sorry, the diff of this file is not supported yet

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