@hotta/react-native-imagepicker 0.1.7 → 0.2.1

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.
@@ -10,6 +10,7 @@ import com.facebook.react.bridge.WritableNativeArray
10
10
  import com.facebook.react.bridge.WritableNativeMap
11
11
  import com.facebook.react.module.annotations.ReactModule
12
12
  import com.luck.picture.lib.basic.PictureSelector
13
+ import com.luck.picture.lib.config.InjectResourceSource
13
14
  import com.luck.picture.lib.config.SelectMimeType
14
15
  import com.luck.picture.lib.config.SelectModeConfig
15
16
  import com.luck.picture.lib.entity.LocalMedia
@@ -69,6 +70,13 @@ class NativeImagePickerModule(reactContext: ReactApplicationContext) :
69
70
  .setMaxSelectNum(1)
70
71
  .isDisplayCamera(isCamera)
71
72
  .setSelectorUIStyle(getNoCountStyle())
73
+ .setInjectLayoutResourceListener { _, resourceSource ->
74
+ if (resourceSource == InjectResourceSource.MAIN_ITEM_VIDEO_LAYOUT_RESOURCE) {
75
+ R.layout.image_picker_item_grid_video
76
+ } else {
77
+ InjectResourceSource.DEFAULT_LAYOUT_RESOURCE
78
+ }
79
+ }
72
80
  .setImageEngine(imageEngine)
73
81
  .forResult(object : OnResultCallbackListener<LocalMedia> {
74
82
  override fun onResult(localMediaList: ArrayList<LocalMedia?>?) {
@@ -92,9 +100,15 @@ class NativeImagePickerModule(reactContext: ReactApplicationContext) :
92
100
  // 隐藏选择后的数字/角标索引
93
101
  isSelectNumberStyle = false
94
102
  isPreviewSelectNumberStyle = false
95
- // selectBackground = android.R.color.transparent
103
+ // 预览页点击“下一步”时,自动选择当前视频并返回
104
+ isCompleteSelectRelativeTop = true
105
+ // 隐藏列表页和预览页的勾选按钮
106
+ selectBackground = android.R.color.transparent
107
+ previewSelectBackground = android.R.color.transparent
96
108
  selectText = "下一步"
97
109
  selectTextColor = Color.WHITE
110
+ selectNormalText = "下一步"
111
+ selectNormalTextColor = Color.WHITE
98
112
  }
99
113
  bottomBarStyle = BottomNavBarStyle().apply {
100
114
  isCompleteCountTips = false
@@ -102,8 +116,8 @@ class NativeImagePickerModule(reactContext: ReactApplicationContext) :
102
116
  bottomPreviewSelectText = "" // 选中文件后的文字设为空
103
117
 
104
118
  // (可选保障)为了防止有默认的点击态背景,你可以顺手把它的颜色也设为透明
105
- bottomPreviewNormalTextColor = android.R.color.transparent
106
- bottomPreviewSelectTextColor = android.R.color.transparent
119
+ bottomPreviewNormalTextColor = Color.WHITE
120
+ bottomPreviewSelectTextColor = Color.WHITE
107
121
  }
108
122
 
109
123
  titleBarStyle = TitleBarStyle().apply {
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <com.luck.picture.lib.widget.SquareRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:layout_width="match_parent"
4
+ android:layout_height="wrap_content">
5
+
6
+ <ImageView
7
+ android:id="@+id/ivPicture"
8
+ android:layout_width="match_parent"
9
+ android:layout_height="match_parent"
10
+ android:scaleType="centerCrop" />
11
+
12
+ <!-- PictureSelector requires these views, but zero size removes the select control and hit area. -->
13
+ <com.luck.picture.lib.widget.MediumBoldTextView
14
+ android:id="@+id/tvCheck"
15
+ android:layout_width="0dp"
16
+ android:layout_height="0dp" />
17
+
18
+ <View
19
+ android:id="@+id/btnCheck"
20
+ android:layout_width="0dp"
21
+ android:layout_height="0dp" />
22
+
23
+ <com.luck.picture.lib.widget.MediumBoldTextView
24
+ android:id="@+id/tv_duration"
25
+ android:layout_width="match_parent"
26
+ android:layout_height="wrap_content"
27
+ android:layout_alignParentBottom="true"
28
+ android:background="@drawable/ps_ic_shadow_bg"
29
+ android:drawableLeft="@drawable/ps_ic_video"
30
+ android:drawablePadding="5dp"
31
+ android:gravity="center_vertical"
32
+ android:paddingLeft="5dp"
33
+ android:text="00:00"
34
+ android:textColor="@color/ps_color_white"
35
+ android:textSize="11sp" />
36
+
37
+ </com.luck.picture.lib.widget.SquareRelativeLayout>
@@ -7,6 +7,8 @@
7
7
  @interface NativeImagePicker ()
8
8
 
9
9
  @property (nonatomic, strong) UIImagePickerController *imagePickerVc;
10
+
11
+ @property (nonatomic, strong) NSDictionary *pickOptions;
10
12
  /**
11
13
  保存Promise的resolve block
12
14
  */
@@ -25,9 +27,6 @@
25
27
  @property (nonatomic, strong) NSMutableArray *selectedAssets;
26
28
  @end
27
29
  @implementation NativeImagePicker
28
- {
29
- std::optional<JS::NativeImagePicker::ImagePickerOption> _cameraOptions;
30
- }
31
30
 
32
31
  - (instancetype)init {
33
32
  self = [super init];
@@ -52,26 +51,26 @@
52
51
  _selectedAssets = nil;
53
52
  }
54
53
 
55
- - (void)asyncShowImagePicker:(JS::NativeImagePicker::ImagePickerOption &)options resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
56
- _cameraOptions = options;
54
+ - (void)asyncShowImagePicker:(NSDictionary *)options resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
55
+ self.pickOptions = options;
57
56
  self.resolveBlock = resolve;
58
57
  self.rejectBlock = reject;
59
58
  self.callback = nil;
60
59
  [self openImagePicker];
61
60
  }
62
61
 
63
- - (void)asyncShowVideoPicker:(JS::NativeImagePicker::VideoPickerOption &)options resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
62
+ - (void)asyncShowVideoPicker:(NSDictionary *)options resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
64
63
  self.resolveBlock = resolve;
65
64
  self.rejectBlock = reject;
66
65
  self.callback = nil;
67
66
  [self openVideoPickerWithOptions:options];
68
67
  }
69
68
 
70
- - (void)openVideoPickerWithOptions:(JS::NativeImagePicker::VideoPickerOption &)options {
71
- NSInteger videoCount = options.videoCount();
72
- BOOL isCamera = options.isCamera();
73
- BOOL sortAscendingByModificationDate = options.sortAscendingByModificationDate();
74
- BOOL showSelectedIndex = options.showSelectedIndex();
69
+ - (void)openVideoPickerWithOptions:(NSDictionary *)options {
70
+ NSInteger videoCount = [options sy_integerForKey:@"videoCount"];
71
+ BOOL isCamera = [options sy_boolForKey:@"isCamera"];
72
+ BOOL sortAscendingByModificationDate = [options sy_boolForKey:@"sortAscendingByModificationDate"];
73
+ BOOL showSelectedIndex = [options sy_boolForKey:@"showSelectedIndex"];
75
74
 
76
75
  TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:videoCount delegate:self];
77
76
  imagePickerVc.iconThemeColor = [UIColor colorWithRed:255.0/255.0 green:177.0/255.0 blue:82.0/255.0 alpha:1.0];
@@ -91,22 +90,21 @@
91
90
  }
92
91
 
93
92
  __weak TZImagePickerController *weakPickerVc = imagePickerVc;
94
- [imagePickerVc setDidFinishPickingPhotosWithInfosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto, NSArray<NSDictionary *> *infos) {
95
- [weakPickerVc showProgressHUD];
96
- NSMutableArray *videoResults = [NSMutableArray array];
97
- [assets enumerateObjectsUsingBlock:^(PHAsset * _Nonnull asset, NSUInteger idx, BOOL * _Nonnull stop) {
98
- if (asset.mediaType == PHAssetMediaTypeVideo) {
99
- [[TZImageManager manager] getVideoOutputPathWithAsset:asset presetName:AVAssetExportPresetHighestQuality success:^(NSString *outputPath) {
100
- [videoResults addObject:[self handleVideoPickerData:outputPath asset:asset]];
101
- if ([videoResults count] == [assets count]) {
102
- [self invokeSuccessWithResult:videoResults];
103
- }
104
- } failure:^(NSString *errorMessage, NSError *error) {
105
- [self invokeError];
106
- }];
107
- }
93
+ // 使用专门的视频回调
94
+ [imagePickerVc setDidFinishPickingVideoHandle:^(UIImage *coverImage, PHAsset *asset) {
95
+
96
+ [[TZImageManager manager] getVideoOutputPathWithAsset:asset presetName:AVAssetExportPresetPassthrough success:^(NSString *outputPath) {
97
+ // 构建单个结果
98
+ NSDictionary *result = [self handleVideoPickerData:outputPath asset:asset];
99
+
100
+ // 隐藏 HUD 并回调
101
+ [self invokeSuccessWithResult:@[result]];
102
+ [weakPickerVc dismissViewControllerAnimated:YES completion:nil];
103
+
104
+ } failure:^(NSString *errorMessage, NSError *error) {
105
+ [self invokeError];
106
+ [weakPickerVc dismissViewControllerAnimated:YES completion:nil];
108
107
  }];
109
- [weakPickerVc hideProgressHUD];
110
108
  }];
111
109
 
112
110
  [imagePickerVc setImagePickerControllerDidCancelHandle:^{
@@ -119,21 +117,22 @@
119
117
 
120
118
  - (void)openImagePicker {
121
119
  // 照片最大可选张数
122
- NSInteger imageCount = _cameraOptions->imageCount();
120
+ NSInteger imageCount = [self.pickOptions sy_integerForKey:@"imageCount"];
123
121
  // 显示内部拍照按钮
124
- BOOL isCamera = _cameraOptions->isCamera();
125
- BOOL isCrop = _cameraOptions->isCrop();
126
- BOOL isGif = _cameraOptions->isGif();
127
- BOOL showCropCircle = _cameraOptions->showCropCircle();
128
- BOOL isRecordSelected = _cameraOptions->isRecordSelected();
129
- BOOL allowPickingOriginalPhoto = _cameraOptions->allowPickingOriginalPhoto();
130
- BOOL allowPickingMultipleVideo = _cameraOptions->allowPickingMultipleVideo();
131
- BOOL sortAscendingByModificationDate = _cameraOptions->sortAscendingByModificationDate();
132
- BOOL showSelectedIndex = _cameraOptions->showSelectedIndex();
133
- NSInteger CropW = _cameraOptions->CropW();
134
- NSInteger CropH = _cameraOptions->CropH();
135
- NSInteger circleCropRadius = _cameraOptions->circleCropRadius();
136
- NSInteger quality = _cameraOptions->quality();
122
+ BOOL isCamera = [self.pickOptions sy_boolForKey:@"isCamera"];
123
+ BOOL isCrop = [self.pickOptions sy_boolForKey:@"isCrop"];
124
+ BOOL isGif = [self.pickOptions sy_boolForKey:@"isGif"];
125
+ BOOL showCropCircle = [self.pickOptions sy_boolForKey:@"showCropCircle"];
126
+ BOOL isRecordSelected = [self.pickOptions sy_boolForKey:@"isRecordSelected"];
127
+ BOOL allowPickingOriginalPhoto = [self.pickOptions sy_boolForKey:@"allowPickingOriginalPhoto"];
128
+ BOOL allowPickingMultipleVideo = [self.pickOptions sy_boolForKey:@"allowPickingMultipleVideo"];
129
+ BOOL sortAscendingByModificationDate = [self.pickOptions sy_boolForKey:@"sortAscendingByModificationDate"];
130
+ BOOL showSelectedIndex = [self.pickOptions sy_boolForKey:@"showSelectedIndex"];
131
+ NSInteger CropW = [self.pickOptions sy_integerForKey:@"CropW"];
132
+ NSInteger CropH = [self.pickOptions sy_integerForKey:@"CropH"];
133
+ NSInteger circleCropRadius = [self.pickOptions sy_integerForKey:@"circleCropRadius"];
134
+ NSInteger quality = [self.pickOptions sy_integerForKey:@"quality"];
135
+
137
136
 
138
137
  TZImagePickerController *imagePickerVc = [[TZImagePickerController alloc] initWithMaxImagesCount:imageCount delegate:self];
139
138
  imagePickerVc.iconThemeColor = [UIColor colorWithRed:255.0/255.0 green:177.0/255.0 blue:82.0/255.0 alpha:1.0];
@@ -265,12 +264,12 @@
265
264
  [tzImagePickerVc hideProgressHUD];
266
265
 
267
266
  TZAssetModel *assetModel = [[TZImageManager manager] createModelWithAsset:asset];
268
- BOOL isCrop = self->_cameraOptions->isCrop();
269
- BOOL showCropCircle = self->_cameraOptions->showCropCircle();
270
- NSInteger CropW = self->_cameraOptions->CropW();
271
- NSInteger CropH = self->_cameraOptions->CropH();
272
- NSInteger circleCropRadius = self->_cameraOptions->circleCropRadius();
273
- NSInteger quality = self->_cameraOptions->quality();
267
+ BOOL isCrop = [self.pickOptions sy_boolForKey:@"isCrop"];
268
+ BOOL showCropCircle = [self.pickOptions sy_boolForKey:@"showCropCircle"];
269
+ NSInteger CropW = [self.pickOptions sy_integerForKey:@"CropW"];
270
+ NSInteger CropH = [self.pickOptions sy_integerForKey:@"CropH"];
271
+ NSInteger circleCropRadius = [self.pickOptions sy_integerForKey:@"circleCropRadius"];
272
+ NSInteger quality = [self.pickOptions sy_integerForKey:@"quality"];
274
273
 
275
274
  if (isCrop) {
276
275
  TZImagePickerController *imagePicker = [[TZImagePickerController alloc] initCropTypeWithAsset:assetModel.asset photo:image completion:^(UIImage *cropImage, id asset) {
@@ -310,7 +309,7 @@
310
309
  }
311
310
 
312
311
  - (BOOL)isAssetCanSelect:(PHAsset *)asset {
313
- BOOL allowPickingGif = _cameraOptions->isGif();
312
+ BOOL allowPickingGif = [self.pickOptions sy_boolForKey:@"isGif"];;
314
313
  BOOL isGIF = [[TZImageManager manager] getAssetType:asset] == TZAssetModelMediaTypePhotoGif;
315
314
  if (!allowPickingGif && isGIF) {
316
315
  return NO;
@@ -368,7 +367,7 @@
368
367
  NSString *fileExtension = [filename pathExtension];
369
368
  NSMutableString *filePath = [NSMutableString string];
370
369
  BOOL isPNG = [fileExtension hasSuffix:@"PNG"] || [fileExtension hasSuffix:@"png"];
371
- BOOL compressFocusAlpha = _cameraOptions->compressFocusAlpha();
370
+ BOOL compressFocusAlpha = [self.pickOptions sy_boolForKey:@"compressFocusAlpha"];
372
371
 
373
372
  if (isPNG) {
374
373
  [filePath appendString:[NSString stringWithFormat:@"%@SyanImageCaches/%@", NSTemporaryDirectory(), filename]];
@@ -385,7 +384,7 @@
385
384
  NSInteger size = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil].fileSize;
386
385
  photo[@"size"] = @(size);
387
386
  photo[@"mediaType"] = @(phAsset.mediaType);
388
- if (_cameraOptions->enableBase64()) {
387
+ if ([self.pickOptions sy_boolForKey:@"enableBase64"]) {
389
388
  if(isPNG){
390
389
  photo[@"base64"] = [NSString stringWithFormat:@"data:image/png;base64,%@", [writeData base64EncodedStringWithOptions:0]];
391
390
  }else{
@@ -407,7 +406,7 @@
407
406
  NSData *writeData = nil;
408
407
  NSMutableString *filePath = [NSMutableString string];
409
408
  BOOL isPNG = [fileExtension hasSuffix:@"PNG"] || [fileExtension hasSuffix:@"png"];
410
- BOOL compressFocusAlpha = _cameraOptions->compressFocusAlpha();
409
+ BOOL compressFocusAlpha = [self.pickOptions sy_boolForKey:@"compressFocusAlpha"];
411
410
 
412
411
  if (isGIF) {
413
412
  image = [UIImage sd_tz_animatedGIFWithData:data];
@@ -431,7 +430,7 @@
431
430
  NSInteger size = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:nil].fileSize;
432
431
  photo[@"size"] = @(size);
433
432
  photo[@"mediaType"] = @(phAsset.mediaType);
434
- if (_cameraOptions->enableBase64() && !isGIF) {
433
+ if ([self.pickOptions sy_boolForKey:@"enableBase64"] && !isGIF) {
435
434
  if(isPNG){
436
435
  photo[@"base64"] = [NSString stringWithFormat:@"data:image/png;base64,%@", [writeData base64EncodedStringWithOptions:0]];
437
436
  }else{
@@ -469,7 +468,7 @@
469
468
  video[@"size"] = @([[[NSFileManager defaultManager] attributesOfItemAtPath:outputPath error:nil] fileSize]);
470
469
  video[@"width"] = @(asset.pixelWidth);
471
470
  video[@"height"] = @(asset.pixelHeight);
472
- video[@"duration"] = @((long long)(asset.duration * 1000));
471
+ video[@"duration"] = @((long long)(asset.duration));
473
472
  video[@"mime"] = @"video/mp4";
474
473
  video[@"filename"] = [asset valueForKey:@"filename"];
475
474
  video[@"localIdentifier"] = asset.localIdentifier;
@@ -1,10 +1,22 @@
1
1
  "use strict";
2
2
 
3
- import NativeImagePicker from "./NativeImagePicker.js";
3
+ import NativeImagePicker, { defaultOptions } from "./NativeImagePicker.js";
4
4
  const HTNativeImagePicker = (() => {
5
5
  return {
6
- asyncShowImagePicker: NativeImagePicker.asyncShowImagePicker,
7
- asyncShowVideoPicker: NativeImagePicker.asyncShowVideoPicker
6
+ asyncShowImagePicker: options => {
7
+ const _options = {
8
+ ...defaultOptions,
9
+ ...options
10
+ };
11
+ return NativeImagePicker.asyncShowImagePicker(_options);
12
+ },
13
+ asyncShowVideoPicker: options => {
14
+ const _options = {
15
+ ...defaultOptions,
16
+ ...options
17
+ };
18
+ return NativeImagePicker.asyncShowVideoPicker(_options);
19
+ }
8
20
  };
9
21
  })();
10
22
  export default HTNativeImagePicker;
@@ -1,2 +1 @@
1
- {"version":3,"names":["NativeImagePicker","HTNativeImagePicker","asyncShowImagePicker","asyncShowVideoPicker"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAOA,iBAAiB,MAAM,wBAAqB;AAEnD,MAAMC,mBAAmB,GAAG,CAAC,MAAM;EACjC,OAAO;IACLC,oBAAoB,EAAEF,iBAAiB,CAACE,oBAAoB;IAC5DC,oBAAoB,EAAEH,iBAAiB,CAACG;EAC1C,CAAC;AACH,CAAC,EAAE,CAAC;AAEJ,eAAeF,mBAAmB","ignoreList":[]}
2
- AClD,OAAOJ,iBAAiB,CAACG,oBAAoB,CAACE,QAAQ,CAAC;IACzD,CAAC;IACDC,oBAAoB,EAAGF,OAA0B,IAAM;MACrD,MAAMC,QAAQ,GAAG;QAAE,GAAGJ,cAAc;QAAE,GAAGG;MAAQ,CAAC;MAClD,OAAOJ,iBAAiB,CAACM,oBAAoB,CAACD,QAAQ,CAAC;IACzD;EACF,CAAC;AACH,CAAC,EAAE,CAAC;AAEJ,eAAeH,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["NativeImagePicker","defaultOptions","HTNativeImagePicker","asyncShowImagePicker","options","_options","asyncShowVideoPicker"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAOA,iBAAiB,IACtBC,cAAc,QAIR,wBAAqB;AAE7B,MAAMC,mBAAmB,GAAG,CAAC,MAAM;EACjC,OAAO;IACLC,oBAAoB,EAAGC,OAA0B,IAAM;MACrD,MAAMC,QAAQ,GAAG;QAAE,GAAGJ,cAAc;QAAE,GAAGG;MAAQ,CAAC;MAClD,OAAOJ,iBAAiB,CAACG,oBAAoB,CAACE,QAAQ,CAAC;IACzD,CAAC;IACDC,oBAAoB,EAAGF,OAA0B,IAAM;MACrD,MAAMC,QAAQ,GAAG;QAAE,GAAGJ,cAAc;QAAE,GAAGG;MAAQ,CAAC;MAClD,OAAOJ,iBAAiB,CAACM,oBAAoB,CAACD,QAAQ,CAAC;IACzD;EACF,CAAC;AACH,CAAC,EAAE,CAAC;AAEJ,eAAeH,mBAAmB","ignoreList":[]}
@@ -96,8 +96,8 @@ export declare const defaultVideoOptions: {
96
96
  showSelectedIndex: boolean;
97
97
  };
98
98
  export interface Spec extends TurboModule {
99
- asyncShowImagePicker(options: ImagePickerOption): Promise<Array<SelectedPhoto>>;
100
- asyncShowVideoPicker(options: VideoPickerOption): Promise<Array<SelectedVideo>>;
99
+ asyncShowImagePicker(options: Object): Promise<Array<SelectedPhoto>>;
100
+ asyncShowVideoPicker(options: Object): Promise<Array<SelectedVideo>>;
101
101
  }
102
102
  declare const _default: Spec;
103
103
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"NativeImagePicker.d.ts","sourceRoot":"","sources":["../../../src/NativeImagePicker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAErE,MAAM,MAAM,iBAAiB,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,kBAAkB,EAAC,OAAO,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,yBAAyB,EAAE,OAAO,CAAC;IACnC,yBAAyB,EAAE,OAAO,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC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": "0.2.1",
4
4
  "description": "@hotta/react-native-imagepicker",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -103,8 +103,8 @@ export const defaultVideoOptions = {
103
103
  }
104
104
 
105
105
  export interface Spec extends TurboModule {
106
- asyncShowImagePicker(options:ImagePickerOption): Promise<Array<SelectedPhoto>>;
107
- asyncShowVideoPicker(options:VideoPickerOption): Promise<Array<SelectedVideo>>;
106
+ asyncShowImagePicker(options:Object): Promise<Array<SelectedPhoto>>;
107
+ asyncShowVideoPicker(options:Object): Promise<Array<SelectedVideo>>;
108
108
  }
109
109
 
110
110
  export default TurboModuleRegistry.getEnforcing<Spec>('NativeImagePicker');