@faable/challenge 1.0.0 → 1.1.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.
@@ -53,6 +53,12 @@ export type ChallengeWidgetDriver = {
53
53
  onMount?: () => void;
54
54
  /** The product the mark names (default `auth`, as auth-js has always shown). */
55
55
  product?: WidgetProduct;
56
+ /**
57
+ * A click (or Enter/Space) anywhere on the idle badge starts the check:
58
+ * the widget emits `faable-challenge:activate`. Faable Challenge sites turn
59
+ * it on; auth-js solves on submit, so its badge stays passive when idle.
60
+ */
61
+ activateOnClick?: boolean;
56
62
  };
57
63
  /** Texts for a BCP 47 tag: exact or aliased variant → base language → English. */
58
64
  export declare const textsFor: (locale: string | undefined | null) => ChallengeTexts;
@@ -64,6 +70,7 @@ export declare const optionsFromClasses: (el: Element) => Partial<Required<Chall
64
70
  */
65
71
  export declare const availableWidth: (el: Element) => number;
66
72
  export type WidgetProduct = 'auth' | 'challenge';
73
+ export declare const MIN_SOLVING_MS = 1200;
67
74
  export type ChallengeWidget = {
68
75
  setState: (state: WidgetState) => void;
69
76
  /** Back to `idle`, for a form that can be sent again. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/challenge",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Faable Challenge: proof-of-work bot protection for any form — the browser widget and solver",
5
5
  "author": "Marc Pomar <marc@faable.com>",
6
6
  "license": "MIT",