@georapbox/files-dropzone-element 1.1.1 → 1.2.0
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/README.md +13 -7
- package/dist/files-dropzone-defined.d.ts +3 -0
- package/dist/files-dropzone-defined.d.ts.map +1 -0
- package/dist/files-dropzone-defined.js +67 -52
- package/dist/files-dropzone-defined.js.map +1 -1
- package/dist/files-dropzone.d.ts +177 -0
- package/dist/files-dropzone.d.ts.map +1 -0
- package/dist/files-dropzone.js +67 -52
- package/dist/files-dropzone.js.map +1 -1
- package/dist/utils/files-selector.d.ts +2 -0
- package/dist/utils/files-selector.d.ts.map +1 -0
- package/dist/utils/is-valid-file.d.ts +9 -0
- package/dist/utils/is-valid-file.d.ts.map +1 -0
- package/package.json +13 -10
- package/src/files-dropzone.js +329 -137
- package/src/utils/files-selector.js +25 -18
- package/src/utils/is-valid-file.js +5 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files-selector.d.ts","sourceRoot":"","sources":["../../src/utils/files-selector.js"],"names":[],"mappings":"AA+QO,6CAFM,QAAQ,IAAI,EAAE,CAAC,CAU3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a file is valid based on the accepted file type specifiers.
|
|
3
|
+
*
|
|
4
|
+
* @param {File} file - The File object to validate.
|
|
5
|
+
* @param {string} [acceptedTypeSpecifiers=''] - The accepted file type specifiers.
|
|
6
|
+
* @returns {boolean} - True if the file is valid, false otherwise.
|
|
7
|
+
*/
|
|
8
|
+
export function isValidFile(file: File, acceptedTypeSpecifiers?: string | undefined): boolean;
|
|
9
|
+
//# sourceMappingURL=is-valid-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-valid-file.d.ts","sourceRoot":"","sources":["../../src/utils/is-valid-file.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,kCAJW,IAAI,gDAEF,OAAO,CAgCnB"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@georapbox/files-dropzone-element",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A custom element that creates a drag and drop zone for files",
|
|
5
5
|
"main": "dist/files-dropzone.js",
|
|
6
6
|
"module": "dist/files-dropzone.js",
|
|
7
7
|
"unpkg": "dist/files-dropzone.js",
|
|
8
8
|
"type": "module",
|
|
9
|
+
"types": "dist/files-dropzone.d.ts",
|
|
9
10
|
"targets": {
|
|
10
11
|
"files-dropzone": {
|
|
11
12
|
"context": "browser",
|
|
@@ -39,12 +40,13 @@
|
|
|
39
40
|
"test": "web-test-runner",
|
|
40
41
|
"test:watch": "npm run test -- --watch",
|
|
41
42
|
"test:coverage": "npm run test -- --coverage",
|
|
43
|
+
"types": "tsc --project tsconfig.json",
|
|
42
44
|
"dev:parcel": "parcel watch",
|
|
43
45
|
"dev": "npm-run-all clean dev:parcel",
|
|
44
46
|
"build:parcel": "parcel build",
|
|
45
47
|
"build": "npm-run-all clean build:parcel",
|
|
46
48
|
"clean": "rimraf dist .parcel-cache",
|
|
47
|
-
"prepare": "npm-run-all clean lint test build"
|
|
49
|
+
"prepare": "npm-run-all clean lint test build types"
|
|
48
50
|
},
|
|
49
51
|
"keywords": [
|
|
50
52
|
"custom element",
|
|
@@ -66,14 +68,15 @@
|
|
|
66
68
|
"homepage": "https://github.com/georapbox/files-dropzone-element#readme",
|
|
67
69
|
"devDependencies": {
|
|
68
70
|
"@esm-bundle/chai": "~4.3.4-fix.0",
|
|
69
|
-
"@open-wc/testing": "~3.2.
|
|
70
|
-
"@web/test-runner": "~0.
|
|
71
|
-
"@web/test-runner-playwright": "~0.
|
|
72
|
-
"eslint": "~8.
|
|
73
|
-
"eslint-plugin-wc": "~
|
|
71
|
+
"@open-wc/testing": "~3.2.2",
|
|
72
|
+
"@web/test-runner": "~0.18.0",
|
|
73
|
+
"@web/test-runner-playwright": "~0.11.0",
|
|
74
|
+
"eslint": "~8.55.0",
|
|
75
|
+
"eslint-plugin-wc": "~2.0.4",
|
|
74
76
|
"npm-run-all": "~4.1.5",
|
|
75
|
-
"parcel": "~2.9.
|
|
76
|
-
"rimraf": "~5.0.
|
|
77
|
-
"sinon": "~
|
|
77
|
+
"parcel": "~2.9.3",
|
|
78
|
+
"rimraf": "~5.0.5",
|
|
79
|
+
"sinon": "~17.0.1",
|
|
80
|
+
"typescript": "~5.3.3"
|
|
78
81
|
}
|
|
79
82
|
}
|