@umituz/react-native-video-editor 1.0.21 → 1.0.22

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,9 +1,13 @@
1
1
  {
2
2
  "name": "@umituz/react-native-video-editor",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
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",
7
+ "exports": {
8
+ ".": "./src/index.ts",
9
+ "./player": "./src/player/index.ts"
10
+ },
7
11
  "scripts": {
8
12
  "typecheck": "npx tsc --noEmit",
9
13
  "lint": "echo 'Lint passed'",
@@ -5,7 +5,13 @@
5
5
 
6
6
  import React, { useCallback } from "react";
7
7
  import { View, ScrollView, StyleSheet, Alert } from "react-native";
8
- import * as DocumentPicker from "expo-document-picker";
8
+ // Safe import for expo-document-picker
9
+ let DocumentPicker: any;
10
+ try {
11
+ DocumentPicker = require("expo-document-picker");
12
+ } catch (e) {
13
+ // Graceful fail - DocumentPicker will be undefined
14
+ }
9
15
  import {
10
16
  AtomicText,
11
17
  useAppDesignTokens,
@@ -46,6 +52,10 @@ export const AudioEditor: React.FC<AudioEditorProps> = ({
46
52
  } = useAudioLayerForm(audio);
47
53
 
48
54
  const handlePickAudio = useCallback(async () => {
55
+ if (!DocumentPicker) {
56
+ Alert.alert("Error", "Audio picker is not available in this environment");
57
+ return;
58
+ }
49
59
  try {
50
60
  const result = await DocumentPicker.getDocumentAsync({
51
61
  type: AUDIO_FILE_TYPES[0],