@prosopo/procaptcha-react 2.9.122 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.122 build:cjs
2
+ > @prosopo/procaptcha-react@2.10.1 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.54 kB │ gzip: 0.80 kB
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.29 kB │ gzip: 1.85 kB
62
+ dist/cjs/components/ProcaptchaWidget.cjs 6.70 kB │ gzip: 1.92 kB
63
63
 
64
- ✓ built in 78ms
64
+ ✓ built in 36ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.122 build:tsc
2
+ > @prosopo/procaptcha-react@2.10.1 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 10:39:54 PM - Projects in this build:
5
+ 8:02:14 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -22,41 +22,41 @@
22
22
  * ../procaptcha/tsconfig.json
23
23
  * tsconfig.json
24
24
 
25
- 10:39:54 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/NodejsPolarsNativeFilePlugin.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
25
+ 8:02:15 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/NodejsPolarsNativeFilePlugin.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
26
26
 
27
- 10:39:54 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
27
+ 8:02:15 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
28
28
 
29
- 10:39:54 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
29
+ 8:02:15 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
30
30
 
31
- 10:39:54 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/logger.ts' is older than output '../logger/tsconfig.tsbuildinfo'
31
+ 8:02:15 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
32
32
 
33
- 10:39:54 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
33
+ 8:02:15 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
34
34
 
35
- 10:39:54 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'
35
+ 8:02:15 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
- 10:39:54 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/utils/batches.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
37
+ 8:02:15 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
38
38
 
39
- 10:39:54 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
39
+ 8:02:15 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
40
40
 
41
- 10:39:54 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/tests/apiHarness.ts' is older than output '../api/tsconfig.tsbuildinfo'
41
+ 8:02:15 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
42
42
 
43
- 10:39:54 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/index.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
43
+ 8:02:15 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
- 10:39:54 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
45
+ 8:02:15 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
46
46
 
47
- 10:39:54 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
47
+ 8:02:15 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
48
48
 
49
- 10:39:54 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
49
+ 8:02:15 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
50
50
 
51
- 10:39:54 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/pair/decode.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
51
+ 8:02:15 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
52
52
 
53
- 10:39:55 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
53
+ 8:02:15 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/index.ts' is older than output '../account/tsconfig.tsbuildinfo'
54
54
 
55
- 10:39:55 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/simdReadings.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
55
+ 8:02:15 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/clientMetaData.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
56
56
 
57
- 10:39:55 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/index.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
57
+ 8:02:15 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
58
58
 
59
- 10:39:55 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
59
+ 8:02:15 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
60
60
 
61
- 10:39:55 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json'...
61
+ 8:02:15 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json'...
62
62
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.9.122 build
2
+ > @prosopo/procaptcha-react@2.10.1 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/procaptcha-react@2.9.122 build:cross-env
6
+ > @prosopo/procaptcha-react@2.10.1 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 1.26 kB │ gzip: 0.72 kB
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.53 kB │ gzip: 1.81 kB
66
+ dist/components/ProcaptchaWidget.js 5.95 kB │ gzip: 1.88 kB
67
67
 
68
- ✓ built in 77ms
68
+ ✓ built in 44ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @prosopo/procaptcha-react
2
2
 
3
+ ## 2.10.1
4
+ ### Patch Changes
5
+
6
+ - Updated dependencies [9e06d72]
7
+ - @prosopo/procaptcha@2.11.8
8
+
9
+ ## 2.10.0
10
+ ### Minor Changes
11
+
12
+ - d288371: Let a site choose where a challenge opens, and which button triggers it.
13
+
14
+ - `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.
15
+ - `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.
16
+ - `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.
17
+
18
+ Behaviour changes for existing widgets:
19
+
20
+ - 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.
21
+ - 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`.
22
+
23
+ `createConfig` takes a named options object.
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [6f57ee9]
28
+ - Updated dependencies [d288371]
29
+ - @prosopo/types@5.7.0
30
+ - @prosopo/util@3.3.9
31
+ - @prosopo/procaptcha-common@2.13.0
32
+ - @prosopo/common@3.1.54
33
+ - @prosopo/procaptcha@2.11.7
34
+
3
35
  ## 2.9.122
4
36
  ### Patch Changes
5
37
 
@@ -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
- var ModalInnerDivCSS = _emotion_react.css`
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
- const ModalOuterDivCss = {
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
- 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
- css: ModalInnerDivCSS,
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
- }), document.body);
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
- }, [state.challenge, updateState]);
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) => React.ReactPortal>;
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,KAA6B,MAAM,OAAO,CAAC;AAElD,KAAK,UAAU,GAAG;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAsBF,QAAA,MAAM,cAAc,oCAAsB,UAAU,uBAqBlD,CAAC;AAEH,eAAe,cAAc,CAAC"}
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"}
@@ -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
- var ModalInnerDivCSS = css`
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 createPortal(/* @__PURE__ */ jsx("div", {
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
- css: ModalInnerDivCSS,
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
- }), document.body);
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,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAMzC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;CA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9B,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,qDAkN/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
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
- }, [state.challenge, updateState]);
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","sourceRoot":"","sources":["../../src/components/ProcaptchaWidget.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,cAAc,EACd,aAAa,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAwB,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,MAAM,YAAY,CAAC;AAG/B,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAEtD,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAE,EAAE;IACnD,MAAM,E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O,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.9.122",
3
+ "version": "2.10.1",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -32,12 +32,12 @@
32
32
  },
33
33
  "browserslist": ["> 0.5%, last 2 versions, not dead"],
34
34
  "dependencies": {
35
- "@prosopo/common": "3.1.53",
35
+ "@prosopo/common": "3.1.54",
36
36
  "@prosopo/locale": "3.4.1",
37
- "@prosopo/procaptcha": "2.11.6",
38
- "@prosopo/procaptcha-common": "2.12.6",
39
- "@prosopo/types": "5.6.0",
40
- "@prosopo/util": "3.3.8",
37
+ "@prosopo/procaptcha": "2.11.8",
38
+ "@prosopo/procaptcha-common": "2.13.0",
39
+ "@prosopo/types": "5.7.0",
40
+ "@prosopo/util": "3.3.9",
41
41
  "@prosopo/widget-skeleton": "2.8.7",
42
42
  "csstype": "3.2.3",
43
43
  "react": "19.2.8",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@emotion/react": "11.14.0",
48
- "@prosopo/config": "3.3.13",
48
+ "@prosopo/config": "3.3.14",
49
49
  "@types/node": "22.10.2",
50
50
  "@types/react-dom": "19.2.5",
51
51
  "@vitest/coverage-v8": "4.1.11",