@papyrus-sdk/ui-react-native 0.2.35-beta.7 → 0.2.35-beta.9

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/LICENSE ADDED
@@ -0,0 +1,21 @@
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.
package/README.md CHANGED
@@ -162,3 +162,7 @@ If large files fail to load or crash on mobile:
162
162
  - Runtime EPUB open/ready timeout: `180000ms`
163
163
  - Runtime EPUB display timeout: `30000ms`
164
164
  - For very large EPUBs, first-open can take longer on mid-tier Android. This is expected due to zip parsing and spine bootstrapping.
165
+
166
+ ## Native ink motion packaging check
167
+
168
+ Run `pnpm --filter @papyrus-sdk/ui-react-native check:ink-worklets` before publishing. This builds and verifies all three ink chrome callbacks through the Reanimated Babel plugin in both CJS and ESM artifacts. Keep explicit `"worklet"` directives: bundler aliases such as `useAnimatedStyle2` are not automatically recognized by the plugin.
package/dist/index.d.mts CHANGED
@@ -6,6 +6,8 @@ import { StyleProp, ViewStyle } from 'react-native';
6
6
 
7
7
  interface ViewerProps {
8
8
  engine: DocumentEngine;
9
+ /** Stable file identity, never the native engine/session ID. */
10
+ documentId?: string;
9
11
  /** Maximum page width at fit zoom, in React Native points; pinch zoom may enlarge it. */
10
12
  maxPageWidth?: number;
11
13
  /**
@@ -77,6 +79,7 @@ declare function useMobilePerf(): PerfSession;
77
79
  type PageViewComponentType = React.ComponentType<PapyrusPageViewProps & React.RefAttributes<any>>;
78
80
  interface PageRendererProps {
79
81
  engine: DocumentEngine;
82
+ documentId?: string;
80
83
  pageIndex: number;
81
84
  scale?: number;
82
85
  pageAspectRatio?: number;
@@ -168,6 +171,7 @@ declare function ReadingShell({ engine, title, documentType, thumbsInitialCount,
168
171
 
169
172
  type NativePdfDocumentViewerProps = {
170
173
  engine: DocumentEngine;
174
+ documentId?: string;
171
175
  maxPageWidth?: number;
172
176
  onTextSelected?: (payload: {
173
177
  text: string;
@@ -179,7 +183,7 @@ type NativePdfDocumentViewerProps = {
179
183
  }) => void;
180
184
  defineSelectionMode?: "selection" | "single-word";
181
185
  };
182
- declare function NativePdfDocumentViewer({ engine, maxPageWidth, onTextSelected, onDefineSelection, defineSelectionMode, }: NativePdfDocumentViewerProps): react_jsx_runtime.JSX.Element;
186
+ declare function NativePdfDocumentViewer({ engine, documentId, maxPageWidth, onTextSelected, onDefineSelection, defineSelectionMode, }: NativePdfDocumentViewerProps): react_jsx_runtime.JSX.Element;
183
187
 
184
188
  type OverflowSheetProps = {
185
189
  visible: boolean;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@ import { StyleProp, ViewStyle } from 'react-native';
6
6
 
7
7
  interface ViewerProps {
8
8
  engine: DocumentEngine;
9
+ /** Stable file identity, never the native engine/session ID. */
10
+ documentId?: string;
9
11
  /** Maximum page width at fit zoom, in React Native points; pinch zoom may enlarge it. */
10
12
  maxPageWidth?: number;
11
13
  /**
@@ -77,6 +79,7 @@ declare function useMobilePerf(): PerfSession;
77
79
  type PageViewComponentType = React.ComponentType<PapyrusPageViewProps & React.RefAttributes<any>>;
78
80
  interface PageRendererProps {
79
81
  engine: DocumentEngine;
82
+ documentId?: string;
80
83
  pageIndex: number;
81
84
  scale?: number;
82
85
  pageAspectRatio?: number;
@@ -168,6 +171,7 @@ declare function ReadingShell({ engine, title, documentType, thumbsInitialCount,
168
171
 
169
172
  type NativePdfDocumentViewerProps = {
170
173
  engine: DocumentEngine;
174
+ documentId?: string;
171
175
  maxPageWidth?: number;
172
176
  onTextSelected?: (payload: {
173
177
  text: string;
@@ -179,7 +183,7 @@ type NativePdfDocumentViewerProps = {
179
183
  }) => void;
180
184
  defineSelectionMode?: "selection" | "single-word";
181
185
  };
182
- declare function NativePdfDocumentViewer({ engine, maxPageWidth, onTextSelected, onDefineSelection, defineSelectionMode, }: NativePdfDocumentViewerProps): react_jsx_runtime.JSX.Element;
186
+ declare function NativePdfDocumentViewer({ engine, documentId, maxPageWidth, onTextSelected, onDefineSelection, defineSelectionMode, }: NativePdfDocumentViewerProps): react_jsx_runtime.JSX.Element;
183
187
 
184
188
  type OverflowSheetProps = {
185
189
  visible: boolean;