@mux/mux-uploader
Advanced tools
Comparing version 0.1.0-canary.10-485423a to 0.1.0-canary.10-4ef4afe
@@ -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-485423a", | ||
"version": "0.1.0-canary.10-4ef4afe", | ||
"description": "An uploader elements to be used with Mux Direct Uploads", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.cjs", |
@@ -226,3 +226,36 @@ import '@mux/polyfills'; | ||
class MuxUploaderElement extends HTMLElement { | ||
// 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; | ||
} | ||
interface MuxUploaderElement extends HTMLElement { | ||
addEventListener<K extends keyof MuxUploaderElementEventMap>( | ||
type: K, | ||
listener: (this: HTMLMediaElement, ev: MuxUploaderElementEventMap[K]) => any, | ||
options?: boolean | AddEventListenerOptions | ||
): void; | ||
addEventListener( | ||
type: string, | ||
listener: EventListenerOrEventListenerObject, | ||
options?: boolean | AddEventListenerOptions | ||
): void; | ||
removeEventListener<K extends keyof MuxUploaderElementEventMap>( | ||
type: K, | ||
listener: (this: HTMLMediaElement, ev: MuxUploaderElementEventMap[K]) => any, | ||
options?: boolean | EventListenerOptions | ||
): void; | ||
removeEventListener( | ||
type: string, | ||
listener: EventListenerOrEventListenerObject, | ||
options?: boolean | EventListenerOptions | ||
): void; | ||
} | ||
class MuxUploaderElement extends HTMLElement implements MuxUploaderElement { | ||
protected _formatProgress: ((percent: number) => string) | null | undefined; | ||
@@ -229,0 +262,0 @@ protected _filePickerButton: HTMLElement | null | undefined; |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
2
43117
8
600
1