@wacht/jsx 0.0.1-alpha.9 → 1.0.0-beta.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/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2025 Intellinesia Labs
6
+
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+ SPDX-License-Identifier: Apache-2.0
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @wacht/jsx
2
+
3
+ Core React UI/auth package for Wacht.
4
+
5
+ Use this package directly for framework-agnostic React apps, or through:
6
+ - `@wacht/nextjs`
7
+ - `@wacht/react-router`
8
+ - `@wacht/tanstack-router`
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pnpm add @wacht/jsx @wacht/types
14
+ ```
15
+
16
+ ## Basic Setup
17
+
18
+ ```tsx
19
+ import { DeploymentProvider, SignInForm, SignedIn, SignedOut } from "@wacht/jsx";
20
+
21
+ export function App() {
22
+ return (
23
+ <DeploymentProvider publicKey={process.env.NEXT_PUBLIC_WACHT_PUBLISHABLE_KEY!}>
24
+ <SignedIn>
25
+ <div>Signed in</div>
26
+ </SignedIn>
27
+ <SignedOut>
28
+ <SignInForm />
29
+ </SignedOut>
30
+ </DeploymentProvider>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ## Includes
36
+
37
+ - Components: `SignInForm`, `SignUpForm`, `UserButton`, `SignedIn`, `SignedOut`, etc.
38
+ - Hooks: `useUser`, `useSession`, `useDeployment`, `useSignIn`, `useSignUp`, etc.
39
+ - Permission helpers: `hasOrgPermission`, `hasWorkspacePermission`, `isOrgAdmin`, `isWorkspaceAdmin`
40
+
41
+ For router-aware navigation behavior, use one of the framework adapters instead of raw `@wacht/jsx`.
42
+
43
+ ## License
44
+
45
+ Licensed under the Apache License, Version 2.0. See [LICENSE.md](../LICENSE.md).