@jasy/nuxt 1.0.0-alpha.3 → 1.0.0-alpha.4

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 CHANGED
@@ -92,6 +92,21 @@ export default definePdfHandler(build, { cache: { maxAge: 3600 } });
92
92
 
93
93
  Expired entries re-render fresh (`swr` is off by default) - a stale invoice is never served.
94
94
 
95
+ ### Password protection
96
+
97
+ `usePdf` and `definePdfHandler` / `sendPdf` forward `@jasy/pdf` render options via `renderOptions` - so
98
+ AES-256 password protection is one option away, client or server:
99
+
100
+ ```ts
101
+ // client
102
+ const { download } = usePdf(Invoice, { renderOptions: { encrypt: { userPassword: "secret" } } });
103
+
104
+ // server
105
+ export default definePdfHandler(build, { renderOptions: { encrypt: { userPassword: "secret" } } });
106
+ ```
107
+
108
+ `ownerPassword` + `permissions` are optional. (AES-256 ≠ PDF/A, so this is not for ZUGFeRD invoices.)
109
+
95
110
  ## What the module sets up
96
111
 
97
112
  - **Components** for templates: `Document` · `Page` · `Column` · `Row` · `Box` · `Padding` · `Text` ·
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jasy/nuxt",
3
3
  "configKey": "jasy",
4
- "version": "1.0.0-alpha.3",
4
+ "version": "1.0.0-alpha.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jasy/nuxt",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "description": "Author PDFs as Vue components in Nuxt - client or server, zero config.",
5
5
  "license": "MIT",
6
6
  "author": "Florian Heuberger",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@nuxt/kit": "^4.4.8",
31
- "@jasy/pdf": "1.0.0-alpha.4",
32
- "@jasy/vue": "1.0.0-alpha.4"
31
+ "@jasy/pdf": "1.0.0-alpha.5",
32
+ "@jasy/vue": "1.0.0-alpha.5"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@nuxt/devtools": "^3.2.4",