@mux/mux-uploader
Advanced tools
Comparing version 0.1.0-canary.10-5c601b8 to 0.1.0-canary.10-6306286
@@ -6,2 +6,15 @@ # Change Log | ||
# [0.1.0-beta.5](https://github.com/muxinc/elements/compare/@mux/mux-uploader@0.1.0-beta.4...@mux/mux-uploader@0.1.0-beta.5) (2022-08-02) | ||
### Bug Fixes | ||
- **mux-uploader:** Fix attempt and chunkSuccess event details not being passed. Also make the data passed consistent by using event for all params. ([09d4cf8](https://github.com/muxinc/elements/commit/09d4cf8e22d8de919e175d039c5f0eb9a42b2591)) | ||
- **mux-uploader:** Update event and event handler typedefs for greater accuracy of types. ([92f28a5](https://github.com/muxinc/elements/commit/92f28a5828ea3c046fa5a1aa711a038a7444f0dc)) | ||
### Features | ||
- **mux-uploader:** Add CSS variables for button border and padding. ([359cd89](https://github.com/muxinc/elements/commit/359cd89472781fc41e33e95574c0d9c845b1d081)) | ||
- **mux-uploader:** Add custom event for when upload starts. ([9fd1efc](https://github.com/muxinc/elements/commit/9fd1efc943bcb60efdb51b455d5b9642af86b920)) | ||
- **mux-uploader:** Support Upchunk's attempt and chunkSuccess events. ([739a88e](https://github.com/muxinc/elements/commit/739a88e5eda697b8344ef14e3a20b1bef19e1a41)) | ||
# [0.1.0-beta.4](https://github.com/muxinc/elements/compare/@mux/mux-uploader@0.1.0-beta.3...@mux/mux-uploader@0.1.0-beta.4) (2022-07-21) | ||
@@ -8,0 +21,0 @@ |
{ | ||
"name": "@mux/mux-uploader", | ||
"version": "0.1.0-canary.10-5c601b8", | ||
"version": "0.1.0-canary.10-6306286", | ||
"description": "An uploader elements to be used with Mux Direct Uploads", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.cjs", |
@@ -226,10 +226,24 @@ import '@mux/polyfills'; | ||
type ErrorDetail = { | ||
message: string; | ||
chunkNumber?: number; | ||
attempts?: number; | ||
}; | ||
// NOTE: error and progress events are already determined on HTMLElement but have inconsistent types. Should consider renaming events (CJP) | ||
export interface MuxUploaderElementEventMap extends Omit<HTMLElementEventMap, 'error' | 'progress'> { | ||
uploadstart: CustomEvent<UpChunk.UpChunk>; | ||
chunkattempt: CustomEvent; | ||
chunksuccess: CustomEvent; | ||
error: CustomEvent; | ||
progress: CustomEvent; | ||
success: CustomEvent; | ||
chunkattempt: CustomEvent<{ | ||
chunkNumber: number; | ||
chunkSize: number; | ||
}>; | ||
chunksuccess: CustomEvent<{ | ||
chunk: number; | ||
attempts: number; | ||
// Note: This should be more explicitly typed in Upchunk. (TD). | ||
response: any; | ||
}>; | ||
error: CustomEvent<ErrorDetail>; | ||
progress: CustomEvent<number>; | ||
success: CustomEvent<undefined | null>; | ||
} | ||
@@ -463,2 +477,3 @@ | ||
console.error(invalidUrlMessage); | ||
this.dispatchEvent(new CustomEvent('error', { detail: { message: invalidUrlMessage } })); | ||
// Bail early if no endpoint. | ||
@@ -465,0 +480,0 @@ return; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
43531
614
0