altcha 1.3.0 → 1.4.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.
package/README.md CHANGED
@@ -1,16 +1,17 @@
1
1
  # ALTCHA
2
2
 
3
- ALTCHA uses a proof-of-work mechanism to protect your website, APIs, and online services from spam and abuse. Unlike other solutions, ALTCHA is self-hosted, does not use cookies nor fingerprinting, does not track users, and is fully compliant with GDPR.
3
+ ALTCHA leverages a proof-of-work mechanism to safeguard your website, APIs, and online services from spam and abuse. Unlike traditional solutions, ALTCHA is self-hosted, does not rely on cookies or fingerprinting, and ensures complete user privacy. It is fully compliant with [GDPR](https://altcha.org/docs/gdpr/), [WCAG 2.2 AA-level](https://altcha.org/docs/wcag/), and the [European Accessibility Act](https://altcha.org/docs/european-accessibility-act-2025/).
4
4
 
5
- Visit [ALTCHA](https://altcha.org) for more information.
5
+ For more details, visit [ALTCHA](https://altcha.org).
6
6
 
7
7
  ## Features
8
8
 
9
- - **Frictionless CAPTCHA Alternative** - Employs proof-of-work (PoW) instead of visual puzzles.
10
- - **Data Obfuscation** - Safeguards your email address from scraping.
11
- - **Cookie-less** - Designed to be GDPR compliant by default.
12
- - **Self-hosted** - Operates independently without relying on external providers.
13
- - **SaaS Available** - Get started with the SaaS API at [altcha.org/docs/api](https://altcha.org/docs/api).
9
+ - **Frictionless Experience**: Utilizes proof-of-work (PoW) instead of visual puzzles, ensuring a seamless user experience.
10
+ - **Cookie-Free Design**: Built to be GDPR-compliant by default, with no cookies or tracking.
11
+ - **Fully Accessible**: Meets WCAG 2.2 AA-level standards and complies with the European Accessibility Act (EAA).
12
+ - **Lightweight**: Minimal bundle size for fast page loads and optimal performance.
13
+ - **Self-Hosted**: Operates independently without depending on third-party services.
14
+ - **SaaS Option Available**: Get started quickly with the SaaS API at [altcha.org](https://altcha.org/).
14
15
 
15
16
  ## Examples
16
17
 
@@ -111,6 +112,7 @@ Additional options:
111
112
  - **floating**: Enable floating UI (possible values: `auto`, `top`, `bottom`).
112
113
  - **floatinganchor**: CSS selector of the "anchor" to which the floating UI will be attached (defaults to the `button[type="submit"]` in the related form).
113
114
  - **floatingoffset**: Y offset from the anchor element for the floating UI in pixels (defaults to `12`).
115
+ - **floatingpersist**: Whether to "persist" (keep visible) the floating widget after verification (possible values: `true` | `false` | `focus`; defaults to `false`, meaning the widget will hide).
114
116
  - **hidefooter**: Hide the footer (ALTCHA link).
115
117
  - **hidelogo**: Hide the ALTCHA logo.
116
118
  - **id**: The checkbox `id` attribute. Useful for multiple instances of the widget on the same page.
@@ -194,7 +196,7 @@ export interface Configure {
194
196
  floating?: 'auto' | 'top' | 'bottom';
195
197
  floatinganchor?: string;
196
198
  floatingoffset?: number;
197
- autorenew?: boolean;
199
+ floatingpersist?: boolean | 'focus';
198
200
  hidefooter?: boolean;
199
201
  hidelogo?: boolean;
200
202
  maxnumber?: number;
package/dist/altcha.d.ts CHANGED
@@ -31,6 +31,7 @@ declare global {
31
31
  floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
32
32
  floatinganchor?: string;
33
33
  floatingoffset?: number;
34
+ floatingpersist?: 'focus' | boolean;
34
35
  hidefooter?: boolean;
35
36
  hidelogo?: boolean;
36
37
  id?: string;
@@ -62,9 +63,12 @@ declare global {
62
63
  getFloatingAnchor: () => HTMLElement | null;
63
64
  getPlugin: <T = unknown>(name: string) => T;
64
65
  getState: () => AltchaState;
66
+ hide: () => void;
67
+ repositionFloating: (viewportOffset: numer = 20) => void;
65
68
  reset: (newState: AltchaState = 'unverified', err: string | null = null) => void;
66
69
  setFloatingAnchor: (el: HTMLElement) => void;
67
70
  setState: (newState: AltchaState, err: string | null = null) => void;
71
+ show: () => void;
68
72
  verify: () => Promise<void>;
69
73
  }
70
74