diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..95a45d5e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,53 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - v.2.0 + paths: + - 'docs/**' + +jobs: + build: + name: Build Docusaurus + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: yarn + + - name: Install dependencies + working-directory: docs + run: yarn install --frozen-lockfile + - name: Build docs + working-directory: docs + run: yarn build + + - name: Upload Build Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs/build + + deploy: + name: Deploy to GitHub Pages + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index ba718d12..d3b53dfc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -# Whitelist com.luck.picture.lib package -# -!picture_library/src/com/luck/picture/lib/ - # OSX # .DS_Store @@ -35,8 +31,12 @@ project.xcworkspace # Android/IJ # -.idea +.classpath +.cxx .gradle +.idea +.project +.settings local.properties android.iml @@ -44,10 +44,14 @@ android.iml # example/ios/Pods +# Ruby +example/vendor/ + # node.js # node_modules/ npm-debug.log +yarn-debug.log yarn-error.log # BUCK @@ -56,8 +60,19 @@ buck-out/ android/app/libs android/keystores/debug.keystore +# Yarn +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions + # Expo -.expo/* +.expo/ + +# Turborepo +.turbo/ # generated by bob -lib/* +lib/ diff --git a/MultipleImagePicker.podspec b/MultipleImagePicker.podspec new file mode 100644 index 00000000..2ee84543 --- /dev/null +++ b/MultipleImagePicker.podspec @@ -0,0 +1,47 @@ +require "json" + +package = JSON.parse(File.read(File.join(__dir__, "package.json"))) + +Pod::Spec.new do |s| + s.name = "MultipleImagePicker" + s.version = package["version"] + s.summary = package["description"] + s.homepage = package["homepage"] + s.license = package["license"] + s.authors = package["author"] + + s.platforms = { :ios => min_ios_version_supported } + s.source = { :git => "https://github.com/baronha/react-native-multiple-image-picker.git", :tag => "#{s.version}" } + + s.source_files = [ + # Implementation (Swift) + "ios/**/*.{swift}", + # Autolinking/Registration (Objective-C++) + "ios/**/*.{m,mm}", + # Implementation (C++ objects) + "cpp/**/*.{hpp,cpp}", + ] + + s.resource_bundles = { + "MultipleImagePicker" => ["ios/Assets.xcassets"] + } + + + s.dependency "HXPhotoPicker/Picker", "4.2.3" + s.dependency "HXPhotoPicker/Editor/Lite", "4.2.3" + + s.pod_target_xcconfig = { + # C++ compiler flags, mainly for folly. + "GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES" + } + + load 'nitrogen/generated/ios/MultipleImagePicker+autolinking.rb' + + + add_nitrogen_files(s) + + s.dependency 'React-jsi' + s.dependency 'React-callinvoker' + + install_modules_dependencies(s) +end \ No newline at end of file diff --git a/README.md b/README.md index 87a51f64..8fe64998 100644 --- a/README.md +++ b/README.md @@ -4,217 +4,104 @@

-[![iOS][iOS]][iOS-URL] [![Android][Android]][Android-URL] [![Swift][Swift]][Swift-URL] [![Kotlin][Kotlin]][Kotlin-URL] [![React-Native][React-Native]][React-Native-URL] +[![iOS][iOS]][iOS-URL] [![Android][Android]][Android-URL] [![Swift][Swift]][Swift-URL] [![Kotlin][Kotlin]][Kotlin-URL] [![React-Native][React-Native]][React-Native-URL] -## Overview +## Overview 🎇 -![NativeModule](https://img.shields.io/badge/Native_Module-0052CC?style=for-the-badge) ![SmoothScroll](https://img.shields.io/badge/Smooth_Scroll-FCC624?style=for-the-badge) ![CropImage](https://img.shields.io/badge/Crop_Image-EA4C89?style=for-the-badge) +https://github.com/user-attachments/assets/79580bc7-237c-46b7-b92e-1479cc6d9079 - React Native Multiple Image Picker enables application to pick images and videos from multiple smart album in iOS/Android, similar to the current Facebook App. React Native Multiple Image Picker is based on two libraries available, [TLPhotoPicker](https://github.com/tilltue/TLPhotoPicker) and [PictureSelector](https://github.com/LuckSiege/PictureSelector) +React Native Multiple Image Picker **(RNMIP)** enables application to pick images and videos from multiple smart album in iOS/Android. React Native Multiple Image Picker is based on two libraries available, [HXPhotoPicker](https://github.com/SilenceLove/HXPhotoPicker) and [PictureSelector](https://github.com/LuckSiege/PictureSelector) -> Related: [React Native Photo Editor](https://github.com/baronha/react-native-photo-editor) +## Documentation 📚 ## Features 🔥 -| | ![Logo][Logo] | +| 🤩 | ![Logo][Logo] | | --- | ------------------------------------------------------------------------------ | -| 🐳 | Save selected image status for later session. | +| 🐳 | Keep the previous selection. | +| 0️⃣ | Selected order index. | +| 🎨 | UI Customization (numberOfColumn, spacing, primaryColor ... ) | +| 🌚 | Dark Mode, Light Mode | | 🌄 | Choose multiple images/video. | | 📦 | Support smart album `(camera roll, selfies, panoramas, favorites, videos...)`. | -| 0️⃣ | Selected order index. | | 📺 | Display video duration. | | 🎆 | Preview image/video. | -| ⛅️ | Support iCloud Photo Library. | -| 🔪 | Crop image (new) ✨ | -| 🌚 | Crop image circle for Avatar (new) ✨ | -| 🌪 | Scrolling performance. | -| ▶️ | Playback video and live photos(for iOS). | - -## Video Demo 📺 - -### Picker Controller - -| ![ios] | ![android] | -| ------ | ---------- | -|