@prosopo/procaptcha-react 2.9.121 → 2.10.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 +4 -4
- package/.turbo/turbo-build$colon$tsc.log +21 -21
- package/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +74 -0
- package/dist/cjs/components/Modal.cjs +20 -35
- package/dist/cjs/components/ProcaptchaWidget.cjs +14 -1
- package/dist/components/Modal.d.ts +5 -1
- package/dist/components/Modal.d.ts.map +1 -1
- package/dist/components/Modal.js +20 -34
- package/dist/components/Modal.js.map +1 -1
- package/dist/components/ProcaptchaWidget.d.ts.map +1 -1
- package/dist/components/ProcaptchaWidget.js +14 -1
- package/dist/components/ProcaptchaWidget.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-react@2.
|
|
2
|
+
> @prosopo/procaptcha-react@2.10.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: .
|
|
@@ -55,10 +55,10 @@ dist/cjs/index.cjs 0.46 kB │ gzip: 0.18 kB
|
|
|
55
55
|
dist/cjs/components/Procaptcha.cjs 0.49 kB │ gzip: 0.27 kB
|
|
56
56
|
dist/cjs/util/index.cjs 0.50 kB │ gzip: 0.32 kB
|
|
57
57
|
dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
|
|
58
|
-
dist/cjs/components/Modal.cjs 1.
|
|
58
|
+
dist/cjs/components/Modal.cjs 1.15 kB │ gzip: 0.59 kB
|
|
59
59
|
dist/cjs/components/Button.cjs 2.86 kB │ gzip: 1.18 kB
|
|
60
60
|
dist/cjs/components/CaptchaWidget.cjs 4.03 kB │ gzip: 1.50 kB
|
|
61
61
|
dist/cjs/components/CaptchaComponent.cjs 6.18 kB │ gzip: 1.57 kB
|
|
62
|
-
dist/cjs/components/ProcaptchaWidget.cjs 6.
|
|
62
|
+
dist/cjs/components/ProcaptchaWidget.cjs 6.70 kB │ gzip: 1.92 kB
|
|
63
63
|
|
|
64
|
-
[32m✓ built in
|
|
64
|
+
[32m✓ built in 51ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-react@2.
|
|
2
|
+
> @prosopo/procaptcha-react@2.10.0 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
1:
|
|
5
|
+
1:15:41 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../locale/tsconfig.json
|
|
8
8
|
* ../util/tsconfig.json
|
|
@@ -22,41 +22,41 @@
|
|
|
22
22
|
* ../procaptcha/tsconfig.json
|
|
23
23
|
* tsconfig.json
|
|
24
24
|
|
|
25
|
-
1:
|
|
25
|
+
1:15:41 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
26
26
|
|
|
27
|
-
1:
|
|
27
|
+
1:15:41 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
28
28
|
|
|
29
|
-
1:
|
|
29
|
+
1:15:41 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
30
30
|
|
|
31
|
-
1:
|
|
31
|
+
1:15:41 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
32
32
|
|
|
33
|
-
1:
|
|
33
|
+
1:15:41 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
34
34
|
|
|
35
|
-
1:
|
|
35
|
+
1:15:41 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'
|
|
36
36
|
|
|
37
|
-
1:
|
|
37
|
+
1:15:42 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
1:
|
|
39
|
+
1:15:42 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'
|
|
40
40
|
|
|
41
|
-
1:
|
|
41
|
+
1:15:42 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
42
42
|
|
|
43
|
-
1:
|
|
43
|
+
1:15:42 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'
|
|
44
44
|
|
|
45
|
-
1:
|
|
45
|
+
1:15:42 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/index.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
|
|
46
46
|
|
|
47
|
-
1:
|
|
47
|
+
1:15:42 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
1:
|
|
49
|
+
1:15:42 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
50
50
|
|
|
51
|
-
1:
|
|
51
|
+
1:15:42 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'
|
|
52
52
|
|
|
53
|
-
1:
|
|
53
|
+
1:15:42 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
|
|
54
54
|
|
|
55
|
-
1:
|
|
55
|
+
1:15:42 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'
|
|
56
56
|
|
|
57
|
-
1:
|
|
57
|
+
1:15:42 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
|
|
58
58
|
|
|
59
|
-
1:
|
|
59
|
+
1:15:42 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
60
60
|
|
|
61
|
-
1:
|
|
61
|
+
1:15:42 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json'...
|
|
62
62
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-react@2.
|
|
2
|
+
> @prosopo/procaptcha-react@2.10.0 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/procaptcha-react@2.
|
|
6
|
+
> @prosopo/procaptcha-react@2.10.0 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -59,10 +59,10 @@ dist/components/index.js 0.20 kB │ gzip: 0.09 kB
|
|
|
59
59
|
dist/index.js 0.27 kB │ gzip: 0.13 kB
|
|
60
60
|
dist/components/Procaptcha.js 0.37 kB │ gzip: 0.24 kB
|
|
61
61
|
dist/util/index.js 0.50 kB │ gzip: 0.33 kB
|
|
62
|
-
dist/components/Modal.js
|
|
62
|
+
dist/components/Modal.js 0.91 kB │ gzip: 0.52 kB
|
|
63
63
|
dist/components/Button.js 2.62 kB │ gzip: 1.15 kB
|
|
64
64
|
dist/components/CaptchaWidget.js 3.66 kB │ gzip: 1.46 kB
|
|
65
65
|
dist/components/CaptchaComponent.js 5.27 kB │ gzip: 1.52 kB
|
|
66
|
-
dist/components/ProcaptchaWidget.js 5.
|
|
66
|
+
dist/components/ProcaptchaWidget.js 5.95 kB │ gzip: 1.88 kB
|
|
67
67
|
|
|
68
|
-
[32m✓ built in
|
|
68
|
+
[32m✓ built in 83ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
1
|
# @prosopo/procaptcha-react
|
|
2
2
|
|
|
3
|
+
## 2.10.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/common@3.1.54
|
|
27
|
+
- @prosopo/procaptcha@2.11.7
|
|
28
|
+
|
|
29
|
+
## 2.9.122
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- 89dd38a: chore(deps): batch the outstanding dependabot bumps into one upgrade
|
|
33
|
+
|
|
34
|
+
Rolls up dependabot PRs #3112, #3127-#3134 and #3159. Majors: `mongoose`
|
|
35
|
+
8 -> 9, `bson` 6 -> 7, `@noble/curves` 1 -> 2, `@polkadot/util-crypto`
|
|
36
|
+
13 -> 14, `@typegoose/auto-increment` 4 -> 5, `@babel/preset-env` 7 -> 8,
|
|
37
|
+
`@types/jsdom` 21 -> 30, `@types/bcrypt` 5 -> 6, `@actions/github` 6 -> 9,
|
|
38
|
+
`testcontainers` 11 -> 12. The rest are minor/patch.
|
|
39
|
+
|
|
40
|
+
Code changes the majors forced:
|
|
41
|
+
- `@noble/curves` v2 requires `.js` specifiers and renamed the point API,
|
|
42
|
+
so `secp256k1.ProjectivePoint.fromHex(...).toRawBytes()` becomes
|
|
43
|
+
`secp256k1.Point.fromBytes(...).toBytes()`, `RistrettoPoint` becomes
|
|
44
|
+
`ristretto255.Point`, and `abstract/utils` moves to `utils.js`.
|
|
45
|
+
- mongoose 9 drops `RootFilterQuery` (now `QueryFilter`), no longer sets
|
|
46
|
+
`background: true` on schema indexes by default, and no longer declares
|
|
47
|
+
`id` on `Document`, which un-hid a mismatch between
|
|
48
|
+
`updateDappUserCommitment`'s `Hash` parameter and the `string` `id` it
|
|
49
|
+
filters on.
|
|
50
|
+
- mongoose 9 rejects an aggregation-pipeline update (an array) unless the
|
|
51
|
+
call passes `updatePipeline: true`, so the six pipeline writes in
|
|
52
|
+
`ProviderDatabase` now opt in explicitly.
|
|
53
|
+
- mongoose 9's `castUpdate` throws on a `$setOnInsert` key inside `$set`.
|
|
54
|
+
`storeUserImageCaptchaSolution` passed its record straight in as the
|
|
55
|
+
update, and mongoose's `moveImmutableProperties` mutates that object on
|
|
56
|
+
an upsert -- adding the very `$setOnInsert` key the record then carried
|
|
57
|
+
into `CentralDbStreamer.streamImageRecord`. Image records stopped
|
|
58
|
+
reaching the central DB (the streamer is fire-and-forget, so it only
|
|
59
|
+
logged) and signup verification returned 500. The update is now an
|
|
60
|
+
explicit `$set` over a shallow copy.
|
|
61
|
+
- `@prosopo/database` moves from mongodb 6.20 to 7.5 to match the driver
|
|
62
|
+
mongoose 9 pulls, so bson 7 is the only copy resolvable in the package.
|
|
63
|
+
- `vitest`/`@vitest/coverage-v8` go to 4.1.11 alongside dependabot's
|
|
64
|
+
`@vitest/spy` bump; leaving them at 4.1.10 installed a second copy of
|
|
65
|
+
`@vitest/spy` and broke type inference in the provider test utils.
|
|
66
|
+
- Updated dependencies [89dd38a]
|
|
67
|
+
- Updated dependencies [80f73c1]
|
|
68
|
+
- Updated dependencies [8a670d3]
|
|
69
|
+
- @prosopo/common@3.1.53
|
|
70
|
+
- @prosopo/locale@3.4.1
|
|
71
|
+
- @prosopo/procaptcha@2.11.6
|
|
72
|
+
- @prosopo/procaptcha-common@2.12.6
|
|
73
|
+
- @prosopo/types@5.6.0
|
|
74
|
+
- @prosopo/util@3.3.8
|
|
75
|
+
- @prosopo/widget-skeleton@2.8.7
|
|
76
|
+
|
|
3
77
|
## 2.9.121
|
|
4
78
|
### Patch Changes
|
|
5
79
|
|
|
@@ -1,49 +1,34 @@
|
|
|
1
1
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
|
|
2
3
|
let react = require("react");
|
|
3
4
|
react = require_runtime.__toESM(react, 1);
|
|
4
5
|
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
5
|
-
let _emotion_react = require("@emotion/react");
|
|
6
|
-
let react_dom = require("react-dom");
|
|
7
6
|
//#region src/components/Modal.tsx
|
|
8
|
-
|
|
9
|
-
position: absolute;
|
|
10
|
-
top: 50%;
|
|
11
|
-
left: 50%;
|
|
12
|
-
transform: translate(-50%, -50%);
|
|
13
|
-
max-width: 500px;
|
|
14
|
-
background-color: transparent;
|
|
15
|
-
border: none;
|
|
16
|
-
border-radius: 28px;
|
|
17
|
-
z-index: 2147483647;
|
|
18
|
-
align-self: center;
|
|
19
|
-
/* Shadowless — the dialog separates from the page via the scrim and its own
|
|
20
|
-
surface role, not a drop shadow. */
|
|
21
|
-
box-sizing: border-box; /* Ensures border is part of width */
|
|
22
|
-
/* iOS only */
|
|
23
|
-
@supports (-webkit-touch-callout: none) {
|
|
24
|
-
transform: translate(-50%, -100%);
|
|
25
|
-
}
|
|
26
|
-
`;
|
|
7
|
+
/** The image captcha's dialog frame; positioning lives in `ChallengeSurface`. */
|
|
27
8
|
var ModalComponent = react.default.memo((props) => {
|
|
28
|
-
const { show, children } = props;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
minHeight: "100vh"
|
|
37
|
-
};
|
|
38
|
-
return (0, react_dom.createPortal)(/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
|
|
9
|
+
const { show, children, placement, anchor, onDismiss } = props;
|
|
10
|
+
return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(_prosopo_procaptcha_common.ChallengeSurface, {
|
|
11
|
+
show,
|
|
12
|
+
placement,
|
|
13
|
+
anchor,
|
|
14
|
+
onDismiss,
|
|
15
|
+
scrim: "none",
|
|
16
|
+
popupIosLift: true,
|
|
39
17
|
className: "prosopo-modalOuter",
|
|
40
|
-
style: ModalOuterDivCss,
|
|
41
18
|
children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
|
|
42
19
|
className: "prosopo-modalInner",
|
|
43
|
-
|
|
20
|
+
style: {
|
|
21
|
+
maxWidth: "500px",
|
|
22
|
+
backgroundColor: "transparent",
|
|
23
|
+
border: "none",
|
|
24
|
+
borderRadius: "28px",
|
|
25
|
+
alignSelf: "center",
|
|
26
|
+
boxSizing: "border-box"
|
|
27
|
+
},
|
|
44
28
|
children
|
|
45
29
|
})
|
|
46
|
-
})
|
|
30
|
+
});
|
|
47
31
|
});
|
|
32
|
+
ModalComponent.displayName = "ModalComponent";
|
|
48
33
|
//#endregion
|
|
49
34
|
exports.default = ModalComponent;
|
|
@@ -72,16 +72,26 @@ var ProcaptchaWidget = (props) => {
|
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
document.addEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
75
|
+
const container = props.container;
|
|
76
|
+
container?.addEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
75
77
|
return () => {
|
|
76
78
|
document.removeEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
79
|
+
container?.removeEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
77
80
|
};
|
|
78
|
-
}, [
|
|
81
|
+
}, [
|
|
82
|
+
state.challenge,
|
|
83
|
+
updateState,
|
|
84
|
+
props.container
|
|
85
|
+
]);
|
|
79
86
|
const honeypot = frictionlessState?.hp ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(_prosopo_procaptcha_common.Honeypot, {
|
|
80
87
|
ref: hpRef,
|
|
81
88
|
encodedQuestion: frictionlessState.hp
|
|
82
89
|
}) : null;
|
|
83
90
|
if (config.mode === "invisible") return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(_emotion_react_jsx_runtime.Fragment, { children: [honeypot, /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Modal.default, {
|
|
84
91
|
show: state.showModal,
|
|
92
|
+
placement: config.placement,
|
|
93
|
+
anchor: props.container,
|
|
94
|
+
onDismiss: manager.current.cancel,
|
|
85
95
|
children: state.challenge ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_CaptchaComponent.default, {
|
|
86
96
|
challenge: state.challenge,
|
|
87
97
|
index: state.index,
|
|
@@ -100,6 +110,9 @@ var ProcaptchaWidget = (props) => {
|
|
|
100
110
|
honeypot,
|
|
101
111
|
/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Modal.default, {
|
|
102
112
|
show: state.showModal,
|
|
113
|
+
placement: config.placement,
|
|
114
|
+
anchor: props.container,
|
|
115
|
+
onDismiss: manager.current.cancel,
|
|
103
116
|
children: state.challenge ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_CaptchaComponent.default, {
|
|
104
117
|
challenge: state.challenge,
|
|
105
118
|
index: state.index,
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import type { PlacementType } from "@prosopo/types";
|
|
1
2
|
import React from "react";
|
|
2
3
|
type ModalProps = {
|
|
3
4
|
show: boolean;
|
|
4
5
|
children: React.ReactNode;
|
|
6
|
+
placement?: PlacementType;
|
|
7
|
+
anchor?: HTMLElement | null;
|
|
8
|
+
onDismiss?: () => void;
|
|
5
9
|
};
|
|
6
|
-
declare const ModalComponent: React.MemoExoticComponent<(props: ModalProps) =>
|
|
10
|
+
declare const ModalComponent: React.MemoExoticComponent<(props: ModalProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
7
11
|
export default ModalComponent;
|
|
8
12
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAeA,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,UAAU,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAGF,QAAA,MAAM,cAAc,oCAAsB,UAAU,sDA4BlD,CAAC;AAIH,eAAe,cAAc,CAAC"}
|
package/dist/components/Modal.js
CHANGED
|
@@ -1,46 +1,32 @@
|
|
|
1
|
+
import { ChallengeSurface } from "@prosopo/procaptcha-common";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { css } from "@emotion/react";
|
|
4
|
-
import { createPortal } from "react-dom";
|
|
5
4
|
//#region src/components/Modal.tsx
|
|
6
|
-
|
|
7
|
-
position: absolute;
|
|
8
|
-
top: 50%;
|
|
9
|
-
left: 50%;
|
|
10
|
-
transform: translate(-50%, -50%);
|
|
11
|
-
max-width: 500px;
|
|
12
|
-
background-color: transparent;
|
|
13
|
-
border: none;
|
|
14
|
-
border-radius: 28px;
|
|
15
|
-
z-index: 2147483647;
|
|
16
|
-
align-self: center;
|
|
17
|
-
/* Shadowless — the dialog separates from the page via the scrim and its own
|
|
18
|
-
surface role, not a drop shadow. */
|
|
19
|
-
box-sizing: border-box; /* Ensures border is part of width */
|
|
20
|
-
/* iOS only */
|
|
21
|
-
@supports (-webkit-touch-callout: none) {
|
|
22
|
-
transform: translate(-50%, -100%);
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
5
|
+
/** The image captcha's dialog frame; positioning lives in `ChallengeSurface`. */
|
|
25
6
|
var ModalComponent = React.memo((props) => {
|
|
26
|
-
const { show, children } = props;
|
|
27
|
-
return
|
|
7
|
+
const { show, children, placement, anchor, onDismiss } = props;
|
|
8
|
+
return /* @__PURE__ */ jsx(ChallengeSurface, {
|
|
9
|
+
show,
|
|
10
|
+
placement,
|
|
11
|
+
anchor,
|
|
12
|
+
onDismiss,
|
|
13
|
+
scrim: "none",
|
|
14
|
+
popupIosLift: true,
|
|
28
15
|
className: "prosopo-modalOuter",
|
|
29
|
-
style: {
|
|
30
|
-
position: "fixed",
|
|
31
|
-
zIndex: 2147483646,
|
|
32
|
-
inset: 0,
|
|
33
|
-
display: show ? "flex" : "none",
|
|
34
|
-
alignItems: "center",
|
|
35
|
-
justifyContent: "center",
|
|
36
|
-
minHeight: "100vh"
|
|
37
|
-
},
|
|
38
16
|
children: /* @__PURE__ */ jsx("div", {
|
|
39
17
|
className: "prosopo-modalInner",
|
|
40
|
-
|
|
18
|
+
style: {
|
|
19
|
+
maxWidth: "500px",
|
|
20
|
+
backgroundColor: "transparent",
|
|
21
|
+
border: "none",
|
|
22
|
+
borderRadius: "28px",
|
|
23
|
+
alignSelf: "center",
|
|
24
|
+
boxSizing: "border-box"
|
|
25
|
+
},
|
|
41
26
|
children
|
|
42
27
|
})
|
|
43
|
-
})
|
|
28
|
+
});
|
|
44
29
|
});
|
|
30
|
+
ModalComponent.displayName = "ModalComponent";
|
|
45
31
|
//#endregion
|
|
46
32
|
export { ModalComponent as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,KAAiB,EAAE,EAAE;IACvD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE/D,OAAO,CACN,KAAC,gBAAgB,IAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,EAAC,MAAM,EACZ,YAAY,QACZ,SAAS,EAAC,oBAAoB,YAE9B,cACC,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE;gBACN,QAAQ,EAAE,OAAO;gBACjB,eAAe,EAAE,aAAa;gBAC9B,MAAM,EAAE,MAAM;gBACd,YAAY,EAAE,MAAM;gBACpB,SAAS,EAAE,QAAQ;gBACnB,SAAS,EAAE,YAAY;aACvB,YAEA,QAAQ,GACJ,GACY,CACnB,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE9C,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAS9E,QAAA,MAAM,gBAAgB,UAAW,eAAe,
|
|
1
|
+
{"version":3,"file":"ProcaptchaWidget.d.ts","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAS9E,QAAA,MAAM,gBAAgB,UAAW,eAAe,qDAoO/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -72,16 +72,26 @@ var ProcaptchaWidget = (props) => {
|
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
document.addEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
75
|
+
const container = props.container;
|
|
76
|
+
container?.addEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
75
77
|
return () => {
|
|
76
78
|
document.removeEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
79
|
+
container?.removeEventListener(PROCAPTCHA_EXECUTE_EVENT, handleExecuteEvent);
|
|
77
80
|
};
|
|
78
|
-
}, [
|
|
81
|
+
}, [
|
|
82
|
+
state.challenge,
|
|
83
|
+
updateState,
|
|
84
|
+
props.container
|
|
85
|
+
]);
|
|
79
86
|
const honeypot = frictionlessState?.hp ? /* @__PURE__ */ jsx(Honeypot, {
|
|
80
87
|
ref: hpRef,
|
|
81
88
|
encodedQuestion: frictionlessState.hp
|
|
82
89
|
}) : null;
|
|
83
90
|
if (config.mode === "invisible") return /* @__PURE__ */ jsxs(Fragment, { children: [honeypot, /* @__PURE__ */ jsx(ModalComponent, {
|
|
84
91
|
show: state.showModal,
|
|
92
|
+
placement: config.placement,
|
|
93
|
+
anchor: props.container,
|
|
94
|
+
onDismiss: manager.current.cancel,
|
|
85
95
|
children: state.challenge ? /* @__PURE__ */ jsx(CaptchaComponent, {
|
|
86
96
|
challenge: state.challenge,
|
|
87
97
|
index: state.index,
|
|
@@ -100,6 +110,9 @@ var ProcaptchaWidget = (props) => {
|
|
|
100
110
|
honeypot,
|
|
101
111
|
/* @__PURE__ */ jsx(ModalComponent, {
|
|
102
112
|
show: state.showModal,
|
|
113
|
+
placement: config.placement,
|
|
114
|
+
anchor: props.container,
|
|
115
|
+
onDismiss: manager.current.cancel,
|
|
103
116
|
children: state.challenge ? /* @__PURE__ */ jsx(CaptchaComponent, {
|
|
104
117
|
challenge: state.challenge,
|
|
105
118
|
index: state.index,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProcaptchaWidget.js","s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,IAAI,CAAC,CAAC;oBAEjB,IAAI,CAAC,GAAG,CAAC,CAAC;oBACV,IAAI,CAAC,GAAG,CAAC,CAAC;oBAKV,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;oBACtC,IAAI,SAAS,IAAI,WAAW,IAAI,SAAS,IAAI,WAAW,EAAE,CAAC;wBAC1D,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC;wBACxB,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC;oBACzB,CAAC;oBAED,aAAa,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;oBACjC,IAAI,CAAC;wBACJ,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACnC,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;wBAIhB,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;oBACtD,CAAC;4BAAS,CAAC;wBAGV,UAAU,CAAC,KAAK,CAAC,CAAC;oBACnB,CAAC;gBACF,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.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,23 +32,23 @@
|
|
|
32
32
|
},
|
|
33
33
|
"browserslist": ["> 0.5%, last 2 versions, not dead"],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@prosopo/common": "3.1.
|
|
36
|
-
"@prosopo/locale": "3.4.
|
|
37
|
-
"@prosopo/procaptcha": "2.11.
|
|
38
|
-
"@prosopo/procaptcha-common": "2.
|
|
39
|
-
"@prosopo/types": "5.
|
|
40
|
-
"@prosopo/util": "3.3.
|
|
41
|
-
"@prosopo/widget-skeleton": "2.8.
|
|
35
|
+
"@prosopo/common": "3.1.54",
|
|
36
|
+
"@prosopo/locale": "3.4.1",
|
|
37
|
+
"@prosopo/procaptcha": "2.11.7",
|
|
38
|
+
"@prosopo/procaptcha-common": "2.13.0",
|
|
39
|
+
"@prosopo/types": "5.7.0",
|
|
40
|
+
"@prosopo/util": "3.3.9",
|
|
41
|
+
"@prosopo/widget-skeleton": "2.8.7",
|
|
42
42
|
"csstype": "3.2.3",
|
|
43
43
|
"react": "19.2.8",
|
|
44
44
|
"react-dom": "19.2.8"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@emotion/react": "11.14.0",
|
|
48
|
-
"@prosopo/config": "3.3.
|
|
48
|
+
"@prosopo/config": "3.3.14",
|
|
49
49
|
"@types/node": "22.10.2",
|
|
50
50
|
"@types/react-dom": "19.2.5",
|
|
51
|
-
"@vitest/coverage-v8": "4.1.
|
|
51
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
52
52
|
"concurrently": "9.0.1",
|
|
53
53
|
"del-cli": "6.0.0",
|
|
54
54
|
"jsdom": "26.1.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"tsx": "4.20.3",
|
|
58
58
|
"typescript": "5.6.2",
|
|
59
59
|
"vite": "8.1.5",
|
|
60
|
-
"vitest": "4.1.
|
|
60
|
+
"vitest": "4.1.11"
|
|
61
61
|
},
|
|
62
62
|
"repository": {
|
|
63
63
|
"type": "git",
|