@codeleap/mobile 1.2.1 → 1.4.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.
Files changed (194) hide show
  1. package/.eslintignore +2 -0
  2. package/.eslintrc.js +3 -0
  3. package/.vscode/settings.json +11 -0
  4. package/CodeLeap-Mobile-Packages.code-workspace +8 -0
  5. package/dist/components/ActivityIndicator.js +9 -6
  6. package/dist/components/ActivityIndicator.js.map +1 -1
  7. package/dist/components/Animated.d.ts +15 -0
  8. package/dist/components/Animated.js +55 -0
  9. package/dist/components/Animated.js.map +1 -0
  10. package/dist/components/Button.d.ts +107 -104
  11. package/dist/components/Button.js +30 -9
  12. package/dist/components/Button.js.map +1 -1
  13. package/dist/components/Checkbox/index.d.ts +1 -1
  14. package/dist/components/Checkbox/index.js +7 -8
  15. package/dist/components/Checkbox/index.js.map +1 -1
  16. package/dist/components/Checkbox/styles.d.ts +47 -43
  17. package/dist/components/Checkbox/styles.js +8 -8
  18. package/dist/components/Checkbox/styles.js.map +1 -1
  19. package/dist/components/ContentView.js +4 -2
  20. package/dist/components/ContentView.js.map +1 -1
  21. package/dist/components/FileInput.d.ts +26 -2
  22. package/dist/components/FileInput.js +151 -4
  23. package/dist/components/FileInput.js.map +1 -1
  24. package/dist/components/Icon.d.ts +4 -6
  25. package/dist/components/Icon.js +25 -11
  26. package/dist/components/Icon.js.map +1 -1
  27. package/dist/components/Image.d.ts +7 -6
  28. package/dist/components/Image.js +4 -4
  29. package/dist/components/Image.js.map +1 -1
  30. package/dist/components/List.d.ts +11 -0
  31. package/dist/components/List.js +77 -0
  32. package/dist/components/List.js.map +1 -0
  33. package/dist/components/Modal/index.d.ts +25 -0
  34. package/dist/components/Modal/index.js +109 -0
  35. package/dist/components/Modal/index.js.map +1 -0
  36. package/dist/components/Modal/styles.d.ts +66 -0
  37. package/dist/components/Modal/styles.js +57 -0
  38. package/dist/components/Modal/styles.js.map +1 -0
  39. package/dist/components/Navigation/Navigation.d.ts +3 -0
  40. package/dist/components/Navigation/Navigation.js +76 -0
  41. package/dist/components/Navigation/Navigation.js.map +1 -0
  42. package/dist/components/Navigation/constants.d.ts +5 -0
  43. package/dist/components/Navigation/constants.js +11 -0
  44. package/dist/components/Navigation/constants.js.map +1 -0
  45. package/dist/components/Navigation/index.d.ts +3 -0
  46. package/dist/components/Navigation/index.js +16 -0
  47. package/dist/components/Navigation/index.js.map +1 -0
  48. package/dist/components/Navigation/types.d.ts +26 -0
  49. package/dist/components/Navigation/types.js +8 -0
  50. package/dist/components/Navigation/types.js.map +1 -0
  51. package/dist/components/Navigation/utils.d.ts +3 -0
  52. package/dist/components/Navigation/utils.js +67 -0
  53. package/dist/components/Navigation/utils.js.map +1 -0
  54. package/dist/components/Overlay.d.ts +16 -0
  55. package/dist/components/Overlay.js +66 -0
  56. package/dist/components/Overlay.js.map +1 -0
  57. package/dist/components/Pager/index.d.ts +19 -0
  58. package/dist/components/Pager/index.js +164 -0
  59. package/dist/components/Pager/index.js.map +1 -0
  60. package/dist/components/Pager/styles.d.ts +51 -0
  61. package/dist/components/Pager/styles.js +44 -0
  62. package/dist/components/Pager/styles.js.map +1 -0
  63. package/dist/components/RadioInput/index.d.ts +1 -0
  64. package/dist/components/RadioInput/index.js +13 -19
  65. package/dist/components/RadioInput/index.js.map +1 -1
  66. package/dist/components/RadioInput/styles.d.ts +48 -44
  67. package/dist/components/RadioInput/styles.js +4 -4
  68. package/dist/components/RadioInput/styles.js.map +1 -1
  69. package/dist/components/Scroll.d.ts +3 -96
  70. package/dist/components/Scroll.js +11 -8
  71. package/dist/components/Scroll.js.map +1 -1
  72. package/dist/components/Sections.d.ts +11 -0
  73. package/dist/components/Sections.js +77 -0
  74. package/dist/components/Sections.js.map +1 -0
  75. package/dist/components/Select/index.d.ts +5 -2
  76. package/dist/components/Select/index.js +118 -5
  77. package/dist/components/Select/index.js.map +1 -1
  78. package/dist/components/Select/styles.d.ts +9 -0
  79. package/dist/components/Select/styles.js +57 -0
  80. package/dist/components/Select/styles.js.map +1 -0
  81. package/dist/components/Select/types.d.ts +33 -0
  82. package/dist/components/Select/types.js +3 -0
  83. package/dist/components/Select/types.js.map +1 -0
  84. package/dist/components/Slider/Mark.d.ts +3 -0
  85. package/dist/components/Slider/Mark.js +32 -0
  86. package/dist/components/Slider/Mark.js.map +1 -0
  87. package/dist/components/Slider/Thumb.d.ts +7 -0
  88. package/dist/components/Slider/Thumb.js +30 -0
  89. package/dist/components/Slider/Thumb.js.map +1 -0
  90. package/dist/components/Slider/index.d.ts +3 -0
  91. package/dist/components/Slider/index.js +94 -0
  92. package/dist/components/Slider/index.js.map +1 -0
  93. package/dist/components/{Slider.d.ts → Slider/types.d.ts} +12 -7
  94. package/dist/components/Slider/types.js +3 -0
  95. package/dist/components/Slider/types.js.map +1 -0
  96. package/dist/components/Switch.d.ts +2 -2
  97. package/dist/components/Switch.js +6 -7
  98. package/dist/components/Switch.js.map +1 -1
  99. package/dist/components/Text.js +5 -5
  100. package/dist/components/Text.js.map +1 -1
  101. package/dist/components/TextInput.d.ts +108 -94
  102. package/dist/components/TextInput.js +42 -35
  103. package/dist/components/TextInput.js.map +1 -1
  104. package/dist/components/Touchable.d.ts +9 -14
  105. package/dist/components/Touchable.js +11 -15
  106. package/dist/components/Touchable.js.map +1 -1
  107. package/dist/components/View.d.ts +105 -181
  108. package/dist/components/View.js +6 -8
  109. package/dist/components/View.js.map +1 -1
  110. package/dist/components/{index.d.ts → components.d.ts} +6 -0
  111. package/dist/components/{index.js → components.js} +7 -1
  112. package/dist/components/components.js.map +1 -0
  113. package/dist/index.d.ts +4 -1
  114. package/dist/index.js +7 -2
  115. package/dist/index.js.map +1 -1
  116. package/dist/modules/documentPicker.d.ts +3 -0
  117. package/dist/modules/documentPicker.js +12 -0
  118. package/dist/modules/documentPicker.js.map +1 -0
  119. package/dist/modules/fastImage.js +1 -1
  120. package/dist/modules/fastImage.js.map +1 -1
  121. package/dist/modules/reactNavigation.d.ts +3 -0
  122. package/dist/modules/reactNavigation.js +11 -0
  123. package/dist/modules/reactNavigation.js.map +1 -0
  124. package/dist/modules/types/fileTypes.d.ts +138 -0
  125. package/dist/modules/types/fileTypes.js +3 -0
  126. package/dist/modules/types/fileTypes.js.map +1 -0
  127. package/dist/types/utility.d.ts +1 -1
  128. package/dist/utils/OSAlert.d.ts +3 -3
  129. package/dist/utils/OSAlert.js.map +1 -1
  130. package/dist/utils/misc.d.ts +2 -0
  131. package/dist/utils/misc.js +26 -0
  132. package/dist/utils/misc.js.map +1 -0
  133. package/dist/utils/styles.js +1 -1
  134. package/dist/utils/styles.js.map +1 -1
  135. package/package.json +10 -4
  136. package/src/components/ActivityIndicator.tsx +38 -28
  137. package/src/components/Animated.tsx +34 -0
  138. package/src/components/Button.tsx +68 -34
  139. package/src/components/Checkbox/index.tsx +60 -48
  140. package/src/components/Checkbox/styles.ts +39 -30
  141. package/src/components/ContentView.tsx +24 -18
  142. package/src/components/FileInput.tsx +177 -5
  143. package/src/components/Icon.tsx +36 -23
  144. package/src/components/Image.tsx +41 -35
  145. package/src/components/List.tsx +100 -0
  146. package/src/components/Modal/index.tsx +158 -0
  147. package/src/components/Modal/styles.ts +118 -0
  148. package/src/components/Navigation/Navigation.tsx +51 -0
  149. package/src/components/Navigation/constants.ts +8 -0
  150. package/src/components/Navigation/index.tsx +3 -0
  151. package/src/components/Navigation/types.ts +37 -0
  152. package/src/components/Navigation/utils.tsx +54 -0
  153. package/src/components/Overlay.tsx +76 -0
  154. package/src/components/Pager/index.tsx +241 -0
  155. package/src/components/Pager/styles.ts +51 -0
  156. package/src/components/RadioInput/index.tsx +76 -52
  157. package/src/components/RadioInput/styles.ts +23 -18
  158. package/src/components/Scroll.tsx +84 -73
  159. package/src/components/Select/index.tsx +179 -6
  160. package/src/components/Select/styles.ts +81 -0
  161. package/src/components/Select/types.ts +41 -0
  162. package/src/components/Slider/Mark.tsx +46 -0
  163. package/src/components/Slider/Thumb.tsx +29 -0
  164. package/src/components/Slider/index.tsx +123 -0
  165. package/src/components/Slider/types.ts +25 -0
  166. package/src/components/Switch.tsx +63 -54
  167. package/src/components/Text.tsx +22 -23
  168. package/src/components/TextInput.tsx +194 -191
  169. package/src/components/Touchable.tsx +45 -35
  170. package/src/components/View.tsx +33 -40
  171. package/src/components/components.ts +26 -0
  172. package/src/index.ts +6 -2
  173. package/src/modules/documentPicker.ts +8 -0
  174. package/src/modules/fastImage.ts +2 -2
  175. package/src/modules/index.d.ts +496 -0
  176. package/src/modules/reactNavigation.ts +4 -0
  177. package/src/modules/types/documentPicker.d.ts +215 -0
  178. package/src/modules/types/fileTypes.ts +138 -0
  179. package/src/types/utility.ts +2 -2
  180. package/src/utils/OSAlert.ts +35 -33
  181. package/src/utils/misc.ts +24 -0
  182. package/src/utils/styles.ts +13 -16
  183. package/dist/components/Drawer.d.ts +0 -23
  184. package/dist/components/Drawer.js +0 -78
  185. package/dist/components/Drawer.js.map +0 -1
  186. package/dist/components/Navigation.d.ts +0 -30
  187. package/dist/components/Navigation.js +0 -126
  188. package/dist/components/Navigation.js.map +0 -1
  189. package/dist/components/Slider.js +0 -130
  190. package/dist/components/Slider.js.map +0 -1
  191. package/dist/components/index.js.map +0 -1
  192. package/src/components/Navigation.tsx +0 -125
  193. package/src/components/Slider.tsx +0 -198
  194. package/src/components/index.ts +0 -19
@@ -0,0 +1,496 @@
1
+ declare module 'react-native-image-crop-picker' {
2
+ /**
3
+ * AVAssetExportPreset presets.
4
+ *
5
+ * @see https://developer.apple.com/documentation/avfoundation/avassetexportsession/export_preset_names_for_quicktime_files_of_a_given_size
6
+ */
7
+ type CompressVideoPresets =
8
+ | '640x480'
9
+ | '960x540'
10
+ | '1280x720'
11
+ | '1920x1080'
12
+ | 'HEVC3840x2160'
13
+ | 'LowQuality'
14
+ | 'MediumQuality'
15
+ | 'HighestQuality'
16
+ | 'Passthrough';
17
+
18
+ /**
19
+ * iOS smart album types
20
+ *
21
+ * @see https://developer.apple.com/documentation/photokit/phassetcollectionsubtype
22
+ */
23
+ type SmartAlbums =
24
+ | 'Regular'
25
+ | 'SyncedEvent'
26
+ | 'SyncedFaces'
27
+ | 'SyncedAlbum'
28
+ | 'Imported'
29
+ | 'PhotoStream'
30
+ | 'CloudShared'
31
+ | 'Generic'
32
+ | 'Panoramas'
33
+ | 'Videos'
34
+ | 'Favorites'
35
+ | 'Timelapses'
36
+ | 'AllHidden'
37
+ | 'RecentlyAdded'
38
+ | 'Bursts'
39
+ | 'SlomoVideos'
40
+ | 'UserLibrary'
41
+ | 'Screenshots'
42
+ | 'SelfPortraits'
43
+ /** >= iOS 10.2 */
44
+ | 'DepthEffect'
45
+ /** >= iOS 10.3 */
46
+ | 'LivePhotos'
47
+ /** >= iOS 11 */
48
+ | 'Animated'
49
+ | 'LongExposure';
50
+
51
+ export interface CommonOptions {
52
+ /**
53
+ * Enable or disable multiple image selection.
54
+ *
55
+ * @default false
56
+ */
57
+ multiple?: boolean;
58
+
59
+ /**
60
+ * Min number of files to select when using `multiple` option.
61
+ *
62
+ * @platform iOS only
63
+ * @default 1
64
+ */
65
+ minFiles?: number;
66
+
67
+ /**
68
+ * Max number of files to select when using `multiple` option.
69
+ *
70
+ * @platform iOS only
71
+ * @default 5
72
+ */
73
+ maxFiles?: number;
74
+
75
+ /**
76
+ * Promise will resolve/reject once ViewController completion block is called.
77
+ *
78
+ * @platform iOS only
79
+ * @default true
80
+ */
81
+ waitAnimationEnd?: boolean;
82
+
83
+ /**
84
+ * List of smart albums to choose from.
85
+ *
86
+ * @platform iOS only
87
+ * @default ['UserLibrary', 'PhotoStream', 'Panoramas', 'Videos', 'Bursts']
88
+ */
89
+ smartAlbums?: SmartAlbums[];
90
+
91
+ /**
92
+ * Whether to default to the front camera when opened. Please note that not all
93
+ * Android devices handle this parameter, see
94
+ * [issue #1058](https://github.com/ivpusic/react-native-image-crop-picker/issues/1058).
95
+ *
96
+ * @default false
97
+ */
98
+ useFrontCamera?: boolean;
99
+
100
+ /**
101
+ * Text displayed while photo is loading in picker.
102
+ *
103
+ * @default 'Processing assets...'
104
+ */
105
+ loadingLabelText?: string;
106
+
107
+ /**
108
+ * Whether to show the number of selected assets.
109
+ *
110
+ * @default true
111
+ */
112
+ showsSelectedCount?: boolean;
113
+
114
+ /**
115
+ * Applies a sort order on the creation date on how media is displayed within the
116
+ * albums/detail photo views when opening the image picker.
117
+ *
118
+ * @platform iOS only
119
+ * @default 'none'
120
+ */
121
+ sortOrder?: 'none' | 'asc' | 'desc';
122
+
123
+ /**
124
+ * Whether to display bottom controls.
125
+ *
126
+ * @platform Android only
127
+ * @default false
128
+ */
129
+ hideBottomControls?: boolean;
130
+
131
+ /**
132
+ * When set to false, does not write temporary files for the selected images. This is useful
133
+ * to improve performance when you are retrieving file contents with the includeBase64 option
134
+ * and don't need to read files from disk.
135
+ *
136
+ * @platform iOS only
137
+ * @default true
138
+ */
139
+ writeTempFile?: boolean;
140
+ }
141
+
142
+ type ImageOptions = CommonOptions & {
143
+ mediaType: 'photo';
144
+
145
+ /**
146
+ * Width of result image when used with `cropping` option.
147
+ */
148
+ width?: number;
149
+
150
+ /**
151
+ * Height of result image when used with `cropping` option.
152
+ */
153
+ height?: number;
154
+
155
+ /**
156
+ * When set to true, the image file content will be available as a base64-encoded string in
157
+ * the data property. Hint: To use this string as an image source, use it like:
158
+ * <Image source={{uri: `data:${image.mime};base64,${image.data}`}} />
159
+ *
160
+ * @default false
161
+ */
162
+ includeBase64?: boolean;
163
+
164
+ /**
165
+ * Include image exif data in the response.
166
+ *
167
+ * @default false
168
+ */
169
+ includeExif?: boolean;
170
+
171
+ /**
172
+ * Whether to convert photos to JPG. This will also convert any Live Photo into its JPG representation.
173
+ *
174
+ * @default false
175
+ */
176
+ forceJpg?: boolean;
177
+
178
+ /**
179
+ * Enable or disable cropping.
180
+ *
181
+ * @default false
182
+ */
183
+ cropping?: boolean;
184
+
185
+ /**
186
+ * When set to true, the image will always fill the mask space.
187
+ *
188
+ * @default true
189
+ */
190
+ avoidEmptySpaceAroundImage?: boolean;
191
+
192
+ /**
193
+ * When cropping image, determines ActiveWidget color.
194
+ *
195
+ * @platform Android only
196
+ * @default '#424242'
197
+ */
198
+ cropperActiveWidgetColor?: string;
199
+
200
+ /**
201
+ * When cropping image, determines the color of StatusBar.
202
+ *
203
+ * @platform Android only
204
+ * @default '#424242'
205
+ */
206
+ cropperStatusBarColor?: string;
207
+
208
+ /**
209
+ * When cropping image, determines the color of Toolbar.
210
+ *
211
+ * @platform Android only
212
+ * @default '#424242'
213
+ */
214
+ cropperToolbarColor?: string;
215
+
216
+ /**
217
+ * When cropping image, determines the color of Toolbar text and buttons.
218
+ *
219
+ * @platform Android only
220
+ * @default 'darker orange'
221
+ */
222
+ cropperToolbarWidgetColor?: string;
223
+
224
+ /**
225
+ * When cropping image, determines the title of Toolbar.
226
+ *
227
+ * @default 'Edit Photo'
228
+ */
229
+ cropperToolbarTitle?: string;
230
+
231
+ /**
232
+ * Enables user to apply custom rectangle area for cropping.
233
+ *
234
+ * @platform iOS only
235
+ * @default false
236
+ */
237
+ freeStyleCropEnabled?: boolean;
238
+
239
+ /**
240
+ * cropperTintColor
241
+ */
242
+ cropperTintColor?: string;
243
+
244
+ /**
245
+ * Enable or disable circular cropping mask.
246
+ *
247
+ * @default false
248
+ */
249
+ cropperCircleOverlay?: boolean;
250
+
251
+ /**
252
+ * Cancel button text.
253
+ *
254
+ * @default 'Cancel'
255
+ */
256
+ cropperCancelText?: string;
257
+
258
+ /**
259
+ * Choose button text.
260
+ *
261
+ * @default 'Choose'
262
+ */
263
+ cropperChooseText?: string;
264
+
265
+ /**
266
+ * Enable or disable cropper rotate buttons.
267
+ *
268
+ * @platform iOS only
269
+ * @default false
270
+ */
271
+ cropperRotateButtonsHidden?: boolean
272
+
273
+ /**
274
+ * Whether to show the 3x3 grid on top of the image during cropping.
275
+ *
276
+ * @platform Android only
277
+ * @default true
278
+ */
279
+ showCropGuidelines?: boolean;
280
+
281
+ /**
282
+ * Whether to show the square crop frame during cropping
283
+ *
284
+ * @platform Android only
285
+ * @default true
286
+ */
287
+ showCropFrame?: boolean;
288
+
289
+ /**
290
+ * Whether to enable rotating the image by hand gesture.
291
+ *
292
+ * @platform Android only
293
+ * @default false
294
+ */
295
+ enableRotationGesture?: boolean;
296
+
297
+ /**
298
+ * When cropping image, disables the color setters for cropping library.
299
+ *
300
+ * @platform Android only
301
+ * @default false
302
+ */
303
+ disableCropperColorSetters?: boolean;
304
+
305
+ /**
306
+ * Compress image with maximum width.
307
+ *
308
+ * @default null
309
+ */
310
+ compressImageMaxWidth?: number;
311
+
312
+ /**
313
+ * Compress image with maximum height.
314
+ *
315
+ * @default null
316
+ */
317
+ compressImageMaxHeight?: number;
318
+
319
+ /**
320
+ * Compress image with quality (from 0 to 1, where 1 is best quality). On iOS, values larger
321
+ * than 0.8 don't produce a noticeable quality increase in most images, while a value of 0.8
322
+ * will reduce the file size by about half or less compared to a value of 1.
323
+ *
324
+ * @default Android: 1, iOS: 0.8
325
+ */
326
+ compressImageQuality?: number;
327
+ }
328
+
329
+ type CropperOptions = ImageOptions & {
330
+ /**
331
+ * Selected image location
332
+ */
333
+ path: string;
334
+ }
335
+
336
+ type VideoOptions = CommonOptions & {
337
+ mediaType: 'video';
338
+
339
+ /**
340
+ * Choose which preset will be used for video compression.
341
+ *
342
+ * @platform iOS only
343
+ * @default 'MediumQuality'
344
+ */
345
+ compressVideoPreset?: CompressVideoPresets;
346
+ };
347
+
348
+ type AnyOptions = Omit<ImageOptions, 'mediaType'> & Omit<VideoOptions, 'mediaType'> & {
349
+ mediaType?: 'any';
350
+ };
351
+
352
+ export type Options = AnyOptions | VideoOptions | ImageOptions;
353
+
354
+ interface ImageVideoCommon {
355
+ /**
356
+ * Selected image location. This is null when the `writeTempFile` option is set to `false`.
357
+ */
358
+ path: string;
359
+
360
+ /**
361
+ * Selected image size in bytes.
362
+ */
363
+ size: number;
364
+
365
+ /**
366
+ * Selected image/video width.
367
+ */
368
+ width: number;
369
+
370
+ /**
371
+ * Selected image/video height.
372
+ */
373
+ height: number;
374
+
375
+ /**
376
+ * Selected image MIME type (image/jpeg, image/png, etc).
377
+ */
378
+ mime: string;
379
+
380
+ /**
381
+ * Extracted exif data from image. Response format is platform specific.
382
+ */
383
+ exif?: null | object;
384
+
385
+ /**
386
+ * Selected image's localidentifier, used for PHAsset searching.
387
+ *
388
+ * @platform iOS only
389
+ */
390
+ localIdentifier?: string;
391
+
392
+ /**
393
+ * Selected image's source path, do not have write access.
394
+ *
395
+ * @platform iOS only
396
+ */
397
+ sourceURL?: string;
398
+
399
+ /**
400
+ * Selected image/video's filename.
401
+ *
402
+ * @platform iOS only
403
+ */
404
+ filename?: string;
405
+
406
+ /**
407
+ * UNIX timestamp when image was created.
408
+ *
409
+ * @platform iOS only
410
+ */
411
+ creationDate?: string;
412
+
413
+ /**
414
+ * UNIX timestamp when image was last modified.
415
+ */
416
+ modificationDate?: string;
417
+ }
418
+
419
+ export interface Image extends ImageVideoCommon {
420
+ /**
421
+ * Optional base64 selected file representation.
422
+ */
423
+ data?: string | null;
424
+
425
+ /**
426
+ * Cropped image rectangle (width, height, x, y).
427
+ */
428
+ cropRect?: CropRect | null;
429
+ }
430
+
431
+ export interface Video extends ImageVideoCommon {
432
+ /**
433
+ * Video duration in milliseconds
434
+ */
435
+ duration: number | null;
436
+ }
437
+
438
+ export type ImageOrVideo = Image | Video;
439
+
440
+ export interface CropRect {
441
+ x: number;
442
+ y: number;
443
+ width: number;
444
+ height: number;
445
+ }
446
+
447
+ type PickerErrorCodeCommon =
448
+ | 'E_PICKER_CANCELLED'
449
+ | 'E_NO_IMAGE_DATA_FOUND'
450
+ | 'E_NO_LIBRARY_PERMISSION'
451
+ | 'E_NO_CAMERA_PERMISSION'
452
+ | 'E_ERROR_WHILE_CLEANING_FILES';
453
+
454
+ type PickerErrorCodeIOS =
455
+ | 'E_PICKER_CANNOT_RUN_CAMERA_ON_SIMULATOR'
456
+ | 'E_CROPPER_IMAGE_NOT_FOUND'
457
+ | 'E_CANNOT_SAVE_IMAGE'
458
+ | 'E_CANNOT_PROCESS_VIDEO';
459
+
460
+ type PickerErrorCodeAndroid =
461
+ | 'E_ACTIVITY_DOES_NOT_EXIST'
462
+ | 'E_CALLBACK_ERROR'
463
+ | 'E_FAILED_TO_SHOW_PICKER'
464
+ | 'E_FAILED_TO_OPEN_CAMERA'
465
+ | 'E_CAMERA_IS_NOT_AVAILABLE'
466
+ | 'E_CANNOT_LAUNCH_CAMERA';
467
+
468
+ export type PickerErrorCode = PickerErrorCodeCommon | PickerErrorCodeIOS | PickerErrorCodeAndroid;
469
+
470
+ /** Change return type based on `multiple` property. */
471
+ export type PossibleArray<O, T> = O extends { multiple: true; } ? T[] : T;
472
+
473
+ /** Isolate return type based on `mediaType` property. */
474
+ type MediaType<O> =
475
+ O extends { mediaType: 'photo'; } ? Image :
476
+ O extends { mediaType: 'video'; } ? Video :
477
+ ImageOrVideo;
478
+
479
+ export function openPicker<O extends Options>(options: O): Promise<PossibleArray<O, MediaType<O>>>;
480
+ export function openCamera<O extends Options>(options: O): Promise<PossibleArray<O, MediaType<O>>>;
481
+ export function openCropper(options: CropperOptions): Promise<Image>;
482
+ export function clean(): Promise<void>;
483
+ export function cleanSingle(path: string): Promise<void>;
484
+
485
+ export interface ImageCropPicker {
486
+ openPicker<O extends Options>(options: O): Promise<PossibleArray<O, MediaType<O>>>;
487
+ openCamera<O extends Options>(options: O): Promise<PossibleArray<O, MediaType<O>>>;
488
+ openCropper(options: CropperOptions): Promise<Image>;
489
+ clean(): Promise<void>;
490
+ cleanSingle(path: string): Promise<void>;
491
+ }
492
+
493
+ const ImageCropPicker: ImageCropPicker
494
+
495
+ export default ImageCropPicker
496
+ }
@@ -0,0 +1,4 @@
1
+ // @ts-nocheck
2
+ export { createStackNavigator } from '@react-navigation/stack'
3
+ export { createDrawerNavigator } from '@react-navigation/drawer'
4
+ export { createBottomTabNavigator } from '@react-navigation/bottom-tabs'