@papyrus-sdk/engine-native 0.2.11 → 0.2.14
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/android/build.gradle +42 -42
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/cpp/CMakeLists.txt +45 -45
- package/android/src/main/cpp/papyrus_outline.cpp +173 -173
- package/android/src/main/cpp/papyrus_outline_loader.cpp +125 -125
- package/android/src/main/cpp/papyrus_outline_loader.h +48 -48
- package/android/src/main/java/com/papyrus/engine/PapyrusEngineStore.java +71 -71
- package/android/src/main/java/com/papyrus/engine/PapyrusNativeEngineModule.java +520 -516
- package/android/src/main/java/com/papyrus/engine/PapyrusNativeEngineModule.kt +527 -527
- package/android/src/main/java/com/papyrus/engine/PapyrusOutline.java +34 -34
- package/android/src/main/java/com/papyrus/engine/PapyrusOutlineItem.java +13 -13
- package/android/src/main/java/com/papyrus/engine/PapyrusPackage.java +24 -24
- package/android/src/main/java/com/papyrus/engine/PapyrusPageView.java +197 -128
- package/android/src/main/java/com/papyrus/engine/PapyrusPageViewManager.java +22 -16
- package/android/src/main/java/com/papyrus/engine/PapyrusPageViewModule.kt +15 -12
- package/android/src/main/java/com/papyrus/engine/PapyrusTextHit.java +15 -15
- package/android/src/main/java/com/papyrus/engine/PapyrusTextSearch.java +20 -20
- package/android/src/main/java/com/papyrus/engine/PapyrusTextSelect.java +20 -20
- package/android/src/main/java/com/papyrus/engine/PapyrusTextSelection.java +11 -11
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +32 -44
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -41
- package/dist/index.mjs.map +1 -1
- package/ios/PapyrusNativeEngine.m +447 -447
- package/ios/PapyrusNativeEngine.podspec +15 -15
- package/ios/PapyrusPageView.h +21 -19
- package/ios/PapyrusPageView.m +194 -63
- package/ios/PapyrusPageViewManager.m +20 -19
- package/package.json +14 -10
- package/react-native.config.js +10 -10
- package/LICENSE +0 -21
- package/android/src/main/cpp/papyrus_outline_loader_test.cpp +0 -240
- package/android/src/test/java/com/papyrus/engine/PapyrusOutlineTest.java +0 -40
- package/android/src/test/java/com/papyrus/engine/PapyrusPageViewTest.java +0 -30
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
Pod::Spec.new do |s|
|
|
2
|
-
s.name = 'PapyrusNativeEngine'
|
|
3
|
-
s.version = '0.
|
|
4
|
-
s.summary = 'Papyrus Native Engine (PDFKit)'
|
|
5
|
-
s.homepage = 'https://
|
|
6
|
-
s.license = { :type => 'MIT' }
|
|
7
|
-
s.author = { 'Papyrus' => '
|
|
8
|
-
s.platforms = { :ios => '13.0' }
|
|
9
|
-
s.source = { :git => 'https://
|
|
10
|
-
s.source_files = '**/*.{h,m,mm,swift}'
|
|
11
|
-
s.requires_arc = true
|
|
12
|
-
s.swift_version = '5.0'
|
|
13
|
-
|
|
14
|
-
s.dependency 'React-Core'
|
|
15
|
-
end
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'PapyrusNativeEngine'
|
|
3
|
+
s.version = '0.2.12'
|
|
4
|
+
s.summary = 'Papyrus Native Engine (PDFKit)'
|
|
5
|
+
s.homepage = 'https://solrachix.github.io/Papyrus/'
|
|
6
|
+
s.license = { :type => 'MIT' }
|
|
7
|
+
s.author = { 'Papyrus SDK' => 'https://github.com/solrachix/Papyrus' }
|
|
8
|
+
s.platforms = { :ios => '13.0' }
|
|
9
|
+
s.source = { :git => 'https://github.com/solrachix/Papyrus.git', :tag => s.version.to_s }
|
|
10
|
+
s.source_files = '**/*.{h,m,mm,swift}'
|
|
11
|
+
s.requires_arc = true
|
|
12
|
+
s.swift_version = '5.0'
|
|
13
|
+
|
|
14
|
+
s.dependency 'React-Core'
|
|
15
|
+
end
|
package/ios/PapyrusPageView.h
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
#import <PDFKit/PDFKit.h>
|
|
3
|
-
|
|
4
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
-
|
|
6
|
-
@interface PapyrusPageView : UIView
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
#import <UIKit/UIKit.h>
|
|
2
|
+
#import <PDFKit/PDFKit.h>
|
|
3
|
+
|
|
4
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
+
|
|
6
|
+
@interface PapyrusPageView : UIView
|
|
7
|
+
|
|
8
|
+
@property (nonatomic, copy) NSString *pageTheme;
|
|
9
|
+
|
|
10
|
+
- (void)renderWithDocument:(PDFDocument *_Nullable)document
|
|
11
|
+
pageIndex:(NSInteger)pageIndex
|
|
12
|
+
scale:(CGFloat)scale
|
|
13
|
+
zoom:(CGFloat)zoom
|
|
14
|
+
rotation:(NSInteger)rotation;
|
|
15
|
+
|
|
16
|
+
- (CGRect)convertRectToPage:(CGRect)rect page:(PDFPage *)page;
|
|
17
|
+
- (CGRect)convertRectFromPage:(CGRect)rect page:(PDFPage *)page;
|
|
18
|
+
|
|
19
|
+
@end
|
|
20
|
+
|
|
21
|
+
NS_ASSUME_NONNULL_END
|
package/ios/PapyrusPageView.m
CHANGED
|
@@ -1,63 +1,194 @@
|
|
|
1
|
-
#import "PapyrusPageView.h"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
@
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
[
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
#import "PapyrusPageView.h"
|
|
2
|
+
|
|
3
|
+
#import <CoreImage/CoreImage.h>
|
|
4
|
+
|
|
5
|
+
@interface PapyrusPageView ()
|
|
6
|
+
@property (nonatomic, strong) PDFView *pdfView;
|
|
7
|
+
@property (nonatomic, strong) UIImageView *imageView;
|
|
8
|
+
@property (nonatomic, strong) CIContext *ciContext;
|
|
9
|
+
@property (nonatomic, weak) PDFDocument *currentDocument;
|
|
10
|
+
@property (nonatomic, assign) NSInteger currentPageIndex;
|
|
11
|
+
@property (nonatomic, assign) NSInteger currentRotation;
|
|
12
|
+
@property (nonatomic, assign) CGFloat currentScale;
|
|
13
|
+
@property (nonatomic, assign) CGFloat currentZoom;
|
|
14
|
+
@end
|
|
15
|
+
|
|
16
|
+
@implementation PapyrusPageView
|
|
17
|
+
|
|
18
|
+
- (instancetype)initWithFrame:(CGRect)frame {
|
|
19
|
+
self = [super initWithFrame:frame];
|
|
20
|
+
if (self) {
|
|
21
|
+
_pageTheme = @"normal";
|
|
22
|
+
_currentPageIndex = NSNotFound;
|
|
23
|
+
_currentRotation = 0;
|
|
24
|
+
_currentScale = 1.0;
|
|
25
|
+
_currentZoom = 1.0;
|
|
26
|
+
_ciContext = [CIContext contextWithOptions:nil];
|
|
27
|
+
|
|
28
|
+
_pdfView = [[PDFView alloc] initWithFrame:self.bounds];
|
|
29
|
+
_pdfView.displayBox = kPDFDisplayBoxCropBox;
|
|
30
|
+
_pdfView.autoScales = NO;
|
|
31
|
+
_pdfView.displayMode = kPDFDisplaySinglePage;
|
|
32
|
+
_pdfView.displayDirection = kPDFDisplayDirectionVertical;
|
|
33
|
+
_pdfView.displaysPageBreaks = NO;
|
|
34
|
+
_pdfView.userInteractionEnabled = NO;
|
|
35
|
+
_pdfView.hidden = YES;
|
|
36
|
+
[self addSubview:_pdfView];
|
|
37
|
+
|
|
38
|
+
_imageView = [[UIImageView alloc] initWithFrame:self.bounds];
|
|
39
|
+
_imageView.contentMode = UIViewContentModeScaleAspectFit;
|
|
40
|
+
_imageView.clipsToBounds = YES;
|
|
41
|
+
[self addSubview:_imageView];
|
|
42
|
+
}
|
|
43
|
+
return self;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
- (void)layoutSubviews {
|
|
47
|
+
[super layoutSubviews];
|
|
48
|
+
self.pdfView.frame = self.bounds;
|
|
49
|
+
self.imageView.frame = self.bounds;
|
|
50
|
+
[self rerenderCurrentPageIfNeeded];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
- (void)setPageTheme:(NSString *)pageTheme {
|
|
54
|
+
NSString *normalized = pageTheme.length > 0 ? pageTheme : @"normal";
|
|
55
|
+
if ([_pageTheme isEqualToString:normalized]) return;
|
|
56
|
+
_pageTheme = [normalized copy];
|
|
57
|
+
[self rerenderCurrentPageIfNeeded];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
- (void)renderWithDocument:(PDFDocument *_Nullable)document
|
|
61
|
+
pageIndex:(NSInteger)pageIndex
|
|
62
|
+
scale:(CGFloat)scale
|
|
63
|
+
zoom:(CGFloat)zoom
|
|
64
|
+
rotation:(NSInteger)rotation {
|
|
65
|
+
self.currentDocument = document;
|
|
66
|
+
self.currentPageIndex = pageIndex;
|
|
67
|
+
self.currentRotation = rotation;
|
|
68
|
+
self.currentScale = scale;
|
|
69
|
+
self.currentZoom = zoom;
|
|
70
|
+
|
|
71
|
+
if (!document) {
|
|
72
|
+
self.pdfView.document = nil;
|
|
73
|
+
self.imageView.image = nil;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (self.pdfView.document != document) {
|
|
78
|
+
self.pdfView.document = document;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
PDFPage *page = [document pageAtIndex:pageIndex];
|
|
82
|
+
if (!page) return;
|
|
83
|
+
|
|
84
|
+
page.rotation = (int)rotation;
|
|
85
|
+
[self.pdfView goToPage:page];
|
|
86
|
+
|
|
87
|
+
CGFloat clampedZoom = MAX(0.1, MIN(5.0, zoom));
|
|
88
|
+
CGFloat baseScale = self.pdfView.scaleFactorForSizeToFit;
|
|
89
|
+
CGFloat targetScale = baseScale * MAX(0.1, scale) * clampedZoom;
|
|
90
|
+
self.pdfView.scaleFactor = targetScale;
|
|
91
|
+
|
|
92
|
+
[self rerenderCurrentPageIfNeeded];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
- (CGRect)convertRectToPage:(CGRect)rect page:(PDFPage *)page {
|
|
96
|
+
return [self.pdfView convertRect:rect toPage:page];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
- (CGRect)convertRectFromPage:(CGRect)rect page:(PDFPage *)page {
|
|
100
|
+
return [self.pdfView convertRect:rect fromPage:page];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
- (void)rerenderCurrentPageIfNeeded {
|
|
104
|
+
if (!self.currentDocument) return;
|
|
105
|
+
if (self.currentPageIndex == NSNotFound) return;
|
|
106
|
+
if (CGRectGetWidth(self.bounds) <= 0 || CGRectGetHeight(self.bounds) <= 0) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
PDFPage *page = [self.currentDocument pageAtIndex:self.currentPageIndex];
|
|
111
|
+
if (!page) return;
|
|
112
|
+
|
|
113
|
+
UIImage *baseImage = [self renderImageForPage:page];
|
|
114
|
+
self.imageView.image = [self themedImageFromImage:baseImage];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
- (UIImage *)renderImageForPage:(PDFPage *)page {
|
|
118
|
+
CGSize targetSize = self.bounds.size;
|
|
119
|
+
UIGraphicsImageRendererFormat *format =
|
|
120
|
+
[UIGraphicsImageRendererFormat defaultFormat];
|
|
121
|
+
format.opaque = YES;
|
|
122
|
+
format.scale = UIScreen.mainScreen.scale;
|
|
123
|
+
|
|
124
|
+
UIGraphicsImageRenderer *renderer =
|
|
125
|
+
[[UIGraphicsImageRenderer alloc] initWithSize:targetSize format:format];
|
|
126
|
+
|
|
127
|
+
return [renderer imageWithActions:^(UIGraphicsImageRendererContext *_Nonnull context) {
|
|
128
|
+
CGContextRef cgContext = context.CGContext;
|
|
129
|
+
CGContextSetFillColorWithColor(cgContext, UIColor.whiteColor.CGColor);
|
|
130
|
+
CGContextFillRect(cgContext, (CGRect){CGPointZero, targetSize});
|
|
131
|
+
|
|
132
|
+
CGRect pageBounds = [page boundsForBox:kPDFDisplayBoxCropBox];
|
|
133
|
+
if (CGRectGetWidth(pageBounds) <= 0 || CGRectGetHeight(pageBounds) <= 0) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
CGFloat scaleX = targetSize.width / CGRectGetWidth(pageBounds);
|
|
138
|
+
CGFloat scaleY = targetSize.height / CGRectGetHeight(pageBounds);
|
|
139
|
+
CGFloat fitScale = MIN(scaleX, scaleY);
|
|
140
|
+
CGFloat drawWidth = CGRectGetWidth(pageBounds) * fitScale;
|
|
141
|
+
CGFloat drawHeight = CGRectGetHeight(pageBounds) * fitScale;
|
|
142
|
+
CGFloat offsetX = (targetSize.width - drawWidth) / 2.0;
|
|
143
|
+
CGFloat offsetY = (targetSize.height - drawHeight) / 2.0;
|
|
144
|
+
|
|
145
|
+
CGContextSaveGState(cgContext);
|
|
146
|
+
CGContextTranslateCTM(cgContext, 0, targetSize.height);
|
|
147
|
+
CGContextScaleCTM(cgContext, 1, -1);
|
|
148
|
+
CGContextTranslateCTM(cgContext, offsetX, offsetY);
|
|
149
|
+
CGContextScaleCTM(cgContext, fitScale, fitScale);
|
|
150
|
+
[page drawWithBox:kPDFDisplayBoxCropBox toContext:cgContext];
|
|
151
|
+
CGContextRestoreGState(cgContext);
|
|
152
|
+
}];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
- (UIImage *)themedImageFromImage:(UIImage *)image {
|
|
156
|
+
if (!image) return nil;
|
|
157
|
+
if ([self.pageTheme isEqualToString:@"normal"]) return image;
|
|
158
|
+
|
|
159
|
+
CIImage *input = [[CIImage alloc] initWithImage:image];
|
|
160
|
+
if (!input) return image;
|
|
161
|
+
|
|
162
|
+
CIImage *output = input;
|
|
163
|
+
|
|
164
|
+
if ([self.pageTheme isEqualToString:@"sepia"]) {
|
|
165
|
+
CIFilter *sepia = [CIFilter filterWithName:@"CISepiaTone"];
|
|
166
|
+
[sepia setValue:output forKey:kCIInputImageKey];
|
|
167
|
+
[sepia setValue:@0.85 forKey:kCIInputIntensityKey];
|
|
168
|
+
output = sepia.outputImage ?: output;
|
|
169
|
+
} else if ([self.pageTheme isEqualToString:@"dark"] ||
|
|
170
|
+
[self.pageTheme isEqualToString:@"high-contrast"]) {
|
|
171
|
+
CIFilter *invert = [CIFilter filterWithName:@"CIColorInvert"];
|
|
172
|
+
[invert setValue:output forKey:kCIInputImageKey];
|
|
173
|
+
output = invert.outputImage ?: output;
|
|
174
|
+
|
|
175
|
+
CIFilter *controls = [CIFilter filterWithName:@"CIColorControls"];
|
|
176
|
+
[controls setValue:output forKey:kCIInputImageKey];
|
|
177
|
+
[controls setValue:@0 forKey:kCIInputSaturationKey];
|
|
178
|
+
[controls setValue:([self.pageTheme isEqualToString:@"high-contrast"] ? @1.25 : @0.9)
|
|
179
|
+
forKey:kCIInputContrastKey];
|
|
180
|
+
[controls setValue:([self.pageTheme isEqualToString:@"high-contrast"] ? @0.02 : @-0.08)
|
|
181
|
+
forKey:kCIInputBrightnessKey];
|
|
182
|
+
output = controls.outputImage ?: output;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
CGImageRef cgImage = [self.ciContext createCGImage:output fromRect:output.extent];
|
|
186
|
+
if (!cgImage) return image;
|
|
187
|
+
UIImage *result = [UIImage imageWithCGImage:cgImage
|
|
188
|
+
scale:image.scale
|
|
189
|
+
orientation:image.imageOrientation];
|
|
190
|
+
CGImageRelease(cgImage);
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@end
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
#import <React/RCTViewManager.h>
|
|
2
|
-
#import "PapyrusPageView.h"
|
|
3
|
-
|
|
4
|
-
@interface PapyrusPageViewManager : RCTViewManager
|
|
5
|
-
@end
|
|
6
|
-
|
|
7
|
-
@implementation PapyrusPageViewManager
|
|
8
|
-
|
|
9
|
-
RCT_EXPORT_MODULE(PapyrusPageView)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
#import <React/RCTViewManager.h>
|
|
2
|
+
#import "PapyrusPageView.h"
|
|
3
|
+
|
|
4
|
+
@interface PapyrusPageViewManager : RCTViewManager
|
|
5
|
+
@end
|
|
6
|
+
|
|
7
|
+
@implementation PapyrusPageViewManager
|
|
8
|
+
|
|
9
|
+
RCT_EXPORT_MODULE(PapyrusPageView)
|
|
10
|
+
RCT_EXPORT_VIEW_PROPERTY(pageTheme, NSString)
|
|
11
|
+
|
|
12
|
+
+ (BOOL)requiresMainQueueSetup {
|
|
13
|
+
return YES;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
- (UIView *)view {
|
|
17
|
+
return [[PapyrusPageView alloc] initWithFrame:CGRectZero];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papyrus-sdk/engine-native",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"papyrus",
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
"viewer"
|
|
14
14
|
],
|
|
15
15
|
"main": "dist/index.js",
|
|
16
|
+
"react-native": "dist/index.js",
|
|
16
17
|
"module": "dist/index.mjs",
|
|
17
18
|
"types": "dist/index.d.ts",
|
|
18
19
|
"exports": {
|
|
19
20
|
".": {
|
|
21
|
+
"react-native": "./dist/index.js",
|
|
20
22
|
"types": "./dist/index.d.ts",
|
|
21
23
|
"import": "./dist/index.mjs",
|
|
22
24
|
"require": "./dist/index.js"
|
|
@@ -24,7 +26,8 @@
|
|
|
24
26
|
},
|
|
25
27
|
"files": [
|
|
26
28
|
"dist",
|
|
27
|
-
"android/src",
|
|
29
|
+
"android/src/main",
|
|
30
|
+
"!android/src/main/cpp/*_test.cpp",
|
|
28
31
|
"android/build.gradle",
|
|
29
32
|
"android/consumer-rules.pro",
|
|
30
33
|
"ios/*.h",
|
|
@@ -43,17 +46,18 @@
|
|
|
43
46
|
"bugs": {
|
|
44
47
|
"url": "https://github.com/solrachix/Papyrus/issues"
|
|
45
48
|
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsup index.ts --dts --format cjs,esm --out-dir dist --clean --sourcemap",
|
|
51
|
+
"prepublishOnly": "pnpm build"
|
|
52
|
+
},
|
|
46
53
|
"peerDependencies": {
|
|
47
|
-
"@papyrus-sdk/core": ">=0.2.
|
|
48
|
-
"@papyrus-sdk/types": ">=0.2.
|
|
54
|
+
"@papyrus-sdk/core": ">=0.2.15",
|
|
55
|
+
"@papyrus-sdk/types": ">=0.2.8",
|
|
49
56
|
"react-native": ">=0.81.0"
|
|
50
57
|
},
|
|
51
58
|
"devDependencies": {
|
|
52
|
-
"@papyrus-sdk/core": "0.2.
|
|
53
|
-
"@papyrus-sdk/types": "0.2.
|
|
59
|
+
"@papyrus-sdk/core": "0.2.15",
|
|
60
|
+
"@papyrus-sdk/types": "0.2.8",
|
|
54
61
|
"react-native": "^0.81.0"
|
|
55
|
-
},
|
|
56
|
-
"scripts": {
|
|
57
|
-
"build": "tsup index.ts --dts --format cjs,esm --out-dir dist --clean --sourcemap"
|
|
58
62
|
}
|
|
59
|
-
}
|
|
63
|
+
}
|
package/react-native.config.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
project: {
|
|
3
|
-
ios: {
|
|
4
|
-
podspecPath: 'ios/PapyrusNativeEngine.podspec',
|
|
5
|
-
},
|
|
6
|
-
android: {
|
|
7
|
-
sourceDir: 'android',
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
project: {
|
|
3
|
+
ios: {
|
|
4
|
+
podspecPath: 'ios/PapyrusNativeEngine.podspec',
|
|
5
|
+
},
|
|
6
|
+
android: {
|
|
7
|
+
sourceDir: 'android',
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
};
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Papyrus Contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|