@shipstatic/drop 0.3.5 → 0.3.6

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
@@ -56,7 +56,7 @@ function Uploader() {
56
56
  - **Prop Getters API** - Spread props on your elements (like `react-dropzone`)
57
57
  - **Built-in Drag & Drop** - Folder support with `webkitGetAsEntry` API
58
58
  - **ZIP Support** - Automatic extraction and processing
59
- - **Ship SDK Integration** - Validation via `ship.getConfig()`
59
+ - **Ship SDK Integration** - Validation via `ship.getLimits()`
60
60
  - **Headless** - No visual components, full styling control
61
61
  - **TypeScript** - Complete type definitions
62
62
 
@@ -147,7 +147,7 @@ Drop uses Ship SDK's validation automatically:
147
147
  ```tsx
148
148
  const drop = useDrop({ ship });
149
149
 
150
- // Behind the scenes: ship.getConfig() → validateFiles()
150
+ // Behind the scenes: ship.getLimits() → validateFiles()
151
151
  // Client validation matches server limits
152
152
  ```
153
153
 
package/dist/index.cjs CHANGED
@@ -9383,26 +9383,6 @@ var require_mime_db = __commonJS({
9383
9383
  module.exports = require_db();
9384
9384
  }
9385
9385
  });
9386
-
9387
- // node_modules/.pnpm/@shipstatic+types@0.8.7/node_modules/@shipstatic/types/dist/index.js
9388
- var ErrorType;
9389
- (function(ErrorType2) {
9390
- ErrorType2["Validation"] = "validation_failed";
9391
- ErrorType2["NotFound"] = "not_found";
9392
- ErrorType2["RateLimit"] = "rate_limit_exceeded";
9393
- ErrorType2["Authentication"] = "authentication_failed";
9394
- ErrorType2["Business"] = "business_logic_error";
9395
- ErrorType2["Api"] = "internal_server_error";
9396
- ErrorType2["Network"] = "network_error";
9397
- ErrorType2["Cancelled"] = "operation_cancelled";
9398
- ErrorType2["File"] = "file_error";
9399
- ErrorType2["Config"] = "config_error";
9400
- })(ErrorType || (ErrorType = {}));
9401
- ({
9402
- client: /* @__PURE__ */ new Set([ErrorType.Business, ErrorType.Config, ErrorType.File, ErrorType.Validation]),
9403
- network: /* @__PURE__ */ new Set([ErrorType.Network]),
9404
- auth: /* @__PURE__ */ new Set([ErrorType.Authentication])
9405
- });
9406
9386
  function isShipError(error) {
9407
9387
  return error !== null && typeof error === "object" && "name" in error && error.name === "ShipError" && "status" in error;
9408
9388
  }
@@ -10180,8 +10160,8 @@ function useDrop(options) {
10180
10160
  // Use full path to match server-side validation
10181
10161
  size: f.file.size
10182
10162
  }));
10183
- const config = await ship$1.getConfig();
10184
- const validation = ship.validateFiles(validatableFiles, config);
10163
+ const limits = await ship$1.getLimits();
10164
+ const validation = ship.validateFiles(validatableFiles, limits);
10185
10165
  const filesWithStatus = finalFiles.map((processedFile, idx) => ({
10186
10166
  ...processedFile,
10187
10167
  status: validation.files[idx]?.status || processedFile.status,