react-native-video-trim 3.0.10 → 4.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/LICENSE +1 -1
- package/README.md +46 -57
- package/VideoTrim.podspec +24 -0
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +76 -51
- package/android/gradle.properties +5 -5
- package/android/src/main/AndroidManifest.xml +4 -2
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/videotrim/VideoTrim.kt +629 -0
- package/android/src/main/java/com/margelo/nitro/videotrim/VideoTrimPackage.kt +22 -0
- package/android/src/main/java/com/{videotrim → margelo/nitro/videotrim}/enums/ErrorCode.java +1 -1
- package/android/src/main/java/com/{videotrim → margelo/nitro/videotrim}/interfaces/IVideoTrimmerView.java +1 -1
- package/android/src/main/java/com/{videotrim → margelo/nitro/videotrim}/interfaces/VideoTrimListener.java +6 -5
- package/android/src/main/java/com/{videotrim → margelo/nitro/videotrim}/utils/MediaMetadataUtil.java +1 -1
- package/android/src/main/java/com/{videotrim → margelo/nitro/videotrim}/utils/StorageUtil.java +3 -1
- package/android/src/main/java/com/{videotrim → margelo/nitro/videotrim}/utils/VideoTrimmerUtil.java +22 -20
- package/android/src/main/java/com/{videotrim → margelo/nitro/videotrim}/widgets/VideoTrimmerView.java +38 -66
- package/ios/AssetLoader.swift +2 -2
- package/ios/ErrorCode.swift +2 -2
- package/ios/ProgressAlertController.swift +2 -2
- package/ios/VideoTrim.swift +48 -838
- package/ios/VideoTrimImpl.swift +860 -0
- package/ios/VideoTrimmer.swift +2 -3
- package/ios/VideoTrimmerThumb.swift +33 -26
- package/ios/VideoTrimmerViewController.swift +47 -28
- package/lib/module/VideoTrim.nitro.js +4 -0
- package/lib/module/VideoTrim.nitro.js.map +1 -0
- package/lib/module/index.js +71 -22
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/{index.d.ts → src/VideoTrim.nitro.d.ts} +63 -89
- package/lib/typescript/src/VideoTrim.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +41 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/nitrogen/generated/android/c++/JEditorConfig.hpp +229 -0
- package/nitrogen/generated/android/c++/JFileValidationResult.hpp +61 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +74 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string_std__unordered_map_std__string__std__string_.hpp +89 -0
- package/nitrogen/generated/android/c++/JHybridVideoTrimSpec.cpp +131 -0
- package/nitrogen/generated/android/c++/JHybridVideoTrimSpec.hpp +67 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/videotrim/EditorConfig.kt +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/videotrim/FileValidationResult.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/videotrim/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/videotrim/Func_void_std__string_std__unordered_map_std__string__std__string_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/videotrim/HybridVideoTrimSpec.kt +82 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/videotrim/videotrimOnLoad.kt +35 -0
- package/nitrogen/generated/android/videotrim+autolinking.cmake +78 -0
- package/nitrogen/generated/android/videotrim+autolinking.gradle +27 -0
- package/nitrogen/generated/android/videotrimOnLoad.cpp +50 -0
- package/nitrogen/generated/android/videotrimOnLoad.hpp +25 -0
- package/nitrogen/generated/ios/VideoTrim+autolinking.rb +60 -0
- package/nitrogen/generated/ios/VideoTrim-Swift-Cxx-Bridge.cpp +88 -0
- package/nitrogen/generated/ios/VideoTrim-Swift-Cxx-Bridge.hpp +331 -0
- package/nitrogen/generated/ios/VideoTrim-Swift-Cxx-Umbrella.hpp +53 -0
- package/nitrogen/generated/ios/VideoTrimAutolinking.mm +33 -0
- package/nitrogen/generated/ios/VideoTrimAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridVideoTrimSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridVideoTrimSpecSwift.hpp +116 -0
- package/nitrogen/generated/ios/swift/EditorConfig.swift +519 -0
- package/nitrogen/generated/ios/swift/FileValidationResult.swift +57 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_FileValidationResult.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_double.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string_std__unordered_map_std__string__std__string_.swift +54 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_std__string_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridVideoTrimSpec.swift +53 -0
- package/nitrogen/generated/ios/swift/HybridVideoTrimSpec_cxx.swift +222 -0
- package/nitrogen/generated/shared/c++/EditorConfig.hpp +245 -0
- package/nitrogen/generated/shared/c++/FileValidationResult.hpp +77 -0
- package/nitrogen/generated/shared/c++/HybridVideoTrimSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridVideoTrimSpec.hpp +76 -0
- package/package.json +75 -71
- package/src/VideoTrim.nitro.ts +244 -0
- package/src/index.tsx +87 -258
- package/android/src/main/AndroidManifestDeprecated.xml +0 -3
- package/android/src/main/java/com/videotrim/VideoTrimModule.java +0 -603
- package/android/src/main/java/com/videotrim/VideoTrimPackage.java +0 -28
- package/ios/VideoTrim-Bridging-Header.h +0 -2
- package/ios/VideoTrim.mm +0 -17
- package/ios/VideoTrim.xcodeproj/project.pbxproj +0 -283
- package/lib/commonjs/index.js +0 -87
- package/lib/commonjs/index.js.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/react-native-video-trim.podspec +0 -43
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// EditorConfig.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#include <string>
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::videotrim {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A struct which can be represented as a JavaScript object (EditorConfig).
|
|
29
|
+
*/
|
|
30
|
+
struct EditorConfig {
|
|
31
|
+
public:
|
|
32
|
+
bool enableHapticFeedback SWIFT_PRIVATE;
|
|
33
|
+
bool saveToPhoto SWIFT_PRIVATE;
|
|
34
|
+
double maxDuration SWIFT_PRIVATE;
|
|
35
|
+
double minDuration SWIFT_PRIVATE;
|
|
36
|
+
std::string cancelButtonText SWIFT_PRIVATE;
|
|
37
|
+
std::string saveButtonText SWIFT_PRIVATE;
|
|
38
|
+
bool enableCancelDialog SWIFT_PRIVATE;
|
|
39
|
+
std::string cancelDialogTitle SWIFT_PRIVATE;
|
|
40
|
+
std::string cancelDialogMessage SWIFT_PRIVATE;
|
|
41
|
+
std::string cancelDialogCancelText SWIFT_PRIVATE;
|
|
42
|
+
std::string cancelDialogConfirmText SWIFT_PRIVATE;
|
|
43
|
+
bool enableSaveDialog SWIFT_PRIVATE;
|
|
44
|
+
std::string saveDialogTitle SWIFT_PRIVATE;
|
|
45
|
+
std::string saveDialogMessage SWIFT_PRIVATE;
|
|
46
|
+
std::string saveDialogCancelText SWIFT_PRIVATE;
|
|
47
|
+
std::string saveDialogConfirmText SWIFT_PRIVATE;
|
|
48
|
+
std::string trimmingText SWIFT_PRIVATE;
|
|
49
|
+
bool fullScreenModalIOS SWIFT_PRIVATE;
|
|
50
|
+
std::string type SWIFT_PRIVATE;
|
|
51
|
+
std::string outputExt SWIFT_PRIVATE;
|
|
52
|
+
bool openDocumentsOnFinish SWIFT_PRIVATE;
|
|
53
|
+
bool openShareSheetOnFinish SWIFT_PRIVATE;
|
|
54
|
+
bool removeAfterSavedToPhoto SWIFT_PRIVATE;
|
|
55
|
+
bool removeAfterFailedToSavePhoto SWIFT_PRIVATE;
|
|
56
|
+
bool removeAfterSavedToDocuments SWIFT_PRIVATE;
|
|
57
|
+
bool removeAfterFailedToSaveDocuments SWIFT_PRIVATE;
|
|
58
|
+
bool removeAfterShared SWIFT_PRIVATE;
|
|
59
|
+
bool removeAfterFailedToShare SWIFT_PRIVATE;
|
|
60
|
+
bool autoplay SWIFT_PRIVATE;
|
|
61
|
+
double jumpToPositionOnLoad SWIFT_PRIVATE;
|
|
62
|
+
bool closeWhenFinish SWIFT_PRIVATE;
|
|
63
|
+
bool enableCancelTrimming SWIFT_PRIVATE;
|
|
64
|
+
std::string cancelTrimmingButtonText SWIFT_PRIVATE;
|
|
65
|
+
bool enableCancelTrimmingDialog SWIFT_PRIVATE;
|
|
66
|
+
std::string cancelTrimmingDialogTitle SWIFT_PRIVATE;
|
|
67
|
+
std::string cancelTrimmingDialogMessage SWIFT_PRIVATE;
|
|
68
|
+
std::string cancelTrimmingDialogCancelText SWIFT_PRIVATE;
|
|
69
|
+
std::string cancelTrimmingDialogConfirmText SWIFT_PRIVATE;
|
|
70
|
+
std::string headerText SWIFT_PRIVATE;
|
|
71
|
+
double headerTextSize SWIFT_PRIVATE;
|
|
72
|
+
double headerTextColor SWIFT_PRIVATE;
|
|
73
|
+
bool alertOnFailToLoad SWIFT_PRIVATE;
|
|
74
|
+
std::string alertOnFailTitle SWIFT_PRIVATE;
|
|
75
|
+
std::string alertOnFailMessage SWIFT_PRIVATE;
|
|
76
|
+
std::string alertOnFailCloseText SWIFT_PRIVATE;
|
|
77
|
+
|
|
78
|
+
public:
|
|
79
|
+
EditorConfig() = default;
|
|
80
|
+
explicit EditorConfig(bool enableHapticFeedback, bool saveToPhoto, double maxDuration, double minDuration, std::string cancelButtonText, std::string saveButtonText, bool enableCancelDialog, std::string cancelDialogTitle, std::string cancelDialogMessage, std::string cancelDialogCancelText, std::string cancelDialogConfirmText, bool enableSaveDialog, std::string saveDialogTitle, std::string saveDialogMessage, std::string saveDialogCancelText, std::string saveDialogConfirmText, std::string trimmingText, bool fullScreenModalIOS, std::string type, std::string outputExt, bool openDocumentsOnFinish, bool openShareSheetOnFinish, bool removeAfterSavedToPhoto, bool removeAfterFailedToSavePhoto, bool removeAfterSavedToDocuments, bool removeAfterFailedToSaveDocuments, bool removeAfterShared, bool removeAfterFailedToShare, bool autoplay, double jumpToPositionOnLoad, bool closeWhenFinish, bool enableCancelTrimming, std::string cancelTrimmingButtonText, bool enableCancelTrimmingDialog, std::string cancelTrimmingDialogTitle, std::string cancelTrimmingDialogMessage, std::string cancelTrimmingDialogCancelText, std::string cancelTrimmingDialogConfirmText, std::string headerText, double headerTextSize, double headerTextColor, bool alertOnFailToLoad, std::string alertOnFailTitle, std::string alertOnFailMessage, std::string alertOnFailCloseText): enableHapticFeedback(enableHapticFeedback), saveToPhoto(saveToPhoto), maxDuration(maxDuration), minDuration(minDuration), cancelButtonText(cancelButtonText), saveButtonText(saveButtonText), enableCancelDialog(enableCancelDialog), cancelDialogTitle(cancelDialogTitle), cancelDialogMessage(cancelDialogMessage), cancelDialogCancelText(cancelDialogCancelText), cancelDialogConfirmText(cancelDialogConfirmText), enableSaveDialog(enableSaveDialog), saveDialogTitle(saveDialogTitle), saveDialogMessage(saveDialogMessage), saveDialogCancelText(saveDialogCancelText), saveDialogConfirmText(saveDialogConfirmText), trimmingText(trimmingText), fullScreenModalIOS(fullScreenModalIOS), type(type), outputExt(outputExt), openDocumentsOnFinish(openDocumentsOnFinish), openShareSheetOnFinish(openShareSheetOnFinish), removeAfterSavedToPhoto(removeAfterSavedToPhoto), removeAfterFailedToSavePhoto(removeAfterFailedToSavePhoto), removeAfterSavedToDocuments(removeAfterSavedToDocuments), removeAfterFailedToSaveDocuments(removeAfterFailedToSaveDocuments), removeAfterShared(removeAfterShared), removeAfterFailedToShare(removeAfterFailedToShare), autoplay(autoplay), jumpToPositionOnLoad(jumpToPositionOnLoad), closeWhenFinish(closeWhenFinish), enableCancelTrimming(enableCancelTrimming), cancelTrimmingButtonText(cancelTrimmingButtonText), enableCancelTrimmingDialog(enableCancelTrimmingDialog), cancelTrimmingDialogTitle(cancelTrimmingDialogTitle), cancelTrimmingDialogMessage(cancelTrimmingDialogMessage), cancelTrimmingDialogCancelText(cancelTrimmingDialogCancelText), cancelTrimmingDialogConfirmText(cancelTrimmingDialogConfirmText), headerText(headerText), headerTextSize(headerTextSize), headerTextColor(headerTextColor), alertOnFailToLoad(alertOnFailToLoad), alertOnFailTitle(alertOnFailTitle), alertOnFailMessage(alertOnFailMessage), alertOnFailCloseText(alertOnFailCloseText) {}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
} // namespace margelo::nitro::videotrim
|
|
84
|
+
|
|
85
|
+
namespace margelo::nitro {
|
|
86
|
+
|
|
87
|
+
using namespace margelo::nitro::videotrim;
|
|
88
|
+
|
|
89
|
+
// C++ EditorConfig <> JS EditorConfig (object)
|
|
90
|
+
template <>
|
|
91
|
+
struct JSIConverter<EditorConfig> final {
|
|
92
|
+
static inline EditorConfig fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
93
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
94
|
+
return EditorConfig(
|
|
95
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "enableHapticFeedback")),
|
|
96
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "saveToPhoto")),
|
|
97
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "maxDuration")),
|
|
98
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "minDuration")),
|
|
99
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelButtonText")),
|
|
100
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "saveButtonText")),
|
|
101
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "enableCancelDialog")),
|
|
102
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelDialogTitle")),
|
|
103
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelDialogMessage")),
|
|
104
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelDialogCancelText")),
|
|
105
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelDialogConfirmText")),
|
|
106
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "enableSaveDialog")),
|
|
107
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "saveDialogTitle")),
|
|
108
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "saveDialogMessage")),
|
|
109
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "saveDialogCancelText")),
|
|
110
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "saveDialogConfirmText")),
|
|
111
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "trimmingText")),
|
|
112
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "fullScreenModalIOS")),
|
|
113
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "type")),
|
|
114
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "outputExt")),
|
|
115
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "openDocumentsOnFinish")),
|
|
116
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "openShareSheetOnFinish")),
|
|
117
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "removeAfterSavedToPhoto")),
|
|
118
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "removeAfterFailedToSavePhoto")),
|
|
119
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "removeAfterSavedToDocuments")),
|
|
120
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "removeAfterFailedToSaveDocuments")),
|
|
121
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "removeAfterShared")),
|
|
122
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "removeAfterFailedToShare")),
|
|
123
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "autoplay")),
|
|
124
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "jumpToPositionOnLoad")),
|
|
125
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "closeWhenFinish")),
|
|
126
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "enableCancelTrimming")),
|
|
127
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelTrimmingButtonText")),
|
|
128
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "enableCancelTrimmingDialog")),
|
|
129
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelTrimmingDialogTitle")),
|
|
130
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelTrimmingDialogMessage")),
|
|
131
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelTrimmingDialogCancelText")),
|
|
132
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "cancelTrimmingDialogConfirmText")),
|
|
133
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "headerText")),
|
|
134
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "headerTextSize")),
|
|
135
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "headerTextColor")),
|
|
136
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "alertOnFailToLoad")),
|
|
137
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "alertOnFailTitle")),
|
|
138
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "alertOnFailMessage")),
|
|
139
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "alertOnFailCloseText"))
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const EditorConfig& arg) {
|
|
143
|
+
jsi::Object obj(runtime);
|
|
144
|
+
obj.setProperty(runtime, "enableHapticFeedback", JSIConverter<bool>::toJSI(runtime, arg.enableHapticFeedback));
|
|
145
|
+
obj.setProperty(runtime, "saveToPhoto", JSIConverter<bool>::toJSI(runtime, arg.saveToPhoto));
|
|
146
|
+
obj.setProperty(runtime, "maxDuration", JSIConverter<double>::toJSI(runtime, arg.maxDuration));
|
|
147
|
+
obj.setProperty(runtime, "minDuration", JSIConverter<double>::toJSI(runtime, arg.minDuration));
|
|
148
|
+
obj.setProperty(runtime, "cancelButtonText", JSIConverter<std::string>::toJSI(runtime, arg.cancelButtonText));
|
|
149
|
+
obj.setProperty(runtime, "saveButtonText", JSIConverter<std::string>::toJSI(runtime, arg.saveButtonText));
|
|
150
|
+
obj.setProperty(runtime, "enableCancelDialog", JSIConverter<bool>::toJSI(runtime, arg.enableCancelDialog));
|
|
151
|
+
obj.setProperty(runtime, "cancelDialogTitle", JSIConverter<std::string>::toJSI(runtime, arg.cancelDialogTitle));
|
|
152
|
+
obj.setProperty(runtime, "cancelDialogMessage", JSIConverter<std::string>::toJSI(runtime, arg.cancelDialogMessage));
|
|
153
|
+
obj.setProperty(runtime, "cancelDialogCancelText", JSIConverter<std::string>::toJSI(runtime, arg.cancelDialogCancelText));
|
|
154
|
+
obj.setProperty(runtime, "cancelDialogConfirmText", JSIConverter<std::string>::toJSI(runtime, arg.cancelDialogConfirmText));
|
|
155
|
+
obj.setProperty(runtime, "enableSaveDialog", JSIConverter<bool>::toJSI(runtime, arg.enableSaveDialog));
|
|
156
|
+
obj.setProperty(runtime, "saveDialogTitle", JSIConverter<std::string>::toJSI(runtime, arg.saveDialogTitle));
|
|
157
|
+
obj.setProperty(runtime, "saveDialogMessage", JSIConverter<std::string>::toJSI(runtime, arg.saveDialogMessage));
|
|
158
|
+
obj.setProperty(runtime, "saveDialogCancelText", JSIConverter<std::string>::toJSI(runtime, arg.saveDialogCancelText));
|
|
159
|
+
obj.setProperty(runtime, "saveDialogConfirmText", JSIConverter<std::string>::toJSI(runtime, arg.saveDialogConfirmText));
|
|
160
|
+
obj.setProperty(runtime, "trimmingText", JSIConverter<std::string>::toJSI(runtime, arg.trimmingText));
|
|
161
|
+
obj.setProperty(runtime, "fullScreenModalIOS", JSIConverter<bool>::toJSI(runtime, arg.fullScreenModalIOS));
|
|
162
|
+
obj.setProperty(runtime, "type", JSIConverter<std::string>::toJSI(runtime, arg.type));
|
|
163
|
+
obj.setProperty(runtime, "outputExt", JSIConverter<std::string>::toJSI(runtime, arg.outputExt));
|
|
164
|
+
obj.setProperty(runtime, "openDocumentsOnFinish", JSIConverter<bool>::toJSI(runtime, arg.openDocumentsOnFinish));
|
|
165
|
+
obj.setProperty(runtime, "openShareSheetOnFinish", JSIConverter<bool>::toJSI(runtime, arg.openShareSheetOnFinish));
|
|
166
|
+
obj.setProperty(runtime, "removeAfterSavedToPhoto", JSIConverter<bool>::toJSI(runtime, arg.removeAfterSavedToPhoto));
|
|
167
|
+
obj.setProperty(runtime, "removeAfterFailedToSavePhoto", JSIConverter<bool>::toJSI(runtime, arg.removeAfterFailedToSavePhoto));
|
|
168
|
+
obj.setProperty(runtime, "removeAfterSavedToDocuments", JSIConverter<bool>::toJSI(runtime, arg.removeAfterSavedToDocuments));
|
|
169
|
+
obj.setProperty(runtime, "removeAfterFailedToSaveDocuments", JSIConverter<bool>::toJSI(runtime, arg.removeAfterFailedToSaveDocuments));
|
|
170
|
+
obj.setProperty(runtime, "removeAfterShared", JSIConverter<bool>::toJSI(runtime, arg.removeAfterShared));
|
|
171
|
+
obj.setProperty(runtime, "removeAfterFailedToShare", JSIConverter<bool>::toJSI(runtime, arg.removeAfterFailedToShare));
|
|
172
|
+
obj.setProperty(runtime, "autoplay", JSIConverter<bool>::toJSI(runtime, arg.autoplay));
|
|
173
|
+
obj.setProperty(runtime, "jumpToPositionOnLoad", JSIConverter<double>::toJSI(runtime, arg.jumpToPositionOnLoad));
|
|
174
|
+
obj.setProperty(runtime, "closeWhenFinish", JSIConverter<bool>::toJSI(runtime, arg.closeWhenFinish));
|
|
175
|
+
obj.setProperty(runtime, "enableCancelTrimming", JSIConverter<bool>::toJSI(runtime, arg.enableCancelTrimming));
|
|
176
|
+
obj.setProperty(runtime, "cancelTrimmingButtonText", JSIConverter<std::string>::toJSI(runtime, arg.cancelTrimmingButtonText));
|
|
177
|
+
obj.setProperty(runtime, "enableCancelTrimmingDialog", JSIConverter<bool>::toJSI(runtime, arg.enableCancelTrimmingDialog));
|
|
178
|
+
obj.setProperty(runtime, "cancelTrimmingDialogTitle", JSIConverter<std::string>::toJSI(runtime, arg.cancelTrimmingDialogTitle));
|
|
179
|
+
obj.setProperty(runtime, "cancelTrimmingDialogMessage", JSIConverter<std::string>::toJSI(runtime, arg.cancelTrimmingDialogMessage));
|
|
180
|
+
obj.setProperty(runtime, "cancelTrimmingDialogCancelText", JSIConverter<std::string>::toJSI(runtime, arg.cancelTrimmingDialogCancelText));
|
|
181
|
+
obj.setProperty(runtime, "cancelTrimmingDialogConfirmText", JSIConverter<std::string>::toJSI(runtime, arg.cancelTrimmingDialogConfirmText));
|
|
182
|
+
obj.setProperty(runtime, "headerText", JSIConverter<std::string>::toJSI(runtime, arg.headerText));
|
|
183
|
+
obj.setProperty(runtime, "headerTextSize", JSIConverter<double>::toJSI(runtime, arg.headerTextSize));
|
|
184
|
+
obj.setProperty(runtime, "headerTextColor", JSIConverter<double>::toJSI(runtime, arg.headerTextColor));
|
|
185
|
+
obj.setProperty(runtime, "alertOnFailToLoad", JSIConverter<bool>::toJSI(runtime, arg.alertOnFailToLoad));
|
|
186
|
+
obj.setProperty(runtime, "alertOnFailTitle", JSIConverter<std::string>::toJSI(runtime, arg.alertOnFailTitle));
|
|
187
|
+
obj.setProperty(runtime, "alertOnFailMessage", JSIConverter<std::string>::toJSI(runtime, arg.alertOnFailMessage));
|
|
188
|
+
obj.setProperty(runtime, "alertOnFailCloseText", JSIConverter<std::string>::toJSI(runtime, arg.alertOnFailCloseText));
|
|
189
|
+
return obj;
|
|
190
|
+
}
|
|
191
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
192
|
+
if (!value.isObject()) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
jsi::Object obj = value.getObject(runtime);
|
|
196
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "enableHapticFeedback"))) return false;
|
|
197
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "saveToPhoto"))) return false;
|
|
198
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "maxDuration"))) return false;
|
|
199
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "minDuration"))) return false;
|
|
200
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelButtonText"))) return false;
|
|
201
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "saveButtonText"))) return false;
|
|
202
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "enableCancelDialog"))) return false;
|
|
203
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelDialogTitle"))) return false;
|
|
204
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelDialogMessage"))) return false;
|
|
205
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelDialogCancelText"))) return false;
|
|
206
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelDialogConfirmText"))) return false;
|
|
207
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "enableSaveDialog"))) return false;
|
|
208
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "saveDialogTitle"))) return false;
|
|
209
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "saveDialogMessage"))) return false;
|
|
210
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "saveDialogCancelText"))) return false;
|
|
211
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "saveDialogConfirmText"))) return false;
|
|
212
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "trimmingText"))) return false;
|
|
213
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "fullScreenModalIOS"))) return false;
|
|
214
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "type"))) return false;
|
|
215
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "outputExt"))) return false;
|
|
216
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "openDocumentsOnFinish"))) return false;
|
|
217
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "openShareSheetOnFinish"))) return false;
|
|
218
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "removeAfterSavedToPhoto"))) return false;
|
|
219
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "removeAfterFailedToSavePhoto"))) return false;
|
|
220
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "removeAfterSavedToDocuments"))) return false;
|
|
221
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "removeAfterFailedToSaveDocuments"))) return false;
|
|
222
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "removeAfterShared"))) return false;
|
|
223
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "removeAfterFailedToShare"))) return false;
|
|
224
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "autoplay"))) return false;
|
|
225
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "jumpToPositionOnLoad"))) return false;
|
|
226
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "closeWhenFinish"))) return false;
|
|
227
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "enableCancelTrimming"))) return false;
|
|
228
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelTrimmingButtonText"))) return false;
|
|
229
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "enableCancelTrimmingDialog"))) return false;
|
|
230
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelTrimmingDialogTitle"))) return false;
|
|
231
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelTrimmingDialogMessage"))) return false;
|
|
232
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelTrimmingDialogCancelText"))) return false;
|
|
233
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "cancelTrimmingDialogConfirmText"))) return false;
|
|
234
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "headerText"))) return false;
|
|
235
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "headerTextSize"))) return false;
|
|
236
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "headerTextColor"))) return false;
|
|
237
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "alertOnFailToLoad"))) return false;
|
|
238
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "alertOnFailTitle"))) return false;
|
|
239
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "alertOnFailMessage"))) return false;
|
|
240
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "alertOnFailCloseText"))) return false;
|
|
241
|
+
return true;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FileValidationResult.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#include <string>
|
|
24
|
+
|
|
25
|
+
namespace margelo::nitro::videotrim {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A struct which can be represented as a JavaScript object (FileValidationResult).
|
|
29
|
+
*/
|
|
30
|
+
struct FileValidationResult {
|
|
31
|
+
public:
|
|
32
|
+
bool isValid SWIFT_PRIVATE;
|
|
33
|
+
std::string fileType SWIFT_PRIVATE;
|
|
34
|
+
double duration SWIFT_PRIVATE;
|
|
35
|
+
|
|
36
|
+
public:
|
|
37
|
+
FileValidationResult() = default;
|
|
38
|
+
explicit FileValidationResult(bool isValid, std::string fileType, double duration): isValid(isValid), fileType(fileType), duration(duration) {}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
} // namespace margelo::nitro::videotrim
|
|
42
|
+
|
|
43
|
+
namespace margelo::nitro {
|
|
44
|
+
|
|
45
|
+
using namespace margelo::nitro::videotrim;
|
|
46
|
+
|
|
47
|
+
// C++ FileValidationResult <> JS FileValidationResult (object)
|
|
48
|
+
template <>
|
|
49
|
+
struct JSIConverter<FileValidationResult> final {
|
|
50
|
+
static inline FileValidationResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
51
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
52
|
+
return FileValidationResult(
|
|
53
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "isValid")),
|
|
54
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "fileType")),
|
|
55
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "duration"))
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const FileValidationResult& arg) {
|
|
59
|
+
jsi::Object obj(runtime);
|
|
60
|
+
obj.setProperty(runtime, "isValid", JSIConverter<bool>::toJSI(runtime, arg.isValid));
|
|
61
|
+
obj.setProperty(runtime, "fileType", JSIConverter<std::string>::toJSI(runtime, arg.fileType));
|
|
62
|
+
obj.setProperty(runtime, "duration", JSIConverter<double>::toJSI(runtime, arg.duration));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "isValid"))) return false;
|
|
71
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "fileType"))) return false;
|
|
72
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "duration"))) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridVideoTrimSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridVideoTrimSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::videotrim {
|
|
11
|
+
|
|
12
|
+
void HybridVideoTrimSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridMethod("showEditor", &HybridVideoTrimSpec::showEditor);
|
|
18
|
+
prototype.registerHybridMethod("listFiles", &HybridVideoTrimSpec::listFiles);
|
|
19
|
+
prototype.registerHybridMethod("cleanFiles", &HybridVideoTrimSpec::cleanFiles);
|
|
20
|
+
prototype.registerHybridMethod("deleteFile", &HybridVideoTrimSpec::deleteFile);
|
|
21
|
+
prototype.registerHybridMethod("closeEditor", &HybridVideoTrimSpec::closeEditor);
|
|
22
|
+
prototype.registerHybridMethod("isValidFile", &HybridVideoTrimSpec::isValidFile);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
} // namespace margelo::nitro::videotrim
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridVideoTrimSpec.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/HybridObject.hpp>)
|
|
11
|
+
#include <NitroModules/HybridObject.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
// Forward declaration of `EditorConfig` to properly resolve imports.
|
|
17
|
+
namespace margelo::nitro::videotrim { struct EditorConfig; }
|
|
18
|
+
// Forward declaration of `FileValidationResult` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::videotrim { struct FileValidationResult; }
|
|
20
|
+
|
|
21
|
+
#include <string>
|
|
22
|
+
#include "EditorConfig.hpp"
|
|
23
|
+
#include <functional>
|
|
24
|
+
#include <unordered_map>
|
|
25
|
+
#include <NitroModules/Promise.hpp>
|
|
26
|
+
#include <vector>
|
|
27
|
+
#include "FileValidationResult.hpp"
|
|
28
|
+
|
|
29
|
+
namespace margelo::nitro::videotrim {
|
|
30
|
+
|
|
31
|
+
using namespace margelo::nitro;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* An abstract base class for `VideoTrim`
|
|
35
|
+
* Inherit this class to create instances of `HybridVideoTrimSpec` in C++.
|
|
36
|
+
* You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
|
|
37
|
+
* @example
|
|
38
|
+
* ```cpp
|
|
39
|
+
* class HybridVideoTrim: public HybridVideoTrimSpec {
|
|
40
|
+
* public:
|
|
41
|
+
* HybridVideoTrim(...): HybridObject(TAG) { ... }
|
|
42
|
+
* // ...
|
|
43
|
+
* };
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
class HybridVideoTrimSpec: public virtual HybridObject {
|
|
47
|
+
public:
|
|
48
|
+
// Constructor
|
|
49
|
+
explicit HybridVideoTrimSpec(): HybridObject(TAG) { }
|
|
50
|
+
|
|
51
|
+
// Destructor
|
|
52
|
+
~HybridVideoTrimSpec() override = default;
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
// Properties
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
// Methods
|
|
60
|
+
virtual void showEditor(const std::string& filePath, const EditorConfig& config, const std::function<void(const std::string& /* eventName */, const std::unordered_map<std::string, std::string>& /* payload */)>& onEvent) = 0;
|
|
61
|
+
virtual std::shared_ptr<Promise<std::vector<std::string>>> listFiles() = 0;
|
|
62
|
+
virtual std::shared_ptr<Promise<double>> cleanFiles() = 0;
|
|
63
|
+
virtual std::shared_ptr<Promise<bool>> deleteFile(const std::string& filePath) = 0;
|
|
64
|
+
virtual void closeEditor(const std::function<void()>& onComplete) = 0;
|
|
65
|
+
virtual std::shared_ptr<Promise<FileValidationResult>> isValidFile(const std::string& url) = 0;
|
|
66
|
+
|
|
67
|
+
protected:
|
|
68
|
+
// Hybrid Setup
|
|
69
|
+
void loadHybridMethods() override;
|
|
70
|
+
|
|
71
|
+
protected:
|
|
72
|
+
// Tag for logging
|
|
73
|
+
static constexpr auto TAG = "VideoTrim";
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro::videotrim
|
package/package.json
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-video-trim",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Video trimmer for your React Native app",
|
|
5
|
-
"main": "lib/
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
10
15
|
"files": [
|
|
11
16
|
"src",
|
|
12
17
|
"lib",
|
|
13
18
|
"android",
|
|
14
19
|
"ios",
|
|
15
20
|
"cpp",
|
|
21
|
+
"nitrogen",
|
|
16
22
|
"*.podspec",
|
|
17
|
-
"
|
|
23
|
+
"react-native.config.js",
|
|
18
24
|
"!ios/build",
|
|
19
25
|
"!android/build",
|
|
20
26
|
"!android/gradle",
|
|
@@ -27,24 +33,25 @@
|
|
|
27
33
|
"!**/.*"
|
|
28
34
|
],
|
|
29
35
|
"scripts": {
|
|
36
|
+
"example": "yarn workspace react-native-video-trim-example",
|
|
30
37
|
"test": "jest",
|
|
31
|
-
"typecheck": "tsc
|
|
38
|
+
"typecheck": "tsc",
|
|
32
39
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"build:ios": "cd example/ios && xcodebuild -workspace VideoTrimExample.xcworkspace -scheme VideoTrimExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO",
|
|
38
|
-
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
39
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build"
|
|
40
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
41
|
+
"prepare": "bob build",
|
|
42
|
+
"nitrogen": "nitro-codegen",
|
|
43
|
+
"release": "release-it --only-version"
|
|
40
44
|
},
|
|
41
45
|
"keywords": [
|
|
42
46
|
"react-native",
|
|
43
47
|
"ios",
|
|
44
48
|
"android"
|
|
45
49
|
],
|
|
46
|
-
"repository":
|
|
47
|
-
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/maitrungduc1410/react-native-video-trim.git"
|
|
53
|
+
},
|
|
54
|
+
"author": "Duc Trung Mai <maitrungduc1410@gmail.com> (https://github.com/maitrungduc1410)",
|
|
48
55
|
"license": "MIT",
|
|
49
56
|
"bugs": {
|
|
50
57
|
"url": "https://github.com/maitrungduc1410/react-native-video-trim/issues"
|
|
@@ -54,38 +61,41 @@
|
|
|
54
61
|
"registry": "https://registry.npmjs.org/"
|
|
55
62
|
},
|
|
56
63
|
"devDependencies": {
|
|
57
|
-
"@commitlint/config-conventional": "^
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@
|
|
61
|
-
"@
|
|
62
|
-
"@
|
|
63
|
-
"@
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"prettier": "^2.
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
64
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
65
|
+
"@eslint/compat": "^1.2.7",
|
|
66
|
+
"@eslint/eslintrc": "^3.3.0",
|
|
67
|
+
"@eslint/js": "^9.22.0",
|
|
68
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
69
|
+
"@react-native/babel-preset": "0.79.2",
|
|
70
|
+
"@react-native/eslint-config": "^0.78.0",
|
|
71
|
+
"@release-it/conventional-changelog": "^9.0.2",
|
|
72
|
+
"@types/jest": "^29.5.5",
|
|
73
|
+
"@types/react": "^19.0.0",
|
|
74
|
+
"commitlint": "^19.6.1",
|
|
75
|
+
"del-cli": "^5.1.0",
|
|
76
|
+
"eslint": "^9.22.0",
|
|
77
|
+
"eslint-config-prettier": "^10.1.1",
|
|
78
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
79
|
+
"jest": "^29.7.0",
|
|
80
|
+
"nitro-codegen": "^0.25.2",
|
|
81
|
+
"prettier": "^3.0.3",
|
|
82
|
+
"react": "19.0.0",
|
|
83
|
+
"react-native": "0.79.2",
|
|
84
|
+
"react-native-builder-bob": "^0.40.11",
|
|
85
|
+
"react-native-nitro-modules": "^0.25.2",
|
|
86
|
+
"release-it": "^17.10.0",
|
|
76
87
|
"turbo": "^1.10.7",
|
|
77
|
-
"typescript": "^5.
|
|
78
|
-
},
|
|
79
|
-
"resolutions": {
|
|
80
|
-
"@types/react": "17.0.21"
|
|
88
|
+
"typescript": "^5.8.3"
|
|
81
89
|
},
|
|
82
90
|
"peerDependencies": {
|
|
83
91
|
"react": "*",
|
|
84
|
-
"react-native": "*"
|
|
85
|
-
|
|
86
|
-
"engines": {
|
|
87
|
-
"node": ">= 16.0.0"
|
|
92
|
+
"react-native": "*",
|
|
93
|
+
"react-native-nitro-modules": "^0.25.2"
|
|
88
94
|
},
|
|
95
|
+
"workspaces": [
|
|
96
|
+
"example"
|
|
97
|
+
],
|
|
98
|
+
"packageManager": "yarn@3.6.1",
|
|
89
99
|
"jest": {
|
|
90
100
|
"preset": "react-native",
|
|
91
101
|
"modulePathIgnorePatterns": [
|
|
@@ -111,33 +121,12 @@
|
|
|
111
121
|
},
|
|
112
122
|
"plugins": {
|
|
113
123
|
"@release-it/conventional-changelog": {
|
|
114
|
-
"preset":
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"eslintConfig": {
|
|
119
|
-
"root": true,
|
|
120
|
-
"extends": [
|
|
121
|
-
"@react-native-community",
|
|
122
|
-
"prettier"
|
|
123
|
-
],
|
|
124
|
-
"rules": {
|
|
125
|
-
"prettier/prettier": [
|
|
126
|
-
"error",
|
|
127
|
-
{
|
|
128
|
-
"quoteProps": "consistent",
|
|
129
|
-
"singleQuote": true,
|
|
130
|
-
"tabWidth": 2,
|
|
131
|
-
"trailingComma": "es5",
|
|
132
|
-
"useTabs": false
|
|
124
|
+
"preset": {
|
|
125
|
+
"name": "angular"
|
|
133
126
|
}
|
|
134
|
-
|
|
127
|
+
}
|
|
135
128
|
}
|
|
136
129
|
},
|
|
137
|
-
"eslintIgnore": [
|
|
138
|
-
"node_modules/",
|
|
139
|
-
"lib/"
|
|
140
|
-
],
|
|
141
130
|
"prettier": {
|
|
142
131
|
"quoteProps": "consistent",
|
|
143
132
|
"singleQuote": true,
|
|
@@ -149,8 +138,19 @@
|
|
|
149
138
|
"source": "src",
|
|
150
139
|
"output": "lib",
|
|
151
140
|
"targets": [
|
|
152
|
-
|
|
153
|
-
|
|
141
|
+
[
|
|
142
|
+
"custom",
|
|
143
|
+
{
|
|
144
|
+
"script": "nitrogen",
|
|
145
|
+
"clean": "nitrogen/"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
"module",
|
|
150
|
+
{
|
|
151
|
+
"esm": true
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
154
|
[
|
|
155
155
|
"typescript",
|
|
156
156
|
{
|
|
@@ -159,5 +159,9 @@
|
|
|
159
159
|
]
|
|
160
160
|
]
|
|
161
161
|
},
|
|
162
|
-
"
|
|
162
|
+
"create-react-native-library": {
|
|
163
|
+
"languages": "kotlin-swift",
|
|
164
|
+
"type": "nitro-module",
|
|
165
|
+
"version": "0.50.3"
|
|
166
|
+
}
|
|
163
167
|
}
|