react-native-attachment-kit 1.0.0 → 1.0.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 +20 -0
- package/README.md +11 -1
- package/android/src/main/libs/rnattachmentkit-release.aar +0 -0
- package/android/src/newarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +3 -0
- package/android/src/oldarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +3 -0
- package/ios/RNAttachmentKit.swift +16 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Assets.car +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Headers/RNAttachmentKit-Swift.h +38 -1
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Info.plist +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.abi.json +7143 -1781
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.private.swiftinterface +115 -0
- 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 +115 -0
- 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 +15 -15
- 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/Headers/RNAttachmentKit-Swift.h +76 -2
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Info.plist +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.abi.json +7143 -1781
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +115 -0
- 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 +115 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +7143 -1781
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +115 -0
- 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 +115 -0
- 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 +25 -25
- package/package.json +1 -1
- package/src/index.ts +45 -3
- package/src/types.ts +23 -0
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
|
|
5
5
|
import AVFoundation
|
|
6
6
|
import CoreImage
|
|
7
|
+
import CoreLocation
|
|
7
8
|
import CoreText
|
|
8
9
|
import CryptoKit
|
|
9
10
|
import DeveloperToolsSupport
|
|
10
11
|
import Foundation
|
|
11
12
|
import ImageIO
|
|
13
|
+
import MapKit
|
|
12
14
|
import Photos
|
|
13
15
|
import Swift
|
|
14
16
|
import SwiftUI
|
|
15
17
|
import UIKit
|
|
18
|
+
import UniformTypeIdentifiers
|
|
16
19
|
import _Concurrency
|
|
17
20
|
import _StringProcessing
|
|
18
21
|
import _SwiftConcurrencyShims
|
|
@@ -27,6 +30,21 @@ import _SwiftConcurrencyShims
|
|
|
27
30
|
@_Concurrency.MainActor @preconcurrency public var profileCropTransitionDelegate: (any UIKit.UIViewControllerTransitioningDelegate)?
|
|
28
31
|
@_Concurrency.MainActor @preconcurrency public var maxSelection: Swift.Int
|
|
29
32
|
@_Concurrency.MainActor @preconcurrency public var forceMultiMode: Swift.Bool
|
|
33
|
+
@_Concurrency.MainActor @preconcurrency public var showsAttachMenu: Swift.Bool
|
|
34
|
+
@_Concurrency.MainActor @preconcurrency public var attachMenuTabs: [RNAttachmentKit.AttachMenuTab]
|
|
35
|
+
@_Concurrency.MainActor @preconcurrency public var onAttachMenuTabChanged: ((RNAttachmentKit.AttachMenuTab) -> Swift.Void)?
|
|
36
|
+
@_Concurrency.MainActor @preconcurrency public var selectedAttachTab: RNAttachmentKit.AttachMenuTab {
|
|
37
|
+
get
|
|
38
|
+
}
|
|
39
|
+
@_Concurrency.MainActor @preconcurrency public var attachMenuBar: RNAttachmentKit.AttachMenuBar {
|
|
40
|
+
get
|
|
41
|
+
}
|
|
42
|
+
@_Concurrency.MainActor @preconcurrency public var attachMenuBackdrop: RNAttachmentKit.AttachMenuBackdrop {
|
|
43
|
+
get
|
|
44
|
+
}
|
|
45
|
+
@_Concurrency.MainActor @preconcurrency public var onLocationSelected: ((RNAttachmentKit.AttachLocationResult) -> Swift.Void)?
|
|
46
|
+
@_Concurrency.MainActor @preconcurrency public var onFilesSelected: (([RNAttachmentKit.AttachFileResult]) -> Swift.Void)?
|
|
47
|
+
@_Concurrency.MainActor @preconcurrency public var allowsMultipleFiles: Swift.Bool
|
|
30
48
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public init()
|
|
31
49
|
@_Concurrency.MainActor @preconcurrency @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
32
50
|
@_Concurrency.MainActor @preconcurrency public var maxWidth: Swift.Int
|
|
@@ -85,6 +103,100 @@ import _SwiftConcurrencyShims
|
|
|
85
103
|
@_Concurrency.MainActor @preconcurrency @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
86
104
|
@objc deinit
|
|
87
105
|
}
|
|
106
|
+
extension RNAttachmentKit.GalleryViewController : UIKit.UIGestureRecognizerDelegate {
|
|
107
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func gestureRecognizer(_ gestureRecognizer: UIKit.UIGestureRecognizer, shouldReceive touch: UIKit.UITouch) -> Swift.Bool
|
|
108
|
+
}
|
|
109
|
+
extension RNAttachmentKit.GalleryBaseViewController : UIKit.UIDocumentPickerDelegate {
|
|
110
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func documentPicker(_ controller: UIKit.UIDocumentPickerViewController, didPickDocumentsAt urls: [Foundation.URL])
|
|
111
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func documentPickerWasCancelled(_ controller: UIKit.UIDocumentPickerViewController)
|
|
112
|
+
}
|
|
113
|
+
public enum AttachMenuTab : Swift.String, Swift.CaseIterable {
|
|
114
|
+
case gallery
|
|
115
|
+
case location
|
|
116
|
+
case file
|
|
117
|
+
public init?(rawValue: Swift.String)
|
|
118
|
+
public typealias AllCases = [RNAttachmentKit.AttachMenuTab]
|
|
119
|
+
public typealias RawValue = Swift.String
|
|
120
|
+
nonisolated public static var allCases: [RNAttachmentKit.AttachMenuTab] {
|
|
121
|
+
get
|
|
122
|
+
}
|
|
123
|
+
public var rawValue: Swift.String {
|
|
124
|
+
get
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency final public class AttachMenuBar : UIKit.UIView {
|
|
128
|
+
@_Concurrency.MainActor @preconcurrency public static let barHeight: CoreFoundation.CGFloat
|
|
129
|
+
@_Concurrency.MainActor @preconcurrency public static let sinkIntoSafeArea: CoreFoundation.CGFloat
|
|
130
|
+
@_Concurrency.MainActor @preconcurrency public static let minBottomGap: CoreFoundation.CGFloat
|
|
131
|
+
@_Concurrency.MainActor @preconcurrency public static let sideMargin: CoreFoundation.CGFloat
|
|
132
|
+
@_Concurrency.MainActor @preconcurrency public static var usesNativeTabBar: Swift.Bool {
|
|
133
|
+
get
|
|
134
|
+
}
|
|
135
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeContentHeight: CoreFoundation.CGFloat
|
|
136
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeIconSize: CoreFoundation.CGFloat
|
|
137
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeTitleSize: CoreFoundation.CGFloat
|
|
138
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeTitleSpacing: CoreFoundation.CGFloat
|
|
139
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeUsesClearGlass: Swift.Bool
|
|
140
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeGlassTint: UIKit.UIColor?
|
|
141
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeBackingPadding: CoreFoundation.CGFloat
|
|
142
|
+
@_Concurrency.MainActor @preconcurrency public static var reservedHeight: CoreFoundation.CGFloat {
|
|
143
|
+
get
|
|
144
|
+
}
|
|
145
|
+
@_Concurrency.MainActor @preconcurrency final public var onSelect: ((RNAttachmentKit.AttachMenuTab) -> Swift.Void)?
|
|
146
|
+
@_Concurrency.MainActor @preconcurrency final public var selectedTab: RNAttachmentKit.AttachMenuTab {
|
|
147
|
+
get
|
|
148
|
+
}
|
|
149
|
+
@_Concurrency.MainActor @preconcurrency final public let tabs: [RNAttachmentKit.AttachMenuTab]
|
|
150
|
+
@_Concurrency.MainActor @preconcurrency final public var blurIntensity: CoreFoundation.CGFloat {
|
|
151
|
+
get
|
|
152
|
+
set
|
|
153
|
+
}
|
|
154
|
+
@_Concurrency.MainActor @preconcurrency final public var tintAlpha: CoreFoundation.CGFloat {
|
|
155
|
+
get
|
|
156
|
+
set
|
|
157
|
+
}
|
|
158
|
+
@_Concurrency.MainActor @preconcurrency public init(tabs: [RNAttachmentKit.AttachMenuTab] = AttachMenuTab.allCases, selected: RNAttachmentKit.AttachMenuTab = .gallery, languageCode: Swift.String, accentColor: UIKit.UIColor)
|
|
159
|
+
@objc deinit
|
|
160
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func didMoveToWindow()
|
|
161
|
+
@_Concurrency.MainActor @preconcurrency final public func prepareNativeAppearance()
|
|
162
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func layoutSubviews()
|
|
163
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func traitCollectionDidChange(_ previousTraitCollection: UIKit.UITraitCollection?)
|
|
164
|
+
@_Concurrency.MainActor @preconcurrency final public func select(_ tab: RNAttachmentKit.AttachMenuTab, animated: Swift.Bool, notify: Swift.Bool = false)
|
|
165
|
+
}
|
|
166
|
+
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency final public class AttachMenuBackdrop : UIKit.UIView {
|
|
167
|
+
@_Concurrency.MainActor @preconcurrency public static var blurIntensity: CoreFoundation.CGFloat
|
|
168
|
+
@_Concurrency.MainActor @preconcurrency public static var materialStyle: UIKit.UIBlurEffect.Style?
|
|
169
|
+
@_Concurrency.MainActor @preconcurrency public static var dimAlpha: CoreFoundation.CGFloat
|
|
170
|
+
@_Concurrency.MainActor @preconcurrency public static var fadeHeight: CoreFoundation.CGFloat
|
|
171
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init(frame: CoreFoundation.CGRect)
|
|
172
|
+
@objc deinit
|
|
173
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func layoutSubviews()
|
|
174
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func didMoveToWindow()
|
|
175
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func traitCollectionDidChange(_ previousTraitCollection: UIKit.UITraitCollection?)
|
|
176
|
+
}
|
|
177
|
+
extension RNAttachmentKit.AttachMenuBar : UIKit.UITabBarDelegate {
|
|
178
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func tabBar(_ tabBar: UIKit.UITabBar, didSelect item: UIKit.UITabBarItem)
|
|
179
|
+
}
|
|
180
|
+
public struct AttachLocationResult {
|
|
181
|
+
public let latitude: Swift.Double
|
|
182
|
+
public let longitude: Swift.Double
|
|
183
|
+
public let accuracy: Swift.Double?
|
|
184
|
+
public let title: Swift.String?
|
|
185
|
+
public let address: Swift.String?
|
|
186
|
+
public let isCurrentLocation: Swift.Bool
|
|
187
|
+
public var dictionary: [Swift.String : Any] {
|
|
188
|
+
get
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
public struct AttachFileResult {
|
|
192
|
+
public let url: Foundation.URL
|
|
193
|
+
public let name: Swift.String
|
|
194
|
+
public let size: Swift.Int64
|
|
195
|
+
public let mimeType: Swift.String
|
|
196
|
+
public var dictionary: [Swift.String : Any] {
|
|
197
|
+
get
|
|
198
|
+
}
|
|
199
|
+
}
|
|
88
200
|
public struct FilterState {
|
|
89
201
|
public var filterId: Swift.String
|
|
90
202
|
public var intensity: CoreFoundation.CGFloat
|
|
@@ -513,5 +625,8 @@ extension RNAttachmentKit.MediaGalleryViewController : UIKit.UICollectionViewDat
|
|
|
513
625
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init()
|
|
514
626
|
@objc deinit
|
|
515
627
|
}
|
|
628
|
+
extension RNAttachmentKit.AttachMenuTab : Swift.Equatable {}
|
|
629
|
+
extension RNAttachmentKit.AttachMenuTab : Swift.Hashable {}
|
|
630
|
+
extension RNAttachmentKit.AttachMenuTab : Swift.RawRepresentable {}
|
|
516
631
|
extension RNAttachmentKit.ImageEditorTransitionDelegate : Swift.Sendable {}
|
|
517
632
|
extension RNAttachmentKit.ZoomTransitionAnimator : Swift.Sendable {}
|
|
Binary file
|
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
// swift-module-flags-ignorable: -no-verify-emitted-module-interface -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.3
|
|
5
5
|
import AVFoundation
|
|
6
6
|
import CoreImage
|
|
7
|
+
import CoreLocation
|
|
7
8
|
import CoreText
|
|
8
9
|
import CryptoKit
|
|
9
10
|
import DeveloperToolsSupport
|
|
10
11
|
import Foundation
|
|
11
12
|
import ImageIO
|
|
13
|
+
import MapKit
|
|
12
14
|
import Photos
|
|
13
15
|
import Swift
|
|
14
16
|
import SwiftUI
|
|
15
17
|
import UIKit
|
|
18
|
+
import UniformTypeIdentifiers
|
|
16
19
|
import _Concurrency
|
|
17
20
|
import _StringProcessing
|
|
18
21
|
import _SwiftConcurrencyShims
|
|
@@ -27,6 +30,21 @@ import _SwiftConcurrencyShims
|
|
|
27
30
|
@_Concurrency.MainActor @preconcurrency public var profileCropTransitionDelegate: (any UIKit.UIViewControllerTransitioningDelegate)?
|
|
28
31
|
@_Concurrency.MainActor @preconcurrency public var maxSelection: Swift.Int
|
|
29
32
|
@_Concurrency.MainActor @preconcurrency public var forceMultiMode: Swift.Bool
|
|
33
|
+
@_Concurrency.MainActor @preconcurrency public var showsAttachMenu: Swift.Bool
|
|
34
|
+
@_Concurrency.MainActor @preconcurrency public var attachMenuTabs: [RNAttachmentKit.AttachMenuTab]
|
|
35
|
+
@_Concurrency.MainActor @preconcurrency public var onAttachMenuTabChanged: ((RNAttachmentKit.AttachMenuTab) -> Swift.Void)?
|
|
36
|
+
@_Concurrency.MainActor @preconcurrency public var selectedAttachTab: RNAttachmentKit.AttachMenuTab {
|
|
37
|
+
get
|
|
38
|
+
}
|
|
39
|
+
@_Concurrency.MainActor @preconcurrency public var attachMenuBar: RNAttachmentKit.AttachMenuBar {
|
|
40
|
+
get
|
|
41
|
+
}
|
|
42
|
+
@_Concurrency.MainActor @preconcurrency public var attachMenuBackdrop: RNAttachmentKit.AttachMenuBackdrop {
|
|
43
|
+
get
|
|
44
|
+
}
|
|
45
|
+
@_Concurrency.MainActor @preconcurrency public var onLocationSelected: ((RNAttachmentKit.AttachLocationResult) -> Swift.Void)?
|
|
46
|
+
@_Concurrency.MainActor @preconcurrency public var onFilesSelected: (([RNAttachmentKit.AttachFileResult]) -> Swift.Void)?
|
|
47
|
+
@_Concurrency.MainActor @preconcurrency public var allowsMultipleFiles: Swift.Bool
|
|
30
48
|
@_Concurrency.MainActor @preconcurrency @objc dynamic public init()
|
|
31
49
|
@_Concurrency.MainActor @preconcurrency @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
32
50
|
@_Concurrency.MainActor @preconcurrency public var maxWidth: Swift.Int
|
|
@@ -85,6 +103,100 @@ import _SwiftConcurrencyShims
|
|
|
85
103
|
@_Concurrency.MainActor @preconcurrency @objc required dynamic public init?(coder: Foundation.NSCoder)
|
|
86
104
|
@objc deinit
|
|
87
105
|
}
|
|
106
|
+
extension RNAttachmentKit.GalleryViewController : UIKit.UIGestureRecognizerDelegate {
|
|
107
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func gestureRecognizer(_ gestureRecognizer: UIKit.UIGestureRecognizer, shouldReceive touch: UIKit.UITouch) -> Swift.Bool
|
|
108
|
+
}
|
|
109
|
+
extension RNAttachmentKit.GalleryBaseViewController : UIKit.UIDocumentPickerDelegate {
|
|
110
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func documentPicker(_ controller: UIKit.UIDocumentPickerViewController, didPickDocumentsAt urls: [Foundation.URL])
|
|
111
|
+
@_Concurrency.MainActor @preconcurrency @objc dynamic public func documentPickerWasCancelled(_ controller: UIKit.UIDocumentPickerViewController)
|
|
112
|
+
}
|
|
113
|
+
public enum AttachMenuTab : Swift.String, Swift.CaseIterable {
|
|
114
|
+
case gallery
|
|
115
|
+
case location
|
|
116
|
+
case file
|
|
117
|
+
public init?(rawValue: Swift.String)
|
|
118
|
+
public typealias AllCases = [RNAttachmentKit.AttachMenuTab]
|
|
119
|
+
public typealias RawValue = Swift.String
|
|
120
|
+
nonisolated public static var allCases: [RNAttachmentKit.AttachMenuTab] {
|
|
121
|
+
get
|
|
122
|
+
}
|
|
123
|
+
public var rawValue: Swift.String {
|
|
124
|
+
get
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
@objc @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency final public class AttachMenuBar : UIKit.UIView {
|
|
128
|
+
@_Concurrency.MainActor @preconcurrency public static let barHeight: CoreFoundation.CGFloat
|
|
129
|
+
@_Concurrency.MainActor @preconcurrency public static let sinkIntoSafeArea: CoreFoundation.CGFloat
|
|
130
|
+
@_Concurrency.MainActor @preconcurrency public static let minBottomGap: CoreFoundation.CGFloat
|
|
131
|
+
@_Concurrency.MainActor @preconcurrency public static let sideMargin: CoreFoundation.CGFloat
|
|
132
|
+
@_Concurrency.MainActor @preconcurrency public static var usesNativeTabBar: Swift.Bool {
|
|
133
|
+
get
|
|
134
|
+
}
|
|
135
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeContentHeight: CoreFoundation.CGFloat
|
|
136
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeIconSize: CoreFoundation.CGFloat
|
|
137
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeTitleSize: CoreFoundation.CGFloat
|
|
138
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeTitleSpacing: CoreFoundation.CGFloat
|
|
139
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeUsesClearGlass: Swift.Bool
|
|
140
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeGlassTint: UIKit.UIColor?
|
|
141
|
+
@_Concurrency.MainActor @preconcurrency public static var nativeBackingPadding: CoreFoundation.CGFloat
|
|
142
|
+
@_Concurrency.MainActor @preconcurrency public static var reservedHeight: CoreFoundation.CGFloat {
|
|
143
|
+
get
|
|
144
|
+
}
|
|
145
|
+
@_Concurrency.MainActor @preconcurrency final public var onSelect: ((RNAttachmentKit.AttachMenuTab) -> Swift.Void)?
|
|
146
|
+
@_Concurrency.MainActor @preconcurrency final public var selectedTab: RNAttachmentKit.AttachMenuTab {
|
|
147
|
+
get
|
|
148
|
+
}
|
|
149
|
+
@_Concurrency.MainActor @preconcurrency final public let tabs: [RNAttachmentKit.AttachMenuTab]
|
|
150
|
+
@_Concurrency.MainActor @preconcurrency final public var blurIntensity: CoreFoundation.CGFloat {
|
|
151
|
+
get
|
|
152
|
+
set
|
|
153
|
+
}
|
|
154
|
+
@_Concurrency.MainActor @preconcurrency final public var tintAlpha: CoreFoundation.CGFloat {
|
|
155
|
+
get
|
|
156
|
+
set
|
|
157
|
+
}
|
|
158
|
+
@_Concurrency.MainActor @preconcurrency public init(tabs: [RNAttachmentKit.AttachMenuTab] = AttachMenuTab.allCases, selected: RNAttachmentKit.AttachMenuTab = .gallery, languageCode: Swift.String, accentColor: UIKit.UIColor)
|
|
159
|
+
@objc deinit
|
|
160
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func didMoveToWindow()
|
|
161
|
+
@_Concurrency.MainActor @preconcurrency final public func prepareNativeAppearance()
|
|
162
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func layoutSubviews()
|
|
163
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func traitCollectionDidChange(_ previousTraitCollection: UIKit.UITraitCollection?)
|
|
164
|
+
@_Concurrency.MainActor @preconcurrency final public func select(_ tab: RNAttachmentKit.AttachMenuTab, animated: Swift.Bool, notify: Swift.Bool = false)
|
|
165
|
+
}
|
|
166
|
+
@objc @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @_Concurrency.MainActor @preconcurrency final public class AttachMenuBackdrop : UIKit.UIView {
|
|
167
|
+
@_Concurrency.MainActor @preconcurrency public static var blurIntensity: CoreFoundation.CGFloat
|
|
168
|
+
@_Concurrency.MainActor @preconcurrency public static var materialStyle: UIKit.UIBlurEffect.Style?
|
|
169
|
+
@_Concurrency.MainActor @preconcurrency public static var dimAlpha: CoreFoundation.CGFloat
|
|
170
|
+
@_Concurrency.MainActor @preconcurrency public static var fadeHeight: CoreFoundation.CGFloat
|
|
171
|
+
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init(frame: CoreFoundation.CGRect)
|
|
172
|
+
@objc deinit
|
|
173
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func layoutSubviews()
|
|
174
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func didMoveToWindow()
|
|
175
|
+
@_Concurrency.MainActor @preconcurrency @objc override final public func traitCollectionDidChange(_ previousTraitCollection: UIKit.UITraitCollection?)
|
|
176
|
+
}
|
|
177
|
+
extension RNAttachmentKit.AttachMenuBar : UIKit.UITabBarDelegate {
|
|
178
|
+
@_Concurrency.MainActor @preconcurrency @objc final public func tabBar(_ tabBar: UIKit.UITabBar, didSelect item: UIKit.UITabBarItem)
|
|
179
|
+
}
|
|
180
|
+
public struct AttachLocationResult {
|
|
181
|
+
public let latitude: Swift.Double
|
|
182
|
+
public let longitude: Swift.Double
|
|
183
|
+
public let accuracy: Swift.Double?
|
|
184
|
+
public let title: Swift.String?
|
|
185
|
+
public let address: Swift.String?
|
|
186
|
+
public let isCurrentLocation: Swift.Bool
|
|
187
|
+
public var dictionary: [Swift.String : Any] {
|
|
188
|
+
get
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
public struct AttachFileResult {
|
|
192
|
+
public let url: Foundation.URL
|
|
193
|
+
public let name: Swift.String
|
|
194
|
+
public let size: Swift.Int64
|
|
195
|
+
public let mimeType: Swift.String
|
|
196
|
+
public var dictionary: [Swift.String : Any] {
|
|
197
|
+
get
|
|
198
|
+
}
|
|
199
|
+
}
|
|
88
200
|
public struct FilterState {
|
|
89
201
|
public var filterId: Swift.String
|
|
90
202
|
public var intensity: CoreFoundation.CGFloat
|
|
@@ -513,5 +625,8 @@ extension RNAttachmentKit.MediaGalleryViewController : UIKit.UICollectionViewDat
|
|
|
513
625
|
@_Concurrency.MainActor @preconcurrency @objc override dynamic public init()
|
|
514
626
|
@objc deinit
|
|
515
627
|
}
|
|
628
|
+
extension RNAttachmentKit.AttachMenuTab : Swift.Equatable {}
|
|
629
|
+
extension RNAttachmentKit.AttachMenuTab : Swift.Hashable {}
|
|
630
|
+
extension RNAttachmentKit.AttachMenuTab : Swift.RawRepresentable {}
|
|
516
631
|
extension RNAttachmentKit.ImageEditorTransitionDelegate : Swift.Sendable {}
|
|
517
632
|
extension RNAttachmentKit.ZoomTransitionAnimator : Swift.Sendable {}
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Assets.car</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
24XBU3LEblGjGTOAqjhqZ+mB2U0=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key>
|
|
12
12
|
<data>
|
|
@@ -22,51 +22,51 @@
|
|
|
22
22
|
</data>
|
|
23
23
|
<key>Headers/RNAttachmentKit-Swift.h</key>
|
|
24
24
|
<data>
|
|
25
|
-
|
|
25
|
+
1Mewxss6sAkZSJX9bLi5lcR8Ero=
|
|
26
26
|
</data>
|
|
27
27
|
<key>Info.plist</key>
|
|
28
28
|
<data>
|
|
29
|
-
|
|
29
|
+
0sC7XVCqX43alae4JC2p56Wh1F4=
|
|
30
30
|
</data>
|
|
31
31
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
32
32
|
<data>
|
|
33
|
-
|
|
33
|
+
ZUbxG02kJwnptfPMGwXLMg1wG4k=
|
|
34
34
|
</data>
|
|
35
35
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
36
36
|
<data>
|
|
37
|
-
|
|
37
|
+
VbKiyMAMwT9rblGdSs6r8cDQufw=
|
|
38
38
|
</data>
|
|
39
39
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
40
40
|
<data>
|
|
41
|
-
|
|
41
|
+
Z/5yZJFa9UBY8jt5q3kcLLo3R5M=
|
|
42
42
|
</data>
|
|
43
43
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
44
44
|
<data>
|
|
45
|
-
|
|
45
|
+
VbKiyMAMwT9rblGdSs6r8cDQufw=
|
|
46
46
|
</data>
|
|
47
47
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
48
48
|
<data>
|
|
49
|
-
|
|
49
|
+
4OAjHSojZm4OtKW3mxQ0PMQVSS0=
|
|
50
50
|
</data>
|
|
51
51
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
52
52
|
<data>
|
|
53
|
-
|
|
53
|
+
ZUbxG02kJwnptfPMGwXLMg1wG4k=
|
|
54
54
|
</data>
|
|
55
55
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
56
56
|
<data>
|
|
57
|
-
|
|
57
|
+
fQRfJNNvI6MxomIzzZWQziqxq8I=
|
|
58
58
|
</data>
|
|
59
59
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
jxMs61J1rGaAXEBOi8vovg1xVgs=
|
|
62
62
|
</data>
|
|
63
63
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
64
64
|
<data>
|
|
65
|
-
|
|
65
|
+
fQRfJNNvI6MxomIzzZWQziqxq8I=
|
|
66
66
|
</data>
|
|
67
67
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
68
68
|
<data>
|
|
69
|
-
|
|
69
|
+
PRd9yDAdAt5fPqp0EEw916xbwwI=
|
|
70
70
|
</data>
|
|
71
71
|
<key>Modules/module.modulemap</key>
|
|
72
72
|
<data>
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
<dict>
|
|
180
180
|
<key>hash2</key>
|
|
181
181
|
<data>
|
|
182
|
-
|
|
182
|
+
hcxV/4NZu79SXIpwsHu8Fo8WVAZLQfuKhITugdLFV+I=
|
|
183
183
|
</data>
|
|
184
184
|
</dict>
|
|
185
185
|
<key>Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib</key>
|
|
@@ -207,77 +207,77 @@
|
|
|
207
207
|
<dict>
|
|
208
208
|
<key>hash2</key>
|
|
209
209
|
<data>
|
|
210
|
-
|
|
210
|
+
6pCNuW9w10Oa3p7CzKDpslv8z862+kWZ5XTAf7qzeBs=
|
|
211
211
|
</data>
|
|
212
212
|
</dict>
|
|
213
213
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
214
214
|
<dict>
|
|
215
215
|
<key>hash2</key>
|
|
216
216
|
<data>
|
|
217
|
-
|
|
217
|
+
ROhcRvIOQmdrR/4FZKu4zsm55qbFVAqeJEy9f2cBrZM=
|
|
218
218
|
</data>
|
|
219
219
|
</dict>
|
|
220
220
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
221
221
|
<dict>
|
|
222
222
|
<key>hash2</key>
|
|
223
223
|
<data>
|
|
224
|
-
|
|
224
|
+
JNw6CovE9sPKkm+Thup4Ys0axnGm9S6RmW3Y5CxHnCg=
|
|
225
225
|
</data>
|
|
226
226
|
</dict>
|
|
227
227
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
228
228
|
<dict>
|
|
229
229
|
<key>hash2</key>
|
|
230
230
|
<data>
|
|
231
|
-
|
|
231
|
+
HMa8cFj2D5MOb7Nzosb4O4c/tJwpLjC5pfMFa/+hdSk=
|
|
232
232
|
</data>
|
|
233
233
|
</dict>
|
|
234
234
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
235
235
|
<dict>
|
|
236
236
|
<key>hash2</key>
|
|
237
237
|
<data>
|
|
238
|
-
|
|
238
|
+
JNw6CovE9sPKkm+Thup4Ys0axnGm9S6RmW3Y5CxHnCg=
|
|
239
239
|
</data>
|
|
240
240
|
</dict>
|
|
241
241
|
<key>Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
242
242
|
<dict>
|
|
243
243
|
<key>hash2</key>
|
|
244
244
|
<data>
|
|
245
|
-
|
|
245
|
+
Yjm5JJdgmICEMY3wUhx1338SzFZJtvaOxjb0wKVJgZo=
|
|
246
246
|
</data>
|
|
247
247
|
</dict>
|
|
248
248
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
249
249
|
<dict>
|
|
250
250
|
<key>hash2</key>
|
|
251
251
|
<data>
|
|
252
|
-
|
|
252
|
+
ROhcRvIOQmdrR/4FZKu4zsm55qbFVAqeJEy9f2cBrZM=
|
|
253
253
|
</data>
|
|
254
254
|
</dict>
|
|
255
255
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
256
256
|
<dict>
|
|
257
257
|
<key>hash2</key>
|
|
258
258
|
<data>
|
|
259
|
-
/
|
|
259
|
+
nJdvUeMgKh48oNHn869/k8l57lFZfaRqi/499k+If/w=
|
|
260
260
|
</data>
|
|
261
261
|
</dict>
|
|
262
262
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
263
263
|
<dict>
|
|
264
264
|
<key>hash2</key>
|
|
265
265
|
<data>
|
|
266
|
-
|
|
266
|
+
TezAeRJzQq1Ub109gC3ogXxoKFQewYf10ZBMaoKiISg=
|
|
267
267
|
</data>
|
|
268
268
|
</dict>
|
|
269
269
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
270
270
|
<dict>
|
|
271
271
|
<key>hash2</key>
|
|
272
272
|
<data>
|
|
273
|
-
/
|
|
273
|
+
nJdvUeMgKh48oNHn869/k8l57lFZfaRqi/499k+If/w=
|
|
274
274
|
</data>
|
|
275
275
|
</dict>
|
|
276
276
|
<key>Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
277
277
|
<dict>
|
|
278
278
|
<key>hash2</key>
|
|
279
279
|
<data>
|
|
280
|
-
|
|
280
|
+
2+pCITxiKBs7FGZNC+IYSmFl0jtVcQh/ILXB+35pYcs=
|
|
281
281
|
</data>
|
|
282
282
|
</dict>
|
|
283
283
|
<key>Modules/module.modulemap</key>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-attachment-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Native attachment kit for React Native — gallery picker, editor, image viewer and media gallery (Turbo Module)",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeModules, Platform, TurboModuleRegistry, NativeEventEmitter } from "react-native"
|
|
2
|
-
import type { ImageResult, GalleryOptions, EditorOptions, SelectionChangeEvent, ViewerOptions, MediaGalleryOptions, MediaGalleryAppendPayload, MediaGalleryRemovePayload } from "./types"
|
|
2
|
+
import type { ImageResult, GalleryOptions, EditorOptions, SelectionChangeEvent, ViewerOptions, MediaGalleryOptions, MediaGalleryAppendPayload, MediaGalleryRemovePayload, Appearance } from "./types"
|
|
3
3
|
|
|
4
4
|
const LINKING_ERROR = `The package 'react-native-attachment-kit' doesn't seem to be linked. Make sure: \n\n` + Platform.select({ ios: "- You have run 'pod install'\n", default: "" }) + "- You rebuilt the app after installing the package\n" + "- You are not using Expo Go\n"
|
|
5
5
|
|
|
@@ -15,6 +15,13 @@ try {
|
|
|
15
15
|
|
|
16
16
|
let _defaultThemeColor = "#10b981";
|
|
17
17
|
let _defaultLanguageCode = "en";
|
|
18
|
+
let _defaultAppearance: Appearance = "system";
|
|
19
|
+
|
|
20
|
+
/** "light" | "dark" 외의 값(생략·오타 포함)은 "system" */
|
|
21
|
+
export function normalizeAppearance(value?: string | null): Appearance {
|
|
22
|
+
const v = String(value ?? "").trim().toLowerCase()
|
|
23
|
+
return v === "light" || v === "dark" ? v : "system"
|
|
24
|
+
}
|
|
18
25
|
|
|
19
26
|
/** 모듈이 번역을 내장한 언어 코드 (ISO 639-1, 59개) */
|
|
20
27
|
export const SUPPORTED_LANGUAGE_CODES: readonly string[] = ["af", "ar", "be", "bg", "bn", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "fa", "fi", "fr", "ga", "gl", "gu", "he", "hi", "hr", "ht", "hu", "id", "is", "it", "ja", "ka", "kn", "ko", "lt", "lv", "mk", "mr", "ms", "mt", "nl", "no", "pl", "pt", "ro", "ru", "sk", "sl", "sq", "sv", "sw", "ta", "te", "th", "tl", "tr", "uk", "ur", "vi", "zh"]
|
|
@@ -34,8 +41,16 @@ export function normalizeLanguageCode(code?: string | null): string {
|
|
|
34
41
|
export interface InitOptions {
|
|
35
42
|
languageCode?: string;
|
|
36
43
|
themeColor?: string;
|
|
44
|
+
/**
|
|
45
|
+
* 화면 모드 기본값. "system"(기본) = 기기 설정을 따름, "light"/"dark" = 강제.
|
|
46
|
+
* 각 open* 호출의 appearance 옵션이 있으면 그게 우선합니다.
|
|
47
|
+
*/
|
|
48
|
+
appearance?: Appearance;
|
|
37
49
|
}
|
|
38
50
|
|
|
51
|
+
/** 기본값만 바꿀 때 (예: 앱 설정에서 테마/언어를 바꾼 직후). 넘긴 값만 바뀝니다. */
|
|
52
|
+
export type DefaultOptions = InitOptions
|
|
53
|
+
|
|
39
54
|
// Fallback to Legacy Native Module (Old Architecture)
|
|
40
55
|
const LegacyModule = NativeModules.RNAttachmentKit
|
|
41
56
|
|
|
@@ -49,11 +64,15 @@ if (!RNAttachmentKitModule) {
|
|
|
49
64
|
// Create event emitter
|
|
50
65
|
const eventEmitter = new NativeEventEmitter(RNAttachmentKitModule)
|
|
51
66
|
|
|
52
|
-
export type { SelectionChangeEvent } from "./types"
|
|
67
|
+
export type { SelectionChangeEvent, Appearance } from "./types"
|
|
53
68
|
export type { MediaGalleryItem, MediaGalleryOptions, MediaGalleryGridSize, MediaGalleryGridSizeChangedEvent, MediaGalleryTheme, MediaGalleryViewerOptions, MediaGalleryDeleteOption, MediaGalleryItemDeletedEvent, MediaGalleryNeedPageEvent, MediaGalleryClosedEvent, MediaGalleryAppendPayload, MediaGalleryRemovePayload } from "./types"
|
|
54
69
|
|
|
55
70
|
export interface RNAttachmentKit {
|
|
56
71
|
init(licenseKey: string, options?: InitOptions): Promise<boolean>
|
|
72
|
+
/** 기본 언어 / 테마 색 / 화면 모드를 바꿈 (init 이후 언제든) */
|
|
73
|
+
setDefaults(options: DefaultOptions): void
|
|
74
|
+
/** 현재 기본값 */
|
|
75
|
+
getDefaults(): { languageCode: string; themeColor: string; appearance: Appearance }
|
|
57
76
|
openGallery(options?: GalleryOptions): Promise<ImageResult[]>
|
|
58
77
|
openEditor(options: EditorOptions): Promise<ImageResult>
|
|
59
78
|
openViewer(options: ViewerOptions): Promise<void>
|
|
@@ -81,12 +100,23 @@ const AttachmentKit: RNAttachmentKit = {
|
|
|
81
100
|
if (options?.languageCode) {
|
|
82
101
|
_defaultLanguageCode = normalizeLanguageCode(options.languageCode);
|
|
83
102
|
}
|
|
103
|
+
if (options?.appearance) {
|
|
104
|
+
_defaultAppearance = normalizeAppearance(options.appearance);
|
|
105
|
+
}
|
|
84
106
|
if (!RNAttachmentKitModule) {
|
|
85
107
|
throw new Error(LINKING_ERROR)
|
|
86
108
|
}
|
|
87
109
|
return RNAttachmentKitModule.init(licenseKey)
|
|
88
110
|
},
|
|
89
111
|
|
|
112
|
+
setDefaults: (options: DefaultOptions): void => {
|
|
113
|
+
if (options?.themeColor) _defaultThemeColor = options.themeColor
|
|
114
|
+
if (options?.languageCode) _defaultLanguageCode = normalizeLanguageCode(options.languageCode)
|
|
115
|
+
if (options?.appearance) _defaultAppearance = normalizeAppearance(options.appearance)
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
getDefaults: () => ({ languageCode: _defaultLanguageCode, themeColor: _defaultThemeColor, appearance: _defaultAppearance }),
|
|
119
|
+
|
|
90
120
|
openGallery: async (options: GalleryOptions = {}): Promise<ImageResult[]> => {
|
|
91
121
|
if (!RNAttachmentKitModule) {
|
|
92
122
|
throw new Error(LINKING_ERROR)
|
|
@@ -109,9 +139,11 @@ const AttachmentKit: RNAttachmentKit = {
|
|
|
109
139
|
const nativeOptions = {
|
|
110
140
|
themeColor: _defaultThemeColor,
|
|
111
141
|
languageCode: _defaultLanguageCode,
|
|
142
|
+
appearance: _defaultAppearance,
|
|
112
143
|
...restOptions,
|
|
113
144
|
}
|
|
114
145
|
nativeOptions.languageCode = normalizeLanguageCode(nativeOptions.languageCode)
|
|
146
|
+
nativeOptions.appearance = normalizeAppearance(nativeOptions.appearance)
|
|
115
147
|
const result = await RNAttachmentKitModule.openGallery(nativeOptions)
|
|
116
148
|
return result
|
|
117
149
|
} finally {
|
|
@@ -134,9 +166,11 @@ const AttachmentKit: RNAttachmentKit = {
|
|
|
134
166
|
const mergedOptions = {
|
|
135
167
|
themeColor: _defaultThemeColor,
|
|
136
168
|
languageCode: _defaultLanguageCode,
|
|
169
|
+
appearance: _defaultAppearance,
|
|
137
170
|
...options,
|
|
138
171
|
}
|
|
139
172
|
mergedOptions.languageCode = normalizeLanguageCode(mergedOptions.languageCode)
|
|
173
|
+
mergedOptions.appearance = normalizeAppearance(mergedOptions.appearance)
|
|
140
174
|
return RNAttachmentKitModule.openEditor(mergedOptions)
|
|
141
175
|
},
|
|
142
176
|
|
|
@@ -226,9 +260,11 @@ const AttachmentKit: RNAttachmentKit = {
|
|
|
226
260
|
const mergedOptions = {
|
|
227
261
|
themeColor: _defaultThemeColor,
|
|
228
262
|
languageCode: _defaultLanguageCode,
|
|
263
|
+
appearance: _defaultAppearance,
|
|
229
264
|
...restOptions,
|
|
230
265
|
}
|
|
231
266
|
mergedOptions.languageCode = normalizeLanguageCode(mergedOptions.languageCode)
|
|
267
|
+
mergedOptions.appearance = normalizeAppearance(mergedOptions.appearance)
|
|
232
268
|
return await RNAttachmentKitModule.openViewer(mergedOptions)
|
|
233
269
|
} finally {
|
|
234
270
|
// Listeners are now removed inside the onViewerWillClose callback
|
|
@@ -326,7 +362,13 @@ const AttachmentKit: RNAttachmentKit = {
|
|
|
326
362
|
galleryId,
|
|
327
363
|
}
|
|
328
364
|
nativeOptions.languageCode = normalizeLanguageCode(nativeOptions.languageCode)
|
|
329
|
-
|
|
365
|
+
// 화면 모드: theme.isDark 를 직접 넘기지 않았으면 appearance(옵션 > 기본값)로 정함 ("system" 이면 기기 설정)
|
|
366
|
+
const appearance = normalizeAppearance(rest.appearance ?? _defaultAppearance)
|
|
367
|
+
delete nativeOptions.appearance
|
|
368
|
+
if (appearance !== "system" && (rest.theme == null || rest.theme.isDark == null)) {
|
|
369
|
+
nativeOptions.theme = { ...(rest.theme || {}), isDark: appearance === "dark" }
|
|
370
|
+
}
|
|
371
|
+
nativeOptions.viewer = { themeColor: _defaultThemeColor, appearance, ...(rest.viewer || {}) }
|
|
330
372
|
try {
|
|
331
373
|
const result = await RNAttachmentKitModule.openMediaGallery(nativeOptions)
|
|
332
374
|
return { galleryId: (result && result.galleryId) || galleryId }
|