react-native-pdf-jsi 1.0.1

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 (91) hide show
  1. package/DoubleTapView.js +125 -0
  2. package/INTEGRATION_GUIDE.md +419 -0
  3. package/LICENSE +21 -0
  4. package/PdfManager.js +26 -0
  5. package/PdfPageView.js +53 -0
  6. package/PdfView.js +421 -0
  7. package/PdfViewFlatList.js +30 -0
  8. package/PinchZoomView.js +125 -0
  9. package/README.md +693 -0
  10. package/README_JSI.md +348 -0
  11. package/android/.gradle/5.6.1/fileChanges/last-build.bin +0 -0
  12. package/android/.gradle/5.6.1/fileHashes/fileHashes.lock +0 -0
  13. package/android/.gradle/5.6.1/gc.properties +0 -0
  14. package/android/.gradle/8.5/checksums/checksums.lock +0 -0
  15. package/android/.gradle/8.5/checksums/md5-checksums.bin +0 -0
  16. package/android/.gradle/8.5/checksums/sha1-checksums.bin +0 -0
  17. package/android/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  18. package/android/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
  19. package/android/.gradle/8.5/executionHistory/executionHistory.lock +0 -0
  20. package/android/.gradle/8.5/fileChanges/last-build.bin +0 -0
  21. package/android/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  22. package/android/.gradle/8.5/gc.properties +0 -0
  23. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  24. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  25. package/android/.gradle/vcs-1/gc.properties +0 -0
  26. package/android/build.gradle +198 -0
  27. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  29. package/android/gradle.properties +2 -0
  30. package/android/gradlew +249 -0
  31. package/android/gradlew.bat +92 -0
  32. package/android/project.properties +12 -0
  33. package/android/src/main/AndroidManifest.xml +4 -0
  34. package/android/src/main/cpp/Android.mk +50 -0
  35. package/android/src/main/cpp/CMakeLists.txt +76 -0
  36. package/android/src/main/cpp/PDFJSI.cpp +190 -0
  37. package/android/src/main/cpp/PDFJSI.h +95 -0
  38. package/android/src/main/cpp/PDFJSIBridge.cpp +32 -0
  39. package/android/src/main/cpp/PDFJSIModule.cpp +31 -0
  40. package/android/src/main/java/org/wonday/pdf/EnhancedPdfJSIBridge.java +281 -0
  41. package/android/src/main/java/org/wonday/pdf/PDFJSIManager.java +317 -0
  42. package/android/src/main/java/org/wonday/pdf/PDFJSIModule.java +189 -0
  43. package/android/src/main/java/org/wonday/pdf/PdfManager.java +180 -0
  44. package/android/src/main/java/org/wonday/pdf/PdfView.java +505 -0
  45. package/android/src/main/java/org/wonday/pdf/RNPDFPackage.java +43 -0
  46. package/android/src/main/java/org/wonday/pdf/events/TopChangeEvent.java +26 -0
  47. package/android/src/main/jniLibs/arm64-v8a/libpdfjsi.so +0 -0
  48. package/android/src/main/jniLibs/armeabi-v7a/libpdfjsi.so +0 -0
  49. package/android/src/main/jniLibs/x86/libpdfjsi.so +0 -0
  50. package/android/src/main/jniLibs/x86_64/libpdfjsi.so +0 -0
  51. package/android/src/paper/java/com/facebook/react/viewmanagers/RNPDFPdfViewManagerDelegate.java +92 -0
  52. package/android/src/paper/java/com/facebook/react/viewmanagers/RNPDFPdfViewManagerInterface.java +35 -0
  53. package/fabric/RNPDFPdfNativeComponent.js +48 -0
  54. package/index.d.ts +72 -0
  55. package/index.js +603 -0
  56. package/index.js.flow +67 -0
  57. package/ios/RNPDFPdf/PdfManager.h +23 -0
  58. package/ios/RNPDFPdf/PdfManager.mm +152 -0
  59. package/ios/RNPDFPdf/RNPDFPdfPageView.h +21 -0
  60. package/ios/RNPDFPdf/RNPDFPdfPageView.mm +185 -0
  61. package/ios/RNPDFPdf/RNPDFPdfPageViewManager.h +18 -0
  62. package/ios/RNPDFPdf/RNPDFPdfPageViewManager.mm +30 -0
  63. package/ios/RNPDFPdf/RNPDFPdfView.h +63 -0
  64. package/ios/RNPDFPdf/RNPDFPdfView.mm +1092 -0
  65. package/ios/RNPDFPdf/RNPDFPdfViewManager.h +18 -0
  66. package/ios/RNPDFPdf/RNPDFPdfViewManager.mm +68 -0
  67. package/ios/RNPDFPdf.xcodeproj/project.pbxproj +321 -0
  68. package/package.json +78 -0
  69. package/react-native-pdf.podspec +31 -0
  70. package/src/EnhancedPdfView.js +362 -0
  71. package/src/PDFJSI.js +519 -0
  72. package/src/examples/PDFJSIExample.js +296 -0
  73. package/src/hooks/usePDFJSI.js +346 -0
  74. package/src/index.js +32 -0
  75. package/windows/RCTPdf/PropertySheet.props +16 -0
  76. package/windows/RCTPdf/RCTPdf.def +3 -0
  77. package/windows/RCTPdf/RCTPdf.vcxproj +180 -0
  78. package/windows/RCTPdf/RCTPdf.vcxproj.filters +38 -0
  79. package/windows/RCTPdf/RCTPdfControl.cpp +667 -0
  80. package/windows/RCTPdf/RCTPdfControl.h +119 -0
  81. package/windows/RCTPdf/RCTPdfControl.idl +10 -0
  82. package/windows/RCTPdf/RCTPdfControl.xaml +33 -0
  83. package/windows/RCTPdf/RCTPdfViewManager.cpp +69 -0
  84. package/windows/RCTPdf/RCTPdfViewManager.h +51 -0
  85. package/windows/RCTPdf/ReactPackageProvider.cpp +15 -0
  86. package/windows/RCTPdf/ReactPackageProvider.h +16 -0
  87. package/windows/RCTPdf/ReactPackageProvider.idl +9 -0
  88. package/windows/RCTPdf/packages.config +4 -0
  89. package/windows/RCTPdf/pch.cpp +1 -0
  90. package/windows/RCTPdf/pch.h +31 -0
  91. package/windows/README.md +21 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright (c) 2017-present, Wonday (@wonday.org)
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the MIT-style license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ #if __has_include(<React/RCTAssert.h>)
10
+ #import <React/RCTViewManager.h>
11
+ #else
12
+ #import "RCTViewManager.h"
13
+ #endif
14
+
15
+
16
+ @interface RNPDFPdfViewManager : RCTViewManager
17
+
18
+ @end
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Copyright (c) 2017-present, Wonday (@wonday.org)
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the MIT-style license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ #import "RNPDFPdfViewManager.h"
12
+ #import "RNPDFPdfView.h"
13
+
14
+
15
+ @implementation RNPDFPdfViewManager
16
+
17
+ RCT_EXPORT_MODULE()
18
+
19
+ - (UIView *)view
20
+ {
21
+ if([[[UIDevice currentDevice] systemVersion] compare:@"11.0" options:NSNumericSearch] == NSOrderedDescending
22
+ || [[[UIDevice currentDevice] systemVersion] compare:@"11.0" options:NSNumericSearch] == NSOrderedSame) {
23
+ return [[RNPDFPdfView alloc] initWithBridge:self.bridge];
24
+ } else {
25
+ return NULL;
26
+ }
27
+
28
+ }
29
+
30
+ RCT_EXPORT_VIEW_PROPERTY(path, NSString);
31
+ RCT_EXPORT_VIEW_PROPERTY(page, int);
32
+ RCT_EXPORT_VIEW_PROPERTY(scale, float);
33
+ RCT_EXPORT_VIEW_PROPERTY(minScale, float);
34
+ RCT_EXPORT_VIEW_PROPERTY(maxScale, float);
35
+ RCT_EXPORT_VIEW_PROPERTY(horizontal, BOOL);
36
+ RCT_EXPORT_VIEW_PROPERTY(showsHorizontalScrollIndicator, BOOL);
37
+ RCT_EXPORT_VIEW_PROPERTY(showsVerticalScrollIndicator, BOOL);
38
+ RCT_EXPORT_VIEW_PROPERTY(scrollEnabled, BOOL);
39
+ RCT_EXPORT_VIEW_PROPERTY(enablePaging, BOOL);
40
+ RCT_EXPORT_VIEW_PROPERTY(enableRTL, BOOL);
41
+ RCT_EXPORT_VIEW_PROPERTY(enableAnnotationRendering, BOOL);
42
+ RCT_EXPORT_VIEW_PROPERTY(enableDoubleTapZoom, BOOL);
43
+ RCT_EXPORT_VIEW_PROPERTY(fitPolicy, int);
44
+ RCT_EXPORT_VIEW_PROPERTY(spacing, int);
45
+ RCT_EXPORT_VIEW_PROPERTY(password, NSString);
46
+ RCT_EXPORT_VIEW_PROPERTY(onChange, RCTBubblingEventBlock);
47
+ RCT_EXPORT_VIEW_PROPERTY(singlePage, BOOL);
48
+
49
+ RCT_EXPORT_METHOD(supportPDFKit:(RCTResponseSenderBlock)callback)
50
+ {
51
+ if([[[UIDevice currentDevice] systemVersion] compare:@"11.0" options:NSNumericSearch] == NSOrderedDescending
52
+ || [[[UIDevice currentDevice] systemVersion] compare:@"11.0" options:NSNumericSearch] == NSOrderedSame) {
53
+ callback(@[@YES]);
54
+ } else {
55
+ callback(@[@NO]);
56
+ }
57
+
58
+ }
59
+
60
+ + (BOOL)requiresMainQueueSetup {
61
+ return YES;
62
+ }
63
+
64
+
65
+ - (void)dealloc{
66
+ }
67
+
68
+ @end
@@ -0,0 +1,321 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 46;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ 5267DA06210F0EDE00D20C59 /* RNPDFPdfView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5267DA03210F0EDD00D20C59 /* RNPDFPdfView.mm */; };
11
+ 5267DA07210F0EDE00D20C59 /* RNPDFPdfViewManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.mm */; };
12
+ 5267DA0A210F0F0800D20C59 /* PDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5267DA09210F0F0800D20C59 /* PDFKit.framework */; };
13
+ 526B80401EABD92200259970 /* RNPDFPdfPageViewManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.mm */; };
14
+ 52A324EA1FD3C3FB000B0B18 /* PdfManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52A324E91FD3C3FB000B0B18 /* PdfManager.mm */; };
15
+ 52F79DB71EB2DA4F00CAD00C /* RNPDFPdfPageView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.mm */; };
16
+ /* End PBXBuildFile section */
17
+
18
+ /* Begin PBXCopyFilesBuildPhase section */
19
+ 20D8E03D1C8E946C00039823 /* CopyFiles */ = {
20
+ isa = PBXCopyFilesBuildPhase;
21
+ buildActionMask = 2147483647;
22
+ dstPath = "include/$(PRODUCT_NAME)";
23
+ dstSubfolderSpec = 16;
24
+ files = (
25
+ );
26
+ runOnlyForDeploymentPostprocessing = 0;
27
+ };
28
+ /* End PBXCopyFilesBuildPhase section */
29
+
30
+ /* Begin PBXFileReference section */
31
+ 20D8E03F1C8E946C00039823 /* libRNPDFPdf.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNPDFPdf.a; sourceTree = BUILT_PRODUCTS_DIR; };
32
+ 5267DA02210F0EDD00D20C59 /* RNPDFPdfView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfView.h; sourceTree = "<group>"; };
33
+ 5267DA03210F0EDD00D20C59 /* RNPDFPdfView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfView.mm; sourceTree = "<group>"; };
34
+ 5267DA04210F0EDD00D20C59 /* RNPDFPdfViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfViewManager.h; sourceTree = "<group>"; };
35
+ 5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfViewManager.mm; sourceTree = "<group>"; };
36
+ 5267DA09210F0F0800D20C59 /* PDFKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PDFKit.framework; path = System/Library/Frameworks/PDFKit.framework; sourceTree = SDKROOT; };
37
+ 526B803E1EABD92200259970 /* RNPDFPdfPageViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfPageViewManager.h; sourceTree = "<group>"; };
38
+ 526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfPageViewManager.mm; sourceTree = "<group>"; };
39
+ 52A324E81FD3C3FB000B0B18 /* PdfManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdfManager.h; sourceTree = "<group>"; };
40
+ 52A324E91FD3C3FB000B0B18 /* PdfManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PdfManager.mm; sourceTree = "<group>"; };
41
+ 52F79DB31EB2DA4F00CAD00C /* RNPDFPdfPageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfPageView.h; sourceTree = "<group>"; };
42
+ 52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfPageView.mm; sourceTree = "<group>"; };
43
+ /* End PBXFileReference section */
44
+
45
+ /* Begin PBXFrameworksBuildPhase section */
46
+ 20D8E03C1C8E946C00039823 /* Frameworks */ = {
47
+ isa = PBXFrameworksBuildPhase;
48
+ buildActionMask = 2147483647;
49
+ files = (
50
+ 5267DA0A210F0F0800D20C59 /* PDFKit.framework in Frameworks */,
51
+ );
52
+ runOnlyForDeploymentPostprocessing = 0;
53
+ };
54
+ /* End PBXFrameworksBuildPhase section */
55
+
56
+ /* Begin PBXGroup section */
57
+ 20D8E0361C8E946C00039823 = {
58
+ isa = PBXGroup;
59
+ children = (
60
+ 20D8E0411C8E946C00039823 /* RNPDFPdf */,
61
+ 20D8E0401C8E946C00039823 /* Products */,
62
+ 5267DA08210F0F0800D20C59 /* Frameworks */,
63
+ );
64
+ sourceTree = "<group>";
65
+ };
66
+ 20D8E0401C8E946C00039823 /* Products */ = {
67
+ isa = PBXGroup;
68
+ children = (
69
+ 20D8E03F1C8E946C00039823 /* libRNPDFPdf.a */,
70
+ );
71
+ name = Products;
72
+ sourceTree = "<group>";
73
+ };
74
+ 20D8E0411C8E946C00039823 /* RNPDFPdf */ = {
75
+ isa = PBXGroup;
76
+ children = (
77
+ 5267DA02210F0EDD00D20C59 /* RNPDFPdfView.h */,
78
+ 5267DA03210F0EDD00D20C59 /* RNPDFPdfView.mm */,
79
+ 5267DA04210F0EDD00D20C59 /* RNPDFPdfViewManager.h */,
80
+ 5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.mm */,
81
+ 52A324E81FD3C3FB000B0B18 /* PdfManager.h */,
82
+ 52A324E91FD3C3FB000B0B18 /* PdfManager.mm */,
83
+ 52F79DB31EB2DA4F00CAD00C /* RNPDFPdfPageView.h */,
84
+ 52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.mm */,
85
+ 526B803E1EABD92200259970 /* RNPDFPdfPageViewManager.h */,
86
+ 526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.mm */,
87
+ );
88
+ path = RNPDFPdf;
89
+ sourceTree = "<group>";
90
+ };
91
+ 5267DA08210F0F0800D20C59 /* Frameworks */ = {
92
+ isa = PBXGroup;
93
+ children = (
94
+ 5267DA09210F0F0800D20C59 /* PDFKit.framework */,
95
+ );
96
+ name = Frameworks;
97
+ sourceTree = "<group>";
98
+ };
99
+ /* End PBXGroup section */
100
+
101
+ /* Begin PBXNativeTarget section */
102
+ 20D8E03E1C8E946C00039823 /* RNPDFPdf */ = {
103
+ isa = PBXNativeTarget;
104
+ buildConfigurationList = 20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "RNPDFPdf" */;
105
+ buildPhases = (
106
+ 20D8E03B1C8E946C00039823 /* Sources */,
107
+ 20D8E03C1C8E946C00039823 /* Frameworks */,
108
+ 20D8E03D1C8E946C00039823 /* CopyFiles */,
109
+ );
110
+ buildRules = (
111
+ );
112
+ dependencies = (
113
+ );
114
+ name = RNPDFPdf;
115
+ productName = RNPDFPdf;
116
+ productReference = 20D8E03F1C8E946C00039823 /* libRNPDFPdf.a */;
117
+ productType = "com.apple.product-type.library.static";
118
+ };
119
+ /* End PBXNativeTarget section */
120
+
121
+ /* Begin PBXProject section */
122
+ 20D8E0371C8E946C00039823 /* Project object */ = {
123
+ isa = PBXProject;
124
+ attributes = {
125
+ LastUpgradeCheck = 0900;
126
+ ORGANIZATIONNAME = wonday.org;
127
+ TargetAttributes = {
128
+ 20D8E03E1C8E946C00039823 = {
129
+ CreatedOnToolsVersion = 7.2.1;
130
+ DevelopmentTeam = M8UXLTC426;
131
+ };
132
+ };
133
+ };
134
+ buildConfigurationList = 20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "RNPDFPdf" */;
135
+ compatibilityVersion = "Xcode 3.2";
136
+ developmentRegion = English;
137
+ hasScannedForEncodings = 0;
138
+ knownRegions = (
139
+ en,
140
+ );
141
+ mainGroup = 20D8E0361C8E946C00039823;
142
+ productRefGroup = 20D8E0401C8E946C00039823 /* Products */;
143
+ projectDirPath = "";
144
+ projectRoot = "";
145
+ targets = (
146
+ 20D8E03E1C8E946C00039823 /* RNPDFPdf */,
147
+ );
148
+ };
149
+ /* End PBXProject section */
150
+
151
+ /* Begin PBXSourcesBuildPhase section */
152
+ 20D8E03B1C8E946C00039823 /* Sources */ = {
153
+ isa = PBXSourcesBuildPhase;
154
+ buildActionMask = 2147483647;
155
+ files = (
156
+ 52A324EA1FD3C3FB000B0B18 /* PdfManager.mm in Sources */,
157
+ 5267DA07210F0EDE00D20C59 /* RNPDFPdfViewManager.mm in Sources */,
158
+ 5267DA06210F0EDE00D20C59 /* RNPDFPdfView.mm in Sources */,
159
+ 526B80401EABD92200259970 /* RNPDFPdfPageViewManager.mm in Sources */,
160
+ 52F79DB71EB2DA4F00CAD00C /* RNPDFPdfPageView.mm in Sources */,
161
+ );
162
+ runOnlyForDeploymentPostprocessing = 0;
163
+ };
164
+ /* End PBXSourcesBuildPhase section */
165
+
166
+ /* Begin XCBuildConfiguration section */
167
+ 20D8E0461C8E946C00039823 /* Debug */ = {
168
+ isa = XCBuildConfiguration;
169
+ buildSettings = {
170
+ ALWAYS_SEARCH_USER_PATHS = NO;
171
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
172
+ CLANG_CXX_LIBRARY = "libc++";
173
+ CLANG_ENABLE_MODULES = YES;
174
+ CLANG_ENABLE_OBJC_ARC = YES;
175
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
176
+ CLANG_WARN_BOOL_CONVERSION = YES;
177
+ CLANG_WARN_COMMA = YES;
178
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
179
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
180
+ CLANG_WARN_EMPTY_BODY = YES;
181
+ CLANG_WARN_ENUM_CONVERSION = YES;
182
+ CLANG_WARN_INFINITE_RECURSION = YES;
183
+ CLANG_WARN_INT_CONVERSION = YES;
184
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
185
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
186
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
187
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
188
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
189
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
190
+ CLANG_WARN_UNREACHABLE_CODE = YES;
191
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
192
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
193
+ COPY_PHASE_STRIP = NO;
194
+ DEBUG_INFORMATION_FORMAT = dwarf;
195
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
196
+ ENABLE_TESTABILITY = YES;
197
+ GCC_C_LANGUAGE_STANDARD = gnu99;
198
+ GCC_DYNAMIC_NO_PIC = NO;
199
+ GCC_NO_COMMON_BLOCKS = YES;
200
+ GCC_OPTIMIZATION_LEVEL = 0;
201
+ GCC_PREPROCESSOR_DEFINITIONS = (
202
+ "DEBUG=1",
203
+ "$(inherited)",
204
+ );
205
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
206
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
207
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
208
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
209
+ GCC_WARN_UNUSED_FUNCTION = YES;
210
+ GCC_WARN_UNUSED_VARIABLE = YES;
211
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
212
+ MTL_ENABLE_DEBUG_INFO = YES;
213
+ ONLY_ACTIVE_ARCH = YES;
214
+ SDKROOT = iphoneos;
215
+ };
216
+ name = Debug;
217
+ };
218
+ 20D8E0471C8E946C00039823 /* Release */ = {
219
+ isa = XCBuildConfiguration;
220
+ buildSettings = {
221
+ ALWAYS_SEARCH_USER_PATHS = NO;
222
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
223
+ CLANG_CXX_LIBRARY = "libc++";
224
+ CLANG_ENABLE_MODULES = YES;
225
+ CLANG_ENABLE_OBJC_ARC = YES;
226
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
227
+ CLANG_WARN_BOOL_CONVERSION = YES;
228
+ CLANG_WARN_COMMA = YES;
229
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
230
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
231
+ CLANG_WARN_EMPTY_BODY = YES;
232
+ CLANG_WARN_ENUM_CONVERSION = YES;
233
+ CLANG_WARN_INFINITE_RECURSION = YES;
234
+ CLANG_WARN_INT_CONVERSION = YES;
235
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
236
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
237
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
238
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
239
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
240
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
241
+ CLANG_WARN_UNREACHABLE_CODE = YES;
242
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
243
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
244
+ COPY_PHASE_STRIP = NO;
245
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
246
+ ENABLE_NS_ASSERTIONS = NO;
247
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
248
+ GCC_C_LANGUAGE_STANDARD = gnu99;
249
+ GCC_NO_COMMON_BLOCKS = YES;
250
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
251
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
252
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
253
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
254
+ GCC_WARN_UNUSED_FUNCTION = YES;
255
+ GCC_WARN_UNUSED_VARIABLE = YES;
256
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
257
+ MTL_ENABLE_DEBUG_INFO = NO;
258
+ SDKROOT = iphoneos;
259
+ VALIDATE_PRODUCT = YES;
260
+ };
261
+ name = Release;
262
+ };
263
+ 20D8E0491C8E946C00039823 /* Debug */ = {
264
+ isa = XCBuildConfiguration;
265
+ buildSettings = {
266
+ HEADER_SEARCH_PATHS = (
267
+ "$(inherited)",
268
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
269
+ "$(SRCROOT)/../node_modules/react-native/React/**",
270
+ "$(SRCROOT)/../../React/**",
271
+ "$(SRCROOT)/../../react-native/React/**",
272
+ "$(SRCROOT)/../../node_modules/react-native/React/**",
273
+ );
274
+ OTHER_LDFLAGS = "-ObjC";
275
+ PRODUCT_NAME = "$(TARGET_NAME)";
276
+ SKIP_INSTALL = YES;
277
+ };
278
+ name = Debug;
279
+ };
280
+ 20D8E04A1C8E946C00039823 /* Release */ = {
281
+ isa = XCBuildConfiguration;
282
+ buildSettings = {
283
+ HEADER_SEARCH_PATHS = (
284
+ "$(inherited)",
285
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
286
+ "$(SRCROOT)/../node_modules/react-native/React/**",
287
+ "$(SRCROOT)/../../React/**",
288
+ "$(SRCROOT)/../../react-native/React/**",
289
+ "$(SRCROOT)/../../node_modules/react-native/React/**",
290
+ );
291
+ OTHER_LDFLAGS = "-ObjC";
292
+ PRODUCT_NAME = "$(TARGET_NAME)";
293
+ SKIP_INSTALL = YES;
294
+ };
295
+ name = Release;
296
+ };
297
+ /* End XCBuildConfiguration section */
298
+
299
+ /* Begin XCConfigurationList section */
300
+ 20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "RNPDFPdf" */ = {
301
+ isa = XCConfigurationList;
302
+ buildConfigurations = (
303
+ 20D8E0461C8E946C00039823 /* Debug */,
304
+ 20D8E0471C8E946C00039823 /* Release */,
305
+ );
306
+ defaultConfigurationIsVisible = 0;
307
+ defaultConfigurationName = Release;
308
+ };
309
+ 20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "RNPDFPdf" */ = {
310
+ isa = XCConfigurationList;
311
+ buildConfigurations = (
312
+ 20D8E0491C8E946C00039823 /* Debug */,
313
+ 20D8E04A1C8E946C00039823 /* Release */,
314
+ );
315
+ defaultConfigurationIsVisible = 0;
316
+ defaultConfigurationName = Release;
317
+ };
318
+ /* End XCConfigurationList section */
319
+ };
320
+ rootObject = 20D8E0371C8E946C00039823 /* Project object */;
321
+ }
package/package.json ADDED
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "react-native-pdf-jsi",
3
+ "version": "1.0.1",
4
+ "summary": "A react native PDF view component with JSI performance enhancements",
5
+ "description": "A high-performance react native PDF view component with JSI (JavaScript Interface) integration for enhanced speed and efficiency. Supports iOS, Android, and Windows platforms with zero-bridge overhead operations.",
6
+ "main": "index.js",
7
+ "typings": "./index.d.ts",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/126punith/react-native-pdf-enhanced.git"
11
+ },
12
+ "keywords": [
13
+ "react-component",
14
+ "react-native",
15
+ "android",
16
+ "ios",
17
+ "pdf",
18
+ "view",
19
+ "viewer",
20
+ "jsi",
21
+ "performance",
22
+ "enhanced",
23
+ "native",
24
+ "bridge",
25
+ "high-performance"
26
+ ],
27
+ "author": {
28
+ "name": "Punith M",
29
+ "email": "punithm300@gmail.com",
30
+ "url": "https://github.com/126punith"
31
+ },
32
+ "license": "MIT",
33
+ "homepage": "https://github.com/126punith/react-native-pdf-enhanced",
34
+ "bugs": {
35
+ "url": "https://github.com/126punith/react-native-pdf-enhanced/issues"
36
+ },
37
+ "dependencies": {
38
+ "crypto-js": "4.2.0",
39
+ "deprecated-react-native-prop-types": "^2.3.0"
40
+ },
41
+ "devDependencies": {
42
+ "@babel/core": "^7.20.2",
43
+ "@babel/runtime": "^7.20.1",
44
+ "prop-types": "^15.7.2"
45
+ },
46
+ "peerDependencies": {
47
+ "react": "*",
48
+ "react-native": "*",
49
+ "react-native-blob-util": ">=0.13.7"
50
+ },
51
+ "files": [
52
+ "android/",
53
+ "ios/",
54
+ "windows/",
55
+ "src/",
56
+ "DoubleTapView.js",
57
+ "index.d.ts",
58
+ "index.js",
59
+ "index.js.flow",
60
+ "PdfManager.js",
61
+ "PdfPageView.js",
62
+ "PdfView.js",
63
+ "PdfViewFlatList.js",
64
+ "PinchZoomView.js",
65
+ "react-native-pdf.podspec",
66
+ "fabric/",
67
+ "README_JSI.md",
68
+ "INTEGRATION_GUIDE.md"
69
+ ],
70
+ "codegenConfig": {
71
+ "name": "rnpdf",
72
+ "type": "components",
73
+ "jsSrcsDir": "./fabric",
74
+ "android": {
75
+ "javaPackageName": "org.wonday.pdf"
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,31 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
6
+
7
+ Pod::Spec.new do |s|
8
+ s.name = package['name']
9
+ s.version = package['version']
10
+ s.summary = package['summary']
11
+ s.description = package['description']
12
+ s.author = package['author']['name']
13
+ s.author_email = package['author']['email']
14
+ s.license = package['license']
15
+ s.homepage = package['homepage']
16
+ s.source = { :git => 'https://github.com/126punith/react-native-pdf-enhanced.git', :tag => "v#{s.version}" }
17
+ s.requires_arc = true
18
+ s.framework = "PDFKit"
19
+
20
+ if fabric_enabled
21
+ s.platforms = { ios: '11.0', tvos: '11.0' }
22
+ s.source_files = 'ios/**/*.{h,m,mm,cpp}'
23
+ s.requires_arc = true
24
+ install_modules_dependencies(s)
25
+
26
+ else
27
+ s.platform = :ios, '8.0'
28
+ s.source_files = 'ios/**/*.{h,m,mm}'
29
+ s.dependency 'React-Core'
30
+ end
31
+ end