@qrauth/web-components 0.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.
@@ -0,0 +1,4 @@
1
+ export { QRAuthElement } from './base.js';
2
+ export { QRAuthLogin } from './login.js';
3
+ export { QRAuthEphemeral } from './ephemeral.js';
4
+ export { QRAuthTwoFA } from './twofa.js';
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ export { QRAuthElement } from './base.js';
2
+ export { QRAuthLogin } from './login.js';
3
+ export { QRAuthEphemeral } from './ephemeral.js';
4
+ export { QRAuthTwoFA } from './twofa.js';
@@ -0,0 +1,60 @@
1
+ import { QRAuthElement } from './base.js';
2
+ /**
3
+ * <qrauth-login> — Drop-in QR authentication button / inline widget.
4
+ *
5
+ * Attributes:
6
+ * tenant — Your QRAuth App client ID (required)
7
+ * theme — "light" (default) | "dark"
8
+ * base-url — API base URL (default: https://qrauth.io)
9
+ * scopes — Space-separated scopes (default: "identity")
10
+ * redirect-url — Optional redirect after successful auth
11
+ * on-auth — Name of a global callback function to call on success
12
+ * display — "button" (default) | "inline"
13
+ * animated — If present, enables subtle QR pulse animation
14
+ *
15
+ * Events (bubbles + composed, cross shadow-DOM):
16
+ * qrauth:authenticated — detail: { sessionId, user, signature }
17
+ * qrauth:expired — fired when session times out
18
+ * qrauth:error — detail: { message }
19
+ * qrauth:scanned — fired when QR is scanned (before approval)
20
+ *
21
+ * @example
22
+ * <qrauth-login tenant="qrauth_app_xxx"></qrauth-login>
23
+ * <qrauth-login tenant="qrauth_app_xxx" display="inline" theme="dark"></qrauth-login>
24
+ */
25
+ export declare class QRAuthLogin extends QRAuthElement {
26
+ static get observedAttributes(): string[];
27
+ private _sessionId;
28
+ private _codeVerifier;
29
+ private _status;
30
+ private _expiresAt;
31
+ private _timerInterval;
32
+ private _pollTimeout;
33
+ get scopes(): string;
34
+ get redirectUrl(): string | null;
35
+ get onAuth(): string | null;
36
+ get display(): string;
37
+ get animated(): boolean;
38
+ disconnectedCallback(): void;
39
+ protected render(): void;
40
+ private _renderButton;
41
+ private _renderInline;
42
+ private _inlineIdleContent;
43
+ private _modalContent;
44
+ private _bodyForStatus;
45
+ private _sharedModalStyles;
46
+ private _bindButtonEvents;
47
+ private _bindInlineEvents;
48
+ private _bindModalButtons;
49
+ private _openModal;
50
+ private _closeModal;
51
+ private _startAuth;
52
+ private _retry;
53
+ private _beginPolling;
54
+ private _handleStatusChange;
55
+ private _startCountdown;
56
+ private _formatTimer;
57
+ /** Update just the inner body content without re-rendering the whole component */
58
+ private _updateBody;
59
+ private _clearTimers;
60
+ }