@prosopo/procaptcha-react 2.9.96 → 2.9.97

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.
@@ -1,25 +1,7 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.96 build:cjs
2
+ > @prosopo/procaptcha-react@2.9.97 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
- ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
6
-
7
- package.json:17:3:
8
- 17 │ "types": "./dist/index.d.ts"
9
- ╵ ~~~~~~~
10
-
11
- The "import" condition comes earlier and will be used for all "import" statements:
12
-
13
- package.json:15:3:
14
- 15 │ "import": "./dist/index.js",
15
- ╵ ~~~~~~~~
16
-
17
- The "require" condition comes earlier and will be used for all "require" calls:
18
-
19
- package.json:16:3:
20
- 16 │ "require": "./dist/cjs/index.cjs",
21
- ╵ ~~~~~~~~~
22
-
23
5
  ViteCommonJSConfig: .
24
6
  {
25
7
  tsConfigPaths: [
@@ -61,19 +43,22 @@ ViteCommonJSConfig: .
61
43
  '@prosopo/keyring'
62
44
  ]
63
45
  }
64
- vite v6.4.1 building SSR bundle for production...
46
+ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
47
+ vite v8.1.5 building ssr environment for production...
65
48
  Bundle build started
66
- transforming...
67
- Build end
68
- ✓ 9 modules transformed.
49
+ 
50
+ 10 modules transformed.
69
51
  rendering chunks...
70
- dist/cjs/components/index.cjs 0.42 kB
71
- dist/cjs/util/index.cjs 0.45 kB
72
- dist/cjs/index.cjs 0.48 kB
73
- dist/cjs/components/Procaptcha.cjs 0.61 kB
74
- dist/cjs/components/Modal.cjs 1.36 kB
75
- dist/cjs/components/Button.cjs 2.38 kB
76
- dist/cjs/components/CaptchaWidget.cjs 5.94 kB
77
- dist/cjs/components/ProcaptchaWidget.cjs 6.07 kB
78
- dist/cjs/components/CaptchaComponent.cjs 8.81 kB
79
- ✓ built in 149ms
52
+ computing gzip size...
53
+ dist/cjs/components/index.cjs 0.35 kB │ gzip: 0.12 kB
54
+ dist/cjs/index.cjs 0.46 kB │ gzip: 0.18 kB
55
+ dist/cjs/components/Procaptcha.cjs 0.49 kB │ gzip: 0.27 kB
56
+ dist/cjs/util/index.cjs 0.50 kB │ gzip: 0.32 kB
57
+ dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
58
+ dist/cjs/components/Modal.cjs 1.55 kB │ gzip: 0.79 kB
59
+ dist/cjs/components/Button.cjs 2.33 kB │ gzip: 1.06 kB
60
+ dist/cjs/components/CaptchaWidget.cjs 3.72 kB │ gzip: 1.44 kB
61
+ dist/cjs/components/CaptchaComponent.cjs 6.04 kB gzip: 1.52 kB
62
+ dist/cjs/components/ProcaptchaWidget.cjs 6.08 kB │ gzip: 1.81 kB
63
+
64
+ ✓ built in 50ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.96 build:tsc
2
+ > @prosopo/procaptcha-react@2.9.97 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 10:23:01 PM - Projects in this build:
5
+ 8:59:38 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -22,41 +22,41 @@
22
22
  * ../procaptcha/tsconfig.json
23
23
  * tsconfig.json
24
24
 
25
- 10:23:01 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
25
+ 8:59:38 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
26
26
 
27
- 10:23:01 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
27
+ 8:59:38 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
28
28
 
29
- 10:23:01 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
29
+ 8:59:38 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
30
30
 
31
- 10:23:01 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
31
+ 8:59:38 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
32
32
 
33
- 10:23:01 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
33
+ 8:59:38 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
34
34
 
35
- 10:23:01 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
35
+ 8:59:38 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
36
36
 
37
- 10:23:01 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
37
+ 8:59:38 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/utils/batches.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
38
38
 
39
- 10:23:01 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/dataset.unit.test.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
39
+ 8:59:38 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/mocks/data/captchas.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
40
40
 
41
- 10:23:01 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
41
+ 8:59:38 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
42
42
 
43
- 10:23:02 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
43
+ 8:59:39 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/tests/providers.unit.test.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
44
44
 
45
- 10:23:02 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/index.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
45
+ 8:59:39 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/index.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
46
46
 
47
- 10:23:02 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
47
+ 8:59:39 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
48
48
 
49
- 10:23:02 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
49
+ 8:59:39 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
50
50
 
51
- 10:23:02 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
51
+ 8:59:39 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
52
52
 
53
- 10:23:02 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
53
+ 8:59:39 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/tests/cryptoWorker.unit.test.ts' is older than output '../account/tsconfig.tsbuildinfo'
54
54
 
55
- 10:23:02 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/reactComponents/Honeypot.tsx' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
55
+ 8:59:39 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/tests/defaultEvents.test.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
56
56
 
57
- 10:23:02 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
57
+ 8:59:39 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
58
58
 
59
- 10:23:02 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
59
+ 8:59:39 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
60
60
 
61
- 10:23:02 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json'...
61
+ 8:59:39 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json'...
62
62
 
@@ -1,29 +1,11 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.96 build
2
+ > @prosopo/procaptcha-react@2.9.97 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/procaptcha-react@2.9.96 build:cross-env
6
+ > @prosopo/procaptcha-react@2.9.97 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
- ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
10
-
11
- package.json:17:3:
12
- 17 │ "types": "./dist/index.d.ts"
13
- ╵ ~~~~~~~
14
-
15
- The "import" condition comes earlier and will be used for all "import" statements:
16
-
17
- package.json:15:3:
18
- 15 │ "import": "./dist/index.js",
19
- ╵ ~~~~~~~~
20
-
21
- The "require" condition comes earlier and will be used for all "require" calls:
22
-
23
- package.json:16:3:
24
- 16 │ "require": "./dist/cjs/index.cjs",
25
- ╵ ~~~~~~~~~
26
-
27
9
  ViteEsmConfig: .
28
10
  {
29
11
  tsConfigPaths: [
@@ -65,19 +47,22 @@ ViteEsmConfig: .
65
47
  '@prosopo/keyring'
66
48
  ]
67
49
  }
68
- vite v6.4.1 building SSR bundle for production...
50
+ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
51
+ vite v8.1.5 building ssr environment for production...
69
52
  Bundle build started
70
- transforming...
71
- Build end
72
- ✓ 9 modules transformed.
53
+ 
54
+ 10 modules transformed.
73
55
  rendering chunks...
74
- dist/components/index.js 0.29 kB
75
- dist/components/Procaptcha.js 0.33 kB
76
- dist/index.js 0.35 kB
77
- dist/util/index.js 0.44 kB
78
- dist/components/Modal.js 1.31 kB
79
- dist/components/Button.js 2.33 kB
80
- dist/components/CaptchaWidget.js 5.74 kB
81
- dist/components/ProcaptchaWidget.js 5.86 kB
82
- dist/components/CaptchaComponent.js 8.48 kB
83
- ✓ built in 252ms
56
+ computing gzip size...
57
+ dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
58
+ dist/components/index.js 0.20 kB │ gzip: 0.09 kB
59
+ dist/index.js 0.27 kB │ gzip: 0.13 kB
60
+ dist/components/Procaptcha.js 0.37 kB │ gzip: 0.24 kB
61
+ dist/util/index.js 0.50 kB │ gzip: 0.33 kB
62
+ dist/components/Modal.js 1.28 kB │ gzip: 0.70 kB
63
+ dist/components/Button.js 2.19 kB │ gzip: 1.03 kB
64
+ dist/components/CaptchaWidget.js 3.40 kB │ gzip: 1.41 kB
65
+ dist/components/CaptchaComponent.js 5.11 kB gzip: 1.47 kB
66
+ dist/components/ProcaptchaWidget.js 5.41 kB │ gzip: 1.77 kB
67
+
68
+ ✓ built in 52ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @prosopo/procaptcha-react
2
2
 
3
+ ## 2.9.97
4
+ ### Patch Changes
5
+
6
+ - e14fce6: chore(deps): bump vite to 6.4.3 and mongoose to 8.24.1, and adjust types for the mongoose 8.24 Document/ObjectId changes
7
+ - Updated dependencies [2c47bb7]
8
+ - Updated dependencies [ab3499c]
9
+ - Updated dependencies [0e1171c]
10
+ - Updated dependencies [103318c]
11
+ - Updated dependencies [270a8d8]
12
+ - Updated dependencies [e14fce6]
13
+ - @prosopo/util@3.3.5
14
+ - @prosopo/procaptcha-common@2.11.18
15
+ - @prosopo/procaptcha@2.10.58
16
+ - @prosopo/locale@3.2.8
17
+ - @prosopo/types@4.10.0
18
+ - @prosopo/common@3.1.48
19
+
3
20
  ## 2.9.96
4
21
  ### Patch Changes
5
22
 
@@ -0,0 +1,3 @@
1
+ import "node:module";
2
+ //#endregion
3
+ export {};
@@ -0,0 +1,23 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ exports.__toESM = __toESM;
@@ -1,80 +1,70 @@
1
- "use strict";
2
- const jsxRuntime = require("@emotion/react/jsx-runtime");
3
- const widgetSkeleton = require("@prosopo/widget-skeleton");
4
- const React = require("react");
5
- const index = require("../util/index.cjs");
6
- const buttonStyleBase = {
7
- display: "inline-flex",
8
- alignItems: "center",
9
- justifyContent: "center",
10
- position: "relative",
11
- boxSizing: "border-box",
12
- outline: "0px",
13
- margin: "0px",
14
- cursor: "pointer",
15
- userSelect: "none",
16
- verticalAlign: "middle",
17
- appearance: void 0,
18
- textDecoration: "none",
19
- fontWeight: "500",
20
- fontSize: "0.875rem",
21
- lineHeight: "1.75",
22
- letterSpacing: "0.02857em",
23
- textTransform: "uppercase",
24
- minWidth: "64px",
25
- padding: "6px 16px",
26
- borderRadius: "4px",
27
- transition: "background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
28
- backgroundColor: "#ffffff"
1
+ const require_index = require("../util/index.cjs");
2
+ let _prosopo_widget_skeleton = require("@prosopo/widget-skeleton");
3
+ let react = require("react");
4
+ let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
5
+ //#region src/components/Button.tsx
6
+ var buttonStyleBase = {
7
+ display: "inline-flex",
8
+ alignItems: "center",
9
+ justifyContent: "center",
10
+ position: "relative",
11
+ boxSizing: "border-box",
12
+ outline: "0px",
13
+ margin: "0px",
14
+ cursor: "pointer",
15
+ userSelect: "none",
16
+ verticalAlign: "middle",
17
+ appearance: void 0,
18
+ textDecoration: "none",
19
+ fontWeight: "500",
20
+ fontSize: "0.875rem",
21
+ lineHeight: "1.75",
22
+ letterSpacing: "0.02857em",
23
+ textTransform: "uppercase",
24
+ minWidth: "64px",
25
+ padding: "6px 16px",
26
+ borderRadius: "4px",
27
+ transition: "background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
28
+ backgroundColor: "#ffffff"
29
29
  };
30
- const Button = ({
31
- themeColor,
32
- buttonType,
33
- text,
34
- onClick
35
- }) => {
36
- const theme = React.useMemo(
37
- () => themeColor === "light" ? widgetSkeleton.lightTheme : widgetSkeleton.darkTheme,
38
- [themeColor]
39
- );
40
- const [hover, setHover] = React.useState(false);
41
- const buttonStyle = React.useMemo(() => {
42
- const baseStyle = {
43
- ...buttonStyleBase,
44
- border: `1px solid ${theme.palette.grey[500]}`,
45
- boxShadow: `0px 1px 3px 0px ${theme.palette.grey[500]}`,
46
- fontFamily: theme.font.fontFamily,
47
- width: "100%",
48
- color: hover ? theme.palette.primary.contrastText : theme.palette.background.contrastText
49
- };
50
- if (buttonType === "cancel") {
51
- return {
52
- ...baseStyle,
53
- backgroundColor: hover ? theme.palette.grey[600] : "transparent"
54
- };
55
- }
56
- return {
57
- ...baseStyle,
58
- backgroundColor: hover ? theme.palette.primary.main : theme.palette.background.default
59
- };
60
- }, [buttonType, hover, theme]);
61
- return /* @__PURE__ */ jsxRuntime.jsx(
62
- "button",
63
- {
64
- ...index({ dev: { cy: `button-${buttonType}` } }),
65
- onMouseEnter: () => setHover(true),
66
- onMouseLeave: () => setHover(false),
67
- style: buttonStyle,
68
- onClick: (e) => {
69
- if (!e.isTrusted) {
70
- return;
71
- }
72
- e.preventDefault();
73
- onClick();
74
- },
75
- "aria-label": text,
76
- children: text
77
- }
78
- );
30
+ var Button = ({ themeColor, buttonType, text, onClick }) => {
31
+ const theme = (0, react.useMemo)(() => themeColor === "light" ? _prosopo_widget_skeleton.lightTheme : _prosopo_widget_skeleton.darkTheme, [themeColor]);
32
+ const [hover, setHover] = (0, react.useState)(false);
33
+ const buttonStyle = (0, react.useMemo)(() => {
34
+ const baseStyle = {
35
+ ...buttonStyleBase,
36
+ border: `1px solid ${theme.palette.grey[500]}`,
37
+ boxShadow: `0px 1px 3px 0px ${theme.palette.grey[500]}`,
38
+ fontFamily: theme.font.fontFamily,
39
+ width: "100%",
40
+ color: hover ? theme.palette.primary.contrastText : theme.palette.background.contrastText
41
+ };
42
+ if (buttonType === "cancel") return {
43
+ ...baseStyle,
44
+ backgroundColor: hover ? theme.palette.grey[600] : "transparent"
45
+ };
46
+ return {
47
+ ...baseStyle,
48
+ backgroundColor: hover ? theme.palette.primary.main : theme.palette.background.default
49
+ };
50
+ }, [
51
+ buttonType,
52
+ hover,
53
+ theme
54
+ ]);
55
+ return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("button", {
56
+ ...require_index.default({ dev: { cy: `button-${buttonType}` } }),
57
+ onMouseEnter: () => setHover(true),
58
+ onMouseLeave: () => setHover(false),
59
+ style: buttonStyle,
60
+ onClick: (e) => {
61
+ if (!e.isTrusted) return;
62
+ e.preventDefault();
63
+ onClick();
64
+ },
65
+ "aria-label": text,
66
+ children: text
67
+ });
79
68
  };
80
- module.exports = Button;
69
+ //#endregion
70
+ exports.default = Button;