@mux/mux-uploader
Advanced tools
Comparing version 0.1.0-canary.10-485423a to 0.1.0-canary.10-5c05af8
{ | ||
"name": "@mux/mux-uploader", | ||
"version": "0.1.0-canary.10-485423a", | ||
"version": "0.1.0-canary.10-5c05af8", | ||
"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
42026
8
600
1