@jsonpdf/plugins 0.1.0-alpha.1
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/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/barcode/barcode-generator.d.ts +18 -0
- package/dist/barcode/barcode-generator.d.ts.map +1 -0
- package/dist/barcode/barcode-generator.js +94 -0
- package/dist/barcode/barcode-generator.js.map +1 -0
- package/dist/barcode/barcode-plugin.d.ts +4 -0
- package/dist/barcode/barcode-plugin.d.ts.map +1 -0
- package/dist/barcode/barcode-plugin.js +70 -0
- package/dist/barcode/barcode-plugin.js.map +1 -0
- package/dist/barcode/barcode-types.d.ts +29 -0
- package/dist/barcode/barcode-types.d.ts.map +1 -0
- package/dist/barcode/barcode-types.js +60 -0
- package/dist/barcode/barcode-types.js.map +1 -0
- package/dist/chart/chart-generator.d.ts +17 -0
- package/dist/chart/chart-generator.d.ts.map +1 -0
- package/dist/chart/chart-generator.js +77 -0
- package/dist/chart/chart-generator.js.map +1 -0
- package/dist/chart/chart-plugin.d.ts +4 -0
- package/dist/chart/chart-plugin.d.ts.map +1 -0
- package/dist/chart/chart-plugin.js +65 -0
- package/dist/chart/chart-plugin.js.map +1 -0
- package/dist/chart/chart-types.d.ts +18 -0
- package/dist/chart/chart-types.d.ts.map +1 -0
- package/dist/chart/chart-types.js +18 -0
- package/dist/chart/chart-types.js.map +1 -0
- package/dist/container/container-plugin.d.ts +15 -0
- package/dist/container/container-plugin.d.ts.map +1 -0
- package/dist/container/container-plugin.js +190 -0
- package/dist/container/container-plugin.js.map +1 -0
- package/dist/frame/frame-plugin.d.ts +4 -0
- package/dist/frame/frame-plugin.d.ts.map +1 -0
- package/dist/frame/frame-plugin.js +52 -0
- package/dist/frame/frame-plugin.js.map +1 -0
- package/dist/frame/frame-types.d.ts +8 -0
- package/dist/frame/frame-types.d.ts.map +1 -0
- package/dist/frame/frame-types.js +17 -0
- package/dist/frame/frame-types.js.map +1 -0
- package/dist/image/image-loader.d.ts +13 -0
- package/dist/image/image-loader.d.ts.map +1 -0
- package/dist/image/image-loader.js +73 -0
- package/dist/image/image-loader.js.map +1 -0
- package/dist/image/image-plugin.d.ts +19 -0
- package/dist/image/image-plugin.d.ts.map +1 -0
- package/dist/image/image-plugin.js +112 -0
- package/dist/image/image-plugin.js.map +1 -0
- package/dist/image/svg-rasterizer.d.ts +30 -0
- package/dist/image/svg-rasterizer.d.ts.map +1 -0
- package/dist/image/svg-rasterizer.js +97 -0
- package/dist/image/svg-rasterizer.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/line/line-plugin.d.ts +11 -0
- package/dist/line/line-plugin.d.ts.map +1 -0
- package/dist/line/line-plugin.js +68 -0
- package/dist/line/line-plugin.js.map +1 -0
- package/dist/list/list-plugin.d.ts +13 -0
- package/dist/list/list-plugin.d.ts.map +1 -0
- package/dist/list/list-plugin.js +194 -0
- package/dist/list/list-plugin.js.map +1 -0
- package/dist/list/list-types.d.ts +9 -0
- package/dist/list/list-types.d.ts.map +1 -0
- package/dist/list/list-types.js +9 -0
- package/dist/list/list-types.js.map +1 -0
- package/dist/platform/base64.d.ts +7 -0
- package/dist/platform/base64.d.ts.map +1 -0
- package/dist/platform/base64.js +17 -0
- package/dist/platform/base64.js.map +1 -0
- package/dist/platform/font-store.d.ts +3 -0
- package/dist/platform/font-store.d.ts.map +1 -0
- package/dist/platform/font-store.js +8 -0
- package/dist/platform/font-store.js.map +1 -0
- package/dist/platform/fs.browser.d.ts +6 -0
- package/dist/platform/fs.browser.d.ts.map +1 -0
- package/dist/platform/fs.browser.js +10 -0
- package/dist/platform/fs.browser.js.map +1 -0
- package/dist/platform/fs.d.ts +5 -0
- package/dist/platform/fs.d.ts.map +1 -0
- package/dist/platform/fs.js +10 -0
- package/dist/platform/fs.js.map +1 -0
- package/dist/platform/init.browser.d.ts +10 -0
- package/dist/platform/init.browser.d.ts.map +1 -0
- package/dist/platform/init.browser.js +24 -0
- package/dist/platform/init.browser.js.map +1 -0
- package/dist/platform/init.d.ts +6 -0
- package/dist/platform/init.d.ts.map +1 -0
- package/dist/platform/init.js +12 -0
- package/dist/platform/init.js.map +1 -0
- package/dist/platform/svg-rasterizer.browser.d.ts +2 -0
- package/dist/platform/svg-rasterizer.browser.d.ts.map +1 -0
- package/dist/platform/svg-rasterizer.browser.js +2 -0
- package/dist/platform/svg-rasterizer.browser.js.map +1 -0
- package/dist/platform/svg-rasterizer.d.ts +2 -0
- package/dist/platform/svg-rasterizer.d.ts.map +1 -0
- package/dist/platform/svg-rasterizer.js +2 -0
- package/dist/platform/svg-rasterizer.js.map +1 -0
- package/dist/registry.d.ts +32 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +67 -0
- package/dist/registry.js.map +1 -0
- package/dist/shape/shape-plugin.d.ts +21 -0
- package/dist/shape/shape-plugin.d.ts.map +1 -0
- package/dist/shape/shape-plugin.js +148 -0
- package/dist/shape/shape-plugin.js.map +1 -0
- package/dist/table/table-plugin.d.ts +4 -0
- package/dist/table/table-plugin.d.ts.map +1 -0
- package/dist/table/table-plugin.js +232 -0
- package/dist/table/table-plugin.js.map +1 -0
- package/dist/table/table-types.d.ts +50 -0
- package/dist/table/table-types.d.ts.map +1 -0
- package/dist/table/table-types.js +129 -0
- package/dist/table/table-types.js.map +1 -0
- package/dist/text/text-decoration.d.ts +22 -0
- package/dist/text/text-decoration.d.ts.map +1 -0
- package/dist/text/text-decoration.js +43 -0
- package/dist/text/text-decoration.js.map +1 -0
- package/dist/text/text-plugin.d.ts +9 -0
- package/dist/text/text-plugin.d.ts.map +1 -0
- package/dist/text/text-plugin.js +496 -0
- package/dist/text/text-plugin.js.map +1 -0
- package/dist/text/word-wrap.d.ts +41 -0
- package/dist/text/word-wrap.d.ts.map +1 -0
- package/dist/text/word-wrap.js +149 -0
- package/dist/text/word-wrap.js.map +1 -0
- package/dist/types.d.ts +96 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +27 -0
- package/dist/utils.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/platform/fs.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAGpE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
/**
|
|
4
|
+
* Read a file as bytes from a local path or file:// URL (Node.js only).
|
|
5
|
+
*/
|
|
6
|
+
export async function readFileBytes(src) {
|
|
7
|
+
const filePath = src.startsWith('file://') ? fileURLToPath(src) : src;
|
|
8
|
+
return readFile(filePath);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/platform/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC7C,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACtE,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InitInput } from '@resvg/resvg-wasm';
|
|
2
|
+
/**
|
|
3
|
+
* Initialize the resvg WASM module for browser use.
|
|
4
|
+
* Must be called once before any SVG rasterization.
|
|
5
|
+
*
|
|
6
|
+
* @param resvgWasm - The WASM binary as a fetch Response or ArrayBuffer
|
|
7
|
+
* @param fontBuffers - Optional font buffers for SVG text rendering (e.g. sans-serif)
|
|
8
|
+
*/
|
|
9
|
+
export declare function initBrowser(resvgWasm?: InitInput, fontBuffers?: Uint8Array[]): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=init.browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.browser.d.ts","sourceRoot":"","sources":["../../src/platform/init.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAOnD;;;;;;GAMG;AACH,wBAAsB,WAAW,CAC/B,SAAS,CAAC,EAAE,SAAS,EACrB,WAAW,CAAC,EAAE,UAAU,EAAE,GACzB,OAAO,CAAC,IAAI,CAAC,CAaf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { initWasm } from '@resvg/resvg-wasm';
|
|
2
|
+
import { setFontBuffers } from './font-store.js';
|
|
3
|
+
let initialized = false;
|
|
4
|
+
/**
|
|
5
|
+
* Initialize the resvg WASM module for browser use.
|
|
6
|
+
* Must be called once before any SVG rasterization.
|
|
7
|
+
*
|
|
8
|
+
* @param resvgWasm - The WASM binary as a fetch Response or ArrayBuffer
|
|
9
|
+
* @param fontBuffers - Optional font buffers for SVG text rendering (e.g. sans-serif)
|
|
10
|
+
*/
|
|
11
|
+
export async function initBrowser(resvgWasm, fontBuffers) {
|
|
12
|
+
if (initialized)
|
|
13
|
+
return;
|
|
14
|
+
if (!resvgWasm) {
|
|
15
|
+
throw new Error('initBrowser() requires the resvg WASM binary. ' +
|
|
16
|
+
'Pass a fetch() Response or ArrayBuffer for the @resvg/resvg-wasm WASM file.');
|
|
17
|
+
}
|
|
18
|
+
await initWasm(resvgWasm);
|
|
19
|
+
if (fontBuffers && fontBuffers.length > 0) {
|
|
20
|
+
setFontBuffers(fontBuffers);
|
|
21
|
+
}
|
|
22
|
+
initialized = true;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=init.browser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.browser.js","sourceRoot":"","sources":["../../src/platform/init.browser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,SAAqB,EACrB,WAA0B;IAE1B,IAAI,WAAW;QAAE,OAAO;IACxB,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,gDAAgD;YAC9C,6EAA6E,CAChF,CAAC;IACJ,CAAC;IACD,MAAM,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC1B,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,cAAc,CAAC,WAAW,CAAC,CAAC;IAC9B,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* No-op in Node.js — WASM initialization is only needed in browsers.
|
|
3
|
+
* Accepts `unknown` so the signature is a superset of the browser variant's `InitInput`.
|
|
4
|
+
*/
|
|
5
|
+
export declare function initBrowser(resvgWasm?: unknown, fontBuffers?: Uint8Array[]): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/platform/init.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAsB,WAAW,CAE/B,SAAS,CAAC,EAAE,OAAO,EAEnB,WAAW,CAAC,EAAE,UAAU,EAAE,GACzB,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* No-op in Node.js — WASM initialization is only needed in browsers.
|
|
3
|
+
* Accepts `unknown` so the signature is a superset of the browser variant's `InitInput`.
|
|
4
|
+
*/
|
|
5
|
+
export async function initBrowser(
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7
|
+
resvgWasm,
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
+
fontBuffers) {
|
|
10
|
+
// Nothing to do in Node.js — system fonts are used automatically
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/platform/init.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW;AAC/B,6DAA6D;AAC7D,SAAmB;AACnB,6DAA6D;AAC7D,WAA0B;IAE1B,iEAAiE;AACnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-rasterizer.browser.d.ts","sourceRoot":"","sources":["../../src/platform/svg-rasterizer.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-rasterizer.browser.js","sourceRoot":"","sources":["../../src/platform/svg-rasterizer.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-rasterizer.d.ts","sourceRoot":"","sources":["../../src/platform/svg-rasterizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg-rasterizer.js","sourceRoot":"","sources":["../../src/platform/svg-rasterizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Plugin } from './types.js';
|
|
2
|
+
/** Encapsulated plugin registry. Allows isolated registries for testing and rendering. */
|
|
3
|
+
export declare class PluginRegistry {
|
|
4
|
+
private plugins;
|
|
5
|
+
/** Register a plugin. Throws if a plugin with the same type is already registered. */
|
|
6
|
+
register(plugin: Plugin<any>): void;
|
|
7
|
+
/** Get a registered plugin by type. Throws if not found. */
|
|
8
|
+
get(type: string): Plugin;
|
|
9
|
+
/** Check if a plugin is registered. */
|
|
10
|
+
has(type: string): boolean;
|
|
11
|
+
/** Get all registered plugins. */
|
|
12
|
+
getAll(): Plugin[];
|
|
13
|
+
/** Remove all registered plugins. */
|
|
14
|
+
clear(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Register a plugin in the default module-level registry.
|
|
18
|
+
* For isolated registries (recommended for rendering and testing), create a PluginRegistry instance.
|
|
19
|
+
*/
|
|
20
|
+
export declare function registerPlugin(plugin: Plugin<any>): void;
|
|
21
|
+
/**
|
|
22
|
+
* Get a plugin from the default module-level registry. Throws if not found.
|
|
23
|
+
* For isolated registries (recommended for rendering and testing), use PluginRegistry.get().
|
|
24
|
+
*/
|
|
25
|
+
export declare function getPlugin(type: string): Plugin;
|
|
26
|
+
/** Check if a plugin exists in the default registry. */
|
|
27
|
+
export declare function hasPlugin(type: string): boolean;
|
|
28
|
+
/** Get all plugins from the default registry. */
|
|
29
|
+
export declare function getAllPlugins(): Plugin[];
|
|
30
|
+
/** Clear all plugins from the default registry (for testing). */
|
|
31
|
+
export declare function clearPlugins(): void;
|
|
32
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,0FAA0F;AAC1F,qBAAa,cAAc;IAEzB,OAAO,CAAC,OAAO,CAAkC;IAEjD,sFAAsF;IAEtF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI;IAOnC,4DAA4D;IAC5D,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAUzB,uCAAuC;IACvC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B,kCAAkC;IAClC,MAAM,IAAI,MAAM,EAAE;IAMlB,qCAAqC;IACrC,KAAK,IAAI,IAAI;CAGd;AAKD;;;GAGG;AAEH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAExD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,iDAAiD;AACjD,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAExC;AAED,iEAAiE;AACjE,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** Encapsulated plugin registry. Allows isolated registries for testing and rendering. */
|
|
2
|
+
export class PluginRegistry {
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
+
plugins = new Map();
|
|
5
|
+
/** Register a plugin. Throws if a plugin with the same type is already registered. */
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
register(plugin) {
|
|
8
|
+
if (this.plugins.has(plugin.type)) {
|
|
9
|
+
throw new Error(`Plugin "${plugin.type}" is already registered`);
|
|
10
|
+
}
|
|
11
|
+
this.plugins.set(plugin.type, plugin);
|
|
12
|
+
}
|
|
13
|
+
/** Get a registered plugin by type. Throws if not found. */
|
|
14
|
+
get(type) {
|
|
15
|
+
const plugin = this.plugins.get(type);
|
|
16
|
+
if (!plugin) {
|
|
17
|
+
throw new Error(`No plugin registered for type "${type}"`);
|
|
18
|
+
}
|
|
19
|
+
// Safe: heterogeneous registry stores Plugin<any>; callers use resolveProps() for typed props
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
21
|
+
return plugin;
|
|
22
|
+
}
|
|
23
|
+
/** Check if a plugin is registered. */
|
|
24
|
+
has(type) {
|
|
25
|
+
return this.plugins.has(type);
|
|
26
|
+
}
|
|
27
|
+
/** Get all registered plugins. */
|
|
28
|
+
getAll() {
|
|
29
|
+
// Safe: see get() comment — type erasure is intentional for heterogeneous storage
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
31
|
+
return [...this.plugins.values()];
|
|
32
|
+
}
|
|
33
|
+
/** Remove all registered plugins. */
|
|
34
|
+
clear() {
|
|
35
|
+
this.plugins.clear();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/** Default module-level registry instance. */
|
|
39
|
+
const defaultRegistry = new PluginRegistry();
|
|
40
|
+
/**
|
|
41
|
+
* Register a plugin in the default module-level registry.
|
|
42
|
+
* For isolated registries (recommended for rendering and testing), create a PluginRegistry instance.
|
|
43
|
+
*/
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
|
+
export function registerPlugin(plugin) {
|
|
46
|
+
defaultRegistry.register(plugin);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get a plugin from the default module-level registry. Throws if not found.
|
|
50
|
+
* For isolated registries (recommended for rendering and testing), use PluginRegistry.get().
|
|
51
|
+
*/
|
|
52
|
+
export function getPlugin(type) {
|
|
53
|
+
return defaultRegistry.get(type);
|
|
54
|
+
}
|
|
55
|
+
/** Check if a plugin exists in the default registry. */
|
|
56
|
+
export function hasPlugin(type) {
|
|
57
|
+
return defaultRegistry.has(type);
|
|
58
|
+
}
|
|
59
|
+
/** Get all plugins from the default registry. */
|
|
60
|
+
export function getAllPlugins() {
|
|
61
|
+
return defaultRegistry.getAll();
|
|
62
|
+
}
|
|
63
|
+
/** Clear all plugins from the default registry (for testing). */
|
|
64
|
+
export function clearPlugins() {
|
|
65
|
+
defaultRegistry.clear();
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAEA,0FAA0F;AAC1F,MAAM,OAAO,cAAc;IACzB,8DAA8D;IACtD,OAAO,GAAG,IAAI,GAAG,EAAuB,CAAC;IAEjD,sFAAsF;IACtF,8DAA8D;IAC9D,QAAQ,CAAC,MAAmB;QAC1B,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,WAAW,MAAM,CAAC,IAAI,yBAAyB,CAAC,CAAC;QACnE,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IAED,4DAA4D;IAC5D,GAAG,CAAC,IAAY;QACd,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,kCAAkC,IAAI,GAAG,CAAC,CAAC;QAC7D,CAAC;QACD,8FAA8F;QAC9F,+DAA+D;QAC/D,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,uCAAuC;IACvC,GAAG,CAAC,IAAY;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,kCAAkC;IAClC,MAAM;QACJ,kFAAkF;QAClF,+DAA+D;QAC/D,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,qCAAqC;IACrC,KAAK;QACH,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF;AAED,8CAA8C;AAC9C,MAAM,eAAe,GAAG,IAAI,cAAc,EAAE,CAAC;AAE7C;;;GAGG;AACH,8DAA8D;AAC9D,MAAM,UAAU,cAAc,CAAC,MAAmB;IAChD,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,aAAa;IAC3B,OAAO,eAAe,CAAC,MAAM,EAAE,CAAC;AAClC,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,YAAY;IAC1B,eAAe,CAAC,KAAK,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { JSONSchema } from '@jsonpdf/core';
|
|
2
|
+
import type { Plugin } from '../types.js';
|
|
3
|
+
export interface ShapeProps {
|
|
4
|
+
shapeType: 'rect' | 'circle' | 'ellipse';
|
|
5
|
+
fill?: string;
|
|
6
|
+
stroke?: string;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
dashPattern?: number[];
|
|
9
|
+
borderRadius?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const shapePropsSchema: JSONSchema;
|
|
12
|
+
/**
|
|
13
|
+
* Build an SVG path string for a rounded rectangle.
|
|
14
|
+
* The path is relative to origin (0, 0) for use with page.drawSvgPath().
|
|
15
|
+
* Note: SVG path Y-axis goes downward, but pdf-lib's drawSvgPath
|
|
16
|
+
* interprets the path in pdf-lib coordinates (Y-axis up). We build
|
|
17
|
+
* the path accordingly — M starts at top-left in pdf-lib coords.
|
|
18
|
+
*/
|
|
19
|
+
export declare function roundedRectPath(w: number, h: number, r: number): string;
|
|
20
|
+
export declare const shapePlugin: Plugin<ShapeProps>;
|
|
21
|
+
//# sourceMappingURL=shape-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape-plugin.d.ts","sourceRoot":"","sources":["../../src/shape/shape-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmB,UAAU,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAiC,MAAM,aAAa,CAAC;AAEzE,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,gBAAgB,EAAE,UAW9B,CAAC;AAIF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAkBvE;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,UAAU,CAiH1C,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { rgb } from 'pdf-lib';
|
|
2
|
+
import { parseColor } from '@jsonpdf/core';
|
|
3
|
+
export const shapePropsSchema = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
required: ['shapeType'],
|
|
6
|
+
properties: {
|
|
7
|
+
shapeType: { type: 'string', enum: ['rect', 'circle', 'ellipse'] },
|
|
8
|
+
fill: { type: 'string' },
|
|
9
|
+
stroke: { type: 'string' },
|
|
10
|
+
strokeWidth: { type: 'number', minimum: 0 },
|
|
11
|
+
dashPattern: { type: 'array', items: { type: 'number', minimum: 0 } },
|
|
12
|
+
borderRadius: { type: 'number', minimum: 0 },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
const SHAPE_DEFAULTS = { shapeType: 'rect' };
|
|
16
|
+
/**
|
|
17
|
+
* Build an SVG path string for a rounded rectangle.
|
|
18
|
+
* The path is relative to origin (0, 0) for use with page.drawSvgPath().
|
|
19
|
+
* Note: SVG path Y-axis goes downward, but pdf-lib's drawSvgPath
|
|
20
|
+
* interprets the path in pdf-lib coordinates (Y-axis up). We build
|
|
21
|
+
* the path accordingly — M starts at top-left in pdf-lib coords.
|
|
22
|
+
*/
|
|
23
|
+
export function roundedRectPath(w, h, r) {
|
|
24
|
+
// Clamp radius to half the smallest dimension
|
|
25
|
+
const cr = Math.min(r, w / 2, h / 2);
|
|
26
|
+
// In pdf-lib coordinate space: Y increases upward.
|
|
27
|
+
// SVG path rendered by drawSvgPath: Y increases downward in path, but
|
|
28
|
+
// pdf-lib flips it. So we draw the path as if Y goes down (SVG convention).
|
|
29
|
+
return [
|
|
30
|
+
`M ${String(cr)} 0`,
|
|
31
|
+
`L ${String(w - cr)} 0`,
|
|
32
|
+
`Q ${String(w)} 0 ${String(w)} ${String(cr)}`,
|
|
33
|
+
`L ${String(w)} ${String(h - cr)}`,
|
|
34
|
+
`Q ${String(w)} ${String(h)} ${String(w - cr)} ${String(h)}`,
|
|
35
|
+
`L ${String(cr)} ${String(h)}`,
|
|
36
|
+
`Q 0 ${String(h)} 0 ${String(h - cr)}`,
|
|
37
|
+
`L 0 ${String(cr)}`,
|
|
38
|
+
`Q 0 0 ${String(cr)} 0`,
|
|
39
|
+
'Z',
|
|
40
|
+
].join(' ');
|
|
41
|
+
}
|
|
42
|
+
export const shapePlugin = {
|
|
43
|
+
type: 'shape',
|
|
44
|
+
propsSchema: shapePropsSchema,
|
|
45
|
+
defaultProps: SHAPE_DEFAULTS,
|
|
46
|
+
resolveProps(raw) {
|
|
47
|
+
return { ...SHAPE_DEFAULTS, ...raw };
|
|
48
|
+
},
|
|
49
|
+
validate(props) {
|
|
50
|
+
const errors = [];
|
|
51
|
+
if (!['rect', 'circle', 'ellipse'].includes(props.shapeType)) {
|
|
52
|
+
errors.push({ path: '/shapeType', message: 'shapeType must be rect, circle, or ellipse' });
|
|
53
|
+
}
|
|
54
|
+
if (props.fill !== undefined && typeof props.fill === 'string' && !props.fill.startsWith('#')) {
|
|
55
|
+
errors.push({ path: '/fill', message: 'fill must be a hex string starting with #' });
|
|
56
|
+
}
|
|
57
|
+
if (props.stroke !== undefined &&
|
|
58
|
+
typeof props.stroke === 'string' &&
|
|
59
|
+
!props.stroke.startsWith('#')) {
|
|
60
|
+
errors.push({ path: '/stroke', message: 'stroke must be a hex string starting with #' });
|
|
61
|
+
}
|
|
62
|
+
if (props.strokeWidth !== undefined && props.strokeWidth < 0) {
|
|
63
|
+
errors.push({ path: '/strokeWidth', message: 'strokeWidth must be >= 0' });
|
|
64
|
+
}
|
|
65
|
+
if (props.borderRadius !== undefined && props.borderRadius < 0) {
|
|
66
|
+
errors.push({ path: '/borderRadius', message: 'borderRadius must be >= 0' });
|
|
67
|
+
}
|
|
68
|
+
return errors;
|
|
69
|
+
},
|
|
70
|
+
measure(_props, ctx) {
|
|
71
|
+
return Promise.resolve({ width: ctx.availableWidth, height: ctx.availableHeight });
|
|
72
|
+
},
|
|
73
|
+
render(props, ctx) {
|
|
74
|
+
const fillColor = props.fill ? parseColor(props.fill) : undefined;
|
|
75
|
+
const strokeColor = props.stroke ? parseColor(props.stroke) : undefined;
|
|
76
|
+
const strokeWidth = props.strokeWidth ?? (props.stroke ? 1 : 0);
|
|
77
|
+
const pdfFill = fillColor ? rgb(fillColor.r, fillColor.g, fillColor.b) : undefined;
|
|
78
|
+
const pdfStroke = strokeColor ? rgb(strokeColor.r, strokeColor.g, strokeColor.b) : undefined;
|
|
79
|
+
switch (props.shapeType) {
|
|
80
|
+
case 'rect': {
|
|
81
|
+
if (props.borderRadius && props.borderRadius > 0) {
|
|
82
|
+
const path = roundedRectPath(ctx.width, ctx.height, props.borderRadius);
|
|
83
|
+
ctx.page.drawSvgPath(path, {
|
|
84
|
+
x: ctx.x,
|
|
85
|
+
y: ctx.y,
|
|
86
|
+
color: pdfFill,
|
|
87
|
+
borderColor: pdfStroke,
|
|
88
|
+
borderWidth: strokeWidth,
|
|
89
|
+
borderDashArray: props.dashPattern,
|
|
90
|
+
opacity: ctx.opacity,
|
|
91
|
+
borderOpacity: ctx.opacity,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
ctx.page.drawRectangle({
|
|
96
|
+
x: ctx.x,
|
|
97
|
+
y: ctx.y - ctx.height,
|
|
98
|
+
width: ctx.width,
|
|
99
|
+
height: ctx.height,
|
|
100
|
+
color: pdfFill,
|
|
101
|
+
borderColor: pdfStroke,
|
|
102
|
+
borderWidth: strokeWidth,
|
|
103
|
+
borderDashArray: props.dashPattern,
|
|
104
|
+
opacity: ctx.opacity,
|
|
105
|
+
borderOpacity: ctx.opacity,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
case 'circle': {
|
|
111
|
+
const radius = Math.min(ctx.width, ctx.height) / 2;
|
|
112
|
+
const centerX = ctx.x + ctx.width / 2;
|
|
113
|
+
const centerY = ctx.y - ctx.height / 2;
|
|
114
|
+
ctx.page.drawCircle({
|
|
115
|
+
x: centerX,
|
|
116
|
+
y: centerY,
|
|
117
|
+
size: radius,
|
|
118
|
+
color: pdfFill,
|
|
119
|
+
borderColor: pdfStroke,
|
|
120
|
+
borderWidth: strokeWidth,
|
|
121
|
+
borderDashArray: props.dashPattern,
|
|
122
|
+
opacity: ctx.opacity,
|
|
123
|
+
borderOpacity: ctx.opacity,
|
|
124
|
+
});
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
case 'ellipse': {
|
|
128
|
+
const centerX = ctx.x + ctx.width / 2;
|
|
129
|
+
const centerY = ctx.y - ctx.height / 2;
|
|
130
|
+
ctx.page.drawEllipse({
|
|
131
|
+
x: centerX,
|
|
132
|
+
y: centerY,
|
|
133
|
+
xScale: ctx.width / 2,
|
|
134
|
+
yScale: ctx.height / 2,
|
|
135
|
+
color: pdfFill,
|
|
136
|
+
borderColor: pdfStroke,
|
|
137
|
+
borderWidth: strokeWidth,
|
|
138
|
+
borderDashArray: props.dashPattern,
|
|
139
|
+
opacity: ctx.opacity,
|
|
140
|
+
borderOpacity: ctx.opacity,
|
|
141
|
+
});
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return Promise.resolve();
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=shape-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape-plugin.js","sourceRoot":"","sources":["../../src/shape/shape-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAa3C,MAAM,CAAC,MAAM,gBAAgB,GAAe;IAC1C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,WAAW,CAAC;IACvB,UAAU,EAAE;QACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE;QAClE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,WA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