@fluid-app/fluid-cli-portal 0.1.15 → 0.1.17

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.
@@ -7,9 +7,8 @@
7
7
  * Uncomment the nav entry and import in portal.config.ts to enable.
8
8
  */
9
9
 
10
- import { useForm } from "react-hook-form";
11
10
  import { z } from "zod";
12
- import { zodResolver } from "@hookform/resolvers/zod";
11
+ import { useZodForm } from "@fluid-app/ui-primitives";
13
12
 
14
13
  // =============================================================================
15
14
  // Zod Schema
@@ -41,9 +40,7 @@ export function ExampleFormScreen() {
41
40
  handleSubmit,
42
41
  reset,
43
42
  formState: { errors, isSubmitting, isSubmitSuccessful },
44
- } = useForm<ContactFormData>({
45
- resolver: zodResolver(contactFormSchema),
46
- });
43
+ } = useZodForm<ContactFormData>(contactFormSchema);
47
44
 
48
45
  const onSubmit = async (_data: ContactFormData) => {
49
46
  // Replace with your API call, e.g.:
@@ -1 +1,6 @@
1
1
  VITE_API_URL=https://api.fluid.app
2
+
3
+ # Optional: override the Fluid CLI auth token for this project.
4
+ # Takes effect when running `pnpm pull`, `pnpm push`, etc.
5
+ # Alternatively, set the "profile" field in .fluidrc (committed to the repo).
6
+ # FLUID_TOKEN=
@@ -156,9 +156,8 @@ pnpm add react-hook-form zod @hookform/resolvers
156
156
  ### Example
157
157
 
158
158
  ```tsx
159
- import { useForm } from "react-hook-form";
160
159
  import { z } from "zod";
161
- import { zodResolver } from "@hookform/resolvers/zod";
160
+ import { useZodForm } from "@fluid-app/ui-primitives";
162
161
 
163
162
  const schema = z.object({
164
163
  name: z.string().min(1, "Name is required"),
@@ -172,9 +171,7 @@ export function MyFormScreen() {
172
171
  register,
173
172
  handleSubmit,
174
173
  formState: { errors, isSubmitting },
175
- } = useForm<FormData>({
176
- resolver: zodResolver(schema),
177
- });
174
+ } = useZodForm<FormData>(schema);
178
175
 
179
176
  const onSubmit = async (data: FormData) => {
180
177
  // Call your API here
@@ -8,20 +8,25 @@
8
8
  "build": "tsc -b && vite build",
9
9
  "preview": "vite preview",
10
10
  "typecheck": "tsc --noEmit",
11
- "lint": "oxlint"
11
+ "lint": "oxlint",
12
+ "pull": "fluid portal pull",
13
+ "push": "fluid portal push",
14
+ "widget:create": "fluid portal widget create"
12
15
  },
13
16
  "dependencies": {
14
- "@fluid-app/portal-preview": "{{sdkVersion}}",
15
17
  "@fluid-app/portal-sdk": "{{sdkVersion}}",
18
+ "@fluid-app/ui-primitives": "^0.1.0",
16
19
  "@tanstack/react-query": "^5.90.0",
17
20
  "react": "^19.0.0",
18
21
  "react-dom": "^19.0.0",
19
22
  "react-hook-form": "^7.55.0",
20
23
  "@hookform/resolvers": "^4.1.3",
21
- "zod": "^3.24.0"
24
+ "zod": "^3.24.0",
25
+ "zustand": "^5.0.0"
22
26
  },
23
27
  "devDependencies": {
24
- "@fluid-app/fluid-cli-portal": "{{sdkVersion}}",
28
+ "@fluid-app/fluid-cli": "{{cliVersion}}",
29
+ "@fluid-app/fluid-cli-portal": "{{cliVersion}}",
25
30
  "@tailwindcss/vite": "^4.0.0",
26
31
  "@types/react": "^19.0.0",
27
32
  "@types/react-dom": "^19.0.0",