handy-uploader 2.0.2 → 2.0.3

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.
@@ -8,9 +8,24 @@ export declare function formatFileSize(size: number): FileSizeResult;
8
8
  */
9
9
  export declare function getFileType(fileName: string, mimeType?: string): string;
10
10
  /**
11
- * Gets appropriate icon and color for file type
11
+ * Gets appropriate icon and color for file type (legacy function for backward compatibility)
12
12
  */
13
13
  export declare function getFileIcon(fileName: string, mimeType?: string): FileIconProps;
14
+ /**
15
+ * Gets detailed icon and color for specific file extension
16
+ */
17
+ export declare function getDetailedFileIcon(fileName: string): {
18
+ icon: string;
19
+ color: string;
20
+ };
21
+ /**
22
+ * Gets only the icon name for a file extension
23
+ */
24
+ export declare function getFileIconName(fileName: string): string;
25
+ /**
26
+ * Gets only the color for a file extension
27
+ */
28
+ export declare function getFileIconColor(fileName: string): string;
14
29
  /**
15
30
  * Checks if file is an image type
16
31
  */
@@ -30,7 +45,7 @@ export declare function getMimeTypeFromExtension(fileName: string): MimeType;
30
45
  /**
31
46
  * Constructs proper data URL for base64 image data
32
47
  */
33
- export declare function constructImageDataUrl(base64: string, format: string): string;
48
+ export declare function constructImageDataUrl(base64: string | undefined, format: string | undefined): string;
34
49
  /**
35
50
  * Compresses image using canvas
36
51
  */
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "handy-uploader",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "A comprehensive Vue 3 file uploader component library with video thumbnail generation and multiple upload styles",
5
5
  "main": "dist/handy-uploader.umd.js",
6
6
  "module": "dist/handy-uploader.es.js",
7
7
  "types": "dist/lib/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
+ "types": "./dist/lib/index.d.ts",
10
11
  "import": "./dist/handy-uploader.es.js",
11
- "require": "./dist/handy-uploader.umd.js",
12
- "types": "./dist/lib/index.d.ts"
12
+ "require": "./dist/handy-uploader.umd.js"
13
13
  }
14
14
  },
15
15
  "files": [
@@ -37,38 +37,54 @@
37
37
  "url": "https://github.com/alijahanpak/handy-uploader/issues"
38
38
  },
39
39
  "scripts": {
40
- "dev": "vite",
40
+ "dev": "storybook dev -p 6006",
41
+ "dev:vite": "vite",
41
42
  "build": "run-p type-check build-lib && npm run build-types",
42
43
  "build-lib": "vite build --mode lib",
43
44
  "build-types": "vue-tsc --project tsconfig.build.json",
44
45
  "preview": "vite preview",
45
46
  "build-only": "vite build",
46
47
  "type-check": "vue-tsc --noEmit",
47
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
48
+ "lint": "eslint --fix",
48
49
  "format": "prettier --write src/",
49
- "prepublishOnly": "npm run build"
50
+ "storybook": "storybook dev -p 6006",
51
+ "build-storybook": "storybook build",
52
+ "prepublishOnly": "npm run build",
53
+ "changeset": "changeset",
54
+ "version": "changeset version",
55
+ "release": "npm run build && changeset publish",
56
+ "prepare": "husky"
50
57
  },
51
58
  "peerDependencies": {
52
59
  "vue": "^3.0.0",
53
60
  "vuetify": "^3.0.0"
54
61
  },
55
62
  "devDependencies": {
63
+ "@changesets/cli": "^2.29.8",
56
64
  "@mdi/font": "^7.4.47",
57
- "@rushstack/eslint-patch": "^1.7.2",
58
- "@types/node": "^20.11.9",
59
- "@vitejs/plugin-vue": "^5.0.3",
60
- "@vitejs/plugin-vue-jsx": "^3.1.0",
61
- "@vue/eslint-config-prettier": "^9.0.0",
62
- "@vue/eslint-config-typescript": "^12.0.0",
63
- "@vue/tsconfig": "^0.5.1",
64
- "eslint": "^8.56.0",
65
- "eslint-plugin-vue": "^9.20.1",
65
+ "@rushstack/eslint-patch": "^1.15.0",
66
+ "@storybook/addon-essentials": "^8.6.15",
67
+ "@storybook/addon-interactions": "^8.6.15",
68
+ "@storybook/addon-links": "^8.6.15",
69
+ "@storybook/blocks": "^8.6.15",
70
+ "@storybook/testing-library": "^0.2.2",
71
+ "@storybook/vue3-vite": "^8.6.15",
72
+ "@types/node": "^25.0.9",
73
+ "@vitejs/plugin-vue": "^6.0.3",
74
+ "@vitejs/plugin-vue-jsx": "^5.1.3",
75
+ "@vue/eslint-config-prettier": "^10.2.0",
76
+ "@vue/eslint-config-typescript": "^14.6.0",
77
+ "@vue/tsconfig": "^0.8.1",
78
+ "eslint": "^9.39.2",
79
+ "eslint-plugin-vue": "^10.7.0",
80
+ "husky": "^9.1.7",
66
81
  "npm-run-all": "^4.1.5",
67
- "prettier": "^3.2.4",
68
- "typescript": "~5.3.3",
69
- "vite": "^5.0.12",
70
- "vue": "^3.4.15",
71
- "vue-tsc": "^1.8.27",
72
- "vuetify": "^3.5.1"
82
+ "prettier": "^3.8.0",
83
+ "storybook": "^8.6.15",
84
+ "typescript": "~5.9.3",
85
+ "vite": "^6.3.5",
86
+ "vue": "^3.5.26",
87
+ "vue-tsc": "^3.2.2",
88
+ "vuetify": "^3.11.6"
73
89
  }
74
90
  }