react-native-attachment-kit 1.0.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.
- package/CHANGELOG.md +19 -0
- package/README.md +327 -0
- package/android/CMakeLists.txt +31 -0
- package/android/build.gradle +121 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/libs/rnattachmentkit-release.aar +0 -0
- package/android/src/newarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +1159 -0
- package/android/src/newarch/java/com/rnattachmentkit/RNAttachmentKitPackage.kt +37 -0
- package/android/src/oldarch/java/com/rnattachmentkit/NativeRNAttachmentKitSpec.kt +19 -0
- package/android/src/oldarch/java/com/rnattachmentkit/RNAttachmentKitModule.kt +1142 -0
- package/android/src/oldarch/java/com/rnattachmentkit/RNAttachmentKitPackage.kt +19 -0
- package/ios/README.md +213 -0
- package/ios/RNAttachmentKit.m +132 -0
- package/ios/RNAttachmentKit.swift +1787 -0
- package/ios/RNAttachmentKit.xcframework/Info.plist +44 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Assets.car +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Base.lproj/LaunchScreen.storyboardc/Info.plist +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Headers/RNAttachmentKit-Swift.h +581 -0
- 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 +34376 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios.private.swiftinterface +517 -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 +517 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Modules/module.modulemap +3 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/Pretendard-SemiBold.otf +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/RNAttachmentKit +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_crop_reflect~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_crop_reflect~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_crop_rotate~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_crop_rotate~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_delete~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_delete~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_forward~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_forward~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_reward~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_reward~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_crop~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_crop~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_drawing~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_drawing~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_effect~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_effect~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_emoji~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_emoji~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_eraser~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_eraser~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_mosaic~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_mosaic~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_text~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/ToolbarIcons/ic_editor_text~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeRequirements +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64/RNAttachmentKit.framework/_CodeSignature/CodeResources +498 -0
- 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/Base.lproj/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Base.lproj/LaunchScreen.storyboardc/Info.plist +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Base.lproj/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Headers/RNAttachmentKit-Swift.h +1158 -0
- 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 +34376 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +517 -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 +517 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.abi.json +34376 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/RNAttachmentKit.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +517 -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 +517 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Modules/module.modulemap +3 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/Pretendard-SemiBold.otf +0 -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/ToolbarIcons/ic_crop_reflect~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_crop_reflect~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_crop_rotate~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_crop_rotate~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_delete~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_delete~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_forward~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_forward~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_reward~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_drawing_reward~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_crop~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_crop~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_drawing~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_drawing~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_effect~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_effect~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_emoji~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_emoji~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_eraser~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_eraser~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_mosaic~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_mosaic~light.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_text~dark.webp +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/ToolbarIcons/ic_editor_text~light.webp +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/CodeRequirements +0 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/_CodeSignature/CodeResources +553 -0
- package/ios/RNAttachmentKit.xcframework/ios-arm64_x86_64-simulator/RNAttachmentKit.framework/_CodeSignature/CodeSignature +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/AppIcon.appiconset/Contents.json +13 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/Contents.json +6 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_back.imageset/Contents.json +24 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_back.imageset/ic_back_dark.png +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_back.imageset/ic_back_normal.png +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_delete.imageset/Contents.json +56 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_delete.imageset/delete_dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_delete.imageset/delete_normal.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_forward.imageset/Contents.json +56 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_forward.imageset/forward_dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_forward.imageset/forward_normal.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_reward.imageset/Contents.json +56 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_reward.imageset/reward_dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_drawing_reward.imageset/reward_normal.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_crop.imageset/Contents.json +52 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_crop.imageset/crop_dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_crop.imageset/crop_normal.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_drawing.imageset/Contents.json +52 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_drawing.imageset/drawing_dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_drawing.imageset/drawing_normal.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_effect.imageset/Contents.json +52 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_effect.imageset/effect_dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_effect.imageset/effect_normal.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_emoji.imageset/Contents.json +52 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_emoji.imageset/emoji_dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_emoji.imageset/emoji_normal.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_text.imageset/Contents.json +52 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_text.imageset/text_dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/ic_editor_text.imageset/text_norml.webp +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/rotate_icon.imageset/Contents.json +32 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/rotate_icon.imageset/rotate_dark.png +0 -0
- package/ios/RNAttachmentKitAssets/Assets.xcassets/rotate_icon.imageset/rotate_normal.png +0 -0
- package/ios/RNAttachmentKitAssets/Fonts/Pretendard-SemiBold.otf +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_crop_reflect~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_crop_reflect~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_crop_rotate~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_crop_rotate~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_drawing_delete~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_drawing_delete~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_drawing_forward~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_drawing_forward~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_drawing_reward~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_drawing_reward~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_crop~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_crop~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_drawing~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_drawing~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_effect~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_effect~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_emoji~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_emoji~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_eraser~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_eraser~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_mosaic~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_mosaic~light.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_text~dark.webp +0 -0
- package/ios/RNAttachmentKitAssets/ToolbarIcons/ic_editor_text~light.webp +0 -0
- package/package.json +68 -0
- package/react-native-attachment-kit.podspec +51 -0
- package/react-native.config.js +14 -0
- package/src/NativeAttachmentKit.ts +26 -0
- package/src/index.d.ts +56 -0
- package/src/index.ts +359 -0
- package/src/types.ts +317 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
package com.rnattachmentkit
|
|
2
|
+
|
|
3
|
+
import com.rnattachmentkit.*
|
|
4
|
+
|
|
5
|
+
import com.facebook.react.ReactPackage
|
|
6
|
+
import com.facebook.react.bridge.NativeModule
|
|
7
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
8
|
+
import com.facebook.react.uimanager.ViewManager
|
|
9
|
+
|
|
10
|
+
class RNAttachmentKitPackage : ReactPackage {
|
|
11
|
+
|
|
12
|
+
override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
|
|
13
|
+
return listOf(RNAttachmentKitModule(reactContext))
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
17
|
+
return emptyList()
|
|
18
|
+
}
|
|
19
|
+
}
|
package/ios/README.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# RNAttachmentKit
|
|
2
|
+
|
|
3
|
+
고성능 텔레그램 스타일 이미지 갤러리 피커 for React Native
|
|
4
|
+
|
|
5
|
+
## 🚀 주요 기능
|
|
6
|
+
|
|
7
|
+
- ✅ **고성능**: 배치 로딩과 캐싱으로 빠른 성능
|
|
8
|
+
- ✅ **다중 선택**: 여러 이미지 동시 선택 가능
|
|
9
|
+
- ✅ **앨범 지원**: 스마트 앨범 및 사용자 앨범 지원
|
|
10
|
+
- ✅ **품질 옵션**: low, medium, high 품질 선택
|
|
11
|
+
- ✅ **TypeScript**: 완벽한 타입 정의
|
|
12
|
+
- ✅ **iOS 15.1+**: 최신 iOS 지원
|
|
13
|
+
|
|
14
|
+
## 📦 설치
|
|
15
|
+
|
|
16
|
+
### 1. 프로젝트에 모듈 추가
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cd /path/to/your/react-native-project
|
|
20
|
+
|
|
21
|
+
# package.json에 로컬 모듈 추가
|
|
22
|
+
yarn add file:../NativeModules/RNAttachmentKit/ios
|
|
23
|
+
# 또는
|
|
24
|
+
npm install file:../NativeModules/RNAttachmentKit/ios
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 2. iOS Pod 설치
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cd ios
|
|
31
|
+
pod install
|
|
32
|
+
cd ..
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 3. iOS 권한 설정
|
|
36
|
+
|
|
37
|
+
`ios/YourApp/Info.plist` 파일에 다음 권한 추가:
|
|
38
|
+
|
|
39
|
+
```xml
|
|
40
|
+
<key>NSPhotoLibraryUsageDescription</key>
|
|
41
|
+
<string>사진을 선택하기 위해 라이브러리 접근이 필요합니다.</string>
|
|
42
|
+
<key>NSPhotoLibraryAddUsageDescription</key>
|
|
43
|
+
<string>사진을 저장하기 위해 라이브러리 접근이 필요합니다.</string>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 📱 사용법
|
|
47
|
+
|
|
48
|
+
### 기본 사용
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { RNAttachmentKit } from 'react-native-attachment-kit';
|
|
52
|
+
|
|
53
|
+
// 1. 권한 체크
|
|
54
|
+
const status = await RNAttachmentKit.checkPermission();
|
|
55
|
+
|
|
56
|
+
if (status.status !== 'authorized') {
|
|
57
|
+
// 2. 권한 요청
|
|
58
|
+
const result = await RNAttachmentKit.requestPermission();
|
|
59
|
+
if (result.status !== 'authorized') {
|
|
60
|
+
console.log('권한이 거부되었습니다.');
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 3. 갤러리 열기
|
|
66
|
+
try {
|
|
67
|
+
const result = await RNAttachmentKit.openGallery({
|
|
68
|
+
maxSelection: 10,
|
|
69
|
+
quality: 'high',
|
|
70
|
+
includeBase64: false,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
console.log('선택된 이미지:', result.images);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
if (error.code === 'USER_CANCELLED') {
|
|
76
|
+
console.log('사용자가 취소했습니다.');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### 옵션
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
interface ImagePickerOptions {
|
|
85
|
+
maxSelection?: number; // 최대 선택 가능 개수 (기본값: 10)
|
|
86
|
+
quality?: 'low' | 'medium' | 'high'; // 이미지 품질 (기본값: 'high')
|
|
87
|
+
includeBase64?: boolean; // Base64 포함 여부 (기본값: false)
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 반환 타입
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
interface ImageAsset {
|
|
95
|
+
uri: string; // 파일 경로 (file://)
|
|
96
|
+
filename: string; // 파일 이름
|
|
97
|
+
width: number; // 이미지 너비
|
|
98
|
+
height: number; // 이미지 높이
|
|
99
|
+
fileSize: number; // 파일 크기 (bytes)
|
|
100
|
+
type: string; // MIME 타입 (image/jpeg)
|
|
101
|
+
base64?: string; // Base64 문자열 (옵션)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
interface ImagePickerResult {
|
|
105
|
+
images: ImageAsset[];
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## 🎨 전체 예제
|
|
110
|
+
|
|
111
|
+
전체 예제는 `/example/ImagePickerExample.tsx` 파일을 참고하세요.
|
|
112
|
+
|
|
113
|
+
## 🔧 개발
|
|
114
|
+
|
|
115
|
+
### 프로젝트 구조
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
RNAttachmentKit/
|
|
119
|
+
├── ios/
|
|
120
|
+
│ ├── RNAttachmentKit/ # iOS 네이티브 코드
|
|
121
|
+
│ │ ├── PhotoManager.swift # 사진 관리자
|
|
122
|
+
│ │ ├── GalleryViewController.swift
|
|
123
|
+
│ │ └── ...
|
|
124
|
+
│ ├── ios/ # RN 브리지
|
|
125
|
+
│ │ ├── RNAttachmentKitModule.swift
|
|
126
|
+
│ │ └── RNAttachmentKitModule.m
|
|
127
|
+
│ ├── src/ # TypeScript 인터페이스
|
|
128
|
+
│ │ └── index.ts
|
|
129
|
+
│ ├── package.json
|
|
130
|
+
│ └── RNAttachmentKit.podspec
|
|
131
|
+
└── android/ # (향후 추가 예정)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 로컬 개발
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# 1. 네이티브 코드 수정 후
|
|
138
|
+
cd /path/to/PaceLap.ReactNative/ios
|
|
139
|
+
pod install
|
|
140
|
+
|
|
141
|
+
# 2. React Native 빌드
|
|
142
|
+
cd ..
|
|
143
|
+
yarn ios
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## 📝 API 문서
|
|
147
|
+
|
|
148
|
+
### `requestPermission()`
|
|
149
|
+
|
|
150
|
+
포토 라이브러리 권한을 요청합니다.
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
const result = await RNAttachmentKit.requestPermission();
|
|
154
|
+
// { status: 'authorized' | 'denied' | 'restricted' | 'notDetermined' }
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### `checkPermission()`
|
|
158
|
+
|
|
159
|
+
현재 권한 상태를 확인합니다.
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
const result = await RNAttachmentKit.checkPermission();
|
|
163
|
+
// { status: 'authorized' | 'denied' | 'restricted' | 'notDetermined' }
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### `openGallery(options)`
|
|
167
|
+
|
|
168
|
+
이미지 갤러리를 엽니다.
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
const result = await RNAttachmentKit.openGallery({
|
|
172
|
+
maxSelection: 10,
|
|
173
|
+
quality: 'high',
|
|
174
|
+
includeBase64: false,
|
|
175
|
+
});
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## 🐛 트러블슈팅
|
|
179
|
+
|
|
180
|
+
### Pod install 실패
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
cd ios
|
|
184
|
+
rm -rf Pods Podfile.lock
|
|
185
|
+
pod cache clean --all
|
|
186
|
+
pod install
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 모듈을 찾을 수 없음
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
# node_modules 재설치
|
|
193
|
+
rm -rf node_modules
|
|
194
|
+
yarn install
|
|
195
|
+
|
|
196
|
+
# iOS 클린 빌드
|
|
197
|
+
cd ios
|
|
198
|
+
xcodebuild clean
|
|
199
|
+
cd ..
|
|
200
|
+
yarn ios
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### 권한이 작동하지 않음
|
|
204
|
+
|
|
205
|
+
Info.plist에 `NSPhotoLibraryUsageDescription` 권한이 추가되었는지 확인하세요.
|
|
206
|
+
|
|
207
|
+
## 📄 라이선스
|
|
208
|
+
|
|
209
|
+
MIT
|
|
210
|
+
|
|
211
|
+
## 👨💻 Author
|
|
212
|
+
|
|
213
|
+
Mike
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNAttachmentKit.m
|
|
3
|
+
// RNAttachmentKit
|
|
4
|
+
//
|
|
5
|
+
// Objective-C Bridge supporting both architectures
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <React/RCTBridgeModule.h>
|
|
9
|
+
|
|
10
|
+
#import <React/RCTEventEmitter.h>
|
|
11
|
+
|
|
12
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
13
|
+
// New Architecture (Turbo Module)
|
|
14
|
+
@interface RCT_EXTERN_REMAP_MODULE(RNAttachmentKit, RNAttachmentKit, RCTEventEmitter)
|
|
15
|
+
|
|
16
|
+
RCT_EXTERN_METHOD(init:(NSString *)licenseKey
|
|
17
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
18
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
19
|
+
|
|
20
|
+
RCT_EXTERN_METHOD(openGallery:(NSDictionary *)options
|
|
21
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
22
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
23
|
+
|
|
24
|
+
RCT_EXTERN_METHOD(openEditor:(NSDictionary *)options
|
|
25
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
26
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
27
|
+
|
|
28
|
+
RCT_EXTERN_METHOD(openViewer:(NSDictionary *)options
|
|
29
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
30
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
31
|
+
|
|
32
|
+
RCT_EXTERN_METHOD(closeGallery:(RCTPromiseResolveBlock)resolve
|
|
33
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
34
|
+
|
|
35
|
+
RCT_EXTERN_METHOD(injectImageCache:(NSString *)urlString
|
|
36
|
+
localPath:(NSString *)localPath
|
|
37
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
38
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
39
|
+
|
|
40
|
+
RCT_EXTERN_METHOD(updateSourceRect:(NSDictionary *)options
|
|
41
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
42
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
43
|
+
|
|
44
|
+
RCT_EXTERN_METHOD(getDefaultAnimationConfig:(RCTPromiseResolveBlock)resolve
|
|
45
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
46
|
+
|
|
47
|
+
RCT_EXTERN_METHOD(openMediaGallery:(NSDictionary *)options
|
|
48
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
49
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
50
|
+
|
|
51
|
+
RCT_EXTERN_METHOD(closeMediaGallery:(NSString *)galleryId
|
|
52
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
53
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
54
|
+
|
|
55
|
+
RCT_EXTERN_METHOD(appendGalleryItems:(NSDictionary *)payload
|
|
56
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
57
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
58
|
+
|
|
59
|
+
RCT_EXTERN_METHOD(removeGalleryItems:(NSDictionary *)payload
|
|
60
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
61
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
62
|
+
|
|
63
|
+
RCT_EXTERN_METHOD(supportedEvents)
|
|
64
|
+
|
|
65
|
+
+ (BOOL)requiresMainQueueSetup
|
|
66
|
+
{
|
|
67
|
+
return YES;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@end
|
|
71
|
+
|
|
72
|
+
#else
|
|
73
|
+
// Old Architecture (Legacy Native Module)
|
|
74
|
+
@interface RCT_EXTERN_REMAP_MODULE(RNAttachmentKit, RNAttachmentKit, RCTEventEmitter)
|
|
75
|
+
|
|
76
|
+
RCT_EXTERN_METHOD(init:(NSString *)licenseKey
|
|
77
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
78
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
79
|
+
|
|
80
|
+
RCT_EXTERN_METHOD(openGallery:(NSDictionary *)options
|
|
81
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
82
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
83
|
+
|
|
84
|
+
RCT_EXTERN_METHOD(openEditor:(NSDictionary *)options
|
|
85
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
86
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
87
|
+
|
|
88
|
+
RCT_EXTERN_METHOD(openViewer:(NSDictionary *)options
|
|
89
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
90
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
91
|
+
|
|
92
|
+
RCT_EXTERN_METHOD(closeGallery:(RCTPromiseResolveBlock)resolve
|
|
93
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
94
|
+
|
|
95
|
+
RCT_EXTERN_METHOD(injectImageCache:(NSString *)urlString
|
|
96
|
+
localPath:(NSString *)localPath
|
|
97
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
98
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
99
|
+
|
|
100
|
+
RCT_EXTERN_METHOD(updateSourceRect:(NSDictionary *)options
|
|
101
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
102
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
103
|
+
|
|
104
|
+
RCT_EXTERN_METHOD(getDefaultAnimationConfig:(RCTPromiseResolveBlock)resolve
|
|
105
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
106
|
+
|
|
107
|
+
RCT_EXTERN_METHOD(openMediaGallery:(NSDictionary *)options
|
|
108
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
109
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
110
|
+
|
|
111
|
+
RCT_EXTERN_METHOD(closeMediaGallery:(NSString *)galleryId
|
|
112
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
113
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
114
|
+
|
|
115
|
+
RCT_EXTERN_METHOD(appendGalleryItems:(NSDictionary *)payload
|
|
116
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
117
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
118
|
+
|
|
119
|
+
RCT_EXTERN_METHOD(removeGalleryItems:(NSDictionary *)payload
|
|
120
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
121
|
+
reject:(RCTPromiseRejectBlock)reject)
|
|
122
|
+
|
|
123
|
+
RCT_EXTERN_METHOD(supportedEvents)
|
|
124
|
+
|
|
125
|
+
+ (BOOL)requiresMainQueueSetup
|
|
126
|
+
{
|
|
127
|
+
return YES;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@end
|
|
131
|
+
|
|
132
|
+
#endif
|