@lalternative/auth 0.6.0 → 0.8.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/dist/client.d.ts +1 -1
- package/dist/index.d.ts +59 -15
- package/dist/index.js +454 -247
- package/dist/index.js.map +1 -1
- package/dist/{invitation-aZz_6M7B.d.ts → invitation-CfZAFUdJ.d.ts} +1 -1
- package/dist/server.d.ts +3 -3
- package/dist/{types-BEldQPou.d.ts → types-Dmjo9lEL.d.ts} +112 -11
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { L as LoginFormProps, R as RegisterFormProps, V as VerifyEmailFormProps, F as ForgotPasswordFormProps, a as ResetPasswordFormProps, A as AuthLayoutProps, I as InvitationNoticeProps } from './types-
|
|
2
|
-
export { b as InvitationFailure, c as LoginFormLabels, P as PlatformAuthClientConfig, d as PlatformAuthConfig, e as PlatformAuthMailer, f as PlatformAuthMailerArgs, g as PlatformAuthMailerType, h as PlatformSession, i as PlatformSessionData, j as PlatformUser, k as RegisterFormLabels } from './types-
|
|
1
|
+
import { L as LoginFormProps, R as RegisterFormProps, V as VerifyEmailFormProps, F as ForgotPasswordFormProps, a as ResetPasswordFormProps, A as AuthLayoutProps, I as InvitationNoticeProps } from './types-Dmjo9lEL.js';
|
|
2
|
+
export { b as InvitationFailure, c as LoginFormLabels, P as PlatformAuthClientConfig, d as PlatformAuthConfig, e as PlatformAuthMailer, f as PlatformAuthMailerArgs, g as PlatformAuthMailerType, h as PlatformSession, i as PlatformSessionData, j as PlatformUser, k as RegisterFormLabels } from './types-Dmjo9lEL.js';
|
|
3
3
|
import * as better_auth_react from 'better-auth/react';
|
|
4
4
|
import * as better_auth from 'better-auth';
|
|
5
5
|
import { PlatformAuthClient } from './client.js';
|
|
6
6
|
import * as react from 'react';
|
|
7
7
|
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
8
|
-
export { C as ClaimOutcome, i as isInvitationFailure } from './invitation-
|
|
8
|
+
export { C as ClaimOutcome, i as isInvitationFailure } from './invitation-CfZAFUdJ.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Returns a useSession hook bound to the given auth client.
|
|
@@ -54,6 +54,8 @@ interface AuthFieldProps extends NativeProps {
|
|
|
54
54
|
/** Persistent helper text under the field, tied to it for screen readers */
|
|
55
55
|
description?: string;
|
|
56
56
|
invalid?: boolean;
|
|
57
|
+
/** Replaces the default border and background utilities */
|
|
58
|
+
fieldClassName?: string;
|
|
57
59
|
}
|
|
58
60
|
/**
|
|
59
61
|
* A single credential field.
|
|
@@ -70,13 +72,15 @@ interface AuthFieldProps extends NativeProps {
|
|
|
70
72
|
* corners exactly, and the border darkens at the same time — the border is what
|
|
71
73
|
* survives forced-colors mode, where the ring is dropped.
|
|
72
74
|
*/
|
|
73
|
-
declare function AuthField({ label, hint, description, invalid, ...props }: AuthFieldProps): react.JSX.Element;
|
|
75
|
+
declare function AuthField({ label, hint, description, invalid, fieldClassName, ...props }: AuthFieldProps): react.JSX.Element;
|
|
74
76
|
|
|
75
77
|
interface AuthSubmitProps {
|
|
76
78
|
pending?: boolean;
|
|
77
79
|
disabled?: boolean;
|
|
78
80
|
pendingLabel: string;
|
|
79
81
|
children: ReactNode;
|
|
82
|
+
/** Replaces the default `bg-primary text-primary-foreground hover:bg-primary/90` */
|
|
83
|
+
className?: string;
|
|
80
84
|
}
|
|
81
85
|
/**
|
|
82
86
|
* The primary action of an auth screen.
|
|
@@ -88,11 +92,23 @@ interface AuthSubmitProps {
|
|
|
88
92
|
* The press feedback is a 1px translate rather than a scale — scaling a
|
|
89
93
|
* full-width button visibly blurs its text mid-transform.
|
|
90
94
|
*/
|
|
91
|
-
declare function AuthSubmit({ pending, disabled, pendingLabel, children, }: AuthSubmitProps): react.JSX.Element;
|
|
95
|
+
declare function AuthSubmit({ pending, disabled, pendingLabel, children, className, }: AuthSubmitProps): react.JSX.Element;
|
|
92
96
|
|
|
93
|
-
declare function LoginForm({ onSuccess, registerUrl, forgotPasswordUrl, socialCallbackUrl, socialProviders, coreTokenUrl, labels, authClient, }: LoginFormProps): react.JSX.Element;
|
|
97
|
+
declare function LoginForm({ onSuccess, registerUrl, forgotPasswordUrl, socialCallbackUrl, socialProviders, coreTokenUrl, labels, submitClassName, fieldClassName, error: externalError, authClient, }: LoginFormProps): react.JSX.Element;
|
|
98
|
+
declare namespace LoginForm {
|
|
99
|
+
var defaults: {
|
|
100
|
+
title: string;
|
|
101
|
+
subtitle: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
94
104
|
|
|
95
|
-
declare function RegisterForm({ onSuccess, loginUrl, legal, socialCallbackUrl, socialProviders, labels, authClient, }: RegisterFormProps): react.JSX.Element;
|
|
105
|
+
declare function RegisterForm({ onSuccess, loginUrl, legal, socialCallbackUrl, socialProviders, labels, submitClassName, fieldClassName, error: externalError, authClient, }: RegisterFormProps): react.JSX.Element;
|
|
106
|
+
declare namespace RegisterForm {
|
|
107
|
+
var defaults: {
|
|
108
|
+
title: string;
|
|
109
|
+
subtitle: string;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
96
112
|
|
|
97
113
|
interface SocialButtonsProps {
|
|
98
114
|
providers: Array<"google" | "github">;
|
|
@@ -105,27 +121,55 @@ interface SocialButtonsProps {
|
|
|
105
121
|
}
|
|
106
122
|
declare function SocialButtons({ providers, onSelect, disabled, separator, labels, }: SocialButtonsProps): react.JSX.Element | null;
|
|
107
123
|
|
|
108
|
-
declare function VerifyEmailForm({ email, onSuccess, authClient, }: VerifyEmailFormProps): react.JSX.Element;
|
|
124
|
+
declare function VerifyEmailForm({ email, onSuccess, loginUrl, labels, submitClassName, fieldClassName, authClient, }: VerifyEmailFormProps): react.JSX.Element;
|
|
125
|
+
declare namespace VerifyEmailForm {
|
|
126
|
+
var defaults: {
|
|
127
|
+
title: string;
|
|
128
|
+
subtitle: string;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
109
131
|
|
|
110
|
-
declare function ForgotPasswordForm({ onSuccess, loginUrl, authClient, }: ForgotPasswordFormProps): react.JSX.Element;
|
|
132
|
+
declare function ForgotPasswordForm({ onSuccess, loginUrl, labels, submitClassName, fieldClassName, authClient, }: ForgotPasswordFormProps): react.JSX.Element;
|
|
133
|
+
declare namespace ForgotPasswordForm {
|
|
134
|
+
var defaults: {
|
|
135
|
+
title: string;
|
|
136
|
+
subtitle: string;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
111
139
|
|
|
112
|
-
declare function ResetPasswordForm({ email, onSuccess, loginUrl, authClient, }: ResetPasswordFormProps): react.JSX.Element;
|
|
140
|
+
declare function ResetPasswordForm({ email, onSuccess, loginUrl, labels, submitClassName, fieldClassName, authClient, }: ResetPasswordFormProps): react.JSX.Element;
|
|
141
|
+
declare namespace ResetPasswordForm {
|
|
142
|
+
var defaults: {
|
|
143
|
+
title: string;
|
|
144
|
+
subtitle: string;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
113
147
|
|
|
114
148
|
/**
|
|
115
|
-
* The frame every auth screen sits in.
|
|
149
|
+
* The frame every auth screen sits in. It owns the ground, the heading and the
|
|
150
|
+
* app's own marks (logo, illustration, legal footer); the card holds only the
|
|
151
|
+
* fields and their actions.
|
|
152
|
+
*
|
|
153
|
+
* The heading sits ABOVE the card rather than inside it: the card is then
|
|
154
|
+
* exactly the thing you fill in, and the mark reads as the app's rather than
|
|
155
|
+
* as the form's first row.
|
|
116
156
|
*
|
|
117
157
|
* Mobile and desktop are two layouts, not one scaled down. On a phone the form
|
|
118
158
|
* IS the page: no card, no border, edge-to-edge padding, top-aligned so the
|
|
119
159
|
* fields stay above the keyboard instead of being pushed under it by vertical
|
|
120
160
|
* centering. From sm up it becomes a bounded card on a tinted ground — a
|
|
121
|
-
* full-width form on a 1440px display is unreadable.
|
|
122
|
-
*
|
|
123
|
-
*
|
|
161
|
+
* full-width form on a 1440px display is unreadable.
|
|
162
|
+
*
|
|
163
|
+
* A `panel` is an app-supplied illustration and nothing else: without one the
|
|
164
|
+
* card stays a single column rather than inventing decoration to fill a half
|
|
165
|
+
* it has no content for. When given, it takes the LEFT half from md up and is
|
|
166
|
+
* dropped below that width — a decorative half-screen above a form costs a
|
|
167
|
+
* full swipe before the first field.
|
|
124
168
|
*
|
|
125
169
|
* min-h-dvh rather than min-h-screen: on mobile browsers 100vh includes the
|
|
126
170
|
* retracting URL bar, so a screen-height container overflows by its height.
|
|
127
171
|
*/
|
|
128
|
-
declare function AuthLayout({ logo, title, subtitle, children, footer, }: AuthLayoutProps): react.JSX.Element;
|
|
172
|
+
declare function AuthLayout({ logo, panel, title, subtitle, titleClassName, children, footer, }: AuthLayoutProps): react.JSX.Element;
|
|
129
173
|
|
|
130
174
|
/**
|
|
131
175
|
* What an invitee sees when their link does not work.
|