@shznet/pdf-sign-react 0.1.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 (2) hide show
  1. package/README.md +41 -0
  2. package/package.json +29 -0
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # @shznet/pdf-sign-react
2
+
3
+ React component wrapper for `@shznet/pdf-sign-control`.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @shznet/pdf-sign-react @shznet/pdf-sign-control pdfjs-dist
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { PdfSignReact } from '@shznet/pdf-sign-react';
15
+
16
+ export function App() {
17
+ const handlePdfLoaded = () => {
18
+ console.log('PDF Loaded!');
19
+ };
20
+
21
+ return (
22
+ <div style={{ height: '100vh' }}>
23
+ <PdfSignReact
24
+ fileUrl="https://example.com/doc.pdf"
25
+ onLoad={handlePdfLoaded}
26
+ primaryColor="#ff0000"
27
+ />
28
+ </div>
29
+ );
30
+ }
31
+ ```
32
+
33
+ ## Props
34
+
35
+ | Prop | Type | Description |
36
+ |------|------|-------------|
37
+ | `fileUrl` | `string` | URL of the PDF to display. |
38
+ | `scale` | `number` | Initial zoom scale. |
39
+ | `viewMode` | `'single-page' \| 'scroll'` | View mode configuration. |
40
+ | `primaryColor` | `string` | Color theme for interactive elements. |
41
+ | `onLoad` | `() => void` | Callback when PDF is fully loaded. |
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@shznet/pdf-sign-react",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "@shznet/source": "./src/index.ts",
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "!**/*.tsbuildinfo"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "peerDependencies": {
25
+ "react": ">=16.8.0",
26
+ "react-dom": ">=16.8.0",
27
+ "@shznet/pdf-sign-control": "*"
28
+ }
29
+ }