forked from coracle/flotilla
Use compressorjs-next
This commit is contained in:
+1
-1
@@ -70,7 +70,7 @@
|
||||
"@welshman/signer": "^0.8.4",
|
||||
"@welshman/store": "^0.8.4",
|
||||
"@welshman/util": "^0.8.4",
|
||||
"compressorjs": "^1.2.1",
|
||||
"compressorjs-next": "^1.1.2",
|
||||
"daisyui": "^4.12.24",
|
||||
"date-picker-svelte": "^2.17.0",
|
||||
"dotenv": "^16.6.1",
|
||||
|
||||
Generated
+6
-20
@@ -110,9 +110,9 @@ importers:
|
||||
'@welshman/util':
|
||||
specifier: ^0.8.4
|
||||
version: 0.8.4(@noble/curves@1.9.7)(@welshman/lib@0.8.4)(nostr-tools@2.20.0(typescript@5.9.3))
|
||||
compressorjs:
|
||||
specifier: ^1.2.1
|
||||
version: 1.2.1
|
||||
compressorjs-next:
|
||||
specifier: ^1.1.2
|
||||
version: 1.1.2
|
||||
daisyui:
|
||||
specifier: ^4.12.24
|
||||
version: 4.12.24(postcss@8.5.6)
|
||||
@@ -2048,9 +2048,6 @@ packages:
|
||||
resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
blueimp-canvas-to-blob@3.29.0:
|
||||
resolution: {integrity: sha512-0pcSSGxC0QxT+yVkivxIqW0Y4VlO2XSDPofBAqoJ1qJxgH9eiUDLv50Rixij2cDuEfx4M6DpD9UGZpRhT5Q8qg==}
|
||||
|
||||
boolbase@1.0.0:
|
||||
resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
|
||||
|
||||
@@ -2211,8 +2208,8 @@ packages:
|
||||
compare-func@2.0.0:
|
||||
resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==}
|
||||
|
||||
compressorjs@1.2.1:
|
||||
resolution: {integrity: sha512-+geIjeRnPhQ+LLvvA7wxBQE5ddeLU7pJ3FsKFWirDw6veY3s9iLxAQEw7lXGHnhCJvBujEQWuNnGzZcvCvdkLQ==}
|
||||
compressorjs-next@1.1.2:
|
||||
resolution: {integrity: sha512-5nwrVCR3+kSd4cwIzQEB72W4d+uHQ9so8U2C+WBr74DFoG34FM9CXoNZMsCnCTUDhmDKJ/3aI4Di1+QKF8LFow==}
|
||||
|
||||
concat-map@0.0.1:
|
||||
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
|
||||
@@ -3001,10 +2998,6 @@ packages:
|
||||
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
is-blob@2.1.0:
|
||||
resolution: {integrity: sha512-SZ/fTft5eUhQM6oF/ZaASFDEdbFVe89Imltn9uZr03wdKMcWNVYSMjQPFtg05QuNkt5l5c135ElvXEQG0rk4tw==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
is-boolean-object@1.2.2:
|
||||
resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -6909,8 +6902,6 @@ snapshots:
|
||||
|
||||
binary-extensions@2.3.0: {}
|
||||
|
||||
blueimp-canvas-to-blob@3.29.0: {}
|
||||
|
||||
boolbase@1.0.0: {}
|
||||
|
||||
bplist-creator@0.1.0:
|
||||
@@ -7073,10 +7064,7 @@ snapshots:
|
||||
array-ify: 1.0.0
|
||||
dot-prop: 5.3.0
|
||||
|
||||
compressorjs@1.2.1:
|
||||
dependencies:
|
||||
blueimp-canvas-to-blob: 3.29.0
|
||||
is-blob: 2.1.0
|
||||
compressorjs-next@1.1.2: {}
|
||||
|
||||
concat-map@0.0.1: {}
|
||||
|
||||
@@ -8004,8 +7992,6 @@ snapshots:
|
||||
dependencies:
|
||||
binary-extensions: 2.3.0
|
||||
|
||||
is-blob@2.1.0: {}
|
||||
|
||||
is-boolean-object@1.2.2:
|
||||
dependencies:
|
||||
call-bound: 1.0.4
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
import CloseCircle from "@assets/icons/close-circle.svg?dataurl"
|
||||
import Magnifier from "@assets/icons/magnifier.svg?dataurl"
|
||||
import {fly} from "@lib/transition"
|
||||
import PageContent from "@lib/components/PageContent.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import {deriveEventsForUrl} from "@app/core/state"
|
||||
@@ -92,7 +91,7 @@
|
||||
|
||||
const onRoomSearchResultClick = (event: TrustedEvent) => {
|
||||
close()
|
||||
void goToEvent(event, {keepFocus: true})
|
||||
goToEvent(event, {keepFocus: true})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
+2
-2
@@ -140,13 +140,13 @@ export const compressFile = async (
|
||||
file: File | Blob,
|
||||
options: Record<string, any> = {},
|
||||
): Promise<File> => {
|
||||
const {default: Compressor} = await import("compressorjs")
|
||||
const {default: Compressor} = await import("compressorjs-next")
|
||||
|
||||
return new Promise<File>((resolve, _reject) => {
|
||||
new Compressor(file, {
|
||||
maxWidth: 2048,
|
||||
maxHeight: 2048,
|
||||
convertSize: 10 * 1024 * 1024,
|
||||
convertTypes: ["image/png"],
|
||||
...options,
|
||||
success: result => resolve(result as File),
|
||||
error: e => {
|
||||
|
||||
Reference in New Issue
Block a user