react-native-attachment-kit 1.1.1 → 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.
- package/CHANGELOG.md +36 -0
- package/README.md +77 -5
- package/android/src/main/libs/rnattachmentkit-release.aar +0 -0
- package/android/src/newarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +28 -1
- package/android/src/oldarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +28 -1
- package/ios/RNAttachmentKit.swift +21 -3
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.abi.json +7188 -4555
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.private.swiftinterface +37 -1
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.swiftinterface +37 -1
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/RNAttachmentKit +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeResources +10 -10
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Assets.car +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.abi.json +7188 -4555
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +37 -1
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface +37 -1
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +7188 -4555
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +37 -1
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +37 -1
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/RNAttachmentKit +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/_CodeSignature/CodeResources +22 -22
- package/package.json +1 -1
- package/src/index.ts +24 -3
- package/src/types.ts +64 -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 {
|
|
@@ -703,6 +704,8 @@ extension RNAttachmentKit.MediaGalleryViewController : UIKit.UICollectionViewDat
|
|
|
703
704
|
@_Concurrency.MainActor @preconcurrency public var sourceClipRect: CoreFoundation.CGRect?
|
|
704
705
|
@_Concurrency.MainActor @preconcurrency public var sourceClipInsets: UIKit.UIEdgeInsets?
|
|
705
706
|
@_Concurrency.MainActor @preconcurrency public func clipRect(in bounds: CoreFoundation.CGRect) -> CoreFoundation.CGRect?
|
|
707
|
+
@_Concurrency.MainActor @preconcurrency weak public var underView: UIKit.UIView?
|
|
708
|
+
@_Concurrency.MainActor @preconcurrency public func removeUnderLayer()
|
|
706
709
|
@_Concurrency.MainActor @preconcurrency public func updateMaskView()
|
|
707
710
|
@_Concurrency.MainActor @preconcurrency public var openDuration: Swift.Double
|
|
708
711
|
@_Concurrency.MainActor @preconcurrency public var closeDuration: Swift.Double
|
|
@@ -832,6 +835,23 @@ public struct ReverseGeocodeError : Swift.Error {
|
|
|
832
835
|
public static func apply(_ config: [Swift.String : Any])
|
|
833
836
|
@objc deinit
|
|
834
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
|
+
}
|
|
835
855
|
public struct VideoExportOptions {
|
|
836
856
|
public var maxDurationSec: Swift.Double
|
|
837
857
|
public var maxFileSizeMB: Swift.Double
|
|
@@ -839,6 +859,7 @@ public struct VideoExportOptions {
|
|
|
839
859
|
public var defaultQuality: Swift.Int
|
|
840
860
|
public var codec: Swift.String
|
|
841
861
|
public var posterFormat: Swift.String
|
|
862
|
+
public var preview: RNAttachmentKit.VideoPreviewOptions?
|
|
842
863
|
public init()
|
|
843
864
|
public init(dictionary d: [Swift.String : Any]?)
|
|
844
865
|
}
|
|
@@ -904,6 +925,7 @@ public enum VideoSendIssue {
|
|
|
904
925
|
}
|
|
905
926
|
final public class VideoExporter {
|
|
906
927
|
public static let sizeMargin: Swift.Double
|
|
928
|
+
public static func tooLongText(maxDurationSec: Swift.Double, languageCode: Swift.String) -> Swift.String
|
|
907
929
|
public static func sendIssue(sourceDuration: Swift.Double, sourceShortSide: CoreFoundation.CGFloat, state: RNAttachmentKit.VideoEditState, options: RNAttachmentKit.VideoExportOptions) -> RNAttachmentKit.VideoSendIssue?
|
|
908
930
|
public static func fittedQuality(_ want: Swift.Int, sourceShortSide: CoreFoundation.CGFloat, outputDuration: Swift.Double, options: RNAttachmentKit.VideoExportOptions) -> Swift.Int
|
|
909
931
|
public enum ExportError : Foundation.LocalizedError {
|
|
@@ -920,6 +942,8 @@ final public class VideoExporter {
|
|
|
920
942
|
final public func cancel()
|
|
921
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
|
|
922
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
|
|
923
947
|
public static func encodePoster(_ image: UIKit.UIImage, format: Swift.String, quality: CoreFoundation.CGFloat) -> (data: Foundation.Data, fileExtension: Swift.String)?
|
|
924
948
|
@objc deinit
|
|
925
949
|
}
|
|
@@ -937,7 +961,8 @@ public struct ViewerVideoItem {
|
|
|
937
961
|
public var uri: Swift.String
|
|
938
962
|
public var duration: Swift.Double?
|
|
939
963
|
public var cacheFile: Swift.String?
|
|
940
|
-
public
|
|
964
|
+
public var startTime: Swift.Double?
|
|
965
|
+
public init(uri: Swift.String, duration: Swift.Double? = nil, cacheFile: Swift.String? = nil, startTime: Swift.Double? = nil)
|
|
941
966
|
public init?(dictionary d: Any?)
|
|
942
967
|
}
|
|
943
968
|
@_hasMissingDesignatedInitializers final public class VideoPrepareManager {
|
|
@@ -1002,8 +1027,19 @@ public struct AttachmentResult {
|
|
|
1002
1027
|
public var videoCodec: Swift.String?
|
|
1003
1028
|
public var videoBitrate: Swift.Int?
|
|
1004
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?
|
|
1005
1038
|
public var error: Swift.String?
|
|
1006
1039
|
public var cancelled: Swift.Bool
|
|
1040
|
+
public var previewPath: Swift.String? {
|
|
1041
|
+
get
|
|
1042
|
+
}
|
|
1007
1043
|
public var path: Swift.String? {
|
|
1008
1044
|
get
|
|
1009
1045
|
}
|
|
Binary file
|
|
@@ -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 {
|
|
@@ -703,6 +704,8 @@ extension RNAttachmentKit.MediaGalleryViewController : UIKit.UICollectionViewDat
|
|
|
703
704
|
@_Concurrency.MainActor @preconcurrency public var sourceClipRect: CoreFoundation.CGRect?
|
|
704
705
|
@_Concurrency.MainActor @preconcurrency public var sourceClipInsets: UIKit.UIEdgeInsets?
|
|
705
706
|
@_Concurrency.MainActor @preconcurrency public func clipRect(in bounds: CoreFoundation.CGRect) -> CoreFoundation.CGRect?
|
|
707
|
+
@_Concurrency.MainActor @preconcurrency weak public var underView: UIKit.UIView?
|
|
708
|
+
@_Concurrency.MainActor @preconcurrency public func removeUnderLayer()
|
|
706
709
|
@_Concurrency.MainActor @preconcurrency public func updateMaskView()
|
|
707
710
|
@_Concurrency.MainActor @preconcurrency public var openDuration: Swift.Double
|
|
708
711
|
@_Concurrency.MainActor @preconcurrency public var closeDuration: Swift.Double
|
|
@@ -832,6 +835,23 @@ public struct ReverseGeocodeError : Swift.Error {
|
|
|
832
835
|
public static func apply(_ config: [Swift.String : Any])
|
|
833
836
|
@objc deinit
|
|
834
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
|
+
}
|
|
835
855
|
public struct VideoExportOptions {
|
|
836
856
|
public var maxDurationSec: Swift.Double
|
|
837
857
|
public var maxFileSizeMB: Swift.Double
|
|
@@ -839,6 +859,7 @@ public struct VideoExportOptions {
|
|
|
839
859
|
public var defaultQuality: Swift.Int
|
|
840
860
|
public var codec: Swift.String
|
|
841
861
|
public var posterFormat: Swift.String
|
|
862
|
+
public var preview: RNAttachmentKit.VideoPreviewOptions?
|
|
842
863
|
public init()
|
|
843
864
|
public init(dictionary d: [Swift.String : Any]?)
|
|
844
865
|
}
|
|
@@ -904,6 +925,7 @@ public enum VideoSendIssue {
|
|
|
904
925
|
}
|
|
905
926
|
final public class VideoExporter {
|
|
906
927
|
public static let sizeMargin: Swift.Double
|
|
928
|
+
public static func tooLongText(maxDurationSec: Swift.Double, languageCode: Swift.String) -> Swift.String
|
|
907
929
|
public static func sendIssue(sourceDuration: Swift.Double, sourceShortSide: CoreFoundation.CGFloat, state: RNAttachmentKit.VideoEditState, options: RNAttachmentKit.VideoExportOptions) -> RNAttachmentKit.VideoSendIssue?
|
|
908
930
|
public static func fittedQuality(_ want: Swift.Int, sourceShortSide: CoreFoundation.CGFloat, outputDuration: Swift.Double, options: RNAttachmentKit.VideoExportOptions) -> Swift.Int
|
|
909
931
|
public enum ExportError : Foundation.LocalizedError {
|
|
@@ -920,6 +942,8 @@ final public class VideoExporter {
|
|
|
920
942
|
final public func cancel()
|
|
921
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
|
|
922
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
|
|
923
947
|
public static func encodePoster(_ image: UIKit.UIImage, format: Swift.String, quality: CoreFoundation.CGFloat) -> (data: Foundation.Data, fileExtension: Swift.String)?
|
|
924
948
|
@objc deinit
|
|
925
949
|
}
|
|
@@ -937,7 +961,8 @@ public struct ViewerVideoItem {
|
|
|
937
961
|
public var uri: Swift.String
|
|
938
962
|
public var duration: Swift.Double?
|
|
939
963
|
public var cacheFile: Swift.String?
|
|
940
|
-
public
|
|
964
|
+
public var startTime: Swift.Double?
|
|
965
|
+
public init(uri: Swift.String, duration: Swift.Double? = nil, cacheFile: Swift.String? = nil, startTime: Swift.Double? = nil)
|
|
941
966
|
public init?(dictionary d: Any?)
|
|
942
967
|
}
|
|
943
968
|
@_hasMissingDesignatedInitializers final public class VideoPrepareManager {
|
|
@@ -1002,8 +1027,19 @@ public struct AttachmentResult {
|
|
|
1002
1027
|
public var videoCodec: Swift.String?
|
|
1003
1028
|
public var videoBitrate: Swift.Int?
|
|
1004
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?
|
|
1005
1038
|
public var error: Swift.String?
|
|
1006
1039
|
public var cancelled: Swift.Bool
|
|
1040
|
+
public var previewPath: Swift.String? {
|
|
1041
|
+
get
|
|
1042
|
+
}
|
|
1007
1043
|
public var path: Swift.String? {
|
|
1008
1044
|
get
|
|
1009
1045
|
}
|