@pdfme/common 5.3.14-dev.1 → 5.3.14-dev.10
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/cjs/src/index.js +3 -1
- package/dist/cjs/src/index.js.map +1 -1
- package/dist/esm/src/index.js +2 -2
- package/dist/esm/src/index.js.map +1 -1
- package/dist/node/src/index.js +3 -1
- package/dist/node/src/index.js.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/index.ts +4 -0
package/dist/cjs/src/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.checkFont = exports.replacePlaceholders = exports.getDynamicTemplate = exports.isBlankPdf = exports.getInputFromTemplate = exports.isHexValid = exports.px2mm = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.b64toUint8Array = exports.getB64BasePdf = exports.getDefaultFont = exports.getFallbackFontName = exports.cloneDeep = exports.DEFAULT_FONT_NAME = exports.ZOOM = exports.BLANK_PDF = exports.PT_TO_PX_RATIO = exports.PT_TO_MM_RATIO = exports.MM_TO_PT_RATIO = exports.PDFME_VERSION = void 0;
|
3
|
+
exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.checkFont = exports.replacePlaceholders = exports.getDynamicTemplate = exports.isBlankPdf = exports.getInputFromTemplate = exports.isHexValid = exports.px2mm = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.b64toUint8Array = exports.getB64BasePdf = exports.getDefaultFont = exports.getFallbackFontName = exports.cloneDeep = exports.DEFAULT_FONT_NAME = exports.ZOOM = exports.CUSTOM_A4_PDF = exports.BLANK_A4_PDF = exports.BLANK_PDF = exports.PT_TO_PX_RATIO = exports.PT_TO_MM_RATIO = exports.MM_TO_PT_RATIO = exports.PDFME_VERSION = void 0;
|
4
4
|
const version_js_1 = require("./version.js");
|
5
5
|
Object.defineProperty(exports, "PDFME_VERSION", { enumerable: true, get: function () { return version_js_1.PDFME_VERSION; } });
|
6
6
|
const constants_js_1 = require("./constants.js");
|
@@ -8,6 +8,8 @@ Object.defineProperty(exports, "MM_TO_PT_RATIO", { enumerable: true, get: functi
|
|
8
8
|
Object.defineProperty(exports, "PT_TO_MM_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_MM_RATIO; } });
|
9
9
|
Object.defineProperty(exports, "PT_TO_PX_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_PX_RATIO; } });
|
10
10
|
Object.defineProperty(exports, "BLANK_PDF", { enumerable: true, get: function () { return constants_js_1.BLANK_PDF; } });
|
11
|
+
Object.defineProperty(exports, "BLANK_A4_PDF", { enumerable: true, get: function () { return constants_js_1.BLANK_A4_PDF; } });
|
12
|
+
Object.defineProperty(exports, "CUSTOM_A4_PDF", { enumerable: true, get: function () { return constants_js_1.CUSTOM_A4_PDF; } });
|
11
13
|
Object.defineProperty(exports, "ZOOM", { enumerable: true, get: function () { return constants_js_1.ZOOM; } });
|
12
14
|
Object.defineProperty(exports, "DEFAULT_FONT_NAME", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_NAME; } });
|
13
15
|
const helper_js_1 = require("./helper.js");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAoE3C,8FApEO,0BAAa,OAoEP;AAnEf,iDASwB;AA2DtB,+FAnEA,6BAAc,OAmEA;AACd,+FAnEA,6BAAc,OAmEA;AACd,+FAnEA,6BAAc,OAmEA;AACd,0FAnEA,wBAAS,OAmEA;AACT,6FAnEA,2BAAY,OAmEA;AACZ,8FAnEA,4BAAa,OAmEA;AACb,qFAnEA,mBAAI,OAmEA;AACJ,kGAnEA,gCAAiB,OAmEA;AAlCnB,2CAqBqB;AAcnB,0FAlCA,qBAAS,OAkCA;AACT,oGAlCA,+BAAmB,OAkCA;AACnB,+FAlCA,0BAAc,OAkCA;AACd,8FAlCA,yBAAa,OAkCA;AACb,gGAlCA,2BAAe,OAkCA;AAUf,0FA3CA,qBAAS,OA2CA;AACT,4FA3CA,uBAAW,OA2CA;AACX,+FA3CA,0BAAc,OA2CA;AACd,8FA3CA,yBAAa,OA2CA;AACb,6FA3CA,wBAAY,OA2CA;AACZ,kGA3CA,6BAAiB,OA2CA;AACjB,mGA3CA,8BAAkB,OA2CA;AAClB,mGA3CA,8BAAkB,OA2CA;AAhBlB,sFA1BA,iBAAK,OA0BA;AACL,sFA1BA,iBAAK,OA0BA;AACL,sFA1BA,iBAAK,OA0BA;AACL,sFA1BA,iBAAK,OA0BA;AACL,2FA1BA,sBAAU,OA0BA;AACV,qGA1BA,gCAAoB,OA0BA;AACpB,2FA1BA,sBAAU,OA0BA;AAxBZ,6DAA0D;AAyBxD,mGAzBO,uCAAkB,OAyBP;AAxBpB,mDAAsD;AAyBpD,oGAzBO,mCAAmB,OAyBP"}
|
package/dist/esm/src/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { PDFME_VERSION } from './version.js';
|
2
|
-
import { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, } from './constants.js';
|
2
|
+
import { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, BLANK_A4_PDF, CUSTOM_A4_PDF, ZOOM, DEFAULT_FONT_NAME, } from './constants.js';
|
3
3
|
import { cloneDeep, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, } from './helper.js';
|
4
4
|
import { getDynamicTemplate } from './dynamicTemplate.js';
|
5
5
|
import { replacePlaceholders } from './expression.js';
|
6
|
-
export { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, cloneDeep, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, replacePlaceholders, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
6
|
+
export { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, BLANK_A4_PDF, CUSTOM_A4_PDF, ZOOM, DEFAULT_FONT_NAME, cloneDeep, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, replacePlaceholders, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
7
7
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAgCxB,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAgCxB,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,eAAe,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
|
package/dist/node/src/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.checkFont = exports.replacePlaceholders = exports.getDynamicTemplate = exports.isBlankPdf = exports.getInputFromTemplate = exports.isHexValid = exports.px2mm = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.b64toUint8Array = exports.getB64BasePdf = exports.getDefaultFont = exports.getFallbackFontName = exports.cloneDeep = exports.DEFAULT_FONT_NAME = exports.ZOOM = exports.BLANK_PDF = exports.PT_TO_PX_RATIO = exports.PT_TO_MM_RATIO = exports.MM_TO_PT_RATIO = exports.PDFME_VERSION = void 0;
|
3
|
+
exports.checkGenerateProps = exports.checkDesignerProps = exports.checkPreviewProps = exports.checkUIProps = exports.checkTemplate = exports.checkUIOptions = exports.checkInputs = exports.checkFont = exports.replacePlaceholders = exports.getDynamicTemplate = exports.isBlankPdf = exports.getInputFromTemplate = exports.isHexValid = exports.px2mm = exports.pt2px = exports.pt2mm = exports.mm2pt = exports.b64toUint8Array = exports.getB64BasePdf = exports.getDefaultFont = exports.getFallbackFontName = exports.cloneDeep = exports.DEFAULT_FONT_NAME = exports.ZOOM = exports.CUSTOM_A4_PDF = exports.BLANK_A4_PDF = exports.BLANK_PDF = exports.PT_TO_PX_RATIO = exports.PT_TO_MM_RATIO = exports.MM_TO_PT_RATIO = exports.PDFME_VERSION = void 0;
|
4
4
|
const version_js_1 = require("./version.js");
|
5
5
|
Object.defineProperty(exports, "PDFME_VERSION", { enumerable: true, get: function () { return version_js_1.PDFME_VERSION; } });
|
6
6
|
const constants_js_1 = require("./constants.js");
|
@@ -8,6 +8,8 @@ Object.defineProperty(exports, "MM_TO_PT_RATIO", { enumerable: true, get: functi
|
|
8
8
|
Object.defineProperty(exports, "PT_TO_MM_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_MM_RATIO; } });
|
9
9
|
Object.defineProperty(exports, "PT_TO_PX_RATIO", { enumerable: true, get: function () { return constants_js_1.PT_TO_PX_RATIO; } });
|
10
10
|
Object.defineProperty(exports, "BLANK_PDF", { enumerable: true, get: function () { return constants_js_1.BLANK_PDF; } });
|
11
|
+
Object.defineProperty(exports, "BLANK_A4_PDF", { enumerable: true, get: function () { return constants_js_1.BLANK_A4_PDF; } });
|
12
|
+
Object.defineProperty(exports, "CUSTOM_A4_PDF", { enumerable: true, get: function () { return constants_js_1.CUSTOM_A4_PDF; } });
|
11
13
|
Object.defineProperty(exports, "ZOOM", { enumerable: true, get: function () { return constants_js_1.ZOOM; } });
|
12
14
|
Object.defineProperty(exports, "DEFAULT_FONT_NAME", { enumerable: true, get: function () { return constants_js_1.DEFAULT_FONT_NAME; } });
|
13
15
|
const helper_js_1 = require("./helper.js");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAoE3C,8FApEO,0BAAa,OAoEP;AAnEf,iDASwB;AA2DtB,+FAnEA,6BAAc,OAmEA;AACd,+FAnEA,6BAAc,OAmEA;AACd,+FAnEA,6BAAc,OAmEA;AACd,0FAnEA,wBAAS,OAmEA;AACT,6FAnEA,2BAAY,OAmEA;AACZ,8FAnEA,4BAAa,OAmEA;AACb,qFAnEA,mBAAI,OAmEA;AACJ,kGAnEA,gCAAiB,OAmEA;AAlCnB,2CAqBqB;AAcnB,0FAlCA,qBAAS,OAkCA;AACT,oGAlCA,+BAAmB,OAkCA;AACnB,+FAlCA,0BAAc,OAkCA;AACd,8FAlCA,yBAAa,OAkCA;AACb,gGAlCA,2BAAe,OAkCA;AAUf,0FA3CA,qBAAS,OA2CA;AACT,4FA3CA,uBAAW,OA2CA;AACX,+FA3CA,0BAAc,OA2CA;AACd,8FA3CA,yBAAa,OA2CA;AACb,6FA3CA,wBAAY,OA2CA;AACZ,kGA3CA,6BAAiB,OA2CA;AACjB,mGA3CA,8BAAkB,OA2CA;AAClB,mGA3CA,8BAAkB,OA2CA;AAhBlB,sFA1BA,iBAAK,OA0BA;AACL,sFA1BA,iBAAK,OA0BA;AACL,sFA1BA,iBAAK,OA0BA;AACL,sFA1BA,iBAAK,OA0BA;AACL,2FA1BA,sBAAU,OA0BA;AACV,qGA1BA,gCAAoB,OA0BA;AACpB,2FA1BA,sBAAU,OA0BA;AAxBZ,6DAA0D;AAyBxD,mGAzBO,uCAAkB,OAyBP;AAxBpB,mDAAsD;AAyBpD,oGAzBO,mCAAmB,OAyBP"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { PDFME_VERSION } from './version.js';
|
2
|
-
import { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME } from './constants.js';
|
2
|
+
import { MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, BLANK_A4_PDF, CUSTOM_A4_PDF, ZOOM, DEFAULT_FONT_NAME } from './constants.js';
|
3
3
|
import type { ChangeSchemaItem, ChangeSchemas, SchemaPageArray, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, Mode, UIRenderProps, Plugin, Lang, Dict, Size, Schema, SchemaForUI, Font, ColorType, BasePdf, BlankPdf, CustomPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps } from './types.js';
|
4
4
|
import { cloneDeep, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf } from './helper.js';
|
5
5
|
import { getDynamicTemplate } from './dynamicTemplate.js';
|
6
6
|
import { replacePlaceholders } from './expression.js';
|
7
|
-
export { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, ZOOM, DEFAULT_FONT_NAME, cloneDeep, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, replacePlaceholders, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
7
|
+
export { PDFME_VERSION, MM_TO_PT_RATIO, PT_TO_MM_RATIO, PT_TO_PX_RATIO, BLANK_PDF, BLANK_A4_PDF, CUSTOM_A4_PDF, ZOOM, DEFAULT_FONT_NAME, cloneDeep, getFallbackFontName, getDefaultFont, getB64BasePdf, b64toUint8Array, mm2pt, pt2mm, pt2px, px2mm, isHexValid, getInputFromTemplate, isBlankPdf, getDynamicTemplate, replacePlaceholders, checkFont, checkInputs, checkUIOptions, checkTemplate, checkUIProps, checkPreviewProps, checkDesignerProps, checkGenerateProps, };
|
8
8
|
export type { Lang, Dict, Size, Schema, SchemaForUI, Font, ColorType, BasePdf, BlankPdf, CustomPdf, Template, CommonOptions, GeneratorOptions, Plugins, GenerateProps, UIOptions, UIProps, PreviewProps, DesignerProps, ChangeSchemaItem, ChangeSchemas, SchemaPageArray, PropPanel, PropPanelSchema, PropPanelWidgetProps, PDFRenderProps, UIRenderProps, Mode, Plugin, };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -4,6 +4,8 @@ import {
|
|
4
4
|
PT_TO_MM_RATIO,
|
5
5
|
PT_TO_PX_RATIO,
|
6
6
|
BLANK_PDF,
|
7
|
+
BLANK_A4_PDF,
|
8
|
+
CUSTOM_A4_PDF,
|
7
9
|
ZOOM,
|
8
10
|
DEFAULT_FONT_NAME,
|
9
11
|
} from './constants.js';
|
@@ -69,6 +71,8 @@ export {
|
|
69
71
|
PT_TO_MM_RATIO,
|
70
72
|
PT_TO_PX_RATIO,
|
71
73
|
BLANK_PDF,
|
74
|
+
BLANK_A4_PDF,
|
75
|
+
CUSTOM_A4_PDF,
|
72
76
|
ZOOM,
|
73
77
|
DEFAULT_FONT_NAME,
|
74
78
|
cloneDeep,
|