takumi-pdf 0.3.0 → 0.4.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/dist/export.d.cts +32 -1
- package/dist/export.d.mts +32 -1
- package/package.json +2 -2
- package/pkg/takumi_pdf_wasm_bg.wasm +0 -0
package/dist/export.d.cts
CHANGED
|
@@ -151,6 +151,37 @@ type PdfMetadata = {
|
|
|
151
151
|
* standards require one; supplying it keeps output deterministic.
|
|
152
152
|
*/
|
|
153
153
|
creationDate?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Custom XMP schemas written into the packet, for metadata the renderer
|
|
156
|
+
* knows nothing about, e.g. the `fx:` properties a Factur-X invoice needs.
|
|
157
|
+
*/
|
|
158
|
+
xmp?: XmpSchema[];
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* A namespace written into the XMP packet, with the schema description PDF/A
|
|
162
|
+
* requires for it.
|
|
163
|
+
*/
|
|
164
|
+
type XmpSchema = {
|
|
165
|
+
/** Human-readable name, e.g. "Factur-X PDF/A Extension". */
|
|
166
|
+
name: string;
|
|
167
|
+
/** Namespace prefix the properties are written under, e.g. "fx". */
|
|
168
|
+
prefix: string;
|
|
169
|
+
/** Namespace URI. */
|
|
170
|
+
namespace: string;
|
|
171
|
+
/**
|
|
172
|
+
* Properties written under the namespace. Each is written as a value and
|
|
173
|
+
* described in the schema, so the two cannot drift apart.
|
|
174
|
+
*/
|
|
175
|
+
properties: XmpProperty[];
|
|
176
|
+
};
|
|
177
|
+
/** A property of an {@link XmpSchema}. */
|
|
178
|
+
type XmpProperty = {
|
|
179
|
+
/** Property name, e.g. "DocumentFileName". */
|
|
180
|
+
name: string;
|
|
181
|
+
/** Property value. */
|
|
182
|
+
value: string;
|
|
183
|
+
/** What the property means. PDF/A requires one. */
|
|
184
|
+
description: string;
|
|
154
185
|
};
|
|
155
186
|
/** A file attached to the PDF, shown in the viewer's attachment panel. */
|
|
156
187
|
type Attachment = {
|
|
@@ -256,4 +287,4 @@ declare function render(node: NodeInput, options?: RenderOptions): Promise<Uint8
|
|
|
256
287
|
/** Measures with a lazily created shared {@link PdfRenderer}. */
|
|
257
288
|
declare function measure(node: NodeInput, options?: MeasureOptions): Promise<MeasuredSize>;
|
|
258
289
|
//#endregion
|
|
259
|
-
export { ArchivalAttachment, Attachment, Dimensions, type FontLoader, type ImagesInput, MeasureOptions, MeasuredSize, NodeInput, PageMargin, PageSize, PdfMetadata, PdfRenderer, RenderOptions, ViewportInput, __wbg_init as default, initSync, measure, render };
|
|
290
|
+
export { ArchivalAttachment, Attachment, Dimensions, type FontLoader, type ImagesInput, MeasureOptions, MeasuredSize, NodeInput, PageMargin, PageSize, PdfMetadata, PdfRenderer, RenderOptions, ViewportInput, XmpProperty, XmpSchema, __wbg_init as default, initSync, measure, render };
|
package/dist/export.d.mts
CHANGED
|
@@ -151,6 +151,37 @@ type PdfMetadata = {
|
|
|
151
151
|
* standards require one; supplying it keeps output deterministic.
|
|
152
152
|
*/
|
|
153
153
|
creationDate?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Custom XMP schemas written into the packet, for metadata the renderer
|
|
156
|
+
* knows nothing about, e.g. the `fx:` properties a Factur-X invoice needs.
|
|
157
|
+
*/
|
|
158
|
+
xmp?: XmpSchema[];
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* A namespace written into the XMP packet, with the schema description PDF/A
|
|
162
|
+
* requires for it.
|
|
163
|
+
*/
|
|
164
|
+
type XmpSchema = {
|
|
165
|
+
/** Human-readable name, e.g. "Factur-X PDF/A Extension". */
|
|
166
|
+
name: string;
|
|
167
|
+
/** Namespace prefix the properties are written under, e.g. "fx". */
|
|
168
|
+
prefix: string;
|
|
169
|
+
/** Namespace URI. */
|
|
170
|
+
namespace: string;
|
|
171
|
+
/**
|
|
172
|
+
* Properties written under the namespace. Each is written as a value and
|
|
173
|
+
* described in the schema, so the two cannot drift apart.
|
|
174
|
+
*/
|
|
175
|
+
properties: XmpProperty[];
|
|
176
|
+
};
|
|
177
|
+
/** A property of an {@link XmpSchema}. */
|
|
178
|
+
type XmpProperty = {
|
|
179
|
+
/** Property name, e.g. "DocumentFileName". */
|
|
180
|
+
name: string;
|
|
181
|
+
/** Property value. */
|
|
182
|
+
value: string;
|
|
183
|
+
/** What the property means. PDF/A requires one. */
|
|
184
|
+
description: string;
|
|
154
185
|
};
|
|
155
186
|
/** A file attached to the PDF, shown in the viewer's attachment panel. */
|
|
156
187
|
type Attachment = {
|
|
@@ -256,4 +287,4 @@ declare function render(node: NodeInput, options?: RenderOptions): Promise<Uint8
|
|
|
256
287
|
/** Measures with a lazily created shared {@link PdfRenderer}. */
|
|
257
288
|
declare function measure(node: NodeInput, options?: MeasureOptions): Promise<MeasuredSize>;
|
|
258
289
|
//#endregion
|
|
259
|
-
export { ArchivalAttachment, Attachment, Dimensions, type FontLoader, type ImagesInput, MeasureOptions, MeasuredSize, NodeInput, PageMargin, PageSize, PdfMetadata, PdfRenderer, RenderOptions, ViewportInput, __wbg_init as default, initSync, measure, render };
|
|
290
|
+
export { ArchivalAttachment, Attachment, Dimensions, type FontLoader, type ImagesInput, MeasureOptions, MeasuredSize, NodeInput, PageMargin, PageSize, PdfMetadata, PdfRenderer, RenderOptions, ViewportInput, XmpProperty, XmpSchema, __wbg_init as default, initSync, measure, render };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "takumi-pdf",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "HTML/JSX to paged, selectable-text PDF, powered by takumi. WebAssembly, no Chromium.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"publish-lint": "attw --pack . && publint --strict ."
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@takumi-rs/helpers": "2.5.
|
|
86
|
+
"@takumi-rs/helpers": "2.5.11"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@types/bun": "^1.3.14",
|
|
Binary file
|