@atlasauth/react 0.1.18 → 0.1.20

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.
Files changed (43) hide show
  1. package/dist/AtlasProvider.d.ts +9 -0
  2. package/dist/AtlasProvider.js +2 -0
  3. package/dist/AtlasProvider.js.map +1 -1
  4. package/dist/account.d.ts +66 -0
  5. package/dist/account.js +223 -0
  6. package/dist/account.js.map +1 -0
  7. package/dist/auth-buttons.d.ts +29 -0
  8. package/dist/auth-buttons.js +43 -0
  9. package/dist/auth-buttons.js.map +1 -0
  10. package/dist/billing.d.ts +127 -0
  11. package/dist/billing.js +235 -0
  12. package/dist/billing.js.map +1 -0
  13. package/dist/components-shared.d.ts +22 -0
  14. package/dist/components-shared.js +70 -0
  15. package/dist/components-shared.js.map +1 -0
  16. package/dist/components.d.ts +29 -433
  17. package/dist/components.js +68 -1223
  18. package/dist/components.js.map +1 -1
  19. package/dist/control-components.d.ts +46 -0
  20. package/dist/control-components.js +69 -0
  21. package/dist/control-components.js.map +1 -0
  22. package/dist/flow.d.ts +81 -0
  23. package/dist/flow.js +321 -0
  24. package/dist/flow.js.map +1 -0
  25. package/dist/organization.d.ts +37 -0
  26. package/dist/organization.js +111 -0
  27. package/dist/organization.js.map +1 -0
  28. package/dist/reverification.d.ts +21 -0
  29. package/dist/reverification.js +74 -0
  30. package/dist/reverification.js.map +1 -0
  31. package/dist/sign-in.d.ts +42 -0
  32. package/dist/sign-in.js +91 -0
  33. package/dist/sign-in.js.map +1 -0
  34. package/dist/sign-up.d.ts +18 -0
  35. package/dist/sign-up.js +37 -0
  36. package/dist/sign-up.js.map +1 -0
  37. package/dist/user-button.d.ts +54 -0
  38. package/dist/user-button.js +75 -0
  39. package/dist/user-button.js.map +1 -0
  40. package/dist/waitlist.d.ts +15 -0
  41. package/dist/waitlist.js +52 -0
  42. package/dist/waitlist.js.map +1 -0
  43. package/package.json +2 -2
@@ -0,0 +1,42 @@
1
+ import { type ReactNode, type ButtonHTMLAttributes } from 'react';
2
+ import { type OAuthPopupHandlers } from '@atlasauth/js';
3
+ import { type FlowState } from './fapi';
4
+ import { type FlowProps } from './flow';
5
+ export declare function SignIn(props?: FlowProps): import("react").JSX.Element;
6
+ /**
7
+ * §6 headless native sign-in, for a consumer that renders its OWN Google button
8
+ * (or Apple / Facebook Limited Login). Mint a nonce with `mintNonce(provider)`,
9
+ * hand it to the provider SDK, then pass the resulting id_token to
10
+ * `signInWithIdToken` — it posts to the native endpoint, exchanges the ticket
11
+ * for cookies and re-boots the app on completion, returning the flow state so
12
+ * the caller can react to `needs_second_factor` etc.
13
+ */
14
+ export declare function useSignIn(): {
15
+ mintNonce: (provider: string) => Promise<string | null>;
16
+ signInWithIdToken: (input: {
17
+ provider: string;
18
+ idToken: string;
19
+ nonce?: string;
20
+ }) => Promise<FlowState>;
21
+ startOauth: (input: {
22
+ provider: string;
23
+ mode?: "popup" | "redirect";
24
+ redirectUrl?: string;
25
+ handlers?: OAuthPopupHandlers;
26
+ }) => Promise<void>;
27
+ };
28
+ /**
29
+ * §10.2 `<SocialSignInButton>` — a headless social/OIDC sign-in button primitive
30
+ * (a single provider). Lets a team keep their own login card and still get
31
+ * Atlas's managed popup (or redirect) flow for a provider. `mode` defaults to the `<AtlasProvider oauthMode>`
32
+ * value, else redirect. Lifecycle callbacks (`onOpen`/`onError`/`onBlockedFallback`)
33
+ * fire only in popup mode.
34
+ */
35
+ export declare function SocialSignInButton({ provider, mode, children, onOpen, onError, onBlockedFallback, ...buttonProps }: {
36
+ provider: string;
37
+ mode?: 'popup' | 'redirect';
38
+ children?: ReactNode;
39
+ onOpen?: () => void;
40
+ onError?: (code: string) => void;
41
+ onBlockedFallback?: (authorizationUrl: string) => void;
42
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onError'>): import("react").JSX.Element;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignIn = SignIn;
4
+ exports.useSignIn = useSignIn;
5
+ exports.SocialSignInButton = SocialSignInButton;
6
+ const jsx_runtime_1 = require("react/jsx-runtime");
7
+ const react_1 = require("react");
8
+ const js_1 = require("@atlasauth/js");
9
+ const AtlasProvider_1 = require("./AtlasProvider");
10
+ const fapi_1 = require("./fapi");
11
+ const flow_1 = require("./flow");
12
+ function SignIn(props = {}) {
13
+ const { state, submit, client, finish } = (0, flow_1.useFlow)();
14
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(flow_1.AttemptFlow, { attempt: state.attempt, busy: state.busy, errors: state.errors, titleKey: "signIn.title", hideTitle: props.hideTitle, onSubmit: submit }), !state.attempt ? ((0, jsx_runtime_1.jsx)(flow_1.SocialSignInButtons, { client: client, onComplete: finish, oneTap: props.googleOneTap, oauthMode: props.oauthMode })) : null] }));
15
+ }
16
+ /**
17
+ * §6 headless native sign-in, for a consumer that renders its OWN Google button
18
+ * (or Apple / Facebook Limited Login). Mint a nonce with `mintNonce(provider)`,
19
+ * hand it to the provider SDK, then pass the resulting id_token to
20
+ * `signInWithIdToken` — it posts to the native endpoint, exchanges the ticket
21
+ * for cookies and re-boots the app on completion, returning the flow state so
22
+ * the caller can react to `needs_second_factor` etc.
23
+ */
24
+ function useSignIn() {
25
+ const { publishableKey, frontendApi, reload } = (0, AtlasProvider_1.useAtlas)();
26
+ const client = (0, react_1.useMemo)(() => new fapi_1.FapiClient({ publishableKey, baseUrl: frontendApi }), [frontendApi, publishableKey]);
27
+ const mintNonce = (0, react_1.useCallback)((provider) => (0, js_1.mintNativeNonce)(client, provider), [client]);
28
+ const signInWithIdToken = (0, react_1.useCallback)(async (input) => {
29
+ const next = await (0, js_1.nativeSignIn)(client, input);
30
+ if (next.attempt?.status === 'complete' && next.ticket) {
31
+ await client.post('/v1/client/tickets/exchange', {
32
+ attempt_id: next.attempt.id,
33
+ ticket: next.ticket,
34
+ });
35
+ await reload();
36
+ }
37
+ return next;
38
+ }, [client, reload]);
39
+ /**
40
+ * §oauth imperative — start a social/OIDC sign-in for your own button. In
41
+ * `"popup"` mode it opens a GSI-style popup, exchanges the one-time ticket on
42
+ * completion and re-boots signed-in (no navigation), falling back to a full
43
+ * redirect if the popup is blocked. In `"redirect"` mode it navigates.
44
+ */
45
+ const startOauth = (0, react_1.useCallback)(async (input) => {
46
+ if (typeof window === 'undefined')
47
+ return;
48
+ const redirectUrl = input.redirectUrl ?? window.location.href;
49
+ if (input.mode === 'popup') {
50
+ const out = await (0, js_1.startOauthPopup)(client, { provider: input.provider, redirectUrl }, input.handlers);
51
+ if (out.blocked && out.authorizationUrl) {
52
+ window.location.href = out.authorizationUrl;
53
+ return;
54
+ }
55
+ if (out.ticket) {
56
+ await client.post('/v1/client/tickets/exchange', {
57
+ attempt_id: out.attemptId,
58
+ ticket: out.ticket,
59
+ });
60
+ await reload();
61
+ return;
62
+ }
63
+ if (out.continuationUrl) {
64
+ window.location.href = out.continuationUrl;
65
+ return;
66
+ }
67
+ return;
68
+ }
69
+ const res = await (0, js_1.startOauthRedirect)(client, { provider: input.provider, redirectUrl });
70
+ if (res)
71
+ window.location.href = res.authorizationUrl;
72
+ }, [client, reload]);
73
+ return { mintNonce, signInWithIdToken, startOauth };
74
+ }
75
+ /**
76
+ * §10.2 `<SocialSignInButton>` — a headless social/OIDC sign-in button primitive
77
+ * (a single provider). Lets a team keep their own login card and still get
78
+ * Atlas's managed popup (or redirect) flow for a provider. `mode` defaults to the `<AtlasProvider oauthMode>`
79
+ * value, else redirect. Lifecycle callbacks (`onOpen`/`onError`/`onBlockedFallback`)
80
+ * fire only in popup mode.
81
+ */
82
+ function SocialSignInButton({ provider, mode, children, onOpen, onError, onBlockedFallback, ...buttonProps }) {
83
+ const { startOauth } = useSignIn();
84
+ const { oauthMode } = (0, AtlasProvider_1.useAtlas)();
85
+ const effectiveMode = mode ?? oauthMode ?? 'redirect';
86
+ return ((0, jsx_runtime_1.jsx)("button", { type: "button", ...buttonProps, onClick: (e) => {
87
+ buttonProps.onClick?.(e);
88
+ void startOauth({ provider, mode: effectiveMode, handlers: { onOpen, onError, onBlockedFallback } });
89
+ }, children: children ?? `Continue with ${provider}` }));
90
+ }
91
+ //# sourceMappingURL=sign-in.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-in.js","sourceRoot":"","sources":["../src/sign-in.tsx"],"names":[],"mappings":";;AAYA,wBAyBC;AAUD,8BA2EC;AASD,gDA+BC;;AAlKD,iCAAwF;AACxF,sCAMuB;AACvB,mDAA2C;AAC3C,iCAAoD;AACpD,iCAAmF;AAEnF,SAAgB,MAAM,CAAC,QAAmB,EAAE;IAC1C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,cAAO,GAAE,CAAC;IAEpD,OAAO,CACL,6DACE,uBAAC,kBAAW,IACV,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAC,cAAc,EACvB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,MAAM,GAChB,EAGD,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAChB,uBAAC,0BAAmB,IAClB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,KAAK,CAAC,YAAY,EAC1B,SAAS,EAAE,KAAK,CAAC,SAAS,GAC1B,CACH,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,SAAS;IACvB,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAA,wBAAQ,GAAE,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAA,eAAO,EACpB,GAAG,EAAE,CAAC,IAAI,iBAAU,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,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T,WAAW,EACf,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YACzB,KAAK,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC;QACvG,CAAC,YAEA,QAAQ,IAAI,iBAAiB,QAAQ,EAAE,GACjC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type FlowState } from './fapi';
2
+ import { type FlowProps } from './flow';
3
+ export declare function SignUp(props?: FlowProps): import("react").JSX.Element;
4
+ /**
5
+ * §5.1 headless sign-up — the sign-up counterpart of {@link useSignIn}. Starts a
6
+ * sign-up attempt and returns the resulting flow (usually `needs_email_verification`;
7
+ * the shared `advance` then drives the code to completion), reloading the provider
8
+ * when a sign-up completes with a session ticket.
9
+ */
10
+ export declare function useSignUp(): {
11
+ create: (input: {
12
+ email: string;
13
+ password: string;
14
+ fields?: Record<string, string>;
15
+ consent?: boolean;
16
+ captchaToken?: string;
17
+ }) => Promise<FlowState>;
18
+ };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SignUp = SignUp;
4
+ exports.useSignUp = useSignUp;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const js_1 = require("@atlasauth/js");
8
+ const AtlasProvider_1 = require("./AtlasProvider");
9
+ const fapi_1 = require("./fapi");
10
+ const flow_1 = require("./flow");
11
+ function SignUp(props = {}) {
12
+ const { state, submit } = (0, flow_1.useFlow)();
13
+ return ((0, jsx_runtime_1.jsx)(flow_1.AttemptFlow, { attempt: state.attempt, busy: state.busy, errors: state.errors, titleKey: "signUp.title", hideTitle: props.hideTitle, onSubmit: submit }));
14
+ }
15
+ /**
16
+ * §5.1 headless sign-up — the sign-up counterpart of {@link useSignIn}. Starts a
17
+ * sign-up attempt and returns the resulting flow (usually `needs_email_verification`;
18
+ * the shared `advance` then drives the code to completion), reloading the provider
19
+ * when a sign-up completes with a session ticket.
20
+ */
21
+ function useSignUp() {
22
+ const { publishableKey, frontendApi, reload } = (0, AtlasProvider_1.useAtlas)();
23
+ const client = (0, react_1.useMemo)(() => new fapi_1.FapiClient({ publishableKey, baseUrl: frontendApi }), [frontendApi, publishableKey]);
24
+ const create = (0, react_1.useCallback)(async (input) => {
25
+ const next = await (0, js_1.startSignUp)(client, input);
26
+ if (next.attempt?.status === 'complete' && next.ticket) {
27
+ await client.post('/v1/client/tickets/exchange', {
28
+ attempt_id: next.attempt.id,
29
+ ticket: next.ticket,
30
+ });
31
+ await reload();
32
+ }
33
+ return next;
34
+ }, [client, reload]);
35
+ return { create };
36
+ }
37
+ //# sourceMappingURL=sign-up.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sign-up.js","sourceRoot":"","sources":["../src/sign-up.tsx"],"names":[],"mappings":";;AAMA,wBAaC;AAQD,8BA2BC;;AAtDD,iCAA6C;AAC7C,sCAA4C;AAC5C,mDAA2C;AAC3C,iCAAoD;AACpD,iCAA8D;AAE9D,SAAgB,MAAM,CAAC,QAAmB,EAAE;IAC1C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAA,cAAO,GAAE,CAAC;IAEpC,OAAO,CACL,uBAAC,kBAAW,IACV,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAC,cAAc,EACvB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,QAAQ,EAAE,MAAM,GAChB,CACH,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,SAAS;IACvB,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAA,wBAAQ,GAAE,CAAC;IAC3D,MAAM,MAAM,GAAG,IAAA,eAAO,EACpB,GAAG,EAAE,CAAC,IAAI,iBAAU,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,EAC9D,CAAC,WAAW,EAAE,cAAc,CAAC,CAC9B,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,mBAAW,EACxB,KAAK,EAAE,KAMN,EAAsB,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,IAAA,gBAAW,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC9C,IAAI,IAAI,CAAC,OAAO,EAAE,MAAM,KAAK,UAAU,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACvD,MAAM,MAAM,CAAC,IAAI,CAAC,6BAA6B,EAAE;gBAC/C,UAAU,EAAG,IAAI,CAAC,OAA2B,CAAC,EAAE;gBAChD,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YACH,MAAM,MAAM,EAAE,CAAC;QACjB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,EACD,CAAC,MAAM,EAAE,MAAM,CAAC,CACjB,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * §L3 prebuilt-component EXTENSION API (Clerk `<UserButton.MenuItems>` /
4
+ * `<UserButton.Action>` / `<UserButton.Link>`).
5
+ *
6
+ * These are *descriptor* components: they render nothing on their own. A parent
7
+ * (`<UserButton>`) walks its children, matches these by identity, and turns each
8
+ * into a real menu entry it controls — so custom items sit inside the prebuilt
9
+ * dropdown's markup/appearance rather than being bolted on outside it. This is
10
+ * the same static-subcomponent pattern Clerk uses (`UserButton.Action`, etc.).
11
+ */
12
+ export interface MenuActionProps {
13
+ /** The row's text. */
14
+ label: ReactNode;
15
+ /** Optional leading icon/element. */
16
+ labelIcon?: ReactNode;
17
+ /** Invoked when the row is chosen. */
18
+ onClick?: () => void;
19
+ }
20
+ export interface MenuLinkProps {
21
+ label: ReactNode;
22
+ labelIcon?: ReactNode;
23
+ /** Where the row navigates. */
24
+ href: string;
25
+ }
26
+ /** A container for custom `<UserButton.Action>` / `<UserButton.Link>` rows. Renders nothing itself. */
27
+ declare function UserButtonMenuItems(_props: {
28
+ children?: ReactNode;
29
+ }): null;
30
+ /** A custom action row inside `<UserButton.MenuItems>`. Renders nothing itself. */
31
+ declare function UserButtonAction(_props: MenuActionProps): null;
32
+ /** A custom link row inside `<UserButton.MenuItems>`. Renders nothing itself. */
33
+ declare function UserButtonLink(_props: MenuLinkProps): null;
34
+ /**
35
+ * The signed-in user's avatar + dropdown. Pass `<UserButton.MenuItems>` children
36
+ * to add custom `<UserButton.Action>` / `<UserButton.Link>` rows above sign-out.
37
+ */
38
+ export declare function UserButton({ children }?: {
39
+ children?: ReactNode;
40
+ }): import("react").JSX.Element | null;
41
+ export declare namespace UserButton {
42
+ var MenuItems: typeof UserButtonMenuItems;
43
+ var Action: typeof UserButtonAction;
44
+ var Link: typeof UserButtonLink;
45
+ }
46
+ /**
47
+ * The signed-in user's avatar (image, or initials fallback) — the standalone
48
+ * renderer `<UserButton>` uses internally, exported for reuse (Clerk `<UserAvatar>`).
49
+ */
50
+ export declare function UserAvatar({ size, className }: {
51
+ size?: number;
52
+ className?: string;
53
+ }): import("react").JSX.Element | null;
54
+ export {};
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserButton = UserButton;
4
+ exports.UserAvatar = UserAvatar;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const hooks_1 = require("./hooks");
8
+ const components_shared_1 = require("./components-shared");
9
+ /** A container for custom `<UserButton.Action>` / `<UserButton.Link>` rows. Renders nothing itself. */
10
+ function UserButtonMenuItems(_props) {
11
+ return null;
12
+ }
13
+ /** A custom action row inside `<UserButton.MenuItems>`. Renders nothing itself. */
14
+ function UserButtonAction(_props) {
15
+ return null;
16
+ }
17
+ /** A custom link row inside `<UserButton.MenuItems>`. Renders nothing itself. */
18
+ function UserButtonLink(_props) {
19
+ return null;
20
+ }
21
+ function collectMenuEntries(children) {
22
+ return (0, components_shared_1.collectByType)(children, (el) => {
23
+ if (el.type === UserButtonAction)
24
+ return { kind: 'action', props: el.props };
25
+ if (el.type === UserButtonLink)
26
+ return { kind: 'link', props: el.props };
27
+ return undefined;
28
+ });
29
+ }
30
+ /**
31
+ * The signed-in user's avatar + dropdown. Pass `<UserButton.MenuItems>` children
32
+ * to add custom `<UserButton.Action>` / `<UserButton.Link>` rows above sign-out.
33
+ */
34
+ function UserButton({ children } = {}) {
35
+ const { user } = (0, hooks_1.useUser)();
36
+ const { signOut } = (0, hooks_1.useAuth)();
37
+ const { session } = (0, hooks_1.useSession)();
38
+ const { sessions, setActive } = (0, hooks_1.useSessionList)();
39
+ const t = (0, components_shared_1.useText)();
40
+ const [open, setOpen] = (0, react_1.useState)(false);
41
+ const avatarClass = (0, components_shared_1.useClass)('avatar', 'atlas-avatar');
42
+ const menuClass = (0, components_shared_1.useClass)('menu', 'atlas-menu');
43
+ const itemClass = (0, components_shared_1.useClass)('menuItem', 'atlas-menu-item');
44
+ const custom = (0, react_1.useMemo)(() => collectMenuEntries(children), [children]);
45
+ if (!user)
46
+ return null;
47
+ const label = [user.first_name, user.last_name].filter(Boolean).join(' ') || user.username || '';
48
+ const nameOf = (u) => [u.first_name, u.last_name].filter(Boolean).join(' ') || u.username || '';
49
+ // §L1 the OTHER accounts signed in on this browser (switchable in one click).
50
+ const others = sessions.filter((s) => s.id !== session?.id);
51
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "atlas-user-button", children: [(0, jsx_runtime_1.jsx)("button", { className: avatarClass, onClick: () => setOpen((o) => !o), "aria-expanded": open, children: user.image_url ? (0, jsx_runtime_1.jsx)("img", { alt: "", src: user.image_url }) : (0, jsx_runtime_1.jsx)("span", { children: label.slice(0, 1) }) }), open ? ((0, jsx_runtime_1.jsxs)("div", { className: menuClass, role: "menu", children: [(0, jsx_runtime_1.jsx)("span", { className: itemClass, children: label }), others.map((s) => ((0, jsx_runtime_1.jsxs)("button", { className: itemClass, role: "menuitem", "data-atlas": "switch-session", onClick: () => {
52
+ setOpen(false);
53
+ void setActive({ session: s.id });
54
+ }, children: [s.user.image_url ? ((0, jsx_runtime_1.jsx)("img", { alt: "", src: s.user.image_url, width: 16, height: 16 })) : null, t('userButton.switchTo'), " ", nameOf(s.user)] }, s.id))), custom.map((entry, i) => entry.kind === 'action' ? ((0, jsx_runtime_1.jsxs)("button", { className: itemClass, role: "menuitem", onClick: () => {
55
+ setOpen(false);
56
+ entry.props.onClick?.();
57
+ }, children: [entry.props.labelIcon, entry.props.label] }, i)) : ((0, jsx_runtime_1.jsxs)("a", { className: itemClass, role: "menuitem", href: entry.props.href, children: [entry.props.labelIcon, entry.props.label] }, i))), (0, jsx_runtime_1.jsx)("button", { className: itemClass, role: "menuitem", onClick: () => void signOut(), children: t('userButton.signOut') })] })) : null] }));
58
+ }
59
+ UserButton.MenuItems = UserButtonMenuItems;
60
+ UserButton.Action = UserButtonAction;
61
+ UserButton.Link = UserButtonLink;
62
+ /**
63
+ * The signed-in user's avatar (image, or initials fallback) — the standalone
64
+ * renderer `<UserButton>` uses internally, exported for reuse (Clerk `<UserAvatar>`).
65
+ */
66
+ function UserAvatar({ size = 32, className }) {
67
+ const { user } = (0, hooks_1.useUser)();
68
+ const avatarClass = (0, components_shared_1.useClass)('avatar', 'atlas-avatar');
69
+ if (!user)
70
+ return null;
71
+ const label = [user.first_name, user.last_name].filter(Boolean).join(' ') || user.username || '';
72
+ const style = { width: size, height: size };
73
+ return ((0, jsx_runtime_1.jsx)("span", { className: className ?? avatarClass, style: style, "data-atlas": "user-avatar", children: user.image_url ? (0, jsx_runtime_1.jsx)("img", { alt: "", src: user.image_url, width: size, height: size }) : (0, jsx_runtime_1.jsx)("span", { children: label.slice(0, 1).toUpperCase() }) }));
74
+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OAAO,CACL,iCAAM,SAAS,EAAE,SAAS,IAAI,WAAW,EAAE,KAAK,EAAE,KAAK,gBAAa,aAAa,YAC9E,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,gCAAK,GAAG,EAAC,EAAE,EAAC,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,2CAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAQ,GAC5H,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Clerk-parity `useWaitlist()`. Headless join: `join(email)` posts the address to
3
+ * the waitlist endpoint and hands back the raw {@link FapiClient} response, so a
4
+ * caller rendering its own form decides what to show on success vs. failure.
5
+ */
6
+ export declare function useWaitlist(): {
7
+ join: (email: string) => Promise<import("@atlasauth/js").FapiResponse<unknown>>;
8
+ };
9
+ /**
10
+ * Clerk-parity `<Waitlist>`. An email-and-submit card (styled like `<SignUp>`)
11
+ * that calls {@link useWaitlist}. A 200 swaps the form for a success message; any
12
+ * other response surfaces the server's message as a field error, so a bad or
13
+ * duplicate address is reported in place rather than silently swallowed.
14
+ */
15
+ export declare function Waitlist(): import("react").JSX.Element;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useWaitlist = useWaitlist;
4
+ exports.Waitlist = Waitlist;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const react_1 = require("react");
7
+ const components_shared_1 = require("./components-shared");
8
+ /**
9
+ * Clerk-parity `useWaitlist()`. Headless join: `join(email)` posts the address to
10
+ * the waitlist endpoint and hands back the raw {@link FapiClient} response, so a
11
+ * caller rendering its own form decides what to show on success vs. failure.
12
+ */
13
+ function useWaitlist() {
14
+ const client = (0, components_shared_1.useMeClient)();
15
+ const join = (0, react_1.useCallback)((email) => client.post('/v1/client/waitlist', { email_address: email }), [client]);
16
+ return { join };
17
+ }
18
+ /**
19
+ * Clerk-parity `<Waitlist>`. An email-and-submit card (styled like `<SignUp>`)
20
+ * that calls {@link useWaitlist}. A 200 swaps the form for a success message; any
21
+ * other response surfaces the server's message as a field error, so a bad or
22
+ * duplicate address is reported in place rather than silently swallowed.
23
+ */
24
+ function Waitlist() {
25
+ const { join } = useWaitlist();
26
+ const t = (0, components_shared_1.useText)();
27
+ const cardClass = (0, components_shared_1.useClass)('card', 'atlas-card');
28
+ const titleClass = (0, components_shared_1.useClass)('headerTitle', 'atlas-title');
29
+ const inputClass = (0, components_shared_1.useClass)('formFieldInput', 'atlas-input');
30
+ const buttonClass = (0, components_shared_1.useClass)('formButtonPrimary', 'atlas-button');
31
+ const errorClass = (0, components_shared_1.useClass)('formFieldError', 'atlas-error');
32
+ const [email, setEmail] = (0, react_1.useState)('');
33
+ const [busy, setBusy] = (0, react_1.useState)(false);
34
+ const [joined, setJoined] = (0, react_1.useState)(false);
35
+ const [error, setError] = (0, react_1.useState)(null);
36
+ const submit = async () => {
37
+ setBusy(true);
38
+ setError(null);
39
+ const res = await join(email);
40
+ setBusy(false);
41
+ if (res.ok) {
42
+ setJoined(true);
43
+ return;
44
+ }
45
+ setError(res.errors[0]?.message ?? t('error.generic'));
46
+ };
47
+ return ((0, jsx_runtime_1.jsxs)("form", { className: cardClass, "data-atlas": "waitlist", onSubmit: (event) => {
48
+ event.preventDefault();
49
+ void submit();
50
+ }, children: [(0, jsx_runtime_1.jsx)("h1", { className: titleClass, children: t('waitlist.title') }), joined ? ((0, jsx_runtime_1.jsx)("p", { "data-atlas": "waitlist-success", children: t('waitlist.success') })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("label", { className: "atlas-field", children: [(0, jsx_runtime_1.jsx)("span", { children: t('waitlist.emailLabel') }), (0, jsx_runtime_1.jsx)("input", { className: inputClass, type: "email", value: email, onChange: (event) => setEmail(event.target.value) }), error ? ((0, jsx_runtime_1.jsx)("span", { className: errorClass, role: "alert", children: error })) : null] }), (0, jsx_runtime_1.jsx)("button", { className: buttonClass, type: "submit", disabled: busy, children: t('waitlist.submit') })] }))] }));
51
+ }
52
+ //# sourceMappingURL=waitlist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"waitlist.js","sourceRoot":"","sources":["../src/waitlist.tsx"],"names":[],"mappings":";;AAQA,kCAOC;AAQD,4BA6DC;;AApFD,iCAA8C;AAC9C,2DAAqE;AAErE;;;;GAIG;AACH,SAAgB,WAAW;IACzB,MAAM,MAAM,GAAG,IAAA,+BAAW,GAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,mBAAW,EACtB,CAAC,KAAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAC/E,CAAC,MAAM,CAAC,CACT,CAAC;IACF,OAAO,EAAE,IAAI,EAAE,CAAC;AAClB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ;IACtB,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,CAAC,GAAG,IAAA,2BAAO,GAAE,CAAC;IACpB,MAAM,SAAS,GAAG,IAAA,4BAAQ,EAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,IAAA,4BAAQ,EAAC,aAAa,EAAE,aAAa,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,IAAA,4BAAQ,EAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IAC7D,MAAM,WAAW,GAAG,IAAA,4BAAQ,EAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,IAAA,4BAAQ,EAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;IAE7D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAA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,KAAK,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GACjD,EACD,KAAK,CAAC,CAAC,CAAC,CACP,iCAAM,SAAS,EAAE,UAAU,EAAE,IAAI,EAAC,OAAO,YACtC,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,IACF,EACR,mCAAQ,SAAS,EAAE,WAAW,EAAE,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,IAAI,YACzD,CAAC,CAAC,iBAAiB,CAAC,GACd,IACR,CACJ,IACI,CACR,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@atlasauth/react",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {
7
- "@atlasauth/js": "0.1.4",
7
+ "@atlasauth/js": "0.1.5",
8
8
  "@atlasauth/authz": "0.1.1"
9
9
  },
10
10
  "peerDependencies": {