@unlev/exeq 0.1.0 → 0.1.2
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 +17 -2
- package/dist/embed.global.js +63 -63
- package/dist/index.d.mts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +28 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,9 +16,16 @@ npm install @unlev/exeq
|
|
|
16
16
|
import { DesignerView, SignerView } from '@unlev/exeq';
|
|
17
17
|
import '@unlev/exeq/styles';
|
|
18
18
|
|
|
19
|
-
// Template editor —
|
|
19
|
+
// Template editor — pre-load a PDF, get the template when saved
|
|
20
20
|
function Editor() {
|
|
21
|
-
return
|
|
21
|
+
return (
|
|
22
|
+
<DesignerView
|
|
23
|
+
initialPdfUrl="/contracts/blank.pdf"
|
|
24
|
+
onSave={(template) => {
|
|
25
|
+
// store the template JSON
|
|
26
|
+
}}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
// Signing UI — load a template, fill fields, download signed PDF
|
|
@@ -63,6 +70,14 @@ function Signer() {
|
|
|
63
70
|
| `FieldNavigator` | Prev/Next navigation through signer fields |
|
|
64
71
|
| `SignerRoleSelector` | Manage signer roles (add, remove, switch active role) |
|
|
65
72
|
|
|
73
|
+
### `DesignerView` Props
|
|
74
|
+
|
|
75
|
+
| Prop | Type | Description |
|
|
76
|
+
|------|------|-------------|
|
|
77
|
+
| `initialPdfUrl` | `string` | URL to a PDF to pre-load |
|
|
78
|
+
| `initialTemplate` | `Template` | Existing template to resume editing (fields, signer roles, PDF URL) |
|
|
79
|
+
| `onSave` | `(template: Template) => void` | Called when the user clicks "Export Template". If omitted, downloads the JSON file. |
|
|
80
|
+
|
|
66
81
|
### `SignerView` Props
|
|
67
82
|
|
|
68
83
|
| Prop | Type | Description |
|