@prosopo/procaptcha-bundle 3.3.0 → 4.1.8
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/.turbo/turbo-build$colon$cjs.log +28 -35
- package/.turbo/turbo-build$colon$tsc.log +33 -36
- package/.turbo/turbo-build.log +29 -36
- package/CHANGELOG.md +489 -0
- package/dist/cjs/index.cjs +4 -9
- package/dist/cjs/util/captcha/captchaRenderer.cjs +10 -9
- package/dist/cjs/util/captcha/components/{frictionlessCaptcha.cjs → bundleCaptcha.cjs} +2 -2
- package/dist/cjs/util/config.cjs +14 -4
- package/dist/cjs/util/widgetFactory.cjs +4 -6
- package/dist/components.d.ts +1 -4
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +1 -4
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -9
- package/dist/index.js.map +1 -1
- package/dist/tests/util/config.test.js +6 -6
- package/dist/tests/util/config.test.js.map +1 -1
- package/dist/tests/util/renderLogic.test.js +22 -14
- package/dist/tests/util/renderLogic.test.js.map +1 -1
- package/dist/util/captcha/captchaRenderer.d.ts +1 -6
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/dist/util/captcha/captchaRenderer.js +10 -9
- package/dist/util/captcha/captchaRenderer.js.map +1 -1
- package/dist/util/captcha/{captchaProps.d.ts → components/bundleCaptcha.d.ts} +4 -3
- package/dist/util/captcha/components/bundleCaptcha.d.ts.map +1 -0
- package/dist/util/captcha/components/{frictionlessCaptcha.js → bundleCaptcha.js} +2 -2
- package/dist/util/captcha/components/bundleCaptcha.js.map +1 -0
- package/dist/util/config.d.ts +2 -2
- package/dist/util/config.d.ts.map +1 -1
- package/dist/util/config.js +14 -4
- package/dist/util/config.js.map +1 -1
- package/dist/util/widgetFactory.d.ts +1 -1
- package/dist/util/widgetFactory.d.ts.map +1 -1
- package/dist/util/widgetFactory.js +4 -6
- package/dist/util/widgetFactory.js.map +1 -1
- package/package.json +12 -12
- package/src/components.ts +15 -0
- package/src/index.html +11 -0
- package/src/index.ts +259 -0
- package/src/tests/procaptchaReady.unit.test.ts +58 -0
- package/src/tests/util/config.test.ts +97 -0
- package/src/tests/util/renderLogic.test.tsx +221 -0
- package/src/util/captcha/captchaRenderer.tsx +126 -0
- package/src/util/captcha/components/bundleCaptcha.tsx +57 -0
- package/src/util/config.ts +40 -0
- package/src/util/configCreator.ts +51 -0
- package/src/util/language.ts +53 -0
- package/src/util/timeout.ts +43 -0
- package/src/util/widgetFactory.ts +145 -0
- package/src/util/widgetThemeResolver.ts +40 -0
- package/tsconfig.cjs.json +35 -0
- package/tsconfig.json +42 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsconfig.types.json +9 -0
- package/vite.config.ts +18 -1
- package/vite.iife.config.ts +119 -0
- package/vite.serve.config.ts +17 -0
- package/dist/cjs/util/captcha/captchaComponentProvider.cjs +0 -20
- package/dist/cjs/util/captcha/captchaComponentsList.cjs +0 -12
- package/dist/cjs/util/captcha/captchaType.cjs +0 -12
- package/dist/cjs/util/captcha/components/imageCaptcha.cjs +0 -17
- package/dist/cjs/util/captcha/components/powCaptcha.cjs +0 -17
- package/dist/tests/util/captchaType.test.d.ts +0 -2
- package/dist/tests/util/captchaType.test.d.ts.map +0 -1
- package/dist/tests/util/captchaType.test.js +0 -36
- package/dist/tests/util/captchaType.test.js.map +0 -1
- package/dist/util/captcha/captchaComponentProvider.d.ts +0 -8
- package/dist/util/captcha/captchaComponentProvider.d.ts.map +0 -1
- package/dist/util/captcha/captchaComponentProvider.js +0 -20
- package/dist/util/captcha/captchaComponentProvider.js.map +0 -1
- package/dist/util/captcha/captchaComponentsList.d.ts +0 -6
- package/dist/util/captcha/captchaComponentsList.d.ts.map +0 -1
- package/dist/util/captcha/captchaComponentsList.js +0 -12
- package/dist/util/captcha/captchaComponentsList.js.map +0 -1
- package/dist/util/captcha/captchaProps.d.ts.map +0 -1
- package/dist/util/captcha/captchaProps.js +0 -2
- package/dist/util/captcha/captchaProps.js.map +0 -1
- package/dist/util/captcha/captchaType.d.ts +0 -3
- package/dist/util/captcha/captchaType.d.ts.map +0 -1
- package/dist/util/captcha/captchaType.js +0 -12
- package/dist/util/captcha/captchaType.js.map +0 -1
- package/dist/util/captcha/components/frictionlessCaptcha.d.ts +0 -4
- package/dist/util/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
- package/dist/util/captcha/components/frictionlessCaptcha.js.map +0 -1
- package/dist/util/captcha/components/imageCaptcha.d.ts +0 -4
- package/dist/util/captcha/components/imageCaptcha.d.ts.map +0 -1
- package/dist/util/captcha/components/imageCaptcha.js +0 -17
- package/dist/util/captcha/components/imageCaptcha.js.map +0 -1
- package/dist/util/captcha/components/powCaptcha.d.ts +0 -4
- package/dist/util/captcha/components/powCaptcha.d.ts.map +0 -1
- package/dist/util/captcha/components/powCaptcha.js +0 -17
- package/dist/util/captcha/components/powCaptcha.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,494 @@
|
|
|
1
1
|
# @prosopo/procaptcha-bundle
|
|
2
2
|
|
|
3
|
+
## 4.1.8
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [b03dad1]
|
|
7
|
+
- @prosopo/types@4.3.1
|
|
8
|
+
- @prosopo/procaptcha-common@2.10.18
|
|
9
|
+
- @prosopo/procaptcha-frictionless@2.11.1
|
|
10
|
+
|
|
11
|
+
## 4.1.7
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [a1d60db]
|
|
15
|
+
- Updated dependencies [2392aaf]
|
|
16
|
+
- Updated dependencies [6ca1125]
|
|
17
|
+
- @prosopo/types@4.3.0
|
|
18
|
+
- @prosopo/procaptcha-frictionless@2.11.0
|
|
19
|
+
- @prosopo/util@3.2.15
|
|
20
|
+
- @prosopo/procaptcha-common@2.10.17
|
|
21
|
+
- @prosopo/dotenv@3.0.43
|
|
22
|
+
|
|
23
|
+
## 4.1.6
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- d3db08d: feat(widget): bait AI responses with empty input + decoded label, portaled into the dapp's form
|
|
27
|
+
|
|
28
|
+
Redesigns the honeypot so it can actually catch AI agents instead of being inert:
|
|
29
|
+
|
|
30
|
+
- 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.
|
|
31
|
+
- 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')`.
|
|
32
|
+
- `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.
|
|
33
|
+
- Shared `<Honeypot />` extracted to `@prosopo/procaptcha-common`.
|
|
34
|
+
- `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.
|
|
35
|
+
- Updated dependencies [d3db08d]
|
|
36
|
+
- @prosopo/procaptcha-common@2.10.16
|
|
37
|
+
- @prosopo/procaptcha-frictionless@2.10.3
|
|
38
|
+
|
|
39
|
+
## 4.1.5
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [6c26669]
|
|
43
|
+
- Updated dependencies [f7f9ec5]
|
|
44
|
+
- @prosopo/types@4.2.1
|
|
45
|
+
- @prosopo/procaptcha-frictionless@2.10.2
|
|
46
|
+
- @prosopo/procaptcha-common@2.10.15
|
|
47
|
+
|
|
48
|
+
## 4.1.4
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- 0fd81af: Extract the logger into its own `@prosopo/logger` package, out of `@prosopo/common`. Consumers now import logger symbols from `@prosopo/logger`; `@prosopo/common` no longer re-exports them. Unused `@prosopo/common` dependencies pruned where the only usage was the logger.
|
|
52
|
+
- Updated dependencies [0fd81af]
|
|
53
|
+
- @prosopo/dotenv@3.0.42
|
|
54
|
+
- @prosopo/procaptcha-frictionless@2.10.1
|
|
55
|
+
- @prosopo/procaptcha-common@2.10.14
|
|
56
|
+
|
|
57
|
+
## 4.1.3
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Updated dependencies [20cae63]
|
|
61
|
+
- Updated dependencies [4d9923e]
|
|
62
|
+
- @prosopo/types@4.2.0
|
|
63
|
+
- @prosopo/procaptcha-frictionless@2.10.0
|
|
64
|
+
- @prosopo/procaptcha-common@2.10.13
|
|
65
|
+
|
|
66
|
+
## 4.1.2
|
|
67
|
+
### Patch Changes
|
|
68
|
+
|
|
69
|
+
- Updated dependencies [d351362]
|
|
70
|
+
- @prosopo/types@4.1.4
|
|
71
|
+
- @prosopo/procaptcha-common@2.10.12
|
|
72
|
+
- @prosopo/procaptcha-frictionless@2.9.6
|
|
73
|
+
|
|
74
|
+
## 4.1.1
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Updated dependencies [6567ce0]
|
|
78
|
+
- Updated dependencies [e2711ae]
|
|
79
|
+
- Updated dependencies [5786629]
|
|
80
|
+
- @prosopo/util@3.2.14
|
|
81
|
+
- @prosopo/types@4.1.3
|
|
82
|
+
- @prosopo/locale@3.2.4
|
|
83
|
+
- @prosopo/procaptcha-common@2.10.11
|
|
84
|
+
- @prosopo/procaptcha-frictionless@2.9.5
|
|
85
|
+
- @prosopo/dotenv@3.0.41
|
|
86
|
+
|
|
87
|
+
## 4.1.0
|
|
88
|
+
### Minor Changes
|
|
89
|
+
|
|
90
|
+
- 566c1f6: Emit a classic-script IIFE build of the procaptcha bundle
|
|
91
|
+
(`procaptcha.bundle.iife.js`, ~1.5 MB / 634 KB gzipped) alongside the
|
|
92
|
+
existing ES-module bundle, so customer integrations can pair
|
|
93
|
+
`<script type="module">` with `<script nomodule>`. Crawlers and runtimes
|
|
94
|
+
that do not execute module scripts (notably Ahrefs' renderer) currently
|
|
95
|
+
skip the bundle entirely and never see the rendered widget link;
|
|
96
|
+
shipping a `nomodule` fallback restores backlink discoverability.
|
|
97
|
+
|
|
98
|
+
Runtime bundle-name lookup now takes a list of candidate filenames so
|
|
99
|
+
each variant finds its own `<script>` tag in the DOM. The IIFE config
|
|
100
|
+
disables `manualChunks`, sets `inlineDynamicImports: true`, and uses
|
|
101
|
+
`emptyOutDir: false` to co-exist with the ESM build in `dist/bundle/`.
|
|
102
|
+
|
|
103
|
+
Widget logo anchor hygiene: drop the `#widget` URL fragment, the
|
|
104
|
+
visually-hidden 10000px-offset marketing span, the SVG `<title>`, the
|
|
105
|
+
`aria-label`, and the redundant `prosopo-logo` wrapper. Visible logo
|
|
106
|
+
and "Prosopo" text are unchanged.
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- Updated dependencies [72a1218]
|
|
111
|
+
- Updated dependencies [566c1f6]
|
|
112
|
+
- @prosopo/util@3.2.13
|
|
113
|
+
- @prosopo/widget-skeleton@2.8.3
|
|
114
|
+
- @prosopo/types@4.1.2
|
|
115
|
+
- @prosopo/procaptcha-common@2.10.10
|
|
116
|
+
- @prosopo/procaptcha-frictionless@2.9.4
|
|
117
|
+
|
|
118
|
+
## 4.0.3
|
|
119
|
+
### Patch Changes
|
|
120
|
+
|
|
121
|
+
- Updated dependencies [53bfd45]
|
|
122
|
+
- Updated dependencies [91958da]
|
|
123
|
+
- @prosopo/procaptcha-frictionless@2.9.3
|
|
124
|
+
- @prosopo/procaptcha-common@2.10.9
|
|
125
|
+
- @prosopo/locale@3.2.3
|
|
126
|
+
- @prosopo/types@4.1.1
|
|
127
|
+
- @prosopo/dotenv@3.0.40
|
|
128
|
+
|
|
129
|
+
## 4.0.2
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- Updated dependencies [6a741ce]
|
|
133
|
+
- @prosopo/types@4.1.0
|
|
134
|
+
- @prosopo/procaptcha-common@2.10.8
|
|
135
|
+
- @prosopo/procaptcha-frictionless@2.9.2
|
|
136
|
+
|
|
137
|
+
## 4.0.1
|
|
138
|
+
### Patch Changes
|
|
139
|
+
|
|
140
|
+
- Updated dependencies [cc13a45]
|
|
141
|
+
- @prosopo/procaptcha-frictionless@2.9.1
|
|
142
|
+
- @prosopo/procaptcha-common@2.10.7
|
|
143
|
+
|
|
144
|
+
## 4.0.0
|
|
145
|
+
### Major Changes
|
|
146
|
+
|
|
147
|
+
- 8bb7286: Move `captchaType` from client (`data-captcha-type` / render-options prop)
|
|
148
|
+
to a server-side site-key setting; the bundle now calls `/frictionless`
|
|
149
|
+
for all flows. Renames the bundle's universal mount component from
|
|
150
|
+
`FrictionlessCaptcha` to `BundleCaptcha` to reflect that it is no longer
|
|
151
|
+
frictionless-specific — the server decides which concrete challenge type
|
|
152
|
+
to render.
|
|
153
|
+
|
|
154
|
+
### Minor Changes
|
|
155
|
+
|
|
156
|
+
- d865319: Add puzzle captcha (drag-to-target challenge) as a new captcha type:
|
|
157
|
+
provider endpoints, manager + widget package, types, demo pages, and
|
|
158
|
+
a `puzzleTolerance` site setting.
|
|
159
|
+
|
|
160
|
+
### Patch Changes
|
|
161
|
+
|
|
162
|
+
- Updated dependencies [3c0be68]
|
|
163
|
+
- Updated dependencies [f9ea09d]
|
|
164
|
+
- Updated dependencies [4aae4e6]
|
|
165
|
+
- Updated dependencies [4aae4e6]
|
|
166
|
+
- Updated dependencies [d865319]
|
|
167
|
+
- Updated dependencies [753304b]
|
|
168
|
+
- Updated dependencies [8bb7286]
|
|
169
|
+
- Updated dependencies [f9ea09d]
|
|
170
|
+
- Updated dependencies [4aae4e6]
|
|
171
|
+
- Updated dependencies [5f1ae53]
|
|
172
|
+
- @prosopo/types@4.0.0
|
|
173
|
+
- @prosopo/procaptcha-frictionless@2.9.0
|
|
174
|
+
- @prosopo/locale@3.2.2
|
|
175
|
+
- @prosopo/util@3.2.12
|
|
176
|
+
- @prosopo/widget-skeleton@2.8.2
|
|
177
|
+
- @prosopo/procaptcha-common@2.10.6
|
|
178
|
+
- @prosopo/dotenv@3.0.39
|
|
179
|
+
|
|
180
|
+
## 3.3.31
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- Updated dependencies [819ed95]
|
|
184
|
+
- @prosopo/procaptcha-frictionless@2.8.62
|
|
185
|
+
- @prosopo/types@3.16.1
|
|
186
|
+
- @prosopo/procaptcha-common@2.10.5
|
|
187
|
+
- @prosopo/procaptcha-pow@2.8.55
|
|
188
|
+
- @prosopo/procaptcha-react@2.9.54
|
|
189
|
+
|
|
190
|
+
## 3.3.30
|
|
191
|
+
### Patch Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies [f6a4402]
|
|
194
|
+
- Updated dependencies [99dfb44]
|
|
195
|
+
- @prosopo/types@3.16.0
|
|
196
|
+
- @prosopo/procaptcha-common@2.10.4
|
|
197
|
+
- @prosopo/procaptcha-frictionless@2.8.61
|
|
198
|
+
- @prosopo/procaptcha-pow@2.8.54
|
|
199
|
+
- @prosopo/procaptcha-react@2.9.53
|
|
200
|
+
|
|
201
|
+
## 3.3.29
|
|
202
|
+
### Patch Changes
|
|
203
|
+
|
|
204
|
+
- Updated dependencies [3e54c0a]
|
|
205
|
+
- @prosopo/types@3.15.0
|
|
206
|
+
- @prosopo/procaptcha-common@2.10.3
|
|
207
|
+
- @prosopo/procaptcha-frictionless@2.8.60
|
|
208
|
+
- @prosopo/procaptcha-pow@2.8.53
|
|
209
|
+
- @prosopo/procaptcha-react@2.9.52
|
|
210
|
+
|
|
211
|
+
## 3.3.28
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- Updated dependencies [946a8ba]
|
|
215
|
+
- Updated dependencies [5614814]
|
|
216
|
+
- Updated dependencies [b94890c]
|
|
217
|
+
- @prosopo/types@3.14.1
|
|
218
|
+
- @prosopo/locale@3.2.1
|
|
219
|
+
- @prosopo/procaptcha-common@2.10.2
|
|
220
|
+
- @prosopo/procaptcha-frictionless@2.8.59
|
|
221
|
+
- @prosopo/procaptcha-pow@2.8.52
|
|
222
|
+
- @prosopo/procaptcha-react@2.9.51
|
|
223
|
+
- @prosopo/dotenv@3.0.38
|
|
224
|
+
|
|
225
|
+
## 3.3.27
|
|
226
|
+
### Patch Changes
|
|
227
|
+
|
|
228
|
+
- Updated dependencies [06970d2]
|
|
229
|
+
- Updated dependencies [fc514dd]
|
|
230
|
+
- Updated dependencies [42650db]
|
|
231
|
+
- Updated dependencies [dd3e06e]
|
|
232
|
+
- @prosopo/procaptcha-common@2.10.1
|
|
233
|
+
- @prosopo/widget-skeleton@2.8.1
|
|
234
|
+
- @prosopo/locale@3.2.0
|
|
235
|
+
- @prosopo/types@3.14.0
|
|
236
|
+
- @prosopo/procaptcha-frictionless@2.8.58
|
|
237
|
+
- @prosopo/procaptcha-pow@2.8.51
|
|
238
|
+
- @prosopo/procaptcha-react@2.9.50
|
|
239
|
+
- @prosopo/dotenv@3.0.37
|
|
240
|
+
|
|
241
|
+
## 3.3.26
|
|
242
|
+
### Patch Changes
|
|
243
|
+
|
|
244
|
+
- 49fd2d8: Fixing implicit lang string defined rendering
|
|
245
|
+
- Updated dependencies [73df23c]
|
|
246
|
+
- Updated dependencies [8139819]
|
|
247
|
+
- @prosopo/procaptcha-common@2.10.0
|
|
248
|
+
- @prosopo/widget-skeleton@2.8.0
|
|
249
|
+
- @prosopo/procaptcha-frictionless@2.8.57
|
|
250
|
+
- @prosopo/procaptcha-pow@2.8.50
|
|
251
|
+
- @prosopo/procaptcha-react@2.9.49
|
|
252
|
+
- @prosopo/dotenv@3.0.36
|
|
253
|
+
|
|
254
|
+
## 3.3.25
|
|
255
|
+
### Patch Changes
|
|
256
|
+
|
|
257
|
+
- Updated dependencies [a25dffa]
|
|
258
|
+
- @prosopo/util@3.2.11
|
|
259
|
+
- @prosopo/procaptcha-pow@2.8.49
|
|
260
|
+
- @prosopo/procaptcha-react@2.9.48
|
|
261
|
+
- @prosopo/types@3.13.3
|
|
262
|
+
- @prosopo/procaptcha-common@2.9.41
|
|
263
|
+
- @prosopo/procaptcha-frictionless@2.8.56
|
|
264
|
+
|
|
265
|
+
## 3.3.24
|
|
266
|
+
### Patch Changes
|
|
267
|
+
|
|
268
|
+
- Updated dependencies [346edd7]
|
|
269
|
+
- @prosopo/util@3.2.10
|
|
270
|
+
- @prosopo/procaptcha-pow@2.8.48
|
|
271
|
+
- @prosopo/procaptcha-react@2.9.47
|
|
272
|
+
- @prosopo/types@3.13.2
|
|
273
|
+
- @prosopo/procaptcha-common@2.9.40
|
|
274
|
+
- @prosopo/procaptcha-frictionless@2.8.55
|
|
275
|
+
|
|
276
|
+
## 3.3.23
|
|
277
|
+
### Patch Changes
|
|
278
|
+
|
|
279
|
+
- Updated dependencies [22bfee7]
|
|
280
|
+
- Updated dependencies [20192d2]
|
|
281
|
+
- @prosopo/util@3.2.9
|
|
282
|
+
- @prosopo/widget-skeleton@2.7.14
|
|
283
|
+
- @prosopo/procaptcha-pow@2.8.47
|
|
284
|
+
- @prosopo/procaptcha-react@2.9.46
|
|
285
|
+
- @prosopo/types@3.13.1
|
|
286
|
+
- @prosopo/procaptcha-common@2.9.39
|
|
287
|
+
- @prosopo/procaptcha-frictionless@2.8.54
|
|
288
|
+
|
|
289
|
+
## 3.3.22
|
|
290
|
+
### Patch Changes
|
|
291
|
+
|
|
292
|
+
- Updated dependencies [e0fb3d6]
|
|
293
|
+
- Updated dependencies [e6d9553]
|
|
294
|
+
- Updated dependencies [f3f23e3]
|
|
295
|
+
- @prosopo/util@3.2.8
|
|
296
|
+
- @prosopo/types@3.13.0
|
|
297
|
+
- @prosopo/procaptcha-pow@2.8.46
|
|
298
|
+
- @prosopo/procaptcha-react@2.9.45
|
|
299
|
+
- @prosopo/procaptcha-common@2.9.38
|
|
300
|
+
- @prosopo/procaptcha-frictionless@2.8.53
|
|
301
|
+
|
|
302
|
+
## 3.3.21
|
|
303
|
+
### Patch Changes
|
|
304
|
+
|
|
305
|
+
- Updated dependencies [730c61e]
|
|
306
|
+
- Updated dependencies [d5082a9]
|
|
307
|
+
- Updated dependencies [e1ea65f]
|
|
308
|
+
- Updated dependencies [c316257]
|
|
309
|
+
- @prosopo/procaptcha-frictionless@2.8.52
|
|
310
|
+
- @prosopo/types@3.12.3
|
|
311
|
+
- @prosopo/util@3.2.7
|
|
312
|
+
- @prosopo/procaptcha-common@2.9.37
|
|
313
|
+
- @prosopo/procaptcha-pow@2.8.45
|
|
314
|
+
- @prosopo/procaptcha-react@2.9.44
|
|
315
|
+
|
|
316
|
+
## 3.3.20
|
|
317
|
+
### Patch Changes
|
|
318
|
+
|
|
319
|
+
- Updated dependencies [adb89a6]
|
|
320
|
+
- @prosopo/locale@3.1.29
|
|
321
|
+
- @prosopo/types@3.12.2
|
|
322
|
+
- @prosopo/util@3.2.6
|
|
323
|
+
- @prosopo/procaptcha-frictionless@2.8.51
|
|
324
|
+
- @prosopo/procaptcha-pow@2.8.44
|
|
325
|
+
- @prosopo/procaptcha-react@2.9.43
|
|
326
|
+
- @prosopo/procaptcha-common@2.9.36
|
|
327
|
+
- @prosopo/dotenv@3.0.35
|
|
328
|
+
|
|
329
|
+
## 3.3.19
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- @prosopo/procaptcha-frictionless@2.8.50
|
|
333
|
+
|
|
334
|
+
## 3.3.18
|
|
335
|
+
### Patch Changes
|
|
336
|
+
|
|
337
|
+
- Updated dependencies [a90eb54]
|
|
338
|
+
- @prosopo/types@3.12.1
|
|
339
|
+
- @prosopo/dotenv@3.0.34
|
|
340
|
+
- @prosopo/procaptcha-frictionless@2.8.49
|
|
341
|
+
- @prosopo/procaptcha-pow@2.8.43
|
|
342
|
+
- @prosopo/procaptcha-react@2.9.42
|
|
343
|
+
- @prosopo/procaptcha-common@2.9.35
|
|
344
|
+
|
|
345
|
+
## 3.3.17
|
|
346
|
+
### Patch Changes
|
|
347
|
+
|
|
348
|
+
- 676c5f2: Use HTTPS in developmentwq
|
|
349
|
+
- Updated dependencies [676c5f2]
|
|
350
|
+
- Updated dependencies [feaca02]
|
|
351
|
+
- @prosopo/types@3.12.0
|
|
352
|
+
- @prosopo/procaptcha-frictionless@2.8.48
|
|
353
|
+
- @prosopo/procaptcha-common@2.9.34
|
|
354
|
+
- @prosopo/procaptcha-pow@2.8.42
|
|
355
|
+
- @prosopo/procaptcha-react@2.9.41
|
|
356
|
+
|
|
357
|
+
## 3.3.16
|
|
358
|
+
### Patch Changes
|
|
359
|
+
|
|
360
|
+
- 8148587: Clustering
|
|
361
|
+
- Updated dependencies [8148587]
|
|
362
|
+
- @prosopo/types@3.11.1
|
|
363
|
+
- @prosopo/procaptcha-frictionless@2.8.47
|
|
364
|
+
- @prosopo/procaptcha-common@2.9.33
|
|
365
|
+
- @prosopo/procaptcha-pow@2.8.41
|
|
366
|
+
- @prosopo/procaptcha-react@2.9.40
|
|
367
|
+
|
|
368
|
+
## 3.3.15
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- @prosopo/procaptcha-frictionless@2.8.46
|
|
372
|
+
|
|
373
|
+
## 3.3.14
|
|
374
|
+
### Patch Changes
|
|
375
|
+
|
|
376
|
+
- Updated dependencies [7f6ffc5]
|
|
377
|
+
- @prosopo/types@3.11.0
|
|
378
|
+
- @prosopo/procaptcha-react@2.9.39
|
|
379
|
+
- @prosopo/procaptcha-common@2.9.32
|
|
380
|
+
- @prosopo/procaptcha-frictionless@2.8.45
|
|
381
|
+
- @prosopo/procaptcha-pow@2.8.40
|
|
382
|
+
|
|
383
|
+
## 3.3.13
|
|
384
|
+
### Patch Changes
|
|
385
|
+
|
|
386
|
+
- @prosopo/procaptcha-frictionless@2.8.44
|
|
387
|
+
|
|
388
|
+
## 3.3.12
|
|
389
|
+
### Patch Changes
|
|
390
|
+
|
|
391
|
+
- Updated dependencies [93fa086]
|
|
392
|
+
- @prosopo/types@3.10.2
|
|
393
|
+
- @prosopo/procaptcha-frictionless@2.8.43
|
|
394
|
+
- @prosopo/procaptcha-common@2.9.31
|
|
395
|
+
- @prosopo/procaptcha-pow@2.8.39
|
|
396
|
+
- @prosopo/procaptcha-react@2.9.38
|
|
397
|
+
|
|
398
|
+
## 3.3.11
|
|
399
|
+
### Patch Changes
|
|
400
|
+
|
|
401
|
+
- Updated dependencies [cde7550]
|
|
402
|
+
- @prosopo/types@3.10.1
|
|
403
|
+
- @prosopo/procaptcha-common@2.9.30
|
|
404
|
+
- @prosopo/procaptcha-frictionless@2.8.42
|
|
405
|
+
- @prosopo/procaptcha-pow@2.8.38
|
|
406
|
+
- @prosopo/procaptcha-react@2.9.37
|
|
407
|
+
|
|
408
|
+
## 3.3.10
|
|
409
|
+
### Patch Changes
|
|
410
|
+
|
|
411
|
+
- Updated dependencies [ad6d622]
|
|
412
|
+
- @prosopo/types@3.10.0
|
|
413
|
+
- @prosopo/procaptcha-common@2.9.29
|
|
414
|
+
- @prosopo/procaptcha-frictionless@2.8.41
|
|
415
|
+
- @prosopo/procaptcha-pow@2.8.37
|
|
416
|
+
- @prosopo/procaptcha-react@2.9.36
|
|
417
|
+
|
|
418
|
+
## 3.3.9
|
|
419
|
+
### Patch Changes
|
|
420
|
+
|
|
421
|
+
- Updated dependencies [ff58a70]
|
|
422
|
+
- Updated dependencies [592adf1]
|
|
423
|
+
- @prosopo/types@3.9.0
|
|
424
|
+
- @prosopo/procaptcha-react@2.9.35
|
|
425
|
+
- @prosopo/procaptcha-pow@2.8.36
|
|
426
|
+
- @prosopo/procaptcha-common@2.9.28
|
|
427
|
+
- @prosopo/procaptcha-frictionless@2.8.40
|
|
428
|
+
|
|
429
|
+
## 3.3.8
|
|
430
|
+
### Patch Changes
|
|
431
|
+
|
|
432
|
+
- @prosopo/procaptcha-react@2.9.34
|
|
433
|
+
- @prosopo/procaptcha-frictionless@2.8.39
|
|
434
|
+
|
|
435
|
+
## 3.3.7
|
|
436
|
+
### Patch Changes
|
|
437
|
+
|
|
438
|
+
- Updated dependencies [d2431cd]
|
|
439
|
+
- @prosopo/types@3.8.4
|
|
440
|
+
- @prosopo/procaptcha-common@2.9.27
|
|
441
|
+
- @prosopo/procaptcha-frictionless@2.8.38
|
|
442
|
+
- @prosopo/procaptcha-pow@2.8.35
|
|
443
|
+
- @prosopo/procaptcha-react@2.9.33
|
|
444
|
+
|
|
445
|
+
## 3.3.6
|
|
446
|
+
### Patch Changes
|
|
447
|
+
|
|
448
|
+
- @prosopo/procaptcha-react@2.9.32
|
|
449
|
+
- @prosopo/procaptcha-frictionless@2.8.37
|
|
450
|
+
|
|
451
|
+
## 3.3.5
|
|
452
|
+
### Patch Changes
|
|
453
|
+
|
|
454
|
+
- Updated dependencies [bd6995b]
|
|
455
|
+
- @prosopo/types@3.8.3
|
|
456
|
+
- @prosopo/procaptcha-frictionless@2.8.36
|
|
457
|
+
- @prosopo/procaptcha-common@2.9.26
|
|
458
|
+
- @prosopo/procaptcha-pow@2.8.34
|
|
459
|
+
- @prosopo/procaptcha-react@2.9.31
|
|
460
|
+
|
|
461
|
+
## 3.3.4
|
|
462
|
+
### Patch Changes
|
|
463
|
+
|
|
464
|
+
- Updated dependencies [9633e58]
|
|
465
|
+
- @prosopo/types@3.8.2
|
|
466
|
+
- @prosopo/procaptcha-common@2.9.25
|
|
467
|
+
- @prosopo/procaptcha-frictionless@2.8.35
|
|
468
|
+
- @prosopo/procaptcha-pow@2.8.33
|
|
469
|
+
- @prosopo/procaptcha-react@2.9.30
|
|
470
|
+
|
|
471
|
+
## 3.3.3
|
|
472
|
+
### Patch Changes
|
|
473
|
+
|
|
474
|
+
- Updated dependencies [f52a5c1]
|
|
475
|
+
- @prosopo/types@3.8.1
|
|
476
|
+
- @prosopo/procaptcha-common@2.9.24
|
|
477
|
+
- @prosopo/procaptcha-frictionless@2.8.34
|
|
478
|
+
- @prosopo/procaptcha-pow@2.8.32
|
|
479
|
+
- @prosopo/procaptcha-react@2.9.29
|
|
480
|
+
|
|
481
|
+
## 3.3.2
|
|
482
|
+
### Patch Changes
|
|
483
|
+
|
|
484
|
+
- @prosopo/procaptcha-react@2.9.28
|
|
485
|
+
- @prosopo/procaptcha-frictionless@2.8.33
|
|
486
|
+
|
|
487
|
+
## 3.3.1
|
|
488
|
+
### Patch Changes
|
|
489
|
+
|
|
490
|
+
- @prosopo/procaptcha-frictionless@2.8.32
|
|
491
|
+
|
|
3
492
|
## 3.3.0
|
|
4
493
|
### Minor Changes
|
|
5
494
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const procaptchaCommon = require("@prosopo/procaptcha-common");
|
|
4
4
|
const util = require("@prosopo/util");
|
|
5
|
-
const captchaType = require("./util/captcha/captchaType.cjs");
|
|
6
5
|
const config = require("./util/config.cjs");
|
|
7
6
|
const widgetFactory$1 = require("./util/widgetFactory.cjs");
|
|
8
7
|
const widgetThemeResolver = require("./util/widgetThemeResolver.cjs");
|
|
9
|
-
const
|
|
8
|
+
const BUNDLE_NAMES = ["procaptcha.bundle.iife.js", "procaptcha.bundle.js"];
|
|
10
9
|
let procaptchaRoots = [];
|
|
11
10
|
const widgetFactory = new widgetFactory$1.WidgetFactory(new widgetThemeResolver.WidgetThemeResolver());
|
|
12
11
|
const PROCAPTCHA_EXECUTE_EVENT = "procaptcha:execute";
|
|
@@ -22,11 +21,9 @@ const implicitRender = async () => {
|
|
|
22
21
|
console.error("No site key found");
|
|
23
22
|
return;
|
|
24
23
|
}
|
|
25
|
-
const captchaType$1 = captchaType.getCaptchaType(elements);
|
|
26
24
|
const root = await widgetFactory.createWidgets(
|
|
27
25
|
elements,
|
|
28
26
|
{
|
|
29
|
-
captchaType: captchaType$1,
|
|
30
27
|
siteKey
|
|
31
28
|
},
|
|
32
29
|
!(web3 === "true")
|
|
@@ -40,11 +37,9 @@ const implicitRender = async () => {
|
|
|
40
37
|
for (const button of invisibleButtons) {
|
|
41
38
|
const siteKey = button.getAttribute("data-sitekey") || "";
|
|
42
39
|
const callback = button.getAttribute("data-callback") || "";
|
|
43
|
-
const captchaType$1 = captchaType.getCaptchaType([button]);
|
|
44
40
|
const root = await widgetFactory.createWidgets(
|
|
45
41
|
[button],
|
|
46
42
|
{
|
|
47
|
-
captchaType: captchaType$1,
|
|
48
43
|
siteKey,
|
|
49
44
|
callback
|
|
50
45
|
},
|
|
@@ -133,10 +128,10 @@ function findProcaptchaContainers() {
|
|
|
133
128
|
return containers;
|
|
134
129
|
}
|
|
135
130
|
const start = () => {
|
|
136
|
-
const { onloadUrlCallback, renderExplicit } = config.extractParams(
|
|
131
|
+
const { onloadUrlCallback, renderExplicit } = config.extractParams(BUNDLE_NAMES);
|
|
137
132
|
let readyCalled = false;
|
|
138
133
|
if (renderExplicit !== "explicit") {
|
|
139
|
-
config.getProcaptchaScript(
|
|
134
|
+
config.getProcaptchaScript(BUNDLE_NAMES)?.addEventListener("load", () => {
|
|
140
135
|
ready(implicitRender);
|
|
141
136
|
readyCalled = true;
|
|
142
137
|
});
|
|
@@ -145,7 +140,7 @@ const start = () => {
|
|
|
145
140
|
}
|
|
146
141
|
}
|
|
147
142
|
if (onloadUrlCallback) {
|
|
148
|
-
config.getProcaptchaScript(
|
|
143
|
+
config.getProcaptchaScript(BUNDLE_NAMES)?.addEventListener("load", () => {
|
|
149
144
|
const onloadCallback = procaptchaCommon.getWindowCallback(onloadUrlCallback);
|
|
150
145
|
ready(onloadCallback);
|
|
151
146
|
});
|
|
@@ -7,12 +7,9 @@ const client = require("react-dom/client");
|
|
|
7
7
|
const configCreator = require("../configCreator.cjs");
|
|
8
8
|
const language = require("../language.cjs");
|
|
9
9
|
const timeout = require("../timeout.cjs");
|
|
10
|
+
const bundleCaptcha = require("./components/bundleCaptcha.cjs");
|
|
10
11
|
class CaptchaRenderer {
|
|
11
|
-
|
|
12
|
-
this.captchaComponentProvider = captchaComponentProvider;
|
|
13
|
-
}
|
|
14
|
-
renderCaptcha(settings, container, renderOptions, callbacks, isWeb2, i18n, invisible, widgetContainer) {
|
|
15
|
-
const captchaType = renderOptions?.captchaType || settings.defaultCaptchaType;
|
|
12
|
+
renderCaptcha(settings, container, renderOptions, callbacks, isWeb2, i18n, invisible, widgetContainer, sourceElement) {
|
|
16
13
|
const config = configCreator.createConfig(
|
|
17
14
|
renderOptions.siteKey,
|
|
18
15
|
renderOptions.theme,
|
|
@@ -21,7 +18,11 @@ class CaptchaRenderer {
|
|
|
21
18
|
invisible,
|
|
22
19
|
renderOptions.userAccountAddress
|
|
23
20
|
);
|
|
24
|
-
this.readAndValidateSettings(
|
|
21
|
+
this.readAndValidateSettings(
|
|
22
|
+
sourceElement || container,
|
|
23
|
+
config,
|
|
24
|
+
renderOptions
|
|
25
|
+
);
|
|
25
26
|
const reactRoot = this.createReactRoot(
|
|
26
27
|
container,
|
|
27
28
|
settings.identifierPrefix
|
|
@@ -30,12 +31,12 @@ class CaptchaRenderer {
|
|
|
30
31
|
settings.emotionCacheKey,
|
|
31
32
|
container
|
|
32
33
|
);
|
|
33
|
-
const captchaComponent =
|
|
34
|
-
|
|
34
|
+
const captchaComponent = /* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
+
bundleCaptcha.BundleCaptcha,
|
|
35
36
|
{
|
|
36
37
|
config,
|
|
37
|
-
i18n,
|
|
38
38
|
callbacks,
|
|
39
|
+
i18n,
|
|
39
40
|
container: widgetContainer
|
|
40
41
|
}
|
|
41
42
|
);
|
|
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const procaptchaCommon = require("@prosopo/procaptcha-common");
|
|
5
5
|
const procaptchaFrictionless = require("@prosopo/procaptcha-frictionless");
|
|
6
6
|
const react = require("react");
|
|
7
|
-
const
|
|
7
|
+
const BundleCaptcha = (props) => {
|
|
8
8
|
const { config, callbacks, i18n, container } = props;
|
|
9
9
|
const [componentKey, setComponentKey] = react.useState(0);
|
|
10
10
|
const restart = () => {
|
|
@@ -22,4 +22,4 @@ const FrictionlessCaptcha = (props) => {
|
|
|
22
22
|
componentKey
|
|
23
23
|
);
|
|
24
24
|
};
|
|
25
|
-
exports.
|
|
25
|
+
exports.BundleCaptcha = BundleCaptcha;
|
package/dist/cjs/util/config.cjs
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const getProcaptchaScript = (
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const getProcaptchaScript = (names) => {
|
|
4
|
+
for (const name of names) {
|
|
5
|
+
const script = document.querySelector(
|
|
6
|
+
`script[src*="${name}"]`
|
|
7
|
+
);
|
|
8
|
+
if (script) {
|
|
9
|
+
return script;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
};
|
|
14
|
+
const extractParams = (names) => {
|
|
15
|
+
const script = getProcaptchaScript(names);
|
|
16
|
+
if (script) {
|
|
7
17
|
const params = new URLSearchParams(script.src.split("?")[1]);
|
|
8
18
|
return {
|
|
9
19
|
onloadUrlCallback: params.get("onload") || void 0,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const locale = require("@prosopo/locale");
|
|
4
4
|
const procaptchaCommon = require("@prosopo/procaptcha-common");
|
|
5
|
-
const types = require("@prosopo/types");
|
|
6
5
|
const widgetSkeleton = require("@prosopo/widget-skeleton");
|
|
7
6
|
class WidgetFactory {
|
|
8
7
|
constructor(widgetThemeResolver) {
|
|
@@ -58,8 +57,7 @@ class WidgetFactory {
|
|
|
58
57
|
{
|
|
59
58
|
identifierPrefix: "procaptcha-",
|
|
60
59
|
emotionCacheKey: "procaptcha",
|
|
61
|
-
webComponentTag: "prosopo-procaptcha"
|
|
62
|
-
defaultCaptchaType: types.CaptchaType.frictionless
|
|
60
|
+
webComponentTag: "prosopo-procaptcha"
|
|
63
61
|
},
|
|
64
62
|
widgetInteractiveArea,
|
|
65
63
|
renderOptions,
|
|
@@ -67,7 +65,8 @@ class WidgetFactory {
|
|
|
67
65
|
isWeb2,
|
|
68
66
|
this.i18n,
|
|
69
67
|
invisible,
|
|
70
|
-
widgetContainer
|
|
68
|
+
widgetContainer,
|
|
69
|
+
container
|
|
71
70
|
);
|
|
72
71
|
return captchaRoot;
|
|
73
72
|
}
|
|
@@ -82,8 +81,7 @@ class WidgetFactory {
|
|
|
82
81
|
}
|
|
83
82
|
async createCaptchaRenderer() {
|
|
84
83
|
const CaptchaRenderer = (await Promise.resolve().then(() => require("./captcha/captchaRenderer.cjs"))).CaptchaRenderer;
|
|
85
|
-
|
|
86
|
-
return new CaptchaRenderer(new CaptchaComponentProvider());
|
|
84
|
+
return new CaptchaRenderer();
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
exports.WidgetFactory = WidgetFactory;
|
package/dist/components.d.ts
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export * from "./util/captcha/components/
|
|
2
|
-
export * from "./util/captcha/components/powCaptcha.js";
|
|
3
|
-
export * from "./util/captcha/components/imageCaptcha.js";
|
|
4
|
-
export * from "./util/captcha/captchaComponentProvider.js";
|
|
1
|
+
export * from "./util/captcha/components/bundleCaptcha.js";
|
|
5
2
|
//# sourceMappingURL=components.d.ts.map
|
package/dist/components.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAcA,cAAc,
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAcA,cAAc,4CAA4C,CAAC"}
|
package/dist/components.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export * from "./util/captcha/components/
|
|
2
|
-
export * from "./util/captcha/components/powCaptcha.js";
|
|
3
|
-
export * from "./util/captcha/components/imageCaptcha.js";
|
|
4
|
-
export * from "./util/captcha/captchaComponentProvider.js";
|
|
1
|
+
export * from "./util/captcha/components/bundleCaptcha.js";
|
|
5
2
|
//# sourceMappingURL=components.js.map
|
package/dist/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAcA,cAAc,
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAcA,cAAc,4CAA4C,CAAC"}
|