@dimah-s3/react 1.5.8 → 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.
@@ -1,4 +1,4 @@
1
- export type { StoredUpload, UploadStore } from "../types/upload-store.d.ts";
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.d.ts";
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,4 +1,4 @@
1
- import type { UploadStore } from "../types/upload-store.d.ts";
1
+ import type { UploadStore } from "../types/upload-store.js";
2
2
  /**
3
3
  * In-memory `UploadStore` — safe for SSR and server-component environments.
4
4
  *
@@ -11,7 +11,7 @@ export declare class S3UploadError extends Error {
11
11
  readonly code: string;
12
12
  readonly status: number;
13
13
  readonly phase: UploadPhase | undefined;
14
- constructor(message: string, code: string, status?: number, phase?: UploadPhase);
14
+ constructor(message: string, code: string, status?: number, phase?: UploadPhase, options?: ErrorOptions);
15
15
  get statusCode(): number;
16
16
  }
17
17
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAkB,IAAI,mBAAmB;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,WAAW,GAA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D;AACvD,wBAAgB,WAAW,CACzB,GAAG,EAAE,OAAO,EACZ,QAAQ,SAAmB,GAC1B,QAAQ,CAIV;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAOlD;AAED,gEAAgE;AAChE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAE1D"}
@@ -1,5 +1,5 @@
1
- import type { UploadProgress, UploadRequestOptions, RetryConfig, UploadResult } from "../types/index.d.ts";
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.d.ts";
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
@@ -1 +1 @@
1
- {"version":3,"file":"multipart.d.ts","sourceRoot":"","sources":["../../src/upload/multipart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,WAAW,EACX,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAiB,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAiBxD,wBAAsB,eAAe,CACnC,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,EACvB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAC/C,MAAM,CAAC,EAAE,WAAW,EACpB,cAAc,CAAC,EAAE,oBAAoB,EACrC,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,GAAG,KAAK,EACjC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,EAC/D,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,GACxD,OAAO,CAAC,YAAY,CAAC,CAqLvB"}
1
+ {"version":3,"file":"multipart.d.ts","sourceRoot":"","sources":["../../src/upload/multipart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,WAAW,EACX,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAiB,KAAK,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAiBxD,wBAAsB,eAAe,CACnC,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,eAAe,EAAE,MAAM,EACvB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAC/C,MAAM,CAAC,EAAE,WAAW,EACpB,cAAc,CAAC,EAAE,oBAAoB,EACrC,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,GAAG,KAAK,EACjC,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,EAC/D,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,GACxD,OAAO,CAAC,YAAY,CAAC,CAmLvB"}
@@ -1,4 +1,4 @@
1
- import type { UploadProgress } from "../types/index.d.ts";
1
+ import type { UploadProgress } from "../types/index.js";
2
2
  /**
3
3
  * Uploads a file directly to S3 using a presigned POST form.
4
4
  *
@@ -1,3 +1,3 @@
1
- import type { RetryConfig } from "../types/index.d.ts";
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 +1 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/upload/retry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAsC3C,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,WAAW,EAAE,WAAW,GAAG,SAAS,EACpC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,CAAC,CAAC,CAkBZ"}
1
+ {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/upload/retry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA2C3C,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,WAAW,EAAE,WAAW,GAAG,SAAS,EACpC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,CAAC,CAAC,CAkBZ"}
@@ -1,4 +1,4 @@
1
- import type { FileUploadConfig, UploadProgress, UploadResult, UploadRequestOptions } from "../types/index.d.ts";
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.d.ts";
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.8",
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,26 +50,27 @@
50
50
  "dist"
51
51
  ],
52
52
  "dependencies": {
53
- "@dimah-s3/core": "1.5.8",
53
+ "@dimah-s3/core": "1.5.10",
54
54
  "@fuma-translate/react": "^1.0.2",
55
- "immer": "^11.1.18",
55
+ "immer": "^11.1.21",
56
56
  "react-dropzone": "^20.1.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/react": "^19.3.0",
60
60
  "@types/react-dom": "^19.3.0",
61
61
  "@workspace/eslint-config": "0.0.1",
62
+ "@workspace/tsup-config": "0.0.0",
62
63
  "@workspace/typescript-config": "0.0.1",
63
64
  "@workspace/vitest-config": "0.0.7",
64
- "eslint": "^10.10.0",
65
+ "eslint": "^10.12.0",
65
66
  "fuma-translate": "^1.0.2",
66
- "jsdom": "^30.0.1",
67
+ "jsdom": "^30.1.2",
67
68
  "react": "^19.3.0",
68
69
  "react-dom": "^19.3.0",
69
- "tsc-alias": "^1.9.5",
70
+ "tsc-alias": "^1.9.7",
70
71
  "tsup": "^8.5.1",
71
72
  "typescript": "7.0.2",
72
- "vitest": "^5.0.1"
73
+ "vitest": "^5.0.3"
73
74
  },
74
75
  "peerDependencies": {
75
76
  "@fuma-translate/react": "^1.0.2",