@umituz/react-native-video-editor 1.1.68 → 1.1.70
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-video-editor",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.70",
|
|
4
4
|
"description": "Professional video editor with layer-based timeline, text/image/shape/audio/animation layers, and export functionality",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -126,11 +126,17 @@ export class EditorService {
|
|
|
126
126
|
errors.push("Layer type is required");
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
// Type guards for layer-specific properties
|
|
130
|
+
const isImageLayer = (l: Partial<Layer>): l is Partial<ImageLayer> =>
|
|
131
|
+
l.type === "image";
|
|
132
|
+
const isTextLayer = (l: Partial<Layer>): l is Partial<TextLayer> =>
|
|
133
|
+
l.type === "text";
|
|
134
|
+
|
|
135
|
+
if (isImageLayer(layer) && !layer.uri) {
|
|
130
136
|
errors.push("Image layer requires URI");
|
|
131
137
|
}
|
|
132
138
|
|
|
133
|
-
if (layer
|
|
139
|
+
if (isTextLayer(layer) && !layer.content) {
|
|
134
140
|
errors.push("Text layer requires content");
|
|
135
141
|
}
|
|
136
142
|
|
|
@@ -41,7 +41,7 @@ const ToolbarButtonComp = React.memo<{ button: ToolbarButton; styles: any }>(({
|
|
|
41
41
|
accessibilityRole="button"
|
|
42
42
|
accessibilityLabel={button.label}
|
|
43
43
|
>
|
|
44
|
-
<AtomicIcon name={button.icon
|
|
44
|
+
<AtomicIcon name={button.icon} size="sm" color={button.destructive ? "error" : "primary"} />
|
|
45
45
|
<AtomicText type="labelSmall" style={styles.label}>{button.label}</AtomicText>
|
|
46
46
|
{button.showBadge && <View style={[styles.badge, { backgroundColor: button.badgeColor }]}><AtomicText style={styles.badgeText}>!</AtomicText></View>}
|
|
47
47
|
</TouchableOpacity>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { useState, useRef, useCallback, useEffect } from "react";
|
|
8
8
|
import { Gesture } from "react-native-gesture-handler";
|
|
9
|
+
// @ts-ignore - react-native-reanimated is an optional peer dependency
|
|
9
10
|
import { runOnJS } from "react-native-reanimated";
|
|
10
11
|
|
|
11
12
|
interface UseDraggableLayerGesturesParams {
|