@wacht/jsx 1.0.0-beta.3 → 1.0.0-beta.30

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/README.md CHANGED
@@ -1,13 +1,21 @@
1
- <h1 align="center">
2
- <a href="https://wacht.dev" style="text-decoration:none;">@wacht/jsx</a>
3
- </h1>
1
+ # @wacht/jsx
4
2
 
5
- <p align="center">Core React primitives for Wacht authentication, session state, organization/workspace context, and product surface hooks.</p>
3
+ Shared React components and hooks for building Wacht-powered product surfaces.
6
4
 
7
- <p align="center">
8
- <a href="https://docs.wacht.dev">Documentation</a> |
9
- <a href="https://www.npmjs.com/package/@wacht/jsx">npm</a>
10
- </p>
5
+ Use `@wacht/jsx` when you want the core Wacht React layer without committing to a framework adapter. If you are using Next.js, React Router, or TanStack Router, you will usually install the adapter package instead and import the same primitives from there.
6
+
7
+ - Docs: https://docs.wacht.dev
8
+ - npm: https://www.npmjs.com/package/@wacht/jsx
9
+
10
+ ## What it includes
11
+
12
+ `@wacht/jsx` contains the shared client-side building blocks behind the framework adapters:
13
+
14
+ - auth UI such as `SignInForm`, `SignUpForm`, `WaitlistForm`, `SSOCallback`, and `MagicLinkVerification`
15
+ - control components such as `SignedIn`, `SignedOut`, `SignedInAccounts`, and `NavigateToSignIn`
16
+ - account and tenancy components such as `UserButton`, `UserControls`, `ManageAccount`, `ManageOrganization`, `ManageWorkspace`, `CreateOrganizationForm`, and `CreateWorkspaceForm`
17
+ - notifications components such as `NotificationBell`, `NotificationPopover`, and `NotificationPanel`
18
+ - shared hooks for auth, session state, multi-tenancy, notifications, agents, webhooks, and API identity
11
19
 
12
20
  ## Install
13
21
 
@@ -15,15 +23,23 @@
15
23
  pnpm add @wacht/jsx @wacht/types
16
24
  ```
17
25
 
18
- ## Quick start
26
+ ## Basic usage
19
27
 
20
28
  ```tsx
21
- import { DeploymentProvider, SignedIn, SignedOut, SignInForm } from "@wacht/jsx";
22
-
23
- export function App() {
29
+ import {
30
+ DeploymentProvider,
31
+ SignedIn,
32
+ SignedOut,
33
+ SignInForm,
34
+ } from "@wacht/jsx";
35
+
36
+ export default function App() {
24
37
  return (
25
38
  <DeploymentProvider publicKey={import.meta.env.VITE_WACHT_PUBLISHABLE_KEY}>
26
- <SignedIn>Signed in</SignedIn>
39
+ <SignedIn>
40
+ <div>Signed in</div>
41
+ </SignedIn>
42
+
27
43
  <SignedOut>
28
44
  <SignInForm />
29
45
  </SignedOut>
@@ -32,26 +48,32 @@ export function App() {
32
48
  }
33
49
  ```
34
50
 
35
- ## Main exports
51
+ ## What `DeploymentProvider` does
52
+
53
+ `DeploymentProvider` is the shared root for the client SDK. It:
54
+
55
+ - resolves deployment configuration from the `publicKey`
56
+ - exposes deployment-aware client state to the hooks
57
+ - powers navigation-aware auth components through the platform adapter
58
+ - lets you override deployment UI settings with `uiOverrides` when you are embedding auth UI inside your own app
36
59
 
37
- Components:
60
+ ## Main hook families
38
61
 
39
- - Auth UI: `SignInForm`, `SignUpForm`, `WaitlistForm`, `SSOCallback`, `MagicLinkVerification`
40
- - Session and navigation: `SignedIn`, `SignedOut`, `SignedInAccounts`, `NavigateToSignIn`
41
- - User/account: `UserButton`, `UserControls`, `ManageAccount`
42
- - Notifications: `NotificationBell`, `NotificationPopover`, `NotificationPanel`
62
+ - state and context: `useDeployment`, `useClient`, `useSession`, `useUser`, `useNavigation`
63
+ - auth flows: `useSignIn`, `useSignUp`, `useSSOCallback`, `useMagicLinkVerification`, `useForgotPassword`, `useInvitation`, `useWaitlist`, `useUserSignins`
64
+ - multi tenancy: `useOrganizationList`, `useActiveOrganization`, `useWorkspaceList`, `useActiveWorkspace`, `useActiveTenancy`, `useOrganizationMemberships`, `useWorkspaceMemberships`
65
+ - notifications: `useNotifications`, `useNotificationStream`, `useNotificationUnreadCount`
66
+ - platform surfaces: agent, webhook, and API identity hooks
43
67
 
44
- Hooks:
68
+ ## Framework adapters
45
69
 
46
- - Auth/session: `useUser`, `useSession`, `useSignIn`, `useSignUp`, `useForgotPassword`
47
- - Tenancy: `useActiveOrganization`, `useActiveWorkspace`, `useActiveTenancy`
48
- - Notifications: `useNotifications`, `useNotificationStream`, `useScopeUnread`
49
- - Agent/webhook/api-auth surfaces: `useAgentSession`, `useWebhookEndpoints`, `useApiAuthKeys`, and related hooks
70
+ If you are already using one of the supported router integrations, prefer importing from the adapter package instead of `@wacht/jsx` directly:
50
71
 
51
- Utilities:
72
+ - `@wacht/nextjs`
73
+ - `@wacht/react-router`
74
+ - `@wacht/tanstack-router`
52
75
 
53
- - Permission helpers (organization/workspace)
54
- - URL safety helpers
76
+ Those packages re-export the shared JSX layer and add the framework-specific provider and server helpers.
55
77
 
56
78
  ## Build
57
79