@shipstatic/drop 0.2.17 → 0.2.19

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/dist/index.d.cts CHANGED
@@ -1,7 +1,6 @@
1
- import { P as ProcessedFile } from './useDrop-DbGbhh56.cjs';
2
- export { C as ClientError, D as DropOptions, a as DropReturn, b as DropState, c as DropStateValue, d as DropStatus, e as DropzonePropsOptions, F as FILE_STATUSES, f as FileStatus, g as FileWithPath, u as useDrop } from './useDrop-DbGbhh56.cjs';
1
+ import { P as ProcessedFile } from './useDrop-ddRfHehl.cjs';
2
+ export { C as ClientError, D as DropOptions, a as DropReturn, b as DropState, c as DropStateValue, d as DropStatus, e as DropzonePropsOptions, F as FILE_STATUSES, f as FileStatus, g as FileWithPath, u as useDrop } from './useDrop-ddRfHehl.cjs';
3
3
  import { formatFileSize as formatFileSize$1 } from '@shipstatic/ship';
4
- import '@shipstatic/types';
5
4
 
6
5
  /**
7
6
  * Unified file processing utilities
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { P as ProcessedFile } from './useDrop-DbGbhh56.js';
2
- export { C as ClientError, D as DropOptions, a as DropReturn, b as DropState, c as DropStateValue, d as DropStatus, e as DropzonePropsOptions, F as FILE_STATUSES, f as FileStatus, g as FileWithPath, u as useDrop } from './useDrop-DbGbhh56.js';
1
+ import { P as ProcessedFile } from './useDrop-ddRfHehl.js';
2
+ export { C as ClientError, D as DropOptions, a as DropReturn, b as DropState, c as DropStateValue, d as DropStatus, e as DropzonePropsOptions, F as FILE_STATUSES, f as FileStatus, g as FileWithPath, u as useDrop } from './useDrop-ddRfHehl.js';
3
3
  import { formatFileSize as formatFileSize$1 } from '@shipstatic/ship';
4
- import '@shipstatic/types';
5
4
 
6
5
  /**
7
6
  * Unified file processing utilities
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useState, useRef, useMemo, useCallback } from 'react';
2
- import { formatFileSize as formatFileSize$1, getValidFiles, filterJunk, validateFiles } from '@shipstatic/ship';
2
+ import { formatFileSize as formatFileSize$1, filterJunk, validateFiles } from '@shipstatic/ship';
3
3
 
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -11700,7 +11700,7 @@ var require_mime_db = __commonJS({
11700
11700
  }
11701
11701
  });
11702
11702
 
11703
- // node_modules/.pnpm/@shipstatic+types@0.4.25/node_modules/@shipstatic/types/dist/index.js
11703
+ // node_modules/.pnpm/@shipstatic+types@0.5.3/node_modules/@shipstatic/types/dist/index.js
11704
11704
  var ErrorType;
11705
11705
  (function(ErrorType2) {
11706
11706
  ErrorType2["Validation"] = "validation_failed";
@@ -11926,7 +11926,7 @@ function useDrop(options) {
11926
11926
  [state.value]
11927
11927
  );
11928
11928
  const hasError = useMemo(() => state.value === "error", [state.value]);
11929
- const validFiles = useMemo(() => getValidFiles(state.files), [state.files]);
11929
+ const validFiles = useMemo(() => state.files.filter((f) => f.status === "ready"), [state.files]);
11930
11930
  const getFilesForUpload = useCallback(() => {
11931
11931
  return validFiles.map((f) => f.file);
11932
11932
  }, [validFiles]);
@@ -12011,9 +12011,7 @@ function useDrop(options) {
12011
12011
  // Use full path to match server-side validation
12012
12012
  type: f.type,
12013
12013
  // Use corrected MIME type from mime-db, not browser's File.type
12014
- size: f.file.size,
12015
- status: f.status,
12016
- statusMessage: f.statusMessage
12014
+ size: f.file.size
12017
12015
  }));
12018
12016
  const config = await ship.getConfig();
12019
12017
  const validation = validateFiles(validatableFiles, config);