@prosopo/procaptcha-react 2.9.27 → 2.9.66

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,5 +1,5 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.27 build:cjs
2
+ > @prosopo/procaptcha-react@2.9.66 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
@@ -25,21 +25,19 @@ ViteCommonJSConfig: .
25
25
  tsConfigPaths: [
26
26
  '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
27
27
  '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
28
- '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
28
+ '/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
29
29
  '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
30
+ '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
30
31
  '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
31
32
  '/home/runner/work/captcha/captcha/packages/procaptcha/tsconfig.json',
32
33
  '/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
33
- '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json',
34
- '/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json',
35
- '/home/runner/work/captcha/captcha/packages/api-route/tsconfig.json',
36
- '/home/runner/work/captcha/captcha/packages/redis-client/tsconfig.json',
37
34
  '/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
38
35
  '/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
39
36
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
40
37
  '/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
41
38
  '/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
42
39
  '/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
40
+ '/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
43
41
  '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json'
44
42
  ]
45
43
  }
@@ -47,21 +45,19 @@ ViteCommonJSConfig: .
47
45
  externals: [
48
46
  '@prosopo/common',
49
47
  '@prosopo/locale',
50
- '@prosopo/types',
48
+ '@prosopo/logger',
51
49
  '@prosopo/util',
50
+ '@prosopo/types',
52
51
  '@prosopo/util-crypto',
53
52
  '@prosopo/procaptcha',
54
53
  '@prosopo/datasets',
55
- '@prosopo/types-database',
56
- '@prosopo/user-access-policy',
57
- '@prosopo/api-route',
58
- '@prosopo/redis-client',
59
54
  '@prosopo/api',
60
55
  '@prosopo/procaptcha-common',
61
56
  '@prosopo/load-balancer',
62
57
  '@prosopo/widget-skeleton',
63
58
  '@prosopo/account',
64
59
  '@prosopo/fingerprint',
60
+ '@prosopo/fingerprintjs',
65
61
  '@prosopo/keyring'
66
62
  ]
67
63
  }
@@ -77,7 +73,7 @@ rendering chunks...
77
73
  dist/cjs/components/Procaptcha.cjs 0.61 kB
78
74
  dist/cjs/components/Modal.cjs 1.36 kB
79
75
  dist/cjs/components/Button.cjs 2.38 kB
80
- dist/cjs/components/ProcaptchaWidget.cjs 4.37 kB
76
+ dist/cjs/components/ProcaptchaWidget.cjs 4.86 kB
81
77
  dist/cjs/components/CaptchaWidget.cjs 5.94 kB
82
78
  dist/cjs/components/CaptchaComponent.cjs 8.81 kB
83
- ✓ built in 174ms
79
+ ✓ built in 144ms
@@ -1,22 +1,20 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.27 build:tsc
2
+ > @prosopo/procaptcha-react@2.9.66 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 4:57:36 PM - Projects in this build:
5
+ 8:15:12 AM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
9
+ * ../logger/tsconfig.json
9
10
  * ../util-crypto/tsconfig.json
10
11
  * ../types/tsconfig.json
11
12
  * ../common/tsconfig.json
12
- * ../api-route/tsconfig.json
13
- * ../redis-client/tsconfig.json
14
- * ../api/tsconfig.json
15
- * ../user-access-policy/tsconfig.json
16
- * ../types-database/tsconfig.json
17
13
  * ../datasets/tsconfig.json
14
+ * ../api/tsconfig.json
18
15
  * ../load-balancer/tsconfig.json
19
16
  * ../widget-skeleton/tsconfig.json
17
+ * ../fingerprintjs/tsconfig.json
20
18
  * ../fingerprint/tsconfig.json
21
19
  * ../keyring/tsconfig.json
22
20
  * ../account/tsconfig.json
@@ -24,45 +22,41 @@
24
22
  * ../procaptcha/tsconfig.json
25
23
  * tsconfig.json
26
24
 
27
- 4:57:36 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/dependencies.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
28
-
29
- 4:57:36 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
30
-
31
- 4:57:36 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/verifyRecency.ts' is older than output '../util/tsconfig.tsbuildinfo'
25
+ 8:15:12 AM - 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'
32
26
 
33
- 4:57:36 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'
27
+ 8:15:12 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
34
28
 
35
- 4:57:36 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
29
+ 8:15:12 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
36
30
 
37
- 4:57:36 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/logger.ts' is older than output '../common/tsconfig.tsbuildinfo'
31
+ 8:15:12 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
38
32
 
39
- 4:57:36 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/index.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
33
+ 8:15:12 AM - 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'
40
34
 
41
- 4:57:36 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
35
+ 8:15:12 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
42
36
 
43
- 4:57:36 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
37
+ 8:15:12 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
44
38
 
45
- 4:57:36 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
39
+ 8:15:12 AM - 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'
46
40
 
47
- 4:57:36 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/index.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
41
+ 8:15:12 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
48
42
 
49
- 4:57:36 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'
43
+ 8:15:12 AM - 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'
50
44
 
51
- 4:57:36 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'
45
+ 8:15:12 AM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
52
46
 
53
- 4:57:36 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/constants.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
47
+ 8:15:12 AM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/sources/webgl.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
54
48
 
55
- 4:57:36 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:15:12 AM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
56
50
 
57
- 4:57:36 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:15:12 AM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
58
52
 
59
- 4:57:36 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:15:12 AM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/workers/cryptoWorker.ts' is older than output '../account/tsconfig.tsbuildinfo'
60
54
 
61
- 4:57:36 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/state/builder.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
55
+ 8:15:12 AM - 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'
62
56
 
63
- 4:57:36 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:15:12 AM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
64
58
 
65
- 4:57:36 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
59
+ 8:15:12 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
66
60
 
67
- 4:57:36 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json'...
61
+ 8:15:12 AM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json'...
68
62
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.27 build
2
+ > @prosopo/procaptcha-react@2.9.66 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/procaptcha-react@2.9.27 build:cross-env
6
+ > @prosopo/procaptcha-react@2.9.66 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
@@ -29,21 +29,19 @@ ViteEsmConfig: .
29
29
  tsConfigPaths: [
30
30
  '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
31
31
  '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
32
- '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
32
+ '/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
33
33
  '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
34
+ '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
34
35
  '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
35
36
  '/home/runner/work/captcha/captcha/packages/procaptcha/tsconfig.json',
36
37
  '/home/runner/work/captcha/captcha/packages/datasets/tsconfig.json',
37
- '/home/runner/work/captcha/captcha/packages/types-database/tsconfig.json',
38
- '/home/runner/work/captcha/captcha/packages/user-access-policy/tsconfig.json',
39
- '/home/runner/work/captcha/captcha/packages/api-route/tsconfig.json',
40
- '/home/runner/work/captcha/captcha/packages/redis-client/tsconfig.json',
41
38
  '/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
42
39
  '/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
43
40
  '/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
44
41
  '/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
45
42
  '/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
46
43
  '/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
44
+ '/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
47
45
  '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json'
48
46
  ]
49
47
  }
@@ -51,21 +49,19 @@ ViteEsmConfig: .
51
49
  externals: [
52
50
  '@prosopo/common',
53
51
  '@prosopo/locale',
54
- '@prosopo/types',
52
+ '@prosopo/logger',
55
53
  '@prosopo/util',
54
+ '@prosopo/types',
56
55
  '@prosopo/util-crypto',
57
56
  '@prosopo/procaptcha',
58
57
  '@prosopo/datasets',
59
- '@prosopo/types-database',
60
- '@prosopo/user-access-policy',
61
- '@prosopo/api-route',
62
- '@prosopo/redis-client',
63
58
  '@prosopo/api',
64
59
  '@prosopo/procaptcha-common',
65
60
  '@prosopo/load-balancer',
66
61
  '@prosopo/widget-skeleton',
67
62
  '@prosopo/account',
68
63
  '@prosopo/fingerprint',
64
+ '@prosopo/fingerprintjs',
69
65
  '@prosopo/keyring'
70
66
  ]
71
67
  }
@@ -81,7 +77,7 @@ rendering chunks...
81
77
  dist/util/index.js 0.44 kB
82
78
  dist/components/Modal.js 1.31 kB
83
79
  dist/components/Button.js 2.33 kB
84
- dist/components/ProcaptchaWidget.js 4.23 kB
80
+ dist/components/ProcaptchaWidget.js 4.67 kB
85
81
  dist/components/CaptchaWidget.js 5.74 kB
86
82
  dist/components/CaptchaComponent.js 8.48 kB
87
- ✓ built in 317ms
83
+ ✓ built in 259ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,396 @@
1
1
  # @prosopo/procaptcha-react
2
2
 
3
+ ## 2.9.66
4
+ ### Patch Changes
5
+
6
+ - Updated dependencies [a1d60db]
7
+ - Updated dependencies [2392aaf]
8
+ - Updated dependencies [6ca1125]
9
+ - @prosopo/types@4.3.0
10
+ - @prosopo/util@3.2.15
11
+ - @prosopo/common@3.1.38
12
+ - @prosopo/procaptcha@2.10.27
13
+ - @prosopo/procaptcha-common@2.10.17
14
+
15
+ ## 2.9.65
16
+ ### Patch Changes
17
+
18
+ - d3db08d: feat(widget): bait AI responses with empty input + decoded label, portaled into the dapp's form
19
+
20
+ Redesigns the honeypot so it can actually catch AI agents instead of being inert:
21
+
22
+ - Empty input + decoded label: the encoded morse/semaphore question moves from `input.value` to an offscreen `<label>` (base64-decoded at render). Naive form-fillers and humans leave the empty input alone; agents that read the DOM as a prompt write into the empty field, captured as `clientMetaData.hp` on submit.
23
+ - Portaled to light DOM, inside the dapp's `<form>`: widget stays in shadow DOM, but the honeypot portals via `react-dom/createPortal` into the enclosing form (`document.body` fallback). Bots no longer have to traverse `.shadowRoot` to reach it (which was tripping `@prosopo/catcher`'s shadow-DOM guard and wiping the bot's value), and the bait sits where bots actually look — `form.querySelectorAll('input')`.
24
+ - `form="<useId>-d"`: opaque per-instance non-existent form id disassociates the input from native form submission while keeping it DOM-discoverable. Dapp backends don't receive a stray `email_confirm=` field.
25
+ - Shared `<Honeypot />` extracted to `@prosopo/procaptcha-common`.
26
+ - `procaptcha-bundle` Vite config now routes the Honeypot module into a per-build opaque chunk (`c<random8hex>-<hash>.js`) so the URL doesn't identify the component or stay stable across builds for static blocklisting.
27
+ - Updated dependencies [d3db08d]
28
+ - @prosopo/procaptcha-common@2.10.16
29
+ - @prosopo/procaptcha@2.10.26
30
+
31
+ ## 2.9.64
32
+ ### Patch Changes
33
+
34
+ - 6c26669: Add per-site honeypot trap. When enabled, the provider attaches an encoded question (morse or semaphore, base64-wrapped) in the `x-prosopo-meta` response header on frictionless responses. The widget renders the value into an off-screen hidden input with `name="email_confirm"`; bots that auto-fill text inputs populate it and the value rides back on the solution submit as `clientMetaData.hp`, which is persisted on the `StoredCaptcha` record. Falls back to a random phrase from `PROSOPO_HONEYPOT_PHRASE_BANK_PATH` when no custom question is configured.
35
+ - f7f9ec5: feat(provider,widget): reserved always-pass / always-fail test site keys
36
+
37
+ Add two fixed, well-known reserved site keys (`ALWAYS_PASS_SITE_KEY` /
38
+ `ALWAYS_FAIL_SITE_KEY`) that force a deterministic captcha verdict for CI/CD and
39
+ integration testing, constant across production, staging and development.
40
+
41
+ - `@prosopo/types`: shared constants + `getTestSiteKeyMode`, imported by both the
42
+ provider and the widget.
43
+ - `@prosopo/provider`: short-circuits the `submit*` and `verify` endpoints (verify
44
+ runs before the signature check, so no dapp secret is needed), serves an
45
+ invisible PoW session from the frictionless handler, and bypasses domain
46
+ middleware. Works in every environment with no DB record.
47
+ - `@prosopo/procaptcha-common` / `-react` / `-frictionless`: render a prominent
48
+ `TestModeBanner` warning (always pass/fail) plus a console warning so a test key
49
+ can never ship to production unnoticed.
50
+
51
+ always-pass verifies at both the submit and verify layers; always-fail fails at
52
+ both. Safe in production by design: the override only weakens protection for a
53
+ dapp that deliberately opts in, mirroring reCAPTCHA's public test keys.
54
+ - Updated dependencies [6c26669]
55
+ - Updated dependencies [f7f9ec5]
56
+ - @prosopo/types@4.2.1
57
+ - @prosopo/procaptcha@2.10.25
58
+ - @prosopo/procaptcha-common@2.10.15
59
+
60
+ ## 2.9.63
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies [0fd81af]
64
+ - @prosopo/common@3.1.37
65
+ - @prosopo/procaptcha@2.10.24
66
+ - @prosopo/procaptcha-common@2.10.14
67
+
68
+ ## 2.9.62
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [20cae63]
72
+ - Updated dependencies [4d9923e]
73
+ - @prosopo/types@4.2.0
74
+ - @prosopo/procaptcha@2.10.23
75
+ - @prosopo/procaptcha-common@2.10.13
76
+
77
+ ## 2.9.61
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [d351362]
81
+ - @prosopo/types@4.1.4
82
+ - @prosopo/procaptcha@2.10.22
83
+ - @prosopo/procaptcha-common@2.10.12
84
+
85
+ ## 2.9.60
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies [6567ce0]
89
+ - Updated dependencies [e2711ae]
90
+ - Updated dependencies [5786629]
91
+ - @prosopo/util@3.2.14
92
+ - @prosopo/types@4.1.3
93
+ - @prosopo/locale@3.2.4
94
+ - @prosopo/procaptcha@2.10.21
95
+ - @prosopo/common@3.1.36
96
+ - @prosopo/procaptcha-common@2.10.11
97
+
98
+ ## 2.9.59
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [72a1218]
102
+ - Updated dependencies [566c1f6]
103
+ - @prosopo/util@3.2.13
104
+ - @prosopo/widget-skeleton@2.8.3
105
+ - @prosopo/procaptcha@2.10.20
106
+ - @prosopo/types@4.1.2
107
+ - @prosopo/procaptcha-common@2.10.10
108
+
109
+ ## 2.9.58
110
+ ### Patch Changes
111
+
112
+ - Updated dependencies [53bfd45]
113
+ - Updated dependencies [91958da]
114
+ - @prosopo/procaptcha-common@2.10.9
115
+ - @prosopo/locale@3.2.3
116
+ - @prosopo/types@4.1.1
117
+ - @prosopo/procaptcha@2.10.19
118
+ - @prosopo/common@3.1.35
119
+
120
+ ## 2.9.57
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies [6a741ce]
124
+ - @prosopo/types@4.1.0
125
+ - @prosopo/procaptcha@2.10.18
126
+ - @prosopo/procaptcha-common@2.10.8
127
+
128
+ ## 2.9.56
129
+ ### Patch Changes
130
+
131
+ - @prosopo/procaptcha-common@2.10.7
132
+ - @prosopo/procaptcha@2.10.17
133
+
134
+ ## 2.9.55
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [3c0be68]
138
+ - Updated dependencies [f9ea09d]
139
+ - Updated dependencies [4aae4e6]
140
+ - Updated dependencies [d865319]
141
+ - Updated dependencies [753304b]
142
+ - Updated dependencies [8bb7286]
143
+ - Updated dependencies [f9ea09d]
144
+ - Updated dependencies [4aae4e6]
145
+ - Updated dependencies [4993813]
146
+ - Updated dependencies [5f1ae53]
147
+ - @prosopo/types@4.0.0
148
+ - @prosopo/locale@3.2.2
149
+ - @prosopo/util@3.2.12
150
+ - @prosopo/procaptcha@2.10.16
151
+ - @prosopo/common@3.1.34
152
+ - @prosopo/widget-skeleton@2.8.2
153
+ - @prosopo/procaptcha-common@2.10.6
154
+
155
+ ## 2.9.54
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies [819ed95]
159
+ - @prosopo/types@3.16.1
160
+ - @prosopo/procaptcha@2.10.15
161
+ - @prosopo/procaptcha-common@2.10.5
162
+
163
+ ## 2.9.53
164
+ ### Patch Changes
165
+
166
+ - Updated dependencies [f6a4402]
167
+ - Updated dependencies [99dfb44]
168
+ - @prosopo/types@3.16.0
169
+ - @prosopo/procaptcha@2.10.14
170
+ - @prosopo/procaptcha-common@2.10.4
171
+
172
+ ## 2.9.52
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies [3e54c0a]
176
+ - @prosopo/types@3.15.0
177
+ - @prosopo/procaptcha@2.10.13
178
+ - @prosopo/procaptcha-common@2.10.3
179
+
180
+ ## 2.9.51
181
+ ### Patch Changes
182
+
183
+ - Updated dependencies [946a8ba]
184
+ - Updated dependencies [5614814]
185
+ - Updated dependencies [b94890c]
186
+ - @prosopo/types@3.14.1
187
+ - @prosopo/locale@3.2.1
188
+ - @prosopo/common@3.1.33
189
+ - @prosopo/procaptcha@2.10.12
190
+ - @prosopo/procaptcha-common@2.10.2
191
+
192
+ ## 2.9.50
193
+ ### Patch Changes
194
+
195
+ - Updated dependencies [06970d2]
196
+ - Updated dependencies [fc514dd]
197
+ - Updated dependencies [42650db]
198
+ - Updated dependencies [dd3e06e]
199
+ - @prosopo/procaptcha-common@2.10.1
200
+ - @prosopo/widget-skeleton@2.8.1
201
+ - @prosopo/locale@3.2.0
202
+ - @prosopo/types@3.14.0
203
+ - @prosopo/procaptcha@2.10.11
204
+ - @prosopo/common@3.1.32
205
+
206
+ ## 2.9.49
207
+ ### Patch Changes
208
+
209
+ - Updated dependencies [73df23c]
210
+ - Updated dependencies [8139819]
211
+ - Updated dependencies [4a9c518]
212
+ - @prosopo/procaptcha-common@2.10.0
213
+ - @prosopo/widget-skeleton@2.8.0
214
+ - @prosopo/common@3.1.31
215
+ - @prosopo/procaptcha@2.10.10
216
+
217
+ ## 2.9.48
218
+ ### Patch Changes
219
+
220
+ - Updated dependencies [a25dffa]
221
+ - @prosopo/util@3.2.11
222
+ - @prosopo/procaptcha@2.10.9
223
+ - @prosopo/types@3.13.3
224
+ - @prosopo/procaptcha-common@2.9.41
225
+
226
+ ## 2.9.47
227
+ ### Patch Changes
228
+
229
+ - Updated dependencies [346edd7]
230
+ - @prosopo/util@3.2.10
231
+ - @prosopo/procaptcha@2.10.8
232
+ - @prosopo/types@3.13.2
233
+ - @prosopo/procaptcha-common@2.9.40
234
+
235
+ ## 2.9.46
236
+ ### Patch Changes
237
+
238
+ - Updated dependencies [22bfee7]
239
+ - Updated dependencies [20192d2]
240
+ - @prosopo/util@3.2.9
241
+ - @prosopo/widget-skeleton@2.7.14
242
+ - @prosopo/procaptcha@2.10.7
243
+ - @prosopo/types@3.13.1
244
+ - @prosopo/procaptcha-common@2.9.39
245
+
246
+ ## 2.9.45
247
+ ### Patch Changes
248
+
249
+ - Updated dependencies [e0fb3d6]
250
+ - Updated dependencies [e6d9553]
251
+ - Updated dependencies [f3f23e3]
252
+ - @prosopo/util@3.2.8
253
+ - @prosopo/types@3.13.0
254
+ - @prosopo/procaptcha@2.10.6
255
+ - @prosopo/procaptcha-common@2.9.38
256
+
257
+ ## 2.9.44
258
+ ### Patch Changes
259
+
260
+ - Updated dependencies [d5082a9]
261
+ - Updated dependencies [e1ea65f]
262
+ - Updated dependencies [c316257]
263
+ - @prosopo/types@3.12.3
264
+ - @prosopo/util@3.2.7
265
+ - @prosopo/procaptcha-common@2.9.37
266
+ - @prosopo/procaptcha@2.10.5
267
+
268
+ ## 2.9.43
269
+ ### Patch Changes
270
+
271
+ - Updated dependencies [adb89a6]
272
+ - @prosopo/locale@3.1.29
273
+ - @prosopo/types@3.12.2
274
+ - @prosopo/util@3.2.6
275
+ - @prosopo/common@3.1.30
276
+ - @prosopo/procaptcha@2.10.4
277
+ - @prosopo/procaptcha-common@2.9.36
278
+
279
+ ## 2.9.42
280
+ ### Patch Changes
281
+
282
+ - Updated dependencies [c5ee492]
283
+ - Updated dependencies [a90eb54]
284
+ - @prosopo/common@3.1.29
285
+ - @prosopo/types@3.12.1
286
+ - @prosopo/procaptcha@2.10.3
287
+ - @prosopo/procaptcha-common@2.9.35
288
+
289
+ ## 2.9.41
290
+ ### Patch Changes
291
+
292
+ - Updated dependencies [676c5f2]
293
+ - Updated dependencies [feaca02]
294
+ - @prosopo/types@3.12.0
295
+ - @prosopo/procaptcha-common@2.9.34
296
+ - @prosopo/procaptcha@2.10.2
297
+
298
+ ## 2.9.40
299
+ ### Patch Changes
300
+
301
+ - Updated dependencies [8148587]
302
+ - @prosopo/types@3.11.1
303
+ - @prosopo/procaptcha@2.10.1
304
+ - @prosopo/procaptcha-common@2.9.33
305
+
306
+ ## 2.9.39
307
+ ### Patch Changes
308
+
309
+ - Updated dependencies [7f6ffc5]
310
+ - @prosopo/procaptcha@2.10.0
311
+ - @prosopo/types@3.11.0
312
+ - @prosopo/procaptcha-common@2.9.32
313
+
314
+ ## 2.9.38
315
+ ### Patch Changes
316
+
317
+ - Updated dependencies [93fa086]
318
+ - @prosopo/types@3.10.2
319
+ - @prosopo/procaptcha@2.9.38
320
+ - @prosopo/procaptcha-common@2.9.31
321
+
322
+ ## 2.9.37
323
+ ### Patch Changes
324
+
325
+ - Updated dependencies [cde7550]
326
+ - @prosopo/types@3.10.1
327
+ - @prosopo/procaptcha@2.9.37
328
+ - @prosopo/procaptcha-common@2.9.30
329
+
330
+ ## 2.9.36
331
+ ### Patch Changes
332
+
333
+ - Updated dependencies [ad6d622]
334
+ - @prosopo/types@3.10.0
335
+ - @prosopo/procaptcha@2.9.36
336
+ - @prosopo/procaptcha-common@2.9.29
337
+
338
+ ## 2.9.35
339
+ ### Patch Changes
340
+
341
+ - 592adf1: Don't make people wait so long for a new session
342
+ - Updated dependencies [ff58a70]
343
+ - @prosopo/types@3.9.0
344
+ - @prosopo/procaptcha@2.9.35
345
+ - @prosopo/procaptcha-common@2.9.28
346
+
347
+ ## 2.9.34
348
+ ### Patch Changes
349
+
350
+ - @prosopo/procaptcha@2.9.34
351
+
352
+ ## 2.9.33
353
+ ### Patch Changes
354
+
355
+ - Updated dependencies [d2431cd]
356
+ - @prosopo/types@3.8.4
357
+ - @prosopo/procaptcha@2.9.33
358
+ - @prosopo/procaptcha-common@2.9.27
359
+
360
+ ## 2.9.32
361
+ ### Patch Changes
362
+
363
+ - @prosopo/procaptcha@2.9.32
364
+
365
+ ## 2.9.31
366
+ ### Patch Changes
367
+
368
+ - Updated dependencies [bd6995b]
369
+ - @prosopo/types@3.8.3
370
+ - @prosopo/procaptcha@2.9.31
371
+ - @prosopo/procaptcha-common@2.9.26
372
+
373
+ ## 2.9.30
374
+ ### Patch Changes
375
+
376
+ - Updated dependencies [9633e58]
377
+ - @prosopo/types@3.8.2
378
+ - @prosopo/procaptcha@2.9.30
379
+ - @prosopo/procaptcha-common@2.9.25
380
+
381
+ ## 2.9.29
382
+ ### Patch Changes
383
+
384
+ - Updated dependencies [f52a5c1]
385
+ - @prosopo/types@3.8.1
386
+ - @prosopo/procaptcha@2.9.29
387
+ - @prosopo/procaptcha-common@2.9.24
388
+
389
+ ## 2.9.28
390
+ ### Patch Changes
391
+
392
+ - @prosopo/procaptcha@2.9.28
393
+
3
394
  ## 2.9.27
4
395
  ### Patch Changes
5
396
 
package/README.md CHANGED
@@ -1,121 +1,71 @@
1
1
  # Prosopo Procaptcha React Component Library
2
2
 
3
- React components for integrating the Prosopo [procaptcha](https://github.com/prosopo/procaptcha) into a React app.
3
+ React components for integrating [Prosopo Procaptcha](https://prosopo.io) into a React app.
4
4
 
5
- Prosopo is a distributed human verification service that can be used to stop bots from interacting with your apps.
6
- Sign up to be a network [beta tester](https://prosopo.io/#signup).
5
+ Procaptcha is a drop-in replacement for reCAPTCHA, hCaptcha, and Cloudflare Turnstile that protects user privacy and collects zero data. [Sign up for free](https://prosopo.io/register) to get your site key.
7
6
 
8
7
  ## Installation
9
8
 
10
- You can install this library with:
11
-
12
9
  ```bash
13
10
  npm install @prosopo/procaptcha-react --save
14
11
  ```
15
12
 
16
13
  ## Basic Usage
17
14
 
18
- See the [client example](https://github.com/prosopo/client-example) for a minimal example of these components being used
19
- in a frontend app.
15
+ ```tsx
16
+ import { Procaptcha } from "@prosopo/procaptcha-react"
20
17
 
21
- ```jsx
22
- <Procaptcha config={config} callbacks={{ onError, onHuman, onExpired }} />
18
+ <Procaptcha config={config} callbacks={{ onHuman, onError, onExpired }} />
23
19
  ```
24
20
 
25
- ### Callbacks
21
+ See the [client example](https://github.com/prosopo/captcha/tree/main/demos/client-example) for a working demo.
26
22
 
27
- `ProcaptchaEvents` are passed to the captcha component at creation.
23
+ ### Callbacks
28
24
 
29
- The captcha event callbacks are defined as follows:
25
+ All callbacks are optional via `ProcaptchaCallbacks`:
30
26
 
31
- ```typescript
32
- /**
33
- * A list of all events which can occur during the Procaptcha process.
34
- */
35
- export interface ProcaptchaEvents {
36
- onError: (error: Error) => void
37
- onHuman: (output: ProcaptchaOutput) => void
38
- onExtensionNotFound: () => void
39
- onExpired: () => void
40
- onFailed: () => void
41
- }
42
- ```
27
+ | Callback | Description |
28
+ | ---------------------- | --------------------------------------------------------------- |
29
+ | `onHuman` | Called when the user passes the challenge. Receives a token. |
30
+ | `onError` | Called when an error occurs. Receives an `Error` object. |
31
+ | `onExpired` | Called when the challenge expires (user took too long). |
32
+ | `onFailed` | Called when the user fails the challenge. |
33
+ | `onClose` | Called when the challenge modal is closed. |
34
+ | `onOpen` | Called when the challenge modal is opened. |
35
+ | `onReset` | Called when the challenge is reset. |
36
+ | `onExtensionNotFound` | Called when a required browser extension is not found. |
43
37
 
44
38
  ### onHuman
45
39
 
46
- The `onHuman` callback is called when the user has successfully completed the captcha challenge. The `ProcaptchaOutput`
47
- object contains the following fields:
48
-
49
- | Key | Type | Description |
50
- | ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------- |
51
- | commitmentId | string | The commitment ID of the captcha challenge. This is used to verify the user's response on-chain. |
52
- | providerUrl | string | The URL of the provider that the user used to solve the captcha challenge. |
53
- | dapp | string | The SITE_KEY of your application / website |
54
- | user | string | The user's account address |
55
- | blockNumber | number | The block number of the captcha challenge. This is used to verify that the contacted provider was randomly selected on-chain. |
56
-
57
- ### onError
58
-
59
- The `onError` callback is called when an error occurs during the captcha process. The `Error` object is a standard
60
- JavaScript error.
61
-
62
- ### onExpired
40
+ The `onHuman` callback receives a `ProcaptchaToken` (a hex-encoded string) that should be sent to your backend for server-side verification.
63
41
 
64
- The `onExpired` callback is called when the captcha challenge has expired. This can occur if the user takes too long to
65
- complete the challenge.
42
+ ## Config
66
43
 
67
- ### onFailed
68
-
69
- The `onFailed` callback is called when the user has failed the captcha challenge. This can occur if the user answers the
70
- challenge incorrectly.
71
-
72
- ## Add the Procaptcha Widget to your Web page using a React Component
73
-
74
- You can see Procaptcha being used as a React component in
75
- our [React Demo](https://github.com/prosopo/captcha/blob/main/demos/client-example/src/App.tsx).
76
-
77
- The Procaptcha component is called as follows:
78
-
79
- ```tsx
80
- <Procaptcha config={config} callbacks={{ onError, onHuman, onExpired }} />
81
- ```
82
-
83
- A config object is required and must contain your SITE_KEY. The callbacks are optional and can be used to handle the
84
- various Procaptcha events. The following config demonstrates the `PROSOPO_SITE_KEY` variable being pulled from
85
- environment variables.
44
+ The config requires your site key. All other fields are optional.
86
45
 
87
46
  ```tsx
88
47
  const config: ProcaptchaClientConfigInput = {
89
48
  account: {
90
49
  address: process.env.PROSOPO_SITE_KEY || undefined,
91
50
  },
92
- web2: 'true',
93
- dappName: 'client-example',
94
- defaultEnvironment: 'rococo',
95
- networks: {
96
- rococo: {
97
- endpoint: 'wss://rococo-contracts-rpc.polkadot.io:443',
98
- contract: {
99
- address: '5HiVWQhJrysNcFNEWf2crArKht16zrhro3FcekVWocyQjx5u',
100
- name: 'prosopo',
101
- },
102
- },
103
- },
51
+ web2: true,
52
+ dappName: "my-app",
104
53
  solutionThreshold: 80,
105
54
  }
106
55
  ```
107
56
 
108
57
  ### Config Options
109
58
 
110
- | Key | Type | Description |
111
- | ------------------ | ------ | --------------------------------------------------------------------------------------- |
112
- | account | string | The SITE_KEY you received when you signed up |
113
- | web2 | string | Set to `true` to enable web2 support |
114
- | dappName | string | The name of your application / website |
115
- | defaultEnvironment | string | The default environment to use - set to `rococo` |
116
- | networks | object | The networks your application supports - copy paste this from the config above |
117
- | solutionThreshold | number | The percentage of captcha that a user must have answered correctly to identify as human |
59
+ | Key | Type | Default | Description |
60
+ | ----------------- | ------- | -------------------- | -------------------------------------------------------------- |
61
+ | account.address | string | (required) | The site key you received when you signed up |
62
+ | web2 | boolean | `true` | Set to `true` for standard web usage |
63
+ | dappName | string | `"ProsopoClientDapp"`| The name of your application |
64
+ | solutionThreshold | number | `80` | Percentage of correct answers required to pass (0-100) |
65
+ | theme | string | `"light"` | `"light"` or `"dark"` |
66
+ | mode | string | `"visible"` | `"visible"` or `"invisible"` |
67
+ | language | string | (auto) | Language override |
118
68
 
119
- ## Verify the User Response Server Side
69
+ ## Server-side Verification
120
70
 
121
- Please see the main [README](https://github.com/prosopo/captcha/blob/main/README.md) for instructions on how to implement the server side of Procaptcha.
71
+ Use the [@prosopo/server](https://github.com/prosopo/captcha/tree/main/packages/server) package to verify the token on your backend. See the [docs](https://docs.prosopo.io) for full integration instructions.
@@ -17,12 +17,14 @@ const ProcaptchaWidget = (props) => {
17
17
  const callbacks = props.callbacks || {};
18
18
  const [state, updateState] = procaptchaCommon.useProcaptcha(React.useState, React.useRef);
19
19
  const [loading, setLoading] = React.useState(false);
20
+ const hpRef = React.useRef(null);
20
21
  const manager = procaptcha.Manager(
21
22
  config,
22
23
  state,
23
24
  updateState,
24
25
  callbacks,
25
- frictionlessState
26
+ frictionlessState,
27
+ () => hpRef.current?.value || void 0
26
28
  );
27
29
  const theme = "light" === props.config.theme ? widgetSkeleton.lightTheme : widgetSkeleton.darkTheme;
28
30
  React.useEffect(() => {
@@ -45,7 +47,7 @@ const ProcaptchaWidget = (props) => {
45
47
  if (state.error.key === "CAPTCHA.NO_SESSION_FOUND" && frictionlessState) {
46
48
  setTimeout(() => {
47
49
  frictionlessState.restart();
48
- }, 3e3);
50
+ }, 100);
49
51
  }
50
52
  }
51
53
  }, [state.error, frictionlessState]);
@@ -71,23 +73,28 @@ const ProcaptchaWidget = (props) => {
71
73
  );
72
74
  };
73
75
  }, [manager, state.challenge, updateState]);
76
+ const honeypot = frictionlessState?.hp ? /* @__PURE__ */ jsxRuntime.jsx(procaptchaCommon.Honeypot, { ref: hpRef, encodedQuestion: frictionlessState.hp }) : null;
74
77
  if (config.mode === "invisible") {
75
- return /* @__PURE__ */ jsxRuntime.jsx(Modal, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsxRuntime.jsx(
76
- CaptchaComponent,
77
- {
78
- challenge: state.challenge,
79
- index: state.index,
80
- solutions: state.solutions,
81
- onSubmit: manager.submit,
82
- onCancel: manager.cancel,
83
- onClick: manager.select,
84
- onNext: manager.nextRound,
85
- onReload: manager.reload,
86
- themeColor: config.theme ?? "light"
87
- }
88
- ) : null });
78
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
79
+ honeypot,
80
+ /* @__PURE__ */ jsxRuntime.jsx(Modal, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsxRuntime.jsx(
81
+ CaptchaComponent,
82
+ {
83
+ challenge: state.challenge,
84
+ index: state.index,
85
+ solutions: state.solutions,
86
+ onSubmit: manager.submit,
87
+ onCancel: manager.cancel,
88
+ onClick: manager.select,
89
+ onNext: manager.nextRound,
90
+ onReload: manager.reload,
91
+ themeColor: config.theme ?? "light"
92
+ }
93
+ ) : null })
94
+ ] });
89
95
  }
90
96
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "image-captcha", children: [
97
+ honeypot,
91
98
  /* @__PURE__ */ jsxRuntime.jsx(Modal, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsxRuntime.jsx(
92
99
  CaptchaComponent,
93
100
  {
@@ -102,6 +109,7 @@ const ProcaptchaWidget = (props) => {
102
109
  themeColor: config.theme ?? "light"
103
110
  }
104
111
  ) : /* @__PURE__ */ jsxRuntime.jsx("div", { children: "No challenge set." }) }),
112
+ /* @__PURE__ */ jsxRuntime.jsx(procaptchaCommon.TestModeBanner, { siteKey: config.account.address ?? "" }),
105
113
  /* @__PURE__ */ jsxRuntime.jsx(
106
114
  procaptchaCommon.Checkbox,
107
115
  {
@@ -1 +1 @@
1
- {"version":3,"file":"ProcaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAS9E,QAAA,MAAM,gBAAgB,UAAW,eAAe,qDAuI/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ProcaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAS9E,QAAA,MAAM,gBAAgB,UAAW,eAAe,qDAkJ/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,7 +1,7 @@
1
- import { jsx, jsxs } from "@emotion/react/jsx-runtime";
1
+ import { jsx, jsxs, Fragment } from "@emotion/react/jsx-runtime";
2
2
  import { useTranslation, loadI18next } from "@prosopo/locale";
3
3
  import { Manager } from "@prosopo/procaptcha";
4
- import { useProcaptcha, Checkbox } from "@prosopo/procaptcha-common";
4
+ import { useProcaptcha, Honeypot, TestModeBanner, Checkbox } from "@prosopo/procaptcha-common";
5
5
  import { ProcaptchaConfigSchema } from "@prosopo/types";
6
6
  import { lightTheme, darkTheme } from "@prosopo/widget-skeleton";
7
7
  import { useState, useRef, useEffect } from "react";
@@ -16,12 +16,14 @@ const ProcaptchaWidget = (props) => {
16
16
  const callbacks = props.callbacks || {};
17
17
  const [state, updateState] = useProcaptcha(useState, useRef);
18
18
  const [loading, setLoading] = useState(false);
19
+ const hpRef = useRef(null);
19
20
  const manager = Manager(
20
21
  config,
21
22
  state,
22
23
  updateState,
23
24
  callbacks,
24
- frictionlessState
25
+ frictionlessState,
26
+ () => hpRef.current?.value || void 0
25
27
  );
26
28
  const theme = "light" === props.config.theme ? lightTheme : darkTheme;
27
29
  useEffect(() => {
@@ -44,7 +46,7 @@ const ProcaptchaWidget = (props) => {
44
46
  if (state.error.key === "CAPTCHA.NO_SESSION_FOUND" && frictionlessState) {
45
47
  setTimeout(() => {
46
48
  frictionlessState.restart();
47
- }, 3e3);
49
+ }, 100);
48
50
  }
49
51
  }
50
52
  }, [state.error, frictionlessState]);
@@ -70,23 +72,28 @@ const ProcaptchaWidget = (props) => {
70
72
  );
71
73
  };
72
74
  }, [manager, state.challenge, updateState]);
75
+ const honeypot = frictionlessState?.hp ? /* @__PURE__ */ jsx(Honeypot, { ref: hpRef, encodedQuestion: frictionlessState.hp }) : null;
73
76
  if (config.mode === "invisible") {
74
- return /* @__PURE__ */ jsx(ModalComponent, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsx(
75
- CaptchaComponent,
76
- {
77
- challenge: state.challenge,
78
- index: state.index,
79
- solutions: state.solutions,
80
- onSubmit: manager.submit,
81
- onCancel: manager.cancel,
82
- onClick: manager.select,
83
- onNext: manager.nextRound,
84
- onReload: manager.reload,
85
- themeColor: config.theme ?? "light"
86
- }
87
- ) : null });
77
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
78
+ honeypot,
79
+ /* @__PURE__ */ jsx(ModalComponent, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsx(
80
+ CaptchaComponent,
81
+ {
82
+ challenge: state.challenge,
83
+ index: state.index,
84
+ solutions: state.solutions,
85
+ onSubmit: manager.submit,
86
+ onCancel: manager.cancel,
87
+ onClick: manager.select,
88
+ onNext: manager.nextRound,
89
+ onReload: manager.reload,
90
+ themeColor: config.theme ?? "light"
91
+ }
92
+ ) : null })
93
+ ] });
88
94
  }
89
95
  return /* @__PURE__ */ jsxs("div", { className: "image-captcha", children: [
96
+ honeypot,
90
97
  /* @__PURE__ */ jsx(ModalComponent, { show: state.showModal, children: state.challenge ? /* @__PURE__ */ jsx(
91
98
  CaptchaComponent,
92
99
  {
@@ -101,6 +108,7 @@ const ProcaptchaWidget = (props) => {
101
108
  themeColor: config.theme ?? "light"
102
109
  }
103
110
  ) : /* @__PURE__ */ jsx("div", { children: "No challenge set." }) }),
111
+ /* @__PURE__ */ jsx(TestModeBanner, { siteKey: config.account.address ?? "" }),
104
112
  /* @__PURE__ */ jsx(
105
113
  Checkbox,
106
114
  {
@@ -1 +1 @@
1
- {"version":3,"file":"ProcaptchaWidget.js","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9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AO,CAAC,KAAK,EAAE,CAAC;oBACtB,UAAU,CAAC,KAAK,CAAC,CAAC;gBACnB,CAAC,EACD,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,EAC3D,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,gBAChB,gBAAgB,EAC3B,OAAO,EAAE,OAAO,GACf,IACG,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-react",
3
- "version": "2.9.27",
3
+ "version": "2.9.66",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -29,19 +29,19 @@
29
29
  },
30
30
  "browserslist": ["> 0.5%, last 2 versions, not dead"],
31
31
  "dependencies": {
32
- "@prosopo/common": "3.1.28",
33
- "@prosopo/locale": "3.1.28",
34
- "@prosopo/procaptcha": "2.9.27",
35
- "@prosopo/procaptcha-common": "2.9.23",
36
- "@prosopo/types": "3.8.0",
37
- "@prosopo/util": "3.2.5",
38
- "@prosopo/widget-skeleton": "2.7.13",
32
+ "@prosopo/common": "3.1.38",
33
+ "@prosopo/locale": "3.2.4",
34
+ "@prosopo/procaptcha": "2.10.27",
35
+ "@prosopo/procaptcha-common": "2.10.17",
36
+ "@prosopo/types": "4.3.0",
37
+ "@prosopo/util": "3.2.15",
38
+ "@prosopo/widget-skeleton": "2.8.3",
39
39
  "csstype": "3.1.3",
40
40
  "react": "18.3.1",
41
41
  "react-dom": "18.3.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@prosopo/config": "3.3.0",
44
+ "@prosopo/config": "3.3.1",
45
45
  "@emotion/react": "11.11.1",
46
46
  "@types/node": "22.10.2",
47
47
  "@types/react-dom": "18.3.1",
@@ -57,7 +57,8 @@
57
57
  },
58
58
  "repository": {
59
59
  "type": "git",
60
- "url": "git+https://github.com/prosopo/captcha.git"
60
+ "url": "git+https://github.com/prosopo/captcha.git",
61
+ "directory": "packages/procaptcha-react"
61
62
  },
62
63
  "bugs": {
63
64
  "url": "https://github.com/prosopo/captcha/issues"