@captchafox/react 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +13 -0
- package/dist/index.js +0 -1
- package/dist/index.mjs +0 -1
- package/package.json +16 -4
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { WidgetApi, WidgetOptions } from '@captchafox/types';
|
|
3
|
+
|
|
4
|
+
type CaptchaFoxInstance = Omit<WidgetApi, 'render'>;
|
|
5
|
+
declare const CaptchaFox: react.ForwardRefExoticComponent<WidgetOptions & {
|
|
6
|
+
/** Called after the widget has been loaded */
|
|
7
|
+
onLoad?: (() => void) | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
} & react.RefAttributes<CaptchaFoxInstance>>;
|
|
10
|
+
|
|
11
|
+
declare const CAPTCHA_RESPONSE_KEY = "cf-captcha-response";
|
|
12
|
+
|
|
13
|
+
export { CAPTCHA_RESPONSE_KEY, CaptchaFox, CaptchaFoxInstance };
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@captchafox/react",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"license": "MIT",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
9
21
|
"files": [
|
|
10
|
-
"dist
|
|
22
|
+
"dist"
|
|
11
23
|
],
|
|
12
24
|
"scripts": {
|
|
13
25
|
"build": "tsup src/index.tsx --format esm,cjs --dts --external react",
|
|
@@ -22,7 +34,7 @@
|
|
|
22
34
|
"react-dom": ">=16.8.0"
|
|
23
35
|
},
|
|
24
36
|
"dependencies": {
|
|
25
|
-
"@captchafox/types": "
|
|
37
|
+
"@captchafox/types": "^1.1.0"
|
|
26
38
|
},
|
|
27
39
|
"devDependencies": {
|
|
28
40
|
"@captchafox/internal": "*",
|
|
@@ -37,7 +49,7 @@
|
|
|
37
49
|
"jest": "^29.5.0",
|
|
38
50
|
"jest-environment-jsdom": "^29.5.0",
|
|
39
51
|
"react": "^18.1.0",
|
|
40
|
-
"tsup": "^
|
|
52
|
+
"tsup": "^7.1.0",
|
|
41
53
|
"ts-jest": "^29.0.5",
|
|
42
54
|
"typescript": "^4.9.5"
|
|
43
55
|
},
|