react-native-video-trim 3.0.4 → 3.0.6
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/android/src/main/java/com/videotrim/utils/VideoTrimmerUtil.java +4 -1
- package/ios/ErrorCode.swift +1 -0
- package/ios/VideoTrim.swift +76 -66
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +5 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +5 -0
|
@@ -72,7 +72,7 @@ public class VideoTrimmerUtil {
|
|
|
72
72
|
retriever.setDataSource(inputFile);
|
|
73
73
|
String rotationStr = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);
|
|
74
74
|
int rotation = rotationStr != null ? Integer.parseInt(rotationStr) : 0;
|
|
75
|
-
|
|
75
|
+
|
|
76
76
|
|
|
77
77
|
extractor = new MediaExtractor();
|
|
78
78
|
extractor.setDataSource(inputFile);
|
|
@@ -96,6 +96,9 @@ public class VideoTrimmerUtil {
|
|
|
96
96
|
int width = widthStr != null ? Integer.parseInt(widthStr) : 0; // Default to unknown
|
|
97
97
|
int height = heightStr != null ? Integer.parseInt(heightStr) : 0;
|
|
98
98
|
|
|
99
|
+
// IMPORTANT: after this line, the retriever is no longer needed
|
|
100
|
+
retriever.release();
|
|
101
|
+
|
|
99
102
|
// Adjust buffer size based on resolution
|
|
100
103
|
if (width > 3840 || height > 2160) { // 8K+
|
|
101
104
|
maxBufferSize = 16 * 1024 * 1024; // 16MB for 8K
|
package/ios/ErrorCode.swift
CHANGED
package/ios/VideoTrim.swift
CHANGED
|
@@ -39,6 +39,7 @@ class VideoTrim: RCTEventEmitter, AssetLoaderDelegate, UIDocumentPickerDelegate
|
|
|
39
39
|
private var closeWhenFinish = true
|
|
40
40
|
private var enableCancelTrimming = true;
|
|
41
41
|
private var cancelTrimmingButtonText = "Cancel";
|
|
42
|
+
private var hideCancelTrimmingButton = false;
|
|
42
43
|
private var enableCancelTrimmingDialog = true;
|
|
43
44
|
private var cancelTrimmingDialogTitle = "Warning!";
|
|
44
45
|
private var cancelTrimmingDialogMessage = "Are you sure want to trimming?";
|
|
@@ -105,6 +106,7 @@ class VideoTrim: RCTEventEmitter, AssetLoaderDelegate, UIDocumentPickerDelegate
|
|
|
105
106
|
closeWhenFinish = config["closeWhenFinish"] as? Bool ?? true
|
|
106
107
|
enableCancelTrimming = config["enableCancelTrimming"] as? Bool ?? true
|
|
107
108
|
cancelTrimmingButtonText = config["cancelTrimmingButtonText"] as? String ?? "Cancel"
|
|
109
|
+
hideCancelTrimmingButton = config["hideCancelTrimmingButton"] as? Bool ?? false
|
|
108
110
|
enableCancelTrimmingDialog = config["enableCancelTrimmingDialog"] as? Bool ?? true
|
|
109
111
|
cancelTrimmingDialogTitle = config["cancelTrimmingDialogTitle"] as? String ?? "Warning!"
|
|
110
112
|
cancelTrimmingDialogMessage = config["cancelTrimmingDialogMessage"] as? String ?? "Are you sure want to cancel trimming?"
|
|
@@ -125,9 +127,10 @@ class VideoTrim: RCTEventEmitter, AssetLoaderDelegate, UIDocumentPickerDelegate
|
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
let destPath = URL(string: uri)
|
|
128
|
-
let
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
guard let destPath = destPath else {
|
|
131
|
+
self.onError(message: "File URL is invalid", code: .invalidFilePath)
|
|
132
|
+
return
|
|
133
|
+
}
|
|
131
134
|
|
|
132
135
|
DispatchQueue.main.async {
|
|
133
136
|
self.vc = VideoTrimmerViewController()
|
|
@@ -336,39 +339,46 @@ class VideoTrim: RCTEventEmitter, AssetLoaderDelegate, UIDocumentPickerDelegate
|
|
|
336
339
|
|
|
337
340
|
emitEventToJS("onStartTrimming", eventData: nil)
|
|
338
341
|
|
|
339
|
-
|
|
340
|
-
progressAlert.modalPresentationStyle = .overFullScreen
|
|
341
|
-
progressAlert.modalTransitionStyle = .crossDissolve
|
|
342
|
-
progressAlert.setTitle(trimmingText)
|
|
343
|
-
|
|
342
|
+
var progressAlert: ProgressAlertController?
|
|
344
343
|
if enableCancelTrimming {
|
|
345
|
-
progressAlert
|
|
346
|
-
|
|
347
|
-
progressAlert
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
344
|
+
progressAlert = ProgressAlertController()
|
|
345
|
+
|
|
346
|
+
guard let progressAlert = progressAlert else { return }
|
|
347
|
+
|
|
348
|
+
progressAlert.modalPresentationStyle = .overFullScreen
|
|
349
|
+
progressAlert.modalTransitionStyle = .crossDissolve
|
|
350
|
+
progressAlert.setTitle(trimmingText)
|
|
351
|
+
|
|
352
|
+
if !hideCancelTrimmingButton {
|
|
353
|
+
progressAlert.setCancelTitle(cancelTrimmingButtonText)
|
|
354
|
+
progressAlert.showCancelBtn()
|
|
355
|
+
|
|
356
|
+
progressAlert.onDismiss = {
|
|
357
|
+
if self.enableCancelTrimmingDialog {
|
|
358
|
+
let dialogMessage = UIAlertController(title: self.cancelTrimmingDialogTitle, message: self.cancelTrimmingDialogMessage, preferredStyle: .alert)
|
|
359
|
+
dialogMessage.overrideUserInterfaceStyle = .dark
|
|
360
|
+
|
|
361
|
+
let ok = UIAlertAction(title: self.cancelDialogConfirmText, style: .destructive) { _ in
|
|
362
|
+
self.exportSession?.cancelExport()
|
|
363
|
+
progressAlert.dismiss(animated: true)
|
|
364
|
+
}
|
|
365
|
+
let cancel = UIAlertAction(title: self.cancelDialogCancelText, style: .cancel)
|
|
366
|
+
dialogMessage.addAction(ok)
|
|
367
|
+
dialogMessage.addAction(cancel)
|
|
368
|
+
|
|
369
|
+
if let root = RCTPresentedViewController() {
|
|
370
|
+
root.present(dialogMessage, animated: true, completion: nil)
|
|
371
|
+
}
|
|
372
|
+
} else {
|
|
353
373
|
self.exportSession?.cancelExport()
|
|
354
374
|
progressAlert.dismiss(animated: true)
|
|
355
375
|
}
|
|
356
|
-
let cancel = UIAlertAction(title: self.cancelDialogCancelText, style: .cancel)
|
|
357
|
-
dialogMessage.addAction(ok)
|
|
358
|
-
dialogMessage.addAction(cancel)
|
|
359
|
-
|
|
360
|
-
if let root = RCTPresentedViewController() {
|
|
361
|
-
root.present(dialogMessage, animated: true, completion: nil)
|
|
362
|
-
}
|
|
363
|
-
} else {
|
|
364
|
-
self.exportSession?.cancelExport()
|
|
365
|
-
progressAlert.dismiss(animated: true)
|
|
366
376
|
}
|
|
367
377
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
378
|
+
|
|
379
|
+
if let root = RCTPresentedViewController() {
|
|
380
|
+
root.present(progressAlert, animated: true, completion: nil)
|
|
381
|
+
}
|
|
372
382
|
}
|
|
373
383
|
|
|
374
384
|
// Setup AVAssetExportSession
|
|
@@ -379,7 +389,7 @@ class VideoTrim: RCTEventEmitter, AssetLoaderDelegate, UIDocumentPickerDelegate
|
|
|
379
389
|
|
|
380
390
|
guard let session = AVAssetExportSession(asset: asset, presetName: preset) else {
|
|
381
391
|
onError(message: "Failed to create export session", code: .trimmingFailed)
|
|
382
|
-
progressAlert
|
|
392
|
+
progressAlert?.dismiss(animated: true)
|
|
383
393
|
return
|
|
384
394
|
}
|
|
385
395
|
exportSession = session
|
|
@@ -424,7 +434,7 @@ class VideoTrim: RCTEventEmitter, AssetLoaderDelegate, UIDocumentPickerDelegate
|
|
|
424
434
|
timer = Timer.scheduledTimer(withTimeInterval: progressUpdateInterval, repeats: true) { timer in
|
|
425
435
|
let progress = manager.progress
|
|
426
436
|
DispatchQueue.main.async {
|
|
427
|
-
progressAlert
|
|
437
|
+
progressAlert?.setProgress(progress)
|
|
428
438
|
}
|
|
429
439
|
let statsPayload: [String: Any] = [
|
|
430
440
|
"time": Int(Double(progress) * videoDuration * 1000),
|
|
@@ -440,7 +450,7 @@ class VideoTrim: RCTEventEmitter, AssetLoaderDelegate, UIDocumentPickerDelegate
|
|
|
440
450
|
self.timer = nil
|
|
441
451
|
|
|
442
452
|
DispatchQueue.main.async {
|
|
443
|
-
progressAlert
|
|
453
|
+
progressAlert?.dismiss(animated: true)
|
|
444
454
|
}
|
|
445
455
|
|
|
446
456
|
let finalProgress = manager.progress
|
|
@@ -700,39 +710,39 @@ class VideoTrim: RCTEventEmitter, AssetLoaderDelegate, UIDocumentPickerDelegate
|
|
|
700
710
|
}
|
|
701
711
|
}
|
|
702
712
|
|
|
703
|
-
private func renameFile(at url: URL, newName: String) -> URL? {
|
|
704
|
-
let fileManager = FileManager.default
|
|
705
|
-
|
|
706
|
-
// Get the directory of the existing file
|
|
707
|
-
let directory = url.deletingLastPathComponent()
|
|
708
|
-
|
|
709
|
-
// Get the file extension
|
|
710
|
-
let fileExtension = url.pathExtension
|
|
711
|
-
|
|
712
|
-
// Create the new file URL with the new name and the same extension
|
|
713
|
-
let newFileURL = directory.appendingPathComponent(newName).appendingPathExtension(fileExtension)
|
|
714
|
-
|
|
715
|
-
// Check if a file with the new name already exists
|
|
716
|
-
if fileManager.fileExists(atPath: newFileURL.path) {
|
|
717
|
-
do {
|
|
718
|
-
// If the file exists, remove it first to avoid conflicts
|
|
719
|
-
try fileManager.removeItem(at: newFileURL)
|
|
720
|
-
} catch {
|
|
721
|
-
print("Error removing existing file: \(error)")
|
|
722
|
-
return nil
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
do {
|
|
727
|
-
// Rename (move) the file
|
|
728
|
-
try fileManager.moveItem(at: url, to: newFileURL)
|
|
729
|
-
print("File renamed successfully to \(newFileURL.absoluteString)")
|
|
730
|
-
return newFileURL
|
|
731
|
-
} catch {
|
|
732
|
-
print("Error renaming file: \(error)")
|
|
733
|
-
return nil
|
|
734
|
-
}
|
|
735
|
-
}
|
|
713
|
+
// private func renameFile(at url: URL, newName: String) -> URL? {
|
|
714
|
+
// let fileManager = FileManager.default
|
|
715
|
+
//
|
|
716
|
+
// // Get the directory of the existing file
|
|
717
|
+
// let directory = url.deletingLastPathComponent()
|
|
718
|
+
//
|
|
719
|
+
// // Get the file extension
|
|
720
|
+
// let fileExtension = url.pathExtension
|
|
721
|
+
//
|
|
722
|
+
// // Create the new file URL with the new name and the same extension
|
|
723
|
+
// let newFileURL = directory.appendingPathComponent(newName).appendingPathExtension(fileExtension)
|
|
724
|
+
//
|
|
725
|
+
// // Check if a file with the new name already exists
|
|
726
|
+
// if fileManager.fileExists(atPath: newFileURL.path) {
|
|
727
|
+
// do {
|
|
728
|
+
// // If the file exists, remove it first to avoid conflicts
|
|
729
|
+
// try fileManager.removeItem(at: newFileURL)
|
|
730
|
+
// } catch {
|
|
731
|
+
// print("Error removing existing file: \(error)")
|
|
732
|
+
// return nil
|
|
733
|
+
// }
|
|
734
|
+
// }
|
|
735
|
+
//
|
|
736
|
+
// do {
|
|
737
|
+
// // Rename (move) the file
|
|
738
|
+
// try fileManager.moveItem(at: url, to: newFileURL)
|
|
739
|
+
// print("File renamed successfully to \(newFileURL.absoluteString)")
|
|
740
|
+
// return newFileURL
|
|
741
|
+
// } catch {
|
|
742
|
+
// print("Error renaming file: \(error)")
|
|
743
|
+
// return nil
|
|
744
|
+
// }
|
|
745
|
+
// }
|
|
736
746
|
}
|
|
737
747
|
|
|
738
748
|
/// Helper class to manage export session state for legacy API without capturing in closures
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","VideoTrim","NativeModules","Proxy","get","Error","showEditor","filePath","config","arguments","length","undefined","headerTextColor","color","processColor","listFiles","cleanFiles","deleteFile","trim","closeEditor","isValidFile","url"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAOA,MAAMC,aAAa,GAChB,kFAAiF,GAClFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,SAAS,GAAGC,0BAAa,CAACD,SAAS,GACrCC,0BAAa,CAACD,SAAS,GACvB,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","VideoTrim","NativeModules","Proxy","get","Error","showEditor","filePath","config","arguments","length","undefined","headerTextColor","color","processColor","listFiles","cleanFiles","deleteFile","trim","closeEditor","isValidFile","url"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAOA,MAAMC,aAAa,GAChB,kFAAiF,GAClFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,SAAS,GAAGC,0BAAa,CAACD,SAAS,GACrCC,0BAAa,CAACD,SAAS,GACvB,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AA2OL;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASU,UAAUA,CAACC,QAAgB,EAAmC;EAAA,IAAjCC,MAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACpE,MAAM;IAAEG;EAAgB,CAAC,GAAGJ,MAAM;EAClC,MAAMK,KAAK,GAAG,IAAAC,yBAAY,EAACF,eAAe,CAAC;EAC3CX,SAAS,CAACK,UAAU,CAACC,QAAQ,EAAE;IAAE,GAAGC,MAAM;IAAEI,eAAe,EAAEC;EAAM,CAAC,CAAC;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASE,SAASA,CAAA,EAAsB;EAC7C,OAAOd,SAAS,CAACc,SAAS,CAAC,CAAC;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAA,EAAoB;EAC5C,OAAOf,SAAS,CAACe,UAAU,CAAC,CAAC;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACV,QAAgB,EAAoB;EAC7D,IAAI,EAACA,QAAQ,aAARA,QAAQ,eAARA,QAAQ,CAAEW,IAAI,CAAC,CAAC,CAACR,MAAM,GAAE;IAC5B,MAAM,IAAIL,KAAK,CAAC,4BAA4B,CAAC;EAC/C;EACA,OAAOJ,SAAS,CAACgB,UAAU,CAACV,QAAQ,CAAC;AACvC;;AAEA;AACA;AACA;AACO,SAASY,WAAWA,CAAA,EAAS;EAClC,OAAOlB,SAAS,CAACkB,WAAW,CAAC,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASC,WAAWA,CAACC,GAAW,EAAoB;EACzD,OAAOpB,SAAS,CAACmB,WAAW,CAACC,GAAG,CAAC;AACnC"}
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","processColor","LINKING_ERROR","select","ios","default","VideoTrim","Proxy","get","Error","showEditor","filePath","config","arguments","length","undefined","headerTextColor","color","listFiles","cleanFiles","deleteFile","trim","closeEditor","isValidFile","url"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SACEA,aAAa,EACbC,QAAQ,EACRC,YAAY,QAEP,cAAc;AAErB,MAAMC,aAAa,GAChB,kFAAiF,GAClFF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,SAAS,GAAGP,aAAa,CAACO,SAAS,GACrCP,aAAa,CAACO,SAAS,GACvB,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","processColor","LINKING_ERROR","select","ios","default","VideoTrim","Proxy","get","Error","showEditor","filePath","config","arguments","length","undefined","headerTextColor","color","listFiles","cleanFiles","deleteFile","trim","closeEditor","isValidFile","url"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SACEA,aAAa,EACbC,QAAQ,EACRC,YAAY,QAEP,cAAc;AAErB,MAAMC,aAAa,GAChB,kFAAiF,GAClFF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,SAAS,GAAGP,aAAa,CAACO,SAAS,GACrCP,aAAa,CAACO,SAAS,GACvB,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;AA2OL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,UAAUA,CAACC,QAAgB,EAAmC;EAAA,IAAjCC,MAAoB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACpE,MAAM;IAAEG;EAAgB,CAAC,GAAGJ,MAAM;EAClC,MAAMK,KAAK,GAAGhB,YAAY,CAACe,eAAe,CAAC;EAC3CV,SAAS,CAACI,UAAU,CAACC,QAAQ,EAAE;IAAE,GAAGC,MAAM;IAAEI,eAAe,EAAEC;EAAM,CAAC,CAAC;AACvE;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAAA,EAAsB;EAC7C,OAAOZ,SAAS,CAACY,SAAS,CAAC,CAAC;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAA,EAAoB;EAC5C,OAAOb,SAAS,CAACa,UAAU,CAAC,CAAC;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACT,QAAgB,EAAoB;EAC7D,IAAI,EAACA,QAAQ,aAARA,QAAQ,eAARA,QAAQ,CAAEU,IAAI,CAAC,CAAC,CAACP,MAAM,GAAE;IAC5B,MAAM,IAAIL,KAAK,CAAC,4BAA4B,CAAC;EAC/C;EACA,OAAOH,SAAS,CAACc,UAAU,CAACT,QAAQ,CAAC;AACvC;;AAEA;AACA;AACA;AACA,OAAO,SAASW,WAAWA,CAAA,EAAS;EAClC,OAAOhB,SAAS,CAACgB,WAAW,CAAC,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACC,GAAW,EAAoB;EACzD,OAAOlB,SAAS,CAACiB,WAAW,CAACC,GAAG,CAAC;AACnC"}
|
|
@@ -166,6 +166,11 @@ export interface EditorConfig {
|
|
|
166
166
|
* @default true
|
|
167
167
|
*/
|
|
168
168
|
enableCancelTrimmingDialog?: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Whether to hide Cancel button on trimming dialog
|
|
171
|
+
* @default false
|
|
172
|
+
*/
|
|
173
|
+
hideCancelTrimmingButton?: boolean;
|
|
169
174
|
/**
|
|
170
175
|
* Cancel trimming dialog title
|
|
171
176
|
* @default "Warning!"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AAmBtB,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAA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AC,EAAE,MAAM,CAAC;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,YAAiB,GAAG,IAAI,CAI5E;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAE7C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK7D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEzD"}
|
package/package.json
CHANGED
package/src/index.tsx
CHANGED
|
@@ -189,6 +189,11 @@ export interface EditorConfig {
|
|
|
189
189
|
* @default true
|
|
190
190
|
*/
|
|
191
191
|
enableCancelTrimmingDialog?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Whether to hide Cancel button on trimming dialog
|
|
194
|
+
* @default false
|
|
195
|
+
*/
|
|
196
|
+
hideCancelTrimmingButton?: boolean;
|
|
192
197
|
/**
|
|
193
198
|
* Cancel trimming dialog title
|
|
194
199
|
* @default "Warning!"
|