@umituz/react-native-video-editor 1.1.69 → 1.1.71

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.69",
3
+ "version": "1.1.71",
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",
@@ -49,9 +49,6 @@
49
49
  "peerDependenciesMeta": {
50
50
  "react-native-gesture-handler": {
51
51
  "optional": true
52
- },
53
- "react-native-reanimated": {
54
- "optional": true
55
52
  }
56
53
  },
57
54
  "devDependencies": {
@@ -126,11 +126,17 @@ export class EditorService {
126
126
  errors.push("Layer type is required");
127
127
  }
128
128
 
129
- if (layer.type === "image" && !(layer as any).uri) {
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.type === "text" && !(layer as any).content) {
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 as any} size="sm" color={button.destructive ? "error" : "primary"} />
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>