@shipstatic/drop 0.2.29 → 0.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.
@@ -1,4 +1,4 @@
1
- import { c as DropStateValue, P as ProcessedFile, d as DropStatus, a as DropReturn } from './useDrop-BI_6TM4c.cjs';
1
+ import { c as DropStateValue, P as ProcessedFile, d as DropStatus, a as DropReturn } from './useDrop-CEMSBb-M.cjs';
2
2
  import '@shipstatic/ship';
3
3
 
4
4
  /**
package/dist/testing.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as DropStateValue, P as ProcessedFile, d as DropStatus, a as DropReturn } from './useDrop-BI_6TM4c.js';
1
+ import { c as DropStateValue, P as ProcessedFile, d as DropStatus, a as DropReturn } from './useDrop-CEMSBb-M.js';
2
2
  import '@shipstatic/ship';
3
3
 
4
4
  /**
@@ -117,11 +117,7 @@ interface DropReturn {
117
117
  /** Flattened access to source name */
118
118
  sourceName: string;
119
119
  /** Flattened access to status */
120
- status: {
121
- title: string;
122
- details: string;
123
- errors?: string[];
124
- } | null;
120
+ status: DropStatus | null;
125
121
  /** Get props to spread on dropzone element (handles drag & drop, optionally click) */
126
122
  getDropzoneProps: (options?: DropzonePropsOptions) => {
127
123
  onDragOver: (e: React.DragEvent) => void;
@@ -151,21 +147,6 @@ interface DropReturn {
151
147
  /** Get raw File objects ready for Ship SDK upload */
152
148
  getFilesForUpload: () => File[];
153
149
  }
154
- /**
155
- * Headless drop hook for file upload workflows
156
- *
157
- * @example
158
- * ```tsx
159
- * const drop = useDrop({ ship });
160
- *
161
- * return (
162
- * <div {...drop.getDropzoneProps()} style={{...}}>
163
- * <input {...drop.getInputProps()} />
164
- * {drop.isDragging ? "📂 Drop" : "📁 Click"}
165
- * </div>
166
- * );
167
- * ```
168
- */
169
150
  declare function useDrop(options: DropOptions): DropReturn;
170
151
 
171
152
  export { type ClientError as C, type DropOptions as D, FILE_STATUSES as F, type ProcessedFile as P, type DropReturn as a, type DropState as b, type DropStateValue as c, type DropStatus as d, type DropzonePropsOptions as e, type FileStatus as f, type FileWithPath as g, useDrop as u };
@@ -117,11 +117,7 @@ interface DropReturn {
117
117
  /** Flattened access to source name */
118
118
  sourceName: string;
119
119
  /** Flattened access to status */
120
- status: {
121
- title: string;
122
- details: string;
123
- errors?: string[];
124
- } | null;
120
+ status: DropStatus | null;
125
121
  /** Get props to spread on dropzone element (handles drag & drop, optionally click) */
126
122
  getDropzoneProps: (options?: DropzonePropsOptions) => {
127
123
  onDragOver: (e: React.DragEvent) => void;
@@ -151,21 +147,6 @@ interface DropReturn {
151
147
  /** Get raw File objects ready for Ship SDK upload */
152
148
  getFilesForUpload: () => File[];
153
149
  }
154
- /**
155
- * Headless drop hook for file upload workflows
156
- *
157
- * @example
158
- * ```tsx
159
- * const drop = useDrop({ ship });
160
- *
161
- * return (
162
- * <div {...drop.getDropzoneProps()} style={{...}}>
163
- * <input {...drop.getInputProps()} />
164
- * {drop.isDragging ? "📂 Drop" : "📁 Click"}
165
- * </div>
166
- * );
167
- * ```
168
- */
169
150
  declare function useDrop(options: DropOptions): DropReturn;
170
151
 
171
152
  export { type ClientError as C, type DropOptions as D, FILE_STATUSES as F, type ProcessedFile as P, type DropReturn as a, type DropState as b, type DropStateValue as c, type DropStatus as d, type DropzonePropsOptions as e, type FileStatus as f, type FileWithPath as g, useDrop as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/drop",
3
- "version": "0.2.29",
3
+ "version": "0.3.0",
4
4
  "description": "Headless React hook for file dropping, processing, ZIP extraction, and validation - purpose-built for Ship SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@shipstatic/ship": "^0.7.13",
55
- "jszip": "^3.10.1",
55
+ "fflate": "^0.8.2",
56
56
  "mime-db": "^1.54.0"
57
57
  },
58
58
  "devDependencies": {