@prosopo/procaptcha-bundle 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$cjs.log +6 -6
- package/.turbo/turbo-build$colon$tsc.log +26 -26
- package/.turbo/turbo-build.log +15 -15
- package/CHANGELOG.md +26 -0
- package/dist/cjs/index.cjs +56 -11
- package/dist/cjs/util/captcha/captchaRenderer.cjs +18 -1
- package/dist/cjs/util/configCreator.cjs +4 -2
- package/dist/cjs/util/widgetFactory.cjs +8 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -11
- package/dist/index.js.map +1 -1
- package/dist/tests/bind.unit.test.d.ts +2 -0
- package/dist/tests/bind.unit.test.d.ts.map +1 -0
- package/dist/tests/bind.unit.test.js +166 -0
- package/dist/tests/bind.unit.test.js.map +1 -0
- package/dist/tests/detectorPrefetch.unit.test.js.map +1 -1
- package/dist/tests/reset.unit.test.js +6 -2
- package/dist/tests/reset.unit.test.js.map +1 -1
- package/dist/tests/start.unit.test.js +6 -3
- package/dist/tests/start.unit.test.js.map +1 -1
- package/dist/util/captcha/captchaRenderer.d.ts +1 -1
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/dist/util/captcha/captchaRenderer.js +18 -1
- package/dist/util/captcha/captchaRenderer.js.map +1 -1
- package/dist/util/configCreator.d.ts +14 -2
- package/dist/util/configCreator.d.ts.map +1 -1
- package/dist/util/configCreator.js +5 -3
- package/dist/util/configCreator.js.map +1 -1
- package/dist/util/widgetFactory.d.ts +7 -2
- package/dist/util/widgetFactory.d.ts.map +1 -1
- package/dist/util/widgetFactory.js +8 -5
- package/dist/util/widgetFactory.js.map +1 -1
- package/package.json +7 -7
- package/src/index.ts +92 -18
- package/src/tests/bind.unit.test.ts +227 -0
- package/src/tests/detectorPrefetch.unit.test.ts +2 -2
- package/src/tests/reset.unit.test.ts +9 -3
- package/src/tests/start.unit.test.ts +7 -4
- package/src/util/captcha/captchaRenderer.tsx +31 -13
- package/src/util/configCreator.ts +29 -11
- package/src/util/widgetFactory.ts +10 -3
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-bundle@4.
|
|
2
|
+
> @prosopo/procaptcha-bundle@4.4.0 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -64,15 +64,15 @@ dist/cjs/util/widgetThemeResolver.cjs 0.57 kB │ gzip: 0.29 kB
|
|
|
64
64
|
dist/cjs/util/timeout.cjs 0.63 kB │ gzip: 0.29 kB
|
|
65
65
|
dist/cjs/util/config.cjs 0.66 kB │ gzip: 0.33 kB
|
|
66
66
|
dist/cjs/util/captcha/components/bundleCaptcha.cjs 0.82 kB │ gzip: 0.39 kB
|
|
67
|
-
dist/cjs/util/configCreator.cjs 0.88 kB │ gzip: 0.46 kB
|
|
68
67
|
dist/cjs/util/startMode.cjs 0.89 kB │ gzip: 0.40 kB
|
|
68
|
+
dist/cjs/util/configCreator.cjs 1.00 kB │ gzip: 0.50 kB
|
|
69
69
|
dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
|
|
70
70
|
dist/cjs/util/clientSession.cjs 1.08 kB │ gzip: 0.56 kB
|
|
71
71
|
dist/cjs/util/language.cjs 1.08 kB │ gzip: 0.45 kB
|
|
72
|
-
dist/cjs/util/
|
|
73
|
-
dist/cjs/util/
|
|
74
|
-
dist/cjs/index.cjs
|
|
72
|
+
dist/cjs/util/widgetFactory.cjs 2.78 kB │ gzip: 0.90 kB
|
|
73
|
+
dist/cjs/util/captcha/captchaRenderer.cjs 3.04 kB │ gzip: 1.00 kB
|
|
74
|
+
dist/cjs/index.cjs 11.88 kB │ gzip: 3.88 kB
|
|
75
75
|
|
|
76
76
|
[33m[33m[MIXED_EXPORTS] [0mEntry module "src/index.ts" is using named (including "default", "execute", "remove", "render", "reset", "start") and default exports together. Consumers of your bundle will have to use `..default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
|
|
77
77
|
[39m
|
|
78
|
-
[32m✓ built in
|
|
78
|
+
[32m✓ built in 59ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-bundle@4.
|
|
2
|
+
> @prosopo/procaptcha-bundle@4.4.0 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
1:15:52 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../util/tsconfig.json
|
|
8
8
|
* ../logger/tsconfig.json
|
|
@@ -27,51 +27,51 @@
|
|
|
27
27
|
* ../procaptcha-frictionless/tsconfig.json
|
|
28
28
|
* tsconfig.json
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
1:15:52 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'
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
1:15:52 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
1:15:53 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
1:15:53 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
1:15:53 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
1:15:53 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'
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
1:15:53 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
1:15:53 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
1:15:53 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
1:15:53 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
1:15:53 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
1:15:53 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'
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
1:15:53 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'
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
1:15:53 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.test.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
1:15:53 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
1:15:53 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/tests/challengeSurfaceRender.unit.test.tsx' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
1:15:53 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/tests/managerHarness.ts' is older than output '../procaptcha-pow/tsconfig.tsbuildinfo'
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
1:15:53 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/index.ts' is older than output '../procaptcha-puzzle/tsconfig.tsbuildinfo'
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
1:15:53 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'
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
1:15:53 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
1:15:53 PM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/index.ts' is older than output '../procaptcha-react/tsconfig.tsbuildinfo'
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
1:15:53 PM - Project '../procaptcha-frictionless/tsconfig.json' is up to date because newest input '../procaptcha-frictionless/src/customDetectBot.ts' is older than output '../procaptcha-frictionless/tsconfig.tsbuildinfo'
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
1:15:53 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
1:15:53 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-bundle/tsconfig.json'...
|
|
77
77
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-bundle@4.
|
|
2
|
+
> @prosopo/procaptcha-bundle@4.4.0 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/procaptcha-bundle@4.
|
|
6
|
+
> @prosopo/procaptcha-bundle@4.4.0 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -64,17 +64,17 @@ Bundle build started
|
|
|
64
64
|
✓ 12 modules transformed.
|
|
65
65
|
rendering chunks...
|
|
66
66
|
computing gzip size...
|
|
67
|
-
dist/_virtual/_rolldown/runtime.js
|
|
68
|
-
dist/util/widgetThemeResolver.js
|
|
69
|
-
dist/util/timeout.js
|
|
70
|
-
dist/util/config.js
|
|
71
|
-
dist/util/captcha/components/bundleCaptcha.js
|
|
72
|
-
dist/util/startMode.js
|
|
73
|
-
dist/util/configCreator.js
|
|
74
|
-
dist/util/language.js
|
|
75
|
-
dist/util/clientSession.js
|
|
76
|
-
dist/util/
|
|
77
|
-
dist/util/
|
|
78
|
-
dist/index.js
|
|
67
|
+
dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
|
|
68
|
+
dist/util/widgetThemeResolver.js 0.55 kB │ gzip: 0.29 kB
|
|
69
|
+
dist/util/timeout.js 0.61 kB │ gzip: 0.29 kB
|
|
70
|
+
dist/util/config.js 0.62 kB │ gzip: 0.33 kB
|
|
71
|
+
dist/util/captcha/components/bundleCaptcha.js 0.68 kB │ gzip: 0.35 kB
|
|
72
|
+
dist/util/startMode.js 0.78 kB │ gzip: 0.39 kB
|
|
73
|
+
dist/util/configCreator.js 0.98 kB │ gzip: 0.49 kB
|
|
74
|
+
dist/util/language.js 1.01 kB │ gzip: 0.44 kB
|
|
75
|
+
dist/util/clientSession.js 1.03 kB │ gzip: 0.55 kB
|
|
76
|
+
dist/util/widgetFactory.js 2.57 kB │ gzip: 0.87 kB
|
|
77
|
+
dist/util/captcha/captchaRenderer.js 2.64 kB │ gzip: 0.92 kB
|
|
78
|
+
dist/index.js 11.43 kB │ gzip: 3.79 kB
|
|
79
79
|
|
|
80
|
-
[32m✓ built in
|
|
80
|
+
[32m✓ built in 59ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @prosopo/procaptcha-bundle
|
|
2
2
|
|
|
3
|
+
## 4.4.0
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
- d288371: Let a site choose where a challenge opens, and which button triggers it.
|
|
7
|
+
|
|
8
|
+
- `placement: "popup" | "float"`, also `data-placement`. `popup` is the default and unchanged. `float` opens the challenge directly above the widget and keeps it pinned there as the page scrolls, leaves the page usable behind it, and dismisses on Escape or an outside click. An invisible widget always uses popup.
|
|
9
|
+
- `bind: "#selector"`, also `data-bind`. The matching host-page button triggers that one widget, in visible or invisible mode. The click's default action is prevented so a submit button does not post the form before a token exists.
|
|
10
|
+
- `execute(widgetId?)`. Called with no argument every widget responds, as before. Called with the id `render()` returns, only that widget runs. Implicitly rendered invisible buttons now trigger only their own widget.
|
|
11
|
+
|
|
12
|
+
Behaviour changes for existing widgets:
|
|
13
|
+
|
|
14
|
+
- Escape now closes the image and puzzle challenge in both placements. For the image captcha this runs the cancel path, which fires `onClose` and restarts frictionless.
|
|
15
|
+
- Image and puzzle now present on one shared `ChallengeSurface`. Both were already portalled to `document.body`, so neither moves in the page, but the markup around them changed: the outer layer keeps `prosopo-modalOuter` for the image captcha and also carries `prosopo-challenge-surface`, and a new `prosopo-challenge-content` element sits between it and `prosopo-modalInner`. A direct-child selector such as `.prosopo-modalOuter > .prosopo-modalInner` no longer matches, and the centring transform now lives on `prosopo-challenge-content` rather than on `prosopo-modalInner`.
|
|
16
|
+
|
|
17
|
+
`createConfig` takes a named options object.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [6f57ee9]
|
|
22
|
+
- Updated dependencies [d288371]
|
|
23
|
+
- @prosopo/types@5.7.0
|
|
24
|
+
- @prosopo/util@3.3.9
|
|
25
|
+
- @prosopo/procaptcha-common@2.13.0
|
|
26
|
+
- @prosopo/procaptcha-frictionless@2.15.0
|
|
27
|
+
- @prosopo/dotenv@3.0.55
|
|
28
|
+
|
|
3
29
|
## 4.3.0
|
|
4
30
|
### Minor Changes
|
|
5
31
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -14,11 +14,12 @@ var BUNDLE_NAMES = ["procaptcha.bundle.iife.js", "procaptcha.bundle.js"];
|
|
|
14
14
|
var procaptchaWidgets = /* @__PURE__ */ new Map();
|
|
15
15
|
var widgetIdCounter = 0;
|
|
16
16
|
var nextWidgetId = () => `procaptcha-widget-${widgetIdCounter++}`;
|
|
17
|
-
var registerWidgets = (
|
|
17
|
+
var registerWidgets = (widgets, elements, renderOptions, isWeb2, invisible) => widgets.map(({ root, container }, index) => {
|
|
18
18
|
const id = nextWidgetId();
|
|
19
19
|
procaptchaWidgets.set(id, {
|
|
20
20
|
root,
|
|
21
21
|
element: (0, _prosopo_util.at)(elements, index),
|
|
22
|
+
target: container,
|
|
22
23
|
renderOptions,
|
|
23
24
|
isWeb2,
|
|
24
25
|
invisible
|
|
@@ -70,7 +71,10 @@ var implicitRender = async () => {
|
|
|
70
71
|
ipv6,
|
|
71
72
|
startMode
|
|
72
73
|
};
|
|
73
|
-
registerWidgets(await widgetFactory.createWidgets(elements, implicitRenderOptions, !(web3 === "true")), elements, implicitRenderOptions, !(web3 === "true"), false)
|
|
74
|
+
registerWidgets(await widgetFactory.createWidgets(elements, implicitRenderOptions, !(web3 === "true")), elements, implicitRenderOptions, !(web3 === "true"), false).forEach((id, index) => {
|
|
75
|
+
const selector = (0, _prosopo_util.at)(elements, index).getAttribute("data-bind");
|
|
76
|
+
if (selector) bindTrigger(id, selector);
|
|
77
|
+
});
|
|
74
78
|
}
|
|
75
79
|
const invisibleButtons = Array.from(document.getElementsByClassName("procaptcha")).filter((button) => button.tagName.toLowerCase() === "button");
|
|
76
80
|
if (invisibleButtons.length) for (const button of invisibleButtons) {
|
|
@@ -91,10 +95,10 @@ var implicitRender = async () => {
|
|
|
91
95
|
ipv6,
|
|
92
96
|
startMode
|
|
93
97
|
};
|
|
94
|
-
registerWidgets(await widgetFactory.createWidgets([button], buttonRenderOptions, true, true), [button], buttonRenderOptions, true, true);
|
|
98
|
+
const [id] = registerWidgets(await widgetFactory.createWidgets([button], buttonRenderOptions, true, true), [button], buttonRenderOptions, true, true);
|
|
95
99
|
button.addEventListener("click", async (event) => {
|
|
96
100
|
event.preventDefault();
|
|
97
|
-
execute();
|
|
101
|
+
execute(id);
|
|
98
102
|
});
|
|
99
103
|
}
|
|
100
104
|
};
|
|
@@ -115,7 +119,9 @@ var render = async (element, renderOptions) => {
|
|
|
115
119
|
const hasInvisibleSize = Object.prototype.hasOwnProperty.call(renderOptions, "size") && renderOptions.size === "invisible";
|
|
116
120
|
const isWeb2 = !renderOptions.web3;
|
|
117
121
|
const invisible = hasInvisibleSize || element.tagName.toLowerCase() === "button";
|
|
118
|
-
|
|
122
|
+
const id = registerWidgets(await widgetFactory.createWidgets([element], renderOptions, isWeb2, invisible), [element], renderOptions, isWeb2, invisible)[0];
|
|
123
|
+
if (id && renderOptions.bind) bindTrigger(id, renderOptions.bind);
|
|
124
|
+
return id;
|
|
119
125
|
};
|
|
120
126
|
function ready(fn) {
|
|
121
127
|
if (document && document.readyState !== "loading") {
|
|
@@ -130,8 +136,18 @@ function ready(fn) {
|
|
|
130
136
|
});
|
|
131
137
|
}
|
|
132
138
|
}
|
|
133
|
-
|
|
134
|
-
|
|
139
|
+
/**
|
|
140
|
+
* Starts verification. With no id the event goes to `document` and every
|
|
141
|
+
* widget responds; with an id (as returned by `render()`) only that widget
|
|
142
|
+
* runs.
|
|
143
|
+
*/
|
|
144
|
+
var execute = (widgetId) => {
|
|
145
|
+
const targeted = void 0 === widgetId ? void 0 : procaptchaWidgets.get(widgetId);
|
|
146
|
+
if (void 0 !== widgetId && !targeted) {
|
|
147
|
+
console.error(`No Procaptcha widget found with id ${widgetId}`);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const containers = targeted ? [targeted.element] : findProcaptchaContainers();
|
|
135
151
|
if (containers.length === 0) {
|
|
136
152
|
console.error("No Procaptcha containers found for execution");
|
|
137
153
|
return;
|
|
@@ -142,11 +158,38 @@ var execute = () => {
|
|
|
142
158
|
containerCount: containers.length,
|
|
143
159
|
timestamp: Date.now()
|
|
144
160
|
},
|
|
145
|
-
bubbles:
|
|
161
|
+
bubbles: !targeted,
|
|
146
162
|
cancelable: true
|
|
147
163
|
});
|
|
164
|
+
if (targeted) {
|
|
165
|
+
targeted.target.dispatchEvent(executeEvent);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
148
168
|
document.dispatchEvent(executeEvent);
|
|
149
169
|
};
|
|
170
|
+
/**
|
|
171
|
+
* The click's default is prevented so a submit button does not post the form
|
|
172
|
+
* before a token exists.
|
|
173
|
+
*/
|
|
174
|
+
var bindTrigger = (widgetId, selector) => {
|
|
175
|
+
const entry = procaptchaWidgets.get(widgetId);
|
|
176
|
+
if (!entry) {
|
|
177
|
+
console.error(`No Procaptcha widget found with id ${widgetId}`);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const trigger = document.querySelector(selector);
|
|
181
|
+
if (!trigger) {
|
|
182
|
+
console.error(`Procaptcha: no element matches bind selector ${selector}`);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
entry.unbindTrigger?.();
|
|
186
|
+
const onClick = (event) => {
|
|
187
|
+
event.preventDefault();
|
|
188
|
+
execute(widgetId);
|
|
189
|
+
};
|
|
190
|
+
trigger.addEventListener("click", onClick);
|
|
191
|
+
entry.unbindTrigger = () => trigger.removeEventListener("click", onClick);
|
|
192
|
+
};
|
|
150
193
|
/** Starts a `startMode: "manual"` widget; omit the id to start all of them. */
|
|
151
194
|
var start = (widgetId) => {
|
|
152
195
|
const ids = void 0 === widgetId ? Array.from(procaptchaWidgets.keys()) : [widgetId];
|
|
@@ -218,10 +261,11 @@ var reset = async (widgetId) => {
|
|
|
218
261
|
const current = procaptchaWidgets.get(id);
|
|
219
262
|
if (!current) continue;
|
|
220
263
|
current.root.unmount();
|
|
221
|
-
const [
|
|
222
|
-
if (
|
|
264
|
+
const [widget] = await widgetFactory.createWidgets([current.element], current.renderOptions, current.isWeb2, current.invisible);
|
|
265
|
+
if (widget) procaptchaWidgets.set(id, {
|
|
223
266
|
...current,
|
|
224
|
-
root
|
|
267
|
+
root: widget.root,
|
|
268
|
+
target: widget.container
|
|
225
269
|
});
|
|
226
270
|
else procaptchaWidgets.delete(id);
|
|
227
271
|
}
|
|
@@ -237,6 +281,7 @@ var remove = (widgetId) => {
|
|
|
237
281
|
for (const id of ids) {
|
|
238
282
|
const entry = procaptchaWidgets.get(id);
|
|
239
283
|
if (!entry) continue;
|
|
284
|
+
entry.unbindTrigger?.();
|
|
240
285
|
entry.root.unmount();
|
|
241
286
|
entry.element.innerHTML = "";
|
|
242
287
|
procaptchaWidgets.delete(id);
|
|
@@ -5,15 +5,32 @@ const require_clientSession = require("../clientSession.cjs");
|
|
|
5
5
|
const require_configCreator = require("../configCreator.cjs");
|
|
6
6
|
const require_timeout = require("../timeout.cjs");
|
|
7
7
|
const require_bundleCaptcha = require("./components/bundleCaptcha.cjs");
|
|
8
|
+
let _prosopo_types = require("@prosopo/types");
|
|
8
9
|
let _emotion_cache = require("@emotion/cache");
|
|
9
10
|
_emotion_cache = require_runtime.__toESM(_emotion_cache, 1);
|
|
10
11
|
let _emotion_react = require("@emotion/react");
|
|
11
12
|
let react_dom_client = require("react-dom/client");
|
|
12
13
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
14
|
//#region src/util/captcha/captchaRenderer.tsx
|
|
15
|
+
var resolveRequestedPlacement = (element, renderOptions) => {
|
|
16
|
+
const requested = renderOptions.placement ?? element.getAttribute("data-placement");
|
|
17
|
+
if (!requested) return void 0;
|
|
18
|
+
const parsed = _prosopo_types.Placement.safeParse(requested);
|
|
19
|
+
return parsed.success ? parsed.data : void 0;
|
|
20
|
+
};
|
|
14
21
|
var CaptchaRenderer = class {
|
|
15
22
|
renderCaptcha(settings, container, renderOptions, callbacks, isWeb2, i18n, invisible, widgetContainer, sourceElement) {
|
|
16
|
-
const config = require_configCreator.createConfig(
|
|
23
|
+
const config = require_configCreator.createConfig({
|
|
24
|
+
siteKey: renderOptions.siteKey,
|
|
25
|
+
theme: renderOptions.theme,
|
|
26
|
+
language: renderOptions.language,
|
|
27
|
+
web2: isWeb2,
|
|
28
|
+
invisible,
|
|
29
|
+
placement: resolveRequestedPlacement(sourceElement || container, renderOptions),
|
|
30
|
+
userAccountAddress: renderOptions.userAccountAddress,
|
|
31
|
+
ipv4: renderOptions.ipv4,
|
|
32
|
+
ipv6: renderOptions.ipv6
|
|
33
|
+
});
|
|
17
34
|
this.readAndValidateSettings(sourceElement || container, config, renderOptions);
|
|
18
35
|
const reactRoot = this.createReactRoot(container, settings.identifierPrefix);
|
|
19
36
|
const emotionCache = this.makeEmotionCache(settings.emotionCacheKey, container);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
let _prosopo_types = require("@prosopo/types");
|
|
2
2
|
//#region src/util/configCreator.ts
|
|
3
|
-
function createConfig(
|
|
4
|
-
|
|
3
|
+
function createConfig(options = {}) {
|
|
4
|
+
const { theme = "light", language, web2 = true, invisible = false, placement, userAccountAddress, ipv4 = false, ipv6 = false } = options;
|
|
5
|
+
const siteKey = options.siteKey || process.env.PROSOPO_SITE_KEY || "";
|
|
5
6
|
return _prosopo_types.ProcaptchaConfigSchema.parse({
|
|
6
7
|
defaultEnvironment: process.env.PROSOPO_DEFAULT_ENVIRONMENT ? _prosopo_types.EnvironmentTypesSchema.parse(process.env.PROSOPO_DEFAULT_ENVIRONMENT) : _prosopo_types.EnvironmentTypesSchema.enum.development,
|
|
7
8
|
userAccountAddress: userAccountAddress || "",
|
|
@@ -10,6 +11,7 @@ function createConfig(siteKey, theme = "light", language, web2 = true, invisible
|
|
|
10
11
|
mongoAtlasUri: process.env.PROSOPO_MONGO_EVENTS_URI || "",
|
|
11
12
|
web2,
|
|
12
13
|
mode: invisible ? "invisible" : "visible",
|
|
14
|
+
placement: (0, _prosopo_types.resolvePlacement)(placement, invisible),
|
|
13
15
|
theme,
|
|
14
16
|
language,
|
|
15
17
|
ipv4,
|
|
@@ -36,11 +36,14 @@ var WidgetFactory = class {
|
|
|
36
36
|
widgetContainer = widgetResult.webComponent;
|
|
37
37
|
}
|
|
38
38
|
const language = require_language.resolveLanguage(renderOptions, container);
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
return {
|
|
40
|
+
root: (await this.getCaptchaRenderer(language)).renderCaptcha({
|
|
41
|
+
identifierPrefix: "procaptcha-",
|
|
42
|
+
emotionCacheKey: "procaptcha",
|
|
43
|
+
webComponentTag: "prosopo-procaptcha"
|
|
44
|
+
}, widgetInteractiveArea, renderOptions, callbacks, isWeb2, this.i18n, invisible, widgetContainer, container),
|
|
45
|
+
container: widgetContainer
|
|
46
|
+
};
|
|
44
47
|
}
|
|
45
48
|
async getCaptchaRenderer(language) {
|
|
46
49
|
if (this._i18n === null) this._i18n = await (0, _prosopo_locale.loadI18next)(false, language);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ProcaptchaRenderOptions } from "@prosopo/types";
|
|
2
2
|
export declare const render: (element: Element, renderOptions: ProcaptchaRenderOptions) => Promise<string | undefined>;
|
|
3
3
|
export default function ready(fn: () => void): void;
|
|
4
|
-
export declare const execute: () => void;
|
|
4
|
+
export declare const execute: (widgetId?: string) => void;
|
|
5
5
|
export declare const start: (widgetId?: string) => void;
|
|
6
6
|
declare global {
|
|
7
7
|
interface Window {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAGN,KAAK,uBAAuB,EAG5B,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAGN,KAAK,uBAAuB,EAG5B,MAAM,gBAAgB,CAAC;AAiNxB,eAAO,MAAM,MAAM,YACT,OAAO,iBACD,uBAAuB,KACpC,OAAO,CAAC,MAAM,GAAG,SAAS,CAmC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,QAY3C;AAOD,eAAO,MAAM,OAAO,cAAe,MAAM,SAmCxC,CAAC;AAiCF,eAAO,MAAM,KAAK,cAAe,MAAM,KAAG,IAwBzC,CAAC;AAkCF,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,EAAE;YACX,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,MAAM,EAAE,OAAO,MAAM,CAAC;YACtB,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,MAAM,EAAE,OAAO,MAAM,CAAC;YACtB,OAAO,EAAE,OAAO,OAAO,CAAC;YACxB,KAAK,EAAE,OAAO,KAAK,CAAC;SACpB,CAAC;KACF;CACD;AAoDD,eAAO,MAAM,KAAK,cAAqB,MAAM,KAAG,OAAO,CAAC,IAAI,CA2B3D,CAAC;AAQF,eAAO,MAAM,MAAM,cAAe,MAAM,KAAG,IAY1C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,11 +11,12 @@ var BUNDLE_NAMES = ["procaptcha.bundle.iife.js", "procaptcha.bundle.js"];
|
|
|
11
11
|
var procaptchaWidgets = /* @__PURE__ */ new Map();
|
|
12
12
|
var widgetIdCounter = 0;
|
|
13
13
|
var nextWidgetId = () => `procaptcha-widget-${widgetIdCounter++}`;
|
|
14
|
-
var registerWidgets = (
|
|
14
|
+
var registerWidgets = (widgets, elements, renderOptions, isWeb2, invisible) => widgets.map(({ root, container }, index) => {
|
|
15
15
|
const id = nextWidgetId();
|
|
16
16
|
procaptchaWidgets.set(id, {
|
|
17
17
|
root,
|
|
18
18
|
element: at(elements, index),
|
|
19
|
+
target: container,
|
|
19
20
|
renderOptions,
|
|
20
21
|
isWeb2,
|
|
21
22
|
invisible
|
|
@@ -67,7 +68,10 @@ var implicitRender = async () => {
|
|
|
67
68
|
ipv6,
|
|
68
69
|
startMode
|
|
69
70
|
};
|
|
70
|
-
registerWidgets(await widgetFactory.createWidgets(elements, implicitRenderOptions, !(web3 === "true")), elements, implicitRenderOptions, !(web3 === "true"), false)
|
|
71
|
+
registerWidgets(await widgetFactory.createWidgets(elements, implicitRenderOptions, !(web3 === "true")), elements, implicitRenderOptions, !(web3 === "true"), false).forEach((id, index) => {
|
|
72
|
+
const selector = at(elements, index).getAttribute("data-bind");
|
|
73
|
+
if (selector) bindTrigger(id, selector);
|
|
74
|
+
});
|
|
71
75
|
}
|
|
72
76
|
const invisibleButtons = Array.from(document.getElementsByClassName("procaptcha")).filter((button) => button.tagName.toLowerCase() === "button");
|
|
73
77
|
if (invisibleButtons.length) for (const button of invisibleButtons) {
|
|
@@ -88,10 +92,10 @@ var implicitRender = async () => {
|
|
|
88
92
|
ipv6,
|
|
89
93
|
startMode
|
|
90
94
|
};
|
|
91
|
-
registerWidgets(await widgetFactory.createWidgets([button], buttonRenderOptions, true, true), [button], buttonRenderOptions, true, true);
|
|
95
|
+
const [id] = registerWidgets(await widgetFactory.createWidgets([button], buttonRenderOptions, true, true), [button], buttonRenderOptions, true, true);
|
|
92
96
|
button.addEventListener("click", async (event) => {
|
|
93
97
|
event.preventDefault();
|
|
94
|
-
execute();
|
|
98
|
+
execute(id);
|
|
95
99
|
});
|
|
96
100
|
}
|
|
97
101
|
};
|
|
@@ -112,7 +116,9 @@ var render = async (element, renderOptions) => {
|
|
|
112
116
|
const hasInvisibleSize = Object.prototype.hasOwnProperty.call(renderOptions, "size") && renderOptions.size === "invisible";
|
|
113
117
|
const isWeb2 = !renderOptions.web3;
|
|
114
118
|
const invisible = hasInvisibleSize || element.tagName.toLowerCase() === "button";
|
|
115
|
-
|
|
119
|
+
const id = registerWidgets(await widgetFactory.createWidgets([element], renderOptions, isWeb2, invisible), [element], renderOptions, isWeb2, invisible)[0];
|
|
120
|
+
if (id && renderOptions.bind) bindTrigger(id, renderOptions.bind);
|
|
121
|
+
return id;
|
|
116
122
|
};
|
|
117
123
|
function ready(fn) {
|
|
118
124
|
if (document && document.readyState !== "loading") {
|
|
@@ -127,8 +133,18 @@ function ready(fn) {
|
|
|
127
133
|
});
|
|
128
134
|
}
|
|
129
135
|
}
|
|
130
|
-
|
|
131
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Starts verification. With no id the event goes to `document` and every
|
|
138
|
+
* widget responds; with an id (as returned by `render()`) only that widget
|
|
139
|
+
* runs.
|
|
140
|
+
*/
|
|
141
|
+
var execute = (widgetId) => {
|
|
142
|
+
const targeted = void 0 === widgetId ? void 0 : procaptchaWidgets.get(widgetId);
|
|
143
|
+
if (void 0 !== widgetId && !targeted) {
|
|
144
|
+
console.error(`No Procaptcha widget found with id ${widgetId}`);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const containers = targeted ? [targeted.element] : findProcaptchaContainers();
|
|
132
148
|
if (containers.length === 0) {
|
|
133
149
|
console.error("No Procaptcha containers found for execution");
|
|
134
150
|
return;
|
|
@@ -139,11 +155,38 @@ var execute = () => {
|
|
|
139
155
|
containerCount: containers.length,
|
|
140
156
|
timestamp: Date.now()
|
|
141
157
|
},
|
|
142
|
-
bubbles:
|
|
158
|
+
bubbles: !targeted,
|
|
143
159
|
cancelable: true
|
|
144
160
|
});
|
|
161
|
+
if (targeted) {
|
|
162
|
+
targeted.target.dispatchEvent(executeEvent);
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
145
165
|
document.dispatchEvent(executeEvent);
|
|
146
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* The click's default is prevented so a submit button does not post the form
|
|
169
|
+
* before a token exists.
|
|
170
|
+
*/
|
|
171
|
+
var bindTrigger = (widgetId, selector) => {
|
|
172
|
+
const entry = procaptchaWidgets.get(widgetId);
|
|
173
|
+
if (!entry) {
|
|
174
|
+
console.error(`No Procaptcha widget found with id ${widgetId}`);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const trigger = document.querySelector(selector);
|
|
178
|
+
if (!trigger) {
|
|
179
|
+
console.error(`Procaptcha: no element matches bind selector ${selector}`);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
entry.unbindTrigger?.();
|
|
183
|
+
const onClick = (event) => {
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
execute(widgetId);
|
|
186
|
+
};
|
|
187
|
+
trigger.addEventListener("click", onClick);
|
|
188
|
+
entry.unbindTrigger = () => trigger.removeEventListener("click", onClick);
|
|
189
|
+
};
|
|
147
190
|
/** Starts a `startMode: "manual"` widget; omit the id to start all of them. */
|
|
148
191
|
var start = (widgetId) => {
|
|
149
192
|
const ids = void 0 === widgetId ? Array.from(procaptchaWidgets.keys()) : [widgetId];
|
|
@@ -215,10 +258,11 @@ var reset = async (widgetId) => {
|
|
|
215
258
|
const current = procaptchaWidgets.get(id);
|
|
216
259
|
if (!current) continue;
|
|
217
260
|
current.root.unmount();
|
|
218
|
-
const [
|
|
219
|
-
if (
|
|
261
|
+
const [widget] = await widgetFactory.createWidgets([current.element], current.renderOptions, current.isWeb2, current.invisible);
|
|
262
|
+
if (widget) procaptchaWidgets.set(id, {
|
|
220
263
|
...current,
|
|
221
|
-
root
|
|
264
|
+
root: widget.root,
|
|
265
|
+
target: widget.container
|
|
222
266
|
});
|
|
223
267
|
else procaptchaWidgets.delete(id);
|
|
224
268
|
}
|
|
@@ -234,6 +278,7 @@ var remove = (widgetId) => {
|
|
|
234
278
|
for (const id of ids) {
|
|
235
279
|
const entry = procaptchaWidgets.get(id);
|
|
236
280
|
if (!entry) continue;
|
|
281
|
+
entry.unbindTrigger?.();
|
|
237
282
|
entry.root.unmount();
|
|
238
283
|
entry.element.innerHTML = "";
|
|
239
284
|
procaptchaWidgets.delete(id);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAEN,sBAAsB,EAGtB,aAAa,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,YAAY,GAAG,CAAC,2BAA2B,EAAE,sBAAsB,CAAC,CAAC;AAqB3E,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAuB,CAAC;AAEzD,IAAI,eAAe,GAAG,CAAC,CAAC;AACxB,MAAM,YAAY,GAAG,GAAW,EAAE,CAAC,qBAAqB,eAAe,EAAE,EAAE,CAAC;AAE5E,MAAM,eAAe,GAAG,CACvB,KAAa,EACb,QAAmB,EACnB,aAAsC,EACtC,MAAe,EACf,SAAkB,EACP,EAAE,CACb,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IACzB,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC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