@dimah-s3/react 1.5.9 → 1.5.10
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/helpers/throttled-speed.d.ts +1 -1
- package/dist/hooks/use-delete.d.ts +1 -1
- package/dist/hooks/use-download.d.ts +3 -3
- package/dist/hooks/use-file-upload.d.ts +1 -1
- package/dist/hooks/use-route-upload-policy.d.ts +1 -1
- package/dist/hooks/use-upload.d.ts +1 -1
- package/dist/store/index.d.ts +1 -1
- package/dist/store/local-storage-store.d.ts +1 -1
- package/dist/store/memory-store.d.ts +1 -1
- package/dist/upload/multipart.d.ts +2 -2
- package/dist/upload/presigned-http.d.ts +1 -1
- package/dist/upload/retry.d.ts +1 -1
- package/dist/upload/upload-file.d.ts +1 -1
- package/dist/upload/upload-files.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UploadProgress } from "../types/index.
|
|
1
|
+
import type { UploadProgress } from "../types/index.js";
|
|
2
2
|
import type { SpeedTracker } from "./speed-tracker";
|
|
3
3
|
/** Throttle speed samples so UI updates stay readable. */
|
|
4
4
|
export declare function createThrottledSpeedUpdater(tracker: SpeedTracker, intervalMs?: number): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type APIError, type S3Api, type S3RouteName } from "@dimah-s3/core";
|
|
2
|
-
import type { DeletePhase, DeleteHooks } from "../types/index.
|
|
2
|
+
import type { DeletePhase, DeleteHooks } from "../types/index.js";
|
|
3
3
|
/** Options for {@link useDelete}. */
|
|
4
4
|
export type UseDeleteOptions = DeleteHooks & {
|
|
5
5
|
/** S3Api. Optional when an `<S3Provider>` is present in the tree. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { APIError, S3Api, S3RouteName } from "@dimah-s3/core";
|
|
2
|
-
import type { UploadProgress } from "../types/upload.
|
|
3
|
-
import type { DownloadPhase, DownloadHooks, FetchDownloadPhase, FetchDownloadHooks } from "../types/download.
|
|
4
|
-
export type { DownloadPhase, DownloadHooks, FetchDownloadPhase, FetchDownloadProgress, FetchDownloadHooks, } from "../types/download.
|
|
2
|
+
import type { UploadProgress } from "../types/upload.js";
|
|
3
|
+
import type { DownloadPhase, DownloadHooks, FetchDownloadPhase, FetchDownloadHooks } from "../types/download.js";
|
|
4
|
+
export type { DownloadPhase, DownloadHooks, FetchDownloadPhase, FetchDownloadProgress, FetchDownloadHooks, } from "../types/download.js";
|
|
5
5
|
type SharedDownloadOptions = {
|
|
6
6
|
/** S3Api. Optional when an `<S3Provider>` is present in the tree. */
|
|
7
7
|
api?: S3Api;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { S3Api } from "@dimah-s3/core";
|
|
2
2
|
import { APIError } from "@dimah-s3/core";
|
|
3
|
-
import type { FileUploadConfig, UploadProgress, UploadRequestOptions, UploadPhase, UploadFileState, UploadHooks } from "../types/index.
|
|
3
|
+
import type { FileUploadConfig, UploadProgress, UploadRequestOptions, UploadPhase, UploadFileState, UploadHooks } from "../types/index.js";
|
|
4
4
|
/** @internal Options for the upload engine used by {@link useUpload}. */
|
|
5
5
|
export type UseFileUploadOptions = FileUploadConfig & UploadHooks & {
|
|
6
6
|
/** S3Api. Optional when an `<S3Provider>` is present in the tree. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { S3Api, S3RouteName } from "@dimah-s3/core";
|
|
2
|
-
import { type RouteUploadPolicy } from "../helpers/load-route-catalog.
|
|
2
|
+
import { type RouteUploadPolicy } from "../helpers/load-route-catalog.js";
|
|
3
3
|
export type CatalogLoadStatus = "idle" | "loading" | "ready" | "error";
|
|
4
4
|
export type UseRouteUploadPolicyOptions = RouteUploadPolicy & {
|
|
5
5
|
api?: S3Api;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { APIError, S3Api } from "@dimah-s3/core";
|
|
2
|
-
import type { UploadFileState, UploadPhase, UploadProgress, FileUploadConfig, UploadHooks, UploadRequestOptions } from "../types/index.
|
|
2
|
+
import type { UploadFileState, UploadPhase, UploadProgress, FileUploadConfig, UploadHooks, UploadRequestOptions } from "../types/index.js";
|
|
3
3
|
import { type DropzoneInputProps, type DropzoneRootProps, type FileRejection } from "./use-file-intake";
|
|
4
4
|
import { type UseRouteUploadPolicyReturn } from "./use-route-upload-policy";
|
|
5
5
|
export type { DropzoneInputProps, DropzoneRootProps, FileRejection };
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { StoredUpload, UploadStore } from "../types/upload-store.
|
|
1
|
+
export type { StoredUpload, UploadStore } from "../types/upload-store.js";
|
|
2
2
|
export { createLocalStorageStore } from "./local-storage-store";
|
|
3
3
|
export { createMemoryStore } from "./memory-store";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UploadStore } from "../types/upload-store.
|
|
1
|
+
import type { UploadStore } from "../types/upload-store.js";
|
|
2
2
|
/**
|
|
3
3
|
* Default `UploadStore` implementation backed by `localStorage`.
|
|
4
4
|
* Stores one pending upload per resume identity (`route:name:size:mtime`).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UploadProgress, UploadRequestOptions, RetryConfig, UploadResult } from "../types/index.
|
|
1
|
+
import type { UploadProgress, UploadRequestOptions, RetryConfig, UploadResult } from "../types/index.js";
|
|
2
2
|
import { type S3Api } from "@dimah-s3/core";
|
|
3
|
-
import type { UploadStore } from "../types/upload-store.
|
|
3
|
+
import type { UploadStore } from "../types/upload-store.js";
|
|
4
4
|
export declare function uploadMultipart(api: S3Api, file: File, route: string, partSize: number, concurrentParts: number, onProgress?: (progress: UploadProgress) => void, signal?: AbortSignal, requestOptions?: UploadRequestOptions, retryConfig?: RetryConfig, uploadStore?: UploadStore | false, onPartUpload?: (partNumber: number, totalParts: number) => void, onMultipartInit?: (uploadId: string, key: string) => void): Promise<UploadResult>;
|
|
5
5
|
//# sourceMappingURL=multipart.d.ts.map
|
package/dist/upload/retry.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { RetryConfig } from "../types/index.
|
|
1
|
+
import type { RetryConfig } from "../types/index.js";
|
|
2
2
|
export declare function withRetry<T>(fn: () => Promise<T>, retryConfig: RetryConfig | undefined, signal?: AbortSignal): Promise<T>;
|
|
3
3
|
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileUploadConfig, UploadProgress, UploadResult, UploadRequestOptions } from "../types/index.
|
|
1
|
+
import type { FileUploadConfig, UploadProgress, UploadResult, UploadRequestOptions } from "../types/index.js";
|
|
2
2
|
import { type S3Api } from "@dimah-s3/core";
|
|
3
3
|
export type UploadEngineCallbacks = {
|
|
4
4
|
onProgress?: (progress: UploadProgress) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileUploadConfig, UploadPhase, UploadProgress, UploadResult, UploadRequestOptions } from "../types/index.
|
|
1
|
+
import type { FileUploadConfig, UploadPhase, UploadProgress, UploadResult, UploadRequestOptions } from "../types/index.js";
|
|
2
2
|
import type { APIError, S3Api } from "@dimah-s3/core";
|
|
3
3
|
export type FileItemStatus = "pending" | "uploading" | "success" | "error";
|
|
4
4
|
export type FileItem = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimah-s3/react",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.10",
|
|
4
4
|
"description": "Headless React hooks for presigned S3 file uploads, downloads, and deletes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"s3",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"dist"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@dimah-s3/core": "1.5.
|
|
53
|
+
"@dimah-s3/core": "1.5.10",
|
|
54
54
|
"@fuma-translate/react": "^1.0.2",
|
|
55
|
-
"immer": "^11.1.
|
|
55
|
+
"immer": "^11.1.21",
|
|
56
56
|
"react-dropzone": "^20.1.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
@@ -62,15 +62,15 @@
|
|
|
62
62
|
"@workspace/tsup-config": "0.0.0",
|
|
63
63
|
"@workspace/typescript-config": "0.0.1",
|
|
64
64
|
"@workspace/vitest-config": "0.0.7",
|
|
65
|
-
"eslint": "^10.
|
|
65
|
+
"eslint": "^10.12.0",
|
|
66
66
|
"fuma-translate": "^1.0.2",
|
|
67
|
-
"jsdom": "^30.1.
|
|
67
|
+
"jsdom": "^30.1.2",
|
|
68
68
|
"react": "^19.3.0",
|
|
69
69
|
"react-dom": "^19.3.0",
|
|
70
|
-
"tsc-alias": "^1.9.
|
|
70
|
+
"tsc-alias": "^1.9.7",
|
|
71
71
|
"tsup": "^8.5.1",
|
|
72
72
|
"typescript": "7.0.2",
|
|
73
|
-
"vitest": "^5.0.
|
|
73
|
+
"vitest": "^5.0.3"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@fuma-translate/react": "^1.0.2",
|