react-native-pdf-jsi 3.4.0 → 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.
Files changed (40) hide show
  1. package/README.md +32 -1
  2. package/android/.gradle/5.6.1/fileChanges/last-build.bin +0 -0
  3. package/android/.gradle/5.6.1/fileHashes/fileHashes.lock +0 -0
  4. package/android/.gradle/5.6.1/gc.properties +0 -0
  5. package/android/.gradle/8.5/checksums/checksums.lock +0 -0
  6. package/android/.gradle/8.5/checksums/md5-checksums.bin +0 -0
  7. package/android/.gradle/8.5/checksums/sha1-checksums.bin +0 -0
  8. package/android/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  9. package/android/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
  10. package/android/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
  11. package/android/.gradle/8.5/fileChanges/last-build.bin +0 -0
  12. package/android/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  13. package/android/.gradle/8.5/gc.properties +0 -0
  14. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  15. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  16. package/android/.gradle/vcs-1/gc.properties +0 -0
  17. package/android/src/main/java/org/wonday/pdf/PdfManager.java +5 -0
  18. package/fabric/RNPDFPdfNativeComponent.js +4 -3
  19. package/index.d.ts +24 -2
  20. package/ios/PERMISSIONS.md +106 -0
  21. package/ios/RNPDFPdf/FileDownloader.h +15 -0
  22. package/ios/RNPDFPdf/FileDownloader.m +567 -0
  23. package/ios/RNPDFPdf/FileManager.h +12 -0
  24. package/ios/RNPDFPdf/FileManager.m +201 -0
  25. package/ios/RNPDFPdf/ImagePool.h +61 -0
  26. package/ios/RNPDFPdf/ImagePool.m +162 -0
  27. package/ios/RNPDFPdf/LazyMetadataLoader.h +78 -0
  28. package/ios/RNPDFPdf/LazyMetadataLoader.m +184 -0
  29. package/ios/RNPDFPdf/MemoryMappedCache.h +71 -0
  30. package/ios/RNPDFPdf/MemoryMappedCache.m +264 -0
  31. package/ios/RNPDFPdf/PDFExporter.h +1 -1
  32. package/ios/RNPDFPdf/PDFExporter.m +475 -19
  33. package/ios/RNPDFPdf/PDFNativeCacheManager.h +11 -1
  34. package/ios/RNPDFPdf/PDFNativeCacheManager.m +283 -19
  35. package/ios/RNPDFPdf/RNPDFPdfView.h +19 -1
  36. package/ios/RNPDFPdf/RNPDFPdfView.mm +154 -44
  37. package/ios/RNPDFPdf/StreamingPDFProcessor.h +86 -0
  38. package/ios/RNPDFPdf/StreamingPDFProcessor.m +314 -0
  39. package/package.json +5 -3
  40. package/src/managers/ExportManager.js +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-pdf-jsi",
3
- "version": "3.4.0",
3
+ "version": "4.0.0",
4
4
  "summary": "High-performance React Native PDF viewer with JSI acceleration - up to 80x faster than traditional bridge",
5
5
  "description": "🚀 Ultra-fast React Native PDF viewer with JSI (JavaScript Interface) integration for maximum performance. Features lazy loading, smart caching, progressive loading, and zero-bridge overhead operations. Perfect for large PDF files with 30-day persistent cache and advanced memory optimization. Google Play 16KB page size compliant for Android 15+. Supports iOS, Android, and Windows platforms.",
6
6
  "main": "index.js",
@@ -65,7 +65,7 @@
65
65
  "dependencies": {
66
66
  "crypto-js": "4.2.0",
67
67
  "deprecated-react-native-prop-types": "^2.3.0",
68
- "react-native-pdf-jsi": "^2.2.8"
68
+ "react-native-pdf-jsi": "^2.2.4"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@babel/core": "^7.20.2",
@@ -106,7 +106,9 @@
106
106
  "javaPackageName": "org.wonday.pdf"
107
107
  },
108
108
  "ios": {
109
- "componentProvider": "RNPDFPdfView"
109
+ "componentProvider": {
110
+ "RNPDFPdfView": "RNPDFPdfView"
111
+ }
110
112
  }
111
113
  }
112
114
  }
@@ -292,14 +292,13 @@ export class ExportManager {
292
292
  * Split PDF into multiple files
293
293
  * @param {string} filePath - Path to PDF file
294
294
  * @param {Array} ranges - Flat array of page range pairs [start1, end1, start2, end2, ...]
295
- * @param {string} outputDir - Output directory
295
+ * @param {string} outputDir - Output directory (deprecated, not used)
296
296
  * @returns {Promise<Array>} Array of split PDF paths
297
297
  */
298
298
  async splitPDF(filePath, ranges, outputDir = null) {
299
299
  console.log(`✂️ [ExportManager] splitPDF - START`, {
300
300
  filePath,
301
301
  ranges,
302
- outputDir,
303
302
  rangeCount: ranges.length
304
303
  });
305
304
 
@@ -309,7 +308,14 @@ export class ExportManager {
309
308
  console.log('📱 [ExportManager] Calling native PDFExporter.splitPDF...');
310
309
  console.log('📱 [ExportManager] Ranges:', JSON.stringify(ranges));
311
310
 
312
- const splitPaths = await PDFExporter.splitPDF(filePath, ranges, outputDir);
311
+ // Android requires 3 arguments (filePath, ranges, outputDir)
312
+ // iOS only requires 2 arguments (filePath, ranges)
313
+ let splitPaths;
314
+ if (Platform.OS === 'android') {
315
+ splitPaths = await PDFExporter.splitPDF(filePath, ranges, null);
316
+ } else {
317
+ splitPaths = await PDFExporter.splitPDF(filePath, ranges);
318
+ }
313
319
 
314
320
  console.log(`✅ [ExportManager] splitPDF - SUCCESS - Split into ${splitPaths.length} files`);
315
321
  console.log('📁 [ExportManager] Split files:', splitPaths);