react-dropzone 14.3.6 → 14.3.8

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.
package/package.json CHANGED
@@ -26,9 +26,10 @@
26
26
  "scripts": {
27
27
  "cz": "git-cz",
28
28
  "clean": "rimraf ./dist",
29
- "build": "yarn clean && yarn build:umd && yarn build:es",
29
+ "build": "yarn clean && yarn build:umd && yarn build:es && yarn build:es-package",
30
30
  "build:umd": "cross-env NODE_ENV=es rollup -c",
31
31
  "build:es": "cross-env BABEL_ENV=es babel ./src --out-dir ./dist/es --ignore '**/*.spec.js'",
32
+ "build:es-package": "echo '{\"type\":\"module\"}' > dist/es/package.json",
32
33
  "start": "styleguidist server",
33
34
  "styleguide": "styleguidist build",
34
35
  "test": "cross-env NODE_ENV=test yarn lint && jest --coverage && yarn typescript",
@@ -190,7 +191,7 @@
190
191
  "webpack-blocks": "^2.1.0"
191
192
  },
192
193
  "typings": "typings/react-dropzone.d.ts",
193
- "version": "14.3.6",
194
+ "version": "14.3.8",
194
195
  "engines": {
195
196
  "node": ">= 10.13"
196
197
  },
package/src/index.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  onDocumentDragOver,
27
27
  pickerOptionsFromAccept,
28
28
  TOO_MANY_FILES_REJECTION,
29
- } from "./utils/index";
29
+ } from "./utils/index.js";
30
30
 
31
31
  /**
32
32
  * Convenience wrapper component for the `useDropzone` hook
@@ -154,7 +154,7 @@ Dropzone.propTypes = {
154
154
  /**
155
155
  * Use this to provide a custom file aggregator
156
156
  *
157
- * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
157
+ * @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)
158
158
  */
159
159
  getFilesFromEvent: PropTypes.func,
160
160
 
@@ -310,7 +310,7 @@ export default Dropzone;
310
310
  * in a asynchronous fashion, from drag or input change events.
311
311
  *
312
312
  * @callback getFilesFromEvent
313
- * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
313
+ * @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)
314
314
  * @returns {(File[]|Promise<File[]>)}
315
315
  */
316
316
 
@@ -1039,4 +1039,4 @@ function reducer(state, action) {
1039
1039
 
1040
1040
  function noop() {}
1041
1041
 
1042
- export { ErrorCode } from "./utils";
1042
+ export { ErrorCode } from "./utils/index.js";
@@ -63,7 +63,8 @@ export type DropEvent =
63
63
  | React.DragEvent<HTMLElement>
64
64
  | React.ChangeEvent<HTMLInputElement>
65
65
  | DragEvent
66
- | Event;
66
+ | Event
67
+ | Array<FileSystemFileHandle>;
67
68
 
68
69
  export type DropzoneState = DropzoneRef & {
69
70
  isFocused: boolean;