@jgb-solutions/kit 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/CHANGELOG.md +38 -0
- package/README.md +73 -7
- package/dist/account/AccountPage.d.ts +130 -0
- package/dist/account/SignIn.d.ts +54 -0
- package/dist/account/index.d.ts +12 -0
- package/dist/account/native/index.d.ts +173 -0
- package/dist/account/native.d.ts +2 -0
- package/dist/account/native.js +1012 -0
- package/dist/account/result.d.ts +13 -0
- package/dist/account/styles.css +557 -0
- package/dist/account/text.d.ts +108 -0
- package/dist/account/theme.d.ts +47 -0
- package/dist/account/ui.d.ts +73 -0
- package/dist/account.d.ts +2 -0
- package/dist/account.js +1396 -0
- package/dist/auth/browser.d.ts +4 -1
- package/dist/auth/bun.d.ts +3 -2
- package/dist/auth/bun.js +4 -2
- package/dist/auth/expo.d.ts +39 -4
- package/dist/auth/expo.js +24 -3
- package/dist/auth/orpc.d.ts +6 -0
- package/dist/auth/orpc.js +11 -3
- package/dist/auth/server.d.ts +43 -7
- package/dist/auth/server.js +178 -16
- package/dist/auth/versions.d.ts +17 -0
- package/dist/auth/versions.js +19 -0
- package/dist/auth.d.ts +111 -3
- package/dist/auth.js +110 -4
- package/dist/i18n.js +2 -2
- package/package.json +32 -5
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type InputHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { attempt, type AccountResult } from './result';
|
|
3
|
+
export { attempt, type AccountResult };
|
|
4
|
+
/**
|
|
5
|
+
* How links are drawn, so any router works: TanStack's <Link>, or a plain <a> (the default).
|
|
6
|
+
* `href` is always a path the app gave the kit.
|
|
7
|
+
*/
|
|
8
|
+
export type AccountLink = (props: {
|
|
9
|
+
href: string;
|
|
10
|
+
className: string;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}) => ReactNode;
|
|
13
|
+
export declare const plainAccountLink: AccountLink;
|
|
14
|
+
export declare const KeyIcon: () => import("react").JSX.Element;
|
|
15
|
+
export declare const SignOutIcon: () => import("react").JSX.Element;
|
|
16
|
+
export declare const TrashIcon: () => import("react").JSX.Element;
|
|
17
|
+
export declare const InfoIcon: () => import("react").JSX.Element;
|
|
18
|
+
/** Google's "G" in its four colours (Google's sign-in branding: the mark unchanged, on white). */
|
|
19
|
+
export declare function GoogleMark(): import("react").JSX.Element;
|
|
20
|
+
/** The frame of the sign-in pages: one centred card, an h1, and a footer line under it. */
|
|
21
|
+
export declare function AuthCard({ title, intro, footer, children, }: {
|
|
22
|
+
title: string;
|
|
23
|
+
intro?: string | undefined;
|
|
24
|
+
footer?: ReactNode;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export type AuthFieldProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
28
|
+
label: string;
|
|
29
|
+
name: string;
|
|
30
|
+
hint?: string | undefined;
|
|
31
|
+
/** Shown under the input, announced, and describing it. */
|
|
32
|
+
error?: string | null | undefined;
|
|
33
|
+
};
|
|
34
|
+
/** A labelled input; its error and hint describe it (aria-describedby). */
|
|
35
|
+
export declare function AuthField({ label, hint, error, id, ...input }: AuthFieldProps): import("react").JSX.Element;
|
|
36
|
+
export type MessageKind = 'error' | 'success' | 'warning';
|
|
37
|
+
/** An error (an alert, read out at once), a success or a warning (a status). */
|
|
38
|
+
export declare function FormMessage({ kind, children }: {
|
|
39
|
+
kind: MessageKind;
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
42
|
+
/** Why the visitor is here ("Sign in to save it"), at the top of sign-in and sign-up: calm, not an error. */
|
|
43
|
+
export declare function Notice({ children, action }: {
|
|
44
|
+
children: ReactNode;
|
|
45
|
+
action?: ReactNode;
|
|
46
|
+
}): import("react").JSX.Element;
|
|
47
|
+
export type AccountButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
48
|
+
variant?: 'primary' | 'quiet' | 'danger';
|
|
49
|
+
/** As wide as its card. */
|
|
50
|
+
block?: boolean;
|
|
51
|
+
icon?: ReactNode;
|
|
52
|
+
};
|
|
53
|
+
/** A button that says what it does ("Add a passkey", "Delete my account"). */
|
|
54
|
+
export declare function AccountButton({ variant, block, icon, type, children, ...rest }: AccountButtonProps): import("react").JSX.Element;
|
|
55
|
+
/** "Continue with Google": Google's own white button. The app's `onClick` starts Google's sign-in. */
|
|
56
|
+
export declare function GoogleButton({ label, onClick, disabled }: {
|
|
57
|
+
label: string;
|
|
58
|
+
onClick: () => void;
|
|
59
|
+
disabled?: boolean | undefined;
|
|
60
|
+
}): import("react").JSX.Element;
|
|
61
|
+
/** "— or —" between the quick ways in and the form. */
|
|
62
|
+
export declare function OrDivider({ label }: {
|
|
63
|
+
label: string;
|
|
64
|
+
}): import("react").JSX.Element;
|
|
65
|
+
/** A person's picture (https only, kit/auth/rules' avatarSrc) or initials. Decorative: the name is written next to it. */
|
|
66
|
+
export declare function AccountAvatar({ user, size, }: {
|
|
67
|
+
user: {
|
|
68
|
+
name: string;
|
|
69
|
+
username: string;
|
|
70
|
+
image?: string | null | undefined;
|
|
71
|
+
};
|
|
72
|
+
size?: number;
|
|
73
|
+
}): import("react").JSX.Element;
|