New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mux/mux-uploader-react

Package Overview
Dependencies
Maintainers
2
Versions
561
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mux/mux-uploader-react - npm Package Compare versions

Comparing version 0.1.0-beta.7 to 0.1.0-beta.8

dist/index.cjs.js

8

dist/types-ts3.4/index.d.ts

@@ -33,6 +33,7 @@ import React from 'react';

formatProgress?: (percent: number) => string;
dynamicChunkSize?: boolean;
onUploadStart?: GenericEventListener<MuxUploaderElementEventMap['uploadstart']>;
onChunkAttempt?: GenericEventListener<MuxUploaderElementEventMap['chunkattempt']>;
onChunkSuccess?: GenericEventListener<MuxUploaderElementEventMap['chunksuccess']>;
onError?: GenericEventListener<MuxUploaderElementEventMap['error']>;
onUploadError?: GenericEventListener<MuxUploaderElementEventMap['uploaderror']>;
onProgress?: GenericEventListener<MuxUploaderElementEventMap['progress']>;

@@ -63,2 +64,3 @@ onSuccess?: GenericEventListener<MuxUploaderElementEventMap['success']>;

formatProgress?: ((percent: number) => string) | undefined;
dynamicChunkSize?: boolean | undefined;
onUploadStart?: GenericEventListener<CustomEvent<{

@@ -74,6 +76,8 @@ file: File;

chunk: number;
chunkSize: number;
attempts: number;
timeInterval: number;
response: any;
}>> | undefined;
onError?: GenericEventListener<CustomEvent<{
onUploadError?: GenericEventListener<CustomEvent<{
message: string;

@@ -80,0 +84,0 @@ chunkNumber?: number | undefined;

@@ -33,6 +33,7 @@ import React from 'react';

formatProgress?: (percent: number) => string;
dynamicChunkSize?: boolean;
onUploadStart?: GenericEventListener<MuxUploaderElementEventMap['uploadstart']>;
onChunkAttempt?: GenericEventListener<MuxUploaderElementEventMap['chunkattempt']>;
onChunkSuccess?: GenericEventListener<MuxUploaderElementEventMap['chunksuccess']>;
onError?: GenericEventListener<MuxUploaderElementEventMap['error']>;
onUploadError?: GenericEventListener<MuxUploaderElementEventMap['uploaderror']>;
onProgress?: GenericEventListener<MuxUploaderElementEventMap['progress']>;

@@ -63,2 +64,3 @@ onSuccess?: GenericEventListener<MuxUploaderElementEventMap['success']>;

formatProgress?: ((percent: number) => string) | undefined;
dynamicChunkSize?: boolean | undefined;
onUploadStart?: GenericEventListener<CustomEvent<{

@@ -74,6 +76,8 @@ file: File;

chunk: number;
chunkSize: number;
attempts: number;
timeInterval: number;
response: any;
}>> | undefined;
onError?: GenericEventListener<CustomEvent<{
onUploadError?: GenericEventListener<CustomEvent<{
message: string;

@@ -80,0 +84,0 @@ chunkNumber?: number | undefined;

{
"name": "@mux/mux-uploader-react",
"version": "0.1.0-beta.7",
"version": "0.1.0-beta.8",
"type": "commonjs",
"description": "An uploader element for React that handles Mux Direct Uploads and a visual progress bar for you",
"main": "dist/index.js",
"module": "./dist/index.mjs",
"exports": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs.js",
"default": "./dist/index.cjs.js"
},
"types": "dist/types-ts3.4/index.d.ts",

@@ -25,9 +31,11 @@ "typesVersions": {

"dev:cjs": "open-process | yarn build:cjs --watch",
"dev:esm": "open-process | yarn build:esm --watch",
"dev:types": "yarn build:types -w",
"dev": "npm-run-all --parallel dev:types dev:cjs",
"build:cjs": "esbuild src/index.tsx --target=es2019 --minify --bundle --sourcemap --format=cjs --loader:.css=text --outdir=dist --external:react --external:prop-types",
"build:types": "tsc --declaration --emitDeclarationOnly --outDir './dist/types' && downlevel-dts ./dist/types ./dist/types-ts3.4",
"build": "npm-run-all --parallel build:types 'build:cjs -- --minify'",
"dev": "npm-run-all --parallel dev:types dev:cjs dev:esm",
"build:cjs": "esbuild src/index.tsx --target=es2019 --minify --bundle --sourcemap --metafile=./dist/cjs.json --format=cjs --loader:.css=text --outdir=dist --out-extension:.js=.cjs.js --external:react --external:prop-types",
"build:esm": "esbuild src/index.tsx --target=es2019 --minify --bundle --sourcemap --metafile=./dist/esm.json --format=esm --loader:.css=text --outdir=dist --out-extension:.js=.mjs --external:react --external:prop-types",
"build:types": "tsc --declaration --emitDeclarationOnly --outDir './dist/types'",
"postbuild:types": "downlevel-dts ./dist/types ./dist/types-ts3.4",
"build": "npm-run-all --parallel build:types 'build:cjs -- --minify' 'build:esm -- --minify'",
"prebuild": "yarn clean",
"prepublishOnly": "yarn build",
"create-release-notes": "create-release-notes ./CHANGELOG.md",

@@ -50,3 +58,3 @@ "publish-release": "../../scripts/publish.sh"

"dependencies": {
"@mux/mux-uploader": "0.1.0-beta.7",
"@mux/mux-uploader": "0.1.0-beta.8",
"prop-types": "^15.7.2"

@@ -65,3 +73,3 @@ },

},
"gitHead": "2a741f06c0e9587be14684a401e335b27246774f"
"gitHead": "505f1e6e74b2caed83d2a54ec9f3660573e4d6e9"
}

@@ -70,9 +70,10 @@ <p align="center">

| Property | Type | Description | Default |
| ---------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `endpoint` | `string \| Promise` | Either a) the authenticated URL that your file will be uploaded to or b) an async function that yields a promise that resolves to that url. Check out the [direct uploads docs](https://docs.mux.com/guides/video/upload-files-directly#1-create-an-authenticated-mux-url) for how to create one. Required. | `undefined` |
| `id` | `string` | An ID that allows `<MuxUploaderDrop>` to locate `<MuxUploader>`. Required if you use `<MuxUploaderDrop>`. | N/A |
| `type` | `"bar"` | Specifies the visual type of progress bar. A radial type is in-progress. | "bar" |
| `status` | `boolean` | Toggles text status visibility of progress bar. The text that is displayed is a percentage by default. If you prefer just the progress bar with no text upload status, don't include this attribute. | false |
| `formatProgress` | `function` | A function that accepts numeric percent and is expected to return a string. Allows for customizing how the progress should be rendered - whether you want to display only the number, a sentence with the number etc. i.e. `formatProgress={(percent: number) => `${percent} percent uploaded`}` | A function that yields only the percent as a string i.e. `"60%"` |
| Property | Type | Description | Default |
| ------------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `endpoint` | `string \| Promise` | Either a) the authenticated URL that your file will be uploaded to or b) an async function that yields a promise that resolves to that url. Check out the [direct uploads docs](https://docs.mux.com/guides/video/upload-files-directly#1-create-an-authenticated-mux-url) for how to create one. Required. | `undefined` |
| `id` | `string` | An ID that allows `<MuxUploaderDrop>` to locate `<MuxUploader>`. Required if you use `<MuxUploaderDrop>`. | N/A |
| `type` | `"bar"` | Specifies the visual type of progress bar. A radial type is in-progress. | "bar" |
| `status` | `boolean` | Toggles text status visibility of progress bar. The text that is displayed is a percentage by default. If you prefer just the progress bar with no text upload status, don't include this attribute. | false |
| `formatProgress` | `function` | A function that accepts numeric percent and is expected to return a string. Allows for customizing how the progress should be rendered - whether you want to display only the number, a sentence with the number etc. i.e. `formatProgress={(percent: number) => `${percent} percent uploaded`}` | A function that yields only the percent as a string i.e. `"60%"` |
| `dynamicChunkSize` | `boolean` | Toggles uploading with dynamic chunk sizes. Chunk sizes will change with upload speed to attempt to optimize upload. | `false` |

@@ -98,4 +99,4 @@ #### `<MuxUploaderDrop>`

| `onChunkSuccess` | Invoked when an indvidual chunk is successfully uploaded. Sample response: `{ detail: { chunk: Integer, attempts: Integer, response: XhrResponse } }` |
| `onError` | Invoked when an error occurs in the chunked upload process. |
| `onUploadError` | Invoked when an error occurs in the chunked upload process. |
| `onProgress` | Invoked continuously with incremental upload progress. This returns the current percentage of the file that's been uploaded. Sample response: `{ detail: [0..100] }` |
| `onSuccess` | Invoked when the entire file has successfully completed uploading. |

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc