blixify-ui-web-mcp 0.1.30 → 0.1.31
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.
|
@@ -120,7 +120,7 @@ Used for `type="multi"`. Manage three arrays to track state across save/delete o
|
|
|
120
120
|
| `showModal` | `boolean` | `false` | Opens a Camera / Gallery modal instead of a direct file picker |
|
|
121
121
|
| `confirmOnRemove` | `boolean` | `false` | Shows a confirmation modal before removing a file (multi mode) |
|
|
122
122
|
| `noDuplicateFileName` | `boolean` | `false` | Rejects files whose name already exists in `data` or `upload` (multi mode) |
|
|
123
|
-
| `compress` | `{ maxFileSize?: number; fileQuality?: number }` | — | Compresses images before upload. `maxFileSize` in MB, `fileQuality` 0–1. PNG files cannot be compressed and will error if they exceed `maxFileSize`. |
|
|
123
|
+
| `compress` | `{ maxFileSize?: number; fileQuality?: number; maxDimension?: number }` | — | Compresses images before upload. `maxFileSize` in MB, `fileQuality` 0–1. `maxDimension` is the longest edge in px an image is scaled down to first (default 2560). PNG files cannot be compressed and will error if they exceed `maxFileSize`. |
|
|
124
124
|
| `darkMode` | `boolean` | `false` | Applies dark colour scheme |
|
|
125
125
|
| `mobileView` | `boolean` | `false` | Renders a compact inline layout for mobile (label left, upload button right) |
|
|
126
126
|
| `className` | `tailwind class` | — | Class applied to the outer container |
|
|
@@ -132,3 +132,4 @@ Used for `type="multi"`. Manage three arrays to track state across save/delete o
|
|
|
132
132
|
- HEIC/HEIF files are automatically converted to JPEG before upload.
|
|
133
133
|
- Drag-and-drop is disabled when `capture` or `showModal` is set.
|
|
134
134
|
- `compress` only applies to image formats (JPG, JPEG, GIF, BMP, TIFF, HEIC, HEIF). PNG files are not compressible — if a PNG exceeds `compress.maxFileSize` an error is shown.
|
|
135
|
+
- When `compress` is set, images larger than `compress.maxDimension` (default 2560px on the longest edge) are scaled down before encoding. A full-resolution 24–48MP phone photo needs ~100–200MB of canvas, and several processed together can exceed the iOS WebView memory limit, which kills and reloads the WebView.
|
|
@@ -121,7 +121,7 @@ export const UploadInput = () => {
|
|
|
121
121
|
showModal
|
|
122
122
|
accept="image/*"
|
|
123
123
|
files={chooserFiles}
|
|
124
|
-
onChange={(
|
|
124
|
+
onChange={handleMultiChange(setChooserFiles)}
|
|
125
125
|
/>
|
|
126
126
|
</div>
|
|
127
127
|
</StorySection>
|
|
@@ -140,7 +140,7 @@ export const UploadInput = () => {
|
|
|
140
140
|
mobileView
|
|
141
141
|
accept="image/*,video/*"
|
|
142
142
|
files={chooserMobileFiles}
|
|
143
|
-
onChange={(
|
|
143
|
+
onChange={handleMultiChange(setChooserMobileFiles)}
|
|
144
144
|
/>
|
|
145
145
|
</div>
|
|
146
146
|
</StorySection>
|