@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.
- package/dist/index.cjs +473 -2367
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +473 -2367
- package/dist/index.js.map +1 -1
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/{useDrop-BI_6TM4c.d.cts → useDrop-CEMSBb-M.d.cts} +1 -20
- package/dist/{useDrop-BI_6TM4c.d.ts → useDrop-CEMSBb-M.d.ts} +1 -20
- package/package.json +2 -2
package/dist/testing.d.cts
CHANGED
package/dist/testing.d.ts
CHANGED
|
@@ -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.
|
|
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
|
-
"
|
|
55
|
+
"fflate": "^0.8.2",
|
|
56
56
|
"mime-db": "^1.54.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|