Skip to content

Commit

Permalink
0.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ovx committed Jul 29, 2024
1 parent ab51e73 commit 5d0b41c
Show file tree
Hide file tree
Showing 9 changed files with 661 additions and 731 deletions.
77 changes: 53 additions & 24 deletions dist/altcha.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,60 @@ export {};
declare module 'altcha';

declare global {
type AltchaState = 'error' | 'expired' | 'verified' | 'verifying' | 'unverified';

interface AltchaStateChangeEvent extends CustomEvent<{
payload?: string;
state: AltchaState;
}> {}

interface AltchaVerifiedEvent extends CustomEvent<{
payload: string;
}> {}

interface AltchaServerVerificationEvent extends CustomEvent<Record<string, unknown>> {}

interface AltchaWidget {
auto?: 'onfocus' | 'onload' | 'onsubmit';
blockspam?: boolean;
challengeurl?: string;
challengejson?: string;
debug?: boolean;
delay?: number;
expire?: number;
floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
floatinganchor?: string;
floatingoffset?: number;
hidefooter?: boolean;
hidelogo?: boolean;
name?: string;
maxnumber?: number;
mockerror?: boolean;
refetchonexpire?: boolean;
spamfilter?: boolean | 'ipAddress';
strings?: string;
test?: boolean | number;
verifyurl?: string;
workers?: number;
workerurl?: string;
}

declare namespace svelteHTML {
interface IntrinsicElements {
'altcha-widget': AltchaWidgetSvelte;
}

interface AltchaWidgetSvelte extends AltchaWidget {
'on:statechange'?: (event: AltchaStateChangeEvent) => void;
'on:serververification'?: (event: AltchaServerVerificationEvent) => void;
'on:verified'?: (event: AltchaVerifiedEvent) => void;
style?: string;
}
}

namespace JSX {
interface IntrinsicElements {
'altcha-widget': AltchaWidget;
'altcha-widget': AltchaWidgetReact;
}

interface AltchaWidgetCSSProperties extends React.CSSProperties {
Expand All @@ -20,31 +71,9 @@ declare global {
'--altcha-max-width'?: string;
}

interface AltchaWidget extends React.HTMLAttributes<HTMLElement> {
auto?: 'onfocus' | 'onload' | 'onsubmit';
blockspam?: boolean;
challengeurl?: string;
challengejson?: string;
debug?: boolean;
delay?: number;
expire?: number;
floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
floatinganchor?: string;
floatingoffset?: number;
hidefooter?: boolean;
hidelogo?: boolean;
name?: string;
maxnumber?: number;
mockerror?: boolean;
interface AltchaWidgetReact extends AltchaWidget extends React.HTMLAttributes<HTMLElement> {
ref?: React.RefObject<HTMLElement>;
refetchonexpire?: boolean;
spamfilter?: boolean | 'ipAddress';
strings?: string;
style?: AltchaWidgetCSSProperties;
test?: boolean | number;
verifyurl?: string;
workers?: number;
workerurl?: string;
}
}
}
100 changes: 50 additions & 50 deletions dist/altcha.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/altcha.umd.cjs

Large diffs are not rendered by default.

77 changes: 53 additions & 24 deletions dist_external/altcha.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,60 @@ export {};
declare module 'altcha';

declare global {
type AltchaState = 'error' | 'expired' | 'verified' | 'verifying' | 'unverified';

interface AltchaStateChangeEvent extends CustomEvent<{
payload?: string;
state: AltchaState;
}> {}

interface AltchaVerifiedEvent extends CustomEvent<{
payload: string;
}> {}

interface AltchaServerVerificationEvent extends CustomEvent<Record<string, unknown>> {}

interface AltchaWidget {
auto?: 'onfocus' | 'onload' | 'onsubmit';
blockspam?: boolean;
challengeurl?: string;
challengejson?: string;
debug?: boolean;
delay?: number;
expire?: number;
floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
floatinganchor?: string;
floatingoffset?: number;
hidefooter?: boolean;
hidelogo?: boolean;
name?: string;
maxnumber?: number;
mockerror?: boolean;
refetchonexpire?: boolean;
spamfilter?: boolean | 'ipAddress';
strings?: string;
test?: boolean | number;
verifyurl?: string;
workers?: number;
workerurl?: string;
}

declare namespace svelteHTML {
interface IntrinsicElements {
'altcha-widget': AltchaWidgetSvelte;
}

interface AltchaWidgetSvelte extends AltchaWidget {
'on:statechange'?: (event: AltchaStateChangeEvent) => void;
'on:serververification'?: (event: AltchaServerVerificationEvent) => void;
'on:verified'?: (event: AltchaVerifiedEvent) => void;
style?: string;
}
}

namespace JSX {
interface IntrinsicElements {
'altcha-widget': AltchaWidget;
'altcha-widget': AltchaWidgetReact;
}

interface AltchaWidgetCSSProperties extends React.CSSProperties {
Expand All @@ -20,31 +71,9 @@ declare global {
'--altcha-max-width'?: string;
}

interface AltchaWidget extends React.HTMLAttributes<HTMLElement> {
auto?: 'onfocus' | 'onload' | 'onsubmit';
blockspam?: boolean;
challengeurl?: string;
challengejson?: string;
debug?: boolean;
delay?: number;
expire?: number;
floating?: 'auto' | 'top' | 'bottom' | 'false' | '' | boolean;
floatinganchor?: string;
floatingoffset?: number;
hidefooter?: boolean;
hidelogo?: boolean;
name?: string;
maxnumber?: number;
mockerror?: boolean;
interface AltchaWidgetReact extends AltchaWidget extends React.HTMLAttributes<HTMLElement> {
ref?: React.RefObject<HTMLElement>;
refetchonexpire?: boolean;
spamfilter?: boolean | 'ipAddress';
strings?: string;
style?: AltchaWidgetCSSProperties;
test?: boolean | number;
verifyurl?: string;
workers?: number;
workerurl?: string;
}
}
}
Loading

0 comments on commit 5d0b41c

Please sign in to comment.