@namahapdf/react 0.1.0 → 0.2.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/README.md +22 -1
- package/dist/index.cjs +74 -73
- package/dist/index.d.cts +59 -2
- package/dist/index.d.ts +59 -2
- package/dist/index.js +35 -34
- package/dist/styles.css +1 -1
- package/package.json +17 -4
package/README.md
CHANGED
|
@@ -12,14 +12,35 @@ import { NamahaEditor } from '@namahapdf/react';
|
|
|
12
12
|
import '@namahapdf/react/styles.css';
|
|
13
13
|
|
|
14
14
|
export default function App() {
|
|
15
|
-
|
|
15
|
+
// The editor fills its container — give the wrapper a size.
|
|
16
|
+
return (
|
|
17
|
+
<div style={{ height: '100vh' }}>
|
|
18
|
+
<NamahaEditor licenseKey="YOUR_KEY" />
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
16
21
|
}
|
|
17
22
|
```
|
|
18
23
|
|
|
19
24
|
- Pass your `licenseKey` to remove the evaluation watermark and unlock licensed features.
|
|
20
25
|
Get one at **namahapdf.com/sdk**.
|
|
26
|
+
- **Sizing:** the editor fills its container, so size the wrapper via `style`/`className`
|
|
27
|
+
(e.g. `style={{ height: '100vh' }}`) or any parent with a height.
|
|
28
|
+
- **Opening PDFs is fully client-side** — no upload, no backend needed. The exception is
|
|
29
|
+
**password-protected** PDFs: decryption runs on a server endpoint (`decryptUrl`, default
|
|
30
|
+
same-origin `/api/decrypt-pdf`). Point it at your backend to support encrypted PDFs.
|
|
31
|
+
- **Signing:** Quick (visual) sign is fully client-side. Secure **Sign & certify**
|
|
32
|
+
(cryptographic PAdES, tamper-evident + Certificate of Completion) is server-dependent —
|
|
33
|
+
point the `signUrl` prop (default same-origin `/api/sign`) at your backend to enable it.
|
|
21
34
|
- Styles are scoped under `.namahapdf-root` and ship without a CSS reset, so they won't
|
|
22
35
|
affect the rest of your page.
|
|
36
|
+
- **Match your brand** with the `theme` prop — pass one or more hex colors and the full
|
|
37
|
+
tonal scale is derived for you (client-side, no network call):
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
<NamahaEditor theme={{ primary: '#2563EB', surface: '#FFFFFF', text: '#0F172A' }} />
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
All keys are optional — pass just `primary` for an accent-only reskin.
|
|
23
44
|
- Works in the Next.js App Router (the component is marked `"use client"`).
|
|
24
45
|
|
|
25
46
|
For the headless engine without the UI, see **@namahapdf/core**.
|