@prosopo/procaptcha-frictionless 2.12.19 → 2.12.20

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-frictionless@2.12.19 build:cjs
2
+ > @prosopo/procaptcha-frictionless@2.12.20 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -62,5 +62,5 @@ rendering chunks...
62
62
  dist/cjs/sessionInvalidatedRecovery.cjs 0.85 kB
63
63
  dist/cjs/detectorLoader.cjs 1.37 kB
64
64
  dist/cjs/customDetectBot.cjs 4.58 kB
65
- dist/cjs/ProcaptchaFrictionless.cjs 8.96 kB
66
- ✓ built in 112ms
65
+ dist/cjs/ProcaptchaFrictionless.cjs 9.07 kB
66
+ ✓ built in 142ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/procaptcha-frictionless@2.12.19 build:tsc
2
+ > @prosopo/procaptcha-frictionless@2.12.20 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 8:38:33 AM - Projects in this build:
5
+ 12:17:54 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -26,49 +26,49 @@
26
26
  * ../procaptcha-react/tsconfig.json
27
27
  * tsconfig.json
28
28
 
29
- 8:38:33 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/index.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
29
+ 12:17:54 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/index.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
30
30
 
31
- 8:38:33 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
31
+ 12:17:54 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
32
32
 
33
- 8:38:33 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
33
+ 12:17:54 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
34
34
 
35
- 8:38:33 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
35
+ 12:17: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'
36
36
 
37
- 8:38:33 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/keyring/keyring/types.ts' is older than output '../types/tsconfig.tsbuildinfo'
37
+ 12:17:55 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
38
38
 
39
- 8:38:33 AM - Project '../detector/tsconfig.json' is up to date because newest input '../detector/src/index.js' is older than output '../detector/tsconfig.tsbuildinfo'
39
+ 12:17:55 PM - Project '../detector/tsconfig.json' is up to date because newest input '../detector/src/index.js' is older than output '../detector/tsconfig.tsbuildinfo'
40
40
 
41
- 8:38:33 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
41
+ 12:17:55 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
- 8:38:33 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
43
+ 12:17:55 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
44
44
 
45
- 8:38:33 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
45
+ 12:17:55 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
46
46
 
47
- 8:38:33 AM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/sources/webgl.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
47
+ 12:17:55 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
- 8:38:33 AM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
49
+ 12:17:55 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
- 8:38:33 AM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/tests/providers.unit.test.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
51
+ 12:17:55 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'
52
52
 
53
- 8:38:33 AM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/webComponent/createWidget.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
53
+ 12:17:55 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'
54
54
 
55
- 8:38:33 AM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
55
+ 12:17:55 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
56
56
 
57
- 8:38:34 AM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/custom.d.ts' is older than output '../account/tsconfig.tsbuildinfo'
57
+ 12:17: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'
58
58
 
59
- 8:38:34 AM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/reactComponents/Honeypot.tsx' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
59
+ 12:17:55 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/reactComponents/Honeypot.tsx' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
60
60
 
61
- 8:38:34 AM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/index.ts' is older than output '../procaptcha-pow/tsconfig.tsbuildinfo'
61
+ 12:17:55 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/index.ts' is older than output '../procaptcha-pow/tsconfig.tsbuildinfo'
62
62
 
63
- 8:38:34 AM - 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'
63
+ 12:17:55 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'
64
64
 
65
- 8:38:34 AM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
65
+ 12:17:55 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
66
66
 
67
- 8:38:34 AM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
67
+ 12:17:55 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
68
68
 
69
- 8:38:34 AM - 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'
69
+ 12:17:55 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'
70
70
 
71
- 8:38:34 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
71
+ 12:17:55 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
72
72
 
73
- 8:38:34 AM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
73
+ 12:17:55 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-frictionless/tsconfig.json'...
74
74
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/procaptcha-frictionless@2.12.19 build
2
+ > @prosopo/procaptcha-frictionless@2.12.20 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/procaptcha-frictionless@2.12.19 build:cross-env
6
+ > @prosopo/procaptcha-frictionless@2.12.20 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -65,5 +65,5 @@ rendering chunks...
65
65
  dist/detectorLoader.js 0.11 kB
66
66
  dist/sessionInvalidatedRecovery.js 0.71 kB
67
67
  dist/customDetectBot.js 4.37 kB
68
- dist/ProcaptchaFrictionless.js 7.52 kB
69
- ✓ built in 194ms
68
+ dist/ProcaptchaFrictionless.js 7.62 kB
69
+ ✓ built in 246ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @prosopo/procaptcha-frictionless
2
2
 
3
+ ## 2.12.20
4
+ ### Patch Changes
5
+
6
+ - b9ca0e7: feat(decision-machine): thread puzzle fields and forward checkbox coords on escalation
7
+
8
+ - Add optional `coords` and `puzzleEvents` to `DecisionMachineInput` so decision machines can gate on entry-point telemetry and puzzle drag trails.
9
+ - Populate `coords` on the pow, puzzle and image `decide()` inputs. Puzzle also passes `puzzleEvents`. Image gains `behavioralDataPacked` / `deviceCapability` — previously always undefined, which silently disabled the global synthetic-mouse-timing check on the one captcha type it targets.
10
+ - Extend `ProcaptchaEscalationHandler` with an optional `coords` argument so the PoW widget can forward its trusted checkbox click through the PoW→image/puzzle escalation. The frictionless wrapper prefers escalation coords over pending retry coords. Puzzle and image widgets already accept `startCoords`, so the escalated widget now seeds the salt with the real (x, y) instead of (0, 0).
11
+ - Updated dependencies [b9ca0e7]
12
+ - Updated dependencies [fde6896]
13
+ - @prosopo/types@4.9.11
14
+ - @prosopo/procaptcha-pow@2.10.22
15
+ - @prosopo/common@3.1.47
16
+ - @prosopo/api@3.5.18
17
+ - @prosopo/detector@3.5.12
18
+ - @prosopo/procaptcha-common@2.11.16
19
+ - @prosopo/procaptcha-puzzle@2.10.38
20
+ - @prosopo/procaptcha-react@2.9.95
21
+
3
22
  ## 2.12.19
4
23
  ### Patch Changes
5
24
 
@@ -1 +1 @@
1
- {"version":3,"file":"ProcaptchaFrictionless.d.ts","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAKN,KAAK,2BAA2B,EAChC,MAAM,gBAAgB,CAAC;AA0DxB,eAAO,MAAM,sBAAsB,gEAOhC,2BAA2B,4CAkR7B,CAAC"}
1
+ {"version":3,"file":"ProcaptchaFrictionless.d.ts","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAKN,KAAK,2BAA2B,EAChC,MAAM,gBAAgB,CAAC;AA0DxB,eAAO,MAAM,sBAAsB,gEAOhC,2BAA2B,4CAwR7B,CAAC"}
@@ -93,15 +93,16 @@ const ProcaptchaFrictionless = ({
93
93
  restart();
94
94
  }, 1e4);
95
95
  };
96
- const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false) => {
97
- const onEscalate = (next, newSessionId) => {
96
+ const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false, escalationCoords) => {
97
+ const onEscalate = (next, newSessionId, coords) => {
98
98
  void renderForCaptchaType(
99
99
  next,
100
100
  {
101
101
  ...frictionlessState,
102
102
  sessionId: newSessionId
103
103
  },
104
- true
104
+ true,
105
+ coords
105
106
  );
106
107
  };
107
108
  const onSessionInvalidated = (x, y) => {
@@ -115,10 +116,8 @@ const ProcaptchaFrictionless = ({
115
116
  resetState(0);
116
117
  void start();
117
118
  };
118
- const { autoStart: resumedAutoStart, startCoords } = consumeRetryMountProps(
119
- pendingRetryCoordsRef,
120
- autoStart
121
- );
119
+ const { autoStart: resumedAutoStart, startCoords: retryStartCoords } = consumeRetryMountProps(pendingRetryCoordsRef, autoStart);
120
+ const startCoords = escalationCoords ?? retryStartCoords;
122
121
  if (captchaType === CaptchaType.image) {
123
122
  const Procaptcha = await ProcaptchaLoader();
124
123
  setComponentToRender(
@@ -1 +1 @@
1
- {"version":3,"file":"ProcaptchaFrictionless.js","sourceRoot":"","sources":["../src/ProcaptchaFrictionless.tsx"],"names":[],"mappings":";AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACN,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,WAAW,EAGX,sBAAsB,GAEtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAEN,sBAAsB,EACtB,wBAAwB,GACxB,MAAM,iCAAiC,CAAC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EAAE;QACd,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,IAAI,MAAM,CAAC,QAAQ,IAAI,EAAE,IACpE,MAAM,CAAC,IAAI,IAAI,EAChB,EAAE,CAAC;QACH,IAAI,gBAAgB,CAAC,OAAO,KAAK,GAAG;YAAE,OAAO;QAC7C,gBAAgB,CAAC,OAAO,GAAG,GAAG,CAAC;QAC/B,KAAK,KAAK,EAAE,CAAC;IACd,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAE5D,OAAO,CACN,8BACC,KAAC,cAAc,IAAC,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,GAAI,EACzD,iBAAiB,IAChB,CACH,CAAC;AACH,CAAC,CAAC"}
@@ -117,15 +117,16 @@ const ProcaptchaFrictionless = ({
117
117
  restart();
118
118
  }, 1e4);
119
119
  };
120
- const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false) => {
121
- const onEscalate = (next, newSessionId) => {
120
+ const renderForCaptchaType = async (captchaType, frictionlessState, autoStart = false, escalationCoords) => {
121
+ const onEscalate = (next, newSessionId, coords) => {
122
122
  void renderForCaptchaType(
123
123
  next,
124
124
  {
125
125
  ...frictionlessState,
126
126
  sessionId: newSessionId
127
127
  },
128
- true
128
+ true,
129
+ coords
129
130
  );
130
131
  };
131
132
  const onSessionInvalidated = (x, y) => {
@@ -139,10 +140,8 @@ const ProcaptchaFrictionless = ({
139
140
  resetState(0);
140
141
  void start();
141
142
  };
142
- const { autoStart: resumedAutoStart, startCoords } = sessionInvalidatedRecovery.consumeRetryMountProps(
143
- pendingRetryCoordsRef,
144
- autoStart
145
- );
143
+ const { autoStart: resumedAutoStart, startCoords: retryStartCoords } = sessionInvalidatedRecovery.consumeRetryMountProps(pendingRetryCoordsRef, autoStart);
144
+ const startCoords = escalationCoords ?? retryStartCoords;
146
145
  if (captchaType === types.CaptchaType.image) {
147
146
  const Procaptcha = await ProcaptchaLoader();
148
147
  setComponentToRender(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-frictionless",
3
- "version": "2.12.19",
3
+ "version": "2.12.20",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -30,15 +30,15 @@
30
30
  },
31
31
  "browserslist": ["> 0.5%, last 2 versions, not dead"],
32
32
  "dependencies": {
33
- "@prosopo/api": "3.5.17",
34
- "@prosopo/common": "3.1.46",
35
- "@prosopo/detector": "3.5.11",
33
+ "@prosopo/api": "3.5.18",
34
+ "@prosopo/common": "3.1.47",
35
+ "@prosopo/detector": "3.5.12",
36
36
  "@prosopo/locale": "3.2.7",
37
- "@prosopo/procaptcha-common": "2.11.15",
38
- "@prosopo/procaptcha-pow": "2.10.21",
39
- "@prosopo/procaptcha-puzzle": "2.10.37",
40
- "@prosopo/procaptcha-react": "2.9.94",
41
- "@prosopo/types": "4.9.10",
37
+ "@prosopo/procaptcha-common": "2.11.16",
38
+ "@prosopo/procaptcha-pow": "2.10.22",
39
+ "@prosopo/procaptcha-puzzle": "2.10.38",
40
+ "@prosopo/procaptcha-react": "2.9.95",
41
+ "@prosopo/types": "4.9.11",
42
42
  "@prosopo/widget-skeleton": "2.8.4",
43
43
  "dotenv": "16.4.5",
44
44
  "react": "18.3.1"
@@ -175,10 +175,12 @@ export const ProcaptchaFrictionless = ({
175
175
  captchaType: string,
176
176
  frictionlessState: FrictionlessState,
177
177
  autoStart = false,
178
+ escalationCoords?: RetryCoords,
178
179
  ) => {
179
180
  const onEscalate = (
180
181
  next: CaptchaType.image | CaptchaType.puzzle,
181
182
  newSessionId: string,
183
+ coords?: RetryCoords,
182
184
  ) => {
183
185
  void renderForCaptchaType(
184
186
  next,
@@ -187,6 +189,7 @@ export const ProcaptchaFrictionless = ({
187
189
  sessionId: newSessionId,
188
190
  },
189
191
  true,
192
+ coords,
190
193
  );
191
194
  };
192
195
 
@@ -214,10 +217,13 @@ export const ProcaptchaFrictionless = ({
214
217
  // Consume any pending retry coords now — the resumed widget owns them
215
218
  // for exactly one auto-fired `manager.start(x, y)`. Cleared so a
216
219
  // subsequent escalation/re-render doesn't accidentally re-inject.
217
- const { autoStart: resumedAutoStart, startCoords } = consumeRetryMountProps(
218
- pendingRetryCoordsRef,
219
- autoStart,
220
- );
220
+ // Escalation coords (from a PoW→image/puzzle handoff) take precedence
221
+ // over pending retry coords when both are present, because escalation
222
+ // is the current transition and the pending retry belongs to a prior
223
+ // widget instance that never got to consume them.
224
+ const { autoStart: resumedAutoStart, startCoords: retryStartCoords } =
225
+ consumeRetryMountProps(pendingRetryCoordsRef, autoStart);
226
+ const startCoords = escalationCoords ?? retryStartCoords;
221
227
 
222
228
  if (captchaType === CaptchaType.image) {
223
229
  const Procaptcha = await ProcaptchaLoader();