@prosopo/procaptcha-wrapper 2.6.126 → 2.7.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/procaptcha-wrapper@2.6.126 build:cjs
2
+ > @prosopo/procaptcha-wrapper@2.7.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: .
@@ -30,4 +30,4 @@ dist/cjs/index.cjs 0.32 kB │ gzip: 0.22 kB
30
30
  dist/cjs/render/renderer.cjs 0.60 kB │ gzip: 0.30 kB
31
31
  dist/cjs/render/renderFunction.cjs 1.07 kB │ gzip: 0.52 kB
32
32
 
33
- ✓ built in 84ms
33
+ ✓ built in 62ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/procaptcha-wrapper@2.6.126 build:tsc
2
+ > @prosopo/procaptcha-wrapper@2.7.0 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 10:39:11 PM - Projects in this build:
5
+ 1:15:03 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -10,17 +10,17 @@
10
10
  * ../types/tsconfig.json
11
11
  * tsconfig.json
12
12
 
13
- 10:39:11 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'
13
+ 1:15:03 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'
14
14
 
15
- 10:39:11 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
15
+ 1:15:03 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
16
16
 
17
- 10:39:11 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
17
+ 1:15:03 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
18
18
 
19
- 10:39:11 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'
19
+ 1:15:03 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'
20
20
 
21
- 10:39:11 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'
21
+ 1:15:03 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'
22
22
 
23
- 10:39:11 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
23
+ 1:15:03 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
24
24
 
25
- 10:39:11 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-wrapper/tsconfig.json'...
25
+ 1:15:03 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-wrapper/tsconfig.json'...
26
26
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/procaptcha-wrapper@2.6.126 build
2
+ > @prosopo/procaptcha-wrapper@2.7.0 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/procaptcha-wrapper@2.6.126 build:cross-env
6
+ > @prosopo/procaptcha-wrapper@2.7.0 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -16,7 +16,6 @@ ViteEsmConfig: .
16
16
  ]
17
17
  }
18
18
  {
19
- The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
20
19
  externals: [
21
20
  '@prosopo/types',
22
21
  '@prosopo/locale',
@@ -24,6 +23,7 @@ ViteEsmConfig: .
24
23
  '@prosopo/util-crypto'
25
24
  ]
26
25
  }
26
+ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
27
27
  vite v8.1.5 building ssr environment for production...
28
28
  Bundle build started
29
29
  
@@ -35,4 +35,4 @@ dist/index.js 0.29 kB │ gzip: 0.20 kB
35
35
  dist/render/renderer.js 0.56 kB │ gzip: 0.29 kB
36
36
  dist/render/renderFunction.js 1.03 kB │ gzip: 0.51 kB
37
37
 
38
- ✓ built in 136ms
38
+ ✓ built in 186ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @prosopo/procaptcha-wrapper
2
2
 
3
+ ## 2.7.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
+
3
25
  ## 2.6.126
4
26
  ### Patch Changes
5
27
 
@@ -31,6 +31,14 @@ describe("re-exported types", () => {
31
31
  expectTypeOf().toEqualTypeOf();
32
32
  expectTypeOf().toEqualTypeOf();
33
33
  });
34
+ it("carries the placement and bind options through to consumers", () => {
35
+ assertType({ siteKey: "k", placement: "float" });
36
+ assertType({ siteKey: "k", placement: "popup" });
37
+ assertType({ siteKey: "k", bind: "#submit" });
38
+ });
39
+ it("rejects a placement outside the union", () => {
40
+ assertType({ siteKey: "k", placement: "inline" });
41
+ });
34
42
  it("exports the language union as a usable type", () => {
35
43
  expectTypeOf().toEqualTypeOf();
36
44
  assertType("en");
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.test-d.js","sourceRoot":"","sources":["../../src/tests/renderer.test-d.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAMhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAEN,kBAAkB,EAClB,UAAU,GACV,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGN,cAAc,GACd,MAAM,uBAAuB,CAAC;AAK/B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;QAC7D,YAAY,EAAoB,CAAC,UAAU,CAAC,aAAa,EAEtD,CAAC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E,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAE/D,UAAU,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QAGzC,YAAY,EAA4B,CAAC,aAAa,EAEnD,CAAC;IACL,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha-wrapper",
3
- "version": "2.6.126",
3
+ "version": "2.7.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": "^24",
@@ -27,11 +27,11 @@
27
27
  "test:coverage": "NODE_ENV=${NODE_ENV:-test}; npx vitest run --coverage --config ./vite.test.config.ts"
28
28
  },
29
29
  "dependencies": {
30
- "@prosopo/types": "5.6.0",
30
+ "@prosopo/types": "5.7.0",
31
31
  "@prosopo/locale": "3.4.1"
32
32
  },
33
33
  "devDependencies": {
34
- "@prosopo/config": "3.3.13",
34
+ "@prosopo/config": "3.3.14",
35
35
  "@types/jsdom": "30.0.0",
36
36
  "@types/node": "22.10.2",
37
37
  "@vitest/coverage-v8": "4.1.11",
@@ -80,6 +80,17 @@ describe("re-exported types", () => {
80
80
  expectTypeOf<ExportedRenderOptions>().toEqualTypeOf<ProcaptchaRenderOptions>();
81
81
  });
82
82
 
83
+ it("carries the placement and bind options through to consumers", () => {
84
+ assertType<ExportedRenderOptions>({ siteKey: "k", placement: "float" });
85
+ assertType<ExportedRenderOptions>({ siteKey: "k", placement: "popup" });
86
+ assertType<ExportedRenderOptions>({ siteKey: "k", bind: "#submit" });
87
+ });
88
+
89
+ it("rejects a placement outside the union", () => {
90
+ // @ts-expect-error inline is not a supported placement
91
+ assertType<ExportedRenderOptions>({ siteKey: "k", placement: "inline" });
92
+ });
93
+
83
94
  it("exports the language union as a usable type", () => {
84
95
  // `Languages` is a const object with no type meaning, so re-exporting the
85
96
  // name as a type produced a binding consumers could not use at all.