@prosopo/procaptcha-react 2.12.0 → 2.13.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.
Files changed (31) hide show
  1. package/.turbo/turbo-build$colon$cjs.log +8 -8
  2. package/.turbo/turbo-build$colon$tsc.log +22 -22
  3. package/.turbo/turbo-build.log +9 -9
  4. package/CHANGELOG.md +38 -0
  5. package/dist/cjs/components/button.cjs +4 -6
  6. package/dist/cjs/components/captchaComponent.cjs +41 -26
  7. package/dist/cjs/components/captchaWidget.cjs +30 -23
  8. package/dist/cjs/components/modal.cjs +7 -3
  9. package/dist/components/button.d.ts.map +1 -1
  10. package/dist/components/button.js +5 -7
  11. package/dist/components/button.js.map +1 -1
  12. package/dist/components/captchaComponent.d.ts.map +1 -1
  13. package/dist/components/captchaComponent.js +43 -28
  14. package/dist/components/captchaComponent.js.map +1 -1
  15. package/dist/components/captchaWidget.d.ts.map +1 -1
  16. package/dist/components/captchaWidget.js +32 -25
  17. package/dist/components/captchaWidget.js.map +1 -1
  18. package/dist/components/modal.d.ts.map +1 -1
  19. package/dist/components/modal.js +8 -4
  20. package/dist/components/modal.js.map +1 -1
  21. package/dist/tests/button.unit.test.js +32 -3
  22. package/dist/tests/button.unit.test.js.map +1 -1
  23. package/dist/tests/captchaComponent.unit.test.js +4 -4
  24. package/dist/tests/captchaComponent.unit.test.js.map +1 -1
  25. package/dist/tests/captchaWidget.unit.test.js +76 -9
  26. package/dist/tests/captchaWidget.unit.test.js.map +1 -1
  27. package/dist/tests/modal.unit.test.js +26 -10
  28. package/dist/tests/modal.unit.test.js.map +1 -1
  29. package/dist/tests/procaptchaWidget.unit.test.js +10 -8
  30. package/dist/tests/procaptchaWidget.unit.test.js.map +1 -1
  31. package/package.json +8 -8
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.12.0 build:cjs
2
+ > @prosopo/procaptcha-react@2.13.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: .
@@ -7,8 +7,8 @@ ViteCommonJSConfig: .
7
7
  tsConfigPaths: [
8
8
  '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
9
9
  '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
10
- '/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
11
10
  '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
11
+ '/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
12
12
  '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
13
13
  '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
14
14
  '/home/runner/work/captcha/captcha/packages/procaptcha/tsconfig.json',
@@ -27,8 +27,8 @@ ViteCommonJSConfig: .
27
27
  externals: [
28
28
  '@prosopo/common',
29
29
  '@prosopo/locale',
30
- '@prosopo/logger',
31
30
  '@prosopo/util',
31
+ '@prosopo/logger',
32
32
  '@prosopo/types',
33
33
  '@prosopo/util-crypto',
34
34
  '@prosopo/procaptcha',
@@ -54,11 +54,11 @@ dist/cjs/util/index.cjs 0.56 kB │ gzip: 0.35 kB
54
54
  dist/cjs/components/procaptcha.cjs 0.75 kB │ gzip: 0.41 kB
55
55
  dist/cjs/components/index.cjs 0.89 kB │ gzip: 0.22 kB
56
56
  dist/cjs/index.cjs 1.04 kB │ gzip: 0.28 kB
57
- dist/cjs/components/modal.cjs 1.10 kB │ gzip: 0.55 kB
57
+ dist/cjs/components/modal.cjs 1.39 kB │ gzip: 0.64 kB
58
58
  dist/cjs/components/collector.cjs 1.53 kB │ gzip: 0.68 kB
59
- dist/cjs/components/button.cjs 3.31 kB │ gzip: 1.23 kB
59
+ dist/cjs/components/button.cjs 3.22 kB │ gzip: 1.21 kB
60
60
  dist/cjs/components/procaptchaWidget.cjs 6.33 kB │ gzip: 2.06 kB
61
- dist/cjs/components/captchaWidget.cjs 6.47 kB │ gzip: 2.29 kB
62
- dist/cjs/components/captchaComponent.cjs 7.25 kB │ gzip: 1.89 kB
61
+ dist/cjs/components/captchaWidget.cjs 7.05 kB │ gzip: 2.48 kB
62
+ dist/cjs/components/captchaComponent.cjs 8.29 kB │ gzip: 2.17 kB
63
63
 
64
- ✓ built in 48ms
64
+ ✓ built in 53ms
@@ -1,11 +1,11 @@
1
1
 
2
- > @prosopo/procaptcha-react@2.12.0 build:tsc
2
+ > @prosopo/procaptcha-react@2.13.0 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 11:04:34 AM - Projects in this build:
5
+ 3:28:58 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
- * ../locale/tsconfig.json
8
7
  * ../util/tsconfig.json
8
+ * ../locale/tsconfig.json
9
9
  * ../logger/tsconfig.json
10
10
  * ../util-crypto/tsconfig.json
11
11
  * ../types/tsconfig.json
@@ -22,41 +22,41 @@
22
22
  * ../procaptcha/tsconfig.json
23
23
  * tsconfig.json
24
24
 
25
- 11:04:34 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/vite/NodejsPolarsDirnamePlugin.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
25
+ 3:28:58 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
- 11:04:34 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/tsconfig.tsbuildinfo'
27
+ 3:28:58 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
28
28
 
29
- 11:04:34 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/ofLen.ts' is older than output '../util/tsconfig.tsbuildinfo'
29
+ 3:28:58 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
30
30
 
31
- 11:04:34 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
31
+ 3:28:58 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/logger.ts' is older than output '../logger/tsconfig.tsbuildinfo'
32
32
 
33
- 11:04:34 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'
33
+ 3:28:58 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
- 11:04:34 AM - 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
+ 3:28:58 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
- 11:04:34 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/utils/batches.ts' is older than output '../common/tsconfig.tsbuildinfo'
37
+ 3:28:58 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
- 11:04:34 AM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/index.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
39
+ 3:28:58 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
- 11:04:34 AM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
41
+ 3:28:58 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
- 11:04:34 AM - 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'
43
+ 3:28:58 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/tests/productionProviderList.unit.test.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
44
44
 
45
- 11:04:34 AM - 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'
45
+ 3:28:58 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/theme.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
46
46
 
47
- 11:04:34 AM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/async.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
47
+ 3:28:58 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
- 11:04:34 AM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
49
+ 3:28:58 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
- 11:04:34 AM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/keyring/keyring.test.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
51
+ 3:28:58 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
- 11:04: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'
53
+ 3:28:58 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
- 11:04:34 AM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/tests/challengeSurfaceRender.unit.test.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
55
+ 3:28:58 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/extensionLoader.ts' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
56
56
 
57
- 11:04: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'
57
+ 3:28:58 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
- 11:04:34 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
59
+ 3:28:58 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
60
60
 
61
- 11:04:34 AM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-react/tsconfig.json'...
61
+ 3:28:58 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.12.0 build
2
+ > @prosopo/procaptcha-react@2.13.0 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/procaptcha-react@2.12.0 build:cross-env
6
+ > @prosopo/procaptcha-react@2.13.0 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -11,8 +11,8 @@ ViteEsmConfig: .
11
11
  tsConfigPaths: [
12
12
  '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
13
13
  '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
14
- '/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
15
14
  '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
15
+ '/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
16
16
  '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
17
17
  '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
18
18
  '/home/runner/work/captcha/captcha/packages/procaptcha/tsconfig.json',
@@ -31,8 +31,8 @@ ViteEsmConfig: .
31
31
  externals: [
32
32
  '@prosopo/common',
33
33
  '@prosopo/locale',
34
- '@prosopo/logger',
35
34
  '@prosopo/util',
35
+ '@prosopo/logger',
36
36
  '@prosopo/types',
37
37
  '@prosopo/util-crypto',
38
38
  '@prosopo/procaptcha',
@@ -59,11 +59,11 @@ dist/components/index.js 0.53 kB │ gzip: 0.19 kB
59
59
  dist/util/index.js 0.56 kB │ gzip: 0.35 kB
60
60
  dist/index.js 0.65 kB │ gzip: 0.21 kB
61
61
  dist/components/procaptcha.js 0.68 kB │ gzip: 0.38 kB
62
- dist/components/modal.js 1.01 kB │ gzip: 0.53 kB
62
+ dist/components/modal.js 1.22 kB │ gzip: 0.61 kB
63
63
  dist/components/collector.js 1.44 kB │ gzip: 0.66 kB
64
- dist/components/button.js 3.07 kB │ gzip: 1.21 kB
65
- dist/components/captchaWidget.js 5.98 kB │ gzip: 2.27 kB
64
+ dist/components/button.js 2.99 kB │ gzip: 1.19 kB
66
65
  dist/components/procaptchaWidget.js 6.00 kB │ gzip: 2.05 kB
67
- dist/components/captchaComponent.js 6.34 kB │ gzip: 1.85 kB
66
+ dist/components/captchaWidget.js 6.48 kB │ gzip: 2.45 kB
67
+ dist/components/captchaComponent.js 7.28 kB │ gzip: 2.13 kB
68
68
 
69
- ✓ built in 45ms
69
+ ✓ built in 33ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @prosopo/procaptcha-react
2
2
 
3
+ ## 2.13.0
4
+ ### Minor Changes
5
+
6
+ - 5e5fb9e: Give the image challenge dialog different class names, a different DOM shape, different element types for its controls and slightly different spacing on every page load, so a solver script cannot hardcode a way to find or click anything inside it.
7
+
8
+ This is the same treatment the checkbox got. Until now the dialog was identical for every user, forever: the panel was always `.prosopo-modalInner` inside `.prosopo-modalOuter` inside `.prosopo-challenge-content`, every tile and every action was a `<button>`, the grid gap was always 10px, and the whole thing sat at the same offsets. The end-to-end suite was itself finding the images by climbing four parents and stepping sideways from the instruction line — which is the clearest possible evidence that the markup was a reliable handle.
9
+
10
+ Four things now change, all drawn fresh each time a challenge mounts:
11
+
12
+ - **The names.** Every class the dialog renders — the two modal layers, the challenge surface and its panel, the reload control — is an 8-character token drawn at mount. Selectors scraped from one page load are dead on the next. The challenge surface is shared with the puzzle, so the puzzle gets this too. Nothing in the widget's own CSS referenced these names, but a site that had written its own rules against `.prosopo-modalOuter`, `.prosopo-modalInner`, `.prosopo-challenge-content` or `.reload-button` will find they no longer match. `image-captcha` on the widget root stays fixed, as `prosopo-checkbox` did, because that one sits in the embedding page's light DOM.
13
+ - **The shape.** The panel, the header, the grid, the action row, each action and each tile sit inside a random number of randomly named `div` or `span` wrappers. The wrappers are `display: contents`, so they generate no boxes and cannot move anything: depth varies, layout does not. Only elements with no accessible role are used, so nothing new is announced to a screen reader.
14
+ - **The element each control is made of.** Every tile and every action is now randomly either a real `<button>` or a `<div role="button" tabindex="0">`, so `button` no longer finds them all. The generic variant is given by hand what the button gave for free: it is in the tab order, it activates on Enter and on Space, Space does not scroll the dialog, and it carries the same `aria-pressed` state. The surface's focus trap already matched `[tabindex]:not([tabindex="-1"])`, so both variants are trapped and tabbable alike.
15
+ - **The spacing.** The grid gap, the grid's and the header's padding, the action row's padding and the panel's own margins are each nudged a few pixels, so tile centres are not where they were last time. Each of these changes the panel's size rather than moving the panel, so the surface still centres it and a panel taller than the viewport still scrolls to its own edges. The tile and action widths are now derived from the gap they were drawn with — three columns fit only if each cell gives up two thirds of a gap, and the old hardcoded basis would have wrapped the row at the wide end of the range.
16
+
17
+ Three related fixes come with it:
18
+
19
+ - The tick badge on a selected tile was shipping `data-testid="CheckIcon"` to production, plus an `aria-label` on an `aria-hidden` element that nothing could ever read and a stray `color="#fff"` attribute. All three are gone.
20
+ - The reload button acted on any click, including one a script dispatched. It now takes the same trusted-event gate every other control in the widget has.
21
+ - The end-to-end suite no longer depends on the markup at all. It uses `data-cy` hooks — the instruction line, the challenge panel, the round, the reload control — that are withheld from production builds, exactly as the checkbox withholds `captcha-checkbox`.
22
+
23
+ Note what this does not do. The dialog still says it is a dialog, the tiles still expose the button role and their pressed state, and the images still carry alt text. A script that looks for what these things mean rather than what they are called will still find them. That is the price of the challenge being usable with a screen reader, and it is the right price; the point here is to kill the cheap selector, not to claim the dialog is unfindable.
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [94929c3]
28
+ - Updated dependencies [a9141c3]
29
+ - Updated dependencies [a9141c3]
30
+ - Updated dependencies [a9141c3]
31
+ - Updated dependencies [e180281]
32
+ - Updated dependencies [5e5fb9e]
33
+ - @prosopo/procaptcha-common@2.17.0
34
+ - @prosopo/locale@3.6.0
35
+ - @prosopo/common@3.1.59
36
+ - @prosopo/types@5.10.0
37
+ - @prosopo/util@3.3.11
38
+ - @prosopo/widget-skeleton@2.9.0
39
+ - @prosopo/procaptcha@2.11.18
40
+
3
41
  ## 2.12.0
4
42
  ### Minor Changes
5
43
 
@@ -27,7 +27,10 @@ var mountButton = (container, initialProps) => {
27
27
  let props = initialProps;
28
28
  let hover = false;
29
29
  let focusVisible = false;
30
- const button = (0, _prosopo_procaptcha_common.createElement)("button");
30
+ const button = (0, _prosopo_procaptcha_common.createControl)(teardown, { onActivate: (event) => {
31
+ event.preventDefault();
32
+ props.onClick();
33
+ } });
31
34
  const buttonStyle = () => {
32
35
  const theme = "light" === props.themeColor ? _prosopo_widget_skeleton.lightTheme : _prosopo_widget_skeleton.darkTheme;
33
36
  const baseStyle = {
@@ -78,11 +81,6 @@ var mountButton = (container, initialProps) => {
78
81
  focusVisible = false;
79
82
  render();
80
83
  });
81
- teardown.addEventListener(button, "click", (event) => {
82
- if (!(0, _prosopo_procaptcha_common.isEventTrusted)(event)) return;
83
- event.preventDefault();
84
- props.onClick();
85
- });
86
84
  render();
87
85
  container.appendChild(button);
88
86
  return {
@@ -34,11 +34,22 @@ var targetStyle = (theme) => ({
34
34
  color: theme.palette.titleAccent,
35
35
  fontWeight: 700
36
36
  });
37
- var columnStyle = {
37
+ var columnStyle = (gap) => ({
38
38
  position: "relative",
39
39
  flexGrow: 1,
40
- flexBasis: "calc(33.333% - 10px)"
41
- };
40
+ flexBasis: (0, _prosopo_procaptcha_common.threeColumnBasis)(gap)
41
+ });
42
+ var SPACING_JITTER = 4;
43
+ var MIN_CONTROL_GAP = 6;
44
+ var MAX_CONTROL_GAP = 14;
45
+ var HEADER_PADDING_Y = 12;
46
+ var HEADER_PADDING_X = 14;
47
+ var HEADER_PADDING_JITTER = 3;
48
+ var MIN_WRAPPER_DEPTH = 0;
49
+ var MAX_WRAPPER_DEPTH = 2;
50
+ var decoy = (element) => (0, _prosopo_procaptcha_common.wrapRandomly)(element, MIN_WRAPPER_DEPTH, MAX_WRAPPER_DEPTH);
51
+ /** A spacing token moved by a few pixels, never below zero. */
52
+ var jittered = (base, jitter = SPACING_JITTER) => Math.max(0, base + (0, _prosopo_widget_skeleton.randomInt)(-jitter, jitter));
42
53
  var mountCaptchaComponent = (container, initialProps) => {
43
54
  let props = initialProps;
44
55
  const themeOf = (themeColor) => "light" === themeColor ? _prosopo_widget_skeleton.lightTheme : _prosopo_widget_skeleton.darkTheme;
@@ -46,26 +57,29 @@ var mountCaptchaComponent = (container, initialProps) => {
46
57
  const currentSolution = () => (0, _prosopo_util.at)(props.solutions, props.index, { noWrap: true });
47
58
  const isLastRound = () => props.index >= props.challenge.captchas.length - 1;
48
59
  const theme = themeOf(props.themeColor);
49
- const doubleSpacing = `${theme.spacing.unit * 2}px`;
50
- const fullSpacing = `${theme.spacing.unit}px`;
60
+ const controlGap = (0, _prosopo_widget_skeleton.randomInt)(MIN_CONTROL_GAP, MAX_CONTROL_GAP);
61
+ const column = columnStyle(controlGap);
51
62
  const targetLabel = (0, _prosopo_procaptcha_common.createElement)("span", { style: targetStyle(theme) });
52
- const promptText = (0, _prosopo_procaptcha_common.createElement)("p", { style: promptStyle(theme) });
63
+ const promptText = (0, _prosopo_procaptcha_common.createElement)("p", {
64
+ style: promptStyle(theme),
65
+ attributes: require_index.default({ dev: { cy: "captcha-prompt" } })
66
+ });
53
67
  const hintText = (0, _prosopo_procaptcha_common.createElement)("p", { style: hintStyle(theme) });
54
68
  const header = (0, _prosopo_procaptcha_common.createElement)("div", {
55
69
  style: {
56
- padding: "12px 14px",
70
+ padding: `${jittered(HEADER_PADDING_Y, HEADER_PADDING_JITTER)}px ${jittered(HEADER_PADDING_X, HEADER_PADDING_JITTER)}px`,
57
71
  fontFamily: theme.font.fontFamily
58
72
  },
59
- children: [promptText, hintText]
73
+ children: [decoy(promptText), decoy(hintText)]
60
74
  });
61
75
  const headerBar = (0, _prosopo_procaptcha_common.createElement)("div", {
62
76
  style: {
63
77
  backgroundColor: theme.palette.primaryContainer.main,
64
78
  borderRadius: theme.shape.header,
65
79
  width: "100%",
66
- marginTop: fullSpacing
80
+ marginTop: `${jittered(theme.spacing.unit)}px`
67
81
  },
68
- children: [header]
82
+ children: [decoy(header)]
69
83
  });
70
84
  const headerRow = (0, _prosopo_procaptcha_common.createElement)("div", {
71
85
  style: {
@@ -73,15 +87,15 @@ var mountCaptchaComponent = (container, initialProps) => {
73
87
  alignItems: "center",
74
88
  width: "100%"
75
89
  },
76
- children: [headerBar]
90
+ children: [decoy(headerBar)]
77
91
  });
78
92
  const gridHost = (0, _prosopo_procaptcha_common.createElement)("div", {
79
93
  style: { overflow: "hidden" },
80
94
  attributes: require_index.default({ dev: { cy: `captcha-${props.index}` } })
81
95
  });
82
- const cancelHost = (0, _prosopo_procaptcha_common.createElement)("div", { style: columnStyle });
83
- const reloadHost = (0, _prosopo_procaptcha_common.createElement)("div", { style: columnStyle });
84
- const nextHost = (0, _prosopo_procaptcha_common.createElement)("div", { style: columnStyle });
96
+ const cancelHost = (0, _prosopo_procaptcha_common.createElement)("div", { style: column });
97
+ const reloadHost = (0, _prosopo_procaptcha_common.createElement)("div", { style: column });
98
+ const nextHost = (0, _prosopo_procaptcha_common.createElement)("div", { style: column });
85
99
  const controls = (0, _prosopo_procaptcha_common.createElement)("div", {
86
100
  style: {
87
101
  width: "100%",
@@ -89,12 +103,12 @@ var mountCaptchaComponent = (container, initialProps) => {
89
103
  display: "flex",
90
104
  flexDirection: "row",
91
105
  justifyContent: "space-between",
92
- gap: "10px"
106
+ gap: `${controlGap}px`
93
107
  },
94
108
  children: [
95
- cancelHost,
96
- reloadHost,
97
- nextHost
109
+ decoy(cancelHost),
110
+ decoy(reloadHost),
111
+ decoy(nextHost)
98
112
  ]
99
113
  });
100
114
  const controlsRow = (0, _prosopo_procaptcha_common.createElement)("div", {
@@ -103,9 +117,9 @@ var mountCaptchaComponent = (container, initialProps) => {
103
117
  alignItems: "center",
104
118
  justifyContent: "space-between",
105
119
  lineHeight: 1.75,
106
- padding: `${fullSpacing} 0 ${doubleSpacing} 0`
120
+ padding: `${jittered(theme.spacing.unit)}px 0 ${jittered(theme.spacing.unit * 2)}px 0`
107
121
  },
108
- children: [controls]
122
+ children: [decoy(controls)]
109
123
  });
110
124
  const inner = (0, _prosopo_procaptcha_common.createElement)("div", {
111
125
  style: {
@@ -113,19 +127,20 @@ var mountCaptchaComponent = (container, initialProps) => {
113
127
  display: "flex",
114
128
  flexDirection: "column",
115
129
  minWidth: "300px",
116
- marginLeft: fullSpacing,
117
- marginRight: fullSpacing,
130
+ marginLeft: `${jittered(theme.spacing.unit)}px`,
131
+ marginRight: `${jittered(theme.spacing.unit)}px`,
118
132
  justifyContent: "center"
119
133
  },
120
134
  children: [
121
- headerRow,
122
- gridHost,
123
- controlsRow
135
+ decoy(headerRow),
136
+ decoy(gridHost),
137
+ decoy(controlsRow)
124
138
  ]
125
139
  });
126
140
  const root = (0, _prosopo_procaptcha_common.createElement)("div", {
127
141
  style: outerStyle(theme),
128
- children: [inner]
142
+ attributes: require_index.default({ dev: { cy: "captcha-panel" } }),
143
+ children: [decoy(inner)]
129
144
  });
130
145
  const grid = require_captchaWidget.mountCaptchaWidget(gridHost, {
131
146
  challenge: currentCaptcha(),
@@ -6,23 +6,34 @@ var getHash = (item) => {
6
6
  if (!item.hash) throw new _prosopo_common.ProsopoDatasetError("CAPTCHA.MISSING_ITEM_HASH", { context: { item } });
7
7
  return item.hash;
8
8
  };
9
- var imageStyle = {
9
+ var cellStyle = (gap) => ({
10
10
  flexGrow: 1,
11
- flexBasis: "calc(33.333% - 10px)",
11
+ flexBasis: (0, _prosopo_procaptcha_common.threeColumnBasis)(gap),
12
12
  boxSizing: "border-box"
13
- };
13
+ });
14
+ var MIN_GRID_GAP = 8;
15
+ var MAX_GRID_GAP = 15;
16
+ var GRID_PADDING_JITTER = 4;
17
+ var MIN_WRAPPER_DEPTH = 0;
18
+ var MAX_WRAPPER_DEPTH = 2;
14
19
  var CHECK_ICON_PATH = "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z";
15
20
  var themeOf = (themeColor) => "light" === themeColor ? _prosopo_widget_skeleton.lightTheme : _prosopo_widget_skeleton.darkTheme;
16
- var gridStyle = (theme) => ({
21
+ /** Drawn once per mounted grid, so tile centres move between page loads. */
22
+ var generateMetrics = (theme) => ({
23
+ gap: (0, _prosopo_widget_skeleton.randomInt)(MIN_GRID_GAP, MAX_GRID_GAP),
24
+ paddingTop: Math.max(0, theme.spacing.unit + (0, _prosopo_widget_skeleton.randomInt)(-GRID_PADDING_JITTER, GRID_PADDING_JITTER)),
25
+ paddingBottom: Math.max(0, theme.spacing.unit + (0, _prosopo_widget_skeleton.randomInt)(-GRID_PADDING_JITTER, GRID_PADDING_JITTER))
26
+ });
27
+ var gridStyle = (metrics) => ({
17
28
  width: "100%",
18
29
  height: "100%",
19
30
  display: "flex",
20
31
  flexDirection: "row",
21
32
  flexWrap: "wrap",
22
33
  justifyContent: "space-between",
23
- paddingTop: `${theme.spacing.unit}px`,
24
- paddingBottom: `${theme.spacing.unit}px`,
25
- gap: "10px"
34
+ paddingTop: `${metrics.paddingTop}px`,
35
+ paddingBottom: `${metrics.paddingBottom}px`,
36
+ gap: `${metrics.gap}px`
26
37
  });
27
38
  var selectionStyle = (theme, selected) => ({
28
39
  borderRadius: selected ? theme.shape.tileSelected : theme.shape.tile,
@@ -42,7 +53,8 @@ var mountCaptchaWidget = (container, initialProps) => {
42
53
  let renderedChallenge;
43
54
  let tiles = [];
44
55
  let focusedHash = null;
45
- const grid = (0, _prosopo_procaptcha_common.createElement)("div", { style: gridStyle(themeOf(initialProps.themeColor)) });
56
+ const metrics = generateMetrics(themeOf(initialProps.themeColor));
57
+ const grid = (0, _prosopo_procaptcha_common.createElement)("div", { style: gridStyle(metrics) });
46
58
  const buildTile = (item, index) => {
47
59
  const hash = getHash(item);
48
60
  const theme = themeOf(props.themeColor);
@@ -84,11 +96,8 @@ var mountCaptchaWidget = (container, initialProps) => {
84
96
  },
85
97
  attributes: {
86
98
  focusable: "false",
87
- color: "#fff",
88
99
  "aria-hidden": "true",
89
- viewBox: "0 0 24 24",
90
- "data-testid": "CheckIcon",
91
- "aria-label": "Check icon"
100
+ viewBox: "0 0 24 24"
92
101
  },
93
102
  children: [(0, _prosopo_procaptcha_common.createSvgElement)("path", { attributes: { d: CHECK_ICON_PATH } })]
94
103
  });
@@ -110,7 +119,7 @@ var mountCaptchaWidget = (container, initialProps) => {
110
119
  },
111
120
  children: [icon]
112
121
  });
113
- const clickable = (0, _prosopo_procaptcha_common.createElement)("button", {
122
+ const clickable = (0, _prosopo_procaptcha_common.createControl)(teardown, {
114
123
  style: {
115
124
  position: "relative",
116
125
  cursor: "pointer",
@@ -123,13 +132,11 @@ var mountCaptchaWidget = (container, initialProps) => {
123
132
  appearance: "none",
124
133
  display: "block"
125
134
  },
126
- attributes: { type: "button" },
127
- children: [image, overlay]
128
- });
129
- teardown.addEventListener(clickable, "click", (event) => {
130
- if (!(0, _prosopo_procaptcha_common.isEventTrusted)(event)) return;
131
- const mouseEvent = event;
132
- props.onClick(hash, mouseEvent.clientX, mouseEvent.clientY);
135
+ children: [image, overlay],
136
+ onActivate: (event) => {
137
+ const fromPointer = "clientX" in event;
138
+ props.onClick(hash, fromPointer ? event.clientX : 0, fromPointer ? event.clientY : 0);
139
+ }
133
140
  });
134
141
  teardown.addEventListener(clickable, "focus", () => {
135
142
  focusedHash = clickable.matches(":focus-visible") ? hash : null;
@@ -140,10 +147,10 @@ var mountCaptchaWidget = (container, initialProps) => {
140
147
  applyFocusRing();
141
148
  });
142
149
  const cell = (0, _prosopo_procaptcha_common.createElement)("div", {
143
- style: imageStyle,
150
+ style: cellStyle(metrics.gap),
144
151
  children: [clickable]
145
152
  });
146
- grid.appendChild(cell);
153
+ grid.appendChild((0, _prosopo_procaptcha_common.wrapRandomly)(cell, MIN_WRAPPER_DEPTH, MAX_WRAPPER_DEPTH));
147
154
  return {
148
155
  hash,
149
156
  image,
@@ -165,7 +172,7 @@ var mountCaptchaWidget = (container, initialProps) => {
165
172
  teardown.run();
166
173
  teardown = new _prosopo_procaptcha_common.Teardown();
167
174
  (0, _prosopo_procaptcha_common.clearElement)(grid);
168
- (0, _prosopo_procaptcha_common.applyStyles)(grid, gridStyle(themeOf(props.themeColor)));
175
+ (0, _prosopo_procaptcha_common.applyStyles)(grid, gridStyle(metrics));
169
176
  tiles = props.challenge.items.map(buildTile);
170
177
  renderedChallenge = props.challenge;
171
178
  };
@@ -1,10 +1,13 @@
1
1
  let _prosopo_procaptcha_common = require("@prosopo/procaptcha-common");
2
+ let _prosopo_widget_skeleton = require("@prosopo/widget-skeleton");
2
3
  //#region src/components/modal.ts
4
+ var MIN_WRAPPER_DEPTH = 1;
5
+ var MAX_WRAPPER_DEPTH = 3;
3
6
  /**
4
7
  * The image captcha's dialog frame; positioning lives in `ChallengeSurface`.
5
8
  */
6
9
  var mountModal = (initialProps) => {
7
- const inner = (0, _prosopo_procaptcha_common.createElement)("div", { className: "prosopo-modalInner" });
10
+ const inner = (0, _prosopo_procaptcha_common.createElement)("div", { className: (0, _prosopo_widget_skeleton.randomToken)() });
8
11
  (0, _prosopo_procaptcha_common.applyStyles)(inner, {
9
12
  maxWidth: "500px",
10
13
  maxHeight: "100%",
@@ -14,17 +17,18 @@ var mountModal = (initialProps) => {
14
17
  alignSelf: "center",
15
18
  boxSizing: "border-box"
16
19
  });
20
+ const outerClassName = (0, _prosopo_widget_skeleton.randomToken)();
17
21
  const surfaceProps = (props) => ({
18
22
  show: props.show,
19
23
  placement: props.placement,
20
24
  anchor: props.anchor,
21
25
  onDismiss: props.onDismiss,
22
26
  scrim: "none",
23
- className: "prosopo-modalOuter",
27
+ className: outerClassName,
24
28
  dialogLabel: props.dialogLabel
25
29
  });
26
30
  const surface = (0, _prosopo_procaptcha_common.mountChallengeSurface)(surfaceProps(initialProps));
27
- surface.content.appendChild(inner);
31
+ surface.content.appendChild((0, _prosopo_procaptcha_common.wrapRandomly)(inner, MIN_WRAPPER_DEPTH, MAX_WRAPPER_DEPTH));
28
32
  return {
29
33
  content: inner,
30
34
  update: (props) => surface.update(surfaceProps(props)),
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAaA,OAAO,EACN,KAAK,SAAS,EAOd,MAAM,4BAA4B,CAAC;AAIpC,MAAM,WAAW,WAAW;IAC3B,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACb;AA6BD,eAAO,MAAM,WAAW,cACZ,WAAW,gBACR,WAAW,KACvB,SAAS,CAAC,WAAW,CAoGvB,CAAC"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAaA,OAAO,EACN,KAAK,SAAS,EAMd,MAAM,4BAA4B,CAAC;AAIpC,MAAM,WAAW,WAAW;IAC3B,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACb;AA6BD,eAAO,MAAM,WAAW,cACZ,WAAW,gBACR,WAAW,KACvB,SAAS,CAAC,WAAW,CAiGvB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import addDataAttr from "../util/index.js";
2
- import { Teardown, applyAttributes, applyStyles, createElement, isEventTrusted } from "@prosopo/procaptcha-common";
2
+ import { Teardown, applyAttributes, applyStyles, createControl } from "@prosopo/procaptcha-common";
3
3
  import { darkTheme, lightTheme, withAlpha } from "@prosopo/widget-skeleton";
4
4
  //#region src/components/button.ts
5
5
  var buttonStyleBase = {
@@ -27,7 +27,10 @@ var mountButton = (container, initialProps) => {
27
27
  let props = initialProps;
28
28
  let hover = false;
29
29
  let focusVisible = false;
30
- const button = createElement("button");
30
+ const button = createControl(teardown, { onActivate: (event) => {
31
+ event.preventDefault();
32
+ props.onClick();
33
+ } });
31
34
  const buttonStyle = () => {
32
35
  const theme = "light" === props.themeColor ? lightTheme : darkTheme;
33
36
  const baseStyle = {
@@ -78,11 +81,6 @@ var mountButton = (container, initialProps) => {
78
81
  focusVisible = false;
79
82
  render();
80
83
  });
81
- teardown.addEventListener(button, "click", (event) => {
82
- if (!isEventTrusted(event)) return;
83
- event.preventDefault();
84
- props.onClick();
85
- });
86
84
  render();
87
85
  container.appendChild(button);
88
86
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.ts"],"names":[],"mappings":"AAaA,OAAO,EAGN,QAAQ,EACR,eAAe,EACf,WAAW,EACX,aAAa,EACb,cAAc,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,WAAW,MAAM,kBAA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C;QACV,CAAC;QACD,OAAO,EAAE,GAAG,EAAE;YACb,QAAQ,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC;KACD,CAAC;AACH,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"captchaComponent.d.ts","sourceRoot":"","sources":["../../src/components/captchaComponent.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACN,KAAK,SAAS,EAMd,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAO1D,MAAM,WAAW,qBAAqB;IACrC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,UAAU,EAAE,UAAU,CAAC;CACvB;AA8CD,eAAO,MAAM,qBAAqB,cACtB,WAAW,gBACR,qBAAqB,KACjC,SAAS,CAAC,qBAAqB,CAuMjC,CAAC"}
1
+ {"version":3,"file":"captchaComponent.d.ts","sourceRoot":"","sources":["../../src/components/captchaComponent.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACN,KAAK,SAAS,EAQd,MA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