@fragno-dev/forms 0.0.3 → 0.1.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/README.md CHANGED
@@ -1,47 +1,181 @@
1
- # @fragno-dev/forms
1
+ <div align="center">
2
+ <h3>Fragno Forms: Form Builder Library</h3>
3
+ <a href="https://fragno.dev/forms">Live Demo</a> •
4
+ <a href="https://fragno.dev/docs/forms">Documentation</a> •
5
+ <a href="https://fragno.dev/docs/forms/shadcn-renderer">Shadcn Renderer</a> •
6
+ <a href="https://fragno.dev/docs/forms/form-builder">Shadcn Form builder</a>
7
+ </div>
2
8
 
3
- A [Fragno](https://fragno.dev/) fragment for building dynamic forms using
4
- [JSON Forms](https://jsonforms.io/).
9
+ The Form fragment for Fragno provides form management and response collection using open standards:
10
+ [JSON Schema](https://json-schema.org/) and [JSON Forms](https://jsonforms.io/).
5
11
 
6
- ## Installation
12
+ - DB Schemas, request handlers and frontend hooks included
13
+ - Store form definitions and responses in your own database
14
+ - Form builder shadcn/ui component with Google Forms like UX
15
+ - Integrates with any TypeScript stack
16
+ - Form validation using Zod/Ajv
17
+
18
+ <div align="center">
19
+ <img src="../../assets/forms-screenshot.webp"/>
20
+ </div>
21
+
22
+ ## Quickstart
23
+
24
+ ### Installation
7
25
 
8
26
  ```bash
9
- npm install @fragno-dev/forms
27
+ npm install @fragno-dev/forms @fragno-dev/db
10
28
  ```
11
29
 
12
- ## Usage
30
+ ### 1. Initialize the database adapter
13
31
 
14
- ### Server Setup
32
+ See the
33
+ [Fragno DB docs](https://fragno.dev/docs/fragno/for-users/database-fragments/overview#choose-your-workflow)
34
+ for adapter options. Example with Drizzle ORM and Postgres:
35
+
36
+ ```typescript
37
+ import { SqlAdapter } from "@fragno-dev/db/adapters/sql";
38
+ import { PostgresDialect } from "@fragno-dev/db/dialects";
39
+ import { NodePostgresDriverConfig } from "@fragno-dev/db/drivers";
40
+ import { Pool } from "pg";
41
+
42
+ const dialect = new PostgresDialect({
43
+ pool: new Pool({ connectionString: process.env.DATABASE_URL }),
44
+ });
45
+
46
+ export const fragmentDbAdapter = new SqlAdapter({
47
+ dialect,
48
+ driverConfig: new NodePostgresDriverConfig(),
49
+ });
50
+ ```
51
+
52
+ ### 2. Create server-side instance
15
53
 
16
54
  ```typescript
17
55
  import { createFormsFragment } from "@fragno-dev/forms";
56
+ import { fragmentDbAdapter } from "./db";
18
57
 
19
- const forms = createFormsFragment(
58
+ export const formsFragment = createFormsFragment(
20
59
  {
21
60
  onFormCreated: (form) => console.log("Form created:", form.title),
22
61
  onResponseSubmitted: (response) => console.log("Response submitted:", response.id),
23
62
  },
63
+ { databaseAdapter: fragmentDbAdapter },
64
+ );
65
+ ```
66
+
67
+ ### 3. Mount the fragment routes
68
+
69
+ Mount the api routes in your web framework of choice.
70
+
71
+ ```typescript
72
+ import { Hono } from "hono";
73
+ import { formsFragment } from "@/lib/forms";
74
+
75
+ const app = new Hono();
76
+ app.all("/api/forms/*", (c) => formsFragment.handler(c.req.raw));
77
+ ```
78
+
79
+ ### 4. Generate schemas
80
+
81
+ ```bash
82
+ # Generate schema file
83
+ npx fragno-cli db generate lib/forms.ts --format drizzle -o db/forms.schema.ts
84
+ ```
85
+
86
+ ### 5. Secure admin routes
87
+
88
+ ```typescript
89
+ import { createFormsFragment } from "@fragno-dev/forms";
90
+
91
+ export const formsFragment = createFormsFragment(
24
92
  {
25
- databaseAdapter: yourDatabaseAdapter,
93
+ // ... your config
26
94
  },
27
- );
95
+ { databaseAdapter },
96
+ ).withMiddleware(async ({ path, headers }, { error }) => {
97
+ const isAdmin = getUser(headers).role === "admin";
98
+
99
+ if (path.startsWith("/admin") && !isAdmin) {
100
+ return error({ message: "Not authorized", code: "NOT_AUTHORIZED" }, 401);
101
+ }
102
+ });
28
103
  ```
29
104
 
30
- ## Issues
105
+ ### Client setup
106
+
107
+ Create a client instance to use the fragment in your frontend. See
108
+ [our docs full reference of all hooks](https://fragno.dev/docs/forms/hooks).
109
+
110
+ ```typescript
111
+ import { createFormsClient } from "@fragno-dev/forms/react";
112
+
113
+ export const formsClient = createFormsClient();
114
+
115
+ const { data: form } = formsClient.useForm({ slug: "my-form" });
116
+ const { mutate: submitForm } = formsClient.useSubmitForm({ slug: "my-form" });
117
+ // For admins
118
+ const { data: submissions } = formsClient.useSubmissions({ id });
119
+ ```
120
+
121
+ ### Form Builder
122
+
123
+ For shadcn/ui projects, we provide a visual form builder component:
124
+
125
+ ```bash
126
+ pnpm dlx shadcn@latest add https://fragno.dev/forms/form-builder.json
127
+ ```
128
+
129
+ ### Creating a Form
130
+
131
+ Forms can be created dynamically at runtime using the admin hooks, or defined statically in code.
132
+
133
+ ```typescript
134
+ const { mutate: createForm } = formsClient.useCreateForm();
135
+
136
+ await createForm({
137
+ body: {
138
+ title: "Contact Us",
139
+ slug: "contact",
140
+ status: "open",
141
+ dataSchema: {
142
+ type: "object",
143
+ properties: {
144
+ name: { type: "string", minLength: 1 },
145
+ email: { type: "string", format: "email" },
146
+ message: { type: "string", minLength: 10 },
147
+ },
148
+ required: ["name", "email", "message"],
149
+ },
150
+ uiSchema: {
151
+ type: "VerticalLayout",
152
+ elements: [
153
+ { type: "Control", scope: "#/properties/name" },
154
+ { type: "Control", scope: "#/properties/email" },
155
+ { type: "Control", scope: "#/properties/message", options: { multi: true } },
156
+ ],
157
+ },
158
+ },
159
+ });
160
+ ```
161
+
162
+ ### Submitting a Form
163
+
164
+ ```typescript
165
+ const { data: form } = formsClient.useForm({ pathParams: { slug: "contact" } });
166
+ const { mutate: submit } = formsClient.useSubmitForm();
167
+
168
+ await submit({
169
+ pathParams: { slug: "contact" },
170
+ body: { data: formData },
171
+ });
172
+ ```
31
173
 
32
- - pagination submissions/forms lists
33
- - Currently we always filter by formId for submissions, as we sort by a different column we need a
34
- composite index on formId and submittedAt. This needs Multi-cursor pagination which is not yet
35
- supported.
174
+ ### Rendering Forms
36
175
 
37
- ## TODO
176
+ The Form fragment stores forms using [JSON Schema](https://json-schema.org/) for data validation and
177
+ [JSONForms UI Schema](https://jsonforms.io/) for layout.
38
178
 
39
- - Improved UX for server side form validation
40
- - See if zod "fromJsonSchema" is nice for this
41
- - Interactive form builder (use AI for now :thumbsup:)
42
- - Aggregated form submission results
43
- - CSV/Excel/Sheets exports
44
- - File Uploads (another fragment maybe?)
45
- - Editable submissions
46
- - Multiple and single response type forms
47
- - Tying external entities to form submissions
179
+ [JSONForms](https://jsonforms.io/) renders forms from these schemas and supports multiple renderer
180
+ sets including Material UI, Vanilla, and custom implementations. For shadcn/ui projects, see our
181
+ [ShadCN Renderer](https://fragno.dev/docs/forms/shadcn-renderer).
@@ -1,132 +1,181 @@
1
- import * as zod783 from "zod";
2
- import * as zod_v4_core53 from "zod/v4/core";
1
+ import * as zod671 from "zod";
2
+ import * as zod_v4_core41 from "zod/v4/core";
3
3
  import * as _fragno_dev_core_react0 from "@fragno-dev/core/react";
4
- import * as _fragno_dev_core_api19 from "@fragno-dev/core/api";
5
- import * as _standard_schema_spec49 from "@standard-schema/spec";
4
+ import * as _fragno_dev_core_api10 from "@fragno-dev/core/api";
5
+ import * as _standard_schema_spec33 from "@standard-schema/spec";
6
6
  import { FragnoPublicClientConfig } from "@fragno-dev/core/client";
7
7
 
8
8
  //#region src/client/react.d.ts
9
9
  declare function createFormsClient(config?: FragnoPublicClientConfig): {
10
- useForm: _fragno_dev_core_react0.FragnoReactHook<"GET", "/:slug", zod783.ZodObject<{
11
- id: zod783.ZodString;
12
- title: zod783.ZodString;
13
- description: zod783.ZodNullable<zod783.ZodString>;
14
- slug: zod783.ZodString;
15
- status: zod783.ZodEnum<{
10
+ useForm: _fragno_dev_core_react0.FragnoReactHook<"GET", "/:slug", zod671.ZodObject<{
11
+ id: zod671.ZodString;
12
+ title: zod671.ZodString;
13
+ description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
14
+ slug: zod671.ZodString;
15
+ status: zod671.ZodEnum<{
16
16
  draft: "draft";
17
17
  open: "open";
18
18
  closed: "closed";
19
19
  static: "static";
20
20
  }>;
21
- dataSchema: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
22
- uiSchema: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
23
- version: zod783.ZodNumber;
24
- createdAt: zod783.ZodDate;
25
- updatedAt: zod783.ZodDate;
26
- }, zod_v4_core53.$strip>, "NOT_FOUND", string>;
27
- useSubmitForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api19.NonGetHTTPMethod, "/:slug/submit", zod783.ZodObject<{
28
- data: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
29
- securityToken: zod783.ZodOptional<zod783.ZodString>;
30
- }, zod_v4_core53.$strip> | undefined, zod783.ZodString | undefined, "NOT_FOUND" | "VALIDATION_ERROR" | "FORM_NOT_OPEN", string>;
31
- useForms: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms", NonNullable<zod783.ZodString | zod783.ZodArray<zod783.ZodObject<{
32
- id: zod783.ZodString;
33
- title: zod783.ZodString;
34
- description: zod783.ZodNullable<zod783.ZodString>;
35
- slug: zod783.ZodString;
36
- status: zod783.ZodEnum<{
21
+ dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
22
+ uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
23
+ version: zod671.ZodNumber;
24
+ createdAt: zod671.ZodDate;
25
+ updatedAt: zod671.ZodDate;
26
+ }, zod_v4_core41.$strip>, "NOT_FOUND", string>;
27
+ useSubmitForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/:slug/submit", zod671.ZodObject<{
28
+ data: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
29
+ securityToken: zod671.ZodOptional<zod671.ZodString>;
30
+ }, zod_v4_core41.$strip> | undefined, zod671.ZodString | undefined, "NOT_FOUND" | "VALIDATION_ERROR" | "FORM_NOT_OPEN", string>;
31
+ useForms: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms", zod671.ZodArray<zod671.ZodObject<{
32
+ id: zod671.ZodString;
33
+ title: zod671.ZodString;
34
+ description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
35
+ slug: zod671.ZodString;
36
+ status: zod671.ZodEnum<{
37
37
  draft: "draft";
38
38
  open: "open";
39
39
  closed: "closed";
40
40
  static: "static";
41
41
  }>;
42
- dataSchema: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
43
- uiSchema: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
44
- version: zod783.ZodNumber;
45
- createdAt: zod783.ZodDate;
46
- updatedAt: zod783.ZodDate;
47
- }, zod_v4_core53.$strip>> | undefined>, string, string>;
48
- useCreateForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api19.NonGetHTTPMethod, "/admin/forms", _standard_schema_spec49.StandardSchemaV1<unknown, unknown> | zod783.ZodObject<{
49
- status: zod783.ZodEnum<{
42
+ dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
43
+ uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
44
+ version: zod671.ZodNumber;
45
+ createdAt: zod671.ZodDate;
46
+ updatedAt: zod671.ZodDate;
47
+ }, zod_v4_core41.$strip>>, string, string>;
48
+ useFormById: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms/:id", zod671.ZodObject<{
49
+ id: zod671.ZodString;
50
+ title: zod671.ZodString;
51
+ description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
52
+ slug: zod671.ZodString;
53
+ status: zod671.ZodEnum<{
50
54
  draft: "draft";
51
55
  open: "open";
52
56
  closed: "closed";
53
57
  static: "static";
54
58
  }>;
55
- title: zod783.ZodString;
56
- description: zod783.ZodNullable<zod783.ZodString>;
57
- slug: zod783.ZodString;
58
- dataSchema: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
59
- uiSchema: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
60
- }, zod_v4_core53.$strip> | undefined, zod783.ZodString | zod783.ZodArray<zod783.ZodObject<{
61
- id: zod783.ZodString;
62
- title: zod783.ZodString;
63
- description: zod783.ZodNullable<zod783.ZodString>;
64
- slug: zod783.ZodString;
65
- status: zod783.ZodEnum<{
59
+ dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
60
+ uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
61
+ version: zod671.ZodNumber;
62
+ createdAt: zod671.ZodDate;
63
+ updatedAt: zod671.ZodDate;
64
+ }, zod_v4_core41.$strip>, "NOT_FOUND", string>;
65
+ useCreateForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/admin/forms", _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
66
+ status: zod671.ZodEnum<{
66
67
  draft: "draft";
67
68
  open: "open";
68
69
  closed: "closed";
69
70
  static: "static";
70
71
  }>;
71
- dataSchema: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
72
- uiSchema: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
73
- version: zod783.ZodNumber;
74
- createdAt: zod783.ZodDate;
75
- updatedAt: zod783.ZodDate;
76
- }, zod_v4_core53.$strip>> | undefined, string, string>;
77
- useUpdateForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api19.NonGetHTTPMethod, "/admin/forms/:id", _standard_schema_spec49.StandardSchemaV1<unknown, unknown> | zod783.ZodObject<{
78
- status: zod783.ZodOptional<zod783.ZodEnum<{
72
+ title: zod671.ZodString;
73
+ description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
74
+ slug: zod671.ZodString;
75
+ dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
76
+ uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
77
+ }, zod_v4_core41.$strip> | undefined, zod671.ZodString | zod671.ZodArray<zod671.ZodObject<{
78
+ id: zod671.ZodString;
79
+ title: zod671.ZodString;
80
+ description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
81
+ slug: zod671.ZodString;
82
+ status: zod671.ZodEnum<{
83
+ draft: "draft";
84
+ open: "open";
85
+ closed: "closed";
86
+ static: "static";
87
+ }>;
88
+ dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
89
+ uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
90
+ version: zod671.ZodNumber;
91
+ createdAt: zod671.ZodDate;
92
+ updatedAt: zod671.ZodDate;
93
+ }, zod_v4_core41.$strip>> | undefined, string, string>;
94
+ useUpdateForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/admin/forms/:id", _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
95
+ status: zod671.ZodOptional<zod671.ZodEnum<{
79
96
  draft: "draft";
80
97
  open: "open";
81
98
  closed: "closed";
82
99
  static: "static";
83
100
  }>>;
84
- title: zod783.ZodOptional<zod783.ZodString>;
85
- description: zod783.ZodOptional<zod783.ZodNullable<zod783.ZodString>>;
86
- slug: zod783.ZodOptional<zod783.ZodString>;
87
- dataSchema: zod783.ZodOptional<zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>>;
88
- uiSchema: zod783.ZodOptional<zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>>;
89
- }, zod_v4_core53.$strip> | undefined, _standard_schema_spec49.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND" | "STATIC_FORM_READ_ONLY", string>;
90
- useDeleteForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api19.NonGetHTTPMethod, "/admin/forms/:id", _standard_schema_spec49.StandardSchemaV1<unknown, unknown> | zod783.ZodObject<{
91
- status: zod783.ZodOptional<zod783.ZodEnum<{
101
+ title: zod671.ZodOptional<zod671.ZodString>;
102
+ description: zod671.ZodOptional<zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>>;
103
+ slug: zod671.ZodOptional<zod671.ZodString>;
104
+ dataSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
105
+ uiSchema: zod671.ZodOptional<zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>>;
106
+ }, zod_v4_core41.$strip> | undefined, _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
107
+ id: zod671.ZodString;
108
+ title: zod671.ZodString;
109
+ description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
110
+ slug: zod671.ZodString;
111
+ status: zod671.ZodEnum<{
112
+ draft: "draft";
113
+ open: "open";
114
+ closed: "closed";
115
+ static: "static";
116
+ }>;
117
+ dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
118
+ uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
119
+ version: zod671.ZodNumber;
120
+ createdAt: zod671.ZodDate;
121
+ updatedAt: zod671.ZodDate;
122
+ }, zod_v4_core41.$strip> | undefined, "NOT_FOUND" | "INVALID_JSON_SCHEMA" | "STATIC_FORM_READ_ONLY", string>;
123
+ useDeleteForm: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/admin/forms/:id", _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
124
+ status: zod671.ZodOptional<zod671.ZodEnum<{
92
125
  draft: "draft";
93
126
  open: "open";
94
127
  closed: "closed";
95
128
  static: "static";
96
129
  }>>;
97
- title: zod783.ZodOptional<zod783.ZodString>;
98
- description: zod783.ZodOptional<zod783.ZodNullable<zod783.ZodString>>;
99
- slug: zod783.ZodOptional<zod783.ZodString>;
100
- dataSchema: zod783.ZodOptional<zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>>;
101
- uiSchema: zod783.ZodOptional<zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>>;
102
- }, zod_v4_core53.$strip> | undefined, _standard_schema_spec49.StandardSchemaV1<unknown, unknown> | undefined, "NOT_FOUND" | "STATIC_FORM_READ_ONLY", string>;
103
- useSubmissions: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms/:id/submissions", zod783.ZodArray<zod783.ZodObject<{
104
- id: zod783.ZodString;
105
- formId: zod783.ZodNullable<zod783.ZodString>;
106
- formVersion: zod783.ZodNumber;
107
- data: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
108
- submittedAt: zod783.ZodDate;
109
- ip: zod783.ZodNullable<zod783.ZodString>;
110
- userAgent: zod783.ZodNullable<zod783.ZodString>;
111
- }, zod_v4_core53.$strip>>, string, "sortOrder">;
112
- useSubmission: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/submissions/:id", NonNullable<_standard_schema_spec49.StandardSchemaV1<unknown, unknown> | zod783.ZodObject<{
113
- id: zod783.ZodString;
114
- formId: zod783.ZodNullable<zod783.ZodString>;
115
- formVersion: zod783.ZodNumber;
116
- data: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
117
- submittedAt: zod783.ZodDate;
118
- ip: zod783.ZodNullable<zod783.ZodString>;
119
- userAgent: zod783.ZodNullable<zod783.ZodString>;
120
- }, zod_v4_core53.$strip> | undefined>, "NOT_FOUND", string>;
121
- useDeleteSubmission: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api19.NonGetHTTPMethod, "/admin/submissions/:id", _standard_schema_spec49.StandardSchemaV1<unknown, unknown> | undefined, _standard_schema_spec49.StandardSchemaV1<unknown, unknown> | zod783.ZodObject<{
122
- id: zod783.ZodString;
123
- formId: zod783.ZodNullable<zod783.ZodString>;
124
- formVersion: zod783.ZodNumber;
125
- data: zod783.ZodRecord<zod783.ZodString, zod783.ZodUnknown>;
126
- submittedAt: zod783.ZodDate;
127
- ip: zod783.ZodNullable<zod783.ZodString>;
128
- userAgent: zod783.ZodNullable<zod783.ZodString>;
129
- }, zod_v4_core53.$strip> | undefined, "NOT_FOUND", string>;
130
+ title: zod671.ZodOptional<zod671.ZodString>;
131
+ description: zod671.ZodOptional<zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>>;
132
+ slug: zod671.ZodOptional<zod671.ZodString>;
133
+ dataSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
134
+ uiSchema: zod671.ZodOptional<zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>>;
135
+ }, zod_v4_core41.$strip> | undefined, _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
136
+ id: zod671.ZodString;
137
+ title: zod671.ZodString;
138
+ description: zod671.ZodOptional<zod671.ZodNullable<zod671.ZodString>>;
139
+ slug: zod671.ZodString;
140
+ status: zod671.ZodEnum<{
141
+ draft: "draft";
142
+ open: "open";
143
+ closed: "closed";
144
+ static: "static";
145
+ }>;
146
+ dataSchema: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
147
+ uiSchema: zod671.ZodOptional<zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>>;
148
+ version: zod671.ZodNumber;
149
+ createdAt: zod671.ZodDate;
150
+ updatedAt: zod671.ZodDate;
151
+ }, zod_v4_core41.$strip> | undefined, "NOT_FOUND" | "INVALID_JSON_SCHEMA" | "STATIC_FORM_READ_ONLY", string>;
152
+ useSubmissions: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/forms/:id/submissions", zod671.ZodArray<zod671.ZodObject<{
153
+ id: zod671.ZodString;
154
+ formId: zod671.ZodNullable<zod671.ZodString>;
155
+ formVersion: zod671.ZodNumber;
156
+ data: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
157
+ submittedAt: zod671.ZodDate;
158
+ ip: zod671.ZodNullable<zod671.ZodString>;
159
+ userAgent: zod671.ZodNullable<zod671.ZodString>;
160
+ }, zod_v4_core41.$strip>>, string, "sortOrder">;
161
+ useSubmission: _fragno_dev_core_react0.FragnoReactHook<"GET", "/admin/submissions/:id", zod671.ZodObject<{
162
+ id: zod671.ZodString;
163
+ formId: zod671.ZodNullable<zod671.ZodString>;
164
+ formVersion: zod671.ZodNumber;
165
+ data: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
166
+ submittedAt: zod671.ZodDate;
167
+ ip: zod671.ZodNullable<zod671.ZodString>;
168
+ userAgent: zod671.ZodNullable<zod671.ZodString>;
169
+ }, zod_v4_core41.$strip>, "NOT_FOUND", string>;
170
+ useDeleteSubmission: _fragno_dev_core_react0.FragnoReactMutator<_fragno_dev_core_api10.NonGetHTTPMethod, "/admin/submissions/:id", _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | undefined, _standard_schema_spec33.StandardSchemaV1<unknown, unknown> | zod671.ZodObject<{
171
+ id: zod671.ZodString;
172
+ formId: zod671.ZodNullable<zod671.ZodString>;
173
+ formVersion: zod671.ZodNumber;
174
+ data: zod671.ZodRecord<zod671.ZodString, zod671.ZodUnknown>;
175
+ submittedAt: zod671.ZodDate;
176
+ ip: zod671.ZodNullable<zod671.ZodString>;
177
+ userAgent: zod671.ZodNullable<zod671.ZodString>;
178
+ }, zod_v4_core41.$strip> | undefined, "NOT_FOUND", string>;
130
179
  };
131
180
  //# sourceMappingURL=react.d.ts.map
132
181
 
@@ -1,4 +1,4 @@
1
- import { createFormsClients, isGetHook, isMutatorHook, isReadableAtom, isStore } from "../src-DbMX_NY6.js";
1
+ import { createFormsClients, isGetHook, isMutatorHook, isReadableAtom, isStore } from "../src-BBaSaf29.js";
2
2
  import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
3
3
 
4
4
  //#region ../../node_modules/.pnpm/nanostores@1.1.0/node_modules/nanostores/listen-keys/index.js