react-native-pdf 6.6.1 → 6.7.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.
- package/DoubleTapView.js +125 -0
- package/PdfManager.js +26 -0
- package/PdfPageView.js +53 -0
- package/PdfView.js +416 -0
- package/PdfViewFlatList.js +31 -0
- package/PinchZoomView.js +125 -0
- package/README.md +25 -46
- package/android/build.gradle +71 -13
- package/android/src/main/java/org/wonday/pdf/{RCTPdfManager.java → PdfManager.java} +57 -21
- package/android/src/main/java/org/wonday/pdf/PdfView.java +25 -0
- package/android/src/main/java/org/wonday/pdf/{RCTPdfView.java → RNPDFPackage.java} +2 -3
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNPDFPdfViewManagerDelegate.java +86 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNPDFPdfViewManagerInterface.java +33 -0
- package/fabric/RNPDFPdfNativeComponent.js +46 -0
- package/index.d.ts +11 -67
- package/index.js +464 -0
- package/index.js.flow +2 -0
- package/ios/{RCTPdf/PdfManager.m → RNPDFPdf/PdfManager.mm} +1 -1
- package/ios/{RCTPdf/RCTPdfPageView.h → RNPDFPdf/RNPDFPdfPageView.h} +1 -1
- package/ios/{RCTPdf/RCTPdfPageView.m → RNPDFPdf/RNPDFPdfPageView.mm} +5 -5
- package/ios/{RCTPdf/RCTPdfPageViewManager.h → RNPDFPdf/RNPDFPdfPageViewManager.h} +1 -1
- package/ios/{RCTPdf/RCTPdfPageViewManager.m → RNPDFPdf/RNPDFPdfPageViewManager.mm} +4 -4
- package/ios/{RCTPdf/RCTPdfView.h → RNPDFPdf/RNPDFPdfView.h} +15 -5
- package/ios/{RCTPdf/RCTPdfView.m → RNPDFPdf/RNPDFPdfView.mm} +321 -54
- package/ios/{RCTPdf/RCTPdfViewManager.h → RNPDFPdf/RNPDFPdfViewManager.h} +1 -1
- package/ios/{RCTPdf/RCTPdfViewManager.m → RNPDFPdf/RNPDFPdfViewManager.mm} +7 -5
- package/ios/{RCTPdf.xcodeproj → RNPDFPdf.xcodeproj}/project.pbxproj +38 -38
- package/package.json +22 -11
- package/react-native-pdf.podspec +28 -3
- package/windows/RCTPdf/pch.h +2 -0
- /package/ios/{RCTPdf → RNPDFPdf}/PdfManager.h +0 -0
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
5267DA06210F0EDE00D20C59 /*
|
|
11
|
-
5267DA07210F0EDE00D20C59 /*
|
|
10
|
+
5267DA06210F0EDE00D20C59 /* RNPDFPdfView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5267DA03210F0EDD00D20C59 /* RNPDFPdfView.m */; };
|
|
11
|
+
5267DA07210F0EDE00D20C59 /* RNPDFPdfViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.m */; };
|
|
12
12
|
5267DA0A210F0F0800D20C59 /* PDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5267DA09210F0F0800D20C59 /* PDFKit.framework */; };
|
|
13
|
-
526B80401EABD92200259970 /*
|
|
13
|
+
526B80401EABD92200259970 /* RNPDFPdfPageViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.m */; };
|
|
14
14
|
52A324EA1FD3C3FB000B0B18 /* PdfManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 52A324E91FD3C3FB000B0B18 /* PdfManager.m */; };
|
|
15
|
-
52F79DB71EB2DA4F00CAD00C /*
|
|
15
|
+
52F79DB71EB2DA4F00CAD00C /* RNPDFPdfPageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.m */; };
|
|
16
16
|
/* End PBXBuildFile section */
|
|
17
17
|
|
|
18
18
|
/* Begin PBXCopyFilesBuildPhase section */
|
|
@@ -28,18 +28,18 @@
|
|
|
28
28
|
/* End PBXCopyFilesBuildPhase section */
|
|
29
29
|
|
|
30
30
|
/* Begin PBXFileReference section */
|
|
31
|
-
20D8E03F1C8E946C00039823 /*
|
|
32
|
-
5267DA02210F0EDD00D20C59 /*
|
|
33
|
-
5267DA03210F0EDD00D20C59 /*
|
|
34
|
-
5267DA04210F0EDD00D20C59 /*
|
|
35
|
-
5267DA05210F0EDE00D20C59 /*
|
|
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.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfView.m; sourceTree = "<group>"; };
|
|
34
|
+
5267DA04210F0EDD00D20C59 /* RNPDFPdfViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfViewManager.h; sourceTree = "<group>"; };
|
|
35
|
+
5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfViewManager.m; sourceTree = "<group>"; };
|
|
36
36
|
5267DA09210F0F0800D20C59 /* PDFKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PDFKit.framework; path = System/Library/Frameworks/PDFKit.framework; sourceTree = SDKROOT; };
|
|
37
|
-
526B803E1EABD92200259970 /*
|
|
38
|
-
526B803F1EABD92200259970 /*
|
|
37
|
+
526B803E1EABD92200259970 /* RNPDFPdfPageViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfPageViewManager.h; sourceTree = "<group>"; };
|
|
38
|
+
526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfPageViewManager.m; sourceTree = "<group>"; };
|
|
39
39
|
52A324E81FD3C3FB000B0B18 /* PdfManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PdfManager.h; sourceTree = "<group>"; };
|
|
40
40
|
52A324E91FD3C3FB000B0B18 /* PdfManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PdfManager.m; sourceTree = "<group>"; };
|
|
41
|
-
52F79DB31EB2DA4F00CAD00C /*
|
|
42
|
-
52F79DB41EB2DA4F00CAD00C /*
|
|
41
|
+
52F79DB31EB2DA4F00CAD00C /* RNPDFPdfPageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNPDFPdfPageView.h; sourceTree = "<group>"; };
|
|
42
|
+
52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNPDFPdfPageView.m; sourceTree = "<group>"; };
|
|
43
43
|
/* End PBXFileReference section */
|
|
44
44
|
|
|
45
45
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
20D8E0361C8E946C00039823 = {
|
|
58
58
|
isa = PBXGroup;
|
|
59
59
|
children = (
|
|
60
|
-
20D8E0411C8E946C00039823 /*
|
|
60
|
+
20D8E0411C8E946C00039823 /* RNPDFPdf */,
|
|
61
61
|
20D8E0401C8E946C00039823 /* Products */,
|
|
62
62
|
5267DA08210F0F0800D20C59 /* Frameworks */,
|
|
63
63
|
);
|
|
@@ -66,26 +66,26 @@
|
|
|
66
66
|
20D8E0401C8E946C00039823 /* Products */ = {
|
|
67
67
|
isa = PBXGroup;
|
|
68
68
|
children = (
|
|
69
|
-
20D8E03F1C8E946C00039823 /*
|
|
69
|
+
20D8E03F1C8E946C00039823 /* libRNPDFPdf.a */,
|
|
70
70
|
);
|
|
71
71
|
name = Products;
|
|
72
72
|
sourceTree = "<group>";
|
|
73
73
|
};
|
|
74
|
-
20D8E0411C8E946C00039823 /*
|
|
74
|
+
20D8E0411C8E946C00039823 /* RNPDFPdf */ = {
|
|
75
75
|
isa = PBXGroup;
|
|
76
76
|
children = (
|
|
77
|
-
5267DA02210F0EDD00D20C59 /*
|
|
78
|
-
5267DA03210F0EDD00D20C59 /*
|
|
79
|
-
5267DA04210F0EDD00D20C59 /*
|
|
80
|
-
5267DA05210F0EDE00D20C59 /*
|
|
77
|
+
5267DA02210F0EDD00D20C59 /* RNPDFPdfView.h */,
|
|
78
|
+
5267DA03210F0EDD00D20C59 /* RNPDFPdfView.m */,
|
|
79
|
+
5267DA04210F0EDD00D20C59 /* RNPDFPdfViewManager.h */,
|
|
80
|
+
5267DA05210F0EDE00D20C59 /* RNPDFPdfViewManager.m */,
|
|
81
81
|
52A324E81FD3C3FB000B0B18 /* PdfManager.h */,
|
|
82
82
|
52A324E91FD3C3FB000B0B18 /* PdfManager.m */,
|
|
83
|
-
52F79DB31EB2DA4F00CAD00C /*
|
|
84
|
-
52F79DB41EB2DA4F00CAD00C /*
|
|
85
|
-
526B803E1EABD92200259970 /*
|
|
86
|
-
526B803F1EABD92200259970 /*
|
|
83
|
+
52F79DB31EB2DA4F00CAD00C /* RNPDFPdfPageView.h */,
|
|
84
|
+
52F79DB41EB2DA4F00CAD00C /* RNPDFPdfPageView.m */,
|
|
85
|
+
526B803E1EABD92200259970 /* RNPDFPdfPageViewManager.h */,
|
|
86
|
+
526B803F1EABD92200259970 /* RNPDFPdfPageViewManager.m */,
|
|
87
87
|
);
|
|
88
|
-
path =
|
|
88
|
+
path = RNPDFPdf;
|
|
89
89
|
sourceTree = "<group>";
|
|
90
90
|
};
|
|
91
91
|
5267DA08210F0F0800D20C59 /* Frameworks */ = {
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
/* End PBXGroup section */
|
|
100
100
|
|
|
101
101
|
/* Begin PBXNativeTarget section */
|
|
102
|
-
20D8E03E1C8E946C00039823 /*
|
|
102
|
+
20D8E03E1C8E946C00039823 /* RNPDFPdf */ = {
|
|
103
103
|
isa = PBXNativeTarget;
|
|
104
|
-
buildConfigurationList = 20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "
|
|
104
|
+
buildConfigurationList = 20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "RNPDFPdf" */;
|
|
105
105
|
buildPhases = (
|
|
106
106
|
20D8E03B1C8E946C00039823 /* Sources */,
|
|
107
107
|
20D8E03C1C8E946C00039823 /* Frameworks */,
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
);
|
|
112
112
|
dependencies = (
|
|
113
113
|
);
|
|
114
|
-
name =
|
|
115
|
-
productName =
|
|
116
|
-
productReference = 20D8E03F1C8E946C00039823 /*
|
|
114
|
+
name = RNPDFPdf;
|
|
115
|
+
productName = RNPDFPdf;
|
|
116
|
+
productReference = 20D8E03F1C8E946C00039823 /* libRNPDFPdf.a */;
|
|
117
117
|
productType = "com.apple.product-type.library.static";
|
|
118
118
|
};
|
|
119
119
|
/* End PBXNativeTarget section */
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
-
buildConfigurationList = 20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "
|
|
134
|
+
buildConfigurationList = 20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "RNPDFPdf" */;
|
|
135
135
|
compatibilityVersion = "Xcode 3.2";
|
|
136
136
|
developmentRegion = English;
|
|
137
137
|
hasScannedForEncodings = 0;
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
projectDirPath = "";
|
|
144
144
|
projectRoot = "";
|
|
145
145
|
targets = (
|
|
146
|
-
20D8E03E1C8E946C00039823 /*
|
|
146
|
+
20D8E03E1C8E946C00039823 /* RNPDFPdf */,
|
|
147
147
|
);
|
|
148
148
|
};
|
|
149
149
|
/* End PBXProject section */
|
|
@@ -154,10 +154,10 @@
|
|
|
154
154
|
buildActionMask = 2147483647;
|
|
155
155
|
files = (
|
|
156
156
|
52A324EA1FD3C3FB000B0B18 /* PdfManager.m in Sources */,
|
|
157
|
-
5267DA07210F0EDE00D20C59 /*
|
|
158
|
-
5267DA06210F0EDE00D20C59 /*
|
|
159
|
-
526B80401EABD92200259970 /*
|
|
160
|
-
52F79DB71EB2DA4F00CAD00C /*
|
|
157
|
+
5267DA07210F0EDE00D20C59 /* RNPDFPdfViewManager.m in Sources */,
|
|
158
|
+
5267DA06210F0EDE00D20C59 /* RNPDFPdfView.m in Sources */,
|
|
159
|
+
526B80401EABD92200259970 /* RNPDFPdfPageViewManager.m in Sources */,
|
|
160
|
+
52F79DB71EB2DA4F00CAD00C /* RNPDFPdfPageView.m in Sources */,
|
|
161
161
|
);
|
|
162
162
|
runOnlyForDeploymentPostprocessing = 0;
|
|
163
163
|
};
|
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
/* End XCBuildConfiguration section */
|
|
298
298
|
|
|
299
299
|
/* Begin XCConfigurationList section */
|
|
300
|
-
20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "
|
|
300
|
+
20D8E03A1C8E946C00039823 /* Build configuration list for PBXProject "RNPDFPdf" */ = {
|
|
301
301
|
isa = XCConfigurationList;
|
|
302
302
|
buildConfigurations = (
|
|
303
303
|
20D8E0461C8E946C00039823 /* Debug */,
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
defaultConfigurationIsVisible = 0;
|
|
307
307
|
defaultConfigurationName = Release;
|
|
308
308
|
};
|
|
309
|
-
20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "
|
|
309
|
+
20D8E0481C8E946C00039823 /* Build configuration list for PBXNativeTarget "RNPDFPdf" */ = {
|
|
310
310
|
isa = XCConfigurationList;
|
|
311
311
|
buildConfigurations = (
|
|
312
312
|
20D8E0491C8E946C00039823 /* Debug */,
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-pdf",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0",
|
|
4
4
|
"summary": "A react native PDF view component",
|
|
5
5
|
"description": "A react native PDF view component, support ios and android platform",
|
|
6
6
|
"main": "index.js",
|
|
7
|
+
"typings": "./index.d.ts",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
9
10
|
"url": "git+https://github.com/wonday/react-native-pdf.git"
|
|
@@ -31,16 +32,19 @@
|
|
|
31
32
|
"deprecated-react-native-prop-types": "^2.3.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"
|
|
35
|
+
"@babel/core": "^7.20.2",
|
|
36
|
+
"@babel/runtime": "^7.20.1",
|
|
37
|
+
"prop-types": "^15.7.2"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": "*",
|
|
41
|
+
"react-native": "*",
|
|
42
|
+
"react-native-blob-util": ">=0.13.7"
|
|
37
43
|
},
|
|
38
44
|
"files": [
|
|
39
45
|
"android/",
|
|
40
46
|
"ios/",
|
|
41
47
|
"windows/",
|
|
42
|
-
"dist/",
|
|
43
|
-
"react-native-pdf.podspec",
|
|
44
48
|
"DoubleTapView.js",
|
|
45
49
|
"index.d.ts",
|
|
46
50
|
"index.js",
|
|
@@ -49,9 +53,16 @@
|
|
|
49
53
|
"PdfPageView.js",
|
|
50
54
|
"PdfView.js",
|
|
51
55
|
"PdfViewFlatList.js",
|
|
52
|
-
"PinchZoomView.js"
|
|
56
|
+
"PinchZoomView.js",
|
|
57
|
+
"react-native-pdf.podspec",
|
|
58
|
+
"fabric/"
|
|
53
59
|
],
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
"codegenConfig": {
|
|
61
|
+
"name": "rnpdf",
|
|
62
|
+
"type": "components",
|
|
63
|
+
"jsSrcsDir": "./fabric",
|
|
64
|
+
"android": {
|
|
65
|
+
"javaPackageName": "org.wonday.pdf"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
package/react-native-pdf.podspec
CHANGED
|
@@ -2,6 +2,8 @@ require 'json'
|
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
|
|
5
|
+
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
6
|
+
|
|
5
7
|
Pod::Spec.new do |s|
|
|
6
8
|
s.name = package['name']
|
|
7
9
|
s.version = package['version']
|
|
@@ -12,7 +14,30 @@ Pod::Spec.new do |s|
|
|
|
12
14
|
s.homepage = package['homepage']
|
|
13
15
|
s.source = { :git => 'https://github.com/wonday/react-native-pdf.git', :tag => "v#{s.version}" }
|
|
14
16
|
s.requires_arc = true
|
|
15
|
-
s.
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
s.framework = "PDFKit"
|
|
18
|
+
|
|
19
|
+
if fabric_enabled
|
|
20
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
21
|
+
|
|
22
|
+
s.pod_target_xcconfig = {
|
|
23
|
+
'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"',
|
|
24
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
25
|
+
}
|
|
26
|
+
s.platforms = { ios: '11.0', tvos: '11.0' }
|
|
27
|
+
s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED'
|
|
28
|
+
s.source_files = 'ios/**/*.{h,m,mm,cpp}'
|
|
29
|
+
s.requires_arc = true
|
|
30
|
+
|
|
31
|
+
s.dependency "React"
|
|
32
|
+
s.dependency "React-RCTFabric"
|
|
33
|
+
s.dependency "React-Codegen"
|
|
34
|
+
s.dependency "RCT-Folly"
|
|
35
|
+
s.dependency "RCTRequired"
|
|
36
|
+
s.dependency "RCTTypeSafety"
|
|
37
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
38
|
+
else
|
|
39
|
+
s.platform = :ios, '8.0'
|
|
40
|
+
s.source_files = 'ios/**/*.{h,m,mm}'
|
|
41
|
+
s.dependency 'React-Core'
|
|
42
|
+
end
|
|
18
43
|
end
|
package/windows/RCTPdf/pch.h
CHANGED
|
@@ -26,4 +26,6 @@
|
|
|
26
26
|
#include <winrt/Windows.UI.Xaml.Media.h>
|
|
27
27
|
#include <winrt/Windows.UI.Xaml.Media.Imaging.h>
|
|
28
28
|
#include <winrt/Windows.UI.Xaml.Navigation.h>
|
|
29
|
+
#include <winrt/Microsoft.UI.Xaml.Controls.h>
|
|
30
|
+
#include <winrt/Microsoft.UI.Xaml.XamlTypeInfo.h>
|
|
29
31
|
#include <winrt/Microsoft.ReactNative.h>
|
|
File without changes
|