sanity-plugin-smart-asset-manager 1.0.0 โ 1.1.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 +17 -20
- package/dist/index.js +570 -134
- package/dist/index.mjs +551 -115
- package/package.json +73 -72
- package/src/components/SmartAssetManagerTool.tsx +149 -47
- package/src/components/TopToolbar.tsx +8 -4
- package/src/components/UploadProgressModal.tsx +311 -0
- package/src/components/__tests__/SmartAssetManagerTool.test.tsx +227 -0
- package/src/components/__tests__/TopToolbar.test.tsx +71 -0
- package/src/setupTests.ts +50 -0
- package/src/utils/__tests__/compressImage.test.ts +22 -0
- package/src/utils/compressImage.ts +77 -0
- package/src/utils/uploadWithProgress.ts +114 -0
package/README.md
CHANGED
|
@@ -7,21 +7,21 @@ An advanced, premium asset management dashboard for Sanity Studio. Stop guessing
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Features
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Advanced Filtering & Sorting
|
|
13
13
|
|
|
14
14
|
Easily navigate through your media library. Filter by **Images**, **Videos**, **Audio**, and other file types. Use the built-in size filters to find **Small (<100KB)**, **Medium (100KB-1MB)**, or **Large (>1MB)** files instantly.
|
|
15
15
|
|
|
16
16
|

|
|
17
17
|
|
|
18
|
-
###
|
|
18
|
+
### Image Size Analyzer
|
|
19
19
|
|
|
20
20
|
Identify performance bottlenecks. The Analyzer tab lists your assets by weight and dimensions. You can sort by file size (Weight) to quickly find unoptimized images that are slowing down your site.
|
|
21
21
|
|
|
22
22
|

|
|
23
23
|
|
|
24
|
-
###
|
|
24
|
+
### Unused Asset Detector & Bulk Cleanup
|
|
25
25
|
|
|
26
26
|
Keep your dataset lean and save on storage costs.
|
|
27
27
|
|
|
@@ -31,23 +31,23 @@ Keep your dataset lean and save on storage costs.
|
|
|
31
31
|
|
|
32
32
|

|
|
33
33
|
|
|
34
|
-
###
|
|
34
|
+
### Duplicate Prevention
|
|
35
35
|
|
|
36
36
|
Stop uploading the same file twice. The plugin automatically checks for existing filenames during upload and warns you if a duplicate is detected, keeping your library clean and organized.
|
|
37
37
|
|
|
38
|
-
###
|
|
38
|
+
### Deep Usage Tracking
|
|
39
39
|
|
|
40
40
|
Never delete a critical asset by mistake. Click any asset to see exactly which documents are referencing it. You can even click a document in the usage list to jump straight to the editor.
|
|
41
41
|
|
|
42
42
|

|
|
43
43
|
|
|
44
|
-
###
|
|
44
|
+
### Batch Uploads
|
|
45
45
|
|
|
46
46
|
Upload multiple files at once. The plugin provides clear progress feedback and handles batch processing efficiently, with a smart 1-second delay after completion to ensure Sanity's backend has indexed your new files.
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
-
##
|
|
50
|
+
## Installation
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
53
|
npm install sanity-plugin-smart-asset-manager
|
|
@@ -59,7 +59,7 @@ pnpm add sanity-plugin-smart-asset-manager
|
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
62
|
-
##
|
|
62
|
+
## Usage
|
|
63
63
|
|
|
64
64
|
1. Add the plugin to your `sanity.config.ts` (or `.js`):
|
|
65
65
|
|
|
@@ -80,7 +80,7 @@ export default defineConfig({
|
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
-
##
|
|
83
|
+
## Why This Plugin?
|
|
84
84
|
|
|
85
85
|
Sanity's default media library is great for selection, but maintenance can be challenging as libraries grow. **Smart Asset Manager** provides the power tools needed for:
|
|
86
86
|
|
|
@@ -90,20 +90,17 @@ Sanity's default media library is great for selection, but maintenance can be ch
|
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
93
|
-
##
|
|
93
|
+
## โ๏ธ License
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
MIT License ยฉ Code-Journey. All rights reserved.
|
|
96
96
|
|
|
97
|
-
|
|
98
|
-
npm run build
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
The plugin uses `tsup` for lightning-fast ESM and CJS builds with declaration types.
|
|
97
|
+
Licensed under the MIT License. You may obtain a copy of the License at [LICENSE](LICENSE).
|
|
102
98
|
|
|
103
99
|
---
|
|
104
100
|
|
|
105
|
-
##
|
|
101
|
+
## โญ Support & Feedback
|
|
106
102
|
|
|
107
|
-
|
|
103
|
+
If you find this plugin helpful, intuitive, or visually stunning, please consider leaving a star on our repository! Your appreciation helps keep us motivated to design, update, and maintain premium developer tools.
|
|
108
104
|
|
|
109
|
-
|
|
105
|
+
- ๐ **[Star the Repository on GitHub](https://github.com/Code-Journey-77/sanity-plugin-smart-asset-manager)**
|
|
106
|
+
- ๐ **[Sanity Plugin Marketplace Listing](https://www.sanity.io/plugins/sanity-plugin-smart-asset-manager)**
|