From 60056adad625b868fac2b0ca0f7e3c30ef6250fe Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Fri, 13 Mar 2026 17:06:26 -0600 Subject: [PATCH 1/5] Add initial setup --- .typedoc/custom-plugin.mjs | 17 +++++++++++++++ packages/react/src/hooks/useClerkSignal.ts | 8 +++---- packages/shared/src/types/state.ts | 25 ++++++++++++++++------ 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/.typedoc/custom-plugin.mjs b/.typedoc/custom-plugin.mjs index aca8cc799fe..68a56cd9f1c 100644 --- a/.typedoc/custom-plugin.mjs +++ b/.typedoc/custom-plugin.mjs @@ -52,7 +52,11 @@ const LINK_REPLACEMENTS = [ ['session-resource', '/docs/reference/objects/session'], ['signed-in-session-resource', '/docs/reference/objects/session'], ['sign-in-resource', '/docs/reference/objects/sign-in'], + ['sign-in-future-resource', '/docs/reference/objects/sign-in-future'], + ['sign-in-errors', '/docs/reference/javascript/types/errors'], ['sign-up-resource', '/docs/reference/objects/sign-up'], + ['sign-up-future-resource', '/docs/reference/objects/sign-up-future'], + ['sign-up-errors', '/docs/reference/javascript/types/errors'], ['user-resource', '/docs/reference/objects/user'], ['session-status-claim', '/docs/reference/types/session-status'], ['user-organization-invitation-resource', '/docs/reference/types/user-organization-invitation'], @@ -157,6 +161,15 @@ function getCatchAllReplacements() { pattern: /(? + `[${type}](/docs/reference/javascript/types/errors)`, + }, + { + pattern: /(? { return useClerkSignal('signIn'); -} +}; /** * This hook allows you to access the Signal-based `SignUp` resource. @@ -98,9 +98,9 @@ export function useSignIn() { * // * } */ -export function useSignUp() { +export const useSignUp = (): SignUpSignalValue => { return useClerkSignal('signUp'); -} +}; /** * This hook allows you to access the Signal-based `Waitlist` resource. diff --git a/packages/shared/src/types/state.ts b/packages/shared/src/types/state.ts index 7c065226454..17d6c289993 100644 --- a/packages/shared/src/types/state.ts +++ b/packages/shared/src/types/state.ts @@ -126,19 +126,24 @@ export type SignUpErrors = Errors; export type WaitlistErrors = Errors; /** + * @inline + * * The value returned by the `useSignInSignal` hook. */ export interface SignInSignalValue { /** - * Represents the errors that occurred during the last fetch of the parent resource. + * The errors that occurred during the last fetch of the underlying `SignInFuture` resource. */ errors: SignInErrors; /** - * The fetch status of the underlying `SignIn` resource. + * The fetch status of the underlying `SignInFuture` resource. */ fetchStatus: 'idle' | 'fetching'; /** - * An instance representing the currently active `SignIn`, with new APIs designed specifically for custom flows. + * An instance representing the currently active `SignInFuture`, with new APIs designed specifically for custom flows. + * + * > [!IMPORTANT] + * > The `SignInFuture` instance referenced by `signIn` does not have a stable identity, and will change as the sign-in flow progresses. Make sure you provide it in dependency arrays when using hooks such as `useEffect`, `useCallback`, or `useMemo`. */ signIn: SignInFutureResource; } @@ -149,17 +154,25 @@ export interface SignInSignal { (): NullableSignInSignal; } +/** + * @inline + * + * The value returned by the `useSignUpSignal` hook. + */ export interface SignUpSignalValue { /** - * The errors that occurred during the last fetch of the underlying `SignUp` resource. + * The errors that occurred during the last fetch of the underlying `SignUpFuture` resource. */ errors: SignUpErrors; /** - * The fetch status of the underlying `SignUp` resource. + * The fetch status of the underlying `SignUpFuture` resource. */ fetchStatus: 'idle' | 'fetching'; /** - * The underlying `SignUp` resource. + * The underlying `SignUpFuture` resource + * + * > [!IMPORTANT] + * > The `SignUpFuture` instance referenced by `signUp` does not have a stable identity, and will change as the sign-up flow progresses. Make sure you provide it in dependency arrays when using hooks such as `useEffect`, `useCallback`, or `useMemo`. */ signUp: SignUpFutureResource; } From 917a8dc7773a0200fbab34af0b68a3f43e418f37 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Tue, 17 Mar 2026 12:55:03 -0500 Subject: [PATCH 2/5] Remove callouts --- packages/shared/src/types/state.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/shared/src/types/state.ts b/packages/shared/src/types/state.ts index 17d6c289993..0f5aed83f59 100644 --- a/packages/shared/src/types/state.ts +++ b/packages/shared/src/types/state.ts @@ -141,9 +141,6 @@ export interface SignInSignalValue { fetchStatus: 'idle' | 'fetching'; /** * An instance representing the currently active `SignInFuture`, with new APIs designed specifically for custom flows. - * - * > [!IMPORTANT] - * > The `SignInFuture` instance referenced by `signIn` does not have a stable identity, and will change as the sign-in flow progresses. Make sure you provide it in dependency arrays when using hooks such as `useEffect`, `useCallback`, or `useMemo`. */ signIn: SignInFutureResource; } @@ -170,9 +167,6 @@ export interface SignUpSignalValue { fetchStatus: 'idle' | 'fetching'; /** * The underlying `SignUpFuture` resource - * - * > [!IMPORTANT] - * > The `SignUpFuture` instance referenced by `signUp` does not have a stable identity, and will change as the sign-up flow progresses. Make sure you provide it in dependency arrays when using hooks such as `useEffect`, `useCallback`, or `useMemo`. */ signUp: SignUpFutureResource; } From 27bb1802d8609fb816a0bd21b7f8ce6e6cab6661 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Tue, 17 Mar 2026 13:14:04 -0500 Subject: [PATCH 3/5] Add changeset --- .changeset/fresh-crabs-run.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/fresh-crabs-run.md diff --git a/.changeset/fresh-crabs-run.md b/.changeset/fresh-crabs-run.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/fresh-crabs-run.md @@ -0,0 +1,2 @@ +--- +--- From 676251237872f1635b45d707544057995c603970 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Tue, 17 Mar 2026 14:57:53 -0500 Subject: [PATCH 4/5] Update packages/shared/src/types/state.ts Co-authored-by: Michael Novotny --- packages/shared/src/types/state.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/src/types/state.ts b/packages/shared/src/types/state.ts index 0f5aed83f59..ffdc7574955 100644 --- a/packages/shared/src/types/state.ts +++ b/packages/shared/src/types/state.ts @@ -166,7 +166,7 @@ export interface SignUpSignalValue { */ fetchStatus: 'idle' | 'fetching'; /** - * The underlying `SignUpFuture` resource + * The underlying `SignUpFuture` resource. */ signUp: SignUpFutureResource; } From d558279024808dc4f182db1a47aebac81ea458a5 Mon Sep 17 00:00:00 2001 From: Sarah Soutoul Date: Tue, 17 Mar 2026 14:58:25 -0500 Subject: [PATCH 5/5] Update .typedoc/custom-plugin.mjs Co-authored-by: Michael Novotny --- .typedoc/custom-plugin.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.typedoc/custom-plugin.mjs b/.typedoc/custom-plugin.mjs index 68a56cd9f1c..9632735a98e 100644 --- a/.typedoc/custom-plugin.mjs +++ b/.typedoc/custom-plugin.mjs @@ -164,7 +164,7 @@ function getCatchAllReplacements() { { pattern: /(? - `[${type}](/docs/reference/javascript/types/errors)`, + `[\`${type}\`](/docs/reference/javascript/types/errors)`, }, { pattern: /(?