@better-auth-ui/react 1.6.27 → 1.6.29

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/email.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { Body as r, Button as i, Container as a, Head as o, Heading as s, Hr as c, Html as l, Img as u, Link as d, Preview as f, Section as p, Tailwind as m, Text as h, pixelBasedPreset as g } from "@react-email/components";
2
+ import { Body as r, Button as i, Container as a, Head as o, Heading as s, Hr as c, Html as l, Img as u, Link as d, Preview as f, Section as p, Tailwind as m, Text as h, pixelBasedPreset as g } from "react-email";
3
3
  import { clsx as _ } from "clsx";
4
4
  import { twMerge as v } from "tailwind-merge";
5
5
  //#region src/lib/utils.ts
@@ -0,0 +1,15 @@
1
+ import { LastLoginMethodLocalization } from '@better-auth-ui/core/plugins';
2
+ export type LastLoginMethodState = {
3
+ /** Most recently used method, such as `"email"`, `"google"`, or `"github"`. */
4
+ method: string | null;
5
+ /** Localization contributed by `lastLoginMethodPlugin()`. */
6
+ localization: LastLoginMethodLocalization;
7
+ };
8
+ /**
9
+ * Reads Better Auth's last-login-method cookie after hydration.
10
+ *
11
+ * Always returns an object containing `method` and `localization`. Only
12
+ * `method` is `null` when the UI plugin is not registered or the matching
13
+ * Better Auth client plugin has no stored method.
14
+ */
15
+ export declare function useLastLoginMethod(): LastLoginMethodState;
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from './components/auth/fetch-options-provider';
3
3
  export * from './components/icons';
4
4
  export * from './components/settings/account/theme-preview';
5
5
  export * from './hooks/auth/use-authenticate';
6
+ export * from './hooks/auth/use-last-login-method';
6
7
  export * from './hooks/auth/use-user';
7
8
  export * from './hooks/use-auth-mutation';
8
9
  export * from './hooks/use-auth-plugin';