@muhgholy/next-drive 1.2.0 → 1.3.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
@@ -187,7 +187,19 @@ You can use the exported `driveFileSchemaZod` to validate file data in your form
187
187
 
188
188
  ```typescript
189
189
  import { z } from "zod";
190
- import { driveFileSchemaZod } from "@muhgholy/next-drive/client";
190
+ import { driveFileSchemaZod } from "@muhgholy/next-drive/schemas";
191
+
192
+ // Use in your form schema (works in both client and server)
193
+ const myFormSchema = z.object({
194
+ asset: driveFileSchemaZod,
195
+ title: z.string(),
196
+ description: z.string().optional(),
197
+ });
198
+
199
+ type MyFormData = z.infer<typeof myFormSchema>;
200
+ ```
201
+
202
+ > **Note**: The schema is also available from `/client` and `/server` exports for convenience, but `/schemas` is the recommended universal import.
191
203
 
192
204
  // Use in your form schema
193
205
  const myFormSchema = z.object({
@@ -1,6 +1,6 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { n as TDrivePathItem, d as TDatabaseDrive, o as TDriveQuota, e as TDriveFile, f as TImageQuality, g as TImageFormat, k as TDriveAPIResponse, p as TDriveUploadState } from '../index-C4pw1JjP.js';
3
- export { q as driveFileSchemaZod } from '../index-C4pw1JjP.js';
2
+ import { n as TDrivePathItem, d as TDatabaseDrive, o as TDriveQuota, e as TDriveFile, f as TImageQuality, g as TImageFormat, k as TDriveAPIResponse, p as TDriveUploadState } from '../index-CUS76o75.js';
3
+ export { driveFileSchemaZod } from '../schemas.js';
4
4
  import 'zod';
5
5
 
6
6
  type TDriveContext = {
@@ -2730,7 +2730,7 @@ var DriveFileChooser = (props) => {
2730
2730
  ] });
2731
2731
  };
2732
2732
 
2733
- // src/types/client/index.ts
2733
+ // src/schemas.ts
2734
2734
  import { z } from "zod";
2735
2735
  var driveFileSchemaZod = z.object({
2736
2736
  id: z.string(),