react-native-attachment-kit 1.1.2 → 1.2.2

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 (30) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +75 -4
  3. package/android/src/main/libs/rnattachmentkit-release.aar +0 -0
  4. package/android/src/newarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +21 -1
  5. package/android/src/oldarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +21 -1
  6. package/ios/RNAttachmentKit.swift +4 -3
  7. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Assets.car +0 -0
  8. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.abi.json +7072 -4567
  9. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.private.swiftinterface +35 -1
  10. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  11. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftinterface +35 -1
  12. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/RNAttachmentKit +0 -0
  13. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeDirectory +0 -0
  14. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeResources +12 -12
  15. package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeSignature +0 -0
  16. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Assets.car +0 -0
  17. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.abi.json +7072 -4567
  18. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +35 -1
  19. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  20. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +35 -1
  21. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +7072 -4567
  22. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +35 -1
  23. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  24. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +35 -1
  25. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/RNAttachmentKit +0 -0
  26. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/_CodeSignature/CodeDirectory +0 -0
  27. package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/_CodeSignature/CodeResources +22 -22
  28. package/package.json +1 -1
  29. package/src/index.ts +24 -3
  30. package/src/types.ts +55 -1
@@ -490,6 +490,7 @@ extension RNAttachmentKit.RemoteImageViewerViewController : UIKit.UICollectionVi
490
490
  @_Concurrency.MainActor @preconcurrency @objc dynamic public func collectionView(_ collectionView: UIKit.UICollectionView, didSelectItemAt indexPath: Foundation.IndexPath)
491
491
  }
492
492
  extension RNAttachmentKit.RemoteImageViewerViewController {
493
+ @_Concurrency.MainActor @preconcurrency public func willCloseEventBody() -> [Swift.String : Any]
493
494
  @_Concurrency.MainActor @preconcurrency public func videoCloseSnapshot(in container: UIKit.UIView) -> (image: UIKit.UIImage, frame: CoreFoundation.CGRect)?
494
495
  }
495
496
  public struct Localizer {
@@ -834,6 +835,23 @@ public struct ReverseGeocodeError : Swift.Error {
834
835
  public static func apply(_ config: [Swift.String : Any])
835
836
  @objc deinit
836
837
  }
838
+ public struct VideoPreviewOptions {
839
+ public var height: Swift.Int
840
+ public var bitrate: Swift.Int
841
+ public var maxFps: Swift.Double
842
+ public var maxDurationSec: Swift.Double
843
+ public var codec: Swift.String
844
+ public init()
845
+ public init?(any v: Any?)
846
+ }
847
+ public struct VideoPreviewResult {
848
+ public let url: Foundation.URL
849
+ public let width: Swift.Int
850
+ public let height: Swift.Int
851
+ public let duration: Swift.Double
852
+ public let fileSize: Swift.Int64
853
+ public let bitrate: Swift.Int
854
+ }
837
855
  public struct VideoExportOptions {
838
856
  public var maxDurationSec: Swift.Double
839
857
  public var maxFileSizeMB: Swift.Double
@@ -841,6 +859,7 @@ public struct VideoExportOptions {
841
859
  public var defaultQuality: Swift.Int
842
860
  public var codec: Swift.String
843
861
  public var posterFormat: Swift.String
862
+ public var preview: RNAttachmentKit.VideoPreviewOptions?
844
863
  public init()
845
864
  public init(dictionary d: [Swift.String : Any]?)
846
865
  }
@@ -906,6 +925,7 @@ public enum VideoSendIssue {
906
925
  }
907
926
  final public class VideoExporter {
908
927
  public static let sizeMargin: Swift.Double
928
+ public static func tooLongText(maxDurationSec: Swift.Double, languageCode: Swift.String) -> Swift.String
909
929
  public static func sendIssue(sourceDuration: Swift.Double, sourceShortSide: CoreFoundation.CGFloat, state: RNAttachmentKit.VideoEditState, options: RNAttachmentKit.VideoExportOptions) -> RNAttachmentKit.VideoSendIssue?
910
930
  public static func fittedQuality(_ want: Swift.Int, sourceShortSide: CoreFoundation.CGFloat, outputDuration: Swift.Double, options: RNAttachmentKit.VideoExportOptions) -> Swift.Int
911
931
  public enum ExportError : Foundation.LocalizedError {
@@ -922,6 +942,8 @@ final public class VideoExporter {
922
942
  final public func cancel()
923
943
  final public func export(asset: Photos.PHAsset, state: RNAttachmentKit.VideoEditState, options: RNAttachmentKit.VideoExportOptions, outputDir: Foundation.URL, baseName: Swift.String, progress: @escaping (Swift.Double) -> Swift.Void) throws -> RNAttachmentKit.VideoExportResult
924
944
  final public func export(fileURL: Foundation.URL, state: RNAttachmentKit.VideoEditState, options: RNAttachmentKit.VideoExportOptions, outputDir: Foundation.URL, baseName: Swift.String, progress: @escaping (Swift.Double) -> Swift.Void) throws -> RNAttachmentKit.VideoExportResult
945
+ public static func previewWorthMaking(sentShortSide: Swift.Int, sentFileSize: Swift.Int64, sentDuration: Swift.Double, options: RNAttachmentKit.VideoPreviewOptions) -> Swift.Bool
946
+ final public func makePreview(from source: Foundation.URL, options: RNAttachmentKit.VideoPreviewOptions, to url: Foundation.URL, progress: @escaping (Swift.Double) -> Swift.Void) throws -> RNAttachmentKit.VideoPreviewResult
925
947
  public static func encodePoster(_ image: UIKit.UIImage, format: Swift.String, quality: CoreFoundation.CGFloat) -> (data: Foundation.Data, fileExtension: Swift.String)?
926
948
  @objc deinit
927
949
  }
@@ -939,7 +961,8 @@ public struct ViewerVideoItem {
939
961
  public var uri: Swift.String
940
962
  public var duration: Swift.Double?
941
963
  public var cacheFile: Swift.String?
942
- public init(uri: Swift.String, duration: Swift.Double? = nil, cacheFile: Swift.String? = nil)
964
+ public var startTime: Swift.Double?
965
+ public init(uri: Swift.String, duration: Swift.Double? = nil, cacheFile: Swift.String? = nil, startTime: Swift.Double? = nil)
943
966
  public init?(dictionary d: Any?)
944
967
  }
945
968
  @_hasMissingDesignatedInitializers final public class VideoPrepareManager {
@@ -1004,8 +1027,19 @@ public struct AttachmentResult {
1004
1027
  public var videoCodec: Swift.String?
1005
1028
  public var videoBitrate: Swift.Int?
1006
1029
  public var edited: Swift.Bool?
1030
+ public var previewURL: Foundation.URL?
1031
+ public var previewWidth: Swift.Int?
1032
+ public var previewHeight: Swift.Int?
1033
+ public var previewDuration: Swift.Double?
1034
+ public var previewFileSize: Swift.Int64?
1035
+ public var previewBitrate: Swift.Int?
1036
+ public var previewError: Swift.String?
1037
+ public var previewSkipped: Swift.String?
1007
1038
  public var error: Swift.String?
1008
1039
  public var cancelled: Swift.Bool
1040
+ public var previewPath: Swift.String? {
1041
+ get
1042
+ }
1009
1043
  public var path: Swift.String? {
1010
1044
  get
1011
1045
  }
@@ -490,6 +490,7 @@ extension RNAttachmentKit.RemoteImageViewerViewController : UIKit.UICollectionVi
490
490
  @_Concurrency.MainActor @preconcurrency @objc dynamic public func collectionView(_ collectionView: UIKit.UICollectionView, didSelectItemAt indexPath: Foundation.IndexPath)
491
491
  }
492
492
  extension RNAttachmentKit.RemoteImageViewerViewController {
493
+ @_Concurrency.MainActor @preconcurrency public func willCloseEventBody() -> [Swift.String : Any]
493
494
  @_Concurrency.MainActor @preconcurrency public func videoCloseSnapshot(in container: UIKit.UIView) -> (image: UIKit.UIImage, frame: CoreFoundation.CGRect)?
494
495
  }
495
496
  public struct Localizer {
@@ -834,6 +835,23 @@ public struct ReverseGeocodeError : Swift.Error {
834
835
  public static func apply(_ config: [Swift.String : Any])
835
836
  @objc deinit
836
837
  }
838
+ public struct VideoPreviewOptions {
839
+ public var height: Swift.Int
840
+ public var bitrate: Swift.Int
841
+ public var maxFps: Swift.Double
842
+ public var maxDurationSec: Swift.Double
843
+ public var codec: Swift.String
844
+ public init()
845
+ public init?(any v: Any?)
846
+ }
847
+ public struct VideoPreviewResult {
848
+ public let url: Foundation.URL
849
+ public let width: Swift.Int
850
+ public let height: Swift.Int
851
+ public let duration: Swift.Double
852
+ public let fileSize: Swift.Int64
853
+ public let bitrate: Swift.Int
854
+ }
837
855
  public struct VideoExportOptions {
838
856
  public var maxDurationSec: Swift.Double
839
857
  public var maxFileSizeMB: Swift.Double
@@ -841,6 +859,7 @@ public struct VideoExportOptions {
841
859
  public var defaultQuality: Swift.Int
842
860
  public var codec: Swift.String
843
861
  public var posterFormat: Swift.String
862
+ public var preview: RNAttachmentKit.VideoPreviewOptions?
844
863
  public init()
845
864
  public init(dictionary d: [Swift.String : Any]?)
846
865
  }
@@ -906,6 +925,7 @@ public enum VideoSendIssue {
906
925
  }
907
926
  final public class VideoExporter {
908
927
  public static let sizeMargin: Swift.Double
928
+ public static func tooLongText(maxDurationSec: Swift.Double, languageCode: Swift.String) -> Swift.String
909
929
  public static func sendIssue(sourceDuration: Swift.Double, sourceShortSide: CoreFoundation.CGFloat, state: RNAttachmentKit.VideoEditState, options: RNAttachmentKit.VideoExportOptions) -> RNAttachmentKit.VideoSendIssue?
910
930
  public static func fittedQuality(_ want: Swift.Int, sourceShortSide: CoreFoundation.CGFloat, outputDuration: Swift.Double, options: RNAttachmentKit.VideoExportOptions) -> Swift.Int
911
931
  public enum ExportError : Foundation.LocalizedError {
@@ -922,6 +942,8 @@ final public class VideoExporter {
922
942
  final public func cancel()
923
943
  final public func export(asset: Photos.PHAsset, state: RNAttachmentKit.VideoEditState, options: RNAttachmentKit.VideoExportOptions, outputDir: Foundation.URL, baseName: Swift.String, progress: @escaping (Swift.Double) -> Swift.Void) throws -> RNAttachmentKit.VideoExportResult
924
944
  final public func export(fileURL: Foundation.URL, state: RNAttachmentKit.VideoEditState, options: RNAttachmentKit.VideoExportOptions, outputDir: Foundation.URL, baseName: Swift.String, progress: @escaping (Swift.Double) -> Swift.Void) throws -> RNAttachmentKit.VideoExportResult
945
+ public static func previewWorthMaking(sentShortSide: Swift.Int, sentFileSize: Swift.Int64, sentDuration: Swift.Double, options: RNAttachmentKit.VideoPreviewOptions) -> Swift.Bool
946
+ final public func makePreview(from source: Foundation.URL, options: RNAttachmentKit.VideoPreviewOptions, to url: Foundation.URL, progress: @escaping (Swift.Double) -> Swift.Void) throws -> RNAttachmentKit.VideoPreviewResult
925
947
  public static func encodePoster(_ image: UIKit.UIImage, format: Swift.String, quality: CoreFoundation.CGFloat) -> (data: Foundation.Data, fileExtension: Swift.String)?
926
948
  @objc deinit
927
949
  }
@@ -939,7 +961,8 @@ public struct ViewerVideoItem {
939
961
  public var uri: Swift.String
940
962
  public var duration: Swift.Double?
941
963
  public var cacheFile: Swift.String?
942
- public init(uri: Swift.String, duration: Swift.Double? = nil, cacheFile: Swift.String? = nil)
964
+ public var startTime: Swift.Double?
965
+ public init(uri: Swift.String, duration: Swift.Double? = nil, cacheFile: Swift.String? = nil, startTime: Swift.Double? = nil)
943
966
  public init?(dictionary d: Any?)
944
967
  }
945
968
  @_hasMissingDesignatedInitializers final public class VideoPrepareManager {
@@ -1004,8 +1027,19 @@ public struct AttachmentResult {
1004
1027
  public var videoCodec: Swift.String?
1005
1028
  public var videoBitrate: Swift.Int?
1006
1029
  public var edited: Swift.Bool?
1030
+ public var previewURL: Foundation.URL?
1031
+ public var previewWidth: Swift.Int?
1032
+ public var previewHeight: Swift.Int?
1033
+ public var previewDuration: Swift.Double?
1034
+ public var previewFileSize: Swift.Int64?
1035
+ public var previewBitrate: Swift.Int?
1036
+ public var previewError: Swift.String?
1037
+ public var previewSkipped: Swift.String?
1007
1038
  public var error: Swift.String?
1008
1039
  public var cancelled: Swift.Bool
1040
+ public var previewPath: Swift.String? {
1041
+ get
1042
+ }
1009
1043
  public var path: Swift.String? {
1010
1044
  get
1011
1045
  }
@@ -6,7 +6,7 @@
6
6
  <dict>
7
7
  <key>Assets.car</key>
8
8
  <data>
9
- Q4WslrRyFGZTzQsyECtW25oGXkw=
9
+ g6yZrbEglkdHc1mfZaxagZ5xtQU=
10
10
  </data>
11
11
  <key>Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key>
12
12
  <data>
@@ -30,23 +30,23 @@
30
30
  </data>
31
31
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.abi.json</key>
32
32
  <data>
33
- Alh5ZDiUengr7Kj/qTNOL6had2Q=
33
+ tl9QjHjC8qI5JSYGpkUfAK2YGpo=
34
34
  </data>
35
35
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
36
36
  <data>
37
- wEo/YJ1Gv1kHTIOMHe/471kcZWk=
37
+ sE8pffkEOfbbnupugaMayiY2Y+s=
38
38
  </data>
39
39
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftdoc</key>
40
40
  <data>
41
- NdmsL6G2DN6mQCB2p4dZudF/Y/A=
41
+ KbCVdjIosKSLgCfqnpl445EcxWU=
42
42
  </data>
43
43
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftinterface</key>
44
44
  <data>
45
- wEo/YJ1Gv1kHTIOMHe/471kcZWk=
45
+ sE8pffkEOfbbnupugaMayiY2Y+s=
46
46
  </data>
47
47
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftmodule</key>
48
48
  <data>
49
- E1CDkmtA9mqkzGSmSgld66o8WOo=
49
+ Lc6KrNwkNWlD7atVcH5Fgkc77F4=
50
50
  </data>
51
51
  <key>Modules/module.modulemap</key>
52
52
  <data>
@@ -207,7 +207,7 @@
207
207
  <dict>
208
208
  <key>hash2</key>
209
209
  <data>
210
- geng7yTEBfEgTf50zabLdmetI/prd9vrBgF8kV7XtOQ=
210
+ t4fvHNhwvX9Xc+yxU1dNnVy6zn+bhryN6MxDfE4HVwY=
211
211
  </data>
212
212
  </dict>
213
213
  <key>Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key>
@@ -242,35 +242,35 @@
242
242
  <dict>
243
243
  <key>hash2</key>
244
244
  <data>
245
- x2qWUkW2PgFQ6K726sWhXkhk84iWHDvkT52rBukB3ks=
245
+ YUjLKJjnt06lEXMxebYCo0ZvaDCxPo213q2O1UqjYUg=
246
246
  </data>
247
247
  </dict>
248
248
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
249
249
  <dict>
250
250
  <key>hash2</key>
251
251
  <data>
252
- o9oMsCwpvULmd5ca6WE9mi7KEOz2jxoow5JynPduVEY=
252
+ CgB/kN5219+YdHfRWuv84zMNnhnJgkCfKnUNIykxZ7Y=
253
253
  </data>
254
254
  </dict>
255
255
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftdoc</key>
256
256
  <dict>
257
257
  <key>hash2</key>
258
258
  <data>
259
- L/hilWOgTXQhtenmbgE842fuflYednu2E6kp83/ckkg=
259
+ qYVF7nfV42ki1IcKOoOOI17N4RqSU3RPmRQE9uBTMbg=
260
260
  </data>
261
261
  </dict>
262
262
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftinterface</key>
263
263
  <dict>
264
264
  <key>hash2</key>
265
265
  <data>
266
- o9oMsCwpvULmd5ca6WE9mi7KEOz2jxoow5JynPduVEY=
266
+ CgB/kN5219+YdHfRWuv84zMNnhnJgkCfKnUNIykxZ7Y=
267
267
  </data>
268
268
  </dict>
269
269
  <key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftmodule</key>
270
270
  <dict>
271
271
  <key>hash2</key>
272
272
  <data>
273
- sk8qgRhSJ50M3EVj03yvUMEKssMxOUvIr5ektGJRzeE=
273
+ rXnJrWHqXU0kQdiYt5Tu/3wA9ORHkXYF1c+X6nz4l94=
274
274
  </data>
275
275
  </dict>
276
276
  <key>Modules/module.modulemap</key>