@howells/stow-react 0.1.0 → 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.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
/** Normalized file metadata returned by the dropzone after upload success. */
|
|
3
4
|
interface UploadedFile {
|
|
4
5
|
key: string;
|
|
5
6
|
name: string;
|
|
@@ -7,12 +8,14 @@ interface UploadedFile {
|
|
|
7
8
|
type: string;
|
|
8
9
|
url: string | null;
|
|
9
10
|
}
|
|
11
|
+
/** Per-file progress payload emitted from the dropzone. */
|
|
10
12
|
interface UploadProgress {
|
|
11
13
|
file: File;
|
|
12
14
|
loaded: number;
|
|
13
15
|
percent: number;
|
|
14
16
|
total: number;
|
|
15
17
|
}
|
|
18
|
+
/** Props for the `UploadDropzone` component. */
|
|
16
19
|
interface UploadDropzoneProps {
|
|
17
20
|
/**
|
|
18
21
|
* Accepted file types (e.g., "image/*" or ".pdf,.doc")
|
|
@@ -65,6 +68,12 @@ interface UploadDropzoneProps {
|
|
|
65
68
|
route?: string;
|
|
66
69
|
}
|
|
67
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Turnkey drag-and-drop uploader backed by `@howells/stow-client`.
|
|
73
|
+
*
|
|
74
|
+
* Supports click-to-select, drag-and-drop, file-count and file-size guards,
|
|
75
|
+
* and aggregate progress for multi-file uploads.
|
|
76
|
+
*/
|
|
68
77
|
declare function UploadDropzone({ endpoint, route, onUploadComplete, onUploadError, onUploadProgress, onUploadBegin, accept, maxSize, maxFiles, multiple, className, disabled, }: UploadDropzoneProps): react_jsx_runtime.JSX.Element;
|
|
69
78
|
|
|
70
79
|
export { UploadDropzone, type UploadDropzoneProps, type UploadProgress, type UploadedFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
|
|
3
|
+
/** Normalized file metadata returned by the dropzone after upload success. */
|
|
3
4
|
interface UploadedFile {
|
|
4
5
|
key: string;
|
|
5
6
|
name: string;
|
|
@@ -7,12 +8,14 @@ interface UploadedFile {
|
|
|
7
8
|
type: string;
|
|
8
9
|
url: string | null;
|
|
9
10
|
}
|
|
11
|
+
/** Per-file progress payload emitted from the dropzone. */
|
|
10
12
|
interface UploadProgress {
|
|
11
13
|
file: File;
|
|
12
14
|
loaded: number;
|
|
13
15
|
percent: number;
|
|
14
16
|
total: number;
|
|
15
17
|
}
|
|
18
|
+
/** Props for the `UploadDropzone` component. */
|
|
16
19
|
interface UploadDropzoneProps {
|
|
17
20
|
/**
|
|
18
21
|
* Accepted file types (e.g., "image/*" or ".pdf,.doc")
|
|
@@ -65,6 +68,12 @@ interface UploadDropzoneProps {
|
|
|
65
68
|
route?: string;
|
|
66
69
|
}
|
|
67
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Turnkey drag-and-drop uploader backed by `@howells/stow-client`.
|
|
73
|
+
*
|
|
74
|
+
* Supports click-to-select, drag-and-drop, file-count and file-size guards,
|
|
75
|
+
* and aggregate progress for multi-file uploads.
|
|
76
|
+
*/
|
|
68
77
|
declare function UploadDropzone({ endpoint, route, onUploadComplete, onUploadError, onUploadProgress, onUploadBegin, accept, maxSize, maxFiles, multiple, className, disabled, }: UploadDropzoneProps): react_jsx_runtime.JSX.Element;
|
|
69
78
|
|
|
70
79
|
export { UploadDropzone, type UploadDropzoneProps, type UploadProgress, type UploadedFile };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howells/stow-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "React components for Stow file storage",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@howells/stow-client": "0.
|
|
33
|
+
"@howells/stow-client": "0.3.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": "^18.0.0 || ^19.0.0",
|