diff options
author | Ollie Hsieh <renahlee@outlook.com> | 2023-04-17 15:41:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 15:41:44 -0700 |
commit | 2509290fdd2b20c76c302d4962216f5d2d2b5a73 (patch) | |
tree | 455bdd7420556e80242ad245ba8d9907ec6c84ee /src/lib/media/types.ts | |
parent | 91fadadb5848404bc47b69879bbc38a9011a0c62 (diff) | |
download | voidsky-2509290fdd2b20c76c302d4962216f5d2d2b5a73.tar.zst |
Split image cropping into secondary step (#473)
* Split image cropping into secondary step * Use ImageModel and GalleryModel * Add fix for pasting image URLs * Move models to state folder * Fix things that broke after rebase * Latest -- has image display bug * Remove contentFit * Fix iOS display in gallery * Tuneup the api signatures and implement compress/resize on web * Fix await * Lint fix and remove unused function * Fix android image pathing * Fix external embed x button on android * Remove min-height from composer (no longer useful and was mispositioning the composer on android) * Fix e2e picker --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/lib/media/types.ts')
-rw-r--r-- | src/lib/media/types.ts | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/lib/media/types.ts b/src/lib/media/types.ts index 3197b4d3e..e6f442759 100644 --- a/src/lib/media/types.ts +++ b/src/lib/media/types.ts @@ -1,31 +1,21 @@ +import {openCropper} from 'react-native-image-crop-picker' + +export interface Dimensions { + width: number + height: number +} + export interface PickerOpts { - mediaType?: 'photo' + mediaType?: string multiple?: boolean maxFiles?: number } export interface CameraOpts { - mediaType?: 'photo' - width: number - height: number - freeStyleCropEnabled?: boolean - cropperCircleOverlay?: boolean -} - -export interface CropperOpts { - path: string - mediaType?: 'photo' width: number height: number freeStyleCropEnabled?: boolean cropperCircleOverlay?: boolean } -export interface PickedMedia { - mediaType: 'photo' - path: string - mime: string - size: number - width: number - height: number -} +export type CropperOptions = Parameters<typeof openCropper>[0] |