react-native-photo-video-editor 0.3.2 → 0.3.4

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.3.3
6
+
7
+ - **Direct photo PNG export on iOS**: Removed the "Export & Share" action sheet confirmation dialog on iOS. Tapping the header completion button (Done / Export) now directly exports the photo as a PNG file without requiring format confirmation.
8
+
5
9
  ## 0.3.2
6
10
 
7
11
  - **Fix iOS video export crash**: Resolved `EXC_BREAKPOINT` / `_xpc_api_misuse` crash on iOS 26+ in `basicvideocompositor.output` by replacing `AVVideoCompositionCoreAnimationTool` with `AVVideoComposition(asset:applyingCIFiltersWithHandler:)` and Core Image compositing in `VideoExporter`.
@@ -1556,7 +1556,7 @@ final class PhotoVideoEditorViewController: UIViewController {
1556
1556
  let adjustments = session.adjustments
1557
1557
  let layers = session.layerStack.layers
1558
1558
  var options = exportOptions
1559
- if let selectedPhotoExportFormat { options["imageFormat"] = selectedPhotoExportFormat }
1559
+ options["imageFormat"] = selectedPhotoExportFormat ?? "png"
1560
1560
  let sourceUri = uri
1561
1561
  DispatchQueue.global(qos: .userInitiated).async { [weak self] in
1562
1562
  do {
@@ -2628,8 +2628,7 @@ final class PhotoVideoEditorViewController: UIViewController {
2628
2628
  fillColor: primaryColor,
2629
2629
  textColor: onPrimaryColor
2630
2630
  ) { [weak self] in
2631
- guard let self else { return }
2632
- if self.mediaType == "photo" { self.showPhotoExportConfiguration() } else { self.doneEditor() }
2631
+ self?.doneEditor()
2633
2632
  }
2634
2633
  header.addArrangedSubview(done)
2635
2634
 
@@ -2716,26 +2715,6 @@ final class PhotoVideoEditorViewController: UIViewController {
2716
2715
  schedulePhotoPreviewRender()
2717
2716
  }
2718
2717
 
2719
- private func showPhotoExportConfiguration() {
2720
- let sheet = UIAlertController(
2721
- title: "Export & Share",
2722
- message: "Choose an output format. Quality and size limits continue to use your export settings.",
2723
- preferredStyle: .actionSheet
2724
- )
2725
- [("JPEG", "jpeg"), ("PNG", "png"), ("WebP", "webp")].forEach { label, format in
2726
- sheet.addAction(UIAlertAction(title: label, style: .default) { [weak self] _ in
2727
- self?.selectedPhotoExportFormat = format
2728
- self?.doneEditor()
2729
- })
2730
- }
2731
- sheet.addAction(UIAlertAction(title: "Cancel", style: .cancel))
2732
- if let popover = sheet.popoverPresentationController {
2733
- popover.sourceView = view
2734
- popover.sourceRect = CGRect(x: view.bounds.midX, y: view.bounds.maxY - 1, width: 1, height: 1)
2735
- }
2736
- present(sheet, animated: true)
2737
- }
2738
-
2739
2718
  /// Coalesces slider and drag callbacks and performs rendering on a dedicated background queue
2740
2719
  /// so the main thread remains at 120 FPS without slider hitching or dragging lag.
2741
2720
  private func schedulePhotoPreviewRender() {
@@ -2796,6 +2775,7 @@ final class PhotoVideoEditorViewController: UIViewController {
2796
2775
 
2797
2776
  private func doneEditor() {
2798
2777
  if mediaType == "photo" {
2778
+ selectedPhotoExportFormat = "png"
2799
2779
  exportPhoto()
2800
2780
  } else {
2801
2781
  exportVideo()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-photo-video-editor",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Native photo and video editor for React Native, powered by Kotlin and Swift.",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",